window.TILE_VERSION={"ditu":{"normal":{"version":"088","updateDate":"20231115"},"satellite":{"version":"009","updateDate":"20231115"},"normalTraffic":{"version":"081","updateDate":"20231115"},"satelliteTraffic":{"version":"083","updateDate":"20231115"},"mapJS":{"version":"104","updateDate":"20231115"},"satelliteStreet":{"version":"083","updateDate":"20231115"},"earthVector":{"version":"001","updateDate":"20231115"}},"webapp":{"high_normal":{"version":"001","updateDate":"20231115"},"lower_normal":{"version":"002","updateDate":"20231115"}},"api_for_mobile":{"vector":{"version":"002","updateDate":"20231115"},"vectorIcon":{"version":"002","updateDate":"20231115"}}};window.MSV={"mapstyle":{"version":"001","updateDate":"20231009"}};window.BMAP_AUTHENTIC_KEY="3sVuspenlcs7GBjfDRon21xP0C0t4YAq";
(function(t){"use strict";function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function n(t,e){return t(e={exports:{}},e.exports),e.exports}Object.values||(Object.values=function(t){if(t!==Object(t))throw new TypeError("Object.values called on a non-object");var e,n=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.push(t[e]);return n}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=0;n<(arguments.length<=1?0:arguments.length-1);n++){var r=n+1<1||arguments.length<=n+1?void 0:arguments[n+1];if(null!=r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},writable:!0,configurable:!0});var r=n((function(t){function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})),i=e(r),o=e(n((function(t){function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports}))),a=e(n((function(t){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports}))),s=n((function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n,r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}));e(s);var u,h,c=e(n((function(t){t.exports=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,s(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports}))),l=function(t,e){var n=this;this.width=void 0,this.height=void 0,this.equals=function(t){return t&&n.width===t.width&&n.height===t.height},this.width=t||0,this.height=e||0},f=function(){function t(t,e){this.lng=void 0,this.lat=void 0,this.lng=+t,this.lat=+e}return t.prototype.equals=function(t){return t&&this.lat===t.lat&&this.lng===t.lng},t}(),d={REFRESH:"refresh",DATA_LOADED:"dataload",THUMB_LOADED:"thumb_loaded",SET_POV:"set_pov",POV_CHANGED:"pov_changed",POV_CHANGED_END:"pov_changed_end",ZOOM_CHANGED:"zoom_changed",SIZE_CHANGED:"size_changed",SET_ID:"set_id",SET_POSITION:"set_position",ID_CHANGED:"id_changed",POSITION_CHANGED:"position_changed",TOUCH_START:"touchstart",TOUCH_END:"touchend",CLICK:"click",DOUBLE_CLICK:"dblclick",LINK_CLICK:"link_click",OVERLAY_ADD:"overlay_add",OVERLAY_REMOVE:"overlay_remove",OVERLAYS_CLEAR:"overlays_clear",PANO_ERROR:"pano_error",LINK_VISIBLE_CHANGE:"links_visible_changed",DESTROY:"destroy",SCENE_CHANGE_END:"scene_change_end"},p={TYPE_INNER:"inter",TYPE_STREET:"street",RADIUS:3e3,COLS:16,ROWS:8,TILE_MAX_ZOOM:4,TILE_MIN_ZOOM:1,MIN_PITCH:-90,MAX_PITCH:90,MAX_ZOOM:4,MIN_ZOOM:1,TILE_BASE_URLS:["//apisv0.bdimg.com/","//apisv1.bdimg.com/"],TOPO_ARROW_TEXTURE:"//webmap0.bdimg.com/wolfman/static/pano/images/webgl/topo_arrow_06f0f2e.png",FISHEYE_DURATION:1500,FISHEYE_DELAY:2e3},v=(u={},h=(navigator.userAgent||"").toLowerCase(),u.isAndroid=h.includes("android"),u.isFirefox=h.includes("firefox"),u.isIos=/ip(hone|ad|od)/i.test(h),u.isWeixin=h.includes("micromessenger"),u.isWeibo=h.includes("weibo"),u.isWeChatOrWeiBo=u.isWeixin&&u.isWeibo,u.isBaiduMap=h.includes("baidumap_"),u.isMobile=/android|webos|ip(hone|ad|od)|opera (mini|mobi|tablet)|iemobile|windows.+(phone|touch)|mobile|fennec|kindle (Fire)|Silk|maemo|blackberry|playbook; (touch|kbd)|Symbian(OS)|Ubuntu Touch/i.test(h),u.isPc=!u.isMobile,u),m=function(t){for(var e=arguments.length<=1?0:arguments.length-1,n=0;n<e;n++){var r=n+1<1||arguments.length<=n+1?void 0:arguments[n+1];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},g=function(t){return t*Math.PI/180},y=function(t){return 180*t/Math.PI},_=function(t){return t-360*Math.floor(t/360)},x=function(){return Date.now()};var b=function t(){var e=t;if("boolean"==typeof e._supportWebGL)return e._supportWebGL;if(!window.WebGLRenderingContext)return e._supportWebGL=!1,!1;var n=null,r=document.createElement("canvas");try{(n=r.getContext("webgl")||r.getContext("experimental-webgl"))&&n instanceof WebGLRenderingContext&&(e._supportWebGL=!0)}catch(t){e._supportWebGL=!1}return null===n&&(e._supportWebGL=!1),e._supportWebGL},M=function(t){for(var e,n=Number.MAX_VALUE,r=-Number.MAX_VALUE,i=t.length-1;i>=0;i--)n>(e=t[i])&&(n=e),r<e&&(r=e);return{min:n,max:r}},w={g:function(t){return"string"==typeof t||t instanceof String?document.getElementById(t):t&&t.nodeName&&(1===t.nodeType||9===t.nodeType)?t:null},show:function(t){var e=w.g(t);return e&&(e.style.display=""),e},hide:function(t){var e=w.g(t);return e&&(e.style.display="none"),t},create:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.createElement(t);for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.setAttribute(r,e[r]);return n},getCurrentStyle:function(t){return window.getComputedStyle(t,null)}};function E(){var t,e,n=function(t,e){var n,r,i="eii",o="dac",a="hem",s="llm",u=function(t,e){return t+e},h="constructor",c=function(t,e){return t(e)},l=function(t,e){return t+e};function f(t,e){for(var n=i;"mill"!==n;)switch(n){case"llm":return c;case"eii":var r=t.length;n=o;break;case a:for(var u=0;u<r;u++){var h=e(t[u]);c.push(h)}n=s;break;case"dac":var c=[];n=a}}var d=decodeURIComponent;b="de",r=l("fr","o")+"m",n=l("Co",b);var p=function(t){return u(t,"")[h][u(r,"Char")+n](t)},v=function(t){return f(t,(function(t){return c(p,t)}))},m=v.call(p,[39,34,37,96,60,120,97,65,98,66,99,67,100,68,101,69,102,70,103,110,109,111,112,48,49,50,51,52,53,54,55,56,57]),g=f([28782,27702,26416,25167,24183],(function(t){return c(d,t)})),y=v.call(g,[22354,22749,24415,23346,22257,22688,24306,25174,23595,25547,22984,25690,22212,27547,21594,27210,23090,29193,22394,29368,29532,29459,29530,24146,24500,26352,27441,28788,29370,27673,26925,25249,24430]),_={};g=c(v,g);for(var x=new RegExp(g.join("|")),b=0;b<m.length;b++)_[y[b]]=m[b];return e=f(e.split(""),(function(t){return _[t]||t})).join(""),f(e.split(x),(function(t){return d(t)}))}(0,"su尫stri犸坺幷囄獜呚囄獜扏su尫str氶h廲廲呚l灮i犸囄呚墠O娲氶呚呚廲廲廲朰墠h姈i囄朰彟曰氙si坺犸彟欱殛");t=n,e=265,function(e){for(;--e;)t.push(t.shift())}(++e);var r=function(t,e){return n[t-=0]};return function(t){var e={dmedm:"F5L2O6R6AD8990O",haael:function(t,e){return t+e},eeaaa:function(t,e){return t(e)},xhcid:function(t,e){return t+e},deiic:function(t,e){return t-e}},n=e[r("0x0")],i=t[r("0x1")](e[r("0x2")](t[r("0x3")]("?"),1)),o=e[r("0x4")](md5,e[r("0x5")](md5(i+n),"H0A9P8P7Y6ABQO0"));return r("0x6")+o[r("0x7")](e.deiic(o.length,12))}}var T=function(t,e,n){var r,o,a="",s=[],u="jsonp"+Math.ceil(1e5*Math.random()),h=t.indexOf("?")>0?"&":"?";for(var c in n=Object.assign({},{jsonpCallback:"jsonp",timeout:5e4,jsonp:"callback"},n),e)({}).hasOwnProperty.call(e,c)&&(a="object"===i(e[c])?c+"="+JSON.stringify(e[c]):c+"="+e[c],s.push(a));function l(){r.parentNode&&r.parentNode.removeChild(r),window[u]=null}return t+=h+s.join("&"),o=document.getElementsByTagName("script")[0]||document.head,t=t+"&"+n.jsonp+"="+u,t+=E()(t),(r=document.createElement("script")).src=t,r.type="text/javascript",o.parentNode.appendChild(r,o),new Promise((function(t,e){window[u]=function(e){if(e&&"string"==typeof e)try{e=JSON.parse(e)}catch(t){e={},console.error("[ERROR] Parse Error.")}t(e),l()},r.onerror=function(t){l(),e({errno:-2,errmsg:"[ERROR] Load Error: ".concat(t),data:{}})}}))},A=function(){function t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._size=0,this._cache=void 0,this.keyList=[],this._options=void 0,this._size=t,this._cache=new window.Map;var n={clearCallback:null};this._options=Object.assign({},n,e)}var e=t.prototype;return e.setData=function(t,e){0!==this._size&&(this._cache.size>=this._size&&this._removeOld(),this._cache.has(t)||this.keyList.push(t),this._cache.set(t,e))},e.getData=function(t){return this._cache.get(t)},e._removeOld=function(){for(var t=Math.round(.6*this._size),e=0;e<t;e++){var n=this.keyList[e];this._options.clearCallback&&this._options.clearCallback(this.getData(n)),this._cache.delete(n)}this.keyList.splice(0,t)},e.clear=function(){this._cache.clear(),this.keyList=[]},o(t,[{key:"cacheCount",get:function(){return this._cache.size}}]),t}(),C=function(){function t(){var t=this;this.rid="",this.roadName="",this.roadWidth=5,this.isCurrentRoad=0,this.pointList=[],this.getTopoInRoad=function(e){var n=[],r=t.pointList,i=r.length,o=t.getPointByPanoId(e);if(!o||i<=1)return n;var a=o.order;return 0===a?n.push(t.generateTopoData(o.dir,r[1])):a===i-1?n.push(t.generateTopoData(r[a-1].dir+180,r[a-1])):(n.push(t.generateTopoData((r[a-1].dir+180)%360,r[a-1])),n.push(t.generateTopoData(r[a].dir,r[a+1]))),n},this.getPointByPanoId=function(e){for(var n,r=t.pointList,i=0,o=r.length;i<o;i++)if(r[i].panoId===e){n=r[i];break}return n}}return t.prototype.generateTopoData=function(t,e){return void 0!==e&&(e.topoDir=t,e.roadName=this.roadName),e},t}(),R=function(){var t=this;this.image=void 0,this.panoId="",this.iid="",this.panoType="",this.panoX=0,this.panoY=0,this.panoZ=0,this.heading=0,this.pitch=0,this.defaultHeading=void 0,this.defaultPitch=void 0,this.northDir=0,this.fixHeading=0,this.fixPitch=0,this.fixRoll=0,this.deviceHeight=0,this.date="20130822",this.time="",this.provider=1,this.admission="GS(2013)6021",this.photos=[],this.roadName="",this.roads=[],this.vpoints=[],this.topoArray=void 0,this.currentRoad=void 0,this.roadWidth=void 0,this.getCurrentRoad=function(){if(t.currentRoad)return t.currentRoad;for(var e=t.roads,n=0,r=e.length;n<r;n++)if(e[n].isCurrentRoad){t.currentRoad=e[n];break}return t.currentRoad},this.getTopos=function(){if(t.topoArray)return t.topoArray;if(t.currentRoad||(t.currentRoad=t.getCurrentRoad()),!t.currentRoad)return[];if(t.topoArray=t.currentRoad.getTopoInRoad(t.panoId),t.vpoints.length<1)return t.topoArray;for(var e,n=t.vpoints.length-1;n>=0;n--)(e=t.vpoints[n]).topoDir=e.dir,t.topoArray.push(e);return t.topoArray},this.getRoadWidth=function(){return void 0===t.roadWidth&&(t.currentRoad||(t.currentRoad=t.getCurrentRoad()),t.currentRoad?t.roadWidth=t.currentRoad.roadWidth:t.roadWidth=0),t.roadWidth}};function S(t){var e={};return e.panoId=t.PID,e.panoType=t.Type,e.rid=t.RID,e.dir=t.DIR,e.roadName=t.RoadName,e.order=t.Order,e.panoX=t.X/100,e.panoY=t.Y/100,void 0!==t.CPointX&&void 0!==t.CPointY&&(e.cPoint={x:t.CPointX/100,y:t.CPointY/100}),e}function P(t){if(!t)return console.error("Get none from server"),null;var e=t.result;if(e&&0!==e.error)return console.error("Get error from server"),null;var n=t.content;if(void 0===n||0===n.length||void 0===n[0])return console.error("Get empty data from server"),null;var r=n[0],i=new R,o=r.Roll,a={};if(i.panoId=r.ID,r.Inters instanceof Array){var s=r.Inters[0];void 0!==s&&(i.iid=s.IID)}if(i.panoType=r.Type,i.panoX=(r.X||0)/100,i.panoY=(r.Y||0)/100,i.panoZ=(r.Z||0)/100,i.heading=void 0!==r.MoveDir?r.MoveDir:0,i.northDir=r.NorthDir,i.fixHeading=void 0!==r.Heading?r.Heading:270-r.NorthDir,i.fixPitch=r.Pitch,i.fixRoll=90<o||-90>o?0:o,i.deviceHeight=r.DeviceHeight,i.date=r.Date||i.date,i.time=r.Time,i.provider=void 0!==r.Provider?r.Provider:i.provider,i.admission=r.Admission||i.admission,i.timeLine=r.TimeLine||[],i.roadName=r.Rname,r.Roads){var u=r.Roads;i.roads=u.map((function(t){return a[t.ID]=t.Name,function(t){var e=new C;if(e.rid=t.ID,e.roadName=t.Name,e.roadWidth=void 0!==t.Width?t.Width/100:0,e.isCurrentRoad=t.IsCurrent||0,t.Panos)for(var n=t.Panos,r=0,i=n.length;r<i;r++)e.pointList.push(S(n[r]));return e}(t)}))}if(r.Links)for(var h=r.Links,c=h.length,l=0;l<c;l++){var f=h[l];f.RoadName=a[f.RID],i.vpoints.push(S(f))}return i.photos=r.Photos||[],i}function D(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function O(t,e,n,r,i,o){return D((a=D(D(e,t),D(r,o)))<<(s=i)|a>>>32-s,n);var a,s}function I(t,e,n,r,i,o,a){return O(e&n|~e&r,t,e,i,o,a)}function L(t,e,n,r,i,o,a){return O(e&r|n&~r,t,e,i,o,a)}function B(t,e,n,r,i,o,a){return O(e^n^r,t,e,i,o,a)}function k(t,e,n,r,i,o,a){return O(n^(e|~r),t,e,i,o,a)}function U(t,e){var n,r,i,o,a;t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;var s=1732584193,u=-271733879,h=-1732584194,c=271733878;for(n=0;n<t.length;n+=16)r=s,i=u,o=h,a=c,s=I(s,u,h,c,t[n],7,-680876936),c=I(c,s,u,h,t[n+1],12,-389564586),h=I(h,c,s,u,t[n+2],17,606105819),u=I(u,h,c,s,t[n+3],22,-1044525330),s=I(s,u,h,c,t[n+4],7,-176418897),c=I(c,s,u,h,t[n+5],12,1200080426),h=I(h,c,s,u,t[n+6],17,-1473231341),u=I(u,h,c,s,t[n+7],22,-45705983),s=I(s,u,h,c,t[n+8],7,1770035416),c=I(c,s,u,h,t[n+9],12,-1958414417),h=I(h,c,s,u,t[n+10],17,-42063),u=I(u,h,c,s,t[n+11],22,-1990404162),s=I(s,u,h,c,t[n+12],7,1804603682),c=I(c,s,u,h,t[n+13],12,-40341101),h=I(h,c,s,u,t[n+14],17,-1502002290),s=L(s,u=I(u,h,c,s,t[n+15],22,1236535329),h,c,t[n+1],5,-165796510),c=L(c,s,u,h,t[n+6],9,-1069501632),h=L(h,c,s,u,t[n+11],14,643717713),u=L(u,h,c,s,t[n],20,-373897302),s=L(s,u,h,c,t[n+5],5,-701558691),c=L(c,s,u,h,t[n+10],9,38016083),h=L(h,c,s,u,t[n+15],14,-660478335),u=L(u,h,c,s,t[n+4],20,-405537848),s=L(s,u,h,c,t[n+9],5,568446438),c=L(c,s,u,h,t[n+14],9,-1019803690),h=L(h,c,s,u,t[n+3],14,-187363961),u=L(u,h,c,s,t[n+8],20,1163531501),s=L(s,u,h,c,t[n+13],5,-1444681467),c=L(c,s,u,h,t[n+2],9,-51403784),h=L(h,c,s,u,t[n+7],14,1735328473),s=B(s,u=L(u,h,c,s,t[n+12],20,-1926607734),h,c,t[n+5],4,-378558),c=B(c,s,u,h,t[n+8],11,-2022574463),h=B(h,c,s,u,t[n+11],16,1839030562),u=B(u,h,c,s,t[n+14],23,-35309556),s=B(s,u,h,c,t[n+1],4,-1530992060),c=B(c,s,u,h,t[n+4],11,1272893353),h=B(h,c,s,u,t[n+7],16,-155497632),u=B(u,h,c,s,t[n+10],23,-1094730640),s=B(s,u,h,c,t[n+13],4,681279174),c=B(c,s,u,h,t[n],11,-358537222),h=B(h,c,s,u,t[n+3],16,-722521979),u=B(u,h,c,s,t[n+6],23,76029189),s=B(s,u,h,c,t[n+9],4,-640364487),c=B(c,s,u,h,t[n+12],11,-421815835),h=B(h,c,s,u,t[n+15],16,530742520),s=k(s,u=B(u,h,c,s,t[n+2],23,-995338651),h,c,t[n],6,-198630844),c=k(c,s,u,h,t[n+7],10,1126891415),h=k(h,c,s,u,t[n+14],15,-1416354905),u=k(u,h,c,s,t[n+5],21,-57434055),s=k(s,u,h,c,t[n+12],6,1700485571),c=k(c,s,u,h,t[n+3],10,-1894986606),h=k(h,c,s,u,t[n+10],15,-1051523),u=k(u,h,c,s,t[n+1],21,-2054922799),s=k(s,u,h,c,t[n+8],6,1873313359),c=k(c,s,u,h,t[n+15],10,-30611744),h=k(h,c,s,u,t[n+6],15,-1560198380),u=k(u,h,c,s,t[n+13],21,1309151649),s=k(s,u,h,c,t[n+4],6,-145523070),c=k(c,s,u,h,t[n+11],10,-1120210379),h=k(h,c,s,u,t[n+2],15,718787259),u=k(u,h,c,s,t[n+9],21,-343485551),s=D(s,r),u=D(u,i),h=D(h,o),c=D(c,a);return[s,u,h,c]}function N(t){var e,n="",r=32*t.length;for(e=0;e<r;e+=8)n+=String.fromCharCode(t[e>>5]>>>e%32&255);return n}function F(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e<n.length;e+=1)n[e]=0;var r=8*t.length;for(e=0;e<r;e+=8)n[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return n}function j(t){var e,n,r="0123456789abcdef",i="";for(n=0;n<t.length;n+=1)e=t.charCodeAt(n),i+=r.charAt(e>>>4&15)+r.charAt(15&e);return i}function z(t){return unescape(encodeURIComponent(t))}function V(t){return function(t){return N(U(F(t),8*t.length))}(z(t))}function G(t,e){return function(t,e){var n,r,i=F(t),o=[],a=[];for(o[15]=a[15]=void 0,i.length>16&&(i=U(i,8*t.length)),n=0;n<16;n+=1)o[n]=909522486^i[n],a[n]=1549556828^i[n];return r=U(o.concat(F(e)),512+8*e.length),N(U(a.concat(r),640))}(z(t),z(e))}var W,H,Z,q,Y=function(t,e,n){return e?n?G(e,t):j(G(e,t)):n?V(t):j(V(t))},X=function(t,e){return T(t,{},{jsonp:"fn"})},K=function(t,e){if("PANORAMA"===t){var n="https://api.map.baidu.com/?qt=pano_entry&v=gl&ak="+window.BMAP_AUTHENTIC_KEY;"function"==typeof e?X(n).then((function(t){e()})).catch((function(t){})):X(n+"&callback="+e)}},Q=function(t){if("PANORAMA"===t)alert("您需要申请全景地图服务使用权限")},J=(H=null,Z=0,q=W||5e3,function(t){var e=(1e5*Math.random()).toFixed(0);window["cbk"+e]=function(t){t&&void 0!==t.error&&0===t.error||K("PANORAMA",(function(t){t&&void 0!==t.error&&0===t.error||Q("PANORAMA")}))},Z+=t,H||(H=setTimeout((function(){var t="https://api.map.baidu.com/?qt=pano_count&v=gl&ak="+window.BMAP_AUTHENTIC_KEY+"&consume="+Z;X(t+"&callback=window.cbk"+e),Z=0,H=null}),q))}),$=function(t,e){var n=(e=e||{}).counter?e.counter:1,r=!1!==e.isCounter,i=Date.parse(new Date),o=i/1e3,a=t+"-"+(o+1800)+"-"+i+"-"+window.BMAP_AUTHENTIC_KEY+"-SJvEY5h37ZDh5pHS",s=Y(a),u="auth_key="+(o+1800)+"-"+i+"-"+window.BMAP_AUTHENTIC_KEY+"-"+s;return r&&J(n),u},tt=function(){function t(e){var n=this;this.getPanoById=function(e){var r;r="".concat(t.SERVICE_URL,"?qt=sdata&sid=").concat(e,"&").concat($("/")),n.getDataByUrl(r).then((function(t){var e=P(t);if(null===e)throw new Error("数据解析异常");return n._cache.setData(r,t),n._pano.dispatchEvent(d.DATA_LOADED,{data:e}),n._pano.dispatchEvent(d.ID_CHANGED,e.panoId),n._pano.dispatchEvent(d.POSITION_CHANGED,new f(e.panoX,e.panoY)),e})).catch((function(t){n._pano.dispatchEvent({type:d.PANO_ERROR,data:t})}))},this.getPanoByLocation=function(e,r){var i;i="".concat(t.SERVICE_URL,"?qt=qsdata&x=").concat(e.lng,"&y=").concat(e.lat).concat(r?"&r="+r:"","&action=1&").concat($("/")),n.getDataByUrl(i).then((function(t){var r=P(t);n._cache.setData(i,t),n._pano.dispatchEvent(d.DATA_LOADED,{data:r}),n._pano.dispatchEvent(d.POSITION_CHANGED,e)})).catch((function(t){n._pano.dispatchEvent({type:d.PANO_ERROR,data:t})}))},this._pano=e,this._cache=new A(10)}return t.prototype.getDataByUrl=function(t){var e=this._cache.getData(t);return e?Promise.resolve(e):T(t,{},{jsonp:"fn"})},t}();tt.SERVICE_URL="//apisv0.bdimg.com/";var et=n((function(t){function e(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}t.exports=function(t){return function(){var n=this,r=arguments;return new Promise((function(i,o){var a=t.apply(n,r);function s(t){e(a,i,o,s,u,"next",t)}function u(t){e(a,i,o,s,u,"throw",t)}s(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports})),nt=e(et),rt=n((function(t){var e=r.default;function n(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var r={},i=Object.prototype,o=i.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",h=a.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof p?e:p,o=Object.create(i.prototype),a=new A(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return R()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=l;var d={};function p(){}function v(){}function m(){}var g={};c(g,s,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(C([])));_&&_!==i&&o.call(_,s)&&(g=_);var x=m.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function M(t,n){function r(i,a,s,u){var h=f(t[i],t,a);if("throw"!==h.type){var c=h.arg,l=c.value;return l&&"object"==e(l)&&o.call(l,"__await")?n.resolve(l.__await).then((function(t){r("next",t,s,u)}),(function(t){r("throw",t,s,u)})):n.resolve(l).then((function(t){c.value=t,s(c)}),(function(t){return r("throw",t,s,u)}))}u(h.arg)}var i;this._invoke=function(t,e){function o(){return new n((function(n,i){r(t,e,n,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,d;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function C(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(o.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:R}}function R(){return{value:void 0,done:!0}}return v.prototype=m,c(x,"constructor",m),c(m,"constructor",v),v.displayName=c(m,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,h,"GeneratorFunction")),t.prototype=Object.create(x),t},r.awrap=function(t){return{__await:t}},b(M.prototype),c(M.prototype,u,(function(){return this})),r.AsyncIterator=M,r.async=function(t,e,n,i,o){void 0===o&&(o=Promise);var a=new M(l(t,e,n,i),o);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(x),c(x,h,"Generator"),c(x,s,(function(){return this})),c(x,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},r.values=C,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}));e(rt);var it=rt(),ot=it;try{regeneratorRuntime=it}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=it:Function("r","regeneratorRuntime = r")(it)}function at(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}const st={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0};function ut(t,{precision:e=st.precision}={}){return t=function(t){return Math.round(t/st.EPSILON)*st.EPSILON}(t),"".concat(parseFloat(t.toPrecision(e)))}function ht(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function ct(t,e,n){const r=st.EPSILON;n&&(st.EPSILON=n);try{if(t===e)return!0;if(ht(t)&&ht(e)){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!ct(t[n],e[n]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):"number"==typeof t&&"number"==typeof e&&Math.abs(t-e)<=st.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{st.EPSILON=r}}class lt extends(function(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}(Array)){clone(){return(new this.constructor).copy(this)}fromArray(t,e=0){for(let n=0;n<this.ELEMENTS;++n)this[n]=t[n+e];return this.check()}toArray(t=[],e=0){for(let n=0;n<this.ELEMENTS;++n)t[e+n]=this[n];return t}from(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}to(t){return t===this?this:ht(t)?this.toArray(t):this.toObject(t)}toTarget(t){return t?this.to(t):this}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(st)}formatString(t){let e="";for(let n=0;n<this.ELEMENTS;++n)e+=(n>0?", ":"")+ut(this[n],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}equals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(!ct(this[e],t[e]))return!1;return!0}exactEquals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}negate(){for(let t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}lerp(t,e,n){if(void 0===n)return this.lerp(this,t,e);for(let r=0;r<this.ELEMENTS;++r){const i=t[r];this[r]=i+n*(e[r]-i)}return this.check()}min(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}max(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}clamp(t,e){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],t[n]),e[n]);return this.check()}add(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]+=e[t];return this.check()}subtract(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]-=e[t];return this.check()}scale(t){if("number"==typeof t)for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;else for(let e=0;e<this.ELEMENTS&&e<t.length;++e)this[e]*=t[e];return this.check()}multiplyByScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}check(){if(st.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}validate(){let t=this.length===this.ELEMENTS;for(let e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}sub(t){return this.subtract(t)}setScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}addScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}subScalar(t){return this.addScalar(-t)}multiplyScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}divideScalar(t){return this.multiplyByScalar(1/t)}clampScalar(t,e){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],t),e);return this.check()}get elements(){return this}}function ft(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function dt(t,e,n=""){if(st.debug&&!function(t,e){if(t.length!==e)return!1;for(let e=0;e<t.length;++e)if(!Number.isFinite(t[e]))return!1;return!0}(t,e))throw new Error("math.gl: ".concat(n," some fields set to invalid numbers'"));return t}class pt extends lt{get x(){return this[0]}set x(t){this[0]=ft(t)}get y(){return this[1]}set y(t){this[1]=ft(t)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let t=0;for(let e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}magnitudeSquared(){return this.lengthSquared()}distance(t){return Math.sqrt(this.distanceSquared(t))}distanceSquared(t){let e=0;for(let n=0;n<this.ELEMENTS;++n){const r=this[n]-t[n];e+=r*r}return ft(e)}dot(t){let e=0;for(let n=0;n<this.ELEMENTS;++n)e+=this[n]*t[n];return ft(e)}normalize(){const t=this.magnitude();if(0!==t)for(let e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}multiply(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]*=e[t];return this.check()}divide(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]/=e[t];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(t){return this.distance(t)}distanceToSquared(t){return this.distanceSquared(t)}getComponent(t){return at(t>=0&&t<this.ELEMENTS,"index is out of range"),ft(this[t])}setComponent(t,e){return at(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}addVectors(t,e){return this.copy(t).add(e)}subVectors(t,e){return this.copy(t).subtract(e)}multiplyVectors(t,e){return this.copy(t).multiply(e)}addScaledVector(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}}var vt=1e-6,mt="undefined"!=typeof Float32Array?Float32Array:Array,gt=Math.random;function yt(){var t=new mt(2);return mt!=Float32Array&&(t[0]=0,t[1]=0),t}function _t(t,e){var n=new mt(2);return n[0]=t,n[1]=e,n}function xt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function bt(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function Mt(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function wt(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.hypot(n,r)}function Et(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function Tt(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function At(t){var e=t[0],n=t[1];return e*e+n*n}function Ct(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var Rt,St=Tt,Pt=xt,Dt=bt,Ot=Mt,It=wt,Lt=Et,Bt=At,kt=(Rt=yt(),function(t,e,n,r,i,o){var a,s;for(e||(e=2),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,a=n;a<s;a+=e)Rt[0]=t[a],Rt[1]=t[a+1],i(Rt,Rt,o),t[a]=Rt[0],t[a+1]=Rt[1];return t}),Ut=Object.freeze({__proto__:null,create:yt,clone:function(t){var e=new mt(2);return e[0]=t[0],e[1]=t[1],e},fromValues:_t,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},set:function(t,e,n){return t[0]=e,t[1]=n,t},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},subtract:xt,multiply:bt,divide:Mt,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},scaleAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t},distance:wt,squaredDistance:Et,length:Tt,squaredLength:At,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},normalize:function(t,e){var n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},cross:function(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},lerp:function(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t},random:function(t,e){e=e||1;var n=2*gt()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},transformMat2:function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},transformMat2d:function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t},transformMat3:function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},transformMat4:Ct,rotate:function(t,e,n,r){var i=e[0]-n[0],o=e[1]-n[1],a=Math.sin(r),s=Math.cos(r);return t[0]=i*s-o*a+n[0],t[1]=i*a+o*s+n[1],t},angle:function(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=Math.sqrt(n*n+r*r)*Math.sqrt(i*i+o*o),s=a&&(n*i+r*o)/a;return Math.acos(Math.min(Math.max(s,-1),1))},zero:function(t){return t[0]=0,t[1]=0,t},str:function(t){return"vec2("+t[0]+", "+t[1]+")"},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]},equals:function(t,e){var n=t[0],r=t[1],i=e[0],o=e[1];return Math.abs(n-i)<=vt*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-o)<=vt*Math.max(1,Math.abs(r),Math.abs(o))},len:St,sub:Pt,mul:Dt,div:Ot,dist:It,sqrDist:Lt,sqrLen:Bt,forEach:kt});function Nt(t,e,n){const r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o||1;return t[0]=(n[0]*r+n[4]*i+n[8]*o)/a,t[1]=(n[1]*r+n[5]*i+n[9]*o)/a,t[2]=(n[2]*r+n[6]*i+n[10]*o)/a,t}function Ft(){var t=new mt(3);return mt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function jt(t){var e=new mt(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function zt(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function Vt(t,e,n){var r=new mt(3);return r[0]=t,r[1]=e,r[2]=n,r}function Gt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Wt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Ht(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Zt(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function qt(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function Yt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Xt(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot(n,r,i)}function Kt(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function Qt(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function Jt(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function $t(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function te(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}function ee(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function ne(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function re(t,e,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=e[0],u=e[1],h=e[2],c=i*h-o*u,l=o*s-r*h,f=r*u-i*s,d=i*f-o*l,p=o*c-r*f,v=r*l-i*c,m=2*a;return c*=m,l*=m,f*=m,d*=2,p*=2,v*=2,t[0]=s+c+d,t[1]=u+l+p,t[2]=h+f+v,t}function ie(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function oe(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function ae(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function se(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2],u=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+s*s),h=u&&$t(t,e)/u;return Math.acos(Math.min(Math.max(h,-1),1))}function ue(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2];return Math.abs(n-o)<=vt*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=vt*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=vt*Math.max(1,Math.abs(i),Math.abs(s))}var he=Ht,ce=Zt,le=qt,fe=Xt,de=Kt,pe=zt,ve=Qt,me=function(){var t=Ft();return function(e,n,r,i,o,a){var s,u;for(n||(n=3),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s<u;s+=n)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],o(t,t,a),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2];return e}}(),ge=Object.freeze({__proto__:null,create:Ft,clone:jt,length:zt,fromValues:Vt,copy:Gt,set:function(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t},add:Wt,subtract:Ht,multiply:Zt,divide:qt,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:Yt,scaleAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t},distance:Xt,squaredDistance:Kt,squaredLength:Qt,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},normalize:Jt,dot:$t,cross:te,lerp:function(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t},hermite:function(t,e,n,r,i,o){var a=o*o,s=a*(2*o-3)+1,u=a*(o-2)+o,h=a*(o-1),c=a*(3-2*o);return t[0]=e[0]*s+n[0]*u+r[0]*h+i[0]*c,t[1]=e[1]*s+n[1]*u+r[1]*h+i[1]*c,t[2]=e[2]*s+n[2]*u+r[2]*h+i[2]*c,t},bezier:function(t,e,n,r,i,o){var a=1-o,s=a*a,u=o*o,h=s*a,c=3*o*s,l=3*u*a,f=u*o;return t[0]=e[0]*h+n[0]*c+r[0]*l+i[0]*f,t[1]=e[1]*h+n[1]*c+r[1]*l+i[1]*f,t[2]=e[2]*h+n[2]*c+r[2]*l+i[2]*f,t},random:function(t,e){e=e||1;var n=2*gt()*Math.PI,r=2*gt()-1,i=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=r*e,t},transformMat4:ee,transformMat3:ne,transformQuat:re,rotateX:ie,rotateY:oe,rotateZ:ae,angle:se,zero:function(t){return t[0]=0,t[1]=0,t[2]=0,t},str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},equals:ue,sub:he,mul:ce,div:le,dist:fe,sqrDist:de,len:pe,sqrLen:ve,forEach:me});const ye=[0,0,0];let _e,xe;class be extends pt{static get ZERO(){return _e||(_e=new be(0,0,0),Object.freeze(_e)),_e}constructor(t=0,e=0,n=0){super(-0,-0,-0),1===arguments.length&&ht(t)?this.copy(t):(st.debug&&(ft(t),ft(e),ft(n)),this[0]=t,this[1]=e,this[2]=n)}set(t,e,n){return this[0]=t,this[1]=e,this[2]=n,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}fromObject(t){return st.debug&&(ft(t.x),ft(t.y),ft(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}get ELEMENTS(){return 3}get z(){return this[2]}set z(t){this[2]=ft(t)}angle(t){return se(this,t)}cross(t){return te(this,this,t),this.check()}rotateX({radians:t,origin:e=ye}){return ie(this,this,e,t),this.check()}rotateY({radians:t,origin:e=ye}){return oe(this,this,e,t),this.check()}rotateZ({radians:t,origin:e=ye}){return ae(this,this,e,t),this.check()}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return ee(this,this,t),this.check()}transformAsVector(t){return Nt(this,this,t),this.check()}transformByMatrix3(t){return ne(this,this,t),this.check()}transformByMatrix2(t){return function(t,e,n){const r=e[0],i=e[1];t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t[2]=e[2]}(this,this,t),this.check()}transformByQuaternion(t){return re(this,this,t),this.check()}}class Me extends pt{static get ZERO(){return xe||(xe=new Me(0,0,0,0),Object.freeze(xe)),xe}constructor(t=0,e=0,n=0,r=0){super(-0,-0,-0,-0),ht(t)&&1===arguments.length?this.copy(t):(st.debug&&(ft(t),ft(e),ft(n),ft(r)),this[0]=t,this[1]=e,this[2]=n,this[3]=r)}set(t,e,n,r){return this[0]=t,this[1]=e,this[2]=n,this[3]=r,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}fromObject(t){return st.debug&&(ft(t.x),ft(t.y),ft(t.z),ft(t.w)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this[3]=t.w,this}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t.w=this[3],t}get ELEMENTS(){return 4}get z(){return this[2]}set z(t){this[2]=ft(t)}get w(){return this[3]}set w(t){this[3]=ft(t)}transform(t){return ee(this,this,t),this.check()}transformByMatrix3(t){return function(t,e,n){const r=e[0],i=e[1],o=e[2];t[0]=n[0]*r+n[3]*i+n[6]*o,t[1]=n[1]*r+n[4]*i+n[7]*o,t[2]=n[2]*r+n[5]*i+n[8]*o,t[3]=e[3]}(this,this,t),this.check()}transformByMatrix2(t){return function(t,e,n){const r=e[0],i=e[1];t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t[2]=e[2],t[3]=e[3]}(this,this,t),this.check()}transformByQuaternion(t){return re(this,this,t),this.check()}applyMatrix4(t){return t.transform(this,this),this}}class we extends lt{toString(){let t="[";if(st.printRowMajor){t+="row-major:";for(let e=0;e<this.RANK;++e)for(let n=0;n<this.RANK;++n)t+=" ".concat(this[n*this.RANK+e])}else{t+="column-major:";for(let e=0;e<this.ELEMENTS;++e)t+=" ".concat(this[e])}return t+="]",t}getElementIndex(t,e){return e*this.RANK+t}getElement(t,e){return this[e*this.RANK+t]}setElement(t,e,n){return this[e*this.RANK+t]=ft(n),this}getColumn(t,e=new Array(this.RANK).fill(-0)){const n=t*this.RANK;for(let t=0;t<this.RANK;++t)e[t]=this[n+t];return e}setColumn(t,e){const n=t*this.RANK;for(let t=0;t<this.RANK;++t)this[n+t]=e[t];return this}}function Ee(){var t=new mt(9);return mt!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function Te(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=n[0],d=n[1],p=n[2],v=n[3],m=n[4],g=n[5],y=n[6],_=n[7],x=n[8];return t[0]=f*r+d*a+p*h,t[1]=f*i+d*s+p*c,t[2]=f*o+d*u+p*l,t[3]=v*r+m*a+g*h,t[4]=v*i+m*s+g*c,t[5]=v*o+m*u+g*l,t[6]=y*r+_*a+x*h,t[7]=y*i+_*s+x*c,t[8]=y*o+_*u+x*l,t}function Ae(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}var Ce=Te,Re=Ae,Se=Object.freeze({__proto__:null,create:Ee,fromMat4:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},clone:function(t){var e=new mt(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},fromValues:function(t,e,n,r,i,o,a,s,u){var h=new mt(9);return h[0]=t,h[1]=e,h[2]=n,h[3]=r,h[4]=i,h[5]=o,h[6]=a,h[7]=s,h[8]=u,h},set:function(t,e,n,r,i,o,a,s,u,h){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=h,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},transpose:function(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},invert:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=c*a-s*h,f=-c*o+s*u,d=h*o-a*u,p=n*l+r*f+i*d;return p?(p=1/p,t[0]=l*p,t[1]=(-c*r+i*h)*p,t[2]=(s*r-i*a)*p,t[3]=f*p,t[4]=(c*n-i*u)*p,t[5]=(-s*n+i*o)*p,t[6]=d*p,t[7]=(-h*n+r*u)*p,t[8]=(a*n-r*o)*p,t):null},adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8];return t[0]=a*c-s*h,t[1]=i*h-r*c,t[2]=r*s-i*a,t[3]=s*u-o*c,t[4]=n*c-i*u,t[5]=i*o-n*s,t[6]=o*h-a*u,t[7]=r*u-n*h,t[8]=n*a-r*o,t},determinant:function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],h=t[8];return e*(h*o-a*u)+n*(-h*i+a*s)+r*(u*i-o*s)},multiply:Te,translate:function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=n[0],d=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=f*r+d*a+h,t[7]=f*i+d*s+c,t[8]=f*o+d*u+l,t},rotate:function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=Math.sin(n),d=Math.cos(n);return t[0]=d*r+f*a,t[1]=d*i+f*s,t[2]=d*o+f*u,t[3]=d*a-f*r,t[4]=d*s-f*i,t[5]=d*u-f*o,t[6]=h,t[7]=c,t[8]=l,t},scale:function(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},fromRotation:function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromQuat:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,h=n*a,c=r*a,l=r*s,f=i*a,d=i*s,p=i*u,v=o*a,m=o*s,g=o*u;return t[0]=1-l-p,t[3]=c-g,t[6]=f+m,t[1]=c+g,t[4]=1-h-p,t[7]=d-v,t[2]=f-m,t[5]=d+v,t[8]=1-h-l,t},normalFromMat4:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=e[9],f=e[10],d=e[11],p=e[12],v=e[13],m=e[14],g=e[15],y=n*s-r*a,_=n*u-i*a,x=n*h-o*a,b=r*u-i*s,M=r*h-o*s,w=i*h-o*u,E=c*v-l*p,T=c*m-f*p,A=c*g-d*p,C=l*m-f*v,R=l*g-d*v,S=f*g-d*m,P=y*S-_*R+x*C+b*A-M*T+w*E;return P?(P=1/P,t[0]=(s*S-u*R+h*C)*P,t[1]=(u*A-a*S-h*T)*P,t[2]=(a*R-s*A+h*E)*P,t[3]=(i*R-r*S-o*C)*P,t[4]=(n*S-i*A+o*T)*P,t[5]=(r*A-n*R-o*E)*P,t[6]=(v*w-m*M+g*b)*P,t[7]=(m*x-p*w-g*_)*P,t[8]=(p*M-v*x+g*y)*P,t):null},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},subtract:Ae,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],h=t[7],c=t[8],l=e[0],f=e[1],d=e[2],p=e[3],v=e[4],m=e[5],g=e[6],y=e[7],_=e[8];return Math.abs(n-l)<=vt*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(r-f)<=vt*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(i-d)<=vt*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(o-p)<=vt*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-v)<=vt*Math.max(1,Math.abs(a),Math.abs(v))&&Math.abs(s-m)<=vt*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(u-g)<=vt*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(h-y)<=vt*Math.max(1,Math.abs(h),Math.abs(y))&&Math.abs(c-_)<=vt*Math.max(1,Math.abs(c),Math.abs(_))},mul:Ce,sub:Re});function Pe(){var t=new mt(16);return mt!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function De(t){var e=new mt(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Oe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Ie(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Le(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function Be(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=e[9],f=e[10],d=e[11],p=e[12],v=e[13],m=e[14],g=e[15],y=n*s-r*a,_=n*u-i*a,x=n*h-o*a,b=r*u-i*s,M=r*h-o*s,w=i*h-o*u,E=c*v-l*p,T=c*m-f*p,A=c*g-d*p,C=l*m-f*v,R=l*g-d*v,S=f*g-d*m,P=y*S-_*R+x*C+b*A-M*T+w*E;return P?(P=1/P,t[0]=(s*S-u*R+h*C)*P,t[1]=(i*R-r*S-o*C)*P,t[2]=(v*w-m*M+g*b)*P,t[3]=(f*M-l*w-d*b)*P,t[4]=(u*A-a*S-h*T)*P,t[5]=(n*S-i*A+o*T)*P,t[6]=(m*x-p*w-g*_)*P,t[7]=(c*w-f*x+d*_)*P,t[8]=(a*R-s*A+h*E)*P,t[9]=(r*A-n*R-o*E)*P,t[10]=(p*M-v*x+g*y)*P,t[11]=(l*x-c*M-d*y)*P,t[12]=(s*T-a*C-u*E)*P,t[13]=(n*C-r*T+i*E)*P,t[14]=(v*_-p*b-m*y)*P,t[15]=(c*b-l*_+f*y)*P,t):null}function ke(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],h=t[8],c=t[9],l=t[10],f=t[11],d=t[12],p=t[13],v=t[14],m=t[15];return(e*a-n*o)*(l*m-f*v)-(e*s-r*o)*(c*m-f*p)+(e*u-i*o)*(c*v-l*p)+(n*s-r*a)*(h*m-f*d)-(n*u-i*a)*(h*v-l*d)+(r*u-i*s)*(h*p-c*d)}function Ue(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=e[9],d=e[10],p=e[11],v=e[12],m=e[13],g=e[14],y=e[15],_=n[0],x=n[1],b=n[2],M=n[3];return t[0]=_*r+x*s+b*l+M*v,t[1]=_*i+x*u+b*f+M*m,t[2]=_*o+x*h+b*d+M*g,t[3]=_*a+x*c+b*p+M*y,_=n[4],x=n[5],b=n[6],M=n[7],t[4]=_*r+x*s+b*l+M*v,t[5]=_*i+x*u+b*f+M*m,t[6]=_*o+x*h+b*d+M*g,t[7]=_*a+x*c+b*p+M*y,_=n[8],x=n[9],b=n[10],M=n[11],t[8]=_*r+x*s+b*l+M*v,t[9]=_*i+x*u+b*f+M*m,t[10]=_*o+x*h+b*d+M*g,t[11]=_*a+x*c+b*p+M*y,_=n[12],x=n[13],b=n[14],M=n[15],t[12]=_*r+x*s+b*l+M*v,t[13]=_*i+x*u+b*f+M*m,t[14]=_*o+x*h+b*d+M*g,t[15]=_*a+x*c+b*p+M*y,t}function Ne(t,e,n){var r,i,o,a,s,u,h,c,l,f,d,p,v=n[0],m=n[1],g=n[2];return e===t?(t[12]=e[0]*v+e[4]*m+e[8]*g+e[12],t[13]=e[1]*v+e[5]*m+e[9]*g+e[13],t[14]=e[2]*v+e[6]*m+e[10]*g+e[14],t[15]=e[3]*v+e[7]*m+e[11]*g+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=h,t[7]=c,t[8]=l,t[9]=f,t[10]=d,t[11]=p,t[12]=r*v+s*m+l*g+e[12],t[13]=i*v+u*m+f*g+e[13],t[14]=o*v+h*m+d*g+e[14],t[15]=a*v+c*m+p*g+e[15]),t}function Fe(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function je(t,e,n,r){var i,o,a,s,u,h,c,l,f,d,p,v,m,g,y,_,x,b,M,w,E,T,A,C,R=r[0],S=r[1],P=r[2],D=Math.hypot(R,S,P);return D<vt?null:(R*=D=1/D,S*=D,P*=D,i=Math.sin(n),a=1-(o=Math.cos(n)),s=e[0],u=e[1],h=e[2],c=e[3],l=e[4],f=e[5],d=e[6],p=e[7],v=e[8],m=e[9],g=e[10],y=e[11],_=R*R*a+o,x=S*R*a+P*i,b=P*R*a-S*i,M=R*S*a-P*i,w=S*S*a+o,E=P*S*a+R*i,T=R*P*a+S*i,A=S*P*a-R*i,C=P*P*a+o,t[0]=s*_+l*x+v*b,t[1]=u*_+f*x+m*b,t[2]=h*_+d*x+g*b,t[3]=c*_+p*x+y*b,t[4]=s*M+l*w+v*E,t[5]=u*M+f*w+m*E,t[6]=h*M+d*w+g*E,t[7]=c*M+p*w+y*E,t[8]=s*T+l*A+v*C,t[9]=u*T+f*A+m*C,t[10]=h*T+d*A+g*C,t[11]=c*T+p*A+y*C,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function ze(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],h=e[8],c=e[9],l=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+h*r,t[5]=a*i+c*r,t[6]=s*i+l*r,t[7]=u*i+f*r,t[8]=h*i-o*r,t[9]=c*i-a*r,t[10]=l*i-s*r,t[11]=f*i-u*r,t}function Ve(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],h=e[8],c=e[9],l=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-h*r,t[1]=a*i-c*r,t[2]=s*i-l*r,t[3]=u*i-f*r,t[8]=o*r+h*i,t[9]=a*r+c*i,t[10]=s*r+l*i,t[11]=u*r+f*i,t}function Ge(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],h=e[4],c=e[5],l=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+h*r,t[1]=a*i+c*r,t[2]=s*i+l*r,t[3]=u*i+f*r,t[4]=h*i-o*r,t[5]=c*i-a*r,t[6]=l*i-s*r,t[7]=f*i-u*r,t}function We(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,h=o+o,c=r*s,l=r*u,f=r*h,d=i*u,p=i*h,v=o*h,m=a*s,g=a*u,y=a*h;return t[0]=1-(d+v),t[1]=l+y,t[2]=f-g,t[3]=0,t[4]=l-y,t[5]=1-(c+v),t[6]=p+m,t[7]=0,t[8]=f+g,t[9]=p-m,t[10]=1-(c+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function He(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],u=e[8],h=e[9],c=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,s),t[2]=Math.hypot(u,h,c),t}function Ze(t,e){var n=new mt(3);He(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,s=e[1]*i,u=e[2]*o,h=e[4]*r,c=e[5]*i,l=e[6]*o,f=e[8]*r,d=e[9]*i,p=e[10]*o,v=a+c+p,m=0;return v>0?(m=2*Math.sqrt(v+1),t[3]=.25*m,t[0]=(l-d)/m,t[1]=(f-u)/m,t[2]=(s-h)/m):a>c&&a>p?(m=2*Math.sqrt(1+a-c-p),t[3]=(l-d)/m,t[0]=.25*m,t[1]=(s+h)/m,t[2]=(f+u)/m):c>p?(m=2*Math.sqrt(1+c-a-p),t[3]=(f-u)/m,t[0]=(s+h)/m,t[1]=.25*m,t[2]=(l+d)/m):(m=2*Math.sqrt(1+p-a-c),t[3]=(s-h)/m,t[0]=(f+u)/m,t[1]=(l+d)/m,t[2]=.25*m),t}function qe(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,h=o+o,c=a+a,l=i*u,f=i*h,d=i*c,p=o*h,v=o*c,m=a*c,g=s*u,y=s*h,_=s*c,x=r[0],b=r[1],M=r[2];return t[0]=(1-(p+m))*x,t[1]=(f+_)*x,t[2]=(d-y)*x,t[3]=0,t[4]=(f-_)*b,t[5]=(1-(l+m))*b,t[6]=(v+g)*b,t[7]=0,t[8]=(d+y)*M,t[9]=(v-g)*M,t[10]=(1-(l+p))*M,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Ye(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,h=n*a,c=r*a,l=r*s,f=i*a,d=i*s,p=i*u,v=o*a,m=o*s,g=o*u;return t[0]=1-l-p,t[1]=c+g,t[2]=f-m,t[3]=0,t[4]=c-g,t[5]=1-h-p,t[6]=d+v,t[7]=0,t[8]=f+m,t[9]=d-v,t[10]=1-h-l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Xe(t,e,n,r,i,o,a){var s=1/(n-e),u=1/(i-r),h=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*h,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*h,t[15]=0,t}function Ke(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}var Qe=Ke;function Je(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),h=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*h,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*h,t[15]=1,t}var $e=Je;function tn(t,e,n,r){var i,o,a,s,u,h,c,l,f,d,p=e[0],v=e[1],m=e[2],g=r[0],y=r[1],_=r[2],x=n[0],b=n[1],M=n[2];return Math.abs(p-x)<vt&&Math.abs(v-b)<vt&&Math.abs(m-M)<vt?Ie(t):(c=p-x,l=v-b,f=m-M,i=y*(f*=d=1/Math.hypot(c,l,f))-_*(l*=d),o=_*(c*=d)-g*f,a=g*l-y*c,(d=Math.hypot(i,o,a))?(i*=d=1/d,o*=d,a*=d):(i=0,o=0,a=0),s=l*a-f*o,u=f*i-c*a,h=c*o-l*i,(d=Math.hypot(s,u,h))?(s*=d=1/d,u*=d,h*=d):(s=0,u=0,h=0),t[0]=i,t[1]=s,t[2]=c,t[3]=0,t[4]=o,t[5]=u,t[6]=l,t[7]=0,t[8]=a,t[9]=h,t[10]=f,t[11]=0,t[12]=-(i*p+o*v+a*m),t[13]=-(s*p+u*v+h*m),t[14]=-(c*p+l*v+f*m),t[15]=1,t)}function en(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=r[0],u=r[1],h=r[2],c=i-n[0],l=o-n[1],f=a-n[2],d=c*c+l*l+f*f;d>0&&(c*=d=1/Math.sqrt(d),l*=d,f*=d);var p=u*f-h*l,v=h*c-s*f,m=s*l-u*c;return(d=p*p+v*v+m*m)>0&&(p*=d=1/Math.sqrt(d),v*=d,m*=d),t[0]=p,t[1]=v,t[2]=m,t[3]=0,t[4]=l*m-f*v,t[5]=f*p-c*m,t[6]=c*v-l*p,t[7]=0,t[8]=c,t[9]=l,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function nn(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var rn=Ue,on=nn,an=Object.freeze({__proto__:null,create:Pe,clone:De,copy:Oe,fromValues:function(t,e,n,r,i,o,a,s,u,h,c,l,f,d,p,v){var m=new mt(16);return m[0]=t,m[1]=e,m[2]=n,m[3]=r,m[4]=i,m[5]=o,m[6]=a,m[7]=s,m[8]=u,m[9]=h,m[10]=c,m[11]=l,m[12]=f,m[13]=d,m[14]=p,m[15]=v,m},set:function(t,e,n,r,i,o,a,s,u,h,c,l,f,d,p,v,m){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=h,t[9]=c,t[10]=l,t[11]=f,t[12]=d,t[13]=p,t[14]=v,t[15]=m,t},identity:Ie,transpose:Le,invert:Be,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=e[9],f=e[10],d=e[11],p=e[12],v=e[13],m=e[14],g=e[15];return t[0]=s*(f*g-d*m)-l*(u*g-h*m)+v*(u*d-h*f),t[1]=-(r*(f*g-d*m)-l*(i*g-o*m)+v*(i*d-o*f)),t[2]=r*(u*g-h*m)-s*(i*g-o*m)+v*(i*h-o*u),t[3]=-(r*(u*d-h*f)-s*(i*d-o*f)+l*(i*h-o*u)),t[4]=-(a*(f*g-d*m)-c*(u*g-h*m)+p*(u*d-h*f)),t[5]=n*(f*g-d*m)-c*(i*g-o*m)+p*(i*d-o*f),t[6]=-(n*(u*g-h*m)-a*(i*g-o*m)+p*(i*h-o*u)),t[7]=n*(u*d-h*f)-a*(i*d-o*f)+c*(i*h-o*u),t[8]=a*(l*g-d*v)-c*(s*g-h*v)+p*(s*d-h*l),t[9]=-(n*(l*g-d*v)-c*(r*g-o*v)+p*(r*d-o*l)),t[10]=n*(s*g-h*v)-a*(r*g-o*v)+p*(r*h-o*s),t[11]=-(n*(s*d-h*l)-a*(r*d-o*l)+c*(r*h-o*s)),t[12]=-(a*(l*m-f*v)-c*(s*m-u*v)+p*(s*f-u*l)),t[13]=n*(l*m-f*v)-c*(r*m-i*v)+p*(r*f-i*l),t[14]=-(n*(s*m-u*v)-a*(r*m-i*v)+p*(r*u-i*s)),t[15]=n*(s*f-u*l)-a*(r*f-i*l)+c*(r*u-i*s),t},determinant:ke,multiply:Ue,translate:Ne,scale:Fe,rotate:je,rotateX:ze,rotateY:Ve,rotateZ:Ge,fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation:function(t,e,n){var r,i,o,a=n[0],s=n[1],u=n[2],h=Math.hypot(a,s,u);return h<vt?null:(a*=h=1/h,s*=h,u*=h,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=s*a*o+u*r,t[2]=u*a*o-s*r,t[3]=0,t[4]=a*s*o-u*r,t[5]=s*s*o+i,t[6]=u*s*o+a*r,t[7]=0,t[8]=a*u*o+s*r,t[9]=s*u*o-a*r,t[10]=u*u*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:We,fromQuat2:function(t,e){var n=new mt(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=r*r+i*i+o*o+a*a;return l>0?(n[0]=2*(s*a+c*r+u*o-h*i)/l,n[1]=2*(u*a+c*i+h*r-s*o)/l,n[2]=2*(h*a+c*o+s*i-u*r)/l):(n[0]=2*(s*a+c*r+u*o-h*i),n[1]=2*(u*a+c*i+h*r-s*o),n[2]=2*(h*a+c*o+s*i-u*r)),We(t,e,n),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},getScaling:He,getRotation:Ze,fromRotationTranslationScale:qe,fromRotationTranslationScaleOrigin:function(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],u=e[3],h=o+o,c=a+a,l=s+s,f=o*h,d=o*c,p=o*l,v=a*c,m=a*l,g=s*l,y=u*h,_=u*c,x=u*l,b=r[0],M=r[1],w=r[2],E=i[0],T=i[1],A=i[2],C=(1-(v+g))*b,R=(d+x)*b,S=(p-_)*b,P=(d-x)*M,D=(1-(f+g))*M,O=(m+y)*M,I=(p+_)*w,L=(m-y)*w,B=(1-(f+v))*w;return t[0]=C,t[1]=R,t[2]=S,t[3]=0,t[4]=P,t[5]=D,t[6]=O,t[7]=0,t[8]=I,t[9]=L,t[10]=B,t[11]=0,t[12]=n[0]+E-(C*E+P*T+I*A),t[13]=n[1]+T-(R*E+D*T+L*A),t[14]=n[2]+A-(S*E+O*T+B*A),t[15]=1,t},fromQuat:Ye,frustum:Xe,perspectiveNO:Ke,perspective:Qe,perspectiveZO:function(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),h=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=h,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*h*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:Je,ortho:$e,orthoZO:function(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),h=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=h,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=o*h,t[15]=1,t},lookAt:tn,targetTo:en,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:nn,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],h=t[7],c=t[8],l=t[9],f=t[10],d=t[11],p=t[12],v=t[13],m=t[14],g=t[15],y=e[0],_=e[1],x=e[2],b=e[3],M=e[4],w=e[5],E=e[6],T=e[7],A=e[8],C=e[9],R=e[10],S=e[11],P=e[12],D=e[13],O=e[14],I=e[15];return Math.abs(n-y)<=vt*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(r-_)<=vt*Math.max(1,Math.abs(r),Math.abs(_))&&Math.abs(i-x)<=vt*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(o-b)<=vt*Math.max(1,Math.abs(o),Math.abs(b))&&Math.abs(a-M)<=vt*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(s-w)<=vt*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(u-E)<=vt*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(h-T)<=vt*Math.max(1,Math.abs(h),Math.abs(T))&&Math.abs(c-A)<=vt*Math.max(1,Math.abs(c),Math.abs(A))&&Math.abs(l-C)<=vt*Math.max(1,Math.abs(l),Math.abs(C))&&Math.abs(f-R)<=vt*Math.max(1,Math.abs(f),Math.abs(R))&&Math.abs(d-S)<=vt*Math.max(1,Math.abs(d),Math.abs(S))&&Math.abs(p-P)<=vt*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(v-D)<=vt*Math.max(1,Math.abs(v),Math.abs(D))&&Math.abs(m-O)<=vt*Math.max(1,Math.abs(m),Math.abs(O))&&Math.abs(g-I)<=vt*Math.max(1,Math.abs(g),Math.abs(I))},mul:rn,sub:on});function sn(){var t=new mt(4);return mt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function un(t){var e=new mt(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function hn(t,e,n,r){var i=new mt(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function cn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function ln(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function fn(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function dn(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}function pn(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}function vn(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}function mn(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function gn(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.hypot(n,r,i,o)}function yn(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return n*n+r*r+i*i+o*o}function _n(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.hypot(e,n,r,i)}function xn(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function bn(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t}function Mn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function wn(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t[3]=s+r*(n[3]-s),t}function En(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function Tn(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function An(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=e[0],s=e[1],u=e[2],h=e[3];return Math.abs(n-a)<=vt*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=vt*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-u)<=vt*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(o-h)<=vt*Math.max(1,Math.abs(o),Math.abs(h))}var Cn,Rn=dn,Sn=pn,Pn=vn,Dn=gn,On=yn,In=_n,Ln=xn,Bn=function(){var t=sn();return function(e,n,r,i,o,a){var s,u;for(n||(n=4),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s<u;s+=n)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],t[3]=e[s+3],o(t,t,a),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2],e[s+3]=t[3];return e}}(),kn=Object.freeze({__proto__:null,create:sn,clone:un,fromValues:hn,copy:cn,set:ln,add:fn,subtract:dn,multiply:pn,divide:vn,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t},max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t},scale:mn,scaleAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t},distance:gn,squaredDistance:yn,length:_n,squaredLength:xn,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},normalize:bn,dot:Mn,cross:function(t,e,n,r){var i=n[0]*r[1]-n[1]*r[0],o=n[0]*r[2]-n[2]*r[0],a=n[0]*r[3]-n[3]*r[0],s=n[1]*r[2]-n[2]*r[1],u=n[1]*r[3]-n[3]*r[1],h=n[2]*r[3]-n[3]*r[2],c=e[0],l=e[1],f=e[2],d=e[3];return t[0]=l*h-f*u+d*s,t[1]=-c*h+f*a-d*o,t[2]=c*u-l*a+d*i,t[3]=-c*s+l*o-f*i,t},lerp:wn,random:function(t,e){var n,r,i,o,a,s;e=e||1;do{a=(n=2*gt()-1)*n+(r=2*gt()-1)*r}while(a>=1);do{s=(i=2*gt()-1)*i+(o=2*gt()-1)*o}while(s>=1);var u=Math.sqrt((1-a)/s);return t[0]=e*n,t[1]=e*r,t[2]=e*i*u,t[3]=e*o*u,t},transformMat4:En,transformQuat:function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2],h=n[3],c=h*r+s*o-u*i,l=h*i+u*r-a*o,f=h*o+a*i-s*r,d=-a*r-s*i-u*o;return t[0]=c*h+d*-a+l*-u-f*-s,t[1]=l*h+d*-s+f*-a-c*-u,t[2]=f*h+d*-u+c*-s-l*-a,t[3]=e[3],t},zero:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},exactEquals:Tn,equals:An,sub:Rn,mul:Sn,div:Pn,dist:Dn,sqrDist:On,len:In,sqrLen:Ln,forEach:Bn});!function(t){t[t.COL0ROW0=0]="COL0ROW0",t[t.COL0ROW1=1]="COL0ROW1",t[t.COL0ROW2=2]="COL0ROW2",t[t.COL0ROW3=3]="COL0ROW3",t[t.COL1ROW0=4]="COL1ROW0",t[t.COL1ROW1=5]="COL1ROW1",t[t.COL1ROW2=6]="COL1ROW2",t[t.COL1ROW3=7]="COL1ROW3",t[t.COL2ROW0=8]="COL2ROW0",t[t.COL2ROW1=9]="COL2ROW1",t[t.COL2ROW2=10]="COL2ROW2",t[t.COL2ROW3=11]="COL2ROW3",t[t.COL3ROW0=12]="COL3ROW0",t[t.COL3ROW1=13]="COL3ROW1",t[t.COL3ROW2=14]="COL3ROW2",t[t.COL3ROW3=15]="COL3ROW3"}(Cn||(Cn={}));const Un=45*Math.PI/180,Nn=1,Fn=.1,jn=500,zn=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);class Vn extends we{static get IDENTITY(){return function(){Wn||(Wn=new Vn,Object.freeze(Wn));return Wn}()}static get ZERO(){return function(){Gn||(Gn=new Vn([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Object.freeze(Gn));return Gn}()}get ELEMENTS(){return 16}get RANK(){return 4}get INDICES(){return Cn}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}set(t,e,n,r,i,o,a,s,u,h,c,l,f,d,p,v){return this[0]=t,this[1]=e,this[2]=n,this[3]=r,this[4]=i,this[5]=o,this[6]=a,this[7]=s,this[8]=u,this[9]=h,this[10]=c,this[11]=l,this[12]=f,this[13]=d,this[14]=p,this[15]=v,this.check()}setRowMajor(t,e,n,r,i,o,a,s,u,h,c,l,f,d,p,v){return this[0]=t,this[1]=i,this[2]=u,this[3]=f,this[4]=e,this[5]=o,this[6]=h,this[7]=d,this[8]=n,this[9]=a,this[10]=c,this[11]=p,this[12]=r,this[13]=s,this[14]=l,this[15]=v,this.check()}toRowMajor(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}identity(){return this.copy(zn)}fromObject(t){return this.check()}fromQuaternion(t){return Ye(this,t),this.check()}frustum(t){const{left:e,right:n,bottom:r,top:i,near:o=Fn,far:a=jn}=t;return a===1/0?function(t,e,n,r,i,o){const a=2*o/(n-e),s=2*o/(i-r),u=(n+e)/(n-e),h=(i+r)/(i-r),c=-1,l=-1,f=-2*o;t[0]=a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=u,t[9]=h,t[10]=c,t[11]=l,t[12]=0,t[13]=0,t[14]=f,t[15]=0}(this,e,n,r,i,o):Xe(this,e,n,r,i,o,a),this.check()}lookAt(t){const{eye:e,center:n=[0,0,0],up:r=[0,1,0]}=t;return tn(this,e,n,r),this.check()}ortho(t){const{left:e,right:n,bottom:r,top:i,near:o=Fn,far:a=jn}=t;return $e(this,e,n,r,i,o,a),this.check()}orthographic(t){const{fovy:e=Un,aspect:n=Nn,focalDistance:r=1,near:i=Fn,far:o=jn}=t;Hn(e);const a=e/2,s=r*Math.tan(a),u=s*n;return this.ortho({left:-u,right:u,bottom:-s,top:s,near:i,far:o})}perspective(t){const{fovy:e=45*Math.PI/180,aspect:n=1,near:r=.1,far:i=500}=t;return Hn(e),Qe(this,e,n,r,i),this.check()}determinant(){return ke(this)}getScale(t=[-0,-0,-0]){return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}getTranslation(t=[-0,-0,-0]){return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}getRotation(t,e){t=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=e||[-0,-0,-0];const n=this.getScale(e),r=1/n[0],i=1/n[1],o=1/n[2];return t[0]=this[0]*r,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=0,t[4]=this[4]*r,t[5]=this[5]*i,t[6]=this[6]*o,t[7]=0,t[8]=this[8]*r,t[9]=this[9]*i,t[10]=this[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}getRotationMatrix3(t,e){t=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=e||[-0,-0,-0];const n=this.getScale(e),r=1/n[0],i=1/n[1],o=1/n[2];return t[0]=this[0]*r,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=this[4]*r,t[4]=this[5]*i,t[5]=this[6]*o,t[6]=this[8]*r,t[7]=this[9]*i,t[8]=this[10]*o,t}transpose(){return Le(this,this),this.check()}invert(){return Be(this,this),this.check()}multiplyLeft(t){return Ue(this,t,this),this.check()}multiplyRight(t){return Ue(this,this,t),this.check()}rotateX(t){return ze(this,this,t),this.check()}rotateY(t){return Ve(this,this,t),this.check()}rotateZ(t){return Ge(this,this,t),this.check()}rotateXYZ(t){return this.rotateX(t[0]).rotateY(t[1]).rotateZ(t[2])}rotateAxis(t,e){return je(this,this,t,e),this.check()}scale(t){return Fe(this,this,Array.isArray(t)?t:[t,t,t]),this.check()}translate(t){return Ne(this,this,t),this.check()}transform(t,e){return 4===t.length?(dt(e=En(e||[-0,-0,-0,-0],t,this),4),e):this.transformAsPoint(t,e)}transformAsPoint(t,e){const{length:n}=t;let r;switch(n){case 2:r=Ct(e||[-0,-0],t,this);break;case 3:r=ee(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return dt(r,t.length),r}transformAsVector(t,e){let n;switch(t.length){case 2:n=function(t,e,n){const r=e[0],i=e[1],o=n[3]*r+n[7]*i||1;return t[0]=(n[0]*r+n[4]*i)/o,t[1]=(n[1]*r+n[5]*i)/o,t}(e||[-0,-0],t,this);break;case 3:n=Nt(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return dt(n,t.length),n}transformPoint(t,e){return this.transformAsPoint(t,e)}transformVector(t,e){return this.transformAsPoint(t,e)}transformDirection(t,e){return this.transformAsVector(t,e)}makeRotationX(t){return this.identity().rotateX(t)}makeTranslation(t,e,n){return this.identity().translate([t,e,n])}}let Gn,Wn;function Hn(t){if(t>2*Math.PI)throw Error("expected radians")}function Zn(){var t=new mt(4);return mt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function qn(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Yn(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function Xn(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1],h=n[2],c=n[3];return t[0]=r*c+a*s+i*h-o*u,t[1]=i*c+a*u+o*s-r*h,t[2]=o*c+a*h+r*u-i*s,t[3]=a*c-r*s-i*u-o*h,t}function Kn(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),s=Math.exp(o),u=a>0?s*Math.sin(a)/a:0;return t[0]=n*u,t[1]=r*u,t[2]=i*u,t[3]=s*Math.cos(a),t}function Qn(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),s=a>0?Math.atan2(a,o)/a:0;return t[0]=n*s,t[1]=r*s,t[2]=i*s,t[3]=.5*Math.log(n*n+r*r+i*i+o*o),t}function Jn(t,e,n,r){var i,o,a,s,u,h=e[0],c=e[1],l=e[2],f=e[3],d=n[0],p=n[1],v=n[2],m=n[3];return(o=h*d+c*p+l*v+f*m)<0&&(o=-o,d=-d,p=-p,v=-v,m=-m),1-o>vt?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,u=Math.sin(r*i)/a):(s=1-r,u=r),t[0]=s*h+u*d,t[1]=s*c+u*p,t[2]=s*l+u*v,t[3]=s*f+u*m,t}function $n(t,e){var n,r=e[0]+e[4]+e[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var o=(i+1)%3,a=(i+2)%3;n=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*a+a]+1),t[i]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+i]+e[3*i+o])*n,t[a]=(e[3*a+i]+e[3*i+a])*n}return t}function tr(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var o=Math.sin(e),a=Math.cos(e),s=Math.sin(n),u=Math.cos(n),h=Math.sin(r),c=Math.cos(r);return t[0]=o*u*c-a*s*h,t[1]=a*s*c+o*u*h,t[2]=a*u*h-o*s*c,t[3]=a*u*c+o*s*h,t}var er,nr,rr,ir,or,ar,sr=un,ur=hn,hr=cn,cr=ln,lr=fn,fr=Xn,dr=mn,pr=Mn,vr=wn,mr=_n,gr=mr,yr=xn,_r=yr,xr=bn,br=Tn,Mr=An,wr=(er=Ft(),nr=Vt(1,0,0),rr=Vt(0,1,0),function(t,e,n){var r=$t(e,n);return r<-.999999?(te(er,nr,e),pe(er)<1e-6&&te(er,rr,e),Jt(er,er),Yn(t,er,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(te(er,e,n),t[0]=er[0],t[1]=er[1],t[2]=er[2],t[3]=1+r,xr(t,t))}),Er=(ir=Zn(),or=Zn(),function(t,e,n,r,i,o){return Jn(ir,e,i,o),Jn(or,n,r,o),Jn(t,ir,or,2*o*(1-o)),t}),Tr=(ar=Ee(),function(t,e,n,r){return ar[0]=n[0],ar[3]=n[1],ar[6]=n[2],ar[1]=r[0],ar[4]=r[1],ar[7]=r[2],ar[2]=-e[0],ar[5]=-e[1],ar[8]=-e[2],xr(t,$n(t,ar))}),Ar=Object.freeze({__proto__:null,create:Zn,identity:qn,setAxisAngle:Yn,getAxisAngle:function(t,e){var n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>vt?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n},getAngle:function(t,e){var n=pr(t,e);return Math.acos(2*n*n-1)},multiply:Xn,rotateX:function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+a*s,t[1]=i*u+o*s,t[2]=o*u-i*s,t[3]=a*u-r*s,t},rotateY:function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u-o*s,t[1]=i*u+a*s,t[2]=o*u+r*s,t[3]=a*u-i*s,t},rotateZ:function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+i*s,t[1]=i*u-r*s,t[2]=o*u+a*s,t[3]=a*u-o*s,t},calculateW:function(t,e){var n=e[0],r=e[1],i=e[2];return t[0]=n,t[1]=r,t[2]=i,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),t},exp:Kn,ln:Qn,pow:function(t,e,n){return Qn(t,e),dr(t,t,n),Kn(t,t),t},slerp:Jn,random:function(t){var e=gt(),n=gt(),r=gt(),i=Math.sqrt(1-e),o=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*n),t[1]=i*Math.cos(2*Math.PI*n),t[2]=o*Math.sin(2*Math.PI*r),t[3]=o*Math.cos(2*Math.PI*r),t},invert:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=o*s,t},conjugate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},fromMat3:$n,fromEuler:tr,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},clone:sr,fromValues:ur,copy:hr,set:cr,add:lr,mul:fr,scale:dr,dot:pr,lerp:vr,length:mr,len:gr,squaredLength:yr,sqrLen:_r,normalize:xr,exactEquals:br,equals:Mr,rotationTo:wr,sqlerp:Er,setAxes:Tr});function Cr(t){return Cr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cr(t)}var Rr=function(t){return"[object String]"===Object.prototype.toString.call(t)},Sr=function(t){var e="[object Function]"===Object.prototype.toString.call(t),n="[object AsyncFunction]"===Object.prototype.toString.call(t);return e||n},Pr=365611;function Dr(t,e){this.type=t,this.returnValue=!0,this.target=e||null,this.currentTarget=null}var Or=function(){function t(){this.__listeners=void 0}var e=t.prototype;return e.on=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.alias("addEventListener")(e)},e.off=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.alias("removeEventListener")(e)},e.emit=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.alias("dispatchEvent")(e)},e.addEventListener=function(t,e,n){if(Sr(e)){var r;!this.__listeners&&(this.__listeners={});var i=this.__listeners;if("string"==typeof n&&n){if(/[^\w-]/.test(n))throw"nonstandard key:"+n;e.hashCode=n,r=n}!t.startsWith("on")&&(t="on"+t),"object"!==Cr(i[t])&&(i[t]={}),r=r||(++Pr).toString(),e.hashCode=r,i[t][r]=e}},e.removeEventListener=function(t,e){if(Sr(e))e=e.hashCode;else if(!Rr(e))return;!this.__listeners&&(this.__listeners={}),!t.startsWith("on")&&(t="on"+t);var n=this.__listeners;n[t]&&n[t][e]&&delete n[t][e]},e.dispatchEvent=function(t,e){Rr(t)&&(t=new Dr(t)),!this.__listeners&&(this.__listeners={});var n=this.__listeners,r=t.type,i=e||t;if(t.target=t.target||this,t.currentTarget=this,0!==r.indexOf("on")&&(r="on".concat(r)),Sr(n[r])&&n[r].call(this,i),"object"===Cr(n[r]))for(var o in n[r])Object.prototype.hasOwnProperty.call(n[r],o)&&n[r][o].call(this,i);return t.returnValue},e.alias=function(t){var e=this;return function(n){return e[t].apply(e,n)}},t}();function Ir(t,e){var n=e[2],r=e[0],i=e[1],o=e[3],a=o*o,s=n*n,u=r*r,h=i*i,c=i*n-r*o,l=.4999999;return c<-l?(t[0]=Math.PI/2,t[1]=2*Math.atan2(i,o),t[2]=0):c>l?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(i,o),t[2]=0):(t[0]=Math.asin(-2*(n*i-r*o)),t[1]=Math.atan2(2*(n*r+i*o),s-u-h+a),t[2]=Math.atan2(2*(r*i+n*o),-s-u+h+a)),t}var Lr=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.DefaultOrder;this.isEuler=!0,this._x=void 0,this._y=void 0,this._z=void 0,this._order=void 0,this._onChangeCallback=void 0,this._x=e,this._y=n,this._z=r,this._order=i,this._onChangeCallback=function(){}}var e=t.prototype;return e.set=function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return this._x=t,this._y=e,this._z=n,r&&this._onChangeCallback(),this},e.clone=function(){return new t(this._x,this._y,this._z,this._order)},e.copy=function(t){return t.isEuler?(this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this):this},e.equals=function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},e.toVector3=function(){return Vt(this._x,this._y,this._z)},e.onChange=function(t){"function"==typeof t&&(this._onChangeCallback=t)},o(t,[{key:"x",get:function(){return this._x},set:function(t){this._x=t,this._onChangeCallback()}},{key:"y",get:function(){return this._y},set:function(t){this._y=t,this._onChangeCallback()}},{key:"z",get:function(){return this._z},set:function(t){this._z=t,this._onChangeCallback()}},{key:"order",get:function(){return this._order},set:function(t){this._order=t,this._onChangeCallback()}}]),t}();function Br(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}Lr.DefaultOrder="XYZ";var kr=function(t){return 180*t/Math.PI},Ur=function(t){function e(){var n;return(n=t.call(this)||this).isObject3D=!0,n.uuid=Br(),n.name="",n.parent=null,n.children=[],n.visible=!0,n.position=Ft(),n.rotation=new Lr,n.scale=Vt(1,1,1),n.quaternion=Zn(),n.up=jt(e.DefaultUp),n.modelMatrix=Pe(),n.worldMatrix=Pe(),n.modelMatrixNeedUpdate=!1,n.worldMatrixNeedsUpdate=!1,n.rotation.onChange((function(){n.modelMatrixNeedUpdate=!0})),n}c(e,t);var n=e.prototype;return n.rotateX=function(t){this.rotation.x=t},n.rotateY=function(t){this.rotation.y=t},n.rotateZ=function(t){this.rotation.z=t},n.translate=function(t,e,n){var r=Vt(t,e,n);return this.position=Wt(this.position,this.position,r),this.modelMatrixNeedUpdate=!0,this},n.setPosition=function(t,e,n){var r=Vt(t,e,n);return ue(this.position,r)||(this.position=r,this.modelMatrixNeedUpdate=!0),this},n.lookAt=function(t,e,n){var r=this.up,i=this.position,o=Vt(t,e,n),a=en(Pe(),i,o,r),s=Ze(Zn(),a),u=Ir(Ft(),s);this.rotation.set(kr(u[0]),kr(u[1]),kr(u[2]))},n.setVisible=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.visible!==t&&(this.visible=t,e))for(var n=0,r=this.children.length;n<r;n++)this.children[n].setVisible(t,e)},n.setScale=function(t,e,n){var r=Vt(t,e,n);return ue(this.scale,r)||(this.scale=r,this.modelMatrixNeedUpdate=!0),this},n.updateMatrix=function(){Ie(this.modelMatrix),qn(this.quaternion),tr(this.quaternion,this.rotation.x,this.rotation.y,this.rotation.z),qe(this.modelMatrix,this.quaternion,this.position,this.scale),this.modelMatrixNeedUpdate=!1,this.worldMatrixNeedsUpdate=!0},n.updateWorldMatrix=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!0!==this.modelMatrixNeedUpdate&&!0!==t||this.updateMatrix(),!0===this.worldMatrixNeedsUpdate&&(this.parent?Ue(this.worldMatrix,this.parent.worldMatrix,this.modelMatrix):Oe(this.worldMatrix,this.modelMatrix),this.worldMatrixNeedsUpdate=!1,t=!0);for(var e=0,n=this.children.length;e<n;e++)this.children[e].updateWorldMatrix(t)},n.add=function(t){if(t===this)return console.error("object3D.add: object can't be added as a child of itself. ==> ".concat(t)),this;if(t instanceof Array){for(var e=0,n=t.length;e<n;e++)this.add(t[e]);return this}return t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,this.children.push(t)):console.error("Object3D.add: object not an instance of Object3D.",t),this},n.remove=function(t){if(t instanceof Array){for(var e=0,n=t.length;e<n;e++)this.remove(t[e]);return this}var r=this.children.indexOf(t);return-1!==r&&(t.parent=null,this.children.splice(r,1)),this},n.traverse=function(t){t(this),this.children&&this.children.length>0&&this.children.forEach((function(e){e.traverse(t)}))},n.clone=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=new e;if(n.up=jt(this.up),n.scale=jt(this.scale),n.position=jt(this.position),n.rotation=this.rotation.clone(),n.quaternion=sr(this.quaternion),n.modelMatrix=De(this.modelMatrix),n.worldMatrix=De(this.worldMatrix),n.visible=this.visible,this.children.length&&t)for(var r=0,i=this.children.length;r<i;r++)n.add(this.children[r].clone());return n},n.raycast=function(t){return null},e}(Or);Ur.DefaultUp=Vt(0,1,0);var Nr=function(){function t(t,e){this.isBox=!0,this.min=void 0,this.max=void 0,this.min=void 0!==t?t:Vt(1/0,1/0,1/0),this.max=void 0!==e?e:Vt(-1/0,-1/0,-1/0)}var e=t.prototype;return e.set=function(t,e){return Gt(this.min,t),Gt(this.max,e),this},e.setFromBufferAttribute=function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=t.array,u=t.count,h=t.itemSize,c=0;c<u;c++){var l=s[c*h],f=s[c*h+1],d=s[c*h+2];l<e&&(e=l),f<n&&(n=f),d<r&&(r=d),l>i&&(i=l),f>o&&(o=f),d>a&&(a=d)}var p=Vt(e,n,r),v=Vt(i,o,a);return this.set(p,v),this},e.getCenter=function(){return this.isInvalid()?Ft():Vt((this.max[0]+this.min[0])/2,(this.max[1]+this.min[1])/2,(this.max[2]+this.min[2])/2)},e.isInvalid=function(){return this.max[0]<this.min[0]||this.max[1]<this.min[1]||this.max[2]<this.min[2]},t}(),Fr=function(){function t(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.isBufferAttribute=!0,this.name="",this.type=void 0,this.array=void 0,this.itemSize=void 0,this.count=void 0,this.normalized=void 0,this.usage=void 0,this.needUpdate=void 0,Array.isArray(e))throw new TypeError("BufferAttribute: array should be a Typed Array.");if(this.name="BufferAttribute",this.array=e,this.itemSize=n,this.count=void 0!==e?e.length/n:0,this.normalized=!0===i,this.usage=35044,this.needUpdate=!0,void 0===r){var o=this.array;this.type=t.FLOAT,o instanceof Int8Array?this.type=t.BYTE:o instanceof Uint8Array?this.type=t.UNSIGNED_BYTE:o instanceof Int16Array?this.type=t.SHORT:o instanceof Uint16Array?this.type=t.UNSIGNED_SHORT:o instanceof Int32Array?this.type=t.INT:o instanceof Uint32Array&&(this.type=t.UNSIGNED_INT)}else this.type=r}t.isBufferAttribute=function(e){var n=!1;return e&&e instanceof t&&(n=!0),n};var e=t.prototype;return e.setUsage=function(t){return this.usage=t,this},e.setArray=function(t){return this.array.set(t),this},t}();Fr.BYTE=5120,Fr.UNSIGNED_BYTE=5121,Fr.SHORT=5122,Fr.UNSIGNED_SHORT=5123,Fr.INT=5124,Fr.UNSIGNED_INT=5125,Fr.FLOAT=5126;var jr=function(t){function e(e,n,r,i){var o;return(o=t.call(this,new Uint8Array(e),n,r,i)||this).name="Uint8BufferAttribute",o}return c(e,t),e}(Fr),zr=function(t){function e(e,n,r,i){var o;return(o=t.call(this,new Uint16Array(e),n,r,i)||this).name="Uint16BufferAttribute",o}return c(e,t),e}(Fr),Vr=function(t){function e(e,n,r,i){var o;return(o=t.call(this,new Uint32Array(e),n,r,i)||this).name="Uint32BufferAttribute",o}return c(e,t),e}(Fr),Gr=function(t){function e(e,n,r,i){var o;return(o=t.call(this,new Float32Array(e),n,r,i)||this).name="Float32ArrayAttribute",o}return c(e,t),e}(Fr),Wr=function(t){function e(e,n,r,i){var o;if(Array.isArray(e)){var a=function(t){for(var e,n=Number.MAX_VALUE,r=-Number.MAX_VALUE,i=t.length-1;i>=0;i--)n>(e=t[i])&&(n=e),r<e&&(r=e);return{min:n,max:r}}(e);o=new(a.max>65535?Uint32Array:Uint16Array)(e)}else o=e;return t.call(this,o,n,r,i)||this}return c(e,t),e}(Fr),Hr=0,Zr=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).id=Hr++,e.uuid=Br(),e.name="",e.type="BufferGeometry",e.indexes=null,e.attributes={},e.__webglInit=!1,e.groupsNeedUpdate=!1,e.boundingBox=null,e}c(e,t);var n=e.prototype;return n.getIndexes=function(){return this.indexes},n.getCenter=function(){return this.computeBoundingBox(),this.boundingBox?this.boundingBox.getCenter():void 0},n.setIndexes=function(t){return Array.isArray(t)||ArrayBuffer.isView(t)?this.indexes=new Wr(t,1):Wr.isBufferAttribute(t)&&(this.indexes=t),this},n.getAttribute=function(t){return t?this.attributes[t]:this.attributes},n.setAttribute=function(t,e){return t&&Fr.isBufferAttribute(e)&&(this.attributes[t]=e),this},n.deleteAttribute=function(t){return this.attributes[t]&&delete this.attributes[t],this},n.computeBoundingBox=function(){null===this.boundingBox&&(this.boundingBox=new Nr);var t=this.attributes.position;t&&t.isBufferAttribute&&this.boundingBox.setFromBufferAttribute(t)},e}(Or),qr=new be,Yr=new be,Xr=new be,Kr=function(t){function e(e,n){var r;return(r=t.call(this)||this).type="Mesh",r.geometry=void 0,r.material=void 0,r.materialChanged=void 0,r.__webglInit=!1,r.geometry=void 0!==e?e:new Zr,r.material=void 0!==n?n:null,r.materialChanged=!1,r}c(e,t);var n=e.prototype;return n.updateMaterial=function(t){this.material&&t.isMaterial&&t.uuid!==this.material.uuid&&(this.material=t,this.materialChanged=!0)},n.raycast=function(t){var e=this.geometry,n=e.indexes&&e.indexes.array,r=e.attributes.position.array;if(!n)return null;for(var i=0;i<n.length;i+=3){var o=3*n[i],a=3*n[i+1],s=3*n[i+2],u=qr.set(r[o],r[o+1],r[o+2]).transform(this.worldMatrix),h=Yr.set(r[a],r[a+1],r[a+2]).transform(this.worldMatrix),c=Xr.set(r[s],r[s+1],r[s+2]).transform(this.worldMatrix),l=t.intersectTriangle(u,h,c);if(l)return{distance:l.distance,point:l.point,object:this}}return null},e}(Ur),Qr=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).type="Scene",e.isScene=!0,e.autoUpdate=!0,e}c(e,t);var n=e.prototype;return n.updateWorldMatrix=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!0===this.autoUpdate&&t.prototype.updateWorldMatrix.call(this,e)},n.clone=function(n){return void 0===n&&(n=new e),t.prototype.clone.call(this,n),n.autoUpdate=this.autoUpdate,n},e}(Ur),Jr=function(t){function e(){var e;return(e=t.call(this)||this).type="Geometry",e.vertices=[],e.verticesBufferData=new Float32Array,e.indicesBufferData=new Uint16Array,e.uvtsBufferData=new Float32Array,e.groupsNeedUpdate=!1,e}return c(e,t),e}(Or),$r=new be,ti=new be,ei=new be,ni=new be,ri=new be,ii=function(){function t(t,e){this.origin=void 0,this.direction=void 0,this.origin=t||new be,this.direction=e||new be(0,0,-1)}var e=t.prototype;return e.set=function(t,e){return this.origin.copy(t),this.direction.copy(e),this},e.setFromCamera=function(t,e){var n=new be(e.position[0],e.position[1],e.position[2]),r=(new Vn).fromArray(e.projectionMatrix),i=e.worldMatrix,o=new Me(t[0],t[1],.5,1).transform(r).transform(i),a=o.x,s=o.y,u=o.z,h=new be(a,s,u).sub(n).normalize();this.set(n,h)},e.getPointByLen=function(t,e){var n=void 0!==e?e:new be;return n.copy(this.direction),n.scale(t),n.add(this.origin),n},e.intersectTriangle_Old=function(t,e,n){var r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,a=$r.copy(e).subtract(t),s=ti.copy(n).subtract(t),u=ei.copy(a).cross(s),h=ni.copy(this.origin).subtract(t),c=this.direction.dot(u);if(0<c){if(i)return null;r=1}else{if(!(0>c))return null;r=-1,c=-c}s.copy((new be).copy(h).cross(s));var l=r*this.direction.dot(s);if(0>l)return null;var f=r*this.direction.dot((new be).copy(h).cross(a));if(0>f)return null;if(l+f>c)return null;var d=-r*h.dot(u);return 0>d?null:this.getPointByLen(d/c,o)},e.intersectTriangle=function(t,e,n){var r=arguments.length>4?arguments[4]:void 0,i=1e-6,o=$r.subVectors(e,t),a=ti.subVectors(n,t),s=ei.copy(this.direction).cross(a),u=o.dot(s);if(u>-i&&u<i)return null;var h=1/u,c=ni.subVectors(this.origin,t),l=h*c.dot(s);if(l<0||l>1)return null;var f=ri.copy(c).cross(o),d=h*this.direction.dot(f);if(d<0||l+d>1)return null;var p=a.dot(f)*h;return p>i?{distance:p,point:this.getPointByLen(p,r)}:null},e.intersectSphere=function(t,e,n){var r=(new be).subtract(t,this.origin),i=r.dot(this.direction),o=r.dot(r)-i*i,a=e*e;if(o>a)return null;var s=Math.sqrt(a-o),u=i-s,h=i+s;return 0>u&&0>h?null:0>u?this.getPointByLen(h,n):this.getPointByLen(u,n)},t}();function oi(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ai(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ai(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ai(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var si=function(){function t(t,e,n,r){this.ray=void 0,this.near=void 0,this.far=void 0,this.ray=new ii(t,e),this.near=n||0,this.far=r||1/0}var e=t.prototype;return e.set=function(t,e){this.ray.set(t,e)},e.setFromCamera=function(t,e){var n=new be(e.position[0],e.position[1],e.position[2]),r=(new Vn).fromArray(e.projectionMatrix).invert(),i=e.worldMatrix,o=new Me(t[0],t[1],.5,1).transform(r).transform(i),a=o.x,s=o.y,u=o.z,h=new be(a,s,u).sub(n).normalize();this.set(n,h)},e.pick=function(t){var e,n=this.ray,r=[],i=oi([].concat(t));try{for(i.s();!(e=i.n()).done;){var o=e.value.raycast(n);o&&r.push(o)}}catch(t){i.e(t)}finally{i.f()}return r.sort((function(t,e){return t.distance-e.distance})),r},t}(),ui=function(t){function e(n){var r;return(r=t.call(this)||this).image=void 0,r.flipY=!0,r.premultiplyAlpha=!1,r.needsUpdate=!0,r.glTexture=null,r.isTexture=!0,r.gl=null,r.__textureInit=!1,r.clone=function(t){return void 0===t&&(t=new e),t.image=r.image,t.flipY=r.flipY,t},r.destory=function(){r.emit("destory",r.glTexture)},r.destoryTexture=function(){r.glTexture&&r.gl&&(r.off("destory",r.destoryTexture),r.gl.deleteTexture(r.glTexture))},void 0!==n&&(r.image=n),r}return c(e,t),e.prototype.init=function(t){!0!==this.__textureInit&&(this.gl=t,this.glTexture=t.createTexture(),this.on("destory",this.destoryTexture),this.__textureInit=!0)},e}(Or),hi=function(t){function e(e){var n;return(n=t.call(this)||this).isCube=!0,n.image=e||[],n.flipY=!1,n}return c(e,t),e}(ui),ci=function(){function t(t,e,n){var r=this;this.gl=void 0,this.maxTextureSize=void 0,this.maxTextures=void 0,this.usedTextureUnits=0,this.getTextureUnit=function(){var t=r.usedTextureUnits;return r.usedTextureUnits>=r.maxTextures?r.usedTextureUnits=0:r.usedTextureUnits+=1,t},this.resetUsedTextureUnits=function(){r.usedTextureUnits=0},this.setTexture=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t instanceof hi)r.setCubeTexture(t,e);else{var n=r.gl;n.activeTexture(n.TEXTURE0+e),t.needsUpdate?(t.init(n),r.uploadTexture(n,t)):n.bindTexture(n.TEXTURE_2D,t.glTexture)}},this.setTextureForRenderTarget=function(t){var e=r.gl;t.glTexture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,t.glTexture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),r.setTextureParameter(e);var n=e.RGBA,i=e.RGBA,o=e.UNSIGNED_BYTE;e.texImage2D(e.TEXTURE_2D,0,n,t.width,t.height,0,i,o,null)},this.uploadTexture=function(t,e){e.init(t),t.bindTexture(t.TEXTURE_2D,e.glTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.premultiplyAlpha),r.setTextureParameter(t),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e.image),e.needsUpdate=!1},this.setTextureParameter=function(t){t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR)},this.gl=t,this.maxTextureSize=n,this.maxTextures=e}return t.prototype.setCubeTexture=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=t.image;if(6!==n.length)throw new Error("[setCubeTexture] CubeTexture need six images, but get\n                ".concat(n.length,"\n            "));var r=this.gl;if(t.needsUpdate){t.init(r),r.activeTexture(r.TEXTURE0+e),r.bindTexture(r.TEXTURE_CUBE_MAP,t.glTexture),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,t.flipY),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE);for(var i=0;i<6;i++){var o=n[i];r.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,o)}t.needsUpdate=!1}else r.bindTexture(r.TEXTURE_CUBE_MAP,t.glTexture)},t}(),li=n((function(t){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},t.exports.__esModule=!0,t.exports.default=t.exports}));e(li);var fi=n((function(t){t.exports=function(t){if(Array.isArray(t))return li(t)},t.exports.__esModule=!0,t.exports.default=t.exports}));e(fi);var di=n((function(t){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports}));e(di);var pi=n((function(t){t.exports=function(t,e){if(t){if("string"==typeof t)return li(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?li(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports}));e(pi);var vi=n((function(t){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports}));e(vi);var mi=e(n((function(t){t.exports=function(t){return fi(t)||di(t)||pi(t)||vi()},t.exports.__esModule=!0,t.exports.default=t.exports}))),gi=n((function(t){t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports}));e(gi);var yi=n((function(t){t.exports=function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}},t.exports.__esModule=!0,t.exports.default=t.exports}));e(yi);var _i=n((function(t){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports}));e(_i);var xi=e(n((function(t){t.exports=function(t,e){return gi(t)||yi(t,e)||pi(t,e)||_i()},t.exports.__esModule=!0,t.exports.default=t.exports}))),bi=function(t,e,n){if(t&&e&&e.length)for(var r=e.length,i=0;i<r;i++){var o=void 0,a=void 0,s=void 0,u=e[i],h=xi(u,2),c=h[0],l=h[1],f=c.type,d=c.value;switch(c.type){case"1i":case"1f":t["uniform".concat(f)](l,c.value);break;case"2f":case"3f":case"4f":t["uniform".concat(f)].apply(t,[l].concat(mi(d)));break;case"t":if(!(o=c.value)||!o.image&&!o.glTexture)break;a=n.getTextureUnit(),t.uniform1i(l,a),n.setTexture(o,a);break;case"tv":s=[];for(var p=c.value,v=0,m=p.length;v<m;v++)s[v]=n.getTextureUnit();t.uniform1iv(l,s);for(var g=0,y=p.length;g<y;g++)(o=p[g])&&(o.image||o.glTexture)&&(a=s[g],n.setTexture(o,a));break;case"mat4fv":t.uniformMatrix4fv(l,!1,c.value);break;default:console.warn("[UniformOperation] Unknown uniform type: ".concat(f))}}};var Mi="\nvoid main() {\n    gl_Position = mvpMatrix * vec4(position, 1.0);\n}\n",wi="\nvoid main() {\n    gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n}\n",Ei=0,Ti=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).isMaterial=!0,e.id=Ei++,e.type="Material",e.name="",e.uuid=Br(),e.uniforms={},e.vertexShader=Mi,e.fragmentShader=wi,e.program=null,e.depthTest=!0,e.visible=!0,e.opacity=1,e.needsUpdate=!0,e.uniformsList=[],e}c(e,t);var n=e.prototype;return n.setValues=function(t){if(void 0!==t)for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var n=t[e];if(void 0===n){console.warn("Material: '"+e+"' parameter is undefined.");continue}if(void 0===this[e]){console.warn("".concat(this.type,": ").concat(e," is not a property of this material."));continue}var r="set"+e.charAt(0).toUpperCase()+e.slice(1);"function"==typeof this[r]?this[r](n):this[e]=n}},n.clone=function(){return(new e).copy(this)},n.copy=function(t){return this.uniforms=function(t){var e,n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))for(var i in n[r]={},t[r])Object.prototype.hasOwnProperty.call(t[r],i)&&((e=t[r][i])&&e.isTexture?n[r][i]=e.clone():n[r][i]=e instanceof Array?e.slice(0):e);return n}(t.uniforms),this.depthTest=t.depthTest,this.visible=t.visible,this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this},o(e,[{key:"defines",get:function(){return""}}]),e}(Or),Ai={useColor:"USE_COLOR",useUV:"NEED_UV"},Ci=function(){function t(){this.useColor=!1,this.useUV=!1}return t.prototype.getDefines=function(){for(var t=[],e=0,n=Object.keys(this);e<n.length;e++){var r=n[e];Ai[r]&&!0===this[r]&&t.push("#define ".concat(Ai[r]))}return t.push(""),t.join("\n")},t}(),Ri="\n#ifdef NEED_UV\n    varying vec2 vUV;\n#endif\nvoid main(void) {\n    gl_Position = mvpMatrix * vec4(position, 1.0);\n    #ifdef NEED_UV\n        vUV = uv;\n    #endif\n}\n",Si="\nprecision mediump float;\n#ifdef NEED_UV\n    varying vec2 vUV;\n    uniform sampler2D uSampler;\n#endif\n#ifdef USE_COLOR\n    uniform vec4 uColor;\n#endif\nuniform float uOpacity;\nvoid main(void) {\n    vec4 finalColor;\n    vec4 defaultColor = vec4(1.0, 0.0, 0.0, 1.0);\n    finalColor = defaultColor;\n    #ifdef USE_COLOR\n        finalColor = uColor;\n    #endif\n    #ifdef NEED_UV\n        finalColor = texture2D(uSampler, vUV);\n    #endif\n    gl_FragColor = vec4(finalColor.rgb, finalColor.a * uOpacity);\n}\n",Pi=function(t){function e(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(e=t.call(this)||this).map=null,e.color=[1,0,0,1],e.type="BasicMaterial",e.opacity=1,e.depthTest=!0,e.vertexShader=Ri,e.fragmentShader=Si,e.uniforms={uSampler:{type:"t",value:null},uColor:{type:"4f",value:[1,0,0,1]},uOpacity:{type:"1f",value:e.opacity}},e.setValues(n),e}c(e,t);var n=e.prototype;return n.setOpacity=function(t){this.uniforms.uOpacity.value=t,this.opacity=t},n.setColor=function(t){!Array.isArray(t)||t.length<4||(this.uniforms.uColor.value=t,this.color=t)},n.setMap=function(t){var e=this;t&&(t instanceof Promise?t.then((function(t){e.uniforms.uSampler.value=t instanceof ui==!0?t:new ui(t)})).catch((function(t){return console.error(t)})):!0===t.isTexture&&(this.uniforms.uSampler.value=t),this.map=t)},o(e,[{key:"defines",get:function(){var t=new Ci;return t.useColor=!!this.color,t.useUV=!!this.map,t.getDefines()}}]),e}(Ti),Di=function(t){var e=this;this.gl=void 0,this.newAttributes=new Uint8Array(16),this.enabledAttributes=new Uint8Array(16),this.currentDepthTest=!1,this.currentDepthWrite=!0,this.currentColorWrite=!0,this.currentDoubleSided=!1,this.currentFlipSided=!1,this.initAttributes=function(){for(var t=0,n=e.newAttributes.length;t<n;t++)e.newAttributes[t]=0},this.enableAttribute=function(t){var n=e.gl,r=e.newAttributes,i=e.enabledAttributes;r[t]=1,0===i[t]&&(n.enableVertexAttribArray(t),i[t]=1)},this.disableAttribute=function(t){var n=e.gl,r=e.newAttributes,i=e.enabledAttributes;r[t]=0,1===i[t]&&(n.disableVertexAttribArray(t),i[t]=0)},this.disableUnusedAttributes=function(){for(var t=e.gl,n=e.newAttributes,r=e.enabledAttributes,i=0,o=r.length;i<o;i++)r[i]!==n[i]&&(t.disableVertexAttribArray(i),r[i]=0)},this.setDepthTest=function(t){var n=e.gl;e.currentDepthTest!==t&&(t?n.enable(n.DEPTH_TEST):n.disable(n.DEPTH_TEST),e.currentDepthTest=t)},this.setDepthWrite=function(t){var n=e.gl;e.currentDepthWrite!==t&&(n.depthMask(t),e.currentDepthWrite=t)},this.setColorWrite=function(t){var n=e.gl;e.currentColorWrite!==t&&(n.colorMask(t,t,t,t),e.currentColorWrite=t)},this.setDefaultGLState=function(t,n,r,i){var o=e.gl;o.clearColor(229/255,227/255,223/255,1),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT),o.clearDepth(1),o.clearStencil(0),o.disable(o.DEPTH_TEST),o.depthFunc(o.LEQUAL),o.frontFace(o.CCW),o.disable(o.CULL_FACE),o.depthMask(!0),o.enable(o.BLEND),o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA),o.viewport(t,n,r,i)},this.setDoubleSided=function(t){var n=e.gl;e.currentDoubleSided!==t&&(t?n.disable(n.CULL_FACE):n.enable(n.CULL_FACE),e.currentDoubleSided=t)},this.setFlipSided=function(t){var n=e.gl;e.currentFlipSided!==t&&(t?n.frontFace(n.CW):n.frontFace(n.CCW),e.currentFlipSided=t)},this.reset=function(){for(var t=e.enabledAttributes,n=0;n<t.length;n++)t[n]=0;e.currentDepthTest=!1,e.currentDepthWrite=!0,e.currentColorWrite=!0,e.currentDoubleSided=!1,e.currentFlipSided=!1},this.gl=t},Oi=function(t){var e=this;this.maxTextures=void 0,this.maxTextureSize=void 0,this.maxVerticesOneDraw=void 0,this.maxVertexShaderTextureUnits=void 0,this.maxFragmentShaderTextureUnits=void 0,this.gl=void 0,this.getMaxTextures=function(){var t=e.gl;return t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS)},this.getLineWidthRange=function(){var t=e.gl;return t.getParameter(t.ALIASED_LINE_WIDTH_RANGE)},this.getMaxVertexShaderTextureUnits=function(){var t=e.gl;return t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS)},this.getMaxFragmentShaderTextureUnits=function(){var t=e.gl;return t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS)},this.getMaxTextureSize=function(){var t=e.gl;return t.getParameter(t.MAX_TEXTURE_SIZE)},this.getMaxVerticesOneDraw=function(){return e.gl.getExtension("OES_element_index_uint")?4294967296:65535},this.getLegalPrecision=function(t){var n=e.gl,r=n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT),i=n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT),o=n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT),a=n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT),s=r&&o&&r.precision>0&&o.precision>0,u=i&&a&&i.precision>0&&a.precision>0;return"highp"!==t||s?"mediump"!==t||u||(t="lowp",console.warn("[WebGLCapability] mediump is not supported, using lowp by default.")):u?(t="mediump",console.warn("[WebGLCapability] highp is not supported, using mediump by default.")):(t="lowp",console.warn("[WebGLCapability] highp and mediump is not supported, using lowp by default.")),t},this.gl=t,this.maxTextures=this.getMaxTextures(),this.maxVertexShaderTextureUnits=this.getMaxVertexShaderTextureUnits(),this.maxFragmentShaderTextureUnits=this.getMaxFragmentShaderTextureUnits(),this.maxTextureSize=this.getMaxTextureSize(),this.maxVerticesOneDraw=this.getMaxVerticesOneDraw()},Ii=0,Li=function(t,e,n){var r=t.createShader(n);if(!r)throw new Error("Something went wrong while compile the shader.");return t.shaderSource(r,e),t.compileShader(r),t.getShaderParameter(r,t.COMPILE_STATUS)||console.error("Error compiling shader: ".concat(t.getShaderInfoLog(r))),r},Bi=function(){function t(t,e,n){this.usedTimes=void 0,this.id=void 0,this.code=void 0,this.program=void 0,this.attributes=void 0,this.uniforms=void 0,this.gl=void 0,this.parameters=void 0,this.precision=void 0,this.gl=t,this.parameters=e,this.precision=n.precision||"highp",this.usedTimes=1,this.id=Ii++;var r=e.defines,i=void 0===r?"":r,o=e.vertexShader,a=e.fragmentShader;this.code=i+o+a,this.program=this.createProgram(t,e,this.precision),this.attributes=this.fetchAttributes(t,this.program),this.uniforms=function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i={},o=r.length;if(!o)return i;for(var a=0;a<o;a++)i[n=r[a]]=t.getUniformLocation(e,n);return i}(t,this.program,this.getFullUniforms(e.uniforms))}var e=t.prototype;return e.getAttributes=function(){return this.attributes},e.getUniforms=function(){return this.uniforms},e.createProgram=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"highp",r=e.vertexShader,i=e.fragmentShader,o=e.defines,a=void 0===o?"":o,s=["precision ".concat(n," float;"),"uniform mat4 modelMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat4 mvpMatrix;","attribute vec3 position;","attribute vec2 uv;",""].join("\n"),u=t.createProgram(),h=["precision ".concat(n," float;"),""].join("\n"),c=Li(t,s+a+r,t.VERTEX_SHADER),l=Li(t,h+a+i,t.FRAGMENT_SHADER);if(!u)throw new Error("Something went wrong while createProgram.");return t.attachShader(u,c),t.attachShader(u,l),t.linkProgram(u),u},e.fetchAttributes=function(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i);if(!o)throw new Error("Something went wrong while getActiveAttrib.");var a=o.name;n[a]=t.getAttribLocation(e,a)}return n},e.getFullUniforms=function(t){var e=["mvpMatrix","modelMatrix","projectionMatrix","viewMatrix"];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e},t}(),ki={canvas:document.createElement("canvas"),context:void 0,width:0,height:0,pixelRatio:1,precision:"highp",alpha:!1,premultipliedAlpha:!0,antialias:!0,stencil:!0,depth:!0,preserveDrawingBuffer:!1},Ui=function(){function t(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.state=void 0,this.domElement=void 0,this.capability=void 0,this.textureOperation=void 0,this._gl=void 0,this.parameters=void 0,this.programs=void 0,this.viewportInfo=void 0,this.autoDisposeProgram=!0,this.currentCacheState=void 0,this.setSize=function(e,n){var r=t.parameters,i=r.canvas,o=r.pixelRatio;i.style.width="".concat(e,"px"),i.style.height="".concat(n,"px"),i.width=e*o,i.height=n*o,t.setViewport(0,0,e,n)},this.setViewport=function(e,n,r,i){var o=t.parameters.pixelRatio,a=t.viewportInfo;a.x=e*o,a.y=n*o,a.width=r*o,a.height=i*o,t._gl.viewport.apply(t._gl,Object.values(a))},this.setClearColor=function(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;!0===t.parameters.premultipliedAlpha&&(e*=i,n*=i,r*=i),t._gl.clearColor(e,n,r,i)},this.getContext=function(){return t._gl},this.forceContextLoss=function(){try{var e=t._gl.getExtension("WEBGL_lose_context");e&&e.loseContext()}catch(t){console.error("[WebGLRenderer] WEBGL_lose_context error: ",t)}},this.initScene=function(e){!0===e.visible&&e.traverse((function(e){!0===e.visible&&e instanceof Kr&&t.initMesh(e)}))},this.initMesh=function(e){!0===e.visible&&(!0!==e.__webglInit&&(e.__webglInit=!0,e.addEventListener("removed",t.onObjectRemoved)),e.geometry&&t.checkAndUpdateGeometry(e.geometry),e.children&&e.children.length>0&&e.children.forEach((function(e){t.initMesh(e)})))},this.checkAndUpdateGeometry=function(e){!0!==e.__webglInit&&(e.__webglInit=!0,e.addEventListener("removed",t.onGeometryRemove),e.groupsNeedUpdate=!0),!0===e.groupsNeedUpdate&&("BufferGeometry"===e.type?t.updateBufferGeometry(e):t.updateGeometryBuffer(e,t._gl.STATIC_DRAW),e.groupsNeedUpdate=!1)},this.updateGeometryBuffer=function(e,n){var r=e.verticesBufferData,i=e.uvtsBufferData,o=e.indicesBufferData,a=e.borderVerticesBufferData,s=t._gl;0<r.length&&(e.glVerticesBuffer=s.createBuffer(),s.bindBuffer(s.ARRAY_BUFFER,e.glVerticesBuffer),s.bufferData(s.ARRAY_BUFFER,r,n)),0<i.length&&(e.glUvtsBuffer=s.createBuffer(),s.bindBuffer(s.ARRAY_BUFFER,e.glUvtsBuffer),s.bufferData(s.ARRAY_BUFFER,i,n)),0<o.length&&(e.glIndicesBuffer=s.createBuffer(),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,e.glIndicesBuffer),s.bufferData(s.ELEMENT_ARRAY_BUFFER,o,n)),!0===e.showBorder&&void 0!==a&&0<a.length&&(e.glBorderVerticesBuffer=s.createBuffer(),s.bindBuffer(s.ARRAY_BUFFER,e.glBorderVerticesBuffer),s.bufferData(s.ARRAY_BUFFER,e.borderVerticesBufferData,n))},this.renderScene=function(e,n){!0===e.visible&&e.traverse((function(e){e instanceof Kr&&(t.renderObject(e,n),e.children.length&&e.children.forEach((function(e){t.renderObject(e,n)})))}))},this.renderObject=function(e,n){var r=e.material,i=e.geometry;if(!0===e.visible&&r&&i&&!0===r.visible){t.state.setDepthTest(r.depthTest);var o=!1,a=t.setProgram(n,r,e);o="BufferGeometry"===i.type?t.updateVerticesAttribute2(a,i,!1):t.updateVerticesAttribute(a,i,!1),t.renderGeometryWithProgram(a,i,r,o)}},this.setProgram=function(e,n,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=t._gl;t.textureOperation.resetUsedTextureUnits(),t.checkAndUpdateMaterial(r.material);var a=n.program,s=a.getUniforms();return a.id!==t.currentCacheState.programId&&(o.useProgram(a.program),t.currentCacheState.programId=a.id),!1!==i&&bi(o,n.uniformsList,t.textureOperation),t.updateMVPMatrix(s,e,r),a},this.checkAndUpdateMaterial=function(e){void 0!==e&&(!0!==e.__webglInit&&(e.__webglInit=!0,e.addEventListener("removed",t.onMaterialRomove),e.needsUpdate=!0),!0===e.needsUpdate&&(t.updateMaterial(e),e.needsUpdate=!1))},this.updateMaterial=function(e){e.program&&t.removeMaterial(e);for(var n=null,r=t.programs.length,i=e.defines,o=(void 0===i?"":i)+e.vertexShader+e.fragmentShader,a=r-1;a>=0;a--){var s=t.programs[a];if(s.code===o){(n=s).usedTimes++;break}}if(null===n){var u={uniforms:e.uniforms,defines:e.defines||"",vertexShader:e.vertexShader,fragmentShader:e.fragmentShader};n=new Bi(t._gl,u,{precision:t.parameters.precision}),t.programs.push(n)}e.program=n,e.uniformsList=[];var h=0,c=n.uniforms,l=e.uniforms;for(var f in l)if(Object.prototype.hasOwnProperty.call(l,f)){var d=c[f];d&&(e.uniformsList[h]=[l[f],d],h++)}},this.updateMVPMatrix=function(e,n,r){if(void 0!==e.mvpMatrix){var i=De(n.projectionMatrix);Ue(i,i,n.viewMatrix),Ue(i,i,r.worldMatrix),t._gl.uniformMatrix4fv(e.mvpMatrix,!1,i),t._gl.uniformMatrix4fv(e.modelMatrix,!1,r.worldMatrix),t._gl.uniformMatrix4fv(e.viewMatrix,!1,n.viewMatrix),t._gl.uniformMatrix4fv(e.projectionMatrix,!1,n.projectionMatrix)}t.currentCacheState.camera=n},this.renderGeometryWithProgram=function(e,n,r){var i=t._gl,o=t.currentCacheState.curRenderTarget;if(e.uniforms.showDebugLine&&i.uniform1i(e.uniforms.showDebugLine,0),"BufferGeometry"===n.type?i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,n.indexesBuffer):i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,n.glIndicesBuffer),null!==o&&void 0!==o.glFrameBuffer){var a=i.checkFramebufferStatus(i.FRAMEBUFFER);if(i.FRAMEBUFFER_COMPLETE!==a)return t.removeRenderTarget(o),void(t.currentCacheState.curRenderTarget=null)}n.indexes&&n.indexes.count>0?i.drawElements(i.TRIANGLES,n.indexes.count,i.UNSIGNED_SHORT,0):i.drawArrays(i.TRIANGLES,0,n.attributes.position.count)},this.onObjectRemoved=function(e){e.target.traverse((function(e){e.removeEventListener("removed",t.onObjectRemoved),t.removeObject(e)}))},this.onGeometryRemove=function(e){var n=e.target;n.removeEventListener("removed",t.onGeometryRemove),t.removeGeometry(n)},this.onMaterialRomove=function(e){var n=e.target;n.removeEventListener("removed",t.onMaterialRomove),t.removeMaterial(n)},this.onRenderTargetRemove=function(e){var n=e.target;n.removeEventListener("removed",t.onRenderTargetRemove),t.removeRenderTarget(n)},this.removeObject=function(t){t.geometry&&delete t.geometry.__webglInit,delete t.__webglInit},this.removeGeometry=function(e){delete e.__webglInit,t.deleteBuffers(e),t.currentCacheState.geometryProgramId=null},this.deleteBuffers=function(e){["glVerticesBuffer","glUvtsBuffer","glIndicesBuffer","glBorderVerticesBuffer"].forEach((function(n){t._gl.deleteBuffer(e[n]),void 0!==e[n]&&0<e[n]&&delete e[n]}))},this.removeMaterial=function(e){var n=e.program.program;if(n){e.program=null;for(var r=t.programs,i=r.length-1;i>=0;i--){var o=r[i];if(o.program===n){o.usedTimes--,0===o.usedTimes&&!1!==t.autoDisposeProgram&&(r.splice(i,1),t._gl.deleteProgram(n));break}}}},this.removeRenderTarget=function(e){t._gl.deleteRenderbuffer(e.glDepthBuffer),e.glDepthBuffer=null,t._gl.deleteTexture(e.glTexture),e.glTexture=null,t._gl.deleteFramebuffer(e.glFrameBuffer),e.glFrameBuffer=null},this.parameters=Object.assign({},ki,e),e&&!e.canvas&&(this.parameters.canvas=document.createElement("canvas")),this.initGL(),this.programs=[],this.viewportInfo={x:0,y:0,width:this.parameters.canvas.width,height:this.parameters.canvas.height},this.parameters.width&&this.parameters.height&&this.setSize(this.parameters.width,this.parameters.height),this.domElement=this.parameters.canvas,this.state=new Di(this._gl),this.state.setDefaultGLState.apply(this.state,Object.values(this.viewportInfo)),this.currentCacheState={programId:null,geometryProgramId:null,materialId:null,camera:null,curRenderTarget:null},this.capability=new Oi(this._gl);var n=this.capability.maxTextures,r=this.capability.maxTextureSize;this.textureOperation=new ci(this._gl,n,r)}var e=t.prototype;return e.clearBuffer=function(){var t=this._gl;t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)},e.initGL=function(){var t=this,e=this.parameters,n=e.canvas,r=e.context,i=e.alpha,o=e.depth,a=e.stencil,s=e.antialias,u=e.premultipliedAlpha,h=e.preserveDrawingBuffer;try{var c={alpha:i,depth:o,stencil:a,antialias:s,premultipliedAlpha:u,preserveDrawingBuffer:h},l=r||n.getContext("webgl",c)||n.getContext("experimental-webgl",c)||n.getContext("moz-webgl",c)||n.getContext("webkit-3d",c);if(!l)throw null!==n.getContext?"Error creating WebGL context with your provided attributes.":"Error creating WebGL context.";this._gl=l,n.addEventListener("webglcontextlost",(function(e){e.preventDefault(),void 0!==t.state&&(t.resetGLState(),t.state.setDefaultGLState.apply(t.state,Object.values(t.viewportInfo)))}),!1)}catch(t){console.error("[WebGLRenderer] Create webgl error: ",t)}},e.resetGLState=function(){this.currentCacheState={programId:null,geometryProgramId:null,materialId:null,camera:null,curRenderTarget:null},this.state.reset()},e.setRenderTarget=function(t){var e=this._gl;void 0!==t&&null===t.glFrameBuffer&&(t.addEventListener("removed",this.onRenderTargetRemove),t.glFrameBuffer=e.createFramebuffer(),e.bindFramebuffer(e.FRAMEBUFFER,t.glFrameBuffer),this.textureOperation.setTextureForRenderTarget(t),t.glDepthBuffer=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,t.glDepthBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t.width,t.height),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t.glTexture,0),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t.glDepthBuffer),e.bindTexture(e.TEXTURE_2D,null),e.bindRenderbuffer(e.RENDERBUFFER,null),e.bindFramebuffer(e.FRAMEBUFFER,null))},e.render=function(t,e,n){if(e.isCamera){var r=this._gl;if(t.updateWorldMatrix(),e.updateWorldMatrix(),e.updateProjectionMatrix(),this.currentCacheState.camera=null,void 0!==n)this.setRenderTarget(n),this.currentCacheState.curRenderTarget=n,r.bindFramebuffer(r.FRAMEBUFFER,n.glFrameBuffer),r.viewport(0,0,n.width,n.height);else{var i=this.viewportInfo,o=i.width,a=i.height;this.currentCacheState.curRenderTarget=null,r.bindFramebuffer(r.FRAMEBUFFER,null),r.viewport(0,0,o,a)}this.initScene(t),this.renderScene(t,e)}else console.error("[WebGLRenderer]  Camera is not leagal.")},e.updateBufferGeometry=function(t){var e=this._gl,n=t.getIndexes(),r=t.getAttribute();for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var o=i+"Buffer",a=r[i],s=a.array,u=a.usage;t[o]=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,t[o]),e.bufferData(e.ARRAY_BUFFER,s,u)}n&&(t.indexesBuffer=e.createBuffer(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.indexesBuffer),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n.array,n.usage))},e.updateVerticesAttribute2=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this._gl,i=!1,o="".concat(e.id,"_").concat(t.id);if(o!==this.currentCacheState.geometryProgramId){this.currentCacheState.geometryProgramId=o,this.state.initAttributes(),i=!0;var a=e.getAttribute();for(var s in a)if(Object.prototype.hasOwnProperty.call(a,s)){var u=s+"Buffer",h=a[s],c=h.itemSize,l=h.type,f=h.normalized;0<=t.attributes[s]&&(!0!==n&&(r.bindBuffer(r.ARRAY_BUFFER,e[u]),r.vertexAttribPointer(t.attributes[s],c,l,f,0,0)),this.state.enableAttribute(t.attributes[s]))}}return this.state.disableUnusedAttributes(),i},e.updateVerticesAttribute=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this._gl,i=!1,o="".concat(e.id,"_").concat(t.id);if(o!==this.currentCacheState.geometryProgramId){this.currentCacheState.geometryProgramId=o,this.state.initAttributes(),i=!0;var a=t.getAttributes();0<=a.position&&(!0!==n&&(r.bindBuffer(r.ARRAY_BUFFER,e.glVerticesBuffer),r.vertexAttribPointer(a.position,3,r.FLOAT,!1,0,0)),this.state.enableAttribute(a.position)),0<=a.uv&&void 0!==e.glUvtsBuffer&&(r.bindBuffer(r.ARRAY_BUFFER,e.glUvtsBuffer),r.vertexAttribPointer(a.uv,2,r.FLOAT,!1,0,0),this.state.enableAttribute(a.uv))}return this.state.disableUnusedAttributes(),i},t}(),Ni=function(t){function e(e,n,r,i,o,a){var s;switch((s=t.call(this)||this).addIntoBuffer=function(t,e,n){t[n]=e[0],t[n+1]=e[1],t[n+2]=e[2]},s.get3DVertex=function(t,e){var n;switch(e){case"x":n=Vt(0,t[0],t[1]);break;case"y":n=Vt(t[0],0,t[1]);break;default:n=Vt(t[0],t[1],0)}return n},s.zeroAxis=void 0!==o?o:"z",s.zeroAxis){case"x":s.normal=Vt(-1,0,0);break;case"y":default:s.normal=Vt(0,-1,0);break;case"z":s.normal=Vt(0,0,-1)}a=void 0!==a?a:{},s.showBorder=!(!1===a.showBorder),s.borderWidth=void 0!==a.borderWidth?a.borderWidth:1,s.borderColor=void 0!==a.borderColor?a.borderColor:[0,0,0,1];var u,h,c,l=.5*e,f=.5*n,d=r||1,p=i||1,v=e/d,m=n/p,g=(d+1)*(p+1);s.verticesBufferData=new Float32Array(3*g),s.uvtsBufferData=new Float32Array(2*g),s.indicesBufferData=new(g>65535?Uint32Array:Uint16Array)(d*p*6);for(var y=0,_=0,x=0;x<=p;x++){u=x*m-f;for(var b=0;b<=d;b++)c=_t(b*v-l,u),h=s.get3DVertex(c,s.zeroAxis),s.vertices.push(h),s.addIntoBuffer(s.verticesBufferData,h,y),s.uvtsBufferData[_]=b/d,s.uvtsBufferData[_+1]=1-x/p,y+=3,_+=2}for(var M,w,E,T,A=0,C=0;C<p;C++)for(var R=0;R<d;R++)M=R+(d+1)*C,w=R+(d+1)*(C+1),E=R+1+(d+1)*(C+1),T=R+1+(d+1)*C,s.addIntoBuffer(s.indicesBufferData,[M,w,E],A),s.addIntoBuffer(s.indicesBufferData,[M,E,T],A+3),A+=6;s.borderIndicesBufferData=new Uint16Array(4),s.borderIndicesBufferData[0]=0,s.borderIndicesBufferData[1]=d,s.borderIndicesBufferData[2]=(d+1)*p,s.borderIndicesBufferData[3]=(d+1)*(p+1)-1;var S=0;s.borderVerticesBufferData=new Float32Array(6*(d+p));for(var P=0;P<g;P+=d+1)s.addIntoBuffer(s.borderVerticesBufferData,s.vertices[P],S),S+=3;for(var D=(d+1)*p+1;D<g;D++)s.addIntoBuffer(s.borderVerticesBufferData,s.vertices[D],S),S+=3;for(var O=(d+1)*p-1;O>0;O-=d+1)s.addIntoBuffer(s.borderVerticesBufferData,s.vertices[O],S),S+=3;for(var I=d-1;I>0;I--)s.addIntoBuffer(s.borderVerticesBufferData,s.vertices[I],S),S+=3;return s}return c(e,t),e}(Jr),Fi="z",ji=function(t){function e(n,r,i,o){var a,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};a=t.call(this)||this;var u=e.buildPlane(n,r,i,o,s),h=u.uvs,c=u.indices,l=u.normals,f=u.vertices;return a.name="PlaneBufferGeometry",a.setAttribute("position",new Gr(f,3)),a.setAttribute("normals",new Gr(l,3)),a.setAttribute("uv",new Gr(h,2)),a.setIndexes(c),a}return c(e,t),e.buildPlane=function(t,n,r,i){for(var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=o.normalAxis,s=void 0===a?Fi:a,u=o.useBack,h=void 0!==u&&u,c=o.normalDest,l=void 0===c?0:c,f=.5*t,d=.5*n,p=r||1,v=i||1,m=t/p,g=n/v,y=e.getNormal(s,h),_=[],x=[],b=[],M=[],w=0;w<=v;w++)for(var E=w*g-d,T=0;T<=p;T++){var A=T*m-f,C=e.get3DVertex([A,E],s,l);b.push.apply(b,mi(C)),_.push(T/p,1-w/v),M.push.apply(M,mi(y))}for(var R=0;R<v;R++)for(var S=0;S<p;S++){var P=S+(p+1)*R,D=S+(p+1)*(R+1),O=S+1+(p+1)*(R+1),I=S+1+(p+1)*R;x.push(P,D,O),x.push(P,O,I)}return{uvs:_,indices:x,vertices:b,normals:M}},e.getNormal=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=n?-1:1;switch(t){case"x":e=[r,0,0];break;case Fi:e=[0,0,r];break;default:e=[0,r,0]}return e},e}(Zr);ji.get3DVertex=function(t,e){var n,r=xi(t,2),i=r[0],o=r[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;switch(e){case"x":n=[a,i,o];break;case"y":n=[i,a,o];break;default:n=[i,o,a]}return n};var zi=function(t){function e(e,n,r,i,o,a){var s;(s=t.call(this)||this).name="BoxGeometry";var u=s.initBox(e,n,r,i,o,a),h=u.uvs,c=u.normals,l=u.vertices,f=u.indices;return s.setAttribute("position",new Gr(l,3)),s.setAttribute("normals",new Gr(c,3)),s.setAttribute("uv",new Gr(h,2)),s.setIndexes(f),s}return c(e,t),e.prototype.initBox=function(t,e,n,r,i,o){var a=[],s=ji.buildPlane,u=s(n,e,o,i,{normalAxis:"x",normalDest:t/2}),h=s(n,e,o,i,{normalAxis:"x",useBack:!0,normalDest:-t/2}),c=s(t,n,r,o,{normalAxis:"y",normalDest:e/2}),l=s(t,n,r,o,{normalAxis:"y",useBack:!0,normalDest:-e/2}),f=s(t,e,r,i,{normalAxis:"z",normalDest:n/2}),d=s(t,e,r,i,{normalAxis:"z",useBack:!0,normalDest:-n/2});a.push(u,h,c,l,f,d);for(var p=0,v=[],m=[],g=[],y=[],_=function(t){var e=a[t],n=e.uvs,r=e.vertices,i=e.normals,o=e.indices,s=p;v=v.concat(n),m=m.concat(r),g=g.concat(i),y=y.concat(o.map((function(t){return s+t}))),p+=r.length/3},x=0;x<6;x++)_(x);return{uvs:v,vertices:m,normals:g,indices:y}},e}(Zr),Vi=function(t){function e(e,n){var r;return(r=t.call(this)||this).width=void 0,r.height=void 0,r.glFrameBuffer=null,r.glDepthBuffer=null,r.flipY=!1,r.premultiplyAlpha=!1,r.glTexture=null,r.width=e,r.height=n,r}return c(e,t),e}(Or);function Gi(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Wi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wi(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Wi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Hi=function(){function t(){this.faceCount=0,this.verticesCoords=[],this.textureCoords=[],this.uvs=[],this.vertices=[],this.normals=[],this.indexes=[]}var e=t.prototype;return e.load=function(t){var e=this;return new Promise((function(n){(function(t){var e=new XMLHttpRequest;return e.open("GET",t,!0),e.send(null),new Promise((function(t){e.addEventListener("load",(function(){t(e.responseText)}),!1)}),(function(t){e.addEventListener("error",(function(e){console.error("request error"),t(e)}),!1)}))})(t).then((function(t){e.parse(t);var r=e.genObject3D();n(r)}))}))},e.genObject3D=function(){var t=new Zr;t.setAttribute("position",new Gr(this.vertices,3)),this.uvs.length&&t.setAttribute("uv",new Gr(this.uvs,2)),t.setIndexes(this.indexes);var e=new Pi;return new Kr(t,e)},e.parse=function(t){var e,n=Gi(t.split("\n"));try{for(n.s();!(e=n.n()).done;){var r=e.value,i=r.indexOf("#");-1!==i&&(r=r.substring(0,i));var o=(r=r.trim()).split(/\s+/);switch(o[0]){case"v":this.verticesCoords.push(parseFloat(o[1]),parseFloat(o[2]),parseFloat(o[3]));break;case"vn":this.normals.push(parseFloat(o[1]),parseFloat(o[2]),parseFloat(o[3]));break;case"vt":this.textureCoords.push(parseFloat(o[1]),parseFloat(o[2]));break;case"p":case"l":case"usemtl":break;case"f":o.shift(),this.parseFaceLine(o)}}}catch(t){n.e(t)}finally{n.f()}},e.parseFaceLine=function(t){for(var e=[],n=t.length,r=0;r<n;r++){var i=t[r];if(i.length>0){var o=i.split("/");e.push(o)}}for(var a=e[0],s=1,u=e.length-1;s<u;s++){var h=e[s],c=e[s+1];this.addFace(a,h,c)}},e.addFace=function(t,e,n){var r=this.verticesCoords,i=r.length/3,o=this.parseVertexIndex(t[0],i),a=this.parseVertexIndex(e[0],i),s=this.parseVertexIndex(n[0],i);this.vertices.push(r[o],r[o+1],r[o+2],r[a],r[a+1],r[a+2],r[s],r[s+1],r[s+2]);var u=3*this.faceCount;if(this.indexes.push(u,u+1,u+2),this.faceCount++,""!==t[1]){var h=this.textureCoords,c=h.length,l=this.parseUVIndex(t[1],c),f=this.parseUVIndex(e[1],c),d=this.parseUVIndex(n[1],c);this.uvs.push(h[l],h[l+1],h[f],h[f+1],h[d],h[d+1])}t[2]},e.parseVertexIndex=function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},e.parseUVIndex=function(t,e){var n=parseInt(t,10);return 2*(n>=0?n-1:n+e/2)},t}();function Zi(t){return new Promise((function(e,n){var r=new Image;r.src=t,r.crossOrigin="Anonymous",r.onload=function(){e(r)},r.onerror=function(t){n(t)}}))}function qi(t){if(6!==t.length)throw new Error("[loadCubeTexture] param urls need len six. [px, nx, py, ny, pz, nz]");return new Promise((function(e,n){for(var r=0,i=new hi,o=i.image,a=function(a){Zi(t[a]).then((function(t){r++,o[a]=t,6===r&&(i.needsUpdate=!0,e(i))})).catch((function(t){console.error(t),n(t)}))},s=0;s<6;s++)a(s)}))}var Yi=function(t){function e(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e3;return(e=t.call(this)||this).isCamera=!0,e.viewMatrix=Pe(),e.projectionMatrix=Pe(),e.projectionMatrixNeedUpdate=!1,e._far=void 0,e._near=void 0,e._far=r,e._near=n,e}return c(e,t),e.prototype.updateWorldMatrix=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t.prototype.updateWorldMatrix.call(this,e),Be(this.viewMatrix,this.worldMatrix)},o(e,[{key:"near",get:function(){return this._near},set:function(t){this._near=t,this.projectionMatrixNeedUpdate=!0}},{key:"far",get:function(){return this._far},set:function(t){this._far=t,this.projectionMatrixNeedUpdate=!0}}]),e}(Ur),Xi=function(t){function e(e,n,r,i,o,a){var s;return(s=t.call(this,o,a)||this)._left=void 0,s._right=void 0,s._top=void 0,s._bottom=void 0,s._top=r,s._left=e,s._right=n,s._bottom=i,s.updateProjectionMatrix(!0),s}c(e,t);var n=e.prototype;return n.updateProjectionMatrix=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!0===t||!0===this.projectionMatrixNeedUpdate){var e=(this.right-this.left)/2,n=(this.top-this.bottom)/2,r=(this.right+this.left)/2,i=(this.top+this.bottom)/2,o=r-e,a=r+e,s=i+n,u=i-n;Ie(this.projectionMatrix),$e(this.projectionMatrix,o,a,s,u,this.near,this.far),this.projectionMatrixNeedUpdate=!1}},n.clone=function(n){return void 0===n&&(n=new e(0,0,0,0,0,0)),t.prototype.clone.call(this,n),n.left=this.left,n.right=this.right,n.top=this.top,n.bottom=this.bottom,n.near=this.near,n.far=this.far,n.updateProjectionMatrix(),n.updateWorldMatrix(),n},o(e,[{key:"top",get:function(){return this._top},set:function(t){t!==this._top&&(this._top=t,this.projectionMatrixNeedUpdate=!0)}},{key:"left",get:function(){return this._left},set:function(t){t!==this._left&&(this._left=t,this.projectionMatrixNeedUpdate=!0)}},{key:"right",get:function(){return this._right},set:function(t){t!==this._right&&(this._right=t,this.projectionMatrixNeedUpdate=!0)}},{key:"bottom",get:function(){return this._bottom},set:function(t){t!==this._bottom&&(this._bottom=t,this.projectionMatrixNeedUpdate=!0)}}]),e}(Yi),Ki=function(t){function e(e,n,r,i){var o;return(o=t.call(this,r,i)||this).type="PerspectiveCamera",o._fov=void 0,o._aspect=void 0,o._fov=e,o._aspect=n,o.updateProjectionMatrix(!0),o}c(e,t);var n=e.prototype;return n.updateProjectionMatrix=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!0!==t&&!0!==this.projectionMatrixNeedUpdate||(Ie(this.projectionMatrix),Qe(this.projectionMatrix,this.fov*Math.PI/180,this.aspect,this.near,this.far),this.projectionMatrixNeedUpdate=!1)},n.clone=function(n){return void 0===n&&(n=new e(0,0,0,0)),t.prototype.clone.call(this,n),n.fov=this.fov,n.aspect=this.aspect,n.near=this.near,n.far=this.far,n.updateProjectionMatrix(),n.updateWorldMatrix(),n},o(e,[{key:"fov",get:function(){return this._fov},set:function(t){t!==this._fov&&(this._fov=t,this.projectionMatrixNeedUpdate=!0)}},{key:"aspect",get:function(){return this._aspect},set:function(t){t!==this._aspect&&(this._aspect=t,this.projectionMatrixNeedUpdate=!0)}}]),e}(Yi),Qi=Object.freeze({__proto__:null,Mesh:Kr,Scene:Qr,Geometry:Jr,Object3D:Ur,Raycaster:si,Texture:ui,CubeTexture:hi,TextureOperation:ci,Material:Ti,BasicMaterial:Pi,BufferGeometry:Zr,WebGLRenderer:Ui,PlaneGeometry:Ni,BoxGeometry:zi,WebGLRenderTarget:Vi,PlaneBufferGeometry:ji,Box3:Nr,OBJLoader:Hi,loadImage:Zi,loadTexture:function(t,e,n){return Zi(t).then((function(t){var n=new ui(t);return e&&e(n),n})).catch((function(t){n&&n(t)}))},loadCubeTexture:qi,Vec2:Ut,Vec3:ge,Vec4:kn,Mat3:Se,Mat4:an,Quat:Ar,quatToEuler:Ir,BufferAttribute:Fr,Uint8BufferAttribute:jr,Uint16BufferAttribute:zr,Uint32BufferAttribute:Vr,Float32ArrayAttribute:Gr,UintBufferAttribute:Wr,OrthographicCamera:Xi,PerspectiveCamera:Ki}),Ji=function(){function t(t){this.pano=void 0,this.panoData=void 0,this._meshs=new Kr,this.pano=t}return o(t,[{key:"camera",get:function(){return this.pano.camera}},{key:"meshs",get:function(){return this._meshs},set:function(t){this._meshs=t}}]),t}(),$i=["varying vec3 v_normal;","void main(void){","   gl_Position = mvpMatrix * vec4(position, 1.0);","   v_normal = normalize(position.xyz);","}"].join("\n"),to=["uniform samplerCube uSampler;","uniform float uOpacity;","varying vec3 v_normal;","void main(void){","    vec4 textureColor = textureCube(uSampler, normalize(v_normal));","    gl_FragColor = vec4(textureColor.rgb, textureColor.a * uOpacity);","}"].join("\n"),eo=function(t){function e(e){var n;return(n=t.call(this,e)||this).initMesh(),n}c(e,t);var n=e.prototype;return n.initMesh=function(){var t=new zi(8,8,8,1,1,1),e=new Ti;e.vertexShader=$i,e.fragmentShader=to,e.uniforms={vColor:{type:"4f",value:[1,0,0,1]},uSampler:{type:"t",value:null},uOpacity:{type:"1f",value:1}};var n=new Kr(t,e);n.visible=!1,n.setScale(-1,1,1),this.meshs=n},n.setData=function(t){var e=this;if(!t.image||6!==t.image.length)throw new Error("天空盒模型需要6张纹理，但只获取到 ".concat(t.image?t.image.length:0,"张"));this.panoData=t;var n=this.meshs;qi(t.image).then((function(t){n.material.uniforms.uSampler.value=t,n.visible=!0,e.pano.emit({type:d.REFRESH,log:"[Refresh Log] 立方贴图加载完成， 渲染一帧"})})).catch((function(t){return console.error(t)}))},n.update=function(){},n.draw=function(){},e}(Ji),no=function(t){return t},ro=function(t){return t*t},io=function(t){return-t*(t-2)},oo=ro,ao=io,so=Object.freeze({__proto__:null,linear:no,reverse:function(t){return 1-t},easeInQuad:ro,easeInCubic:function(t){return Math.pow(t,3)},easeOutQuad:io,easeOutCubic:function(t){return Math.pow(t-1,3)+1},easeInOutQuad:function(t){return t<.5?t*t*2:-2*(t-2)*t-1},easeInOutCubic:function(t){return t<.5?4*Math.pow(t,3):4*Math.pow(t-1,3)+1},easeInOutSine:function(t){return(1-Math.cos(Math.PI*t))/2},easeIn:oo,easeOut:ao}),uo=function(){},ho=function(){function t(t,e,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:no;this.from=void 0,this.to=void 0,this.duration=void 0,this.easingFn=void 0,this._isPlaying=!1,this._autoTimer=null,this._startTime=null,this._onUpdateCallback=uo,this._onEndCallback=uo,this.start=function(){return r._isPlaying||(r._isPlaying=!0,r._startTime=r.getNow()),r},this.stop=function(){return r._isPlaying=!1,r},this.startAndAutoUpdate=function(){if(r._isPlaying)return r;r.start(),r._autoTimer=null;return function t(){r.update(),r._autoTimer=requestAnimationFrame(t)}(),r},this.onEnd=function(t){return"function"==typeof t?r._onEndCallback=t:console.warn("[Warning] onUpdate required a funtion"),r},this.onUpdate=function(t){return"function"==typeof t?r._onUpdateCallback=t:console.warn("[Warning] onUpdate required a funtion"),r},this.update=function(){if(!r._isPlaying)return!1;var t=r.from,e=r.to,n=r.getNow(),i=r.easingFn,o=r._startTime;if(o>n)return!1;var a=(n-o)/r.duration,s=t+(e-t)*i(a=0===r.duration||a>1?1:a);return r._onUpdateCallback(s),1===a&&r.handleEnd(),!0},this.from=t,this.to=e,this.duration=n,this.easingFn=i}var e=t.prototype;return e.getNow=function(){return Date.now()},e.handleEnd=function(){this._isPlaying=!1,this._autoTimer=null,this._onEndCallback()},t}(),co=function(t,e,n){var r=.5*e,i=.5*n;return _t((t[0]-r)/r,(i-t[1])/i)},lo=function(t,e,n){var r=.5*e,i=.5*n;return _t((t[0]+1)*r,(1-t[1])*i)},fo=function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:100,o=sn(),a=co(t,n,r),s=hn(a[0],a[1],i,1),u=Pe(),h=e.worldMatrix;return Be(u,e.projectionMatrix),En(o,s,u),En(o,o,h),o},po=function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=hn(e[0],e[1],e[2],1);if(En(o,o,t.viewMatrix),0<o[2]&&!0!==i)return null;En(o,o,t.projectionMatrix),o[0]=o[0]/o[3],o[1]=o[1]/o[3],o[2]=o[2]/o[3],o[3]=1;var a=_t(o[0],o[1]);return lo(a,n,r)},vo=function(t,e,n,r){var i=po(e,t,n,r)||[-1,-1],o=xi(i,2),a=o[0],s=o[1],u=!1;return a>=0&&a<=n&&s>=0&&s<=r&&(u=!0),u},mo=Object.freeze({__proto__:null,viewportToNormalizeProjection:co,normalizeProjectionToViewport:lo,viewportToWorld:fo,worldToViewport:po,isCoordsInView:vo}),go=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;this.getVertexs=function(){return e.vertexs},this.getFacesVertex=function(){return e.facesVertex},this.generateTextureCoord=function(n,r,i){var o=e.facesVertex[Math.round(e.facesVertex.length/2)];if(o){for(var a=[],s=Math.pow(2,5-i),u=r%s,h=n%s,c=t.H_SEGS/e.cols,l=1/c,f=1/((t.V_SEGS-1)/e.rows),d=0;d<o.length/3;d++){var p=d%(c+1)*l,v=Math.floor(d/(c+1))*f;p=p/s+1*u/s,v=v/s+1*h/s,1===i&&(v*=2),a.push(p,v)}return a}},this.getFaceIndex=function(n){var r=0,i=xi(n,3),o=i[0],a=i[1],s=i[2],u=Math.round(180*Math.atan(Math.abs(s)/Math.abs(o))/Math.PI);o>0?s<0&&(u=360-u):u=s>0?180-u:180+u,u%=360,r=a>e._x3?7:a>e._x2?6:a>e._x1?5:a>0?4:a>-e._x1?3:a>-e._x2?2:a>-e._x3?1:0;var h=Math.floor(u/22.5),c=t.H_SEGS;return[h,r,h+r*(c/(c/e.cols))]},this.viewportToSphereCoord=function(t,n,r,i){var o=e.radius,a=fo(t,i,n,r),s=xi(a,3),u=s[0],h=s[1],c=s[2],l=o/Math.sqrt(u*u+h*h+c*c);return[u*l,h*l,c*l]},this.getFaceVertex=function(n,r){var i=t.H_SEGS/e.cols,o=r+n*(t.H_SEGS/i);return e.facesVertex[o]},this.radius=n,this.rows=t.DEFAULT_COLS/2,this.cols=t.DEFAULT_COLS,this.vertexs=null,this.facesVertex=[],this.facesVertexIndice=[],this.init()}var e=t.prototype;return e.init=function(){var t=this.getSphereVertexInfo();this.facesVertexIndice=this.getSphereFacesIndices(),this.vertexs=t.vertexs,this.facesVertex=t.facesVertex,this.calcConst()},e.calcConst=function(){var t=360/this.cols;this._x1=Math.cos(g(3*t))*this.radius,this._x2=Math.cos(g(2*t))*this.radius,this._x3=Math.cos(g(1*t))*this.radius},e.getSphereVertexInfo=function(){for(var e,n=[],r=[],i=this.radius,o=t.H_SEGS,a=t.V_SEGS,s=360/o,u=180/(a-1),h=o/this.cols,c=o/h,l=0,f=0,d=[],p=0;p<a;p++){var v=Math.sin(g(p*u-90))*i,m=Math.cos(g(p*u-90))*i;v=Math.round(100*v)/100,m=Math.round(100*m)/100,l=Math.floor(p/h);for(var y=0;y<o;y++){var _=Math.cos(g(y*s))*m,x=Math.sin(g(y*s))*m;if(_=Math.round(100*_)/100,x=Math.round(100*x)/100,n.push(_,v,x),e=(f=Math.floor(y/h))+l*c,l<this.rows&&(r[e]||(r[e]=[]),r[e].push(_,v,x)),l>0&&p%h==0){var b=f+(l-1)*c;r[b].push(_,v,x),y>0&&y%h==0&&r[b-1]&&r[b-1].push(_,v,x),y===o-1&&r[b].push(d[0],d[1],d[2])}0===f&&0===y&&(d=[_,v,x]),y>0&&y%h==0&&r[e-1]&&r[e-1].push(_,v,x),l<this.rows&&y===o-1&&r[e].push(d[0],d[1],d[2])}}return{vertexs:n,facesVertex:r}},e.getSphereFacesIndices=function(){for(var e=[],n=t.H_SEGS/this.cols,r=n+1,i=0;i<n;i++)for(var o=0;o<n;o++){var a=i*r,s=a+o+1,u=a+o+1+r;e.push(a+o,s,u),s=a+o+1+r,e.push(a+o,s,a+r+o)}return e},e.getSphereFacesIndicesByimageZoom=function(e){for(var n=this,r=[],i=t.H_SEGS,o=Math.pow(2,5-e),a=i/this.cols+1,s=a*a,u=function(t){for(var e=function(e){n.facesVertexIndice.forEach((function(n){r.push(n+s*e+s*t*2)}))},i=0;i<o;i++)e(i)},h=0;h<o;h++)u(h);return r},t}();go.DEFAULT_COLS=Math.pow(2,4),go.H_SEGS=64,go.V_SEGS=33;var yo=function(){function t(){this._counter=0,this._imageCollection={}}var e=t.prototype;return e.getImageInstance=function(){var t;for(var e in this._imageCollection)if(this._imageCollection[e]&&!0===this._imageCollection[e]._free)return this._imageCollection[e]._free=!1,this._imageCollection[e];t=new Image;var n=this.getGUID();return this._imageCollection[n]=t,t},e.freeImage=function(t){t&&(t._free=!0,t.src="",t.onload=t.onerror=null)},e.getGUID=function(){return this._counter++,"img_".concat(this._counter)},t}(),_o=function(){function t(e,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";this.imageInstancePool=void 0,this.tileImagesCache=void 0,this.textureInfo=void 0,this.pano=void 0,this.udtVersion=void 0,this.cdnList=void 0,this.calcTileKey=function(t,e,n,r){return"".concat(t,"_").concat(e,"_").concat(n,"_").concat(r)},this.loadImage=function(t,e,n,i){var o=r.calcTileKey(t,e,n,i),a=r.getTilesUrl(t,{x:e,y:n},i),s=r.tileImagesCache.getData(o);return new Promise((function(t,e){s?t(s._loaded?s:null):((s=r.imageInstancePool.getImageInstance()).crossOrigin="anonymous",s._loaded=!1,s.onload=function(){s._loaded=!0,t(s)},s.onerror=function(t){console.error("Tile ".concat(o," load error => "),t),e(t)},s.src=a,r.tileImagesCache.setData(o,s))}))},this.loadTexture=function(t,e,n,i){var o=r.calcTileKey(t,e,n,i),a=r.textureInfo.getData(o);return new Promise((function(s,u){a&&a.loaded?s(a):r.loadImage(t,e,n,i).then((function(t){if(!t)return null;var e=new ui(t);1!==i&&r.textureInfo.setData(o,e),s(e)})).catch((function(t){console.error("[TextureManager] loadTexture fail => ".concat(t)),u(null)}))}))},this.loadTopoTexture=function(t){var e=0,n=new Image;return new Promise((function(r){n.onload=function(){var t=new ui(n);t.flipY=!1,r(t)},n.onerror=function(){2>e?(e++,n.src="".concat(t,"&random=").concat((new Date).getTime())):r(null)},n.crossOrigin="anonymous",n.src=t}))},this.clear=function(){r.textureInfo.clear()},this.pano=e,this.udtVersion=i,this.cdnList=n||e.opts.tileBaseUrls,this.imageInstancePool=new yo,this.tileImagesCache=new A(t.MAX_TILE_CACHED,{clearCallback:function(t){r.imageInstancePool.freeImage(t)}}),this.textureInfo=new A(t.MAX_TILE_CACHED,{clearCallback:function(t){t.destory()}})}var e=t.prototype;return e.getRandomCDN=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.length;return t[Math.floor(Math.random()*e)]},e.getTilesUrl=function(e,n,r){return this.getRandomCDN(this.cdnList)+(t.TILE_URL_TEMPLATE+"&".concat($("/",{isCounter:!0}))).replace("{udt}",this.udtVersion).replace("{sid}",e).replace("{x}","".concat(n.x)).replace("{y}","".concat(n.y)).replace("{zoom}","".concat(r))},t}();_o.MAX_TILE_CACHED=160,_o.TILE_URL_TEMPLATE="?qt=pdata&sid={sid}&pos={y}_{x}&z={zoom}&udt={udt}&from=H5";var xo=["attribute vec2 uvBack;","varying mediump vec2 vTextureCoordBack;","varying mediump vec2 vTextureCoord;","void main(void) {","    gl_Position = mvpMatrix * vec4(position, 1.0);","    vTextureCoordBack = uvBack;","    vTextureCoord = uv;","}"].join("\n"),bo=["precision mediump float;","varying vec2 vTextureCoordBack;","varying vec2 vTextureCoord;","uniform sampler2D uSamplerBack;","uniform sampler2D uSampler;","uniform bool uDrawThumb;","uniform bool uDrawBack;","uniform float uAlpha;","void main(void) {","    if (uDrawThumb) {","        gl_FragColor = texture2D(uSamplerBack, vTextureCoordBack);","        return;","    }","    if (uAlpha == 1.0) {","        gl_FragColor = texture2D(uSampler, vTextureCoord);","        return;","    }","    if (uDrawBack) {","        gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha + texture2D(uSamplerBack, vTextureCoordBack) * (1.0 - uAlpha);","    } else {","        vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));","        gl_FragColor =  vec4(textureColor.rgb, textureColor.a * uAlpha);","    }","}"].join("\n"),Mo=["varying highp vec2 vTextureCoord;","void main(void) {","    gl_Position = mvpMatrix * vec4(position, 1.0);","    vTextureCoord = uv;","}"].join("\n"),wo=["precision mediump float;","uniform sampler2D uSampler;","varying highp vec2 vTextureCoord;","void main(void) {","    gl_FragColor = texture2D(uSampler, vTextureCoord);","}"].join("\n"),Eo=["varying highp vec2 vTextureCoord;","void main(void) {","    gl_Position = mvpMatrix * vec4(position, 1.0);","    vTextureCoord = uv;","}"].join("\n"),To=["uniform sampler2D uSampler;","uniform float uOpacity;","varying vec2 vTextureCoord;","void main(void){","    vec4 textureColor = texture2D(uSampler, vTextureCoord);","    gl_FragColor = vec4(textureColor.rgb, textureColor.a * uOpacity);","}"].join("\n"),Ao=["varying highp vec3 vTextureCoord;","void main(void){","   gl_Position = mvpMatrix  * vec4(position, 1.0);","   vTextureCoord = vec3(uv, 1.0) * length(position);","}"].join("\n"),Co=["uniform sampler2D uSampler;","uniform float uOpacity;","varying vec3 vTextureCoord;","uniform bool showDebugLine;","uniform vec4 vColor;","void main(void){","   if (!showDebugLine) {","       vec4 textureColor = texture2DProj(uSampler, vTextureCoord);","       gl_FragColor = vec4(textureColor.rgb, textureColor.a * uOpacity);","   } else {","       gl_FragColor = vec4(vColor.rgb, vColor.a);","   }","}"].join("\n"),Ro=function(){function t(e,n,r,i){this.nodes=void 0,this.level=void 0,this.key=void 0,this.nodes=[],this.level=e,this.key="".concat(r,"_").concat(i),e<n&&(this.nodes[0]=new t(e+1,n,2*r,2*i),this.nodes[1]=new t(e+1,n,2*r,2*i+1),this.nodes[2]=new t(e+1,n,2*r+1,2*i),this.nodes[3]=new t(e+1,n,2*r+1,2*i+1))}var e=t.prototype;return e.hasNodes=function(){return this.nodes.length>0},e.getNodeKeysByLevel=function(t){if(t<this.level)return console.warn("指定节点".concat(t," 不在当前节点").concat(this.level,"范围内！")),[];if(this.level===t)return[this.key];for(var e=[],n=0;n<this.nodes.length;n++)if(Object.prototype.hasOwnProperty.call(this.nodes,n)){var r=this.nodes[n];if(this.level===t-1)e.push(r.key);else if(r.hasNodes()){var i=r.getNodeKeysByLevel(t);e.push.apply(e,mi(i))}}return e},t}();var So=function(t){function e(e){var n;return(n=t.call(this,e)||this).name="SphereRender",n.sphere=void 0,n.textureManager=void 0,n.imgColsRows=void 0,n.curThumbTexture=void 0,n.meshCache={},n.tileInfoCache={},n.imgRange=void 0,n.faceRange=void 0,n.hitTile=void 0,n.setData=function(t){n.panoData=t,n.curThumbTexture=null,n.loadThumbTextures(t.panoId)},n.update=function(){n.updateRangeInfo(),n.checkAndLoadTiles()},n.checkAndLoadTiles=function(){if(n.curThumbTexture&&n.panoData){var t=n.panoData.panoId,e=n.camera,r=n.imgColsRows[n._imgZoom],i=r.cols,o=i-1,a=r.rows-1,s=n.pano.getContainerSize(),u=s.width,h=s.height,c=!1,l=[],f=xi(n.imgRange,4),d=f[0],p=f[1],v=f[2],m=f[3];if(vo(Vt(0,100,0),e,u,h)){for(var g=0;g<=v;g++)for(var y=0;y<=o;y++)n.checkAndLoadTile(t,y,g,n._imgZoom),l.push([g,y]);v<m&&(v+=1,c=!0)}else if(vo(Vt(0,-100,0),e,u,h)){for(var _=m;_<=a;_++)for(var x=0;x<=o;x++)n.checkAndLoadTile(t,x,_,n._imgZoom),l.push([_,x]);v<m&&(m-=1,c=!0)}else c=!0;if(!0===c){p>o&&(p=o);for(var b=d;b<=p;b++)for(var M=v;M<=m;M++){var w=b<0?b+i:b;n.checkAndLoadTile(t,w,M,n._imgZoom),l.push([M,w])}}n.hitTile=l,l.forEach((function(t){var e=xi(t,2),r=e[0],i=e[1],o="".concat(r,"_").concat(i,"_").concat(n._imgZoom);if(void 0===n.tileInfoCache[o]){var a=new Ro(n._imgZoom,5,r,i).getNodeKeysByLevel(5);n.tileInfoCache[o]=a}}))}},n.draw=function(){var t=n.meshs;if(!n.faceRange||!n.curThumbTexture)return!1;t.children=[];for(var e=function(e,r){var i=n.curThumbTexture,o=n.textureManager.calcTileKey(n.panoData.panoId,e,r,n._imgZoom),a=n.textureManager.textureInfo.getData(o),s=!1,u=null;if(a?!(u=a).finished&&u.aniInfo&&u.aniInfo&&u.aniInfo.update():i&&(s=!0,u=i),u){var h="".concat(r,"_").concat(e,"_").concat(n._imgZoom),c=n.meshCache[h];if(!c){if(!(c=n.createTileMesh(r,e)))return;n.meshCache[h]=c}if(!c.material)return;var l=c.material.uniforms;l.uSamplerBack.value=i,s?l.uDrawThumb.value=!0:(l.uDrawThumb.value=!1,l.uSampler.value=u,l.uAlpha.value=u.alpha),t.add(c)}},r=0;r<n.hitTile.length;r++){var i=xi(n.hitTile[r],2),o=i[0];e(i[1],o)}return!0},n.pano=e,n.sphere=new go(e.opts.radius),n.textureManager=new _o(e),n.imgColsRows=function(){for(var t=[],e=0;e<=5;e++)t[e]=e<2?{cols:1,rows:1}:{cols:Math.pow(2,e-1),rows:Math.pow(2,e-1)/2};return t}(),n.curThumbTexture=null,n.meshs=new Kr,n}c(e,t);var n=e.prototype;return n.checkAndLoadTile=function(t,e,n,r){var i=this,o=this.textureManager,a=o.calcTileKey(t,e,n,r);!0!==(void 0!==o.textureInfo.getData(a))&&this.textureManager.loadTexture(t,e,n,r).then((function(t){t&&!t.done&&(t.aniInfo=i.createTextureAnimation(t),t.done=!0,i.pano.dispatchEvent({type:d.REFRESH,log:"[Refresh Log] 瓦片加载完成， 渲染一帧"}))}))},n.loadThumbTextures=function(t){var e=this;this.textureManager.loadTexture(t,0,0,1).then((function(t){e.curThumbTexture=t,e.pano.dispatchEvent({type:d.THUMB_LOADED}),e.pano.dispatchEvent({debug:!0,type:d.REFRESH,log:"[Refresh Log] 缩略图加载完毕，渲染一帧"})}))},n.createTextureAnimation=function(t){var e=this;return t.alpha=0,new ho(0,1,300).onUpdate((function(n){t.alpha=n,e.pano.dispatchEvent({debug:!0,type:d.REFRESH,log:"[Refresh Log] 纹理清晰度渐变动画，渲染一帧"})})).onEnd((function(){t.finished=!0})).start()},n.createTileMesh=function(t,e){var n=new Ti,r=new Zr;if(n.depthTest=!1,n.vertexShader=xo,n.fragmentShader=bo,n.uniforms={uSampler:{type:"t",value:null},uSamplerBack:{type:"t",value:null},uDrawThumb:{type:"1i",value:1},uDrawBack:{type:"1i",value:1},uAlpha:{type:"1f",value:1}},!this.setGeometryAttrib(r,t,e))return null;var i=new Kr(r,n);return i.name="tile-mesh",i},n.setGeometryAttrib=function(t,e,n){var r="".concat(e,"_").concat(n,"_").concat(this._imgZoom),i=this.tileInfoCache[r];if(!i)return!1;for(var o=[],a=[],s=[],u=0;u<i.length;u++){var h=i[u].split("_"),c=this.sphere.rows,l=Number(h[1]),f=c-1-Number(h[0]);o.push.apply(o,mi(this.sphere.getFaceVertex(f,l))),a.push.apply(a,mi(this.sphere.generateTextureCoord(f,l,this._imgZoom))),s.push.apply(s,mi(this.sphere.generateTextureCoord(f,l,1)))}var d=this.sphere.getSphereFacesIndicesByimageZoom(this._imgZoom);return t.setAttribute("uv",new Gr(a,2)),t.setAttribute("uvBack",new Gr(s,2)),t.setAttribute("position",new Gr(o,3)),t.setIndexes(d),!0},n.getTileBoundary=function(){var t=this.pano.getContainerSize(),e=t.width,n=t.height,r=_t(0,0),i=_t(e,0),o=_t(0,n),a=_t(e,n),s=_t(.5*e,0),u=_t(.5*e,n),h=_t(0,.5*n),c=_t(e,.5*n),l=this.getSpherePosition(r),f=this.getSpherePosition(i),d=this.getSpherePosition(o),p=this.getSpherePosition(a),v=this.getSpherePosition(s),m=this.getSpherePosition(u),g=this.getSpherePosition(h),y=this.getSpherePosition(c),_=Math.max(l[1],v[1],f[1]),x=Math.min(d[1],m[1],p[1]),b=[l[0],g[0],d[0],v[0]],w=[f[0],y[0],p[0],m[0]],E=Math.min.apply(Math,b),T=Math.max.apply(Math,w),A=M(b),C=M(w),R=this.sphere.cols,S=R/2;A.max-A.min>S&&(E=Math.min.apply(Math,mi(b.filter((function(t){return t>S}))))),C.max-C.min>S&&(T=Math.max.apply(Math,mi(w.filter((function(t){return t<S}))))),E>T&&(E-=R);var P=this.getImgIndexByFaceColRow(E,_),D=xi(P,2),O=D[0],I=D[1],L=this.getImgIndexByFaceColRow(T,x),B=xi(L,2);return[[E,T,_,x],[O,B[0],I,B[1]]]},n.updateRangeInfo=function(){var t=this.getTileBoundary(),e=xi(t,2),n=e[0],r=e[1];this.imgRange=r,this.faceRange=n},n.getImgIndexByFaceColRow=function(t,e,n){n=n||this._imgZoom;var r=Math.pow(2,5-n),i=Math.floor(t/r),o=Math.floor(e/r);return[i,o=this.imgColsRows[n].rows-o-1,i+o*go.DEFAULT_COLS/r]},n.normalizeNum=function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t;r<n;)r+=e;return r%=e},n.getSpherePosition=function(t){var e=this.camera,n=this.pano.getContainerSize(),r=n.width,i=n.height,o=this.sphere.viewportToSphereCoord(t,r,i,e),a=this.sphere.getFaceIndex(o),s=xi(a,2);return _t(s[0],s[1])},n.generateBackThumb=function(t){if(t){var e=this.pano,n=e.getContainerSize(),r=n.width,i=n.height,o="//apisv0.bdimg.com/?udt=20140616&qt=pdata&pos=0_0&z=2&sid=".concat(t,"&from=H5&").concat($("/",{isCounter:!0})),a=e.getPanes().tileLayer;a.style.backgroundImage='url("'+o+'")',a.style.backgroundPosition="50% 50%",a.style.backgroundSize="150% 150%",a.style.width="".concat(r,"px"),a.style.height="".concat(i,"px")}},o(e,[{key:"_imgZoom",get:function(){return this.pano.imageZoom}}]),e}(Ji),Po=[10,-20,30,10,-20,10,-10,-20,10,-10,-20,30].map((function(t){return-20===t?-20:1.8*t})),Do=[10,-22,30,10,-22,10,-10,-22,10,-10,-22,30].map((function(t){return-22===t?-22:1.8*t})),Oo=[1.8,-20,24.9,1.8,-20,16.3,-1.8,-20,16.3,-1.8,-20,24.9].map((function(t){return-20===t?-20:1.8*t})),Io=[0,0,0,.5,.25,.5,.25,0],Lo=function(){function t(t,e,n){var r=this;this.mesh=void 0,this.material=void 0,this.linkData=void 0,this._pano=void 0,this.northDir=void 0,this.yAxisDis=void 0,this.isPosInArrow=function(t,e,n,i,o){var a=_t(t,e),s=fo(a,n,i,o,-1),u=200*s[0],h=200*s[1],c=200*s[2],l=r.yAxisDis/h;if(l<0)return!1;var f=[u*l,h*l,c*l];return r.isHitLink(f)},this._pano=t,this.linkData=e,this.northDir=n,this.yAxisDis=0,this.linkData.refinedDir=_((e.topoDir||0)+this.northDir),this.material=this.createArrowMaterial(),this.mesh=this.initMesh(),this.changePose()}var e=t.prototype;return e.initMesh=function(){var t=this.createGeometry(),e=new Kr(t,this.material);return e.visible=!1,e.name="link-mesh",e},e.createArrowMaterial=function(){var t=new Ti;return t.depthTest=!1,t.vertexShader=Mo,t.fragmentShader=wo,t.uniforms={uSampler:{type:"t",value:null}},t},e.setTopoTexture=function(t){t.isTexture&&(this.material.uniforms.uSampler.value=t)},e.setVisible=function(t){this.mesh.setVisible(t,!0)},e.createGeometry=function(){var t=new Zr,e=this.getTextCoord(this.linkData.topoDir),n=[].concat(Do,Po,Oo),r=[].concat([.5,0,.5,.5,1,.5,1,0],[0,0,0,.5,.5,.5,.5,0],e),i=[].concat([0,1,2,0,2,3],[4,5,6,4,6,7],[8,9,11,10,11,9]);return t.setAttribute("position",new Gr(n,3)),t.setAttribute("uv",new Gr(r,2)),t.setIndexes(i),t},e.changePose=function(t){t=t||this.mesh;var e=50,n=-30,r=this._pano.getPov().pitch,i=this.linkData.refinedDir;(e+=20*this._pano.getZoom(),r<0)&&(e*=(90-(r=Math.abs(r)))/90,n-=20*r/90);var o=Math.cos(g(i))*e,a=Math.sin(g(i))*e;this.yAxisDis=n+-20,t.setPosition(o,n,a),t.rotateY(-_(i-90)),t.rotateX(-5),t.updateWorldMatrix(!0)},e.getTextCoord=function(t){t=(t+360)%360;var e=Math.ceil(Math.floor(t/22.5)/2);8===e&&(e=0);for(var n=Io.slice(0),r=Math.floor(e/2),i=e%2,o=0;o<n.length;o++)o%2==0?(n[o]+=.25*r,n[o]=.5*n[o]):(n[o]+=.5*i,n[o]=.5*n[o]+.5);return n},e.isHitLink=function(t){var e=t[0],n=t[2],r=this.mesh.worldMatrix,i=Vt(Po[0],Po[1],Po[2]),o=Vt(Po[6],Po[7],Po[8]),a=Vt((i[0]+o[0])/2,(i[1]+o[1])/2,(i[2]+o[2])/2);return ee(a,a,r),Math.abs(e-a[0])<18&&Math.abs(n-a[2])<18},t}(),Bo=function(t){function e(e){var n;return(n=t.call(this,e)||this).name="PanoLinkRender",n.linkVisible=!0,n.textureManager=void 0,n.linkInfos=[],n.setData=function(t){if(t&&(o=t.getTopos,a="[object Function]"===Object.prototype.toString.call(o),s="[object AsyncFunction]"===Object.prototype.toString.call(o),a||s)){n.reset();var e=t.getTopos(),r=t.northDir,i=t.panoType===p.TYPE_STREET;e.length&&i&&(n.linkInfos=e.map((function(t){return new Lo(n.pano,t,r)})),n.meshs=n.linkInfos.map((function(t){return t.mesh})),n.loadTextures(),n.setVisible(!0))}var o,a,s},n.clickChecker=function(t,e){if(n.linkVisible){var r=n.getIdByTouchPos(t,e);return r&&(n.setVisible(!1),n.pano.dispatchEvent({type:d.LINK_CLICK,id:r}),n.pano.setId(r,{animation:!0})),!r}},n.pano=e,n.meshs=[],n.textureManager=new _o(e),n}c(e,t);var n=e.prototype;return n.reset=function(){this.meshs=[],this.linkInfos=[]},n.update=function(){this.linkInfos.forEach((function(t){t.changePose()}))},n.setVisible=function(t){var e=this.linkInfos;if(!(e.length<1)){var n=this.pano.opts.linksControl,r=!1;!0===n&&(r=t),this.linkVisible=r,e.forEach((function(t){return t.setVisible(r)}))}},n.draw=function(){},n.loadTextures=function(){var t=this,e=this.pano.opts.imgPath?"".concat(this.pano.opts.imgPath,"topo_arrow.png"):p.TOPO_ARROW_TEXTURE;this.textureManager.loadTopoTexture(e).then((function(e){e&&t.linkInfos.forEach((function(t){t.setTopoTexture(e)}))}))},n.getIdByTouchPos=function(t,e){var n=this,r=null;if(!this.linkInfos.length)return r;var i=this.pano.getContainerSize(),o=i.width,a=i.height,s=this.linkInfos.filter((function(r){return r.isPosInArrow(t,e,n.camera,o,a)}));return s.length&&(r=s[0].linkData.panoId),r},e}(Ji),ko=function(){function t(t,e,n){var r=this;this.start=function(){r.fadeAni.start(),r._pano.dispatchEvent({debug:!0,log:"淡出动画，渲染一帧",type:d.REFRESH})},this.update=function(){r.fadeAni.update()},this._pano=t,this.gl=this._pano.gl,this.snapshot=e,this.scene=this.initScene(),this.camera=this.initCamera();this.fadeAni=new ho(1,0,600).onUpdate((function(t){r.material.uniforms.uOpacity.value=t,r._pano.dispatchEvent({type:d.REFRESH})})).onEnd((function(){n&&n(),r._pano.dispatchEvent({type:d.REFRESH,debug:!0,log:"淡出动画结束，渲染一帧"})}))}var e=t.prototype;return e.initScene=function(){var t=new Qr,e=this._pano.getContainerSize(),n=e.width,r=e.height,i=new ji(n,r),o=this.initMaterial(),a=new Kr(i,o);return t.add(a),t},e.initMaterial=function(){var t=new Ti;return t.depthTest=!1,t.vertexShader=Eo,t.fragmentShader=To,t.uniforms={uSampler:{type:"t",value:this.snapshot},uOpacity:{type:"1f",value:1}},this.material=t,t},e.initCamera=function(){var t=this._pano.getContainerSize(),e=t.width/2,n=t.height/2;return new Xi(-e,e,n,-n,0,11e3)},t}(),Uo=function(){function t(t,e,n){var r=this;this.start=function(){r.waveAni.start(),r._pano.dispatchEvent({debug:!0,log:"淡出动画，渲染一帧",type:d.REFRESH})},this.update=function(){r.waveAni.update()},this._pano=t,this.gl=this._pano.gl,this.snapshot=e,this.scene=this.initScene(),this.camera=this.initCamera();this.waveAni=new ho(0,1,800).onUpdate((function(t){r.material.uniforms.progress.value=t,r.material.uniforms.uOpacity.value=1-t,r._pano.dispatchEvent({type:d.REFRESH})})).onEnd((function(){n&&n(),r._pano.dispatchEvent({type:d.REFRESH,debug:!0,log:"淡出动画结束，渲染一帧"})}))}var e=t.prototype;return e.initCamera=function(){var t=this._pano.getContainerSize(),e=t.width/2,n=t.height/2;return new Xi(-e,e,n,-n,0,11e3)},e.initScene=function(){var t=new Qr,e=this._pano.getContainerSize(),n=e.width,r=e.height,i=new ji(n,r),o=this.initMaterial(),a=new Kr(i,o);return t.add(a),t},e.initMaterial=function(){var t=new Ti,e=this._pano.getContainerSize(),n=e.width,r=e.height;return t.depthTest=!1,t.vertexShader=Eo,t.fragmentShader="\n    uniform float aspect;\n    uniform float radius;\n    uniform float amp;\n    uniform float band;\n    uniform float waves;\n    uniform float speed;\n    uniform float progress;\n    uniform vec2 uCenter;\n    uniform sampler2D uSampler;\n    uniform float uOpacity;\n\n    varying vec2 vTextureCoord;\n\n    void main() {\n        vec2 tc = vTextureCoord;\n        vec2 uv = vec2(0.0, 0.0);\n        vec2 p;\n        float len;\n        vec2 uv_offset;\n        float wave_width = band * radius;\n\n        p = (tc - uCenter);\n        p.x = p.x * aspect;\n        len = length(p);\n\n        float current_radius = radius * progress;\n        float damp_factor = 1.0;\n        if (progress > .5) {\n            damp_factor = (1.0 - progress) * 2.0;\n        }\n\n        float cut_factor = clamp(wave_width * damp_factor - abs(current_radius - len), 0.0, 1.0);\n        float waves_factor = waves * len / radius;\n        uv_offset = (p / len) * cos((waves_factor - progress * speed) * 3.14) * amp * cut_factor;\n\n        uv += uv_offset;\n\n        vec4 t_image = texture2D(uSampler, fract(tc + uv));\n\n        // gl_FragColor = t_image;\n        gl_FragColor = vec4(t_image.rgb, t_image.a * uOpacity);\n    }\n",t.uniforms={uSampler:{type:"t",value:this.snapshot},uCenter:{type:"2f",value:[.5,.5]},uOpacity:{type:"1f",value:1},progress:{type:"1f",value:0},speed:{type:"1f",value:4},waves:{type:"1f",value:14},band:{type:"1f",value:.3},amp:{type:"1f",value:.3},aspect:{type:"1f",value:n/r},radius:{type:"1f",value:1}},this.material=t,t},t}(),No=function(){function t(t,e,n,r){var i=this;this.startAni=function(){i.animation.start()},this.update=function(){i.animation.update()},this.pano=t,this.distance=n,this.refinedDir=e,this.camera=this.pano.camera,this.cameraBase=this.pano.camera.clone(),this.handleEnd=r,this.initAni()}return t.prototype.initAni=function(){var t=this,e=this.distance,n=this.refinedDir,r=Math.cos(g(n)),i=Math.sin(g(n));this.animation=new ho(0,1,400,so.easeOutQuad).onUpdate((function(n){var o=e*n,a=r*o,s=i*o;t.camera.setPosition(a,0,s),t.pano.dispatchEvent({debug:!0,type:d.REFRESH,log:"[Refresh Log] 前进动画， 渲染一帧"})})).onEnd((function(){t.handleEnd&&t.handleEnd()}))},t}(),Fo=function(t,e,n,r){this.x=t||0,this.y=e||0,this.width=n||0,this.height=r||0},jo=function(t,e){var n=this;this.angleDegreeDelta=function(t,e){var n=Math.abs(t-e);return n>180?360-n:n},this.getRoad=function(t,e,n,r,i){for(var o,a=[],s=[[-t/2,-e,-10],[-t/2,-e,-20],[t/2,-e,-10],[t/2,-e,-20]],u=s.length,h=0;h<u;h++)ee(o=s[h],o,n),a[h]={x:o[0]*r*.5,y:-o[1]*i*.5};return a},this.getIntersection=function(t,e,n,r){if(t.x===e.x||n.x===r.x)return null;var i=(e.y-t.y)/(e.x-t.x),o=(r.y-n.y)/(r.x-n.x);if(i===o)return null;var a=(o*n.x-i*t.x+t.y-n.y)/(o-i);return{x:a,y:i*(a-t.x)+t.y}},this.calculateVanishPoint=function(t,e,r,i){var o=n.getIntersection(t[0],t[1],t[2],t[3]);return null===o?null:(o.x+=r*e*.5,o.y+=i*e*.5,o)},this.getOuterRect=function(t,e,n){return new Fo(t*(n-1)*.5,e*(n-1)*.5,t,e)},this.transformPoint=function(t,e,n){return t&&void 0!==t.x&&void 0!==t.y?{x:t.x+e,y:t.y+n}:t},this.getInnerRect=function(t,e,r,i,o){var a=n.transformPoint(t,.5*-r*o,.5*-i*o),s=n.transformPoint(a,0,20),u=n.transformPoint(a,10,20),h=n.getIntersection(e[0],e[1],s,u),c=n.getIntersection(e[2],e[3],s,u),l=n.transformPoint(h,0,-70),f=new Fo(l.x+r*o*.5,l.y+i*o*.5,c.x-h.x,70);return f=n.fixInnerRectPosition(f,t),f=n.fixInnerRectSize(f,t,r)},this.fixInnerRectPosition=function(t,e){var n=t,r=(e.x-t.x)/t.width,i=0;return r>.7&&(i=r-.7),r<.3&&(i=.3-r),n.x=n.x+n.width*i,n},this.fixInnerRectSize=function(t,e,n){var r,i,o,a,s=t;s.width/n>.12&&(a=(o=.12*n)*(s.width/s.height),r=s.x+(s.width-o)*(e.x-s.x)/s.width,i=s.y+(s.height-a)*(e.y-s.y)/s.height,s=new Fo(r,i,o,a));var u=s.width/s.height;return a=s.height,u>1.2&&(a=s.height*u/1.2),u<.9&&(a=s.height*u/.9),i=s.y+s.height-a,s.height=a,s.y=i,s},this.panoData=t.panoData,this.camera=t.camera,this.projectionMatrix=this.camera.projectionMatrix,this.fov=g(this.camera.fov),this.traverseDir=e,this.cameraHeading=t.getPov().heading||0,this.isMovingForward=this.angleDegreeDelta(this.cameraHeading,this.traverseDir)<=90,this.roadWith=Math.min(1.5*this.panoData.getRoadWidth(),10),this.deviceHeight=this.panoData.deviceHeight||2.2,this.panoWidth=t._container.clientWidth,this.panoHeight=t._container.clientHeight;var r=this.angleDegreeDelta(this.cameraHeading,this.traverseDir)>45;this.snapshotRatio=r?1:1.8,this.projectionRoadInfos=this.getRoad(this.roadWith,this.deviceHeight,this.projectionMatrix,this.panoWidth,this.panoHeight),this.vanishPoint=this.calculateVanishPoint(this.projectionRoadInfos,this.snapshotRatio,this.panoWidth,this.panoHeight),this.innerRect=this.getInnerRect(this.vanishPoint,this.projectionRoadInfos,this.panoWidth,this.panoHeight,this.snapshotRatio),this.outerRect=this.getOuterRect(this.panoWidth,this.panoHeight,this.snapshotRatio),this.focusLength=.5*this.panoHeight/Math.tan(.75*this.fov),this.vanishPointDeltaX=this.vanishPoint.x-this.outerRect.x-.5*this.outerRect.width,this.vanishPointDeltaY=this.vanishPoint.y-this.outerRect.y-.5*this.outerRect.height},zo={FAR:[10,10,0],LEFT:[0,10,30],RIGHT:[0,10,30],TOP:[10,0,30],BOTTOM:[10,0,30]},Vo={FAR:["innerTopLeftVertex","innerBottomRightVertex"],LEFT:["outerTopLeftVertex","innerBottomLeftVertex"],RIGHT:["innerTopRightVertex","outerBottomRightVertex"],TOP:["outerTopLeftVertex","innerTopRightVertex"],BOTTOM:["innerBottomLeftVertex","outerBottomRightVertex"]},Go=Object.keys(zo),Wo=function(t){function e(e,n){var r;if((r=t.call(this)||this).createSkeleton=function(t){var e=t.vanishPoint,n=t.innerRect,r=t.outerRect,i=t.focusLength,o=r.y+r.height-n.y-n.height,a=e.y-n.y,s=e.x-n.x,u=n.x+n.width-e.x,h=r.y+r.height-e.y,c=o*i/(h-o),l=u*(i+c)/i,f=-(s*(i+c)/i),d=h+a*(i+c)/i-h,p=-h,v=c/5;return{innerTopLeftVertex:{x:f,y:d,z:-c},innerBottomLeftVertex:{x:f,y:p,z:-c},innerTopRightVertex:{x:l,y:d,z:-c},innerBottomRightVertex:{x:l,y:p,z:-c},outerTopLeftVertex:{x:f,y:d,z:v},outerTopRightVertex:{x:l,y:d,z:v},outerBottomLeftVertex:{x:f,y:p,z:v},outerBottomRightVertex:{x:l,y:p,z:v}}},r.modelSkeleton=function(t,e){var n=[],i=[];return Go.forEach((function(o){var a=xi(Vo[o],2),s=a[0],u=a[1],h=n.length/3;n=n.concat(r.calculatePlaneVertex(t[s],t[u],o,e)),i=i.concat(r.calculateIndices(o,h))})),[n,i]},r.calculatePlaneVertex=function(t,e,n,i){for(var o,a=[],s=xi(zo[n],3),u=s[0],h=s[1],c=s[2],l=r.linerInterpolate(t.x,e.x,u),f=r.linerInterpolate(t.y,e.y,h),d=r.linerInterpolate(t.z,e.z,c),p=0;p<=u;p++)for(var v=0;v<=h;v++)for(var m=0;m<=c;m++)En(o=hn(l[p],f[v],d[m],1),o,i),o[0]=o[0]/o[3],o[1]=o[1]/o[3],o[2]=o[2]/o[3],a.push(o[0],o[1],o[2]);return a},r.calculateIndices=function(t,e){var n=[],r=zo[t];r=r.filter((function(t){return t>0}));for(var i=xi(r,2),o=i[0],a=i[1],s=0,u=0,h=0,c=0,l=0;l<o;l++)for(var f=0;f<a;f++)u=(s=e+(a+1)*l+f)+1,c=(h=s+a+1)+1,n.push(s,h,c),n.push(s,c,u);return n},r.linerInterpolate=function(t,e,n){var r=[];if(n<=0)r.push(t);else for(var i=(e-t)/n,o=0;o<=n;o++)r[o]=t+i*o;return r},r.calculateUVCoordinate=function(t,e,n){for(var i,o=t.camera,a=t.panoWidth,s=t.panoHeight,u=t.vanishPointDeltaX,h=t.vanishPointDeltaY,c=[],l=e.width,f=e.height,d=0,p=0,v=n.length/3,m=0;m<v;m++)En(i=hn(n[3*m],n[3*m+1],n[3*m+2],1),i,o.viewMatrix),En(i,i,o.projectionMatrix),i[0]=i[0]/i[3],i[1]=i[1]/i[3],i[2]=i[2]/i[3],i[3]=1,d=(i[0]*a*.5+u+.5*l)/l,p=(i[1]*s*.5+h+.5*f)/f,c.push(r.getValidateUV(d),r.getValidateUV(p));return new Float32Array(c)},r.getValidateUV=function(t){return Math.max(-.1,Math.min(1.1,t))},r.rotationMatrix=Pe(),r.camera=e.camera,e.isMovingForward)Ve(r.rotationMatrix,r.rotationMatrix,g(_(-e.traverseDir+e.panoData.heading)));else{var i=_(180-e.traverseDir+e.panoData.heading);Ve(r.rotationMatrix,r.rotationMatrix,g(i))}r.cuboidVertexes=r.createSkeleton(e);var o=r.modelSkeleton(r.cuboidVertexes,r.rotationMatrix),a=xi(o,2),s=a[0],u=a[1];return r.verticesBufferData=new Float32Array(s),r.indicesBufferData=new Uint16Array(u),r.uvtsBufferData=r.calculateUVCoordinate(e,n,s,r.rotationMatrix),r.setAttribute("position",new Gr(r.verticesBufferData,3)),r.setAttribute("uv",new Gr(r.uvtsBufferData,2)),r.setIndexes(r.indicesBufferData),r}return c(e,t),e}(Zr),Ho=[0,1,0,.5],Zo=function(){function t(t,e,n,r,i){var o=this;this.start=function(){o.animation.start(),o._pano.dispatchEvent({debug:!0,log:"淡出动画，渲染一帧",type:d.REFRESH})},this.update=function(){o.animation.update()},this._pano=t,this.distance=e,this.handleEnd=i,this.traverseDir=r,this.snapshot=n,this.camera=t.camera,this.scene=this.initScene(),this.rotationMatrix=this.traverseGeometry.rotationMatrix,this.initAni()}var e=t.prototype;return e.initAni=function(){var t=this,e=Vt(0,0,this.distance);ee(e,e,this.rotationMatrix),this.animation=new ho(0,1,700,so.linear).onUpdate((function(n){var r=Ft();Yt(r,e,n),t.scene.traverse((function(t){t.position=r,t.updateWorldMatrix(!0)})),t._pano.dispatchEvent({debug:!0,type:d.REFRESH,log:"[Refresh Log] 前进动画， 渲染一帧"})})).onEnd((function(){t.handleEnd&&t.handleEnd(),t._pano.dispatchEvent({debug:!0,type:d.REFRESH,log:"[Refresh Log] 前进动画， 渲染一帧"})}))},e.initScene=function(){var t=new Qr,e=this._pano.getContainerSize(),n=e.width,r=e.height,i=new jo(this._pano,this.traverseDir),o=new Fo(0,0,n,r),a=new Wo(i,o),s=this.initMaterial(),u=new Kr(a,s);return this.traverseGeometry=a,t.add(u),t},e.initMaterial=function(){var t=new Ti;return t.depthTest=!1,t.vertexShader=Ao,t.fragmentShader=Co,t.uniforms={uSampler:{type:"t",value:this.snapshot},uOpacity:{type:"1f",value:1},vColor:{type:"4f",value:Ho},showDebugLine:{type:"1i",value:true}},this.material=t,t},t}(),qo=function(){function t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.x=t,this.y=e}return t.prototype.equals=function(t){return t&&t.x===this.x&&t.y===this.y},t}(),Yo=function(){function t(t,e){var n=this;this.setData=function(t,e){n.panoData=t,n.nextPanoData=e},this.sceneChangeHandler=function(){if(n.panoData&&n.nextPanoData)return new Promise((function(t){var e=n.isStreet(n.panoData.panoType),r=n.isStreet(n.nextPanoData.panoType),i=n.snapshotFn(),o=n.pano.animationType;if(o&&["waterwave","fade"].indexOf(o)>-1)switch(o){case"waterwave":n.prepareWaterWave(i),t();break;case"fade":n.prepareFade(i),t()}else r&&e?(n.setDir(),n.prepareTraverse(i).then((function(e){n.prepareFade(e),t()}))):(n.prepareFade(i),t())}))},this.setSnapshot=function(t){n.snapshot=t},this.pano=t,this.snapshotFn=e,this.panoData=null,this.nextPanoData=null,this.changeAni=null,this.animateDir=0}var e=t.prototype;return e.draw=function(){if(this.changeAni){var t=this.changeAni,e=t.scene,n=t.camera;this.changeAni.update(),this.pano.renderer.render(e,n)}},e.setDir=function(){if(this.panoData&&this.nextPanoData){var t=this.nextPanoData.panoId,e=this.panoData.getTopos().filter((function(e){return e&&e.panoId===t}));if(e.length){var n=e[0].topoDir;this.animateDir=n}else this.animateDir=this.pano.getPov().heading||0}},e.prepareJump=function(){var t=this,e=this.calcJumpDistance();return new Promise((function(n){t.changeAni=new No(t.pano,t.animateDir,e,(function(){t.changeAni=null,n()})),t.changeAni.startAni(),t.pano.dispatchEvent({debug:!0,log:"穿梭动画，渲染一帧",type:d.REFRESH})}))},e.prepareTraverse=function(t){var e=this,n=this.calcJumpDistance();return new Promise((function(r){e.changeAni=new Zo(e.pano,n,t,e.animateDir,(function(){var t=e.snapshotFn(e.changeAni.scene,e.changeAni.camera);r(t),e.changeAni=null})),e.changeAni.start(),e.pano.dispatchEvent({debug:!0,log:"穿梭动画，渲染一帧",type:d.REFRESH})}))},e.prepareFade=function(t){var e=this;this.changeAni=new ko(this.pano,t,(function(){e.changeAni=null,e.pano.emit(d.SCENE_CHANGE_END)}))},e.prepareWaterWave=function(t){var e=this;this.changeAni=new Uo(this.pano,t,(function(){e.changeAni=null,e.pano.emit(d.SCENE_CHANGE_END)}))},e.calcJumpDistance=function(){var t,e,n=300,r=(t=new qo(this.panoData.panoX,this.panoData.panoY),e=new qo(this.nextPanoData.panoX,this.nextPanoData.panoY),t&&e?Math.round(Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))):0);"number"==typeof r&&(n*=Math.pow(r,1/4));return n},e.isStreet=function(t){return t===p.TYPE_STREET},t}(),Xo=function(){function t(t,e){var n=e.fov,r=void 0===n?145:n,i=e.cameraY,o=void 0===i?3e3:i,a=e.handleEnd;this._pano=void 0,this.originFov=void 0,this.originRotateX=void 0,this.originRotateY=void 0,this.targetFov=void 0,this.targetCameraY=void 0,this.handleEnd=void 0,this.animate=void 0,this._pano=t,this.originFov=this.camera.fov,this.originRotateX=this.camera.rotation.x,this.originRotateY=this.camera.rotation.y,this.targetFov=r,this.targetCameraY=o,this.handleEnd=a,this.init()}var e=t.prototype;return e.start=function(){this._pano.dispatchEvent({type:d.REFRESH,debug:!0,log:"开场动画动画起始，渲染一帧"}),this.animate.start()},e.update=function(){this.animate.update()},e.init=function(){var t=this,e=this.camera;this.handleCameraChange(0),this.animate=new ho(0,1,p.FISHEYE_DURATION,so.easeInOutQuad).onUpdate((function(e){t.handleCameraChange(e),t._pano.dispatchEvent({type:d.REFRESH,debug:!0,log:"开场动画动画，渲染一帧"})})).onEnd((function(){e.fov=t.originFov,e.rotateX(t.originRotateX),e.rotateY(t.originRotateY),e.setPosition(0,0,0),e.updateWorldMatrix(),e.updateProjectionMatrix(),t._pano.dispatchEvent({type:d.REFRESH,debug:!0,log:"开场动画动画结束，渲染一帧"}),t.handleEnd()}))},e.handleCameraChange=function(t){var e=this.camera,n=this.targetCameraY,r=this.targetFov-(this.targetFov-this.originFov)*t,i=(this.originRotateX- -90)*t-90,o=this.originRotateY*t;e.fov=r,e.rotateX(i),e.rotateY(o),e.setPosition(0,n-n*t,0),e.updateWorldMatrix(),e.updateProjectionMatrix()},o(t,[{key:"camera",get:function(){return this._pano.camera}}]),t}();function Ko(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Qo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qo(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Qo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Jo=function(){function t(t){var e=this;this.name="PanoOverlayManager",this.overlays=[],this.pano=void 0,this.isReady=!1,this.clickChecker=function(t,n){var r,i=!0,o=Ko(e.overlays);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=a.dom.getBoundingClientRect(),u=s.left,h=s.right,c=s.top,l=s.bottom;if(t>=u&&t<=h&&n>=c&&n<=l){i=!1,a.handleClick();break}}}catch(t){o.e(t)}finally{o.f()}return i},this.pano=t}var e=t.prototype;return e.handleAdd=function(t){t&&t.id&&(this.overlays.some((function(e){return e.id===t.id}))||(this.overlays.push(t),this.isReady&&t.init(this.pano)))},e.handleRemove=function(t){for(var e=0;e<this.overlays.length;e++)if(this.overlays[e].id===t.id)return this.overlays[e].remove(),void this.overlays.splice(e,1)},e.init=function(){this.isReady=!0;var t,e=Ko(this.overlays);try{for(e.s();!(t=e.n()).done;){t.value.init(this.pano)}}catch(t){e.e(t)}finally{e.f()}},e.draw=function(){if(this.isReady){var t,e=Ko(this.overlays);try{for(e.s();!(t=e.n()).done;){t.value.draw()}}catch(t){e.e(t)}finally{e.f()}}},e.destroy=function(){var t,e=Ko(this.overlays);try{for(e.s();!(t=e.n()).done;){t.value.remove()}}catch(t){e.e(t)}finally{e.f()}this.overlays=[]},t}();function $o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ta(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ta(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ta(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var ea=function(){function t(t){var e=this;this.renderer=void 0,this.gl=void 0,this.camera=void 0,this.cameraNoFix=null,this.panoData=null,this.scene=void 0,this.sceneChange=void 0,this.openingAni=void 0,this.sphereRender=void 0,this.linkGLRender=void 0,this.overlayManager=void 0,this.skyboxRender=void 0,this.pano=void 0,this.renderThreadId=null,this.requestId=null,this.isRAFRuning=!1,this.setData=function(){var t=nt(ot.mark((function t(n){var r,o;return ot.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n){t.next=2;break}return t.abrupt("return");case 2:if(!e.panoData||!e.pano.useAnimation){t.next=8;break}return e.sceneChange.setData(e.panoData,n),t.next=6,e.sceneChange.sceneChangeHandler();case 6:void 0!==e.pano.backupUseAnimation&&(e.pano.useAnimation=e.pano.backupUseAnimation),e.pano.animationType="";case 8:e.reset(),e.panoData=n,e.pano.panoData=n,void 0===i(n.defaultHeading)&&void 0===i(n.defaultPitch)||e.pano.handlePovChange({heading:n.defaultHeading,pitch:n.defaultPitch}),r=n.image&&6===n.image.length,(o=r?e.skyboxRender:e.sphereRender).setData(n),e.linkGLRender.setData(n),e.overlayManager.init(),e.scene.add(o.meshs),e.updateProjectionMatrix(e.camera),e.updateCameraHeadingAndPitch(e.camera);case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.getSnapshot=function(t,n){t=t||e.scene,n=n||e.camera;var r=e.pano.getContainerSize(),i=r.width,o=r.height,a=new Vi(i,o);return a.premultiplyAlpha=!0,e.renderer.render(t,n,a),a},this.update=function(){e.panoData&&(e.sphereRender.update(),e.linkGLRender.update(),e.startRenderThread())},this.onThumbLoaded=function(){e.sceneChange.changeAni&&e.sceneChange.changeAni.start();var t=e.linkGLRender.meshs;t&&e.scene.add(t),e.startFishEyeAni()},this.startRenderThread=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;e.renderThreadId&&(clearTimeout(e.renderThreadId),e.renderThreadId=null),e.renderThreadId=window.setTimeout((function(){e.isRAFRuning=!1,e.renderThreadId=null}),t),e.isRAFRuning||(e.isRAFRuning=!0,e.renderFrame())},this.resize=function(){var t=e.pano.getContainer();e.renderer.setSize(t.clientWidth,t.clientHeight)};var n=window.devicePixelRatio||1,r=t.getContainer();this.pano=t,this.renderer=new Ui({premultipliedAlpha:!1,preserveDrawingBuffer:t.opts.enableCapture||!1,antialias:!(n>1),pixelRatio:n,width:r.clientWidth,height:r.clientHeight}),this.renderer.setSize(r.clientWidth,r.clientHeight),t.getPanes().tileLayer.appendChild(this.renderer.domElement),this.gl=this.renderer.getContext(),this.camera=new Ki(75,r.clientWidth/r.clientHeight,.01,67e3),this.scene=new Qr,t.gl=this.gl,t.canvas=this.renderer.domElement,t.scene=this.scene,t.camera=this.camera,t.cameraNoFix=this.cameraNoFix,t.renderer=this.renderer,t.renders=[],this.sceneChange=new Yo(t,this.getSnapshot),this.initModule()}var e=t.prototype;return e.initModule=function(){var t=this.pano;this.sphereRender=new So(t),this.linkGLRender=new Bo(t),this.overlayManager=new Jo(t),this.skyboxRender=new eo(t),this.pano.renders.push(this.sphereRender,this.linkGLRender,this.overlayManager,this.skyboxRender)},e.reset=function(){this.scene.remove(this.sphereRender.meshs),this.scene.remove(this.linkGLRender.meshs)},e.getModule=function(t){var e,n=null,r=$o(this.pano.renders);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(i.name===t){n=i;break}}}catch(t){r.e(t)}finally{r.f()}return n},e.renderFrame=function(){!1!==this.isRAFRuning?(this.openingAni&&this.openingAni.update(),this.sphereRender.draw(),this.renderer.render(this.scene,this.camera),this.overlayManager.draw(),this.sceneChange.draw(),this.requestId=requestAnimationFrame(this.renderFrame.bind(this))):this.requestId&&(cancelAnimationFrame(this.requestId),this.requestId=null)},e.startFishEyeAni=function(){var t=this;this.pano.fisheye&&(this.openingAni=new Xo(this.pano,{handleEnd:function(){t.openingAni=null,t.pano.fisheye=!1}}),setTimeout((function(){t.openingAni.start(),t.startRenderThread()}),p.FISHEYE_DELAY))},e.updateProjectionMatrix=function(t,e){var n=this.pano.getFov(e),r=this.pano.getContainerSize(),i=r.width/r.height;t.fov=n,t.aspect=i,t.updateProjectionMatrix()},e.updateCameraHeadingAndPitch=function(t){var e=this.pano.getPov(),n=e.heading,r=e.pitch,i=this.panoData,o=i.fixHeading,a=void 0===o?0:o,s=i.fixPitch,u=void 0===s?0:s,h=i.fixRoll,c=void 0===h?0:h;t.rotateX(r-u),t.rotateY(-n+a),t.rotateZ(c),t.updateWorldMatrix()},e.safeCall=function(t,e,n){var r=this.getModule(t);if(r&&r[e])return r[e].apply(r,n||[]);throw new Error("[safeCall] get module error => ".concat(t))},o(t,[{key:"isCanUpdate",get:function(){var t=this.sceneChange.changeAni,e=this.openingAni;return this.panoData&&!(t||e)}}]),t}(),na=function(){function t(t){var e=this;this.updateAnglePerPixel=function(){e._anglePerPixel=e._pano.calcAnglePerPixel()},this.destroy=function(){e.bindEvent(!1)},this._pano=t,this._displayZoom=t.getZoom(),this._anglePerPixel=t.calcAnglePerPixel(),this._container=t.getContainer(),this.lock=!1,this.clickTimer=null,this.dragAni=null,this.state={initPos:null,initHeading:0,initPitch:0,lastDiffPos:null,moveDiffPos:null,isTouchDown:!1,isTouchMove:!1,startTime:0,lastMoveTime:0}}var e=t.prototype;return e.init=function(){if(!this._initialized){if(this._initialized=!0,this.isMobile=navigator.userAgent.toLowerCase().match(/ipod|ipad|iphone|android/),this.isMobile){this.EVENTS={START:"touchstart",MOVING:"touchmove",END:"touchend",OUT:"touchcancel",WHEEL:"gesturechange",DOMMouseScroll:"DOMMouseScroll"};var t=this._container.getBoundingClientRect?this._container.getBoundingClientRect():{},e=t.left,n=void 0===e?0:e,r=t.top,i=void 0===r?0:r;this.getPagePosition=function(t){var e=t.touches.length>0?t.touches[0]:t.changedTouches[0];return{x:e.pageX-n,y:e.pageY-i}}}else this.EVENTS={START:"mousedown",MOVING:"mousemove",END:"mouseup",OUT:"mouseout",WHEEL:"mousewheel"},this.getPagePosition=function(t){return{x:t.offsetX,y:t.offsetY}};this.bindEvent()}},e.bindEvent=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=document.body,n=this.EVENTS,r=n.START,i=n.MOVING,o=n.END,a=this._pano._svContainer,s=t?"addEventListener":"removeEventListener";a[s](r,this.handleDown.bind(this)),a[s](i,this.handleMove.bind(this)),e[s](o,this.handleUp.bind(this))},e.handleDown=function(t){this.dragAni&&this.dragAni.stop();var e=this.state,n=this.getPagePosition(t),r=this._pano.getPov();e.initPos=n,e.isTouchDown=!0,e.initHeading=r.heading,e.initPitch=r.pitch,e.startTime=x(),this._pano.dispatchEvent(d.TOUCH_START,t)},e.handleMove=function(t){if(this.state.isTouchDown){this.state.isTouchMove=!0;var e=this.calcDiffPos(this.state.initPos,this.getPagePosition(t));this.setPov(e),this.state.moveDiffPos=e,this.state.lastDiffPos=e,this.state.lastMoveTime=x(),t.preventDefault(),t.stopPropagation()}},e.handleUp=function(t){var e=this;if(this.state.isTouchDown){var n=!0,r=this.getPagePosition(t);if(t.pos=r,this.state.isTouchDown=!1,this._pano.dispatchEvent(d.TOUCH_END,t),this._pano.renders.length)for(var i=0;i<this._pano.renders.length;i++){var o=this._pano.renders[i];if(o.clickChecker&&!(n=o.clickChecker(r.x,r.y))){t.stopPropagation();break}}if(!1!==n)if(this.state.isTouchMove)this.state.isTouchMove=!1,this.processMotion(t);else if(t.stopPropagation(),this.clickTimer)clearTimeout(this.clickTimer),this.clickTimer=null,this._pano.dispatchEvent(d.DOUBLE_CLICK,t);else{this.clickTimer=setTimeout((function(){e.clickTimer=null,e._pano.dispatchEvent(d.CLICK,t)}),300)}}},e.setPov=function(t){var e=t.x,n=t.y,r=-e*this._anglePerPixel,i=n*this._anglePerPixel,o=this.state.initHeading+r,a=this.state.initPitch+i;this._pano.setPov({heading:o,pitch:a})},e.processMotion=function(t){var e=this,n=this.state,r=x(),i=r-n.lastMoveTime,o=n.moveDiffPos,a=o.x,s=o.y;if(i<300&&(Math.abs(a)>10||Math.abs(s)>10)){var u=this.calcDiffPos(this.state.initPos,this.getPagePosition(t)),h=2*Math.sqrt(Math.pow(u.x,2)+Math.pow(u.y,2))/(.008*(r-n.startTime)),c=[u.x>0?1:-1,u.y>0?1:-1],l=Math.abs(u.x),f=Math.abs(u.y),p=Math.atan2(f,l),v=Math.cos(p)*h,m=Math.sin(p)*h;-1===c[0]&&(v=-v),-1===c[1]&&(m=-m),this.dragAni&&this.dragAni.stop();var g=this._pano.getPov(),y=g.heading,_=g.pitch;n.initHeading=y,n.initPitch=_;this.dragAni=new ho(0,1,400,(function(t){return.3125*t-.15625*t*t})).onUpdate((function(t){var n=(t*=6.4)*v,r=t*m;e.setPov({x:n,y:r})})).onEnd((function(){e.dragAni=null,e._pano.dispatchEvent({type:d.POV_CHANGED_END})})).startAndAutoUpdate()}else this._pano.dispatchEvent({type:d.POV_CHANGED_END})},e.calcDiffPos=function(t,e){return t&&e?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}},t}();function ra(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ia(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ia(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ia(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var oa=function(){function t(t){this.pano=t,this.preZoom=t.getZoom(),this.zoomChangeAni=null,this.debug=!1,this.panoServiceLock=!1,this.bindEvent(),this.initModule(),this.initResize(),this.handleContextStatus()}var e=t.prototype;return e.initModule=function(){var t=this.pano;this.panoService=new tt(t),this.panoGLRender=new ea(t),this.op=new na(t)},e.initResize=function(){var t=this,e=this.pano.getContainerSize(),n=this.pano.getContainer(),r=function(n,r){if(n&&r){var i=new l(n,r);i.equals(e)||(t.pano.dispatchEvent({type:d.SIZE_CHANGED}),e=i)}};if(void 0!==window.ResizeObserver){var i=new window.ResizeObserver((function(t){var e,n=ra(t);try{for(n.s();!(e=n.n()).done;){var i=e.value.target;r(i.clientWidth,i.clientHeight)}}catch(t){n.e(t)}finally{n.f()}}));i.observe(n),this.resizeOb=i}else this.checkSizeTimer=setInterval((function(){r(n.clientWidth,n.clientHeight)}),80)},e.bindEvent=function(){var t=this,e=this.pano;e.on(d.PANO_ERROR,(function(){t.panoServiceLock=!1})),e.on(d.DATA_LOADED,(function(n){t.pano.opts.visible?t.pano.show():t.pano.hide(),t.panoServiceLock=!1,n.options&&n.options.animation&&(e.backupUseAnimation=e.useAnimation,e.useAnimation=n.options.animation,""!==n.options.animationType&&(e.animationType=n.options.animationType)),t.panoGLRender.setData(n.data),t.op.init()})),e.on(d.SET_POV,(function(n){var r=n.pov,i=n.options,o=(void 0===i?{animation:!0}:i).animation;if(t.panoGLRender.isCanUpdate){var a=function(n){e.handlePovChange(n)&&(t.panoGLRender.updateCameraHeadingAndPitch(e.camera),t.panoGLRender.update(),e.dispatchEvent(d.POV_CHANGED,n))};if(o){var s=e.getPov(),u=s.heading,h=s.pitch,c=r.heading-u,l=r.pitch-h;c>180?(u+=360,c=r.heading-u):c<-180&&(u-=360,c=r.heading-u),new ho(0,1,400,so["ease-out"]).onUpdate((function(t){a({heading:u+t*c,pitch:h+t*l})})).onEnd((function(){})).startAndAutoUpdate()}else a(r)}else e.handlePovChange(r)})),e.on(d.ZOOM_CHANGED,(function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.panoGLRender.isCanUpdate){var r=t.preZoom,i=e.getZoom();if(r!==i){var o=n.noAnimation||!1;if(t.zoomChangeAni&&(t.zoomChangeAni.stop(),t.zoomChangeAni=null),o)return t.op.updateAnglePerPixel(),t.panoGLRender.updateProjectionMatrix(e.camera),t.panoGLRender.update(),void(t.preZoom=i);var a=400;t.zoomChangeAni=new ho(r,i,a,so.easeOutCubic).onUpdate((function(n){t.panoGLRender.updateProjectionMatrix(e.camera,n),t.panoGLRender.update(n)})).onEnd((function(){t.zoomChangeAni=null,t.preZoom=i})).startAndAutoUpdate()}}})),e.on(d.DOUBLE_CLICK,(function(){t.panoGLRender.isCanUpdate&&(v.isMobile&&(3===e.getZoom()?e.setZoom(2):e.setZoom(3)))})),e.on(d.REFRESH,(function(e){var n=e.duration||200;t.panoGLRender.startRenderThread(n),t.debug&&e.log&&e.debug&&console.warn(e.log)})),e.on(d.SET_ID,(function(e){if(!t.panoServiceLock&&e.id){t.panoServiceLock=!0,window.getPanoById=t.panoService.getPanoById;var n=(1e5*Math.random()).toFixed(0);BMapGL._rd=BMapGL._rd||{},BMapGL._rd["_cbk"+n]=function(t){t&&void 0!==t.error&&0===t.error?window.getPanoById(e.id):Q("PANORAMA"),delete BMapGL._rd["_cbk"+n]},K("PANORAMA","BMapGL._rd._cbk"+n)}})),e.on(d.SET_POSITION,(function(e){if(!t.panoServiceLock&&e.point){t.panoServiceLock=!0,window.getPanoByLocation=t.panoService.getPanoByLocation;var n=(1e5*Math.random()).toFixed(0);BMapGL._rd=BMapGL._rd||{},BMapGL._rd["_cbk"+n]=function(t){t&&void 0!==t.error&&0===t.error?window.getPanoByLocation(e.point):Q("PANORAMA"),delete BMapGL._rd["_cbk"+n]},K("PANORAMA","BMapGL._rd._cbk"+n)}})),e.on(d.SIZE_CHANGED,(function(){t.op.updateAnglePerPixel(),t.panoGLRender.resize(),t.panoGLRender.updateProjectionMatrix(e.camera),t.panoGLRender.update()})),e.on(d.THUMB_LOADED,(function(){t.panoGLRender.onThumbLoaded(),t.panoGLRender.update()})),e.on(d.OVERLAY_ADD,(function(e){t.panoGLRender.overlayManager.handleAdd(e)})),e.on(d.OVERLAY_REMOVE,(function(e){t.panoGLRender.overlayManager.handleRemove(e)})),e.on(d.OVERLAYS_CLEAR,(function(){t.panoGLRender.overlayManager.destroy()})),e.on(d.LINK_VISIBLE_CHANGE,(function(e){"boolean"==typeof e.value&&(t.panoGLRender.safeCall("PanoLinkRender","setVisible",[e.value]),t.pano.dispatchEvent(d.REFRESH))})),e.on(d.DESTROY,(function(){t.op.destroy(),t.resizeOb&&t.resizeOb.disconnect(),t.checkSizeTimer&&clearInterval(t.checkSizeTimer),t.panoGLRender.renderer.forceContextLoss(),e.canvas.removeEventListener("webglcontextlost",t.onWebGLContextLost,!1)}));var n=v.isFirefox?"DOMMouseScroll":"mousewheel",r=new Date;e._svContainer.addEventListener(n,(function(t){if(e.opts.enableScrollWheelZoom&&e.opts.visible){var n=new Date;if(n-r<400)return;r=n;var i=-t.detail/3||t.wheelDelta/120,o=e.getZoom()+i;e.setZoom(o),t.preventDefault()}}))},e.getImgZoom=function(){return this.pano.calcDisplayZoom().imgZoom},e.handleContextStatus=function(){this.pano.canvas.addEventListener("webglcontextlost",this.onWebGLContextLost,!1)},e.onWebGLContextLost=function(t){t.preventDefault(),setTimeout((function(){window.location.reload()}),200)},t}();function aa(t,e,n){t.addEventListener(e,n,!1)}var sa=function(t){function e(e,n){var r;(r=t.call(this)||this).panoData=null,r.opts=void 0,r.useAnimation=!1,r.backupUseAnimation=r.useAnimation,r.animationType="",r.fisheye=!1,r.canvas=void 0,r.camera=void 0,r.renderer=void 0,r.gl=void 0,r.scene=void 0,r.cameraNoFix=void 0,r.renders=void 0,r.closeBtn=null,r.navigator=null,r._container=void 0,r._pov={heading:0,pitch:0},r._id=null,r._position=null,r._zoom=2,r._displayZoomResultsCache={},r._svContainer=void 0,r._eventManager=void 0,r._panes=void 0,r.addCloseButton=function(t){var e=r.closeBtn=document.createElement("div");e.className="pano_close",e.style.cssText=["position:absolute","right:10px","top:10px","padding: 5px 8px;","cursor:pointer","border-radius: 4px","font-size: 14px","background-color: rgba(0,0,0,.55)","z-index: 99","color: #fff"].join(";"),e.innerText="关闭",e.title="退出全景",e.onclick=function(){r.hide(),t&&t()},r._svContainer.appendChild(e)},r.getContainer=function(){return r._container},r.getContainerSize=function(){var t=r._container;return new l(t.clientWidth,t.clientHeight)},r.getPanes=function(){return r._panes},r.show=function(){r.opts.visible=!0,w.show(r._svContainer)},r.hide=function(){r.opts.visible=!1,w.hide(r._svContainer)},r.getZoom=function(){return r._zoom},r.setZoom=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t!==r._zoom&&(t>p.MAX_ZOOM&&(t=p.MAX_ZOOM),t<p.MIN_ZOOM&&(t=p.MIN_ZOOM),t!==r._zoom&&(r._zoom=t,r.dispatchEvent(d.ZOOM_CHANGED,{noAnimation:e.noAnimation||!1})))},r.getPov=function(){return r._pov},r.setPov=function(t,e){r.dispatchEvent(d.SET_POV,{pov:t,options:e||{animation:!1}})},r.handlePovChange=function(t){if("object"===i(t)){var e=!1,n=t.heading,o=t.pitch;if("number"!=typeof n||isNaN(n)||(e=!0,n=_(n),r._pov.heading=n),"number"==typeof o&&!isNaN(n)){e=!0;var a=r.opts.minPitch,s=r.opts.maxPitch;o>s&&(o=s),o<a&&(o=a),r._pov.pitch=o}return e}},r.calcDisplayZoom=function(t,e){t=t||r.getContainerSize(),e=e||r.getZoom();var n=t,i=n.width,o=n.height,a=r.opts.maxImageZoom,s=r.opts.minImageZoom,u="".concat(i,"_").concat(o,"_").concat(e);if(r._displayZoomResultsCache[u])return r._displayZoomResultsCache[u];for(var h=r.calcAnglePerPixel(),c=Math.floor(e)+2,l=360/(2*Math.pow(2,c-2)*h);l>512;)c++,l=360/(2*Math.pow(2,c-2)*h);if(c>a){var f=c-a;l*=Math.pow(2,f),c=a}c<s&&(c=s);var d={imgZoom:c,displayTileSize:l=Math.round(l)};return r._displayZoomResultsCache[u]=d,d},r.calcAnglePerPixel=function(){return r.getFov()/r.getContainerSize().height},r.getFov=function(t){return t=t||r.getZoom(),(v.isMobile?r.calcMobileFovy:r.calcPCFovy).call(a(r),t)},r.getVisible=function(){return r.opts.visible},r.setId=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r.useAnimation=e.animation||!1,r.fisheye=e.fisheye||!1,r.animationType=e.animationType||"",r.dispatchEvent(d.SET_ID,{id:t})},r.setPosition=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r.useAnimation=e.animation||!1,r.fisheye=e.fisheye||!1,r.animationType=e.animationType||"",r.dispatchEvent(d.SET_POSITION,{point:t})};var o={minImageZoom:p.TILE_MIN_ZOOM,maxImageZoom:p.TILE_MAX_ZOOM,minPitch:p.MIN_PITCH,maxPitch:p.MAX_PITCH,radius:p.RADIUS,tileBaseUrls:p.TILE_BASE_URLS,linksControl:!0,navigationControl:!0,enableScrollWheelZoom:!0,enableCapture:!1,visible:!0};r.opts=Object.assign({},o,n);var s="string"==typeof e?document.querySelector(e):e;if(!s)throw new Error("全景引擎宿主容器不存在");return r._container=s,r._init(),r}c(e,t);var n=e.prototype;return n.getPosition=function(){return this.position},n.setOptions=function(t){var e;for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var n=!0;if("object"!==i(t[e])&&(n=t[e]!==this.opts[e]),this.opts[e]=t[e],!n)continue;switch(e){case"linksControl":this.dispatchEvent(d.LINK_VISIBLE_CHANGE,{value:t[e]});break;case"navigationControl":var r=!!t[e],o=this.navigator;r?o.show():o.hide()}}},n.capture=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.canvas){var e=this.canvas,n=t.quality||.8,r=t.type||"image/jpeg",i=e.toDataURL(r,n);return i}},n.addOverlay=function(t){this.dispatchEvent(d.OVERLAY_ADD,t)},n.removeOverlay=function(t){this.dispatchEvent(d.OVERLAY_REMOVE,t)},n.clearOverlays=function(){this.dispatchEvent(d.OVERLAYS_CLEAR)},n.destroy=function(){this.dispatchEvent(d.DESTROY)},n._init=function(){this._createDoms(),this.navigator=function(t){function e(t){this._initialize(t)}return m(e.prototype,{_initialize:function(t){this._pano=t,this.imgPath=t.opts.imgPath||"//api0.map.bdimg.com/images/",this._zoomInEnabled=!0,this._zoomOutEnabled=!0,this._render(),this._bind()},_render:function(){this._container=w.create("div");var t=this._container.style;t.position="absolute",t.left="10px",t.top="10px",t.zIndex=99;var e=this._container;e.innerHTML=this._generateHtml(),v.isPc?(this._panBtnContainer=e.children[2],this._panBtns=[this._panBtnContainer.children[0],this._panBtnContainer.children[1],this._panBtnContainer.children[2],this._panBtnContainer.children[3]],this._svgDirGroup=e.children[1].childNodes[0],this._zoomContainer=e.children[3]):v.isMobile&&(this._zoomContainer=e.children[0]),this._btnZoomIn=this._zoomContainer.children[0],this._btnZoomOut=this._zoomContainer.children[1],v.isMobile&&(this._zoomContainer.style.left=this._zoomContainer.style.top="0",this._zoomContainer.style.width="36px",this._zoomContainer.style.height="78px",this._btnZoomIn.style.width=this._btnZoomOut.style.width="33px",this._btnZoomIn.style.height=this._btnZoomOut.style.height="36px",this._btnZoomOut.style.top="37.5px"),this._pano.getZoom()>=p.MAX_ZOOM&&this._setZoomBtnEnabled("zoomIn",!1),this._pano.getZoom()<=p.MIN_ZOOM&&this._setZoomBtnEnabled("zoomOut",!1),this._pano._svContainer.appendChild(e)},_generateHtml:function(){var t=[];return v.isPc&&(t.push(this._generatePanHtml()),t.push(this._generateDirHtml()),t.push(this._generatePanBtnHtml())),t.push(this._generateZoomContainerHtml()),t.join("")},_generateDirHtml:function(){return'<svg version="1.1" overflow="hidden" width="82px" height="82px" viewBox="0 0 82 82"style="position: absolute; top: 0px; left: 0px;"><g transform="rotate(0, 41, 41)"><rect x="33"y="1" width="14" height="12" rx="4" ry="4" stroke="#868685" stroke-width="1" fill="#f8f8f8"></rect><polyline points="37.5,9.5 37.5,3.5 42.5,9.5 42.5,3.5" stroke-linejoin="bevel" stroke-width="1.5" fill="#f2f4f6" stroke="#868685"></polyline></g></svg>'},_generatePanHtml:function(){return'<div style="position:absolute;top:4px;left:4px;width:74px;height:74px;background:url('+this.imgPath+'st-navictrl.png) no-repeat;-webkit-user-select:none;overflow:hidden"><div></div></div>'},_generatePanBtnHtml:function(){return'<div style="position:absolute;top:0px;left:0;width:82px;height:82px;user-select:none;"><div style="position:absolute;left:32px;top:13px;cursor:pointer;width:17px;height:17px;" title="向上平移"></div><div style="position:absolute;left:14px;top:32px;cursor:pointer;width:17px;height:17px;" title="向左平移"></div><div style="position:absolute;left:51px;top:32px;cursor:pointer;width:17px;height:17px;" title="向右平移"></div><div style="position:absolute;left:33px;top:51px;cursor:pointer;width:17px;height:17px;" title="向下平移"></div></div>'},_generateZoomContainerHtml:function(){var t="background-image:url('"+this.imgPath+"st-navictrl.png');background-repeat:no-repeat;background-position:-74px 0;";return v.isMobile&&(t="background-image:url('"+this.imgPath+"st-navictrl-hd.png');background-repeat:no-repeat;background-position:0 0;background-size:180px 78px;"),'<div style="position:absolute;top:84px;left:30px;width:24px;height:52px;'+t+'-webkit-user-select:none;overflow:hidden"><div style="position:absolute;cursor:pointer;width:22px;height:24px;top:0;left:0;-webkit-user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)" title="放大一级"></div><div style="position:absolute;cursor:pointer;width:22px;height:24px;top:25px;left:0;-webkit-user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)" title="缩小一级"></div><div></div></div>'},_bind:function(){var t=this._pano,e=this;if(v.isPc){aa(this._panBtns[0],"click",(function(){var e=t.getPov();t.setPov({heading:e.heading,pitch:e.pitch+30},{animation:!0})})),aa(this._panBtns[1],"click",(function(){var e=t.getPov();t.setPov({heading:e.heading-45,pitch:e.pitch},{animation:!0})})),aa(this._panBtns[2],"click",(function(){var e=t.getPov();t.setPov({heading:e.heading+45,pitch:e.pitch},{animation:!0})})),aa(this._panBtns[3],"click",(function(){var e=t.getPov();t.setPov({heading:e.heading,pitch:e.pitch-30},{animation:!0})}));for(var n=0;n<this._panBtns.length;n++)aa(this._panBtns[n],"mousedown",(function(t){t.stopPropagation()}));e._mousedown=!1,aa(this._panBtnContainer,"mousedown",(function(n){e._mousedown=!0,e._panBtnContainer.style.cursor="grabbing",e._startHeading=e._calcAngle(n),e._curHeading=t.getPov().heading,n.preventDefault()})),aa(document,"mousemove",(function(n){e._mousedown&&t.setPov({heading:e._curHeading+360-(e._calcAngle(n)-e._startHeading),pitch:t.getPov().pitch})})),aa(document,"mouseup",(function(){e._mousedown&&(e._mousedown=!1,e._panBtnContainer.style.cursor="grab",e._startHeading=null)})),t.addEventListener("position_changed",(function(){var t=360-this.getPov().heading;e._svgDirGroup.setAttribute("transform","rotate("+t+", 41, 41)")})),t.addEventListener("pov_changed",(function(){var t=360-this.getPov().heading;e._svgDirGroup.setAttribute("transform","rotate("+t+", 41, 41)")}))}aa(this._btnZoomIn,"click",(function(){t.setZoom(t.getZoom()+1)})),aa(this._btnZoomOut,"click",(function(){t.setZoom(t.getZoom()-1)})),v.isPc?(aa(this._btnZoomIn,"mousedown",(function(){e._redrawZoomBtn(e._zoomInEnabled,-98)})),aa(this._btnZoomOut,"mousedown",(function(){e._redrawZoomBtn(e._zoomOutEnabled,-122)})),aa(this._btnZoomIn,"mouseup",(function(){e._redrawZoomBtn(e._zoomInEnabled,-74)})),aa(this._btnZoomOut,"mouseup",(function(){e._redrawZoomBtn(e._zoomOutEnabled,-74)}))):v.isMobile&&(aa(this._btnZoomIn,"touchstart",(function(){e._redrawZoomBtn(e._zoomInEnabled,-98)})),aa(this._btnZoomOut,"touchstart",(function(){e._redrawZoomBtn(e._zoomOutEnabled,-122)})),aa(this._btnZoomIn,"touchend",(function(){e._redrawZoomBtn(e._zoomInEnabled,-74)})),aa(this._btnZoomOut,"touchend",(function(){e._redrawZoomBtn(e._zoomOutEnabled,-74)}))),t.addEventListener("zoom_changed",(function(n){t.getZoom()>=p.MAX_ZOOM?e._setZoomBtnEnabled("zoomIn",!1):t.getZoom()<=p.MIN_ZOOM?e._setZoomBtnEnabled("zoomOut",!1):(e._setZoomBtnEnabled("zoomIn",!0),e._setZoomBtnEnabled("zoomOut",!0))}))},_redrawZoomBtn:function(t,e){t&&(v.isMobile&&(e=(e+74)/24*36),this._zoomContainer.style.backgroundPosition=e+"px 0")},show:function(){this._container.style.display=""},hide:function(){this._container.style.display="none"},_calcAngle:function(t){var e=(t=window.event||t).pageX||t.clientX,n=t.pageY||t.clientY,r=this._pano.getContainer().getBoundingClientRect();e=e-r.left-50,n=-(n-r.top-50);var i=Math.atan2(n,e)/Math.PI*180;return i<90?90-i:450-i},_setZoomBtnEnabled:function(t,e){if("zoomIn"===t)if(e){this._zoomInEnabled=!0,this._btnZoomIn.style.cursor="pointer";var n=-74;v.isMobile&&(n=0),this._zoomContainer.style.backgroundPosition=n+"px 0"}else{this._zoomInEnabled=!1,this._btnZoomIn.style.cursor="";var r=-170;v.isMobile&&(r=-144),this._zoomContainer.style.backgroundPosition=r+"px 0"}if("zoomOut"===t)if(e){this._zoomOutEnabled=!0,this._btnZoomOut.style.cursor="pointer";var i=-74;v.isMobile&&(i=0),this._zoomContainer.style.backgroundPosition=i+"px 0"}else{this._zoomOutEnabled=!1,this._btnZoomOut.style.cursor="";var o=-146;v.isMobile&&(o=-108),this._zoomContainer.style.backgroundPosition=o+"px 0"}}}),new e(t)}(this),this._eventManager=new oa(this)},n._createDoms=function(){var t=this._container,e=w.create("div"),n=e.style;n.overflow="hidden",n.position="absolute",n.zIndex="20",n.top=n.left="0px",n.height=n.width="100%",n.backgroundColor="#e5e3df",n.display="none",n.cursor="grab",e.addEventListener("mousedown",(function(){return n.cursor="grabbing"})),e.addEventListener("mouseup",(function(){return n.cursor="grab"})),this._svContainer=e,this._panes={tileLayer:this._createContainer("1"),maskLayer:this._createContainer("2"),linksLayer:this._createContainer("3"),overlayLayer:this._createContainer("4"),effectLayer:this._createContainer("5")},e.appendChild(this._panes.tileLayer),e.appendChild(this._panes.linksLayer),e.appendChild(this._panes.overlayLayer),e.appendChild(this._panes.effectLayer),b()||(e.appendChild(this._panes.maskLayer),this._panes.maskLayer.style.width="".concat(t.clientWidth,"px"),this._panes.maskLayer.style.height="".concat(t.clientHeight,"px"),this._panes.maskLayer.style.overflow="hidden"),t.appendChild(e),"absolute"!==w.getCurrentStyle(t).position&&(t.style.position="relative")},n._createContainer=function(t){var e=w.create("div"),n=e.style;return n.position="absolute",n.top=n.left="0",n.zIndex=t||"0",e},n.calcMobileFovy=function(t){var e=this.getContainerSize(),n=e.width,r=e.height,i=240/Math.pow(2,t),o=n/2/Math.tan(g(i/2)),a=Math.atan2(r/2,o);return 2*y(a)},n.calcPCFovy=function(t){return 90-15*(t-1)},o(e,[{key:"imageZoom",get:function(){return this.calcDisplayZoom().imgZoom}},{key:"panoId",get:function(){return this.panoData?this.panoData.panoId:""}},{key:"panoNorthDir",get:function(){return this.panoData?this.panoData.northDir:0}},{key:"position",get:function(){return this.panoData&&"number"==typeof this.panoData.panoX&&"number"==typeof this.panoData.panoY?new f(this.panoData.panoX,this.panoData.panoY):null}}]),e}(Or),ua={dom:null,anchor:null,width:null,height:null,altitude:2,sphereZ:null,useUV:!1},ha=function(t){function e(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(n=t.call(this)||this).visible=!0,n.worldCoord=void 0,n.pov=void 0,n.id=n.genId(),n._pano=void 0,n.lastPanoPosition=null,n.initialized=!1,n.position=void 0,n.options=void 0,n.position=e,n.options=Object.assign({},ua,r),n.pov=null,n}c(e,t);var n=e.prototype;return n.getPov=function(){return this.pov},n.genId=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:4;return Number("".concat(Math.random().toString().substr(3,t)).concat(Date.now())).toString(36)},n.init=function(t){t&&!this.initialized&&(this._pano=t,this.lastPanoPosition=this._pano.position,this.worldCoord=this.options.useUV?this.calcCoordsByUV():this.calcCoordsByMC(),this.worldCoord&&(this.initialized=!0,this.add(),this.draw()))},n.calcCoordsByMC=function(){var t=this._pano.position;if(t&&this.position){var e,n=this.position,r=n.lng-t.lng,i=n.lat-t.lat,o=Math.atan2(r,i);o<0&&(o+=2*Math.PI),o=Math.round(y(o));var a=500,s=this.options,u=s.sphereZ,h=s.altitude;null===u?e=25*h:(e=u||0,a=Math.sqrt(Math.pow(r,2)+Math.pow(i,2)+Math.pow(e,2)));var c=y(Math.asin(e/a));c=c>90?90:c<-90?-90:c;var l=_(o+this._pano.panoNorthDir),f=this.radius,d=Math.cos(g(c))*f;d=Math.round(100*d)/100;var p=Math.cos(g(l))*d,v=Math.sin(g(c))*f,m=Math.sin(g(l))*d;return this.pov={heading:o,pitch:c},Vt(p,v,m)}},n.calcCoordsByUV=function(){if(this.position){var t=this.radius,e=this.position,n=xi(e,2),r=n[0],i=n[1],o=2*r*Math.PI,a=(i-.5)*Math.PI,s=Math.cos(a)*Math.cos(o)*t,u=Math.sin(a)*t,h=Math.cos(a)*Math.sin(o)*t;return this.pov={heading:_(y(o)-this._pano.panoNorthDir),pitch:y(a)},Vt(s,u,h)}},n.add=function(){var t=this.options,e=t.width,n=t.height;if(this.dom){var r=this._pano,i=this.dom;i.style.position="absolute",r.getPanes().overlayLayer.appendChild(i),"number"!=typeof e&&(this.options.width=i.clientWidth),"number"!=typeof n&&(this.options.height=i.clientHeight),r.dispatchEvent({type:"onoverlaydomadded",overlay:this})}},n.remove=function(){var t=this.dom;t&&t.parentNode&&t.parentNode.removeChild(t)},n.povToPointGL=function(){if(!this.worldCoord)return null;var t=this._pano,e=t.camera,n=t.getContainerSize(),r=n.width,i=n.height;return po(e,this.worldCoord,r,i)},n.draw=function(){if(this.initialized&&this.visible&&this._pano&&this._pano.panoData&&this.dom){var t=this.lastPanoPosition,e=this._pano.position;t.lng===e.lng&&t.lat===e.lat||(this.lastPanoPosition=e,this.worldCoord=this.options.useUV?this.calcCoordsByUV():this.calcCoordsByMC());var n=this.dom,r=this.povToPointGL();if(n.style.visibility="hidden",r){var i=this.calcAnchor(),o="".concat(r[0]-i.width,"px"),a="".concat(r[1]-i.height,"px");if(isNaN(r[0])||isNaN(r[1]))return;n.style.visibility="visible",n.style.webkitTransform="translate(".concat(o,", ").concat(a,")"),n.style.transform="translate(".concat(o,", ").concat(a,")")}}},n.handleClick=function(){this.dispatchEvent("click")},n.calcAnchor=function(){var t=this.options,e=t.anchor,n=t.width,r=void 0===n?0:n,i=t.height;return e||new l(r/2,(void 0===i?0:i)/2)},n.show=function(){this.visible=!0,this.dom&&(this.dom.style.display="")},n.hide=function(){this.visible=!1,this.dom&&(this.dom.style.display="none")},o(e,[{key:"radius",get:function(){return this._pano?this._pano.opts.radius:0}},{key:"dom",get:function(){return this.options.dom}}]),e}(Or),ca=function(t){function e(e,n){var r=n.position,i=n.altitude,o=void 0===i?2:i,a=n.costomStyle,s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.createElement("div"),r={backgroundColor:"rgba(29, 29, 29, 0.8)",fontSize:"14px",padding:"7px 14px",height:"19px",color:"#fff",whiteSpace:"nowrap",borderRadius:"4px"};return m(n.style,r,e),n.innerText=t,n}(e,void 0===a?{}:a);return t.call(this,r,{dom:s,altitude:o})||this}return c(e,t),e}(ha);t.Converters=mo,t.Engines=Qi,t.EventType=d,t.PanoLabel=ca,t.PanoOverlay=ha,t.PanoramaService=function(){var t=this;this.getPanoById=function(e,n){var r;r="".concat(tt.SERVICE_URL,"?qt=sdata&sid=").concat(e,"&").concat($("/")),t.request(r).then((function(t){n&&n(t)})).catch((function(t){n&&n(null)}))},this.getPanoByLocation=function(e,n,r){var i;i="".concat(tt.SERVICE_URL,"?qt=qsdata&x=").concat(e.lng,"&y=").concat(e.lat).concat(n?"&r="+n:"","&action=1&").concat($("/")),t.request(i).then((function(t){r&&r(t)})).catch((function(t){r&&r(null)}))},this.request=function(t){return T(t,{},{jsonp:"fn"})}},t.Point=f,t.getPanoControl=function(t,e){var n,r,i,o=(e=e||{}).imgPath||"//api.map.baidu.com/images/";function a(e){e.call(this),this.defaultAnchor=t.ControlAnchor.TOP_RIGHT,this.defaultOffset=new t.Size(10,10),this._isOn=!1}return n=a,r=t.Control,(i=Object.create(r.prototype)).constructor=n,n.prototype=i,m(a.prototype,{initialize:function(t){return this._map=t,this._render(),this._bind(),this._container},_render:function(){var t=this,n=w.create("div");n.innerHTML='<span style="position:relative;top:33px;">全景</span>',n.title="进入全景",m(n.style,{width:"49px",height:"51px",color:"#565656",background:'url("'.concat(o,'st-control.png")'),position:"absolute",cursor:"pointer",fontFamily:"arial,sans-serif",fontSize:"13px",textAlign:"center",boxShadow:"0px 0px 3px rgba(0, 0, 0, 0.3)",MozBoxShadow:"0px 0px 3px rgba(0, 0, 0, 0.3)",WebkitBoxShadow:"0px 0px 3px rgba(0, 0, 0, 0.3)"}),this._container=n;var r=this._map.getContainer();r.appendChild(n);var i={visible:!1};e.imgPath&&(i.imgPath=[e.imgPath]),e.tileBaseUrl&&(i.tileBaseUrls=[e.tileBaseUrl]),this._pano=new sa(r,i),this._pano.addCloseButton((function(){t.isMapEnableWheelZoom&&t._map.enableScrollWheelZoom()}));var a=this._scout=w.create("div");m(a.style,{position:"absolute",width:"24px",height:"41px",cursor:"pointer",backgroundImage:'url("'.concat(o,'st-scout.png")'),backgroundRepeat:"no-repeat",backgroundPosition:"-24px 0",overflow:"hidden",display:"none",zIndex:11}),r.appendChild(a);var s=this._infoWindow=w.create("div");m(s.style,{position:"absolute",width:"112px",height:"119px",backgroundImage:'url("'.concat(o,'st-infowindow.gif")'),backgroundRepeat:"no-repeat",backgroundPosition:"0 0",display:"none",cursor:"pointer",zIndex:12});var u=this._thumb=w.create("img");s.appendChild(u),u.src=o+"st-noresult.png",m(u.style,{width:"100px",height:"75px",left:"6px",top:"6px",position:"absolute"});var h=this._stDescription=w.create("div");m(h.style,{position:"absolute",top:"85px",fontFamily:"arial,sans-serif",fontSize:"13px",paddingLeft:"6px"}),s.appendChild(h),r.appendChild(s)},_updateView:function(){var t=this._container.style;this._isOn||this._isOver?(t.backgroundPosition="-49px 0",t.color="#fff"):(t.backgroundPosition="0 0",t.color="#565656")},_bind:function(){var n=this;this._pano.on("dataload",(function(t){var r=t.data;r?(n._currentSvId=r.panoId,e.tileBaseUrl?n._thumb.src="".concat(e.tileBaseUrl,"?&sid=").concat(r.panoId,"&pos=0_0&z=0"):n._thumb.src="//apisv0.bdimg.com/?qt=pdata&sid=".concat(r.panoId,"&pos=0_0&z=0&from=H5&").concat($("/")),n._stDescription.innerHTML=r.roadName):(n._currentSvId=null,n._thumb.src=o+"st-noresult.png",n._stDescription.innerHTML="")}));var r=this;v.isPc&&(this._container.addEventListener("mouseover",(function(){r._isOver=!0,r._updateView()})),this._container.addEventListener("mouseout",(function(){r._isOver=!1,r._updateView()}))),this._container.addEventListener("click",(function(){r._isOn?r._close():r._open()})),this._map.getContainer().addEventListener("mousemove",(function(e){if(r._isOn){var n=(e=window.event||e).pageX||e.clientX,i=e.pageY||e.clientY,a=function(t){for(var e={left:0,top:0};t&&t.offsetParent;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;return e}(r._map.container),s=new qo(n-a.left,i-a.top),u=r._map.pixelToPoint(s);if(""!==r._scout.style.display&&v.isPc&&(r._scout.style.display="",r._infoWindow.style.display=""),r._scout.style.left=s.x-12+"px",r._scout.style.top=s.y-41-2+"px",r._prePixel=r._curPixel,r._curPixel=s,r._prePixel){var h=s.x-r._prePixel.x;h>0?r._scout.style.backgroundPosition="-48px 0":h<0&&(r._scout.style.backgroundPosition="0 0")}r._curPixel.y<170?r._infoStatus=2:r._infoStatus=1,r._curPixel.x<66&&(r._infoStatus=3),r._curPixel.x>r._map.getSize().width-56-10&&(r._infoStatus=4);var c=1===r._infoStatus||2===r._infoStatus?112:126,l=1===r._infoStatus||2===r._infoStatus?119:105;1!==r._infoStatus&&2!==r._infoStatus||(r._infoWindow.style.left=r._curPixel.x-Math.round(c/2)+"px",1===r._infoStatus?(r._infoWindow.style.top=r._curPixel.y-l-42+"px",r._infoWindow.style.backgroundPosition="0 0",r._thumb.style.top="6px",r._thumb.style.bottom="",r._stDescription.style.top="85px",r._stDescription.style.bottom=""):(r._infoWindow.style.top=r._curPixel.y+2+"px",r._infoWindow.style.backgroundPosition="-112px 0",r._thumb.style.top="",r._thumb.style.bottom="6px",r._stDescription.style.top="",r._stDescription.style.bottom="85px"),r._infoWindow.style.width="112px",r._infoWindow.style.height="119px",r._thumb.style.left="6px",r._stDescription.style.left="0"),3!==r._infoStatus&&4!==r._infoStatus||(r._infoWindow.style.top=r._curPixel.y-Math.round(l/2)-20+"px",3===r._infoStatus?(r._infoWindow.style.left=r._curPixel.x+12+"px",r._infoWindow.style.backgroundPosition="0 -119px",r._thumb.style.left="20px",r._stDescription.style.left="14px"):(r._infoWindow.style.left=r._curPixel.x-12-c+"px",r._infoWindow.style.backgroundPosition="-126px -119px",r._thumb.style.left="6px",r._stDescription.style.left="0"),r._infoWindow.style.width="126px",r._infoWindow.style.height="105px"),r._infoWindow.style.backgroundImage='url("'.concat(o,'st-infowindow.gif")'),r._timerId&&(clearTimeout(r._timerId),r._timerId=null),r._timerId=setTimeout((function(){r._currentPoint=u,r._scout.style.backgroundPosition="-24px 0";var e=r._map.lnglatToMercator(u.lng,u.lat);r._pano.setPosition(new t.Point(e[0],e[1]))}),200)}})),this._map.addEventListener("click",(function(t){r._isOn&&v.isMobile&&(r._pano.setPosition(t.point),r._pano.show(),r._close()),r._isOn&&r._currentSvId&&(r._pano.setId(r._currentSvId),r._pano.show(),r._map.config.enableWheelZoom&&(r._map.disableScrollWheelZoom(),r.isMapEnableWheelZoom=!0),r._close())}))},_open:function(){this._isOn||(this._isOn=!0,this._map.addTileLayer(this._panoCoverageLayer),v.isPc&&(this._preDefaultCursor=this._map.getDefaultCursor(),this._preDraggingCursor=this._map.getDraggingCursor(),this._map.setDefaultCursor("pointer"),this._map.setDraggingCursor("pointer"))),this._updateView()},_close:function(){this._isOn&&(this._map.removeTileLayer(this._panoCoverageLayer),v.isPc&&(this._scout.style.display="none",this._infoWindow.style.display="none",this._map.setDefaultCursor(this._preDefaultCursor),this._map.setDraggingCursor(this._preDraggingCursor)),this._isOn=!1),this._updateView()}}),new a(t.Control)},t.getStreetViewCoverageLayer=function(t){var e=new t.TileLayer({transparentPng:!0,dataType:1,cacheSize:32});return e.zIndex=110,e.getTilesUrl=window.PANORAMA_URL?function(t,e){var n=window.PANORAMA_URL+"/tile",r=t.x,i=t.y;return window.BMAPGL_84&&(i=Math.pow(2,e)-i-1),"".concat(n,"?customid=panorama&x=").concat(r,"&y=").concat(i,"&z=").concat(e,"&type=WGS84")}:function(t,e){var n=["//apisv0.bdimg.com/","//apisv1.bdimg.com/"],r=(Math.abs(t.x)+Math.abs(t.y))%n.length;return"".concat(n[r],"?udt=").concat("20150114","&qt=tile&styles=").concat("pl","&x=").concat(t.x,"&y=").concat(t.y,"&z=").concat(e).replace(/-(\d+)/gi,"M$1")+"&"+$("/",{isCounter:!1})},e},t.init=function(t,e){return new sa(t,e)},Object.defineProperty(t,"__esModule",{value:!0})})(Pano={});
window.BMapGL=window.BMapGL||{};(function(bD,fB){var e6=e6||{version:"20150702",emptyFn:function(){}};(function(){e6._log=[];var i=0;var T={};e6.BaseClass=function(kv){T[(this.hashCode=(kv||e6.BaseClass.guid()))]=this};e6.BaseClass.guid=function(){return"mz_"+(i++).toString(36)};e6.BaseClass.create=function(){var kv=new e6.BaseClass();kv.decontrol();return kv};var e=e6.instance=e6.I=function(kv){return T[kv]};e6.BaseClass.prototype.dispose=function(){if(this.hashCode){delete T[this.hashCode]}for(var kv in this){if(typeof this[kv]!="function"){delete this[kv]}}};e6.BaseClass.prototype.getHashCode=function(){if(!this.hashCode){T[(this.hashCode=e6.BaseClass.guid())]=this}return this.hashCode};e6.BaseClass.prototype.decontrol=function(){delete T[this.hashCode]};e6.BaseClass.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"};e6.BaseClass.prototype._wlog=function(kw,kx){var kv=e6._log;if(kv.length>100){kv.reverse().length=50;kv.reverse()}kv[kv.length]="["+kw+"]["+(this._className||"Object")+" "+this.hashCode+"] "+kx}})();Function.prototype.inherits=function(kv,T){var e,kw,ky=this.prototype,kx=function(){};kx.prototype=kv.prototype;kw=this.prototype=new kx();if(typeof(T)=="string"){kw._className=T}for(e in ky){kw[e]=ky[e]}this.prototype.constructor=ky.constructor;ky=kx=null;return kw};e6.BaseEvent=function(e,i){this.type=e;this.returnValue=true;this.target=i||null;this.currentTarget=this.srcElement=null;this.cancelBubble=false;this.domEvent=null};e6.BaseClass.prototype.on=e6.BaseClass.prototype.addEventListener=function(T,i){if(typeof i!=="function"){return this._wlog("error","addEventListener:"+i+" is not a function")}if(!this._listeners){this._listeners={}}var e=this._listeners;if(T.indexOf("on")!==0){T="on"+T}if(typeof e[T]!=="object"){e[T]={}}var kv=i.hashCode||e6.BaseClass.guid();i.hashCode=kv;if(e[T][kv]){this._wlog("warning","repeat key:"+kv)}e[T][kv]=i};e6.BaseClass.prototype.off=e6.BaseClass.prototype.removeEventListener=function(T,i){if(typeof i=="function"){i=i.hashCode}else{if(typeof i!=="string"&&typeof i!=="undefined"){return}}if(!this._listeners){this._listeners={}}if(T.indexOf("on")!=0){T="on"+T}var e=this._listeners;if(!e[T]){return}if(i===undefined){e[T]={};return}if(e[T][i]){delete e[T][i]}};e6.BaseClass.prototype.fire=e6.BaseClass.prototype.dispatchEvent=function(kv){if(!this._listeners){this._listeners={}}var T,e=this._listeners,kw=kv.type;kv.target=kv.srcElement=kv.target||kv.srcElement||this;kv.currentTarget=this;if(typeof this[kw]=="function"){this[kw](kv)}if(typeof e[kw]=="object"){for(T in e[kw]){if(typeof e[kw][T]=="function"){e[kw][T].call(this,kv)}}}return kv.returnValue};e6.BaseEvent.prototype.inherit=function(T){var i=this;this.domEvent=T=window.event||T;i.clientX=T.clientX||T.pageX;i.clientY=T.clientY||T.pageY;i.offsetX=T.offsetX||T.layerX;i.offsetY=T.offsetY||T.layerY;i.screenX=T.screenX;i.screenY=T.screenY;i.ctrlKey=T.ctrlKey||T.metaKey;i.shiftKey=T.shiftKey;i.altKey=T.altKey;return i};e6.Browser=(function(){var T=navigator.userAgent;var kw=0;var e=0;var kx=0;var i=0;var kB=0;var kz=0;var kA=0;var ky=0;var kv=0;var kC=0;if(typeof window.opera==="object"&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(T)){kx=parseFloat(RegExp.$2)}else{if(/OPR(\/(\d+)(\..?)?)/.test(T)){kx=parseInt(RegExp.$2,10)}else{if(/Edge\/((\d+)\.\d+)/.test(T)){kw=parseInt(RegExp.$2,10)}else{if(/MSIE (\d+(\.\d+)?)/.test(T)){e=parseFloat(RegExp.$1)}else{if(T.indexOf("Trident")>-1&&/rv:(\d+(\.\d+)?)/.test(T)){e=parseInt(RegExp.$1,10)}else{if(/Firefox(\s|\/)(\d+(\.\d+)?)/.test(T)){kB=parseFloat(RegExp.$2)}else{if(navigator.vendor==="Netscape"&&/Netscape(\s|\/)(\d+(\.\d+)?)/.test(T)){kA=parseFloat(RegExp.$2)}else{if(T.indexOf("Safari")>-1&&/Version\/(\d+(\.\d+)?)/.test(T)){i=parseFloat(RegExp.$1)}}}}}}}}if(T.indexOf("Trident")>-1&&/Trident\/(\d+(\.\d+)?)/.test(T)){ky=parseInt(RegExp.$1,10)}else{if(!e&&!kw&&T.indexOf("Gecko")>-1&&T.indexOf("KHTML")===-1&&/rv\:(\d+(\.\d+)?)/.test(T)){kv=parseFloat(RegExp.$1)}else{if(!kw&&/chrome\/(\d+(\.\d+)?)/i.test(T)){kz=parseFloat(RegExp.$1)}else{if(!kw&&/AppleWebKit\/(\d+(\.\d+)?)/.test(T)){kC=parseInt(RegExp.$1,10)}}}}var kD={edge:kw,ie:e,firefox:kB,netscape:kA,opera:kx,safari:i,chrome:kz,gecko:kv,trident:ky,webkit:kC};return kD})();window.FeBrowser=e6.Browser;e6.Dom={};e6.Dom.createDom=function(i,e){if(e6.isIE&&e&&e.name){i="<"+i+' name="'+e6.String.escapeHTML(e.name)+'">'}var T=document.createElement(i);if(e){e6.Dom.setProperties(T,e)}return T};e6.Dom.getOffset=function(kv){var ky=e6.Dom.getOwnerDocument(kv);var kx=e6.isGecko>0&&ky.getBoxObjectFor&&e6.Dom.getStyle(kv,"position")=="absolute"&&(kv.style.top===""||kv.style.left==="");var kz={left:0,top:0};var i=(e6.isIE&&!e6.isStrict)?ky.body:ky.documentElement;if(kv==i){return kz}var T=null;var kw;if(kv.getBoundingClientRect){kw=kv.getBoundingClientRect();kz.left=kw.left+Math.max(ky.documentElement.scrollLeft,ky.body.scrollLeft);kz.top=kw.top+Math.max(ky.documentElement.scrollTop,ky.body.scrollTop);kz.left-=ky.documentElement.clientLeft;kz.top-=ky.documentElement.clientTop;if(e6.isIE&&!e6.isStrict){kz.left-=2;kz.top-=2}}else{if(ky.getBoxObjectFor&&!kx){kw=ky.getBoxObjectFor(kv);var e=ky.getBoxObjectFor(i);kz.left=kw.screenX-e.screenX;kz.top=kw.screenY-e.screenY}else{T=kv;do{kz.left+=T.offsetLeft;kz.top+=T.offsetTop;if(e6.isWebkit>0&&e6.Dom.getStyle(T,"position")=="fixed"){kz.left+=ky.body.scrollLeft;kz.top+=ky.body.scrollTop;break}T=T.offsetParent}while(T&&T!=kv);if(e6.isOpera>0||(e6.isWebkit>0&&e6.Dom.getStyle(kv,"position")=="absolute")){kz.top-=ky.body.offsetTop}T=kv.offsetParent;while(T&&T!=ky.body){kz.left-=T.scrollLeft;if(!e6.isOpera||T.tagName!="TR"){kz.top-=T.scrollTop}T=T.offsetParent}}}return kz};e6.Dom.getOwnerDocument=function(e){return e.nodeType==9?e:e.ownerDocument||e.document};e6.Dom.setProperties=function(i,e){e6.each(e,function(kv,T){e6.Dom._setProperty(i,T,kv)})};e6.Dom._setProperty=function(i,e,T){if(e=="style"){i.style.cssText=T}else{if(e=="class"){i.className=T}else{if(e=="for"){i.htmlFor=T}else{if(e in e6.Dom._DIRECT_ATTRIBUTE_MAP){i.setAttribute(e6.Dom._DIRECT_ATTRIBUTE_MAP[e],T)}else{i[e]=T}}}}};e6.Dom._DIRECT_ATTRIBUTE_MAP={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder"};e6.G=function(){for(var T=[],kv=arguments.length-1;kv>-1;kv--){var kw=arguments[kv];T[kv]=null;if(typeof kw=="object"&&kw&&kw.dom){T[kv]=kw.dom}else{if((typeof kw=="object"&&kw&&kw.tagName)||kw==window||kw==document){T[kv]=kw}else{if(typeof kw=="string"&&(kw=document.getElementById(kw))){T[kv]=kw}}}}return T.length<2?T[0]:T};e6.ac=function(e,i){if(!(e=this.G(e))){return}i=this.trim(i);if(!new RegExp("(^| )"+i.replace(/(\W)/g,"\\$1")+"( |$)").test(e.className)){e.className=e.className.split(/\s+/).concat(i).join(" ")}};e6.addClassName=e6.ac;e6.each=function(kx,e){if(typeof e!="function"){return kx}if(kx){if(kx.length===undefined){for(var T in kx){e.call(kx[T],kx[T],T)}}else{for(var kv=0,kw=kx.length;kv<kw;kv++){e.call(kx[kv],kx[kv],kv)}}}return kx};e6.extend=function(kx,kv){if(kx&&kv&&typeof(kv)=="object"){for(var kw in kv){kx[kw]=kv[kw]}var T=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"];for(var e=0,i;e<T.length;e++){i=T[e];if(Object.prototype.hasOwnProperty.call(kv,i)){kx[i]=kv[i]}}}return kx};e6.hide=function(){e6.each(arguments,function(e){if(e=e6.G(e)){e.style.display="none"}})};e6.inherit=function(kz,kv,T){var ky=kz.prototype;var kx=function(){};kx.prototype=kv.prototype;var kw=kz.prototype=new kx();if(typeof T=="string"){kw._className=T}for(var e in ky){kw[e]=ky[e]}kz.prototype.constructor=ky.constructor;ky=null;return kw};e6.isIE=0;(function(){if(navigator.userAgent.indexOf("MSIE")>0&&!window.opera){/MSIE (\d+(\.\d+)?)/.test(navigator.userAgent);e6.isIE=parseFloat(RegExp.$1)}})();e6.rc=function(e,i){if(!(e=this.G(e))){return}i=this.trim(i);var T=e.className.replace(new RegExp("(^| +)"+i.replace(/(\W)/g,"\\$1")+"( +|$)","g"),"$2");if(e.className!=T){e.className=T}};e6.removeClassName=e6.rc;e6.show=function(){this.each(arguments,function(e){if(e=e6.G(e)){e.style.display=""}})};e6.trim=function(e){return e.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};e6.getElementsByClassName=function(e,i){if(e.getElementsByClassName){return e.getElementsByClassName(i)}else{return(function T(kC,kA){if(kA==null){kA=document}var kz=[],ky=kA.getElementsByTagName("*"),kv=ky.length,kB=new RegExp("(^|\\s)"+kC+"(\\s|$)"),kx,kw;for(kx=0,kw=0;kx<kv;kx++){if(kB.test(ky[kx].className)){kz[kw]=ky[kx];kw++}}return kz})(i,e)}};e6.toggleClass=function(e,i){if(e6.hasClass(e,i)){e6.removeClassName(e,i)}else{e6.addClassName(e,i)}};e6.hasClass=function(kv,T){if(!kv||!kv.className||typeof kv.className!="string"){return false}var i=-1;try{i=kv.className==T||kv.className.search(new RegExp("(\\s|^)"+T+"(\\s|$)"))}catch(kw){return false}return i>-1};e6.insertHTML=function(kv,e,T){kv=e6.G(kv);if(kv===null){return kv}var i,kw;if(kv.insertAdjacentHTML){kv.insertAdjacentHTML(e,T)}else{i=kv.ownerDocument.createRange();e=e.toUpperCase();if(e=="AFTERBEGIN"||e=="BEFOREEND"){i.selectNodeContents(kv);i.collapse(e=="AFTERBEGIN")}else{kw=e=="BEFOREBEGIN";i[kw?"setStartBefore":"setEndAfter"](kv);i.collapse(kw)}i.insertNode(i.createContextualFragment(T))}return kv};if(typeof HTMLElement!="undefined"&&HTMLElement.prototype.__lookupGetter__&&!HTMLElement.prototype.__lookupGetter__("children")&&!window.opera){try{HTMLElement.prototype.__defineGetter__("children",function(){for(var T=[],kv=0,kx,kw=0,e=this.childNodes.length;kw<e;kw++){kx=this.childNodes[kw];if(kx.nodeType==1){T[kv++]=kx;if(kx.name){if(!T[kx.name]){T[kx.name]=[]}T[kx.name][T[kx.name].length]=kx}if(kx.id){T[kx.id]=kx}}}return T})}catch(jI){}}if(typeof(HTMLElement)!="undefined"&&!window.opera&&HTMLElement.prototype&&!HTMLElement.prototype.insertAdjacentHTML){HTMLElement.prototype.insertAdjacentHTML=function(i,T){var kv=this.ownerDocument.createRange();kv.setStartBefore(this);kv=kv.createContextualFragment(T);switch(i){case"beforeBegin":this.parentNode.insertBefore(kv,this);break;case"afterBegin":this.insertBefore(kv,this.firstChild);break;case"beforeEnd":this.appendChild(kv);break;case"afterEnd":if(!this.nextSibling){this.parentNode.appendChild(kv)}else{this.parentNode.insertBefore(kv,this.nextSibling)}break}}}if(typeof HTMLElement!="undefined"&&!window.opera){HTMLElement.prototype.contains=function(e){if(!e){return false}if(e==this){return true}while(e=e.parentNode){if(e==this){return true}}return false}}if(!e6.Browser.ie&&typeof Event!="undefined"&&!window.opera){Event.prototype.__defineSetter__("returnValue",function(e){if(!e){this.preventDefault()}return e});Event.prototype.__defineSetter__("cancelBubble",function(e){if(e){this.stopPropagation()}return e})}e6.each=function(kw,kv){if(bX(kv)){for(var T=0,e=kw.length;T<e;T++){if(kv.call(kw,kw[T],T)===false){break}}}return kw};e6.Platform={x11:0,macintosh:0,windows:0,android:0,iphone:0,ipad:0};for(var jG in e6.Platform){if(e6.Platform.hasOwnProperty(jG)){e6.Platform[jG]=new RegExp(jG,"i").test(window.navigator.userAgent)?1:0}}if(typeof(e6.Dom)==="undefined"){e6.Dom={}}e6.Dom.getComputedStyle=function(i,e){var kv=i.nodeType==9?i:i.ownerDocument||i.document,T;if(kv.defaultView&&kv.defaultView.getComputedStyle){T=kv.defaultView.getComputedStyle(i,null);if(T){return T[e]||T.getPropertyValue(e)}}else{if(i.currentStyle){return i.currentStyle[e]||""}}return""};var fS=e6.BaseEvent;var de=e6.BaseClass;de.prototype.toString=function(){return this._className||""};e6.on=function(T,i,e){if(!(T=e6.G(T))){return T}i=i.replace(/^on/,"");if(T.addEventListener){T.addEventListener(i,e,false)}else{if(T.attachEvent){T.attachEvent("on"+i,e)}}return T};e6.un=function(T,i,e){if(!(T=e6.G(T))){return T}i=i.replace(/^on/,"");if(T.removeEventListener){T.removeEventListener(i,e,false)}else{if(T.detachEvent){T.detachEvent("on"+i,e)}}return T};e6.hc=function(kv,T){if(!kv||!kv.className||typeof kv.className!="string"){return false}var i=-1;try{i=kv.className==T||kv.className.search(new RegExp("(\\s|^)"+T+"(\\s|$)"))}catch(kw){return false}return i>-1};e6.isEmptyObject=function(T){if(Object.prototype.toString.call(T)==="[object Object]"){for(var e in T){return false}return true}else{return false}};var bW=window.location.protocol==="http:"?"http:":"https:";var eD={fontFamily:'Arial,Helvetica,"PingFang SC","Hiragino Sans GB",STHeiti,sans-serif',mapStyleNameIdPair:{"default":0,"grayed-out":1},mapHost:bW+"//map.baidu.com",apiHost:bW+"//api.map.baidu.com",apiIMG:bW+"//api.map.baidu.com/images",staticHost:bW+"//webmap0.bdimg.com",imgPath:bW+"//webmap0.bdimg.com/image/api/",tileDomain:[bW+"//maponline0.bdimg.com",bW+"//maponline1.bdimg.com",bW+"//maponline2.bdimg.com",bW+"//maponline3.bdimg.com"],panoTilePath:"//apisv1.bdimg.com/",optDomain:"http://10.120.25.45:8017",rasterTilePath:"/tile/",vectorTilePath:"/pvd/",originTilePath:[bW+"//pcor.baidu.com"],stylePath:"//maponline0.bdimg.com/sty/",bosPath:bW+"//mapopen-pub-jsapigl.bj.bcebos.com/assets/images/",getIconSetPath:function(e){var i="map_icons2x/";if(typeof e==="string"&&this.mapStyleNameIdPair[e]>0){i="map_icons2x_"+(this.mapStyleNameIdPair[e]-1)+"/"}return bW+this.stylePath+i},getMapStyleFiles:function(T){var kw=true;if(typeof T==="string"&&T!=="default"){kw=false}var kx=kw?"":"_"+(this.mapStyleNameIdPair[T]-1);var i=bE();var kv="udt="+i.udt+"&v="+i.ver;var e=bW+this.stylePath;return[e+"icons_2x"+kx+".js?"+kv,e+"fs"+kx+".js?"+kv,e+"indoor_fs.js?"+kv]},tvc:{ditu:{normal:{version:"088",updateDate:"20230830"},satellite:{version:"009",updateDate:"20230830"},normalTraffic:{version:"081",updateDate:"20230830"},satelliteTraffic:{version:"083",updateDate:"20230830"},mapJS:{version:"104",updateDate:"20230830"},satelliteStreet:{version:"083",updateDate:"20230830"},earthVector:{version:"001",updateDate:"20230830"}},webapp:{high_normal:{version:"001",updateDate:"20230830"},lower_normal:{version:"002",updateDate:"20230830"}},api_for_mobile:{vector:{version:"002",updateDate:"20230830"},vectorIcon:{version:"002",updateDate:"20230830"}}},msv:{mapstyle:{version:"001",updateDate:"20230817"}}};eD.imgResources={blankGIF:eD.staticHost+"/res/litemapapi/v1d1/images/blank.gif?20170501",markerPng:eD.staticHost+"/res/litemapapi/v1d1/images/marker.png?20170501",locPng:eD.staticHost+"/res/litemapapi/v1d1/images/loc.png?20180918",locNewPng:eD.staticHost+"/res/litemapapi/v1d1/images/loc_new.png?20190314",zoomPng:eD.staticHost+"/res/litemapapi/v1d1/images/zoombtn.png?20180918",mapLogoPng:eD.staticHost+"/res/litemapapi/v1d1/images/logo-2x.png?20190226"};var C=eD;var jx="ruler.cur";if(e6.Browser.ie||e6.Browser.edge){e6.extend(C,{distCursor:"url("+C.imgPath+jx+"),crosshair",defaultCursor:"url("+C.imgPath+"openhand.cur),default",draggingCursor:"url("+C.imgPath+"closedhand.cur),move"})}else{if(e6.Browser.firefox){e6.extend(C,{distCursor:"url("+C.imgPath+jx+"),crosshair",defaultCursor:"-moz-grab",draggingCursor:"-moz-grabbing"})}else{if(e6.Browser.chrome||e6.Browser.safari){e6.extend(C,{distCursor:"url("+C.imgPath+jx+") 2 6,crosshair",defaultCursor:"url("+C.imgPath+"openhand.cur) 8 8,default",draggingCursor:"url("+C.imgPath+"closedhand.cur) 8 8,move"});if(e6.Platform.macintosh){C.defaultCursor="-webkit-grab";C.draggingCursor="-webkit-grabbing"}}else{e6.extend(C,{distCursor:"url("+C.imgPath+jx+"),crosshair",defaultCursor:"url("+C.imgPath+"openhand.cur),default",draggingCursor:"url("+C.imgPath+"closedhand.cur),move"})}}}bD=bD||{};bD.version="gl";bD._register=[];bD.register=function(e){this._register[this._register.length]=e};bD.guid=1;bD.getGUID=function(e){return(e||"")+bD.guid++};var eW=window.BMAP_AUTHENTIC_KEY||"";function S(e,i,kv){var T=new Date();T.setTime(T.getTime()+kv*24*60*60*1000);document.cookie=e+"="+escape(i)+";expires="+T.toGMTString()}function a7(e,i){if(navigator.cookieEnabled){return S(e,i,30)}if(localStorage){return localStorage.setItem(e,i)}if(sessionStorage){return sessionStorage.setItem(e,i)}}bD.getSeckeyCid=function(){var i=+new Date();var e=bW+"//dlswbr.baidu.com/heicha/mw/abclite-2063-s.js?_t="+i;gZ.load(e,i3)};function i3(){if(window.___abvk){a7("SECKEY_ABVK",window.___abvk)}}window.__abbaidu_2063_cb=function(i){var e=JSON.parse(i);a7("BMAP_SECKEY",e.data)};bD.bmapVerifyCbk=function(kw){if(kw&&kw.error!==0){bD=null;BMapGL=null;var kx="百度未授权使用地图API，可能是因为您提供的密钥不是有效的百度地图开放平台密钥，或此密钥未对本应用的百度地图JavaScriptAPI授权。您可以访问如下网址了解如何获取有效的密钥：https://lbs.baidu.com/apiconsole/key#。";switch(kw.error){case 101:kx="您所使用的密钥ak有问题，不支持jsapi服务，可以访问该网址了解如何获取有效密钥：http://lbsyun.baidu.com/apiconsole/key#。";break;case 102:kx="MCODE参数不存在，mobile类型MCODE参数必需，详情查看：http://lbsyun.baidu.com/apiconsole/key#。";break;case 200:kx="APP不存在，AK有误请检查再重试，详情查看：http://lbsyun.baidu.com/apiconsole/key#。";break;case 201:kx="APP被您禁用啦，可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情，或联系我们了解详情。";break;case 202:kx="APP被管理员删除啦，可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情，或联系我们了解详情。";break;case 203:kx="APP类型错误，可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情，或联系我们了解详情。";break;case 210:kx="APP IP校验失败，可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情，或联系我们了解详情。";break;case 220:kx="APP Referer校验失败。请检查该ak设置的白名单与访问所有的域名是否一致。详情查看：http://lbsyun.baidu.com/apiconsole/key#";break;case 230:kx="APP Mcode码校验失败，可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情，或联系我们了解详情。";break;case 240:kx="APP服务被禁用了，可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情，或联系我们了解详情。";break;case 250:kx="该用户不存在... 请登录 https://lbs.baidu.com 的控制台，注册成为开发者申请ak吧。";break;case 251:kx="该用户被自己删除啦，可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情。";break;case 252:kx="该用户被管理员删除啦，可以访问 http://lbsyun.baidu.com/apiconsole/key# 了解如何获取有效密钥，或请联系我们了解详情。";break;case 260:kx="您所使用的密钥AK不包含该服务呢，可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看服务选择情况，或请联系我们了解详情。";break;case 261:kx="您所使用的密钥AK的该服务被禁用啦，可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看服务选择情况，或请联系我们了解详情。";break;case 401:kx="您所使用的AK并发超限了，请登录 http://lbsyun.baidu.com/cashier/quota#/home 了解详情。";break;case 302:kx="您所使用的AK天配额超限了，请登录 http://lbsyun.baidu.com/cashier/quota#/home 了解详情。";break}alert(kx);var T=document.getElementsByClassName("bmap-container");if(T){for(var kv=0;kv<T.length;kv++){var e=T[kv];if(e&&e.firstChild&&e.firstChild.id==="platform"){e.innerText=""}}}}};bD.frequencyCbk=function(e){if(e){window.QTFrequency=e}};bD.verify=function(){var e=C.apiHost+"/?qt=verify&v=gl&type=webgl&ak="+eW+"&callback="+fB+".bmapVerifyCbk";gZ.load(e)};bD.frequency=function(){};bD.apiLoad=bD.apiLoad||function(){};function io(i,e){this._size=i;this._cache=[];this._totalGetTimes=0;this._totalHitTimes=0;this._options={clearCallback:null,removeOldCallback:null};e=e||{};for(var T in e){if(e.hasOwnProperty(T)){this._options[T]=e[T]}}}io.prototype.setData=function(T,kv){var e=this._cache;var i=this._size;if(i===0){return}if(e.length>i){this._removeOld()}if(!e[T]){e.push(kv)}e[T]=kv;kv._key_=T};io.prototype.getHitRate=function(){return Math.round(this._totalHitTimes/this._totalGetTimes*1000)/1000};io.prototype.getData=function(i){var e=this._cache[i];if(e){this._totalHitTimes++}this._totalGetTimes++;return e};io.prototype.removeData=function(kw){if(this._options.clearCallback){this._options.clearCallback(this._cache[kw])}var T=this._cache;var kx=T[kw];for(var kv=0,e=T.length;kv<e;kv++){if(T[kv]===kx){T.splice(kv,1);break}}delete T[kw]};io.prototype._removeOld=function(){var e=this._cache;var kw=Math.round(this._size*0.6);for(var kv=0;kv<kw;kv++){var T=e[kv]._key_;if(this._options.clearCallback){this._options.clearCallback(e[T])}delete e[T]}e.splice(0,kw);if(this._options.removeOldCallback){this._options.removeOldCallback()}};io.prototype.clear=function(){var T=this._cache;for(var kw=0,e=T.length;kw<e;kw++){var kv=T[kw]._key_;if(this._options.clearCallback){this._options.clearCallback(T[kv])}delete T[kv]}this._cache=T=[]};io.prototype.forEach=function(kv){var T=this._cache;for(var kx=0,e=T.length;kx<e;kx++){var kw=T[kx]._key_;kv(T[kw])}};io.prototype.getBatch=function(kw){var e=[];for(var kv=0,T=kw.length;kv<T;kv++){if(this.getData(kw[kv])){e[e.length]=this.getData(kw[kv])}}return e};io.prototype.clearExcept=function(kx){var T=this._cache;for(var e=T.length,kw=e-1;kw>=0;kw--){var kv=this._cache[kw]._key_;if(!kx[kv]){T.splice(kw,1);if(this._options.clearCallback){this._options.clearCallback(T[kv])}delete T[kv]}}};io.prototype.getDataCount=function(){return this._cache.length};function i8(){}e6.extend(i8.prototype,{centerAndZoomIn:function(kA,T,kB){var ky=this;if(!kA&&!T){return}kA=kA||this.centerPoint;T=T||this.zoomLevel;T=this._getProperZoom(T).zoom;if(this.mapType===BMAP_EARTH_MAP){if(!this._earth){this.mapType=BMAPGL_NORMAL_MAP;this.temp.originMapType=BMAP_EARTH_MAP;function kz(){ky._earth=new bD.Earth(ky,{showRealSunlight:ky.config.showRealSunlight,showMilkyway:ky.config.showMilkyway,earthBackground:ky.config.earthBackground});ky._proxyEarthEvents();ky._changeEarthMapType(BMAP_EARTH_MAP);e6.extend(ky,bD.EarthView.prototype);if(!ky._navigationCtrl&&ky.config.showControls){ky._navigationCtrl=new bD.NavigationControl3D(ky)}delete ky.temp.originMapType}hh.load("earth",function(){if(bD["FeatureStyle"+ky.config.style]){kz()}else{ky.loadMapStyleFiles(function(){kz()})}})}}this.lastLevel=this.zoomLevel||T;this.zoomLevel=T;var kw=new fS("onload");kw.point=kA;kw.zoom=T;this.centerPoint=this.restrictCenter(new cD(kA.lng,kA.lat));if(this.centerPoint.zoom){this.zoomLevel=this.centerPoint.zoom}this.defaultZoomLevel=this.defaultZoomLevel||this.zoomLevel;this.defaultCenter=this.defaultCenter||this.centerPoint;if(!this.loaded&&!(this.temp.originMapType===BMAP_EARTH_MAP)){var i=this.config.defaultMaxBounds;var kx=new m(i,"baidu",this.mapType);var kv=new hK({mapType:this.mapType,copyright:kx,customLayer:false,baseLayer:true,tileTypeName:"web"});kv._isInnerLayer=true;this.addTileLayer(kv);if(this.mapType===BMAP_SATELLITE_MAP&&this._isHybridShow===true){this._addHybirdMap()}}this.dispatchEvent(kw);this.loaded=true;kB=kB||{};kB.callback&&kB.callback()},_setPlatformPosition:function(kB,kA,kE){kE=kE||{};if(kB===0&&kA===0&&!kE.point){return}if(isNaN(kE.initMapOffsetX)){kE.initMapOffsetX=this.offsetX}if(isNaN(kE.initMapOffsetY)){kE.initMapOffsetY=this.offsetY}var kC=kB+kE.initMapOffsetX;var kz=kA+kE.initMapOffsetY;if(kE.point){var i=this.restrictCenter(kE.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new fS("oncenter_changed"))}}else{var kv=this.offsetX-kC;var e=this.offsetY-kz;var T=this.getZoomUnits();var ky=this.centerPoint.lng;var kx=this.centerPoint.lat;var kw=new cD(ky,kx);this.centerPoint=this.restrictCenter(new cD(kw.lng+kv*T,kw.lat-e*T),T);this.fire(new fS("oncenter_changed"));if(this.zoomLevel<10){kC=this.offsetX-(this.centerPoint.lng-kw.lng)/T;kz=this.offsetY+(this.centerPoint.lat-kw.lat)/T}}this.offsetX=kC;this.offsetY=kz;var kD=this.platform.style;kD.left=kC+"px";kD.top=kz+"px";this.maskLayer.style.left=-kC+"px";this.maskLayer.style.top=-kz+"px";if(kE.dispatchEvent!==false){this.dispatchEvent(new fS("onmoving"))}},zoomTo:function(e,ky,kC){kC=kC||{};kC.zoomCenter=ky;if(kC.noAnimation!==true){this.deepZoomTo(e,kC);return}if(typeof e!=="number"){return}var kw=es[this.mapType];if(!kw){return}var T=e;e=this._getProperZoom(e).zoom;if(e===this.zoomLevel){var kz=new fS("onzoomexceeded");kz.targetZoom=T;this.dispatchEvent(kz);kC.callback&&kC.callback();return}this.lastLevel=this.zoomLevel;if(ky){this.temp._cPoint=ky;this.temp._cPixel=this.pointToPixelIn(ky)}else{if(this.getInfoWindow()){var kB=this.getInfoWindow().getPoint();this.temp._cPixel=this.pointToPixelIn(kB);this.temp._cPoint=kB}}if(this.config.zoomCenter){ky=this.config.zoomCenter;this.temp._cPoint=ky;this.temp._cPixel=this.pointToPixelIn(ky)}if(ky||this.temp.infoWin&&this.temp.infoWin.isOpen()){var i=this.temp._cPoint;var kA=this.temp._cPixel;var kv=this.getZoomUnits(e);var kx=new cD(i.lng+kv*(this.width/2-kA.x),i.lat-kv*(this.height/2-kA.y));this.centerPoint=this.restrictCenter(kx,kv,e);if(this.centerPoint.zoom){e=this.centerPoint.zoom}}if(kC.fireEvent!==false){this.dispatchEvent(new fS("onzoomstart"))}if(e!==this.zoomLevel){this.zoomLevel=e;this.dispatchEvent(new fS("onzooming"));this.dispatchEvent(new fS("onzoomstartcode"))}if(kC.fireEvent!==false){this.dispatchEvent(new fS("onzoomend"))}if(kC.callback){kC.callback()}},deepZoomMedia:function(e){var i=this;if(!i.temp.isStdCtrlBusy){i.temp.isStdCtrlBusy=true;i.deepZoomTo(i.zoomLevel+e);setTimeout(function(){i.temp.isStdCtrlBusy=false},400)}},deepZoomTo:function(kz,kv){kv=kv||{};var kx=kz-this.zoomLevel;var kw=this._getProperZoom(kz);if(kw.exceeded){var e=new fS("onzoomexceeded");e.targetZoom=kz;this.dispatchEvent(e);return}var i;if(kv.zoomCenter){i=this.pointToPixelIn(kv.zoomCenter)}else{if(this.getInfoWindow()){i=this.pointToPixelIn(this.getInfoWindow().getPoint(),{zoom:this.lastLevel})}else{var i=new fr(this.width/2,this.height/2)}}this.lastLevel=this.zoomLevel;var ky=this.deepZoom||new aF(this);var T=kx>0?1:-1;ky.zoomMap(i,kx,T,null,kv)},flyToIn:function(kA,e){if(e===this.zoomLevel){this.panToIn(kA);return}var kx=this._getProperZoom(e);if(kx.exceeded){var kB=new fS("onzoomexceeded");kB.targetZoom=e;this.dispatchEvent(kB);return}var kz=e-this.zoomLevel;var T=new fr(this.width/2,this.height/2);var i=this.pointToPixelIn(kA);var ky=new ji(i.x-T.x,i.y-T.y);this.lastLevel=this.zoomLevel;if(Math.abs(kz)>=4||Math.abs(ky.width)>this.width||Math.abs(ky.height)>this.height){this.centerAndZoomIn(kA,e);return}var kw=this.deepZoom||new aF(this);var kv=kz>0?1:-1;kw.zoomMap(i,kz,kv,ky)},panToIn:function(i,T){T=T||{};if(!i||i.equals(this.centerPoint)){T.callback&&T.callback();return}var kv=this.pointToPixelIn(i);var e=Math.round(this.width/2);var kw=Math.round(this.height/2);if(Math.abs(e-kv.x)>this.width||Math.abs(kw-kv.y)>this.height||T.noAnimation===true){this._panToIn(e-kv.x,kw-kv.y,i);T.callback&&T.callback()}else{this._panBy(e-kv.x,kw-kv.y,T)}},_panToIn:function(i,e,kv){var T=this.temp;if(T.operating===true){return}if(T.dragAni){T.dragAni.stop();T.dragAni=null;this.dispatchEvent(new fS("onmoveend"))}this.dispatchEvent(new fS("onmovestart"));this._setPlatformPosition(i,e,{point:kv});this.dispatchEvent(new fS("onmoveend"))},panBy:function(i,e,T){T=T||{};i=Math.round(i)||0;e=Math.round(e)||0;if(Math.abs(i)<=this.width&&Math.abs(e)<=this.height&&T.noAnimation!==true){this._panBy(i,e,T)}else{this._panToIn(i,e);T.callback&&T.callback()}},_panBy:function(i,e,kw){if(this.temp.operating===true){return}kw=kw||{};this.dispatchEvent(new fS("onmovestart"));var kv=this;var T=kv.temp;T.pl=kv.offsetX;T.pt=kv.offsetY;if(T.tlPan){T.tlPan.cancel()}if(T.dragAni){T.dragAni.stop();T.dragAni=null;this.dispatchEvent(new fS("onmoveend"))}T.tlPan=new fH({fps:kw.fps||kv.config.fps,duration:kw.duration||kv.config.actionDuration,transition:kw.transition||gN.easeInOutQuad,render:function(kx){this.terminative=kv.temp.operating;if(kv.temp.operating){return}kv._setPlatformPosition(Math.ceil(i*kx),Math.ceil(e*kx),{initMapOffsetX:T.pl,initMapOffsetY:T.pt})},finish:function(kx){kv.dispatchEvent(new fS("onmoveend"));kv.temp.tlPan=false;if(kv.temp.stopArrow===true){kv.temp.stopArrow=false;if(kv.temp.arrow!==0){kv._arrow()}}kw.callback&&kw.callback()}})},getCenterIn:function(){return this.centerPoint},getZoom:function(){return this.zoomLevel},setTilt:function(){},getTilt:function(){return this._tilt},setHeading:function(){},getHeading:function(){return this._heading},restrictCenter:function(kD,i,e){this.isRestrict=false;i=i||this.getZoomUnits();e=e||this.zoomLevel;var kB=this.pixelToPointIn(new fr(this.width,0),{center:kD,zoom:e});var kz=this.pixelToPointIn(new fr(0,this.height),{center:kD,zoom:e});var kE=kD.lng;var kJ=kD.lat;if(this.config.restrictBounds!==null&&!this.config.restrictBounds.isEmpty()){var kI=this.config.restrictBounds;var kv=kI.getSouthWest();var kG=kI.getNorthEast();var kC=jr.convertLL2MC(kv);var kx=jr.convertLL2MC(kG);kD.lng=this.calcNewLngByBounds(kE,kz,kB,kC.lng,kx.lng,i);kD.lat=this.calcNewLatByBounds(kJ,kz,kB,kC.lat,kx.lat,i);return kD}var kA=this.pixelToPointIn(new fr(0,0),{center:kD,zoom:e});var kw=this.pixelToPointIn(new fr(0,this.height),{center:kD,zoom:e});if(this.zoomLevel<5){if(kA.lat>h0.MAX_LAT&&kw.lat<h0.MIN_LAT){this.isRestrict=true;var T=h0.MAX_LAT-kD.lat;var ky=kD.lat-h0.MIN_LAT;var kH;if(T<ky){kH=T/(this.height/2)}else{kH=ky/(this.height/2)}var kF=18-p(kH);this.zoomLevel=Math.ceil(kF);kD.zoom=Math.ceil(kF);return kD}}if(kA.lat>h0.MAX_LAT){this.isRestrict=true;kD.lat=h0.MAX_LAT-this.height/2*i}else{if(kw.lat<h0.MIN_LAT){this.isRestrict=true;kD.lat=h0.MIN_LAT+this.height/2*i}}return kD}});function h0(e,T){if(typeof e==="string"){e=document.getElementById(e)}de.call(this);this.container=e;this.width=e.clientWidth;this.height=e.clientHeight;this.offsetX=0;this.offsetY=0;this._setStyle(e);e.unselectable="on";e.innerHTML="";e6.ac(e,"bmap-container");e.appendChild(this.render());this._initDate=new Date();this.platform=e.children[0];this.maskLayer=this.platform.children[0];this._panes={};this.centerPoint=new cD(0,0);this.zoomLevel=0;this._heading=0;this._tilt=0;this._bounds=new ie();this.lastLevel=0;this._lock=false;this._enableTiltZoom=7;this._enableHeadingZoom=7;this.defaultZoomLevel=null;this.defaultCenter=null;this.zoomEventStatus="idle";this.currentOperation=em.idle;this._setConfig(T);this._initMapRenderType();this._animationInfo={};this._animationInfoUnstopable={};this.suspendLoad=false;this.earthBoundary=true;this._customTileLabels=[];this.areaCustomLoaded=true;if(this._renderType==="webgl"){this._workerMgr=new jO(this);this._featureMgr=new cj();e6.extend(this,D.prototype);this.jobScheduler=new bp(this);this.benchmark=new c4();this._setupWebGLMap();this.deviceInfo={hardwareInfo:{renderer:"",vendor:""}};if(dc.ifSupportWebGL._renderer){this.deviceInfo.hardwareInfo.renderer=dc.ifSupportWebGL._renderer;this.deviceInfo.hardwareInfo.vendor=dc.ifSupportWebGL._vendor}ja.setMap(this)}else{e6.extend(this,i8.prototype)}if(!es[this.config.mapType]){this.config.mapType=BMAPGL_NORMAL_MAP}if(this.config.mapType===BMAP_EARTH_MAP&&!this.config.enableEarth){if(this.forceEnableEarth()===false){this.config.mapType=BMAPGL_NORMAL_MAP}}this.mapType=this.config.mapType;this.preMapType=null;if(this.config.enableEarth){var kx=this.maskLayer.style;kx.opacity=0;kx.background="#000";if(this.config.mapType===BMAP_EARTH_MAP){kx.opacity=1}setTimeout(function(){kx.WebkitTransition=kx.transition="opacity .4s"},100)}this._isHybridShow=this.config.showStreetLayer;this.temp={operating:false,arrow:0,lastDomMoveTime:0,lastLoadTileTime:0,lastMovingTime:0,canKeyboard:false,I:function(i){return e6.I(i)},curSpots:[],curSpotsArray:[],curAreaSpot:null,spotsGuid:1,registerIndex:-1,hoverOnSpot:null,isStdCtrlBusy:false};window.InstanceCore=this.temp.I;this.platform.style.cursor=this.config.defaultCursor;this._bind();if(!bD.BMAP_INSTANCES){bD.BMAP_INSTANCES=1}else{bD.BMAP_INSTANCES+=1}for(var kv=0;kv<bD._register.length;kv++){bD._register[kv](this)}this.temp.registerIndex=kv;var kw=this;if(this._renderType==="webgl"){hh.load("oppcgl",function(){kw._asyncRegister()})}else{hh.load("oppc",function(){kw._asyncRegister()})}if(this.config.mapType==="B_EARTH_MAP"){if(!bD.Earth){hh.load("earth",function(){})}else{kw._syncAndChangeMapType("B_EARTH_MAP")}}}h0.MAX_TILT=87;h0.MAX_DRAG_TILT=73;h0.MAX_DRAG_TILT_L2=50;h0.MIN_TILT=0;h0.MAX_LAT=19431424;h0.MIN_LAT=-16023552;h0.WORLD_SIZE_MC_HALF=20037726.372307256;h0.WORLD_SIZE_MC=h0.WORLD_SIZE_MC_HALF*2;h0.RIGHT_EDGE_POINT=new cD(h0.WORLD_SIZE_MC_HALF,0);h0.LEFT_EDGE_POINT=new cD(-h0.WORLD_SIZE_MC_HALF,0);h0.HIGH_RES_MIN_RATIO=1.2;h0.inherits(de,"Map");var fz={NORMAL:"B_NORMAL_MAP",EARTH:"B_EARTH_MAP",SATELLITE:"B_STREET_MAP"};bD.MapTypeId=fz;e6.extend(h0.prototype,{render:function(){var e=b3("div",{id:"platform"});var kv=e.style;kv.overflow="visible";kv.position="absolute";kv.zIndex=5;kv.top=kv.left="0px";var i=b3("div",{id:"mask","class":"BMap_mask"});var T=i.style;T.position="absolute";T.top=T.left="0px";T.zIndex="9";T.overflow="hidden";T.WebkitUserSelect="none";T.width=this.width+"px";T.height=this.height+"px";e.appendChild(i);return e},_initMapRenderType:function(){var e=this.config.forceRenderType;if(e==="dom"){this._renderType="dom";return}else{if(e==="canvas"){if(dc.isModernBrowser&&!dc.ifCanvas2dInBlackList()){this._renderType="canvas";return}else{this._renderType="dom";return}}else{if(e==="webgl"){if(dc.ifSupportWebGL()){this._renderType="webgl";return}}}}if(dc.ifSupportWebGL()&&dc.ifEnableWebGLMap()){this._renderType="webgl";return}if(dc.isModernBrowser&&dc.ifEnableCanvas2dMap()){this._renderType="canvas";return}this._renderType="dom"},_setConfig:function(T){T=T||{};this.config={bottomOffset:0,clickInterval:200,enableDragging:true,enableRotate:true,enableTilt:true,enableKeyboard:false,enableDblclickZoom:true,enableContinuousZoom:true,enableWheelZoom:false,enableRotateGestures:true,enableTiltGestures:true,enablePinchZoom:true,fixCenterWhenPinch:false,enableAutoResize:true,zoomCenter:null,fps:e6.Browser.ie?30:60,zoomerDuration:240,actionDuration:450,defaultCursor:C.defaultCursor,draggingCursor:C.draggingCursor,overlayMoveCursor:"pointer",coordType:BMAP_COORD_MERCATOR,mapType:BMAPGL_NORMAL_MAP,drawer:BMAP_SYS_DRAWER,enableInertialDragging:true,drawMargin:500,drawMarginGL:500,enableFulltimeSpotClick:false,enableResizeOnCenter:false,isModernBrowser:dc.isModernBrowser,forceRenderType:"",textRenderType:null,ratio:gp()>=h0.HIGH_RES_MIN_RATIO?2:1,enableEarth:dc.ifEnableEarth(),defaultMaxBounds:new ie(new cD(-21364736,-10616832),new cD(23855104,15859712)),showControls:false,indoorControl:false,showRealSunlight:true,showMilkyway:true,earthBackground:null,showStreetLayer:true,showVectorStreetLayer:false,showVectorLine:false,textureScale:1,minZoom:null,maxZoom:null,earthUseRound:true,earthMinZoom:null,earthMaxZoom:null,earthSun:true,earthClouds:true,earthMarkerShowAllTime:true,style:"default",showCustomIndoor:true,backgroundColor:null,enableIconClick:false,autoSafeArea:false,ak:null,webgl2:false,restrictCenter:true,restrictBounds:null,smaa:false,preserveDrawingBuffer:false,privateOn:false,privateRegions:null,popRightClick:false,videoMuted:true,overlayTop:false,highRegion:{lineOpt:null,focusOpt:false}};for(var kv in T){if(T.hasOwnProperty(kv)){this.config[kv]=T[kv];if(kv==="fixCenterWhenResize"){this.config.enableResizeOnCenter=T[kv]}}}if(T.style){if(T.style["styleId"]&&T.style["styleId"].length<32){this.config.style=T.style["styleId"]}else{this.config.style=T.style}}this._setTextRenderType();this._displayOptions={poi:true,poiText:true,poiIcon:true,overlay:true,layer:true,building:true,indoor:true,street:true,skyColors:["rgba(226, 237, 248, 0)","rgba(186, 211, 252, 1)"],isFlat:false,labelMargin:0,buildingSideGradation:false};if(T.displayOptions){for(var i in T.displayOptions){if(T.displayOptions.hasOwnProperty(i)){this._displayOptions[i]=T.displayOptions[i]}}}this._spotOptions={open:false,gray:false,involve:1,focus:0,other:7156516};if(T.focusOptions){for(var e in T.focusOptions){if(T.focusOptions.hasOwnProperty(e)){this._spotOptions[e]=T.focusOptions[e]}}}if(this.config.restrictCenter===false){this._enableTiltZoom=0;this._enableHeadingZoom=0}},getMinZoom:function(){var T;if(es[this.mapType][this._renderType]){T=es[this.mapType][this._renderType].minZoom}else{T=es[this.mapType].minZoom}if(this.config.minZoom!==null&&this.config.minZoom>=T){T=this.config.minZoom}if(this.mapType==="B_EARTH_MAP"){return T}var i=this.getSize();var e=this.worldSize(T);while(e<i.width){T++;e=this.worldSize(T)}return T},getMaxZoom:function(){var e;if(es[this.mapType][this._renderType]){e=es[this.mapType][this._renderType].maxZoom}else{e=es[this.mapType].maxZoom}if(this.config.maxZoom!==null&&this.config.maxZoom<=e){e=this.config.maxZoom}else{if(this._renderType==="webgl"){e=21}}return e},_drawFrame:function(){this._webglMapScene._painter.draw()},_setupWebGLMap:function(){var e=this;hh.load("mapgl",function(){e._asyncRegister()})},_setStyle:function(i){var e=i.style;e.overflow="hidden";if(cn(i).position!=="absolute"){e.position="relative"}e.backgroundImage="url("+C.imgPath+"bg.png)";e.textAlign="left";e.touchAction=e.MSTouchAction="none"},_bind:function(){var e=this;if(e._renderType!=="webgl"){e._watchSize=function(){var T=e.getContainerSize();if(e.width!==T.width||e.height!==T.height){var ky=(T.width-e.width)/2;var kA=(T.height-e.height)/2;var kv=e.getZoomUnits();var kx=e.centerPoint;if(kx&&!e.config.enableResizeOnCenter){e.centerPoint=new cD(kx.lng+ky*kv,kx.lat-kA*kv)}e.maskLayer.style.width=(e.width=T.width)+"px";e.maskLayer.style.height=(e.height=T.height)+"px";var kw=new fS("onresize");kw.size=T;e.dispatchEvent(kw);e.fire(new fS("onsize_changed"));var i=parseInt(e.platform.style.left,10)||0;var kz=parseInt(e.platform.style.top,10)||0;if(e.currentOperation!=="undefined"&&e.currentOperation!==em.idle&&(e.offsetX!==i||e.offsetY!==kz)){e._setPlatformPosition(i,kz)}}}}else{e._watchSize=function(){var i=e.getContainerSize();if(e.width!==i.width||e.height!==i.height){var kv=e.getSize();e.maskLayer.style.width=(e.width=i.width)+"px";e.maskLayer.style.height=(e.height=i.height)+"px";if(gp()!==e.config.ratio){e.config.ratio=gp()}var kw=new fS("onresize");kw.size=i;e.dispatchEvent(kw);var T=new fS("onsize_changed");T.size=i;T.oldSize=kv;e.fire(T)}}}if(e.config.enableAutoResize){e.temp.autoResizeTimer=setInterval(e._watchSize,16)}this.on("size_changed",function(){var i=e.getMinZoom();if(e.zoomLevel<i){e.setZoomIn(i,{noAnimation:true})}});this.on("zoom_changed",function(){this.dispatchEvent(new fS("onzooming"))})},addControl:function(e){if(e&&bX(e._i)){e._i(this);this.dispatchEvent(new fS("onaddcontrol",e))}},removeControl:function(e){if(e&&bX(e.remove)){e.remove();this.dispatchEvent(new fS("onremovecontrol",e))}},hideEarthBoundary:function(){this.earthBoundary=false},showEarthBoundary:function(){this.earthBoundary=true},addContextMenu:function(i,e){if(i){i.initialize(this,e);this.dispatchEvent(new fS("onaddcontextmenu",i))}},removeContextMenu:function(e){if(e){this.dispatchEvent(new fS("onremovecontextmenu",e));e.remove()}},addDistrictLayer:function(e){if(e){e.initialize(this)}},removeDistrictLayer:function(e){if(e){e.removeDistrict(this,e)}},addCustomHtmlLayer:function(e){if(e){e.initialize(this)}},removeCustomHtmlLayer:function(e){if(e){e.removeLayer(e)}},addParkingSpot:function(e){if(e){e.initialize(this)}},removeParkingSpot:function(e){if(e){e.removeParkingSpot()}},addOverlay:function(i){if(i&&bX(i._i)){var T=new fS("onbeforeaddoverlay",i);T.overlay=i;this.dispatchEvent(T);i._i(this);T=new fS("onaddoverlay",i);T.overlay=i;this.dispatchEvent(T)}},removeOverlay:function(i){if(i&&bX(i.remove)){if(i instanceof cp){if(this.stencil){this.stencil=null}}var T=new fS("onremoveoverlay",i);T.overlay=i;i.remove();this.dispatchEvent(T)}},addFocusMask:function(e){if(e instanceof iX){ja.addFocusMask(e)}if(e instanceof Array){for(var T=0;T<e.length;T++){if(e[T] instanceof iX){ja.addFocusMask(e[T])}}}this._drawFrame()},removeFocusMask:function(e){if(e instanceof iX){ja.removeFocusMask(e)}if(e instanceof Array){for(var T=0;T<e.length;T++){if(e[T] instanceof iX){ja.removeFocusMask(e[T])}}}this._drawFrame()},clearFocusMasks:function(){ja.removeFocusMask();this._drawFrame()},clearOverlays:function(){this.dispatchEvent(new fS("onclearoverlays"))},addTileLayer:function(kw){if(!kw){return}if(kw instanceof dy||kw instanceof eh){if(kw.layer){kw=kw.layer}else{return}}for(var kv=0,e=this.tileMgr.tileLayers.length;kv<e;kv++){var T=this.tileMgr.tileLayers[kv];if(T===kw||T.getMapType()===kw.getMapType()){return}}kw.initialize(this);this.dispatchEvent(new fS("onaddtilelayer",kw))},removeTileLayer:function(e){if(e){if(e instanceof dy||e instanceof eh){if(e.layer){e=e.layer}else{return}}e.remove();this.dispatchEvent(new fS("onremovetilelayer",e))}},addNormalLayer:function(e){if(!e||!(e instanceof cs)){return}this.dispatchEvent(new fS("onaddnormallayer",e))},removeNormalLayer:function(e){if(e&&e instanceof cs){this.dispatchEvent(new fS("onremovenormallayer",e))}},addGeoJSONLayer:function(e){if(e&&e instanceof aO){e.init(this)}},removeGeoJSONLayer:function(e){if(e&&e instanceof aO){e.remove()}},getTileLayer:function(e){if(this.tileMgr){return this.tileMgr.getTileLayer(e)}return null},setMapType:function(e){var i=this;if(this.mapType===e||this._mapTypeChanging){return}if(e===BMAP_EARTH_MAP&&!this.config.enableEarth){return}if(this._earth&&this._earth.getLock()){return}this._mapTypeChanging=true;this.preMapType=this.mapType;this._boundsInPreMapType=this.getBoundsIn();if(this.preMapType===BMAP_SATELLITE_MAP){this._preStreetLayerShow=this._isHybridShow}if(e===BMAP_EARTH_MAP){if(!bD.Earth){hh.load("earth",function(){i._syncAndChangeMapType(e)});return}i._syncAndChangeMapType(e)}else{if(this.preMapType!==BMAP_EARTH_MAP){this._changeFlatMapType(e);this._mapTypeChanging=false}else{this._setMapTypeStatus(e,function(T,kv){var kw=i._earth.getEarthCanvas();i._changeFlatMapType(e,this.preMapType);if(i._mapTypeChangAni){i._mapTypeChangAni.stop()}i._mapTypeChangAni=du.start({el:kw,style:"opacity",startValue:1,endValue:0,duration:200,callback:function(){i._mapTypeChangAni=null;i._mapTypeChanging=false}});T=jr.convertLL2MC(T);if(i._renderType==="webgl"){e6.extend(i,D.prototype);i.setCenterIn(T,{noAnimation:true});i.setZoomIn(kv,{noAnimation:true})}else{e6.extend(i,i8.prototype);i.centerAndZoomIn(T,kv)}})}}},_changeFlatMapType:function(ky){if(!ky||!es[ky]){return}var kG=this.preMapType;this.mapType=ky;var kv=this.getTileLayer(kG);if(kv){this.removeTileLayer(kv)}else{if(this.tileMgr.tileLayers.length){var kF=this.getTileLayer("B_NORMAL_MAP");if(kF){this.removeTileLayer(kF)}else{kF=this.getTileLayer("B_SATELLITE_MAP");kF&&this.removeTileLayer(kF)}}}this._preStreetLayerShow=this.config.showStreetLayer;if(kG===BMAP_SATELLITE_MAP&&this.config.showVectorStreetLayer){this._removeHybirdVectorMap()}else{if(kG===BMAP_SATELLITE_MAP&&this._preStreetLayerShow){this._removeHybirdMap()}}if(this.mapType!==BMAP_EARTH_MAP||this._renderType!=="webgl"||this.baseLayerAdded!==true){if(ky!==BMAP_NONE_MAP){var T=new ie(new cD(-21364736,-10616832),new cD(23855104,15859712));var kD=new m(T,"baidu",ky);var kw=new hK({mapType:this.mapType,copyright:kD,dataType:this.mapType===BMAP_SATELLITE_MAP?gS:hY,customLayer:this.mapType===BMAP_SATELLITE_MAP,baseLayer:true,transparentPng:false,tileTypeName:this.mapType===BMAP_SATELLITE_MAP?"web":"na"});kw._isInnerLayer=true;kw.setZIndex(0);this.addTileLayer(kw);if(this._renderType==="webgl"&&!this.baseLayerAdded){this.baseLayerAdded=true}}if(this.mapType===BMAP_NONE_MAP){hL.sendMessage(aZ(4,3,15),["layer","blank"])}else{if(this.mapType===BMAP_SATELLITE_MAP){hL.sendMessage(aZ(4,3,2),["layer","raster"])}else{hL.sendMessage(aZ(4,3,1,1),["layer","vector","normal"])}}}if(ky===BMAP_SATELLITE_MAP){this._featureMgr.clearLabelOverlayData();this._featureMgr.setLabelData([]);if(this.config.showVectorStreetLayer){this._addHybirdVectorMap()}else{if(this._preStreetLayerShow===true||typeof this._preStreetLayerShow==="undefined"){this._addHybirdMap()}}}var kA=this.tileMgr.tileLayers;for(var kz=0,kx=kA.length;kz<kx;kz++){var kB=kA[kz];var kE=kB.tilesDiv;if(!kE){continue}if(!kB._isInnerLayer&&kE.style.visibility==="hidden"){kE.style.visibility=""}}var kC=new fS("onmaptypechange");kC.zoomLevel=this.zoomLevel;kC.mapType=ky;kC.exMapType=kG;this.dispatchEvent(kC)},showStreetLayer:function(e){if(e){this.hideVectorStreetLayer()}e?this._addHybirdMap():this._removeHybirdMap()},showVectorStreetLayer:function(){this.hideStreetLayer();this.hideVectorStreetLayer();this.config.showVectorStreetLayer=true;if(this.mapType===BMAP_SATELLITE_MAP||this.mapType===BMAP_NONE_MAP){this._addHybirdVectorMap()}},hideStreetLayer:function(e){this._hideStreetLayerOptions=e;this._removeHybirdMap(e)},hideVectorStreetLayer:function(){this.config.showVectorStreetLayer=false;if(this.mapType===BMAP_SATELLITE_MAP||this.mapType===BMAP_NONE_MAP){this._removeHybirdVectorMap()}},_addHybirdVectorMap:function(){var e=new hK({mapType:"B_NORMAL_MAP",dataType:hY,customLayer:false,baseLayer:false,transparentPng:true,tileTypeName:"na"});e._isInnerLayer=true;e.setZIndex(1);this.addTileLayer(e)},_removeHybirdVectorMap:function(){var kw=this.tileMgr.tileLayers;for(var kv=0,e=kw.length;kv<e;kv++){var T=kw[kv];if(T._isInnerLayer&&T.mapType==="B_NORMAL_MAP"){this.removeTileLayer(T)}}},_addHybirdMap:function(){this._isHybridShow=true;if(this.mapType==="B_EARTH_MAP"){if(this._earth){this._earth.showStreetLayer()}return}if(this._hybridTileLayer){this.addTileLayer(this._hybridTileLayer);var ky=new fS("onstreetlayer_show");this.dispatchEvent(ky);return}var kw=new ie(new cD(-21364736,-10616832),new cD(23855104,15859712));var T=new m(kw,"",BMAP_HYBRID_MAP);var i=new hK({copyright:T,transparentPng:true,pack:true,tileTypeName:"web"});i._isInnerLayer=true;var kv=this.isCanvasMap();i.getTilesUrl=function(kz,kF){var kD=es.B_STREET_MAP;var kE=j6("ditu","satelliteStreet");var kA=kE.ver;var e=kE.udt;var kC=e9.calcLoopParam(kz.x,kF).col;var kB=kD.tileUrls[Math.abs(kz.x+kz.y)%kD.tileUrls.length]+"?qt=vtile&x="+(kC+"").replace(/-/gi,"M")+"&y="+(kz.y+"").replace(/-/gi,"M")+"&z="+kF+"&styles=sl&v="+kA+"&udt="+e+"&scaler="+gp()+"&showtext="+(kv?0:1);return kB};this._isHybridShow=true;this.addTileLayer(i);this._hybridTileLayer=i;var kx=new fS("onstreetlayer_show");this.dispatchEvent(kx)},_removeHybirdMap:function(i){this._isHybridShow=false;if(this.mapType==="B_EARTH_MAP"){if(this._earth){this._earth.hideStreetLayer(i)}return}if(this._hybridTileLayer){this.removeTileLayer(this._hybridTileLayer);var T=new fS("onstreetlayer_hide");this.dispatchEvent(T)}},isStreetLayerShow:function(){return this._isHybridShow},getTileId:function(e,kx){var kv=es[this.mapType];if(typeof kv!=="object"){return null}var T=kv.baseUnits*Math.pow(2,(kv.zoomLevelBase-kx));var kw=parseInt(e.lng/T,10);var i=parseInt(e.lat/T,10);return{row:kw,column:i,level:kx}},reset:function(){this.centerAndZoomIn(this.defaultCenter,this.defaultZoomLevel,true)},setOptions:function(i){i=i||{};var kw=this;for(var kv in i){if(i.hasOwnProperty(kv)){var T=true;if(typeof i[kv]!=="object"){T=i[kv]!==this.config[kv]}this.config[kv]=i[kv];if(kv==="fixCenterWhenResize"){this.config.enableResizeOnCenter=i[kv]}if(!T){continue}switch(kv){case"style":case"styleUrl":var e={os:i.style.os,sv:i.style.sv};if(kv==="style"&&i.styleUrl){break}this.fire(new fS("onstyle_willchange"));this.loadMapStyleFiles(function(){var kx=new fS("onlayer_update");kx.name="na";kw.fire(kx)},e);break;case"enableAutoResize":if(i[kv]===true){this.enableAutoResize()}else{this.disableAutoResize()}break;case"displayOptions":this.setDisplayOptions(i[kv]);break}}}},setPrivateStatus:function(i){if(typeof i==="boolean"){if(this.config.privateOn!==i){this.config.privateOn=i;var e=new fS("onlayer_update");e.name="na";this.fire(e)}}},getPrivateStatus:function(){return this.config.privateOn},setPrivateRegions:function(kw){if(kw&&kw instanceof Array){var kv=true;for(var T=0;T<kw.length;T++){if(kw[T] instanceof cS){continue}else{kv=false;break}}if(kv){this.config.privateRegions=kw;var e=new fS("onlayer_update");e.name="na";this.fire(e)}}},getPrivateRegions:function(){if(!this.config.privateRegions){return null}else{return this.config.privateRegions}},enableDragging:function(){this.config.enableDragging=true},disableDragging:function(){this.config.enableDragging=false},enableInertialDragging:function(){this.config.enableInertialDragging=true},disableInertialDragging:function(){this.config.enableInertialDragging=false},enableScrollWheelZoom:function(){this.config.enableWheelZoom=true},disableScrollWheelZoom:function(){this.config.enableWheelZoom=false},enableContinuousZoom:function(){this.config.enableContinuousZoom=true},disableContinuousZoom:function(){this.config.enableContinuousZoom=false},enableResizeOnCenter:function(){this.config.enableResizeOnCenter=true},disableResizeOnCenter:function(){this.config.enableResizeOnCenter=false},enableDoubleClickZoom:function(){this.config.enableDblclickZoom=true},disableDoubleClickZoom:function(){this.config.enableDblclickZoom=false},enableKeyboard:function(){this.config.enableKeyboard=true},disableKeyboard:function(){this.config.enableKeyboard=false},getSize:function(){return new ji(this.width,this.height)},enablePinchToZoom:function(){this.config.enablePinchZoom=true},disablePinchToZoom:function(){this.config.enablePinchZoom=false},enableRotateGestures:function(){this.config.enableRotateGestures=true},disableRotateGestures:function(){this.config.enableRotateGestures=false},enableTilt:function(){this.config.enableTilt=true},disableTilt:function(){this.config.enableTilt=false},enableRotate:function(){this.config.enableRotate=true},disableRotate:function(){this.config.enableRotate=false},enableAutoResize:function(){this.config.enableAutoResize=true;this._watchSize();if(!this.temp.autoResizeTimer){this.temp.autoResizeTimer=setInterval(this._watchSize,16)}},disableAutoResize:function(){this.config.enableAutoResize=false;if(this.temp.autoResizeTimer){clearInterval(this.temp.autoResizeTimer);this.temp.autoResizeTimer=null}},checkResize:function(){this._watchSize()},resize:function(){this._watchSize()},getContainerSize:function(){return new ji(this.container.clientWidth,this.container.clientHeight)},_getProperZoom:function(T){if(!T){T=this.zoomLevel}var i=this.getMinZoom();var e=this.getMaxZoom();var kv=false;if(T<i){kv=true;T=i}if(T>e){kv=true;T=e}if(this._renderType!=="webgl"){T=Math.round(T)}return{zoom:T,exceeded:kv}},getContainer:function(){return this.container},getZoomUnits:function(T){if(this.mapType===BMAP_EARTH_MAP){return Math.pow(2,18-this._earth.getImageZoom())}var e=es[this.mapType];if(typeof e!=="object"){return null}var i=T||this.zoomLevel;return Math.pow(2,(e.zoomLevelBase-i))},pointToPixelIn:function(kG,kI){if(!kG){return}kI=kI||{};if(this.mapType===BMAP_EARTH_MAP){var kx;if(!kG._llPt){kx=jr.convertMC2LL(kG);kG._llPt=kx}kx=kG._llPt;var kC=null;var kw=null;if(typeof kI.zoom==="number"){var kF=this._earth;var kH=kF._getEarthZoomByImgZoom(kI.zoom);if(kH<=3){kC=kF._generateTmpPMatrix(kH)}kw=kF._generateTmpMVMatrix(kF.getCenter(),kH)}var ky=this._earth.fromLatLngToPixel(kx,{useRound:false,isCalcOnBack:true,matrixInfo:{modelViewMatrix:kw,projectionMatrix:kC}});return ky}if((this._heading%360===0&&this._tilt===0)||!this._webglMapCamera){var kE=this.getZoomUnits(kI.zoom);var kA=kI.center||this.centerPoint;var kv=this.width/2;var kz=this.height/2;var kD;if(kG.lng*kA.lng<0){var i=Math.abs(kG.lng-kA.lng);var e=(e9._mc180X*2-i)/kE;if(kA.lng<0){kD=kv-e}else{kD=kv+e}}else{kD=(kG.lng-kA.lng)/kE+kv}var kB=(kA.lat-kG.lat)/kE+kz;if(kI.useRound!==false){kD=Math.round(kD);kB=Math.round(kB)}return new fr(kD,kB)}var T=this._webglMapCamera.fromMCToScreenPixel(kG.lng,kG.lat,kI);if(kI.useRound===false){return T}T.x=Math.round(T.x);T.y=Math.round(T.y);return T},pixelToPointIn:function(e,kC){if(!e){return}kC=kC||{};if(this.mapType===BMAP_EARTH_MAP){if(typeof kC.zoom==="number"){var kA=this._earth;var kx=null;var T=null;var kB=kA._getEarthZoomByImgZoom(kC.zoom);if(kB<=3){kx=kA._generateTmpPMatrix(kB)}T=kA._generateTmpMVMatrix(kA.getCenter(),kB)}var i=this._earth.fromPixelToLatLng(e,{matrixInfo:{modelViewMatrix:T,projectionMatrix:kx}});if(i===null){return null}return jr.convertLL2MC(i)}if((this._heading%360!==0||this._tilt>0)&&this._webglMapCamera){return this._webglMapCamera.fromScreenPixelToMC(e.x,e.y,kC)}var ky=kC.center||this.centerPoint;var kz=this.getZoomUnits(kC.zoom);var kw=ky.lng+kz*(e.x-this.width/2);var kv=ky.lat-kz*(e.y-this.height/2);return new cD(kw,kv)},pointToOverlayPixelIn:function(e,kv){kv=kv||{};var T=this.pointToPixelIn(e,{zoom:kv.zoom,center:kv.center,forLabel:true,frustumTest:true,useRound:kv.useRound});if(!T){return}if(kv.fixPosition&&this.mapType!=="B_EARTH_MAP"){var kw=this.getSize();var i=this.worldSize(kv.zoom);if(T.x>kw.width){while(T.x>kw.width){T.x-=i}}else{if(T.x<0){while(T.x<0){T.x+=i}}}}if(this._renderType==="webgl"){return T}T.x-=this.offsetX;T.y-=this.offsetY;return T},overlayPixelToPointIn:function(i,e){if(!i){return}var T=i.clone();if(this._renderType!=="webgl"){T.x+=this.offsetX;T.y+=this.offsetY}return this.pixelToPointIn(T,e)},getProjection:function(){return new jr()},lnglatToMercator:function(e,kv){var i=new cD(e,kv);var T=jr.convertLL2MC(i);return[T.lng,T.lat]},mercatorToLnglat:function(i,e){if(isNaN(i)||isNaN(e)){return[]}i=parseFloat(i);e=parseFloat(e);var kv=new cD(i,e);var T=jr.convertMC2LL(kv);return[T.lng,T.lat]},getBoundsIn:function(){if(!this._bounds){return}var kI=arguments[0];if(this.mapType===BMAP_EARTH_MAP&&this._earth){var kC=this._earth.getCustomBounds();if(!kC){return this.config.defaultMaxBounds}var kB=kC.getSouthWest();var e=kC.getNorthEast();if(kB.lng>e.lng){e.lng=180}var kZ=jr.convertLL2MC(kB);var kP=jr.convertLL2MC(e);var kF=this.config.defaultMaxBounds;var kO=Math.max(kZ.lng,kF.sw.lng);var kN=Math.max(kZ.lat,kF.sw.lat);var kH=Math.min(kP.lng,kF.ne.lng);var kG=Math.min(kP.lat,kF.ne.lat);var kK=new ie(new cD(kO,kN),new cD(kH,kG));kK.pointBottomLeft=new cD(kO,kN);kK.pointBottomRight=new cD(kH,kN);kK.pointTopLeft=new cD(kO,kG);kK.pointTopRight=new cD(kH,kG);kK.setMinMax();kK.makeNormalizedPoint(this._earth.getHeading());return kK}kI=kI||{};var kw=kI.margins||[0,0,0,0];var kU=this.pixelToPointIn({x:kw[3],y:this.height-kw[2]},kI);var kY=this.pixelToPointIn({x:this.width-kw[1],y:kw[0]},kI);var kM=typeof kI.heading==="number"?kI.heading:(this._heading%360);var T=typeof kI.tilt==="number"?kI.tilt:this._tilt;var kE=this._webglMapCamera;if((kM===0&&T===0)||!kE){this._bounds.setSouthWest(kU);this._bounds.setNorthEast(kY);this._bounds.pointBottomLeft=kU;this._bounds.pointBottomRight=new cD(kY.lng,kU.lat);this._bounds.pointTopRight=kY;this._bounds.pointTopLeft=new cD(kU.lng,kY.lat);this._bounds.setMinMax();this._bounds.makeNormalizedPoint(kM);return this._bounds}var kL=this.pixelToPointIn({x:kw[3],y:kw[0]},kI);var kv=kE.getPosition();var k0=Math.sqrt(Math.pow(kL.lng-kv[0],2)+Math.pow(kL.lat-kv[1],2));var kV=this.getZoomUnits();var k2=k0/kV;var kS=kE._frustumSideLen;var kA=kE._fovy;if(k2>kS||(90-T)<kA/2){var k1=[kL.lng-kv[0],kL.lat-kv[1]];if((90-T)<kA/2){k1[0]=-k1[0];k1[1]=-k1[1]}var kT=kS*kV;var kz=[k1[0]/k0*kT+kv[0],k1[1]/k0*kT+kv[1]];var kQ=[kY.lng-kv[0],kY.lat-kv[1]];if((90-T)<kA/2){kQ[0]=-kQ[0];kQ[1]=-kQ[1]}var kx=[kQ[0]/k0*kT+kv[0],kQ[1]/k0*kT+kv[1]];kL.lng=kz[0];kL.lat=kz[1];kY.lng=kx[0];kY.lat=kx[1]}var kJ=this.pixelToPointIn({x:this.width-kw[1],y:this.height-kw[2]},kI);var kR=[kU,kY,kL,kJ];var kX=kR[0].lng;var k3=kR[0].lat;var ky=kR[0].lng;var kD=kR[0].lat;for(var kW=1;kW<4;kW++){if(kR[kW].lng<kX){kX=kR[kW].lng}if(kR[kW].lng>ky){ky=kR[kW].lng}if(kR[kW].lat<k3){k3=kR[kW].lat}if(kR[kW].lat>kD){kD=kR[kW].lat}}this._bounds.setSouthWest(new cD(kX,k3));this._bounds.setNorthEast(new cD(ky,kD));this._bounds.pointTopLeft=kL;this._bounds.pointTopRight=kY;this._bounds.pointBottomRight=kJ;this._bounds.pointBottomLeft=kU;this._bounds.makeNormalizedPoint(kM);this._bounds.setMinMax();return this._bounds},isLoaded:function(){return !!this.loaded},_getBestLevel:function(i,kE){var kx=0;if(this._renderType==="webgl"&&!b2()){kx=100}var ky=kE.margins||[10,10,10,10];var kv=kE.zoomFactor||0;var kz=ky[1]+ky[3];var kw=ky[0]+ky[2];var e=this.getMinZoom();var kD=this.getMaxZoom();var kC=i.toSpan();var kB=kC.width/(this.width-kz-kx);var kA=kC.height/(this.height-kw-kx);var T=18-p(Math.max(kB,kA));if(T<e){T=e}if(T>kD){T=kD}T+=kv;if(this._renderType!=="webgl"){T=Math.floor(T)}return T},getViewportIn:function(kE,kw){if(this.mapType===BMAP_EARTH_MAP){kE=kE||[];var ky=[];for(var kF=0;kF<kE.length;kF++){if(!kE[kF]){continue}ky.push(jr.convertMC2LL(kE[kF]))}var kG=this._earth.getViewportIn(ky,kw);var kv=kG.center;var kC=kG.zoom;var kK=jr.convertLL2MC(kv);return{center:kK,zoom:kC}}var kA={center:this.getCenterIn(),zoom:this.getZoom()};if(!kE||kE.length===0){return kA}kw=kw||{};var kz;if(kE instanceof ie){kz=kE}else{var kx=kE;kz=new ie();for(var kD=kx.length-1;kD>=0;kD--){kz.extend(kx[kD])}if(kz.isEmpty()){return kA}}var kJ=kz.getCenter();var e=this._getBestLevel(kz,kw);if(kw.margins){var T=kw.margins;var kI=(T[1]-T[3])/2;var kB=(T[0]-T[2])/2;var kH=this.getZoomUnits(e);kJ.lng=kJ.lng+kH*kI;kJ.lat=kJ.lat+kH*kB}return{center:kJ,zoom:e}},setViewportIn:function(kv,kw){if(this.mapType===BMAP_EARTH_MAP){var kA;if(kv&&kv.center){var T=jr.convertMC2LL(kv.center);var ky=this._earth._getEarthZoomByImgZoom(kv.zoom,T);kA={center:T,zoom:ky}}else{kA=[];for(var kx=0;kx<kv.length;kx++){var kz=jr.convertMC2LL(kv[kx]);kA[kx]=new cx(kz.lat,kz.lng)}}this._earth.setViewportIn(kA,kw);return}var e;if(kv&&kv.center){e=kv}else{e=this.getViewportIn(kv,kw)}kw=kw||{};if(this._renderType==="webgl"){this.centerAndZoomIn(e.center,e.zoom,kw);return}if(e.zoom===this.zoomLevel&&kw.enableAnimation!==false){this.panToIn(e.center,{duration:200,callback:kw.callback})}else{this.centerAndZoomIn(e.center,e.zoom,kw)}},addSpots:function(T,i){if(!T||T.length===0){return}i=i||{};var kx=i.zIndex||0;var kw=typeof i.enableMultiResponse==="undefined"?true:!!i.enableMultiResponse;this.spotsPool=this.spotsPool||{};var e="sp"+(this.temp.spotsGuid++);this.spotsPool[e]={spots:T.slice(0),zIndex:kx,enableMultiResponse:kw};var kv=this;hh.load("hotspot",function(){kv._asyncRegister()});return e},getSpots:function(e){return this.spotsPool[e]&&this.spotsPool[e].spots||[]},removeSpots:function(e){if(!e||!this.spotsPool[e]){return}delete this.spotsPool[e]},clearSpots:function(){delete this.spotsPool},getIconByClickPosition:function(i){if(!this.config.enableIconClick||!this._spotsMgr){return null}var e=this._spotsMgr.getSpotsByScreenPosition(i);if(e[0]&&e[0].userdata){var T=e[0].userdata;return{name:T.name,uid:T.uid,position:T.iconPoint||e[0].pt}}return null},setBounds:function(e){es[this.mapType].bounds=e.clone()},getCoordType:function(){return this.config.coordType},getPanes:function(){return this._panes},getInfoWindow:function(){if(this.temp.infoWin&&this.temp.infoWin.isOpen()){return this.temp.infoWin}return null},getDistanceIn:function(kw,e){if(!kw||!e){return}if(kw.equals(e)){return 0}if(this.mapType===BMAP_EARTH_MAP){var kv=jr.convertMC2LL(kw);var T=jr.convertMC2LL(e);return this._earth.getDistance(kv,T)}var i=jr.getDistanceByMC(kw,e);return i},getOverlays:function(){var kx=[];var ky=this._overlays;var kw=this._customOverlays;if(ky){for(var kv in ky){if(ky[kv] instanceof eJ){kx.push(ky[kv])}}}if(kw){for(var T=0,e=kw.length;T<e;T++){kx.push(kw[T])}}return kx},getMapType:function(){return this.mapType},getMapCoordType:function(){return this.coordType},_asyncRegister:function(){for(var e=this.temp.registerIndex;e<bD._register.length;e++){if(bD._register[e] instanceof Function){bD._register[e](this)}}this.temp.registerIndex=e},setDefaultCursor:function(e){this.config.defaultCursor=e;if(this.platform){this.platform.style.cursor=this.config.defaultCursor}},getDefaultCursor:function(){return this.config.defaultCursor},setOverlayMoveCursor:function(e){this.config.overlayMoveCursor=e},getOverlayMoveCursor:function(){return this.config.overlayMoveCursor},setDraggingCursor:function(e){this.config.draggingCursor=e},getDraggingCursor:function(){return this.config.draggingCursor},_syncAndChangeMapType:function(e){hL.sendMessage(aZ(4,250),["earth",""]);var i=this;if(i._renderType==="webgl"&&i.getTilt()>h0.MAX_DRAG_TILT_L2){i.setTilt(h0.MAX_DRAG_TILT_L2,{callback:function(){i._changeEarthMapType(e)}})}else{i._changeEarthMapType(e)}},_changeEarthMapType:function(T){var kv=this;var ky=kv.tileMgr.tileLayers;if(this._mapTypeChangAni){this._mapTypeChangAni.stop()}var kx;if(this._earth){kx=this._earth.getEarthCanvas()}if(!this._earth){this.maskLayer.style.opacity=1;this.maskLayer.style.zIndex=999;this.maskLayer.style.background="#000"}this._mapTypeChangAni=new fH({duration:400,render:function(e){if(!kv._earth){return}kx.style.opacity=e},finish:function(){for(var e=ky.length-1,kz=e;kz>=0;kz--){var kB=ky[kz].tilesDiv;if(kB){kB.style.visibility="hidden"}if(ky[kz]._isInnerLayer&&kv._renderType!=="webgl"){kv.removeTileLayer(ky[kz])}}kv._mapTypeChangAni=null;kv._mapTypeChanging=false;function kA(){var kF=kv.getZoom()-2;var kG=kv.getCenterIn();var kD=jr.convertMC2LL(kG);kv._earth=new bD.Earth(kv,{center:kD,zoom:kF,showRealSunlight:kv.config.showRealSunlight,showMilkyway:kv.config.showMilkyway,earthBackground:kv.config.earthBackground});if(kv.config&&kv.config.earthMaxZoom&&kv._earth){kv._earth.setMaxZoom(kv.config.earthMaxZoom)}if(kv.config&&kv.config.earthMinZoom&&kv._earth){kv._earth.setMinZoom(kv.config.earthMinZoom)}kv._proxyEarthEvents();var kC=kv.mapType;kv.mapType=T;var kE=new fS("onmaptypechange");kE.zoomLevel=this.zoomLevel;kE.mapType=T;kE.exMapType=kC;kv.dispatchEvent(kE);kv._setMapTypeStatus(T);e6.extend(kv,bD.EarthView.prototype);if(!kv._navigationCtrl&&kv.config.showControls){kv._navigationCtrl=new e8(kv)}}if(!kv._earth){if(bD["FeatureStyle"+kv.config.style]){kA()}else{kv.loadMapStyleFiles(function(){kA()})}}if(parseInt(kv.maskLayer.style.opacity,10)===1){setTimeout(function(){kv.maskLayer.style.zIndex=9;kv.maskLayer.style.opacity=0},1000)}}});if(!this._earth){return}var i=this.mapType;this.mapType=T;var kw=new fS("onmaptypechange");kw.zoomLevel=this.zoomLevel;kw.mapType=T;kw.exMapType=i;this.dispatchEvent(kw);kv._setMapTypeStatus(T);e6.extend(kv,bD.EarthView.prototype)},getMapStyleId:function(){if(typeof this.config.style==="string"){return this.config.style}return this.config.mapStyleId||"custom"},getAreaStyleId:function(){return this.config.areaStyleId||"areaStyle"},_printLog:function(e){var i;switch(e){case"mapvgl":i=249;break;case"mapvthree":i=248;break;case"bmapdraw":i=247;break;default:break}if(i){hL.sendMessage(aZ(4,i),[e])}},_setMapTypeStatus:function(T){var kz=arguments[1];if(T===BMAP_EARTH_MAP){var kx=this._earth.getEarthCanvas();if(kx){kx.style.display=""}var kA={noAnimation:true};if(this.earthMinZoom){this._earth.setMinZoom(this.earthMinZoom);this.earthMinZoom=undefined}if(this.earthMaxZoom){this._earth.setMaxZoom(this.earthMaxZoom);this.earthMaxZoom=undefined}this._earth.setCenter(jr.convertMC2LL(this.centerPoint),kA);this._earth.setImageZoom(this.zoomLevel,kA);this._earth.setTilt(this.getTilt(),kA);this._earth.setHeading(this.getHeading(),kA)}else{if(this.preMapType===BMAP_EARTH_MAP&&this._earth){var ky=this._earth;var kv=ky.getMapZoom();var kw=ky._imageRawZoom||kv;var i=kw-kv;var e=ky.getCenter();if(this._renderType==="webgl"){this._tilt=ky.getTilt();if(this.zoomLevel>7){this._heading=ky.getHeading();kz&&kz(e,kv);return}if(ky.getHeading()!==0){ky.setTilt(this.getTilt());ky.setHeading(this.getHeading(),{callback:function(){kz&&kz(e,kv)}})}else{kz&&kz(e,kv)}return}if(i<0.1&&ky.getTilt()===0&&ky.getHeading()===0){kz&&kz(e,kv);return}ky.setTilt(0);ky.setHeading(0);ky.setZoom(ky.getZoom()-i,{callback:function(){kz&&kz(e,kv)}})}}},_proxyEarthEvents:function(){var kw=this;var kx=this._earth;kx.on("tilesload",function(i){kw.fire(i)});kx.on("centerandzoom",function(i){kw.dispatchEvent(new fS("onmoveend"));kw.dispatchEvent(new fS("onzoomend"))});function kv(i){kw.fire(i)}var e=["zoomstart","zoomend","tilesload","sunlighttime_change","sunlighttime_clear","centerandzoom","animation_start","animation_stop","movestart","moveend","moving","dragstart","dragend","dragging"];for(var T=0;T<e.length;T++){kx.on(e[T],kv)}},forceEnableEarth:function(){this.config.forceEnableEarth=true;this.config.enableEarth=dc.ifEnableEarth(true);this.dispatchEvent(new fS("forceenableearth"));return this.config.enableEarth},setLock:function(e){if(this.mapType===BMAP_EARTH_MAP){this._earth.setLock(e)}this._lock=e},getLock:function(){if(this.mapType===BMAP_EARTH_MAP){return this._earth.getLock()}return this._lock},getEarth:function(){return this._earth},isSupportEarth:function(){return this.config.enableEarth},isCanvasMap:function(){return !!(this._renderType==="canvas"&&this.getMapType()!=="B_EARTH_MAP")},getCanvasMapCoordByUid:function(kw){if(this._renderType==="webgl"){var kx=this.tileMgr.tileLayers;for(var kv=0;kv<kx.length;kv++){if(kx[kv].labelProcessor){return kx[kv].labelProcessor.getLabelByUid(kw,"")}}return null}var e=this.canvas2dMapMgr._labelClick;var T=e.findLabelByUid(kw);return T?new cD(T.iconPos.geoX,T.iconPos.geoY):null},loadBizData:function(i){var e=new fS("onloadbizdata");e.data=i;this.dispatchEvent(e)},unloadBizData:function(){var e=new fS("onunloadbizdata");this.dispatchEvent(e)},zoomIn:function(e){this.setZoomIn(this.zoomLevel+1,{zoomCenter:e})},zoomOut:function(e){this.setZoomIn(this.zoomLevel-1,{zoomCenter:e})},setMaxZoom:function(e){if(this._renderType==="webgl"){this.config.maxZoom=e<=25?e:25}else{this.config.maxZoom=e<=19?e:19}},setEarthMaxZoom:function(i){var e=i<=this.getMaxZoom()-2?i:this.getMaxZoom()-2;if(this.mapType==="B_EARTH_MAP"){this._earth.setMaxZoom(e);this.earthMaxZoom=undefined;return}this.earthMaxZoom=e},setMinZoom:function(e){this.config.minZoom=e>=3?e:3},setEarthMinZoom:function(e){var i=e-2>=1?e-2:1;if(this.mapType==="B_EARTH_MAP"){this._earth.setMinZoom(i);this.earthMinZoom=undefined;return}this.earthMinZoom=i},setCenterIn:function(e,i){i=i?i:{};i.tilt=i.tilt?i.tilt:this.getTilt();i.heading=i.heading?i.heading:this.getHeading();this.panToIn(e,i)},getRenderType:function(){return this._renderType},getSolarInfo:function(kv){kv=kv||this._initDate;var T=fE(kv);var e=jr.convertLL2MC(new cD(T[0],T[1]));var kD=e.latLng;var ky=bD.Projection.convertMC2LL(this.centerPoint);var kA=kv.getUTCHours();var kC=kA+24*ky.lng/360;var kB=kC-12;var kz=kB*60*0.25;var kx=Math.asin(Math.sin(iS(ky.lat))*Math.sin(iS(kD.lat))+Math.cos(iS(ky.lat))*Math.cos(iS(kD.lat))*Math.cos(iS(kz)));var kw=Math.asin(Math.sin(iS(kz))*Math.cos(iS(kD.lat))/Math.cos(kx));var i="north";if(ky.lat<kD.lat){i="south"}return{zenith:e,solarAltitude:kx,solarAzimuth:kw,centerPosition:i,position:e}},setDisplayOptions:function(T){if(!T){return}for(var e in this._displayOptions){if(this._displayOptions.hasOwnProperty(e)){if(typeof T[e]==="boolean"||(e==="skyColors"&&typeof T.skyColors==="object")||(e==="labelMargin"&&typeof T.labelMargin==="number")){this._displayOptions[e]=T[e]}}}var i=this.getMapType();if(i===fz.NORMAL){this.fire(new fS("ondisplayoptions_changed"))}else{if(i===fz.EARTH&&this._earth){this._earth.fire(new fS("ondisplayoptions_changed"))}}},getHorizonPosY:function(e){if(!e||!this._webglMapCamera){return null}var i=this._webglMapCamera.fromMCToScreenPixel(e.lng,e.lat,{heading:0});return i.y},getIndoorInfo:function(){if(!this._indoorMgr){return}return this._indoorMgr.getData()},showIndoor:function(e,T){if(this.map&&this.map.parking){this.map.parking.currentUid=e;this.map.parking.currentFloor=T}var i=new fS("onindoor_status_changed");i.uid=e;i.floor=T;this.fire(i)},addAreaSpot:function(e,T){if(!e||e.length===0){return}T=T||{};this.areaSpots=this.areaSpots||{};var i=T.id||("sp"+(this.temp.spotsGuid++));this.areaSpots[i]={spot:e,userData:T.userData};var kv=this;hh.load("hotspot",function(){kv._asyncRegister()});return i},getAreaSpot:function(e){if(this.areaSpots&&this.areaSpots[e]){return this.areaSpots[e]}return null},removeAreaSpot:function(e){if(!e||!this.areaSpots[e]){return}delete this.areaSpots[e]},clearAreaSpots:function(){this.areaSpots={}},resetSpotStatus:function(){this.fire(new fS("onspot_status_reset"))},hightlightSpotByUid:function(e,T){var i=new fS("onspot_highlight");i.uid=e;i.tilePosStr=T;this.fire(i)},setZoomIn:function(i,e){e=e||{};this.zoomTo(i,e.zoomCenter||null,e)},restrictBounds:function(e){if(e instanceof ie){this.config.restrictBounds=e;this.restrictCenter(this.getCenterIn());this.fire(new fS("oncenter_changed"))}},getCurrentMaxTilt:function(){var e=this.zoomLevel;if(this.mapType==="B_EARTH_MAP"){return h0.MAX_DRAG_TILT_L2}if(this.config.restrictCenter===false){return h0.MAX_DRAG_TILT}if(e>=19){return h0.MAX_DRAG_TILT}else{if(e<=18){if(e<this._enableTiltZoom){if(e>=this._enableTiltZoom-2){return(1-(this._enableTiltZoom-e)/2)*h0.MAX_DRAG_TILT_L2}return 0}return h0.MAX_DRAG_TILT_L2}else{return(h0.MAX_DRAG_TILT-h0.MAX_DRAG_TILT_L2)*(e-18)+h0.MAX_DRAG_TILT_L2}}},worldSize:function(i){var e=i||this.zoomLevel;return h0.WORLD_SIZE_MC/this.getZoomUnits(e)},setTrafficOn:function(e){if(e&&Number(e)>1){jW.setZIndex(Number(e))}hL.sendMessage(aZ(4,3,3),["layer","traffic"]);this.addTileLayer(jW)},setTrafficOff:function(){this.removeTileLayer(jW)},showOverlayContainer:function(){this.setDisplayOptions({overlay:true})},hideOverlayContainer:function(){this.setDisplayOptions({overlay:false})},addLabelsToMapTile:function(ky,kx){hL.sendMessage(aZ(4,1,4),["instance","custom_label"]);for(var kv=0;kv<ky.length;kv++){if(typeof ky[kv].type==="undefined"){ky[kv].type="fixed"}if(typeof ky[kv].rank!=="number"){ky[kv].rank=50000}ky[kv].pt=ky[kv].position;ky[kv].custom=true;ky[kv].processedInZoom=0;var T=false;for(var e=0;e<this._customTileLabels.length;e++){if(this._customTileLabels[e].uid===ky[kv].uid){T=true;break}}if(!T){this._customTileLabels.push(ky[kv])}}var kw=new fS("onadd_tile_labels");if(kx&&kx instanceof eh){kw.data=ky;kw.index=kx.layer.drawIndex;kw.model="mvt"}this.dispatchEvent(kw)},removeLabelsFromMapTile:function(kw,kv,T){var ky=new fS("onremove_tile_labels");if(kv&&T){ky.data=kw;ky.index=kv;ky.model=T}else{for(var kx=0;kx<kw.length;kx++){for(var e=0;e<this._customTileLabels.length;e++){if(this._customTileLabels[e].uid===kw[kx]){this._customTileLabels.splice(e,1);break}}}}this.dispatchEvent(ky)},clearLabels:function(T,i){var e=new fS("onclear_labels");if(T&&i){e.data=[];e.index=T;e.model=i}else{this._customTileLabels.length=0}this.dispatchEvent(e)},loadMapStyleFiles:function(kx,e){this.customLoaded=false;var T=this.config.style;var kw=this.config.styleUrl;var kv=this;this._setTextRenderType();if(typeof T==="string"&&!kw){if(bD["FeatureStyle"+T]){this.customLoaded=true;kv.fire(new fS("onstyle_loaded"));kx();return}bD["FeatureStyle"+T]=window.FeatureStyle;bD["iconSetInfo"+T]=window.iconSetInfo_high;bD.indoorStyle=window.indoorStyle;gZ.load(C.getMapStyleFiles(T),function(){if(kv.config.style===T){bD["FeatureStyle"+T]=window.FeatureStyle;bD["iconSetInfo"+T]=window.iconSetInfo_high;bD.indoorStyle=window.indoorStyle;kv.customLoaded=true;kv.fire(new fS("onstyle_loaded"));kx()}})}else{hL.sendMessage(aZ(4,1,2),["instance","custom_style"]);var i=T;u.init(kv);u.getStyleJson(i,function(kz){var kF=eW;var kH=bD.getGUID("custom");var kE=kv.config.mapStyleId||0;delete bD["customStyleInfo_"+kE];delete bD["FeatureStyle"+kE];kv.config.mapStyleId=kH;var kC={};e6.extend(kC,kz);var kA=Math.floor(kv.getZoom());var kD;window["styleCbk_"+kH]=function(kI,kJ){if(kJ!==kD||!bD["customStyleInfo_"+kH]){return}if(typeof kI==="string"){kI=JSON.parse(kI)}u.onStyleDataBack(kI,kA,kH,kC,kF,bD["customStyleInfo_"+kH]);kv.customLoaded=true;kv.fire(new fS("onstyle_loaded"));kx()};bD["customStyleInfo_"+kH]={zoomRegion:{},zoomStyleBody:[],zoomFrontStyle:{}};var kG=u.getStyleUrl(kz,kF,"styleCbk_"+kH,kA,e,bD["customStyleInfo_"+kH]);var ky=kG.split("?")[0];kD=kG.split("?")[1];if(kw){ky=kw;kD=ky.split("?")[1]}if(!bD.iconSetInfoCustom){var kB=C.getMapStyleFiles("default");if(kv.config.showCustomIndoor){kB.splice(1,1)}else{kB.splice(1,2)}gZ.load(kB,function(){bD.iconSetInfoCustom=window.iconSetInfo_high;bD.indoorStyle=window.indoorStyle;if(ky.indexOf("jsonp")>"-1"){gZ.load(ky)}else{if(bD["customStyleInfo_"+kH]){bD["customStyleInfo_"+kH].xhr=im.post(ky,kD,window["styleCbk_"+kH],function(){kv.fire(new fS("onstyle_loaded_error"))},function(){kv.fire(new fS("onstyle_loaded_timeout"))})}}})}else{if(ky.indexOf("jsonp")>"-1"){gZ.load(ky)}else{if(bD["customStyleInfo_"+kH]){bD["customStyleInfo_"+kH].xhr=im.post(ky,kD,window["styleCbk_"+kH],function(){kv.fire(new fS("onstyle_loaded_error"))},function(){kv.fire(new fS("onstyle_loaded_timeout"))})}}}})}},getFeatureStyleTags:function(){var e=[];var kw=Object.keys(bD);for(var kv=0;kv<kw.length;kv++){var T=kw[kv];if(T.indexOf("FeatureStyle")>-1&&bD[T]){e.push(T)}}return e},setCopyrightOffset:function(kv,i){var T=new fS("oncopyrightoffsetchange",{logo:kv,cpy:i});this.dispatchEvent(T)},_setTextRenderType:function(e){if(e){this.config.textRenderType=e;return}if(this.config.textRenderType!==null){return}if(b2()){this.config.textRenderType="canvas"}else{if(typeof this.config.style==="string"){this.config.textRenderType="image"}else{this.config.textRenderType="canvas"}}},destroy:function(){this._destroyed=true;this.disableAutoResize();this.fire(new fS("ondestroy"));var e=this.config.mapStyleId||0;delete bD["customStyleInfo_"+e];delete bD["FeatureStyle"+e];bD.BMAP_INSTANCES&&(bD.BMAP_INSTANCES-=1);if(!bD.BMAP_INSTANCES){this.destroyStyle()}this.config={};this.clearSpots();this._webGLStateId&&d1.WebGLState.remove(this._webGLStateId);this.container.onselectstart=null;this.container.style.backgroundImage="";this.maskLayer=null;this.platform=null;hL.kill();ja.kill();var i=this;setTimeout(function(){i._listeners=null;i._bounds=null;i.tileLabels=[];i._overlayMgrGL=null;i._overlayMgr=null;i._mapIcon=null;if(i._mouse){i._mouse._drag=null;i._mouse=null}i.deepZoom=null;i.tileMgr=null;i.indexToRgb=null;i.toFormatCoords=null;i._webglMapCamera=null;i._normalLayerMgr=null;i._webglPainter=null;i._webglMapScene=null;i._indoorMgr=null;if(i._renderType==="webgl"){i._spotsMgr=null;i._workerMgr=null;i.jobScheduler=null;i.benchmark=null;i._featureMgr=null;i._labelProcessor=null;i._customLabelMgr=null}if(i.cpyCtrl){i.cpyCtrl._map=null;i.cpyCtrl=null}i.logoCtrl=null;i._spotDataOnCanvas=null;i._navigationCtrl=null;i.container.innerHTML="";if(!bD.BMAP_INSTANCES){window.FeatureStyle=null;window.iconSetInfo_high=null;window.indoorStyle=null;window._indoorMgr=null}},600)},destroyStyle:function(){var e=[];var kw=Object.keys(bD);for(var kv=0;kv<kw.length;kv++){var T=kw[kv];if(T.indexOf("FeatureStyle")>-1||T.indexOf("iconSetInfo")>-1||T.indexOf("indoorStyle")>-1){e.push(T)}}for(var kv=0;kv<e.length;kv++){delete bD[e[kv]]}},centerAndZoom:function(e,ky,T){if(Object.prototype.toString.call(ky)!=="[object Undefined]"){ky=parseInt(ky,10)}if(typeof e==="string"){var kv=this;var kx=new bl();kx.getPoint(e,function(kz){e=kz;var kA=jr.convertLL2MC(e);kv.centerAndZoomIn(kA,ky,T)},e)}else{if(this.config.coordType===BMAP_COORD_GCJ02){var kw=iL(e,3);var i=jr.convertLL2MC(kw)}else{var i=jr.convertLL2MC(e)}this.centerAndZoomIn(i,ky,T)}},pointToPixel:function(e,T){var i=jr.convertLL2MC(e);var kv={};e6.extend(kv,T);if(kv&&kv.center){kv.center=jr.convertLL2MC(kv.center)}return this.pointToPixelIn(i,kv)},pixelToPoint:function(T,i){var kv={};e6.extend(kv,i);if(kv&&kv.center){kv.center=jr.convertLL2MC(kv.center)}var e=this.pixelToPointIn(T,kv);return jr.convertMC2LL(e)},pointToOverlayPixel:function(e,T){var i=jr.convertLL2MC(e);var kv={};e6.extend(kv,T);if(kv&&kv.center){kv.center=jr.convertLL2MC(kv.center)}return this.pointToOverlayPixelIn(i,kv)},overlayPixelToPoint:function(T,i){var kv={};e6.extend(kv,i);if(kv&&kv.center){kv.center=jr.convertLL2MC(kv.center)}var e=this.overlayPixelToPointIn(T,kv);return jr.convertMC2LL(e)},setViewport:function(T,kv){var e;if(T&&T.center){e={};e6.extend(e,T);e.center=jr.convertLL2MC(e.center)}else{e=[];for(var kw=0;kw<T.length;kw++){e[kw]=jr.convertLL2MC(T[kw])}}this.setViewportIn(e,kv)},getViewport:function(kx,kv){var T;if(kx&&kx.length){T=[];for(var kw=0;kw<kx.length;kw++){T[kw]=jr.convertLL2MC(kx[kw])}}else{if(kx instanceof ie){T=new ie(jr.convertLL2MC(kx.getSouthWest()),jr.convertLL2MC(kx.getNorthEast()));T.setMinMax()}}var e=this.getViewportIn(T,kv);e.center=jr.convertMC2LL(e.center);return e},getDistance:function(kw,T){var i=jr.convertLL2MC(kw);var kv=jr.convertLL2MC(T);var e=this.getDistanceIn(i,kv);return e},setCenter:function(e,T){if(typeof e==="string"){var kv=this;var kx=new bl();kx.getPoint(e,function(ky){e=ky;var kz=jr.convertLL2MC(e);kv.setCenterIn(kz,T)},e)}else{if(this.config.coordType===BMAP_COORD_GCJ02){var kw=iL(e,3);var i=jr.convertLL2MC(kw)}else{var i=jr.convertLL2MC(e)}this.setCenterIn(i,T)}},setZoom:function(T,e){var i={};e6.extend(i,e);if(i&&i.zoomCenter){i.zoomCenter=jr.convertLL2MC(i.zoomCenter)}this.setZoomIn(T,i)},flyTo:function(e,kw,T){if(this.config.coordType===BMAP_COORD_GCJ02){var kv=iL(e,3);var i=jr.convertLL2MC(kv)}else{var i=jr.convertLL2MC(e)}this.flyToIn(i,kw,T)},panTo:function(e,T){var i=jr.convertLL2MC(e);this.panToIn(i,T)},getCenter:function(){var e=this.getCenterIn();if(this.config.coordType===BMAP_COORD_GCJ02){var i=jr.convertMC2LL(e);return eP(i)}return jr.convertMC2LL(e)},getBounds:function(){var e=this.getBoundsIn();var i=new ie(jr.convertMC2LL(e.getSouthWest()),jr.convertMC2LL(e.getNorthEast()));return i},setMapStyleV2:function(e){if(typeof e==="string"){this._setTextRenderType("image")}else{this._setTextRenderType("canvas")}this.setOptions({style:e})},startViewAnimation:function(T){var e=T._options.delay;var i=this;setTimeout(function(){T._start(i)},e)},pauseViewAnimation:function(e){e._pause(this)},continueViewAnimation:function(e){e._continue(this)},cancelViewAnimation:function(e){e._cancel(this)},getMapScreenshot:function(){return this._webglMapScene._painter._canvas.toDataURL()},setCustomArea:function(i){this.fire(new fS("onstyle_willchange"));this.areaCustomLoaded=false;var T=i.style;var kv=this;u.getStyleJson(T,function(kx){var kC=eW;var kE=bD.getGUID("customArea");kv.config.areaStyleId=kE;var kA={};e6.extend(kA,kx);var ky=Math.floor(kv.getZoom());var kB;window["styleCbk_"+kE]=function(kG,kH){if(kH!==kB||!bD["customStyleInfo_"+kE]){return}if(typeof kG==="string"){kG=JSON.parse(kG)}u.onStyleDataBack(kG,ky,kE,kA,kC,bD["customStyleInfo_"+kE]);kv.areaCustomLoaded=true;kv.fire(new fS("onstyle_loaded"));var kF=new fS("onlayer_update");kF.name="na";kv.fire(kF)};bD["customStyleInfo_"+kE]={zoomRegion:{},zoomStyleBody:[],zoomFrontStyle:{}};var kD=u.getStyleUrl(kx,kC,"styleCbk_"+kE,ky,"",bD["customStyleInfo_"+kE]);var kw=kD.split("?")[0];kB=kD.split("?")[1];var kz=C.getMapStyleFiles("default");if(kw.indexOf("jsonp")>"-1"){gZ.load(kw)}else{bD["customStyleInfo_"+kE].xhr=im.post(kw,kB,window["styleCbk_"+kE])}});var e={};if(i.area){e.area=i.area.map(function(kw){return jr.convertLL2MC(kw)})}e.customArea=true;this._workerMgr.setWorkerConfig(e)}});window.BMAP_NORMAL_MAP="B_NORMAL_MAP";window.BMAPGL_NORMAL_MAP="B_NORMAL_MAP";window.BMAP_SATELLITE_MAP="B_SATELLITE_MAP";window.BMAP_HYBRID_MAP="B_STREET_MAP";window.BMAP_EARTH_MAP="B_EARTH_MAP";window.BMAP_NONE_MAP="B_NONE_MAP";window.BMAP_COORD_MERCATOR=1;window.BMAP_COORD_GCJ02=2;window.BMAP_SYS_DRAWER=0;window.BMAP_SVG_DRAWER=1;window.BMAP_VML_DRAWER=2;window.BMAP_CANVAS_DRAWER=3;var u={environment:"jsapi",map:null,ontilesloaded:false,onstyle_loaded:false,init:function(i){var e=this;e.map=i;this.changeCopyright();this.setEnvironment(e.map.config.style);this.resetEventListener()},resetEventListener:function(){var e=this;this.ontilesloaded=false;this.onstyle_loaded=false;e.map.addEventListener("ontilesloaded",e.checkLoadedStatus);e.map.addEventListener("onstyle_loaded",e.checkLoadedStatus)},checkLoadedStatus:function(i){u[i.type]=true;if(u.ontilesloaded&&u.onstyle_loaded){this.dispatchEvent(new fS("onstylechangetilesloaded"));this.removeEventListener("ontilesloaded",u.checkLoadedStatus);this.removeEventListener("onstyle_loaded",u.checkLoadedStatus)}},changeCopyright:function(){var e=this;if(e.map.cpyCtrl){e.map.cpyCtrl.hide();if(e.environment!=="customEditor"){e.map.setCopyrightOffset(new ji(1,1))}}else{e.map.addEventListener("oncopyrightaddend",function(){e.map.cpyCtrl.hide();if(e.environment!=="customEditor"){e.map.setCopyrightOffset(new ji(1,1))}})}},setEnvironment:function(e){if(e.customEditor){this.environment="customEditor";a0.map=this.map}else{if(e.sharing){this.environment="sharing"}else{if(e.preview){this.environment="preview"}else{this.environment="jsapi"}}}},getStyleJson:function(kv,kx){var kw=this;if(kv.styleJson){kx&&kx(kv.styleJson)}else{if(kv.styleId){var i=kv.styleId;var e=(Math.random()*100000).toFixed(0);bD["_cbk_si_phpui"+e]=function(kz){var ky=[];if(kz.result&&kz.result["error"]===0&&kz.content&&kz.content["status"]===0){ky=kw.parseJson(kz.content["data"]["json"]);kx&&kx(ky)}else{kx&&kx("default")}};bD["_cbk_si_api"+e]=function(kz){var ky=[];if(kz.status===0){if(kz.info){ky=kw.parseJson(kz.info["json"])}else{ky=kw.parseJson(kz.data["json"])}kx&&kx(ky)}else{kx&&kx("default")}};var T="";switch(this.environment){case"jsapi":T=eD.apiHost+"/?qt=custom_map&v=3.0&style_id="+i+"&type=publish&ak="+eW;T+="&callback="+fB+"._cbk_si_phpui"+e;break;case"sharing":T+="/apiconsole/custommap/getSharingJson";T+="?styleid="+i+"&type=edit";T+="&ck="+fB+"._cbk_si_api"+e;break;case"preview":T+="/apiconsole/custommap/getJson";T+="?styleid="+i+"&type=edit";T+="&ck="+fB+"._cbk_si_api"+e;break}gZ.load(T)}else{kx&&kx("default")}}},parseJson:function(T){if(T===null||T===""){return[]}var i={t:"featureType",e:"elementType",v:"visibility",c:"color",o:"opacity",l:"lightness",s:"saturation",w:"weight",z:"level",h:"hue",f:"fontsize",zri:"curZoomRegionId",zr:"curZoomRegion",i:"image"};var kw={all:"all",g:"geometry","g.f":"geometry.fill","g.s":"geometry.stroke",l:"labels","l.t.f":"labels.text.fill","l.t.s":"labels.text.stroke","l.t":"labels.text","l.i":"labels.icon","g.tf":"geometry.topfill","g.sf":"geometry.sidefill",t:"texture"};var kv=T.split(",");var e=kv.map(function(kA){var kz=kA.split("|").map(function(kG){var kE=i[kG.split(":")[0]];var kD=kw[kG.split(":")[1]]?kw[kG.split(":")[1]]:kG.slice(kG.indexOf(":")+1,kG.length);switch(kD){case"poi":kD="poilabel";break;case"districtlabel":kD="districtlabel";break}var kF={};kF[kE]=kD;return kF});var kx=kz[0];var kC=1;if(kz[1]["elementType"]){kC=2;e6.extend(kx,kz[1])}var kB={};for(var ky=kC;ky<kz.length;ky++){e6.extend(kB,kz[ky])}return e6.extend(kx,{stylers:kB})});return e},getStyleUrl:function(i,ky,kw,T,kv,kA){this.styleJson=i;var e=C.apiHost+"/custom/v2/mapstyle?version="+4+"&ak="+ky+"&qt=custom_v2&is_all=true&is_new=1&";var kz=this.styleJson2styleStringV2(i,T,kA);e+="styles="+encodeURIComponent(kz);if(kv&&kv.os&&kv.sv){e+="&os="+kv.os+"&sv="+kv.sv}var kx=new Date()["getTime"]();e+="&timeStamp="+kx;e+=jE()(e);return e},styleJson2styleStringV2:function(e,kD,kz){var kE={featureType:"t",elementType:"e",visibility:"v",color:"c",opacity:"o",lightness:"l",saturation:"s",weight:"w",level:"z",hue:"h",fontsize:"f",image:"i"};var kF={all:"all",geometry:"g","geometry.fill":"g.f","geometry.stroke":"g.s",labels:"l","labels.text.fill":"l.t.f","labels.text.stroke":"l.t.s","labels.text":"l.t","labels.icon":"l.i","geometry.topfill":"g.tf","geometry.sidefill":"g.sf",texture:"t"};var kG=[];for(var kv=this.map.getMinZoom();kv<=this.map.getMaxZoom();kv++){kz.zoomFrontStyle[kv]={}}kz.zoomFrontStyle.main={};var T=false;for(var kv=0;!!e[kv];kv++){var kC=e[kv];if(this.isOnlyZoomStyler(kC)){continue}kD=this.getFrontZoom(kC,kD);if((kC.featureType==="land"||kC.featureType==="all"||kC.featureType==="background")&&typeof kC.elementType==="string"&&(kC.elementType==="geometry"||kC.elementType==="texture"||kC.elementType==="geometry.fill"||kC.elementType==="all")&&kC.stylers&&!T){if(kC.stylers["color"]){kz.bmapLandColor=kC.stylers["color"]}if(kC.stylers["image"]){kz.bmapLandFillTexture=kC.stylers["image"]}if(kC.stylers["opacity"]){kz.bmapLandColor=kC.stylers["opacity"]}if(kC.stylers["visibility"]&&kC.stylers["visibility"]==="off"){kz.bmapLandColor="#00000000"}if(kC.featureType==="land"){T=true}}if(kC.featureType==="building"&&typeof kC.elementType==="string"&&kC.elementType==="geometry.fill"){kz.buildingFill=true}if(kC.featureType==="roadarrow"&&kC.elementType==="labels.icon"&&kC.stylers){var kA=kC.stylers["visibility"];kz.zoomFrontStyle[kD]["bmapRoadarrowVisibility"]=kA}var kw={};e6.extend(kw,kC);var ky=kw.stylers;delete kw.stylers;e6.extend(kw,ky);var kx=[];for(var kB in kE){if(kw[kB]){if(this.isEditorZoomKeys(kB)){continue}if(kB==="elementType"){kx.push(kE[kB]+":"+kF[kw[kB]])}else{switch(kw[kB]){case"poilabel":kw[kB]="poi";break;case"districtlabel":kw[kB]="label";break}kx.push(kE[kB]+":"+kw[kB])}}}if(kx.length>2){kG.push(kx.join("|"))}}return kG.join(",")},getFrontZoom:function(i,e){var T=i.stylers["level"];if(T===undefined){return"main"}else{return parseInt(T,10)}},isZoomConfig:function(e){var i=e.stylers["level"];if(i===undefined){return false}else{return true}},isOnlyZoomStyler:function(e){var i={};e6.extend(i,e.stylers);delete i.curZoomRegionId;delete i.curZoomRegion;delete i.level;if(e6.isEmptyObject(i)){return true}else{return false}},isSelectZoom:function(i,e){var T=i.stylers["level"];if(T===undefined){return true}else{if(T===e+""){return true}else{return false}}},isEditorZoomKeys:function(e){var i={curZoomRegionId:true,curZoomRegion:true};if(i[e]){return true}else{return false}},getZoomRegion:function(e,i){var kv=e.stylers["level"];var T={};e6.extend(T,i);if(kv===undefined){return T}else{T[parseInt(kv,10)]=true;return T}},onStyleDataBack:function(kw,e,i,kv,ky,T){if(kw.status!==0){return}if(kw.data.style.length===3){if(!T.baseFs){T.baseFs=kw.data.style}bD.StyleBody=kw.data.style[2]}else{bD.StyleBody=kw.data.style}var kx=T.baseFs;bD["FeatureStyle"+i]=kx;this.updateFrontFeatureStyle(T)},updateFrontFeatureStyle:function(T){if(T.zoomFrontStyle.main["bmapRoadarrowVisibility"]){for(var e=this.map.getMinZoom();e<=this.map.getMaxZoom();e++){if(!T.zoomFrontStyle[e]["bmapRoadarrowVisibility"]){T.zoomFrontStyle[e]["bmapRoadarrowVisibility"]=T.zoomFrontStyle.main["bmapRoadarrowVisibility"]}}}}};var a0={map:null,labelCache:{},calcDrawMc:function(T,i,e){var kv=[];switch(i){case"fill":kv=this.calcFill(T,e);break;case"line":break;case"building3d":kv=this.calcBuilding3d(T,e);break}return kv},calcFill:function(kw,T){var kx=[];for(var kv=0;kv<kw.length;kv=kv+5){var e=this.coordToMc({x:kw[kv],y:kw[kv+1]},T.row,T.col,T.mercatorSize,T.baseTileSize);kx.push(e[0],e[1])}return kx},calcLine:function(kw,T){var kx=[];var ky=new Int16Array(kw.buffer);for(var kv=0;kv<ky.length;kv=kv+10){var e=this.coordToMc({x:ky[kv]/10,y:ky[kv+1]/10},T.row,T.col,T.mercatorSize,T.baseTileSize);kx.push(e[0],e[1])}return kx},calcBuilding3d:function(kx,T){var ky=[];var kv={};for(var kw=0;kw<kx.length/2;kw=kw+7){if(kx[kw]===kx[kw-7]&&kx[kw+1]===kx[kw-6]){continue}if(kv[kx[kw].toString()+kx[kw+1].toString()]){continue}kv[kx[kw].toString()+kx[kw+1].toString()]=true;var e=this.coordToMc({x:kx[kw],y:kx[kw+1]},T.row,T.col,T.mercatorSize,T.baseTileSize);ky.push(e[0],e[1])}return ky},coordToMc:function(kw,kv,e,i,T){return[kw.x*(i/T)+e*i,kw.y*(i/T)+kv*i]},addDrawIntoAreaSpots:function(e,kw){if(u.environment!=="customEditor"){return}if(!kw.styleIds){return}for(var T=0;T<kw.styleIds.length;T++){var kz=0;if(T>0){kz=kw.verticesLength[T-1]}end=kw.verticesLength[T];var kx=[];var kv="";if(kw.vertex){kx=kw.vertex;kv="building3d"}else{if(kw.data[0]){kx=kw.data[0];kv=kw.type}else{continue}}var ky=this.calcDrawMc(kx.slice(kz,end),kv,e);this.map.addAreaSpot(ky,{userData:{styleId:kw.styleIds[T],type:"mapstyle"}})}},addLabelIntoAreaSpots:function(e){if(u.environment!=="customEditor"){return}for(var kw=0;kw<e.length;kw++){var kx=e[kw];for(var kv=0;kv<kx.fixedLabel.length;kv++){var T=kx.fixedLabel[kv];if(!T._mcBds){continue}var ky=[T._mcBds[0].lng,T._mcBds[0].lat,T._mcBds[0].lng,T._mcBds[1].lat,T._mcBds[1].lng,T._mcBds[1].lat,T._mcBds[1].lng,T._mcBds[0].lat];if(!this.labelCache[ky.join()]){this.labelCache[ky.join()]=true;this.map.addAreaSpot(ky,{userData:{styleId:T.styleId,type:"mapstyle",name:T.name}})}}}}};function cr(i,e,kv,T){this.cx=3*i;this.bx=3*(kv-i)-this.cx;this.ax=1-this.cx-this.bx;this.cy=3*e;this.by=3*(T-e)-this.cy;this.ay=1-this.cy-this.by;this.p1x=i;this.p1y=T;this.p2x=kv;this.p2y=T}cr.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e};cr.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e};cr.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx};cr.prototype.solveCurveX=function(e,kA){if(typeof kA==="undefined"){kA=0.000001}var kz;var ky;var kw;var T;var kv;for(kw=e,kv=0;kv<8;kv++){T=this.sampleCurveX(kw)-e;if(Math.abs(T)<kA){return kw}var kx=this.sampleCurveDerivativeX(kw);if(Math.abs(kx)<0.000001){break}kw=kw-T/kx}kz=0;ky=1;kw=e;if(kw<kz){return kz}if(kw>ky){return ky}while(kz<ky){T=this.sampleCurveX(kw);if(Math.abs(T-e)<kA){return kw}if(e>T){kz=kw}else{ky=kw}kw=(ky-kz)*0.5+kz}return kw};cr.prototype.solve=function(e,i){return this.sampleCurveY(this.solveCurveX(e,i))};var gN={};function fH(T){var e={duration:1000,fps:30,delay:0,transition:gN.linear,dropLastAnimation:false};if(T){for(var kv in T){e[kv]=T[kv]}}if(T.beginTime){this._beginTime=T.beginTime}this._callbacks=[];this._options=e;if(e.delay){var kw=this;setTimeout(function(){kw._doStart()},e.delay)}else{this._doStart()}this._pauseTime=0}fH.INFINITE="INFINITE";fH.prototype._doStart=function(){if(this._isPausing){var e=performance.now()||new Date().getTime();this._pauseTime+=e-this._isPausing;this._isPausing=undefined}if(window.requestAnimationFrame){var i=this;i._timer=window.requestAnimationFrame(function(T){i._loop(T)})}else{this._beginTime=new Date().getTime();if(this._options.duration===fH.INFINITE){this._endTime=null}else{this._endTime=this._beginTime+this._options.duration}this._loop()}};fH.prototype._loop=function(kv){var ky=this;kv=kv||new Date().getTime();kv=kv-this._pauseTime;if(!this._beginTime){this._beginTime=kv}if(!this._endTime&&typeof this._options.duration==="number"){this._endTime=this._beginTime+this._options.duration}if(ky._endTime!==null&&kv>=ky._endTime){if(ky._options.dropLastAnimation===false){ky._options.render(ky._options.transition(1),1,kv)}if(typeof ky._options.finish==="function"){ky._options.finish(kv,this)}for(var kx=0,e=ky._callbacks.length;kx<e;kx++){ky._callbacks[kx]()}return}var kw;if(typeof ky._options.duration==="number"){kw=(kv-ky._beginTime)/ky._options.duration;ky.schedule=ky._options.transition(kw)}else{kw=kv-ky._beginTime;ky.schedule=0}ky._options.render(ky.schedule,kw,kv);if(!ky.terminative){if(window.requestAnimationFrame){ky._timer=requestAnimationFrame(function T(i){ky._loop(i)})}else{ky._timer=setTimeout(function(){ky._loop()},1000/ky._options.fps)}}};fH.prototype.stop=function(i,e){this.terminative=true;if(this._timer){if(window.cancelAnimationFrame){cancelAnimationFrame(this._timer)}else{clearTimeout(this._timer)}this._timer=null;if(typeof this._options.onStop==="function"){this._options.onStop(e)}}if(i){this._endTime=this._beginTime;this._loop()}};fH.prototype.pause=function(){if(!this._isPausing){this.stop();this.terminative=undefined;this._isPausing=performance.now()||new Date().getTime()}};fH.prototype.cancel=function(){this.stop()};fH.prototype.append=function(e){this._callbacks.push(e);return this};gN={_p1:1,_p2:1*1.525,linear:function(e){return e},reverse:function(e){return 1-e},easeInQuad:function(e){return e*e},easeInCubic:function(e){return Math.pow(e,3)},easeInBiquad:function(e){return Math.pow(e,4)},easeInBack:function(e){return e*e*((gN._p1+1)*e-gN._p1)},easeOutQuad:function(e){return -(e*(e-2))},easeOutCubic:function(e){return Math.pow((e-1),3)+1},easeOutBiquad:function(e){return 1-Math.pow((e-1),4)},easeOutBack:function(e){return((e=e-1)*e*((gN._p1+1)*e+gN._p1)+1)},easeInOutQuad:function(e){if(e<0.5){return e*e*2}else{return -2*(e-2)*e-1}},easeInOutCubic:function(e){if(e<0.5){return Math.pow(e,3)*4}else{return Math.pow(e-1,3)*4+1}},easeInOutBiquad:function(e){if(e<0.5){return Math.pow(e,4)*8}else{return 1-(Math.pow(e-1,4)*8)}},easeInOutSine:function(e){return(1-Math.cos(Math.PI*e))/2}};gN.ease=(function(){var e=new cr(0.4,0,0.6,1);return function(i){return e.solve(i)}})();gN["ease-in"]=gN.easeInQuad;gN["ease-out"]=gN.easeOutQuad;var du={start:function(kB){var kv=kB.el;var e=kB.style;var i=kB.startValue;var ky=kB.endValue;var kw=kB.duration||1400;var kx=kB.transition||gN.linear;var kA=kB.callback;var kz=ky-i;var T=kB.unit||"";return new fH({fps:60,duration:kw,transition:kx,render:function(kC){kv.style[e]=i+kz*kC+T},finish:function(){kA&&kA()}})}};function q(kw,T){de.call(this);this.keyframes=kw;var e={duration:1000,delay:0,transition:gN.linear,interation:1};if(T){for(var kv in T){e[kv]=T[kv]}}this._options=e}q.inherits(de,"ViewAnimation");q.prototype._start=function(kx){var T=this;T.map=kx;var kw=new fS("onanimationstart");T.dispatchEvent(kw);this._initStatus(T.map);var kv=this._options.duration;var i=this._options.interation;var ky=this._options.transition;var kz=0;T.poiStatus=T.map._displayOptions.poi;if(T.poiStatus){T.map.setDisplayOptions({poi:false})}T.map.viewAnimationTime=new Date().getTime();this.animation=new fH({duration:kv,transition:ky,start:function(e){},render:function(kA,e){if(kA===0){T._initStatus(T.map)}else{T._setViewByRate(kA)}},finish:function(kB,kA){if(++kz<i||i==="INFINITE"){var kC=new fS("onanimationiterations");T.dispatchEvent(kC);delete kA._beginTime;delete kA._endTime;kA._doStart()}else{var kC=new fS("onanimationend");T.dispatchEvent(kC);delete T.map.viewAnimationTime;T.map.setDisplayOptions({poi:T.poiStatus})}}})};q.prototype._getTotalDuration=function(e,i){if(e===fH.INFINITE){return fH.INFINITE}else{return e*i}};q.prototype._initStatus=function(e){if(this.keyframes[0]){e.setCenter(this.keyframes[0].center,{noAnimation:true});e.setZoom(this.keyframes[0].zoom,{noAnimation:true});e.setTilt(this.keyframes[0].tilt,{noAnimation:true});e.setHeading(this.keyframes[0].heading,{noAnimation:true})}};q.prototype._setViewByRate=function(kv){for(var e=0;e<this.keyframes.length-1;e++){var kw=this.keyframes[e];var T=this.keyframes[e+1];if(kv>=kw.percentage&&kv<T.percentage){this.map.setHeading(this._getHeadingDelta(kw,T,kv),{noAnimation:true});this.map.setTilt(this._getTiltDelta(kw,T,kv),{noAnimation:true});this.map.setCenter(this._getCenterDelta(kw,T,kv),{noAnimation:true});this.map.setZoom(this._getZoomDelta(kw,T,kv),{noAnimation:true})}}};q.prototype._getHeadingDelta=function(T,i,e){var kw=(e-T.percentage)/(i.percentage-T.percentage);var kv=T.heading+(i.heading-T.heading)*kw;return kv};q.prototype._getTiltDelta=function(T,i,e){var kw=(e-T.percentage)/(i.percentage-T.percentage);var kv=T.tilt+(i.tilt-T.tilt)*kw;return kv};q.prototype._getCenterDelta=function(T,i,e){var kw=(e-T.percentage)/(i.percentage-T.percentage);var kv=T.center.add(i.center.sub(T.center).mult(kw));return kv};q.prototype._getZoomDelta=function(kv,T,i){var kw=(i-kv.percentage)/(T.percentage-kv.percentage);var e=kv.zoom+(T.zoom-kv.zoom)*kw;return e};q.prototype._pause=function(e){this.animation.pause()};q.prototype._continue=function(e){this.animation._doStart()};q.prototype._cancel=function(T){T.setDisplayOptions({poi:this.poiStatus});this.animation.cancel();delete T.viewAnimationTime;var i=new fS("onanimationcancel");this.dispatchEvent(i)};var cO=undefined;var fC={is64Bit:function(){if(/Windows/.test(navigator.userAgent)){if(/Win64; x64/.test(navigator.userAgent)){return true}else{if(/WOW64/.test(navigator.userAgent)){return true}else{return false}}}return true},isIOS112:function a8(e){return/11_2/.test(navigator.userAgent)},canUseWebAssembly:function(i){if(cO!==undefined){i&&i(cO);return}if(window.WebAssembly&&this.is64Bit()){if(window.disableWebAssembly===true){cO=false;i&&i(cO)}else{if(!cz()){cO=true;i&&i(cO)}else{if(this.isIOS112()){cO=false;i&&i(cO)}else{var e=new Uint8Array([0,97,115,109,1,0,0,0,1,133,128,128,128,0,1,96,0,1,127,3,130,128,128,128,0,1,0,4,132,128,128,128,0,1,112,0,0,5,131,128,128,128,0,1,0,1,6,129,128,128,128,0,0,7,145,128,128,128,0,2,6,109,101,109,111,114,121,2,0,4,109,97,105,110,0,0,10,138,128,128,128,0,1,132,128,128,128,0,0,65,42,11]);WebAssembly.instantiate(e).then(function(T){cO=true;i&&i(cO)},function(T){cO=false;i&&i(cO)})}}}}else{cO=false;i&&i(cO)}}};var aJ={};bD.Utils=aJ;function km(e){return e.style}function ih(i){if(e6.Browser.ie>0){i.unselectable="on";i.selectstart=function(){return false};i.onmousedown=function(T){T.preventDefault();return false}}else{var e=km(i);e.MozUserSelect="none";e.WebkitUserSelect="none";i.addEventListener("mousedown",function(T){T.preventDefault()},false)}}function aT(e){return e&&e.parentNode&&e.parentNode.nodeType!==11}function bP(i,e){i.insertAdjacentHTML("beforeEnd",e);return i.lastChild}function fX(T,i){var kv=document.createElement("div");kv.innerHTML=i;var e=kv.childNodes[0];return T.parentNode.insertBefore(e,T)}function aj(i){i=i||window.event;i.stopPropagation?i.stopPropagation():i.cancelBubble=true}function c(i){i=i||window.event;i.preventDefault?i.preventDefault():i.returnValue=false;return false}function hD(i){aj(i);return c(i)}function g6(){var e=document.documentElement;var i=document.body;if(e&&(e.scrollTop||e.scrollLeft)){return[e.scrollTop,e.scrollLeft]}else{if(i){return[i.scrollTop,i.scrollLeft]}else{return[0,0]}}}function iF(kw){if(!kw){return}kw.onload=kw.onerror=null;var T=kw.attributes,kv,e,kx;if(T){e=T.length;for(kv=0;kv<e;kv+=1){kx=T[kv].name;if(typeof kw[kx]==="function"){kw[kx]=null}}}T=kw.children;if(T){e=T.length;for(kv=0;kv<e;kv+=1){iF(kw.children[kv])}}}function f0(i,ky,kx){var kw=ky.lng-kx.lng;var kv=ky.lat-kx.lat;if(kw===0){return Math.abs(i.lng-ky.lng)}if(kv===0){return Math.abs(i.lat-ky.lat)}var T=kv/kw;var e=ky.lat-T*ky.lng;return Math.abs(T*i.lng-i.lat+e)/Math.sqrt(T*T+1)}function co(i,e){if(!i||!e){return}return Math.round(Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2)))}function eC(i,e){if(!i||!e){return 0}return Math.round(Math.sqrt(Math.pow(i.lng-e.lng,2)+Math.pow(i.lat-e.lat,2)))}function fR(kA,T,kw){var kx=(kw.lng-T.lng)*(kA.lng-T.lng)+(kw.lat-T.lat)*(kA.lat-T.lat);if(kx<=0){return eC(kA,T)}var e=(kw.lng-T.lng)*(kw.lng-T.lng)+(kw.lat-T.lat)*(kw.lat-T.lat);if(kx>=e){return eC(kA,kw)}var i=kx/e;var kz=T.lng+(kw.lng-T.lng)*i;var ky=T.lat+(kw.lat-T.lat)*i;const kv={lng:kz,lat:ky};return eC(kA,kv)}function fj(T,i){var e=Math.round((T.x+i.x)/2);var kv=Math.round((T.y+i.y)/2);return new fr(e,kv)}function jC(e,T){var i=[];T=T||function(kw){return kw};for(var kv in e){i.push(kv+"="+T(e[kv]))}return i.join("&")}function b3(T,i,kx){var ky=document.createElement(T);if(kx){ky=document.createElementNS(kx,T)}i=i||{};for(var kv in i){var kw={"for":"htmlFor","class":"cssClass"}[kv]||kv;if(kv==="style"){ky.style.cssText=i[kv];continue}if(kv==="class"){e6.ac(ky,i[kv]);continue}if(ky.setAttribute){ky.setAttribute(kw,i[kv])}else{try{ky[kw]=i[kv]}catch(ky){}}}return ky}function cn(e){if(e.currentStyle){return e.currentStyle}else{if(e.ownerDocument&&e.ownerDocument.defaultView){return e.ownerDocument.defaultView.getComputedStyle(e,null)}}}function bX(e){return typeof e==="function"}function go(e){return e===void 0}function jT(e,i){return Object.prototype.hasOwnProperty.call(e,i)}function g(kw,kx){if(go(kw.length)){for(var kv in kw){if(jT(kw,kv)){kx.call(null,kv,kw[kv])}}}else{var T=kw.length;if(T){for(var e=0;e<T;e++){kx.call(null,e,kw[e])}}}}function ar(i,e){if(!e){return i}g(e,function(T,kv){i[T]=kv});return i}var hl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function dr(kw){var T="";var kD;var kB;var kz="";var kC;var kA;var ky;var kx="";var kv=0;var e=/[^A-Za-z0-9+/=]/g;if(!kw||e.exec(kw)){return kw}kw=kw.replace(/[^A-Za-z0-9+/=]/g,"");do{kC=hl.indexOf(kw.charAt(kv++));kA=hl.indexOf(kw.charAt(kv++));ky=hl.indexOf(kw.charAt(kv++));kx=hl.indexOf(kw.charAt(kv++));kD=(kC<<2)|(kA>>4);kB=((kA&15)<<4)|(ky>>2);kz=((ky&3)<<6)|kx;T=T+String.fromCharCode(kD);if(ky!==64){T=T+String.fromCharCode(kB)}if(kx!==64){T=T+String.fromCharCode(kz)}kD=kB=kz="";kC=kA=ky=kx=""}while(kv<kw.length);return T}function jA(e){return btoa(encodeURIComponent(e))}function f7(e){return decodeURIComponent(atob(e))}(function(e){if(!e.Utils){e.Utils={}}var i=e.Utils;i.format=(function(){function T(ky,kx,kz){var kw=kz[+kx];return typeof(kw)==="function"?kw(kx):kw}function kv(ky,kx,kz){var kB=kx;var kC=[];var kw=kx.split(":");if(kw.length===2){kB=kw[0];kC.push(kw[1])}var kA=typeof(kz[kB]);if(kA==="function"){return kz[kB].apply(undefined,kC)}else{if(kA==="undefined"){return ky}else{return String(kz[kB])}}}return function(kw,kx){var kz=kx.splice?T:kv;var ky=kw.splice?kw.join(""):kw;return ky.replace(/{([a-zA-Z0-9_$:.]+)}/g,function(kB,kA){return kz(kB,kA,kx)})}})();i.ErrorMonitor=function(kv,T,kw){};fC.canUseWebAssembly(function(T){i.canUseWebAssembly=T})})(bD);function b2(){return(cz()||h8())}function cz(){var e=navigator.userAgent;if(e.indexOf("iPhone")>-1||e.indexOf("iPad")>-1){return true}return false}function h8(){var e=navigator.userAgent;if(e.indexOf("Android")>-1){return true}return false}function iS(e){return e*Math.PI/180}function fi(e){return e/Math.PI*180}function bH(e,kw){var kv=Math.pow(10,kw);if(typeof e==="number"){return Math.round(e*kv)/kv}for(var T=0;T<e.length;T++){e[T]=bH(e[T],kw)}return e}function ch(T,i,e){if(T<i){T=i}else{if(T>e){T=e}}return T}function en(e,i){while(e<0){e+=i}return e%i}function h5(i,e){return(i>=0&&e>=0)||(i<0&&e<0)}function M(i){if(i._gl){return i._gl}var e={alpha:true,antialias:false,failIfMajorPerformanceCaveat:false,preserveDrawingBuffer:false,stencil:false};var T=i.getContext("webgl",e)||i.getContext("experimental-webgl",e);i._gl=T;return T}function iP(kv,T){for(var e=0;e<T.length;e++){e6.on(kv,T[e],aj)}}function e0(i,T,e){T[e]=i.getUniformLocation(T,e)}function b5(kw,kx,e,T,i){var kv="";switch(i){case"mat4":kw.uniformMatrix4fv(kx[e],false,T);return;case"v3":kv="uniform3fv";break;case"f":kv="uniform1f";break;case"i":kv="uniform1i";break}if(kv===""){throw"error"}kw[kv](kx[e],T)}function hQ(kD,e){while(kD<0){kD+=360}kD=kD%360;var kv=e.width;var kC=e.height;var ky=kv;var T=kC;if(kD<90){var i=Math.sin(iS(kD))*kv;var kA=Math.sin(iS(kD))*kC;var kB=Math.cos(iS(kD))*kv;var kx=Math.cos(iS(kD))*kC;var ky=Math.ceil(kB+kA);var T=Math.ceil(i+kx)}else{if(kD<180){var kD=kD-90;var i=Math.sin(iS(kD))*kv;var kA=Math.sin(iS(kD))*kC;var kB=Math.cos(iS(kD))*kv;var kx=Math.cos(iS(kD))*kC;var ky=Math.ceil(i+kx);var T=Math.ceil(kB+kA)}else{if(kD<270){var kD=kD-180;var i=Math.sin(iS(kD))*kv;var kA=Math.sin(iS(kD))*kC;var kB=Math.cos(iS(kD))*kv;var kx=Math.cos(iS(kD))*kC;var ky=Math.ceil(kB+kA);var T=Math.ceil(i+kx)}else{var kD=kD-270;var i=Math.sin(iS(kD))*kv;var kA=Math.sin(iS(kD))*kC;var kB=Math.cos(iS(kD))*kv;var kx=Math.cos(iS(kD))*kC;var ky=Math.ceil(i+kx);var T=Math.ceil(kB+kA)}}}var kz=ky-kv;var kw=T-kC;return[0-kz/2,0-kw/2,kv+kz/2,kC+kw/2]}function cg(e){if(e.toDataURL()===cg._blankData){return true}return false}function W(kw,kv,T){var i=[T.lng-kw.lng,T.lat-kw.lat];var e=[kv.lng-kw.lng,kv.lat-kw.lat];return i[0]*e[1]-i[1]*e[0]}function jf(kx,kw,T){var e;var ky;var kv;var i;if(kx.lng<kw.lng){e=kx.lng;kv=kw.lng}else{e=kw.lng;kv=kx.lng}if(kx.lat<kw.lat){ky=kx.lat;i=kw.lat}else{ky=kw.lat;i=kx.lat}if(T.lng<e||T.lng>kv||T.lat<ky||T.lat>i){return false}return true}function jq(kz,ky,kx,kv){var kw=W(kx,kv,kz);var T=W(kx,kv,ky);var i=W(kz,ky,kx);var e=W(kz,ky,kv);if(kw*T<0&&i*e<0){return true}else{if(kw===0&&jf(kx,kv,kz)){return true}else{if(T===0&&jf(kx,kv,ky)){return true}else{if(i===0&&jf(kz,ky,kx)){return true}else{if(e===0&&jf(kz,ky,kv)){return true}else{return false}}}}}}function hT(T,i){var e=i.parentNode;if(e.lastChild===i){e.appendChild(T)}else{e.insertBefore(T,i.nextSibling)}}function dZ(kB,kC){if(kC===0){return kB}var kA=0;var ky=0;if(!kB){throw"异常"}if(kB.length===0){return[]}for(var kw=1,T=kB.length-1;kw<T;kw++){var kz=f0(kB[kw],kB[0],kB[kB.length-1]);if(kz>kA){ky=kw;kA=kz}}var e=[];if(kA>=kC){var kE=kB.slice(0,ky);var kD=kB.slice(ky,kB.length);var kx=dZ(kE,kC);var kv=dZ(kD,kC);for(var kw=0,T=kx.length;kw<T;kw++){e.push(kx[kw])}for(var kw=0,T=kv.length;kw<T;kw++){e.push(kv[kw])}}else{e.push(kB[0]);e.push(kB[kB.length-1])}return e}function p(e){if(Math.log2){return Math.log2(e)}return Math.log(e)/Math.LN2}function di(T,i,e){return Math.min(e,Math.max(i,T))}function aq(e,i){if(!i){return e}var kx=i[0];var kw=i[1];var kv=i[2];var T=i[3];var kz=[];var ky=[];kz[0]=T*e[0]+kv*e[2];kz[1]=e[1];kz[2]=-kv*e[0]+T*e[2];ky[0]=kz[0];ky[1]=kw*kz[1]-kx*kz[2];ky[2]=kx*kz[1]+kw*kz[2];return ky}var n=Math.PI/180;var gY=180/Math.PI;function fE(T){var i=(T-Date.UTC(2000,0,1,12))/86400000/36525;var e=(d3.utcDay.floor(T)-T)/86400000*360-180;return[e-fu(i)*gY,d6(i)*gY]}function fu(kv){var kw=bu(kv);var i=ee(kv);var T=iN(kv);var kx=Math.tan(iM(kv)/2);kx*=kx;return kx*Math.sin(2*T)-2*kw*Math.sin(i)+4*kw*kx*Math.sin(i)*Math.cos(2*T)-0.5*kx*kx*Math.sin(4*T)-1.25*kw*kw*Math.sin(2*i)}function d6(e){return Math.asin(Math.sin(iM(e))*Math.sin(bz(e)))}function bz(e){return kg(e)-(0.00569+0.00478*Math.sin((125.04-1934.136*e)*n))*n}function kg(e){return iN(e)+jv(e)}function ee(e){return(357.52911+e*(35999.05029-0.0001537*e))*n}function iN(i){var e=(280.46646+i*(36000.76983+i*0.0003032))%360;return(e<0?e+360:e)/180*Math.PI}function jv(i){var e=ee(i);return(Math.sin(e)*(1.914602-i*(0.004817+0.000014*i))+Math.sin(e+e)*(0.019993-0.000101*i)+Math.sin(e+e+e)*0.000289)*n}function iM(e){return dA(e)+0.00256*Math.cos((125.04-1934.136*e)*n)*n}function dA(e){return(23+(26+(21.448-e*(46.815+e*(0.00059-e*0.001813)))/60)/60)*n}function bu(e){return 0.016708634-e*(0.000042037+1.267e-7*e)}function gp(){return window.devicePixelRatio||1}function iZ(T){var i;var e;var kv;if(T>=0){kv=Math.floor(T/65536)*65536;i=kv;e=T-kv}else{kv=Math.floor(-T/65536)*65536;i=-kv;e=T+kv}return[i,e]}function cK(e){if(e.lng>=0&&e.lat>=0){return new cD(e.lng-10000000,e.lat-6000000)}if(e.lng>=0&&e.lat<0){return new cD(e.lng-10000000,e.lat+6000000)}if(e.lng<0&&e.lat>=0){return new cD(e.lng+10000000,e.lat-6000000)}if(e.lng<0&&e.lat<0){return new cD(e.lng+10000000,e.lat+6000000)}}var it=null;if(window.performance&&window.performance.now){it=function(){return performance.now()}}else{if(Date.now){it=function(){return Date.now()}}else{it=function(){return(new Date).getTime()}}}function h4(kv,e,i){var T="mouseWheel";if(e6.Platform.macintosh){if(!isNaN(kv)&&(kv<10||kv!==120)&&(e%1===0&&e<5)){T="padScroll"}if(e6.Browser.firefox&&(e%1===0&&e<5&&i===0)){T="padScroll"}}if(e6.Browser.safari&&kv===12){T="mouseWheel"}return T}function bQ(kE,kz){var kD=kE[0];var kC=kE[1];var kv=false;for(var ky=0,kx=kz.length-2;ky<kz.length;ky+=2){var kB=kz[ky];var kw=kz[ky+1];var kA=kz[kx];var T=kz[kx+1];var e=((kw>kC)!==(T>kC))&&(kD<(kA-kB)*(kC-kw)/(T-kw)+kB);if(e){kv=!kv}kx=ky}return kv}function au(kw,ky){ky=ky||[];var e=ky.length;var T=0;var kx=false;for(var kv=0;kv<e;kv++){T=(kv===e-1)?0:T+1;if((ky[kv].lat!==ky[T].lat)&&(((kw.lat>=ky[kv].lat)&&(kw.lat<ky[T].lat))||((kw.lat>=ky[T].lat)&&(kw.lat<ky[kv].lat)))&&(kw.lng<(ky[T].lng-ky[kv].lng)*(kw.lat-ky[kv].lat)/(ky[T].lat-ky[kv].lat)+ky[kv].lng)){kx=!kx}}return kx}function dX(T,e,i,kv){kv=kv||0.4;if(T>i){T=Math.pow(T-i+1,kv)+i-1}else{if(T<e){T=e-Math.pow(e-T+1,kv)+1}}return T}function e2(kz){var kx="";for(var T=0;T<kz.length;T++){var kA=kz.charCodeAt(T)<<1;var e=kA.toString(2);var kw=e.length;var kD=e;if(kw<8){kD="00000000"+e;kD=kD.substr(e.length,8)}kx+=kD}var kB=5-kx.length%5;var kv=[];for(var T=0;T<kB;T++){kv[T]="0"}kx=kv.join("")+kx;var kC=[];for(var T=0;T<kx.length/5;T++){var kA=kx.substr(T*5,5);var ky=parseInt(kA,2)+50;kC.push(String.fromCharCode(ky))}return kC.join("")+kB.toString()}function j6(T,i){var e=bD.TILE_VERSION||window.TILE_VERSION;if(!e||!e[T]||!e[T][i]||!e[T][i].version||!e[T][i].updateDate){e=C.tvc}return{ver:e[T][i].version,udt:e[T][i].updateDate}}function bE(){var e=bD.MSV||window.MSV;if(!e||!e.mapstyle||!e.mapstyle.updateDate||!e.mapstyle.version){e=C.msv}return{ver:e.mapstyle.version,udt:e.mapstyle.updateDate}}function dF(e,kw){var kv=e.slice(0);for(var T=0;T<kv.length;T++){kv[T]+=kw}return kv}var hf=null;function hv(e){if(hf){return}e.fire(new fS("onloadtile"));hf=setTimeout(function(){hf=null},1000)}function aM(){if(E("//map.baidu.com")||E("//maps.baidu.com")||E("//ditu.baidu.com")){return true}return false}aJ.inMapHost=aM();if(typeof window._inMapHost==="boolean"){aJ.inMapHost=window._inMapHost}function E(i){var T=window.location;var e=document.createElement("a");e.href=i;return e.hostname===T.hostname&&e.port===T.port&&e.protocol===T.protocol}var d5=[72.685732,0.193351,136.10888,54.392257];var e5=[72.6892532,0.1939743381,136.1168614,54.392257];var t=[72.69566833,0.1999420909,136.1232863,54.39791217];var iO=158;var dt=[98.789081,122.948721,107.857301,118.082148,119.126627,128.021934,79.939914,99.021873,119.912937,122.084572,127.906381,130.933385,106.496057,108.066113,119.818772,126.367919,111.789929,119.311401,100.742164,102.220151,99.853589,100.781289,97.522631,98.834615,99.092638,99.892947,122.905967,123.761867,123.716213,125.494726,123.723977,124.755034,125.475833,126.398284,125.471687,126.065118,130.817003,133.605851,127.900156,128.656536,128.646633,129.625389,132.88057,134.104549,117.365548,119.230813,116.073074,117.416898,114.406274,116.123791,116.479038,119.591534,110.566812,111.851324,74.465162,79.993155,82.858046,91.345214,85.71485,98.969834,127.651377,129.532029,129.462275,130.209769,133.716214,134.731053,134.366834,135.103133,130.854579,131.32966,115.499125,117.530421,115.765224,116.734157,108.524336,110.601747,121.351282,124.612037,126.151954,127.332751,91.273562,95.604179,79.87318,82.935667,76.413314,78.336484,78.275229,79.993668,83.956612,85.725267,85.500637,89.346601,97.990127,98.94176,106.641956,108.599215,111.386259,111.810312,111.578597,111.803167,115.99273,117.010413,116.24461,116.675246,119.422198,119.909078,120.646056,121.38098,120.335038,120.662183,124.579855,125.773243,126.207803,126.774849,95.565331,102.037736,95.576121,96.158028,95.556699,97.799055,91.296205,93.348146,93.321994,94.690522,89.339313,90.540241,82.263039,82.882528,78.335615,80.023512,76.623947,78.352608,73.495149,74.48155,74.846872,76.479412,91.560058,94.871116,88.759515,89.235995,83.237883,83.965264,82.292123,83.246813,81.876477,83.253307,80.75212,81.463265,86.463409,88.267232,102.199623,104.225963,112.153727,116.823265,108.965663,113.021145,111.166575,117.972799];var ds=[22.548416,42.276971,17.227969,22.7346,41.292761,50.741667,30.365133,42.324913,21.701924,22.69335,42.4176,48.936335,21.429059,22.648399,50.650499,52.914825,42.20449,45.199078,21.13391,22.568612,21.441033,22.583349,23.73862,25.298628,22.00409,22.563095,38.97849,41.338631,40.287973,41.330108,39.732801,40.343252,40.966852,41.323446,40.719312,41.05937,44.869472,48.009884,41.336325,42.443362,42.008104,42.434713,45.873151,48.205746,45.132322,46.784582,45.133383,46.392803,45.148771,45.740273,47.478161,50.064393,42.216229,43.461282,37.014302,40.662281,42.219985,47.31417,27.726965,30.466651,48.911271,49.642488,48.831706,49.434487,46.941762,48.37425,47.651781,48.463782,42.851964,44.905396,47.598273,48.438467,48.409141,48.901651,42.22756,42.906402,52.821047,53.578094,50.701837,51.654278,42.292419,44.392214,42.295918,45.385017,34.680866,37.027803,30.743515,37.066586,28.245649,30.406053,47.270872,48.497371,25.238932,27.778469,42.215754,42.540416,43.427677,44.689208,44.685587,44.994131,48.878657,49.318659,49.281099,49.624515,50.710468,51.306809,52.90717,53.331981,52.903016,53.107959,52.900867,53.250033,51.638073,52.400678,42.229657,42.691928,43.061242,43.891083,42.663095,43.074222,44.37174,45.180155,44.375135,44.974219,47.3035,48.053221,45.352401,46.807875,40.563053,42.040289,40.581871,41.405172,38.516328,40.178756,35.790476,37.02337,26.825605,27.761303,27.197399,27.74932,29.147561,30.37813,29.570893,30.062042,30.045026,30.380952,29.998038,30.385203,48.487385,49.16832,22.395733,22.598229,7.441114,11.501436,3.767491,9.000793,12.642067,17.406563];var cd=[98.795985,122.960792,107.867379,118.093451,119.139658,128.035888,79.948212,99.029524,119.923388,122.094977,127.918527,130.94789,106.50606,108.076783,119.8329,126.382207,111.803567,119.324928,100.749858,102.227985,99.860885,100.788921,97.529435,98.841564,99.100017,99.90035,122.917416,123.774367,123.728314,125.507211,123.736065,124.767299,125.488463,126.410675,125.484326,126.07764,130.830784,133.620042,127.912178,128.668957,128.658937,129.638599,132.894179,134.119086,117.379378,119.244569,116.086736,117.431212,114.420233,116.137458,116.492775,119.605527,110.579401,111.86488,74.468228,80.001908,82.867432,91.353788,85.721075,98.976964,127.664757,129.546833,129.476893,130.22449,133.730358,134.745235,134.381034,135.1178,130.868117,131.34409,115.513245,117.544751,115.779271,116.748045,108.536254,110.614326,121.365534,124.626434,126.165992,127.347013,91.281869,95.611754,79.879648,82.945041,76.413314,78.345207,78.275229,80.002329,83.956612,85.734098,85.510186,89.356499,97.997001,98.948845,106.653208,108.610811,111.400183,111.824179,111.592224,111.817136,116.00682,117.024631,116.258574,116.689291,119.436876,119.922961,120.659806,121.395479,120.349116,120.676014,124.59389,125.787788,126.221756,126.788962,95.572955,102.046581,95.583772,96.165551,95.564318,97.806095,91.30446,93.356438,93.330319,94.698145,89.349129,90.548677,82.268802,82.892025,78.335615,80.032266,76.625755,78.361413,73.498248,74.490992,74.846872,76.488771,91.563521,94.878444,88.768214,89.244787,83.247076,83.974127,82.29595,83.256003,81.885315,83.26249,80.760619,81.472404,86.470983,88.276988,102.207537,104.234614,112.164795,116.833667,108.965663,113.032246,111.166575,117.983363];var cb=[22.551183,42.284787,17.227969,22.738314,41.300981,50.749638,30.368087,42.332701,21.705055,22.696452,42.426047,48.944674,21.432184,22.651387,50.657409,52.92296,42.212192,45.206905,21.137031,22.57186,21.444502,22.586566,23.741571,25.301472,22.006806,22.56637,38.985114,41.346531,40.295617,41.338581,39.740021,40.351012,40.974644,41.331562,40.726852,41.067192,44.877158,48.018285,41.344597,42.451798,42.016305,42.443235,45.880906,48.214001,45.140027,46.792775,45.141083,46.400433,45.156418,45.748281,47.485889,50.071879,42.223667,43.469487,37.019867,40.668675,42.226823,47.321605,27.72944,30.469853,48.919002,49.650614,48.840188,49.443166,46.949801,48.382798,47.660603,48.472692,42.859946,44.913298,47.605896,48.445914,48.41698,48.909667,42.23507,42.914193,52.8281,53.585952,50.709311,51.662219,42.29968,44.399225,42.302746,45.391958,34.680866,37.03377,30.743515,37.07228,28.245649,30.408935,47.277693,48.504255,25.241528,27.780726,42.223363,42.548418,43.435888,44.696952,44.693193,45.00187,48.886267,49.326755,49.288642,49.632304,50.717486,51.314369,52.914204,53.33964,52.910094,53.115926,52.908382,53.258095,51.64533,52.408305,42.236825,42.699126,43.068466,43.898632,42.670403,43.082219,44.379045,45.187742,44.382336,44.981379,47.310362,48.06019,45.359099,46.814439,40.569751,42.047741,40.587956,41.41263,38.519192,40.185033,35.790476,37.029005,26.825605,27.763896,27.199658,27.751649,29.150192,30.381073,29.573886,30.065162,30.047775,30.384089,30.001277,30.388525,48.494118,49.173841,22.398528,22.601198,7.441114,11.505968,3.767491,9.005209,12.642067,17.410886];var ae=95;var c8=[110.3961374,105.0743788,96.8991824,95.61810411,93.82412598,91.3892353,91.38931858,89.08325955,87.22469808,86.26278402,85.17353,85.23741211,82.86627441,81.90481038,79.59687147,80.39829237,79.93319363,77.80279948,75.2557704,73.49357829,73.1892532,73.87758816,74.4064738,74.10215224,75.46409695,76.77739692,78.28299615,78.15499485,78.37920654,78.89145345,79.69282199,81.19938178,81.80830295,83.89093424,85.94149523,87.86447266,89.03414958,90.05918132,91.10026937,92.15733832,93.74361735,95.82597331,97.95655545,97.12363037,98.2129739,99.2068571,101.6587874,102.5239084,102.2356106,105.0249238,106.0992342,107.8617093,111.6439372,109.591869,112.284586,117.7961157,118.9495128,114.2076584,118.693565,123.1475225,122.730705,120.9361393,123.4207441,122.3787782,122.1385425,121.5904281,121.1773763,120.6805404,120.2483355,122.795807,122.8759077,121.3060262,122.1392177,123.7418799,126.4177599,128.5647409,129.7194884,131.2259136,131.9950494,133.6289931,135.6168614,131.3875545,130.8743365,128.6303223,126.0997773,124.4015375,122.22161,119.6586483,119.7866827,118.5685878,116.5177976,114.819101,119.0812964,116.453265,111.7431171];var c6=[43.2190351,42.38053385,43.17417589,44.42226915,45.09863634,45.56708116,47.33599718,48.68832709,49.62448486,48.9482175,48.4800472,47.33564399,47.43948676,46.03452067,45.20221788,43.34563043,42.32965739,41.39690972,40.82972331,39.95567654,39.25892877,38.36098768,38.05441569,37.16878445,36.38899414,35.36126817,34.30953451,32.58503879,31.56975694,30.77800266,30.43559814,29.7744892,30.0931977,28.71103299,27.70739665,27.5775472,27.01096137,27.77857883,27.50707954,26.50328315,26.70387804,27.95548557,27.29428901,23.64685493,23.62310601,21.67493381,20.77751465,21.32070991,22.1824113,22.31232964,22.51316054,16.80037679,13.19749864,0.6939743381,1.541660428,10.50208252,15.58926975,17.89090007,19.94928467,22.18490153,25.37285292,25.61456434,30.62532552,31.08099284,31.89238173,32.50092692,32.80325765,34.25546956,35.15486138,36.90170139,37.8348272,37.941604,38.6480797,38.96797201,40.98146918,41.25573296,42.07218153,42.49132813,44.65259766,44.69330702,48.62286865,48.09383952,49.19628499,50.03402317,53.27678901,53.62976345,53.89420546,52.98933322,52.01872884,50.23210259,50.18807048,47.49769857,47.34362712,46.50502143,45.24770128];var eN=[98.7895,122.954182,107.860913,118.087007,119.133165,128.029533,79.941749,99.023087,119.916883,122.08841,127.912143,130.941471,106.499502,108.070244,119.826245,126.375818,111.797006,119.318387,100.743285,102.221517,99.854448,100.782445,97.522928,98.835028,99.093518,99.893783,122.910927,123.767769,123.721954,125.50077,123.729657,124.760724,125.481902,126.404079,125.477737,126.071019,130.824331,133.613395,127.905767,128.662524,128.652527,129.6321,132.887552,134.11249,117.37297,119.237999,116.080154,117.424589,114.413586,116.130948,116.486264,119.598927,110.5728,111.858437,74.465162,79.995337,82.860821,91.347291,85.716024,98.970481,127.658331,129.540202,129.470528,130.21808,133.723748,134.738785,134.374555,135.111443,130.861475,131.337438,115.506627,117.538123,115.772783,116.741632,108.529656,110.60782,121.358945,124.619773,126.159424,127.340582,91.275275,95.605228,79.874427,82.938601,76.413314,78.338763,78.275229,79.995765,83.956612,85.727511,85.503554,89.349858,97.990418,98.942257,106.646704,108.604437,111.393667,111.817723,111.585811,111.810645,116.000232,117.018216,116.252108,116.682705,119.430384,119.916417,120.653168,121.38883,120.342727,120.669383,124.587426,125.781376,126.215282,126.782323,95.566367,102.040026,95.577158,96.159009,95.557772,97.799728,91.298032,93.350057,93.323794,94.691771,89.342471,90.542019,82.264229,82.885485,78.335615,80.025844,76.623947,78.355027,73.495149,74.484473,74.846872,76.482208,91.560117,94.871859,88.761692,89.23822,83.240549,83.967602,82.292367,83.2495,81.878825,83.256003,80.75421,81.465955,86.465421,88.270356,102.201019,104.228033,112.158282,116.827153,108.965663,113.025767,111.166575,117.97687];var eM=[22.545421,42.279053,17.226272,22.731982,41.294917,50.743316,30.361986,42.326603,21.699185,22.690751,42.419757,48.938435,21.426505,22.64567,50.651745,52.916705,42.20641,45.201064,21.131326,22.565685,21.438288,22.580379,23.735785,25.295582,22.001087,22.560315,38.979333,41.340757,40.28938,41.332289,39.734164,40.344718,40.968803,41.325813,40.721073,41.061503,44.871533,48.012179,41.338366,42.445601,42.010343,42.436934,45.875217,48.208327,45.134237,46.786509,45.135376,46.394665,45.150734,45.742257,47.480099,50.065931,42.217982,43.46329,37.014057,40.662848,42.221079,47.315558,27.723432,30.46385,48.913298,49.644555,48.83396,49.436824,46.944059,48.376613,47.654503,48.466331,42.854333,44.907682,47.600253,48.440245,48.410926,48.903468,42.229292,42.908294,52.822466,53.58012,50.703491,51.656037,42.29378,44.393379,42.296912,45.385809,34.679282,37.027699,30.740622,37.066377,28.241967,30.403134,47.271949,48.49848,25.235818,27.774976,42.217425,42.542102,43.429763,44.691016,44.687044,44.995758,48.880431,49.320551,49.282865,49.626267,50.711607,51.308382,52.908547,53.333963,52.904419,53.109706,52.902338,53.251938,51.639701,52.402205,42.231045,42.693581,43.062756,43.892771,42.664519,43.075927,44.372942,45.1815,44.376327,44.975476,47.304623,48.054453,45.353174,46.808493,40.563653,42.041556,40.582164,41.4064,38.51618,40.179105,35.789745,37.023144,26.825402,27.757641,27.193806,27.745766,29.144229,30.375186,29.567889,30.059102,30.041938,30.378006,29.995047,30.382338,48.48834,49.169021,22.392816,22.595333,7.439914,11.500161,3.766676,9.000793,12.640512,17.406563];var fQ=3000;var g5=0.00002;var g4=0.000003;var jc=0.0174532925194;var hW=0.0065;var hV=0.006;var dO=40000;var fD=0;var jw=1;var az=2;var ij=3;var fw=4;var hz=1e-10;var iU=6370996.81;var fU=100000000;function hI(T,kw,i,kv){var e=arguments.length;this.ll={};this.ru={};if(e===0){}else{if(e===4){this.normalize(T,kw,i,kv)}}}hI.prototype.contains=function(e){if(e.lng>this.ll.lng&&e.lng<this.ru.lng&&e.lat>this.ll.lat&&e.lat<this.ru.lat){return ij}if(Math.abs(e.lng-this.ll.lng)<hz||Math.abs(e.lng-this.ru.lng)<hz||Math.abs(e.lat-this.ll.lat)<hz||Math.abs(e.y-this.ru.lat)>hz){return az}return fD};hI.prototype.normalize=function(i,kv,e,T){if(i>e){this.ll.lng=e;this.ru.lng=i}else{this.ll.lng=i;this.ru.lng=e}if(kv>T){this.ll.lat=T;this.ru.lat=kv}else{this.ll.lat=kv;this.ru.lat=T}};function eE(i,kv,e,T){this.sp={lng:i,lat:kv};this.ep={lng:e,lat:T};this.mbr=new hI(i,kv,e,T)}function iv(kv,e,kx,kw){for(var T=0;T<kw;T=T+2){if(kv.lng>=e[T]&&kv.lng<=e[T+1]&&kv.lat>=kx[T]&&kv.lat<=kx[T+1]){return true}}return false}function gv(kA){var i=kA.lng;var kz=kA.lat;var kv=Math.sqrt(i*i+kz*kz);var kx=Math.atan2(kz,i);var T=kv+gH(kz);var kw=kx+gG(i);var e=T*Math.cos(kw);var ky=T*Math.sin(kw);return{lng:e+hW,lat:ky+hV}}function a3(kA){var i=kA.lng-hW;var kz=kA.lat-hV;var kv=Math.sqrt(i*i+kz*kz);var kx=Math.atan2(kz,i);var T=kv-gH(kz);var kw=kx-gG(i);var e=T*Math.cos(kw);var ky=T*Math.sin(kw);return{lng:e,lat:ky}}function gH(e){return Math.sin(e*fQ*jc)*g5}function gG(e){return Math.cos(e*fQ*jc)*g4}function at(T,i,e){return((i.lng-T.lng)*(e.lat-T.lat)-(e.lng-T.lng)*(i.lat-T.lat))}function h1(i,e){return Math.abs(i-e)<=hz}function gO(kv,T){var i=kv.lat*jc;var kA=kv.lng*jc;var e=T.lat*jc;var kz=T.lng*jc;var kx=Math.cos(i)*Math.cos(e);var kw=Math.cos(kA)*Math.cos(kz);var kC=Math.sin(i)*Math.sin(e);var kB=Math.sin(kA)*Math.sin(kz);var kD=kx*kw+kx*kB+kC;if(kD<-1){kD=-1}else{if(kD>1){kD=1}}var ky=Math.acos(kD)*iU;return ky}function h(kz,ky){var i=kz.lat*jc;var e=ky.lat*jc;var kv=kz.lng*jc;var T=ky.lng*jc;var kx=i-e;var kw=kv-T;var kA=Math.sin(kx/2)*Math.sin(kx/2)+Math.cos(i)*Math.cos(e)*Math.sin(kw/2)*Math.sin(kw/2);return 2*Math.asin(Math.sqrt(kA))*iU}function gM(kA,T){var kC=bF(kA,T);var kB=180;var kz=90;var ky=-180;var kw=-90;var kx=T.sp;var kv=T.ep;kB=kx.lng<kv.lng?kx.lng:kv.lng;kz=kx.lat<kv.lat?kx.lat:kv.lat;ky=kx.lng<kv.lng?kx.lng:kv.lng;kw=kx.lat<kv.lat?kx.lat:kv.lat;if(kC.lng<=ky&&kC.lng>=kB&&kC.lng<=kw&&kC.lat>=kz){return gO(kA,kC)}else{var i=h(kA,T.sp);var e=h(kA,T.ep);return i<e?i:e}}function a4(i,e){}function bJ(i,kv,e,T){return Math.sqrt((i-e)*(i-e)+(kv-T)*(kv-T))}function bF(kG,ky){var kx=kG.lng;var kF=kG.lat;var kw=ky.sp.lng;var kE=ky.sp.lat;var T=ky.ep.lng;var kC=ky.ep.lat;var kD=kC-kE;var kB=kw-T;if(h1(kD,0)&&h1(kB,0)){return ky.sp}var kA=T*kE-kw*kC;var kz=kB*kx-kD*kF;var e=kD*kD-kB*kB;var kv=kB*kz-kD*kA;var i=kD*kz+kB*kA;return{lng:kv/e,lat:-i/e}}function bN(kv){var T=0;for(var e=0;e<ae;++e){if(c6[e]<=kv.lat){if(c6[(e+1)%ae]>kv.lat){if(at({lng:c8[e],lat:c6[e]},{lng:c8[(e+1)%ae],lat:c6[(e+1)%ae]},kv)>0){++T}}}else{if(c6[(e+1)%ae]<=kv.lat){if(at({lng:c8[e],lat:c6[e]},{lng:c8[(e+1)%ae],lat:c6[(e+1)%ae]},kv)<0){--T}}}}return T===0?fD:ij}function ka(kv){var ky={};if(kv.lng<e5[0]-0.4||kv.lat<e5[1]-0.4||kv.lng>e5[2]+0.4||kv.lat>e5[3]+0.4){ky.lng=kv.lng;ky.lat=kv.lat;return ky}else{if(iv(kv,eN,eM,iO)){ky=gv(kv);return ky}}var e=0;var kB=dO;var T=0;var kz=new hI();var kA=1;if(bN(kv)===fD){for(var kx=0;kx<ae;++kx){var kw=new eE(c8[kx],c6[kx],c8[(kx+1)%ae],c6[(kx+1)%ae]);kz.ll.lng=kw.mbr.ll.lng-0.5;kz.ll.lat=kw.mbr.ll.lat-0.5;kz.ru.lng=kw.mbr.ru.lng+0.5;kz.ru.lat=kw.mbr.ru.lat+0.5;if(kz.contains(kv)===fD){continue}T=gM(kv,kw);if(T<kB){kB=T}}if(kB<dO){e=(dO-kB)/dO;kA=2}}else{kA=3;e=1}var kC=gv(kv);ky={lng:kv.lng+(kC.lng-kv.lng)*e,lat:kv.lat+(kC.lat-kv.lat)*e};return ky}function e7(i){var T={};if(i.lng<t[0]-0.4||i.lat<t[1]-0.4||i.lng>t[2]+0.4||i.lat>t[3]+0.4){T.lng=i.lng;T.lat=i.lat;return T}else{if(iv(i,cd,cb,iO)){T=a3(i);return T}}var e=ka(i);if(i.lng===e.lng&&i.lat===e.lng){T.lng=i.lng;T.lat=i.lat;return T}return decryptPt1(i,ka)}function iL(i,e){if(e===3&&i instanceof cD){var T=ka(i);return new cD(T.lng,T.lat)}else{return i}}function eP(i,e){if(e===3&&i instanceof cD){var T=e7(i);return new cD(T.lng,T.lat)}else{if(e===5&&i instanceof cD){return new cD(i.lng,i.lat)}else{return i}}}function o(kx){if(!kx){kx={}}var ky=JSON.stringify(kx);var kw=0,T,kv,e;if(ky.length===0){return kw}for(T=0,e=ky.length;T<e;T++){kv=ky.charCodeAt(T);kw=((kw<<5)-kw)+kv;kw|=0}return kw}function c9(){var i=new Date().getTime();var e="xxxyxxxy".replace(/[xy]/g,function(kv){var T=(i+Math.random()*16)%16|0;i=Math.floor(i/16);return(kv=="x"?T:(T&3|8)).toString(16)});return e}function bf(e,i){return Math.atan2(i,e)*180/Math.PI}function dq(ky,T,i){var e=[],kx=[];e[0]=ky[0]-T[0];e[1]=ky[1]-T[1];kx[0]=i[0]-T[0];kx[1]=i[1]-T[1];var kw=e[0]*kx[0]+e[1]*kx[1];var kv=Math.sqrt((e[0]*e[0])+(e[1]*e[1]))*Math.sqrt(kx[0]*kx[0])+Math.sqrt(kx[1]*kx[1]);return Math.acos(kw/kv)/Math.PI*180}function g0(kz,T,i){var e=[],ky=[];e[0]=kz[0]-T[0];e[1]=kz[1]-T[1];ky[0]=i[0]-T[0];ky[1]=i[1]-T[1];var kw=e[0]*ky[1]-e[1]*ky[0];var kx=e[0]*ky[0]+e[1]*ky[1];var kv=Math.atan2(kw,kx);return kv*180/Math.PI}var b6=0;function ge(){return b6++}function bm(i,kx){var T=i.toLowerCase();var kv=T.lastIndexOf("?");var e=T.lastIndexOf("#");var kw=Math.max(kv,e);if(kw===-1){return i+"?"+kx}return i+"&"+kx}function aZ(i,e,T,kv){return(i||0)<<24|(e||0)<<16|(T||0)<<8|(kv||0)}function gC(kw){if(kw instanceof Array&&kw.length>=3){var kv=kw[0]||0;var T=kw[1]||0;var e=kw[2]||0;var i=kw[3]||1}else{var kv=(kw)&255;var T=(kw>>8)&255;var e=(kw>>16)&255;var i=(kw>>24)&255}if(!kw){return 0}return kv+T*256+e*65536-1}function jE(){var T=function(kJ,kI){var kH={"\x6c\x78\x61\x78\x78":"\x78\x65\x61","\x61\x65\x65\x6d\x78":"\x61\x65\x61\x69","\x64\x64\x61\x78\x6d":function(kR,kQ){return kR(kQ)},"\x68\x6d\x61\x65\x61":"\x64\x61\x65","\x78\x65\x64\x65\x63":"\x6d\x64\x61","\x63\x61\x61\x78\x61":function(kR,kQ){return kR+kQ},"\x63\x61\x61\x68\x69":function(kR,kQ){return kR(kQ)},"\x6c\x61\x65\x78\x6d":function(kS,kR,kQ){return kS(kR,kQ)},"\x78\x69\x61\x61\x63":function(kQ,kR){return kQ(kR)},"\x65\x6d\x6c\x69\x65":function(kR,kQ){return kR(kQ)},"\x68\x6c\x65\x61\x61":function(kR,kQ){return kR+kQ},"\x64\x63\x61\x61\x68":function(kR,kQ){return kR(kQ)},"\x69\x61\x6d\x6c\x6d":function(kR,kQ){return kR<kQ}};var kG="\x31\x2e\x31\x2e\x32";function kF(kS,kR){var kQ=kH["\x6c\x78\x61\x78\x78"];while(kQ!==kH["\x61\x65\x65\x6d\x78"]){switch(kQ){case"\x61\x69\x6c":return kT;case"\x6d\x64\x61":for(var kW=0;kW<kU;kW++){var kV=kH["\x64\x64\x61\x78\x6d"](kR,kS[kW]);kT["\x70\x75\x73\x68"](kV)}kQ="\x61\x69\x6c";break;case"\x78\x65\x61":var kU=kS["\x6c\x65\x6e\x67\x74\x68"];kQ=kH["\x68\x6d\x61\x65\x61"];break;case kH["\x68\x6d\x61\x65\x61"]:var kT=[];kQ=kH["\x78\x65\x64\x65\x63"];break}}}var kE,kD,kC,kB,kA,kz=decodeURIComponent,ky="\x43\x68\x61\x72",kx="";var kw=[T];kE="\x64\x65";kD="\x66\x72";kC="\x6f";kA=kH["\x63\x61\x61\x78\x61"](kD+kC,"\x6d");kB=kH["\x68\x6c\x65\x61\x61"]("\x43\x6f",kE);var kv=function(kQ){return kH["\x63\x61\x61\x78\x61"](kQ,kx)["\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72"][kA+ky+kB](kQ)};var kP=function(kQ){var kR={"\x65\x61\x6c\x68\x69":function(kT,kS){return kH["\x63\x61\x61\x68\x69"](kT,kS)}};return kH["\x6c\x61\x65\x78\x6d"](kF,kQ,function(kS){return kR["\x65\x61\x6c\x68\x69"](kv,kS)})};var kL=kP["\x63\x61\x6c\x6c"](kv,[39,34,37,96,60,120,97,65,98,66,99,67,100,68,101,69,102,70,103,110,109,111,112,48,49,50,51,52,53,54,55,56,57]);var kK=kF([28782,27702,26416,25167,24183],function(kQ){return kH["\x78\x69\x61\x61\x63"](kz,kQ)});var kO=kP["\x63\x61\x6c\x6c"](kK,[22354,22749,24415,23346,22257,22688,24306,25174,23595,25547,22984,25690,22212,27547,21594,27210,23090,29193,22394,29368,29532,29459,29530,24146,24500,26352,27441,28788,29370,27673,26925,25249,24430]),kN={};kK=kH["\x64\x63\x61\x61\x68"](kP,kK);var kM=new RegExp(kK["\x6a\x6f\x69\x6e"]("\x7c"));for(var kE=0;kH["\x69\x61\x6d\x6c\x6d"](kE,kL["\x6c\x65\x6e\x67\x74\x68"]);kE++){kN[kO[kE]]=kL[kE]}kI=kH["\x6c\x61\x65\x78\x6d"](kF,kI["\x73\x70\x6c\x69\x74"](kx),function(kQ){return kN[kQ]||kQ})["\x6a\x6f\x69\x6e"](kx);return kF(kI["\x73\x70\x6c\x69\x74"](kM),function(kQ){return kH["\x65\x6d\x6c\x69\x65"](kz,kQ)})}(this,"\x6c\u545a\u72b8\u577a\x74\x68\u624f\u545a\u735c\u5ef2\u735c\u545a\u6c36\x69\u5ef2\u545a\u545a\u58a0\u5e77\u56c4\u58a0\u59c8\x6c\x69\u6c36\u545a\u56c4\u58a0\u59c8\u545a\u6c36\u56c4\u56c4\u545a\u545a\u59c8\u5e77\x73\x75\u5c2b\x73\x74\x72\u624f\u59c8\u58a0\u56c4\u5ef2\u735c\u624f\x69\u72b8\u56c4\u545a\u58a0\x4f\u5a32\u6c36\x68\u58a0\u545a\u545a\u735c\u5e77\u58a0\x6c\u545a\x6c\x6c\u5e77\x68\u5ef2\u5ef2\u6c36\u735c\u545a\u735c\u6730\x48\u5e52\u6256\u5f6e\x50\u62a1\x50\u692d\x59\u6c19\u6256\u63cb\x51\x4f\u5e52\u706e\u59c8\x69\x6c\u6c36\x6c\u58a0\u59c8\u706e\u545a\u5ef2\u5ef2\u624f\u7209\u72ba\x4c\u66f0\x4f\u6c19\x52\u6c19\u6256\u6b9b\u62a1\u5f6e\u5f6e\u5e52\x4f\u5e77\u56c4\x6c\u545a\u56c4\x69\u6730\u59c8\u545a\u545a\u545a\u706e\u545a\u58a0\x6c\u5ef2\u735c\u6730\u5f5f\u66f0\u6c19\x73\x69\u577a\u72b8\u5f5f\u6b31\u6b9b\u6730\x73\x75\u5c2b\x73\x74\x72\x69\u72b8\u577a\u706e\u5ef2\u58a0\u545a\x6c\u56c4");(function(kx,kw){var kv=function(ky){while(--ky){kx.push(kx.shift())}};kv(++kw)}(T,491));var i=function(kx,kw){kx=kx-0;var kv=T[kx];return kv};function e(kA){var kz={"\x64\x6c\x65\x64\x69":function(kD,kC){return kD!==kC},"\x65\x78\x6c\x61\x6d":i("0x0"),"\x61\x78\x65\x6c\x64":function(kC,kD){return kC-kD},"\x65\x6d\x61\x6d\x65":i("0x1"),"\x69\x61\x65\x65\x78":i("0x2"),"\x64\x78\x63\x6c\x69":i("0x3"),"\x65\x64\x78\x63\x65":i("0x4"),"\x64\x68\x63\x6d\x68":function(kD,kC){return kD(kC)},"\x64\x64\x65\x65\x63":function(kD,kC){return kD(kC)},"\x63\x78\x64\x61\x6d":function(kD,kC){return kD+kC},"\x68\x78\x65\x65\x6d":i("0x5"),"\x78\x6c\x65\x6c\x6c":i("0x6")};var ky=i("0x5");while(kz[i("0x7")](ky,i("0x8"))){switch(ky){case kz[i("0x9")]:return i("0xa")+kw[i("0xb")](kz[i("0xc")](kw[i("0xd")],12));case kz[i("0xe")]:var kx=kz[i("0xf")];ky=kz[i("0x10")];break;case kz[i("0x11")]:var kw=kz["\x64\x68\x63\x6d\x68"](md5,kz[i("0x12")](md5,kv+kB)+kx);ky=kz[i("0x9")];break;case kz[i("0x10")]:var kv=kA[i("0x13")](kz[i("0x14")](kA[i("0x15")]("\x3f"),1));ky=i("0x4");break;case kz[i("0x16")]:var kB=kz[i("0x17")];ky=kz["\x65\x6d\x61\x6d\x65"];break}}}return e}function hh(){}e6.extend(hh,{Request:{INITIAL:-1,WAITING:0,LOADED:1,COMPLETED:2},Dependency:{poly:["marker"],layer:["poly"],hotspot:["poly"],infowindow:["marker","hotspot"],simpleInfowindow:["marker"],tools:["marker","poly"],mapgl:["glcommon","poly"],earth:["glcommon"],control:["scommon"],scommon:[],localSearch:["scommon"],otherSearch:["scommon"],route:["scommon"],buslineSearch:["route"],autocomplete:["scommon"],mvtParse:["marker","poly","style"]},MD5Mapping:{control:"sgafz1",marker:"ktcmiz",poly:"rd4ih0",layer:"$layer$",infowindow:"gxomm2",simpleInfowindow:"oawexl",hotspot:"4ybstq",menu:"viex51",tools:"4yddyf",oppc:"1ags0k",oppcgl:"xfofyf",mapgl:"uqcfc1",markeranimation:"owb1qj",earth:"5mlqpj",glcommon:"uacdxs",localSearch:"14drem",scommon:"kxxkao",otherSearch:"xgqjlb",route:"1p4zd5",buslineSearch:"sg3kxy",autocomplete:"yk5bsy",style:"wbxj5a",mvtParse:"snqzld"},Config:{baseUrl:C.apiHost+"/getmodules?v=1.0&type=webgl",jsModPath:(aJ.inMapHost?"":C.mapHost)+"/res/newui/",timeout:5000},delayFlag:false,Module:{modules:{},modulesNeedToLoad:[]},_getMd5ModsStr:function(kx){var kw=[];for(var kz=0,T=kx.length;kz<T;kz++){var ky=kx[kz];var e=this.MD5Mapping[ky];var kv="$"+ky+"$";if(e!==kv){kw.push(ky+"_"+e)}}return kw.join(",")},load:function(i,kx,kv){var e=this.getModuleInfo(i);if(e.status===this.Request.COMPLETED){if(kv===true){kx()}}else{if(e.status===this.Request.INITIAL){this.combine(i);this.addToLoadQueue(i);var T=this;if(T.delayFlag===false){T.delayFlag=true;setTimeout(function(){var ky=T.Config.baseUrl+"&mod="+T._getMd5ModsStr(T.Module.modulesNeedToLoad);gZ.load(ky);T.Module.modulesNeedToLoad.length=0;T.delayFlag=false},1)}e.status=this.Request.WAITING;function kw(kA){var kz=T.getModuleInfo(i);if(kz.status!==T.Request.COMPLETED){if(window.map){var ky=new fS("onmod_timeout");ky.timeout=kA/1000;ky.moduleName=i;window.map.fire(ky)}}}setTimeout(kw,this.Config.timeout,this.Config.timeout);setTimeout(kw,this.Config.timeout*2,this.Config.timeout*2)}if(kx){e.callbacks.push(kx)}}},combine:function(e){if(e&&this.Dependency[e]){var kv=this.Dependency[e];for(var T=0;T<kv.length;T++){this.combine(kv[T]);if(!this.Module.modules[kv[T]]){this.addToLoadQueue(kv[T])}}}},addToLoadQueue:function(e){var i=this.getModuleInfo(e);if(i.status===this.Request.INITIAL){i.status=this.Request.WAITING;this.Module.modulesNeedToLoad.push(e)}},run:function(T,kv){var kz=this.getModuleInfo(T);var kC=this.Dependency[T];if(kC){for(var kx=0;kx<kC.length;kx++){var ky=this.getModuleInfo(kC[kx]);if(ky.status!==this.Request.COMPLETED){ky.modsNeedToRun.push({name:T,code:kv});return}}}try{eval(kv)}catch(kA){return}kz.status=this.Request.COMPLETED;for(var kx=0,kw=kz.callbacks.length;kx<kw;kx++){kz.callbacks[kx]()}kz.callbacks.length=0;for(kx=0;kx<kz.modsNeedToRun.length;kx++){var kB=kz.modsNeedToRun[kx];this.run(kB.name,kB.code)}kz.modsNeedToRun.length=0},getModuleInfo:function(i){var e;if(!this.Module.modules[i]){this.Module.modules[i]={status:this.Request.INITIAL,callbacks:[],modsNeedToRun:[]}}e=this.Module.modules[i];return e}});window._jsload=function(kw,kx){var i=hh.getModuleInfo(kw);i.status=hh.Request.LOADED;if(kx!==""){hh.run(kw,kx)}else{if(window.map){var e=new fS("ongetmodules_fail");e.moduleName=kw;window.map.fire(e)}var T=document.createElement("script");var kv=hh.MD5Mapping[kw];T.src=hh.Config.jsModPath+kw+"_"+kv+".js";document.getElementsByTagName("head")[0].appendChild(T)}};function c4(){this._timeData={}}var bB;if(typeof window!=="undefined"){bB=window}else{bB=self}c4.prototype.mark=function(e){this._timeData[e]=this._getTime()};c4.prototype.getMark=function(e){return this._timeData[e]};c4.prototype.getTime=function(i,e){return parseFloat((this._timeData[e]-this._timeData[i]).toFixed(2))};c4.prototype.print=function(){};c4.prototype.clear=function(){this._timeData={}};if(bB.performance&&bB.performance.now){c4.prototype._getTime=function(){return performance.now()}}else{c4.prototype._getTime=function(){return Date.now()}}!function(i,T){T(i.d3=i.d3||{})}(window,function(k8){function lq(lx,ly,T,lw){function e(i){return lx(i=new Date(+i)),i}return e.floor=e,e.ceil=function(i){return lx(i=new Date(i-1)),ly(i,1),lx(i),i},e.round=function(i){var lz=e(i),lA=e.ceil(i);return lA-i>i-lz?lz:lA},e.offset=function(i,lz){return ly(i=new Date(+i),null==lz?1:Math.floor(lz)),i},e.range=function(lA,i,lz){var lB=[];if(lA=e.ceil(lA),lz=null==lz?1:Math.floor(lz),!(i>lA&&lz>0)){return lB}do{lB.push(new Date(+lA))}while(ly(lA,lz),lx(lA),i>lA);return lB},e.filter=function(i){return lq(function(lz){for(;lx(lz),!i(lz);){lz.setTime(lz-1)}},function(lz,lA){for(;--lA>=0;){for(;ly(lz,1),!i(lz);){}}})},T&&(e.count=function(i,lz){return la.setTime(+i),le.setTime(+lz),lx(la),lx(le),Math.floor(T(la,le))},e.every=function(i){return i=Math.floor(i),isFinite(i)&&i>0?i>1?e.filter(lw?function(lz){return lw(lz)%i===0}:function(lz){return e.count(0,lz)%i===0}):e:null}),e}function lf(e){return lq(function(i){i.setDate(i.getDate()-(i.getDay()+7-e)%7),i.setHours(0,0,0,0)},function(i,T){i.setDate(i.getDate()+7*T)},function(i,T){return(T-i-(T.getTimezoneOffset()-i.getTimezoneOffset())*k9)/ln})}function k7(e){return lq(function(i){i.setUTCDate(i.getUTCDate()-(i.getUTCDay()+7-e)%7),i.setUTCHours(0,0,0,0)},function(i,T){i.setUTCDate(i.getUTCDate()+7*T)},function(i,T){return(T-i)/ln})}var la=new Date,le=new Date,ll=lq(function(){},function(i,T){i.setTime(+i+T)},function(i,T){return T-i});ll.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?lq(function(i){i.setTime(Math.floor(i/e)*e)},function(i,T){i.setTime(+i+T*e)},function(i,T){return(T-i)/e}):ll:null};var lu=ll.range,ls=1000,k9=60000,lp=3600000,lh=86400000,ln=604800000,kB=lq(function(e){e.setTime(Math.floor(e/ls)*ls)},function(i,T){i.setTime(+i+T*ls)},function(i,T){return(T-i)/ls},function(e){return e.getUTCSeconds()}),lr=kB.range,lg=lq(function(e){e.setTime(Math.floor(e/k9)*k9)},function(i,T){i.setTime(+i+T*k9)},function(i,T){return(T-i)/k9},function(e){return e.getMinutes()}),kJ=lg.range,k3=lq(function(i){var T=i.getTimezoneOffset()*k9%lp;0>T&&(T+=lp),i.setTime(Math.floor((+i-T)/lp)*lp+T)},function(i,T){i.setTime(+i+T*lp)},function(i,T){return(T-i)/lp},function(e){return e.getHours()}),lm=k3.range,kT=lq(function(e){e.setHours(0,0,0,0)},function(i,T){i.setDate(i.getDate()+T)},function(i,T){return(T-i-(T.getTimezoneOffset()-i.getTimezoneOffset())*k9)/lh},function(e){return e.getDate()-1}),kA=kT.range,kQ=lf(0),kS=lf(1),kw=lf(2),kO=lf(3),kD=lf(4),k6=lf(5),ld=lf(6),ky=kQ.range,k5=kS.range,kH=kw.range,k2=kO.range,li=kD.range,k4=k6.range,lt=ld.range,lk=lq(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(i,T){i.setMonth(i.getMonth()+T)},function(i,T){return T.getMonth()-i.getMonth()+12*(T.getFullYear()-i.getFullYear())},function(e){return e.getMonth()}),lv=lk.range,kN=lq(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(i,T){i.setFullYear(i.getFullYear()+T)},function(i,T){return T.getFullYear()-i.getFullYear()},function(e){return e.getFullYear()});kN.every=function(e){return isFinite(e=Math.floor(e))&&e>0?lq(function(i){i.setFullYear(Math.floor(i.getFullYear()/e)*e),i.setMonth(0,1),i.setHours(0,0,0,0)},function(i,T){i.setFullYear(i.getFullYear()+T*e)}):null};var kG=kN.range,lb=lq(function(e){e.setUTCSeconds(0,0)},function(i,T){i.setTime(+i+T*k9)},function(i,T){return(T-i)/k9},function(e){return e.getUTCMinutes()}),kV=lb.range,kU=lq(function(e){e.setUTCMinutes(0,0,0)},function(i,T){i.setTime(+i+T*lp)},function(i,T){return(T-i)/lp},function(e){return e.getUTCHours()}),kR=kU.range,kP=lq(function(e){e.setUTCHours(0,0,0,0)},function(i,T){i.setUTCDate(i.getUTCDate()+T)},function(i,T){return(T-i)/lh},function(e){return e.getUTCDate()-1}),kM=kP.range,kL=k7(0),kK=k7(1),kI=k7(2),kF=k7(3),kE=k7(4),kz=k7(5),kx=k7(6),kv=kL.range,k1=kK.range,lo=kI.range,lc=kF.range,lj=kE.range,k0=kz.range,kZ=kx.range,kY=lq(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(i,T){i.setUTCMonth(i.getUTCMonth()+T)},function(i,T){return T.getUTCMonth()-i.getUTCMonth()+12*(T.getUTCFullYear()-i.getUTCFullYear())},function(e){return e.getUTCMonth()}),kX=kY.range,kC=lq(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(i,T){i.setUTCFullYear(i.getUTCFullYear()+T)},function(i,T){return T.getUTCFullYear()-i.getUTCFullYear()},function(e){return e.getUTCFullYear()});kC.every=function(e){return isFinite(e=Math.floor(e))&&e>0?lq(function(i){i.setUTCFullYear(Math.floor(i.getUTCFullYear()/e)*e),i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)},function(i,T){i.setUTCFullYear(i.getUTCFullYear()+T*e)}):null};var kW=kC.range;k8.timeInterval=lq,k8.timeMillisecond=ll,k8.timeMilliseconds=lu,k8.utcMillisecond=ll,k8.utcMilliseconds=lu,k8.timeSecond=kB,k8.timeSeconds=lr,k8.utcSecond=kB,k8.utcSeconds=lr,k8.timeMinute=lg,k8.timeMinutes=kJ,k8.timeHour=k3,k8.timeHours=lm,k8.timeDay=kT,k8.timeDays=kA,k8.timeWeek=kQ,k8.timeWeeks=ky,k8.timeSunday=kQ,k8.timeSundays=ky,k8.timeMonday=kS,k8.timeMondays=k5,k8.timeTuesday=kw,k8.timeTuesdays=kH,k8.timeWednesday=kO,k8.timeWednesdays=k2,k8.timeThursday=kD,k8.timeThursdays=li,k8.timeFriday=k6,k8.timeFridays=k4,k8.timeSaturday=ld,k8.timeSaturdays=lt,k8.timeMonth=lk,k8.timeMonths=lv,k8.timeYear=kN,k8.timeYears=kG,k8.utcMinute=lb,k8.utcMinutes=kV,k8.utcHour=kU,k8.utcHours=kR,k8.utcDay=kP,k8.utcDays=kM,k8.utcWeek=kL,k8.utcWeeks=kv,k8.utcSunday=kL,k8.utcSundays=kv,k8.utcMonday=kK,k8.utcMondays=k1,k8.utcTuesday=kI,k8.utcTuesdays=lo,k8.utcWednesday=kF,k8.utcWednesdays=lc,k8.utcThursday=kE,k8.utcThursdays=lj,k8.utcFriday=kz,k8.utcFridays=k0,k8.utcSaturday=kx,k8.utcSaturdays=kZ,k8.utcMonth=kY,k8.utcMonths=kX,k8.utcYear=kC,k8.utcYears=kW,Object.defineProperty(k8,"__esModule",{value:!0})});function fg(e){this._elemType=e;this._objCollection={}}fg.prototype.get=function(){var i=null;for(var e in this._objCollection){if(this._objCollection[e]&&this._objCollection[e]._free===true){this._objCollection[e]._free=false;return this._objCollection[e]}}i=b3(this._elemType);e=bD.getGUID("obj_pool_");this._objCollection[e]=i;return i};fg.prototype.free=function(e){if(!e){return}e._free=true;if(e.tagName.toLowerCase()==="img"){e.src="";e.crossOrigin=null;e.onload=e.onerror=null}};fg.prototype.clear=function(){for(var e in this._objCollection){if(this._objCollection[e]&&this._objCollection[e].tagName.toLowerCase==="img"){this._objCollection[e].onload=this._objCollection[e].onerror=null}}this._objCollection={}};var im={get:function(i,kw,e,T){var kv=new XMLHttpRequest();kv.open("GET",i,true);kv.timeout=10000;kv.ontimeout=function(){T&&T()};kv.onreadystatechange=function(kx){if(this.readyState===4){if(this.status===200){kw&&kw(kv.responseText)}else{e&&e()}}};kv.send()},post:function(i,kx,kw,e,T){var kv=new XMLHttpRequest();kv.open("POST",i,true);kv.setRequestHeader("Content-type","application/x-www-form-urlencoded");kv.timeout=10000;kv.ontimeout=function(){T&&T()};kv.onreadystatechange=function(ky){if(this.readyState===4){if(this.status===200){kw&&kw(kv.responseText,kx)}else{e&&e()}}};kv.send(kx);return kv}};var gZ=(function(e){function i(kx,T,kw){if(kx.indexOf("v=")===-1){kx+="&v=gl"}var kv=b3("script",{src:kx,type:"text/javascript",charset:"utf-8"});if(kv.addEventListener){kv.addEventListener("load",function(kz){var ky=kz.target;ky.parentNode.removeChild(ky);T&&T()},false);kv.addEventListener("error",function(kz){if(kz){var ky=kz.target;ky&&ky.parentNode&&ky.parentNode.removeChild(ky)}kw&&kw(null)},false)}else{if(kv.attachEvent){kv.attachEvent("onreadystatechange",function(kz){var ky=window.event.srcElement;if(ky&&(ky.readyState==="loaded"||ky.readyState==="complete")){ky.parentNode.removeChild(ky)}T&&T()})}}e.getElementsByTagName("head")[0].appendChild(kv)}return{load:function(ky,T,kv){if(typeof ky==="string"){i(ky,T,kv)}else{if(ky.length>0){var kx=ky.length;for(var kw=0;kw<kx;kw++){i(ky[kw],function(){kx--;if(kx===0&&T){T()}})}}}}}})(window.document);function ig(){}ig.instances={};ig.getInstance=function(i,T){if(ig.instances[i]){return ig.instances[i]}var e=new kq(i,T);ig.instances[i]=e;return e};function kq(e,i){this._name=e;this._baseZoom=18;this._opts={tileSize:256};e6.extend(this._opts,i||{})}kq.mapZoomBaseIndex=[8,8,8,8,7,7,6,6,5,5,4,3,3,3,2,2,1,1,0,0,0,0,0,0,0,0];kq.baseScaleZoom=[19,17,15,12,10,9,7,5,3];kq.baseScaleZoomMercatorSize=[512,2048,4096,32768,65536,262144,1048576,4194304,8388608];kq.mapZoomBaseZoomMapping=[3,3,3,3,5,5,7,7,9,9,10,12,12,12,15,15,17,17,19,19,19,19,19,19,19,19];kq.mapZoomStartZoomMapping=[3,3,3,3,4,4,6,6,8,8,10,11,11,11,14,14,16,16,18,18,18,18,18,18,18,18];kq.baseScaleTileSize=[1024,1024,512,512,256,512,512,512,256];kq.mapZoomTileSize=[256,256,256,256,256,512,256,512,256,512,256,256,512,1024,256,512,512,1024,512,1024,2048,4096,4096*2,4096*2*2,4096*2*2*2,4096*2*2*2*2];kq.baseZoomInfo={"3":[3],"5":[4,5],"7":[6,7],"9":[8,9],"10":[10],"12":[11,12,13],"15":[14,15],"17":[16,17],"19":[18,19,20,21,22,23,24,25]};kq.prototype={getName:function(){return this._name},getTileSize:function(e){e=Math.floor(e);if(e<3){e=3}if(this._name==="na"){return kq.mapZoomTileSize[e]}return this._opts.tileSize},getBaseTileSize:function(i){i=Math.floor(i);if(this._name==="na"){var e=kq.mapZoomBaseZoomMapping[i];return kq.mapZoomTileSize[e]}return this._opts.tileSize},getDataZoom:function(e){e=Math.floor(e);if(this._name==="na"){return kq.mapZoomBaseZoomMapping[e]}return e},getZoomUnits:function(e){return Math.pow(2,(this._baseZoom-e))},getMercatorSize:function(T,i){if(this._name==="na"){T=Math.floor(T);var e=kq.mapZoomBaseIndex[T];return kq.baseScaleZoomMercatorSize[e]}return this._opts.tileSize*this.getZoomUnits(i)},getBaseZoom:function(){return this._baseZoom},getParentTile:function(kv,kB,kA,T,i){if(this._name==="na"){var kw=kq.baseZoomInfo[kA];T--;if(kw.indexOf(T)>-1){return{col:kv,row:kB,zoom:kA,useZoom:T}}else{var ky=kq.mapZoomBaseIndex[kA];var kx=kq.baseScaleZoom[ky+1];if(!kx){return null}var kz=this.getFactorByZooms(kx,kA);var e=kq.baseZoomInfo[kx];return{col:Math.floor(kv/kz),row:Math.floor(kB/kz),zoom:kx,useZoom:e[e.length-1]}}return null}if(kA-1<i){return null}return{col:Math.floor(kv/2),row:Math.floor(kB/2),zoom:kA-1,useZoom:kA-1}},getChildTiles:function(kw,ky,e,T,kF,kL){if(this._name==="na"){var kv=kq.baseZoomInfo[e];T+=kL;if(kv.indexOf(T)>-1){return[{col:kw,row:ky,zoom:e,useZoom:T}]}else{var kJ=0;var kG=e;while(kJ<kL){var kK=kq.mapZoomBaseIndex[kG];var kA=kq.baseScaleZoom[kK-1];if(!kA){return null}var kB=kq.baseZoomInfo[kA];if(kB[kL-1]){var kC=[];var kE=this.getFactorByZooms(e,kA);var i=kw*kE;var kD=ky*kE;for(var kI=0;kI<kE;kI++){var kx=i+kI;for(var kH=0;kH<kE;kH++){var kz=kD+kH;kC.push({col:kx,row:kz,zoom:kA,useZoom:kB[kL-1]})}}return kC}kJ+=kB.length;if(kL===kB.length){kG=kA}}}return null}var kC=[];if(e+kL>kF){return null}var kE=Math.pow(2,kL);var i=kw*kE;var kD=ky*kE;var kA=e+kL;var kC=[];for(var kI=0;kI<2;kI++){var kx=i+kI;for(var kH=0;kH<2;kH++){var kz=kD+kH;kC.push({col:kx,row:kz,zoom:kA,useZoom:kA})}}return kC},getFactorByZooms:function(i,kv){var T=kq.mapZoomBaseIndex[i];var kw=kq.mapZoomBaseIndex[kv];var e=kq.baseScaleZoomMercatorSize[T];var kx=kq.baseScaleZoomMercatorSize[kw];return e/kx}};var dc={};var ab=["swiftshader","microsoft basic render driver"];var hC=["intel","nvidia","amd","apple","geforce"];function gQ(e){e=e.toLowerCase();if(ab.indexOf(e)>=0){return true}if(e.indexOf("mobile")>=0){return true}return false}function cF(T){T=T.toLowerCase();for(var e=0;e<hC.length;e++){if(T.indexOf(hC[e])>=0){return true}}return false}function ko(e){if(!e){return false}if(gQ(e)){return false}if(cF(e)){return true}return false}dc.ifEnableEarth=function(i){var e=dc.ifEnableEarth;if(!i&&typeof e._enable==="boolean"){return e._enable}if(dc.ifSupportWebGL()){e._enable=true;return true}e._enable=false;return false};dc.ifEnableWebGLMap=function(i){var e=dc.ifEnableWebGLMap;if(!i&&typeof e._enable==="boolean"){return e._enable}if(dc.ifSupportWebGL()){if(aJ.inMapHost){e._enable=true;return true}else{if(window.Blob||window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder){e._enable=true;return true}else{e._enable=false;return false}}}e._enable=false;return false};dc.params={};dc.ifSupportWebGL=function(){var i=dc.ifSupportWebGL;if(typeof i._supportWebGL==="boolean"){return i._supportWebGL}if(!window.WebGLRenderingContext){i._supportWebGL=false;return false}var T=document.createElement("canvas");T.width=300;T.height=150;var kw=null;var kC={alpha:true,antialias:false,failIfMajorPerformanceCaveat:false,preserveDrawingBuffer:false,stencil:false};try{kw=T.getContext("webgl",kC)||T.getContext("experimental-webgl",kC)}catch(ky){i._supportWebGL=false}if(kw===null){i._supportWebGL=false}else{i._supportWebGL=true;var kA=kw.getExtension("WEBGL_debug_renderer_info");var kz="";if(kA){kz=kw.getParameter(kA.UNMASKED_RENDERER_WEBGL);if(ko(kz)===true){i._supportWebGL=true}var kB=kw.getParameter(kA.UNMASKED_VENDOR_WEBGL);i._renderer=kz;i._vendor=kB}if(!kA&&e6.Browser.firefox){i._supportWebGL=true}if(!kA&&e6.Platform.macintosh){i._supportWebGL=true}if(kw.drawingBufferWidth!==T.width||kw.drawingBufferHeight!==T.height){i._supportWebGL=false}if(kw.getParameter(kw.MAX_VERTEX_TEXTURE_IMAGE_UNITS)<4){i._supportWebGL=false}var kv=kw.getParameter(kw.MAX_TEXTURE_SIZE);dc.params.maxTextureSize=kv;if(kv<4096){i._supportWebGL=false}var kx=kw.getParameter(kw.MAX_TEXTURE_IMAGE_UNITS);if(kx<8){i._supportWebGL=false}if(kw.getShaderPrecisionFormat&&!kw.getShaderPrecisionFormat(kw.FRAGMENT_SHADER,kw.HIGH_FLOAT)){hL.sendMessage(aZ(4,246,1,1),["monitor","ShaderPrecision","sys_"+kz]);return i._supportWebGL}if(!kw.getShaderPrecisionFormat||!kw.getShaderPrecisionFormat(kw.FRAGMENT_SHADER,kw.HIGH_FLOAT)){hL.sendMessage(aZ(4,246,1,1),["monitor","ShaderPrecision","sys_"+kz]);return i._supportWebGL}if(!kw.getShaderPrecisionFormat||kw.getShaderPrecisionFormat(kw.FRAGMENT_SHADER,kw.HIGH_FLOAT).precision<23){i._supportWebGL=false}}return i._supportWebGL};dc.ifSupportCanvas2d=function(){var kw=dc.ifSupportCanvas2d;if(typeof kw.supportCanvas2d==="boolean"){return kw.supportCanvas2d}var T=document.createElement("canvas");var i=null;try{i=T.getContext("2d")}catch(kv){kw.supportCanvas2d=false}if(i===null){kw.supportCanvas2d=false}else{kw.supportCanvas2d=true}return kw.supportCanvas2d};dc.ifCanvas2dInBlackList=function(){return true};dc.ifEnableCanvas2dMap=function(){return false;var i=navigator.userAgent;var e=0;var kv=0;var kw=0;if(/macintosh/ig.test(i)){var T=0;if(/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(i)&&!/chrome/i.test(i)){T=parseInt((RegExp["\x241"]||RegExp["\x242"]),10)}if(T>0){return false}return true}if(/windows nt (\d+\.\d)/ig.test(i)){kv=parseFloat(RegExp.$1);if(kv>=6.1){if(/chrome\/(\d+\.\d)/i.test(i)){e=parseFloat(RegExp.$1);if(e>=31){return true}}if(/MSIE (\d+(\.\d+)?)/.test(i)){kw=parseFloat(RegExp.$1);if(kw>=10){return true}}if(/Firefox/.test(i)){return true}if(/rv:11.0/ig.test(i)){return true}if(/edge/ig.test(i)){return true}}}return false};dc.ifSupportCSS3=function(kz,i){var ky=document.createElement("div");var kx="Webkit Moz O ms".split(" ");var e=kx.length;var T="";var kv=ky.style;if(kz in kv){T=kz}kz=kz.replace(/^[a-z]/,function(kA){return kA.toUpperCase()});while(e--){var kw=kx[e]+kz;if(kw in kv){T=kw;break}}if(i){return T}else{return T.length>0?true:false}};dc.isModernBrowser=dc.ifSupportCanvas2d()&&dc.ifSupportCSS3("transform");function aA(i,e){this._size=i;this._curSize=0;this._cache={};this._least=null;this._most=null;this._options={clearCallback:null,removeOldCallback:null};e=e||{};for(var T in e){this._options[T]=e[T]}this._getDataTimes=0;this._hitTimes=0}aA.prototype.setData=function(kv,kx){var i=this._cache;var T=this._size;if(T===0){return}var e=this._curSize;if(e===T){this._removeOld()}var kw;if(!i[kv]){kw={key:kv,data:kx,older:null,newwer:null};i[kv]=kw;if(this._least===null){this._least=kw}if(this._most===null){this._most=kw}this._curSize++}else{kw=i[kv];kw.data=kx;if(this._most===kw){return}kw.older&&(kw.older.newer=kw.newer);kw.newer&&(kw.newer.older=kw.older);if(this._least===kw){this._least=kw.newer}}if(this._most&&this._most!==kw){this._most.newer=kw;kw.older=this._most;this._most=kw;kw.newer=null}};aA.prototype.getData=function(e){var i=this._cache[e];this._getDataTimes++;if(i){this._hitTimes++;var T=i.data;if(this._most===i){return T}i.older&&(i.older.newer=i.newer);i.newer&&(i.newer.older=i.older);if(this._least===i){this._least=i.newer}this._most.newer=i;i.older=this._most;i.newer=null;this._most=i;return T}return null};aA.prototype.getAllData=function(){return this._cache};aA.prototype.getHitRate=function(){return this._hitTimes/this._getDataTimes};aA.prototype.removeData=function(i){var e=this._cache;var T=e[i];if(!T){return}if(this._options.clearCallback){this._options.clearCallback(T.data,T.key)}T.older&&(T.older.newer=T.newer);T.newer&&(T.newer.older=T.older);if(this._least===T){this._least=T.newer}if(this._most===T){this._most=T.older}delete e[i];this._curSize--};aA.prototype._removeOld=function(){var e=this._cache;var kv=Math.round(this._size*0.6);var T=0;while(this._least&&T<kv){var i=this._least;this._least=i.newer;i.newer&&(i.newer.older=null);if(this._options.clearCallback){this._options.clearCallback(i.data,i.key)}delete e[i.key];T++}this._curSize-=T;if(this._options.removeOldCallback){this._options.removeOldCallback()}};aA.prototype.clear=function(){var e=this._cache;var i=this._least;if(this._options.clearCallback){while(i){this._options.clearCallback(i.data,i.key);i=i.newer}}this._least=this._most=null;this._cache={};this._curSize=0};aA.prototype.forEach=function(e){var i=this._least;while(i){e(i.data);i=i.newer}};aA.prototype.clearExcept=function(i){var e=this._cache;var T=this._least;while(T){if(!i[T.key]){if(this._options.clearCallback){this._options.clearCallback(T.data,T.key)}T.older&&(T.older.newer=T.newer);T.newer&&(T.newer.older=T.older);if(this._least===T){this._least=T.newer}if(this._most===T){this._most=T.older}delete e[T.key];this._curSize--}T=T.newer}};!function(T,i){"object"==typeof bD&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(T="undefined"!=typeof globalThis?globalThis:T||self).gcoord=i()}(this,(function(){var k9=function(){return(k9=Object.assign||function(le){for(var i,T=1,lg=arguments.length;T<lg;T++){for(var lf in i=arguments[T]){Object.prototype.hasOwnProperty.call(i,lf)&&(le[lf]=i[lf])}}return le}).apply(this,arguments)},kU=Math.sin,kW=Math.cos,k0=Math.sqrt,kZ=Math.abs,ld=Math.PI,k5=6378245,kT=0.006693421622965823;function k8(T,i){return T>=72.004&&T<=137.8347&&i>=0.8293&&i<=55.8271}function lb(lg,lf){var lj,i,ll,T=(ll=300+(lj=lg-105)+2*(i=lf-35)+0.1*lj*lj+0.1*lj*i+0.1*k0(kZ(lj)),ll+=2*(20*kU(6*lj*ld)+20*kU(2*lj*ld))/3,(ll+=2*(20*kU(lj*ld)+40*kU(lj/3*ld))/3)+2*(150*kU(lj/12*ld)+300*kU(lj/30*ld))/3),le=function(lo,ln){var lm=2*lo-100+3*ln+0.2*ln*ln+0.1*lo*ln+0.2*k0(kZ(lo));return lm+=2*(20*kU(6*lo*ld)+20*kU(2*lo*ld))/3,lm+=2*(20*kU(ln*ld)+40*kU(ln/3*ld))/3,lm+2*(160*kU(ln/12*ld)+320*kU(ln*ld/30))/3}(lg-105,lf-35),li=lf/180*ld,lh=kU(li),lk=k0(lh=1-kT*lh*lh);return[T=180*T/(k5/lk*kW(li)*ld),le=180*le/(k5*(1-kT)/(lh*lk)*ld)]}function k2(le){var i=le[0],T=le[1];if(!k8(i,T)){return[i,T]}var lf=lb(i,T);return[i+lf[0],T+lf[1]]}function kV(lg){var lk=lg[0],T=lg[1];if(!k8(lk,T)){return[lk,T]}for(var le=[lk,T],li=le[0],lf=le[1],lj=k2([li,lf]),lh=lj[0]-lk,ll=lj[1]-T;kZ(lh)>0.000001||kZ(ll)>0.000001;){lh=(lj=k2([li-=lh,lf-=ll]))[0]-lk,ll=lj[1]-T}return[li,lf]}var k6=Math.sin,k7=Math.cos,kD=Math.atan2,la=Math.sqrt,kS=3000*Math.PI/180;function kY(le){var i=le[0]-0.0065,T=le[1]-0.006,lg=la(i*i+T*T)-0.00002*k6(T*kS),lf=kD(T,i)-0.000003*k7(i*kS);return[lg*k7(lf),lg*k6(lf)]}function kH(le){var i=le[0],T=le[1],lg=la(i*i+T*T)+0.00002*k6(T*kS),lf=kD(T,i)+0.000003*k7(i*kS);return[lg*k7(lf)+0.0065,lg*k6(lf)+0.006]}var kP=180/Math.PI,ky=Math.PI/180,kA=6378137,lc=20037508.342789244;function kM(i){return[i[0]*kP/kA,(0.5*Math.PI-2*Math.atan(Math.exp(-i[1]/kA)))*kP]}function k1(le){var i=Math.abs(le[0])<=180?le[0]:le[0]-360*(le[0]<0?-1:1),T=[kA*i*ky,kA*Math.log(Math.tan(0.25*Math.PI+0.5*le[1]*ky))];return T[0]>lc&&(T[0]=lc),T[0]<-lc&&(T[0]=-lc),T[1]>lc&&(T[1]=lc),T[1]<-lc&&(T[1]=-lc),T}var kL,kK,kJ,kR,kG,kv,kQ=Math.abs,k3=[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],kF=[75,60,45,30,15,0],kx=[[1.410526172116255e-8,0.00000898305509648872,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-0.03801003308653,17337981.2],[-7.435856389565537e-9,0.000008983055097726239,-0.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,10260144.86],[-3.030883460898826e-8,0.00000898305509983578,0.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,0.32710905363475,6856817.37],[-1.981981304930552e-8,0.000008983055099779535,0.03278182852591,40.31678527705744,0.65659298677277,-4.44255534477492,0.85341911805263,0.12923347998204,-0.04625736007561,4482777.06],[3.09191371068437e-9,0.000008983055096812155,0.00006995724062,23.10934304144901,-0.00023663490511,-0.6321817810242,-0.00663494467273,0.03430082397953,-0.00466043876332,2555164.4],[2.890871144776878e-9,0.000008983055095805407,-3.068298e-8,7.47137025468032,-0.00000353937994,-0.02145144861037,-0.00001234426596,0.00010322952773,-0.00000323890364,826088.5]],k4=[[-0.0015702102444,111320.7020616939,1704480524535203,-10338987376042340,26112667856603880,-35149669176653700,26595700718403920,-10725012454188240,1800819912950474,82.5],[0.0008277824516172526,111320.7020463578,647795574.6671607,-4082003173.641316,10774905663.51142,-15171875531.51559,12053065338.62167,-5124939663.577472,913311935.9512032,67.5],[0.00337398766765,111320.7020202162,4481351.045890365,-23393751.19931662,79682215.47186455,-115964993.2797253,97236711.15602145,-43661946.33752821,8477230.501135234,52.5],[0.00220636496208,111320.7020209128,51751.86112841131,3796837.749470245,992013.7397791013,-1221952.21711287,1340652.697009075,-620943.6990984312,144416.9293806241,37.5],[-0.0003441963504368392,111320.7020576856,278.2353980772752,2485758.690035394,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-0.0003218135878613132,111320.7020701615,0.00369383431289,823725.6402795718,0.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,0.37238884252424,7.45]];function kE(lf,T,le){var lh=kQ(T)/le[9],lg=le[0]+le[1]*kQ(lf),i=le[2]+le[3]*lh+le[4]*Math.pow(lh,2)+le[5]*Math.pow(lh,3)+le[6]*Math.pow(lh,4)+le[7]*Math.pow(lh,5)+le[8]*Math.pow(lh,6);return[lg*=lf<0?-1:1,i*=T<0?-1:1]}function kX(le){for(var i=le[0],T=le[1],lg=[],lf=0;lf<kF.length;lf++){if(kQ(T)>kF[lf]){lg=k4[lf];break}}return kE(i,T,lg)}function kC(le){for(var i=le[0],T=le[1],lg=[],lf=0;lf<k3.length;lf++){if(T>=k3[lf]){lg=kx[lf];break}}return kE(i,T,lg)}function kB(T,i){if(!T){throw new Error(i)}}function kN(i){return !!i&&"[object Array]"===Object.prototype.toString.call(i)}function kI(i){return !isNaN(Number(i))&&null!==i&&!kN(i)}function kz(){for(var le=[],i=0;i<arguments.length;i++){le[i]=arguments[i]}var T=le.length-1;return function(){for(var lf=[],lh=0;lh<arguments.length;lh++){lf[lh]=arguments[lh]}for(var lg=T,e=le[T].apply(null,lf);lg--;){e=le[lg].call(null,e)}return e}}function kw(lv,lk,lm){if(void 0===lm&&(lm=!1),null!==lv){for(var lp,lo,ly,lr,lj,lu,lx,lq,ll=0,ls=0,lt=lv.type,lf="FeatureCollection"===lt,lw="Feature"===lt,li=lf?lv.features.length:1,ln=0;ln<li;ln++){lj=(lq=!!(lx=lf?lv.features[ln].geometry:lw?lv.geometry:lv)&&"GeometryCollection"===lx.type)?lx.geometries.length:1;for(var lh=0;lh<lj;lh++){var lg=0,T=0;if(null!==(lr=lq?lx.geometries[lh]:lx)){var le=lr.type;switch(ll=!lm||"Polygon"!==le&&"MultiPolygon"!==le?0:1,le){case null:break;case"Point":if(!1===lk(lu=lr.coordinates,ls,ln,lg,T)){return !1}ls++,lg++;break;case"LineString":case"MultiPoint":for(lu=lr.coordinates,lp=0;lp<lu.length;lp++){if(!1===lk(lu[lp],ls,ln,lg,T)){return !1}ls++,"MultiPoint"===le&&lg++}"LineString"===le&&lg++;break;case"Polygon":case"MultiLineString":for(lu=lr.coordinates,lp=0;lp<lu.length;lp++){for(lo=0;lo<lu[lp].length-ll;lo++){if(!1===lk(lu[lp][lo],ls,ln,lg,T)){return !1}ls++}"MultiLineString"===le&&lg++,"Polygon"===le&&T++}"Polygon"===le&&lg++;break;case"MultiPolygon":for(lu=lr.coordinates,lp=0;lp<lu.length;lp++){for(T=0,lo=0;lo<lu[lp].length;lo++){for(ly=0;ly<lu[lp][lo].length-ll;ly++){if(!1===lk(lu[lp][lo][ly],ls,ln,lg,T)){return !1}ls++}T++}lg++}break;case"GeometryCollection":for(lp=0;lp<lr.geometries.length;lp++){if(!1===kw(lr.geometries[lp],lk,lm)){return !1}}break;default:throw new Error("Unknown Geometry Type")}}}}}}!function(i){i.WGS84="WGS84",i.WGS1984="WGS84",i.EPSG4326="WGS84",i.GCJ02="GCJ02",i.AMap="GCJ02",i.BD09="BD09",i.BD09LL="BD09",i.Baidu="BD09",i.BMap="BD09",i.BD09MC="BD09MC",i.BD09Meter="BD09MC",i.EPSG3857="EPSG3857",i.EPSG900913="EPSG3857",i.EPSG102100="EPSG3857",i.WebMercator="EPSG3857",i.WM="EPSG3857"}(kv||(kv={}));var kO={WGS84:{to:(kL={},kL[kv.GCJ02]=k2,kL[kv.BD09]=kz(kH,k2),kL[kv.BD09MC]=kz(kX,kH,k2),kL[kv.EPSG3857]=k1,kL)},GCJ02:{to:(kK={},kK[kv.WGS84]=kV,kK[kv.BD09]=kH,kK[kv.BD09MC]=kz(kX,kH),kK[kv.EPSG3857]=kz(k1,kV),kK)},BD09:{to:(kJ={},kJ[kv.WGS84]=kz(kV,kY),kJ[kv.GCJ02]=kY,kJ[kv.EPSG3857]=kz(k1,kV,kY),kJ[kv.BD09MC]=kX,kJ)},EPSG3857:{to:(kR={},kR[kv.WGS84]=kM,kR[kv.GCJ02]=kz(k2,kM),kR[kv.BD09]=kz(kH,k2,kM),kR[kv.BD09MC]=kz(kX,kH,k2,kM),kR)},BD09MC:{to:(kG={},kG[kv.WGS84]=kz(kV,kY,kC),kG[kv.GCJ02]=kz(kY,kC),kG[kv.EPSG3857]=kz(k1,kV,kY,kC),kG[kv.BD09]=kC,kG)}};return k9(k9({},kv),{CRSTypes:kv,transform:function(li,lg,lh){if(kB(!!li,"The args[0] input coordinate is required"),kB(!!lg,"The args[1] original coordinate system is required"),kB(!!lh,"The args[2] target coordinate system is required"),lg===lh){return li}var lk=kO[lg];kB(!!lk,"Invalid original coordinate system: "+lg);var lj=lk.to[lh];kB(!!lj,"Invalid target coordinate system: "+lh);var T=typeof li;if(kB("string"===T||"object"===T,"Invalid input coordinate type: "+T),"string"===T){try{li=JSON.parse(li)}catch(lg){throw new Error("Invalid input coordinate: "+li)}}var lf=!1;kN(li)&&(kB(li.length>=2,"Invalid input coordinate: "+li),kB(kI(li[0])&&kI(li[1]),"Invalid input coordinate: "+li),li=li.map(Number),lf=!0);var le=lj;return lf?le(li):(kw(li,(function(ll){var i;i=le(ll),ll[0]=i[0],ll[1]=i[1]})),li)}})}));var hR={ColorRefTable:{aliceblue:["#f0f8ff","rgb(240,248,255)"],antiquewhite:["#faebd7","rgb(250,235,215)"],aqua:["#00ffff","rgb(0,255,255)"],aquamarine:["#7fffd4","rgb(127,255,212)"],azure:["#f0ffff","rgb(240,255,255)"],beige:["#f5f5dc","rgb(245,245,220)"],bisque:["#ffe4c4","rgb(255,228,196)"],black:["#000000","rgb(0,0,0)"],blanchedalmond:["#ffebcd","rgb(255,235,205)"],blue:["#0000ff","rgb(0,0,255)"],blueviolet:["#8a2be2","rgb(138,43,226)"],brown:["#a52a2a","rgb(165,42,42)"],burlywood:["#deb887","rgb(222,184,135)"],cadetblue:["#5f9ea0","rgb(95,158,160)"],chartreuse:["#7fff00","rgb(127,255,0)"],chocolate:["#d2691e","rgb(210,105,30)"],coral:["#ff7f50","rgb(255,127,80)"],cornflowerblue:["#6495ed","rgb(100,149,237)"],cornsilk:["#fff8dc","rgb(255,248,220)"],crimson:["#dc143c","rgb(220,20,60)"],cyan:["#00ffff","rgb(0,255,255)"],darkblue:["#00008b","rgb(0,0,139)"],darkcyan:["#008b8b","rgb(0,139,139)"],darkgoldenrod:["#b8860b","rgb(184,134,11)"],darkgray:["#a9a9a9","rgb(169,169,169)"],darkgreen:["#006400","rgb(0,100,0)"],darkgrey:["#a9a9a9","rgb(169,169,169)"],darkkhaki:["#bdb76b","rgb(189,183,107)"],darkmagenta:["#8b008b","rgb(139,0,139)"],darkolivegreen:["#556b2f","rgb(85,107,47)"],darkorange:["#ff8c00","rgb(255,140,0)"],darkorchid:["#9932cc","rgb(153,50,204)"],darkred:["#8b0000","rgb(139,0,0)"],darksalmon:["#e9967a","rgb(233,150,122)"],darkseagreen:["#8fbc8f","rgb(143,188,143)"],darkslateblue:["#483d8b","rgb(72,61,139)"],darkslategray:["#2f4f4f","rgb(47,79,79)"],darkslategrey:["#2f4f4f","rgb(47,79,79)"],darkturquoise:["#00ced1","rgb(0,206,209)"],darkviolet:["#9400d3","rgb(148,0,211)"],deeppink:["#ff1493","rgb(255,20,147)"],deepskyblue:["#00bfff","rgb(0,191,255)"],dimgray:["#696969","rgb(105,105,105)"],dimgrey:["#696969","rgb(105,105,105)"],dodgerblue:["#1e90ff","rgb(30,144,255)"],firebrick:["#b22222","rgb(178,34,34)"],floralwhite:["#fffaf0","rgb(255,250,240)"],forestgreen:["#228b22","rgb(34,139,34)"],fuchsia:["#ff00ff","rgb(255,0,255)"],gainsboro:["#dcdcdc","rgb(220,220,220)"],ghostwhite:["#f8f8ff","rgb(248,248,255)"],gold:["#ffd700","rgb(255,215,0)"],goldenrod:["#daa520","rgb(218,165,32)"],gray:["#808080","rgb(128,128,128)"],green:["#008000","rgb(0,128,0)"],greenyellow:["#adff2f","rgb(173,255,47)"],grey:["#808080","rgb(128,128,128)"],honeydew:["#f0fff0","rgb(240,255,240)"],hotpink:["#ff69b4","rgb(255,105,180)"],indianred:["#cd5c5c","rgb(205,92,92)"],indigo:["#4b0082","rgb(75,0,130)"],ivory:["#fffff0","rgb(255,255,240)"],khaki:["#f0e68c","rgb(240,230,140)"],lavender:["#e6e6fa","rgb(230,230,250)"],lavenderblush:["#fff0f5","rgb(255,240,245)"],lawngreen:["#7cfc00","rgb(124,252,0)"],lemonchiffon:["#fffacd","rgb(255,250,205)"],lightblue:["#add8e6","rgb(173,216,230)"],lightcoral:["#f08080","rgb(240,128,128)"],lightcyan:["#e0ffff","rgb(224,255,255)"],lightgoldenrodyellow:["#fafad2","rgb(250,250,210)"],lightgray:["#d3d3d3","rgb(211,211,211)"],lightgreen:["#90ee90","rgb(144,238,144)"],lightgrey:["#d3d3d3","rgb(211,211,211)"],lightpink:["#ffb6c1","rgb(255,182,193)"],lightsalmon:["#ffa07a","rgb(255,160,122)"],lightseagreen:["#20b2aa","rgb(32,178,170)"],lightskyblue:["#87cefa","rgb(135,206,250)"],lightslategray:["#778899","rgb(119,136,153)"],lightslategrey:["#778899","rgb(119,136,153)"],lightsteelblue:["#b0c4de","rgb(176,196,222)"],lightyellow:["#ffffe0","rgb(255,255,224)"],lime:["#00ff00","rgb(0,255,0)"],limegreen:["#32cd32","rgb(50,205,50)"],linen:["#faf0e6","rgb(250,240,230)"],magenta:["#ff00ff","rgb(255,0,255)"],maroon:["#800000","rgb(128,0,0)"],mediumaquamarine:["#66cdaa","rgb(102,205,170)"],mediumblue:["#0000cd","rgb(0,0,205)"],mediumorchid:["#ba55d3","rgb(186,85,211)"],mediumpurple:["#9370db","rgb(147,112,219)"],mediumseagreen:["#3cb371","rgb(60,179,113)"],mediumslateblue:["#7b68ee","rgb(123,104,238)"],mediumspringgreen:["#00fa9a","rgb(0,250,154)"],mediumturquoise:["#48d1cc","rgb(72,209,204)"],mediumvioletred:["#c71585","rgb(199,21,133)"],midnightblue:["#191970","rgb(25,25,112)"],mintcream:["#f5fffa","rgb(245,255,250)"],mistyrose:["#ffe4e1","rgb(255,228,225)"],moccasin:["#ffe4b5","rgb(255,228,181)"],navajowhite:["#ffdead","rgb(255,222,173)"],navy:["#000080","rgb(0,0,128)"],oldlace:["#fdf5e6","rgb(253,245,230)"],olive:["#808000","rgb(128,128,0)"],olivedrab:["#6b8e23","rgb(107,142,35)"],orange:["#ffa500","rgb(255,165,0)"],orangered:["#ff4500","rgb(255,69,0)"],orchid:["#da70d6","rgb(218,112,214)"],palegoldenrod:["#eee8aa","rgb(238,232,170)"],palegreen:["#98fb98","rgb(152,251,152)"],paleturquoise:["#afeeee","rgb(175,238,238)"],palevioletred:["#db7093","rgb(219,112,147)"],papayawhip:["#ffefd5","rgb(255,239,213)"],peachpuff:["#ffdab9","rgb(255,218,185)"],peru:["#cd853f","rgb(205,133,63)"],pink:["#ffc0cb","rgb(255,192,203)"],plum:["#dda0dd","rgb(221,160,221)"],powderblue:["#b0e0e6","rgb(176,224,230)"],purple:["#800080","rgb(128,0,128)"],red:["#ff0000","rgb(255,0,0)"],rosybrown:["#bc8f8f","rgb(188,143,143)"],royalblue:["#4169e1","rgb(65,105,225)"],saddlebrown:["#8b4513","rgb(139,69,19)"],salmon:["#fa8072","rgb(250,128,114)"],sandybrown:["#f4a460","rgb(244,164,96)"],seagreen:["#2e8b57","rgb(46,139,87)"],seashell:["#fff5ee","rgb(255,245,238)"],sienna:["#a0522d","rgb(160,82,45)"],silver:["#c0c0c0","rgb(192,192,192)"],skyblue:["#87ceeb","rgb(135,206,235)"],slateblue:["#6a5acd","rgb(106,90,205)"],slategray:["#708090","rgb(112,128,144)"],slategrey:["#708090","rgb(112,128,144)"],snow:["#fffafa","rgb(255,250,250)"],springgreen:["#00ff7f","rgb(0,255,127)"],steelblue:["#4682b4","rgb(70,130,180)"],tan:["#d2b48c","rgb(210,180,140)"],teal:["#008080","rgb(0,128,128)"],thistle:["#d8bfd8","rgb(216,191,216)"],tomato:["#ff6347","rgb(255,99,71)"],turquoise:["#40e0d0","rgb(64,224,208)"],violet:["#ee82ee","rgb(238,130,238)"],wheat:["#f5deb3","rgb(245,222,179)"],white:["#ffffff","rgb(255,255,255)"],whitesmoke:["#f5f5f5","rgb(245,245,245)"],yellow:["#ffff00","rgb(255,255,0)"],yellowgreen:["#9acd32","rgb(154,205,50)"]},regGroup:{hex:/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,rgb:/rgb\(\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*\)/,rgba:/rgba\(\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(0|1|0\.[1-9])\s*\)/},parseHexToRgbaArray:function(kx){var ky=kx.replace("#","");if(ky.length===3){ky+="f"}else{if(ky.length===6){ky+="ff"}}var e=[];var kw=ky.length;var kv=kw===8?2:1;for(var T=0;T<kw;T=T+kv){if(kv===2){e.push(parseInt(ky.slice(T,T+2),16))}else{e.push(parseInt(ky.slice(T,T+1)+ky.slice(T,T+1),16))}}return e},parseRgbaStrToArray:function(i){var e=[0,0,0,255];if(i.indexOf("rgba(")===0){var kv=i.replace("rgba(","").replace(")","");var T=kv.split(",");e[0]=parseInt(T[0],10);e[1]=parseInt(T[1],10);e[2]=parseInt(T[2],10);e[3]=Math.round(parseFloat(T[3])*255)}else{if(i.indexOf("rgb(")===0){var kv=i.replace("rgb(","").replace(")","");var kw=kv.split(",");e[0]=parseInt(kw[0],10);e[1]=parseInt(kw[1],10);e[2]=parseInt(kw[2],10);e[3]=255}}return e},parseHexAndOpacityToRgbaArray:function(kw,kx){var T=[];var kA=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;var kz=kw.toLowerCase();if(kA.test(kz)){if(kz.length===4){var e="#";for(var ky=1;ky<4;ky++){e+=kz.slice(ky,ky+1).concat(kz.slice(ky,ky+1))}kz=e}for(var kv=1;kv<7;kv+=2){T.push(parseInt(kz.slice(kv,kv+2),16))}T.push(kx)}return T},parseCSSColor:function(e){if(e.indexOf("#")===0){return hR.parseHexToRgbaArray(e)}return hR.parseRgbaStrToArray(e)},rgbToHSV:function(kw){var e=kw[0]/255;var T=kw[1]/255;var kx=kw[2]/255;var kA=Math.max(e,T,kx);var kv=Math.min(e,T,kx);var kz=kA-kv;var i;if(kz===0){i=0}else{if(kA===e){i=60*(((T-kx)/kz)%6)}else{if(kA===T){i=60*((kx-e)/kz+2)}else{if(kA===kx){i=60*((e-T)/kz+4)}}}}var kB=kA===0?0:(kz/kA);var ky=kA;while(i<0){i+=360}return[i,kB,ky]},hsvToRGB:function(kv){var kz=kv[2]*kv[1];var T=kz*(1-Math.abs((kv[0]/60)%2-1));var i=kv[2]-kz;var kw=kv[0];var ky;var kx;var e;if(kw>=0&&kw<60){ky=kz;kx=T;e=0}else{if(kw>=60&&kw<120){ky=T;kx=kz;e=0}else{if(kw>=120&&kw<180){ky=0;kx=kz;e=T}else{if(kw>=180&&kw<240){ky=0;kx=T;e=kz}else{if(kw>=240&&kw<300){ky=T;kx=0;e=kz}else{if(kw>=300&&kw<360){ky=kz;kx=0;e=T}}}}}}ky=(ky+i)*255>255?255:(ky+i)*255;kx=(kx+i)*255>255?255:(kx+i)*255;e=(e+i)*255>255?255:(e+i)*255;return[Math.round(ky),Math.round(kx),Math.round(e)]},formatColorCssToRgbaArray:function(kx,T,kv){kv=(typeof kv!=="boolean")?true:kv;if(typeof kx!=="string"){return kv?[0,0,0,1]:[0,0,0,255]}var i=(kx||"Black").trim().toLowerCase();var e=[];var kw=hR.ColorRefTable[i];if(kw!==undefined){i=kw[0]}e=hR.parseCSSColor(i);if(T!==undefined&&!isNaN(Number(T))){T=Number(T);e[3]=hR.fitTo(T,0,1)}else{e[3]=Number((e[3]/255).toFixed(2))}if(!kv){e[3]=Math.floor(e[3]*255)}return e},fitTo:function(T,i,e){if(T<i){T=i}else{if(T>e){T=e}}return T},generateColorRamp:function(e,kB,kC,kv,kH){kC=kC||[];kv=kv||"#ccc";kH=kH||1;const T=document.createElement("canvas");const kI=T.getContext("2d");T.width=256;T.height=kH;const kx=kB[0];const kE=kB[kB.length-1];if(e.length===kB.length){const kF=kI.createLinearGradient(0,0,256,1);for(var kA=0;kA<e.length;++kA){var kG=(kB[kA]-kx)/(kE-kx);kF.addColorStop(kG,e[kA])}kI.fillStyle=kF;kI.fillRect(0,0,256,kH)}else{if(e.length-kB.length===-1){var kz=0;var kw=1;for(var kA=0;kA<e.length;++kA){var kD=(kB[kw]-kx)/(kE-kx);var kG=Math.floor(kD*256);kI.fillStyle=e[kA];kI.fillRect(kz,0,kG,kH);kz=kG;kw++}}else{kI.fillStyle=kv||"#ccc";kI.fillRect(0,0,256,kH)}}if(e.length-kB.length<=-1&&kC.length===2){kI.fillStyle=kv||"#ccc";var kD=(kC[0]-kx)/(kE-kx);var kG=Math.floor(kD*256);kI.fillRect(0,0,kG,kH);kD=(kC[1]-kx)/(kE-kx);kG=Math.floor(kD*256);kI.fillRect(kG,0,255,kH)}var ky=new Uint8Array(new Uint8ClampedArray(kI.getImageData(0,0,256,kH).data));return{canvas:T,data:ky,width:256,height:kH}},validateColor:function(e,i){return hR.regGroup[i].test(e)},convert2rgba:function(e,i){if(i===undefined){i=1}if(hR.validateColor(e,"rgba")){return e}if(hR.validateColor(e,"rgb")){e=e.replace(/rgb/g,"rgba");e=e.replace(/\)/,","+i+")");return e}var T=hR.formatColorCssToRgbaArray(e,i,true);return"rgba("+T.join(",")+")"}};(function(kx){function kH(kM,kP){var kO=(kM&65535)+(kP&65535);var kN=(kM>>16)+(kP>>16)+(kO>>16);return(kN<<16)|(kO&65535)}function kG(kM,kN){return(kM<<kN)|(kM>>>(32-kN))}function kB(kR,kO,kN,kM,kQ,kP){return kH(kG(kH(kH(kO,kR),kH(kM,kP)),kQ),kN)}function e(kO,kN,kS,kR,kM,kQ,kP){return kB((kN&kS)|(~kN&kR),kO,kN,kM,kQ,kP)}function ky(kO,kN,kS,kR,kM,kQ,kP){return kB((kN&kR)|(kS&~kR),kO,kN,kM,kQ,kP)}function kE(kO,kN,kS,kR,kM,kQ,kP){return kB(kN^kS^kR,kO,kN,kM,kQ,kP)}function kK(kO,kN,kS,kR,kM,kQ,kP){return kB(kS^(kN|~kR),kO,kN,kM,kQ,kP)}function T(kW,kR){kW[kR>>5]|=128<<(kR%32);kW[((kR+64)>>>9<<4)+14]=kR;var kO;var kQ;var kP;var kN;var kM;var kV=1732584193;var kU=-271733879;var kT=-1732584194;var kS=271733878;for(kO=0;kO<kW.length;kO+=16){kQ=kV;kP=kU;kN=kT;kM=kS;kV=e(kV,kU,kT,kS,kW[kO],7,-680876936);kS=e(kS,kV,kU,kT,kW[kO+1],12,-389564586);kT=e(kT,kS,kV,kU,kW[kO+2],17,606105819);kU=e(kU,kT,kS,kV,kW[kO+3],22,-1044525330);kV=e(kV,kU,kT,kS,kW[kO+4],7,-176418897);kS=e(kS,kV,kU,kT,kW[kO+5],12,1200080426);kT=e(kT,kS,kV,kU,kW[kO+6],17,-1473231341);kU=e(kU,kT,kS,kV,kW[kO+7],22,-45705983);kV=e(kV,kU,kT,kS,kW[kO+8],7,1770035416);kS=e(kS,kV,kU,kT,kW[kO+9],12,-1958414417);kT=e(kT,kS,kV,kU,kW[kO+10],17,-42063);kU=e(kU,kT,kS,kV,kW[kO+11],22,-1990404162);kV=e(kV,kU,kT,kS,kW[kO+12],7,1804603682);kS=e(kS,kV,kU,kT,kW[kO+13],12,-40341101);kT=e(kT,kS,kV,kU,kW[kO+14],17,-1502002290);kU=e(kU,kT,kS,kV,kW[kO+15],22,1236535329);kV=ky(kV,kU,kT,kS,kW[kO+1],5,-165796510);kS=ky(kS,kV,kU,kT,kW[kO+6],9,-1069501632);kT=ky(kT,kS,kV,kU,kW[kO+11],14,643717713);kU=ky(kU,kT,kS,kV,kW[kO],20,-373897302);kV=ky(kV,kU,kT,kS,kW[kO+5],5,-701558691);kS=ky(kS,kV,kU,kT,kW[kO+10],9,38016083);kT=ky(kT,kS,kV,kU,kW[kO+15],14,-660478335);kU=ky(kU,kT,kS,kV,kW[kO+4],20,-405537848);kV=ky(kV,kU,kT,kS,kW[kO+9],5,568446438);kS=ky(kS,kV,kU,kT,kW[kO+14],9,-1019803690);kT=ky(kT,kS,kV,kU,kW[kO+3],14,-187363961);kU=ky(kU,kT,kS,kV,kW[kO+8],20,1163531501);kV=ky(kV,kU,kT,kS,kW[kO+13],5,-1444681467);kS=ky(kS,kV,kU,kT,kW[kO+2],9,-51403784);kT=ky(kT,kS,kV,kU,kW[kO+7],14,1735328473);kU=ky(kU,kT,kS,kV,kW[kO+12],20,-1926607734);kV=kE(kV,kU,kT,kS,kW[kO+5],4,-378558);kS=kE(kS,kV,kU,kT,kW[kO+8],11,-2022574463);kT=kE(kT,kS,kV,kU,kW[kO+11],16,1839030562);kU=kE(kU,kT,kS,kV,kW[kO+14],23,-35309556);kV=kE(kV,kU,kT,kS,kW[kO+1],4,-1530992060);kS=kE(kS,kV,kU,kT,kW[kO+4],11,1272893353);kT=kE(kT,kS,kV,kU,kW[kO+7],16,-155497632);kU=kE(kU,kT,kS,kV,kW[kO+10],23,-1094730640);kV=kE(kV,kU,kT,kS,kW[kO+13],4,681279174);kS=kE(kS,kV,kU,kT,kW[kO],11,-358537222);kT=kE(kT,kS,kV,kU,kW[kO+3],16,-722521979);kU=kE(kU,kT,kS,kV,kW[kO+6],23,76029189);kV=kE(kV,kU,kT,kS,kW[kO+9],4,-640364487);kS=kE(kS,kV,kU,kT,kW[kO+12],11,-421815835);kT=kE(kT,kS,kV,kU,kW[kO+15],16,530742520);kU=kE(kU,kT,kS,kV,kW[kO+2],23,-995338651);kV=kK(kV,kU,kT,kS,kW[kO],6,-198630844);kS=kK(kS,kV,kU,kT,kW[kO+7],10,1126891415);kT=kK(kT,kS,kV,kU,kW[kO+14],15,-1416354905);kU=kK(kU,kT,kS,kV,kW[kO+5],21,-57434055);kV=kK(kV,kU,kT,kS,kW[kO+12],6,1700485571);kS=kK(kS,kV,kU,kT,kW[kO+3],10,-1894986606);kT=kK(kT,kS,kV,kU,kW[kO+10],15,-1051523);kU=kK(kU,kT,kS,kV,kW[kO+1],21,-2054922799);kV=kK(kV,kU,kT,kS,kW[kO+8],6,1873313359);kS=kK(kS,kV,kU,kT,kW[kO+15],10,-30611744);kT=kK(kT,kS,kV,kU,kW[kO+6],15,-1560198380);kU=kK(kU,kT,kS,kV,kW[kO+13],21,1309151649);kV=kK(kV,kU,kT,kS,kW[kO+4],6,-145523070);kS=kK(kS,kV,kU,kT,kW[kO+11],10,-1120210379);kT=kK(kT,kS,kV,kU,kW[kO+2],15,718787259);kU=kK(kU,kT,kS,kV,kW[kO+9],21,-343485551);kV=kH(kV,kQ);kU=kH(kU,kP);kT=kH(kT,kN);kS=kH(kS,kM)}return[kV,kU,kT,kS]}function kF(kN){var kO;var kM="";var kP=kN.length*32;for(kO=0;kO<kP;kO+=8){kM+=String.fromCharCode((kN[kO>>5]>>>(kO%32))&255)}return kM}function kA(kN){var kP;var kM=[];kM[(kN.length>>2)-1]=undefined;for(kP=0;kP<kM.length;kP+=1){kM[kP]=0}var kO=kN.length*8;for(kP=0;kP<kO;kP+=8){kM[kP>>5]|=(kN.charCodeAt(kP/8)&255)<<(kP%32)}return kM}function kz(kM){return kF(T(kA(kM),kM.length*8))}function kL(kO,kR){var kN;var kQ=kA(kO);var kM=[];var kP=[];var kS;kM[15]=kP[15]=undefined;if(kQ.length>16){kQ=T(kQ,kO.length*8)}for(kN=0;kN<16;kN+=1){kM[kN]=kQ[kN]^909522486;kP[kN]=kQ[kN]^1549556828}kS=T(kM.concat(kA(kR)),512+kR.length*8);return kF(T(kP.concat(kS),512+128))}function kJ(kP){var kO="0123456789abcdef";var kN="";var kM;var kQ;for(kQ=0;kQ<kP.length;kQ+=1){kM=kP.charCodeAt(kQ);kN+=kO.charAt((kM>>>4)&15)+kO.charAt(kM&15)}return kN}function kC(kM){return unescape(encodeURIComponent(kM))}function kv(kM){return kz(kC(kM))}function kD(kM){return kJ(kv(kM))}function i(kM,kN){return kL(kC(kM),kC(kN))}function kI(kM,kN){return kJ(i(kM,kN))}function kw(kN,kO,kM){if(!kO){if(!kM){return kD(kN)}return kv(kN)}if(!kM){return kI(kO,kN)}return i(kO,kN)}if(typeof define==="function"&&define.amd){define(function(){return kw})}else{if(typeof module==="object"&&module.exports){module.exports=kw}else{kx.md5=kw}}})(this);var cQ={levels:{INFO:"info",WARNING:"warning",ERROR:"error"},category:{JS:"js",RESOURCE:"resource",AJAX:"ajax"},config:{jsError:true,resourceError:true,ajaxError:true},hosts:"api.map.baidu.com|webmap0.bdimg.com|maponline0.bdimg.com|",ignoreUrl:"api.map.baidu.com/images/blank.gif",sender:true,collections:[],sendError:function(){},init:function(i,e,T){this.hosts+=i?i:"";ar&&ar(this.config,e);this.sender=true;if(T){this.sender=false}this.hosts=this.urlScope(this.hosts);this.sendError=this.notifyError();var kv=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};this.config.jsError&&this.handleJavaScriptError(kv);this.config.resourceError&&this.handleResourceError(kv);this.config.ajaxError&&this.handleAjaxError(kv)},handleJavaScriptError:function(T){var e=this;var i=T.onerror;T.onerror=function(kz,ky,kv,kx,kw){if(e.isFetch(e.category.JS)&&e.hostExit(ky)){if(kw&&kw.stack){e.sendError({title:kz,msg:kw.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof kz==="string"){e.sendError({title:kz,msg:JSON.stringify({resourceUrl:ky,rowNum:kv,colNum:kx}),category:"js",level:e.levels.ERROR})}}}if(i&&bX(i)){i&&i.apply(T,arguments)}}},handleResourceError:function(i){var e=this;i.addEventListener("error",function(kx){if(kx){var ky=kx.target||kx.srcElement;var kw=ky instanceof HTMLScriptElement||ky instanceof HTMLLinkElement||ky instanceof HTMLImageElement;if(!kw){if(!i.onerror){var T=kx.filename||null;if(!e.isFetch(e.category.JS)||!e.hostExit(T)){return}if(kx.error&&kx.error.stack){e.sendError({title:kx.message,msg:kx.error.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof kx.message==="string"){e.sendError({title:kx.message,msg:JSON.stringify({resourceUrl:T,rowNum:kx.lineno,colNum:kx.cowno}),category:e.category.JS,level:e.levels.ERROR})}}}return}var kv=ky.src||ky.href;if(e.isFetch(e.category.RESOURCE)&&e.hostExit(kv)){e.sendError({title:ky.nodeName,msg:kv,category:e.category.RESOURCE,level:e.levels.ERROR})}}},true)},handleAjaxError:function(kx){var e=this;var kw=kx.location.protocol;if(kw==="file:"){return}if(!kx.XMLHttpRequest){return}var i=kx.XMLHttpRequest;var T=i.prototype.send;var kv=function(kz){if(kz&&kz.currentTarget&&kz.currentTarget.status!==200){var ky=kz.target.responseURL;if(e.isFetch(e.category.AJAX)&&e.hostExit(ky)){e.sendError({title:ky,msg:JSON.stringify({response:kz.target.response,responseURL:ky,status:kz.target.status,statusText:kz.target.statusText}),category:e.category.AJAX,level:e.levels.ERROR})}}};i.prototype.send=function(){if(this["addEventListener"]){this["addEventListener"]("error",kv);this["addEventListener"]("load",kv);this["addEventListener"]("abort",kv)}else{var ky=this["onreadystatechange"];this["onreadystatechange"]=function(kz){if(this.readyState===4){kv(kz)}ky&&ky.apply(this,arguments)}}return T.apply(this,arguments)}},notifyError:function(T){var i=T||1000;this._idleWorkerTicker=(function(kv){return function(){kv.runJob()}})(this);var e=this;return function(kw){if(kw.url){if(!e.isFetch(kw.category)){return}var kv=kw.url||"";if(!e.hostExit(kv)){return}delete kw.url}if(!navigator.onLine){return}e.collections.push(kw);e.checkJob(i)}},runJob:function(){if(this.collections.length===0){clearInterval(this.idleWork);this.idleWork=null;return}var kw=this.collections.slice(0,2);var T=jA(JSON.stringify({dataset:kw}));var kv=new Date().getTime();var i=eD.apiIMG+"/blank.gif?product=jsapi&v=gl&l="+T+"&ak="+eW+"&t="+kv;if(this.sender){try{var ky=document.createElement("div");ky.style="width:0;height:0;visibility: hidden;opacity: 0;z-index:-999;background-image: url("+i+");";document.querySelector("BODY").appendChild(ky);setTimeout(function(){document.querySelector("BODY").removeChild(ky)})}catch(kx){}}this.collections.splice(0,2);if(this.collections.length===0){clearInterval(this.idleWork);this.idleWork=null}},checkJob:function(e){if(!this.idleWork&&this._idleWorkerTicker){this.idleWork=setInterval(this._idleWorkerTicker,e)}},urlScope:function(kv){var T={};var kx=Object.keys(C);if(C&&kx.length>0){for(var kw in C){if(C[kw]&&(typeof C[kw]!=="function")){T[kw]=C[kw]}}}try{var kz=JSON.stringify(T);if(kz.length>2){return kv+"|"+kz}else{return kv}}catch(ky){return kv}},hostExit:function(i){try{if(i&&i.indexOf("//")===0){i=window.location.protocol+i}var T=new URL(i);if(!T||!T.host){return false}var kw=T.host+T.pathname;if(this.ignoreUrl.indexOf(kw)===-1&&this.hosts.indexOf(T.host)>-1){return true}return false}catch(kv){return false}},isFetch:function(e){return this.config[e+"Error"]||false}};bD.fetchDebug=cQ;var hL={device:{PC:0,NA:1},config:{mask:["FFFFFFFF"],open:true,reset:60*60*1000},url:"//api.map.baidu.com?qt=jsapi_log",startTime:Date.now(),mark:{},records:{},sendMessage:function(e,i){},init:function(i,T){this.kill();var e=this;this.config.open=!!i;T=T||{};if(T.reset){this.config.reset=T.reset}this.sendMessage=(function(kw){var kv=kw||1000;e._idleWorkerTicker=(function(kx){return function(){kx.runJob()}})(e);return function(kx,ky){if(window.navigator&&!navigator.onLine){return}if(Date.now()-e.startTime>e.config.reset){e.startTime=Date.now();e.mark={};e.records={}}if(!e.mark[kx]){e.mark[kx]=true;e.records[kx]=ky}e.checkJob(kv)}})(T.timers)},runJob:function(){if(Object.keys(this.records).length===0){clearInterval(this.idleWork);this.idleWork=null;return}var kx=Object.keys(this.records);var kv=kx[0];var T=new Date().getTime();var kw="logCbk"+Math.floor(Math.random()*10000000000);bD[kw]=function(e){delete bD[kw]};var i=this.url+"&uid="+eW+"&bmapgl2=1&device="+(b2()?this.device.NA:this.device.PC)+"&module="+(this.records[kv][0]||"")+"&func="+(this.records[kv][1]||"")+"&subfunc="+(this.records[kv][2]||"")+"&t="+T+"&callback="+fB+"."+kw;i+=jE()(i);if(this.config.open){try{gZ.load(i);delete this.records[kv]}catch(ky){}}if(Object.keys(this.records).length===0){clearInterval(this.idleWork);this.idleWork=null}},checkJob:function(e){if(!this.idleWork&&this._idleWorkerTicker){this.idleWork=setInterval(this._idleWorkerTicker,e)}},kill:function(){if(this.idleWork){clearInterval(this.idleWork);this.idleWork=null}this._idleWorkerTicker=null;this.mark={};this.records={}}};hL.init(true,{reset:20*60*1000});var ke={request:function(kD,kz,kv,kG,kx){var kA=new Date()["getTime"]();var kC=(Math.random()*100000)["toFixed"](0);bD._rd["_cbk"+kC]=function(kH){if(kH.result&&kH.result["error"]&&kH.result["error"]===202){alert("该AK因为恶意行为已经被管理员封禁！");return}if(kH.result&&kH.result["error"]&&kH.result["error"]===403){if(he!==null){he.update("未获得百度地图商用授权，可能导致部分地图请求失败，请刷新后重试。")}return}kv=kv||{};kD&&kD(kH,kv);delete bD._rd["_cbk"+kC]};kG=kG||"";var kF;var kw;if(kv&&kv.useEncodeURI){kF=jC(kz,encodeURI);kw=jC(kz)}else{kF=jC(kz,encodeURIComponent);kw=jC(kz)}var i=C.apiHost+"/"+kG+"?"+kF+"&ie=utf-8&oue=1&fromproduct=jsapi";var kB=C.apiHost+"/"+kG+"?"+kw+"&ie=utf-8&oue=1&fromproduct=jsapi";if(!kx){i+="&res=api";kB+="&res=api"}i+="&callback="+fB+"._rd._cbk"+kC;kB+="&callback="+fB+"._rd._cbk"+kC;var ky=window.___abvk?window.___abvk:ke.getSeckeyCidItem("SECKEY_ABVK");var e=ke.getSeckeyCidItem("BMAP_SECKEY");var kE=encodeURIComponent(ky+","+e);var T=ky+","+e;i+="&ak="+eW+"&v=gl&seckey="+kE+"&timeStamp="+kA;kB+="&ak="+eW+"&v=gl&seckey="+T+"&timeStamp="+kA;i+=jE()(kB);gZ.load(i)},getSeckeyCidItem:function(i){if(navigator.cookieEnabled){var T=new RegExp("(^| )"+i+"=([^;]*)(;|$)");var e=document.cookie.match(T);if(e){return unescape(e[2])}return -1}if(localStorage){return localStorage.getItem(i)?localStorage.getItem(i):-1}if(sessionStorage){return sessionStorage.getItem(i)?localStorage.getItem(i):-1}}};window.srqtimer=null;window.firstTime=true;window.srqcount=0;bD._rd={};var ja=(function(){var kF={};var kE="HIGH";var ky="FOCUS";var T;function i(kG){var kL=kG||[];for(var kM=0;kM<kL.length;kM++){var kP=kL[kM];var kO=[];for(var kK=0;kK<kP.length;kK++){var kH=kP[kK];kO.push(new cD(kH[0],kH[1]))}var kI=new iX(kO);var kN=new fS("onbeforeaddoverlay",kI);kN.overlay=kI;kN.isLayerMask=true;T.dispatchEvent(kN);kI._i(T);kC(kE,kI);if(T.config.highRegion){if(T.config.highRegion.lineOpt){var kJ=new br(kO,T.config.highRegion.lineOpt);T.addOverlay(kJ)}if(T.config.highRegion.focusOpt){kC(ky,kI)}}}}function e(kG){var kH=new fS("onbeforeaddoverlay",kG);kH.overlay=kG;kH.isLayerMask=true;T.dispatchEvent(kH);kG._i(T);kC(ky,kG)}function kA(kG){kB(ky,kG)}function kC(kG,kH){if(kH){if(!kx(kG)){kF[kG]=[]}kF[kG].push(kH)}}function kB(kH,kI){if(kI){if(kx(kH)){for(var kG=0;kG<kF[kH].length;kG++){if(kF[kH][kG]===kI){kF[kH].splice(kG,1);break}}}}else{delete kF[kH]}}function kx(kG){return kF[kG]?true:false}function kD(kG){return kF[kG]}function kz(kG,kH){if(kF[kG]){kF[kG].visible=kH}}function kv(kG){T=kG}function kw(){kF[kE]=[];kF[ky]=[];kF={}}return{HIGH:kE,FOCUS:ky,kill:kw,setMap:kv,dataProcessFromHigh:i,addFocusMask:e,removeFocusMask:kA,getMask:kD,setVisible:kz}})();var dm={request:function(i,kA){var kw=new Date()["getTime"]();var kz=(Math.random()*100000).toFixed(0);if(kA){BMapGL._rd["_cbk"+kz]=function(kC){kA&&kA(kC);delete BMapGL._rd["_cbk"+kz]};i+="&callback=BMapGL._rd._cbk"+kz}function kx(kD){var kC;var kE=new RegExp("(^| )"+kD+"=([^;]*)(;|$)");if(kC=document.cookie.match(kE)){return unescape(kC[2])}else{return -1}}if(i.indexOf("v=")===-1){i+="&v=gl"}var kv=window.___abvk?window.___abvk:this.getSeckeyCidItem("SECKEY_ABVK");var e=this.getSeckeyCidItem("BMAP_SECKEY");var kB=encodeURIComponent(kv+","+e);var T=kv+","+e;signUrl=i+"&seckey="+T+"&timeStamp="+kw;i+="&seckey="+kB+"&timeStamp="+kw;i+=jE()(signUrl);var ky=b3("script",{src:i,type:"text/javascript",charset:"utf-8"});if(ky.addEventListener){ky.addEventListener("load",function(kD){var kC=kD.target;kC.parentNode.removeChild(kC)},false);ky.addEventListener("error",function(kC){kA&&kA([,,,,,])},false)}else{if(ky.attachEvent){ky.attachEvent("onreadystatechange",function(kD){var kC=window.event.srcElement;if(kC&&(kC.readyState=="loaded"||kC.readyState=="complete")){kC.parentNode.removeChild(kC)}})}}document.getElementsByTagName("head")[0].appendChild(ky);ky=null},getSeckeyCidItem:function(i){if(navigator.cookieEnabled){var T=new RegExp("(^| )"+i+"=([^;]*)(;|$)");var e=document.cookie.match(T);if(e){return unescape(e[2])}return -1}if(localStorage){return localStorage.getItem(i)?localStorage.getItem(i):-1}if(sessionStorage){return sessionStorage.getItem(i)?localStorage.getItem(i):-1}}};function gU(){this._map=null;this._container;this._type="control";this.blockInfoWindow=true;this._visible=true}gU.inherits(de,"Control");e6.extend(gU.prototype,{initialize:function(e){this._map=e;if(this._container){if(this._opts&&this._opts.container){this._opts.container.appendChild(this._container)}else{e.container.appendChild(this._container)}return this._container}return},_i:function(e){if(!this._container&&this.initialize&&bX(this.initialize)){this._container=this.initialize(e)}this._opts=this._opts||{printable:false};this._setStyle();this._setPosition();if(this._container){this._container._jsobj=this}},_setStyle:function(){var i=this._container;if(i){var e=i.style;e.position="absolute";e.zIndex=this._cZIndex||"10";e.MozUserSelect="none";if(!this._opts.printable){e6.ac(i,"BMap_noprint")}e6.on(i,"contextmenu",hD)}},remove:function(){this._map=null;if(!this._container){return}this._container.parentNode&&this._container.parentNode.removeChild(this._container);this._container._jsobj=null;this._container=null},_render:function(e){if(this._opts&&this._opts.container){this._container=bP(this._opts.container,'<div unselectable="on"></div>')}else{var i='<div unselectable="on"></div>';if(e&&e.config.autoSafeArea&&cz()){this._safeAreaContainer=bP(this._map.container,i);this._safeAreaContainer.style.position="absolute";this._safeAreaContainer.style.bottom="env(safe-area-inset-bottom)";this._container=bP(this._safeAreaContainer,i)}else{this._container=bP(this._map.container,i)}}if(this._visible===false){this._container.style.display="none"}return this._container},_setPosition:function(){this.setAnchor(this._opts.anchor)},setAnchor:function(kv){if(this.anchorFixed||typeof kv!=="number"||isNaN(kv)||kv<BMAP_ANCHOR_TOP_LEFT||kv>BMAP_ANCHOR_BOTTOM_RIGHT){kv=this.defaultAnchor}this._opts.offset=this._opts.offset||this.defaultOffset;var T=this._opts.anchor;this._opts.anchor=kv;if(!this._container){return}var kx=this._container;var e=this._opts.offset.width;var kw=this._opts.offset.height;kx.style.left=kx.style.top=kx.style.right=kx.style.bottom="auto";switch(kv){case BMAP_ANCHOR_TOP_LEFT:kx.style.top=kw+"px";kx.style.left=e+"px";break;case BMAP_ANCHOR_TOP_RIGHT:kx.style.top=kw+"px";kx.style.right=e+"px";break;case BMAP_ANCHOR_BOTTOM_LEFT:kx.style.bottom=kw+"px";kx.style.left=e+"px";break;case BMAP_ANCHOR_BOTTOM_RIGHT:kx.style.bottom=kw+"px";kx.style.right=e+"px";break;default:break}var i=["TL","TR","BL","BR"];e6.rc(this._container,"anchor"+i[T]);e6.ac(this._container,"anchor"+i[kv])},getAnchor:function(){return this._opts.anchor},setOffset:function(e){if(!e){return}this._opts=this._opts||{};this._opts.offset=new ji(e.width,e.height);if(!this._container){return}this.setAnchor(this._opts.anchor)},getOffset:function(){return this._opts.offset},getDom:function(){return this._container},show:function(){if(this._visible===true){return}this._visible=true;if(this._container){this._container.style.display=""}this.dispatchEvent(new fS("onshow"))},hide:function(){if(this._visible===false){return}this._visible=false;if(this._container){this._container.style.display="none"}this.dispatchEvent(new fS("onhide"))},isPrintable:function(){return !!this._opts.printable},isVisible:function(){if(!this._container&&!this._map){return false}return !!this._visible},_asyncLoadCode:function(){var e=this;hh.load("control",function(){if(e._asyncDraw){e._asyncDraw()}})}});var ep={TOP_LEFT:0,TOP_RIGHT:1,BOTTOM_LEFT:2,BOTTOM_RIGHT:3};bD.ControlAnchor=ep;window.BMAP_ANCHOR_TOP_LEFT=0;window.BMAP_ANCHOR_TOP_RIGHT=1;window.BMAP_ANCHOR_BOTTOM_LEFT=2;window.BMAP_ANCHOR_BOTTOM_RIGHT=3;function gh(e){gU.call(this);e=e||{};this._opts={printable:false};e6.extend(this._opts,e);this._copyrightCollection=[];this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT;this.defaultOffset=new ji(5,2);this.setAnchor(e.anchor);this._canShow=true;this.sateMapStyle=false;this.blockInfoWindow=false;this._asyncLoadCode()}gh.inherits(gU,"CopyrightControl");e6.extend(gh.prototype,{initialize:function(e){this._map=e;return this._container},addCopyright:function(kv){var e={minZoom:0,bounds:null,content:"",mapType:""};for(var T in kv){e[T]=kv[T]}if(this._map){var ky=e.minZoom;if(ky===-1||ky<this._map.getMinZoom()||ky>this._map.getMaxZoom()){e.minZoom=this._map.getMinZoom()}if(e.mapType!==""&&!es[e.mapType]){e.mapType=BMAPGL_NORMAL_MAP}}var kw=this.getCopyright(kv.id);if(kw){for(var kx in e){kw[kx]=e[kx]}}else{this._copyrightCollection.push(e)}},getCopyright:function(kv){for(var T=0,e=this._copyrightCollection.length;T<e;T++){if(this._copyrightCollection[T].id===kv){return this._copyrightCollection[T]}}},addSateMapStyle:function(){this.sateMapStyle=true;if(this._container){e6.ac(this._container,"BMap_cpyCtrl_w")}},removeSateMapStyle:function(){this.sateMapStyle=false;if(this._container){e6.rc(this._container,"BMap_cpyCtrl_w")}}});function by(e){gU.call(this);e=e||{};this.canCheckSize=e.canCheckSize===false?false:true;this.curCityName="";this.curCityCode="";this.defaultOffset=new ji(10,10);this.defaultAnchor=ep.TOP_LEFT;this.onChangeBefore=[];this.onChangeAfter=[];this.onChangeSuccess=[];this._opts={printable:false,offset:e.offset||this.defaultOffset,anchor:e.anchor||this.defaultAnchor,expand:!!(e.expand)};if(e.onChangeBefore&&bX(e.onChangeBefore)){this.onChangeBefore.push(e.onChangeBefore)}if(e.onChangeAfter&&bX(e.onChangeAfter)){this.onChangeAfter.push(e.onChangeAfter)}if(e.onChangeSuccess&&bX(e.onChangeSuccess)){this.onChangeSuccess.push(e.onChangeSuccess)}this.setAnchor(e.anchor);this._asyncLoadCode();hL.sendMessage(aZ(4,5,3),["control","city"])}by.inherits(gU,"CityListControl");e6.extend(by.prototype,{initialize:function(e){this._map=e;return this._container}});function ku(e){gU.call(this);e=e||{};this._opts={printable:false};this._opts=e6.extend(e6.extend(this._opts,{unit:"metric"}),e);this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT;this.defaultOffset=new ji(81,18);if(b2()){this.defaultOffset=new ji(75,10)}this.setAnchor(e.anchor);this._units={metric:{name:"metric",conv:1,incon:1000,u1:"米",u2:"公里"},us:{name:"us",conv:3.2808,incon:5280,u1:"英尺",u2:"英里"}};this.sateMapStyle=false;if(!this._units[this._opts.unit]){this._opts.unit="metric"}this._scaleText=null;this._numberArray={};this._asyncLoadCode()}window.BMAP_UNIT_METRIC="metric";window.BMAP_UNIT_IMPERIAL="us";ku.inherits(gU,"ScaleControl");e6.extend(ku.prototype,{initialize:function(e){this._map=e;return this._container},setUnit:function(e){this._opts.unit=this._units[e]&&this._units[e].name||this._opts.unit},getUnit:function(){return this._opts.unit},addSateMapStyle:function(){this.sateMapStyle=true;var e=this._container;if(e){e6.ac(e.children[0],"dark")}},removeSateMapStyle:function(){this.sateMapStyle=false;var e=this._container;if(e){e6.rc(e.children[0],"dark")}}});window.BMAP_NAVIGATION_CONTROL_LARGE=0;window.BMAP_NAVIGATION_CONTROL_SMALL=1;window.BMAP_NAVIGATION_CONTROL_PAN=2;window.BMAP_NAVIGATION_CONTROL_ZOOM=3;window.BMAP_NAVIGATION_CONTROL_ANIM=4;function jZ(e){gU.call(this);e=e||{};this._opts={printable:false};e6.extend(this._opts,e);this.controlHeight=[{width:65,height:227,zoomHeight:227,zoomWidth:37,sliderHeight:180},{width:65,height:47,zoomHeight:(this._opts.forceNew===true)?56:47,zoomWidth:37,sliderHeight:0},{width:37,height:57,zoomHeight:0,zoomWidth:0,sliderHeight:0},{width:26,height:56,zoomHeight:56,zoomWidth:6,sliderHeight:0},{width:56,height:47,zoomHeight:47,zoomWidth:37,sliderHeight:180}];this.defaultAnchor=BMAP_ANCHOR_TOP_LEFT;this.defaultOffset=new ji(10,10);this.setAnchor(e.anchor);this.setType(e.type);this._maxTotalZoomLv=19;this._minZoomLevel=-1;this._maxZoomLevel=-1;this._totalZoomLv=-1;this._sliderInterval=10;this._sliderHeight=180;this._minBarY=1;this._maxBarY=-1;this._curBarY=-1;this._zoomDom=null;this._zoomBtnDom=null;this._sliderDom=null;this._sliderBaseDom=null;this._cZIndex="1100";this._asyncLoadCode()}jZ.inherits(gU,"NavigationControl");e6.extend(jZ.prototype,{initialize:function(e){this._map=e;return this._container},setType:function(e){if(typeof e=="number"&&e>=BMAP_NAVIGATION_CONTROL_LARGE&&e<=BMAP_NAVIGATION_CONTROL_ANIM){this._opts.type=e}else{this._opts.type=BMAP_NAVIGATION_CONTROL_LARGE}},getType:function(){return this._opts.type}});function v(i){gU.call(this);i=i||{};this._opts={printable:false};this.defaultAnchor=BMAP_ANCHOR_TOP_RIGHT;this.defaultOffset=new ji(10,10);this.setAnchor(i.anchor);this._opts=e6.extend(e6.extend(this._opts,{offset:this.defaultOffset,enableSwitch:true}),i);var e=this;hh.load("control",function(){e._asyncDraw()})}v.inherits(gU,"MapTypeControl");e6.extend(v.prototype,{initialize:function(e){this._map=e;return this._container},showStreetLayer:function(e){this._map.showStreetLayer(e)}});function ju(e){gU.call(this);e=e||{};this._opts={};this._opts=e6.extend(this._opts,e);this._zoomInDisabled=false;this._zoomOutDisabled=false;this._zoomInTapped=false;this._zoomOutTapped=false;this.defaultAnchor=ep.BOTTOM_RIGHT;this.defaultOffset=new ji(15,20);this.setAnchor(e.anchor);this._asyncLoadCode()}ju.inherits(gU,"ZoomControl");e6.extend(ju.prototype,{initialize:function(e){this._map=e;return this._container}});function gA(e){gU.call(this);e=e||{};this._opts={autoZoom:true,autoViewport:true};this._opts=e6.extend(this._opts,e);this.defaultAnchor=ep.BOTTOM_LEFT;this.defaultOffset=new ji(10,50);this.watchPosition=this._opts.watchPosition||false;this.useCompass=this._opts.useCompass||false;this.locMarker=null;this.locLevel=16;this.setAnchor(this._opts.anchor);this.onLocationStart=e.onLocationStart||null;this._asyncLoadCode()}gA.inherits(gU,"LocationControl");e6.extend(gA.prototype,{initialize:function(e){this._map=e;return this._container},startLocation:function(){this._startLocationCalled=true},stopLocationTrace:function(){},setOptions:function(e){e=e||{};e6.extend(this._opts,e)}});function bG(e){gU.call(this);e=e||{};this._opts={};this._opts=e6.extend(this._opts,e);this.defaultAnchor=ep.BOTTOM_LEFT;this.defaultOffset=new ji(5,15);if(b2()){this.defaultOffset=new ji(10,10)}this.setAnchor(e.anchor)}bG.inherits(gU,"LogoControl");e6.extend(bG.prototype,{initialize:function(i){this._map=i;var e=this._container=document.createElement("div");e.innerHTML='<img src="'+C.apiHost+'/images/logo_hd.png"  style="height:21px;width:62px;"/>';i.getContainer().appendChild(e);return e}});function av(e,i){this._map=e;this._indoorInfo=i;this._visible=true;this._adjustVisible=true;this._isMobile=b2();this._sizeConfig={FLOOR_BTN_HEIGHT:this._isMobile?35:26,SWITCH_ARROW_HEIGHT:this._isMobile?20:15};this._init()}av.prototype._init=function(){this._render();this._bindDom();this._bind();this._adjustDisplayHeight();var e=new fS("onindoor_bar_show");e.uid=this._indoorInfo.uid;e.floors=this._indoorInfo.floors;this._map.dispatchEvent(e)};av.prototype._render=function(){if(!this._indoorInfo){return}var kz=this._isMobile;var e=this._div=b3("div");e6.ac(e,"floor-select-container");kz&&e6.ac(e,"mobile");kz&&e6.ac(e,"all-border-radius");var i=this._btnTop=b3("button");e6.ac(i,"floor-switch-top");e6.ac(i,"top-border-radius");var kx=b3("div");e6.ac(kx,"floor-switch-top-icon");i.appendChild(kx);var kw=this._btnBottom=b3("button");var T=b3("div");e6.ac(T,"floor-switch-bottom-icon");kw.appendChild(T);e6.ac(kw,"floor-switch-bottom");e6.ac(kw,"bottom-border-radius");var kv=this._floorsContainer=b3("div");e6.ac(kv,"floors-container");kv.appendChild(this._createFloorsDom());this._div.appendChild(i);this._div.appendChild(kv);this._div.appendChild(kw);var kA=0;if(this._btnTop.style.display===""){kA=2*this._sizeConfig.SWITCH_ARROW_HEIGHT}this._div.style.height=parseInt(this._floorsContainer.style.height,10)+kA+"px";this._map.getContainer().appendChild(this._div);if(!kz){var ky=this;setTimeout(function(){ky._div.style.right="20px"},20)}};av.prototype._createFloorsDom=function(){if(!this._indoorInfo){return}var T=this._ol=b3("ol");var kx=this._indoorInfo.currentFloor;for(var kw=this._indoorInfo.floors.length-1;kw>=0;kw--){var ky=this._indoorInfo.floors[kw].floorName;var e=b3("li");var kv=b3("button");e6.ac(kv,"btn-select-floor");if(kw===kx){e6.ac(kv,"selected")}kv.setAttribute("data-floor",kw);kv.innerHTML=ky;e.appendChild(kv);T.appendChild(e)}return T};av.prototype._updateUI=function(){if(!this._ol){this._render();this._bind();this._adjustDisplayHeight();return}this._ol=null;this._ol=this._createFloorsDom();this._floorsContainer.innerHTML="";this._floorsContainer.appendChild(this._ol);this._adjustDisplayHeight()};av.prototype._bindDom=function(){var e=this;e6.on(this._floorsContainer,"click",function(kv){var T=kv.target||kv.srcElement;if(T.tagName.toLowerCase()==="button"){e._map.showIndoor(e._indoorInfo.uid,parseInt(T.getAttribute("data-floor"),10));var i=new fS("onindoor_bar_click");i.uid=e._indoorInfo.uid;e._map.dispatchEvent(i)}});e6.on(this._floorsContainer,"mouseover",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){e6.ac(i,"hover")}});e6.on(this._floorsContainer,"mouseout",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){e6.rc(i,"hover")}});e6.on(this._floorsContainer,"touchstart",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){e6.ac(i,"onmousedown")}});e6.on(this._floorsContainer,"touchend",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){e6.rc(i,"onmousedown")}});e6.on(this._btnTop,"mouseover",function(i){if(this._disable){return}e6.ac(this,"hover")});e6.on(this._btnTop,"mouseout",function(i){e6.rc(this,"hover")});e6.on(this._btnBottom,"mouseover",function(i){if(this._disable){return}e6.ac(this,"hover")});e6.on(this._btnBottom,"mouseout",function(i){e6.rc(this,"hover")});e6.on(this._btnTop,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}e6.ac(this,"onmousedown")});e6.on(this._btnTop,"touchend",function(i){e6.rc(this,"onmousedown")});e6.on(this._btnBottom,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}e6.ac(this,"onmousedown")});e6.on(this._btnBottom,"touchend",function(i){e6.rc(this,"onmousedown")});e6.on(this._btnTop,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)+26)});e6.on(this._btnBottom,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)-26)});e6.on(this._div,"mousemove",aj);e6.on(this._div,"wheel",hD);e6.on(this._div,"mousewheel",hD);this._map.addEventListener("resize",function(){e._adjustDisplayHeight()})};av.prototype._adjustDisplayHeight=function(){if(!this._indoorInfo){return}var kx=this._map.getSize().height;var ky=this._sizeConfig.FLOOR_BTN_HEIGHT;var kz=kx-291-100;if(this._isMobile){kz=kx-12-108-this._map.config.bottomOffset}var e=this._indoorInfo.floors.length;var T=e*ky;var kv=e;var kB=0;var kC=this._floorsContainer.children[0];if(T>kz){this._showArrow=true;e6.rc(kC.children[0].children[0],"top-border-radius");e6.rc(kC.children[e-1].children[0],"bottom-border-radius")}else{this._showArrow=false;e6.ac(kC.children[0].children[0],"top-border-radius");e6.ac(kC.children[e-1].children[0],"bottom-border-radius")}while(T>kz){if(kv===0){break}kv--;kB=2*this._sizeConfig.SWITCH_ARROW_HEIGHT;T=kv*ky+kB}this._currentDisplayHeight=T;if(kv<3){this._setAdjustVisbile(false)}else{this._setAdjustVisbile(true)}this._floorsContainer.style.height=kv*ky+"px";var kw=this._indoorInfo.currentFloor;var i=e-kw;var kA=kw-1;this._div.style.height=parseInt(this._floorsContainer.style.height,10)+kB+"px";var kD=-(e-(kw+Math.round(kv/2)))*ky;this._setBarSliderTop(kD);if(kv<e){e6.show(this._btnTop);e6.show(this._btnBottom)}else{e6.hide(this._btnTop);e6.hide(this._btnBottom);this._setBarSliderTop(0)}if(this._isMobile){this._div.style.bottom=108+this._map.config.bottomOffset+"px"}};av.prototype._setBarSliderTop=function(kv){var T=26;var i=this._indoorInfo.floors.length;var e=i*T;if(this._currentDisplayHeight){if(this._showArrow){e=this._currentDisplayHeight-30}else{e=this._currentDisplayHeight}}if(e-kv>=i*T){kv=e-i*T;e6.ac(this._btnBottom,"disable");e6.rc(this._btnBottom,"hover");this._btnBottom._disable=true}else{e6.rc(this._btnBottom,"disable");this._btnBottom._disable=false}if(kv>=0){kv=0;e6.ac(this._btnTop,"disable");e6.rc(this._btnTop,"hover");this._btnTop._disable=true}else{e6.rc(this._btnTop,"disable");this._btnTop._disable=false}this._ol.style.top=kv+"px"};av.prototype._setAdjustVisbile=function(e){if(this._adjustVisible===e){return}this._adjustVisible=e;if(e&&this._visible){this._div.style.right="20px"}else{this._div.style.right="-30px"}};av.prototype._bind=function(){var i=this._map;var e=this;i.on("indoor_status_changed",function(kz){if(e._visible===false){return}var T=e._ol;var kx=kz.uid;if(!kx){return}var ky=kz.floor;for(var kw=0;kw<T.children.length;kw++){var kv=T.children[kw].children[0];if(parseInt(kv.getAttribute("data-floor"),10)===ky){e6.ac(kv,"selected")}else{e6.rc(kv,"selected")}}});i.on("zoomend",function(T){if(this.getZoom()<17){e._setAdjustVisbile(false)}else{e._setAdjustVisbile(true)}})};av.prototype.setInfo=function(e){if(this._indoorInfo&&this._indoorInfo.uid===e.uid){return}this._indoorInfo=e;this._updateUI()};av.prototype.show=function(){if(this._visible===true){return}this._visible=true;if(!this._isMobile){this._div.style.right="20px"}else{this._div.style.display=""}var e=new fS("onindoor_bar_show");e.uid=this._indoorInfo.uid;e.floors=this._indoorInfo.floors;this._map.dispatchEvent(e)};av.prototype.hide=function(){if(this._visible===false){return}this._visible=false;if(!this._isMobile){this._div.style.right="-30px"}else{this._div.style.display="none"}};function e8(e){this._opts=e||{};this.defaultOffset=new ji(2,80);this.defaultAnchor=BMAP_ANCHOR_TOP_RIGHT;if(this._opts.anchor===undefined){this.setAnchor(this.defaultAnchor)}else{this.setAnchor(this._opts.anchor)}this._firstAnimation=true}e8.inherits(gU,"NavigationControl3D");e6.extend(e8.prototype,{initialize:function(T){this._map=T;this._createDom();this._bindDom();this._bind();if(!b2()){this._headingControl=new iW(this._map,this._div)}this._tiltControl=new cY(this._map,this._div);this._render();var i=this._map.getMapType();var e=this;if(i==="B_EARTH_MAP"||this._map._renderType==="webgl"){e._div.style.opacity="1";e._div.style.visibility="visible"}else{e._div.style.opacity="0";e._div.style.visibility="hidden"}return this._container},_createDom:function(){var i=this._div=document.createElement("div");this._container=i;var e=i.style;e.position="absolute";e.zIndex=5;e.width="52px";e.height="82px";e.right="-3px";e.bottom="79px";e.opacity="0";e.visibility="hidden";e.WebkitTransition=e.transition="opacity .3s ease-out,visibility .3s ease-out"},_render:function(){var e=document.getElementById("map-operate");if(e){e.appendChild(this._div)}else{this._map.getContainer().appendChild(this._div)}},_bindDom:function(){this._div.addEventListener("mousemove",aj)},_bind:function(){if(this._map._renderType==="webgl"){return}var e=this;this._map.on("maptypechange",function(){if(this.mapType==="B_EARTH_MAP"){if(e._firstAnimation){e._firstAnimation=false;setTimeout(function(){e._div.style.opacity="1";e._div.style.visibility="visible"},300)}else{e._div.style.opacity="1";e._div.style.visibility="visible"}}else{e._div.style.opacity="0";e._div.style.visibility="hidden"}})}});function iW(T,i){this._map=T;this._target=T;var kv=T.temp.originMapType||T.mapType;if(kv==="B_EARTH_MAP"&&T._earth){this._target=T._earth}this._outContainer=i||T.getContainer();this._imgRatio=gp()>=h0.HIGH_RES_MIN_RATIO?2:1;this._imgPath=C.imgPath+"earth-navi-control-pc4"+(this._imgRatio===2?"-2x.png":".png");this._enabled=true;var e=this;this._setHeadingOptions={callback:function(){e._target.setLock(false)}};this._init()}e6.extend(iW.prototype,{_init:function(){this._createDom();this._render();this._bindDom();this._bind();this._updateUI();this._checkEnable()},_checkEnable:function(){if(this._target.getZoom()>=this._target._enableHeadingZoom){this.enable()}else{this.disable()}},_createDom:function(){var i=this._div=b3("div");var e=i.style;e.position="absolute";e.zIndex=5;e.top="0";e.left="0";e.width="52px";e.height="54px";e.background="url("+this._imgPath+") no-repeat";e.backgroundSize="266px auto";this._rotateCCW=this._createButton();this._rotateCCW.title="逆时针转动";e=this._rotateCCW.style;e.left="2px";e.top="5px";e.zIndex="1";e.width="15px";e.height="42px";e.backgroundPosition="-75px -5px";this._rotateCW=this._createButton();this._rotateCW.title="顺时针转动";e=this._rotateCW.style;e.right="2px";e.top="5px";e.zIndex="1";e.width="15px";e.height="42px";e.backgroundPosition="-75px -5px";e.WebkitTransform=e.transform="scaleX(-1)";this._compass=this._createButton();this._compass.title="恢复正北方向";e=this._compass.style;e.left="19px";e.top="4px";e.width="14px";e.height="44px";e.backgroundPosition="-56px -4px";e.WebkitTransform=e.transform="rotate(0deg)";this._div.appendChild(this._rotateCCW);this._div.appendChild(this._compass);this._div.appendChild(this._rotateCW);this._domRendered=true},_createButton:function(){var e=b3("button");var i=e.style;i.position="absolute";i.outline="none";i.border="none";i.background="url("+this._imgPath+") no-repeat";i.backgroundSize="266px auto";i.cursor="pointer";return e},_render:function(){this._outContainer.appendChild(this._div)},enable:function(){this._enabled=true;if(this._domRendered){this._rotateCCW.style.cursor="pointer";this._rotateCCW.style.opacity=1;this._rotateCW.style.cursor="pointer";this._rotateCW.style.opacity=1;this._compass.style.cursor="pointer";this._compass.style.opacity=1}},disable:function(){this._enabled=false;if(this._domRendered){this._rotateCCW.style.cursor="";this._rotateCCW.style.opacity=0.4;this._rotateCW.style.cursor="";this._rotateCW.style.opacity=0.4;this._compass.style.cursor="";this._compass.style.opacity=0.4}},_bindDom:function(){iP(this._div,["mousedown","click","dblclick"]);var i=this._map;var e=this;this._rotateCW.addEventListener("click",function(){if(e._isOperating||e._enabled===false){return}if(e._target.getLock()){return}if(e._target.getHeading()===360){e._target.setHeading(0)}e._target.setLock(true);e._target.setHeading(e._target.getHeading()+90,e._setHeadingOptions);i.fire(new fS("onrotatecwclick"))},false);this._rotateCCW.addEventListener("click",function(){if(e._isOperating||e._enabled===false){return}if(e._target.getLock()){return}if(e._target.getHeading()===-360){e._target.setHeading(0)}e._target.setLock(true);e._target.setHeading(e._target.getHeading()-90,e._setHeadingOptions);i.fire(new fS("onrotateccwclick"))},false);this._rotateCW.addEventListener("mouseover",function(){if(e._enabled===false){return}this.style.backgroundPosition="-89px -5px"},false);this._rotateCW.addEventListener("mouseout",function(){if(e._enabled===false){return}this.style.backgroundPosition="-75px -5px"},false);this._rotateCCW.addEventListener("mouseover",function(){if(e._enabled===false){return}this.style.backgroundPosition="-89px -5px"},false);this._rotateCCW.addEventListener("mouseout",function(){if(e._enabled===false){return}this.style.backgroundPosition="-75px -5px"},false);this._compass.addEventListener("click",function(){if(e._isOperating||e._enabled===false){return}if(e._target.getLock()){return}e._target.setLock(true);var T=false;if(e._target.getTilt()!==0){T=true;e._target.setTilt(0,e._setHeadingOptions)}if(e._target.getHeading()%360!==0){T=true;e._target.resetHeading(e._setHeadingOptions)}if(!T){e._target.setLock(false)}i.fire(new fS("oncompassclick"))},false)},_bind:function(){var e=this;this._bindTarget(this._target);if(this._map._renderType==="webgl"){this._map.addEventListener("maptypechange",function(i){if(this.mapType==="B_EARTH_MAP"){e._target=e._map._earth}else{e._target=e._map}e._bindTarget(e._target);e._checkEnable()})}},_bindTarget:function(i){if(i===this._map&&this._mapBinded){return}if(i===this._map._earth&&this._earthBinded){return}var e=this;i.addEventListener("heading_changed",function(T){e._updateUI()});i.addEventListener("animation_start",function(T){e._isOperating=true});i.addEventListener("animation_end",function(T){e._isOperating=false});i.on("load",function(){e._checkEnable()});i.on("zoom_changed",function(){e._checkEnable()});if(i===this._map){this._mapBinded=true}else{this._earthBinded=true}},_updateUI:function(){var e=this._target.getHeading();var i=this._compass.style;i.WebkitTransform=i.transform="rotate("+e+"deg)"},hide:function(){this._div.style.display="none"},show:function(){this._div.style.display="block"}});function cY(T,i){this._map=T;this._target=T;var kv=T.temp.originMapType||T.mapType;if(kv==="B_EARTH_MAP"&&T._earth){this._target=T._earth}this._outContainer=i||T.getContainer();this._imgRatio=gp()>=h0.HIGH_RES_MIN_RATIO?2:1;this._imgPath=C.imgPath+"gl-navi-control-pc4"+(this._imgRatio===2?"-2x.png":".png");this._enabled=true;var e=this;this._setTiltOptions={callback:function(){e._target.setLock(false)}};this._init()}e6.extend(cY.prototype,{_init:function(){this._createDom();this._render();this._bindDom();this._bind();this._checkEnable()},_checkEnable:function(){if(this._target.getZoom()>=this._target._enableTiltZoom){this.enable()}else{this.disable()}},_createDom:function(){var e=this._div=b3("button");e.title="倾斜";var i=e.style;i.position="absolute";i.zIndex=5;i.outline="none";i.border="none";i.cursor="pointer";i.width="26px";i.height="26px";i.top="56px";i.right="13px";i.background="url("+this._imgPath+") no-repeat #fff";i.backgroundSize="266px auto";i.backgroundPosition="-110px 1px";i.boxShadow="1px 2px 1px rgba(0, 0, 0, 0.15)"},enable:function(){this._enabled=true;if(this._div){this._div.style.cursor="pointer"}this._updateUI()},disable:function(){this._enabled=false;if(this._div){this._div.style.cursor=""}this._updateUI()},_render:function(){this._outContainer.appendChild(this._div)},_bindDom:function(){var e=this;this._div.addEventListener("mousedown",function(kv){if(!e._enabled){return}if(e._target.getLock()){return}var i=e._target.getTilt();var T;if(i===e._map.getCurrentMaxTilt()){T="out"}else{if(i===0){T="in"}else{T=e._preTrend?e._preTrend:"in"}}e._curTrend=T;e._clickTimer=setTimeout(function(){e._map.fire(new fS("ontiltmsdown"));e._tiltAni=new fH({duration:9999999,render:function(kw){i=e._target.getTilt();if(T==="in"&&i<e._map.getCurrentMaxTilt()){e._target.setTilt(i+1,{noAnimation:true})}else{if(T==="out"&&i>0){e._target.setTilt(i-1,{noAnimation:true})}}},finish:function(){e._tiltAni=null}});e._clickTimer=null},200);kv.stopPropagation()},false);this._div.addEventListener("mouseup",function(i){if(!e._enabled){return}if(e._tiltAni){e._tiltAni.stop()}e._preTrend=e._curTrend},false);this._div.addEventListener("click",function(kv){if(!e._enabled){return}if(!e._clickTimer){return}if(e._target.getLock()){return}clearTimeout(e._clickTimer);e._map.fire(new fS("ontiltclick"));var i=e._target.getTilt();e._target.setLock(true);kv.stopPropagation();var T=e._map.getCurrentMaxTilt();if(e._curTrend==="in"){e._target.setTilt(T,e._setTiltOptions)}else{if(e._curTrend==="out"){e._target.setTilt(0,e._setTiltOptions)}else{if(i<T){e._target.setTilt(T,e._setTiltOptions)}else{e._target.setTilt(0,e._setTiltOptions)}}}},false);this._div.addEventListener("mouseover",function(i){if(!e._enabled){return}e._mouseOver=true;e._updateUI()},false);this._div.addEventListener("mouseout",function(i){if(!e._enabled){return}e._mouseOver=false;e._updateUI()},false);iP(this._div,["mousedown","click","dblclick"])},_bind:function(){var e=this;var i=this._map;this._bindTarget(this._target);if(this._map._renderType==="webgl"){this._map.addEventListener("maptypechange",function(T){if(this.mapType==="B_EARTH_MAP"){e._target=e._map._earth}else{e._target=e._map}e._bindTarget(e._target);e._checkEnable()})}},_bindTarget:function(i){if(i===this._map&&this._mapBinded){return}if(i===this._map._earth&&this._earthBinded){return}var e=this;i.on("load",function(){e._checkEnable()});i.on("zoom_changed",function(){e._checkEnable()});i.on("tilt_changed",function(){e._updateUI()});if(i===this._map){this._mapBinded=true}else{this._earthBinded=true}},_updateUI:function(){var T=this._target.getTilt();var i=0;var kv=0;var e=0;if(T>0){i=78}if(this._mouseOver){e=52}if(this._enabled===false){kv=26;e=0;i=0}var kw="-"+(110+i+kv+e)+"px 1px";this._div&&(this._div.style.backgroundPosition=kw);if(this._enabled){if(T>0){this._div&&(this._div.title="恢复")}else{this._div&&(this._div.title="倾斜")}}else{this._div&&(this._div.title="请放大地图后操作")}},hide:function(){this._div.style.display="none"},show:function(){this._div.style.display="block"}});function hB(i){de.call(this);this._opts={container:null,cursor:"default",marker:true};this._opts=e6.extend(this._opts,i);this._type="contextmenu";this._map=null;this._container;this._left=0;this._top=0;this._items=[];this._rItems=[];this._dividers=[];this._enable=true;this.curPixel=null;this.curPoint=null;this._isOpen=false;var e=this;hh.load("menu",function(){e._draw()});hL.sendMessage(aZ(4,5,2),["control","menu"])}hB.inherits(de,"ContextMenu");e6.extend(hB.prototype,{initialize:function(i,e){this._map=i;this._overlay=e||null},remove:function(){this._map=this._overlay=null},addItem:function(kw,e){if(!kw||kw._type!="menuitem"||kw._text==""||kw._width<=0){return}for(var kv=0,T=this._items.length;kv<T;kv++){if(this._items[kv]===kw){return}}if(e===undefined||e>this._items.length-1){e=-1}kw._insertIndex=e;if(e===-1){this._items.push(kw);this._rItems.push(kw)}else{this._items.splice(e,0,kw);this._rItems.splice(e,0,kw)}},removeItem:function(kv){if(!kv||kv._type!="menuitem"){return}for(var T=0,e=this._items.length;T<e;T++){if(this._items[T]===kv){this._items[T].remove();this._items.splice(T,1);delete kv._insertIndex;e--}}for(var T=0,e=this._rItems.length;T<e;T++){if(this._rItems[T]===kv){this._rItems[T].remove();this._rItems.splice(T,1);delete kv._insertIndex;e--}}},addSeparator:function(e){if(e===undefined||e>this._items.length-1){e=-1}var i={_type:"divider",_dIndex:this._dividers.length,_insertIndex:e};this._dividers.push({dom:null});if(e===-1){this._items.push(i)}else{this._items.splice(e,0,i)}},removeSeparator:function(T){if(!this._dividers[T]){return}for(var kv=0,e=this._items.length;kv<e;kv++){if(this._items[kv]&&this._items[kv]._type=="divider"&&this._items[kv]._dIndex==T){this._items.splice(kv,1);e--}if(this._items[kv]&&this._items[kv]._type=="divider"&&this._items[kv]._dIndex>T){this._items[kv]._dIndex--}}this._dividers.splice(T,1)},getDom:function(){return this._container},show:function(){if(this._isOpen==true){return}this._isOpen=true},hide:function(){if(this._isOpen==false){return}this._isOpen=false},setCursor:function(e){if(!e){return}this._opts.cursor=e},getItem:function(e){return this._rItems[e]},enable:function(){this._enable=true},disable:function(){this._enable=false}});function ic(T,kv,i){if(!T||!kv||typeof kv!="function"){return}de.call(this);this._opts={width:100,id:""};i=i||{};this._opts.width=(i.width*1)?i.width:100;this._opts.id=i.id?i.id:"";this._text=T+"";this._callback=kv;this._map=null;this._type="menuitem";this._contextmenu=null;this._container=null;this._enabled=true;var e=this;hh.load("menu",function(){e._draw()})}ic.inherits(de,"MenuItem");e6.extend(ic.prototype,{initialize:function(e,i){this._map=e;this._contextmenu=i},remove:function(){this._contextmenu=null;this._map=null},setText:function(e){if(!e){return}this._text=e+""},getDom:function(){return this._container},enable:function(){this._enabled=true},disable:function(){this._enabled=false}});function ie(e,i){this.setSouthWest(e);this.setNorthEast(i)}e6.extend(ie.prototype,{isEmpty:function(){return this.sw===null&&this.ne===null},equals:function(e){if(!e||e.isEmpty()||this.isEmpty()){return false}return this.sw.equals(e.sw)&&this.ne.equals(e.ne)},containsBounds:function(e){if(!e||e.isEmpty()||this.isEmpty()){return false}return(e.sw.lng>this.sw.lng&&e.ne.lng<this.ne.lng&&e.sw.lat>this.sw.lat&&e.ne.lat<this.ne.lat)},getCenter:function(){if(this.isEmpty()){return null}return new cD((this.sw.lng+this.ne.lng)/2,(this.sw.lat+this.ne.lat)/2)},intersects:function(T){if(!T||T.isEmpty()||this.isEmpty()){return null}if(Math.max(T.sw.lng,T.ne.lng)<Math.min(this.sw.lng,this.ne.lng)||Math.min(T.sw.lng,T.ne.lng)>Math.max(this.sw.lng,this.ne.lng)||Math.max(T.sw.lat,T.ne.lat)<Math.min(this.sw.lat,this.ne.lat)||Math.min(T.sw.lat,T.ne.lat)>Math.max(this.sw.lat,this.ne.lat)){return null}var kw=Math.max(this.sw.lng,T.sw.lng);var i=Math.min(this.ne.lng,T.ne.lng);var kv=Math.max(this.sw.lat,T.sw.lat);var e=Math.min(this.ne.lat,T.ne.lat);return new ie(new cD(kw,kv),new cD(i,e))},setMinMax:function(){this.minX=this.sw?this.sw.lng:null;this.minY=this.sw?this.sw.lat:null;this.maxX=this.ne?this.ne.lng:null;this.maxY=this.ne?this.ne.lat:null},containsPoint:function(e){if(!e){return}return(e.lng>=this.sw.lng&&e.lng<=this.ne.lng&&e.lat>=this.sw.lat&&e.lat<=this.ne.lat)},extend:function(e){if(!e){return}var i=e.lng;var T=e.lat;if(!this.sw){this.sw=e.clone()}if(!this.ne){this.ne=e.clone()}if(this.sw.lng>i){this.sw.lng=i}if(this.ne.lng<i){this.ne.lng=i}if(this.sw.lat>T){this.sw.lat=T}if(this.ne.lat<T){this.ne.lat=T}},getMin:function(){return this.sw},getMax:function(){return this.ne},getSouthWest:function(){return this.sw},getNorthEast:function(){return this.ne},setSouthWest:function(e){this.sw=e?e.clone():null},setNorthEast:function(e){this.ne=e?e.clone():null},clone:function(){return new ie(this.sw,this.ne)},toSpan:function(){if(this.isEmpty()){return new ji(0,0)}return new ji(Math.abs(this.ne.lng-this.sw.lng),Math.abs(this.ne.lat-this.sw.lat))},div:function(e){if(!e||e.isEmpty()||this.isEmpty()){return 0}return((this.ne.lng-this.sw.lng)*(this.ne.lat-this.sw.lat))/((e.ne.lng-e.sw.lng)*(e.ne.lat-e.sw.lat))},makeNormalizedPoint:function(e){this.normalizedTopLeft=this.pointTopLeft.clone();this.normalizedTopRight=this.pointTopRight.clone();this.normalizedBottomRight=this.pointBottomRight.clone();this.normalizedBottomLeft=this.pointBottomLeft.clone();while(e<0){e+=360}e=e%360;if(e>=0&&e<90||e>=270&&e<360){if(this.normalizedTopRight.lng<this.normalizedTopLeft.lng){this.normalizedTopRight.lng+=h0.WORLD_SIZE_MC}if(this.normalizedBottomRight.lng<this.normalizedBottomLeft.lng){this.normalizedBottomRight.lng+=h0.WORLD_SIZE_MC}}else{if(this.normalizedTopLeft.lng<this.normalizedTopRight.lng){this.normalizedTopLeft.lng+=h0.WORLD_SIZE_MC}if(this.normalizedBottomLeft.lng<this.normalizedBottomRight.lng){this.normalizedBottomLeft.lng+=h0.WORLD_SIZE_MC}}},toString:function(){return"Bounds"}});function cD(e,i){if(isNaN(e)){e=dr(e);e=isNaN(e)?0:e}if(typeof e==="string"){e=parseFloat(e)}if(isNaN(i)){i=dr(i);i=isNaN(i)?0:i}if(typeof i==="string"){i=parseFloat(i)}this.lng=e;this.lat=i}cD.prototype.equals=function(i){if(!i){return false}var kv=Math.abs(this.lat-i.lat);var T=Math.abs(this.lng-i.lng);var e=1e-8;if(kv<e&&T<e){return true}return false};cD.prototype.similar=function(i){if(!i){return false}var kv=Math.abs(this.lat-i.lat);var T=Math.abs(this.lng-i.lng);var e=0.00001;if(kv<e&&T<e){return true}return false};cD.prototype.clone=function(){return new cD(this.lng,this.lat)};cD.prototype.add=function(e){return new cD(this.lng+e.lng,this.lat+e.lat)};cD.prototype.sub=function(e){return new cD(this.lng-e.lng,this.lat-e.lat)};cD.prototype.mult=function(e){return new cD(this.lng*e,this.lat*e)};cD.prototype.div=function(e){return new cD(this.lng/e,this.lat/e)};cD.prototype.mag=function(){return Math.sqrt(this.lng*this.lng+this.lat*this.lat)};cD.prototype.toString=function(){return"Point"};cD.serialize=function(i,e){return[i.lng,i.lat]};cD.deserialize=function(e){return new cD(e[0],e[1])};cD.prototype.toGeoJSON=function(){var i="Point";var T=[this.lng,this.lat];var e={type:"Feature",geometry:{type:i,coordinates:T},properties:this.properties};return e};function jr(){}e6.extend(jr,{EARTHRADIUS:6370996.81,MCBAND:[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],LLBAND:[86,60,45,30,15,0],MC2LL:[[1.410526172116255e-8,0.00000898305509648872,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-0.03801003308653,17337981.2],[-7.435856389565537e-9,0.000008983055097726239,-0.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,10260144.86],[-3.030883460898826e-8,0.00000898305509983578,0.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,0.32710905363475,6856817.37],[-1.981981304930552e-8,0.000008983055099779535,0.03278182852591,40.31678527705744,0.65659298677277,-4.44255534477492,0.85341911805263,0.12923347998204,-0.04625736007561,4482777.06],[3.09191371068437e-9,0.000008983055096812155,0.00006995724062,23.10934304144901,-0.00023663490511,-0.6321817810242,-0.00663494467273,0.03430082397953,-0.00466043876332,2555164.4],[2.890871144776878e-9,0.000008983055095805407,-3.068298e-8,7.47137025468032,-0.00000353937994,-0.02145144861037,-0.00001234426596,0.00010322952773,-0.00000323890364,826088.5]],LL2MC:[[-0.0015702102444,111320.7020616939,1704480524535203,-10338987376042340,26112667856603880,-35149669176653700,26595700718403920,-10725012454188240,1800819912950474,82.5],[0.0008277824516172526,111320.7020463578,647795574.6671607,-4082003173.641316,10774905663.51142,-15171875531.51559,12053065338.62167,-5124939663.577472,913311935.9512032,67.5],[0.00337398766765,111320.7020202162,4481351.045890365,-23393751.19931662,79682215.47186455,-115964993.2797253,97236711.15602145,-43661946.33752821,8477230.501135234,52.5],[0.00220636496208,111320.7020209128,51751.86112841131,3796837.749470245,992013.7397791013,-1221952.21711287,1340652.697009075,-620943.6990984312,144416.9293806241,37.5],[-0.0003441963504368392,111320.7020576856,278.2353980772752,2485758.690035394,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-0.0003218135878613132,111320.7020701615,0.00369383431289,823725.6402795718,0.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,0.37238884252424,7.45]],getDistanceByMC:function(kx,kv){if(!kx||!kv){return 0}var i;var kw;var e;var T;kx=this.convertMC2LL(kx);if(!kx){return 0}i=iS(kx.lng);kw=iS(kx.lat);kv=this.convertMC2LL(kv);if(!kv){return 0}e=iS(kv.lng);T=iS(kv.lat);return this.getDistance(i,e,kw,T)},getDistanceByLL:function(kx,kv){if(!kx||!kv){return 0}kx.lng=this.getLoop(kx.lng,-180,180);kx.lat=this.getRange(kx.lat,-80,84);kv.lng=this.getLoop(kv.lng,-180,180);kv.lat=this.getRange(kv.lat,-80,84);var i;var e;var kw;var T;i=iS(kx.lng);kw=iS(kx.lat);e=iS(kv.lng);T=iS(kv.lat);return this.getDistance(i,e,kw,T)},proximityCovertMC2LL:function(e){if(e===null){return e}if(e.lng<180&&e.lng>-180&&e.lat<90&&e.lat>-90){return e}return this.convertMC2LL(e)},convertMC2LL:function(e){if(e===null){return e}if(!e){return new cD(0,0)}var T;var kw;T=new cD(Math.abs(e.lng),Math.abs(e.lat));for(var kv=0;kv<this.MCBAND.length;kv++){if(T.lat>=this.MCBAND[kv]){kw=this.MC2LL[kv];break}}var kx=this.convertor(e,kw);return new cx(kx.lat,kx.lng)},convertLL2MC:function(ky){if(!ky){return new cD(0,0)}var kA=ky.lat;var kv=ky.lng;kv=this.getLoop(ky.lng,-180,180);kA=ch(kA,-85,85);var kx;for(var kw=0;kw<this.LLBAND.length;kw++){if(kA>=this.LLBAND[kw]){kx=this.LL2MC[kw];break}}if(!kx){for(kw=0;kw<this.LLBAND.length;kw++){if(kA<=-this.LLBAND[kw]){kx=this.LL2MC[kw];break}}}var T=new cD(kv,kA);var kz=this.convertor(T,kx);var e=new cD(kz.lng,kz.lat);e.latLng=new cx(ky.lat,ky.lng);return e},convertor:function(T,kv){if(!T||!kv){return}var e=kv[0]+kv[1]*Math.abs(T.lng);var i=Math.abs(T.lat)/kv[9];var kw=kv[2]+kv[3]*i+kv[4]*i*i+kv[5]*i*i*i+kv[6]*i*i*i*i+kv[7]*i*i*i*i*i+kv[8]*i*i*i*i*i*i;e*=(T.lng<0?-1:1);kw*=(T.lat<0?-1:1);return new cD(e,kw)},getDistance:function(i,e,kv,T){return this.EARTHRADIUS*Math.acos((Math.sin(kv)*Math.sin(T)+Math.cos(kv)*Math.cos(T)*Math.cos(e-i)))},getRange:function(T,i,e){if(i!=null){T=Math.max(T,i)}if(e!=null){T=Math.min(T,e)}return T},getLoop:function(T,i,e){while(T>e){T-=e-i}while(T<i){T+=e-i}return T},tileToBoundRange:function(T){var i=T.col;var kC=T.row;var kB=T.baseTileSize;var kz=Math.pow(2,(18-T.zoom));var kx={lbx:i*kB,lby:kC*kB,rtx:(i+1)*kB,rty:(kC+1)*kB};var e={lbx:kx.lbx*kz,lby:kx.lby*kz,rtx:kx.rtx*kz,rty:kx.rty*kz};var kA=new cD(e.lbx,e.lby);var kw=new cD(e.rtx,e.rty);var kv=this.convertMC2LL(kA);var ky=this.convertMC2LL(kw);return{MC:new ie(kA,kw),LL:new ie(kv,ky)}}});e6.extend(jr.prototype,{lnglatToMercator:function(e){return jr.convertLL2MC(e)},lngLatToPoint:function(e){var i=jr.convertLL2MC(e);return new fr(i.lng,i.lat)},mercatorToLnglat:function(e){return jr.convertMC2LL(e)},pointToLngLat:function(i){var e=new cD(i.x,i.y);var T=jr.convertMC2LL(e);return new cx(T.lat,T.lng)},pointToPixel:function(i,kx,kw,kv){if(!i){return}i=this.lnglatToMercator(i);var T=this.getZoomUnits(kx);var e=Math.round((i.lng-kw.lng)/T+kv.width/2);var ky=Math.round((kw.lat-i.lat)/T+kv.height/2);return new fr(e,ky)},mercatorToPixel:function(kx,kw,kv,T){if(!kx){return}var i=this.getZoomUnits(kw);var e=Math.round((kx.lng-kv.lng)/i+T.width/2);var ky=Math.round((kv.lat-kx.lat)/i+T.height/2);return new fr(e,ky)},pixelToPoint:function(kv,ky,kx,kw){if(!kv){return}var i=this.getZoomUnits(ky);var T=kx.lng+i*(kv.x-kw.width/2);var kz=kx.lat-i*(kv.y-kw.height/2);var e=new cD(T,kz);return this.mercatorToLnglat(e)},tileToBound:function(kv,kz){var i=kv.col;var kC=kv.row;var kB=kv.baseTileSize;var kA=this.getZoomUnits(kv.zoom);var T={x:Math.round(kz.lng/kA),y:Math.round(kz.lat/kA)};var kx={lbx:i*kB,lby:kC*kB,rtx:(i+1)*kB,rty:(kC+1)*kB};var e={lbx:kz.lng+(kx.lbx-T.x)*kA,lby:kz.lat+(kx.lby-T.y)*kA,rtx:kz.lng+(kx.rtx-T.x)*kA,rty:kz.lat+(kx.rty-T.y)*kA};var kw=jr.convertMC2LL(new cD(e.lbx,e.lby));var ky=jr.convertMC2LL(new cD(e.rtx,e.rty));return{MC:new ie(new cD(e.lbx,e.lby),new cD(e.rtx,e.rty)),LL:new ie(kw,ky)}},getZoomUnits:function(e){return Math.pow(2,(18-e))},setCoordType:function(e){this.coordsType=e}});function dI(){}e6.extend(dI,{RADIUS:6378137,EXTENT4326:[-180,-90,180,90],WORLD_EXTENT:[-180,-85,180,85],HALF_SIZE:20037508.342789244,METERS_PER_UNIT:111319.49079327358,EXTENT3857:[-20037508.342789244,-20037508.342789244,20037508.342789244,20037508.342789244],MAX_SAFE_Y:238107693.26496765,origin:[-20037508.342789244,20037508.342789244],size:156543.03392804097,gridSize:[256,256],resolutions:[156543.03392804097,78271.51696402048,39135.75848201024,19567.87924100512,9783.93962050256,4891.96981025128,2445.98490512564,1222.99245256282,611.49622628141,305.748113140705,152.8740565703525,76.43702828517625,38.21851414258813,19.109257071294063,9.554628535647032,4.777314267823516,2.388657133911758,1.194328566955879,0.5971642834779395,0.29858214173896974,0.14929107086948487,0.07464553543474244,0.03732276771737122],gridScaleFrom3857ToBDMC:0.5971642834779395,gridScaleFromBDMCTo3857:1.674581061974954,calcResolutions:function(i){if(this.resolutions.length-1<i){this.resolutions=[];for(var e=0;e<i;++e){this.resolutions.push(this.size/Math.pow(2,e))}}return this.resolutions},forEachTileCoord:function(kB,kA,T,ky){var e=this.getTileRangeForExtentFactory(kB,kA,T);for(var kw=e.minX,kz=e.maxX;kw<=kz;++kw){for(var kv=e.minY,kx=e.maxY;kv<=kx;++kv){ky([kA,kw,kv])}}},getTileRangeForExtentFactory:function(T,kw,i,kv){var e;switch(i.source){case"BD09MC":if(i.target==="EPSG3857"){e=this.getBDTileRangeForExtentAndZ(T,kw,kv)}else{e=this.getTileRangeForExtentAndZ(T,kw,kv)}break;case"EPSG3857":e=this.getTileRangeForExtentAndZ(T,kw,kv);break;default:e=this.getTileRangeForExtentAndZ(T,kw,kv);break}return e},getBDTileRangeForExtentAndZ:function(T,kw,kv){var i=[0,0,0];this.getBDTileCoordForXYAndZ_(T[0],T[1],kw,false,i);var e=i[1];var kx=i[2];this.getBDTileCoordForXYAndZ_(T[2],T[3],kw,true,i);return this.createOrUpdateTileRange(e,i[1],kx,i[2],kv)},getTileRangeForExtentAndZ:function(T,kw,kv){var i=[0,0,0];this.getTileCoordForXYAndZ_(T[0],T[3],kw,false,i);var e=i[1];var kx=i[2];this.getTileCoordForXYAndZ_(T[2],T[1],kw,true,i);return this.createOrUpdateTileRange(e,i[1],kx,i[2],kv)},getBDTileCoordForXYAndZ_:function(e,kz,kx,kw,kv){var ky=256*Math.pow(2,(18-kx));var T=e/ky;var i=kz/ky;if(kw){T=Math.ceil(T)-1;i=Math.ceil(i)-1}else{T=Math.floor(T);i=Math.floor(i)}return this.createOrUpdateTileCoord(kx,T,i,kv)},getTileCoordForXYAndZ_:function(kC,kB,kz,kA,e){var kD=this.origin;var i=(this.resolutions.length===0?this.calcResolutions(21)[kz]:this.resolutions[kz]);var kF=this.gridSize;var kv=kA?0.5:0;var T=kA?0.5:0;var kE=Math.floor((kC-kD[0])/i+kv);var kx=Math.floor((kD[1]-kB)/i+T);var ky=kE/kF[0];var kw=kx/kF[1];if(kA){ky=Math.ceil(ky)-1;kw=Math.ceil(kw)-1}else{ky=Math.floor(ky);kw=Math.floor(kw)}return this.createOrUpdateTileCoord(kz,ky,kw,e)},getTileCoordForCoordAndZ:function(T,i,e){return this.getTileCoordForXYAndZ_(T[0],T[1],i,false,e)},getTileRangeExtent:function(T,ky){var kz=this.origin;if(this.resolutions.length===0){this.calcResolutions(23)}var kw=this.resolutions[T[0]];var kA=this.gridSize;var kx=kz[0]+T[1]*kA[0]*kw;var kv=kz[1]-(T[2]+1)*kA[1]*kw;var i=kx+kA[0]*kw;var e=kv+kA[1]*kw;return this.createOrUpdateTileRange(kx,i,kv,e,ky)},getTileLeftBottomMCPoint:function(kw,T){var i=this.origin;if(this.resolutions.length===0){this.calcResolutions(23)}var kv=this.resolutions[kw[0]];var ky=this.gridSize;var e=i[0]+kw[1]*ky[0]*kv;var kz=i[1]-(kw[2]+1)*ky[1]*kv;var kx=gcoord.transform([e,kz],gcoord.EPSG3857,gcoord.BD09MC);return kx},getRangeExtent:function(i,kD,kz,kF,kv){var kA=this.calPiexlResolution(kF,kv);var ky=kD/2*kA;var kB=kz/2*kA;var kx=i[0]-ky;var T=i[0]+ky;var kw=i[1]-kB;var e=i[1]+kB;var kC=gcoord.transform([kx,kw],gcoord[kv.target],gcoord[kv.source]);var kE=gcoord.transform([T,e],gcoord[kv.target],gcoord[kv.source]);return this.createOrUpdateTileRange(kC[0],kE[0],kC[1],kE[1])},getMousePoint:function(ky,kx,i,kw,T){var kv=kr(ky,kx);return this.calLngLatByMapViewPixelInverse(kv.clientPos,i,kx.width,kx.height,kw,T)},calLngLatByMapViewPixelInverse:function(kv,e,i,kC,kD,T){var ky=this.calPiexlResolution(kD,T);var kx=kv.x-i/2;var kw=kv.y-kC/2;var kA=e[0]+kx*ky;var kz=e[1]-kw*ky;var kB=gcoord.transform([kA,kz],gcoord[T.target],gcoord[T.source]);return kB},calPiexlResolution:function(T,i){var e;switch(i.target){case"BD09MC":e=Math.pow(2,(18-T));break;case"EPSG3857":e=this.resolutions[Math.floor(T)];break;default:e=Math.pow(2,(18-T));break}return e},getXYZCellPixelCoor:function(ky,kw,kv,i){var kA=this.gridSize;var kz;var kx;switch(i.source){case"GCJ02":case"EPSG3857":var T=Math.pow(2,kv-1)-(kw+1);var e=ky-Math.pow(2,kv-1);kz=e*kA[0];kx=T*kA[1];break;case"BD09MC":if(i.target==="EPSG3857"){kz=ky*kA[0];kx=kw*kA[1]}else{var T=Math.pow(2,kv-1)-(kw+1);var e=ky-Math.pow(2,kv-1);kz=e*kA[0];kx=T*kA[1]}default:break}return{x:kz,y:kx}},mcToPixel:function(i){var T=this.resolutions[Math.floor(zoom)];var e=i.lng/T;var kv=i.lat/T;return[e,kv]},getBaiduCellPixelCoor:function(e,kv,T){var i=256;return{x:e*i,y:kv*i}},getRelativePixelCoor:function(kx,kv){var i=this.origin;var kw=kx[0];var T=this.resolutions[Math.floor(kw)];var ky=this.gridSize;var e=i[0]/T+kx[1]*ky[0];var kz=i[1]/T-(kx[2]+1)*ky[1];return[kv[0]-e,kv[1]-kz]},getPointPixelCoor:function(e,kA,i){var ky;var kx;var T=Math.pow(2,(18-kA));var kv=this.resolutions[Math.floor(kA)];var kw=jr.convertMC2LL(e);switch(i.source){case"GCJ02":var kz=gcoord.transform([kw.lng,kw.lat],gcoord.BD09LL,gcoord.GCJ02);kz=gcoord.transform(kz,gcoord.WGS84,gcoord.EPSG3857);ky=kz[0]/kv;kx=kz[1]/kv;break;case"BD09LL":case"EPSG3857":var kz=gcoord.transform([kw.lng,kw.lat],gcoord.BD09LL,gcoord.EPSG3857);ky=kz[0]/kv;kx=kz[1]/kv;break;case"BD09MC":ky=e.lng/T;kx=e.lat/T;if(i.target==="BD09MC"){ky*=dI.gridScaleFromBDMCTo3857;kx*=dI.gridScaleFromBDMCTo3857}default:break}return[ky,kx]},getResolutionScale:function(i,e){var T;switch(e.target){case"BD09MC":T=this.gridScaleFrom3857ToBDMC;break;case"EPSG3857":T=this.gridScaleFromBDMCTo3857;break;default:T=this.gridScaleFrom3857ToBDMC;break}return T},getBaiduResolutionScale:function(T){var i=this.resolutions[Math.floor(T)];var e=Math.pow(2,(18-T));var kv=e/i;return kv},getTileCoordCenter:function(T){var e=this.origin;if(this.resolutions.length===0){this.calcResolutions(23)}var i=this.resolutions[T[0]];var kv=this.gridSize;return[e[0]+(T[1]+0.5)*kv[0]*i,e[1]-(T[2]+0.5)*kv[1]*i,]},transformBDmcPoint:function(kw,i){i=i||{};var T=i.source||"EPSG3857";var kv=jr.convertMC2LL(new cD(kw.lng,kw.lat));var e;switch(T){case"GCJ02":e=gcoord.transform([kv.lng,kv.lat],gcoord.BD09LL,gcoord.GCJ02);e=gcoord.transform(e,gcoord.WGS84,gcoord.EPSG3857);break;case"EPSG3857":e=gcoord.transform([kv.lng,kv.lat],gcoord.BD09LL,gcoord.EPSG3857);break;case"BD09MC":if(i.target==="EPSG3857"){e=gcoord.transform([kv.lng,kv.lat],gcoord.BD09LL,gcoord.EPSG3857)}else{e=[kw.lng,kw.lat]}break;default:e=gcoord.transform([kv.lng,kv.lat],gcoord.BD09LL,gcoord[T]);break}return e},transformPointArr:function(e,i,T){return gcoord.transform(e,gcoord[i||"BD09LL"],gcoord[T||"BD09MC"])},getTilesLoop:function(T,e){var i=Math.pow(2,T);while(e>i-1){e=e-i}while(e<0){e=e+i}return e},getLoopBox:function(e,kv){var i=this.HALF_SIZE*2;if(e[0]>0&&kv[2]<0){kv[2]=kv[2]+i}else{if(e[0]<0&&kv[0]>0){kv[0]=kv[0]-i}}return kv},createOrUpdateTileCoord:function(T,e,kv,i){if(i!==undefined){i[0]=T;i[1]=e;i[2]=kv;return i}else{return[T,e,kv]}},createOrUpdateTileRange:function(e,kv,kw,T,i){if(i!==undefined){i.minX=e;i.maxX=kv;i.minY=kw;i.maxY=T;return i}else{return{minX:e,maxX:kv,minY:kw,maxY:T}}},fromEPSG4326:function(T,kA,ky){var kw=T.length;var kx=ky>1?ky:2;var e=kA;if(e===undefined){if(kx>2){e=T.slice()}else{e=new Array(kw)}}for(var kv=0;kv<kw;kv+=kx){e[kv]=(this.HALF_SIZE*T[kv])/180;var kz=this.RADIUS*Math.log(Math.tan((Math.PI*(+T[kv+1]+90))/360));if(kz>this.MAX_SAFE_Y){kz=this.MAX_SAFE_Y}else{if(kz<-this.MAX_SAFE_Y){kz=-this.MAX_SAFE_Y}}e[kv+1]=kz}return e},toEPSG4326:function(T,kz,ky){var kw=T.length;var kx=ky>1?ky:2;var e=kz;if(e===undefined){if(kx>2){e=T.slice()}else{e=new Array(kw)}}for(var kv=0;kv<kw;kv+=kx){e[kv]=(180*T[kv])/this.HALF_SIZE;e[kv+1]=(360*Math.atan(Math.exp(T[kv+1]/this.RADIUS)))/Math.PI-90}return e},findParentGridAndPosition:function(kv,kF,kE,kz,kA,kC,ky){if(kE-1<0){return false}var kG=kv;var kB=kF;var T=kE;for(var kx=1;kx<=ky;kx++){var e=this.findParent(kG,kB,T,kx);if(!e){return false}var kD=this.getTileKey(e);var kw=kz.getData(kD);if(kw&&kw.status==="ready"){if(kA[kD]){continue}kC.setData(kw,this.drawIndex,0);kA[kD]=true;return true}kG=e.col;kB=e.row;T=e.zoom}},findParent:function(i,kw,T,kv){if(T-1<0){return null}var e=i%2;var kx=kw%2;return{col:Math.floor(i/2),row:Math.floor(kw/2),sonX:e,sonY:kx,thumbLB:[e*0.5,1-kx*0.5-0.5],thumbRT:[e*0.5+0.5,1-kx*0.5],radio:Math.pow(2,kv),zoom:T-1,useZoom:T-1}},getTileKey:function(e,kv){kv=kv||{};var i=typeof kv.useZoom==="number"?kv.useZoom:e.useZoom;var T=e.style||this.mapStyleId||"default";return this.mapType+"_"+T+"_"+e.col+"_"+e.row+"_"+e.zoom+"_"+i},lon2tile:function(i,e){return(Math.floor((i+180)/360*Math.pow(2,e)))},lat2tile:function(T,i){var e=Math.tan(T*Math.PI/180)+1/Math.cos(T*Math.PI/180);return(Math.floor((1-Math.log(e)/Math.PI)/2*Math.pow(2,i)))},tile2long:function(e,i){return(e/Math.pow(2,i)*360-180)},tile2lat:function(T,e){var i=Math.PI-2*Math.PI*T/Math.pow(2,e);return(180/Math.PI*Math.atan(0.5*(Math.exp(i)-Math.exp(-i))))}});function cx(i,e){if(i<-90){i=-90}else{if(i>90){i=90}}while(e<-180){e+=360}while(e>180){e-=360}e=e||0;i=i||0;cD.call(this,e,i)}cx.inherits(cD,"LatLng");e6.extend(cx.prototype,{equals:function(e){return(this.lat===e.lat&&this.lng===e.lng)},clone:function(){return new cx(this.lat,this.lng)},add:function(e){return new cx(this.lng+e.lng,this.lat+e.lat)},sub:function(e){return new cx(this.lat-e.lat,this.lng-e.lng)},mult:function(e){return new cx(this.lng*e,this.lat*e)},div:function(e){return new cx(this.lng/e,this.lat/e)},mag:function(){return Math.sqrt(this.lng*this.lng+this.lat*this.lat)},getLngSpan:function(e){var i=this.lng;var T=Math.abs(e-i);if(T>180){T=360-T}return T},toString:function(){return"LatLng"},toGeoJSON:function(){var i="Point";var T=[this.lng,this.lat];var e={type:"Feature",geometry:{type:i,coordinates:T},properties:this.properties};return e}});function cM(e,i){if(e&&!i){i=e}this._sw=this._ne=null;this._swLng=this._swLat=null;this._neLng=this._neLat=null;if(e){this._sw=new cx(e.lat,e.lng);this._ne=new cx(i.lat,i.lng);this._swLng=e.lng;this._swLat=e.lat;this._neLng=i.lng;this._neLat=i.lat}}e6.extend(cM.prototype,{isEmpty:function(){return !this._sw||!this._ne},equals:function(e){if(this.isEmpty()){return false}return this.getSouthWest().equals(e.getSouthWest())&&this.getNorthEast().equals(e.getNorthEast())},getSouthWest:function(){return this._sw},getNorthEast:function(){return this._ne},containsBounds:function(e){if(this.isEmpty()||e.isEmpty()){return false}return(e._swLng>this._swLng&&e._neLng<this._neLng&&e._swLat>this._swLat&&e._neLat<this._neLat)},getCenter:function(){if(this.isEmpty()){return null}return new cx((this._swLat+this._neLat)/2,(this._swLng+this._neLng)/2)},intersects:function(T){if(Math.max(T._swLng,T._neLng)<Math.min(this._swLng,this._neLng)||Math.min(T._swLng,T._neLng)>Math.max(this._swLng,this._neLng)||Math.max(T._swLat,T._neLat)<Math.min(this._swLat,this._neLat)||Math.min(T._swLat,T._neLat)>Math.max(this._swLat,this._neLat)){return false}var kw=Math.max(this._swLng,T._swLng);var i=Math.min(this._neLng,T._neLng);var kv=Math.max(this._swLat,T._swLat);var e=Math.min(this._neLat,T._neLat);this._sw=new cx(kv,kw);this._ne=new cx(e,i);this._swLng=kw;this._swLat=kv;this._neLng=i;this._neLat=e;return true},containsPoint:function(e){if(this.isEmpty()){return false}return(e.lng>=this._swLng&&e.lng<=this._neLng&&e.lat>=this._swLat&&e.lat<=this._neLat)},extend:function(e){var i=e.lng;var T=e.lat;if(!this._sw){this._sw=new cx(0,0)}if(!this._ne){this._ne=new cx(0,0)}if(!this._swLng||this._swLng>i){this._sw.lng=this._swLng=i}if(!this._neLng||this._neLng<i){this._ne.lng=this._neLng=i}if(!this._swLat||this._swLat>T){this._sw.lat=this._swLat=T}if(!this._neLat||this._neLat<T){this._ne.lat=this._neLat=T}},toSpan:function(){if(this.isEmpty()){return new cx(0,0)}return new cx(Math.abs(this._neLat-this._swLat),Math.abs(this._neLng-this._swLng))},union:function(i){if(i.isEmpty()){return false}var e=i.getSouthWest();var T=i.getNorthEast();if(this._swLat>e.lat){this._swLat=e.lat}if(this._swLng>e.lng){this._swLng=e.lng}if(this._neLat<T.lat){this._neLat=T.lat}if(this._neLng<T.lng){this._neLng=T.lng}this._sw=new cx(this._swLat,this._swLng);this._ne=new cx(this._neLat,this._neLng);return true},toString:function(){return this._swLat+", "+this._swLng+", "+this._neLat+", "+this._neLng}});window.COORDINATES_WGS84=1;window.COORDINATES_WGS84_MC=2;window.COORDINATES_GCJ02=3;window.COORDINATES_GCJ02_MC=4;window.COORDINATES_BD09=5;window.COORDINATES_BD09_MC=6;window.COORDINATES_MAPBAR=7;window.COORDINATES_51=8;function f3(){}f3.inherits(de,"Convertor");e6.extend(f3.prototype,{translate:function(i,kw,kv,T){kw=kw||1;kv=kv||5;if(i.length>10){T&&T({status:25});return}var e=C.apiHost+"?qt=coords&coords=";e6.each(i,function(kx){e+=kx.lng+","+kx.lat+";"});e=e.replace(/;$/gi,"");e=e+"&from="+kw+"&to="+kv+"&v=gl&type=webgl&ak="+eW;dm.request(e,function(ky){data=ky.content;if(typeof data!=="undefined"&&data!==null&&data.status===0){var kx=[];e6.each(data.result,function(kz){kx.push(new cD(kz.x,kz.y))});delete data.result;data.points=kx}else{if(ky.result&&ky.result.error){data={status:ky.result.errror,message:"访问错误，请参考错误状态码https://lbsyun.baidu.com/index.php?title=webapi/appendix"}}}T&&T(data)})}});var em={idle:0,freeze:1,zooming:2,dragging:3,moving:4,readyToDrag:5,readyToPinch:6,pinching:7,stdMapCtrlDrag:8,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,arrowOpCodes:{37:1,38:2,39:4,40:8}};var ak={_map:null,_html:"<div class='BMap_opMask' unselectable='on'></div>",_maskElement:null,_cursor:"default",inUse:false,show:function(e){if(!this._map){this._map=e}this.inUse=true;if(!this._maskElement){this._createMask(e)}this._maskElement.style.display="block"},_createMask:function(i){if(!this._map){this._map=i}if(!this._map){return}var e=this._maskElement=bP(this._map.container,this._html);e6.on(e,"mouseup",function(T){if(T.button==2){hD(T)}});e6.on(e,"contextmenu",hD);e.style.display="none"},getDrawPoint:function(kv,ky,kw){kv=window.event||kv;var i=kv.offsetX||kv.layerX||0;var kx=parseInt(kv.offsetY)||parseInt(kv.layerY)||0;var T=kv.target||kv.srcElement;if(T!=ak.getDom(this._map)&&ky==true){while(T&&T!=this._map.container){if(!(T.clientWidth==0&&T.clientHeight==0&&T.offsetParent&&T.offsetParent.nodeName.toLowerCase()=="td")){i+=T.offsetLeft;kx+=T.offsetTop}T=T.offsetParent}}if(T!=ak.getDom(this._map)&&T!=this._map.container){return}if(typeof i==="undefined"||typeof kx==="undefined"){return}if(isNaN(i)||isNaN(kx)){return}if(kw){i=i+kw.x;kx=kx+kw.y}return this._map.pixelToPointIn(new fr(i,kx))},hide:function(){if(!this._map){return}this.inUse=false;if(this._maskElement){this._maskElement.style.display="none"}},getDom:function(e){if(!this._maskElement){this._createMask(e)}return this._maskElement},setCursor:function(e){this._cursor=e||"default";if(this._maskElement){this._maskElement.style.cursor=this._cursor}}};function aS(){this._type="overlay"}aS.inherits(e6.BaseClass,"Overlay");aS.getZIndex=function(i,e){i=i*1;if(!i){return 0}if(e){i=jr.convertMC2LL(new cD(0,i)).lat}return(i*-100000)<<1};e6.extend(aS.prototype,{_i:function(T){this._map=T;if(!this.domElement&&bX(this.initialize)){this.domElement=this.initialize(T);if(this.domElement){this.domElement.style.WebkitUserSelect="none";if(this.enableDraggingMap!==undefined&&!this.enableDraggingMap&&!(this instanceof s)){var i=["mousedown","mouseout","mouseover","click","keydown","selectstart"];var e=this;e6.each(i,function(kv){e6.on(e.domElement,kv,aj)})}}}this.draw()},initialize:function(e){throw"initialize方法未实现"},draw:function(){throw"draw方法未实现"},remove:function(){if(this.domElement&&this.domElement.parentNode){this.domElement.parentNode.removeChild(this.domElement)}this.domElement=null;this.dispatchEvent(new fS("onremove"))},hide:function(){this._visible=false;e6.hide(this.domElement)},show:function(){this._visible=true;e6.show(this.domElement)},getMap:function(){return this._map},dispose:function(){e6.BaseClass.prototype.decontrol.call(this)}});function eJ(){e6.BaseClass.call(this);aS.call(this);this._visible=true;this._visibleInternal=true;this.zIndex=0;this.infoWindow=null;this._dblclickTime=0}eJ.inherits(aS,"OverlayInternal");e6.extend(eJ.prototype,{initialize:function(e){this.map=e;e6.BaseClass.call(this,this.hashCode);return null},draw:function(){},remove:function(){this.decontrol();aS.prototype.remove.call(this)},destroy:function(){},hide:function(){this._visible=false},show:function(){this._visible=true},getDom:function(){return this.domElement},getContainer:function(){return this.domElement},setClassName:function(){},setConfig:function(i){if(!i){return}for(var e in i){if(i.hasOwnProperty(e)){this._config[e]=i[e]}}},getPoint:function(T,kv){if(!T){return this.point}else{var e=kv?kv.width:0;var kw=kv?kv.height:0;if(this.map){var i=this.map.pointToPixelIn(this.point);if(this._config&&this._config.offset){i.x=i.x+this._config.offset.width+e;i.y=i.y+this._config.offset.height+kw}else{i.x=i.x+e;i.y=i.y+kw}return this.map.pixelToPointIn(i)}}},setZIndex:function(e){this.zIndex=e},isVisible:function(){if(!this.domElement){return false}return !!this._visible},enableMassClear:function(){this._config.enableMassClear=true},disableMassClear:function(){this._config.enableMassClear=false},showInternal:function(){this._visibleInternal=true},hideInternal:function(e){this._visibleInternal=false;this._hideInternalReason=e},addContextMenu:function(e){this._menu=e},removeContextMenu:function(e){this._menu=null}});function aQ(e){this.map=e;this._overlays={};this._overlayArray=[];this._customOverlays=[];e._overlays=this._overlays;e._overlayArray=this._overlayArray;e._customOverlays=this._customOverlays;this._zoomingOrMoving=false;this._init()}aQ.prototype._init=function(){if(this.map._renderType!=="webgl"){this._createOverlayContainers()}else{this._createWebGLOverlayContainers()}this._bind()};aQ.prototype._createOverlayContainers=function(){var e=this.map;e.temp.overlayDiv=e.overlayDiv=this._createOverlayDiv(e.platform,200);e.temp.overlayDivEx=e.overlayDivEx=this._createOverlayDiv(e.platform,50);e._panes.floatPane=this._createOverlayDiv(e.temp.overlayDiv,800);e._panes.markerMouseTarget=this._createOverlayDiv(e.temp.overlayDiv,700);e._panes.floatShadow=this._createOverlayDiv(e.temp.overlayDiv,600);e._panes.labelPane=this._createOverlayDiv(e.temp.overlayDiv,500);e._panes.markerPane=this._createOverlayDiv(e.temp.overlayDiv,400);if(e.isCanvasMap()){e._panes.mapPane=this._createOverlayDiv(e.temp.overlayDivEx,50)}else{e._panes.mapPane=this._createOverlayDiv(e.temp.overlayDiv,200)}};aQ.prototype._createWebGLOverlayContainers=function(){var e=this.map;e.temp.overlayDiv=e.overlayDiv=this._createOverlayDiv(e.platform,200);e._panes.floatPane=this._createOverlayDiv(e.temp.overlayDiv,800);e._panes.markerMouseTarget=this._createOverlayDiv(e.temp.overlayDiv,700);e._panes.floatShadow=this._createOverlayDiv(e.temp.overlayDiv,600);e._panes.labelPane=this._createOverlayDiv(e.temp.overlayDiv,500);e._panes.markerPane=this._createOverlayDiv(e.temp.overlayDiv,400)};aQ.prototype._createOverlayDiv=function(e,kv){var T=b3("div");var i=T.style;i.position="absolute";i.top=i.left=i.width=i.height="0";i.zIndex=kv;e.appendChild(T);return T};aQ.prototype._bind=function(){var kw=this.map;var kv=this;function i(ky){kv.draw(ky)}if(kw._renderType!=="webgl"){kw.addEventListener("load",i);kw.addEventListener("moveend",i);kw.addEventListener("resize",i);kw.addEventListener("zoomend",i);kw.addEventListener("zooming_inner",i)}else{kw.on("update",i)}kw.on("destroy",function(){kw._overlays={};kw._overlayArray=[];kw._customOverlays=[];kw.overlayDiv=null;kw.overlayDivEx=null;var ky=Object.keys(kw._panes);for(var kz=0;kz<ky.length;kz++){kw._panes[ky[kz]]=null}var kA=Object.keys(kw.temp);for(var kz=0;kz<kA.length;kz++){kw.temp[kA[kz]]=null}});kw.addEventListener("zoomend",function(ky){if(this.mapType==="B_EARTH_MAP"){if(this._earth.getZoom()<this._earth.zoomForNight+1){this.temp.overlayDiv.style.display="none";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display="none"}}else{if(this.temp.overlayDiv.style.display==="none"){this.temp.overlayDiv.style.display="";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display=""}if(this.temp.infoWin&&this.temp.infoWin.isOpen()){this.temp.infoWin.redraw()}}}}});kw.addEventListener("oncenterandzoom",function(ky){kv.draw(ky);if(this.mapType==="B_EARTH_MAP"){if(this._earth.getZoom()<this._earth.zoomForNight+1){this.temp.overlayDiv.style.display="none";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display="none"}}else{if(this.temp.overlayDiv.style.display==="none"){this.temp.overlayDiv.style.display="";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display=""}if(this.temp.infoWin&&this.temp.infoWin.isOpen()){this.temp.infoWin.redraw()}}}}});kw.addEventListener("maptypechange",function(ky){if(this.mapType==="B_EARTH_MAP"){if(this._panes.mapPane){this._panes.mapPane.style.display="none"}if(this._earth.getZoom()<this._earth.zoomForNight+1){this.temp.overlayDiv.style.display="none";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display="none"}}else{if(this.temp.overlayDiv.style.display==="none"){this.temp.overlayDiv.style.display="";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display=""}if(this.temp.infoWin&&this.temp.infoWin.isOpen()){this.temp.infoWin.redraw()}}}if(this._panes.markerPane){this._panes.markerPane.style.display="none"}}else{if(this._panes.mapPane){this._panes.mapPane.style.display=""}if(this._panes.markerPane){this._panes.markerPane.style.display=""}if(this.temp.overlayDiv.style.display==="none"){this.temp.overlayDiv.style.display="";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display=""}if(this.temp.infoWin&&this.temp.infoWin.isOpen()){this.temp.infoWin.redraw()}}}kv.draw(ky)});kw.on("earthstatuschange",function kx(ky){kv.draw(ky)});kw.addEventListener("addoverlay",function(kC){var kz=kC.target;if(kz instanceof eJ){if(!kv._overlays[kz.hashCode]){kv._overlays[kz.hashCode]=kz;kv._overlayArray.push(kz)}}else{var kB=false;for(var kA=0,ky=kv._customOverlays.length;kA<ky;kA++){if(kv._customOverlays[kA]===kz){kB=true;break}}if(!kB){kv._customOverlays.push(kz)}}});kw.addEventListener("removeoverlay",function(kB){var kz=kB.target;if(kz instanceof eJ){delete kv._overlays[kz.hashCode];for(var kA=0;kA<kv._overlayArray.length;kA++){if(kv._overlayArray[kA]===kz){kv._overlayArray.splice(kA,1);break}}}else{for(var kA=0,ky=kv._customOverlays.length;kA<ky;kA++){if(kv._customOverlays[kA]===kz){kv._customOverlays.splice(kA,1);break}}}});kw.addEventListener("clearoverlays",function(kA){this.closeInfoWindow();this.closeSimpleInfoWindow();for(var kz in kv._overlays){if(kv._overlays[kz]._config.enableMassClear){this.removeOverlay(kv._overlays[kz])}}for(var ky=kv._customOverlays.length-1;ky>=0;ky--){if(kv._customOverlays[ky].enableMassClear!==false){this.removeOverlay(kv._customOverlays[ky]);kv._customOverlays.splice(ky,1)}}});kw.addEventListener("infowindowopen",function(kz){var ky=this.infoWindow;if(ky){e6.hide(ky.popDom);e6.hide(ky.shadowDom)}});function T(){if(this.getMapType()==="B_EARTH_MAP"||this._renderType==="webgl"){if(kv._zoomingOrMoving===false){this._panes.markerMouseTarget.style.display="none";kv._zoomingOrMoving=true}}}function e(kA){if(this.getMapType()==="B_EARTH_MAP"||this._renderType==="webgl"){if(kv._zoomingOrMoving===true){if(this._panes.markerMouseTarget){this._panes.markerMouseTarget.style.display=""}kv._zoomingOrMoving=false;for(var kz=0;kz<kv._overlayArray.length;kz++){var ky=kv._overlayArray[kz];if(ky instanceof j7===true){ky.draw(kA)}}}}}kw.addEventListener("tilt_changed",e);kw.addEventListener("heading_changed",e);kw.addEventListener("movestart",T);kw.addEventListener("moveend",e);kw.addEventListener("zoomstart",T);kw.addEventListener("zoomend",e);kw.addEventListener("animation_start",T);kw.addEventListener("animation_end",e);kw.addEventListener("displayoptions_changed",function(ky){if(this._displayOptions.overlay===false){this.temp.overlayDiv.style.display="none"}else{this.temp.overlayDiv.style.display=""}})};aQ.prototype.draw=function(ky){ky=ky||{};if(this.map.getMapType()==="B_EARTH_MAP"){for(var kw=0;kw<this._overlayArray.length;kw++){var T=this._overlayArray[kw];if(T instanceof iQ===true){continue}if(this._zoomingOrMoving){if(T instanceof j7===true){continue}}T.draw(ky)}}else{for(var kw=0,kv=this._overlayArray.length;kw<kv;kw++){var T=this._overlayArray[kw];if(this._zoomingOrMoving&&T instanceof j7===true){continue}T.draw(ky)}}e6.each(this._customOverlays,function(e){e.draw(ky);if(!(e instanceof bR)){hL.sendMessage(aZ(4,2,12),["overlay","user_custom"])}});if(this.map.temp.infoWin){this.map.temp.infoWin.setPosition(ky.center,ky.zoom)}if(this.map.getMapType()!=="B_EARTH_MAP"&&this.map._renderType!=="webgl"){if(bD.DrawerSelector){var kx=bD.DrawerSelector.getDrawer(this.map);kx.setPalette()}}};bD.register(function(e){e._overlayMgr=new aQ(e)});function iQ(e){eJ.call(this);this._config={strokeColor:"#000",strokeWeight:2,strokeOpacity:1,strokeStyle:"solid",dashArray:null,strokeLineCap:"round",strokeLineJoin:"round",enableMassClear:true,getParseTolerance:null,getParseCacheIndex:null,enableParse:true,enableEditing:false,mouseOverTolerance:5,geodesic:false,linkRight:false,clip:true,texture:null,textureSize:null,textureZoomWithMap:false,textureRepeat:true};this.setConfig(e);if(this._config.strokeOpacity<0||this._config.strokeOpacity>1){this._config.strokeOpacity=1}if(this._config.fillOpacity<0||this._config.fillOpacity>1){this._config.fillOpacity=1}if(this._config.strokeStyle!=="solid"&&this._config.strokeStyle!=="dashed"&&this._config.strokeStyle!=="dotted"){this._config.strokeStyle="solid"}this.domElement=null;this._bounds=new ie();this.points=[];this.greatCirclePoints=[];this._parseCache=[];this._holesCache=[];this._parseCacheGL=[];this._parseCacheGLRaw=[];this._areaCacheGL=[];this._strokeStyleInfoForGL=[[]];this._fillStyleInfoForGL="";this.vertexMarkers=[];this._temp={}}iQ.JOININDEX={miter:0,round:1,bevel:2};iQ.CAPINDEX={round:0,butt:1,square:2};iQ.inherits(eJ,"Graph");iQ.getGraphPoints=function(i){var e=[];if(!i||i.length===0){return e}if(typeof i==="string"){var T=i.split(";");e6.each(T,function(kw){var kv=kw.split(",");e.push(new cD(kv[0],kv[1]))})}if(i.constructor===Array&&i.length>0){e=i}return e};iQ.parseTolerance={0:[0.09,0.005,0.0001,0.00001],1:[9000,500,20,1]};e6.extend(iQ.prototype,{initialize:function(e){this.map=e;return null},draw:function(){},setPoints:function(e){this._clearCache();this.points=iQ.getGraphPoints(e).slice(0);this._calcBounds()},setPathIn:function(e){this.setPoints(e)},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds=new ie();if(!this.hasMultipleParts){e6.each(this.points,function(i){e._bounds.extend(i)})}else{e6.each(this.points,function(i){e6.each(i,function(T){e._bounds.extend(T)})})}},getPoints:function(){return this.points},getPathIn:function(){return this.points},setPointAt:function(i,e){if(!e||!this.points[i]){return}this._clearCache();this.points[i]=new cD(e.lng,e.lat);this._calcBounds()},setPositionAt:function(i,e){if(!e||!this.points[i]){return}var T=jr.convertLL2MC(e);this.setPointAt(i,T)},setOptions:function(i){i=i||{};for(var e in i){if(i.hasOwnProperty(e)){this._config[e]=i[e]}}},setStrokeColor:function(e){this._config.strokeColor=e},getStrokeColor:function(){return this._config.strokeColor},setStrokeLineCap:function(e){this._config.strokeLineCap=e},getStrokeLineCap:function(){return this._config.strokeLineCap},setStrokeLineJoin:function(e){this._config.strokeLineJoin=e},getStrokeLineJoin:function(){return this._config.strokeLineJoin},setStrokeWeight:function(e){if(e>0){this._config.strokeWeight=e}},getStrokeWeight:function(){return this._config.strokeWeight},setStrokeOpacity:function(e){if(!e||e>1||e<0){return}this._config.strokeOpacity=e},getStrokeOpacity:function(){return this._config.strokeOpacity},setFillOpacity:function(e){if(e>1||e<0){return}this._config.fillOpacity=e},getFillOpacity:function(){return this._config.fillOpacity},setStrokeStyle:function(e){if(e!=="solid"&&e!=="dashed"&&e!=="dotted"){return}this._config.strokeStyle=e},getStrokeStyle:function(){return this._config.strokeStyle},setFillColor:function(e){this._config.fillColor=e||""},getFillColor:function(){return this._config.fillColor},getBoundsIn:function(){this._bounds.setMinMax();return this._bounds},getBounds:function(){var e=this.getBoundsIn();var i=new ie(jr.convertMC2LL(e.getSouthWest()),jr.convertMC2LL(e.getNorthEast()));i.setMinMax();return i},remove:function(){if(this.map){this.map.removeEventListener("onmousemove",this._graphMouseEvent);this.map.removeEventListener("onclick",this._graphClickEvent)}eJ.prototype.remove.call(this);this._clearCache();var e=new fS("onlineupdate");e.action="remove";e.overlay=this;this.fire(e)},enableEditing:function(){if(this.points.length<2){return}this._config.enableEditing=true;var e=this;hh.load("poly",function(){e.addVertexs()},true)},disableEditing:function(){this._config.enableEditing=false;var e=this;hh.load("poly",function(){e.clearVertexs()},true)},getLength:function(){if(typeof this._length==="number"){return this._length}if(typeof this._config.totalLength==="number"){this._length=this._config.totalLength;return this._length}var T=0;if(this.points.length<=1){this._length=0;return T}for(var e=0;e<this.points.length-1;e++){T+=eC(this.points[e],this.points[e+1])}this._length=T;return T},getParsedPoints:function(){var e=this._simplification(this.points);if(this.hasMultipleParts){return e}return[e]},_simplification:function(kA){var e=this.map;var kz=this.getParseCacheIndex(e.getZoom());var kC;if(this._parseCache[kz]){kC=this._parseCache[kz]}else{var kx=kA;if(this.greatCirclePoints.length>0){kx=this.greatCirclePoints}var kw=e.config.coordType===2?1:e.config.coordType;var ky=this.getParseTolerance(e.getZoom(),kw);if(!this.hasMultipleParts){var kB=dZ(kx,ky)}else{var kB=[];for(var T=0;T<kx.length;T++){var kv=dZ(kx[T],ky);kB.push(kv)}}kC=this._parseCache[kz]=kB}return kC},_clearCache:function(){this._length=null;this._parseCache.length=0;this._parseCacheGL.length=0;this._parseCacheGLRaw.length=0;this._areaCacheGL.length=0},canRenderDataBeMerged:function(){var e=this._config;if(e.texture){return false}return true}});if(e6.Browser.ie&&document.namespaces&&!document.namespaces.olv){document.namespaces.add("olv","urn:schemas-microsoft-com:vml")}function bw(kx,kv,kE){var kB=false,kz=false,kC=false,kG=new fr(kx.x,kx.y),kF=new fr(kv.x,kv.y),kw=fT(kG,kE),T=fT(kF,kE),kD;var kI,kH;var kA=kE.minX,ky=kE.minY,i=kE.maxX,e=kE.maxY;do{if(kw.all==0&&T.all==0){kB=true;kC=true}else{if((kw.all&T.all)!=0){kC=true}else{if(kw.all!=0){kD=kw}else{kD=T}if(kD.top){kI=kG.x+(kF.x-kG.x)*(ky-kG.y)/(kF.y-kG.y);kH=ky}else{if(kD.bottom){kI=kG.x+(kF.x-kG.x)*(e-kG.y)/(kF.y-kG.y);kH=e}else{if(kD.right){kH=kG.y+(kF.y-kG.y)*(i-kG.x)/(kF.x-kG.x);kI=i}else{if(kD.left){kH=kG.y+(kF.y-kG.y)*(kA-kG.x)/(kF.x-kG.x);kI=kA}}}}kz=true;if(kD.all==kw.all){kG.x=Math.round(kI);kG.y=Math.round(kH);kw=fT(kG,kE)}else{kF.x=Math.round(kI);kF.y=Math.round(kH);T=fT(kF,kE)}}}}while(!kC);if(kB){return{pixel0:new fr(kG.x,kG.y),pixel1:new fr(kF.x,kF.y),clip:kz?true:false}}}function fT(i,kw){var T={top:0,bottom:0,right:0,left:0,all:0};var e=i.x,kv=i.y;if(kv<kw.minY){T.top=8;T.all+=T.top}else{if(kv>kw.maxY){T.bottom=4;T.all+=T.bottom}}if(e>kw.maxX){T.right=2;T.all+=T.right}else{if(e<kw.minX){T.left=1;T.all+=T.left}}return T}function dP(e){e=e.replace(/,/gm," ");e=e.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2");e=e.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2");e=e.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2");e=e.replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2");e=e.replace(/([0-9])([+\-])/gm,"$1 $2");e=e.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");e=e.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");e=dP.compressSpaces(e);e=dP.trim(e);this.PathParser=new (function(i){this.tokens=i.split(" ");this.reset=function(){this.i=-1;this.command="";this.previousCommand="";this.start=new dP.Point(0,0);this.control=new dP.Point(0,0);this.current=new dP.Point(0,0);this.points=[];this.angles=[]};this.isEnd=function(){return this.i>=this.tokens.length-1};this.isCommandOrEnd=function(){if(this.isEnd()){return true}return this.tokens[this.i+1].match(/^[A-Za-z]$/)!=null};this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return true;break}return false};this.getToken=function(){this.i++;return this.tokens[this.i]};this.getScalar=function(){return parseFloat(this.getToken())};this.nextCommand=function(){this.previousCommand=this.command;this.command=this.getToken()};this.getPoint=function(){var T=new dP.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(T)};this.getAsControlPoint=function(){var T=this.getPoint();this.control=T;return T};this.getAsCurrentPoint=function(){var T=this.getPoint();this.current=T;return T};this.getReflectedControlPoint=function(){if(this.previousCommand.toLowerCase()!="c"&&this.previousCommand.toLowerCase()!="s"&&this.previousCommand.toLowerCase()!="q"&&this.previousCommand.toLowerCase()!="t"){return this.current}var T=new dP.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return T};this.makeAbsolute=function(T){if(this.isRelativeCommand()){T.x+=this.current.x;T.y+=this.current.y}return T};this.addMarker=function(kv,kw,T){if(T!=null&&this.angles.length>0&&this.angles[this.angles.length-1]==null){this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(T)}this.addMarkerAngle(kv,kw==null?null:kw.angleTo(kv))};this.addMarkerAngle=function(kv,T){this.points.push(kv);this.angles.push(T)};this.getMarkerPoints=function(){return this.points};this.getMarkerAngles=function(){for(var kv=0;kv<this.angles.length;kv++){if(this.angles[kv]==null){for(var T=kv+1;T<this.angles.length;T++){if(this.angles[T]!=null){this.angles[kv]=this.angles[T];break}}}}return this.angles}})(e);this.bounds=function(){return this.draw(null)};this.draw=function(kP){var kR=this.PathParser;kR.reset();var kC=new dP.BoundingBox();if(kP!=null){kP.beginPath()}while(!kR.isEnd()){kR.nextCommand();switch(kR.command){case"M":case"m":var kM=kR.getAsCurrentPoint();kR.addMarker(kM);kC.addPoint(kM.x,kM.y);if(kP!=null){kP.moveTo(kM.x,kM.y)}kR.start=kR.current;while(!kR.isCommandOrEnd()){var kM=kR.getAsCurrentPoint();kR.addMarker(kM,kR.start);kC.addPoint(kM.x,kM.y);if(kP!=null){kP.lineTo(kM.x,kM.y)}}break;case"L":case"l":while(!kR.isCommandOrEnd()){var kV=kR.current;var kM=kR.getAsCurrentPoint();kR.addMarker(kM,kV);kC.addPoint(kM.x,kM.y);if(kP!=null){kP.lineTo(kM.x,kM.y)}}break;case"H":case"h":while(!kR.isCommandOrEnd()){var kv=new dP.Point((kR.isRelativeCommand()?kR.current.x:0)+kR.getScalar(),kR.current.y);kR.addMarker(kv,kR.current);kR.current=kv;kC.addPoint(kR.current.x,kR.current.y);if(kP!=null){kP.lineTo(kR.current.x,kR.current.y)}}break;case"V":case"v":while(!kR.isCommandOrEnd()){var kv=new dP.Point(kR.current.x,(kR.isRelativeCommand()?kR.current.y:0)+kR.getScalar());kR.addMarker(kv,kR.current);kR.current=kv;kC.addPoint(kR.current.x,kR.current.y);if(kP!=null){kP.lineTo(kR.current.x,kR.current.y)}}break;case"C":case"c":while(!kR.isCommandOrEnd()){var kT=kR.current;var kx=kR.getPoint();var ky=kR.getAsControlPoint();var kE=kR.getAsCurrentPoint();kR.addMarker(kE,ky,kx);kC.addBezierCurve(kT.x,kT.y,kx.x,kx.y,ky.x,ky.y,kE.x,kE.y);if(kP!=null){kP.bezierCurveTo(kx.x,kx.y,ky.x,ky.y,kE.x,kE.y)}}break;case"S":case"s":while(!kR.isCommandOrEnd()){var kT=kR.current;var kx=kR.getReflectedControlPoint();var ky=kR.getAsControlPoint();var kE=kR.getAsCurrentPoint();kR.addMarker(kE,ky,kx);kC.addBezierCurve(kT.x,kT.y,kx.x,kx.y,ky.x,ky.y,kE.x,kE.y);if(kP!=null){kP.bezierCurveTo(kx.x,kx.y,ky.x,ky.y,kE.x,kE.y)}}break;case"Q":case"q":while(!kR.isCommandOrEnd()){var kT=kR.current;var ky=kR.getAsControlPoint();var kE=kR.getAsCurrentPoint();kR.addMarker(kE,ky,ky);kC.addQuadraticCurve(kT.x,kT.y,ky.x,ky.y,kE.x,kE.y);if(kP!=null){kP.quadraticCurveTo(ky.x,ky.y,kE.x,kE.y)}}break;case"T":case"t":while(!kR.isCommandOrEnd()){var kT=kR.current;var ky=kR.getReflectedControlPoint();kR.control=ky;var kE=kR.getAsCurrentPoint();kR.addMarker(kE,ky,ky);kC.addQuadraticCurve(kT.x,kT.y,ky.x,ky.y,kE.x,kE.y);if(kP!=null){kP.quadraticCurveTo(ky.x,ky.y,kE.x,kE.y)}}break;case"A":case"a":while(!kR.isCommandOrEnd()){var kT=kR.current;var kB=kR.getScalar();var kA=kR.getScalar();var T=kR.getScalar()*(Math.PI/180);var kD=kR.getScalar();var kz=kR.getScalar();var kE=kR.getAsCurrentPoint();var kY=new dP.Point(Math.cos(T)*(kT.x-kE.x)/2+Math.sin(T)*(kT.y-kE.y)/2,-Math.sin(T)*(kT.x-kE.x)/2+Math.cos(T)*(kT.y-kE.y)/2);var kQ=Math.pow(kY.x,2)/Math.pow(kB,2)+Math.pow(kY.y,2)/Math.pow(kA,2);if(kQ>1){kB*=Math.sqrt(kQ);kA*=Math.sqrt(kQ)}var kI=(kD==kz?-1:1)*Math.sqrt(((Math.pow(kB,2)*Math.pow(kA,2))-(Math.pow(kB,2)*Math.pow(kY.y,2))-(Math.pow(kA,2)*Math.pow(kY.x,2)))/(Math.pow(kB,2)*Math.pow(kY.y,2)+Math.pow(kA,2)*Math.pow(kY.x,2)));if(isNaN(kI)){kI=0}var kH=new dP.Point(kI*kB*kY.y/kA,kI*-kA*kY.x/kB);var kw=new dP.Point((kT.x+kE.x)/2+Math.cos(T)*kH.x-Math.sin(T)*kH.y,(kT.y+kE.y)/2+Math.sin(T)*kH.x+Math.cos(T)*kH.y);var kO=function(kZ){return Math.sqrt(Math.pow(kZ[0],2)+Math.pow(kZ[1],2))};var kK=function(k0,kZ){return(k0[0]*kZ[0]+k0[1]*kZ[1])/(kO(k0)*kO(kZ))};var kW=function(k0,kZ){return(k0[0]*kZ[1]<k0[1]*kZ[0]?-1:1)*Math.acos(kK(k0,kZ))};var kX=kW([1,0],[(kY.x-kH.x)/kB,(kY.y-kH.y)/kA]);var kG=[(kY.x-kH.x)/kB,(kY.y-kH.y)/kA];var kF=[(-kY.x-kH.x)/kB,(-kY.y-kH.y)/kA];var kU=kW(kG,kF);if(kK(kG,kF)<=-1){kU=Math.PI}if(kK(kG,kF)>=1){kU=0}var kN=1-kz?1:-1;var kS=kX+kN*(kU/2);var i=new dP.Point(kw.x+kB*Math.cos(kS),kw.y+kA*Math.sin(kS));kR.addMarkerAngle(i,kS-kN*Math.PI/2);kR.addMarkerAngle(kE,kS-kN*Math.PI);kC.addPoint(kE.x,kE.y);if(kP!=null){var kK=kB>kA?kB:kA;var kL=kB>kA?1:kB/kA;var kJ=kB>kA?kA/kB:1;kP.translate(kw.x,kw.y);kP.rotate(T);kP.scale(kL,kJ);kP.arc(0,0,kK,kX,kX+kU,1-kz);kP.scale(1/kL,1/kJ);kP.rotate(-T);kP.translate(-kw.x,-kw.y)}}break;case"Z":case"z":if(kP!=null){kP.closePath()}kR.current=kR.start}}return kC};this.getMarkers=function(){var kv=this.PathParser.getMarkerPoints();var kx=this.PathParser.getMarkerAngles();var kw=[];for(var T=0;T<kv.length;T++){kw.push([kv[T],kx[T]])}return kw}}dP.trim=function(e){return e.replace(/^\s+|\s+$/g,"")};dP.compressSpaces=function(e){return e.replace(/[\s\r\t\n]+/gm," ")};dP.Point=function(e,i){this.x=e;this.y=i};dP.Point.prototype.angleTo=function(e){return Math.atan2(e.y-this.y,e.x-this.x)};dP.Point.prototype.applyTransform=function(e){var i=this.x*e[0]+this.y*e[2]+e[4];var T=this.x*e[1]+this.y*e[3]+e[5];this.x=i;this.y=T};dP.BoundingBox=function(i,kv,e,T){this.x1=Number.NaN;this.y1=Number.NaN;this.x2=Number.NaN;this.y2=Number.NaN;this.x=function(){return this.x1};this.y=function(){return this.y1};this.width=function(){return this.x2-this.x1};this.height=function(){return this.y2-this.y1};this.addPoint=function(kw,kx){if(kw!=null){if(isNaN(this.x1)||isNaN(this.x2)){this.x1=kw;this.x2=kw}if(kw<this.x1){this.x1=kw}if(kw>this.x2){this.x2=kw}}if(kx!=null){if(isNaN(this.y1)||isNaN(this.y2)){this.y1=kx;this.y2=kx}if(kx<this.y1){this.y1=kx}if(kx>this.y2){this.y2=kx}}};this.addX=function(kw){this.addPoint(kw,null)};this.addY=function(kw){this.addPoint(null,kw)};this.addBoundingBox=function(kw){this.addPoint(kw.x1,kw.y1);this.addPoint(kw.x2,kw.y2)};this.addQuadraticCurve=function(kB,kA,kx,kw,kD,kC){var kz=kB+2/3*(kx-kB);var ky=kA+2/3*(kw-kA);var kF=kz+1/3*(kD-kB);var kE=ky+1/3*(kC-kA);this.addBezierCurve(kB,kA,kz,kF,ky,kE,kD,kC)};this.addBezierCurve=function(kJ,kI,kA,ky,kF,kD,kL,kK){var kB=[kJ,kI],kz=[kA,ky],kx=[kF,kD],kw=[kL,kK];this.addPoint(kB[0],kB[1]);this.addPoint(kw[0],kw[1]);for(jG=0;jG<=1;jG++){var kM=function(kQ){return Math.pow(1-kQ,3)*kB[jG]+3*Math.pow(1-kQ,2)*kQ*kz[jG]+3*(1-kQ)*Math.pow(kQ,2)*kx[jG]+Math.pow(kQ,3)*kw[jG]};var kO=6*kB[jG]-12*kz[jG]+6*kx[jG];var kP=-3*kB[jG]+9*kz[jG]-9*kx[jG]+3*kw[jG];var kN=3*kz[jG]-3*kB[jG];if(kP==0){if(kO==0){continue}var kH=-kN/kO;if(0<kH&&kH<1){if(jG==0){this.addX(kM(kH))}if(jG==1){this.addY(kM(kH))}}continue}var kC=Math.pow(kO,2)-4*kN*kP;if(kC<0){continue}var kG=(-kO+Math.sqrt(kC))/(2*kP);if(0<kG&&kG<1){if(jG==0){this.addX(kM(kG))}if(jG==1){this.addY(kM(kG))}}var kE=(-kO-Math.sqrt(kC))/(2*kP);if(0<kE&&kE<1){if(jG==0){this.addX(kM(kE))}if(jG==1){this.addY(kM(kE))}}}};this.isPointInBox=function(kw,kx){return(this.x1<=kw&&kw<=this.x2&&this.y1<=kx&&kx<=this.y2)};this.addPoint(i,kv);this.addPoint(e,T)};function fp(i,e){this.id=bD.getGUID("symbol_icon_");this.size=(i instanceof ji)?i:new ji(2,2);this.anchor=(e instanceof ji)?e:new ji(this.size.width/2,this.size.height/2);this.data=null;this.offset=this.anchor;this.imageSize=this.size;this.imageOffset=new ji(0,0);this.style={scale:1,rotation:0};this.srcSetObject={};this._initOptions={size:this.size,scale:this.style.scale,rotation:this.style.rotation};this.overlay=null;this.isReDraw=false}fp.prototype.add=function(){const e=document.createElement("canvas");e.width=this.size.width;e.height=this.size.height;this.context=e.getContext("2d")};fp.prototype.remove=function(){if(this.context){this.context.clearRect(0,0,this.context.canvas.width,this.context.canvas.height);this.context.canvas.width=0;this.context.canvas.height=0}this.context=null;this.data=null};fp.prototype.render=function(e){return true};fp.prototype.resetInitOptions=function(){this._initOptions=new ji(this.size.width,this.size.height);this._initOptions.scale=this.style.scale;this._initOptions.rotation=this.style.rotation};fp.prototype.update=function(){var e=this.overlay;if(e){if(e.domElement){var kv=(this.style.scale-this._initOptions.scale)/this._initOptions.scale;if(kv>=0){kv=kv+1}else{kv=1+kv}var i=this._initOptions.rotation===0?this.style.rotation:(this.style.rotation-this._initOptions.rotation);while(i<0){i+=360}var T=e.domElement.style;T.width=this._initOptions.width+"px";T.height=this._initOptions.height+"px";T.transform="rotate("+i+"deg) scale("+kv+")"}if(!this.isReDraw){this._refresh(e)}}};fp.prototype._refresh=function(e){e.textureCoord=e.textureCoordGLMap=null;var i=new fS("onstatus_change");i.overlay=e;i.action="setIcon";i.imageUrlChanged=true;setTimeout(function(){e.fire(i)},100)};fp.prototype.generateRenderData=function(){var i=this.offset=this.anchor;var e=this.size;var T=[];T.push(-i.width,i.height-e.height,0);T.push(e.width-i.width,i.height-e.height,0);T.push(e.width-i.width,i.height,0);T.push(-i.width,i.height-e.height,0);T.push(e.width-i.width,i.height,0);T.push(-i.width,i.height,0);return{vertex:T}};fp.prototype.getCurrentImageUrl=function(){return this.id};fp.prototype.getRenderData=function(){this._renderData=this.generateRenderData();return this._renderData};fp.prototype.toString=function(){return"Symbol"};var fF={14:"m-0.00573,-10c-5.51975,0 -9.99427,4.47453 -9.99427,9.99428c0,5.51974 4.47452,9.99425 9.99427,9.99425c5.51972,0 9.99426,-4.47452 9.99426,-9.99425c0,-5.51975 -4.47453,-9.99428 -9.99426,-9.99428zm0,17.92491c-4.37412,0 -7.93132,-3.55788 -7.93132,-7.93063c0,-4.37345 3.5572,-7.93134 7.93132,-7.93134c4.37411,0 7.93062,3.55721 7.93062,7.93134c0,4.37412 -3.55789,7.93063 -7.93062,7.93063zm-0.00068,-15.4088c-0.38027,0 -0.68696,0.30807 -0.68696,0.68765l0,6.34078l-4.15752,1.81815c-0.34794,0.15266 -0.50611,0.55837 -0.35344,0.90632c0.11278,0.25787 0.36445,0.4119 0.6292,0.4119c0.09214,0 0.18635,-0.01857 0.27575,-0.05845l4.55635,-1.99279c0.00344,-0.00137 0.00619,-0.00275 0.00894,-0.00412l0.00275,-0.00138c0.01032,-0.00413 0.01581,-0.01376 0.02545,-0.01719c0.07151,-0.03576 0.13821,-0.07771 0.19185,-0.1341c0.02337,-0.02338 0.03644,-0.05364 0.05431,-0.08045c0.03301,-0.04401 0.06946,-0.08733 0.0894,-0.14028c0.0165,-0.04126 0.01787,-0.08596 0.02613,-0.12997c0.00894,-0.04469 0.02614,-0.08389 0.02614,-0.1286l0,-6.7905c0,-0.37889 -0.30807,-0.68697 -0.68833,-0.68697z",13:"m-0.00706,-9.5c-5.24281,0 -9.49294,4.25065 -9.49294,9.49294c0,5.24331 4.25014,9.49294 9.49294,9.49294c5.24281,0 9.49294,-4.24964 9.49294,-9.49294c0,-5.2423 -4.25013,-9.49294 -9.49294,-9.49294zm3.08857,3.85997c0.61044,0 1.10279,0.96873 1.10279,2.16271s-0.49384,2.1647 -1.10279,2.1647c-0.60844,0 -1.10228,-0.96873 -1.10228,-2.16372s0.49434,-2.16369 1.10228,-2.16369zm-6.28628,0c0.60844,0 1.10228,0.96873 1.10228,2.16271s-0.49284,2.1647 -1.10228,2.1647s-1.10277,-0.96873 -1.10277,-2.16372s0.49383,-2.16369 1.10277,-2.16369zm3.21167,12.16493c-1.87667,0 -3.63373,-1.14814 -5.14663,-3.14239c1.56571,1.02156 3.27993,1.59064 5.07786,1.59064c1.90905,0 3.72343,-0.63985 5.36539,-1.78497c-1.54429,2.11685 -3.35767,3.33672 -5.29662,3.33672l-0.00001,0z",12:"m9.27295,5.92958l-2.64443,-4.57961c-0.79727,-1.37992 -2.10131,-3.63983 -2.8986,-5.01973l-2.64441,-4.57858c-0.79782,-1.38093 -2.10186,-1.38093 -2.89913,0l-2.64335,4.57858c-0.79728,1.3799 -2.10188,3.63981 -2.89916,5.01973l-2.64387,4.57961c-0.79728,1.38101 -0.14472,2.50988 1.44983,2.50988l16.37221,0c1.59561,0 2.24711,-1.12887 1.45091,-2.50988l0,0zm-8.88166,0.70811l-1.56837,0l0,-1.50484l1.56837,0l0,1.50484zm-0.07527,-2.61447l-1.41621,0l-0.14044,-6.44231l1.68427,0l-0.12761,6.44231l0,0z",11:"m8.08295,-6.56414l-3.59319,0l0,-1.43586l-8.98155,0l0,1.43586l-3.59321,0c-1.0569,0 -1.915,0.85509 -1.915,1.91159l0,9.92258c0,1.05357 0.8581,1.91158 1.915,1.91158l16.16796,0c1.05692,0 1.91501,-0.85801 1.91501,-1.91158l0,-9.92258c0,-1.0565 -0.85809,-1.91159 -1.91501,-1.91159l0,0zm-8.08397,12.66884c-3.20143,0 -5.80643,-2.60031 -5.80643,-5.79596c0,-3.19569 2.605,-5.79891 5.80643,-5.79891s5.80789,2.60322 5.80789,5.79891c0,3.19565 -2.60794,5.79596 -5.80789,5.79596zm0,-9.6804c-2.15036,0 -3.89142,1.7394 -3.89142,3.88444c0,2.14503 1.74252,3.8844 3.89142,3.8844c2.1489,0 3.89141,-1.73937 3.89141,-3.8844c0,-2.14503 -1.74105,-3.88444 -3.89141,-3.88444z",10:"m0,-10c-0.20885,0 -0.39491,0.08583 -0.55177,0.24149c-0.15674,0.15536 -0.28646,0.37838 -0.39429,0.65665c-0.21586,0.55655 -0.34853,1.33844 -0.42114,2.27477c-0.07231,0.93446 -0.08474,2.02273 -0.05447,3.18765c-2.58175,1.05925 -7.81787,3.24648 -8.23854,3.73474c-0.56001,0.65029 -0.37908,1.3954 -0.15331,1.89002l8.608,-1.75235c0.18202,2.28374 0.4407,4.5455 0.66615,6.31771c-0.8418,0.24646 -2.41323,0.73303 -2.73754,1.03474c-0.4469,0.41562 -0.4469,1.75793 -0.4469,1.75793l3.52318,-0.28665c0.08286,0.57874 0.13486,0.9163 0.13486,0.9163l0.00511,0.03042l0.02778,0l0.06486,0l0.02778,0l0.00511,-0.03042c0,0 0.05185,-0.33756 0.13486,-0.9163l3.52424,0.28665c0,0 0,-1.34231 -0.44688,-1.75793c-0.32446,-0.30172 -1.89697,-0.7895 -2.73847,-1.0358c0.22484,-1.76681 0.4832,-4.02001 0.66507,-6.29634l8.50712,1.73203c0.22561,-0.49462 0.40765,-1.23973 -0.15237,-1.89002c-0.41538,-0.48221 -5.52504,-2.62071 -8.1386,-3.69423c0.03119,-1.17999 0.01971,-2.28285 -0.05353,-3.22816l0,-0.00233c-0.07263,-0.93523 -0.20545,-1.71635 -0.42114,-2.27244c-0.10784,-0.27827 -0.23634,-0.50114 -0.3932,-0.65665c-0.15689,-0.15567 -0.34293,-0.24149 -0.55195,-0.24149l0,0l0,0l0,0l0.00001,0l0,0l-0.00003,0.00001z",3:"m-10,0l10,-10l10,10l-10,10l-10,-10z",5:"M0,0 L-5,-15 0,-10 5,-15 z",6:"M0,0 L5,15 0,10 -5,15z",7:"M-5,-15 L0,0 5,-15",8:"M-5,15 L0,0 5,15",9:"m0,-24c-4.4183,0 -8,3.58167 -8,8c0,1.42102 0.3816,2.75 1.0312,3.90601c0.1079,0.19202 0.221,0.38098 0.3438,0.56299l6.625,11.53101l6.625,-11.53101c0.102,-0.151 0.19,-0.31097 0.281,-0.46899l0.063,-0.09399c0.649,-1.15601 1.031,-2.48499 1.031,-3.90601c0,-4.41833 -3.582,-8 -8,-8zm0,4c2.209,0 4,1.79089 4,4c0,2.20898 -1.791,4 -4,4c-2.2091,0 -4,-1.79102 -4,-4c0,-2.20911 1.7909,-4 4,-4z"};var cc={BMap_Symbol_SHAPE_CIRCLE:1,BMap_Symbol_SHAPE_RECTANGLE:2,BMap_Symbol_SHAPE_RHOMBUS:3,BMap_Symbol_SHAPE_STAR:4,BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW:5,BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW:6,BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW:7,BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW:8,BMap_Symbol_SHAPE_POINT:9,BMap_Symbol_SHAPE_PLANE:10,BMap_Symbol_SHAPE_CAMERA:11,BMap_Symbol_SHAPE_WARNING:12,BMap_Symbol_SHAPE_SMILE:13,BMap_Symbol_SHAPE_CLOCK:14};function dR(i,e){fp.call(this);e=e||{};this.style={anchor:e.anchor||new ji(0,0),fillColor:e.fillColor||"#000",fillOpacity:e.fillOpacity||0,scale:e.scale||1,rotation:e.rotation||0,strokeColor:e.strokeColor||"#000",strokeOpacity:e.strokeOpacity===undefined?1:e.strokeOpacity,strokeWeight:e.strokeWeight};this._type=(typeof i==="number")?i:"UserDefined";this._anchor=this.style.anchor;this._originOffset=new ji(0,0);this.anchor=new ji(0,0);this._rawPath=i;this._buildPath(true)}dR.inherits(fp,"SVGSymbol");dR.generateKey=function(kv,i){if(!kv){return null}if(parseInt(kv)){kv=parseInt(kv)}if(typeof kv==="number"){if(!fF[kv]&&![0,1,2,0,4][kv]){return null}}var e={anchor:i.anchor||new ji(0,0),fillColor:i.fillColor||"#000",fillOpacity:i.fillOpacity||0,scale:i.scale||1,rotation:i.rotation||0,strokeColor:i.strokeColor||"#000",strokeOpacity:i.strokeOpacity===undefined?1:i.strokeOpacity,strokeWeight:i.strokeWeight};var T=o({path:kv,style:e});return"symbol_svg_icon_"+T};e6.extend(dR.prototype,{_buildPath:function(kG){var kA=this;var kC=kA._rawPath;if(parseInt(kC)){kC=parseInt(kC)}if(fF[kC]){kC=fF[kC]}kA.id=dR.generateKey(kC,kA.style);if(!kA.id){return}switch(kC){case cc.BMap_Symbol_SHAPE_CIRCLE:var kD=kA._calSize(2),kB=kD,kL=kA.style.scale,kw=kA._anchor;this.size=new ji(kD,kB);this.anchor=new ji(kD/2+kw.width*kL,kB/2+kw.height*kL);kA.path=cc.BMap_Symbol_SHAPE_CIRCLE;break;case cc.BMap_Symbol_SHAPE_RECTANGLE:var kD=kA._calSize(4),kB=kA._calSize(2),kw=kA._anchor,kI=kA.style.strokeWeight!==undefined?kA.style.strokeWeight:kA.style.scale,kL=kA.style.scale;this.size=new ji(kD,kB);this._originOffset=new ji(Math.floor(-kI/2),Math.floor(-kI/2));this.anchor=new ji(kD/2+kw.width*kL,kB/2+kw.height*kL);kA.path=cc.BMap_Symbol_SHAPE_RECTANGLE;break;case cc.BMap_Symbol_SHAPE_STAR:var kD=kA._calSize(20),kB=kD,kw=kA._anchor,kL=kA.style.scale;this.size=new ji(kD,kB);this.anchor=new ji(kD/2+kw.width*kL,kB/2+kw.height*kL);kA.path=cc.BMap_Symbol_SHAPE_STAR;break;default:var kC=new dP(kC),kv=kC.bounds(),kF=kA.style.rotation*Math.PI/180,kI=kA.style.strokeWeight!==undefined?kA.style.strokeWeight:kA.style.scale,kL=kA.style.scale,kw=kA._anchor;var kK=new ji(Math.floor(kv.x1*kL-kI/2),Math.floor(kv.y1*kL-kI/2)),e={topleft:new fr(Math.floor(kv.x1*kL-kI/2)-kL*kw.width,Math.floor(kv.y1*kL-kI/2)-kL*kw.height),bottomleft:new fr(Math.floor(kv.x1*kL-kI/2)-kL*kw.width,Math.ceil(kv.y2*kL-kI/2)-kL*kw.height),topright:new fr(Math.ceil(kv.x2*kL+kI/2)-kL*kw.width,Math.floor(kv.y1*kL-kI/2)-kL*kw.height),bottomright:new fr(Math.ceil(kv.x2*kL+kI/2)-kL*kw.width,Math.ceil(kv.y2*kL+kI/2)-kL*kw.height)},i={},kJ=[],kz=[];var kH=e.topleft.x===0?0:Math.atan(e.topleft.y/e.topleft.x),T=kH+kF;for(var kE in e){var ky=Math.cos(kF)*e[kE].x-Math.sin(kF)*e[kE].y,kx=Math.sin(kF)*e[kE].x+Math.cos(kF)*e[kE].y;i[kE]=new fr(ky,kx);kJ.push(ky);kz.push(kx)}xmax=Math.max.apply(Math,kJ),ymax=Math.max.apply(Math,kz),xmin=Math.min.apply(Math,kJ),ymin=Math.min.apply(Math,kz);this.size=new ji(Math.ceil(xmax-xmin),Math.ceil(ymax-ymin));this.anchor=new ji(-xmin,-ymin);this._originOffset=new ji(xmin-i.topleft.x,ymin-i.topleft.y);this._innerOffset=new fr(kK.width,kK.height);this._rotationAngle=kF;kA.path=kC;break}this.imageSize=new ji(this.size.width,this.size.height);this.offset=this.anchor;if(kG){this.resetInitOptions()}},_calSize:function(e){if(this.style.strokeWeight){return e*this.style.scale+this.style.strokeWeight%3+this.style.strokeWeight}else{return e*this.style.scale+this.style.scale+this.style.scale%2}},render:function(T){var kB=this,kv=this.style.scale,kC,kD=this.size;if(this.context){kC=this.context;if(this.context.canvas.width/2!==this.size.width||this.context.canvas.height/2!==this.size.height){this.context.canvas.width=this.size.width*2;this.context.canvas.height=this.size.height*2}kC.clearRect(0,0,this.size.width*2,this.size.height*2);kC.fillStyle=hR.convert2rgba(kB.style.fillColor,kB.style.fillOpacity);kC.strokeStyle=hR.convert2rgba(kB.style.strokeColor,kB.style.strokeOpacity);kC.save()}else{return false}kC.scale(2,2);kC.lineCap="round";kC.lineJoin="round";kC.lineWidth=kB.style.strokeWeight||kv;if(kB._originOffset){kC.translate(-kB._originOffset.width,-kB._originOffset.height)}if(kB._rotationAngle){kC.rotate(kB._rotationAngle)}if(kB._innerOffset){kC.translate(-kB._innerOffset.x,-kB._innerOffset.y)}switch(kB.path){case cc.BMap_Symbol_SHAPE_CIRCLE:kC.arc(kD.width/2,kD.height/2,kv,0,2*Math.PI);break;case cc.BMap_Symbol_SHAPE_RECTANGLE:kC.rect(0,0,4*kv,2*kv);break;case cc.BMap_Symbol_SHAPE_STAR:kC.beginPath();var kx=kD.width/2,kz=kv*10;var kw=(2*Math.PI)/10;for(var ky=11;ky!=0;ky--){var e=kz*(ky%2+1)/2;var kA=kw*ky;kC.lineTo((e*Math.sin(kA))+kx,(e*Math.cos(kA))+kx)}kC.closePath();break;default:kC.lineWidth=kC.lineWidth/kv;kC.scale(kv,kv);kB.path.draw(kC)}kC.fill();kC.stroke();kC.restore();this.data=kC.getImageData(0,0,this.size.width*2,this.size.height*2);return true},setPath:function(e){this._rawPath=e;this._buildPath();this.update()},setAnchor:function(e){this._anchor=this.style.anchor=e;this._buildPath();this.update()},setRotation:function(e){this.style.rotation=e;this._buildPath();this.update()},setScale:function(e){this.style.scale=e;this._buildPath();this.update()},setStrokeWeight:function(e){this.style.strokeWeight=e;this._buildPath();this.update()},setStrokeColor:function(e){e=hR.convert2rgba(e,this.style.strokeOpacity);this.style.strokeColor=e;this._buildPath();this.update()},setStrokeOpacity:function(e){this.style.strokeOpacity=e;this._buildPath();this.update()},setFillOpacity:function(e){this.style.fillOpacity=e;this._buildPath();this.update()},setFillColor:function(e){this.style.fillColor=e;this._buildPath();this.update()}});bD.SymbolShapeType=cc;function jL(kx,kv,T){if(!kx||!kv){return}this.imageUrl=null;this.imageDom=null;if(typeof kx==="string"){this.imageUrl=kx}else{this.imageDom=kx;if(!this.imageDom.id){this.imageDom.id=bD.getGUID("icon_dom_")}}this.size=kv;var kw=new ji(Math.floor(kv.width/2),Math.floor(kv.height/2));var i={offset:kw,imageOffset:new ji(0,0)};T=T||{};for(var e in T){i[e]=T[e]}if(T.anchor){i.offset=T.anchor}this.anchor=this.offset=i.offset;this.imageOffset=i.imageOffset;this.infoWindowOffset=T.infoWindowOffset||this.offset;this.printImageUrl=T.printImageUrl||"";this.imageSize=T.imageSize||this.size;this.srcSetObject={};this.setImageSrcset(T.srcset||T.srcSet)}jL.prototype.setImageUrl=function(e){if(!e){return}this.imageUrl=e;this._renderData=null};jL.prototype.getCurrentImageUrl=function(){if(window.devicePixelRatio>1&&this.srcSetObject["2x"]){return this.srcSetObject["2x"]}return this.imageUrl};jL.prototype.setPrintImageUrl=function(e){if(!e){return}this.printImageUrl=e};jL.prototype.setSize=function(e){if(!e){return}this.size=new ji(e.width,e.height);this._renderData=null};jL.prototype.setOffset=function(e){if(!e){return}this.anchor=this.offset=new ji(e.width,e.height);this._renderData=null};jL.prototype.setAnchor=function(e){this.setOffset(e)};jL.prototype.setImageOffset=function(e){if(!e){return}this.imageOffset=new ji(e.width,e.height);this._renderData=null};jL.prototype.setInfoWindowOffset=function(e){if(!e){return}this.infoWindowOffset=new ji(e.width,e.height)};jL.prototype.setImageSize=function(e){if(!e){return}this.imageSize=new ji(e.width,e.height)};jL.prototype.setImageSrcset=function(T){var e="";if(!T){return}for(var i in T){if(T.hasOwnProperty(i)){this.srcSetObject[i]=T[i];e=T[i]+" "+i+","}}this.srcSet=e};jL.prototype.toString=function(){return"Icon"};jL.prototype.generateRenderData=function(kx){var T=this.offset;var e=this.size;var kz=this.imageOffset;var ky=[];ky.push(-T.width,T.height-e.height,0);ky.push(e.width-T.width,T.height-e.height,0);ky.push(e.width-T.width,T.height,0);ky.push(-T.width,T.height-e.height,0);ky.push(e.width-T.width,T.height,0);ky.push(-T.width,T.height,0);if(kx!==0){for(var kw=0;kw<ky.length;kw+=3){var kv=vec2.fromValues(ky[kw],ky[kw+1]);vec2.rotate(kv,kv,[0,0],iS(-kx));ky[kw]=kv[0];ky[kw+1]=kv[1]}}return{vertex:ky}};jL.prototype.getRenderData=function(e){this._renderData=this.generateRenderData(e);return this._renderData};function ec(T,i){e6.BaseClass.call(this);this.content=T;this.map=null;this._config={width:0,height:0,maxWidth:600,offset:new ji(0,0),title:"",maxContent:"",enableMaximize:false,enableAutoPan:true,enableCloseOnClick:true,margin:[10,10,40,10],collisions:[[10,10],[10,10],[10,10],[10,10]],ifMaxScene:false,canScroll:false,onClosing:function(){return true}};this.setConfig(i);if(this._config.width!==0){if(this._config.width<220){this._config.width=220}if(this._config.width>730){this._config.width=730}}if(this._config.height!==0){if(this._config.height<60){this._config.height=60}if(this._config.height>650){this._config.height=650}}if(this._config.maxWidth!==0){if(this._config.maxWidth<220){this._config.maxWidth=220}if(this._config.maxWidth>730){this._config.maxWidth=730}}this.isWinMax=false;this.IMG_PATH=C.imgPath;this.overlay=null;hL.sendMessage(aZ(4,2,10),["overlay","infowindow"]);var e=this;hh.load("infowindow",function(){e._draw()})}ec.inherits(e6.BaseClass,"InfoWindow");e6.extend(ec.prototype,{setWidth:function(e){e=e*1;if(!e&&e!==0||isNaN(e)||e<0){return}if(e!==0){if(e<220){e=220}if(e>730){e=730}}this._config.width=e},setHeight:function(e){e=e*1;if(!e&&e!==0||isNaN(e)||e<0){return}if(e!==0){if(e<60){e=60}if(e>650){e=650}}this._config.height=e},setMaxWidth:function(e){e=e*1;if(!e&&e!==0||isNaN(e)||e<0){return}if(e!==0){if(e<220){e=220}if(e>730){e=730}}this._config.maxWidth=e},setTitle:function(e){this._config.title=e||""},setContent:function(e){this.content=e||""},getContent:function(){return this.content},setMaxContent:function(e){this._config.maxContent=e||""},redraw:function(){},enableAutoPan:function(){this._config.enableAutoPan=true},disableAutoPan:function(){this._config.enableAutoPan=false},enableCloseOnClick:function(){this._config.enableCloseOnClick=true},disableCloseOnClick:function(){this._config.enableCloseOnClick=false},enableMaximize:function(){this._config.enableMaximize=true},disableMaximize:function(){this._config.enableMaximize=false},show:function(){this._visible=true},hide:function(){this._visible=false},close:function(){this.hide()},dispose:function(){e6.BaseClass.prototype.decontrol.call(this)},maximize:function(){this.isWinMax=true},restore:function(){this.isWinMax=false},setConfig:function(i){if(!i){return}for(var e in i){if(typeof(this._config[e])===typeof(i[e])){this._config[e]=i[e]}}},isVisible:function(){return this.isOpen()},isOpen:function(){return false},getPointIn:function(){if(this.overlay&&this.overlay.getPoint){return this.overlay.getPoint()}},getTitle:function(){return this._config.title||""},getPosition:function(){return this.latLng},getPoint:function(){var e=this.getPointIn();if(this.map.config.coordType===BMAP_COORD_GCJ02){var i=jr.convertMC2LL(e);return eP(i)}return jr.convertMC2LL(e)},getOffset:function(){return this._config.offset},dispose:function(){e6.BaseClass.prototype.decontrol.call(this)},toString:function(){return"InfoWindow"}});h0.prototype.openInfoWindow=function(T,e){T.latLng=new cx(e.lat,e.lng);var i=jr.convertLL2MC(e);this.openInfoWindowIn(T,i)};h0.prototype.closeInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeInfoWindow()}};h0.prototype.openInfoWindowIn=function(kv,e){if(!kv||kv.toString()!=="InfoWindow"||!e||e.toString()!=="Point"){return}var i=this.temp;if(!i.marker){var T=new jL(C.imgPath+"blank.gif",{width:1,height:1});i.marker=new j7(e,{icon:T,width:1,height:1,offset:new ji(0,0),infoWindowOffset:new ji(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openInfoWindow(kv)};eJ.prototype.openInfoWindow=function(e){if(this.map){this.map.closeInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;e6.BaseClass.call(e,e.hashCode)}};eJ.prototype.closeInfoWindow=function(){if(this.map&&this.map.temp._infoWin){this.map.temp._infoWin._visible=false;this.map.temp._infoWin.decontrol();this.map.temp._infoWin=null}};function bj(T,i){eJ.call(this);this.content=T;this.map=null;this.domElement=null;this._config={width:0,offset:new ji(0,0),styles:{backgroundColor:"#fff",border:"1px solid #f00",padding:"1px",whiteSpace:"nowrap",fontSize:"12px",zIndex:"80",MozUserSelect:"none"},point:null,enableMassClear:true};i=i||{};this.setConfig(i);if(this._config.width<0){this._config.width=0}this.point=this._config.point;hL.sendMessage(aZ(4,2,6),["overlay","dom_label"]);var e=this;hh.load("marker",function(){e._draw()})}bj.inherits(eJ,"Label");e6.extend(bj.prototype,{setPoint:function(e){if(e&&e.toString()==="Point"&&!this.getMarker()){if(this.coordType===BMAP_COORD_GCJ02){var i=iL(e,3);this.point=this._config.point=new cD(i.lng,i.lat)}else{this.point=this._config.point=new cD(e.lng,e.lat)}}},setContent:function(e){this.content=e},getContent:function(e){return this.content},setOpacity:function(e){if(e>=0&&e<=1){this._config.opacity=e}},setOffset:function(e){if(!e||e.toString()!=="Size"){return}this._config.offset=new ji(e.width,e.height)},getOffset:function(){return this._config.offset},setStyle:function(e){e=e||{};this._config.styles=e6.extend(this._config.styles,e)},setStyles:function(e){this.setStyle(e)},setTitle:function(e){this._config.title=e||""},getTitle:function(){return this._config.title},setMarker:function(e){if(this._marker&&this._marker!==e){this._marker._config.label=null}this._marker=e;if(e){this.point=this._config.point=e.getPoint()}else{this.point=this._config.point=null}},getMarker:function(){return this._marker||null},getPositionIn:function(){return this.getPoint()},});function h7(T,i){var kv={};for(var e in i){if(i.hasOwnProperty(e)){if(e==="position"){kv.point=jr.convertLL2MC(i[e]);this.latLng=new cx(i[e]["lat"],i[e]["lng"])}else{kv[e]=i[e]}}}bj.call(this,T,kv)}h7.inherits(bj,"LabelOut");e6.extend(h7.prototype,{toString:function(){return"Label"},setPosition:function(e){this.latLng=new cx(e.lat,e.lng);var i=jr.convertLL2MC(e);this.setPoint(i)},getPosition:function(){return this.latLng}});window.BMAP_ANIMATION_DROP=1;window.BMAP_ANIMATION_BOUNCE=2;function j7(e,i){eJ.call(this);i=i||{};this.delFlag=i.delFlag;this.point=e;this._rotation=0;this.map=null;this._animation=null;this.domElement=null;this.iconDom=null;this.infoWindowDom=null;this.siblingElement=null;this.textureCoord=null;this.textureCoordGLMap=null;this.collisionDetectionFailed=false;this._config={offset:new ji(0,0),opacity:1,icon:null,title:"",infoWindow:null,label:null,baseZIndex:0,clickable:true,zIndexFixed:false,isTop:false,enableMassClear:true,enableDragging:false,raiseOnDrag:false,restrictDraggingArea:false,startAnimation:"",enableCollisionDetection:false,rank:0,enableDraggingMap:false};this.setOptions(i);this._addlog();this._isDragging=false;var T=this;hh.load("marker",function(){T._draw()})}j7.TOP_ZINDEX=aS.getZIndex(-90)+1000000;j7.DRAG_ZINDEX=j7.TOP_ZINDEX+1000000;j7._injectMethond=function(e){e6.extend(j7.prototype,e)};j7.inherits(eJ,"Marker");e6.extend(j7.prototype,{toString:function(){return"Marker"},_addlog:function(){var e=1;var i="normal";if(this._config.icon instanceof dR){e=2;i="svg_symbol"}else{if(this._config.icon instanceof fp){e=3;i="custom_symbol"}}hL.sendMessage(aZ(4,2,1,e),["overlay","marker",i])},setOptions:function(e){this.setConfig(e);if(!e.icon){this._config.icon=new jL(C.imgPath+"marker_red.png",new ji(23,25),{offset:new ji(10,25),infoWindowOffset:new ji(10,0)})}},setIcon:function(e){if(e){this._config.icon=e;this.textureCoord=this.textureCoordGLMap=null}},getIcon:function(){return this._config.icon},setLabel:function(e){if(!(e instanceof bj)){return}this._config.label=e;e._config.enableMassClear=this._config.enableMassClear;e.setPoint(this.point)},getLabel:function(){return this._config.label},enableDragging:function(){this._config.enableDragging=true},disableDragging:function(){this._config.enableDragging=false},setPoint:function(e){if(e){if(this.map.config.coordType===BMAP_COORD_GCJ02){var i=iL(e,3);this.point=this._config.point=new cD(i.lng,i.lat);this.latLng=jr.convertMC2LL(i)}else{this.point=this._config.point=new cD(e.lng,e.lat);this.latLng=jr.convertMC2LL(e)}}},setPositionIn:function(e){this.setPoint(e)},getPositionIn:function(){return this.getPoint()},setTop:function(i,e){this._config.isTop=!!i;if(i){this._addi=e||0}},setTitle:function(e){this._config.title=e||""},getTitle:function(){return this._config.title},setOffset:function(e){if(e){this._config.offset=e}},getOffset:function(){return this._config.offset},setAnimation:function(e){this._animation=e},setRank:function(e){this._config.rank=e},getRank:function(){return this._config.rank},setRotation:function(e){while(e<0){e+=360}this._rotation=e%360},getRotation:function(){return this._rotation}});function s(e,T){this.latLng=new cx(e.lat,e.lng);var i=jr.convertLL2MC(e);j7.call(this,i,T)}s.inherits(j7,"MarkerOut");e6.extend(s.prototype,{toString:function(){return"Marker"},toGeoJSON:function(){var i="Point";var T=[this.latLng.lng,this.latLng.lat];var e={type:"Feature",geometry:{type:i,coordinates:T},properties:this.properties};return e},updateByGeoJSON:function(T){var e=new gJ();var kx=e.readFeaturesFromObject(T)||[];for(var kv=0,kw=kx.length;kv<kw;++kv){if(kx[kv] instanceof s){this.properties=kx[kv].properties;this.setPosition(kx[kv].getPosition());break}}},setPosition:function(e){this.latLng=new cx(e.lat,e.lng);var i=jr.convertLL2MC(e);this.setPositionIn(i)},getPosition:function(){return this.latLng},});window.BMAP_SHAPE_CIRCLE=1;window.BMAP_SHAPE_RECT=2;function eo(i,e,T){eJ.call(this,e,T);this.domElement=null;this.point=i;T=T||{};this._config={};this._config.height=e||0;this._config.size=typeof T.size==="number"?T.size:50;this._config.fillOpacity=typeof T.fillOpacity==="number"?T.fillOpacity:0.8;this._config.shape=typeof T.shape==="number"?T.shape:1;ch(this._config.fillOpacity,0,1);if(T.fillColor===""){this._config.fillColor=""}else{this._config.fillColor=T.fillColor?T.fillColor:"#f00"}this._config.icon=(T.icon instanceof jL||T.icon instanceof fp)?T.icon:"";this._config.enableMassClear=T.enableMassClear||true;hL.sendMessage(aZ(4,2,2),["overlay","marker3d"]);var kv=this;hh.load("marker",function(){kv._draw()})}eo.inherits(eJ,"Marker3D");e6.extend(eo.prototype,{setPoint:function(e){if(this.map.config.coordType===BMAP_COORD_GCJ02){var T=iL(e,3);this.point=this._config.point=new cD(T.lng,T.lat);this.latLng=jr.convertMC2LL(T)}else{this.point=this._config.point=new cD(e.lng,e.lat);this.latLng=jr.convertMC2LL(e)}var i=new fS("onstatus_change");i.overlay=this;i.action="setPoint";this.fire(i)},setPositionIn:function(e){this.setPoint(e)},getPositionIn:function(){return this.getPoint()},setDomAttribute:function(i,T){var e=new fS("onlineupdate");e.overlay=this;this.dispatchEvent(e)}});function el(i,e,kv){this.latLng=new cx(i.lat,i.lng);var T=jr.convertLL2MC(i);eo.call(this,T,e,kv)}el.inherits(eo,"Marker3d");e6.extend(el.prototype,{toString:function(){return"Marker3D"},setHeight:function(e){this._config.height=Number(e);this.draw();var i=new fS("onlineupdate");i.overlay=this;this.dispatchEvent(i)},getHeight:function(){return this._config.height},setFillOpacity:function(e){if(e>1||e<0){return}this._config.fillOpacity=e;this.setDomAttribute("fillopacity",e)},getFillOpacity:function(){return this._config.fillOpacity},setFillColor:function(e){this._config.fillColor=e||"";this.setDomAttribute("fillcolor",e)},getFillColor:function(){return this._config.fillColor},setIcon:function(i){if(!i||!this.map){return}this._config.icon=i;if(this._config.icon){var e=this._config.icon.getCurrentImageUrl();var kv=i.getCurrentImageUrl()!==e;this._config.icon=i;this.textureCoord=this.textureCoordGLMap=null;this.draw();var T=new fS("onstatus_change");T.overlay=this;T.action="setIcon";T.imageUrlChanged=kv;this.fire(T)}},getIcon:function(){return this._config.icon},setPosition:function(e){this.latLng=new cx(e.lat,e.lng);var i=jr.convertLL2MC(e);this.setPositionIn(i)},getPosition:function(){var e=this.getPositionIn();return jr.convertMC2LL(e)}});function f4(T,e){iQ.call(this,e);this._normalizedBounds=new ie();this.setPoints(T);this._addlog(e);var i=this;hh.load("poly",function(){i._draw()})}f4.inherits(iQ,"Polyline");e6.extend(f4.prototype,{_addlog:function(e){var i=1;var T="normal";if(e&&e.strokeTexture){i=2;T="texture"}hL.sendMessage(aZ(4,2,3,i),["overlay","polyline",T])},getBoundsIn:function(e){if(!e){this._bounds.setMinMax();return this._bounds}this._normalizedBounds.setMinMax();return this._normalizedBounds},setPoints:function(ky){this._clearCache();this.points=iQ.getGraphPoints(ky).slice(0);if(this._config.geodesic===true){this.greatCirclePoints.length=0;for(var kw=0;kw<this.points.length-1;kw++){this.calcGreatCirclePoints(this.points[kw],this.points[kw+1])}}else{if(this._config.linkRight){var kz=[];var kx=null;for(var kw=0;kw<this.points.length-1;kw++){if(!kw){kz.push(this.points[kw])}var T=kx||this.points[kw];kx=this.points[kw+1];var kv=eC(kx,T);if(kv>15437726){if(kx.lng<T.lng){kx.lng+=h0.WORLD_SIZE_MC}else{kx.lng-=h0.WORLD_SIZE_MC}}kz.push(kx)}this.points=kz}}this._calcBounds();this.draw();var e=new fS("onlineupdate");e.overlay=this;this.dispatchEvent(e);if(this._visible&&this._config.enableEditing===true&&!this._config.geodesic){this.clearVertexs&&this.clearVertexs();this.addVertexs&&this.addVertexs()}},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds.setNorthEast(null);e._bounds.setSouthWest(null);if(e.greatCirclePoints&&e.greatCirclePoints.length>0){e6.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{e6.each(e.points,function(i){e._bounds.extend(i)})}e._normalizedBounds.setSouthWest(e._bounds.getSouthWest());e._normalizedBounds.setNorthEast(e._bounds.getNorthEast());if(e._normalizedBounds.sw.lng<-h0.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>h0.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-h0.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=h0.WORLD_SIZE_MC_HALF}},calcGreatCirclePoints:function(kv,T){var kx=kv.latLng;var kw=T.latLng;if(kx.equals(kw)){return}var e=jr.getDistance(iS(kx.lng),iS(kx.lat),iS(kw.lng),iS(kw.lat));if(e<250000){return}var kB=Math.round(e/150000);var kF=this.calcAngularDistance(kx,kw);this.greatCirclePoints.push(kv);var kE=kx.lng;var kD=kv;for(var ky=0;ky<kB;ky++){var kA=this.calcMiddlePoint(kx,kw,ky/kB,kF);var kC=jr.convertLL2MC(kA);var kz=kC.lng;var kG=eC(kC,kD);if(kG>30037726){if(kC.lng<kD.lng){kC.lng+=h0.WORLD_SIZE_MC}else{kC.lng-=h0.WORLD_SIZE_MC}}this.greatCirclePoints.push(kC);kD=kC}var kG=eC(T,kD);if(kG>30037726){if(T.lng<kD.lng){T.lng+=h0.WORLD_SIZE_MC}else{T.lng-=h0.WORLD_SIZE_MC}}this.greatCirclePoints.push(T)},calcMiddlePoint:function(kC,kB,kD,kH){var kw=kC.lat;var kv=kB.lat;var kG=kC.lng;var kE=kB.lng;var kI=iS(kw);var kF=iS(kv);var i=iS(kG);var e=iS(kE);var kK=Math.sin((1-kD)*kH)/Math.sin(kH);var kJ=Math.sin(kD*kH)/Math.sin(kH);var kz=kK*Math.cos(kI)*Math.cos(i)+kJ*Math.cos(kF)*Math.cos(e);var ky=kK*Math.cos(kI)*Math.sin(i)+kJ*Math.cos(kF)*Math.sin(e);var kx=kK*Math.sin(kI)+kJ*Math.sin(kF);var T=Math.atan2(kx,Math.sqrt(Math.pow(kz,2)+Math.pow(ky,2)));var kA=Math.atan2(ky,kz);return new cD(fi(kA),fi(T))},calcAngularDistance:function(kw,i){var kx=iS(kw.lat);var kv=iS(i.lat);var T=iS(kw.lng);var e=iS(i.lng);return Math.acos(Math.sin(kx)*Math.sin(kv)+Math.cos(kx)*Math.cos(kv)*Math.cos(Math.abs(e-T)))}});function br(kw,e){if(!kw||kw.length===0){return}var kv=[];for(var T=0;T<kw.length;T++){kv[T]=jr.convertLL2MC(kw[T])}f4.call(this,kv,e)}br.inherits(f4,"PolylineOut");e6.extend(br.prototype,{toString:function(){return"Polyline"},toGeoJSON:function(){var kv="LineString";var kw=[];var kx=this.getPath();for(var T=0;T<kx.length;T++){kw.push([kx[T].lng,kx[T].lat])}var e={type:"Feature",geometry:{type:kv,coordinates:kw},properties:this.properties};return e},updateByGeoJSON:function(T){var e=new gJ();var kx=e.readFeaturesFromObject(T)||[];for(var kv=0,kw=kx.length;kv<kw;++kv){if(kx[kv] instanceof br){this.properties=kx[kv].properties;this.setPath(kx[kv].getPath());break}}},setPath:function(kv){if(!kv||kv.length===0){return}var T=[];for(var e=0;e<kv.length;e++){T[e]=jr.convertLL2MC(kv[e])}this.setPathIn(T);this._mouseEventPixels=null},getPath:function(){var e=this.getPathIn();if(!e||e.length===0){return[]}var kv=[];for(var T=0;T<e.length;T++){kv[T]=jr.convertMC2LL(e[T])}return kv},getBounds:function(i){var e=this.getBoundsIn(i);var T=new ie(jr.convertMC2LL(e.getSouthWest()),jr.convertMC2LL(e.getNorthEast()));return T}});function g3(T,kv,e){iQ.call(this,e);this._normalizedBounds=new ie();this._cps=kv;this._path=T;this.setPoints(T);hL.sendMessage(aZ(4,2,7),["overlay","bezier"]);var i=this;hh.load("poly",function(){i._draw()})}g3.inherits(f4,"BezierCurve");e6.extend(g3.prototype,{getBoundsIn:function(e){if(!e){this._bounds.setMinMax();return this._bounds}this._normalizedBounds.setMinMax();return this._normalizedBounds},setPoints:function(e){this._clearCache();this.points=iQ.getGraphPoints(e).slice(0);this.points=this.calcBezierPoints(this.points,this._cps);this._calcBounds()},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds.setNorthEast(null);e._bounds.setSouthWest(null);if(e.greatCirclePoints&&e.greatCirclePoints.length>0){e6.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{e6.each(e.points,function(i){e._bounds.extend(i)})}e._normalizedBounds.setSouthWest(e._bounds.getSouthWest());e._normalizedBounds.setNorthEast(e._bounds.getNorthEast());if(e._normalizedBounds.sw.lng<-h0.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>h0.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-h0.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=h0.WORLD_SIZE_MC_HALF}},getPathIn:function(){return this._path},setPathIn:function(e){this._path=e;this.setPoints(e)},getCpsIn:function(){return this._cps},setCpsIn:function(e){this._cps=e;this.setPoints(this._path)},calcBezierPoints:function(kv,kx){var T=[];for(var e=0;e<kv.length-1;e++){var kw=[kv[e],kx[e][0],kx[e][1],kv[e+1]];T=T.concat((this.bezierbetweenTwoP(kw)))}return T},bezierbetweenTwoP:function(kx){var T=100;var kw=1/T;var e=[];for(var kv=0;kv<T;kv++){e.push(this.getPointOnCubicBezier(kx,kv*kw))}return e},getPointOnCubicBezier:function(ky,kC){var i;var kx;var kv;var kD;var kw;var T;var kB;var e;var kA;var kz;kv=3*(ky[1].lng-ky[0].lng);kx=3*(ky[2].lng-ky[1].lng)-kv;i=ky[3].lng-ky[0].lng-kv-kx;T=3*(ky[1].lat-ky[0].lat);kw=3*(ky[2].lat-ky[1].lat)-T;kD=ky[3].lat-ky[0].lat-T-kw;kB=kC*kC;e=kB*kC;kA=(i*e)+(kx*kB)+(kv*kC)+ky[0].lng;kz=(kD*e)+(kw*kB)+(T*kC)+ky[0].lat;return new cD(kA,kz)}});function cN(kw,ky,e){if(!kw||kw.length===0){return}this.userPath=kw;this.userCps=ky;var kv=[];for(var T=0;T<kw.length;T++){kv[T]=jr.convertLL2MC(kw[T])}if(!ky||ky.length===0){return}var kx=[];for(var T=0;T<ky.length;T++){kx[T]=[];kx[T][0]=jr.convertLL2MC(ky[T][0]);if(ky[T][1]){kx[T][1]=jr.convertLL2MC(ky[T][1])}else{kx[T][1]=jr.convertLL2MC(ky[T][0])}}g3.call(this,kv,kx,e)}cN.inherits(g3,"BezierCurveOut");e6.extend(cN.prototype,{toString:function(){return"BezierCurve"},setPath:function(kv){if(!kv||kv.length===0){return}this.userPath=kv;var T=[];for(var e=0;e<kv.length;e++){T[e]=jr.convertLL2MC(kv[e])}this.setPathIn(T);this._mouseEventPixels=null},getPath:function(){return this.userPath;var e=this.getPathIn();if(!e||e.length===0){return[]}var kv=[];for(var T=0;T<e.length;T++){kv[T]=jr.convertMC2LL(e[T])}return kv},getControlPoints:function(){return this.userCps;var e=this.getCpsIn();if(!e||e.length===0){return[]}var kv=[];for(var T=0;T<e.length;T++){kv[T]=[];kv[T][0]=jr.convertMC2LL(e[T][0]);kv[T][1]=jr.convertMC2LL(e[T][1])}return kv},setControlPoints:function(kv){if(!kv||kv.length===0){return}this.userCps=kv;var T=[];for(var e=0;e<kv.length;e++){T[e]=[];T[e][0]=jr.convertLL2MC(kv[e][0]);if(kv[e][1]){T[e][1]=jr.convertLL2MC(kv[e][1])}else{T[e][1]=jr.convertLL2MC(kv[e][0])}}this.setCpsIn(T)},getBounds:function(i){var e=this.getBoundsIn(i);var T=new ie(jr.convertMC2LL(e.getSouthWest()),jr.convertMC2LL(e.getNorthEast()));return T}});function eu(e,T){iQ.call(this,T);this._normalizedBounds=new ie();this.setPoints(e);var i=this;hh.load("poly",function(){i._draw()})}eu.inherits(f4,"PolylineMultipart");e6.extend(eu.prototype,{setPoints:function(e){if(!e){return}this._clearCache();this.points=this._unifyArgs(e);this._calcBounds()},_unifyArgs:function(T){var e=[];var i=[];if(T.constructor===Array){if(T[0].constructor===cD){i.push(T)}else{i=T}}else{if(typeof T==="string"){i.push(T)}}e6.each(i,function(kv){e.push(iQ.getGraphPoints(kv))});return e},setPointAt:function(i,e,T){T=T||0;if(!e||!this.points[T]||!this.points[T][i]){return}this._clearCache();this.points[T][i]=new cD(e.lng,e.lat);this._calcBounds()},getBoundsIn:function(e){if(!e){this._bounds.setMinMax();return this._bounds}this._normalizedBounds.setMinMax();return this._normalizedBounds},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds.setNorthEast(null);e._bounds.setSouthWest(null);if(e.greatCirclePoints&&e.greatCirclePoints.length>0){e6.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{e6.each(e.points,function(i){e6.each(i,function(T){e._bounds.extend(T)})})}e._normalizedBounds.setSouthWest(e._bounds.getSouthWest());e._normalizedBounds.setNorthEast(e._bounds.getNorthEast());if(e._normalizedBounds.sw.lng<-h0.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>h0.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-h0.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=h0.WORLD_SIZE_MC_HALF}}});function hw(T,e){iQ.call(this,e);e=e||{};if(typeof e.fillOpacity==="number"){this._config.fillOpacity=e.fillOpacity}else{this._config.fillOpacity=0.6}ch(this._config.fillOpacity,0,1);if(e.fillColor===""){this._config.fillColor=""}else{this._config.fillColor=e.fillColor?e.fillColor:"#fff"}this._parseFillCacheWebGL=[];this.setPoints(T,e);hL.sendMessage(aZ(4,2,4),["overlay","polygon"]);var i=this;hh.load("poly",function(){i._draw()})}hw.inherits(iQ,"Polygon");e6.extend(hw.prototype,{setPoints:function(kx){var kv=[];if(typeof kx==="string"||kx.length===1||kx[0] instanceof cD||kx[0] instanceof cx||this instanceof hb||kx.length===0){if(kx.length===1){kx=kx[0]}var e=this._processSinglePointArray(kx);this._userPoints=e.userPoints;kv=e.innerPoints;this.hasMultipleParts=false}else{this._userPoints=[];for(var kw=0;kw<kx.length;kw++){var T=this._processSinglePointArray(kx[kw]);this._userPoints.push(T.userPoints);kv.push(T.innerPoints)}this.hasMultipleParts=true}iQ.prototype.setPoints.call(this,kv)},setPathIn:function(e){this.setPoints(e)},_processSinglePointArray:function(e){var i=iQ.getGraphPoints(e).slice(0);innerPoints=i.slice(0);if(innerPoints.length>1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new cD(innerPoints[0].lng,innerPoints[0].lat))}return{userPoints:i,innerPoints:innerPoints}},setPointAt:function(i,e){if(!this._userPoints[i]){return}this._clearCache();this._userPoints[i]=new cD(e.lng,e.lat);this.points[i]=new cD(e.lng,e.lat);if(i===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new cD(e.lng,e.lat)}this._calcBounds()},setPositionAt:function(i,e){if(!this._userPoints[i]){return}var T=jr.convertLL2MC(e);this.setPointAt(i,T)},getPoints:function(){var e=this._userPoints;if(e.length===0){e=this.points}return e},getPathIn:function(){return this.getPoints()}});function iX(T,e){if(!T||T.length===0){return}var i=this.setPath(T,true);hw.call(this,i,e)}iX.inherits(hw,"PolygonOut");e6.extend(iX.prototype,{toString:function(){return"Polygon"},toGeoJSON:function(){var kw="Polygon";var kx=[];var kz=this.getPath();if(this.hasMultipleParts){kw="Multi"+kw;for(var kv=0;kv<kz.length;kv++){var ky=[];for(var T=0;T<kz.length;T++){ky.push([kz[kv][T].lng,kz[kv][T].lat])}kx.push(ky)}}else{for(var kv=0;kv<kz.length;kv++){kx.push([kz[kv].lng,kz[kv].lat])}}var e={type:"Feature",geometry:{type:kw,coordinates:[kx]},properties:this.properties};return e},updateByGeoJSON:function(T){var e=new gJ();var kx=e.readFeaturesFromObject(T)||[];for(var kv=0,kw=kx.length;kv<kw;++kv){if(kx[kv] instanceof iX){this.properties=kx[kv].properties;this.setPath(kx[kv].getPath());break}}},setPath:function(kA,T){if(!kA||kA.length===0){return}var kz=[];if(typeof kA==="string"||kA[0] instanceof cD||kA[0] instanceof cx){var e=this._processSinglePointArray(kA);for(var ky=0;ky<e.innerPoints.length;ky++){kz[ky]=jr.convertLL2MC(e.innerPoints[ky])}}else{for(var ky=0;ky<kA.length;ky++){var kv=this._processSinglePointArray(kA[ky]);var kx=[];for(var kw=0;kw<kv.innerPoints.length;kw++){kx[kw]=jr.convertLL2MC(kv.innerPoints[kw])}kz.push(kx)}}if(T){return kz}this.setPathIn(kz);this._mouseEventPixels=null},getPath:function(){var e=this.getPathIn();if(!e||e.length===0){return[]}var kx=[];if(this.hasMultipleParts){for(var kv=0;kv<e.length;kv++){var kw=[];for(var T=0;T<e[kv].length;T++){kw[T]=jr.convertMC2LL(e[kv][T])}kx.push(kw)}}else{for(var kv=0;kv<e.length;kv++){kx[kv]=jr.convertMC2LL(e[kv])}}return kx}});function hb(i,e,T){this.point=i;this.radius=Math.abs(e);hw.call(this,[],T)}hb.parseTolerance={0:[0.01,0.0001,0.00001,0.000004],1:[1000,10,1,0.4]};hb.inherits(hw,"Circle");e6.extend(hb.prototype,{initialize:function(e){this.map=e;this.points=this._getPerimeterPoints(this.point,this.radius);this._calcBounds();return null},getPoint:function(){return this.point},setPoint:function(e){if(!e){return}this.point=e;this.latLng=jr.convertMC2LL(e)},setCenterIn:function(e){var i=arguments[1];this.setPoint(e,i)},setRadius:function(e){this.radius=Math.abs(e)},getCenterIn:function(){return this.point},getRadius:function(){return this.radius},_getPerimeterPoints:function(e,kC){if(!e||!kC||!this.map){return[]}var T=this.map;var kz=e.lng;var kx=e.lat;var kI=jr.convertMC2LL(e);kz=kI.lng;kx=kI.lat;var kJ=[];var kE=kC/jr.EARTHRADIUS;var kB=(Math.PI/180)*kx;var kH=(Math.PI/180)*kz;for(var kA=0;kA<360;kA+=9){var ky=(Math.PI/180)*kA;var kF=Math.asin(Math.sin(kB)*Math.cos(kE)+Math.cos(kB)*Math.sin(kE)*Math.cos(ky));var kD=Math.atan2(Math.sin(ky)*Math.sin(kE)*Math.cos(kB),Math.cos(kE)-Math.sin(kB)*Math.sin(kF));var kG=((kH-kD+Math.PI)%(2*Math.PI))-Math.PI;var kw=new cx(kF*(180/Math.PI),kG*(180/Math.PI));kJ.push(jr.convertLL2MC(kw))}var kv=kJ[0];kJ.push(new cD(kv.lng,kv.lat));if(kv){this._radiusMercator=Math.sqrt(Math.pow(kv.lng-this.point.lng,2)+Math.pow(kv.lat-this.point.lat,2))}else{this._radiusMercator=this.radius}return kJ}});function aV(i,e,kv){this.latLng=new cx(i.lat,i.lng);var T=jr.convertLL2MC(i);hb.call(this,T,e,kv)}aV.inherits(hb,"CircleOut");e6.extend(aV.prototype,{toString:function(){return"Circle"},setCenter:function(e){this.latLng=new cx(e.lat,e.lng);var i=jr.convertLL2MC(e);this.setCenterIn(i)},getCenter:function(){return this.latLng},getPath:function(){var e=this.getPathIn();if(!e||e.length===0){return[]}var kv=[];for(var T=0;T<e.length;T++){kv[T]=jr.convertMC2LL(e[T])}return kv},toGeoJSON:function(){var kv="Polygon";var kw=[];var kx=this.getPath();for(var T=0;T<kx.length;T++){kw.push([kx[T].lng,kx[T].lat])}var e={type:"Feature",geometry:{type:kv,coordinates:[kw]},properties:this.properties};return e},updateByGeoJSON:function(e){}});function kk(kv,e,i){iQ.call(this,i);i=i||{};if(typeof i.topFillOpacity==="number"){this._config.topFillOpacity=i.topFillOpacity}else{this._config.topFillOpacity=0.6}if(typeof i.sideFillOpacity==="number"){this._config.sideFillOpacity=i.sideFillOpacity}else{this._config.sideFillOpacity=0.8}ch(this._config.sideFillOpacity,0,1);if(i.topFillColor===""){this._config.topFillColor=""}else{this._config.topFillColor=i.topFillColor?i.topFillColor:"#fff"}if(i.sideFillColor===""){this._config.sideFillColor=""}else{this._config.sideFillColor=i.sideFillColor?i.sideFillColor:"#fff"}this._parseFillCacheWebGL=[];this.setPoints(kv,i);this._config.altitude=e||0;hL.sendMessage(aZ(4,2,5),["overlay","prism"]);var T=this;hh.load("poly",function(){T._draw()})}kk.inherits(iQ,"Prism");e6.extend(kk.prototype,{setPoints:function(kx){var kv=[];if(typeof kx==="string"||kx[0] instanceof cD||kx[0] instanceof cx||this instanceof hb||kx.length===0){var e=this._processSinglePointArray(kx);this._userPoints=e.userPoints;kv=e.innerPoints;this.hasMultipleParts=false}else{this._userPoints=[];for(var kw=0;kw<kx.length;kw++){var T=this._processSinglePointArray(kx[kw]);this._userPoints.push(T.userPoints);kv.push(T.innerPoints)}this.hasMultipleParts=true}iQ.prototype.setPoints.call(this,kv)},setPathIn:function(e){this.setPoints(e)},_processSinglePointArray:function(e){var i=iQ.getGraphPoints(e).slice(0);innerPoints=i.slice(0);if(innerPoints.length>1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new cD(innerPoints[0].lng,innerPoints[0].lat))}return{userPoints:i,innerPoints:innerPoints}},setPointAt:function(i,e){if(!this._userPoints[i]){return}this._clearCache();this._userPoints[i]=new cD(e.lng,e.lat);this.points[i]=new cD(e.lng,e.lat);if(i===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new cD(e.lng,e.lat)}this._calcBounds()},getPoints:function(){var e=this._userPoints;if(e.length===0){e=this.points}return e},getPathIn:function(){return this.getPoints()},setTopFillOpacity:function(e){if(e>1||e<0){return}this._config.topFillOpacity=e;this._setDomAttribute("topfillopacity",e)},getTopFillOpacity:function(){return this._config.topFillOpacity},setSideFillOpacity:function(e){if(e>1||e<0){return}this._config.sideFillOpacity=e;this._setDomAttribute("sidefillopacity",e)},getSideFillOpacity:function(){return this._config.sideFillOpacity},setTopFillColor:function(e){this._config.topFillColor=e||"";this._setDomAttribute("topfillcolor",e)},getTopFillColor:function(){return this._config.topFillColor},setSideFillColor:function(e){this._config.sideFillColor=e||"";this._setDomAttribute("sidefillcolor",e)},getSideFillColor:function(){return this._config.sideFillColor},setAltitude:function(e){this._config.altitude=Number(e);this.draw();var i=new fS("onlineupdate");i.overlay=this;this.dispatchEvent(i)},getAltitude:function(){return this._config.altitude}});function bx(kz,kx,kA){if(!kz||kz.length===0){return}this.userPath=kz;var e=[];if(typeof kz==="string"||kz[0] instanceof cD||kz[0] instanceof cx){var kB=this._processSinglePointArray(kz);for(var kw=0;kw<kB.innerPoints.length;kw++){e[kw]=jr.convertLL2MC(kB.innerPoints[kw])}}else{for(var kw=0;kw<kz.length;kw++){var ky=this._processSinglePointArray(kz[kw]);var T=[];for(var kv=0;kv<ky.innerPoints.length;kv++){T[kv]=jr.convertLL2MC(ky.innerPoints[kv])}e.push(T)}}kk.call(this,e,kx,kA)}bx.inherits(kk,"PrismOut");e6.extend(bx.prototype,{toString:function(){return"Prism"},setPath:function(kv){if(!kv||kv.length===0){return}this.userPath=kv;var T=[];for(var e=0;e<kv.length;e++){T[e]=jr.convertLL2MC(kv[e])}this.setPathIn(T);this._mouseEventPixels=null},getPath:function(){return this.userPath;var e=this.getPathIn();if(!e||e.length===0){return[]}var kv=[];for(var T=0;T<e.length;T++){kv[T]=jr.convertMC2LL(e[T])}return kv}});function b4(kw,i){iQ.call(this,i);i=i||{};this._config.type=i.type||"image";this._config.url=i.url||"";this._config.opacity=typeof i.opacity==="number"?i.opacity:1;this._config.sysType=i.sysType!=="fixed"?"geo":"fixed";this._config.top=i.top||false;this.isReDraw=i.isReDraw||false;this.drawHook=(i.drawHook instanceof Function)?i.drawHook:null;ch(this._config.opacity,0,1);if(i.type==="image"&&i.isPixelMap){this._config.isPixelMap=i.isPixelMap||false;var T=i.pixelMap||{};this._config.colors=T.colors||["#F9F871","#FFC75F","#FF9671","#FF6F91","#D65DB1","#845EC2"];this._config.positions=T.positions||[0,0.2,0.4,0.6,0.8,1];this._config.domain=T.domain||[0,255];this._config.clamp=T.clamp||this._config.domain;this._config.noData=(T.noData!==undefined)?T.noData:-99999;this._config.fomularC=T.fomularC||"float generateValue(vec4 pixel){return pixel.r * 255.;}";this._config.fomularJS=T.fomularJS||function(kx){return kx.r};this._config.maskPng=T.maskPng||null;this._config.maskData=T.maskData||-1;this._config.maskCoord=T.maskCoord||null;this.fHashcode=o({str:this._config.fomularC});var e=this.canPixelMap();if(e){this.isPixelMap=true;this.setPixelMap()}}this._parseFillCacheWebGL=[];if(this._config.sysType==="fixed"){this.points=kw}else{this.setPoints(kw,i)}if(kw instanceof ie){this._addlog(i)}var kv=this;hh.load("poly",function(){kv._draw()})}b4.inherits(iQ,"GroundOverlay");e6.extend(b4.prototype,{_addlog:function(e){var i=1;var T="picture";if(e){if(e.type==="canvas"&&!e.isReDraw){i=2;T="static_canvas"}else{if(e.type==="canvas"&&e.isReDraw){i=3;T="dynamic_canvas"}else{if(e.type==="video"){i=4;T="video"}else{if(e.type==="image"&&e.isPixelMap){i=5;T="raster"}}}}}hL.sendMessage(aZ(4,2,8,i),["overlay","ground_box",T])},setPoints:function(i){var e=iQ.getGraphPoints(i).slice(0);this.hasMultipleParts=false;iQ.prototype.setPoints.call(this,e)},setPathIn:function(e){this.setPoints(e)},getPoints:function(){return this.points},getPathIn:function(){return this.getPoints()},canPixelMap:function(){if(this._config.colors&&this._config.positions){return true}return false},setPixelMap:function(){if(!this._config.isPixelMap||!this.canPixelMap()){return}var i=this._config.colors;var e=this._config.positions;this.pHashcode=o({colors:i,positions:e});this.pixelColorMap=hR.generateColorRamp(i,e)},setDomain:function(e){if(e instanceof Array&&e.length===2){this._config.domain=e;this.doOnceDraw()}},setClamp:function(e){if(e instanceof Array&&e.length===2){this._config.clamp=e;this.doOnceDraw()}},setMaskPng:function(i){this._config.maskPng=i;if(this.map){var e=new fS("hide");e.overlay=this;this.dispatchEvent(e);var e=new fS("show");e.overlay=this;this.dispatchEvent(e)}this.doOnceDraw()},setMaskData:function(e){this._config.maskData=e;this.doOnceDraw()},setMaskCoord:function(e){this._config.maskCoord=e;this.maskUV=null;this.doOnceDraw()},setNoData:function(e){this._config.noData=e;this.doOnceDraw()},setPositions:function(e){this._config.positions=e;this.setPixelMap();this.doOnceDraw()},setColors:function(e){this._config.colors=e;this.setPixelMap();this.doOnceDraw()},setBounds:function(T,ky){if(T instanceof ie){var kA=Math.min(T.sw.lng,T.ne.lng);var kx=Math.max(T.sw.lng,T.ne.lng);var kz=Math.min(T.sw.lat,T.ne.lat);var e=Math.max(T.sw.lat,T.ne.lat);var kC=[new cD(kA,kz),new cD(kx,kz),new cD(kx,e),new cD(kA,e)];var kv=iQ.getGraphPoints(kC).slice(0);var kw=[];for(var kB=0;kB<kv.length;kB++){kw[kB]=jr.convertLL2MC(kv[kB])}}else{if(T.length===4){var kw=T}else{return false}}this.setPoints(kw);if(ky){return true}this.doOnceDraw()},setOpacity:function(e){if(e>1||e<0){return}this._config.opacity=e;this.doOnceDraw()},getOpacity:function(){return this._config.opacity},getImageURL:function(){return this._config.url},setImage:function(e,T){this._config.src=e;this._texture=null;var i=this;this.imageLoad&&this.imageLoad(this._config.src,function(kv,kw){if(kw){i._texture=kv;if(T){i.setBounds(T,true)}i.doOnceDraw()}})},setFomular:function(e,i){if(e&&i){this._config.fomularJS=e;this._config.fomularC=i;this.fHashcode=o({str:this._config.fomularC});this.doOnceDraw()}},setIsPixelMap:function(e){this.isPixelMap=e;this.doOnceDraw()},getImagePixel:function(kv){if(!this._config.isPixelMap||!this.canPixelMap()){return null}if(!this.getImageMaskPixel(kv)){return null}if(this.imageObject){var T=Math.floor((kv.lng-this.points[3].lng)/this.lngMC);var e=Math.floor((-kv.lat+this.points[3].lat)/this.latMC);var i=Math.floor((e*this.imageObject.width+T)*4);if(T>this.imageObject.width||T<0){return null}if(e>this.imageObject.height||e<0){return null}if(i+3>this.imageObject.data.data.length){return null}return[this.imageObject.data.data[i],this.imageObject.data.data[i+1],this.imageObject.data.data[i+2],this.imageObject.data.data[i+3],]}return null},getValue:function(i){if(this._config.isPixelMap&&i&&this._config.fomularJS){if(!(i instanceof Array)){i=this.getImagePixel(i.point)}var e=this._config.fomularJS({r:i[0],g:i[1],b:i[2],a:i[3]});if(e>=this._config.clamp[0]&&e<=this._config.clamp[1]){return e}}return null},setImageObject:function(T){var e=document.createElement("canvas");e.width=T.width;e.height=T.height;var i=e.getContext("2d");i.drawImage(T,0,0,T.width,T.height);this.imageObject={width:T.width,height:T.height,data:i.getImageData(0,0,T.width,T.height)};this.updatePixelMc();i=null;e=null},updatePixelMc:function(){if(this.imageObject){var e=Math.abs(this.points[2].lng-this.points[0].lng);var i=Math.abs(this.points[2].lat-this.points[0].lat);this.lngMC=e/this.imageObject.width;this.latMC=i/this.imageObject.height}},setMaskImageObject:function(T){var e=document.createElement("canvas");e.width=T.width;e.height=T.height;var i=e.getContext("2d");i.drawImage(T,0,0,T.width,T.height);this.imageMaskObject={width:T.width,height:T.height,data:i.getImageData(0,0,T.width,T.height)};i=null;e=null},getImageMaskPixel:function(e){if(!this.imageMaskObject){return true}var kv=this._toOverlayPixelsGL([e]);var kA=this.maskOverlayPixels;var kx=kA[1][0]-kA[0][0];var kw=kA[1][1]-kA[0][1];var T=Math.floor((kv[0][0]-kA[0][0])/kx*this.imageMaskObject.width);var i=Math.floor((-kv[0][1]+kA[1][1])/kw*this.imageMaskObject.height);var kz=Math.floor((i*this.imageMaskObject.width+T)*4);if(T>this.imageMaskObject.width||T<0){return null}if(i>this.imageMaskObject.height||i<0){return null}var ky=this.imageMaskObject.data.data;if(kz+3>ky.length){return false}if(ky[kz+3]>0){if(this._config.maskData>-1&&this._config.maskData!==ky[kz]){return false}return true}return false},doOnceDraw:function(){var e=new fS("onlineupdate");e.overlay=this;this.dispatchEvent(e)},destroy:function(){this.points=[];this.imageMaskObject=null}});function f9(kv,kC){if(!kv){return}kC=kC||{};var kx=[];if(kC.sysType==="fixed"){kx=kv}else{if(kv instanceof ie){var kz=Math.min(kv.sw.lng,kv.ne.lng);var kw=Math.max(kv.sw.lng,kv.ne.lng);var ky=Math.min(kv.sw.lat,kv.ne.lat);var T=Math.max(kv.sw.lat,kv.ne.lat);var kB=[new cD(kz,ky),new cD(kw,ky),new cD(kw,T),new cD(kz,T)];var e=iQ.getGraphPoints(kB).slice(0);for(var kA=0;kA<e.length;kA++){kx[kA]=jr.convertLL2MC(e[kA])}}else{if(kv.length===4){kx=kv}else{return false}}}b4.call(this,kx,kC)}f9.inherits(b4,"GroundOverlayOut");e6.extend(f9.prototype,{toString:function(){return"GroundOverlay"}});function dW(e,i){if(!(e instanceof cD)){return}this.point=e;var e=jr.convertLL2MC(e);this.mc_point=[e.lng,e.lat];this.size=(i.size instanceof ji)?i.size:new ji(32,32);this.scale=i.scale||1;this.anchor=(i.anchor instanceof ji)?i.anchor:new ji(0,0);this.rotation=i.rotation||0;this.offset=(i.offset instanceof ji)?i.offset:new ji(0,0);this.level=i.level||18;hL.sendMessage(aZ(4,2,9),["overlay","ground_point"]);var T=this.calBounds(false);f9.call(this,T,i)}dW.inherits(f9,"GroundPoint");e6.extend(dW.prototype,{calBounds:function(kx){var e=Math.pow(2,18-this.level);var T=this.scale*e;var kB=this.size.width/2*T;var kI=this.size.height/2*T;var kA=this.anchor.width*T;var kH=this.anchor.height*T;var kv=this.offset.width*T;var kC=this.offset.height*T;var kJ=[[-1,-1],[1,-1],[1,1],[-1,1]];var kw=[];var kD=this.rotation*Math.PI/180;var kK=mat2.create();mat2.rotate(kK,kK,kD);for(var kF=0;kF<kJ.length;kF++){var kG=kJ[kF][0]*kB-kA;var kE=kJ[kF][1]*kI-kH;var kz=kK[0]*kG+kK[1]*kE;var ky=kK[2]*kG+kK[3]*kE;kw.push(new cD(this.mc_point[0]+kz+kv,this.mc_point[1]+ky+kC))}if(kx){this._mouseEventPixels=null;this.setBounds(kw)}else{return kw}},setPoint:function(T,i){if(!(T instanceof cD)){return}this.point=T;var e=jr.convertLL2MC(T);this.mc_point=[e.lng,e.lat];if(i||i===undefined){this.calBounds(true)}return this},setScale:function(e,i){this.scale=e;if(i||i===undefined){this.calBounds(true)}return this},setSize:function(e,i){if(options.size instanceof ji){this.size=e;if(i||i===undefined){this.calBounds(true)}}return this},setRotation:function(e,i){this.rotation=e;if(i||i===undefined){this.calBounds(true)}return this},setAnchor:function(e,i){if(e instanceof ji){this.anchor=e;if(i||i===undefined){this.calBounds(true)}}return this},setOffset:function(e,i){if(e instanceof ji){this.offset=e;if(i||i===undefined){this.calBounds(true)}}return this}});function bR(i,e){aS.call(this,e);if(!i||!e.point||!bX(i)){throw new Error("参数类型错误")}e=e||{};this.point=e.point;this.createDom=i;this.offsetX=e.offsetX||0;this.offsetY=e.offsetY||0;this.minZoom=e.minZoom||3;this.maxZoom=e.maxZoom||21;this.properties=e.properties||{};this.enableMassClear=e.enableMassClear||false;this.enableDraggingMap=e.enableDraggingMap||false;this.customLayer=null;hL.sendMessage(aZ(4,2,11),["overlay","dom_custom"])}bR.inherits(aS,"CustomOverlay");e6.extend(bR.prototype,{initialize:function(e){this.map=e;this.div=document.createElement("div");this.div.id="cus_overlay";this.div.appendChild(this.createDom(this.properties));this.map.getPanes().labelPane.appendChild(this.div);return this.div},draw:function(){if(!this.div||!this.map){return}var T=this.div.children[0]?this.div.children[0].clientWidth/2:0;var i=this.div.children[0]?this.div.children[0].clientHeight-25:0;var e=this.map.pointToOverlayPixel(this.point,{useRound:false});this.div.style.position="absolute";this.div.style.left=e.x-T+this.offsetX+"px";this.div.style.top=e.y-i+this.offsetY+"px"},addEventListener:function(T,kw){if(!this.div||!this.map){return}var i=this;var kv=this.map;function e(kA){var ky=new fS("onclick").inherit(kA);var kz=kA.srcElement||kA.target;var kx=kA.clientX||kA.pageX;var kC=kA.clientY||kA.pageY;if(kA&&ky&&kz&&kx&&kC){var kB=e6.Dom.getOffset(kv.container);ky.pixel=new fr(kx-kB.left,kC-kB.top);ky.latLng=kv.pixelToPoint(ky.pixel)}return ky}switch(T){case"mouseover":e6.on(this.div,"mouseover",function(ky){var kx=e(ky);i.dispatchEvent(kx);kw(kx)});break;case"mouseout":e6.on(this.div,"mouseout",function(ky){var kx=e(ky);i.dispatchEvent(kx);kw(kx)});break;case"click":e6.on(this.div,"click",function(ky){var kx=e(ky);i.dispatchEvent(kx);kw(kx)});break;default:break}},setPoint:function(e){if(e instanceof cD){this.div.innerHTML="";this.div.appendChild(this.createDom(this.properties));this.point=e;var kv=this.div.clientWidth/2;var T=this.div.clientHeight-25;var i=this.map.pointToOverlayPixel(this.point,{useRound:false});this.div.style.position="absolute";this.div.style.left=i.x-kv+this.offsetX+"px";this.div.style.top=i.y-T+this.offsetY+"px"}},getPoint:function(){return this.point},setProperties:function(e){if(e instanceof Object){Object.assign(this.properties,e);this.div.innerHTML="";this.div.appendChild(this.createDom(this.properties))}},getProperties:function(){return this.properties},toString:function(){return"CustomOverlay"}});var aw={};function ii(T,i){e6.BaseClass.call(this);this.content=T;this.map=null;this._config={width:0,height:0,maxWidth:600,offset:new ji(0,0),title:"",maxContent:"",enableMaximize:false,enableAutoPan:true,enableCloseOnClick:true,margin:[10,10,40,10],collisions:[[10,10],[10,10],[10,10],[10,10]],ifMaxScene:false,onClosing:function(){return true}};this.setConfig(i);if(this._config.width<50){this._config.width=50}if(this._config.width>730){this._config.width=730}if(this._config.height!=0){if(this._config.height<50){this._config.height=50}if(this._config.height>650){this._config.height=650}}if(this._config.maxWidth!==0){if(this._config.maxWidth<50){this._config.maxWidth=50}if(this._config.maxWidth>730){this._config.maxWidth=730}}this.isWinMax=false;this.IMG_PATH=C.imgPath;this.overlay=null;var e=this;hh.load("simpleInfowindow",function(){e._draw()})}ii.inherits(e6.BaseClass,"SimpleInfoWindow");e6.extend(ii.prototype,{setWidth:function(e){e=e*1;if(!e&&e!=0||isNaN(e)||e<0){return}if(e!=0){if(e<50){e=50}if(e>730){e=730}}this._config.width=e},setHeight:function(e){e=e*1;e-=10;if(!e&&e!=0||isNaN(e)||e<0){return}if(e!=0){if(e<50){e=50}if(e>650){e=650}}this._config.height=e},setMaxWidth:function(e){e=e*1;if(!e&&e!=0||isNaN(e)||e<0){return}if(e!=0){if(e<50){e=50}if(e>730){e=730}}this._config.maxWidth=e},setTitle:function(e){this._config.title=e||""},setContent:function(e){this.content=e||""},setMaxContent:function(e){this._config.maxContent=e||""},redraw:function(){},enableAutoPan:function(){this._config.enableAutoPan=true},disableAutoPan:function(){this._config.enableAutoPan=false},enableCloseOnClick:function(){this._config.enableCloseOnClick=true},disableCloseOnClick:function(){this._config.enableCloseOnClick=false},enableMaximize:function(){this._config.enableMaximize=true},disableMaximize:function(){this._config.enableMaximize=false},show:function(){this._visible=true},hide:function(){this._visible=false},close:function(){this.hide()},dispose:function(){e6.BaseClass.prototype.decontrol.call(this)},maximize:function(){this.isWinMax=true},restore:function(){this.isWinMax=false},setConfig:function(i){if(!i){return}for(var e in i){if(typeof(this._config[e])==typeof(i[e])){this._config[e]=i[e]}}},isVisible:function(){return this.isOpen()},isOpen:function(){return false},getPoint:function(){if(this.overlay&&this.overlay.getPoint){return this.overlay.getPoint()}},getOffset:function(){return this._config.offset},dispose:function(){e6.BaseClass.prototype.decontrol.call(this)},toString:function(){return"SimpleInfoWindow"}});h0.prototype.openSimpleInfoWindow=function(kv,e){if(!kv||kv.toString()!="SimpleInfoWindow"||!e||e.toString()!="Point"){return}var i=this.temp;if(!i.marker){var T=new jL(C.imgPath+"blank.gif",{width:1,height:1});i.marker=new j7(e,{icon:T,width:1,height:1,offset:new ji(0,0),infoWindowOffset:new ji(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openSimpleInfoWindow(kv)};h0.prototype.closeSimpleInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeSimpleInfoWindow()}};eJ.prototype.openSimpleInfoWindow=function(e){if(this.map){this.map.closeSimpleInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;e6.BaseClass.call(e,e.hashCode)}};eJ.prototype.closeSimpleInfoWindow=function(){if(this.map&&this.map.temp._infoWin){this.map.temp._infoWin._visible=false;this.map.temp._infoWin.decontrol();this.map.temp._infoWin=null}};function cp(T,e){iQ.call(this,e);e=e||{};this._config.showRegion=e.showRegion||"inside";this._config.isBuildingMask=e.isBuildingMask&&true;this._config.isPoiMask=e.isPoiMask&&true;this._config.isMapMask=e.isMapMask&&true;this._config.path=T;this._parseFillCacheWebGL=[];this.setPoints(T,e);hL.sendMessage(aZ(4,1,3),["instance","custom_mask"]);var i=this;hh.load("poly",function(){i._draw()})}cp.inherits(iQ,"MapMask");e6.extend(cp.prototype,{setPoints:function(i){var e=iQ.getGraphPoints(i).slice(0);this.hasMultipleParts=false;iQ.prototype.setPoints.call(this,e)},setPathIn:function(e){this.setPoints(e)},_processSinglePointArray:function(e){var i=iQ.getGraphPoints(e).slice(0);innerPoints=i.slice(0);if(innerPoints.length>1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new cD(innerPoints[0].lng,innerPoints[0].lat))}return{userPoints:i,innerPoints:innerPoints}},getPoints:function(){var e=this._userPoints;if(e.length===0){e=this.points}return e},getPathIn:function(){return this.getPoints()}});function kh(kx,T){if(!kx||kx.length===0){return}var kw=[];if(kx[0] instanceof cD){var e=this._processSinglePointArray(kx);for(var kv=0;kv<e.innerPoints.length;kv++){kw[kv]=jr.convertLL2MC(e.innerPoints[kv])}}cp.call(this,kw,T)}kh.inherits(cp,"MapMaskOut");e6.extend(kh.prototype,{toString:function(){return"MapMask"}});function fr(e,i){e=isNaN(e)?0:e;i=isNaN(i)?0:i;this.x=e;this.y=i}fr.prototype.equals=function(e){if(!e){return false}return e.x===this.x&&e.y===this.y};fr.prototype.clone=function(){return new fr(this.x,this.y)};fr.prototype.toString=function(){return"Pixel"};function ji(i,e){if(typeof i!=="number"){this.width=parseFloat(i)}else{this.width=i}if(typeof e!=="number"){this.height=parseFloat(e)}else{this.height=e}}ji.prototype.equals=function(e){return !!(e&&this.width===e.width&&this.height===e.height)};ji.prototype.toString=function(){return"Size"};var kn={B_NORMAL_MAP:{tileUrls:dF(C.tileDomain,C.rasterTilePath),vectorTileUrls:dF(C.tileDomain,C.vectorTilePath),tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,webgl:{minZoom:3,maxZoom:25},zoomLevelBase:18,errorUrl:C.imgPath+"bg.png",bounds:new ie(new cD(-21364736,-11708041.66),new cD(23855104,12474104.17)),imgExtend:"png"},B_SATELLITE_MAP:{tileUrls:["//maponline0.bdimg.com/starpic/?qt=satepc&","//maponline1.bdimg.com/starpic/?qt=satepc&","//maponline2.bdimg.com/starpic/?qt=satepc&","//maponline3.bdimg.com/starpic/?qt=satepc&"],tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,zoomLevelBase:18,errorUrl:C.imgPath+"bg.png",bounds:new ie(new cD(-21364736,-10616832),new cD(23855104,15859712)),imgExtend:"png"},B_STREET_MAP:{tileUrls:dF(C.tileDomain,C.rasterTilePath),tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,zoomLevelBase:18,errorUrl:C.imgPath+"bg.png",bounds:new ie(new cD(-21364736,-10616832),new cD(23855104,15859712)),imgExtend:"png"},BMAP_CUSTOM_LAYER:{tileUrls:[""],tileSize:256,baseUnits:256,zoomLevelMin:1,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,zoomLevelBase:18,errorUrl:C.imgPath+"blank.gif",bounds:new ie(new cD(-21364736,-10616832),new cD(23855104,15859712)),imgExtend:"png"},B_EARTH_MAP:{tileUrls:[""],tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,webgl:{minZoom:3,maxZoom:21},zoomLevelBase:18,errorUrl:C.imgPath+"blank.gif",bounds:new ie(new cD(-21364736,-10616832),new cD(23855104,15859712)),imgExtend:"png"},B_NONE_MAP:{tileUrls:"",tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,zoomLevelBase:18,errorUrl:C.imgPath+"bg.png",bounds:new ie(new cD(-21364736,-11708041.66),new cD(23855104,12474104.17)),imgExtend:"png"}};var es=kn;function cS(ky,kz,T,e,kx){if(kx&&es[kx]){this.mapTypeName=kx}else{this.mapTypeName=BMAP_NORMAL_MAP}if(ky&&ky instanceof Array){var kw=true;for(var kv=0;kv<ky.length;kv++){if(ky[kv] instanceof ie){continue}else{kw=false;break}}kw&&(this.bounds=ky)}if(typeof kz==="number"&&kz>=es[this.mapTypeName].webgl.minZoom){if(es[this.mapTypeName].webgl){if(kz>=es[this.mapTypeName].webgl.minZoom){this.minZoom=kz}else{this.minZoom=es[this.mapTypeName].webgl.minZoom}}else{if(kz>=es[this.mapTypeName].minZoom){this.minZoom=kz}else{this.minZoom=es[this.mapTypeName].minZoom}}}if(typeof T==="number"){if(es[this.mapTypeName].webgl){if(T<=es[this.mapTypeName].webgl.maxZoom){this.maxZoom=T}else{this.maxZoom=es[this.mapTypeName].webgl.maxZoom}}else{if(T<=es[this.mapTypeName].maxZoom){this.maxZoom=T}else{this.maxZoom=es[this.mapTypeName].maxZoom}}}if(this.maxZoom<this.minZoom){this.maxZoom=null}if(e&&typeof e==="function"){this.tileUrlFunction=e}hL.sendMessage(aZ(4,3,1,2),["layer","vector","private"])}e6.extend(cS.prototype,{addBoundary:function(e){if(e instanceof ie){if(this.bounds){this.bounds.push(e)}else{this.bounds=[e]}}},setTileUrlFunction:function(e){if(e&&typeof e==="function"){this.tileUrlFunction=e}},crossPoint:function(e,kv,kw){if(kw<this.minZoom||kw>this.maxZoom){return false}var kx=this.containsPoint(e,kw);if(kx){return kx}for(var T=0;T<this.bounds.length;T++){if(this.bounds[T].intersects(kv)){kx=true;break}}return kx},containsPoint:function(e,kv){if(!e||!(e instanceof cD)||!this.isValid()){return false}var kw=false;if(kv<this.minZoom||kv>this.maxZoom){return kw}for(var T=0;T<this.bounds.length;T++){if(this.bounds[T].containsPoint(e)){kw=true;break}}return kw},isValid:function(){return this.bounds&&this.minZoom&&this.maxZoom&&this.tileUrlFunction},toString:function(){return"PrivateRegionDataModel"}});function hZ(kA,i,kw,T,kv){this.mgr=kA;this.position=kw;this._cbks=[];this.name=kA.getTileName(T,kv,kA.map.config.style);this.info=T;this._transparentPng=kv.isTransparentPng();var kB=b3("img");ih(kB);kB.galleryImg=false;var kz=kB.style;kz.position="absolute";kz.width=kA.tileSize+"px";kz.height=kA.tileSize+"px";kz.left=kw[0]+"px";kz.top=kw[1]+"px";this.img=kB;this.src=i;if(eK&&kw._offsetX===0){kz.opacity=0;kz.willChange="opacity"}var ky=this;this.img.onload=function(kJ){if(!ky.mgr){return}var kE=ky.mgr;var kC=kE.bufferTiles;if(kE.bufferNumber>0){kC[ky.name]=ky;kC.push(ky.name)}var kG=kC.length-kE.bufferNumber;for(var kH=0;kG>0&&kH<kC.length;kH++){var kI=kC[kH];if(!kE.mapTiles[kI]){if(kC[kI]){kC[kI].mgr=null;var kF=kC[kI].img;if(kF.parentNode){iF(kF);kF.parentNode.removeChild(kF)}kF=null;kC[kI].img=null;kC[kI]=null;delete kC[kI]}kC.splice(kH,1);kH--;kG--}}ky.loaded=true;kE.imgNumber++;if(!aT(ky.img)){if(kv.tilesDiv){kv.tilesDiv.appendChild(ky.img)}}var kJ=new fS("onimagechange");kJ.action="show";kJ.tile=ky.name;kE.map.dispatchEvent(kJ);if(eK&&kw._offsetX===0){var kD=new fH({fps:10,duration:300,render:function(e){if(ky.img&&ky.img.style){ky.img.style.opacity=e*1}},finish:function(){if(ky.img&&ky.img.style){delete ky.img.style.opacity;ky.img.style.willChange="auto"}}})}ky._callCbks()};this.img.onerror=function(kE){ky.error=true;ky._callCbks();if(!ky.mgr){return}var kC=ky.mgr;var kD=es[kv.mapType];if(kD.errorUrl){ky.img.src=kD.errorUrl}if(!aT(ky.img)){if(kv.tilesDiv){kv.tilesDiv.appendChild(ky.img)}}};kB=null;var kx=new fS("onimagebefore");kx.tile=ky.name;kA.map.dispatchEvent(kx)}hZ.prototype._addLoadCbk=function(e){this._cbks.push(e)};hZ.prototype._load=function(){if(FeBrowser.ie<=6&&FeBrowser.ie>0&&this._transparentPng){this.img.src=C.imgPath+"blank.gif"}else{this.img.src=this.src}};hZ.prototype._callCbks=function(){var T=this;for(var e=0;e<T._cbks.length;e++){T._cbks[e]()}T._cbks.length=0};var eK=(!e6.Browser.ie||e6.Browser.ie>8);function jz(e){this.tileLayers=[];this.map=e;this.bufferNumber=300;this.mapTiles=[];this.bufferTiles=[];this.config=es[this.map.mapType];this.errorUrl=this.config.errorUrl;this.tileSize=this.config.tileSize;this.baseUnits=this.config.baseUnits;this.baseZoomLevel=this.config.zoomLevelBase;this.tileURLs=this.config.tileUrls;this.imgNumber=0;this.numLoading=0;this.temp={}}bD.register(function(i){if(i._renderType==="webgl"){return}var e=i.tileMgr=new jz(i);i.addEventListener("mousewheel",function(T){e.mouseWheel(T)});i.addEventListener("dblclick",function(T){e.dblClick(T)});i.addEventListener("rightdblclick",function(T){e.dblClick(T)});i.addEventListener("minuspress",function(T){e.keypress(T)});i.addEventListener("pluspress",function(T){e.keypress(T)});i.addEventListener("load",function(T){if(this.mapType===BMAP_EARTH_MAP){return}e.loadTiles()});i.addEventListener("zoomstartcode",function(T){if(this.mapType===BMAP_EARTH_MAP){return}e._zoom(T)});i.addEventListener("moving",function(T){if(this.mapType===BMAP_EARTH_MAP){return}e.moveGridTiles()});i.addEventListener("resize",function(T){if(this.mapType===BMAP_EARTH_MAP){return}e.resizeMap(T)});i.addEventListener("addtilelayer",function(T){e.addTileLayer(T)});i.addEventListener("removetilelayer",function(T){e.removeTileLayer(T)})});e6.extend(jz.prototype,{addTileLayer:function(kv){var T=this;var i=kv.target;T.tileLayers.push(i);if(T.map.loaded){T.moveGridTiles()}},removeTileLayer:function(kC){var kD=this;var kA=kC.target;var ky=kA.mapType;var kx=kD.mapTiles;var kF=kD.bufferTiles;for(var T in kF){var kv=T.split("-")[1];if(kv==ky){delete kF[T]}}for(var T in kx){var kv=T.split("-")[1];if(kv==ky){delete kx[T]}}if(kD.zoomsDiv&&kD.zoomsDiv.parentNode){kD.zoomsDiv.parentNode.removeChild(kD.zoomsDiv);kD.zoomsDiv.innerHTML=""}var kw=kD.map;if(kw.deepZoom){var kE=kw.deepZoom.preDeepZoomDiv;if(kE&&kE.parentNode){kE.parentNode.removeChild(kE)}}for(var kB=0,kz=kD.tileLayers.length;kB<kz;kB++){if(kA==kD.tileLayers[kB]){kD.tileLayers.splice(kB,1)}}kD.moveGridTiles()},hideDeepZoomDiv:function(){var i=this,T=i.map;if(T.deepZoom){var e=T.deepZoom.preDeepZoomDiv;if(e&&e.style.display!="none"){e.style.display="none"}}},getTileLayer:function(kw){var kv=this;for(var T=0,e=kv.tileLayers.length;T<e;T++){tilelayer=kv.tileLayers[T];if(tilelayer.mapType==kw){return tilelayer}}return null},_zoom:function(T){var i=this;if(i.zoomsDiv&&i.zoomsDiv.style.display!="none"){i.zoomsDiv.style.display="none"}i.hideDeepZoomDiv();i.moveGridTiles()},resizeMap:function(i){this.loaded=false;this.moveGridTiles()},_checkTilesLoaded:function(){this.numLoading--;var e=this;if(this.numLoading==0){if(this._checkLoadedTimer){clearTimeout(this._checkLoadedTimer);this._checkLoadedTimer=null}this._checkLoadedTimer=setTimeout(function(){if(e.numLoading==0){e.map.dispatchEvent(new fS("ontilesloaded"))}e._checkLoadedTimer=null},80)}},getTileName:function(e,T,i){var kw=T.mapType;var kv="TILE-"+kw+"-"+i+"-"+e[0]+"-"+e[1]+"-"+e[2];return kv},hideTile:function(kv,T){var i=kv.img;if(aT(i)){if(kv.loaded){this.imgNumber--}if(i.parentNode){iF(i);i.parentNode.removeChild(i)}}var kw=new fS("onimagechange");kw.tile=this.getTileName(kv.info,T,this.map.config.style);kw.action="hide";delete this.mapTiles[kv.name];if(!kv.loaded){iF(i);kv._callCbks();i=null;kv.img=null;kv.mgr=null}this.map.dispatchEvent(kw)},loadTiles:function(){var i=this;if(e6.Browser.ie){try{document.execCommand("BackgroundImageCache",false,true)}catch(T){}}if(this.zoomsDiv&&this.zoomsDiv.style.display!="none"){this.zoomsDiv.style.display="none"}i.hideDeepZoomDiv();i.moveGridTiles()},getCell:function(kw,kv){var e=this.baseUnits*Math.pow(2,(this.baseZoomLevel-kv));var T=parseInt(kw.lng/e);var i=parseInt(kw.lat/e);return[T,i,e*(T+0.5),e*(i+0.5)]},moveGridTiles:function(){var kJ=this.map,kS=kJ.getMapType(),kQ=this.tileLayers.length;var kO=kJ.centerPoint;if(kS!==BMAP_SATELLITE_MAP){kO=e9.calcLoopCenterPoint(kO)}var kA=kJ.width;var k4=kJ.getZoomUnits();var kP=k4*kA;var kU=kO.lng-kP/2;var kF=kO.lng+kP/2;var kI=e9.isAddWidth(kU,kF);for(var kW=0;kW<kQ;kW++){var kw=this.tileLayers[kW];if(kw.baseLayer||kQ==1){this.tilesDiv=kw.tilesDiv}var kK=es[kw.mapType];var kv=kJ.zoomLevel;var kZ=kJ.getZoomUnits(kJ.zoomLevel);var kE=kK.baseUnits*Math.pow(2,(kK.zoomLevelBase-kv));var kC=Math.floor(kO.lng/kE);var kV=Math.floor(kO.lat/kE);var kH=kK.tileSize;var kL=[kC,kV,(kO.lng-kC*kE)/kE*kH,(kO.lat-kV*kE)/kE*kH];var kD=kI?kJ.width/2*1.5:kJ.width/2;var kG=kL[0]-Math.ceil((kD-kL[2])/kH);var k3=kL[1]-Math.ceil((kJ.height/2-kL[3])/kH);var kX=kL[0]+Math.ceil((kD+kL[2])/kH);var kM=kL[1]+Math.ceil((kJ.height/2+kL[3])/kH);var kB=[];for(var k1=kG;k1<kX;k1++){for(var k0=k3;k0<kM;k0++){kB.push([k1,k0]);var kR="id_"+k1+"_"+k0+"_"+kv;kB[kR]=true}}if(kw.mapType!==BMAP_SATELLITE_MAP){kB=e9.calcLoopTiles(kB,kv)}kB.sort((function(i){return function(k6,k7){return((0.4*Math.abs(k6[0]-i[0])+0.6*Math.abs(k6[1]-i[1]))-(0.4*Math.abs(k7[0]-i[0])+0.6*Math.abs(k7[1]-i[1])))}})([kL[0],kL[1]]));var T=this.mapTiles;var e=-kO.lng/kZ;var k5=kO.lat/kZ;var kT=[e,k5];for(var kN in T){var ky=T[kN];var k2=ky.info;if(!k2){continue}var kR="id_"+k2[0]+"_"+k2[1]+"_"+k2[2];if(!kB[kR]){this.hideTile(ky,kw)}}var kx=-kJ.offsetX+kJ.width/2;var kz=-kJ.offsetY+kJ.height/2;kw.tilesDiv.style.left=Math.round(e+kx)-kT[0]+"px";kw.tilesDiv.style.top=Math.round(k5+kz)-kT[1]+"px";this.numLoading+=kB.length;for(var k1=0,kY=kB.length;k1<kY;k1++){this.showTile([kB[k1][0],kB[k1][1],kJ.zoomLevel],kT,kw,k1,kJ.config.style)}}},showTile:function(ky,kx,kB,kG){this.centerPos=kx;var kz=es[kB.mapType];var kC=this.map.config.style;var kv=this.getTileName(ky,kB,kC);var kw=(ky[0]*kz.tileSize)+kx[0];var T=(-1-ky[1])*kz.tileSize+kx[1];var kF=[kw,T];var kA=null;if(kB.mapType!==BMAP_SATELLITE_MAP){kA=e9.calcLoopParam(ky[0],ky[2]);var kE=kA.offsetX;kF[0]+=kE;kF._offsetX=kE}var kJ=this;var kI=this.mapTiles[kv];if(kI){kI.img.style.left=kF[0]+"px";kI.img.style.top=kF[1]+"px";if(kI.loaded){this._checkTilesLoaded()}else{kI._addLoadCbk(function(){kJ._checkTilesLoaded()})}return}kI=this.bufferTiles[kv];if(kI){this.imgNumber++;kB.tilesDiv.insertBefore(kI.img,kB.tilesDiv.lastChild);this.mapTiles[kv]=kI;kI.img.style.left=kF[0]+"px";kI.img.style.top=kF[1]+"px";if(kI.loaded){this._checkTilesLoaded()}else{kI._addLoadCbk(function(){kJ._checkTilesLoaded()})}var kH=new fS("onimagechange");kH.action="cache";kH.tile=this.getTileName(ky,kB,kC);this.map.dispatchEvent(kH)}else{var kD=new fr(ky[0],ky[1]);if(kA){kD.x=kA.col}var i=kB.getTilesUrl(kD,ky[2]);kI=new hZ(this,i,kF,ky,kB);kI._addLoadCbk(function(){kJ._checkTilesLoaded()});kI._load();this.mapTiles[kv]=kI;hv(this.map)}},mouseWheel:function(kz){var ky=this.map;if(!ky.config.enableWheelZoom){return}var kA=ky.zoomLevel+(kz.trend===true?1:-1);var kw=ky._getProperZoom(kA);if(kw.exceeded){var T=new fS("onzoomexceeded");T.targetZoom=kA;ky.dispatchEvent(T);return}ky.dispatchEvent(new fS("onzoomstart"));ky.lastLevel=ky.zoomLevel;ky.zoomLevel=kw.zoom;var i=kz.pixel;var kv=ky.pixelToPointIn(i,{zoom:ky.lastLevel});var kx=ky.getZoomUnits(ky.zoomLevel);ky.centerPoint=new cD(kv.lng+kx*(ky.width/2-i.x),kv.lat-kx*(ky.height/2-i.y));this.zoom(i)},dblClick:function(T){var i=this.map;if(!i.config.enableDblclickZoom){return}if(i.mapType==="B_EARTH_MAP"){return}if(i.currentOperation===em.dragging){return}if(T.type=="onrightdblclick"){i.zoomOut(T.point)}else{i.zoomIn(T.point)}},keypress:function(T){var i=this.map;if(i.getMapType()===BMAP_EARTH_MAP){return}T.type=="onpluspress"?i.zoomIn():i.zoomOut()}});function hK(kv){this.opts=kv||{};this.copyright=this.opts.copyright||{};this.transparentPng=this.opts.transparentPng||false;this.png8=this.opts.png8||false;this.pack=this.opts.pack||false;this.baseLayer=this.opts.baseLayer||false;this.dataType=this.opts.dataType||1;this.transform=this.opts.transform||0;this.spanLevel=this.opts.spanLevel||0;this.isFlat=!this.opts.isFlat?false:true;this.showLabel=this.opts.showLabel===false?false:true;var e=this.opts.tileTypeName||"web";this.tileType=ig.getInstance(e);this.clipTile=this.opts.clipTile||false;this._type="tilelayer";var i=b2()?128:256;this.cacheSize=this.opts.cacheSize||i;var T=this;this.tileCache=new aA(this.cacheSize,{clearCallback:function(kw){if(kw.label){if(kw.label.textImageBitmap){kw.label.textImageBitmap.close()}if(kw.label.indoorTextImageBitmap){kw.label.indoorTextImageBitmap.close()}}T._removeIndoorData(kw)}});this.scaler=gp()>=1.5?2:1;this.normalUdt=j6("ditu","normal").udt;this.numLoading=0;this.numTileLoading=0;this.firstTileLoad=false;this.retry=this.opts.retry||false;this.retryTime=this.opts.retryTime||600;this.useThumbData=false;this.useThumbData=this.opts.useThumbData||false;if(this.baseLayer){this.useThumbData=true}if(typeof this.opts.customLayer==="boolean"){this.customLayer=this.opts.customLayer}else{this.customLayer=true}}hK.inherits(de,"TileLayer");e6.extend(hK.prototype,{isTransparentPng:function(){return this.transparentPng},getTilesUrl:function(kC,e){var T=es[this.mapType];if(typeof T!=="object"){return null}var kv=kC.x;var kD=kC.y;kv=e9.calcLoopParam(kv,e).col;var i="";if(this.opts.tileUrlTemplate){i=this.opts.tileUrlTemplate;i=i.replace(/\{X\}/,kD);i=i.replace(/\{Y\}/,kv);i=i.replace(/\{Z\}/,e)}else{if(this.mapType===BMAPGL_NORMAL_MAP){var kB=this.isCanvasMap?0:1;var kx=T.tileUrls[Math.abs(kD+kv)%T.tileUrls.length];if(window.offLineIPAddress){kx=window.offLineIPAddress+"tile5/"}var kw=this.map.config.style;i=kx+"?qt=vtile&x="+kv+"&y="+kD+"&z="+e+(kw==="default"?"":("&styleId=1"))+"&styles=pl&udt="+this.normalUdt+"&scaler="+this.scaler+"&showtext="+kB;i=i.replace(/-(\d+)/gi,"M$1")}if(this.mapType===BMAP_SATELLITE_MAP){var ky=j6("ditu","satellite");var kA=ky.ver;var kz=ky.udt;i=T.tileUrls[Math.abs(kD+kv)%T.tileUrls.length]+"u=x="+kv+";y="+kD+";z="+e+";v="+kA+";type=sate&fm=46&udt="+kz;i=i.replace(/-(\d+)/gi,"M$1")}}return i},initialize:function(ky){this.map=ky;if(ky._renderType==="webgl"){var kx=null;if(this.customLayer!==false){kx=this.getTilesUrl}e6.extend(this,fn);this.labelProcessor=new jt(this);this.callbackDataQueue=[];if(kx){this.getTilesUrl=kx}var T=this;ky.on("indoor_data_refresh",function(kz){if(!T.baseLayer){return}T._refreshIndoorData(kz.uid,kz.floor)});ky.on("custom_labels_ready",function(kz){if(T.mapType!==BMAPGL_NORMAL_MAP&&kz.model==="custom"){return}if((kz.model==="custom")||kz.model==="mvt_"+T.drawIndex){T._doWorkAfterLabelImageLoad(kz.virtualTile,kz.labelCanvas,null,kz.imgKey)}});ky.on("glmoduleloaded",function(){if(!T.baseLayer){return}T.updateAllIconsTextureCoords()});ky.on("layer_update",function(kA){if(T.dataType===2&&ky.customLoaded&&ky.areaCustomLoaded){var kz=new fS("onlayer_clear");ky.fire(kz)}});ky.on("layer_clear",function(kz){if(T.dataType===2){T.clearCache()}});if(this.ontology&&this.ontology._initEvent){this.ontology._initEvent(ky)}}if(!ky.temp.layerZIndex){ky.temp.layerZIndex=0}this.zIndex=this.zIndex||1;if(ky.getRenderType()==="dom"){this.zIndex=ky.tileMgr.tileLayers.length}else{if(this.baseLayer){this.zIndex=0}else{if(this.zIndex>0){this.adjustZIndex()}else{var e=ky._featureMgr.result.bkData;this.zIndex=e.length||1}}}if(!ky.temp.layid){ky.temp.layid=0}if(!this.opts.mapType){this.mapType="BMAP_CUSTOM_LAYER_"+ky.temp.layid;ky.temp.layid++}else{this.mapType=this.opts.mapType}var kv=es[this.mapType];if(!kv){es[this.mapType]={tileUrls:[],tileSize:256,baseUnits:256,zoomLevelMin:1,zoomLevelMax:19,minZoom:3,maxZoom:19,minDataZoom:3,maxDataZoom:19,zoomLevelBase:18,errorUrl:C.imgPath+"/blank.gif",bounds:new ie(new cD(-21364736,-10616832),new cD(23855104,15859712)),imgExtend:"png"}}if(ky._renderType!=="webgl"){var kw=bP(ky.platform,'<div style="position:absolute;z-index:'+this.zIndex+'"></div>');kw.style.display="";kw.style.left=Math.ceil(-ky.offsetX+ky.width/2)+"px";kw.style.top=Math.ceil(-ky.offsetY+ky.height/2)+"px";this.tilesDiv=kw}this.isCanvasMap=ky.isCanvasMap();this.lastZoom=ky.getZoom();var i=this;this.addEventListener("initDrawData",function(kz){if(i.opts.boundary){i.addBoundary(i.opts.boundary)}});ky.on("destroy",function(){i.destroy()})},clearCache:function(){this.tileCache.clear();this.map._featureMgr.clearData(this.drawIndex);this.map._featureMgr.setLabelData([],this.drawIndex);this.map._featureMgr.clearLabelOverlayData(this.drawIndex);this.labelProcessor.iconCache.clear()},remove:function(){if(this.tilesDiv&&this.tilesDiv.parentNode){this.tilesDiv.innerHTML="";this.tilesDiv.parentNode.removeChild(this.tilesDiv)}delete this.tilesDiv},getCopyright:function(){return this.copyright},getMapType:function(){return this.mapType},adjustZIndex:function(){if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;while(e[this.zIndex]){this.zIndex+=1}}},_getAdjoinZIndex:function(kw){var T=this.zIndex;if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;if(kw==="up"){for(var kv=this.zIndex+1;kv<e.length;kv++){if(e[kv]){T=kv+1;break}}}else{for(var kv=this.zIndex-1;kv>0;kv--){if(e[kv]){T=kv;break}}}}return T},setZIndex:function(e){this.setTargetZIndex(e)},setTargetZIndex:function(e){this.removeLabel&&this.removeLabel(this.zIndex);this.zIndex=e;this.drawIndex=e;if(this.tilesDiv){this.tilesDiv.style.zIndex=e}},calcLoopParam:function(e,i){return e9.calcLoopParam(e,i)},addBoundary:function(kx){if(!kx||!this.map){return}if(typeof kx==="string"){kx=[kx]}for(var kv=0;kv<kx.length;kv++){var T=new BMapGL.Polygon(kx[kv]);if(T&&bX(T._i)){var kw=new fS("onbeforeaddoverlay",T);kw.overlay=T;kw.isLayerMask=true;this.map.dispatchEvent(kw);T._i(this.map);if(this.boundary){this.boundary.push(T)}else{this.boundary=[T]}}}this.updateBoundary()},clearBoundary:function(){this.boundary=false;this.updateBoundary()},updateBoundary:function(){if(this.boundary===undefined||!this.map){return}var i=this.map._featureMgr.result.bkData;if(i[this.zIndex]){i[this.zIndex].showRegion=this.opts.showRegion;i[this.zIndex].boundary=this.boundary;this.map.dispatchEvent(new fS("onrefresh"));if(this.boundary===false){var T=new fS("onremoveLayerMask");T.hasLayerBoundary=this.map._featureMgr.hasLayerBoundary();this.map.dispatchEvent(T)}}},destroy:function(){this.copyright=null;this.clearCache()}});function m(i,e,T){this.bounds=i;this.content=e;this.mapType=T}m.inherits(de,"Copyright");var ey={get:function(e){if(!ey.singleton){ey.singleton=new gg(e)}return ey.singleton}};function gg(i){this._map=i;this._tileMgr=i.tileMgr;this._animationDiv=null;this._preAnimationDiv=null;this._animation=null;this._baseLayerDiv=null;this._transformStyleName=dc.ifSupportCSS3("transform",true);this._transformOriginStyleName=dc.ifSupportCSS3("transformOrigin",true);this._preZoomTimes=1;this._preRenderTick=1;this._enableCanvas2dMap=!!(i.getRenderType()==="canvas");this._isIE9=!!(e6.Browser.ie===9);var e=this;i.addEventListener("maptypechange",function(){e.hide()});i.addEventListener("load",function(){e.hide()})}e6.extend(gg.prototype,{prepareLayer:function(){var kv=this._map;var e=this._tileMgr;this._canvas2dMapMgr=kv.canvas2dMapMgr;var T=this._baseLayerDiv=e.tilesDiv;if(!this._animationDiv){var i=this._preAnimationDiv;if(i){i.parentNode&&i.parentNode.removeChild(i);this._preAnimationDiv=null}this._preAnimationDiv=this._animationDiv=T.cloneNode(true);kv.platform.insertBefore(this._animationDiv,kv.platform.firstChild)}this.show()},prepareAniParam:function(){var kv=this._animationDiv;if(!kv){return}var e=kv.children.length;var T;this._zoomAniInfo=[];for(var kw=e-1;kw>-1;kw--){var kx={};T=kv.children[kw].style;kx.top=parseInt(T.top,10);kx.left=parseInt(T.left,10);this._zoomAniInfo[kw]=kx}},prepareLabelLayer:function(){var kw=this._map;if(this._enableCanvas2dMap&&kw.canvas2dMapMgr){if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.parentNode.removeChild(this.touchZoomLabelCanvas)}var i=kw.canvas2dMapMgr._labelCanvas;this.touchZoomLabelCanvas=i.cloneNode(false);var e=this.touchZoomLabelCanvas.getContext("2d");e.drawImage(i,0,0);kw.platform.insertBefore(this.touchZoomLabelCanvas,kw.platform.firstChild);var kv=parseInt(i.style.left,10);var T=parseInt(i.style.top,10);this.touchZoomLabelCanvas.style.zIndex=9;this.touchZoomLabelCanvas.style[this._transformOriginStyleName]=(this._fixPosition.x-(kw.offsetX+kv))+"px "+(this._fixPosition.y-(kw.offsetY+T))+"px";i.style.visibility="hidden"}},show:function(){if(this._animationDiv){this._animationDiv.style.visibility=""}},showLabel:function(){var i=this._map;if(this._enableCanvas2dMap&&i.canvas2dMapMgr){var e=i.canvas2dMapMgr._labelCanvas;if(e){e.style.visibility=""}if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.style.zIndex=-2;this.touchZoomLabelCanvas.style.visibility="hidden"}}},hide:function(){if(this._animationDiv){this._animationDiv.style.visibility="hidden"}if(this._preAnimationDiv){this._preAnimationDiv.style.visibility="hidden"}},hideNonAnimationLayers:function(){var kv=this._map;if(kv.getRenderType()==="dom"){if(kv.overlayDiv){kv.overlayDiv.style.visibility="hidden"}if(kv.overlayDivEx){kv.overlayDivEx.style.visibility="hidden"}}var kx=kv.tileMgr.tileLayers;var kw;for(var T=0,e=kx.length;T<e;T++){kw=kx[T];kw.tilesDiv.style.visibility="hidden"}},showNonAnimationLayers:function(){var kv=this._map;if(kv.getRenderType()==="dom"){if(kv.overlayDiv){kv.overlayDiv.style.visibility=""}if(kv.overlayDivEx){kv.overlayDivEx.style.visibility=""}}var kx=kv.tileMgr.tileLayers;var kw;for(var T=0,e=kx.length;T<e;T++){kw=kx[T];kw.tilesDiv.style.visibility=""}},setFixPosition:function(e){this._fixPosition=e},setZoom:function(e,kB){var ky=this._fixPosition;var kH=this._map;var kI=this._baseLayerDiv;var kz={x:ky.x-parseInt(kI.style.left,10)-kH.offsetX,y:ky.y-parseInt(kI.style.top,10)-kH.offsetY};var kv=this._animationDiv;if(!kv){return}var kF=kv.children.length;var kD;var kG=this._transformStyleName;var kx=this._transformOriginStyleName;var kJ=this;var kL;var kA;for(var kE=kF-1;kE>-1;kE--){var kC=this._zoomAniInfo[kE];kD=kv.children[kE].style;var kw=kC.left-kz.x;var T=kC.top-kz.y;kC.dx=kw*e-kw;kC.dy=T*e-T;kC.preDx=kw-kw;kC.preDy=T-T;kL=kC.preDx+(kC.dx-kC.preDx);kA=kC.preDy+(kC.dy-kC.preDy)+kB;kD.left=kC.left+kL+"px";kD.top=kC.top+kA+"px";kD.width=kD.height=256*e+"px"}if(this._enableCanvas2dMap){var kK=!kJ._isIE9?"translate3d(0px, "+kB+"px, 0) scale("+e+")":"translate(0px, "+kB+"px) scale("+e+")";this.touchZoomLabelCanvas.style[kG]=kK}},setZoomFinish:function(){this._animationDiv=null},startAnimation:function(ky){this.prepareLayer();this.hideNonAnimationLayers();var kR=this._map;if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.style.display="none"}ky=ky||{};var kP=ky.zoomCount||0;var kD=ky.fixPosition;var kN=ky.fixMCPosition;var kB=ky.pixOffset;this._zoomCount=kP;var kv=kR.getZoom();var kQ=kv+kP;var e=kR.config.enableContinuousZoom;var kH=0.5;var kC=5;var T=Math.pow(2,kP);var kT=this._baseLayerDiv;var kE={x:kD.x-parseInt(kT.style.left,10)-kR.offsetX,y:kD.y-parseInt(kT.style.top,10)-kR.offsetY};var kz=this._animationDiv;var kL=kz.children.length;var kV=this._preZoomTimes;var kO=[];var kM=this._transformStyleName;var kA=this._transformOriginStyleName;for(var kK=kL-1;kK>-1;kK--){var kI={};var kJ=kz.children[kK].style;kI.top=parseInt(kJ.top,10);kI.left=parseInt(kJ.left,10);var kx=kI.left-kE.x;var kw=kI.top-kE.y;kI.dx=kx*T-kx;kI.dy=kw*T-kw;kI.preDx=kx*kV-kx;kI.preDy=kw*kV-kw;kO[kK]=kI}var kS=this;var kG;var kU;var kF;this._zoomAni=new fH({fps:60,duration:e?500:1,transition:function(i){i=i*kC/(2*kH);return kC*i-kH*i*i},render:function(k4){k4=k4*(4*kH)/(kC*kC);kG=kV+k4*(T-kV);var kX=kv+p(kG);var k2=null;var k1=0;var k5=0;if(ky.onAnimationBeforeLooping){var k6=ky.onAnimationBeforeLooping(k4,kX);k2=k6.loopingCenter;k1=k6.yDiff;k5=k6.totalYDiff}for(var kY=kO.length-1;kY>-1;kY--){var kZ=kO[kY];if(kz.children[kY]){var k3=kz.children[kY].style;kU=kZ.preDx+(kZ.dx-kZ.preDx)*k4-kB.width*k4;kF=kZ.preDy+(kZ.dy-kZ.preDy)*k4-kB.height*k4+k1;k3.left=kZ.left+kU+"px";k3.top=kZ.top+kF+"px";k3.height=k3.width=256*kG+"px"}}var kW=kB.width*k4;var k0=kB.height*k4;if(kR.isRestrict){kS._enableCanvas2dMap&&kS._canvas2dMapMgr.clearLabel()}else{kS._enableCanvas2dMap&&kS._canvas2dMapMgr.drawLabel(kG,kD,kv,kQ,kP,k4,kW,k0,k5,k1)}kS._preZoomTimes=kG;kS._preRenderTick=k4;ky.onAnimationLooping&&ky.onAnimationLooping(k4,kX,k2)},finish:function(){kS._preZoomTimes=1;kS._zoomAni=null;kS._animationDiv=null;ky.onAnimationFinish&&ky.onAnimationFinish();kS.showNonAnimationLayers()}});return this._zoomAni},stopAnimation:function(){if(this._zoomAni){this._zoomAni.stop();this._zoomAni=null}}});function ks(e){this._initVars(e);this._initColorCanvas();this._bindEvent(e)}e6.extend(ks.prototype,{_initVars:function(e){this._map=e._map;this._canvas2dMapMgr=e;this._labelCtx=e._labelCtx;this.ratio=this._map.config.ratio;this.sizeRatio=this.ratio>1?2:1;this.RANK1=1000000;this.RANK2=2000000;this.RANK3=3000000;this.RANK4=4000000;this.RANK5=5000000},_initColorCanvas:function(){var i=256,T=b3("canvas"),e=T.style;e.width=i+"px";e.height=i+"px";T.width=i;T.height=i;this._colorCvsSize=i;this._colorCvs=T;this._colorCtx=T.getContext("2d")},getLabelImageData:function(kI){var kH=kI.textImg;var T=kI.textPos;var kF=this.ratio;var kD=this.sizeRatio/kF;var kw=this._colorCtx;var kA=this._colorCvsSize;kw.clearRect(0,0,kA,kA);var kC=0;var e=0;var kz=0;for(var kB=0;kB<T.length;kB++){if(T[kB].width>kC){kC=T[kB].width;e=kB;kz=T[kB].drawX}}kC/=kD;var kE=0;for(var kB=0,ky=T.length;kB<ky;kB++){var kG=T[kB];var kJ;if(kB===e){kJ=0}else{kJ=kG.drawX-kz}kw.drawImage(kH,kG.srcX,kG.srcY,kG.width,kG.height,kJ,kE,kG.width/kD,kG.height/kD);if(kG.width/kD>kC){kC=kG.width/kD}kE+=kG.height/kD+2*kF}var kv=kw.getImageData(0,0,kC,kE);var kx=kw.getImageData(0,0,kC,kE);return[kv,kx]},_bindEvent:function(i){var e=this,T=i._map;T.addEventListener("onspotmouseover",function(ky){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(ky.spots.length>0){var kx=ky.spots[0].userdata.uid;var kw=ky.spots[0].userdata.name;var kv=e.findLabelByUid(kx,kw);kv&&e._toHighLightColor(kv)}});T.addEventListener("onspotmouseout",function(ky){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(ky.spots.length>0){var kx=ky.spots[0].userdata.uid;var kw=ky.spots[0].userdata.name;var kv=e.findLabelByUid(kx,kw);kv&&e._toDefaultColor(kv)}});T.addEventListener("onspotclick",function(ky){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(ky.spots&&ky.spots.length>0){var kx=ky.spots[0].userdata.uid;var kw=ky.spots[0].userdata.name;var kv=e.findLabelByUid(kx,kw);kv&&e._changeBaseMapState(kv)}else{e._recoverNormalState()}});T.on("spot_status_reset",function(){e._recoverNormalState()});T.on("spot_highlight",function(kw){var kv=e.findLabelByUid(kw.uid);kv&&e._changeBaseMapState(kv)})},_getTextBound:function(kG){if(!kG.textPos){return null}var kE=this.ratio;var kC=this.sizeRatio/kE;var T=kG.textPos;var kF=kG.baseDrawX;var kD=kG.baseDrawY;var kA=kF*kE+(T[0].drawX-kF)/kC;var ky=kD*kE+(T[0].drawY-kD)/kC;var kw=kA+T[0].width/kC;var e=ky+T[0].height/kC;for(var kB=0,kz=T.length;kB<kz;kB++){var kH=T[kB];var kx=kF*kE+(kH.drawX-kF)/kC;if(kx<kA){kA=kx}var kv=kD*kE+(kH.drawY-kD)/kC;if(kv<ky){ky=kv}if(kx+kH.width>kw){kw=kx+kH.width}if(kv+kH.height>e){e=kv+kH.height}}return[kA,ky,kw,e]},_toHighLightColor:function(T){if(T._tempRank&&T._tempRank==this.RANK5){return}var kz=this._getTextBound(T);if(!kz){return}var kv=Math.round(kz[0]);var i=Math.round(kz[1]);var e=this.getLabelImageData(T);var kx=e[0];var kw=e[1];var ky=this._canvas2dMapMgr.getFilterImageData(kx,this.RANK5);T._oldImgData=kw;this._labelCtx.putImageData(ky,kv,i)},_toDefaultColor:function(e){if(e._tempRank&&e._tempRank==this.RANK5){return}if(e._oldImgData){var i=this.sizeRatio;var T=this._getTextBound(e);if(!T){return}this._labelCtx.putImageData(e._oldImgData,Math.round(T[0]),Math.round(T[1]));e._oldImgData=null}},_changeBaseMapState:function(kv){var T=this._canvas2dMapMgr;var i=kv.guid;var e=kv.guidExt;var kw={guid:i,name:kv.name,guidExt:e};T._labelStrategy.setStrategyInfo(kw);T._loadData()},_recoverNormalState:function(){var e=this._canvas2dMapMgr;e._labelStrategy.setStrategyInfo(null);e._loadData()},findLabelByUid:function(kx,kv){var kz=this._canvas2dMapMgr,e=kz._computedLabel;for(var kw=0,T=e.length;kw<T;kw++){var ky=e[kw];if(!kz.isClickableLabel(ky)){continue}if(kx&&ky.guid===kx){return ky}if(kv&&ky.name===kv){return ky}}return null}});function F(e){this._initVars(e)}e6.extend(F.prototype,{_initVars:function(e){this._map=e._map;this._canvas2dMapMgr=e;this.ratio=this._map.config.ratio;this._strategyInfo=null;this.RANK1=1000000;this.RANK2=2000000;this.RANK3=3000000;this.RANK4=4000000;this.RANK5=5000000},setStrategyInfo:function(e){this._strategyInfo=e},preComputeLabel:function(kB,lt,lb,kN,ln,lH){var k5=[],kJ=kB._centerX,kH=kB._centerY,lI=kN*ln;var lh=this.ratio;var kA=this._map.getZoom();var k0=0;if(kA===5){k0=4}if(kA===8){k0=-6}kB.sort(function(ll,i){if(ll.x*ll.y<i.x*i.y){return -1}else{return 1}});for(var k2=0,kY=kB.length;k2<kY;k2++){var ly=kB[k2],kT=ly.x,kQ=ly.y,kO=ly.z;var kV=e9.calcLoopParam(kT,kO).offsetX;var lf=kT*lI,le=(kQ+1)*lI,kv=(lf-kJ)/kN+lt/2+kV,T=(kH-le)/kN+lb/2;for(var kZ=0,lC=ly.length;kZ<lC;kZ++){var kD=ly[kZ],kK=undefined,kI=undefined,lA=undefined,lz=undefined;var lp=kD.baseDrawX=kv+kD.baseX;var lo=kD.baseDrawY=T+kD.baseY;if(kD.type=="fixed"){var k9=kD.iconPos,kM=kD.textPos,lE=kD.textImg;if(k9){k9.drawX=kv+k9.destX;k9.drawY=T+k9.destY;kK=k9.drawX;kI=k9.drawY;lA=k9.drawX+k9.width;lz=k9.drawY+k9.height}if(kM&&lE){for(var lq=0;lq<kM.length;lq++){var lD=kM[lq];lD.drawX=kv+lD.destX;lD.drawY=T+lD.destY;if(!kK){kK=lD.drawX;kI=lD.drawY;lA=lD.drawX+lD.width;lz=lD.drawY+lD.height}else{if(lD.drawX<kK){kK=lD.drawX}if(lD.drawY<kI){kI=lD.drawY}if(lD.drawX+lD.width>lA){lA=lD.drawX+lD.width}if(lD.drawY+lD.height>lz){lz=lD.drawY+lD.height}}}}}else{kD.tileX=kv;kD.tileY=T;kK=kv+kD.minXOriginal;kI=T+kD.minYOriginal;lA=kv+kD.maxXOriginal;lz=T+kD.maxYOriginal}if(kK!=undefined){var ls=lp+(kK-lp)/lh;var lr=lo+(kI-lo)/lh;var k3=lp+(lA-lp)/lh;var k1=lo+(lz-lo)/lh;kD.minX=ls;kD.minY=lr;kD.maxX=k3;kD.maxY=k1;var lw=(ls+k3)/2,lv=(lr+k1)/2,lc=kJ+(lw-lt/2)*kN,la=kH+(lb/2-lv)*kN;kD.geoX=lc;kD.geoY=la;k5.push(kD)}}}if(lH){for(var k2=0,kY=lH.length;k2<kY;k2++){var kX=lH[k2];var lk=kX[0];var kE=kX[1];var k9=lk.iconPos;var ky=k9.geoX;var kw=k9.geoY;var lp=(ky-kJ)/kN+lt/2;var lo=(kH-kw)/kN+lb/2;var kK=lp+k9.destX;var kI=lo+k9.destY;var lA=kK+k9.width;var lz=kI+k9.height;lk.textPos=lk.textPos||lk._textPos;var kM=lk.textPos;var lu=kM[0];var kS=lp+lu.destX;var kG=lo+lu.destY;if(kG<kI){kI=kG}if(kS+lu.width>lA){lA=kS+lu.width}if(kG+lu.height>lz){lz=kG+lu.height}if(kM.length===2){var kR=kM[1];var kP=lp+kR.destX;var kF=lo+kR.destY;if(kF<kI){kI=kF}if(kP+kR.width>lA){lA=kP+kR.width}if(kF+kR.height>lz){lz=kF+kR.height}}lk._tempBounds=[kK,kI,lA,lz];var k9=kE.iconPos;var ky=k9.geoX;var kw=k9.geoY;var lp=(ky-kJ)/kN+lt/2;var lo=(kH-kw)/kN+lb/2;var kK=lp+k9.destX;var kI=lo+k9.destY;var lA=kK+k9.width;var lz=kI+k9.height;kE.textPos=kE.textPos||kE._textPos;var kM=kE.textPos;var lu=kM[0];var kS=lp+lu.destX;var kG=lo+lu.destY;if(kS<kK){kK=kS}if(kG<kI){kI=kG}if(kG+lu.height>lz){lz=kG+lu.height}if(kM.length===2){var kR=kM[1];var kP=lp+kR.destX;var kF=lo+kR.destY;if(kP<kK){kK=kP}if(kF<kI){kI=kF}if(kF+kR.height>lz){lz=kF+kR.height}}kE._tempBounds=[kK,kI,lA,lz]}for(var k2=0,kY=lH.length;k2<kY;k2++){var kX=lH[k2];var lk=kX[0];var kE=kX[1];if(k2===0&&kE.textPos){kE._textPos=kE.textPos;delete kE.textPos}var lx=lk;if(!lk.textPos&&kE.textPos){lx=kE}var lB=lx._tempBounds;for(kZ=k2+1;kZ<kY;kZ++){var kW=lH[kZ];var k6=kW[0];var lG=kW[1];var kL=0;var lF=k6._tempBounds;if(!(lB[2]<lF[0]||lB[0]>lF[2]||lB[3]<lF[1]||lB[1]>lF[3])){kL++;if(k6.textPos){k6._textPos=k6.textPos;delete k6.textPos}}var lF=lG._tempBounds;if(!(lB[2]<lF[0]||lB[0]>lF[2]||lB[3]<lF[1]||lB[1]>lF[3])){kL++;if(lG.textPos){lG._textPos=lG.textPos;delete lG.textPos}}if(kL>=2){if(lx.textPos){lx._textPos=lx.textPos;delete lx.textPos}}}}for(var k2=0,kY=lH.length;k2<kY;k2++){var kX=lH[k2];var lk=kX[0];var kE=kX[1];var k7=lk;if(!lk.textPos&&kE.textPos){k7=kE}var k9=k7.iconPos;var ky=k9.geoX;var kw=k9.geoY;var lp=k7.baseDrawX=(ky-kJ)/kN+lt/2;var lo=k7.baseDrawY=(kH-kw)/kN+lb/2;k9.drawX=lp+k9.destX;k9.drawY=lo+k9.destY;var kK=k9.drawX;var kI=k9.drawY;var lA=k9.drawX+k9.width;var lz=k9.drawY+k9.height;var kM=k7.textPos;if(kM){var lu=kM[0];lu.drawX=lp+lu.destX;lu.drawY=lo+lu.destY;if(lu.drawX<kK){kK=lu.drawX}if(lu.drawY<kI){kI=lu.drawY}if(lu.drawX+lu.width>lA){lA=lu.drawX+lu.width}if(lu.drawY+lu.height>lz){lz=lu.drawY+lu.height}if(kM.length===2){var kR=kM[1];kR.drawX=lp+kR.destX;kR.drawY=lo+kR.destY;if(kR.drawX<kK){kK=kR.drawX}if(kR.drawY<kI){kI=kR.drawY}if(kR.drawX+kR.width>lA){lA=kR.drawX+kR.width}if(kR.drawY+kR.height>lz){lz=kR.drawY+kR.height}}}var ls=lp+(kK-lp)/lh;var lr=lo+(kI-lo)/lh;var k3=lp+(lA-lp)/lh;var k1=lo+(lz-lo)/lh;k7.minX=ls;k7.minY=lr;k7.maxX=k3;k7.maxY=k1;var lj=(ls+k3)/2;var li=(lr+k1)/2;var kz=kJ+(lj-lt/2)*kN;var kx=kH+(lb/2-li)*kN;k7.geoX=kz;k7.geoY=kx;k5.push(k7)}}var lm=this._strategyInfo;if(lm){var k4=lm.guid;var ld=lm.name;var kU=lm.guidExt;for(var k2=0,kY=k5.length;k2<kY;k2++){var kC=k5[k2];delete kC._tempRank;if(!this._canvas2dMapMgr.isClickableLabel(kC)||(kU===1&&!kC.guidExt)){continue}if((k4&&k4===kC.guid)||(ld&&ld===kC.name)){kC._tempRank=this.RANK5}}}else{for(var k2=0,kY=k5.length;k2<kY;k2++){var kC=k5[k2];if(kC.type=="line"||!kC.iconPos){continue}delete kC._tempRank}}k5.sort(function(lJ,ll){var lK=lJ._tempRank?lJ._tempRank:lJ.rank,i=ll._tempRank?ll._tempRank:ll.rank;if(lK===i){return lJ.baseX-ll.baseX}return i-lK});for(var k2=0,kY=k5.length;k2<kY;k2++){var lx=k5[k2];lx.isDel=false;lx.isFadeout=false;lx._schedule=0;lx._isIgnore=false;lx.arrIntersectIndex=[];for(kZ=k2+1;kZ<kY;kZ++){var k8=k5[kZ];if(!(lx.maxX-k0<k8.minX||lx.minX>k8.maxX-k0||lx.maxY-k0<k8.minY||lx.minY>k8.maxY-k0)){lx.arrIntersectIndex.push(kZ)}}}for(var k2=0,kY=k5.length;k2<kY;k2++){var kC=k5[k2];if(kC.isDel==false){var e=kC.arrIntersectIndex;for(var kZ=0,lC=e.length;kZ<lC;kZ++){var lg=k5[e[kZ]];lg.isDel=true;if(lg.guidExt===1){lg.isDel=false}}}}return k5}});function Z(e){this._map=e;this._initCanvas();this._initVars();this._bindEvent();this._tileType=ig.getInstance("na")}bD.register(function(i){if(i.getRenderType()==="canvas"){var e=i.config.style;if(bD["FeatureStyle"+e]){i.canvas2dMapMgr=new Z(i)}else{i.loadMapStyleFiles(function(){i.canvas2dMapMgr=new Z(i);i.canvas2dMapMgr._loadData()})}}});e6.extend(Z.prototype,{_initCanvas:function(){var ky=this._map,kw=ky.getSize(),kv=kw.width,i=kw.height,e=ky.platform,kz=b3("canvas"),kx=kz.style;var T=this.ratio=ky.config.ratio;this._width=kv;this._height=i;kx.cssText="position: absolute;left:0;top:0;width:"+kv+"px;height:"+i+"px;z-index:100;";kz.width=kv*T;kz.height=i*T;this._labelCanvas=kz;this._labelCtx=kz.getContext("2d");e.appendChild(kz)},_initVars:function(){var e=j6("ditu","normal");this._udt=e.udt;this._version=e.ver;this._labelDataUrls=es.B_NORMAL_MAP.vectorTileUrls;this._style=bD["FeatureStyle"+this._map.config.style];this._labelCount=0;this._vectorDrawLib=new hg(this);this._cache={maxNum:500,delNum:50,arrCache:[]};this._computedLabel=null;this._spotData=null;this._labelStrategy=new F(this);this._labelClick=new ks(this);this._biz=new eA(this);this._map.temp.isPermitSpotOver=true;this.labelStyleParam="pl";if(this._map.getMapType()===BMAP_SATELLITE_MAP){this.labelStyleParam="sl"}this.statRequestCount=0;this.statResponseCount=0},_resizeHandler:function(kx){var kz=this,i=kz._map,kw=i.getSize(),T=kw.width,kB=kw.height;var ky=this.ratio;var kC=this._labelCanvas,kv=kC.style;kv.width=T+"px";kv.height=kB+"px";kC.width=T*ky;kC.height=kB*ky;kz._width=T;kz._height=kB;var kA=true;kz._loadData(kA)},_bindEvent:function(){var e=this,i=e._map;i.addEventListener("load",function(T){e.clearLabel();e._loadData()});i.addEventListener("zoomend",function(T){if(!T.notClearLabel){e.clearLabel()}e._loadData()});i.addEventListener("moveend",function(T){e._loadData()});i.addEventListener("resize",function(T){e._resizeHandler(T)});i.addEventListener("maptypechange",function(T){if(T.mapType===BMAP_EARTH_MAP){e.hideLabelCanvas()}else{e.showLabelCanvas();if(T.mapType===BMAPGL_NORMAL_MAP){e.labelStyleParam="pl"}else{if(T.mapType===BMAP_SATELLITE_MAP){e.labelStyleParam="sl"}}e._loadData()}});i.addEventListener("streetlayer_show",function(T){if(this.isCanvasMap()){e.showLabelCanvas()}});i.addEventListener("streetlayer_hide",function(T){if(this.isCanvasMap()){e.hideLabelCanvas()}});i.addEventListener("loadbizdata",function(kv){var T=kv.data;e._biz.proecessBizData(T,function(){e.updateLabel()})});i.addEventListener("unloadbizdata",function(T){e._biz.clearBizData();e.updateLabel()});e.isDrawText=false;setTimeout(function(){if(!e.isDrawText){i.dispatchEvent(new fS("onmapwhitescreen"))}},10000)},getStyle:function(){return this._style},_getZoomUnits:function(e){return Math.pow(2,18-e)},_createCacheForm:function(T,kz,ky,i){var kx=this;var e=kx._cache;var kv=e.arrCache;var kA=this._getLabelId(T,kz,ky,i);var kw={id:kA,updateLabelCounter:0};kv.push(kw);kv[kA]=kw;return kw},_getLabelId:function(i,kv,T,e){return"_"+i+"_"+kv+"_"+T+"_"+e+"_"+this.labelStyleParam},_getCache:function(i,kv,T,e){return this._cache.arrCache[this._getLabelId(i,kv,T,e)]},_setCacheValue:function(kw,kJ,kH,kv,kC){var kE=this;var e=kE._cache;var ky=e.arrCache;var kA=e.maxNum;var kx=e.delNum;var kI=this._getLabelId(kw,kJ,kH,kv);var kD=ky[kI];if(kC){kD.lb=kC}if(ky.length>kA){var T=ky.splice(0,kx);for(var kB=0,kz=T.length;kB<kz;kB++){var kF=T[kB],kG=kF.id;if(ky[kG].lb){ky[kG].lb=null}ky[kG]=null;delete ky[kG]}T=null}},_loadData:function(kH){var k0=this._map;if(!k0.isCanvasMap()){return}var kA=k0.getCenterIn();var kZ=e9.calcLoopCenterPoint(kA);var kz=this._tileType;var kC=this._width/2;var kO=this._height;var kP=k0.getZoom();var kL=kz.getDataZoom(kP);var kE=k0.getZoomUnits(kP);var kK=kE*kC;var kY=kZ.lng-kK;var kX=kZ.lng+kK;var kI=e9.isAddWidth(kY,kX);kC=kI?kC*1.5:kC;var kJ=kz.getTileSize(kP);var kw=kz.getMercatorSize(kP,kL);var kD=Math.floor(kZ.lng/kw);var kF=Math.floor(kZ.lat/kw);var kx=[kD,kF,(kZ.lng-kD*kw)/kw*kJ,(kZ.lat-kF*kw)/kw*kJ];var kR=kx[0]-Math.ceil((kC-kx[2])/kJ);var kV=kx[1]-Math.ceil((kO/2-kx[3])/kJ);var kN=kx[0]+Math.ceil((kC+kx[2])/kJ);var kS=kx[1]+Math.ceil((kO/2+kx[3])/kJ);k0.temp.isPermitSpotOver=false;var e=[];for(var kU=kR;kU<kN;kU++){for(var kT=kV;kT<kS;kT++){e.push([kU,kT,kL]);var kM="id_"+kU+"_"+kT+"_"+kP;e[kM]=true}}e._zoom=kL;e=e9.calcLoopTiles(e,kP);e.sort((function(i){return function(k2,k3){return((0.4*Math.abs(k2[0]-i[0])+0.6*Math.abs(k2[1]-i[1]))-(0.4*Math.abs(k3[0]-i[0])+0.6*Math.abs(k3[1]-i[1])))}})([kx[0],kx[1]]));var kG=this._cache.arrCache;this._curViewLabels=[];var kv="viewKey_"+Math.floor(kA.lng)+"_"+Math.floor(kA.lat)+"_"+kP;this.statRequestCount=0;this.statResponseCount=0;this._labelCount+=e.length;var kB=kP;for(var kU=0,kQ=e.length;kU<kQ;kU++){var kD=e[kU][0];var kF=e[kU][1];var T=e[kU][2];var ky=this._getLabelId(kD,kF,T,kB);var kW=kG[ky];if(!kW){kW=this._createCacheForm(kD,kF,T,kB)}if(typeof kW.lb==="undefined"){kW.lb=null;this._loadLabelData(kD,kF,T,kB,kJ,kv);this.statRequestCount++}else{if(kW.lb){this._curViewLabels.push(kW.lb);this._labelCount--}else{if(kH){this._loadLabelData(kD,kF,T,kB,kJ,kv)}kW.updateLabelCounter++}}}if(this._labelCount===0){this.updateLabel()}var k1=this;if(k1.errorTimer){clearTimeout(k1.errorTimer)}k1.errorTimer=setTimeout(function(){if(k1._labelCount!==0){k1._labelCount=0;k1.updateLabel()}var k3=new fS("onloaddatatimeout");var k4=0;var k2=0;var k5=0;var i=0;if(k1.statRequestCount===k1.statResponseCount){k4=1}else{k2=1}if(k2===1){i=k1.statRequestCount-k1.statResponseCount;k5=k1.statResponseCount}k3.noTimeoutCount=k4;k3.timeoutCount=k2;k3.timeoutNoLoaded=i;k3.timeoutLoaded=k5;k1._map.dispatchEvent(k3)},500)},clearLabel:function(){var e=this._width;var T=this._height;var i=this.ratio;this._labelCtx.clearRect(0,0,e*i,T*i)},updateLabel:function(){var i=this._map;var e=i.getCenterIn();var kv=this._width;var ky=this._height;var kB=i.getZoom();var kA=this._tileType.getTileSize(kB);var kz=this._getZoomUnits(kB);var T=this._labelCtx;this._labelCanvas.style.left=-i.offsetX+"px";this._labelCanvas.style.top=-i.offsetY+"px";var kx=this._curViewLabels;kx._centerX=e.lng;kx._centerY=e.lat;var kw=this._biz.bizLabels;this._computedLabel=this._labelStrategy.preComputeLabel(kx,kv,ky,kz,kA,kw);this._computedLabel._zoom=kB;this.clearLabel();this._vectorDrawLib.drawIconAndText(T,this._computedLabel,kB);this._addSpotData();i.temp.isPermitSpotOver=true;if(kx.length>0){this.isDrawText=true}},_loadLabelData:function(kE,kD,kC,T,kF,e){var kx=kE.toString();var kv=kD.toString();var kz="cbk_"+kx.replace("-","_")+"_"+kv.replace("-","__")+"_"+Math.floor(kC);var kJ=fB+"."+kz;var kI=this._labelDataUrls;var kB=Math.abs(kE+kD)%kI.length;var kO=kI[kB];if(window.offLineIPAddress){kO=window.offLineIPAddress+"pvd/"}var i=this.labelStyleParam;var kH="?qt=vtile";var kK="";if(this._map.config.style!=="default"){kK="&styleId=1"}var kG="x={x}&y={y}&z={z}&udt={udt}&v={v}&styles={styles}"+kK+"&textonly=1&textimg=1&scaler={scaler}&fn="+encodeURIComponent(kJ);var kL=e9.calcLoopParam(kE,kC).col;var kA=this.ratio>1?2:1;var ky=kG.replace(/{x}/,kL).replace(/{y}/,kD).replace(/{z}/,Math.floor(kC)).replace(/{styles}/,i).replace(/{udt}/,this._udt).replace(/{v}/,this._version).replace(/{scaler}/,kA);var kw=kO+kH+"&param="+window.encodeURIComponent(e2(ky));var kN=this;var kM=kN._map;bD[kz]=function(kP){kN._vectorDrawLib.parseLabelData(kP,kE,kD,kC,T,kF,function(kU){var kR=kM.getCenterIn();var kV=kM.getZoom();var kX="viewKey_"+Math.floor(kR.lng)+"_"+Math.floor(kR.lat)+"_"+kV;kN._labelCount--;var kY=kN._getCache(kE,kD,kC,T).updateLabelCounter;kN._labelCount-=kY;var kS=kN._curViewLabels;if(kX===e||(kN._labelCount<0&&kV===kC)){kS.push(kU)}if(kX===e){kN.statResponseCount++}if(kN._labelCount<=0){var kQ=(new Date()).getTime();kN.updateLabel();var kT=(new Date()).getTime();var kW=new fS("oncanvasmaploaded");kW.drawTime=kT-kQ;if(kN.statResponseCount===kN.statRequestCount){kW.isAllLoadedDrawing=true}kM.dispatchEvent(kW)}kN._setCacheValue(kE,kD,kC,T,kU);delete bD[kz]})};gZ.load(kw)},drawLabel:function(T,kv,kC,i,kA,kw,e,kx,kB,ky){var kz=this;if(!kz._computedLabel){return}if(kz._computedLabel._zoom!==kC){kz.clearLabel();return}kz._map.temp.isPermitSpotOver=false;kz.clearLabel();kz._vectorDrawLib.zoomingIconAndText(this._labelCtx,kz._computedLabel,T,kv,i,kA,kw,e,kx,kB,ky)},_addSpotData:function(){this._spotData=[];var kC=this._map.getZoom();for(var kx=0,kw=this._computedLabel.length;kx<kw;kx++){var kz=this._computedLabel[kx];if(!this.isClickableLabel(kz)||(kz.guidExt===1&&kz.startScale>kC)){continue}var ky=[];ky[0]=(kz.minX-kz.maxX)/2;ky[1]=(kz.minY-kz.maxY)/2;ky[2]=(kz.maxX-kz.minX)/2;ky[3]=(kz.maxY-kz.minY)/2;var kv=null;if(kz.iconPos){kv=new cD(kz.iconPos.geoX,kz.iconPos.geoY)}var T=kz.name?kz.name.replace("\\\\","<br>"):"";if(kz.iconPos&&kz.iconPos.iconType.indexOf("ditie")>-1&&this._map.getZoom()>14){T=""}var kB={n:T,pt:new cD(kz.geoX,kz.geoY),userdata:{iconPoint:kv,uid:kz.guid,name:T,type:kz.iconPos?kz.iconPos.iconType:"",iconImg:kz.iconImg,mapPoi:true,adver_log:kz.adver_log||""},bd:ky,tag:"MAP_SPOT_INFO"};this._spotData.push(kB)}var kA=new fS("onspotsdataready");kA.spots=this._spotData;this._map._spotDataOnCanvas=this._spotData;this._map.dispatchEvent(kA)},isClickableLabel:function(e){if(e.isDel||(!e.guid&&!e.name)){return false}return true},getFilterImageData:function(T,ky){var kz=T.data,kx=this._labelStrategy,ky=parseInt(ky);for(var kA=0,kw=kz.length;kA<kw;kA+=4){var e=kz[kA],kB=kz[kA+1],kC=kz[kA+2],kD=kz[kA+3];if(kD===0){continue}var kv=Math.round((e+kB+kC)/3);var kE=kv-90;kE=kE<0?0:kE;if(ky===kx.RANK5){kz[kA]=51+kE*1.3;kz[kA+1]=133+kE*0.8;kz[kA+2]=255}}return T},showLabelCanvas:function(){this._labelCanvas.style.visibility=""},hideLabelCanvas:function(){this._labelCanvas.style.visibility="hidden"}});var aU=5;var jn=4;var gL=3;var N=2;var ez=1;var hJ=0;var kt=3;var iG=5;var fq={3:{start:3,base:3},4:{start:4,base:5},5:{start:4,base:5},6:{start:6,base:7},7:{start:6,base:7},8:{start:8,base:9},9:{start:8,base:9},10:{start:10,base:10},11:{start:11,base:12},12:{start:11,base:12},13:{start:11,base:12},14:{start:14,base:15},15:{start:14,base:15},16:{start:16,base:17},17:{start:16,base:17},18:{start:18,base:19},19:{start:18,base:19},20:{start:18,base:19},21:{start:18,base:19}};function hg(kv){this._canvas2dMapMgr=kv;var i=this.ratio=kv._map.config.ratio;this._featureStyle=null;this._map=kv._map;var T=bE();var e="udt="+T.udt+"&v="+T.ver;this.sizeRatio=this.ratio>1?2:1;this._binaryCache={};this._iconCache={};this._initColorCanvas()}e6.extend(hg.prototype,{_initColorCanvas:function(){var i=256,T=b3("canvas"),e=T.style;e.width=i+"px";e.height=i+"px";T.width=i;T.height=i;this._colorCvs=T;this._colorCtx=T.getContext("2d")},parseLabelData:function(i,kx,kw,kv,e,kA,kz){if(!this._featureStyle){this._featureStyle=this._canvas2dMapMgr.getStyle()}if(!i||!i[0]){kz([]);return}var ky=this._map.getZoomUnits();var T=this;this.loadTextPng(i,kA,kx,kw,kv,e,ky,kz)},loadTextPng:function(kM,kD,kB,kA,ky,i,kw,kv){var kL=this;var e=kM[5];var kK=this._map;var kH=kK.getZoom();var T=kK.getSize();var kI=T.width;var kG=T.height;var kJ=kK.getCenterIn();var kz=kJ.lng;var kx=kJ.lat;var kF=kB*kD*kw;var kE=(kA+1)*kD*kw;if(e){var kC=new Image();kC.onload=function(){kL.calcIconAndTextInfo(kM,kC,kD,kB,kA,ky,i,kw,kF,kE,kv);delete this.onload};kC.src=e}else{setTimeout(function(){kL.calcIconAndTextInfo(kM,null,kD,kB,kA,ky,i,kw,kF,kE,kv)},1)}},calcIconAndTextInfo:function(kO,kF,kG,kE,kB,kz,kv,kx,kI,kH,kw){var kN=this;var kM=kN._featureStyle;var kC=[];kC.x=kE;kC.y=kB;kC.z=kz;var kD=kN._canvas2dMapMgr,T=kE*kx*kG,kL=(kB+1)*kx*kG,ky={tileLeft:T,tileTop:kL,zoomUnits:kx};var e=[];if(kO[0]){for(var kJ=0;kJ<kO[0].length;kJ++){if(kO[0][kJ][0]===kt){e.push(kO[0][kJ])}}}var kA=kO[2]||[];for(var kJ=0;kJ<e.length;kJ++){this._getFixedLabelInfo(e[kJ],kF,kv,kx,kG,kI,kH,kC)}var kK=Math.pow(2,kv-kz);for(kJ=0;kJ<kA.length;kJ++){this._getLineLabelInfo(kA[kJ],kF,kz,kv,kx,kG,kI,kH,kK,kC)}kw(kC)},_getFixedLabelInfo:function(kF,kJ,kw,kA,kK,kN,kM,kP){var kE=kF[1];if(!kE){return}var kR=this._map.getZoom();var kZ=this._map.config.style;var k0=this._featureStyle;var kB=kw;if(kB===9){kB=8}for(var kW=0;kW<kE.length;kW++){var k1=kE[kW];var e=k1[0];var kv=a1.getStyleFromCache(kZ,e,"point",kB,k0);var kV=a1.getStyleFromCache(kZ,e,"pointText",kB,k0);if((!kV||kV.length===0)&&(!kv||kv.length===0)){if(kB===5){var kz=k1[1];if(!kz){continue}for(var kS=0;kS<kz.length;kS++){var kQ=kz[kS][4];if(kQ&&kQ[7]==="北京"){kv=a1.getStyleFromCache(kZ,e,"point",6,k0);kV=a1.getStyleFromCache(kZ,e,"pointText",6,k0);break}else{continue}}}else{continue}}var kz=k1[1];if(!kz){continue}var kX=null;var kC=1;var T=0;var kI=0;if(kv&&kv[0]){kv=kv[0];kX=kv.icon;kC=kv.zoom?kv.zoom/100:1}else{kv=null}for(var kS=0;kS<kz.length;kS++){var kQ=kz[kS][4];if(!kQ){continue}var kU=kQ[2];if(!this._isVisible(kU,kR)){continue}var kD=kQ[12];if(kV&&kV.length>0&&!kD){continue}var kH=Math.round(kQ[0]/100);var kG=Math.round(kQ[1]/100);var kT={lng:kN+kH,lat:kM-(kK*kA-kG)};var ky=kH/kA;var kx=kK-kG/kA;var kL=kQ[7]||"";var kY=kQ[5];var kO={type:"fixed",name:kL,textImg:kJ,rank:kQ[4],baseX:ky,baseY:kx,iconPos:null,textPos:null,guid:kQ[3]||"",tracer:kU,direction:kY,startScale:3};if((kY!==jn&&kD||!kD)&&kX!==null){kO.iconPos=this._getIconPosition(kX,kC,ky,kx,kT);if(kO.iconPos){T=kO.iconPos.width;kI=kO.iconPos.height}}if(T===0){kO.direction=jn}if(kD){kO.textPos=this._getTextDrawData(kQ,ky,kx,T,kI)}if(kO.textPos||kO.iconPos){kP.push(kO)}}}},_isVisible:function(e,i){var kv;if(!this._binaryCache[e]){kv=e.toString(2);if(kv.length<8){kv=new Array(8-kv.length+1).join("0")+kv}this._binaryCache[e]=kv}kv=this._binaryCache[e];var T=fq[i].start;return kv[i-T]==="1"},_getIconPosition:function(kz,kx,T,i,e){var kv=this._map.config.style;var kA=bD["iconSetInfo"+kv][kz];if(!kA){if(kz.charCodeAt(0)>=48&&kz.charCodeAt(0)<=57){kA=bD["iconSetInfo"+kv]["_"+kz]}}if(!kA){return null}var kw=kA[0];var ky=kA[1];kw=kw*kx;ky=ky*kx;return{srcX:0,srcY:0,destX:T-kw/2,destY:i-ky/2,width:kw,height:ky,geoX:e.lng,geoY:e.lat,mcPt:e,iconType:kz}},_getTextDrawData:function(kG,kF,kE,kv,kC){var kL=kG[5];if(typeof kL!=="number"){kL=0}var kA=this.ratio;var kz=kA/2;kv*=kz;kC*=kz;var kB=kG[12];var kw=kB.length;var kO=0;var kN=0;var kK=[];var kJ=0;var kM=0;for(var kI=0;kI<kw;kI++){kM+=Math.round(kB[kI][3])}for(var kI=0;kI<kw;kI++){var ky=kB[kI];var kx=ky[0];var i=ky[1];var T=ky[2];var e=ky[3];var kP=2*kA;var kH=0;if(kv!==0){kH=2*kA}if(kv===0){kL=jn}switch(kL){case gL:var kD=kE-kM/2-kP*(kw-1)/2;kO=kF-T-kv/2-kH;kN=kD+kJ+kP*kI;break;case ez:var kD=kE-kM/2-kP*(kw-1)/2;kO=kF+kv/2+kH;kN=kD+kJ+kP*kI;break;case N:var kD=kE-kC/2-kM-kP*(kw-1)-kP;kO=kF-T/2;kN=kD+kJ+kP*kI;break;case hJ:var kD=kE+kC/2+kP/2;kO=kF-T/2;kN=kD+kJ+kP*kI;break;case jn:var kD=kE-e/2-kP*(kw-1)/2;kO=kF-T/2;kN=kD+kJ+kP*kI;break}kJ+=e;if(T>0&&e>0){kK.push({srcX:kx,srcY:i,destX:kO,destY:kN,width:T,height:e})}}if(kK.length>0){return kK}return null},_getLineLabelInfo:function(kD,kv,kw,kS,k5,kK,kQ,kP,kR,kJ){if(kD.length!==10){return}var kU=this.ratio;var T=this.ratio;var k1=kD[7].length;var kL=kD[1];var k3=kD[3];var k9=kD[8];var kz=kD[4];var e=2;var kx=kz.slice(0,e);for(var k6=e;k6<kz.length;k6+=e){kx[k6]=kx[k6-e]+kz[k6];kx[k6+1]=kx[k6-(e-1)]+kz[k6+1]}for(var k6=e;k6<kz.length;k6+=e){if(k6%(k3*e)===0||k6%(k3*e)===1){continue}kx[k6]=kx[k6-e]+kz[k6]/kR;kx[k6+1]=kx[k6-(e-1)]+kz[k6+1]/kR}for(var k8=0;k8<k1;k8++){var k4=kD[7][k8];if(!this._isVisible(k4,kS)){continue}var kW=kD[6][k8];var kI=k8*k3*e;kz=kx.slice(kI,kI+k3*e);var kM=[];var kV=undefined;var kT=undefined;var kH=undefined;var kG=undefined;var k9=kD[9].slice(0);if(kW){k9.reverse()}var kZ;var kX;for(var k7=0;k7<k3;k7++){var kF=kD[5][k3*k8+k7];var k0=kz[k7*e]/100;var kY=kz[k7*e+1]/100;var kE=k9[k7];var kA=kE[0];var kC=kE[1];var ky=kE[2];var kB=kE[3];var kO;var kN;var lb;var la;if(k7===0){kZ=lb=k0/k5;kX=kK-kY/k5;la=kY/k5}else{lb=k0/k5;la=kY/k5}var ld=kZ+(lb-kZ)*T-ky/2;var lc=kX+(kK-la-kX)*T-kB/2;if(kV===undefined){kV=kZ-ky/2;kT=kX-kB/2;kH=kV+ky;kG=kT+kB}else{if(ld<kV){kV=ld}if(lc<kT){kT=lc}if(ld+ky>kH){kH=ld+ky}if(lc+kB>kG){kG=lc+kB}}kM.push({angle:kF,srcX:kA,srcY:kC,destX:ld,destY:lc,width:ky,height:kB})}var k2={type:"line",textImg:kv,rank:kL,baseX:kZ,baseY:kX,arrWordPos:kM,minXOriginal:kV,minYOriginal:kT,maxXOriginal:kH,maxYOriginal:kG,text:""};kJ.push(k2)}},alterColor:function(ky,e,kx){var T=this._colorCtx,i=this._canvas2dMapMgr;T.clearRect(0,0,ky.width,ky.height);T.drawImage(e,ky.srcX,ky.srcY,ky.width,ky.height,0,0,ky.width,ky.height);var kw=T.getImageData(0,0,ky.width,ky.height),kv=i.getFilterImageData(kw,kx);T.putImageData(kv,0,0)},drawIconAndText:function(kK,kJ,e){var kB=this.ratio;var kz=this.sizeRatio/kB;var kD=2/kB;var kV=this;for(var kN=0,kL=kJ.length;kN<kL;kN++){var kC=kJ[kN];if(kC.isDel==false){var kw=kC.baseDrawX;var kv=kC.baseDrawY;if(kC.type=="fixed"){var ky=kC.iconPos,kO=kC.textPos,kH=kC.textImg,kR=kC.startScale;if(ky&&kR<=e){var T=this._iconCache[ky.iconType];if(T){if(T.img){kK.drawImage(T.img,0,0,T.img.width,T.img.height,Math.round(kw*kB+(ky.drawX-kw)/kD),Math.round(kv*kB+(ky.drawY-kv)/kD),ky.width/kD,ky.height/kD)}else{T.drawLabels.push(kC)}}else{if(!T){this._iconCache[ky.iconType]={img:null,drawLabels:[kC]};var kX=new Image();kX._iconName=ky.iconType;kX.onload=function(){var k3=kV._iconCache[this._iconName];k3.img=this;this.onload=null;for(var kZ=0;kZ<k3.drawLabels.length;kZ++){var k1=k3.drawLabels[kZ];var k0=k1.baseDrawX;var kY=k1.baseDrawY;var k2=k1.iconPos;kK.drawImage(this,0,0,this.width,this.height,Math.round(k0*kB+(k2.drawX-k0)/kD),Math.round(kY*kB+(k2.drawY-kY)/kD),k2.width/kD,k2.height/kD)}k3.drawPos=[]};kX.src=C.getIconSetPath(kV._map.config.style)+ky.iconType+".png"}}}if(kO&&kH&&kR<=e){for(var kA=0;kA<kO.length;kA++){var kI=kO[kA];if(!kC._tempRank){kK.drawImage(kH,kI.srcX,kI.srcY,kI.width,kI.height,Math.round(kw*kB+(kI.drawX-kw)/kz),Math.round(kv*kB+(kI.drawY-kv)/kz),kI.width/kz,kI.height/kz)}else{this.alterColor(kI,kH,kC._tempRank);kK.drawImage(this._colorCvs,0,0,kI.width,kI.height,Math.round(kw*kB+(kI.drawX-kw)/kz),Math.round(kv*kB+(kI.drawY-kv)/kz),kI.width/kz,kI.height/kz)}}}}else{var kx=kC.arrWordPos,kH=kC.textImg,kG=kC.tileX,kE=kC.tileY;for(var kM=0,kF=kx.length;kM<kF;kM++){var kP=kx[kM];var kW=Math.round(kG+kP.destX);var kU=Math.round(kE+kP.destY);var kQ=kP.angle;kW=kw*kB+kW-kw;kU=kv*kB+kU-kv;if(kQ>10&&kQ<350){kK.save();var kT=Math.round(kW+kP.width/2);var kS=Math.round(kU+kP.height/2);kK.translate(kT,kS);kK.rotate(-kQ/180*Math.PI);kK.drawImage(kH,kP.srcX,kP.srcY,kP.width,kP.height,-Math.round(kP.width/2),-Math.round(kP.height/2),kP.width/kz,kP.height/kz);kK.restore()}else{kK.drawImage(kH,kP.srcX,kP.srcY,kP.width,kP.height,kW,kU,kP.width/kz,kP.height/kz)}}}}}},isCollide:function(kx,kG,kF,e,kz,T,kB){for(var kw=0,kv=T.length;kw<kv;kw++){var kA=T[kw],ky=1/Math.pow(2,kB+1),kE=ky*kA[3]/2,kD=ky*kA[4]/2,kC=kA[0];if(kC!=kx){if(!(kG+e<kA[1]-kE||kG>kA[1]+kA[3]+kE||kF+kz<kA[2]-kD||kF>kA[2]+kA[4]+kD)){return true}}}return false},zoomingIconAndText:function(kV,kP,kv,kT,kU,ln,k2,kD,k8,k1,kM){var lo=this.ratio;var kE=this.sizeRatio/lo;var lp=2/lo;var lz=lo/2;var li=kT.x;var lh=kT.y;var kW=2*lo;if(kM!==0){lh+=k1}var kH=undefined,kA=undefined,kx=undefined,kC=undefined,kL=undefined;var k7=ln>0?true:false;if(!k7){kH=[];var lb=1-k2}for(var lv=0,lt=kP.length;lv<lt;lv++){var lq=kP[lv];if(lq.isDel==false){var lA=lq.baseDrawX;var lx=lq.baseDrawY;kV.save();kV.translate(-kD*lo,-k8*lo);if(lq.isFadeout){if(!k7&&lq._schedule<=k2&&!lq._isIgnore){kV.globalAlpha=lb;lq._schedule=k2}else{lq._isIgnore=true;continue}}if(lq.type=="fixed"){var kX=lq.iconPos,k4=lq.textPos,ky=lq.textImg,kY=lq.startScale;var T;var lf=0;if(kX){lf=kW}if(kX&&!lq.iconImg&&this._iconCache[kX.iconType]){T=this._iconCache[kX.iconType].img}if(kX&&kY<=kU&&T){kC=kX.width;kL=kX.height;kA=(li+(lA-li)*kv)*lo-kC/2/lp;kx=(lh+(lx-lh)*kv)*lo-kL/2/lp+kM;if(!k7&&this.isCollide(lv,kA,kx,kC,kL,kH,ln)){lq.isFadeout=true}kV.drawImage(T,kX.srcX,kX.srcY,T.width,T.height,Math.round(kA),Math.round(kx),kC/lp,kL/lp);!k7&&kH.push([lv,kA,kx,kC,kL])}if(k4&&ky&&kY<=kU){var k3;var k5;var kO=0;var k0=0;if(kX){kO=kX.width;k0=kX.height}var lg=k4.length;var kG=0;var k6=0;for(var kQ=0;kQ<lg;kQ++){var ls=k4[kQ];k6+=ls.height;if(kG<ls.width){kG=ls.width}}k6+=(kQ-1)*kW;if(!k7&&this.isCollide(lv,kA,kx,kG,k6,kH,ln)){lq.isFadeout=true}var lr=0;for(var kQ=0;kQ<lg;kQ++){var ls=k4[kQ];switch(lq.direction){case gL:k3=-(kO/2/lp+ls.width+lf);k5=-k6/2+lr+kW*kQ;break;case ez:k3=kO/2/lp+lf;k5=-k6/2+lr+kW*kQ;break;case N:k3=-ls.width/2;k5=-k0/2/lp-k6+lr-kW*(kQ+1);break;case hJ:k3=-ls.width/2;k5=k0/2/lp+lr+kW*(kQ+1);break;case jn:k3=-ls.width/2;k5=-k6/2+lr+kW*kQ;break}lr+=ls.height;kA=(li+(lA-li)*kv)*lo+k3/kE;kx=(lh+(lx-lh)*kv)*lo+k5/kE;+kM;kC=ls.width;kL=ls.height;if(!lq._tempRank){kV.drawImage(ky,ls.srcX,ls.srcY,kC,kL,Math.round(kA),Math.round(kx),kC/kE,kL/kE)}else{this.alterColor(ls,ky,lq._tempRank);kV.drawImage(this._colorCvs,0,0,kC,kL,Math.round(kA),Math.round(kx),kC/kE,kL/kE)}!k7&&kH.push([lv,kA,kx,kC,kL])}}}else{var kN=lq.arrWordPos,ky=lq.textImg,ly=lq.tileX,lw=lq.tileY;var kF=kN[0];var kB=Math.round(ly+kF.destX);var kz=Math.round(lw+kF.destY);for(var lu=0,le=kN.length;lu<le;lu++){var lm=kN[lu];var lC=Math.round(ly+lm.destX);var lB=Math.round(lw+lm.destY);var kS=lm.angle;var ld=Math.round((li+(lA-li)*kv)*lo-kF.width/2+lC-kB);var lc=Math.round((lh+(lx-lh)*kv)*lo-kF.height/2+lB-kz);kA=ld;kx=lc;kC=lm.width;kL=lm.height;if(!k7&&this.isCollide(lv,kA,kx,kC,kL,kH,ln)){lq.isFadeout=true}if(kS>10&&kS<350){var lk=ld+lm.width/2;var lj=lc+lm.height/2;var kw=kS/180*Math.PI;var kZ=Math.cos(kw);var kI=Math.sin(kw);var la=kZ;var kJ=kZ;var k9=kI;var kK=-kI;var kR=lk-lk*kZ-lj*kI;var e=lj+lk*kI-lj*kZ;kV.save();kV.transform(la,kK,k9,kJ,kR,e);kV.drawImage(ky,lm.srcX,lm.srcY,kC,kL,kA,kx,kC/kE,kL/kE);kV.restore()}else{kV.drawImage(ky,lm.srcX,lm.srcY,kC,kL,kA,kx,kC/kE,kL/kE)}!k7&&kH.push([lv,kA,kx,kC,kL])}}kV.restore()}}}});function eA(e){this.initVars(e)}e6.extend(eA.prototype,{initVars:function(e){this._map=e._map;this._canvas2dMapMgr=e;this.base64Prefix="data:image/png;base64,";this.bizData=null;this.objTextsPng=null;this.arrIconsPng=null;this.bizLabels=null},proecessBizData:function(kx,kB){var kz=this;this.bizData=kx;this.objTextsPng=null;this.arrIconsPng=null;var T=kx.textsPng;var kD=kx.iconsPng;if(!T||!kD){return}var kA=new Image();kA.onload=function(){kz.objTextsPng=this;kz.calcIconAndTextInfo(kB);this.onload=null};kA.src=this.base64Prefix+T;var kC=kD.length;var e=[];for(var kw=0;kw<kC;kw++){var ky=kD[kw];var kv=new Image();(function(i){kv.onload=function(){kC--;e[i]=this;if(kC===0){kz.arrIconsPng=e;kz.calcIconAndTextInfo(kB)}this.onload=null}})(kw);kv.src=this.base64Prefix+ky}},calcIconAndTextInfo:function(kE){if(this.objTextsPng&&this.arrIconsPng){var kA=this.bizData;var ky=kA.pois;var e=[];for(var kB=0,kx=ky.length;kB<kx;kB++){var kv=ky[kB];var kz=this.arrIconsPng[kv.iconPng];var kw=kz.height/2;var kD={type:"fixed",name:"",textImg:this.objTextsPng,iconImg:kz,rank:kv.rank,iconPos:{srcX:0,srcY:0,destX:-kz.width/2,destY:-kw/2,width:kz.width,height:kw,geoX:kv.x,geoY:kv.y,iconType:"vectorCustom"},textPos:this.calcTextPos(kv.pos,kz),startScale:kv.from<12?12:kv.from,guid:kv.guid,guidExt:1,adver_log:kv.adver_log||""};var T={type:"fixed",textDirLeft:"left",name:"",textImg:this.objTextsPng,iconImg:kz,rank:kv.rank,iconPos:{srcX:0,srcY:0,destX:-kz.width/2,destY:-kw/2,width:kz.width,height:kw,geoX:kv.x,geoY:kv.y,iconType:"vectorCustom"},textPos:this.calcTextPosLeft(kv.pos,kz),startScale:kv.from<12?12:kv.from,guid:kv.guid,guidExt:1,adver_log:kv.adver_log||""};var kC=[kD,T];e.push(kC)}this.bizLabels=e;kE&&kE()}},calcTextPos:function(ky,T){var i=[];var kx=ky.length/4;var kw=T.width/2;if(kx===1){var kv={srcX:ky[0],srcY:ky[1],destX:kw,destY:-ky[3]/2,width:ky[2],height:ky[3]};i.push(kv)}else{var kv={srcX:ky[0],srcY:ky[1],destX:kw,destY:-ky[3],width:ky[2],height:ky[3]};var e={srcX:ky[4],srcY:ky[5],destX:kw,destY:0,width:ky[6],height:ky[7]};i.push(kv);i.push(e)}return i},calcTextPosLeft:function(ky,T){var i=[];var kx=ky.length/4;var kw=T.width/2;if(kx===1){var kv={srcX:ky[0],srcY:ky[1],destX:-kw-ky[2],destY:-ky[3]/2,width:ky[2],height:ky[3]};i.push(kv)}else{var kv={srcX:ky[0],srcY:ky[1],destX:-kw-ky[2],destY:-ky[3],width:ky[2],height:ky[3]};var e={srcX:ky[4],srcY:ky[5],destX:-kw-ky[2],destY:0,width:ky[6],height:ky[7]};i.push(kv);i.push(e)}return i},clearBizData:function(){this.bizData=null;this.bizLabels=null}});var jQ={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Float32:"FLOAT"};var ik={Int8:1,Uint8:1,Int16:2,Uint16:2,Float32:4};function w(kv,kx,T,kw){this.arrayBuffer=kv;this.attributes=kx.members;this.bytesPerElement=0;if(this.attributes){for(var e=0;e<this.attributes.length;e++){this.bytesPerElement+=ik[this.attributes[e].type]*this.attributes[e].components}}else{this.bytesPerElement=kv.BYTES_PER_ELEMENT*kx.components}this.length=kw||kv.byteLength/this.bytesPerElement;this.type=T;this.arrayType=kx}w.prototype.bind=function(i){var e=i[this.type];if(!this.buffer){this.buffer=i.createBuffer();i.bindBuffer(e,this.buffer);i.bufferData(e,this.arrayBuffer,i.STATIC_DRAW);this.arrayBuffer=null}else{i.bindBuffer(e,this.buffer)}};w.prototype.setVertexAttribPointers=function(kv,e){for(var i=0;i<this.attributes.length;i++){var kw=this.attributes[i];var T=e.attributes[kw.name];kv.vertexAttribPointer(T,kw.components,kv[jQ[kw.type]],kw.normalize,this.bytesPerElement,kw.offset)}};w.prototype.updateVertexData=function(kv,i,T){this.arrayBuffer=i;if(!this.buffer){return this.bind(kv)}if(T<=this.length){var e=kv[this.type];kv.bindBuffer(e,this.buffer);kv.bufferData(e,this.arrayBuffer,kv.STATIC_DRAW)}else{this.destroy(kv);this.bind(kv)}this.length=T};w.prototype.destroy=function(e){if(this.buffer){e.deleteBuffer(this.buffer);this.buffer=null}};w.BufferType={VERTEX:"ARRAY_BUFFER",ELEMENT:"ELEMENT_ARRAY_BUFFER"};w.ELEMENT_ATTRIBUTE_TYPE="Uint16";w.VERTEX_ATTRIBUTE_ALIGNMENT=4;function dV(){this.boundProgram=null;this.boundVertexBuffer=null;this.boundElementBuffer=null;this.vao=null}dV.prototype.bind=function(kz,e,kv,ky){var kw=kz.extVertexArrayObject;if(kw===undefined){kw=kz.extVertexArrayObject=kz.getExtension("OES_vertex_array_object")}if(kw){if(!this.vao){this.vao=kw.createVertexArrayOES()}kw.bindVertexArrayOES(this.vao)}else{}if(!this.boundProgram){var kA=kw?0:(kz.currentNumAttributes||0);var kx=e.numAttributes;var T;for(T=kA;T<kx;T++){kz.enableVertexAttribArray(T)}if(!kw){for(T=kx;T<kA;T++){kz.disableVertexAttribArray(T)}kz.currentNumAttributes=kx}kv.bind(kz);kv.setVertexAttribPointers(kz,e);if(ky){ky.bind(kz)}if(kw){this.boundProgram=e;this.boundVertexBuffer=kv;this.boundElementBuffer=ky}}};dV.prototype.update=function(kz,kv,T,ky,e,i,kx){var kw=kz.extVertexArrayObject;if(kw===undefined){kw=kz.extVertexArrayObject=kz.getExtension("OES_vertex_array_object")}if(kw){kw.bindVertexArrayOES(this.vao);if(this.boundVertexBuffer){this.boundVertexBuffer.updateVertexData(kz,T,ky);this.boundVertexBuffer.setVertexAttribPointers(kz,this.boundProgram)}if(e&&this.boundElementBuffer){this.boundElementBuffer.updateVertexData(kz,i,kx)}}else{kv.updateVertexData(kz,T,ky);if(e){e.updateVertexData(kz,i,kx)}}};dV.prototype.unbind=function(i){var e=i.extVertexArrayObject;if(e){e.bindVertexArrayOES(null);this.boundProgram=null;this.boundVertexBuffer=null;this.boundElementBuffer=null}};dV.prototype.destroy=function(i){var e=i.extVertexArrayObject;if(e&&this.vao){e.deleteVertexArrayOES(this.vao);this.vao=null;this.boundProgram=null;this.boundVertexBuffer=null;this.boundElementBuffer=null}};function D(){}e6.extend(D.prototype,{centerAndZoomIn:function(T,kB,kC){kC=kC||{};if(!this.loaded){this.firstTileLoad=false}kB=this._getProperZoom(kB).zoom;if(kC.noAnimation!==true&&this.loaded){var kx=this._ifUseAnimation(T,kB);if(kx){this.flyToIn(T,kB,kC);return}}var kz=this;if(!T&&!kB){return}this._stopAllAnimations();if(T&&!T.equals(this.centerPoint)){this.fire(new fS("oncenter_changed"))}if(kB&&kB!==this.zoomLevel){this.fire(new fS("onzoom_changed"))}T=T||this.centerPoint;kB=kB||this.zoomLevel;kB=this._getProperZoom(kB).zoom;if(this.mapType===BMAP_EARTH_MAP){if(!this._earth){this.mapType=BMAPGL_NORMAL_MAP;this.temp.originMapType=BMAP_EARTH_MAP;function kA(){kz._earth=new bD.Earth(kz,{showRealSunlight:kz.config.showRealSunlight,showMilkyway:kz.config.showMilkyway,earthBackground:kz.config.earthBackground});kz._proxyEarthEvents();kz._changeEarthMapType(BMAP_EARTH_MAP);e6.extend(kz,bD.EarthView.prototype);delete kz.temp.originMapType}hh.load("earth",function(){if(bD["FeatureStyle"+kz.config.style]){kA()}else{kz.loadMapStyleFiles(function(){kA()})}})}}this.lastLevel=this.zoomLevel||kB;this.zoomLevel=kB;var ky=new fS("onload");ky.point=T;ky.zoom=kB;this.centerPoint=new cD(T.lng,T.lat);this.defaultZoomLevel=this.defaultZoomLevel||this.zoomLevel;this.defaultCenter=this.defaultCenter||this.centerPoint;if(this.mapType!==BMAP_EARTH_MAP){this.centerPoint=this.restrictCenter(this.centerPoint)}if(!this.loaded&&!(this.temp.originMapType===BMAP_EARTH_MAP)){var i=this.config.defaultMaxBounds;var kw=new m(i,"baidu",this.mapType);if(this.mapType!==BMAP_NONE_MAP){var kv=new hK({mapType:this.mapType,copyright:kw,dataType:this.mapType===BMAP_SATELLITE_MAP?gS:hY,customLayer:this.mapType===BMAP_SATELLITE_MAP,baseLayer:true,transparentPng:false,tileTypeName:this.mapType===BMAP_SATELLITE_MAP?"web":"na"});kv._isInnerLayer=true;this.addTileLayer(kv);this.baseLayerAdded=true}if(this.mapType===BMAP_NONE_MAP){hL.sendMessage(aZ(4,3,15),["layer","blank"])}else{if(this.mapType===BMAP_SATELLITE_MAP){hL.sendMessage(aZ(4,3,2),["layer","raster"])}else{hL.sendMessage(aZ(4,3,1,1),["layer","vector","normal"])}}if(this.mapType===BMAP_SATELLITE_MAP&&this.config.showVectorStreetLayer){this._addHybirdVectorMap()}else{if(this.mapType===BMAP_SATELLITE_MAP&&this._isHybridShow===true){this._addHybirdMap()}}this.on("zoom_changed",function(){if(this._heading===0){return}if(this.getZoom()<7&&this.config.restrictCenter===true){kz.resetHeading()}})}this.loaded=true;this.dispatchEvent(ky);kC.callback&&kC.callback()},_ifUseAnimation:function(kv,kA){var kz=this.getSize();var T={zoom:this.zoomLevel};var kC={zoom:kA};var kB=this.pointToPixelIn(this.centerPoint);var kw=this.pointToPixelIn(kv,T);var ky=this.pointToPixelIn(this.centerPoint,kC);var kE=this.pointToPixelIn(kv,kC);var kx=Math.abs(kB.x-kw.x);var i=Math.abs(kB.y-kw.y);var e=Math.abs(ky.x-kE.x);var kD=Math.abs(ky.y-kE.y);if((kx>kz.width||i>kz.height)&&(e>kz.width||kD>kz.height)){return false}return true},_setPlatformPosition:function(kC,kB,kE){kE=kE||{};if(kC===0&&kB===0&&!kE.point){return}if(isNaN(kE.initMapOffsetX)){kE.initMapOffsetX=this.offsetX}if(isNaN(kE.initMapOffsetY)){kE.initMapOffsetY=this.offsetY}var ky=iS(this._heading);if(this._tilt>0){kB=kB/Math.cos(iS(this._tilt))}var kD=kC*Math.cos(ky)+kB*Math.sin(ky);var kA=-kC*Math.sin(ky)+kB*Math.cos(ky);kD=kD+kE.initMapOffsetX;kA=kA+kE.initMapOffsetY;if(kE.point){var i=this.restrictCenter(kE.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new fS("oncenter_changed"))}}else{var kv=this.offsetX-kD;var e=this.offsetY-kA;var kz=this.centerPoint.lng;var kx=this.centerPoint.lat;var kw=new cD(kz,kx);var T=this.getZoomUnits();this.centerPoint=this.restrictCenter(new cD(kw.lng+kv*T,kw.lat-e*T),T);this.fire(new fS("oncenter_changed"))}this.offsetX=kD;this.offsetY=kA;this.dispatchEvent(new fS("onmoving"))},restrictCenter:function(kD,e){if(this.config.restrictCenter===false){return kD}e=e||this.getZoomUnits();var kB=this.pixelToPointIn(new fr(this.width,0),{center:kD});var ky=this.pixelToPointIn(new fr(0,this.height),{center:kD});var kE=kD.lng;var kJ=kD.lat;if(!!this.config.restrictBounds&&!this.config.restrictBounds.isEmpty()){var kI=this.config.restrictBounds;var T=kI.getSouthWest();var kG=kI.getNorthEast();var kC=jr.convertLL2MC(T);var kw=jr.convertLL2MC(kG);var kz=this.calcNewZoomByRestriction(kE,kJ,ky,kB,kC.lng,kw.lng,kC.lat,kw.lat);if(kz>this.zoomLevel){this.zoomLevel=kz;return kD}kD.lng=this.calcNewLngByBounds(kE,ky,kB,kC.lng,kw.lng,e);kD.lat=this.calcNewLatByBounds(kJ,ky,kB,kC.lat,kw.lat,e);return kD}var kA=this.pixelToPointIn(new fr(0,0),{center:kD});var kv=this.pixelToPointIn(new fr(0,this.height),{center:kD});if(this.zoomLevel<5){if(kA.lat>h0.MAX_LAT&&kv.lat<h0.MIN_LAT){var i=h0.MAX_LAT-kD.lat;var kx=kD.lat-h0.MIN_LAT;var kH;if(i<kx){kH=i/(this.height/2)}else{kH=kx/(this.height/2)}var kF=18-p(kH);this.zoomLevel=kF;return kD}}if(kA.lat>h0.MAX_LAT){kD.lat=h0.MAX_LAT-this.height/2*e}else{if(kv.lat<h0.MIN_LAT){kD.lat=h0.MIN_LAT+this.height/2*e}}return kD},calcNewZoomByRestriction:function(kC,kB,e,kA,kw,ky,kv,kx){var kF=0;var kG=0;if(typeof kv==="number"&&typeof kx==="number"&&kA.lat>kx&&e.lat<kv){var T=kx-kB;var i=kB-kv;var kz;if(T<i){kz=T/(this.height/2)}else{kz=i/(this.height/2)}kF=18-p(kz)}if(typeof kw==="number"&&typeof ky==="number"&&kA.lng>ky&&e.lng<kw){var kE=ky-kC;var kD=kC-kw;var kz;if(kE<kD){kz=kE/(this.width/2)}else{kz=kD/(this.width/2)}kG=18-p(kz)}return Math.max(kF,kG)||this.zoomLevel},calcNewLatByBounds:function(i,kv,T,ky,kx,e){var kw=i;if(T.lat>kx){kw=kx-this.height/2*e}else{if(kv.lat<ky){kw=ky+this.height/2*e}}return kw},calcNewLngByBounds:function(ky,kx,kv,kw,T,e){var i=ky;if(kv.lng>T){i=T-this.width/2*e}else{if(kx.lng<kw){i=kw+this.width/2*e}}return i},zoomTo:function(e,kH,kI){var kD=es[this.mapType];if(!kD){return}var kC=this._getProperZoom(e);e=kC.zoom;if(this.zoomLevel===e){kI&&kI.callback&&kI.callback();return}var kx=e;this.lastLevel=this.zoomLevel;kI=kI||{};if(this.zoomEventStatus==="idle"){this.fire(new fS("onzoomstart"));this.zoomEventStatus="zooming"}if(!kH&&(this.getInfoWindow()&&this.temp.infoWin&&this.temp.infoWin.isOpen())){kH=jr.convertLL2MC(this.getInfoWindow().getPoint())}var T=null;if(kI.fixPixel){T=kI.fixPixel}else{if(kH){T=this.pointToPixelIn(kH,{useRound:false})}}var ky=this.pixelToPointIn(T);var kz=this.centerPoint.clone();this.fixPoint=kH;this.fixPixel=T;this.fixCenter=kz;this.mousePosMCPoint=ky;if(kI.noAnimation){e=kC.zoom;this.zoomLevel=e;this.fire(new fS("onzoom_changed"));var kw=this.getCurrentMaxTilt();if(this._tilt>kw){this._tilt=kw}if(kH){if(this._heading%360!==0||this._tilt>0){var i=this._webglMapCamera.fromScreenPixelToMC(T.x,T.y,{center:kz,zoom:this.zoomLevel});if(i){var kE=i.sub(ky);var kv=kz.sub(kE);this.centerPoint=this.restrictCenter(kv)}}else{var kB=this.getZoomUnits();var kv=new cD(kH.lng-kB*(T.x-this.width/2),kH.lat+kB*(T.y-this.height/2));this.centerPoint=this.restrictCenter(kv,kB)}this.fire(new fS("oncenter_changed"))}this._checkFireZoomend();kI.callback&&kI.callback();return}this._animationInfo.zoom={current:this.zoomLevel,diff:e-this.zoomLevel,target:e};var kF=this;var kG=this._tilt;if(this.fixPoint||kG>h0.MAX_DRAG_TILT_L2){kI.renderCallback=function(){var kM=kF.getCurrentMaxTilt();if(kF._tilt>kM){kF._tilt=kM}var kN=kF.fixPixel;if(!kF.fixPixel||!kF.fixPoint){return}var kJ=kF.fixPixel;var kT=kF.fixPoint;var kQ=kF.fixCenter;var kO=kF.mousePosMCPoint;if(kF._heading%360!==0||kF._tilt>0){var kK=kF._webglMapCamera.fromScreenPixelToMC(kJ.x,kJ.y,{center:kQ,zoom:kF.zoomLevel,tilt:kF._tilt});if(kK){var kS=kK.sub(kO);var kL=kQ.sub(kS);kF.centerPoint=kF.restrictCenter(kL)}}else{var kP=kJ;var kR=kF.getZoomUnits();var kL=new cD(kT.lng-kR*(kP.x-kF.width/2),kT.lat+kR*(kP.y-kF.height/2));kF.centerPoint=kF.restrictCenter(kL,kR)}kF.fire(new fS("oncenter_changed"))}}if(kI.fromMouseWheel===true){this._startInfiniteZoomAnimation(kI);kI.callback&&kI.callback();kF._checkFireZoomend();return}if(!kI.callback){kI.callback=function(){kF._checkFireZoomend()}}else{var kA=kI.callback;kI.callback=function(kJ,kK){kA(kJ,kK);kF._checkFireZoomend()}}this._startAnimation(kI)},_checkFireZoomend:function(){var e=this;if(e.fireZoomendTimer){clearTimeout(e.fireZoomendTimer)}e.fireZoomendTimer=setTimeout(function(){if(e.zoomEventStatus==="zooming"){e.fire(new fS("onzoomend"));e.zoomEventStatus="idle"}e.fireZoomendTimer=null},150)},deepZoomMedia:function(e){var i=this;if(!i.temp.isStdCtrlBusy){i.temp.isStdCtrlBusy=true;i.deepZoomTo(i.zoomLevel+e);setTimeout(function(){i.temp.isStdCtrlBusy=false},400)}},deepZoomTo:function(e){this.zoomTo(e)},flyToIn:function(T,kZ,kK){kK=kK||{};var kw=this._getProperZoom(kZ);kZ=kw.zoom;if(this.centerPoint.equals(T)&&this.zoomLevel===kZ&&typeof kK.heading!=="number"&&typeof kK.tilt!=="number"){return}var e=this.getHeading()%360;var kC=this.getTilt();var kI=0;var kM=0;var kF=this.getBounds().containsPoint(T);if(typeof kK.heading==="number"){kI=kK.heading}else{if(kF){kI=e}}if(typeof kK.tilt==="number"){kM=kK.tilt}else{if(kF){kM=kC}}this._heading=e;var kW=kI-e;var kS=kM-kC;var kG=this;var ky=this.zoomLevel;var kz=1.42;var kO=this.zoomScale(kZ-ky);var k1=this.getZoomUnits();var kE=this.centerPoint.div(k1);var k2=T.div(k1);var kV=this.worldSize();var kR=kz;var kQ=Math.max(this.width,this.height);var kP=kQ/kO;var kD=k2.sub(kE).mag();var i=kR*kR;function kY(k4){var k3=(kP*kP-kQ*kQ+(k4?-1:1)*i*i*kD*kD)/(2*(k4?kP:kQ)*i*kD);return Math.log(Math.sqrt(k3*k3+1)-k3)}function kv(k3){return(Math.exp(k3)-Math.exp(-k3))/2}function kA(k3){return(Math.exp(k3)+Math.exp(-k3))/2}function kJ(k3){return kv(k3)/kA(k3)}var kB=kY(0);var kT=function(k3){return(kA(kB)/kA(kB+kR*k3))};var kU=function(k3){return kQ*((kA(kB)*kJ(kB+kR*k3)-kv(kB))/i)/kD};var kx=(kY(1)-kB)/kR;if(Math.abs(kD)<0.000001||kx===Infinity||isNaN(kx)){if(Math.abs(kQ-kP)<0.000001){this._animationInfo.zoom={current:this.zoomLevel,diff:kZ-this.zoomLevel};this._animationInfo.center={current:this.centerPoint,diff:T.sub(this.centerPoint)};this._animationInfo.heading={current:e,diff:kI-e};this._animationInfo.tilt={current:kC,diff:kM-kC};this.setLock(true);this._startAnimation({callback:function(k3){kG.setLock(false);if(kK.callback){kK.callback(k3)}},duration:kK.duration});return}var k0=kP<kQ?-1:1;kx=Math.abs(Math.log(kP/kQ))/kR;kU=function(){return 0};kT=function(k3){return Math.exp(k0*kR*k3)}}var kX=1.7;if(kx<0.3){kX=0.8}else{if(kx>5){kX=(kx-5)/2+kX}}var kL=kK.duration||1000*kx/kX;if(isNaN(kL)){var kN={};for(var kH in kK){kN[kH]=kK[kH];kN.noAnimation=true}this.centerAndZoomIn(T,kZ,kN);return}this.fire(new fS("onmovestart"));this.fire(new fS("onzoomstart"));this.setLock(true);this._startAnimation({duration:kL,renderCallback:function(k3,k4){var k5=k3*kx;var k8=kU(k5);var k7=ky+kG.scaleZoom(1/kT(k5));if(k7<kG.getMinZoom()){k7=kG.getMinZoom()}if(k7>kG.getMaxZoom()){k7=kG.getMaxZoom()}if(k7!==kG.zoomLevel){kG.zoomLevel=k7;kG.fire(new fS("onzoom_changed"))}kG.centerPoint=kE.add(k2.sub(kE).mult(k8)).mult(k1);kG.fire(new fS("oncenter_changed"));if(typeof kI==="number"){var k6=k3/0.7;if(k6>1){k6=1}kG.setHeading(e+kW*k3,{noAnimation:true})}if(typeof kM==="number"){kG.setTilt(kC+kS*k3,{noAnimation:true})}},callback:function(k3,k4){kG.setLock(false);if(k4&&k4.stop===true){kG.fire(new fS("onmoveend"));kG.fire(new fS("onzoomend"));kK.callback&&kK.callback(k3);return}if(kZ!==kG.zoomLevel){kG.zoomLevel=kZ;kG.fire(new fS("onzoom_changed"))}kG.fire(new fS("onmoveend"));kG.fire(new fS("onzoomend"));kK.callback&&kK.callback(k3)}})},zoomScale:function(e){return Math.pow(2,e)},scaleZoom:function(e){return Math.log(e)/Math.LN2},panToIn:function(i,T){T=T||{};if(!i||i.equals(this.centerPoint)){T.callback&&T.callback();return}var kv=this.pointToPixelIn(i);var e=Math.round(this.width/2);var kx=Math.round(this.height/2);var kw=this._ifUseAnimation(i,this.zoomLevel);if(T.noAnimation===true||kw===false){this._stopAllAnimations();this._panToIn(e-kv.x,kx-kv.y,i);T.callback&&T.callback();return}this.flyToIn(i,this.zoomLevel,T)},_panToIn:function(i,e,kv){var T=this.temp;if(T.operating===true){return}if(T.dragAni){T.dragAni.stop(false,{readyToMove:true});T.dragAni=null}this.dispatchEvent(new fS("onmovestart"));this._setPlatformPosition(i,e,{point:kv});this.dispatchEvent(new fS("onmoveend"))},_stopAllAnimations:function(e){e=e||{};if(this._ani){this._ani.stop(!!e.goToEnd,{stopCurrentAnimation:e.stopCurrentAnimation});this._ani=null}if(this._infiniteAni){this._infiniteAni.stop();this._infiniteAni=null}},panBy:function(i,e,T){i=Math.round(i)||0;e=Math.round(e)||0;T=T||{};if(Math.abs(i)<=this.width&&Math.abs(e)<=this.height&&T.noAnimation!==true){this._panBy(i,e,T)}else{this._panToIn(i,e,T.point);T.callback&&T.callback()}},_panBy:function(i,e,kw){if(this.temp.operating===true){return}kw=kw||{};this.dispatchEvent(new fS("onmovestart"));var kv=this;var T=kv.temp;T.pl=kv.offsetX;T.pt=kv.offsetY;if(T.tlPan){T.tlPan.cancel()}if(T.dragAni){T.dragAni.stop(false,{readyToMove:true});T.dragAni=null}T.tlPan=new fH({fps:kw.fps||kv.config.fps,duration:kw.duration||kv.config.actionDuration,transition:kw.transition||gN.easeInOutQuad,render:function(kx){this.terminative=kv.temp.operating;if(kv.temp.operating){return}kv._setPlatformPosition(i*kx,e*kx,{initMapOffsetX:T.pl,initMapOffsetY:T.pt})},finish:function(kx){kv.dispatchEvent(new fS("onmoveend"));kv.temp.tlPan=false;if(kv.temp.stopArrow===true){kv.temp.stopArrow=false;if(kv.temp.arrow!==0){kv._arrow()}}}})},_startAnimation:function(i){var kw=this._animationInfo;var T=this;i=i||{};if(T._ani){T._ani.stop(!!i.goToEnd,{stopCurrentAnimation:i.stopCurrentAnimation})}if(T._infiniteAni){T._infiniteAni.stop();T._infiniteAni=null}var kx=i.duration||500;var ky=i.transition||gN.ease;var e=new fS("onanimation_start");this.fire(e);if(i.unstopable){kw=this._animationInfoUnstopable}var kv=new fH({duration:kx,transition:ky,render:function(kB,kA){for(var kz in kw){if(!kw.hasOwnProperty(kz)){continue}var kD=kw[kz].current;var kC=kw[kz].diff;T._setValueTick(kz,kD,kC,kB)}if(i.renderCallback){i.renderCallback(kB,kA)}},finish:function(kz){T.fire(new fS("onanimation_end"));if(i.unstopable){T._animationInfoUnstopable={};T._unstopableAni=null}else{T._ani=null;T._animationInfo={}}if(i.mapNeedCbk){i.mapNeedCbk()}if(i.callback){i.callback(kz)}},onStop:function(kz){kz=kz||{};T.fire(new fS("onanimation_end"));if(kz.stopCurrentAnimation){T._animationInfo={}}T._ani=null;if(i.mapNeedCbk){i.mapNeedCbk()}if(i.callback){i.callback(null,{stop:true})}}});if(i.unstopable){T._unstopableAni=kv}else{T._ani=kv}},_startInfiniteZoomAnimation:function(e){var i=this;if(i._ani){i._ani.stop(!!e.goToEnd,{stopCurrentAnimation:e.stopCurrentAnimation})}if(i._infiniteAni){return}this.fire(new fS("onanimation_start"));i._infiniteAni=new fH({duration:10000,transition:gN.linear,render:function(){var T=i._animationInfo.zoom;if(Math.abs(T.current-T.target)<0.001){i._setValue("zoom",T.target);i._infiniteAni&&i._infiniteAni.stop();return}T.current+=(T.target-T.current)*0.35;i._setValue("zoom",T.current);if(e.renderCallback){e.renderCallback()}},finish:function(){i._infiniteAni=null;i._animationInfo={};i.fire(new fS("onanimation_end"));if(e.callback){e.callback()}},onStop:function(){i._infiniteAni=null;i._animationInfo={};i.fire(new fS("onanimation_end"));if(e.callback){e.callback()}}})},_setValue:function(e,T){if(e==="zoom"){this._preZoomLevel=this.zoomLevel;var i=this._getProperZoom(T);T=i.zoom;if(T!==this.zoomLevel){this.zoomLevel=T;if(T<5){this.restrictCenter(this.centerPoint)}this.fire(new fS("on"+e+"_changed"))}return}else{if(e==="center"){this.centerPoint=T}}this["_"+e]=T;this.fire(new fS("on"+e+"_changed"))},_setValueTick:function(e,kw,kv,i){if(e==="center"){var T=new cD(kw.lng+kv.lng*i,kw.lat+kv.lat*i);this._setValue(e,T);return}if(e==="zoom"){this._setValue(e,Math.pow(kw,1-i)*Math.pow(kw+kv,i));return}this._setValue(e,kw+kv*i)},setHeading:function(kv,i){i=i||{};if(kv===this._heading){i.callback&&i.callback();return}var T=en(this._heading,360);var e=en(kv,360);if(e===T){this._heading=kv;i.callback&&i.callback();return}if(e===0&&T>180){e=360}if(i.noAnimation){this._setValue("heading",kv);i.callback&&i.callback();return}if(i.unstopable){this._animationInfoUnstopable.heading={current:T,diff:e-T}}else{this._animationInfo.heading={current:T,diff:e-T}}this._startAnimation(i)},resetHeading:function(e){var i=this._heading;while(i<0){i+=360}i=i%360;if(i>180){i-=360}this._heading=i;e=e||{};e.unstopable=true;this.setHeading(0,e)},getHeading:function(){return this._heading},setTilt:function(e,i){i=i||{};if(e===this._tilt){i.callback&&i.callback();return}if(e>h0.MAX_TILT){e=h0.MAX_TILT}if(e<h0.MIN_TILT){e=h0.MIN_TILT}if(i&&i.noAnimation){this._setValue("tilt",e);i.callback&&i.callback();return}this._animationInfo.tilt={current:this._tilt,diff:e-this._tilt};this._startAnimation(i)},getTilt:function(){return this._tilt},getCenterIn:function(){return this.centerPoint},getZoom:function(){return this.zoomLevel},getCameraPosition:function(T){T=T||{};var e=T.center||this.centerPoint;var kv=T.zoom||this.zoomLevel;var ky=typeof T.heading==="number"?T.heading:this._heading;var i=typeof T.tilt==="number"?T.tilt:this._tilt;var kx=this._webglMapCamera.generateMVMatrix(e,kv,ky,i);var kw=mat4.create(Float32Array);mat4.invert(kw,kx);return this._webglMapCamera.getPosition(kw)}});function bp(i){this._jobQueue=[];this._idleOnlyJobQueue=[];var e=this;this.isIdle=true;i.on("updateframe",function(kv){var T=12-kv.frameTime;T=T<1?1:T;e.isIdle=false;if(e.idleWorkTimer){clearInterval(e.idleWorkTimer);e.idleWorkTimer=null}e.runJobs(T)});this._idleWorkerTicker=(function(T){return function(){if(T.isIdle){T.runJobs();T.runIdleOnlyJobs()}}})(this);i.on("mapglidle",function(){e.isIdle=true;e.runJobs();e.runIdleOnlyJobs();e.idleWorkTimer=setInterval(e._idleWorkerTicker,bp.MAX_IDLE_TIME)});i.on("destroy",function(){if(e.idleWorkTimer){clearInterval(e.idleWorkTimer);e.idleWorkTimer=null}})}bp.MAX_IDLE_TIME=50;bp.MAX_FRAME_TIME=6;bp.prototype.runJobs=function(i){if(this._jobQueue.length===0){return}var kv=it();var e=0;i=i||bp.MAX_FRAME_TIME;while(this._jobQueue.length&&e<i){var T=this._jobQueue.shift();if(T.state!=="invalid"){T.call()}e=it()-kv}};bp.prototype.runIdleOnlyJobs=function(){if(this._idleOnlyJobQueue.length===0){return}var T=it();var e=0;while(this._idleOnlyJobQueue.length&&e<bp.MAX_IDLE_TIME){var i=this._idleOnlyJobQueue.shift();if(i.state!=="invalid"){i.call()}e=it()-T}};bp.prototype.checkIdleRunning=function(){if(this.isIdle&&!this.idleWorkTimer){this.runJobs();this.runIdleOnlyJobs();this.idleWorkTimer=setInterval(this._idleWorkerTicker,50)}};bp.prototype.addJob=function(e){this._jobQueue.push(e);this.checkIdleRunning()};bp.prototype.clearJobs=function(){this._jobQueue.length=0;this._idleOnlyJobQueue.length=0};bp.prototype.addIdleOnlyJob=function(e){this._idleOnlyJobQueue.push(e);this.checkIdleRunning()};var d1={};(function(ky){if(!kC){var kC=0.000001}if(!i){var i=(typeof Float32Array!=="undefined")?Float32Array:Array}if(!kw){var kw=Math.random}var T={};var kx=Math.PI/180;T.toRadian=function(kD){return kD*kx};var kB={};kB.create=function(kE){kE=kE||i;var kD=new kE(2);kD[0]=0;kD[1]=0;return kD};kB.clone=function(kD,kF){kF=kF||i;var kE=new kF(2);kE[0]=kD[0];kE[1]=kD[1];return kE};kB.fromValues=function(kD,kG,kF){kF=kF||i;var kE=new kF(2);kE[0]=kD;kE[1]=kG;return kE};kB.copy=function(kE,kD){kE[0]=kD[0];kE[1]=kD[1];return kE};kB.set=function(kE,kD,kF){kE[0]=kD;kE[1]=kF;return kE};kB.add=function(kF,kE,kD){kF[0]=kE[0]+kD[0];kF[1]=kE[1]+kD[1];return kF};kB.subtract=function(kF,kE,kD){kF[0]=kE[0]-kD[0];kF[1]=kE[1]-kD[1];return kF};kB.sub=kB.subtract;kB.multiply=function(kF,kE,kD){kF[0]=kE[0]*kD[0];kF[1]=kE[1]*kD[1];return kF};kB.mul=kB.multiply;kB.divide=function(kF,kE,kD){kF[0]=kE[0]/kD[0];kF[1]=kE[1]/kD[1];return kF};kB.div=kB.divide;kB.min=function(kF,kE,kD){kF[0]=Math.min(kE[0],kD[0]);kF[1]=Math.min(kE[1],kD[1]);return kF};kB.max=function(kF,kE,kD){kF[0]=Math.max(kE[0],kD[0]);kF[1]=Math.max(kE[1],kD[1]);return kF};kB.scale=function(kF,kE,kD){kF[0]=kE[0]*kD;kF[1]=kE[1]*kD;return kF};kB.scaleAndAdd=function(kF,kE,kD,kG){kF[0]=kE[0]+(kD[0]*kG);kF[1]=kE[1]+(kD[1]*kG);return kF};kB.distance=function(kF,kE){var kD=kE[0]-kF[0],kG=kE[1]-kF[1];return Math.sqrt(kD*kD+kG*kG)};kB.dist=kB.distance;kB.squaredDistance=function(kF,kE){var kD=kE[0]-kF[0],kG=kE[1]-kF[1];return kD*kD+kG*kG};kB.sqrDist=kB.squaredDistance;kB.length=function(kE){var kD=kE[0],kF=kE[1];return Math.sqrt(kD*kD+kF*kF)};kB.len=kB.length;kB.squaredLength=function(kE){var kD=kE[0],kF=kE[1];return kD*kD+kF*kF};kB.sqrLen=kB.squaredLength;kB.negate=function(kE,kD){kE[0]=-kD[0];kE[1]=-kD[1];return kE};kB.normalize=function(kG,kF){var kE=kF[0],kH=kF[1];var kD=kE*kE+kH*kH;if(kD>0){kD=1/Math.sqrt(kD);kG[0]=kF[0]*kD;kG[1]=kF[1]*kD}return kG};kB.dot=function(kE,kD){return kE[0]*kD[0]+kE[1]*kD[1]};kB.cross=function(kF,kE,kD){var kG=kE[0]*kD[1]-kE[1]*kD[0];kF[0]=kF[1]=0;kF[2]=kG;return kF};kB.lerp=function(kF,kE,kD,kG){var kI=kE[0],kH=kE[1];kF[0]=kI+kG*(kD[0]-kI);kF[1]=kH+kG*(kD[1]-kH);return kF};kB.random=function(kD,kF){kF=kF||1;var kE=kw()*2*Math.PI;kD[0]=Math.cos(kE)*kF;kD[1]=Math.sin(kE)*kF;return kD};kB.transformMat2=function(kG,kF,kE){var kD=kF[0],kH=kF[1];kG[0]=kE[0]*kD+kE[2]*kH;kG[1]=kE[1]*kD+kE[3]*kH;return kG};kB.transformMat2d=function(kG,kF,kE){var kD=kF[0],kH=kF[1];kG[0]=kE[0]*kD+kE[2]*kH+kE[4];kG[1]=kE[1]*kD+kE[3]*kH+kE[5];return kG};kB.transformMat3=function(kG,kF,kE){var kD=kF[0],kH=kF[1];kG[0]=kE[0]*kD+kE[3]*kH+kE[6];kG[1]=kE[1]*kD+kE[4]*kH+kE[7];return kG};kB.transformMat4=function(kG,kF,kE){var kD=kF[0],kH=kF[1];kG[0]=kE[0]*kD+kE[4]*kH+kE[12];kG[1]=kE[1]*kD+kE[5]*kH+kE[13];return kG};kB.rotate=function(kG,kE,kD,kK){var kJ=kE[0]-kD[0];var kI=kE[1]-kD[1];var kF=Math.sin(kK);var kH=Math.cos(kK);kG[0]=kJ*kH-kI*kF+kD[0];kG[1]=kJ*kF+kI*kH+kD[1];return kG};kB.forEach=(function(){var kD=kB.create();return function(kG,kK,kL,kJ,kI,kE){var kH,kF;if(!kK){kK=2}if(!kL){kL=0}if(kJ){kF=Math.min((kJ*kK)+kL,kG.length)}else{kF=kG.length}for(kH=kL;kH<kF;kH+=kK){kD[0]=kG[kH];kD[1]=kG[kH+1];kI(kD,kD,kE);kG[kH]=kD[0];kG[kH+1]=kD[1]}return kG}})();kB.str=function(kD){return"vec2("+kD[0]+", "+kD[1]+")"};ky.vec2=kB;var kA={};kA.create=function(kE){kE=kE||i;var kD=new kE(3);kD[0]=0;kD[1]=0;kD[2]=0;return kD};kA.clone=function(kD,kF){kF=kF||i;var kE=new kF(3);kE[0]=kD[0];kE[1]=kD[1];kE[2]=kD[2];return kE};kA.fromValues=function(kD,kH,kF,kG){kG=kG||i;var kE=new kG(3);kE[0]=kD;kE[1]=kH;kE[2]=kF;return kE};kA.copy=function(kE,kD){kE[0]=kD[0];kE[1]=kD[1];kE[2]=kD[2];return kE};kA.set=function(kE,kD,kG,kF){kE[0]=kD;kE[1]=kG;kE[2]=kF;return kE};kA.add=function(kF,kE,kD){kF[0]=kE[0]+kD[0];kF[1]=kE[1]+kD[1];kF[2]=kE[2]+kD[2];return kF};kA.subtract=function(kF,kE,kD){kF[0]=kE[0]-kD[0];kF[1]=kE[1]-kD[1];kF[2]=kE[2]-kD[2];return kF};kA.sub=kA.subtract;kA.multiply=function(kF,kE,kD){kF[0]=kE[0]*kD[0];kF[1]=kE[1]*kD[1];kF[2]=kE[2]*kD[2];return kF};kA.mul=kA.multiply;kA.divide=function(kF,kE,kD){kF[0]=kE[0]/kD[0];kF[1]=kE[1]/kD[1];kF[2]=kE[2]/kD[2];return kF};kA.div=kA.divide;kA.min=function(kF,kE,kD){kF[0]=Math.min(kE[0],kD[0]);kF[1]=Math.min(kE[1],kD[1]);kF[2]=Math.min(kE[2],kD[2]);return kF};kA.max=function(kF,kE,kD){kF[0]=Math.max(kE[0],kD[0]);kF[1]=Math.max(kE[1],kD[1]);kF[2]=Math.max(kE[2],kD[2]);return kF};kA.scale=function(kF,kE,kD){kF[0]=kE[0]*kD;kF[1]=kE[1]*kD;kF[2]=kE[2]*kD;return kF};kA.scaleAndAdd=function(kF,kE,kD,kG){kF[0]=kE[0]+(kD[0]*kG);kF[1]=kE[1]+(kD[1]*kG);kF[2]=kE[2]+(kD[2]*kG);return kF};kA.distance=function(kF,kE){var kD=kE[0]-kF[0],kH=kE[1]-kF[1],kG=kE[2]-kF[2];return Math.sqrt(kD*kD+kH*kH+kG*kG)};kA.dist=kA.distance;kA.squaredDistance=function(kF,kE){var kD=kE[0]-kF[0],kH=kE[1]-kF[1],kG=kE[2]-kF[2];return kD*kD+kH*kH+kG*kG};kA.sqrDist=kA.squaredDistance;kA.length=function(kE){var kD=kE[0],kG=kE[1],kF=kE[2];return Math.sqrt(kD*kD+kG*kG+kF*kF)};kA.len=kA.length;kA.squaredLength=function(kE){var kD=kE[0],kG=kE[1],kF=kE[2];return kD*kD+kG*kG+kF*kF};kA.sqrLen=kA.squaredLength;kA.negate=function(kE,kD){kE[0]=-kD[0];kE[1]=-kD[1];kE[2]=-kD[2];return kE};kA.normalize=function(kG,kF){var kE=kF[0],kI=kF[1],kH=kF[2];var kD=kE*kE+kI*kI+kH*kH;if(kD>0){kD=1/Math.sqrt(kD);kG[0]=kF[0]*kD;kG[1]=kF[1]*kD;kG[2]=kF[2]*kD}return kG};kA.dot=function(kE,kD){return kE[0]*kD[0]+kE[1]*kD[1]+kE[2]*kD[2]};kA.cross=function(kE,kJ,kI){var kD=kJ[0],kL=kJ[1],kK=kJ[2],kH=kI[0],kG=kI[1],kF=kI[2];kE[0]=kL*kF-kK*kG;kE[1]=kK*kH-kD*kF;kE[2]=kD*kG-kL*kH;return kE};kA.lerp=function(kF,kE,kD,kG){var kJ=kE[0],kI=kE[1],kH=kE[2];kF[0]=kJ+kG*(kD[0]-kJ);kF[1]=kI+kG*(kD[1]-kI);kF[2]=kH+kG*(kD[2]-kH);return kF};kA.random=function(kD,kH){kH=kH||1;var kF=kw()*2*Math.PI;var kG=(kw()*2)-1;var kE=Math.sqrt(1-kG*kG)*kH;kD[0]=Math.cos(kF)*kE;kD[1]=Math.sin(kF)*kE;kD[2]=kG*kH;return kD};kA.transformMat4=function(kG,kF,kE){var kD=kF[0],kI=kF[1],kH=kF[2];kG[0]=kE[0]*kD+kE[4]*kI+kE[8]*kH+kE[12];kG[1]=kE[1]*kD+kE[5]*kI+kE[9]*kH+kE[13];kG[2]=kE[2]*kD+kE[6]*kI+kE[10]*kH+kE[14];return kG};kA.transformMat3=function(kG,kF,kE){var kD=kF[0],kI=kF[1],kH=kF[2];kG[0]=kD*kE[0]+kI*kE[3]+kH*kE[6];kG[1]=kD*kE[1]+kI*kE[4]+kH*kE[7];kG[2]=kD*kE[2]+kI*kE[5]+kH*kE[8];return kG};kA.transformQuat=function(kJ,kP,kD){var kQ=kP[0],kO=kP[1],kN=kP[2],kL=kD[0],kK=kD[1],kI=kD[2],kM=kD[3],kG=kM*kQ+kK*kN-kI*kO,kF=kM*kO+kI*kQ-kL*kN,kE=kM*kN+kL*kO-kK*kQ,kH=-kL*kQ-kK*kO-kI*kN;kJ[0]=kG*kM+kH*-kL+kF*-kI-kE*-kK;kJ[1]=kF*kM+kH*-kK+kE*-kL-kG*-kI;kJ[2]=kE*kM+kH*-kI+kG*-kK-kF*-kL;return kJ};kA.rotateX=function(kF,kE,kD,kI){var kH=[],kG=[];kH[0]=kE[0]-kD[0];kH[1]=kE[1]-kD[1];kH[2]=kE[2]-kD[2];kG[0]=kH[0];kG[1]=kH[1]*Math.cos(kI)-kH[2]*Math.sin(kI);kG[2]=kH[1]*Math.sin(kI)+kH[2]*Math.cos(kI);kF[0]=kG[0]+kD[0];kF[1]=kG[1]+kD[1];kF[2]=kG[2]+kD[2];return kF};kA.rotateY=function(kF,kE,kD,kI){var kH=[],kG=[];kH[0]=kE[0]-kD[0];kH[1]=kE[1]-kD[1];kH[2]=kE[2]-kD[2];kG[0]=kH[2]*Math.sin(kI)+kH[0]*Math.cos(kI);kG[1]=kH[1];kG[2]=kH[2]*Math.cos(kI)-kH[0]*Math.sin(kI);kF[0]=kG[0]+kD[0];kF[1]=kG[1]+kD[1];kF[2]=kG[2]+kD[2];return kF};kA.rotateZ=function(kF,kE,kD,kI){var kH=[],kG=[];kH[0]=kE[0]-kD[0];kH[1]=kE[1]-kD[1];kH[2]=kE[2]-kD[2];kG[0]=kH[0]*Math.cos(kI)-kH[1]*Math.sin(kI);kG[1]=kH[0]*Math.sin(kI)+kH[1]*Math.cos(kI);kG[2]=kH[2];kF[0]=kG[0]+kD[0];kF[1]=kG[1]+kD[1];kF[2]=kG[2]+kD[2];return kF};kA.forEach=(function(){var kD=kA.create();return function(kG,kK,kL,kJ,kI,kE){var kH,kF;if(!kK){kK=3}if(!kL){kL=0}if(kJ){kF=Math.min((kJ*kK)+kL,kG.length)}else{kF=kG.length}for(kH=kL;kH<kF;kH+=kK){kD[0]=kG[kH];kD[1]=kG[kH+1];kD[2]=kG[kH+2];kI(kD,kD,kE);kG[kH]=kD[0];kG[kH+1]=kD[1];kG[kH+2]=kD[2]}return kG}})();kA.str=function(kD){return"vec3("+kD[0]+", "+kD[1]+", "+kD[2]+")"};ky.vec3=kA;var kz={};kz.create=function(kE){kE=kE||i;var kD=new kE(4);kD[0]=0;kD[1]=0;kD[2]=0;kD[3]=0;return kD};kz.clone=function(kD,kF){kF=kF||i;var kE=new kF(4);kE[0]=kD[0];kE[1]=kD[1];kE[2]=kD[2];kE[3]=kD[3];return kE};kz.fromValues=function(kD,kI,kG,kE,kH){kH=kH||i;var kF=new kH(4);kF[0]=kD;kF[1]=kI;kF[2]=kG;kF[3]=kE;return kF};kz.copy=function(kE,kD){kE[0]=kD[0];kE[1]=kD[1];kE[2]=kD[2];kE[3]=kD[3];return kE};kz.set=function(kF,kD,kH,kG,kE){kF[0]=kD;kF[1]=kH;kF[2]=kG;kF[3]=kE;return kF};kz.add=function(kF,kE,kD){kF[0]=kE[0]+kD[0];kF[1]=kE[1]+kD[1];kF[2]=kE[2]+kD[2];kF[3]=kE[3]+kD[3];return kF};kz.subtract=function(kF,kE,kD){kF[0]=kE[0]-kD[0];kF[1]=kE[1]-kD[1];kF[2]=kE[2]-kD[2];kF[3]=kE[3]-kD[3];return kF};kz.sub=kz.subtract;kz.multiply=function(kF,kE,kD){kF[0]=kE[0]*kD[0];kF[1]=kE[1]*kD[1];kF[2]=kE[2]*kD[2];kF[3]=kE[3]*kD[3];return kF};kz.mul=kz.multiply;kz.divide=function(kF,kE,kD){kF[0]=kE[0]/kD[0];kF[1]=kE[1]/kD[1];kF[2]=kE[2]/kD[2];kF[3]=kE[3]/kD[3];return kF};kz.div=kz.divide;kz.min=function(kF,kE,kD){kF[0]=Math.min(kE[0],kD[0]);kF[1]=Math.min(kE[1],kD[1]);kF[2]=Math.min(kE[2],kD[2]);kF[3]=Math.min(kE[3],kD[3]);return kF};kz.max=function(kF,kE,kD){kF[0]=Math.max(kE[0],kD[0]);kF[1]=Math.max(kE[1],kD[1]);kF[2]=Math.max(kE[2],kD[2]);kF[3]=Math.max(kE[3],kD[3]);return kF};kz.scale=function(kF,kE,kD){kF[0]=kE[0]*kD;kF[1]=kE[1]*kD;kF[2]=kE[2]*kD;kF[3]=kE[3]*kD;return kF};kz.scaleAndAdd=function(kF,kE,kD,kG){kF[0]=kE[0]+(kD[0]*kG);kF[1]=kE[1]+(kD[1]*kG);kF[2]=kE[2]+(kD[2]*kG);kF[3]=kE[3]+(kD[3]*kG);return kF};kz.distance=function(kG,kE){var kD=kE[0]-kG[0],kI=kE[1]-kG[1],kH=kE[2]-kG[2],kF=kE[3]-kG[3];return Math.sqrt(kD*kD+kI*kI+kH*kH+kF*kF)};kz.dist=kz.distance;kz.squaredDistance=function(kG,kE){var kD=kE[0]-kG[0],kI=kE[1]-kG[1],kH=kE[2]-kG[2],kF=kE[3]-kG[3];return kD*kD+kI*kI+kH*kH+kF*kF};kz.sqrDist=kz.squaredDistance;kz.length=function(kF){var kD=kF[0],kH=kF[1],kG=kF[2],kE=kF[3];return Math.sqrt(kD*kD+kH*kH+kG*kG+kE*kE)};kz.len=kz.length;kz.squaredLength=function(kF){var kD=kF[0],kH=kF[1],kG=kF[2],kE=kF[3];return kD*kD+kH*kH+kG*kG+kE*kE};kz.sqrLen=kz.squaredLength;kz.negate=function(kE,kD){kE[0]=-kD[0];kE[1]=-kD[1];kE[2]=-kD[2];kE[3]=-kD[3];return kE};kz.normalize=function(kH,kG){var kE=kG[0],kJ=kG[1],kI=kG[2],kF=kG[3];var kD=kE*kE+kJ*kJ+kI*kI+kF*kF;if(kD>0){kD=1/Math.sqrt(kD);kH[0]=kG[0]*kD;kH[1]=kG[1]*kD;kH[2]=kG[2]*kD;kH[3]=kG[3]*kD}return kH};kz.dot=function(kE,kD){return kE[0]*kD[0]+kE[1]*kD[1]+kE[2]*kD[2]+kE[3]*kD[3]};kz.lerp=function(kF,kE,kD,kG){var kJ=kE[0],kI=kE[1],kH=kE[2],kK=kE[3];kF[0]=kJ+kG*(kD[0]-kJ);kF[1]=kI+kG*(kD[1]-kI);kF[2]=kH+kG*(kD[2]-kH);kF[3]=kK+kG*(kD[3]-kK);return kF};kz.random=function(kD,kE){kE=kE||1;kD[0]=kw();kD[1]=kw();kD[2]=kw();kD[3]=kw();kz.normalize(kD,kD);kz.scale(kD,kD,kE);return kD};kz.transformMat4=function(kH,kG,kE){var kD=kG[0],kJ=kG[1],kI=kG[2],kF=kG[3];kH[0]=kE[0]*kD+kE[4]*kJ+kE[8]*kI+kE[12]*kF;kH[1]=kE[1]*kD+kE[5]*kJ+kE[9]*kI+kE[13]*kF;kH[2]=kE[2]*kD+kE[6]*kJ+kE[10]*kI+kE[14]*kF;kH[3]=kE[3]*kD+kE[7]*kJ+kE[11]*kI+kE[15]*kF;return kH};kz.transformQuat=function(kJ,kP,kD){var kQ=kP[0],kO=kP[1],kN=kP[2],kL=kD[0],kK=kD[1],kI=kD[2],kM=kD[3],kG=kM*kQ+kK*kN-kI*kO,kF=kM*kO+kI*kQ-kL*kN,kE=kM*kN+kL*kO-kK*kQ,kH=-kL*kQ-kK*kO-kI*kN;kJ[0]=kG*kM+kH*-kL+kF*-kI-kE*-kK;kJ[1]=kF*kM+kH*-kK+kE*-kL-kG*-kI;kJ[2]=kE*kM+kH*-kI+kG*-kK-kF*-kL;return kJ};kz.forEach=(function(){var kD=kz.create();return function(kG,kK,kL,kJ,kI,kE){var kH,kF;if(!kK){kK=4}if(!kL){kL=0}if(kJ){kF=Math.min((kJ*kK)+kL,kG.length)}else{kF=kG.length}for(kH=kL;kH<kF;kH+=kK){kD[0]=kG[kH];kD[1]=kG[kH+1];kD[2]=kG[kH+2];kD[3]=kG[kH+3];kI(kD,kD,kE);kG[kH]=kD[0];kG[kH+1]=kD[1];kG[kH+2]=kD[2];kG[kH+3]=kD[3]}return kG}})();kz.str=function(kD){return"vec4("+kD[0]+", "+kD[1]+", "+kD[2]+", "+kD[3]+")"};ky.vec4=kz;var kv={};kv.create=function(kE){kE=kE||i;var kD=new kE(4);kD[0]=1;kD[1]=0;kD[2]=0;kD[3]=1;return kD};kv.clone=function(kD,kF){kF=kF||i;var kE=new kF(4);kE[0]=kD[0];kE[1]=kD[1];kE[2]=kD[2];kE[3]=kD[3];return kE};kv.copy=function(kE,kD){kE[0]=kD[0];kE[1]=kD[1];kE[2]=kD[2];kE[3]=kD[3];return kE};kv.identity=function(kD){kD[0]=1;kD[1]=0;kD[2]=0;kD[3]=1;return kD};kv.transpose=function(kF,kE){if(kF===kE){var kD=kE[1];kF[1]=kE[2];kF[2]=kD}else{kF[0]=kE[0];kF[1]=kE[2];kF[2]=kE[1];kF[3]=kE[3]}return kF};kv.invert=function(kH,kF){var kG=kF[0],kE=kF[1],kD=kF[2],kJ=kF[3],kI=kG*kJ-kD*kE;if(!kI){return null}kI=1/kI;kH[0]=kJ*kI;kH[1]=-kE*kI;kH[2]=-kD*kI;kH[3]=kG*kI;return kH};kv.adjoint=function(kF,kD){var kE=kD[0];kF[0]=kD[3];kF[1]=-kD[1];kF[2]=-kD[2];kF[3]=kE;return kF};kv.determinant=function(kD){return kD[0]*kD[3]-kD[2]*kD[1]};kv.multiply=function(kH,kM,kK){var kG=kM[0],kF=kM[1],kE=kM[2],kD=kM[3];var kN=kK[0],kL=kK[1],kJ=kK[2],kI=kK[3];kH[0]=kG*kN+kE*kL;kH[1]=kF*kN+kD*kL;kH[2]=kG*kJ+kE*kI;kH[3]=kF*kJ+kD*kI;return kH};kv.mul=kv.multiply;kv.rotate=function(kH,kK,kJ){var kG=kK[0],kF=kK[1],kE=kK[2],kD=kK[3],kL=Math.sin(kJ),kI=Math.cos(kJ);kH[0]=kG*kI+kE*kL;kH[1]=kF*kI+kD*kL;kH[2]=kG*-kL+kE*kI;kH[3]=kF*-kL+kD*kI;return kH};kv.scale=function(kH,kI,kK){var kG=kI[0],kF=kI[1],kE=kI[2],kD=kI[3],kL=kK[0],kJ=kK[1];kH[0]=kG*kL;kH[1]=kF*kL;kH[2]=kE*kJ;kH[3]=kD*kJ;return kH};kv.str=function(kD){return"mat2("+kD[0]+", "+kD[1]+", "+kD[2]+", "+kD[3]+")"};kv.frob=function(kD){return(Math.sqrt(Math.pow(kD[0],2)+Math.pow(kD[1],2)+Math.pow(kD[2],2)+Math.pow(kD[3],2)))};kv.LDU=function(kD,kG,kF,kE){kD[2]=kE[2]/kE[0];kF[0]=kE[0];kF[1]=kE[1];kF[3]=kE[3]-kD[2]*kF[1];return[kD,kG,kF]};ky.mat2=kv;var e={};e.create=function(kE){kE=kE||i;var kD=new kE(16);kD[0]=1;kD[1]=0;kD[2]=0;kD[3]=0;kD[4]=0;kD[5]=1;kD[6]=0;kD[7]=0;kD[8]=0;kD[9]=0;kD[10]=1;kD[11]=0;kD[12]=0;kD[13]=0;kD[14]=0;kD[15]=1;return kD};e.clone=function(kD){var kE=new i(16);kE[0]=kD[0];kE[1]=kD[1];kE[2]=kD[2];kE[3]=kD[3];kE[4]=kD[4];kE[5]=kD[5];kE[6]=kD[6];kE[7]=kD[7];kE[8]=kD[8];kE[9]=kD[9];kE[10]=kD[10];kE[11]=kD[11];kE[12]=kD[12];kE[13]=kD[13];kE[14]=kD[14];kE[15]=kD[15];return kE};e.copy=function(kE,kD){kE[0]=kD[0];kE[1]=kD[1];kE[2]=kD[2];kE[3]=kD[3];kE[4]=kD[4];kE[5]=kD[5];kE[6]=kD[6];kE[7]=kD[7];kE[8]=kD[8];kE[9]=kD[9];kE[10]=kD[10];kE[11]=kD[11];kE[12]=kD[12];kE[13]=kD[13];kE[14]=kD[14];kE[15]=kD[15];return kE};e.identity=function(kD){kD[0]=1;kD[1]=0;kD[2]=0;kD[3]=0;kD[4]=0;kD[5]=1;kD[6]=0;kD[7]=0;kD[8]=0;kD[9]=0;kD[10]=1;kD[11]=0;kD[12]=0;kD[13]=0;kD[14]=0;kD[15]=1;return kD};e.transpose=function(kG,kF){if(kG===kF){var kK=kF[1],kI=kF[2],kH=kF[3],kD=kF[6],kJ=kF[7],kE=kF[11];kG[1]=kF[4];kG[2]=kF[8];kG[3]=kF[12];kG[4]=kK;kG[6]=kF[9];kG[7]=kF[13];kG[8]=kI;kG[9]=kD;kG[11]=kF[14];kG[12]=kH;kG[13]=kJ;kG[14]=kE}else{kG[0]=kF[0];kG[1]=kF[4];kG[2]=kF[8];kG[3]=kF[12];kG[4]=kF[1];kG[5]=kF[5];kG[6]=kF[9];kG[7]=kF[13];kG[8]=kF[2];kG[9]=kF[6];kG[10]=kF[10];kG[11]=kF[14];kG[12]=kF[3];kG[13]=kF[7];kG[14]=kF[11];kG[15]=kF[15]}return kG};e.invert=function(kW,k1){var k5=k1[0],k3=k1[1],k2=k1[2],kZ=k1[3],kH=k1[4],kG=k1[5],kF=k1[6],kE=k1[7],kV=k1[8],kU=k1[9],kT=k1[10],kS=k1[11],k7=k1[12],k6=k1[13],k4=k1[14],k0=k1[15],kR=k5*kG-k3*kH,kQ=k5*kF-k2*kH,kP=k5*kE-kZ*kH,kO=k3*kF-k2*kG,kN=k3*kE-kZ*kG,kM=k2*kE-kZ*kF,kL=kV*k6-kU*k7,kK=kV*k4-kT*k7,kJ=kV*k0-kS*k7,kI=kU*k4-kT*k6,kY=kU*k0-kS*k6,kX=kT*k0-kS*k4,kD=kR*kX-kQ*kY+kP*kI+kO*kJ-kN*kK+kM*kL;if(!kD){return null}kD=1/kD;kW[0]=(kG*kX-kF*kY+kE*kI)*kD;kW[1]=(k2*kY-k3*kX-kZ*kI)*kD;kW[2]=(k6*kM-k4*kN+k0*kO)*kD;kW[3]=(kT*kN-kU*kM-kS*kO)*kD;kW[4]=(kF*kJ-kH*kX-kE*kK)*kD;kW[5]=(k5*kX-k2*kJ+kZ*kK)*kD;kW[6]=(k4*kP-k7*kM-k0*kQ)*kD;kW[7]=(kV*kM-kT*kP+kS*kQ)*kD;kW[8]=(kH*kY-kG*kJ+kE*kL)*kD;kW[9]=(k3*kJ-k5*kY-kZ*kL)*kD;kW[10]=(k7*kN-k6*kP+k0*kR)*kD;kW[11]=(kU*kP-kV*kN-kS*kR)*kD;kW[12]=(kG*kK-kH*kI-kF*kL)*kD;kW[13]=(k5*kI-k3*kK+k2*kL)*kD;kW[14]=(k6*kQ-k7*kO-k4*kR)*kD;kW[15]=(kV*kO-kU*kQ+kT*kR)*kD;return kW};e.adjoint=function(kL,kO){var kS=kO[0],kQ=kO[1],kP=kO[2],kM=kO[3],kG=kO[4],kF=kO[5],kE=kO[6],kD=kO[7],kK=kO[8],kJ=kO[9],kI=kO[10],kH=kO[11],kU=kO[12],kT=kO[13],kR=kO[14],kN=kO[15];kL[0]=(kF*(kI*kN-kH*kR)-kJ*(kE*kN-kD*kR)+kT*(kE*kH-kD*kI));kL[1]=-(kQ*(kI*kN-kH*kR)-kJ*(kP*kN-kM*kR)+kT*(kP*kH-kM*kI));kL[2]=(kQ*(kE*kN-kD*kR)-kF*(kP*kN-kM*kR)+kT*(kP*kD-kM*kE));kL[3]=-(kQ*(kE*kH-kD*kI)-kF*(kP*kH-kM*kI)+kJ*(kP*kD-kM*kE));kL[4]=-(kG*(kI*kN-kH*kR)-kK*(kE*kN-kD*kR)+kU*(kE*kH-kD*kI));kL[5]=(kS*(kI*kN-kH*kR)-kK*(kP*kN-kM*kR)+kU*(kP*kH-kM*kI));kL[6]=-(kS*(kE*kN-kD*kR)-kG*(kP*kN-kM*kR)+kU*(kP*kD-kM*kE));kL[7]=(kS*(kE*kH-kD*kI)-kG*(kP*kH-kM*kI)+kK*(kP*kD-kM*kE));kL[8]=(kG*(kJ*kN-kH*kT)-kK*(kF*kN-kD*kT)+kU*(kF*kH-kD*kJ));kL[9]=-(kS*(kJ*kN-kH*kT)-kK*(kQ*kN-kM*kT)+kU*(kQ*kH-kM*kJ));kL[10]=(kS*(kF*kN-kD*kT)-kG*(kQ*kN-kM*kT)+kU*(kQ*kD-kM*kF));kL[11]=-(kS*(kF*kH-kD*kJ)-kG*(kQ*kH-kM*kJ)+kK*(kQ*kD-kM*kF));kL[12]=-(kG*(kJ*kR-kI*kT)-kK*(kF*kR-kE*kT)+kU*(kF*kI-kE*kJ));kL[13]=(kS*(kJ*kR-kI*kT)-kK*(kQ*kR-kP*kT)+kU*(kQ*kI-kP*kJ));kL[14]=-(kS*(kF*kR-kE*kT)-kG*(kQ*kR-kP*kT)+kU*(kQ*kE-kP*kF));kL[15]=(kS*(kF*kI-kE*kJ)-kG*(kQ*kI-kP*kJ)+kK*(kQ*kE-kP*kF));return kL};e.determinant=function(kY){var k3=kY[0],k1=kY[1],kZ=kY[2],kX=kY[3],kG=kY[4],kF=kY[5],kE=kY[6],kD=kY[7],kU=kY[8],kT=kY[9],kS=kY[10],kR=kY[11],k5=kY[12],k4=kY[13],k2=kY[14],k0=kY[15],kQ=k3*kF-k1*kG,kP=k3*kE-kZ*kG,kO=k3*kD-kX*kG,kN=k1*kE-kZ*kF,kM=k1*kD-kX*kF,kL=kZ*kD-kX*kE,kK=kU*k4-kT*k5,kJ=kU*k2-kS*k5,kI=kU*k0-kR*k5,kH=kT*k2-kS*k4,kW=kT*k0-kR*k4,kV=kS*k0-kR*k2;return kQ*kV-kP*kW+kO*kH+kN*kI-kM*kJ+kL*kK};e.multiply=function(kP,kT,kQ){var kX=kT[0],kW=kT[1],kU=kT[2],kR=kT[3],kJ=kT[4],kH=kT[5],kF=kT[6],kD=kT[7],kO=kT[8],kN=kT[9],kM=kT[10],kL=kT[11],kZ=kT[12],kY=kT[13],kV=kT[14],kS=kT[15];var kK=kQ[0],kI=kQ[1],kG=kQ[2],kE=kQ[3];kP[0]=kK*kX+kI*kJ+kG*kO+kE*kZ;kP[1]=kK*kW+kI*kH+kG*kN+kE*kY;kP[2]=kK*kU+kI*kF+kG*kM+kE*kV;kP[3]=kK*kR+kI*kD+kG*kL+kE*kS;kK=kQ[4];kI=kQ[5];kG=kQ[6];kE=kQ[7];kP[4]=kK*kX+kI*kJ+kG*kO+kE*kZ;kP[5]=kK*kW+kI*kH+kG*kN+kE*kY;kP[6]=kK*kU+kI*kF+kG*kM+kE*kV;kP[7]=kK*kR+kI*kD+kG*kL+kE*kS;kK=kQ[8];kI=kQ[9];kG=kQ[10];kE=kQ[11];kP[8]=kK*kX+kI*kJ+kG*kO+kE*kZ;kP[9]=kK*kW+kI*kH+kG*kN+kE*kY;kP[10]=kK*kU+kI*kF+kG*kM+kE*kV;kP[11]=kK*kR+kI*kD+kG*kL+kE*kS;kK=kQ[12];kI=kQ[13];kG=kQ[14];kE=kQ[15];kP[12]=kK*kX+kI*kJ+kG*kO+kE*kZ;kP[13]=kK*kW+kI*kH+kG*kN+kE*kY;kP[14]=kK*kU+kI*kF+kG*kM+kE*kV;kP[15]=kK*kR+kI*kD+kG*kL+kE*kS;return kP};e.mul=e.multiply;e.translate=function(kP,kR,kK){var kJ=kK[0],kI=kK[1],kH=kK[2],kU,kT,kS,kQ,kG,kF,kE,kD,kO,kN,kM,kL;if(kR===kP){kP[12]=kR[0]*kJ+kR[4]*kI+kR[8]*kH+kR[12];kP[13]=kR[1]*kJ+kR[5]*kI+kR[9]*kH+kR[13];kP[14]=kR[2]*kJ+kR[6]*kI+kR[10]*kH+kR[14];kP[15]=kR[3]*kJ+kR[7]*kI+kR[11]*kH+kR[15]}else{kU=kR[0];kT=kR[1];kS=kR[2];kQ=kR[3];kG=kR[4];kF=kR[5];kE=kR[6];kD=kR[7];kO=kR[8];kN=kR[9];kM=kR[10];kL=kR[11];kP[0]=kU;kP[1]=kT;kP[2]=kS;kP[3]=kQ;kP[4]=kG;kP[5]=kF;kP[6]=kE;kP[7]=kD;kP[8]=kO;kP[9]=kN;kP[10]=kM;kP[11]=kL;kP[12]=kU*kJ+kG*kI+kO*kH+kR[12];kP[13]=kT*kJ+kF*kI+kN*kH+kR[13];kP[14]=kS*kJ+kE*kI+kM*kH+kR[14];kP[15]=kQ*kJ+kD*kI+kL*kH+kR[15]}return kP};e.scale=function(kG,kE,kF){var kD=kF[0],kI=kF[1],kH=kF[2];kG[0]=kE[0]*kD;kG[1]=kE[1]*kD;kG[2]=kE[2]*kD;kG[3]=kE[3]*kD;kG[4]=kE[4]*kI;kG[5]=kE[5]*kI;kG[6]=kE[6]*kI;kG[7]=kE[7]*kI;kG[8]=kE[8]*kH;kG[9]=kE[9]*kH;kG[10]=kE[10]*kH;kG[11]=kE[11]*kH;kG[12]=kE[12];kG[13]=kE[13];kG[14]=kE[14];kG[15]=kE[15];return kG};e.rotate=function(kX,k4,k6,kD){var kN=kD[0],kM=kD[1],kL=kD[2],kY=Math.sqrt(kN*kN+kM*kM+kL*kL),kS,k2,kR,k8,k7,k5,k3,kK,kJ,kI,kH,kW,kV,kU,kT,kQ,kP,kO,k1,k0,kZ,kG,kF,kE;if(Math.abs(kY)<kC){return null}kY=1/kY;kN*=kY;kM*=kY;kL*=kY;kS=Math.sin(k6);k2=Math.cos(k6);kR=1-k2;k8=k4[0];k7=k4[1];k5=k4[2];k3=k4[3];kK=k4[4];kJ=k4[5];kI=k4[6];kH=k4[7];kW=k4[8];kV=k4[9];kU=k4[10];kT=k4[11];kQ=kN*kN*kR+k2;kP=kM*kN*kR+kL*kS;kO=kL*kN*kR-kM*kS;k1=kN*kM*kR-kL*kS;k0=kM*kM*kR+k2;kZ=kL*kM*kR+kN*kS;kG=kN*kL*kR+kM*kS;kF=kM*kL*kR-kN*kS;kE=kL*kL*kR+k2;kX[0]=k8*kQ+kK*kP+kW*kO;kX[1]=k7*kQ+kJ*kP+kV*kO;kX[2]=k5*kQ+kI*kP+kU*kO;kX[3]=k3*kQ+kH*kP+kT*kO;kX[4]=k8*k1+kK*k0+kW*kZ;kX[5]=k7*k1+kJ*k0+kV*kZ;kX[6]=k5*k1+kI*k0+kU*kZ;kX[7]=k3*k1+kH*k0+kT*kZ;kX[8]=k8*kG+kK*kF+kW*kE;kX[9]=k7*kG+kJ*kF+kV*kE;kX[10]=k5*kG+kI*kF+kU*kE;kX[11]=k3*kG+kH*kF+kT*kE;if(k4!==kX){kX[12]=k4[12];kX[13]=k4[13];kX[14]=k4[14];kX[15]=k4[15]}return kX};e.rotateX=function(kD,kK,kJ){var kP=Math.sin(kJ),kI=Math.cos(kJ),kO=kK[4],kN=kK[5],kM=kK[6],kL=kK[7],kH=kK[8],kG=kK[9],kF=kK[10],kE=kK[11];if(kK!==kD){kD[0]=kK[0];kD[1]=kK[1];kD[2]=kK[2];kD[3]=kK[3];kD[12]=kK[12];kD[13]=kK[13];kD[14]=kK[14];kD[15]=kK[15]}kD[4]=kO*kI+kH*kP;kD[5]=kN*kI+kG*kP;kD[6]=kM*kI+kF*kP;kD[7]=kL*kI+kE*kP;kD[8]=kH*kI-kO*kP;kD[9]=kG*kI-kN*kP;kD[10]=kF*kI-kM*kP;kD[11]=kE*kI-kL*kP;return kD};e.rotateY=function(kH,kO,kN){var kP=Math.sin(kN),kM=Math.cos(kN),kG=kO[0],kF=kO[1],kE=kO[2],kD=kO[3],kL=kO[8],kK=kO[9],kJ=kO[10],kI=kO[11];if(kO!==kH){kH[4]=kO[4];kH[5]=kO[5];kH[6]=kO[6];kH[7]=kO[7];kH[12]=kO[12];kH[13]=kO[13];kH[14]=kO[14];kH[15]=kO[15]}kH[0]=kG*kM-kL*kP;kH[1]=kF*kM-kK*kP;kH[2]=kE*kM-kJ*kP;kH[3]=kD*kM-kI*kP;kH[8]=kG*kP+kL*kM;kH[9]=kF*kP+kK*kM;kH[10]=kE*kP+kJ*kM;kH[11]=kD*kP+kI*kM;return kH};e.rotateZ=function(kH,kK,kJ){var kP=Math.sin(kJ),kI=Math.cos(kJ),kG=kK[0],kF=kK[1],kE=kK[2],kD=kK[3],kO=kK[4],kN=kK[5],kM=kK[6],kL=kK[7];if(kK!==kH){kH[8]=kK[8];kH[9]=kK[9];kH[10]=kK[10];kH[11]=kK[11];kH[12]=kK[12];kH[13]=kK[13];kH[14]=kK[14];kH[15]=kK[15]}kH[0]=kG*kI+kO*kP;kH[1]=kF*kI+kN*kP;kH[2]=kE*kI+kM*kP;kH[3]=kD*kI+kL*kP;kH[4]=kO*kI-kG*kP;kH[5]=kN*kI-kF*kP;kH[6]=kM*kI-kE*kP;kH[7]=kL*kI-kD*kP;return kH};e.fromRotationTranslation=function(kQ,kO,kM){var kJ=kO[0],kI=kO[1],kH=kO[2],kK=kO[3],kR=kJ+kJ,kD=kI+kI,kL=kH+kH,kG=kJ*kR,kF=kJ*kD,kE=kJ*kL,kP=kI*kD,kN=kI*kL,kU=kH*kL,kV=kK*kR,kT=kK*kD,kS=kK*kL;kQ[0]=1-(kP+kU);kQ[1]=kF+kS;kQ[2]=kE-kT;kQ[3]=0;kQ[4]=kF-kS;kQ[5]=1-(kG+kU);kQ[6]=kN+kV;kQ[7]=0;kQ[8]=kE+kT;kQ[9]=kN-kV;kQ[10]=1-(kG+kP);kQ[11]=0;kQ[12]=kM[0];kQ[13]=kM[1];kQ[14]=kM[2];kQ[15]=1;return kQ};e.fromQuat=function(kN,kK){var kH=kK[0],kG=kK[1],kF=kK[2],kI=kK[3],kO=kH+kH,kD=kG+kG,kJ=kF+kF,kE=kH*kO,kM=kG*kO,kL=kG*kD,kU=kF*kO,kT=kF*kD,kR=kF*kJ,kS=kI*kO,kQ=kI*kD,kP=kI*kJ;kN[0]=1-kL-kR;kN[1]=kM+kP;kN[2]=kU-kQ;kN[3]=0;kN[4]=kM-kP;kN[5]=1-kE-kR;kN[6]=kT+kS;kN[7]=0;kN[8]=kU+kQ;kN[9]=kT-kS;kN[10]=1-kE-kL;kN[11]=0;kN[12]=0;kN[13]=0;kN[14]=0;kN[15]=1;return kN};e.frustum=function(kH,kE,kM,kD,kL,kJ,kI){var kK=1/(kM-kE),kG=1/(kL-kD),kF=1/(kJ-kI);kH[0]=(kJ*2)*kK;kH[1]=0;kH[2]=0;kH[3]=0;kH[4]=0;kH[5]=(kJ*2)*kG;kH[6]=0;kH[7]=0;kH[8]=(kM+kE)*kK;kH[9]=(kL+kD)*kG;kH[10]=(kI+kJ)*kF;kH[11]=-1;kH[12]=0;kH[13]=0;kH[14]=(kI*kJ*2)*kF;kH[15]=0;return kH};e.perspective=function(kG,kF,kE,kH,kD){var kJ=1/Math.tan(kF/2),kI=1/(kH-kD);kG[0]=kJ/kE;kG[1]=0;kG[2]=0;kG[3]=0;kG[4]=0;kG[5]=kJ;kG[6]=0;kG[7]=0;kG[8]=0;kG[9]=0;kG[10]=(kD+kH)*kI;kG[11]=-1;kG[12]=0;kG[13]=0;kG[14]=(2*kD*kH)*kI;kG[15]=0;return kG};e.ortho=function(kG,kE,kM,kD,kK,kJ,kI){var kH=1/(kE-kM),kL=1/(kD-kK),kF=1/(kJ-kI);kG[0]=-2*kH;kG[1]=0;kG[2]=0;kG[3]=0;kG[4]=0;kG[5]=-2*kL;kG[6]=0;kG[7]=0;kG[8]=0;kG[9]=0;kG[10]=2*kF;kG[11]=0;kG[12]=(kE+kM)*kH;kG[13]=(kK+kD)*kL;kG[14]=(kI+kJ)*kF;kG[15]=1;return kG};e.lookAt=function(kR,kY,kZ,kJ){var kX,kW,kU,kF,kE,kD,kM,kL,kK,kS,kV=kY[0],kT=kY[1],kQ=kY[2],kI=kJ[0],kH=kJ[1],kG=kJ[2],kP=kZ[0],kO=kZ[1],kN=kZ[2];if(Math.abs(kV-kP)<kC&&Math.abs(kT-kO)<kC&&Math.abs(kQ-kN)<kC){return e.identity(kR)}kM=kV-kP;kL=kT-kO;kK=kQ-kN;kS=1/Math.sqrt(kM*kM+kL*kL+kK*kK);kM*=kS;kL*=kS;kK*=kS;kX=kH*kK-kG*kL;kW=kG*kM-kI*kK;kU=kI*kL-kH*kM;kS=Math.sqrt(kX*kX+kW*kW+kU*kU);if(!kS){kX=0;kW=0;kU=0}else{kS=1/kS;kX*=kS;kW*=kS;kU*=kS}kF=kL*kU-kK*kW;kE=kK*kX-kM*kU;kD=kM*kW-kL*kX;kS=Math.sqrt(kF*kF+kE*kE+kD*kD);if(!kS){kF=0;kE=0;kD=0}else{kS=1/kS;kF*=kS;kE*=kS;kD*=kS}kR[0]=kX;kR[1]=kF;kR[2]=kM;kR[3]=0;kR[4]=kW;kR[5]=kE;kR[6]=kL;kR[7]=0;kR[8]=kU;kR[9]=kD;kR[10]=kK;kR[11]=0;kR[12]=-(kX*kV+kW*kT+kU*kQ);kR[13]=-(kF*kV+kE*kT+kD*kQ);kR[14]=-(kM*kV+kL*kT+kK*kQ);kR[15]=1;return kR};e.str=function(kD){return"mat4("+kD[0]+", "+kD[1]+", "+kD[2]+", "+kD[3]+", "+kD[4]+", "+kD[5]+", "+kD[6]+", "+kD[7]+", "+kD[8]+", "+kD[9]+", "+kD[10]+", "+kD[11]+", "+kD[12]+", "+kD[13]+", "+kD[14]+", "+kD[15]+")"};e.frob=function(kD){return(Math.sqrt(Math.pow(kD[0],2)+Math.pow(kD[1],2)+Math.pow(kD[2],2)+Math.pow(kD[3],2)+Math.pow(kD[4],2)+Math.pow(kD[5],2)+Math.pow(kD[6],2)+Math.pow(kD[6],2)+Math.pow(kD[7],2)+Math.pow(kD[8],2)+Math.pow(kD[9],2)+Math.pow(kD[10],2)+Math.pow(kD[11],2)+Math.pow(kD[12],2)+Math.pow(kD[13],2)+Math.pow(kD[14],2)+Math.pow(kD[15],2)))};ky.mat4=e})(window);function cj(){this.result={bkData:[],eleData:[[],[],[],[],[],[],[],[],[],[]],tileLabels:[]}}e6.extend(cj.prototype,{createLayer:function(T,i){var e=this.result.bkData;i=i||{};if(!e[T]){e[T]=[[],[],[]]}e[T].tileTypeName=i.tileTypeName||"na";e[T].dataType=i.dataType||2;e[T].png8=i.png8||false;e[T].pack=i.pack||false;e[T].clipTile=i.clipTile||false;e[T].boundary=i.boundary||false;if(i.ontology){e[T].ontology=i.ontology}},removeLayer:function(i){var e=this.result.bkData;e[i]=null},hasLayerBoundary:function(){var e=this.result.bkData;var T=false;for(var kv=0;kv<e.length;kv++){if(e[kv]&&e[kv].boundary){T=true;break}}return T},getResult:function(){return this.result},setData:function(kx,kw,ky){var e=this.result.bkData;var T=e[kw]?e[kw][ky]:null;if(!T){return}for(var kv=0;kv<T.length;kv++){if(T[kv].key&&T[kv].key===kx.key){T[kv]=kx;return}}T.push(kx)},setLabelData:function(T,i){var e=this.result.tileLabels;e[i||0]=T},getLabelData:function(i){var e=this.result.tileLabels;if(i===undefined){return e}return e[i]||[]},clearLabelData:function(i){var e=this.result.tileLabels;if(i===undefined){e=[];return}e[i]=[]},setOverlayData:function(T,e,i){if(!this.result.eleData[e]){return}if(e>=2&&e<=4){this.result.eleData[e][i||0]=T;return}else{if(e===0||e===5||e===6){T.sort(function(kw,kv){return kw.overlay.zIndex-kv.overlay.zIndex})}}this.result.eleData[e]=T},clearLabelOverlayData:function(e){if(e===undefined){this.result.eleData[2]=[];this.result.eleData[3]=[];this.result.eleData[4]=[]}this.result.eleData[2][e]=[];this.result.eleData[3][e]=[];this.result.eleData[4][e]=[]},clearData:function(kv){var e=this.result.bkData;if(typeof kv==="number"){if(e[kv]){e[kv][0]=[];e[kv][1]=[];e[kv][2]=[]}return}for(var T=0;T<e.length;T++){if(!e[T]){continue}e[T][0]=[];e[T][1]=[];e[T][2]=[]}},sortThumbData:function(i){var e=this.result.bkData;var T=e[i];if(!T){return}if(T[0]&&T[0].length>0){T[0].sort(function(kw,kv){return kw.tileInfo.useZoom-kv.tileInfo.useZoom})}}});var gz=(function(){var kF=new Int8Array(4);var T=new Int32Array(kF.buffer,0,1);var kA=new Float32Array(kF.buffer,0,1);function kH(kO){T[0]=kO;return kA[0]}function i(kO){kA[0]=kO;return T[0]}function kB(kO){var kQ=(kO[3]<<24|kO[2]<<16|kO[1]<<8|kO[0]);var kP=kH(kQ&4278190079);return kP}var kw=0;var kz=1;var kD=2;var kL=0;var kI=1;var kG=2;var kx=9;function kE(kO,kP){var kQ;if(kP%2===0){kQ=[-kO[1],kO[0]]}else{kQ=[kO[1],-kO[0]]}return kQ}function e(kO,kP,kQ){var kR=kE(kO,kP);var kS;if(kQ===kz){return kR}else{if(kP===4||kP===5){kS=[kR[0]-kO[0],kR[1]-kO[1]]}else{kS=[kR[0]+kO[0],kR[1]+kO[1]]}if(kQ===kw){vec2.normalize(kS,kS)}return kS}}function kK(kP,kO){return Math.sqrt(Math.pow(kP[0]-kO[0],2)+Math.pow(kP[1]-kO[1],2))}function kv(kS,kR,kQ,kO){var kP=vec2.dot(kS,kR);if(kQ===kG||kQ===kI){if((kO===0||kO===1)&&kP>0){return true}else{if((kO===2||kO===3)&&kP<0){return true}}}if((kO===0||kO===1)&&kP<0){return true}else{if((kO===2||kO===3)&&kP>0){return true}}return false}function kC(kP,kU,kW){var kV=kE(kP,kU);var kR;var kT=kP;var kS=kW;var kY=[];vec2.normalize(kY,[kT[0]+kS[0],kT[1]+kS[1]]);var kX=vec2.dot(kV,[-kY[1],kY[0]]);if(Math.abs(kX)<0.1){kX=1}var kQ=1/kX;kR=[-kY[1]*kQ,kY[0]*kQ];var kO=vec2.dot(kP,kR);if(kO<0){vec2.negate(kR,kR)}return{cos2:kO,offset:kR}}function kN(kP,kU,kW,kO){var kV=kE(kP,kU);var kT;var kS;var kR;if(kU===0||kU===1){kT=kW;kS=kP}else{kT=kP;kS=kW}if(!kT||!kS){return kV}var kY=[kT[0]+kS[0],kT[1]+kS[1]];if(kY[0]===0&&kY[1]===0){vec2.normalize(kY,kS)}else{vec2.normalize(kY,kY)}var kZ=kv(kY,kV,kO,kU);if(kZ){return kV}var kX=vec2.dot(kV,[-kY[1],kY[0]]);if(Math.abs(kX)<0.1){kX=1}var kQ=1/kX;kR=[-kY[1]*kQ,kY[0]*kQ];return kR}function kM(kZ,k0,kT,kS,k1,kY,kR,kU,kQ,kX){var kW;var kP=0;var kO=false;kW=kY.length/kx-1;ky(k0[0],kZ[0],kT[0],k1,kS,4,kU,kQ,undefined,kY,kX);kW++;kP++;ky(k0[0],kZ[0],kT[0],k1,kS,5,kU,kQ,undefined,kY,kX);kW++;kP++;for(var kV=0;kV<kZ.length;kV++){ky(k0[kV],kZ[kV],kT[kV],k1,kS,0,kU,kQ,kZ[kV-1],kY,kX);kJ(kR,++kW,++kP,kO);ky(k0[kV],kZ[kV],kT[kV],k1,kS,1,kU,kQ,kZ[kV-1],kY,kX);kJ(kR,++kW,++kP,kO);ky(k0[kV+1],kZ[kV],kT[kV+1],k1,kS,2,kU,kQ,kZ[kV+1],kY,kX);kJ(kR,++kW,++kP,kO);ky(k0[kV+1],kZ[kV],kT[kV+1],k1,kS,3,kU,kQ,kZ[kV+1],kY,kX);kJ(kR,++kW,++kP,kO);if(kS===kI&&kV!==kZ.length-1){ky(k0[kV+1],kZ[kV],kT[kV+1],k1,kS,8,kU,kQ,kZ[kV+1],kY,kX);kJ(kR,++kW,++kP,kO);kO=kO?false:true}}ky(k0[k0.length-1],kZ[kZ.length-1],kT[k0.length-1],k1,kS,6,kU,kQ,undefined,kY,kX);kJ(kR,++kW,++kP,kO);ky(k0[k0.length-1],kZ[kZ.length-1],kT[k0.length-1],k1,kS,7,kU,kQ,undefined,kY,kX);kJ(kR,++kW,++kP,kO)}function ky(k1,kR,kV,k2,kQ,kW,kT,kP,kZ,kY,kX){var k0=kW%2===0?1:-1;var kU;if(kW===4||kW===5||kW===6||kW===7){kU=e(kR,kW,k2)}else{if(kW===0||kW===1||kW===2||kW===3){kU=kN(kR,kW,kZ,kQ)}else{if(kW===8){var kS=kC(kR,kW,kZ);kU=kS.offset;vec2.normalize(kU,kU);var kO=kS.cos2;if(kO<0){k0=-k0}}}}kY[kY.length]=k1[0]*10;kY[kY.length]=k1[1]*10;kY[kY.length]=kU[0]*kP*10;kY[kY.length]=kU[1]*kP*10;kY[kY.length]=kT;kY[kY.length]=k0;kY[kY.length]=0;kY[kY.length]=kX||0;kY[kY.length]=kV}function kJ(kS,kQ,kO,kR){var kP;if(kO%2===0){if(kR){kS[kS.length]=kQ-2;kS[kS.length]=kQ-1;kS[kS.length]=kQ}else{kS[kS.length]=kQ-1;kS[kS.length]=kQ-2;kS[kS.length]=kQ}}else{if(kR){kS[kS.length]=kQ-1;kS[kS.length]=kQ-2;kS[kS.length]=kQ}else{kS[kS.length]=kQ-2;kS[kS.length]=kQ-1;kS[kS.length]=kQ}}}return{getVertexCount:function(kP,kO){if(kO===kI){return kP*5-2}else{return kP*4}},buildData:function(k0,kQ,k1,kW,kO,kT,kP,kX,kZ){var kY=[];var kV=kZ?kZ:0;var kS=[kV*10];for(var kU=0;kU<k0.length;kU++){if(kU>0){kV+=kK(k0[kU],k0[kU-1]);kS.push(kV*10)}if(kU!==k0.length-1){var kR=[k0[kU+1][0]-k0[kU][0],k0[kU+1][1]-k0[kU][1]];var k2=[];if(kR[0]===0&&kR[1]===0){k2=[0,0]}else{vec2.normalize(k2,kR)}kY[kY.length]=[k2[0],k2[1]]}}return kM(kY,k0,kS,kQ,k1,kW,kO,kB(kT),kP,kX)},toTileSolidLineVertices:function(kS,kP){var kQ=new Float32Array(kS.length/kx*5);var kO=new Int16Array(kQ.buffer);var kU=0;var kR=0;for(var kT=0;kT<kS.length;kT+=kx){kO[kU]=~~kS[kT];kO[kU+1]=~~kS[kT+1];kO[kU+2]=~~kS[kT+2];kO[kU+3]=~~kS[kT+3];kQ[kR+2]=kS[kT+4];kO[kU+6]=kS[kT+5];kO[kU+7]=kP?kP:0;kO[kU+8]=kS[kT+7];kO[kU+9]=0;kU+=10;kR+=5}return kQ}}})();var gS=1;var hY=2;var fn={drawIndex:0,devicePixelRatio:gp(),zoomState:1,curViewTilesInfo:null,iconSetImg:null,LAST_CALC_ZOOM:-1,LAST_LOAD_VECTOR_ZOOM_CHANGE:false,lastCollisionTestTime:0,remove:function(){this.tileCache.clear();this.removeLabel(this.drawIndex);if(this.tileLabels){this.tileLabels=[]}},removeLabel:function(i){if(this.dataType===2&&((this.tileType&&this.tileType.getName()==="na")||(this.ontology&&this.ontology instanceof eh))){this.map._featureMgr.clearData(i);this.map._featureMgr.clearLabelOverlayData(i);this.map._featureMgr.clearLabelData(i);var T=new fS("onspotsdataremove");T.index=i;this.map.dispatchEvent(T);if(this.ontology&&this.ontology instanceof eh){this.clearCache();return}var e=new fS("onlayer_update");e.name="na";this.map.fire(e)}},initDrawData:function(){this.drawIndex=this.zIndex;var e={tileTypeName:this.tileType.getName(),dataType:this.dataType,png8:this.png8,pack:this.pack,clipTile:this.clipTile,boundary:this.boundary};if(this.ontology){e.ontology=this.ontology}this.map._featureMgr.createLayer(this.drawIndex,e);this.dispatchEvent(new fS("oninitDrawData"))},destroyDrawData:function(){this.map._featureMgr.removeLayer(this.drawIndex);var i=new fS("onremoveLayerMask");i.hasLayerBoundary=this.map._featureMgr.hasLayerBoundary();this.map.dispatchEvent(i)},setZIndex:function(kz){kz=Math.abs(Math.floor(kz))||1;if(!kz||kz===this.zIndex){return}var kw=this.map._featureMgr.result.bkData;var kv=this.map.tileMgr.tileLayers;var kB=this.map._normalLayerMgr.layers;function kC(kH){var kF=null;var kG=[kv,kB];for(var kD=0;kD<kG.length;kD++){for(var kE=0;kE<kG[kD].length;kE++){if(kG[kD][kE].zIndex===kH){kF=kG[kD][kE];break}}if(kF){break}}return kF}var T=[];var ky=[];var kA=this.zIndex;var i=kC(kz);if(kw[kz]&&i){T.push(i);ky.push(kw[kz]);this.setTargetZIndex(kz);kw[kz]=kw[kA];kw[kA]=null}else{this.setTargetZIndex(kz);kw[kz]=kw[kA];kw[kA]=null;this.map.dispatchEvent(new fS("onupdate"));return}var kx=kz+1;while(kx){var e=kC(kx);if(kw[kx]&&e){T.push(e);ky.push(kw[kx]);T.shift().setTargetZIndex(kx);kw[kx]=ky.shift();kx+=1}else{T.shift().setTargetZIndex(kx);kw[kx]=ky.shift();kx=0}}this.map.dispatchEvent(new fS("onupdate"))},setZIndexTop:function(){var e=this.map._featureMgr.result.bkData;e[e.length]=e[this.zIndex];e[this.zIndex]=null;this.setTargetZIndex(e.length-1);this.map.dispatchEvent(new fS("onrefresh"))},setUpLevel:function(){var e=this._getAdjoinZIndex("up");if(this.zIndex!==e){this.setZIndex(e)}},setDownLevel:function(){var e=this._getAdjoinZIndex("down");if(this.zIndex!==e){this.setZIndex(e)}},getTileKey:function(e,kv){kv=kv||{};var i=typeof kv.useZoom==="number"?kv.useZoom:e.useZoom;var T=e.style||this.mapStyleId||"default";return this.mapType+"_"+T+"_"+e.col+"_"+e.row+"_"+e.zoom+"_"+i},getTileRenderDataKey:function(i){var T=i.col;var kv=i.zoom;var e=i.baseTileSize;T=e9.calcLoopParam(T,kv,e).col;return this.mapType+"_"+T+"_"+i.row+"_"+kv+"_"+i.useZoom},getTileUnits:function(e){var kv=this.map;var T=es[kv.getMapType()];var i=T.baseUnits*Math.pow(2,T.zoomLevelBase-e);return i},getTilesUrl:function(kw,kF,kG){var i=kw.x;var kH=kw.y;var kC=j6("ditu","normal");var ky=kC.ver;var kz=kC.udt;i=e9.calcLoopParam(i,kF,kG).col;var kE=es.B_NORMAL_MAP.vectorTileUrls;var kx=Math.abs(i+kH)%kE.length;var kD=kE[kx];if(window.offLineIPAddress){kE=[window.offLineIPAddress+"pvd/"];kD=kE[0]}var T="x="+i+"&y="+kH+"&z="+Math.floor(kF);var kB=this.devicePixelRatio>1?"&scaler=2":"";var kA="&textimg=1";if(this.map.config.textRenderType==="canvas"){kA="&textimg=0"}var kv=this.map.config.style;if(typeof kv==="string"&&kv!=="default"){T+="&styleId="+C.mapStyleNameIdPair[kv]}T+="&styles=pl"+kA+kB+"&v="+ky+"&udt="+kz+"&json=0";var e=kD+"?qt=vtile&param="+window.encodeURIComponent(e2(T));return e},getRasterTilesUrl:function(T,kx,kv){var kw=es[this.map.mapType];var i=this.map.config.style;var e=kw.tileUrls[Math.abs(kx+T)%kw.tileUrls.length]+"?qt=tile&x="+T+"&y="+kx+"&z="+kv+((i==="default"||typeof i!=="string")?"":("&styleId="+C.mapStyleNameIdPair[i]))+"&styles=pl&udt="+this.normalUdt+"&scaler="+this.scaler+"&p=1";e=e.replace(/-(\d+)/gi,"M$1");return e},getZoomState:function(){var T=this.map;var i=T.getZoom();var e=i-this.lastZoom;if(e>0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState},releaseOutViewTileData:function(e){var kw=this.map._workerMgr.releasePendingData(e);for(var kv=0,T=kw.length;kv<T;kv++){var kx=this.getTileKey(kw[kv]);this.tileCache.removeData(kx)}},loadLayerData:function(e,kv,i){this.hasZoomChange=i;this.curViewTilesInfo=e;if(this.ontology instanceof eh){this.loadTileData&&this.loadTileData(e,kv);return}this.mapStyleId=this.map.getMapStyleId();this.releaseOutViewTileData(e);var T=this.getZoomState();if(this.dataType===hY){if(kv){this.getVectorLayerDataFromCache(e,T)}else{this.loadVectorLayerData(e)}}else{this.loadRasterLayerData(e,kv)}},getVectorLayerDataFromCache:function(kB,kN){this.map.temp.isPermitSpotOver=false;this.tileLabels=[];var kQ=this.map._displayOptions;if(this.mapType===BMAP_NORMAL_MAP){var kF=this.map._customLabelMgr.virtualTiles.custom;if(kF&&kF instanceof Array){for(var kL=0;kL<kF.length;kL++){this.tileLabels.push(kF[kL].label);if(!kF[kL].label.iconReady){var kH=false;var kP=kF[kL].label.fixedLabel;for(var kJ=0;kJ<kP.length;kJ++){var kA=kP[kJ];if(!kA.iconPos){continue}else{if(!kA.iconPos.texcoord){kH=true;break}}}if(!kH){kF[kL].label.iconReady=true}else{kF[kL].label.iconReady=false;this.updateAllIconsTextureCoords(kF[kL])}}}}}this.thumbCache={};var kO=-1;for(var kL=0,kG=kB.length;kL<kG;kL++){var kM=kB[kL];var kw=kM.col;var kx=kM.row;var T=kM.zoom;var kI=this._getTileTexImgKey(kM);var kv=kM.useZoom;kO=T;var ky=this.getTileKey(kM);var kS=this.tileCache.getData(ky);if(kS&&kS.status==="ready"){var kT=kS;this.map._featureMgr.setData(kS,this.drawIndex,2);if(kQ.poi&&kS.label){if(kS.label.status==="ready"){kS.label.tileInfo=kS.tileInfo;this.tileLabels.push(kS.label);if(kS.label.textureSources&&kS.label.textureSources[kv]&&this.map._webglMapScene){var kR=this.map._webglMapScene._painter;if(!kR._labelTextureAtlasOffset[kI]){kR._addToAsyncJob(kS.label.textureSources[kv])}}}else{if(kS.label.status!=="processing"){this.processLabelData(kS)}}}}else{var kK={tileInfo:kM,dataType:hY,key:ky};this.map._featureMgr.setData(kK,this.drawIndex,2);if(this.useThumbData){this.setThumbData(kw,kx,T,kv,kN)}}}this.tileLabels.labelZoom=kO;this.updateLabels(kN);var kC=this.map.getZoom();var kz=Math.floor(kC);var kE=kC-kz;var kD=Math.floor(this.LAST_CALC_ZOOM);var e=this.LAST_CALC_ZOOM-kD;var kU=false;if(this.hasZoomChange){if(Math.abs(kC-this.LAST_CALC_ZOOM)>=0.5){kU=true}else{if(kE<0.5&&e>=0.5){kU=true}else{if(kE>=0.5&&e<0.5){kU=true}}}if(kU){this.cacheDataCollideLabels(0)}this.LAST_CALC_ZOOM=kC}else{if(this.tileLabels.length>0){this.cacheDataCollideLabels(e6.Browser.ie?50:30)}}},loadVectorLayerData:function(kB){this.map.temp.isPermitSpotOver=false;var kA=this;function kz(i,kC){var kE=kA.tileCache.getData(kC);if(!kE){return}if(!i||i.error){i.event&&bD.fetchDebug&&bD.fetchDebug.sendError({title:i.event.title,msg:i.event.msg,category:bD.fetchDebug.category.AJAX,level:bD.fetchDebug.levels.ERROR,url:i.event.title});var kD=new fS("ontileloaderror");i=i||{};kD.error=i.error||"";kD.message=i.message||"";kA.map.fire(kD);kE.status="init";kE.reloadTimer=setTimeout(function(){if(kE.retry<3){kE.retry++;kE.status="loading";kA.loadVectorTileData(i.tileInfo,kz)}else{kA.tileCache.removeData(kC);kA._checkTilesLoaded()}},4000);if(kA.map._featureMgr){kA.map._featureMgr.clearData(kA.drawIndex)}kA.getVectorLayerDataFromCache(kA.curViewTilesInfo,kA.getZoomState());return}if(kE.reloadTimer){clearTimeout(kE.reloadTimer);kE.reloadTimer=null}kA.callbackDataQueue.push([i,kC]);if(kA.processDataTimer){return}kA.processDataTimer=setTimeout(function(){while(kA.callbackDataQueue.length>0){var kG=kA.callbackDataQueue.shift();kA.vectorTileDataCbk(kG[0],kG[1]);kA._checkTilesLoaded()}if(kA.map._featureMgr){kA.map._featureMgr.clearData(kA.drawIndex)}kA.getVectorLayerDataFromCache(kA.curViewTilesInfo,kA.getZoomState());var kF=new fS("onrefresh");kF.source="webgllayer";kA.map.dispatchEvent(kF);kA.processDataTimer=null},200)}for(var ky=0,kw=kB.length;ky<kw;ky++){var T=kB[ky];var kx=this.getTileKey(T);var e=this.tileCache.getData(kx);if(!e){e={status:"init",tileInfo:T,dataType:hY,key:kx,retry:0}}if(e.status!=="ready"&&e.status!=="loading"){this.numLoading++;this.numTileLoading++;e.status="loading";this.tileCache.setData(kx,e);var kv=this.getProcessedLabelZoom(T);if(kv){T.processedLabelZooms=kv}this.loadVectorTileData(T,kz)}}},setThumbData:function(i,kw,kv,e,T){if(T===1){if(this._findParentZoomTile(i,kw,kv,e,8)===false){this._findChildZoomTile(i,kw,kv,e,3)}}else{if(T===-1){if(this._findChildZoomTile(i,kw,kv,e,3)===false){this._findParentZoomTile(i,kw,kv,e,8)}}}this.map._featureMgr.sortThumbData(this.drawIndex)},_findParentZoomTile:function(ky,kH,kG,kw,kB){var kx=es[this.getMapType()];var T=kx.minDataZoom;var e=ky;var kE=kH;var kC=kG;var kD=kw;for(var kA=1;kA<=kB;kA++){var kv=this.tileType.getParentTile(e,kE,kC,kD,T);if(kv===null){continue}var kF=this.getTileKey(kv);var kz=this.tileCache.getData(kF);if(kz&&kz.status==="ready"){if(this.thumbCache[kF]){continue}this.map._featureMgr.setData(kz,this.drawIndex,0);this.thumbCache[kF]=true;return true}e=kv.col;kE=kv.row;kC=kv.zoom;kD=kv.useZoom}return false},_findChildZoomTile:function(kz,kB,e,kw,kK){var kI=es[this.getMapType()];var kE=kI.maxDataZoom;var ky=kz;var kA=kB;var kC=e;var kv=kw;var kx=true;for(var kH=1;kH<=kK;kH++){var kF=false;var T=this.tileType.getChildTiles(ky,kA,kC,kv,kE,kH);if(!T){continue}for(var kG=0;kG<T.length;kG++){var kD=this.getTileKey(T[kG]);var kJ=this.tileCache.getData(kD);if(kJ&&kJ.status==="ready"){if(!this.thumbCache[kD]){this.map._featureMgr.setData(kJ,this.drawIndex,1);this.thumbCache[kD]=true}kF=true}else{kx=false}}if(kF){break}}return kx},loadVectorTileData:function(kI,kJ){var kw=kI.col;var kx=kI.row;var e=kI.zoom;var kG=kI.baseTileSize;var kv=this.getTilesUrl(new fr(kw,kx),e,kG);var ky=this.map.getPrivateRegions();if(!this.processData&&this.map.getPrivateStatus()&&ky){var kE=kI.useZoom;var kD=this.tileType.getMercatorSize(kE);var kC=kw*kD;var kB=kx*kD;var kF=new cD(kC+kD/2,kB+kD/2);var kA=new ie(new cD(kC,kB),new cD(kC+kD,kB+kD));var kz=gp()>=1.5?2:1;for(var kH=0;kH<ky.length;kH++){if(ky[kH] instanceof cS){if(ky[kH].crossPoint(kF,kA,kE)){var kK={x:kw,y:kx,z:e,mapZoom:kE,scalerRadio:kz,textimg:this.map.config.textRenderType==="canvas"?0:1};var T=ky[kH].tileUrlFunction(kv,kK);if(T&&T.url){kv=T.url;T.header&&(kI.header=T.header)}break}}}}if(!kv){return}var kM=this.getTileKey(kI);hv(this.map);if(!this.processData){if(!this.map||!this.map._workerMgr){return}this.map._workerMgr.loadTileData(kv,kI,kM,kJ);return}var kJ="cbk"+kM.replace(/-/g,"_");var kL=this;bD[kJ]=function(i){var kN=(function(kO){return function(){kO.tileInfo=kI;var kU=kL.processData(kO);if(!kU.road){return}var kR={tileInfo:kI,renderData:{base:[]},status:"ready",key:kM,mapType:kL.mapType};var kX=[];var k0=[];for(var kT=0;kT<kU.road.length;kT++){var kW=kU.road[kT];var kV=-1;for(var kS=0;kS<kW.length;kS++){var kY=kW[kS];var kZ=[];if(kX.length/7+kY[0].length/2>65536){kR.renderData.base.push({type:"line",data:[gz.toTileSolidLineVertices(kX,4000),new Uint16Array(k0)]});kX=[];k0=[]}for(var kQ=0;kQ<kY[0].length;kQ+=2){kZ[kZ.length]=[kY[0][kQ],kY[0][kQ+1]]}var kP=kY[3];gz.buildData(kZ,kY[1],kY[2],kX,k0,kP,kY[4],kT+20)}kR.renderData.base.push({type:"line",data:[gz.toTileSolidLineVertices(kX,4000),new Uint16Array(k0)]})}kL.tileCache.setData(kM,kR);if(kL.map._featureMgr){kL.map._featureMgr.clearData(kL.drawIndex)}kL.getVectorLayerDataFromCache(kL.curViewTilesInfo,kL.getZoomState());kL.map.dispatchEvent(new fS("onrefresh"))}})(i);kL.map.jobScheduler.addJob(kN);delete bD[kJ]};kv+="&fn="+encodeURIComponent(fB+"."+kJ);gZ.load(kv)},vectorTileDataCbk:function(kv,kw){var kA=new fS("ontileloaded");kA.perfStat=kv.perfStat||[];var e=this.map;e.fire(kA);var i=kv.tileInfo;var T=i.col;var kF=i.row;var kE=i.zoom;var kD=i.baseTileSize;var ky=this.tileCache.getData(kw);if(!ky){return}if(!this.showLabel){kv.label=null}ky.renderData=kv;ky.tileInfo=i;var kx=e9.calcLoopParam(T,kE,kD);var kB=kx.geoOffsetX;ky.tileInfo.loopOffsetX=kB;ky.status="ready";ky.mapType=this.mapType;this.tileCache.setData(kw,ky);ky.label=kv.label;kv.label=null;if(kv.indoorData&&e._indoorMgr){e._indoorMgr.setData(kv.indoorData)}var kz="id_"+T+"_"+kF+"_"+kE;if(!this.curViewTilesInfo[kz]){e.fire(new fS("ontilenotinview"));return}var kC=e._displayOptions;if(kC.poi){this.processLabelData(ky)}if(kv.indoorData&&e._indoorMgr&&e._indoorMgr.currentUid){this._refreshIndoorData(e._indoorMgr.currentUid,e._indoorMgr.currentFloor)}},_refreshIndoorData:function(kD,kC){var kF=this.map._indoorMgr.getIndoorData(kD);if(this.map&&this.map.parking){this.map.parking.currentUid=kD;this.map.parking.currentFloor=kC}var kI=kF.tileKeys;var kG=Math.floor(this.map.getZoom());for(var kA=0;kA<kI.length;kA++){var kx=kI[kA];var kz=this.tileCache.getData(kx);if(!kz||!kz.renderData){continue}var kH=kz.renderData;if(!kH){continue}kH.indoorBase=[];kH.indoorBaseContour=[];kH.indoorBorder3D=[];kH.indoorArea3D=[];kz.label.indoorLabel=[];this.labelProcessor.clearCollisionCache(kz.label);for(var kB in kH.indoorData){if(kB==="tileInfo"){continue}var e=kH.indoorData[kB];var kw=e.defaultFloor;if(kB===kD){kw=kC;e.currentFloor=kC}if(e.floors[kw]){if(e.floors[kw].base){for(var ky=0;ky<e.floors[kw].base.length;ky++){kH.indoorBase.push(e.floors[kw].base[ky])}}if(e.floors[kw].contour){for(var ky=0;ky<e.floors[kw].contour.length;ky++){kH.indoorBaseContour.push(e.floors[kw].contour[ky])}}if(e.floors[kw].indoorBorder3D){kH.indoorBorder3D.push(e.floors[kw].indoorBorder3D)}if(e.floors[kw].area3D){kH.indoorArea3D.push(e.floors[kw].area3D)}if(e.floors[kw].pois){kz.label.indoorLabel=kz.label.indoorLabel.concat(e.floors[kw].pois)}}}this.updateAllIconsTextureCoords(kz);var kE=this;this.labelProcessor.loadIconImages(kz,function(i){kE.updateAllIconsTextureCoords(i)},"indoor");var kv=kx.split("_");var T=parseInt(kv[kv.length-1],10);if(T!==kG){continue}kE.map._featureMgr.setData(kz,this.drawIndex,2)}this.dataBackCollideLabels();this.map.dispatchEvent(new fS("onrefresh"))},_removeIndoorData:function(i){if(!i.indoorData){return}for(var e in i.indoorData){if(e==="tileInfo"){continue}this.map._indoorMgr.removeData(e,i.key)}},getProcessedLabelZoom:function(kv){var kw=kq.baseZoomInfo[kv.zoom];if(!kw){return false}var T=[];for(var kx=0;kx<kw.length;kx++){var ky=this.getTileKey(kv,{useZoom:kw[kx]});var e=this.tileCache.getData(ky);if(e&&e.status==="ready"&&e.label&&e.label.status==="ready"){T.push(kw[kx])}}if(T.length){return T}else{return false}},getSameZoomDataFromCache:function(T){var kv=kq.baseZoomInfo[T.zoom];for(var kw=0;kw<kv.length;kw++){var kx=this.getTileKey(T,{useZoom:kv[kw]});if(T.useZoom===kv[kw]){continue}var e=this.tileCache.getData(kx);if(e&&e.status==="ready"&&e.label&&e.label.status==="ready"){return e}}return false},hasSameLabelData:function(kv,T){for(var e=0;e<T.length;e++){if(T[e].key===kv){return true}}return false},getDataByFloorName:function(T,kv){for(var e=0;e<T.length;e++){if(T[e].floorName===kv){return T[e]}}return null},mergeIndoorLabelData:function(kA,e){for(var ky in kA){if(ky==="tileInfo"){continue}if(e[ky]){var T=kA[ky].floors;var kB=e[ky].floors;for(var kw=0;kw<T.length;kw++){var kv=T[kw];var kz=kv.floorName;var kx=this.getDataByFloorName(kB,kz);if(kx){if(kx.pois){kx.pois=kx.pois.concat(kv.pois);kv.pois=kx.pois}else{kx.pois=kv.pois}}}}}},mergeSameZoomLabelData:function(ky){var kw=ky.label;if(!kw){return}var e=ky.tileInfo;var kx=this.getSameZoomDataFromCache(e);if(!kx){return}var kv=kx.label;if(!kv){return}for(var T=0;T<kw.fixedLabel.length;T++){if(!this.hasSameLabelData(kw.fixedLabel[T].key,kv.fixedLabel)){kv.hasNewData=true;kv.fixedLabel.push(kw.fixedLabel[T])}}for(var T=0;T<kw.lineLabel.length;T++){if(!this.hasSameLabelData(kw.lineLabel[T].key,kv.lineLabel)){kv.hasNewData=true;kv.lineLabel.push(kw.lineLabel[T])}}for(var T=0;T<kw.indoorLabel.length;T++){if(!this.hasSameLabelData(kw.indoorLabel[T].key,kv.indoorLabel)){kv.hasNewData=true;kv.indoorLabel.push(kw.indoorLabel[T])}}ky.label=kv;if(kx.renderData.indoorData&&ky.renderData.indoorData){this.mergeIndoorLabelData(ky.renderData.indoorData,kx.renderData.indoorData)}},processLabelData:function(kx){if(!kx.label){return}if(kx.label.status==="processing"){return}kx.label.status="processing";var kv=this;kv.updateAllIconsTextureCoords(kx);this.labelProcessor.loadIconImages(kx,function(ky){kv.updateAllIconsTextureCoords(ky)});if(this.map.config.textRenderType==="canvas"){var e=this.labelProcessor.drawLabelsOnCanvas(kx,function(kA,kC){var kz=kx.tileInfo;var kB=kv.map.config.mapStyleId;if(!bD["customStyleInfo_"+kB]){kv.mergeSameZoomLabelData(kx)}if(kA){if(!kx.label.textureHeights){kx.label.textureHeights=[]}kx.label.textureHeights[kz.useZoom]=kA.height}if(kC){if(!kx.label.indoorTextureHeights){kx.label.indoorTextureHeights=[]}kx.label.indoorTextureHeights[kz.useZoom]=kC.height}var ky=kv._getTileTexImgKey(kz);kv._doWorkAfterLabelImageLoad(kx,kA,kC,ky)});return}var T=kx.label.textImageBitmap||kx.label.textImgStr;var kw=kx.label.indoorTextImageBitmap||kx.label.indoorTextImgStr;this.labelProcessor.loadImgByStr(T,kw,function i(kD,kB){var kA=kx.label.textureHeight;var kE=kx.label.indoorTextureHeight;kx.label.textureHeight=undefined;kx.label.indoorTextureHeight=undefined;var kz=kx.tileInfo;kv.mergeSameZoomLabelData(kx);var kC=kx.label;kC.textImgStr="";kC.indoorTextImgStr&&(kC.indoorTextImgStr="");if(!kC.textureHeights){kC.textureHeights=[]}kC.textureHeights[kz.useZoom]=kA;if(!kC.indoorTextureHeights){kC.indoorTextureHeights=[]}kC.indoorTextureHeights[kz.useZoom]=kE;var ky=kv._getTileTexImgKey(kz);kv._doWorkAfterLabelImageLoad(kx,kD,kB,ky)})},_getTileTexImgKey:function(i){var T=i.style||this.mapStyleId||"default";var e=T+"_"+i.col+"_"+i.row+"_"+i.zoom;if(this.map.config.textRenderType==="canvas"){e+="_"+i.useZoom}return e},_doWorkAfterLabelImageLoad:function(kv,ky,e,kC){var kx=this;var kA=kv.label;kA.tileInfo=kv.tileInfo;kA.status="ready";if(ky||e){var T=kA.tileInfo;if(ky){ky.id=kC;if(!kA.textureSources){kA.textureSources=[]}kA.textureSources[T.useZoom]=ky}if(e){e.id=kC+"_indoor";if(!kA.indoorTextureSources){kA.indoorTextureSources=[]}kA.indoorTextureSources[T.useZoom]=e}if(kx.map._webglMapScene){var kB=kx.map._webglMapScene._painter;if(ky){kB._addToAsyncJob(kA.textureSources[T.useZoom])}}}if(kv.custom!==true){kx.tileLabels.push(kA)}else{if(!ky&&kx.tileLabels){for(var kw=0;kw<kx.tileLabels.length;kw++){var kz=kx.tileLabels[kw];this.labelProcessor.clearCollisionCache(kz)}}setTimeout(function(){kx.updateAllIconsTextureCoords(kv);kx.labelProcessor.loadIconImages(kv,function(i){kx.updateAllIconsTextureCoords(kv)},true);kx.map.dispatchEvent(new fS("onupdate"))},200)}if(kx.collisionTimer){return}kx.collisionTimer=setTimeout(function(){kx.dataBackCollideLabels();kx.collisionTimer=null},300)},_updateIconTextureCoords:function(kz,T){if(!kz){return}var ky=this.map;for(var kv=0;kv<kz.length;kv++){var kx=kz[kv];if(!kx.iconPos){continue}if(ky._webglMapScene){var e=ky._webglMapScene._painter;var kw=T+"_"+kx.iconPos.iconType;kx.iconPos.texcoord=e._iconTextureAtlasCoords[kw]||null}}},updateAllIconsTextureCoords:function(kw){if(this.map.viewAnimationTime){return}if(kw){if(kw.label){var i=kw.tileInfo.style;this._updateIconTextureCoords(kw.label.fixedLabel,i);this._updateIconTextureCoords(kw.label.indoorLabel,i)}}else{var kv=this.tileCache.getAllData();for(var T in kv){var e=kv[T].data;if(e.status==="ready"&&e.label){var i=e.tileInfo.style;this._updateIconTextureCoords(e.label.fixedLabel,i);this._updateIconTextureCoords(e.label.indoorLabel,i)}}}this.updateLabels();this.map.dispatchEvent(new fS("onrefresh"))},cacheDataCollideLabels:function(T){var kw=this;var i=this.map._featureMgr;function kv(){if(kw&&!kw.map.tileMgr&&!kw.map.tileMgr.isExitTileLayer(kw)){return}kw.cacheLabelTimer=null;var kx;var ky=kw.map.getTilt();var kA=kw.map.getHeading()%360;if(kw.tileLabels.length===0||(kw.tileLabels.length===1&&kw.tileLabels[0].tileInfo.zoom===0)){kx=i.getLabelData(kw.drawIndex);if(kx.length>0){kx=kw.labelProcessor.collisionTest(kx,-1)}}else{if(ky||kA){if(this._collisionTimer){if(!ky){clearTimeout(this._collisionTimer)}else{if(Date.now()-kw.lastCollisionTestTime>500){kw.lastCollisionTestTime=Date.now()}else{clearTimeout(this._collisionTimer)}}}this._collisionTimer=setTimeout(function(){if(kw&&!kw.map.tileMgr&&!kw.map.tileMgr.isExitTileLayer(kw)){kw._collisionTimer=null;return}kx=kw.labelProcessor.collisionTest(kw.tileLabels);if(kx){if(kw._isInnerLayer&&kw.map.stencil&&kw.map.stencil.isPoiMask){var kB=kw.isPoiInPolygon(kx);i.setLabelData(kB,kw.drawIndex)}else{i.setLabelData(kx,kw.drawIndex)}}kw.updateLabels();kw.map.dispatchEvent(new fS("onrefresh"));kw._collisionTimer=null},60);return}else{kx=kw.labelProcessor.getCachedLabels(kw.tileLabels)}}if(kx){if(kw._isInnerLayer&&kw.map.stencil&&kw.map.stencil.isPoiMask){var kz=kw.isPoiInPolygon(kx);i.setLabelData(kz,kw.drawIndex)}else{i.setLabelData(kx,kw.drawIndex)}}kw.updateLabels();kw.map.dispatchEvent(new fS("onrefresh"))}if(!T){clearTimeout(kw.cacheLabelTimer);kv()}else{if(kw.cacheLabelTimer){return}kw.cacheLabelTimer=setTimeout(function e(){kv()},T)}},isPoiInPolygon:function(T){var kO=this;var kE=kO.map.stencil;var kw=kO.map._featureMgr.result.eleData[9];var kv=[];for(var kJ=0;kJ<kw.length;kJ++){var kF=kw[kJ].overlay.points;kv=kv.concat(kF)}for(var kM=0;kM<T.length;kM++){var ky=[];var kx=[];for(var kK=0;kK<T[kM].fixedLabel.length;kK++){var kD=T[kM].fixedLabel[kK];var kH=kD.pt;if(kD.pt&&au(kH,kv)){ky.push(kD)}else{kx.push(kD)}}if(kE.showRegion==="inside"){T[kM].fixedLabel=ky}else{if(kE.showRegion==="outside"){T[kM].fixedLabel=kx}}var kI=[];var kA=[];for(var kJ=0;kJ<T[kM].lineLabel.length;kJ++){var kL=T[kM].lineLabel[kJ];var e=kL.pt;if(e&&au(e,kv)){kI.push(kL)}else{kA.push(kL)}}if(kE.showRegion==="inside"){T[kM].lineLabel=kI}else{if(kE.showRegion==="outside"){T[kM].lineLabel=kA}}var kG=[];var kC=[];for(var kB=0;kB<T[kM].indoorLabel.length;kB++){var kN=T[kM].indoorLabel[kB];var kz=kN.pt;if(kz&&au(kz,kv)){kG.push(kN)}else{kC.push(kN)}}if(kE.showRegion==="inside"){T[kM].indoorLabel=kG}else{if(kE.showRegion==="outside"){T[kM].indoorLabel=kC}}}return T},dataBackCollideLabels:function(){var T=this;if(T&&!T.map.tileMgr&&!T.map.tileMgr.isExitTileLayer(T)){return}if(!T.tileLabels||(T.tileLabels&&T.tileLabels.length===0)){return}var e;T.labelProcessor.calcLabelsCollision(T.tileLabels);e=T.labelProcessor.getCachedLabels(T.tileLabels);if(e){if(T._isInnerLayer&&T.map.stencil&&T.map.stencil.isPoiMask){var i=T.isPoiInPolygon(e);T.map._featureMgr.setLabelData(i,T.drawIndex)}else{T.map._featureMgr.setLabelData(e,T.drawIndex)}}T.updateLabels();T.map.dispatchEvent(new fS("onupdate"));if(b2()){this.labelProcessor._refreshSpotData()}},updateLabels:function(kw){var kx=this.map;if(!kx._featureMgr){return}var i=kx._featureMgr;var T=i.getLabelData(this.drawIndex);if(T.length>0){var kv=kx.getZoom();if(T.labelZoom-kv<3){this.labelProcessor.updateLabels(T);var e=this.labelProcessor.fixDataFormat(T);i.setOverlayData(e[0],2,this.drawIndex);i.setOverlayData(e[1],3,this.drawIndex);i.setOverlayData(e[2],4,this.drawIndex)}else{i.clearLabelOverlayData(this.drawIndex)}kx.temp.isPermitSpotOver=false;this.labelProcessor.curSpotAdded=false}},loadRasterLayerData:function(kA,kv){this.thumbCache={};var kB=this.getZoomState();if(kv){for(var ky=0,kw=kA.length;ky<kw;ky++){var T=kA[ky];var kx=this.getTileKey(T);var e=this.tileCache.getData(kx);if(e&&e.status==="ready"){if(T.tileTypeName==="xyz"){e.tileInfo=T}this.map._featureMgr.setData(e,this.drawIndex,2)}else{if(this.useThumbData){this.setThumbData(T.col,T.row,T.zoom,T.useZoom,kB)}}}return}for(var ky=0,kw=kA.length;ky<kw;ky++){var T=kA[ky];var kx=this.getTileKey(T);var e=this.tileCache.getData(kx);if(!e){this.numTileLoading++;this.tileCache.setData(kx,{});var kz=this;this.loadRasterTileData(T,function(i,kC){kz._checkLayerTilesLoaded();kz.rasterTileDataCbk(i,kC)})}}},loadRasterTileData:function(i,e){var kv=i.col;var ky=i.row;var kw=i.zoom;var T=this.getTilesUrl(new fr(kv,ky),kw,i);if(!T){return}var kx=this.getTileKey(i);this.loadTileImage(T,kx,e,i)},loadTileImage:function(kz,T,kx,e){var kv=new Image();kv.crossOrigin="anonymous";kv.tileInfo=e;var kw;var ky=this;function kA(){if(ky.retry){kw&&clearInterval(kw);kw=null}}if(this.retry){var i=1;kw=setInterval(function(){if(i>3){kA();return}kv.src=kz;i++},this.retryTime)}kv.onload=function(){kA();kx&&kx(this,T)};kv.onerror=function(){kA();bD.fetchDebug&&bD.fetchDebug.sendError({title:kz,msg:kz,category:bD.fetchDebug.category.RESOURCE,level:bD.fetchDebug.levels.ERROR,url:kz});kx&&kx(null,T)};kv.src=kz;return kv},rasterTileDataCbk:function(kz,kx){if(!kz||typeof kz==="string"){this.tileCache.removeData(kx);return}var T=kz.tileInfo;var kv=T.col;var kG=T.row;var kF=T.zoom;var i=this.tileCache.getData(kx);if(!i){return}var kA="id_"+kv+"_"+kG+"_"+kF;var kE=this;i.dataType=gS;i.tileInfo=T;if(T.tileTypeName==="xyz"){var kD=T.tileSize;i.textureSource=kz;i.renderData={vertexAll:[0,0,0,0,0,kD,0,0,1,0,kD,kD,0,1,1,0,0,0,0,0,kD,kD,0,1,1,0,kD,0,0,1]};kE.setRasterTileData(kx,i,kA)}else{i.textureSource=kz;var ky=e9.calcLoopParam(kv,kF);var kC=ky.geoOffsetX;kz.tileInfo.loopOffsetX=kC;if(T.combine){var kw=0.0035;if(T.dataIndex>0){var kB=T.dataIndex/256;i.renderData={vertexAll:[0,0,0,0,0,T.dataIndex,0,0,kB-kw,0,T.dataIndex,256,0,kB-kw,1,0,0,0,0,0,T.dataIndex,256,0,kB-kw,1,0,256,0,0,1]}}else{var e=-T.dataIndex;var kB=e/256;i.renderData={vertexAll:[e,0,0,kB+kw,0,256,0,0,1,0,256,256,0,1,1,e,0,0,kB+kw,0,256,256,0,1,1,e,256,0,kB+kw,1]}}}else{i.renderData={vertexAll:[0,0,0,0,0,256,0,0,1,0,256,256,0,1,1,0,0,0,0,0,256,256,0,1,1,0,256,0,0,1]}}this.setRasterTileData(kx,i,kA)}},setRasterTileData:function(kw,e,kv){e.status="ready";this.tileCache.setData(kw,e);var T=false;if(this.curViewTilesInfo[kv]){e.dataType=gS;e.png8=this.png8||false;this.map._featureMgr.setData(e,this.drawIndex,2);T=true}if(T){var i=new fS("onrefresh");i.source="webgllayer";this.map.dispatchEvent(i)}},_checkLayerTilesLoaded:function(){this.numTileLoading--;if(this.firstTileLoad===false){this.dispatchEvent(new fS("ontilesloadstart"));this.firstTileLoad=true}var e=this;if(this.numTileLoading===0){if(this._checkTileLoadedTimer){clearTimeout(this._checkTileLoadedTimer);this._checkTileLoadedTimer=null}this._checkTileLoadedTimer=setTimeout(function(){if(e.numTileLoading===0){e.dispatchEvent(new fS("ontilesloadend"));e.firstTileLoad=false}e._checkTileLoadedTimer=null},60)}},_checkTilesLoaded:function(){this._checkLayerTilesLoaded();this.numLoading--;if(this.map.firstTileLoad===false){this.map.dispatchEvent(new fS("onfirsttilesloaded"));this.map.firstTileLoad=true}var e=this;if(this.numLoading===0){if(this._checkLoadedTimer){clearTimeout(this._checkLoadedTimer);this._checkLoadedTimer=null}this._checkLoadedTimer=setTimeout(function(){if(e.numLoading===0){e.map.dispatchEvent(new fS("ontilesloaded"));e.map.firstTileLoad=false}e._checkLoadedTimer=null},60)}},isClickableLabel:function(e){if(e.isDel){return false}if(e.zoom>9&&!e.guid){return false}if(e.zoom<=9&&!e.name&&!e.guid){return false}return true}};var aU=5;var jn=4;var gL=3;var N=2;var ez=1;var hJ=0;function ax(e){this._ratio=gp();this._iconCache={};this._map=e;this._drawingCanvasPool=[];this._drawingCanvasHeight=4096;this._bufferSpan=[5,5]}e6.extend(ax.prototype,{_loadIcons:function(T,kB,kx){var kv=0;var ky=this;var kw=this._map.config.style;for(var kz in T){kv++;var kA=new Image();kA.id=kz;kA.crossOrigin="anonymous";kA.onload=function(){ky._iconCache[this.id].loaded=true;kv--;if(kv===0){kB()}this.onload=null};kA.onerror=function(){ky._iconCache[this.id]=null;kv--;if(kv===0){kB()}this.onerror=null};if(!kx){var e=C.getIconSetPath(kw)+kz+".png";var i=bE();if(i&&i.udt){e+="?udt="+i.udt}}else{var e=kz}kA.src=e;this._iconCache[kz]={loaded:false,image:kA}}},_getEmptyDrawingCanvas:function(){for(var T=0;T<this._drawingCanvasPool.length;T++){if(this._drawingCanvasPool[T]._free===true){this._drawingCanvasPool[T]._free=false;return this._drawingCanvasPool[T]}}var e=this._createNewDrawingCanvas();this._drawingCanvasPool.push(e);e._free=false;return e},_createNewDrawingCanvas:function(){var e=b3("canvas");e.width=512;e.height=this._drawingCanvasHeight;e._free=true;e._id=bD.getGUID();var i=e.getContext("2d",{colorSpace:"display-p3"});i.textBaseline="bottom";i.lineJoin="round";return e},drawLabelsOnCanvas:function(kN,kv){var kD=kN.label.fixedLabel.slice(0);var kJ=kN.label.lineLabel.slice(0);var T=kN.label.indoorLabel.slice(0);if(kD.length===0&&kJ.length===0&&T.length===0){kv();return}var ky=function(kS,i){return kS.styleId-i.styleId};kD.sort(ky);kJ.sort(ky);T.sort(ky);var kM={};var e=this._getEmptyDrawingCanvas();var kI=e.getContext("2d",{colorSpace:"display-p3"});kI.clearRect(0,0,e.width,e.height);var kQ=0;var kE=null;var kx=0;if(kD.length>0){while(kx<kD.length&&!kD[kx].styleText[0]){kx++}if(kD[kx]&&kD[kx].styleText[0]){kE=kD[kx].styleText[0].fontSize+kD[kx].styleText[0].haloSize*2}}if(kE===null&&T.length>0){kx=0;while(kx<T.length&&!T[kx].styleText[0]){kx++}if(T[kx]&&T[kx].styleText[0]){kE=T[kx].styleText[0].fontSize+T[kx].styleText[0].haloSize*2}}if(kE===null&&kJ.length>0){kx=0;while(kx<kJ.length&&!kJ[kx].styleText[0]){kx++}if(kJ[kx]&&kJ[kx].styleText[0]){kE=kJ[kx].styleText[0].fontSize+kJ[kx].styleText[0].haloSize*2}}if(kE===null||isNaN(kE)){kv();return}var kA=0;var kz=kE;kz+=this._bufferSpan[1];var kG={};var kR=0;var kH=[];for(var kL=0;kL<kD.length;kL++){var kC=kD[kL];var kF=kC.name;var kK=kC.styleText;if(!kF||kK.length===0){continue}var kw=kC.icon;if(kC.textOnIcon&&(!this._iconCache[kw]||this._iconCache[kw].loaded===false)){kH.push(kC);kR++;if(!kG[kw]){kG[kw]=true}continue}var kO=this._drawEachText(kI,kC,kQ,kA,kz,kE,kM);if(!kO){continue}kA=kO.curX;kz=kO.curY;kE=kO.curLineHeight;kQ=kO.styleId}var kO=this._drawEachTypeOfLabels(kI,T,kQ,kA,kz,kE,kM);kQ=kO.curStyleId;kA=kO.curX;kz=kO.curY;kE=kO.curLineHeight;var kO=this._drawEachTypeOfLabels(kI,kJ,kQ,kA,kz,kE,kM);kQ=kO.curStyleId;kA=kO.curX;kz=kO.curY;kE=kO.curLineHeight;if(kR>0){var kP=this;this._loadIcons(kG,function(){kO=kP._drawEachTypeOfLabels(kI,kH,kQ,kA,kz,kE,kM);kQ=kO.curStyleId;kA=kO.curX;kz=kO.curY;kE=kO.curLineHeight;var i=kP._generateEachLabelCanvas(e,kz,kD,kJ,T,kN);kv(i[0],i[1])});return}var kB=this._generateEachLabelCanvas(e,kz,kD,kJ,T,kN);kv(kB[0],kB[1])},drawCustomLabelsOnCanvas:function(kA,kz,T){if(kA.length===0){kz();return}var kx={};var kw=false;for(var kv=0;kv<kA.length;kv++){var ky=null;if(kA[kv].textOnIcon&&kA[kv].icon){ky=kA[kv].icon}if(ky&&!kx[ky]&&(!this._iconCache[ky]||this._iconCache[ky].loaded===false)){kx[ky]=true;kw=true}}var e=this;if(kw){this._loadIcons(kx,function(){e._drawCustomLabel(kA,kz,T)},true)}else{e._drawCustomLabel(kA,kz,T)}},_drawCustomLabel:function(kI,kw,T){var ky;var kx;var kz;var kH;var kK;var e;var kD;var kv=0;var kG=kI.length;var kB=T?[]:null;var kC=this;for(var kE=0;kE<kI.length;kE++){if(!kI[kE].name){continue}var kJ=kF(kI[kE]);if(!kJ){continue}if(kJ.overHeight){if(T){kG=(kE-kv);kB.push(kA(kv,kG));kD=null;kv=kE;kG=kI.length;kE=kE-1}else{break}}ky=kJ.curX+this._bufferSpan[0];kx=kJ.curY;kz=kJ.curLineHeight;kK=kJ.styleId}if(!kD){kL({style:{}})}if(T){kG=kG-kv;kB.push(kA(kv,kG))}else{kB=kA(kv,kG)}kD=null;kw(kB);function kL(i){ky=0+kC._bufferSpan[0];kx=((i.style.fontSize||0)+(i.style.haloSize||0)*2)+kC._bufferSpan[1]||0;kz=kx-kC._bufferSpan[1];kH={};kK=-1;e=kC._getEmptyDrawingCanvas();kD=e.getContext("2d",{colorSpace:"display-p3"});kD.clearRect(0,0,e.width,e.height)}function kF(i){if(!kD){kL(i)}if(T){i.cachedIsDel={}}var kM=kC._drawEachText(kD,i,kK,ky,kx,kz,kH);return kM}function kA(kQ,kP){var kN=kx;var kM=kC._copyToNewCanvas(e,kN+kC._bufferSpan[0]);for(var kO=kQ;kO<kI.length&&kO<kQ+kP;kO++){if(!kI[kO].name&&kI[kO].style.iconSize){kC._addFixedLabelBounds(kI[kO]);continue}if(!kI[kO].textSize){continue}kC._updateFixedLabelCoords(kI[kO],kN+kC._bufferSpan[0]);kC._addFixedLabelBounds(kI[kO])}kM.range=[kQ,kP];return kM}},_drawEachTypeOfLabels:function(kE,ky,kC,kv,T,kw,kA){for(var kx=0;kx<ky.length;kx++){var kz=ky[kx];var kD=kz.name;var e=kz.styleText;if(!kD||e.length===0){continue}var kB=this._drawEachText(kE,kz,kC,kv,T,kw,kA);if(!kB){continue}kv=kB.curX+this._bufferSpan[0];T=kB.curY;kw=kB.curLineHeight;kC=kB.styleId;if(kB.curY>this._drawingCanvasHeight){return{curX:kv,curY:T,curLineHeight:kw,curStyleId:kC}}}return{curX:kv,curY:T,curLineHeight:kw,curStyleId:kC}},_drawIndoorTextLabelOnCanvas:function(kw){var e=this._getEmptyDrawingCanvas();var kD=e.getContext("2d",{colorSpace:"display-p3"});kD.clearRect(0,0,e.width,e.height);var kL=0;var kC=null;var kB=0;var kz;var kI={};var kH=[];for(var kx in kw){if(kx==="tileInfo"){continue}var kv=kw[kx];var kG=kv.defaultFloor;var kA=kv.floors;for(var kF=0;kF<kA.length;kF++){if(kF===kG){continue}var kJ=kA[kF];if(!kJ.pois){continue}var ky=kJ.pois;for(var kE=0;kE<ky.length;kE++){if(kC===null&&ky[kE].styleText[0]){kC=ky[kE].styleText[0].fontSize+ky[kE].styleText[0].haloSize*2;kz=kC}kH.push(ky[kE])}}}if(kC===null){return null}kH.sort(function(kM,i){return i.rank-kM.rank||kM.styleId-i.styleId});var kK=this._drawEachTypeOfLabels(kD,kH,kL,kB,kz,kC,kI);kL=kK.curStyleId;kB=kK.curX;kz=kK.curY;kC=kK.curLineHeight;var T=this._copyToNewCanvas(e,kz);return T},_updateIndoorLabelsCoords:function(kC,kD){for(var kB in kC){if(kB==="tileInfo"){continue}var e=kC[kB];var kx=e.defaultFloor;var ky=e.floors;for(var kz=0;kz<ky.length;kz++){if(kz===kx){continue}var T=ky[kz];if(!T.pois){continue}var kw=T.pois;for(var kv=0;kv<kw.length;kv++){var kA=kw[kv];if(kA.name&&(!kA.textSize||kA.textSize.length===0)){kw.splice(kv,1);kv--;continue}this._updateFixedLabelCoords(kA,kD);this._addFixedLabelBounds(kA)}}}},_generateEachLabelCanvas:function(ky,kx,kz,e,kB,T){kx=Math.min(kx,this._drawingCanvasHeight);var kA=this._copyToNewCanvas(ky,kx);var kv=null;if(T.renderData.indoorData){kv=this._drawIndoorTextLabelOnCanvas(T.renderData.indoorData);if(kv){this._updateIndoorLabelsCoords(T.renderData.indoorData,kv.height)}}for(var kw=0;kw<kz.length;kw++){if(!kz[kw].textSize){continue}this._updateFixedLabelCoords(kz[kw],kx);this._addFixedLabelBounds(kz[kw])}for(var kw=0;kw<kB.length;kw++){if(!kB[kw].textSize){continue}this._updateFixedLabelCoords(kB[kw],kx);this._addFixedLabelBounds(kB[kw])}for(var kw=0;kw<e.length;kw++){this._updateLineLabelCoords(e[kw],kx)}return[kA,kv]},_copyToNewCanvas:function(T,i){if(i===0){return null}var kv=b3("canvas");kv.width=T.width;kv.height=i;var e=kv.getContext("2d",{colorSpace:"display-p3"});e.drawImage(T,0,0,512,i,0,0,512,i);kv._id=T._id;T._free=true;return kv},_drawEachText:function(kO,kz,T,kQ,kP,kX,kw){var kW=kz.name;var kE=kz.styleText?kz.styleText[0]:kz.style;if(!kE){return null}var kH=kE.fontSize||0;var k1=kE.fontWeight;var le=kE.haloSize||0;var li=kE.padding||[0,0];if(!kJ){}if(kE.fontRgba){var ll=kE.fontRgba[3]/255;var kD=[];kD[3]=ll;for(var lk=0;lk<3;lk++){kD[lk]=kE.fontRgba[lk]}}if(kE.haloRgba){var ll=kE.haloRgba[3]/255;var kK=[];kK[3]=ll;for(var lk=0;lk<3;lk++){kK[lk]=kE.haloRgba[lk]}}var k8=kD?"rgba("+kD.join(",")+")":kE.color;var ky=kK?"rgba("+kK.join(",")+")":kE.strokeColor;var lg=kz.styleId||0;if(le>4){le=4}var kY=[];var kM=[];var kU=0;if(kw&&!kw[lg]){kw[lg]={}}var kG=kH+le*2+li[0]*2;var kZ=kG;if(kz.containDescendings){kZ+=4}if(le===0){kZ+=2}if(kz.textOnIcon){kZ=Math.max(kZ,kz.iconSize[1])}if(lg!==T||kZ>kX){T=lg;if(k1>=10&&k1%10===0){kO.font=k1*10+" "+kH+"px sans-serif"}else{kO.font=kH+"px sans-serif"}if(kZ>kX){var kV=kZ-kX;kX+=kV;kP+=kV}if(le>0){kO.lineWidth=le*2;kO.strokeStyle=ky}kO.fillStyle=k8}if(kz.type==="line"){var kB=kW.split("");for(var lh=0;lh<kB.length;lh++){var la=kB[lh];var kR;var k2;if(kw[lg][la]){var kJ=kw[lg][la];kR=kJ.displaySize;k2=kJ.curWordPosition}else{var kv=Math.ceil(kO.measureText(la).width);if(kQ+kv>512){kQ=0+this._bufferSpan[0];kP+=kZ;kP+=this._bufferSpan[1];kX=kZ}if(kP+this._bufferSpan[1]>this._drawingCanvasHeight){return{curX:kQ,curY:kP,curLineHeight:kX,styleId:lg}}var lb=kQ;if(le>0){kv+=le;lb-=Math.round(le/2);kO.strokeText(la,kQ,kP)}kO.fillText(la,kQ,kP);var k7=[kv,kZ];kR=[Math.round(k7[0]/2),Math.round(k7[1]/2)];k2=[lb,kP-kZ];kw[lg][la]={displaySize:kR,curWordPosition:k2,totalHeight:kU};kQ+=kv+2}kY.push(kR);kM.push(k2)}kU=Math.round(kY[0][1])}else{if(kw[lg][kW]){var kJ=kw[lg][kW];kY=kJ.textSize;kM=kJ.labelImagePosition;kU=kJ.totalHeight}else{var kI=kW.split("\\");if(kI.length>1&&kz.textOnIcon){var lj=0;var lf=0;var lm=[];var kS=8;for(var lh=0;lh<kI.length;lh++){var kW=kI[lh];var kF=Math.ceil(kO.measureText(kW).width);if(kF>lj){lj=kF}lm.push(Math.round(kF/2));lf+=kZ}var kC=lj+2*kS;var ld=lf+2*kS;if(kQ+kC>512){kQ=0+this._bufferSpan[0];kP+=kX;kP+=this._bufferSpan[1]}kP+=lf-kZ+2*kS;var k6=kQ;var kT=kP-ld;var e=Math.round(kC/2);var kL=this._iconCache[kz.icon].image;this.drawStretchedIcon(kO,kL,[k6,kT],kS,lj,lf);for(var lh=0;lh<kI.length;lh++){var kW=kI[lh];var lc=k6+(e-lm[lh]);var k9=kT+4+(lh+1)*kZ;kO.fillText(kW,lc,k9)}kY.push([Math.round(kC/2),Math.round(ld/2)]);kM.push([k6,kT]);kQ+=kC;kX=ld;kU=Math.round(ld/2)}else{for(var lh=0;lh<kI.length;lh++){var kW=kI[lh];var kF=Math.ceil(kO.measureText(kW).width);if(kF>512&&kI.length==1){kI[lh]=kW.substring(0,Math.floor(kW.length/2));kI[lh+1]=kW.substring(Math.floor(kW.length/2));lh--;continue}var kC=kF;var kx=0;if(kz.textOnIcon){kx=10;kC+=kx*2;if(kz.styleId===519){kC=kz.iconSize[0];kx=Math.round((kC-kF)/2)}}if(kQ+kC>512){kP+=kZ;kP+=this._bufferSpan[1];if(kP+this._bufferSpan[1]>this._drawingCanvasHeight){kP-=kZ;kP-=this._bufferSpan[1];return{overHeight:true,curX:kQ,curY:kP,curLineHeight:kX,styleId:lg}}kQ=0+this._bufferSpan[0];kX=kZ}else{if(kP+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:kQ,curY:kP,curLineHeight:kX,styleId:lg}}}var k6=kQ;var kT=kP-kZ;var k5=kQ;var k4=kP;if(kz.containDescendings){k4-=4}if(kz.textOnIcon){var k0=false;var kL=this._iconCache[kz.icon].image;var k3=kz.iconSize.concat([]);if(kG>=k3[1]){k3[1]=kG;k0=true;kZ+=kx*2;var kV=kZ-kX;if(kV>0){kP+=kV;kX=kZ;k4+=(kV-kx);kT+=(kV-kx*2)}else{k4-=kx;kT-=kx*2}}if(kF>=k3[0]){k3[0]=kF}if(kz.styleId===519){kO.drawImage(kL,0,0,k3[0],k3[1],k6,kT,k3[0],k3[1])}else{if(kz.noStretch){k4-=kG/2;var kN=kF+kx*2;kO.drawImage(kL,0,0,kL.width,kL.height,k6,kT,kN,kG)}else{if(k0){this.drawStretchedIcon(kO,kL,[k6,kT],kx,kF,k3[1])}else{this.draw3StretchedIcon(kO,kL,[k6,kT],kx,kF,k3[1])}}}k5+=kx;if(kz.iconSize[1]>kG){k4-=(kz.iconSize[1]-kG)/2-1}}if(le>0){if(lg===71028){kZ-=2}if(lg===32){kZ-=2}kO.strokeText(kW,k5,k4)}kO.fillText(kW,k5,k4);var kA=[kC,kZ];var kR=[Math.round(kA[0]/2),Math.round(kA[1]/2)];kY.push(kR);kM.push([k6,kT]);kU+=Math.round(kR[1]);kQ+=kC}}kw[lg][kW]={textSize:kY,labelImagePosition:kM,totalHeight:kU}}}kz.textSize=kY;kz.labelImagePosition=kM;kz.totalHeight=kU;return{curX:kQ,curY:kP,curLineHeight:kX,styleId:lg}},drawStretchedIcon:function(e,T,kv,ky,kz,i){var kx=kv[0];var kw=kv[1];e.drawImage(T,0,0,ky,ky,kx,kw,ky,ky);e.drawImage(T,ky,0,1,ky,kx+ky,kw,kz,ky);e.drawImage(T,T.width-ky,0,ky,ky,kx+kz+ky,kw,ky,ky);e.drawImage(T,0,ky,ky,1,kx,kw+ky,ky,i);e.drawImage(T,ky,ky,1,1,kx+ky,kw+ky,kz,i);e.drawImage(T,T.width-ky,ky,ky,1,kx+kz+ky,kw+ky,ky,i);e.drawImage(T,0,T.height-ky,ky,ky,kx,kw+i+ky,ky,ky);e.drawImage(T,ky,T.height-ky,1,ky,kx+ky,kw+i+ky,kz,ky);e.drawImage(T,T.width-ky,T.height-ky,ky,ky,kx+kz+ky,kw+i+ky,ky,ky)},draw3StretchedIcon:function(e,i,T,kx,kz,ky){var kw=T[0];var kv=T[1];e.drawImage(i,0,0,kx,i.height,kw,kv,kx,i.height);e.drawImage(i,kx,0,1,i.height,kw+kx,kv,kz,i.height);e.drawImage(i,i.width-kx,0,kx,i.height,kw+kx+kz,kv,kx,i.height)},_updateFixedLabelCoords:function(kw,kL){if(kL===0){return}var kG=[];var kS=[];var kT=0;var kJ=kw.totalHeight;var k1=kw.textSize.length;var kx=kw.direction;if(typeof kx!=="number"){kx=0}for(var kU=0;kU<k1;kU++){var kM=kw.labelImagePosition[kU];var kK=kw.textSize[kU];var kI=kM[0];var kv=kM[1];var ky=kK[0];var kD=kK[1];var kF=0;var kR=0;if(typeof kw.textMargin==="number"){kR=kw.textMargin}var kE;var e;var kA=0;var kH=0;if(!kw.iconPos){if(!kw.custom){kx=jn}}else{kA=kw.iconPos.width;kH=kw.iconPos.height}switch(kx){case gL:var T=kJ/2-kD+kF*(k1-1)/2;kE=Math.round(-kA/2-ky-kR);e=Math.round(T-kT-kF*kU);break;case ez:var T=kJ/2-kD+kF*(k1-1)/2;kE=Math.round(kA/2+kR);e=Math.round(T-kT-kF*kU);break;case N:var T=kH/2+kJ-kD+kF*k1;kE=Math.round(-ky/2);e=Math.round(T-kT-kF*kU);break;case hJ:var T=-kH/2-kF-kD;kE=Math.round(-ky/2);e=Math.round(T-kT-kF*kU);break;case jn:var T=-kJ/2-kF*(k1-1)/2;kE=Math.round(-ky/2);e=Math.round(T-kT-kF*kU);break}kT+=kD;var kC=kE+ky;var k2=e;var kB=kC;var k0=k2+kD;var kz=kE;var kZ=k0;kG.push(kE,e,kC,k2,kB,k0,kE,e,kB,k0,kz,kZ);var kY=kI/512;var kQ=(kL-kv-kD*2)/kL;var kX=(kI+ky*2)/512;var kP=kQ;var kW=kX;var kO=(kL-kv)/kL;var kV=kY;var kN=kO;kS.push(kY,kQ,kX,kP,kW,kO,kY,kQ,kW,kO,kV,kN)}if(!kw.textPos){kw.textPos={}}kw.textPos.vertex=kG;kw.textPos.texcoord=kS},_addFixedLabelBounds:function(kB){var kx=1000;var kv=1000;var T=-1000;var e=-1000;if(kB.iconPos){var kz=kB.iconPos["vertex"];for(var kA=0,kw=kz.length;kA<kw;kA+=2){var kF=kz[kA];var kD=kz[kA+1];if(kF<kx){kx=kF}if(kF>T){T=kF}if(kD<kv){kv=kD}if(kD>e){e=kD}}}if(kB.custom&&kB.style.iconSize&&!kB.name){var kC=kB.style.iconSize;var kE=kB.direction;switch(kE){case jn:kx=-Math.round(kC[0]/2);kv=-Math.round(kC[1]/2);T=Math.round(kC[0]/2);e=Math.round(kC[1]/2);break;case N:kx=-Math.round(kC[0]/2);kv=0;T=Math.round(kC[0]/2);e=kC[1];break}}if(kB.textPos){var ky=kB.textPos["vertex"];for(var kA=0,kw=ky.length;kA<kw;kA+=2){var kF=ky[kA];var kD=ky[kA+1];if(kF<kx){kx=kF}if(kF>T){T=kF}if(kD<kv){kv=kD}if(kD>e){e=kD}}}kB.bds=[kx,kv,T,e]},_updateLineLabelCoords:function(kM,kC){if(kC===0){return}var kv=kM.wordsInfo;var kJ=kM.wordCount;if(!kM.labelImagePosition){return}var kE=kM.labelImagePosition.slice(0);if(kM.reverse){kE.reverse()}var kV=1000;var kS=1000;var kT=-1000;var kR=-1000;for(var kN=0;kN<kJ;kN++){var kW=kE[kN];var kU=kW[0];var kK=kW[1];var kI=kM.textSize[kN];var kB=kI[0];var e=kI[1];var kA=kU/512;var kH=(kC-kK-e*2)/kC;var ky=(kU+kB*2)/512;var kG=kH;var kw=ky;var kF=(kC-kK)/kC;var T=kA;var kD=kF;kv[kN].size=[kB,e];kv[kN].texcoord=[kA,kH,ky,kG,kw,kF,kA,kH,kw,kF,T,kD];var kQ=kv[kN].offset[0];var kP=kv[kN].offset[1];var kO=kQ-kB/2;var kz=kP+e/2;var kx=kP-e/2;var kL=kQ+kB/2;if(kO<kV){kV=kO}if(kL>kT){kT=kL}if(kx<kS){kS=kx}if(kz>kR){kR=kz}}kM.bds=[kV,kS,kT,kR]}});var gd={0:"00000000",16:"00010000",32:"00100000",48:"00110000",64:"01000000",96:"01100000"};function eq(kx,kz,kv){var kw=kx.bds;if(!kw){return false}var ky=kx.tracer;var T;if(ky){if(!gd[ky]){T=ky.toString(2);if(T.length<8){T=new Array(8-T.length+1).join("0")+T}gd[ky]=T}T=gd[ky];var e=kq.mapZoomStartZoomMapping[kz];var kA=kz>20?21:kz;return T[kA-e]==="1"}var i=kx.displayRange;if(kv>=i[0]&&kv<=i[1]){return true}return false}function jt(i,e){this.map=i.map;this.layer=i;e=e||[];this.allLabels=[];this._spotData=[];this._strategyInfo=null;this.RANK1=1000000;this.RANK2=2000000;this.RANK3=3000000;this.RANK4=4000000;this.RANK5=5000000;this._ratio=gp();this._useRound=true;this._sharpenRender=false;if(this._ratio>h0.HIGH_RES_MIN_RATIO){this._useRound=false;this._sharpenRender=true}this._mapIsMoving=false;this._onMapIdleCallback=e.onMapIdleCallback;this.map.temp.isPermitSpotOver=true;this.currentSelectedLabel=null;this.map._labelProcessor=this;this.iconCache=new aA((b2()||e6.Browser.ie)?64:128,{clearCallback:function(T){}});this.fixedLabelData=[];this.lineLabelData=[];this.highlightLabelData=[];this._iconLoadTimer=null;this._labelTextCanvas=null;if(this.map.config.textRenderType==="canvas"){this._labelTextCanvas=this.map.tileMgr.getLabelTextCanvas()}this.bind()}e6.extend(jt.prototype,{bind:function(){var T=this.map;var i=this;T.addEventListener("mapstatusbusy_inner",function(kv){i._mapIsMoving=true;if(i._ratio>h0.HIGH_RES_MIN_RATIO){i._sharpenRender=false}else{i._useRound=false}});T.addEventListener("mapstatusidle_inner",function(kv){if(i._ratio>h0.HIGH_RES_MIN_RATIO){i._sharpenRender=true}else{i._useRound=true}i._mapIsMoving=false});T.addEventListener("onspotmouseover",function(kx){if(!this.temp.isPermitSpotOver){return}if(kx.spots.length>0){var kw=kx.spots[0].userdata.uid;var ky=kx.spots[0].userdata.tilePosStr;var kv=i.getLabelByUid(kw,ky);kv&&kv.formatedData&&i._toHighlightColor(kv.formatedData)}});T.addEventListener("onspotmouseout",function(kx){if(!this.temp.isPermitSpotOver){return}if(kx.spots.length>0){var kw=kx.spots[0].userdata.uid;var ky=kx.spots[0].userdata.tilePosStr;var kv=i.getLabelByUid(kw,ky);kv&&kv.formatedData&&i._toDefaultColor(kv.formatedData)}});T.addEventListener("spotclick",function(kx){if(kx.spots&&kx.spots.length>0){if(kx.spots[0].userdata.zoom<10){return}var kw=kx.spots[0].userdata.uid;var ky=kx.spots[0].userdata.tilePosStr;if(i.currentSelectedLabel&&(i.currentSelectedLabel.uid!==kw||i.currentSelectedLabel.tilePosStr!==ky)){i._recoverNormalState()}var kv=i.getLabelByUid(kw,ky);kv&&i._changeBaseMapState(kv)}else{i._recoverNormalState()}});T.on("spot_status_reset",function(){i._recoverNormalState()});T.on("spot_highlight",function(kw){var kv=i.getLabelByUid(kw.uid,kw.tilePosStr);kv&&kv.formatedData&&i._toHighlightColor(kv.formatedData)});T.addEventListener("mousemove",function(kv){if(i.curSpotAdded){return}if(this.currentOperation!==em.idle||i._mapIsMoving===true){return}i._refreshSpotData();this.temp.isPermitSpotOver=true;i.curSpotAdded=true});if(b2()){function e(){i._refreshSpotData()}T.addEventListener("mapstatusidle_inner",e)}T.on("style_loaded",function(){if(i.map.config.textRenderType==="canvas"&&!i._labelTextCanvas){i._labelTextCanvas=i.map.tileMgr.getLabelTextCanvas()}});T.on("destroy",function(){i.iconCache.clear();for(var kv=0;kv<i.fixedLabelData.length;kv++){i.fixedLabelData[kv]=null}i.fixedLabelData=[];i.lineLabelData=[];i.highlightLabelData=[];for(var kv=0;kv<i.allLabels.length;kv++){i.allLabels[kv]._mcBds=null;i.allLabels[kv]=null}i.allLabels=[];for(var kv=0;kv<i._spotData.length;kv++){i._spotData[kv].pt=null;i._spotData[kv].userdata.iconPoint=null;i._spotData[kv]=null}i._spotData=[]})},getLabelByUid:function(kz,kA){var e=this.map._featureMgr.getResult().tileLabels[this.layer.drawIndex]||[];for(var ky=0;ky<e.length;ky++){var kv=e[ky].fixedLabel;for(var kx=0;kx<kv.length;kx++){if(e[ky].fixedLabel[kx].guid===kz&&e[ky].fixedLabel[kx].tilePosStr===kA){return e[ky].fixedLabel[kx]}}var kw=e[ky].indoorLabel;for(var T=0;T<kw.length;T++){if(e[ky].indoorLabel[T].guid===kz&&e[ky].indoorLabel[T].tilePosStr===kA){return e[ky].indoorLabel[T]}}}return null},getTileByLabelUid:function(kz){var e=this.map._featureMgr.getResult().tileLabels[this.layer.drawIndex]||[];for(var ky=0;ky<e.length;ky++){var kv=e[ky].fixedLabel;for(var kx=0;kx<kv.length;kx++){if(e[ky].fixedLabel[kx].guid===kz){return e[ky]}}var kw=e[ky].indoorLabel;for(var T=0;T<kw.length;T++){if(e[ky].indoorLabel[T].guid===kz){return e[ky]}}}return null},_toHighlightColor:function(T){if(T.tempRank&&T.tempRank===this.RANK5){return}var e=this.map._featureMgr.getResult().eleData[4][this.layer.drawIndex]||[];var kw=false;for(var kv=0;kv<e.length;kv++){if(e[kv]===T||(e[kv].guid===T.guid&&e[kv].tilePosStr===T.tilePosStr&&e[kv].zoom===T.zoom)){kw=true;break}}if(kw){return}e.push(T);this.map._featureMgr.setOverlayData(e,4,this.layer.drawIndex);this.map.dispatchEvent(new fS("onrefresh"))},_toDefaultColor:function(T){if(T.tempRank&&T.tempRank===this.RANK5){return}var e=this.map._featureMgr.getResult().eleData[4][this.layer.drawIndex]||[];for(var kv=0;kv<e.length;kv++){if(T===e[kv]||(T.guid===e[kv].guid&&T.tilePosStr===e[kv].tilePosStr&&T.zoom===e[kv].zoom)){e.splice(kv,1);break}}this.map._featureMgr.setOverlayData(e,4,this.layer.drawIndex);this.map.dispatchEvent(new fS("onrefresh"))},_changeBaseMapState:function(i){var kw=i.guid;var kA=i.formatedData.guidExt;var kB={guid:kw,tilePosStr:i.tilePosStr,guidExt:kA};this._strategyInfo=kB;this.currentSelectedLabel=i;var kv=this.map._featureMgr;var e=kv.getLabelData(this.layer.drawIndex);e=this.collisionTest(e);this.updateLabels(e);var kC=this.fixDataFormat(e);kv.setOverlayData(kC[0],2,this.layer.drawIndex);kv.setOverlayData(kC[1],3,this.layer.drawIndex);kv.setOverlayData(kC[2],4,this.layer.drawIndex);var T=this.getTileByLabelUid(kw);this.currentSelectedLabel.tileInfo=T.tileInfo;var kz=this.layer.tileCache.getAllData();for(var ky in kz){var kx=kz[ky].data;if(!kx.label){continue}this.clearCollisionCache(kx.label)}this.map.dispatchEvent(new fS("onrefresh"))},_recoverNormalState:function(){this._strategyInfo=null;var kz=false;var kx=this.map._featureMgr.getLabelData(this.layer.drawIndex);if(this.currentSelectedLabel){var T=this.currentSelectedLabel.guid;this.clearCollisionCache(this.getTileByLabelUid(T));var kw=this.layer.tileCache.getAllData();for(var kv in kw){if(Object.prototype.hasOwnProperty.call(kw,kv)){var ky=kw[kv].data;if(!ky.label){continue}this.clearCollisionCache(ky.label)}}this.currentSelectedLabel.tempRank=null;this.currentSelectedLabel=null;kz=true}kx=this.collisionTest(kx);this.updateLabels(kx);var e=this.fixDataFormat(kx);var i=this.map._featureMgr;i.setOverlayData(e[0],2,this.layer.drawIndex);i.setOverlayData(e[1],3,this.layer.drawIndex);i.setOverlayData([],4,this.layer.drawIndex);this.map.dispatchEvent(new fS("onrefresh"));if(kz){this.curSpotAdded=false;this._refreshSpotData()}},loadIconImages:function(kI,ky,T){var kH=kI.label;var kK=kI.tileInfo.style;var kw=kH.fixedLabel;if(T==="indoor"){kw=[]}var kG=kH.indoorLabel;var kF=kw.length+kG.length;var kL=this;var kJ=0;var kD=200;for(var kE=0;kE<kF;kE++){var kB;if(kE<kw.length){kB=kw[kE]}else{kB=kG[kE-kw.length]}if(!kB.iconPos){var kA=this.loadSVGSymbol(kB,kK);if(!kA){continue}else{if(kA!==true){var kz=kB.iconPos.iconType;var e=kK+"_"+kz;this.iconCache.setData(e,{loaded:false,image:kA});kB.iconPos.img=kA}}}var kz=kB.iconPos.iconType;var e=kK+"_"+kz;kJ++;if(this.iconCache.getData(e)){if(this.iconCache.getData(e).loaded){ky(kI)}else{if(kB.iconPos.img){kB.iconPos.img.id=e;kB.iconPos.img.iconUrl=kz;this.iconCache.setData(e,{loaded:true,image:kB.iconPos.img});this._addToIconTexture(kB.iconPos.img);ky(kI)}else{}}continue}if(!T||T==="indoor"){var kx=C.getIconSetPath(this.map.config.style)+kz+".png";var kC=bE();if(kC&&kC.udt){kx+="?udt="+kC.udt}}else{var kx=kz}var kv=new Image();kv.id=e;kv.iconUrl=kx;kv.crossOrigin="anonymous";kv.onload=function(){if(kL.iconCache.getData(this.id)){kL.iconCache.getData(this.id).loaded=true;kL._addToIconTexture(this)}if(!kL._iconLoadTimer){kL._iconLoadTimer=setTimeout(function(){ky();kL._iconLoadTimer=null},kD)}this.onload=null};kv.onerror=function(){if(!kL._iconLoadTimer){kL._iconLoadTimer=setTimeout(function(){ky();kL._iconLoadTimer=null},kD)}kL.iconCache.removeData(this.id);this.onerror=null;bD.fetchDebug&&bD.fetchDebug.sendError({title:this.iconUrl,msg:this.iconUrl,category:bD.fetchDebug.category.RESOURCE,level:bD.fetchDebug.levels.ERROR,url:this.iconUrl})};kv.src=kx;this.iconCache.setData(e,{loaded:false,image:kv})}return kJ},_addToIconTexture:function(kx){if(!this.map._webglMapScene){return}var kz=this.map._webglMapScene._painter;var e=kz._iconTextureAtlas.addTexture(kx);if(e===false){this.map.fire(new fS("onlayer_clear"))}if(!e){return}kz._iconTextureAtlasOffset[kx.id]=e;var kC=0*kx.width/1024+e.width;var kw=0*kx.height/1024+e.height;var kB=kx.width/1024+e.width;var kv=kw;var kA=kB;var T=kx.height/1024+e.height;var ky=kC;var i=T;kz._iconTextureAtlasCoords[kx.id]=[kC,kw,kB,kv,kA,T,kC,kw,kA,T,ky,i]},loadSVGSymbol:function(kv,T){var i=kv.symbol||{};var ky=dR.generateKey(i.path,i);if(!ky){return null}var kx=this.iconCache.getData(T+"_"+ky);if(kx&&kx.loaded){kv.iconPos=this.createVertex(kx.image.width/2,kx.image.height/2,ky);return true}var kw=new dR(i.path,i);kw.add();var e=kw.render();if(!e){return null}kv.iconPos=this.createVertex(kw.size.width,kw.size.height,ky);return kw.data},createVertex:function(kx,kB,T){var kw=Math.round(-kx/2);var kD=Math.round(-kB/2);var kv=kw+kx;var kC=kD;var i=kv;var kA=kC+kB;var e=kw;var kz=kA;var ky={vertex:[kw,kD,kv,kC,i,kA,kw,kD,i,kA,e,kz],texcoord:null,width:kx,height:kB,iconType:T};return ky},loadImgByStr:function(kv,kw,kx){if(!kv&&!kw){kx&&kx(null,null);return}if(typeof kv==="object"&&typeof kw==="object"){kx(kv,kw);return}var i=0;var T=null;var e=null;if(kv){i++;T=new Image();T.onload=function(){i--;if(i===0){kx&&kx(this,e)}this.onload=null};T.src=kv}if(kw){i++;e=new Image();e.onload=function(){i--;if(i===0){kx&&kx(T,this)}this.onload=null};e.src=kw}},collisionTest:function(ln,kG,kN){if(this.map.viewAnimationTime){return[]}if(!ln){return[]}if(this.layer.ontology&&this.layer.ontology.noCollision){for(var kY=0;kY<ln.length;kY++){var lB=ln[kY].fixedLabel;for(var kW=0;kW<lB.length;kW++){var ky=lB[kW];var lD=this.layer.ontology.getLayerVisible(ky.layerName);ky.isDel=!lD}}return ln}var kJ=this.map;var lr=kJ.getHeading();lr=this.calcLoopHeading(lr);var k9=kJ.height;var k1=this.allLabels;for(var kY=0;kY<k1.length;kY++){k1[kY]._mcBds=null}k1.length=0;ln.sort(function(ll,i){var lF=ll.tileInfo;var lE=i.tileInfo;if(lF.col*lF.row<lE.col*lE.row){return -1}else{return 1}});var kK=kJ.getTilt();var ls=kJ.getZoom();if(this.layer.ontology){ls+=(this.layer.spanLevel||0)}var kU;if(kN){kU=kN}else{kU=this.getZoomStep()}for(var kY=0,kS=ln.length;kY<kS;kY++){var T=ln[kY];var k2=T.tileInfo;var kV=k2.zoom;var la=k2.loopOffsetX/Math.pow(2,18-kV);if(!lr&&!kK){if(T.unnecessaryCollisionTest&&T.unnecessaryCollisionTest[kN]){continue}}var lB=T.fixedLabel||[];for(var kW=0,ly=lB.length;kW<ly;kW++){var ky=lB[kW];ky.zoom=kV;if(kG===-1&&ky.isDel){continue}if(this.layer.ontology){var lD=this.layer.ontology.getLayerVisible(ky.layerName);if(!lD){continue}}if(!eq(ky,k2.useZoom,ls)){ky.isDel=true;continue}this.calcCollisionBounds(ky,kU,la,k9);k1.push(ky)}var kX=T.indoorLabel||[];for(var kT=0,k5=kX.length;kT<k5;kT++){var k4=kX[kT];k4.zoom=kV;if(kG===-1&&k4.isDel){continue}if(!eq(k4,k2.useZoom)){k4.isDel=true;continue}this.calcCollisionBounds(k4,kU,la,k9);k1.push(k4)}var lx=T.lineLabel||[];for(var k0=0,kL=lx.length;k0<kL;k0++){var li=lx[k0];if(kG===-1&&li.isDel){continue}if(!eq(li,k2.useZoom)){li.isDel=true;continue}var kz=li.pt;var lh=kJ.pointToPixelIn(kz,{zoom:kU,useRound:this._useRound});var lA=lh.x+la;var lz=k9-lh.y;var kw=li.bds;var lk=kw[0];var lj=kw[1];var kP=kw[2];var kO=kw[3];var kI=lk;var kH=lj;var lw=kP;var lv=kO;if((lr>=0&&lr<45)||(lr>=315&&lr<360)){kI=lk;kH=lj;lw=kP;lv=kO}else{if(lr>=45&&lr<135){kI=lj;kH=-kP;lw=kO;lv=-lk}else{if(lr>=135&&lr<225){kI=-kP;kH=-kO;lw=-lk;lv=-lj}else{if(lr>=225&&lr<315){kI=-kO;kH=lk;lw=-lj;lv=kP}}}}li._tempBds=[lA+kI,lz+kH,lA+lw,lz+lv];var lp=kJ.pixelToPointIn(new fr(li._tempBds[0],lh.y+kH),{zoom:kU});var lg=kJ.pixelToPointIn(new fr(li._tempBds[2],lh.y+lv),{zoom:kU});li._mcBds=[lp,lg];k1.push(li)}}var lf=this._strategyInfo;if(lf){var kZ=lf.guid;var kQ=lf.guidExt;var ld=false;for(var kR=0,kF=k1.length;kR<kF;kR++){var kx=k1[kR];delete kx.tempRank;if(!this.layer.isClickableLabel(kx)||(kQ===1&&!kx.guidExt)){continue}if(kZ===kx.guid&&lf.tilePosStr===kx.tilePosStr){kx.tempRank=this.RANK5;ld=true}}if(!ld&&this.currentSelectedLabel){this.currentSelectedLabel.tempRank=this.RANK5;var k3=this.currentSelectedLabel.tileInfo;if(k3){var kM=k3.zoom;var lq=k3.loopOffsetX/Math.pow(2,18-kM);this.calcCollisionBounds(this.currentSelectedLabel,kU,lq,k9);k1.push(this.currentSelectedLabel)}}}else{for(var kv=0,kE=k1.length;kv<kE;kv++){var kB=k1[kv];if(kB.type==="line"||!kB.iconPos){continue}delete kB.tempRank}}k1.sort(function(lE,ll){var lF=lE.tempRank?lE.tempRank:lE.rank;var i=ll.tempRank?ll.tempRank:ll.rank;return i-lF||lE.startZoom-ll.startZoom||ll.pt.lng-lE.pt.lng||ll.pt.lat-lE.pt.lat});var lu=0;if(kK>0){lu=6}ls=kJ.getZoom();if(ls>=8&&ls<9){ls<8.5?(lu=6):(lu=3)}if(kJ._displayOptions.labelMargin>0){lu=kJ._displayOptions.labelMargin}var lb=2;if(ls<6&&ls>=5){lb=-1}for(var le=0,kD=k1.length;le<kD;le++){var lt=k1[le];var lm=lt._tempBds;lt.isDel=false;lt._intersectIdx=[];for(var k7=le+1;k7<kD;k7++){var k8=k1[k7];var lC=k8._tempBds;if(!(lm[2]+lu+lb<lC[0]-lu||lm[0]-lu>lC[2]+lu+lb||lm[3]+lu+lb<lC[1]-lu||lm[1]-lu>lC[3]+lu+lb)){lt._intersectIdx.push(k7)}}}for(var lc=0,kC=k1.length;lc<kC;lc++){var kA=k1[lc];if(kA.isDel===false){var e=kA._intersectIdx;for(var k6=0,lo=e.length;k6<lo;k6++){k1[e[k6]].isDel=true;if(k1[e[k6]].cachedIsDel){k1[e[k6]].cachedIsDel[kN]=true}}}}return ln},calcCollisionBounds:function(kB,kz,i,kA){var kx=kB.ptFix||kB.pt;var kv=this.map;var kw=kv.pointToPixelIn(kx,{zoom:kz,useRound:this._useRound});var T=kw.x+i;var kD=kA-kw.y;var e=kB.bds;kB._tempBds=[T+e[0],kD+e[1],T+e[2],kD+e[3]];var ky=kv.pixelToPointIn(new fr(kB._tempBds[0],kw.y+e[1]),{zoom:kz});var kC=kv.pixelToPointIn(new fr(kB._tempBds[2],kw.y+e[3]),{zoom:kz});kB._mcBds=[ky,kC]},getZoomStep:function(){var T=this.map.getZoom();var e=Math.floor(T);var i=T-e>=0.5?e+0.5:e;return i},clearCollisionCache:function(e){if(!e){return}e.cacheState=null;e.unnecessaryCollisionTest=null},getCachedLabels:function(e){e=e||[];var T=this.getZoomStep();var kx=false;for(var kv=0;kv<e.length;kv++){var kw=e[kv];if(!kw.cacheState||!kw.cacheState[T]){kx=true;break}if(kw.hasNewData){kx=true;break}}if(kx){this.calcLabelsCollision(e)}return e},calcLabelsCollision:function(T){var kw=this.getZoomStep();var kx={};var kE;var kv;var kG;var kI;var kH;var kF;T=this.collisionTest(T,undefined,kw);a0.addLabelIntoAreaSpots(T);for(var kB=0;kB<T.length;kB++){kE=T[kB];kv=kE.tileInfo;kI=kv.col+","+kv.row;kx[kI]=1}var e={};for(var kz=0;kz<T.length;kz++){kE=T[kz];if(!kE.cacheState){kE.cacheState={}}kv=kE.tileInfo;kH=kv.col;kF=kv.row;kI=kH+","+kF;if(kE.cacheState[kw]==="stable"){e[kI]=1;if(!kE.hasNewData){continue}}for(var kA=0;kA<kE.fixedLabel.length;kA++){kG=kE.fixedLabel[kA];if(!kG.cachedIsDel){kG.cachedIsDel={}}kG.cachedIsDel[kw]=kG.isDel}for(var kD=0;kD<kE.indoorLabel.length;kD++){kG=kE.indoorLabel[kD];if(!kG.cachedIsDel){kG.cachedIsDel={}}kG.cachedIsDel[kw]=kG.isDel}for(var kC=0;kC<kE.lineLabel.length;kC++){kG=kE.lineLabel[kC];if(!kG.cachedIsDel){kG.cachedIsDel={}}kG.cachedIsDel[kw]=kG.isDel}if(kx[(kH-1)+","+(kF-1)]&&kx[(kH-1)+","+kF]&&kx[(kH-1)+","+(kF+1)]&&kx[kH+","+(kF-1)]&&kx[kH+","+(kF+1)]&&kx[(kH+1)+","+(kF-1)]&&kx[(kH+1)+","+kF]&&kx[(kH+1)+","+(kF+1)]){kE.cacheState[kw]="stable";e[kI]=1}else{if(!kE.cacheState[kw]){kE.cacheState[kw]="unstable"}}}for(var ky=0;ky<T.length;ky++){kE=T[ky];kv=kE.tileInfo;kI=kv.col+","+kv.row;kH=+kv.col;kF=+kv.row;if(e[(kH-1)+","+(kF-1)]&&e[(kH-1)+","+kF]&&e[(kH-1)+","+(kF+1)]&&e[kH+","+(kF-1)]&&e[kH+","+(kF+1)]&&e[(kH+1)+","+(kF-1)]&&e[(kH+1)+","+kF]&&e[(kH+1)+","+(kF+1)]){if(!kE.unnecessaryCollisionTest){kE.unnecessaryCollisionTest={}}kE.unnecessaryCollisionTest[kw]=1}}T.hasNewData=false},updateLabels:function(kw){var T=this.map;var kC=T.getZoom();var kE=T.getHeading();kE=this.calcLoopHeading(kE);var kD=T.getTilt();var kx=this.getZoomStep();for(var kB=0,ky=kw.length;kB<ky;kB++){var kA=kw[kB];var kv=kA.tileInfo;var kz=kv.loopOffsetX||0;var e={zoom:kC,mcOffsetX:kz};this.updateFixedLabel(kA.fixedLabel,kD,kE,kA,kx,e);e={zoom:kC,mcOffsetX:0};this.updateFixedLabel(kA.indoorLabel,kD,kE,kA,kx,e);this.updateLineLabel(kA.lineLabel,kD,kE,kA,kx)}},updateFixedLabel:function(kB,kE,i,kH,kx,kC){if(kB.length===1){}var e=kC.zoom;var kw=kC.mcOffsetX;var kM;for(var kI=0,kz=kB.length;kI<kz;kI++){var kD=kB[kI];if(!kD.cachedIsDel){continue}if(!kE&&!i&&kH.cacheState&&kH.cacheState[kx]){kD.isDel=kD.cachedIsDel[kx];if(typeof kD.isDel==="undefined"){kD.isDel=kD.cachedIsDel[kx]=true}}if(kD.startScale>e){kD.isDel=true}if(kD.isDel){continue}var kL=kD.pt;var T=(kD.hue||0)?gC(kD.hue):0;var kv=kD.iconPos;if(kv&&kv.texcoord){if(!kv.rtVertex){kv.rtVertex=[];kM=kv.vertex;var kA=iZ(kL.lng);var kK=iZ(kL.lat);kv.rtVertex=[kA[0],kK[0],kA[1],kK[1],0,kM[0],kM[1],0,0,kv.texcoord[0],kv.texcoord[1],T,kA[0],kK[0],kA[1],kK[1],0,kM[2],kM[3],0,0,kv.texcoord[2],kv.texcoord[3],T,kA[0],kK[0],kA[1],kK[1],0,kM[4],kM[5],0,0,kv.texcoord[4],kv.texcoord[5],T,kA[0],kK[0],kA[1],kK[1],0,kM[6],kM[7],0,0,kv.texcoord[6],kv.texcoord[7],T,kA[0],kK[0],kA[1],kK[1],0,kM[8],kM[9],0,0,kv.texcoord[8],kv.texcoord[9],T,kA[0],kK[0],kA[1],kK[1],0,kM[10],kM[11],0,0,kv.texcoord[10],kv.texcoord[11],T]}}if(!kD.textOnIcon){T=0}var kJ=kD.textPos;if(kJ){if(!kJ.rtVertex){kJ.rtVertex=[];kM=kJ.vertex;var ky=kJ.rtVertex;var kG=iZ(kL.lng);var kP=iZ(kL.lat);var kO=iZ(kw);for(var kF=0,kN=kM.length;kF<kN;kF+=12){ky.push(kG[0],kP[0],kG[1],kP[1],0,kM[kF],kM[kF+1],kO[0],kO[1],kJ.texcoord[0],kJ.texcoord[1],T);ky.push(kG[0],kP[0],kG[1],kP[1],0,kM[kF+2],kM[kF+3],kO[0],kO[1],kJ.texcoord[2],kJ.texcoord[3],T);ky.push(kG[0],kP[0],kG[1],kP[1],0,kM[kF+4],kM[kF+5],kO[0],kO[1],kJ.texcoord[4],kJ.texcoord[5],T);ky.push(kG[0],kP[0],kG[1],kP[1],0,kM[kF+6],kM[kF+7],kO[0],kO[1],kJ.texcoord[6],kJ.texcoord[7],T);ky.push(kG[0],kP[0],kG[1],kP[1],0,kM[kF+8],kM[kF+9],kO[0],kO[1],kJ.texcoord[8],kJ.texcoord[9],T);ky.push(kG[0],kP[0],kG[1],kP[1],0,kM[kF+10],kM[kF+11],kO[0],kO[1],kJ.texcoord[10],kJ.texcoord[11],T)}}}}},updateLineLabel:function(kA,k3,kT,kO,kP){kA=kA||[];var kJ=this.map;var kD=kJ.getZoomUnits();for(var k2=0,k0=kA.length;k2<k0;k2++){var kz=kA[k2];if(!kz.cachedIsDel){continue}if(!k3&&!kT&&kO.cacheState&&kO.cacheState[kP]){kz.isDel=kz.cachedIsDel[kP];if(typeof kz.isDel==="undefined"){kz.isDel=kz.cachedIsDel[kP]=true}}if(kz.isDel){continue}if(!kz.styleText||kz.styleText.length===0){continue}var kB=kz.mcInTile;var kW=kB.x;var kU=kB.y;var kN=kz.wordsInfo;var kL=kz.labelAngle;var kH=false;var kV=0;if(kT!==0){var kI=kN[0].angle;var kZ=this.calcLoopHeading(kI-kT);if(kZ>45&&kZ<315){if(kZ>45&&kZ<=135){kV=270}else{if(kZ>135&&kZ<=225){kV=180}else{if(kZ>225&&kZ<315){kV=90}}}if(kL>225&&kL<=315&&kV<=180){kH=true}else{if((kL>=0&&kL<=45||kL>=315&&kL<360)&&kV>=180){kH=true}}}}for(var k1=0,kE=kN.length;k1<kE;k1++){var kY=kN[k1];var kG=kY.calcInfo;var kS=kY.offset[0];var kQ=kY.offset[1];if(!kY.size){continue}var e=kY.size[0];var T=kY.size[1];var kF=kY.angle;if(!kG){kG={}}if(kT!==kG.mapHeading||kD!==kG.zoomUnits){kG.mapHeading=kT;kG.zoomUnits=kD;if(kH){var kK=kN[kE-1-k1];kS=kK.offset[0];kQ=kK.offset[1];kF=kK.angle}var kw=kW+kS*kD;var kv=kU+kQ*kD;kG.rotationCenter={lng:kw,lat:kv};kG.calcHeading=kV;kG.angle=kF;kG.offsetX=kS;kG.offsetY=kQ;kY.calcInfo=kG}if(!kY.rtVertex){kY.rtVertex=[]}kY.rtVertex.length=0;var kM=kG.calcHeading+kG.angle;var kx=kG.rotationCenter;kS=kG.offsetX;kQ=kG.offsetY;var ky=Math.round(kS-e/2);var kX=Math.round(kS+e/2);var kR=Math.round(kQ+T/2);var kC=Math.round(kQ-T/2);kY.rtVertex.push(kW,kU,kY.z,ky,kC,kx.lng,kx.lat,kM,kY.texcoord[0],kY.texcoord[1],kW,kU,kY.z,kX,kC,kx.lng,kx.lat,kM,kY.texcoord[2],kY.texcoord[3],kW,kU,kY.z,kX,kR,kx.lng,kx.lat,kM,kY.texcoord[4],kY.texcoord[5],kW,kU,kY.z,ky,kC,kx.lng,kx.lat,kM,kY.texcoord[6],kY.texcoord[7],kW,kU,kY.z,kX,kR,kx.lng,kx.lat,kM,kY.texcoord[8],kY.texcoord[9],kW,kU,kY.z,ky,kR,kx.lng,kx.lat,kM,kY.texcoord[10],kY.texcoord[11])}}},calcLoopHeading:function(e){while(e>=360){e-=360}while(e<0){e+=360}return e},fixDataFormat:function(kD){var kv=this.fixedLabelData;var e=this.lineLabelData;var T=this.highlightLabelData;var kL=0;var kz=0;var kI=0;var kJ;if(this.currentSelectedLabel){var ky=this.getLabelByUid(this.currentSelectedLabel.guid,this.currentSelectedLabel.tilePosStr);if(!ky||ky.isDel){kv[kL]=this.currentSelectedLabel.formatedData;kL++;T[kI]=this.currentSelectedLabel.formatedData;kI++}}for(var kH=0;kH<kD.length;kH++){var kB=kD[kH];var kA=kB.fixedLabel;var kw=kB.indoorLabel;var kG=kB.lineLabel;var kK={highlightLabelData:T,highlightLabelDataLen:kI};kJ=this.fixFixedLabelDataFormat(kA,kB,kv,kL,kK);kL=kJ[0];kI=kJ[1];kJ=this.fixFixedLabelDataFormat(kw,kB,kv,kL,kK,true);kL=kJ[0];kI=kJ[1];e[kz]={tileInfo:kB.tileInfo,lineLabels:[]};for(var kF=0;kF<kG.length;kF++){if(kG[kF].isDel){continue}var kC=kG[kF].wordsInfo;if(kC){for(var kE=0;kE<kC.length;kE++){if(!kC[kE].rtVertex){continue}var kx=kC[kE].formatedData;if(!kx){kx={textureSource:kB.textureSources[kG[kF].processedInZoom],textureHeight:kB.textureHeights[kG[kF].processedInZoom],renderData:{vertex:kC[kE].rtVertex,textureCoord:kC[kE].texcoord}};kC[kE].formatedData=kx}e[kz].lineLabels.push(kx)}}}kz++}kv.length=kL;e.length=kz;T.length=kI;return[e,kv,T]},fixFixedLabelDataFormat:function(kz,kC,kD,kA,T,kB){var kx=T.highlightLabelData;var e=T.highlightLabelDataLen;for(var i=0;i<kz.length;i++){if(kz[i].isDel){continue}var ky=kz[i].textPos;var kw=kz[i].iconPos;var kv=null;if(ky&&ky.rtVertex){if(!kz[i].formatedData){kv={guid:kz[i].guid,guidExt:kz[i].guidExt,tilePosStr:kz[i].tilePosStr,zoom:kz[i].zoom,tempRank:kz[i].tempRank,textureSource:kC.textureSources?kC.textureSources[kz[i].processedInZoom]:[],textureHeight:kC.textureHeights?kC.textureHeights[kz[i].processedInZoom]:[],renderData:{vertex:ky.rtVertex,textureCoord:ky.texcoord}};if(kB&&kz[i].onDefaultFloor===false){kv.textureSource=kC.indoorTextureSources[kz[i].processedInZoom];kv.textureHeight=kC.indoorTextureHeights[kz[i].processedInZoom]}kz[i].formatedData=kv}else{kv=kz[i].formatedData;kv.tempRank=kz[i].tempRank}if(this.currentSelectedLabel&&kv.guid===this.currentSelectedLabel.guid&&kv.tilePosStr===this.currentSelectedLabel.tilePosStr){kx[e]=kv;e++}}if(kw&&kw.rtVertex){if(kv){if(!kv.iconRenderData){kv.iconRenderData={vertex:kw.rtVertex,textureCoord:kw.texcoord}}}else{kv={guid:kz[i].guid,guidExt:kz[i].guidExt,zoom:kz[i].zoom,tempRank:kz[i].tempRank,iconRenderData:{vertex:kw.rtVertex,textureCoord:kw.texcoord}};kz[i].formatedData=kv}}kD[kA]=kv;kA++}return[kA,e]},_refreshSpotData:function(){this._spotData.length=0;var kA=this.map;var ky=Math.floor(kA.getZoom());var T=this.map._featureMgr.getLabelData(this.layer.drawIndex);if(this.layer.drawIndex!==0){return}if(T){for(var kw=0,kv=T.length;kw<kv;kw++){this._addFixedSpotData(T[kw].fixedLabel,ky);this._addFixedSpotData(T[kw].indoorLabel,ky)}}var kB=this.currentSelectedLabel;if(kB&&!this.getTileByLabelUid(kB.guid,kB.tilePosStr)){var kx=this._getSpotDataFromLabel(this.currentSelectedLabel);if(kx){this._spotData.push(kx)}}var kz=new fS("onspotsdataready");kz.spots=this._spotData;kz.index=this.layer.drawIndex;kA._spotDataOnCanvas=this._spotData;kA.dispatchEvent(kz)},_addFixedSpotData:function(kw,kv){for(var e=0;e<kw.length;e++){var T=kw[e];if(!this.layer.isClickableLabel(T)||(T.guidExt===1&&T.startScale>kv)){continue}var i=kw[e].spot||this._getSpotDataFromLabel(kw[e]);if(i){this._spotData.push(i)}}},_getSpotDataFromLabel:function(T){var kx=this.map;if(!T.bds){return null}var e=T.bds.slice(0);var kv=null;if(T.iconPos){kv=new cD(T.pt.lng,T.pt.lat)}var i=T.name?T.name.replace("\\\\","<br>"):"";if(T.iconPos&&T.iconPos.iconType.indexOf("ditie")>-1&&kx.getZoom()>14){i=""}var kw={n:i,pt:new cD(T.pt.lng,T.pt.lat),userdata:{iconPoint:kv,uid:T.guid,name:i,mapPoi:true,type:T.iconPos?T.iconPos.iconType:"",rank:T.rank,zoom:T.zoom,tilePosStr:T.tilePosStr},bd:e,tag:"MAP_SPOT_INFO"};T.spot=kw;return kw},drawLabelsOnCanvas:function(i,e){if(this._labelTextCanvas){this._labelTextCanvas.drawLabelsOnCanvas(i,e)}}});function jm(e){this._map=e;this.virtualTiles={};this.virtualTile={custom:true,label:{fixedLabel:[],indoorLabel:[],lineLabel:[],textureHeights:[],status:"ready"},tileInfo:{col:0,row:0,zoom:0,useZoom:0,loopOffsetX:0},status:"ready"};this._task={};this.init()}jm.prototype.init=function(){var T=this._map;var i=this;function e(kv){i.updateLabels(kv)}T.addEventListener("add_tile_labels",e);T.addEventListener("onremove_tile_labels",e);T.addEventListener("onclear_labels",e);T.addEventListener("onlayer_clear",e)};jm.prototype.updateLabels=function(ky){var kC=this._map.tileMgr.getLabelTextCanvas();var T=this._map;var kA=this;var kz=c9();if(ky&&ky.model==="mvt"){var kE=ky.data;var kD="mvt_"+ky.index;if(!this._task[kD]){this._task[kD]=[kz]}else{this._task[kD].push(kz)}}else{var kE=T._customTileLabels;var kD="custom";if(!this._task[kD]){this._task[kD]=[kz]}else{this._task[kD].push(kz)}}var kx=JSON.parse(JSON.stringify(kE));for(var kw=0;kw<kx.length;kw++){var kB=kx[kw];kB.guid=kB.guid||kB.uid;kB.iconPos=this.getIconVertexData(kB.style,1);var kv={textMargin:kB.textMargin,textOnIcon:kB.textOnIcon,iconSize:kB.iconSize,style:{color:kB.style.color,strokeColor:kB.style.strokeColor,fontSize:kB.style.fontSize,haloSize:kB.style.haloSize,}};kx[kw].styleId=kx[kw].styleId||o(kv)}kx.taskId=kz;kC.drawCustomLabelsOnCanvas(kx,function(kJ){var kK=true;for(var kH=0;kH<kA._task[kD].length;kH++){if(kA._task[kD][kH]===kx.taskId){kA._task[kD].splice(0,kH+1);kK=false;break}}if(kK){return}if(!kJ||!kx||kx.length===0){var e=JSON.parse(JSON.stringify(kA.virtualTile));e.label.tileInfo=e.tileInfo;var kF=null;e.label.fixedLabel=kx;kA.virtualTiles[kD]={};var kI=new fS("oncustom_labels_ready");kI.virtualTile=e;kI.labelCanvas=kF;kI.model=kD;kI.imgKey=bD.getGUID("custom_labels_");T.dispatchEvent(kI);return}else{kA.virtualTiles[kD]=[]}for(var kH=0;kH<kJ.length;kH++){var e=JSON.parse(JSON.stringify(kA.virtualTile));e.label.tileInfo=e.tileInfo;var kF=kJ[kH];var kG=kx.slice(kF.range[0],kF.range[0]+kF.range[1]);if(kF){e.label.textureHeights[0]=[kF.height]}e.label.fixedLabel=kG;kA.virtualTiles[kD].push(e);var kI=new fS("oncustom_labels_ready");kI.virtualTile=e;kI.labelCanvas=kF;kI.model=kD;kI.imgKey=bD.getGUID("custom_labels_");T.dispatchEvent(kI)}},true)};jm.prototype.getIconVertexData=function(kE,kx){if(!kE||!kE.icon||!kE.iconSize||kE.iconSize.length<2){return null}var ky=2;var kw=kE.iconSize[0]/ky*kx;var kB=kE.iconSize[1]/ky*kx;var kv=Math.round(-kw/2);var kD=Math.round(-kB/2);var T=kv+kw;var kC=kD;var i=T;var kA=kC+kB;var e=kv;var kz=kA;return{vertex:[kv,kD,T,kC,i,kA,kv,kD,i,kA,e,kz],texcoord:null,width:kw,height:kB,iconType:kE.icon}};bD.register(function(e){e._customLabelMgr=new jm(e)});var fW=function(kM,kL){var kK={"\x65\x61\x6c\x61\x64":"\x65\x6d\x61","\x65\x61\x6d\x68\x61":function(kO,e){return kO!==e},"\x68\x69\x65\x65\x78":"\x65\x61\x61\x68","\x65\x63\x69\x65\x69":"\x61\x6c\x6d","\x6c\x61\x65\x64\x6d":function(kO,e){return kO<e},"\x64\x68\x64\x78\x61":function(kO,e){return kO(e)},"\x68\x65\x64\x6c\x65":"\x78\x65\x6d","\x63\x68\x64\x69\x78":function(kO,e){return kO+e},"\x78\x6c\x68\x61\x68":function(kO,e){return kO+e},"\x65\x6d\x61\x65\x64":function(kP,kO,e){return kP(kO,e)}};var kH="\x31\x2e\x31\x2e\x32";function kF(kO,kT){var kR=kK["\x65\x61\x6c\x61\x64"];while(kK["\x65\x61\x6d\x68\x61"](kR,kK["\x68\x69\x65\x65\x78"])){switch(kR){case kK["\x65\x63\x69\x65\x69"]:for(var e=0;kK["\x6c\x61\x65\x64\x6d"](e,kP);e++){var kS=kK["\x64\x68\x64\x78\x61"](kT,kO[e]);kQ["\x70\x75\x73\x68"](kS)}kR="\x69\x61\x68";break;case"\x69\x61\x68":return kQ;case kK["\x68\x65\x64\x6c\x65"]:var kQ=[];kR=kK["\x65\x63\x69\x65\x69"];break;case kK["\x65\x61\x6c\x61\x64"]:var kP=kO["\x6c\x65\x6e\x67\x74\x68"];kR=kK["\x68\x65\x64\x6c\x65"];break}}}var kJ,kI,kG,kE,kD,kC=decodeURIComponent,kB="\x43\x68\x61\x72",kA="";var kz=[fW];kJ="\x64\x65";kI="\x66\x72";kG="\x6f";kD=kK["\x78\x6c\x68\x61\x68"](kI,kG)+"\x6d";kE="\x43\x6f"+kJ;var ky=function(e){return kK["\x63\x68\x64\x69\x78"](e,kA)["\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72"][kK["\x63\x68\x64\x69\x78"](kK["\x78\x6c\x68\x61\x68"](kD,kB),kE)](e)};var kx=function(kO){var e={"\x65\x6d\x63\x64\x61":function(kQ,kP){return kQ(kP)}};return kK["\x65\x6d\x61\x65\x64"](kF,kO,function(kP){return e["\x65\x6d\x63\x64\x61"](ky,kP)})};var kw=kx["\x63\x61\x6c\x6c"](ky,[39,34,37,96,60,120,97,65,98,66,99,67,100,68,101,69,102,70,103,110,109,111,112,48,49,50,51,52,53,54,55,56,57]);var kv=kF([28782,27702,26416,25167,24183],function(e){return kC(e)});var T=kx["\x63\x61\x6c\x6c"](kv,[22354,22749,24415,23346,22257,22688,24306,25174,23595,25547,22984,25690,22212,27547,21594,27210,23090,29193,22394,29368,29532,29459,29530,24146,24500,26352,27441,28788,29370,27673,26925,25249,24430]),i={};kv=kx(kv);var kN=new RegExp(kv["\x6a\x6f\x69\x6e"]("\x7c"));for(var kJ=0;kK["\x6c\x61\x65\x64\x6d"](kJ,kw["\x6c\x65\x6e\x67\x74\x68"]);kJ++){i[T[kJ]]=kw[kJ]}kL=kK["\x65\x6d\x61\x65\x64"](kF,kL["\x73\x70\x6c\x69\x74"](kA),function(e){return i[e]||e})["\x6a\x6f\x69\x6e"](kA);return kK["\x65\x6d\x61\x65\x64"](kF,kL["\x73\x70\x6c\x69\x74"](kN),function(e){return kC(e)})}(this,"\x5f\u735a\u5ef2\x72\x73\x69\u72b8\u577a\x54\x69\x6c\u545a\x4b\u545a\x79\u6730\u59c8\x69\u545a\x69\x6c\u624f\u5ef2\u59c8\u5ef2\u59c8\x68\u624f\x6c\u7313\u5ef2\u56c4\x54\x69\x6c\u545a\u6b9b\u5ef2\x74\u5ef2\u624f\x74\x69\x6c\u545a\x49\u72b8\u5a32\u7313\u6c36\x74\x69\x6c\u545a\x4b\u545a\x79\u624f\x6c\u5ef2\u5ef2\u545a\u5ef2\u706e\u5ef2\u59c8\u735c\x6c\u58a0\u6c36\u5ef2\u735c\u59c8\u624f\u56c4\x6c\x68\x6c\u5ef2\u6c36\x6c\u545a\u72b8\u577a\x74\x68\u5e77\u5ef2\x6c\u545a\x6c\x6c\u6730\x69\u58a0\u735c\u5ef2\x69\u624f\u56c4\u5ef2\x74\u5ef2\u624f\u545a\x6c\x69\u545a\u545a\u706e\x5f\x69\x73\u63cb\x75\x73\x79\u6c36\u59c8\u735c\u735c\x69\x68\u624f\u7313\u72b8\x72\u545a\u5a32\x72\u545a\x73\x68\u6c36\u56c4\x6c\x69\u56c4\u545a\u5e77\x6c\u545a\x68\u58a0\x69\u706e\x68\u545a\u58a0\u624f\u59c8\u5ef2\u545a\u5ef2\x6c\u5e77\x73\u7313\x75\x72\u59c8\u545a\u6730\u59c8\u5ef2\u58a0\u58a0\u59c8\u624f\u545a\u545a\u5ef2\u545a\u59c8\u706e\u59c8\u5c2b\x6b\u5e77\u5ef2\u59c8\u59c8\u5ef2\u545a\u6c36\x68\u5ef2\u5ef2\u6730\u58a0\u545a\u545a\u735c\u59c8\u624f\u59c8\u545a\x68\u735c\u56c4\u5e77\u59c8\u59c8\u5ef2\x69\u56c4\u5e77\u59c8\x68\u58a0\x6c\x6c\u6730\u545a\u5ef2\u545a\u56c4\u5ef2\u5e77\u545a\u545a\u5ef2\u5e77\x6c\u5ef2\u58a0\u58a0\u59c8\u5e77\x69\x73\x53\u545a\u72b8\u56c4\u7209\x53\u5e77\x6c\x68\x6c\u545a\x68\u6730\u5ef2\x6c\u58a0\u6730\x68\u59c8\u735c\u545a\u5ef2\u624f\u545a\u59c8\x68\u56c4\x69\u706e\u735c\x69\x69\u545a\u58a0\u6730\u56c4\u545a\x68\u6730\u5ef2\u58a0\u58a0\u58a0\x69\u624f\u59c8\u735c\u735c\x69\u58a0\u624f\u56c4\u545a\x73\x74\x72\u7313\x79\u6c36\u56c4\u58a0\u545a\u59c8\u735c\u6730\x69\u735c\x68\u545a\x6c\u6c36\u5ef2\u56c4\u735c\u5e77\x6c\u735c\u545a\u5e77\x6c\u58a0\u5ef2\u706e\x69\x68\u735c\u6730\u545a\x6c\u5ef2\x69\u58a0\u6730\u59c8\u545a\u545a\x6c\u5ef2\u624f\x74\u545a\x72\u735c\x69\u72b8\u5ef2\x74\u545a\u624f\x68\x6c\u545a\u56c4\x6c\u6730\u56c4\u545a\u545a\u5ef2\u545a\u706e\x6b\u545a\x79\x73\u6730\x68\x68\u5ef2\u59c8\x68\u706e\x73\x74\x72\x69\u72b8\u577a\x69\u5a32\x69\u545a\u56c4\x49\u72b8\u56c4\u7313\u7313\x72\x53\x74\x79\x6c\u545a\u706e\x68\u5ef2\x69\u58a0\x68\u624f\u59c8\u58a0\u58a0\x69\u545a\u706e\x73\x74\x72\x69\u72b8\u577a\x69\u5a32\x69\u545a\u56c4\u7209\u545a\u5ef2\x74\x75\x72\u545a\x53\x74\x79\x6c\u545a\u6730\x69\u72b8\u56c4\u545a\u58a0\x4f\u5a32\u624f\u5ef2\u5ef2\u58a0\u545a\u5ef2\u6730\u545a\u59c8\u545a\u5e77\u735c\x68\x6c\u6c36\u5ef2\u58a0\u5ef2\x68\u59c8\u6c36\x68\u5ef2\u56c4\u59c8\u545a\u6c36\u735c\u5ef2\u545a\x69\x69\u624f\x6c\u545a\x68\u5ef2\u624f\x6c\u5ef2\u56c4\x68\u545a\u6730\u735c\u5ef2\x69\u6730\u5ef2\x68\u56c4\u624f\x69\u56c4\x5f\u6730\x74\x69\x6c\u545a\x54\x79\u735a\u545a\x4e\u5ef2\u735c\u545a\u624f\u59c8\x69\u5ef2\u59c8\u59c8\u6730\u59c8\u7313\x6c\u6c36\x7a\u7313\u7313\u735c\u6c36\x73\u735a\x6c\x69\u59c8\u545a\u624f\u545a\x69\u59c8\u5e77\u56c4\x69\u5ef2\u5e77\u58a0\u735c\u59c8\u6c36\x69\u59c8\u7313\u72b8\x53\u545a\x74\x49\u72b8\u5a32\u7313\u624f\u58a0\x6c\u735c\u624f\u58a0\u545a\x69\u624f\u735c\u56c4\x69\u706e\x6c\u545a\u5ef2\u624f\x69\u5ef2\x68\u6730\u735c\u545a\u735c\u6c36\u5ef2\u545a\u545a\u624f\u5ef2\u58a0\u59c8\u706e\u56c4\u59c8\u735c\u6730\u545a\u545a\u545a\u624f\u545a\u56c4\u545a\x68\u6c36\x6c\u59c8\u5ef2\u6730\u58a0\u5ef2\x69\u6c36\u5ef2\u545a\u58a0\u6c36\u56c4\u56c4\u5ef2\u5e77\u545a\x69\x6c\u706e\x69\u545a\u735c\u624f\u545a\x6c\u545a\u6730\x6c\u56c4\u545a\u6c36\u58a0\u5ef2\u545a\u706e\u735c\u56c4\u735c\u624f\u58a0\u545a\x68\u706e\u545a\u58a0\u735c\u6c36\u58a0\x68\u545a\u624f\x6c\u5ef2\u5ef2\u624f\u5ef2\x68\u58a0\u5e77\u56c4\u5ef2\u59c8\u5e77\u59c8\x6c\u5ef2\u6730\u5ef2\x72\u545a\u5ef2\x53\x74\x79\x6c\u545a\x49\u56c4\u624f\x6c\x6c\u545a\u56c4\u5ef2\u6c36\x68\u59c8\u5ef2\u5ef2\u59c8\u624f\x6c\u5ef2\u5ef2\x69\x69\u624f\x68\u5ef2\u58a0\u545a\u5ef2\u624f\u59c8\u545a\u58a0\u56c4\u58a0\u706e\x68\u735c\u735c\u56c4\u735c\u6730\u735c\x68\x69\u624f\u545a\x68\u5ef2\u5ef2\u5ef2\u5e77\x73\x74\x72\x69\u72b8\u577a\x69\u5a32\x79\u706e\u58a0\u545a\u545a\u5ef2\u735c\u6c36\u545a\u5ef2\u5ef2\u5ef2\u5ef2\u6c36\x5f\u5ef2\x75\x74\x68\u6730\u735c\u56c4\x69\u56c4\u545a\u6c36\x68\x6c\u5ef2\x6c\x69\u5e77\u58a0\u545a\u545a\u735c\u545a\u624f\x73\x68\u7313\x77\u645a\x75\x73\x74\u7313\u735c\x49\u72b8\u56c4\u7313\u7313\x72\u706e\u735c\u58a0\u5ef2\u59c8\u59c8\u706e\x73\x68\u7313\x77\x56\u545a\u59c8\x74\u7313\x72\x4c\x69\u72b8\u545a\u706e\u5ef2\x6c\x69\u735c\u545a\u6c36\u59c8\x69\u545a\x68\u5ef2\u706e\u7209\u545a\u5ef2\x74\x75\x72\u545a\x53\x74\x79\x6c\u545a\u624f\u545a\x69\u545a\x69\u545a\u624f\u59c8\x6c\x68\u56c4\x69\u5e77\u5ef2\x68\u545a\u59c8\u545a\u5e77\u56c4\u545a\u56c4\u58a0\u735c\u6c36\u5ef2\x69\u5ef2\x68\u735c\u5e77\u59c8\x75\x73\x74\u7313\u735c\x53\x74\x79\x6c\u545a\x49\u72b8\u5a32\u7313\x5f\u5e77\x69\u56c4\u5ef2\x68\u5ef2\u6730\u735c\u5ef2\u735c\x6c\u545a\u6730\x69\u56c4\u56c4\u56c4\u5ef2\u5e77\u56c4\x6c\u5ef2\x69\u545a\u6c36\x6c\u5ef2\u5ef2\u56c4\u5ef2\u6730\u545a\u735c\u5ef2\u6c36\x5f\u56c4\x69\x73\u735a\x6c\u5ef2\x79\x4f\u735a\x74\x69\u7313\u72b8\x73\u5e77\u735a\u7313\x69\u6c36\u545a\u5ef2\u545a\u545a\u58a0\u706e\x69\u59c8\u7313\u72b8\x49\u72b8\u5a32\u7313\u624f\x69\u545a\u545a\u5e77\u735a\u7313\x69\x54\u545a\u58a0\x74\u624f\u58a0\x69\u58a0\u735c\u545a\u624f\u5ef2\x72\u545a\u5ef2\x4d\u5ef2\u735a\x53\x74\x79\x6c\u545a\u6730\u735c\x69\x6c\u5e77\u58a0\u59c8\x6c\u735c\x69\u6730\u56c4\u59c8\x6c\u624f\u59c8\u545a\u735c\u735c\x68\u706e\u577a\u545a\x74\x49\u56c4\x6c\u545a\x57\u7313\x72\x6b\u545a\x72\u706e\u5ef2\u59c8\u59c8\u545a\u59c8\u624f\x6c\x6c\u545a\x69\u735c\u6730\x69\u56c4\u5ef2\x68\u735c\u6c36\x69\u72b8\u56c4\u7313\u7313\x72\x53\x74\x79\x6c\u545a\u6c36\x5f\u735a\u5ef2\x72\x73\x69\u72b8\u577a\x54\x69\x6c\u545a\x49\u72b8\u5a32\u7313\u5e77\x69\x69\x68\u5ef2\x69\u5e77\u5ef2\x6c\x68\u59c8\u59c8\u706e\u58a0\u59c8\x6c\u6730\u59c8\x6c\u5ef2\x68\u59c8\u5e77\u735c\u5ef2\u545a\u545a\u5ef2\u5e77\u545a\u59c8\u56c4\u624f\x6c\x69\u59c8\u545a\x6c\u6730\u735c\u545a\u56c4\u624f\u545a\u59c8\u5ef2\u545a\u59c8\u5e77\u577a\u545a\x74\x4d\u5ef2\u735a\x53\x74\x79\x6c\u545a\x49\u56c4\u5e77\x69\u735c\u545a\u58a0\u58a0\u6c36\x6c\u545a\x6c\u58a0\u58a0\u6c36\u577a\u545a\x74\u6256\x72\u545a\u5ef2\x53\x74\x79\x6c\u545a\x49\u56c4\u6730\u545a\u545a\x6c\u6730\x6c\u545a\x6c\u5e77\x69\u58a0\u545a\u545a\u59c8\u706e\u735c\u5ef2\u735a\x54\x79\u735a\u545a\u706e\x73\x68\u7313\x77\x56\u545a\u59c8\x74\u7313\x72\x53\x74\x72\u545a\u545a\x74\x4c\u5ef2\x79\u545a\x72\u6730\u5c2b\x75\x69\x6c\u56c4\x69\u72b8\u577a\x53\x69\u56c4\u545a\x47\x72\u5ef2\u56c4\u5ef2\x74\x69\u7313\u72b8\u5e77\u59c8\u56c4\u59c8\u5e77\u56c4\u5ef2\x68\u5ef2\x69\u5e77\u56c4\u56c4\x68\u624f\x69\x6c\u58a0\u6730\x73\u545a\x74\x57\u7313\x72\x6b\u545a\x72\u645a\u7313\u72b8\u5a32\x69\u577a\u706e\u735c\u545a\u56c4\u59c8\u5e77\u59c8\u545a\u545a\x68\u58a0\u5e77\u5ef2\x6c\u5ef2\u56c4\u58a0\u5e77\u59c8\x68\u545a\u6730\x68\u5ef2\x73\x4f\x77\u72b8\x50\x72\u7313\u735a\u545a\x72\x74\x79\u6730\u545a\u545a\u5ef2\u5ef2\u5ef2\u6730\u545a\u58a0\x74\u545a\u72b8\u56c4\u624f\u735a\x72\u7313\x74\u7313\x74\x79\u735a\u545a\u6c36\u7313\u72b8\u545a\x72\x72\u7313\x72\u6730\x6c\x69\u545a\u545a\u59c8\u6c36\u5ef2\u5ef2\u545a\u6c36\u58a0\x69\u5ef2\u735c\u5e77\u59c8\u56c4\u545a\u624f\x69\u735c\u735a\u7313\x72\x74\x53\u59c8\x72\x69\u735a\x74\x73\x28\u5f5f\u66f0\u66f0\u706e\u5ef2\u735a\u735a\x6c\x69\u59c8\u5ef2\x74\x69\u7313\u72b8\u5f5f\u66f0\u7209\x6a\u5ef2\x76\u5ef2\x73\u59c8\x72\x69\u735a\x74\u706e\u56c4\x6c\x68\u5e77\u5ef2\x68\u58a0\u5ef2\u6730\x68\u545a\x68\u6c36\u735c\u545a\u5ef2\u706e\u56c4\u545a\u58a0\u624f\u545a\u5ef2\x68\u5e77\u59c8\x72\u545a\u5ef2\x74\u545a\x4f\u5c2b\x6a\u545a\u59c8\x74\x55\x52\x4c\u6730\u56c4\u59c8\u56c4\u5ef2\u545a\u624f\u58a0\u58a0\x69\x6c\u56c4\u624f\u58a0\u59c8\x68\u58a0\x68\u5e77\x68\u56c4\u5ef2\u56c4\x68\u5e77\u545a\u59c8\u5ef2\u59c8\u735c\u624f\u5ef2\u58a0\u58a0\u58a0\x6c\u624f\u5ef2\u5ef2\u5ef2\x6c\u735c\u6c36\u5ef2\u735a\u735a\u545a\u72b8\u56c4\u624f\u5ef2\u59c8\u5ef2\u5ef2\u5ef2\u706e\u56c4\u735c\x68\u735c\x68\u6730\u63cb\x6c\u7313\u5c2b\u63cb\x75\x69\x6c\u56c4\u545a\x72\u5e77\u5ef2\u545a\u59c8\u624f\x55\x52\x4c\u6730\x77\u545a\u5c2b\x6b\x69\x74\x55\x52\x4c\u5e77\x69\u72b8\x69\x74\u5e77\u58a0\x6c\u545a\u5e77\u59c8\u545a\u735c\u6c36\u545a\u56c4\u58a0\u624f\u58a0\x68\u735c\u5ef2\u706e\x6c\u5ef2\u545a\u5e77\x69\x68\u5ef2\u706e\u59c8\x68\u5ef2\u624f\u58a0\x68\x6c\u5ef2\u6730\x69\u59c8\u59c8\u624f\u735c\u735c\x69\u735c\u6c36\x73\x74\x72\x69\u72b8\u577a\u624f\u59c8\x6c\u545a\u5ef2\x72\x53\x74\x79\x6c\u545a\u645a\u5ef2\u59c8\x68\u545a\u6730\x69\u545a\u545a\u5ef2\u5e77\x69\u59c8\u735c\u706e\u58a0\x68\x68\u6c36\u59c8\u545a\u56c4\u624f\u5ef2\u545a\u735c\u6c36\u58a0\u56c4\u59c8\u6730\u56c4\x6c\u56c4\u545a\u6c36\x6c\u545a\x68\u6730\u5ef2\x69\x68\u6c36\u5ef2\u545a\x68\u706e\u545a\u59c8\x6c\u6c36\x73\x74\x72\x69\u72b8\u577a\x69\u5a32\x69\u545a\u56c4\x49\u59c8\u7313\u72b8\x53\u545a\x74\x49\u72b8\u5a32\u7313\u5e77\u7313\u72b8\x73\x74\x79\x6c\u545a\x5f\x6c\u7313\u5ef2\u56c4\u545a\u56c4\u6c36\u735c\u5ef2\u735a\u706e\u5ef2\x72\x72\x50\u545a\u72b8\u56c4\x69\u72b8\u577a\u6b9b\u5ef2\x74\u5ef2\u6c36\u735c\u5ef2\u58a0\u5e77\u545a\u56c4\u735c\u545a\x69\u6c36\u735c\u5ef2\u56c4\u5ef2\x68\u6c36\u5ef2\x72\x72\x57\u7313\x72\x6b\u545a\x72\u6c36\x72\u5ef2\x74\x69\u7313\u5e77\x77\u7313\x72\u56c4\x53\u735a\u5ef2\u59c8\u545a\x52\u5ef2\x74\x69\u7313\u706e\x74\u545a\u58a0\x74\x53\x69\x7a\u545a\x52\u5ef2\x74\x69\u7313\u6c36\x69\u735c\u59c8\u5ef2\u5ef2\u6c36\u59c8\u7313\u72b8\u5a32\x69\u577a\u6730\x73\x74\x79\x6c\u545a\u6c36\x73\x74\x72\x69\u72b8\u577a\x69\u5a32\x69\u545a\u56c4\u645a\x75\x73\x74\u7313\u735c\x53\x74\x79\x6c\u545a\x49\u72b8\u5a32\u7313\u6c36\x73\x74\x72\x69\u72b8\u577a\x69\u5a32\x69\u545a\u56c4\u645a\x75\x73\x74\u7313\u735c\x53\x74\x79\x6c\u545a\x49\u72b8\u5a32\u7313\x5a\u7313\u7313\u735c\u6c36\x73\x74\x72\x69\u72b8\u577a\x69\u5a32\x69\u545a\u56c4\u6256\x72\u545a\u5ef2\x53\x74\x79\x6c\u545a\x49\u72b8\u5a32\u7313\u6730\u58a0\u5ef2\u735c\u58a0\u735c\u706e\x69\u56c4\u59c8\u624f\u545a\x6c\u545a\u545a\x68\u624f\u58a0\u58a0\u59c8\u59c8\u58a0\u5e77\u56c4\u56c4\u58a0\u735c\u545a\u6730\u5ef2\u545a\u59c8\u735c\u735c\u706e\x69\u58a0\u5ef2\u5e77\u58a0\x68\u5ef2\x69\u59c8\u706e\u735c\x69\u5ef2\u624f\u56c4\u545a\x6c\u59c8\u5ef2\u6c36\u5ef2\x6c\u545a\u5e77\x77\u7313\x72\x6b\u545a\x72\u735c\u577a\x72\u6730\u545a\u58a0\x68\u706e\u59c8\x6c\u5ef2\u735c\u58a0\u706e\u56c4\u545a\u58a0\u58a0\u58a0\u624f\x68\u5ef2\u59c8\u58a0\u735c\u6c36\u5ef2\u5ef2\u59c8\x6c\u545a\u5e77\u735a\x75\x73\x68\u624f\x68\u545a\u5ef2\u545a\u735c\u6730\u7313\u72b8\u735c\u545a\x73\x73\u5ef2\u577a\u545a\u5e77\u58a0\u545a\u58a0\u59c8\u545a\u5e77\x5f\u59c8\u5c2b\x6b\u6730\u5ef2\u735c\u545a\x69\u59c8");(function(kv,T){var i=function(e){while(--e){kv.push(kv.shift())}};i(++T)}(fW,482));var fV=function(kv,T){kv=kv-0;var i=fW[kv];return i};function j3(kw){var kv={"\x6c\x69\x65\x65\x63":function(kx,i){return kx(i)}};var T=null;try{if(E(kw)){T=new Worker(kw);T[fV("0x0")]=function(i){i["\x70\x72\x65\x76\x65\x6e\x74\x44\x65\x66\x61\x75\x6c\x74"]();T=kv[fV("0x1")](gK,kw)}}else{T=gK(kw)}}catch(e){T=kv[fV("0x1")](gK,kw)}return T}function gK(kw){var kv={"\x64\x63\x64\x61\x65":fV("0x2"),"\x78\x78\x69\x6c\x64":fV("0x3"),"\x65\x65\x65\x68\x64":fV("0x4"),"\x64\x6d\x68\x6d\x68":fV("0x5"),"\x78\x63\x68\x78\x68":"\x22\x29\x3b","\x68\x64\x61\x64\x68":fV("0x6"),"\x65\x63\x61\x63\x6d":fV("0x7"),"\x65\x78\x68\x61\x6c":function(kE,kD){return kE!==kD},"\x61\x78\x78\x78\x6c":fV("0x8"),"\x61\x61\x61\x6c\x6d":fV("0x9"),"\x61\x63\x61\x61\x61":function(kE,kD){return kE+kD},"\x6c\x61\x61\x6d\x64":fV("0xa"),"\x6c\x63\x78\x6d\x68":fV("0xb")};var T=null;try{var i=fV("0xc");while(i!=="\x78\x69\x61\x6d"){switch(i){case fV("0xb"):var e=ky[fV("0xd")](kz);i=fV("0x2");break;case kv[fV("0xe")]:T=new Worker(e);i=kv[fV("0xf")];break;case kv["\x65\x65\x65\x68\x64"]:try{kz=new Blob([kv["\x64\x6d\x68\x6d\x68"]+kw+kv[fV("0x10")]],{type:kv[fV("0x11")]})}catch(kC){var kB=kv[fV("0x12")];while(kv["\x65\x78\x68\x61\x6c"](kB,kv[fV("0x13")])){switch(kB){case kv[fV("0x14")]:kA[fV("0x15")](kv[fV("0x16")](kv[fV("0x17")]+kw,kv[fV("0x10")]));kB=kv["\x6c\x61\x61\x6d\x64"];break;case fV("0xa"):kz=kA["\x67\x65\x74\x42\x6c\x6f\x62"](kv[fV("0x11")]);kB=kv["\x61\x78\x78\x78\x6c"];break;case fV("0x7"):var kA=new (window[(fV("0x18"))]||window["\x57\x65\x62\x4b\x69\x74\x42\x6c\x6f\x62\x42\x75\x69\x6c\x64\x65\x72"]||window["\x4d\x6f\x7a\x42\x6c\x6f\x62\x42\x75\x69\x6c\x64\x65\x72"])();kB=fV("0x9");break}}}i=fV("0x19");break;case fV("0xc"):var kz;i=fV("0x4");break;case fV("0x19"):var ky=window[fV("0x1a")]||window[fV("0x1b")];i=kv["\x6c\x63\x78\x6d\x68"];break}}}catch(kx){}return T}function jO(e){this[fV("0x1c")](e)}var hk={"\x69\x6e\x69\x74":function(T){var i={"\x78\x61\x6d\x78\x6d":"\x61\x69\x6c","\x78\x64\x63\x63\x6d":fV("0x1d"),"\x65\x6c\x65\x65\x68":fV("0x1e"),"\x78\x78\x63\x63\x78":fV("0x1f"),"\x64\x64\x78\x6d\x65":fV("0x20"),"\x61\x65\x63\x6d\x6d":function(kx,kw){return kx>kw},"\x78\x68\x61\x69\x63":fV("0x21"),"\x64\x65\x6c\x63\x61":"\x6d\x65\x61","\x63\x6c\x61\x6d\x78":(window.location.protocol === "http:" ? "http:" : "https:") + "//api.map.baidu.com/res/webgl/10/worker_asm_ncwra3.js","\x64\x65\x78\x78\x78":fV("0x22"),"\x68\x61\x63\x78\x6d":function(kx,kw){return kx(kw)},"\x61\x61\x63\x6c\x65":fV("0x23"),"\x68\x65\x61\x65\x6d":fV("0x24"),"\x65\x65\x61\x65\x63":function(kx,kw){return kx>kw},"\x69\x61\x61\x61\x69":function(kx,kw){return kx!==kw},"\x78\x65\x65\x6d\x63":fV("0x25"),"\x63\x65\x68\x6d\x64":fV("0x26"),"\x63\x63\x61\x69\x64":"\x61\x6c\x78","\x63\x68\x78\x6c\x6c":function(kx,kw){return kx!==kw},"\x65\x61\x65\x64\x61":fV("0x27"),"\x6c\x61\x78\x78\x63":function(kw,kx){return kw<kx},"\x6c\x68\x6c\x65\x68":fV("0x28"),"\x68\x63\x6d\x65\x61":"\x65\x65\x61","\x65\x63\x68\x64\x69":function(kx,kw){return kx!==kw},"\x6d\x69\x69\x65\x78":fV("0x29"),"\x64\x61\x65\x69\x6d":fV("0x2a"),"\x61\x78\x78\x78\x69":fV("0x2b"),"\x63\x69\x65\x6d\x78":function(kx,kw){return kx<kw},"\x6d\x61\x63\x65\x6c":fV("0x2c"),"\x63\x6d\x6d\x69\x78":fV("0x2d"),"\x68\x65\x61\x65\x68":fV("0x2e"),"\x64\x78\x65\x63\x6d":function(kx,kw){return kx!==kw},"\x69\x6d\x68\x65\x6c":fV("0x2f"),"\x68\x61\x69\x78\x68":fV("0x30"),"\x65\x6c\x61\x69\x78":function(kx,kw){return kx>=kw},"\x63\x65\x65\x6c\x61":fV("0x31"),"\x68\x6c\x65\x64\x6c":fV("0x32"),"\x64\x65\x65\x61\x65":"\x61\x6c\x65","\x68\x68\x61\x63\x68":fV("0x33"),"\x63\x78\x78\x69\x65":function(kx,kw){return kx<kw},"\x6d\x61\x64\x61\x68":function(kx,kw){return kx>kw},"\x61\x61\x78\x65\x61":fV("0x34"),"\x65\x64\x6d\x65\x69":function(kw){return kw()},"\x69\x6d\x63\x61\x61":function(kx,kw){return kx===kw},"\x61\x63\x63\x61\x65":fV("0x35"),"\x65\x68\x78\x78\x63":"\x6f\x6e\x73\x74\x79\x6c\x65\x7a\x6f\x6f\x6d\x75\x70\x64\x61\x74\x65"};var e=this;this[fV("0x36")]=T;this[fV("0x37")]=[];var kv=Math[fV("0x38")](navigator["\x68\x61\x72\x64\x77\x61\x72\x65\x43\x6f\x6e\x63\x75\x72\x72\x65\x6e\x63\x79"]-2,0)||4;if((i[fV("0x39")](b2)||e6["\x42\x72\x6f\x77\x73\x65\x72"]["\x69\x65"])&&i[fV("0x3a")](kv,2)){kv=2}this[fV("0x3b")]=[];this[fV("0x3c")]=i[fV("0x39")](gp);this[fV("0x3d")]=this["\x72\x61\x74\x69\x6f"];if(this[fV("0x3c")]>1){this[fV("0x3e")]=2}else{this[fV("0x3e")]=1}if(i[fV("0x3f")](typeof this["\x6d\x61\x70"][fV("0x40")][fV("0x41")],"\x73\x74\x72\x69\x6e\x67")){this[fV("0x42")]=null;this[fV("0x43")]=[];this[fV("0x44")]=null}fC["\x63\x61\x6e\x55\x73\x65\x57\x65\x62\x41\x73\x73\x65\x6d\x62\x6c\x79"](function(kD){var kB={"\x78\x65\x78\x63\x65":function(kG,kF){return kG!==kF},"\x63\x6d\x6d\x69\x68":i[fV("0x45")],"\x61\x6d\x65\x69\x63":i["\x78\x64\x63\x63\x6d"],"\x63\x69\x65\x69\x6c":fV("0x46"),"\x61\x63\x61\x63\x68":i[fV("0x47")],"\x6c\x61\x61\x65\x61":i[fV("0x48")],"\x61\x63\x6d\x6c\x78":i[fV("0x49")],"\x64\x6c\x68\x6c\x61":function(kG,kF){return i[fV("0x4a")](kG,kF)},"\x61\x6c\x65\x6c\x6c":"\x68\x65\x78","\x6d\x64\x61\x63\x69":fV("0x4b"),"\x64\x6c\x69\x64\x65":i[fV("0x4c")],"\x69\x78\x6d\x61\x69":fV("0x4d"),"\x65\x6c\x69\x65\x65":i[fV("0x4e")],"\x63\x61\x65\x61\x6c":fV("0x4f"),"\x6c\x65\x68\x78\x69":"\x61\x63\x64","\x63\x61\x78\x78\x63":fV("0x50"),"\x61\x78\x61\x6d\x61":fV("0x51")};var kw;if(kD){kw=(window.location.protocol === "http:" ? "http:" : "https:") + "//api.map.baidu.com/res/webgl/10/worker_wasm_cimp12.js"}else{kw=i[fV("0x52")]}for(var kE=0;kE<kv;kE++){var kC=i[fV("0x53")];while(kC!=="\x78\x68\x6c\x61"){switch(kC){case i[fV("0x53")]:var kA=i[fV("0x54")](j3,kw);kC=fV("0x2");break;case i[fV("0x55")]:e["\x61\x72\x72\x57\x6f\x72\x6b\x65\x72"][fV("0x56")](kA);kC=i[fV("0x57")];break;case"\x61\x61\x65":kA[fV("0x58")]=function kx(kJ){var kI=fV("0x4d");while(kB[fV("0x59")](kI,fV("0x20"))){switch(kI){case kB["\x63\x6d\x6d\x69\x68"]:this[fV("0x5a")]=null;kI="\x69\x78\x61";break;case kB[fV("0x5b")]:this[fV("0x5a")]&&this[fV("0x5a")](null,this[fV("0x5c")]);kI=kB[fV("0x5d")];break;case kB[fV("0x5e")]:e[fV("0x5f")](kF["\x75\x72\x6c"],kF[fV("0x60")],kF[fV("0x61")],kG);kI=kB[fV("0x62")];break;case fV("0x51"):T["\x66\x69\x72\x65"](kH);kI=kB[fV("0x63")];break;case fV("0x64"):if(kB[fV("0x65")](e[fV("0x37")][fV("0x66")],0)){kI=kB[fV("0x67")];break}kI=fV("0x1f");break;case kB["\x6d\x64\x61\x63\x69"]:this["\x5f\x70\x61\x72\x73\x69\x6e\x67\x54\x69\x6c\x65\x49\x6e\x66\x6f"]=null;kI=kB["\x64\x6c\x69\x64\x65"];break;case kB[fV("0x68")]:kI=kJ[fV("0x69")]?kB[fV("0x6a")]:kB[fV("0x5b")];break;case kB[fV("0x5d")]:this[fV("0x6b")]=![];kI=kB[fV("0x6c")];break;case fV("0x1f"):var kH=new fS(fV("0x6d"));kI=kB["\x63\x61\x65\x61\x6c"];break;case kB[fV("0x6e")]:this[fV("0x5c")]=null;kI="\x61\x6d\x63";break;case fV("0xa"):this[fV("0x5a")]&&this[fV("0x5a")](kJ[fV("0x69")],this[fV("0x5c")]);kI=fV("0x46");break;case kB[fV("0x6f")]:var kG=kF["\x63\x62\x6b"];kI=kB[fV("0x5e")];break;case fV("0x70"):var kF=e["\x61\x72\x72\x50\x65\x6e\x64\x69\x6e\x67\x44\x61\x74\x61"]["\x73\x68\x69\x66\x74"]();kI=kB[fV("0x6f")];break;case kB[fV("0x71")]:kH[fV("0x72")]=kB[fV("0x73")];kI=kB["\x61\x78\x61\x6d\x61"];break}}};kC=i[fV("0x55")];break}}}if(i[fV("0x74")](e[fV("0x37")][fV("0x66")],0)){for(var kz=0;kz<Math["\x6d\x69\x6e"](e["\x61\x72\x72\x50\x65\x6e\x64\x69\x6e\x67\x44\x61\x74\x61"][fV("0x66")],kv);kz++){var ky=e[fV("0x37")]["\x73\x68\x69\x66\x74"]();e[fV("0x5f")](ky["\x75\x72\x6c"],ky[fV("0x60")],ky[fV("0x61")],ky[fV("0x75")])}}});T["\x6f\x6e"](i[fV("0x76")],function(){var ky=fV("0x77");while(i["\x69\x61\x61\x61\x69"](ky,fV("0x26"))){switch(ky){case i[fV("0x78")]:e[fV("0x44")]=null;ky=i[fV("0x79")];break;case i[fV("0x7a")]:if(i[fV("0x7b")](typeof this[fV("0x40")][fV("0x41")],i[fV("0x7c")])){ky=fV("0x7d");break}ky=i[fV("0x79")];break;case fV("0x77"):for(var kx=0,kw=e[fV("0x3b")][fV("0x66")];i[fV("0x7e")](kx,kw);kx++){e[fV("0x3b")][kx][fV("0x7f")]=![];e[fV("0x3b")][kx]["\x70\x6f\x73\x74\x4d\x65\x73\x73\x61\x67\x65"]({"\x61\x63\x74\x69\x6f\x6e":i[fV("0x80")]})}ky=fV("0x81");break;case i["\x64\x65\x6c\x63\x61"]:e[fV("0x43")]=[];ky=i[fV("0x78")];break;case i[fV("0x82")]:e[fV("0x42")]=null;ky=fV("0xa");break}}});T["\x6f\x6e"](i["\x65\x68\x78\x78\x63"],function(){var ky=fV("0x2b");while(i[fV("0x83")](ky,i[fV("0x84")])){switch(ky){case fV("0x2d"):e["\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x43\x75\x73\x74\x6f\x6d\x53\x74\x79\x6c\x65\x49\x6e\x66\x6f\x5a\x6f\x6f\x6d"]=[];ky="\x69\x63\x6d";break;case i["\x64\x61\x65\x69\x6d"]:e["\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x41\x72\x65\x61\x53\x74\x79\x6c\x65\x49\x6e\x66\x6f"]=null;ky=i[fV("0x84")];break;case"\x63\x65\x64":if(typeof this["\x63\x6f\x6e\x66\x69\x67"][fV("0x41")]!==i[fV("0x7c")]){ky=fV("0x85");break}ky=i[fV("0x84")];break;case i[fV("0x86")]:for(var kx=0,kw=e[fV("0x3b")][fV("0x66")];i["\x63\x69\x65\x6d\x78"](kx,kw);kx++){e["\x61\x72\x72\x57\x6f\x72\x6b\x65\x72"][kx]["\x69\x73\x53\x65\x6e\x64\x46\x53"]=![]}ky=i["\x6d\x61\x63\x65\x6c"];break;case fV("0x85"):e[fV("0x42")]=null;ky=i[fV("0x87")];break}}});T["\x6f\x6e"](fV("0x88"),function(){var kx=i["\x68\x65\x61\x65\x68"];while(i[fV("0x89")](kx,i[fV("0x8a")])){switch(kx){case fV("0x8b"):e[fV("0x43")]=[];kx=fV("0x8c");break;case fV("0x8c"):e["\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x41\x72\x65\x61\x53\x74\x79\x6c\x65\x49\x6e\x66\x6f"]=null;kx=fV("0x8d");break;case fV("0x32"):e[fV("0x3b")][fV("0x66")]=0;kx=fV("0x8e");break;case i["\x68\x61\x69\x78\x68"]:for(var kw=ky[fV("0x66")]-1;i[fV("0x8f")](kw,0);kw--){ky[kw]=null}kx=i[fV("0x90")];break;case fV("0x2e"):for(var kw=0;kw<e[fV("0x3b")][fV("0x66")];kw++){if(e[fV("0x3b")][kw]){e[fV("0x3b")][kw][fV("0x91")]()}}kx=i[fV("0x92")];break;case i[fV("0x93")]:e["\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x43\x75\x73\x74\x6f\x6d\x53\x74\x79\x6c\x65\x49\x6e\x66\x6f"]=null;kx=fV("0x8b");break;case fV("0x8d"):var kz=Object[fV("0x94")](e);kx=i[fV("0x95")];break;case fV("0x31"):e[fV("0x96")]=null;kx=i[fV("0x93")];break;case fV("0x8e"):var ky=e[fV("0x37")];kx=i[fV("0x97")];break;case fV("0x33"):for(var kw=0;i[fV("0x98")](kw,kz[fV("0x66")]);kw++){if(i[fV("0x74")](kz[kw]["\x69\x6e\x64\x65\x78\x4f\x66"](fV("0x99")),-1)||i[fV("0x3a")](kz[kw][fV("0x9a")](i[fV("0x9b")]),-1)){delete e[kz[kw]]}}kx=i[fV("0x8a")];break}}})},"\x67\x65\x74\x49\x64\x6c\x65\x57\x6f\x72\x6b\x65\x72":function(){var kw={"\x61\x78\x61\x68\x63":function(ky,kx){return ky<kx},"\x68\x61\x64\x63\x65":fV("0x9c"),"\x6d\x61\x65\x69\x69":function(ky,kx){return ky!==kx},"\x6c\x61\x64\x68\x65":fV("0x9d")};for(var kv=0,T=this[fV("0x3b")][fV("0x66")];kw[fV("0x9e")](kv,T);kv++){var i=kw[fV("0x9f")];while(kw[fV("0xa0")](i,fV("0xa1"))){switch(i){case kw[fV("0xa2")]:e["\x5f\x69\x73\x42\x75\x73\x79"]=!![];i="\x61\x68\x64";break;case fV("0x9c"):var e=this["\x61\x72\x72\x57\x6f\x72\x6b\x65\x72"][kv];i=fV("0xa3");break;case fV("0xa3"):if(!e[fV("0x6b")]){i=fV("0x9d");break}i=fV("0xa1");break;case fV("0xa4"):return e}}}return null},"\x72\x65\x6c\x65\x61\x73\x65\x50\x65\x6e\x64\x69\x6e\x67\x44\x61\x74\x61":function(T){var e={"\x64\x6d\x61\x61\x68":function(kB,kA){return kB!==kA},"\x65\x65\x78\x6c\x69":function(kB,kA){return kB+kA},"\x63\x69\x61\x63\x63":fV("0xa5")};var kz=[];var ky=this[fV("0x37")];for(var kx=ky["\x6c\x65\x6e\x67\x74\x68"]-1;kx>=0;kx--){var kw=ky[kx];var kv=kw[fV("0x60")];if(e["\x64\x6d\x61\x61\x68"](T[fV("0xa6")],kv["\x74\x69\x6c\x65\x54\x79\x70\x65\x4e\x61\x6d\x65"])){continue}var i=e["\x65\x65\x78\x6c\x69"](e["\x65\x65\x78\x6c\x69"](e[fV("0xa7")]+kv[fV("0xa8")]+"\x5f"+kv["\x72\x6f\x77"],"\x5f"),kv[fV("0xa9")]);if(!T[i]){ky[fV("0xaa")](kx,1);kz["\x70\x75\x73\x68"](kv)}}return kz},"\x6c\x6f\x61\x64\x54\x69\x6c\x65\x44\x61\x74\x61":function(kG,kE,kC,kz){var kw={"\x6c\x6c\x65\x64\x61":fV("0xab"),"\x68\x63\x61\x61\x63":"\x64\x64\x68","\x6c\x61\x61\x69\x69":"\x65\x61\x61","\x68\x61\x78\x65\x61":fV("0xac"),"\x63\x65\x78\x64\x78":"\x69\x61\x6d","\x68\x6d\x6d\x64\x6d":fV("0xad"),"\x65\x68\x61\x61\x61":fV("0x34"),"\x78\x65\x65\x61\x6d":function(kL,kK){return kL+kK},"\x65\x61\x61\x61\x61":fV("0xae"),"\x6d\x64\x69\x64\x65":fV("0xaf"),"\x68\x6c\x61\x6c\x69":fV("0xb0"),"\x78\x65\x65\x6d\x65":fV("0xb1"),"\x6d\x65\x6d\x68\x65":fV("0xa"),"\x63\x6c\x61\x68\x63":fV("0xb2"),"\x6d\x78\x61\x63\x63":fV("0x5f"),"\x61\x6c\x69\x6d\x65":fV("0xb3"),"\x78\x6c\x68\x61\x78":fV("0xb4"),"\x63\x69\x65\x68\x61":fV("0x99"),"\x65\x69\x65\x69\x65":fV("0xb5"),"\x63\x6c\x68\x64\x69":function(kL,kK){return kL+kK},"\x61\x68\x65\x63\x65":fV("0xb6"),"\x64\x65\x64\x78\x6d":function(kL,kK){return kL+kK},"\x61\x69\x61\x68\x6d":"\x61\x65\x68","\x69\x64\x61\x68\x61":fV("0xb7"),"\x6d\x61\x6d\x6c\x65":fV("0xb8"),"\x69\x64\x64\x64\x61":"\x65\x6d\x78","\x64\x6c\x61\x69\x65":fV("0xb9"),"\x6c\x61\x61\x64\x61":function(kK){return kK()},"\x65\x61\x65\x65\x78":fV("0xba"),"\x78\x69\x78\x6d\x65":fV("0x7d"),"\x61\x6c\x63\x64\x68":fV("0xbb"),"\x78\x63\x6c\x6d\x69":fV("0xbc"),"\x63\x65\x6d\x6d\x68":fV("0xbd"),"\x61\x63\x63\x65\x63":"\x65\x6d\x61","\x78\x65\x69\x63\x78":fV("0xbe"),"\x6c\x6c\x65\x69\x6d":function(kK,kL){return kK+kL},"\x69\x64\x61\x68\x6d":"\x78\x63\x6c","\x6d\x69\x6c\x6d\x6d":fV("0xbf"),"\x6d\x6c\x65\x64\x6c":"\x6c\x65\x6c","\x65\x64\x64\x68\x65":fV("0xc0"),"\x69\x65\x65\x63\x61":fV("0xc1"),"\x69\x69\x68\x61\x69":fV("0xc2"),"\x61\x6c\x68\x63\x63":"\x63\x75\x73\x74\x6f\x6d\x53\x74\x79\x6c\x65\x49\x6e\x66\x6f\x5f","\x6d\x61\x65\x65\x61":fV("0xc3"),"\x6c\x69\x63\x65\x6c":fV("0xc4"),"\x65\x63\x61\x65\x63":"\x6d\x69\x6c","\x61\x61\x6c\x65\x65":"\x43\x75\x73\x74\x6f\x6d","\x69\x6d\x65\x78\x78":fV("0xc5"),"\x6c\x65\x6c\x78\x78":fV("0xc6"),"\x69\x78\x65\x65\x63":fV("0xc7"),"\x64\x61\x68\x61\x69":fV("0xc8"),"\x61\x65\x68\x6d\x6d":"\x63\x64\x63","\x78\x64\x65\x65\x69":fV("0xc9")};var kB=fV("0xca");while(kB!==fV("0xb9")){switch(kB){case fV("0xc1"):kv[fV("0xcb")]=kA;kB=kw[fV("0xcc")];break;case kw[fV("0xcd")]:if(!kH[fV("0x7f")]){kB=fV("0xb4");break}kB=kw[fV("0xce")];break;case kw[fV("0xcf")]:if(kI&&this[fV("0x44")]){kB=kw[fV("0xd0")];break}kB=kw[fV("0xd1")];break;case fV("0xd2"):this[kw[fV("0xd3")]+kx]=JSON[fV("0xd4")](bD[kw[fV("0xd5")](kw[fV("0xd6")],kx)]);kB="\x61\x65\x68";break;case"\x69\x6d\x65":var ky=this[fV("0x36")]["\x70\x61\x72\x6b\x69\x6e\x67"][fV("0xd7")];kB=kw[fV("0xd8")];break;case kw[fV("0xd9")]:kv["\x63\x75\x73\x74\x6f\x6d\x4d\x61\x70\x53\x74\x79\x6c\x65"]=this["\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x43\x75\x73\x74\x6f\x6d\x53\x74\x79\x6c\x65\x49\x6e\x66\x6f"];kB="\x64\x69\x61";break;case kw[fV("0xda")]:if(!(kI&&!this["\x6d\x61\x70"][fV("0x40")][fV("0xdb")])){kB=kw["\x6d\x65\x6d\x68\x65"];break}kB=kw["\x63\x6c\x61\x68\x63"];break;case kw[fV("0xd8")]:var kv={"\x61\x63\x74\x69\x6f\x6e":kw[fV("0xdc")],"\x75\x72\x6c":kG,"\x74\x69\x6c\x65\x49\x6e\x66\x6f":kE,"\x74\x69\x6c\x65\x4b\x65\x79":kC,"\x69\x73\x54\x65\x78\x74":kJ,"\x69\x73\x50\x6f\x69":i,"\x62\x75\x69\x6c\x64\x69\x6e\x67\x53\x69\x64\x65\x47\x72\x61\x64\x61\x74\x69\x6f\x6e":e,"\x68\x61\x73\x50\x6f\x6c\x79":T?![]:!![],"\x68\x61\x73\x4c\x69\x6e\x65":T?this[fV("0x36")]["\x63\x6f\x6e\x66\x69\x67"][fV("0xdd")]:!![],"\x63\x61\x72\x70\x6f\x72\x74":ky};kB=kw[fV("0xde")];break;case kw["\x78\x6c\x68\x61\x78"]:if(!this[kw[fV("0xd5")](kw[fV("0xdf")],kD)]&&bD[fV("0xe0")+kD]){kB=kw[fV("0xe1")];break}kB="\x61\x78\x63";break;case fV("0xb5"):this[kw[fV("0xe2")](kw[fV("0xdf")],kD)]=JSON["\x73\x74\x72\x69\x6e\x67\x69\x66\x79"](bD[kw[fV("0xe2")]("\x46\x65\x61\x74\x75\x72\x65\x53\x74\x79\x6c\x65",kD)]);kB=kw[fV("0xe3")];break;case fV("0xb6"):if(!this[kw[fV("0xe4")](fV("0x34"),kx)]){kB=fV("0xd2");break}kB=kw[fV("0xe5")];break;case fV("0xbf"):if(kI&&bD[kw[fV("0xe4")](fV("0xe6"),kD)]){kB=fV("0xbd");break}kB=fV("0xc4");break;case kw[fV("0xe7")]:if(kI){kB=kw[fV("0xe8")];break}kB="\x65\x78\x6d";break;case kw[fV("0xe9")]:this[fV("0x37")][fV("0x56")](kF);kB=kw[fV("0xea")];break;case fV("0xc9"):kw[fV("0xeb")](kz);kB=kw[fV("0xcd")];break;case fV("0xec"):var i=this[fV("0x36")][fV("0xed")][fV("0xee")];kB=kw[fV("0xef")];break;case"\x78\x6d\x63":kv[fV("0xf0")]={"\x77\x6f\x72\x64\x53\x70\x61\x63\x65\x52\x61\x74\x69\x6f":this[fV("0x3d")],"\x74\x65\x78\x74\x53\x69\x7a\x65\x52\x61\x74\x69\x6f":this[fV("0x3e")]};kB=fV("0xf1");break;case kw["\x65\x61\x65\x65\x78"]:var kJ=i?this[fV("0x36")][fV("0xed")][fV("0xf2")]:![];kB=kw[fV("0xf3")];break;case kw[fV("0xd0")]:kv[fV("0xf4")]=this["\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x41\x72\x65\x61\x53\x74\x79\x6c\x65\x49\x6e\x66\x6f"];kB=fV("0xad");break;case fV("0xf5"):if(this[fV("0x99")+kD]){kB=fV("0xbe");break}kB=kw["\x61\x6c\x63\x64\x68"];break;case kw[fV("0xf6")]:var kI=!!(kD[fV("0x9a")]("\x63\x75\x73\x74\x6f\x6d")===0);kB=fV("0xf7");break;case fV("0xb2"):if(kI&&this[fV("0x42")]){kB=kw[fV("0xd9")];break}kB=fV("0xac");break;case kw[fV("0xf8")]:if(!this[fV("0x42")]){kB="\x78\x61\x65";break}kB=fV("0xc4");break;case fV("0xca"):var kH=this[fV("0xf9")]();kB=kw[fV("0xfa")];break;case kw["\x78\x65\x69\x63\x78"]:kv["\x66\x65\x61\x74\x75\x72\x65\x53\x74\x79\x6c\x65"]=this[kw[fV("0xfb")](fV("0x99"),kD)];kB=fV("0xbb");break;case"\x78\x61\x69":kv["\x69\x63\x6f\x6e\x53\x65\x74\x49\x6e\x66\x6f"]=this[kw["\x65\x68\x61\x61\x61"]+kx];kB=fV("0xb1");break;case kw[fV("0xfc")]:this[fV("0x96")]=JSON[fV("0xd4")](bD[fV("0xfd")]);kB=kw["\x6d\x69\x6c\x6d\x6d"];break;case kw["\x6d\x6c\x65\x64\x6c"]:kH[fV("0xfe")]=kE;kB=kw["\x65\x64\x64\x68\x65"];break;case"\x69\x65\x65":kv["\x6d\x61\x70\x53\x74\x79\x6c\x65\x49\x64"]=kD;kB=kw["\x69\x65\x65\x63\x61"];break;case kw[fV("0xff")]:this[fV("0x42")]=JSON[fV("0xd4")](bD[kw[fV("0xfb")](kw[fV("0x100")],kD)]);kB=fV("0xc4");break;case fV("0x32"):if(!this["\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x49\x6e\x64\x6f\x6f\x72\x53\x74\x79\x6c\x65"]){kB=fV("0x101");break}kB="\x69\x65\x6d";break;case fV("0xa"):kv[fV("0xfd")]=this[fV("0x96")];kB=kw[fV("0x102")];break;case kw[fV("0x103")]:if(this[fV("0x36")]["\x70\x61\x72\x6b\x69\x6e\x67"]){kB="\x69\x6d\x65";break}kB=fV("0xaf");break;case fV("0x104"):var kF={"\x75\x72\x6c":kG,"\x74\x69\x6c\x65\x49\x6e\x66\x6f":kE,"\x74\x69\x6c\x65\x4b\x65\x79":kC,"\x63\x62\x6b":kz};kB=kw[fV("0xe9")];break;case kw[fV("0xcc")]:kH[fV("0x7f")]=!![];kB=kw[fV("0xce")];break;case kw[fV("0xce")]:kH["\x70\x6f\x73\x74\x4d\x65\x73\x73\x61\x67\x65"](kv);kB=kw[fV("0xea")];break;case kw[fV("0x105")]:if(kI&&bD["\x63\x75\x73\x74\x6f\x6d\x53\x74\x79\x6c\x65\x49\x6e\x66\x6f\x5f"+kA]){kB=fV("0x106");break}kB=kw[fV("0x107")];break;case kw[fV("0xde")]:var kD=this[fV("0x36")][fV("0x108")]();kB=fV("0xc6");break;case kw[fV("0xe8")]:kx=kw["\x61\x61\x6c\x65\x65"];kB=kw[fV("0x109")];break;case kw[fV("0x10a")]:var kA=this[fV("0x36")][fV("0x10b")]();kB=kw["\x78\x63\x6c\x6d\x69"];break;case fV("0x10c"):kH[fV("0x5a")]=kz;kB=fV("0x10d");break;case fV("0xf7"):var kx=kD;kB=kw[fV("0xe7")];break;case kw[fV("0x10e")]:var T=this[fV("0x36")][fV("0x10f")]!==BMAPGL_NORMAL_MAP&&this[fV("0x36")]["\x63\x6f\x6e\x66\x69\x67"][fV("0x110")];kB=fV("0xc3");break;case kw["\x64\x61\x68\x61\x69"]:this[fV("0x44")]=JSON[fV("0xd4")](bD[fV("0xe6")+kA]);kB=fV("0xf5");break;case kw[fV("0xf3")]:var e=this[fV("0x36")][fV("0xed")][fV("0x111")];kB=fV("0x112");break;case kw["\x61\x65\x68\x6d\x6d"]:kB=kH?"\x65\x65\x6c":fV("0x104");break;case fV("0xc0"):kH[fV("0x5c")]=kC;kB=kw[fV("0x10e")];break;case fV("0x106"):if(!this["\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x41\x72\x65\x61\x53\x74\x79\x6c\x65\x49\x6e\x66\x6f"]){kB=kw[fV("0x113")];break}kB=kw[fV("0x107")];break;case kw[fV("0x109")]:if(kI&&bD[kw[fV("0xfb")](fV("0xe6"),kD)]&&!bD[kw[fV("0x100")]+kD]["\x62\x61\x73\x65\x46\x73"]){kB=kw["\x78\x64\x65\x65\x69"];break}kB=fV("0x114");break}}},"\x73\x65\x74\x57\x6f\x72\x6b\x65\x72\x43\x6f\x6e\x66\x69\x67":function(i){var e={"\x61\x61\x65\x61\x6c":fV("0x115"),"\x64\x69\x6d\x64\x63":fV("0x116"),"\x61\x6c\x63\x65\x65":"\x63\x68\x65","\x65\x65\x61\x61\x61":"\x65\x61\x64","\x63\x65\x65\x68\x78":function(kz,ky){return kz<ky},"\x61\x6c\x61\x64\x78":fV("0x117")};var kx=e["\x61\x61\x65\x61\x6c"];while(kx!==fV("0x117")){switch(kx){case"\x69\x6c\x78":var kw={"\x61\x63\x74\x69\x6f\x6e":e["\x64\x69\x6d\x64\x63"]};kx=e["\x61\x6c\x63\x65\x65"];break;case e["\x65\x65\x61\x61\x61"]:for(var kv=0;e[fV("0x118")](kv,this[fV("0x3b")]["\x6c\x65\x6e\x67\x74\x68"]);kv++){this[fV("0x3b")][kv]["\x70\x6f\x73\x74\x4d\x65\x73\x73\x61\x67\x65"](kw)}kx=e[fV("0x119")];break;case fV("0x11a"):for(var T in i){if(i[fV("0x11b")](T)){kw[T]=i[T]}}kx=e[fV("0x11c")];break}}}};e6[fV("0x11d")](jO[fV("0x11e")],hk);function i7(i){this.tileLayers=[];this.map=i;var e=this.config=es[this.map.mapType];this.errorUrl=e.errorUrl;this.tileSize=e.tileSize;this.baseUnits=e.baseUnits;this.baseZoomLevel=e.zoomLevelBase;this.tileURLs=e.tileUrls;this.tilesInfoCache={};this.loadDelay=10;this._labelTextCanvas=null}bD.register(function(i){if(i._renderType!=="webgl"){return}var e=i.tileMgr=new i7(i);i.addEventListener("addtilelayer",function(kv){e.addWebGLLayer(kv.target)});i.addEventListener("removetilelayer",function(kv){e.removeWebGLLayer(kv.target)});i.on("update",function T(kw){if(i.getFeatureStyleTags().length===0||!(i.customLoaded&&i.areaCustomLoaded)){return}var kv=false;if(kw.changedStatus&&kw.changedStatus.onzoom_changed){kv=true}e.loadLayersData({zoomChanged:kv})});i.on("style_changed",function(){e.loadLayersData()});i.on("destroy",function(){for(var kv=0;kv<e.tileLayers.length;kv++){e.tileLayers[kv].remove();e.tileLayers[kv].destroyDrawData();e.tileLayers[kv]=null}e.tilesInfoCache={};e.tileLayers=[];e._labelTextCanvas=null;e.map=null;e.requestTime=null})});e6.extend(i7.prototype,{addWebGLLayer:function(T){this.tileLayers.push(T);T.initDrawData();if(this.tileLayers.length>1){for(var e=1;e<this.tileLayers.length;e++){if(this.tileLayers[e].isFlat){this.map.setDisplayOptions({isFlat:true});break}}}if(this.map.getFeatureStyleTags().length>0&&this.map.customLoaded&&this.map.areaCustomLoaded){this.loadLayersData()}else{var kv=this;this.map.loadMapStyleFiles(function(){var i=new fS("onlayer_update");i.name="na";kv.map.fire(i);kv.loadLayersData()})}},removeWebGLLayer:function(kx){var ky=false;for(var kw=0,kv=this.tileLayers.length;kw<kv;kw++){if(kx===this.tileLayers[kw]){ky=true;this.tileLayers.splice(kw,1);break}}if(ky===false){return}kx.destroyDrawData();if(this.map.getFeatureStyleTags().length>0){this.loadLayersData()}if(this.tileLayers.length===1){this.map.setDisplayOptions({isFlat:false})}else{var e=false;for(var kw=1;kw<this.tileLayers.length;kw++){if(this.tileLayers[kw].isFlat){e=true;break}}this.map.setDisplayOptions({isFlat:e})}var T=new fS("onrefresh");T.source="removewebgllayer";this.map.fire(T)},getLabelTextCanvas:function(){if(!this._labelTextCanvas){this._labelTextCanvas=new ax(this.map)}return this._labelTextCanvas},loadLayersData:function(i){if(!this.map||this.map.suspendLoad){return}var kw=this;i=i||{};var kv=!!i.zoomChanged;var e=(kv===true||this.map.getTilt()>50);if(!e){if(!this.syncLoadTimer){this.syncLoadTimer=setTimeout(function(){kw._loadLayersFromCache(kv);kw.syncLoadTimer=null},40)}}else{this._loadLayersFromCache(kv)}if(!kw.map.viewAnimationTime){this.timer&&window.clearTimeout(this.timer)}if(!this.requestTime){this.requestTime=new Date().getTime()}else{if(new Date().getTime()-this.requestTime>=1000){T()}}function T(){if(!kw.map){return}if(kw.map.viewAnimationTime){if(new Date().getTime()-kw.map.viewAnimationTime<1000){return}kw.map.viewAnimationTime=new Date().getTime()}var ky=kw.tileLayers.length;kw.tilesInfoCache={};for(var kA=0;kA<ky;kA++){var kC=kw.tileLayers[kA];var kB=kC.tileType;var kx=null;var kz=kw._getTilesInfoKey(kB,kC);if(kw.tilesInfoCache[kz]){kx=kw.tilesInfoCache[kz]}else{kx=kw.calcTilesInfo(kB,kC);kw.tilesInfoCache[kz]=kx}kx&&kC.loadLayerData(kx,false,kv)}kw.timer=null;kw.requestTime=null}this.timer=window.setTimeout(T,this.loadDelay);if((b2()||e6.Browser.ie)&&kv){this.loadDelay=200}else{this.loadDelay=80}},_getTilesInfoKey:function(i,T){var e=i.getName();e+=("_"+(T.transform?T.transform.source:"default"));e+=("_"+T.spanLevel||0);return e},_loadLayersFromCache:function(kx){if(!this.map){return}this.map._featureMgr.clearData();this.map.tileLabels=[];var kA=this.tileLayers;kA.sort(function(kB,i){return kB.zIndex-i.zIndex>0});var T=kA.length;this.tilesInfoCache={};for(var kw=0;kw<T;kw++){var kz=kA[kw];var ky=kz.tileType;var e=null;var kv=this._getTilesInfoKey(ky,kz);if(this.tilesInfoCache[kv]){e=this.tilesInfoCache[kv]}else{e=this.calcTilesInfo(ky,kz);this.tilesInfoCache[kv]=e}e&&kz.loadLayerData(e,true,kx)}},calcTilesInfo:function(kI,k9){var kV=this.map;var k1=kV.getMapType();var kW=es[k1];var kQ=kV.getZoom();var e=Math.floor(kQ);var ky=kI.getDataZoom(kQ);var ld=kI.getName();ky=ch(ky,kW.minDataZoom,kW.maxDataZoom);var k4=e;if(kI._name==="web"||kI._name==="xyz"){k4=ky}else{if(k4<3){k4=3}}var kU=kI.getTileSize(kQ);var kx=kI.getBaseTileSize(kQ);var kS=kV.getBoundsIn();if(!kS){return}var kM=kI.getMercatorSize(kQ,ky);var kL;var k3;var kT;var k6;var kX=kV.getCenterIn();kX=e9.calcLoopCenterPoint(kX);if(ld==="xyz"){return this.calcXYZTilesInfo(kX,kS,ky,ld,k9,kV)}var kR=Math.floor(kX.lng/kM);var kA=Math.floor(kX.lat/kM);var kZ=0;var kv=0;kS=e9.calcLoopMapBounds(kS,kX);if(kS.ne.lng>e9._mc180X){var kG=e9.getSpaceDistanceInPixel(ky);kZ=Math.ceil(kG/kx)}if(kS.sw.lng<e9._mcM180X){var kG=e9.getSpaceDistanceInPixel(ky);kv=Math.ceil(kG/kx)}if(kS.ne.lat>19505879.362428114||kS.sw.lat<-15949096.637571886){kS.ne.lat=19505879.362428114;kS.sw.lat=-15949096.637571886}var kC=[Math.floor(kS.sw.lng/kM)-kv,Math.floor(kS.sw.lat/kM)];var lb=[Math.floor(kS.ne.lng/kM)+kZ,Math.floor(kS.ne.lat/kM)];kL=kC[0];k3=lb[0]+1;kT=kC[1];k6=lb[1]+1;var kH=[];for(var kE=kL;kE<k3;kE++){if(e9.isTileBlank(kE,ky,kx)===true){continue}for(var kJ=kT;kJ<k6;kJ++){var k8=false;var kD=256;if(ld==="web"){var kO=this._webTileRaste180(kE,kJ,ky);k8=kO.combine;kD=kO.dataIndex}var kF={col:kE,row:kJ,zoom:ky,useZoom:k4,tileTypeName:ld,loopOffsetX:0,tileSize:kU,baseTileSize:kx,mercatorSize:kM,combine:k8,dataIndex:kD};kH.push(kF);var k0="id_"+kE+"_"+kJ+"_"+ky;kH[k0]=true}}if(ky<=5){for(var la=0,k7=kH.length;la<k7;la++){var kE=kH[la].col;var kJ=kH[la].row;var k2=e9.calcLoopParam(kE,ky);var kz=k2.T;var kN=kE>=0?kE-kz:kE+kz;var kP="id_"+kN+"_"+kJ+"_"+ky;if(e9.isTileBlank(kN,ky,kx)===true){continue}if(!kH[kP]){var k8=false;var kD=256;if(ld==="web"){var kO=this._webTileRaste180(kN,kJ,ky);k8=kO.combine;kD=kO.dataIndex}var kF={col:kN,row:kJ,zoom:ky,useZoom:k4,loopOffsetX:0,tileSize:kU,baseTileSize:kx,mercatorSize:kM,combine:k8,dataIndex:kD};kH.push(kF);kH[kP]=true}}}if(this.map._tilt>0&&(ld!=="web"||kQ>=8)){for(var la=0;la<kH.length;la++){var kB=kH[la];var k5=kB.col;var lc=kB.row;var kY=[];kY.minX=k5*kM;kY.maxX=(k5+1)*kM;kY.minY=lc*kM;kY.maxY=(lc+1)*kM;var kw=new cD(0,0);kw.lng=(kY.minX+kY.maxX)/2;kw.lat=(kY.minY+kY.maxY)/2;var kK=kV.pointToPixelIn(kw);if(kK.x>0&&kK.x<this.map.width&&kK.y>0&&kK.y<this.map.height){continue}if(kY.minX<kX.lng&&kY.maxX>kX.lng&&kY.minY<kX.lat&&kY.maxY>kX.lat){continue}if(!this.ifTileInMapBounds(kY,kS,k5,lc)){kH.splice(la,1);la--}}}kH.sort((function(i){return function(T,le){return((0.4*Math.abs(T.col-i[0])+0.6*Math.abs(T.row-i[1]))-(0.4*Math.abs(le.col-i[0])+0.6*Math.abs(le.row-i[1])))}})([kR,kA]));kH.zoom=ky;kH.tileTypeName=ld;return kH},_webTileRaste180:function(T,kA,e){var i=this.map;var kx=false;var ky=256;var kw=e9.calcLoopParam(T,e);var kz={col:kw.col,row:kA,baseTileSize:256,zoom:e};var kv=jr.prototype.tileToBound(kz,i.getCenter());if(Math.ceil(kv.LL.sw.lng)*Math.floor(kv.LL.ne.lng)<0){kx=true;ky=e9.pixelWidth(kv.MC.sw.lng,e);if(kz.col<0){ky=-ky}}return{combine:kx,dataIndex:ky}},calcXYZTilesInfo:function(kG,kz,kF,kK,ky,kN){var kB=kN.width;var kL=kN.height;var kA=Math.floor(kF);var kC=null;if(ky.transform.target==="EPSG3857"){var kv=dI.transformBDmcPoint(kG,ky.transform);var kw=dI.getRangeExtent(kv,kB,kL,kA,ky.transform);kC=[kw.minX,kw.minY,kw.maxX,kw.maxY]}else{if(ky.transform.source==="BD09MC"){var kv=[kG.lng,kG.lat];kC=[kz.sw.lng,kz.sw.lat,kz.ne.lng,kz.ne.lat]}else{var kv=dI.transformBDmcPoint(kG,ky.transform);var kx=dI.transformBDmcPoint(kz.ne,ky.transform);var kE=dI.transformBDmcPoint(kz.sw,ky.transform);kC=dI.getLoopBox(kv,[kE[0],kE[1],kx[0],kx[1]])}}if(!kv||!kC){return[]}kA=kA+ky.spanLevel;var T=dI.getTileRangeForExtentFactory(kC,kA,ky.transform);var e=[];var kO=dI.getResolutionScale(kA,ky.transform);for(var kJ=T.minX;kJ<=T.maxX;kJ++){for(var kH=T.minY;kH<=T.maxY;kH++){var kI={col:kJ,row:kH,zoom:kA,useZoom:kA,tileTypeName:kK,loopOffsetX:0,tileSize:256*kO,transform:ky.transform,combine:false,dataIndex:0};e.push(kI);var kD="id_"+kJ+"_"+kH+"_"+kA;e[kD]=true}}var kM=dI.getTileCoordForCoordAndZ(kv,kA);e.sort((function(i){return function(kP,kQ){return((0.4*Math.abs(kP.col-i[0])+0.6*Math.abs(kP.row-i[1]))-(0.4*Math.abs(kQ.col-i[0])+0.6*Math.abs(kQ.row-i[1])))}})([kM[1],kM[2]]));e.zoom=kA;e.tileTypeName=kK;return e},getCurrentViewTilesInfo:function(T,kv){var i=this._getTilesInfoKey(T,kv);var e=this.tilesInfoCache[i];if(!e){return this.calcTilesInfo(T,kv)}return e},ifTileInMapBounds:function(e,kx,T,kw){var i=kx.normalizedBottomLeft;var kI=kx.normalizedTopRight;var kA=kx.normalizedTopLeft;var ky=kx.normalizedBottomRight;var kv=false;var kH=new cD(e.minX,e.minY);var kE=new cD(e.maxX,e.maxY);var kz=new cD(kE.lng,kH.lat);var kF=new cD(kH.lng,kE.lat);var kC=[kF,kE,kz,kH];for(var kG=0,kB=kC.length;kG<kB;kG++){var kD=kG+1;if(kD===kB){kD=0}var kJ=kG;var kK=jq(kC[kD],kC[kJ],kA,i);if(kK){kv=true;break}kK=jq(kC[kD],kC[kJ],ky,kI);if(kK){kv=true;break}kK=jq(kC[kD],kC[kJ],kI,kA);if(kK){kv=true;break}kK=jq(kC[kD],kC[kJ],i,ky);if(kK){kv=true;break}}return kv},getTileLayer:function(kw){for(var kv=0,e=this.tileLayers.length;kv<e;kv++){var T=this.tileLayers[kv];if(T.mapType===kw){return T}}return null},isExitTileLayer:function(kw){for(var kv=0,e=this.tileLayers.length;kv<e;kv++){var T=this.tileLayers[kv];if(T===kw){return true}}return false},getZoomState:function(i){var e=i-this.lastZoom;if(e>0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState}});function iR(e){this.map=e;this.gl=null;this.layers=[];this.mouseEventThrottle=this.throttle(this.pick,100).bind(this);this.mousePointerThrottle=this.throttle(this.mouseStatus,300).bind(this);this.base=new cD(12069475.280738307,3929271.1724863998);this.iconCache=new aA((b2()||e6.Browser.ie)?64:128,{clearCallback:function(i){}})}bD.register(function(i){if(i._renderType!=="webgl"){return}var e=i._normalLayerMgr=new iR(i);i.toFormatCoords=function(kx,kA){var kz=[];var ky=e.base;if(kA&&kA.center){ky=jr.convertLL2MC(kA.center)}for(var kw=0;kw<kx.length;kw++){var T=jr.convertLL2MC(new cD(kx[kw][0],kx[kw][1]));var kv=[T.lng-ky.lng,T.lat-ky.lat];kz.push(kv)}return kz};i.indexToRgb=function(kv){kv++;var T=Math.floor(kv/65536);kv-=T*65536;var kx=Math.floor(kv/256);kv-=kx*256;var kw=kv;return[kw,kx,T]};i.addEventListener("addnormallayer",function(T){e.addWebGLLayer(T.target)});i.addEventListener("removenormallayer",function(T){e.removeWebGLLayer(T.target)});i.addEventListener("update",function(ky){if(ky.changedStatus&&ky.changedStatus.onsize_changed){if(e.gl){e.clearFramebuffer();var kx=i.getSize();var kw=kx.width;var T=kx.height;var kv=i.config.ratio;kw=Math.round(kw*kv);T=Math.round(T*kv);e.pickFBO=e.createFramebuffer(kw,T)}}});i.addEventListener("onmousemove",e._layerMouseEvent.bind(e));i.addEventListener("onclick",e._layerClickEvent.bind(e));i.addEventListener("ondblclick",e._layerDBLClickEvent.bind(e));i.addEventListener("onrightclick",e._layerRightClickEvent.bind(e));i.on("destroy",function(){e.removeAllLayers(true);i.indexToRgb=null;i.toFormatCoords=null;e.pickFBO=null;e.preFramebuffer=null;e.gl=null;e.iconCache.clear()});i.on("glmoduleloaded",function(){e.gl=i._webglPainter.gl;e.pickFBO=e.createFramebuffer();for(var T=0;T<e.layers.length;T++){e.layers[T].onInit(i,e.gl)}i.dispatchEvent(new fS("onupdate"))});i.addEventListener("layer_clear",function(T){e.iconCache.clear()})});e6.extend(iR.prototype,{init:function(){var e=this;this.map.toFormatCoords=function(kx){var ky=[];for(var kw=0;kw<kx.length;kw++){var T=jr.convertLL2MC(new cD(kx[kw][0],kx[kw][1]));var kv=[T.lng-e.base.lng,T.lat-e.base.lat];ky.push(kv)}return ky};this.map.indexToRgb=function(kv){kv++;var T=Math.floor(kv/65536);kv-=T*65536;var kx=Math.floor(kv/256);kv-=kx*256;var kw=kv;return[kw,kx,T]};this.pickFBO=this.createFramebuffer();var i=this;this.map.addEventListener("addnormallayer",function(T){i.addWebGLLayer(T.target)});this.map.addEventListener("removenormallayer",function(T){i.removeWebGLLayer(T.target)});this.map.addEventListener("onmousemove",this._layerMouseEvent.bind(this));this.map.addEventListener("onclick",this._layerClickEvent.bind(this));this.map.addEventListener("onrightclick",this._layerRightClickEvent.bind(this));this.map.addEventListener("ondblclick",this._layerDBLClickEvent.bind(this));this.map.on("destroy",function(){i.removeAllLayers(true);i.map.indexToRgb=null;i.map.toFormatCoords=null;i.pickFBO=null;i.preFramebuffer=null})},addWebGLLayer:function(T){var kv=false;for(var e=0;e<this.layers.length;e++){if(this.layers[e]===T){kv=true;break}}if(!kv){this.layers.push(T);if(this.gl){T.onInit(this.map,this.gl)}this.map.dispatchEvent(new fS("onupdate"))}},removeWebGLLayer:function(T){for(var e=0;e<this.layers.length;e++){if(this.layers[e]===T){this.map._featureMgr.removeLayer(T.zIndex);this.layers.splice(e,1);T.onDestroy();this.map.dispatchEvent(new fS("onupdate"));break}}},removeAllLayers:function(kv){for(var T=0;T<this.layers.length;T++){var e=this.layers[T];if(e.visible){this.map._featureMgr.removeLayer(e.zIndex)}if(kv){e.onKill&&e.onKill()}e.onDestroy()}this.layers=[];this.map.dispatchEvent(new fS("onupdate"))},sortLayer:function(){this.layers.sort(function(i,e){return i.zIndex-e.zIndex>0})},_layerMouseEvent:function(i){this.mouseEventThrottle(i,"onmousemove")},_layerClickEvent:function(i){this.pick(i,"onclick")},_layerDBLClickEvent:function(i){this.pick(i,"ondblclick")},_layerRightClickEvent:function(i){this.pick(i,"onrightclick")},throttle:function(T,e){var kv=null;var i=Date.now();return function(){var kz=Date.now();var ky=e-(kz-i);var kx=this;var kw=arguments;if(kv){clearTimeout(kv)}if(ky<=0){T.apply(kx,kw);i=Date.now()}else{kv=setTimeout(function(){T.apply(kx,kw)},ky)}}},pick:function(kA,ky){if(!this.layers.length){return false}var kv=false;var T=false;for(var kx=0;kx<this.layers.length;kx++){var kw=this.layers[kx];if(kw.doRender()&&kw.testEvent()){T=true;if(kw.pick){if(ky==="onmousemove"||kw.hasEvent(ky)){var kz=kw.pick(kA.x,kA.y,ky)}else{continue}if(kz&&kz.dataIndex!==-1){if(ky==="onmousemove"){kv=true}if(kw.hasEvent(ky)){kw.dispatcher(kA,kz,ky)}if(!kw.popEvent){break}}else{if(kw.hasEvent(ky)){kw.dispatcher(kA,kz,ky)}}}}}if(ky==="onmousemove"&&T){this.mousePointerThrottle(kv)}this.map.dispatchEvent(new fS("onupdate"))},mouseStatus:function(e){if(e){this.map.platform.style.cursor=this.map.config.overlayMoveCursor}else{this.map.platform.style.cursor=this.map.config.defaultCursor}},saveFramebuffer:function(){var e=this.gl;this.preFramebuffer=e.getParameter(e.FRAMEBUFFER_BINDING)},bindFramebuffer:function(e){var i=this.gl;if(e){i.bindFramebuffer(i.FRAMEBUFFER,e)}else{i.bindFramebuffer(i.FRAMEBUFFER,null)}},clear:function(e){var i=this.gl;i.clearColor(0,0,0,0);if(e instanceof Array){i.clearColor(e[0],e[1],e[2],e[3])}i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT)},restoreFramebuffer:function(){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,this.preFramebuffer)},clearFramebuffer:function(){if(this.pickFBO){var e=this.gl;e.deleteTexture(this.pickFBO.texture);e.deleteFramebuffer(this.pickFBO)}},createFramebuffer:function(kv,i){var kz=this.gl;kv=kv||kz.canvas.width;i=i||kz.canvas.height;var kx=kz.createFramebuffer();var kw=kz.createTexture();kz.bindTexture(kz.TEXTURE_2D,kw);kz.texImage2D(kz.TEXTURE_2D,0,kz.RGBA,kv,i,0,kz.RGBA,kz.UNSIGNED_BYTE,null);kz.texParameteri(kz.TEXTURE_2D,kz.TEXTURE_MAG_FILTER,kz.LINEAR);kz.texParameteri(kz.TEXTURE_2D,kz.TEXTURE_MIN_FILTER,kz.LINEAR);kz.texParameteri(kz.TEXTURE_2D,kz.TEXTURE_WRAP_S,kz.CLAMP_TO_EDGE);kz.texParameteri(kz.TEXTURE_2D,kz.TEXTURE_WRAP_T,kz.CLAMP_TO_EDGE);kx.texture=kw;var T=kz.createRenderbuffer();kz.bindRenderbuffer(kz.RENDERBUFFER,T);kz.renderbufferStorage(kz.RENDERBUFFER,kz.DEPTH_STENCIL,kv,i);kx.depthBuffer=T;kz.bindFramebuffer(kz.FRAMEBUFFER,kx);kz.framebufferTexture2D(kz.FRAMEBUFFER,kz.COLOR_ATTACHMENT0,kz.TEXTURE_2D,kw,0);kz.framebufferRenderbuffer(kz.FRAMEBUFFER,kz.DEPTH_STENCIL_ATTACHMENT,kz.RENDERBUFFER,T);var ky=kz.checkFramebufferStatus(kz.FRAMEBUFFER);if(kz.FRAMEBUFFER_COMPLETE!==ky){console.log("Frame buffer object is incomplete: "+ky.toString());this._clearBuffer(kz);return}this._clearBuffer(kz);return kx},_clearBuffer:function(e){e.bindFramebuffer(e.FRAMEBUFFER,null);e.bindTexture(e.TEXTURE_2D,null);e.bindRenderbuffer(e.RENDERBUFFER,null)},loadIconImages:function(kv,kC){var kD=kv;var kE=kD.length;var ky=this;var T=0;var kB=200;for(var kw=0;kw<kE;kw++){var kx=kD[kw];var e=kx.icon;var kA=e;if(e instanceof HTMLCanvasElement){kA=e.id;if(!this.iconCache.getData(kA)){this._addToIconTexture(e);this.iconCache.setData(kA,{loaded:true,image:e})}continue}T++;if(this.iconCache.getData(kA)){if(this.iconCache.getData(kA).loaded){kC(kv)}continue}var kz=new Image();kz.id=kA;kz.iconUrl=e;kz.crossOrigin="anonymous";kz.onload=function(){if(ky.iconCache.getData(this.id)){ky.iconCache.getData(this.id).loaded=true;ky._addToIconTexture(this)}if(!ky._iconLoadTimer){ky._iconLoadTimer=setTimeout(function(){kC(kv);ky._iconLoadTimer=null},kB)}this.onload=null};kz.onerror=function(){if(!ky._iconLoadTimer){ky._iconLoadTimer=setTimeout(function(){kC(kv);ky._iconLoadTimer=null},kB)}ky.iconCache.removeData(this.id);this.onerror=null};kz.src=e;this.iconCache.setData(kA,{loaded:false,image:kz})}kC(kv)},_addToIconTexture:function(kx){if(!this.map._webglMapScene){return}var kz=this.map._webglMapScene._painter;var e=kz._iconTextureAtlas.addTexture(kx);if(e===false){this.map.fire(new fS("onlayer_clear"));return}if(!e){return}kz._iconTextureAtlasOffset[kx.id]=e;var kC=0*kx.width/1024+e.width;var kw=0*kx.height/1024+e.height;var kB=kx.width/1024+e.width;var kv=kw;var kA=kB;var T=kx.height/1024+e.height;var ky=kC;var i=T;kz._iconTextureAtlasCoords[kx.id]=[kC,kw,kB,kv,kA,T,ky,i]}});var hS=(function(){function kB(k2,k7,k3,k4,k9){k3=k3||2;var k5=k7&&k7.length;var k0=k5?k7[0]*k3:k2.length;var k6=kQ(k2,0,k0,k3,true);var kZ=k9||[];if(!k6){return kZ}var kY;var kX;var kW;var kV;var la;var k8;var lb;k4=k4||0;if(k5){k6=kK(k2,k7,k6,k3)}if(k2.length>80*k3){kY=kW=k2[0];kX=kV=k2[1];for(var k1=k3;k1<k0;k1+=k3){la=k2[k1];k8=k2[k1+1];if(la<kY){kY=la}if(k8<kX){kX=k8}if(la>kW){kW=la}if(k8>kV){kV=k8}}lb=Math.max(kW-kY,kV-kX)}T(k6,kZ,k3,kY,kX,lb,null,k4);return kZ}function kQ(kZ,k1,kV,k0,kW){var kX;var kY;if(kW===(kU(kZ,k1,kV,k0)>0)){for(kX=k1;kX<kV;kX+=k0){kY=ky(kX,kZ[kX],kZ[kX+1],kY)}}else{for(kX=kV-k0;kX>=k1;kX-=k0){kY=ky(kX,kZ[kX],kZ[kX+1],kY)}}if(kY&&kE(kY,kY.next)){kM(kY);kY=kY.next}return kY}function kI(kY,kV){if(!kY){return kY}if(!kV){kV=kY}var kX=kY;var kW;do{kW=false;if(!kX.steiner&&(kE(kX,kX.next)||kO(kX.prev,kX,kX.next)===0)){kM(kX);kX=kV=kX.prev;if(kX===kX.next){return null}kW=true}else{kX=kX.next}}while(kW||kX!==kV);return kV}function T(kW,kY,k1,kZ,kV,k5,k4,k2){if(!kW){return}if(!k4&&k5){kD(kW,kZ,kV,k5)}var k3=kW;var kX;var k0;while(kW.prev!==kW.next){kX=kW.prev;k0=kW.next;if(k5?kT(kW,kZ,kV,k5):kL(kW)){kY.push(kX.i/k1+k2);kY.push(kW.i/k1+k2);kY.push(k0.i/k1+k2);kM(kW);kW=k0.next;k3=k0.next;continue}kW=k0;if(kW===k3){if(!k4){T(kI(kW),kY,k1,kZ,kV,k5,1,k2)}else{if(k4===1){kW=kH(kW,kY,k1,k2);T(kW,kY,k1,kZ,kV,k5,2,k2)}else{if(k4===2){kG(kW,kY,k1,kZ,kV,k5,k2)}}}break}}}function kL(kX){var kW=kX.prev;var kV=kX;var kZ=kX.next;if(kO(kW,kV,kZ)>=0){return false}var kY=kX.next.next;while(kY!==kX.prev){if(kF(kW.x,kW.y,kV.x,kV.y,kZ.x,kZ.y,kY.x,kY.y)&&kO(kY.prev,kY,kY.next)>=0){return false}kY=kY.next}return true}function kT(k0,k1,kZ,k7){var k4=k0.prev;var k3=k0;var k2=k0.next;if(kO(k4,k3,k2)>=0){return false}var k8=k4.x<k3.x?(k4.x<k2.x?k4.x:k2.x):(k3.x<k2.x?k3.x:k2.x);var k5=k4.y<k3.y?(k4.y<k2.y?k4.y:k2.y):(k3.y<k2.y?k3.y:k2.y);var kY=k4.x>k3.x?(k4.x>k2.x?k4.x:k2.x):(k3.x>k2.x?k3.x:k2.x);var kX=k4.y>k3.y?(k4.y>k2.y?k4.y:k2.y):(k3.y>k2.y?k3.y:k2.y);var kW=e(k8,k5,k1,kZ,k7);var k6=e(kY,kX,k1,kZ,k7);var kV=k0.nextZ;while(kV&&kV.z<=k6){if(kV!==k0.prev&&kV!==k0.next&&kF(k4.x,k4.y,k3.x,k3.y,k2.x,k2.y,kV.x,kV.y)&&kO(kV.prev,kV,kV.next)>=0){return false}kV=kV.nextZ}kV=k0.prevZ;while(kV&&kV.z>=kW){if(kV!==k0.prev&&kV!==k0.next&&kF(k4.x,k4.y,k3.x,k3.y,k2.x,k2.y,kV.x,kV.y)&&kO(kV.prev,kV,kV.next)>=0){return false}kV=kV.prevZ}return true}function kH(k1,kX,k0,kZ){var kY=k1;do{var kW=kY.prev;var kV=kY.next.next;if(!kE(kW,kV)&&i(kW,kY,kY.next,kV)&&kP(kW,kV)&&kP(kV,kW)){kX.push(kW.i/k0+kZ);kX.push(kY.i/k0+kZ);kX.push(kV.i/k0+kZ);kM(kY);kM(kY.next);kY=k1=kV}kY=kY.next}while(kY!==k1);return kY}function kG(kV,kX,kZ,kY,kW,k4,k0){var k3=kV;do{var k2=k3.next.next;while(k2!==k3.prev){if(k3.i!==k2.i&&kN(k3,k2)){var k1=kC(k3,k2);k3=kI(k3,k3.next);k1=kI(k1,k1.next);T(k3,kX,kZ,kY,kW,k4,null,k0);T(k1,kX,kZ,kY,kW,k4,null,k0);return}k2=k2.next}k3=k3.next}while(k3!==kV)}function kK(kX,k4,k0,kZ){var k1=[];var kY;var k2;var kV;var kW;var k3;for(kY=0,k2=k4.length;kY<k2;kY++){kV=k4[kY]*kZ;kW=kY<k2-1?k4[kY+1]*kZ:kX.length;k3=kQ(kX,kV,kW,kZ,false);if(k3===k3.next){k3.steiner=true}k1.push(kz(k3))}k1.sort(kA);for(kY=0;kY<k1.length;kY++){kx(k1[kY],k0);k0=kI(k0,k0.next)}return k0}function kA(kW,kV){return kW.x-kV.x}function kx(kX,kW){kW=kR(kX,kW);if(kW){var kV=kC(kW,kX);kI(kV,kV.next)}}function kR(kV,kZ){var kW=kZ;var k1=kV.x;var k0=kV.y;var kY=-Infinity;var kX;do{if(k0<=kW.y&&k0>=kW.next.y){var k4=kW.x+(k0-kW.y)*(kW.next.x-kW.x)/(kW.next.y-kW.y);if(k4<=k1&&k4>kY){kY=k4;if(k4===k1){if(k0===kW.y){return kW}if(k0===kW.next.y){return kW.next}}kX=kW.x<kW.next.x?kW:kW.next}}kW=kW.next}while(kW!==kZ);if(!kX){return null}if(k1===kY){return kX.prev}var k3=kX;var k7=kX.x;var k5=kX.y;var k6=Infinity;var k2;kW=kX.next;while(kW!==k3){if(k1>=kW.x&&kW.x>=k7&&kF(k0<k5?k1:kY,k0,k7,k5,k0<k5?kY:k1,k0,kW.x,kW.y)){k2=Math.abs(k0-kW.y)/(k1-kW.x);if((k2<k6||(k2===k6&&kW.x>kX.x))&&kP(kW,kV)){kX=kW;k6=k2}}kW=kW.next}return kX}function kD(kZ,kV,kY,kW){var kX=kZ;do{if(kX.z===null){kX.z=e(kX.x,kX.y,kV,kY,kW)}kX.prevZ=kX.prev;kX.nextZ=kX.next;kX=kX.next}while(kX!==kZ);kX.prevZ.nextZ=null;kX.prevZ=null;kw(kX)}function kw(k1){var kY;var kX;var kW;var k0;var k2;var kV;var k3;var kZ;var k4=1;do{kX=k1;k1=null;k2=null;kV=0;while(kX){kV++;kW=kX;k3=0;for(kY=0;kY<k4;kY++){k3++;kW=kW.nextZ;if(!kW){break}}kZ=k4;while(k3>0||(kZ>0&&kW)){if(k3===0){k0=kW;kW=kW.nextZ;kZ--}else{if(kZ===0||!kW){k0=kX;kX=kX.nextZ;k3--}else{if(kX.z<=kW.z){k0=kX;kX=kX.nextZ;k3--}else{k0=kW;kW=kW.nextZ;kZ--}}}if(k2){k2.nextZ=k0}else{k1=k0}k0.prevZ=k2;k2=k0}kX=kW}k2.nextZ=null;k4*=2}while(kV>1);return k1}function e(kW,kZ,kV,kY,kX){kW=32767*(kW-kV)/kX;kZ=32767*(kZ-kY)/kX;kW=(kW|(kW<<8))&16711935;kW=(kW|(kW<<4))&252645135;kW=(kW|(kW<<2))&858993459;kW=(kW|(kW<<1))&1431655765;kZ=(kZ|(kZ<<8))&16711935;kZ=(kZ|(kZ<<4))&252645135;kZ=(kZ|(kZ<<2))&858993459;kZ=(kZ|(kZ<<1))&1431655765;return kW|(kZ<<1)}function kz(kX){var kW=kX;var kV=kX;do{if(kW.x<kV.x){kV=kW}kW=kW.next}while(kW!==kX);return kV}function kF(kZ,kY,k1,k0,kV,k2,kX,kW){return(kV-kX)*(kY-kW)-(kZ-kX)*(k2-kW)>=0&&(kZ-kX)*(k0-kW)-(k1-kX)*(kY-kW)>=0&&(k1-kX)*(k2-kW)-(kV-kX)*(k0-kW)>=0}function kN(kW,kV){return kW.next.i!==kV.i&&kW.prev.i!==kV.i&&!kJ(kW,kV)&&kP(kW,kV)&&kP(kV,kW)&&kv(kW,kV)}function kO(kX,kW,kV){return(kW.y-kX.y)*(kV.x-kW.x)-(kW.x-kX.x)*(kV.y-kW.y)}function kE(kW,kV){return kW.x===kV.x&&kW.y===kV.y}function i(kX,kV,kW,kY){if((kE(kX,kV)&&kE(kW,kY))||(kE(kX,kY)&&kE(kW,kV))){return true}return kO(kX,kV,kW)>0!==kO(kX,kV,kY)>0&&kO(kW,kY,kX)>0!==kO(kW,kY,kV)>0}function kJ(kW,kV){var kX=kW;do{if(kX.i!==kW.i&&kX.next.i!==kW.i&&kX.i!==kV.i&&kX.next.i!==kV.i&&i(kX,kX.next,kW,kV)){return true}kX=kX.next}while(kX!==kW);return false}function kP(kW,kV){return kO(kW.prev,kW,kW.next)<0?kO(kW,kV,kW.next)>=0&&kO(kW,kW.prev,kV)>=0:kO(kW,kV,kW.prev)<0||kO(kW,kW.next,kV)<0}function kv(kX,kW){var k0=kX;var kV=false;var kZ=(kX.x+kW.x)/2;var kY=(kX.y+kW.y)/2;do{if(((k0.y>kY)!==(k0.next.y>kY))&&(kZ<(k0.next.x-k0.x)*(kY-k0.y)/(k0.next.y-k0.y)+k0.x)){kV=!kV}k0=k0.next}while(k0!==kX);return kV}function kC(kX,kW){var kV=new kS(kX.i,kX.x,kX.y);var kY=new kS(kW.i,kW.x,kW.y);var k0=kX.next;var kZ=kW.prev;kX.next=kW;kW.prev=kX;kV.next=k0;k0.prev=kV;kY.next=kV;kV.prev=kY;kZ.next=kY;kY.prev=kZ;return kY}function ky(kW,kV,kZ,kX){var kY=new kS(kW,kV,kZ);if(!kX){kY.prev=kY;kY.next=kY}else{kY.next=kX.next;kY.prev=kX;kX.next.prev=kY;kX.next=kY}return kY}function kM(kV){kV.next.prev=kV.prev;kV.prev.next=kV.next;if(kV.prevZ){kV.prevZ.nextZ=kV.nextZ}if(kV.nextZ){kV.nextZ.prevZ=kV.prevZ}}function kS(kW,kV,kX){this.i=kW;this.x=kV;this.y=kX;this.prev=null;this.next=null;this.z=null;this.prevZ=null;this.nextZ=null;this.steiner=false}kB.deviation=function(k0,k5,k2,kX){var k3=k5&&k5.length;var kZ=k3?k5[0]*k2:k0.length;var kW=Math.abs(kU(k0,0,kZ,k2));if(k3){for(var k1=0,k4=k5.length;k1<k4;k1++){var kV=k5[k1]*k2;var kY=k1<k4-1?k5[k1+1]*k2:k0.length;kW-=Math.abs(kU(k0,kV,kY,k2))}}var k9=0;for(k1=0;k1<kX.length;k1+=3){var k8=kX[k1]*k2;var k7=kX[k1+1]*k2;var k6=kX[k1+2]*k2;k9+=Math.abs((k0[k8]-k0[k6])*(k0[k7+1]-k0[k8+1])-(k0[k8]-k0[k7])*(k0[k6+1]-k0[k8+1]))}return kW===0&&k9===0?0:Math.abs((k9-kW)/kW)};function kU(kZ,k1,kV,k0){var kY=0;for(var kX=k1,kW=kV-k0;kX<kV;kX+=k0){kY+=(kZ[kW]-kZ[kX])*(kZ[kX+1]+kZ[kW+1]);kW=kX}return kY}kB.flatten=function(kZ){var k0=kZ[0][0].length;var kV={vertices:[],holes:[],dimensions:k0};var kX=0;for(var kY=0;kY<kZ.length;kY++){for(var kW=0;kW<kZ[kY].length;kW++){for(var k1=0;k1<k0;k1++){kV.vertices.push(kZ[kY][kW][k1])}}if(kY>0){kX+=kZ[kY-1].length;kV.holes.push(kX)}}return kV};return kB})();function cI(i,e){this.id=ge();this.workerPool=i;this.actors=[];this.currentActorIndex=0;this.ready=false;this.init(e)}cI.prototype.init=function(kx){const e=this.workerPool.acquire(this.id);for(var kv=0;kv<e.length;kv++){const ky=e[kv];const kw=new jJ(ky,kx,this.id);kw.name="Worker "+kv;this.actors.push(kw)}var T=this;this.broadcast("hasReady",null,function(){T.ready=true})};cI.prototype.broadcast=function(i,T,e){e=e||function(){};k(this.actors,function(kw,kv){kw.send(i,T,kv)},e)};cI.prototype.getActor=function(){const e=this.actors.filter(function(i){return !i.busy})[0];if(e){return e}this.currentActorIndex=(this.currentActorIndex+1)%this.actors.length;return this.actors[this.currentActorIndex]};cI.prototype.stop=function(){for(var e=0;e<this.actors.length;e++){var T=this.actors[e];T.stop()}};cI.prototype.remove=function(){for(var e=0;e<this.actors.length;e++){var T=this.actors[e];T.remove()}this.actors.length=0;this.workerPool.release(this.id)};function jJ(T,i,e){this.target=T;this.parent=i;this.mapId=e;this.busy=false;this.taskQueue=[];this.callbacks={};this.init()}jJ.prototype.init=function(){this.receive=this.receive.bind(this);this.target.addEventListener("message",this.receive,false)};jJ.prototype.setBusy=function(e){this.busy=e;if(!e&&this.taskQueue.length){var i=this.taskQueue.shift();this.send(i.action,i.data,i.callback,i.targetMapId,i.mustQueue,i.callbackMetadata)}};jJ.prototype.receive=function(kv){const kw=kv.data;const kz=kw.id;if(!kz){return}if(kw.targetMapId&&this.mapId!==kw.targetMapId){return}if(kw.action==="<response>"){this.setBusy(false);const ky=this.callbacks[kz];delete this.callbacks[kz];if(ky){if(kw.error){ky(ir(kw.error))}else{ky(null,ir(kw.data))}}}else{var T=this;const i=[];const e=kw.hasCallback?function(kA,kB){T.target.postMessage({id:kz,action:"<response>",sourceMapId:T.mapId,error:kA?jK(kA):null,data:jK(kB,i)},i)}:function(kA){};const kx=ir(kw.data);if(this.parent[kw.action]){this.parent[kw.action](kw.sourceMapId,kx,e)}}};jJ.prototype.send=function(i,T,ky,kv,kw,kz){if(i==="release"){this.releasePendingData(T,ky);return}if(this.busy){this.taskQueue.push({action:i,data:T,callback:ky,targetMapId:kv,mustQueue:kw,callbackMetadata:kz});return}this.setBusy(true);var kx=Math.round((Math.random()*1000000000000000000)).toString(36).substring(0,10);const e=this.mapId+"_"+i+"_"+kx;if(ky){ky.metadata=kz;this.callbacks[e]=ky}const kA=[];this.target.postMessage({id:e,action:i,hasCallback:!!ky,targetMapId:kv,mustQueue:kw,sourceMapId:this.mapId,data:jK(T,kA)},kA);return{cancel:function(){if(ky){delete this.callbacks[e]}this.target.postMessage({id:e,action:"<cancel>",targetMapId:kv,sourceMapId:this.mapId})}}};jJ.prototype.stop=function(){this.taskQueue.length=0;this.busy=false;this.callbacks={}};jJ.prototype.remove=function(){this.taskQueue.length=0;this.busy=false;this.target.removeEventListener("message",this.receive,false)};jJ.prototype.releasePendingData=function(e,ky){var T=[];var kw=this.taskQueue;for(var kv=kw.length-1;kv>=0;kv--){var kx=kw[kv]["data"];if(!kx||!kx.layerId){break}if(kx.layerId!==e.layerId){continue}if(!e["id_"+kx.x+"_"+kx.y+"_"+kx.z]){kw.splice(kv,1);T.push(kx)}}ky(null,T)};var kl;function hA(){if(!kl){kl=new hG()}return kl}function hG(){this.active={}}hG.prototype.acquire=function(i){if(!this.workers){this.workers=[];var T=(window.location.protocol === "http:" ? "http:" : "https:") + "//api.map.baidu.com/res/webgl/10/worker_mvt_xyk5ez.js";while(this.workers.length<hG.workerCount){var e=j3(T);this.workers.push(e)}}this.active[i]=true;return this.workers.slice()};hG.prototype.release=function(T){delete this.active[T];if(this.numActive()===0){for(var e=0;e<this.workers.length;e++){this.workers[e].terminate()}this.workers=null}};hG.prototype.numActive=function(){return Object.keys(this.active).length};hG.workerCount=2;function hH(e){this._map=e;this._spotsId={};this._init()}hH.prototype._init=function(){var i=this._map;var e=this;i.addEventListener("onspotsdataready",function(kv){var T=kv.spots;if(e._spotsId[kv.index]){i.removeSpots(e._spotsId[kv.index])}e._spotsId[kv.index]=i.addSpots(T)});i.addEventListener("onspotsdataremove",function(T){if(e._spotsId[T.index]){i.removeSpots(e._spotsId[T.index])}})};bD.register(function(e){if(!e.config.enableIconClick){return}e._mapIcon=new hH(e)});function dd(e){this._indoorData={};this._map=e;this.currentUid=null;this.currentFloor=null;this._indoorControl=null;this.enterMethod=null;this.showMask=true;this._isMobile=b2();this._autoEnterZoom=19;if(this._isMobile){this._autoEnterZoom=17}this._init(e);window._indoorMgr=this}dd.prototype._init=function(i){var e=this;i.on("indoor_status_changed",function(ky){var T=ky.uid;var kw=ky.floor;if(T===null){T=e.currentUid;if(e._indoorData[T]){kw=e._indoorData[T].defaultFloor}if(e._indoorControl){e._indoorControl.hide()}e.currentUid=null;e.currentFloor=null;e.enterMethod=null}else{if(e._indoorData[T]){var kx=e._indoorData[T];kw=(typeof kw==="number")?kw:kx.defaultFloor;if(!e._indoorControl){if((i.config.showControls||i.config.indoorControl)&&i._displayOptions.indoor){e._indoorControl=new av(i,kx)}}else{e._indoorControl.setInfo(kx);e._indoorControl.show()}e.currentUid=T;e.currentFloor=kw}}if(!e._indoorData||!e._indoorData[T]||e._indoorData[T].currentFloor===kw){this.fire(new fS("onrefresh"));return}var kv=new fS("onindoor_data_refresh");kv.uid=T;kv.floor=kw;kv.tileKey=e._indoorData[T].tileKey;e._indoorData[T].currentFloor=kw;e.currentFloor=kw;this.fire(kv);hL.sendMessage(aZ(4,3,4),["layer","indoor"])});i.on("spotclick",function(kv){var T=null;if(kv.curAreaSpot&&this.areaSpots[kv.curAreaSpot]){T=this.areaSpots[kv.curAreaSpot].userData.uid}if(T===e.currentUid){if(kv.curAreaSpot){e.enterMethod="byClick"}return}if(T===null){if(e.currentUid&&e.enterMethod==="byClick"){i.showIndoor(null);e.enterMethod=null}}else{e.enterMethod="byClick";if(e.currentUid){i.showIndoor(e.currentUid,e._indoorData[e.currentUid].defaultFloor)}i.showIndoor(T,e._indoorData[T].defaultFloor)}});i.on("moveend",function(){if(this.getZoom()>=e._autoEnterZoom){e._checkIndoorByMove()}});i.on("zoomend",function(){if(this.getZoom()>=e._autoEnterZoom){e._checkIndoorByMove()}else{if(e.enterMethod!=="byClick"&&e.currentUid!==null){this.showIndoor(null)}}})};dd.prototype._checkIndoorByMove=function(){var T=this._map;var kB=T.getSize();var kG={x:kB.width/2,y:kB.height/2};var kF=Math.max(kB.width,kB.height);var kH=[];for(var kC in this._indoorData){var e=this._indoorData[kC].center;var kv=T.pointToPixelIn(new bD.Point(e[0],e[1]));var ky=co(kG,kv);kH.push({uid:kC,distance:ky})}if(kH.length===0){return}kH.sort(function(kI,i){return kI.distance-i.distance});var kx=kH[0];var kD=T.getCenterIn();var kw=false;for(var kA=0;kA<this._indoorData[kx.uid].contour.length;kA++){if(bQ([kD.lng,kD.lat],this._indoorData[kx.uid].contour[kA])){kw=true;break}}if(kw===false&&kx.uid==="e96b44200baa3b4082288acc"){var kz=this._indoorData[kx.uid].boundsMin;var kE=this._indoorData[kx.uid].boundsMax;if(kD.lng>kz[0]&&kD.lat>kz[1]&&kD.lng<kE[0]&&kD.lat<kE[1]){kw=true}}if(kw){if(this.enterMethod!=="byClick"){if(this.currentUid!==null&&this.currentUid!==kx.uid){this._map.showIndoor(this.currentUid,this._indoorData[this.currentUid].defaultFloor)}if(this.currentUid!==kx.uid){this._map.showIndoor(kx.uid,this._indoorData[kx.uid].defaultFloor)}this.enterMethod="byMove"}}else{if(this.enterMethod!=="byClick"){this._map.showIndoor(null)}}};dd.prototype.setData=function(kv){if(kv===null){return}for(var T in kv){if(T==="tileInfo"){continue}var kw=kv[T].tileKey;if(this._indoorData[T]){if(!this._indoorData[T][kw]){this._indoorData[T].tileKeys.push(kw);this._indoorData[T][kw]=true}}else{this._indoorData[T]=kv[T];this._indoorData[T].tileKeys=[kv[T].tileKey];this._indoorData[T][kw]=true;for(var e=0;e<this._indoorData[T].contour.length;e++){this._map.addAreaSpot(this._indoorData[T].contour[e],{id:T+e,userData:{uid:T}})}}}if(this._map.getZoom()>=this._autoEnterZoom){this._checkIndoorByMove()}};dd.prototype.removeData=function(T,kw){if(!this._indoorData[T]){return}var kv=this._indoorData[T];for(var e=0;e<kv.tileKeys.length;e++){if(kv.tileKeys[e]===kw){kv.tileKeys.splice(e,1);break}}delete kv[kw];if(kv.tileKeys.length===0){delete this._indoorData[T]}};dd.prototype.getIndoorData=function(e){return this._indoorData[e]||null};dd.prototype.getData=function(){return this._indoorData};bD.register(function(e){e._indoorMgr=new dd(e)});var a1=(function(){var kv={};var kE={};var kA={};function kC(kG){if(Object.prototype.toString.call(kG)==="[object Object]"){for(var kF in kG){return false}return true}else{return false}}function kB(kM,kN,kQ,kJ,kP){var kF=kF||null;kJ=kJ||kF;var kH;if(kQ>21){kQ=21}if(kJ){kH=kD(kM,kN,kQ,kJ)}else{kH=T(kM,kN,kQ,kP)}var kL=kH.drawId;var kG=kH.style;var kO=kH.styleUpdate;var kR=[];if(!kL){return kR}for(var kI=0;kI<kL.length;kI++){var kK=kO[kL[kI]]||kG[kL[kI]];if(kK){switch(kN){case"polygon":kK=kw(kK,kM);break;case"line":kK=kz(kK,kM);break;case"pointText":kK=kx(kK,kM);break;case"point":kK=e(kK,kM);break;case"polygon3d":kK=ky(kK,kM);break}if(kK){kK.did=kL[kI];kR[kR.length]=kK}}}return kR}function kD(kG,kI,kJ,kF){var kH=kF[2];switch(kI){case"point":kH=kH[0];break;case"pointText":kH=kH[1];break;case"line":kH=kH[3];break;case"polygon":kH=kH[4];break;case"polygon3d":kH=kH[5];break}var kL=kJ-1;if(kI==="line"&&kJ===12){kL=kJ}var kM=kF[1][kL][0];var kK=kM[kG];if(!kK&&kJ<21){if(kI==="point"||kI==="pointText"){kM=kF[1][kJ][0];kK=kM[kG]}}return{drawId:kK,style:kH,styleUpdate:[]}}function T(kJ,kK,kN,kM){if(!kM||!kM.baseFs){return{drawId:null,style:[],styleUpdate:[]}}var kL;var kH=kM.baseFs;if(kC(kM.zoomRegion)){kL=kM.StyleBody||[]}else{kL=kM.zoomStyleBody[kN]||[]}var kG=kH[2];switch(kK){case"point":kG=kG[0];kL=kL[0]||{};break;case"pointText":kG=kG[1];kL=kL[1]||{};break;case"line":kG=kG[3];kL=kL[3]||{};break;case"polygon":kG=kG[4];kL=kL[4]||{};break;case"polygon3d":kG=kG[5];kL=kL[5]||{};break}var kF=kH[1][kN-1][0];var kI=kF[kJ];if(!kI&&kN<21){if(kK==="point"||kK==="pointText"){kF=kH[1][kN][0];kI=kF[kJ]}}return{drawId:kI,style:kG,styleUpdate:kL}}function kx(kG,kF){if(!kG||kG.length===0){return null}return{sid:kF,fontRgba:i(kG[0]),haloRgba:i(kG[1]),backRgba:i(kG[2]),fontSize:kG[3],haloSize:kG[4],fontWeight:kG[5],fontStyle:kG[6],density:kG[7]}}function e(kH,kF){var kG=null;if(kH[kH.length-1]&&kH[kH.length-1] instanceof Array&&kH[kH.length-1][0]==="openmap"){kG=kH[kH.length-1][1]?kH[kH.length-1][1]:null}return{sid:kF,rank:kH[0],ucflag:kH[1],icon:kH[2],iconType:kH[3],nineGG:kH[4],density:kH[5],zoom:kH[6],hue:kG>>>0}}function kz(kH,kF){var kG=null;if(kH[kH.length-1]&&kH[kH.length-1] instanceof Array&&kH[kH.length-1][0]==="openmap"){kG=kH[kH.length-1][1]?kH[kH.length-1][1]:null}return{sid:kF,borderRgba:i(kH[0]),fillRgba:i(kH[1]),borderWidth:kH[2],fillWidth:kH[3],borderCap:kH[4],fillCap:kH[5],haveBorderLine:kH[6],haveBorderTexture:kH[7],haveFillTexture:kH[8],isUseBorderRgba:kH[9],isUseFillRgba:kH[10],borderTexture:kH[11],fillTexture:kH[12],borderTextureType:kH[13],fillTextureType:kH[14],isRealWidth:kH[15],haveArrow:kH[16],needRound:kH[17],realBorderWidth:kH[18],hue:i(kG)}}function kw(kH,kF){var kG=null;var kI=null;if(kH[kH.length-1]&&kH[kH.length-1] instanceof Array&&kH[kH.length-1][0]==="openmap"){kG=kH[kH.length-1][1]?kH[kH.length-1][1]:null;kI=kH[kH.length-1][2]?kH[kH.length-1][2]:null}return{sid:kF,fillRgba:i(kH[0]),borderRgba:i(kH[1]),borderWidth:kH[2],borderTexture:kH[3],borderTextureType:kH[4],waterStyle:kH[5],haloStyle:kH[6],textureStyle:kH[7],thickRgba:i(kH[8]),fillTexture:kI,hue:i(kG)}}function ky(kG,kF){return{sid:kF,filter:kG[0],ratio:kG[1],haveBorder:kG[2],borderWidth:kG[3],borderRgba:i(kG[4]),fillTop:i(kG[5]),fillSide:i(kG[6]),polyTexture:kG[7]}}function i(kK){var kJ=kK;if(kA[kJ]){return kA[kJ]}kK=kK>>>0;var kI=(kK)&255;var kH=(kK>>8)&255;var kF=(kK>>16)&255;var kG=(kK>>24)&255;kA[kJ]=[kI,kH,kF,kG];return kA[kJ]}return{getStyleFromCache:function(kM,kH,kK,kL,kG,kJ,kF){kM=kM||"default";var kI=kM+"-"+kH+"-"+kK+"-"+kL;if(kJ){kI+="-indoor"}if(kG){if(!kE[kI]){kE[kI]=kB(kH,kK,kL,kG)}return kE[kI]}if(!kv[kI]){kv[kI]=kB(kH,kK,kL,kG,kF)}return kv[kI]},clearStyleFromCache:function(){kv={};kE={}}}})();bD.register(function(i){var e=new iq(i)});function iq(e){e.container.appendChild(this.render());this.bind(e)}iq.prototype.render=function(){var i=document.createElement("div");i.className="click-ripple-container";var e=document.createElement("div");e.className="click-ripple";i.appendChild(e);this._div=i;this._ripple=e;return i};iq.prototype.bind=function(i){var e=this;i.addEventListener("spotclick",function(T){if(!T.spots||T.spots.length===0){return}e._div.style.left=T.pixel.x+"px";e._div.style.top=T.pixel.y+"px";e6.ac(e._ripple,"ripple-playing")});i.addEventListener("hotclick",function(T){if(!T||!T.pixel||!(T.pixel instanceof fr)){return}e._div.style.left=T.pixel.x+"px";e._div.style.top=T.pixel.y+"px";e6.ac(e._ripple,"ripple-playing")});e6.on(e._ripple,"transitionend",function(){e6.rc(e._ripple,"ripple-playing")})};function b1(e){de.call(this);if(!e){return}this._opts={};this._map=e;this._maxLat=84.6;this._minLat=-80.6;this._maxLatMC=jr.convertLL2MC(new cx(this._maxLat,0)).lat;this._minLatMC=jr.convertLL2MC(new cx(this._minLat,0)).lat}b1.inherits(de,"ToolbarItem");e6.extend(b1.prototype,{open:function(){if(this._isOpen==true){return true}if(this._map._toolInUse){return false}this._map._toolInUse=true;this._isOpen=true;return true},close:function(){if(!this._isOpen){return}this._map._toolInUse=false;this._isOpen=false},_checkStr:function(e){if(!e){return""}return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}});function cl(T,i){b1.call(this,T);i=i||{};this._opts=e6.extend(e6.extend(this._opts||{},{autoClear:false,tips:"测距",followText:"单击确定起点，双击结束绘制",unit:"metric",showResult:true,lineColor:"blue",lineStroke:2,opacity:1,lineStyle:"solid",cursor:C.distCursor,styleCodes:{lnCode:0,spCode:0,slCode:0,tlCode:0},enableMassClear:true}),i);if(this._opts.showResult===false){if(typeof i.tips==="undefined"){this._opts.tips="绘制折线"}if(!i.cursor){this._opts.cursor="crosshair"}}if(this._opts.lineStroke<=0){this._opts.lineStroke=2}if(this._opts.opacity>1){this._opts.opacity=1}else{if(this._opts.opacity<0){this._opts.opacity=0}}if(this._opts.lineStyle!=="solid"&&this._opts.lineStyle!=="dashed"){this._opts.lineStyle="solid"}this._checked=false;this._drawing=null;this.followTitle=null;this._totalDis={};this._points=[];this._paths=[];this._dots=[];this._segDistance=[];this._overlays=[];this._units={metric:{name:"metric",conv:1,incon:1000,u1:"米",u2:"公里"},us:{name:"us",conv:3.2808,incon:5279.856,u1:"英尺",u2:"英里"}};if(!this._units[this._opts.unit]){this._opts.unit="metric"}this._dLineColor="#ff6319";this._dLineStroke=3;this._dOpacity=0.8;this._dLineStyle="solid";this._dCursor=C.distCursor;if(this._opts.showResult){this._opts.followText="单击确定起点"}this._followTextM="单击确定地点，双击结束";this._sectionMarkerTip="单击可删除此点，拖拽可调整位置";this._movingTimerId=null;if(this._opts.showResult){this.text="测距"}else{this.text="绘线"}this._isOpen=false;var e=this;hh.load("tools",function(){e._draw()})}cl.inherits(b1,"PolylineTItem");e6.extend(cl.prototype,{setLineColor:function(e){this._opts.lineColor=e},setLineStroke:function(e){if(Math.round(e)>0){this._opts.lineStroke=Math.round(e)}},setOpacity:function(e){if(e>=0&&e<=1){this._opts.opacity=e}},setLineStyle:function(e){if(e==="solid"||e==="dashed"){this._opts.lineStyle=e}},clear:function(){for(var T=0,e=this._overlays.length;T<e;T++){if(this._overlays[T]){this._map.removeOverlay(this._overlays[T])}}this._overlays.length=0;for(var T=0,e=this._dots.length;T<e;T++){if(this._dots[T]&&this._dots[T].parentNode){this._dots[T].parentNode.removeChild(this._dots[T])}}this._dots.length=0},setCursor:function(e){if(this._opts.showResult===true){return}this._opts.cursor=e},getCursor:function(){if(this._opts.showResult===true){return this._dCursor}var e=this._opts.cursor.match(/^url\((.+)\)(,.*)?/);if(e!==null){return e[1]}else{return this._opts.cursor}},showResult:function(e){this._opts.showResult=!!e}});function bI(){var kw=3;var kD=256;var kv=Math.pow(2,18-kw)*kD;var kE=2;var kC=(kE+1)*kv;var T=jr.convertLL2MC(new cD(180,0));var kA=T.lng;var ky=kC-kA;var kB=-3;var e=kB*kv;var kx=jr.convertLL2MC(new cD(-180,0));var kz=kx.lng;var i=kz-e;this._validPixels=kA/Math.pow(2,18-kw);this._mc180X=kA;this._mcM180X=kz;this._loopOffset=ky+i;this._mcTSpan=kA-kz;this._spaceDistance=ky;this._mSpaceDistance=i}bI.prototype={calcLoopParam:function(kv,i,kC){kC=kC||256;var kz=0;var kw=3;var ky=6;var kx=ky*Math.pow(2,(i-kw))*256/kC;var kB=kx/2-1;var kA=-kx/2;while(kv>kB){kv-=kx;kz-=this._loopOffset}while(kv<kA){kv+=kx;kz+=this._loopOffset}var e=kz;kz=Math.round(kz/Math.pow(2,18-i));return{offsetX:kz,geoOffsetX:e,col:kv,T:kx,maxCol:kB,minCol:kA}},calcLoopCenterPoint:function(i){var e=i.lng;while(e>this._mc180X){e-=this._mcTSpan}while(e<this._mcM180X){e+=this._mcTSpan}i.lng=e;return i},calcLoopMapBounds:function(T,kv){var i=kv||T.getCenter();var e=T.sw.lng;var kw=T.ne.lng;while(i.lng>this._mc180X){i.lng-=this._mcTSpan;e-=this._mcTSpan;kw-=this._mcTSpan}while(i.lng<this._mcM180X){i.lng+=this._mcTSpan;e+=this._mcTSpan;kw+=this._mcTSpan}T.sw.lng=e;T.ne.lng=kw;if(T.pointBottomLeft){T.pointBottomLeft=this.calcLoopCenterPoint(T.pointBottomLeft);T.pointTopLeft=this.calcLoopCenterPoint(T.pointTopLeft);T.pointTopRight=this.calcLoopCenterPoint(T.pointTopRight);T.pointBottomRight=this.calcLoopCenterPoint(T.pointBottomRight)}return T},calcLoopTiles:function(kD,e,kH,kA){kH=kH||256;var kw=kA||Math.pow(2,18-e)*kH;var kC=Math.floor(this._mc180X/kw);var ky=Math.floor(this._mcM180X/kw);var kE=Math.floor(this._loopOffset/kw);var kF=[];for(var kz=0;kz<kD.length;kz++){var kG=kD[kz];var kv=kG[0];var kI=kG[1];if(kv>=kC){var kB=kv+kE;if(this.isTileBlank(kB,e,kH)===true){continue}var T="id_"+kB+"_"+kI+"_"+e;if(!kD[T]){kD[T]=true;kF.push([kB,kI,e,0])}}else{if(kv<=ky){var kB=kv-kE;if(this.isTileBlank(kB,e,kH)===true){continue}var T="id_"+kB+"_"+kI+"_"+e;if(!kD[T]){kD[T]=true;kF.push([kB,kI,e,0])}}}}for(var kz=0,kx=kF.length;kz<kx;kz++){kD.push(kF[kz])}for(var kz=kD.length-1;kz>=0;kz--){var kv=kD[kz][0];if(this.isTileBlank(kv,e,kH)){kD.splice(kz,1)}}return kD},isTileBlank:function(T,kw,e){var kx=Math.pow(2,kw-3);var i=Math.round(this._validPixels*kx);var kv=6*kx*256/e;while(T>kv/2-1){T-=kv}while(T<-(kv/2)){T+=kv}if(T>0&&T*e>i){return true}if(T<0&&Math.abs((T+1)*e)>i){return true}return false},isAddWidth:function(e,i){return e<this._mcM180X||i>this._mc180X},pixelWidth:function(e,i){if(e<0){e=-e}return Math.abs(e-this._mc180X)/(Math.pow(2,18-i))},getSpaceDistanceInPixel:function(i){var e=Math.round((this._spaceDistance+this._mSpaceDistance)/Math.pow(2,18-i));return e}};var e9=new bI();function ex(){this._id=undefined;this._type=undefined;this.grid=undefined;this.layerName=undefined;this.geojson=undefined;this._geometry=null;this._properties={};this._box=null;this._state={};this._style=null;this._visible=true;this.renderData={};return this}ex.prototype.serialize=function(){return{id:this.getId(),type:this.getType(),grid:this.grid,layerName:this.layerName,geojson:this.geojson,renderData:this.renderData,geometry:this.getGeometry(),box:this.getBox(),properties:this.getProperties(),state:this.getState(),visible:this._visible}};ex.prototype.deserialize=function(e){this.setId(e.id);this.setType(e.type);this.grid=e.grid;this.layerName=e.layerName;this.geojson=e.geojson;this.setProperties(e.properties);this.setState(e.state);this._visible=e.visible||true;this.renderData=e.renderData;this.setGeometry(e.geometry);this.setBox(e.box);return this};ex.prototype.getType=function(){return this._type};ex.prototype.getGeometry=function(){return this._geometry};ex.prototype.getId=function(){return this._id};ex.prototype.getProperties=function(){return this._properties};ex.prototype.getBox=function(){return this._box};ex.prototype.getState=function(){if(Object.keys(this._state).length>0){return this._state}else{return null}};ex.prototype.getStyle=function(){return this._style};ex.prototype.getStyleFunction=function(){return this._styleFunction};ex.prototype.setType=function(e){return this._type=e};ex.prototype.setGeometry=function(e){this._geometry=e};ex.prototype.setStyle=function(e){if(!e||Object.keys(e).length===0){return}for(var i in e){this.set(i,e[i],this._style)}};ex.prototype.setState=function(e){for(var i in e){this.set(i,e[i],this._state)}};ex.prototype.setId=function(e){this._id=e};ex.prototype.setProperties=function(e){for(var i in e){this.set(i,e[i],this._properties)}};ex.prototype.setBox=function(e){return this._box=e};ex.prototype.isPointInBox=function(e){return this._pointInBox(e,this._box)};ex.prototype.getPointGeoJSON=function(kv){var kE=this.renderData;if(kE){var ky=kE.active;if(!kE[ky]||!kE[ky]["poi"]){return null}var kD=[];var kA=kE[ky]["poi"];for(var kB=0;kB<kA.length;kB++){if(kA[kB].bds&&kA[kB].bds.length===4){var kw=kv.pointToPixelIn(kA[kB].pt);var kz=kw.x-kA[kB].bds[0];var kx=kw.y-kA[kB].bds[1];var T=kw.x-kA[kB].bds[2];var e=kw.y-kA[kB].bds[3];kD.push([[kz,kx],[T,kx],[T,e],[kz,e],[kz,kx]])}}if(kD.length===0){return null}else{var kC="Polygon";if(kD.length>0){kC="MultiPolygon"}return{type:"Feature",properties:{},geometry:{type:kC,coordinates:[kD]}}}}};ex.prototype._pointInBox=function(e,i){if(i[0]>e[0]||i[1]>e[1]||i[2]<e[0]||i[3]<e[1]){return false}else{return true}};ex.prototype._pixelPnpoint=function(kw,kA,e){var kB=false;if(kA){var kv=kA.active;if(!kA[kv]||!kA[kv]["poi"]){return kB}var kx=kA[kv]["poi"];for(var ky=0;ky<kx.length;ky++){if(kx[ky].bds&&kx[ky].bds.length===4){var T=e.pointToPixelIn(kx[ky].pt);if((kw.x-T.x<kx[ky].bds[2]&&kw.x-T.x>kx[ky].bds[0])&&(T.y-kw.y<kx[ky].bds[3]&&T.y-kw.y>kx[ky].bds[1])){if(e.getTilt()>55){var kz=e.pointToOverlayPixelIn(kx[ky].pt);if(kz.outOfFrustum){continue}}kB=true;break}}}}return kB};ex.prototype._pixelPnpoly=function(kw,ky){var e=ky.length;var T=0;var kx=false;for(var kv=0;kv<e;kv++){T=(kv===e-1)?0:T+1;if((ky[kv].lat!==ky[T].lat)&&(((kw.lat>=ky[kv].lat)&&(kw.lat<ky[T].lat))||((kw.lat>=ky[T].lat)&&(kw.lat<ky[kv].lat)))&&(kw.lng<(ky[T].lng-ky[kv].lng)*(kw.lat-ky[kv].lat)/(ky[T].lat-ky[kv].lat)+ky[kv].lng)){kx=!kx}}return kx};ex.prototype._getProximity=function(kF,kB){var T,kv,kE,kz,ky,kD,kC;var kI=kB.length;if(kI>1){for(var kG=1;kG<kI;kG++){var kA=kB[kG-1];var kM=kB[kG];if(!kA||!kM){continue}if(kA.lng!=kM.lng){var kL=(kM.lat-kA.lat)/(kM.lng-kA.lng);var kJ=kM.lat-kL*kM.lng;kC=Math.abs(kL*kF.lng+kJ-kF.lat)/Math.sqrt(kL*kL+1)}else{kC=Math.abs(kF.lng-kM.lng)}var kH=Math.pow(kM.lat-kA.lat,2)+Math.pow(kM.lng-kA.lng,2);var kw=Math.pow(kM.lat-kF.lat,2)+Math.pow(kM.lng-kF.lng,2);var kK=Math.pow(kA.lat-kF.lat,2)+Math.pow(kA.lng-kF.lng,2);var kx=Math.pow(kC,2);var e=kw-kx+kK-kx;if(e>kH){kC=Math.sqrt(Math.min(kw,kK))}if((T==null)||(T>kC)){kv=Math.sqrt(kK-kx)/Math.sqrt(kH);kE=Math.sqrt(kw-kx)/Math.sqrt(kH);T=kC;kD=kG}T=Math.min(T,kC)}}return{dist:T}};ex.prototype.isPointInGeometry=function(T,kA){var e=false;switch(this._type){case fZ.POINT:e=this._pixelPnpoint(T,this.renderData,kA);break;case fZ.LINE_STRING:var kw=this._getProximity({lng:T[0],lat:T[1]},this._geometry);var kz=this.renderData[this.renderData.active];if(!kz||!kz.line||!kz.line[0]||!kz.line[0].width){var ky=2}else{var ky=this.renderData[this.renderData.active]["line"][0].width;if(this.grid===eh.GridModel.GOOGLEWEB){ky=Math.max(ky/2*dI.gridScaleFromBDMCTo3857,2)}else{ky=Math.max(ky/2,2)}}if(kw.dist<ky){e=true}break;case fZ.POLYGON:e=this._pixelPnpoly({lng:T[0],lat:T[1]},this._geometry);break;case fZ.MULTI_POLYGON:for(var kx=0;kx<this._geometry.length;kx++){if(this._geometry[kx][0] instanceof cD){e=this._pixelPnpoly({lng:T[0],lat:T[1]},this._geometry[kx])}else{e=this._pixelPnpoly({lng:T[0],lat:T[1]},this._geometry[kx][0]);if(e){for(var kv=1;kv<this._geometry[kx].length;kv++){e=this._pixelPnpoly({lng:T[0],lat:T[1]},this._geometry[kx][kv]);if(e){e=false;break}}}}if(e){break}}break;case fZ.MULTI_LINE_STRING:var kz=this.renderData[this.renderData.active];if(!kz||!kz.line||!kz.line[0]||!kz.line[0].width){var ky=6}else{var ky=this.renderData[this.renderData.active]["line"][0].width;ky=Math.max(ky/2*dI.gridScaleFromBDMCTo3857,6)}for(var kx=0;kx<this._geometry.length;kx++){if(this._geometry[kx][0] instanceof cD){var kw=this._getProximity({lng:T[0],lat:T[1]},this._geometry[kx]);if(kw.dist<ky){e=true;break}}}break;case fZ.MULTI_POINT:e=this._pixelPnpoint(T,this.renderData,kA);break;default:throw new Error("geojson类型错误: "+this._type)}return e};ex.prototype.set=function(i,T,kv){var e=kv||(kv={});e[i]=T};var gJ=(function(){function kC(kI){var kH=kI?kI:{};if(kH.reference){this.reference=kH.reference}else{this.reference=null}return this}kC.prototype.readFeatureFromObject=function(kI,kL){var kH=null;if(kI.type&&kI.type.toLowerCase()==="feature"){kH=kI}else{kH={type:"Feature",geometry:kI,properties:null,}}kL=kL||{};kL.reference=(kL.reference===undefined?this.reference:kL.reference);if(kL.isPoints){kL.onlyGeometry=true}var kM=T(kH.geometry,kL,kH.properties);var kK=e(kx(kH),kL);if(!kM){return null}if(kL&&kL.onlyGeometry&&!kL.isPoints){return{geometry:kM,type:kH.geometry["type"],bBox:kK}}if(kM instanceof Array&&!(kM[0] instanceof cD)){for(var kJ=0;kJ<kM.length;kJ++){if(kL.isPoints){kM[kJ]={points:kM[kJ],properties:kH.properties,index:kL.__index,brotherIndex:kJ}}else{kM[kJ]["properties"]=kH.properties}}}else{if(kL.isPoints){kM={points:kM,properties:kH.properties,index:kL.__index,brotherIndex:-1}}else{kM.properties=kH.properties}}return kM};kC.prototype.readFeaturesFromObject=function(kK,kS,kH){var kP=kK;var kI=null;if(kP.type&&kP.type.toLowerCase()==="featurecollection"){var kM=kK;kI=[];var kO=kM.features;var kJ=kS||{};for(var kN=0,kQ=kO.length;kN<kQ;++kN){kJ.__index=kN;var kR=this.readFeatureFromObject(kO[kN],kS);if(kR instanceof Array){for(var kL=0;kL<kR.length;kL++){kH&&kH(kR[kL]);kI.push(kR[kL])}}else{kH&&kH(kR);kI.push(kR)}}}else{var kR=this.readFeatureFromObject(kK,kS);if(kR instanceof Array){kI=[];for(var kN=0;kN<kR.length;kN++){kH&&kH(kR[kN]);kI.push(kR[kN])}}else{kH&&kH(kR);kI=[kR]}}return kI};function T(kH,kJ,kI){if(!kH){return null}var kK;switch(kH.type){case fZ.POINT:kK=kz(kH,kJ,kI);break;case fZ.LINE_STRING:kK=kv(kH,kJ,kI);break;case fZ.POLYGON:kK=kA(kH,kJ,kI);break;case fZ.MULTI_POINT:kK=kB(kH,kJ,kI);break;case fZ.MULTI_LINE_STRING:kK=kE(kH,kJ,kI);break;case fZ.MULTI_POLYGON:kK=kF(kH,kJ,kI);break;default:throw new Error("geojson类型错误: "+kH.type)}return kK}function kz(kI,kL,kJ){var kM=kI.coordinates;if(kL.reference&&kL.reference!=="BD09LL"){kM=gcoord.transform(kM,kL.reference||"WGS84",gcoord.BD09LL)}if(kL&&kL.onlyGeometry){return new cD(kM[0],kM[1])}var kK=kL;if(kL.markerStyle){kK=kL.markerStyle;if(kL.markerStyle instanceof Function){kK=kL.markerStyle(kJ)||{}}}var kH=new s(new cD(kM[0],kM[1]),kK);return kH}function kG(kL,kI){if(!kL){return[]}var kK=[];for(var kH=0;kH<kL.length;kH++){var kJ=kL[kH];if(kI.reference&&kI.reference!=="BD09LL"){kJ=gcoord.transform(kJ,kI.reference||"WGS84",gcoord.BD09LL)}kK.push(new cD(kJ[0],kJ[1]))}return kK}function kv(kI,kL,kJ){var kM=kI.coordinates;if(kL&&kL.onlyGeometry){return kG(kM,kL)}var kK=kL;if(kL.polylineStyle){kK=kL.polylineStyle;if(kL.polylineStyle instanceof Function){kK=kL.polylineStyle(kJ)||{}}}var kH=new br(kG(kM,kL),kK);return kH}function kA(kH,kL,kJ){var kM=kH.coordinates;if(kL&&kL.onlyGeometry){return kG(kM[0],kL)}var kK=kL;if(kL.polygonStyle){kK=kL.polygonStyle;if(kL.polygonStyle instanceof Function){kK=kL.polygonStyle(kJ)||{}}}var kI=new iX(kG(kM[0],kL),kK);return kI}function kB(kJ,kP,kM){var kN=kJ.coordinates;var kH=[];for(var kL=0;kL<kN.length;kL++){var kO=kN[kL];if(kP.reference&&kP.reference!=="BD09LL"){kO=gcoord.transform(kO,kP.reference||"WGS84",gcoord.BD09LL)}if(kP&&kP.onlyGeometry){kH.push(new cD(kO[0],kO[1]))}else{var kI=kP;if(kP.markerStyle){kI=kP.markerStyle;if(kP.markerStyle instanceof Function){kI=kP.markerStyle(kM)||{}}}var kK=new s(new cD(kO[0],kO[1]),kI);kH.push(kK)}}return kH}function kE(kI,kM,kK){var kO=kI.coordinates;var kN=[];for(var kJ=0;kJ<kO.length;kJ++){if(kM&&kM.onlyGeometry){kN.push(kG(kO[kJ],kM))}else{var kL=kM;if(kM.polylineStyle){kL=kM.polylineStyle;if(kM.polylineStyle instanceof Function){kL=kM.polylineStyle(kK)||{}}}var kH=new br(kG(kO[kJ],kM),kL);kN.push(kH)}}return kN}function kF(kK,kR,kO){var kQ=kK.coordinates;var kH=[];for(var kN=0;kN<kQ.length;kN++){var kS=[];for(var kL=0,kJ=kQ[kN];kL<kJ.length;kL++){var kM=kG(kJ[kL],kR);if(kR&&kR.onlyGeometry){if(kJ.length===1){kH.push(kM)}else{kS.push(kM)}}else{if(kJ.length===1){var kI=kR;if(kR.polygonStyle){kI=kR.polygonStyle;if(kR.polygonStyle instanceof Function){kI=kR.polygonStyle(kO)||{}}}var kP=new iX(kM,kI);kH.push(kP)}else{kS.push(kM)}}}if(kJ.length!==1){if(kR&&kR.onlyGeometry){kH.push(kS)}else{var kI=kR;if(kR.polygonStyle){kI=kR.polygonStyle;if(kR.polygonStyle instanceof Function){kI=kR.polygonStyle(kO)||{}}}var kP=new iX(kS,kI);kH.push(kP)}}}return kH}function kw(kH){}function e(kL,kI){var kK=[];for(var kH=0;kH<kL.length;kH+=2){var kJ=[kL[kH],kL[kH+1]];if(kI.reference&&kI.reference!=="BD09LL"){kJ=gcoord.transform(kJ,kI.reference||"WGS84",gcoord.BD09LL)}kK.push(kJ[0]);kK.push(kJ[1])}return kK}function kx(kH){var kI=[Infinity,Infinity,-Infinity,-Infinity];ky(kH,function(kJ){if(kI[0]>kJ[0]){kI[0]=kJ[0]}if(kI[1]>kJ[1]){kI[1]=kJ[1]}if(kI[2]<kJ[0]){kI[2]=kJ[0]}if(kI[3]<kJ[1]){kI[3]=kJ[1]}});return kI}function ky(kQ,kV){var kM,kJ,kI,kP,kH,kS,kU,kT,kL,kO,kK=(kQ.type&&kQ.type.toLowerCase()==="featurecollection"),kN=(kQ.type&&kQ.type.toLowerCase()==="feature"),kR=kK?kQ.features.length:1;for(kM=0;kM<kR;kM++){kL=(kK?kQ.features[kM]["geometry"]:(kN?kQ.geometry:kQ));kO=kL.type==="GeometryCollection";kU=kO?kL.geometries.length:1;for(kP=0;kP<kU;kP++){kS=kO?kL.geometries[kP]:kL;kT=kS.coordinates;if(kS.type==="Point"){kV(kT)}else{if(kS.type==="LineString"||kS.type==="MultiPoint"){for(kJ=0;kJ<kT.length;kJ++){kV(kT[kJ])}}else{if(kS.type==="Polygon"||kS.type==="MultiLineString"){for(kJ=0;kJ<kT.length;kJ++){for(kI=0;kI<kT[kJ].length;kI++){kV(kT[kJ][kI])}}}else{if(kS.type==="MultiPolygon"){for(kJ=0;kJ<kT.length;kJ++){for(kI=0;kI<kT[kJ].length;kI++){for(kH=0;kH<kT[kJ][kI].length;kH++){kV(kT[kJ][kI][kH])}}}}else{throw new Error("类型错误")}}}}}}}function i(kQ,kV){var kM,kJ,kI,kP,kH,kS,kU,kT,kL,kO,kK=kQ.type==="FeatureCollection",kN=kQ.type==="Feature",kR=kK?kQ.features.length:1;for(kM=0;kM<kR;kM++){kL=(kK?kQ.features[kM]["geometry"]:(kN?kQ.geometry:kQ));kO=kL.type==="GeometryCollection";kU=kO?kL.geometries.length:1;for(kP=0;kP<kU;kP++){kS=kO?kL.geometries[kP]:kL;kT=kS.coordinates;if(kS.type==="Point"){kT=kV(kT)}else{if(kS.type==="LineString"||kS.type==="MultiPoint"){for(kJ=0;kJ<kT.length;kJ++){kT[kJ]=kV(kT[kJ])}}else{if(kS.type==="Polygon"||kS.type==="MultiLineString"){for(kJ=0;kJ<kT.length;kJ++){for(kI=0;kI<kT[kJ].length;kI++){kT[kJ][kI]=kV(kT[kJ][kI])}}}else{if(kS.type==="MultiPolygon"){for(kJ=0;kJ<kT.length;kJ++){for(kI=0;kI<kT[kJ].length;kI++){for(kH=0;kH<kT[kJ][kI].length;kH++){kT[kJ][kI][kH]=kV(kT[kJ][kI][kH])}}}}else{throw new Error("类型错误")}}}}}}}function kD(kI){var kH=kI.type==="FeatureCollection";var kJ=kI.type==="Feature";var kK=(kH?kI.features[0]["geometry"]:(kJ?kI.geometry:kI));if(kK.type){return kK.type}else{throw new Error("类型错误")}}kC.bbox=kx;kC.coordEachReplace=i;kC.getType=kD;return kC})();const c5={point:{symbolPath:{format:"string",defaultValue:""},symbolFillColor:{format:"string",defaultValue:"#000"},symbolFillOpacity:{format:"number",defaultValue:1},symbolScale:{format:"number",defaultValue:1},symbolRotation:{format:"number",defaultValue:0},symbolStrokeColor:{format:"string",defaultValue:"#000"},symbolStrokeOpacity:{format:"number",defaultValue:0},symbolStrokeWeight:{format:"number",defaultValue:0},icon:{format:"string",defaultValue:""},iconSize:{format:"array",defaultValue:[32,32]},uid:{format:"string",defaultValue:"custom-vector-0"},name:{format:"string",defaultValue:""},fontSize:{format:"number",defaultValue:22},color:{format:"string",defaultValue:"#0d20c9"},haloSize:{format:"number",defaultValue:2},strokeColor:{format:"string",defaultValue:"#fff"},textOnIcon:{format:"string",defaultValue:false},textOnIconSize:{format:"array",defaultValue:[32,32]},textOnIconUrl:{format:"string",defaultValue:""},textMargin:{format:"number",defaultValue:0},direction:{format:"number",defaultValue:0},rank:{format:"number",defaultValue:50000},visibility:{format:"boolean",defaultValue:true},nodeType:{format:"number",defaultValue:0},shapeType:{format:"number",defaultValue:0},anchor:{format:"number",defaultValue:0},size:{format:"number",defaultValue:32},scale:{format:"number",defaultValue:1},offset:{format:"object",defaultValue:[0,0]},rotation:{format:"number",defaultValue:0},opacity:{format:"number",defaultValue:1},strokeWeight:{format:"number",defaultValue:0}},polyline:{strokeLineJoin:{format:"string",defaultValue:"miter"},strokeLineCap:{format:"string",defaultValue:"round"},strokeColor:{format:"string",defaultValue:"#142655"},strokeWeight:{format:"number",defaultValue:2},strokeOpacity:{format:"number",defaultValue:1},borderColor:{format:"string",defaultValue:"rgba(27, 142, 236, 1)"},borderWeight:{format:"number",defaultValue:0},strokeTextureUrl:{format:"string",defaultValue:""},strokeTextureWidth:{format:"number",defaultValue:16},strokeTextureHeight:{format:"number",defaultValue:16},strokeStyle:{format:"string",defaultValue:"solid"},dashArray:{format:"object",defaultValue:[8,4]},shapeType:{format:"number",defaultValue:0},visibility:{format:"boolean",defaultValue:true}},polygon:{fillColor:{format:"string",defaultValue:"#142655"},fillOpacity:{format:"number",defaultValue:1},patternMapping:{format:"string",defaultValue:"0, 0, 32, 32"},patternScale:{format:"number",defaultValue:1},patternOffset:{format:"string",defaultValue:"0, 0"},strokeWeight:{format:"number",defaultValue:0},strokeLineJoin:{format:"string",defaultValue:"bevel"},strokeLineCap:{format:"string",defaultValue:"round"},strokeColor:{format:"string",defaultValue:"#dec41b"},strokeOpacity:{format:"number",defaultValue:1},strokeStyle:{format:"string",defaultValue:"solid"},dashArray:{format:"object",defaultValue:[8,4]},visibility:{format:"boolean",defaultValue:true}}};const cy=(function(i){var e={};for(var kv in i){e[kv]={};for(var T in i[kv]){e[kv][T]=i[kv][T].defaultValue}}return e})(c5);const fZ={POINT:"Point",LINE_STRING:"LineString",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",CIRCLE:"Circle",};function fP(e){return e&&typeof ArrayBuffer!=="undefined"&&(e instanceof ArrayBuffer||(e.constructor&&e.constructor.name==="ArrayBuffer"))}function gu(e){if(self){if(self.ImageBitmap&&e instanceof self.ImageBitmap){return true}}else{if(window&&window.ImageBitmap){if(e instanceof window.ImageBitmap){return true}}}return false}const jl={};function aH(i,kv,T){var e=T||{};Object.defineProperty(i,"_classRegistryKey",{value:kv,writeable:false});jl[kv]={_class:i,escape:e.escape||[]}}aH(Object,"Object");aH(cD,"Point");function jK(kA,ky){if(kA===null||kA===undefined||typeof kA==="boolean"||typeof kA==="number"||typeof kA==="string"||kA instanceof Boolean||kA instanceof Number||kA instanceof String||kA instanceof Date||kA instanceof RegExp){return kA}if(fP(kA)){if(ky){ky.push(kA)}return kA}if(gu(kA)){if(ky){var kD=ky.filter(function(i){if(i===kA){return true}else{return false}});!kD&&ky.push(kA)}return kA}if(ArrayBuffer.isView(kA)){const kz=kA;if(ky){ky.push(kz.buffer)}return kz}if(kA instanceof ImageData){if(ky){var kD=ky.filter(function(i){if(i===kA.data.buffer){return true}else{return false}});!kD&&ky.push(kA.data.buffer)}return kA}if(Array.isArray(kA)){const T=[];for(var kv=0;kv<kA.length;kv++){var kE=kA[kv];T.push(jK(kE,ky))}return T}if(typeof kA==="object"){const kw=kA.constructor;const e=kw._classRegistryKey;if(!e){throw new Error("不能被序列化")}const kx=kw.serialize?kw.serialize(kA,ky):{};if(!kw.serialize){for(var kC in kA){if(!kA.hasOwnProperty(kC)){continue}if(jl[e]["escape"].indexOf(kC)>=0){continue}const kB=kA[kC];kx[kC]=jK(kB,ky)}if(kA instanceof Error){kx.message=kA.message}}if(e!=="Object"){kx["_$name"]=e}return kx}else{if(kA instanceof Function){return null}}throw new Error("不能被序列化")}function ir(kx){if(kx===null||kx===undefined||typeof kx==="boolean"||typeof kx==="number"||typeof kx==="string"||kx instanceof Boolean||kx instanceof Number||kx instanceof String||kx instanceof Date||kx instanceof RegExp||fP(kx)||gu(kx)||ArrayBuffer.isView(kx)||kx instanceof ImageData){return kx}if(Array.isArray(kx)){var e=kx["_$name"];if(e){var kv=jl[e]["_class"];if(!kv){throw new Error("不能被反序列化")}if(kv.deserialize){return kv.deserialize(kx)}}const kw=[];for(var T=0;T<kx.length;T++){var kA=kx[T];kw.push(ir(kA))}return kw}if(typeof kx==="object"){var e=kx["_$name"]||"Object";var kv=jl[e]["_class"];if(!kv){throw new Error("不能被反序列化")}if(kv.deserialize){return kv.deserialize(kx)}const kC=Object.create(kv.prototype);const kB=Object.keys(kx);for(var T=0;T<kB.length;T++){const kz=kB[T];if(kz==="_$name"){continue}const ky=kx[kz];kC[kz]=ir(ky)}return kC}throw new Error("不能被反序列化")}function k(kz,kx,ky){if(!kz.length){return ky(null,[])}var kw=kz.length;const kv=new Array(kz.length);var e=null;for(var T=0;T<kz.length;T++){kx(kz[T],function(kA,i){if(kA){e=kA}kv[T]=i;if(--kw===0){ky(e,kv)}},T)}}function gi(kA,kx,kz){if(!kA.length){return kz(null,[])}var kw=kA.length;const kv=new Array(kA.length);var e=null;var T=0;function ky(){kx(kA[T],function(kB,i){if(kB){e=kB}kv[T]=i;if(--kw===0){kz(e,kv)}else{T++;ky()}},T)}ky()}var jW=(function(){var i=true;var kw=256;var e=true;var ky=j6("ditu","normalTraffic");var kv=ky.udt;var kz="//its.map.baidu.com/traffic/";var kx=[[2,"79,210,125,1",3,2,0,[],0,0],[2,"79,210,125,1",3,2,0,[],0,0],[2,"79,210,125,1",4,2,0,[],0,0],[2,"79,210,125,1",5,2,0,[],0,0],[2,"79,210,125,1",6,2,0,[],0,0],[2,"255,208,69,1",3,2,0,[],0,0],[2,"255,208,69,1",3,2,0,[],0,0],[2,"255,208,69,1",4,2,0,[],0,0],[2,"255,208,69,1",5,2,0,[],0,0],[2,"255,208,69,1",6,2,0,[],0,0],[2,"232,14,14,1",3,2,0,[],0,0],[2,"232,14,14,1",3,2,0,[],0,0],[2,"232,14,14,1",4,2,0,[],0,0],[2,"232,14,14,1",5,2,0,[],0,0],[2,"232,14,14,1",6,2,0,[],0,0],[2,"181,0,0,1",3,2,0,[],0,0],[2,"181,0,0,1",3,2,0,[],0,0],[2,"181,0,0,1",4,2,0,[],0,0],[2,"181,0,0,1",5,2,0,[],0,0],[2,"181,0,0,1",6,2,0,[],0,0],[2,"255,255,255,1",4,0,0,[],0,0],[2,"255,255,255,1",5.5,0,0,[],0,0],[2,"255,255,255,1",7,0,0,[],0,0],[2,"255,255,255,1",8.5,0,0,[],0,0],[2,"255,255,255,1",10,0,0,[],0,0]];var T=new hK({transparentPng:true,dataType:2,cacheSize:256,clipTile:true,isFlat:true});T.zIndex=2;T.getTilesUrl=function(kC,kD){if(!kC||kD<7){return null}var kB=kC.x;var kE=kC.y;var kA=kz+"TrafficTileService?level="+kD+"&x="+kB+"&y="+kE+"&time="+(+new Date());if(this.map.getRenderType()==="webgl"){kA=kz+"?qt=vtraffic&z="+kD+"&x="+kB+"&y="+kE+"&udt="+kv}return kA};T.setColors=function(kA){for(var kD=0;kD<kx.length;kD++){var kC=Math.floor(kD/5);var kB=kA[kC];if(kB){if(Object.prototype.toString.call(kB)==="[object String]"){kB=hR.parseCSSColor(kB)}kx[kD][1]=[kB[0],kB[1],kB[2],kB[3]/255].join(",")}}};T.setEdge=function(kA){e=!!kA};T.processData=function(kD){var kH=kD.content;var kF=10;if(typeof kD.precision==="number"){kF=kD.precision*10}var kO={road:[[],[]]};if(!kH){return kO}var kM=kH.tf;if(!kM){return kO}for(var kE=0;kE<kM.length;kE++){var kN=kM[kE][1];var kL=[];var kJ=0;var kI=0;var kK=kx[kM[kE][3]];for(var kC=0,kA=kN.length;kC<kA/2;kC++){kJ+=kN[kC*2]/kF;kI+=kN[kC*2+1]/kF;kL.push(kJ,256-kI)}var kB=kK[1].split(",");kB[3]=kB[3]*255;var kG=kK[2]/2;if(e){kO.road[0].push([kL,1,2,[255,255,255,255],kG+2])}kO.road[1].push([kL,1,2,kB,kG])}return kO};return T})();function jy(){hL.sendMessage(aZ(4,3,3),["layer","traffic"])}jy.prototype=jW;function d7(e){eJ.call(this);e=e||{};this._opts={};this._opts.districts=e.name||"";this._opts.kind=e.kind||0;this._config={};this._config.strokeColor=e.strokeColor||"#00f";this._config.strokeOpacity=typeof e.strokeOpacity==="number"?e.strokeOpacity:1;ch(this._config.strokeOpacity,0,1);this._config.fillColor=e.fillColor||"#ff0";this._config.fillOpacity=typeof e.fillOpacity==="number"?e.fillOpacity:0.6;ch(this._config.fillOpacity,0,1);this._config.strokeWeight=e.strokeWeight||1;this._config.viewport=e.viewport||false;this.disOverlays=[];this.eventAndCallback={};hL.sendMessage(aZ(4,3,6),["layer","district"]);var i=this;hh.load("layer",function(){i._asyncSearch()})}d7.inherits(de,"DistrictLayer");e6.extend(d7.prototype,{initialize:function(e){this._map=e;this.addDistrict()},removeDistrict:function(i,e){this._map=i;this.deleteDistrict(e)},toString:function(){return"DistrictLayer"}});function aO(e,i){i=i||{};this.layerName=e||"unknown";this.reference=i.reference;this.level=i.level||-99;this.visible=(i.visible===undefined?true:!!i.visible);this.minZoom=i.minZoom||3;this.maxZoom=i.maxZoom||21;this.markerStyle=i.markerStyle||{};this.polylineStyle=i.polylineStyle||{};this.polygonStyle=i.polygonStyle||{};this.overlayData=[];this._onMap=false;this.clickDistrict=5;this.setData(i.dataSource);hL.sendMessage(aZ(4,3,12),["layer","geojson"])}aO.inherits(e6.BaseClass,"GeoJSONLayer");aO.prototype.init=function(ky){if(this.map){return}this.map=ky;var kw=this;this._onZoomEvent=function(){if(kw.map.getZoom()>=kw.minZoom&&kw.map.getZoom()<=kw.maxZoom){if(!kw._onMap){kw.addDataToMap();kw._onMap=true}}else{if(kw._onMap){kw.removeDataFromMap();kw._onMap=false}}};this.map.on("zoomend",this._onZoomEvent);var kw=this;var e=false;var kv={x:0,y:0};this._layerMouseEvent=function(kB){if(!kw.map||!kw._listeners||!kw.visible||!kw._onMap){return}if(!kw._listeners.onmousemove||Object.keys(kw._listeners.onmousemove).length===0){return}var kA=kw.pickOverlays(kB);var i;if(kA&&kA.length>0){i=new fS("onmousemove");i.features=kA;kw.map.platform.style.cursor=kw.map.config.overlayMoveCursor;e=true}else{if(!e||!kw._listeners.onmouseout||Object.keys(kw._listeners.onmouseout).length===0){return}kw.map.platform.style.cursor=kw.map.config.defaultCursor;i=new fS("onmouseout");i.features=null;e=false}if(i){i.point=kB.point;i.pixel=kB.pixel;i.latLng=kB.latlng;kw.dispatchEvent(i)}};this._layerClickEvent=function(kC){if(!kw.map||!kw._listeners||!kw.visible){return}if((!kw._listeners.onclick&&!kw._listeners.dblclick)||(Object.keys(kw._listeners.onclick).length===0&&Object.keys(kw._listeners.dblclick).length===0)){return}var kA={x:kC.clientX,y:kC.clientY};if(Math.abs(kA.x-kv.x)>kw.clickDistrict||Math.abs(kA.y-kv.y)>kw.clickDistrict){return}var kB=kw.pickOverlays(kC);var i=new fS(kC.type);i.point=kC.point;i.pixel=kC.pixel;i.latLng=kC.latlng;i.features=kB;kw.dispatchEvent(i)};this._layerMouseDownEvent=function(i){kv={x:i.clientX,y:i.clientY}};ky.addEventListener("onmousemove",this._layerMouseEvent);ky.addEventListener("onmouseout",this._layerMouseEvent);ky.addEventListener("onmousedown",this._layerMouseDownEvent);var kx=["onclick"];for(var T=0;T<kx.length;T++){var kz=kx[T];ky.addEventListener(kz,this._layerClickEvent)}this._onZoomEvent()};aO.prototype.remove=function(){if(this.map){this.removeDataFromMap();this.map.removeEventListener("onmousemove",this._layerMouseEvent);this.map.removeEventListener("onmouseout",this._layerMouseEvent);this.map.removeEventListener("onclick",this._layerClickEvent);this.map.removeEventListener("onmousedown",this._layerMouseDownEvent);this.map.removeEventListener("onzoomend",this._onZoomEvent)}this.map=null};aO.prototype.destroy=function(){if(this.map){this.clearData();this.map.removeEventListener("onmousemove",this._layerMouseEvent);this.map.removeEventListener("onmouseout",this._layerMouseEvent);this.map.removeEventListener("onclick",this._layerClickEvent);this.map.removeEventListener("onmousedown",this._layerMouseDownEvent);this.map.removeEventListener("onzoomend",this._onZoomEvent)}this.map=null};aO.prototype.setData=function(e){if(!this.gParse){this.gParse=new gJ({reference:this.reference})}if(!e){return}if(this.dataSource&&this.overlayData.length>0){this.clearData()}this.dataSource=e;this.overlayData=this.gParse.readFeaturesFromObject(e,{markerStyle:this.markerStyle,polylineStyle:this.polylineStyle,polygonStyle:this.polygonStyle},this._register.bind(this))};aO.prototype._register=function(e){e.layerName=this.layerName;e.setZIndex(this.level)};aO.prototype.resetStyle=function(){for(var e=0;e<this.overlayData.length;e++){if(this.overlayData[e] instanceof s){var i=this.markerStyle;if(this.markerStyle instanceof Function){i=this.markerStyle(this.overlayData[e].properties)||{}}}if(this.overlayData[e] instanceof br){var i=this.polylineStyle;if(this.polylineStyle instanceof Function){i=this.polylineStyle(this.overlayData[e].properties)||{}}}if(this.overlayData[e] instanceof iX){var i=this.polygonStyle;if(this.polygonStyle instanceof Function){i=this.polygonStyle(this.overlayData[e].properties)||{}}}if(i){this.overlayData[e].setOptions(i)}}};aO.prototype.getData=function(){return this.overlayData};aO.prototype.addOverlay=function(e){var ky=e;if(!(e instanceof Array)){ky=[e]}for(var kv=0;kv<ky.length;kv++){var T=ky[kv];if(T.__proto__ instanceof aS){this._register(T);this.overlayData.push(T);this.map.addOverlay(T)}else{var kx=this.gParse.readFeaturesFromObject(T,{markerStyle:this.markerStyle,polylineStyle:this.polylineStyle,polygonStyle:this.polygonStyle},this._register.bind(this));for(var kw=0;kw<kx.length;kw++){this.overlayData.push(kx[kw]);this.map.addOverlay(kx[kw])}}}};aO.prototype.removeOverlay=function(kv){var kw=kv;if(!(kv instanceof Array)){kw=[kv]}for(var T=0;T<kw.length;T++){var i=kw[T];var e=this.findItemIndex(i);if(e>=0){this.overlayData.splice(e,1);this.map.removeOverlay(i)}}};aO.prototype.findItemIndex=function(T){var i=-1;for(var e=0;e<this.overlayData.length;e++){if(this.overlayData[e].hashCode===T.hashCode){i=e;break}}return i};aO.prototype.addDataToMap=function(){if(this.visible&&this.map&&this.map.getZoom()>=this.minZoom&&this.map.getZoom()<=this.maxZoom){for(var e=0;e<this.overlayData.length;e++){this.map.addOverlay(this.overlayData[e])}}};aO.prototype.removeDataFromMap=function(){if(this.map&&this.overlayData.length>0){for(var e=0;e<this.overlayData.length;e++){this.map.removeOverlay(this.overlayData[e])}}};aO.prototype.clearData=function(){this.dataSource=null;if(this.map&&this.overlayData.length>0){this.removeDataFromMap()}this.overlayData=[]};aO.prototype.pickOverlays=function(kz){var ky=[];if(!this.visible||!this._onMap){return null}for(var kw=0;kw<this.overlayData.length;kw++){var kx=this.overlayData[kw];var kv;if(!kx&&!kx.isVisible()){continue}if(kx.toString()==="Marker"){kv=kx._getInPnBox(kz.pixel);if(kv){ky.push(kx)}continue}if(kx.toString()!=="Polyline"){kv=kx._getInPnpoly(kz.point)}else{kv=kx._getProximity(kz.point)}var T=kv.dist;if(T>=0&&T<kx._config.mouseOverTolerance){ky.push(kx)}}return ky.length>0?ky:null};aO.prototype.setLevel=function(e){if(e>-999&&e<9999){this.level=e;for(var T=0;T<this.overlayData.length;T++){this.overlayData[T].setZIndex(this.level)}if(this.map){this.map.fire(new BMapGL.Event("onupdate","line"))}}};aO.prototype.setClickDistrict=function(e){this.clickDistrict=e||5};aO.prototype.getLevel=function(){return this.level};aO.prototype.setVisible=function(i){var e=!!i;if(this.visible!==e){this.visible=e;if(e){this.addDataToMap()}else{this.removeDataFromMap()}}};aO.prototype.getVisible=function(){return this.visible};aO.prototype.toString=function(){return"GeoJSONLayer"};function ki(i){var i=i||{};var kx=i.transform||{source:"EPSG3857",target:"BD09MC"};if(!kx.source){kx.target="EPSG3857"}if(!kx.target){kx.target="BD09MC"}const kv=i.tileUrlTemplate||"";const kB=i.xTemplate||function(kI,kK,kJ){return kI};const kF=i.yTemplate||(i.tms?function(kI,kK,kJ){return Math.pow(2,kJ)-kK-1}:function(kI,kK,kJ){return kK});const kz=i.zTemplate||function(kI,kK,kJ){return kJ};const kE=i.bTemplate||function(kI,kL,kK){const kJ=dI.getTileRangeExtent([kK,kI,kL]);return kJ.minX+","+kJ.minY+","+kJ.maxX+","+kJ.maxY};const kw=i.wTemplate||function(kI,kK,kJ){return 512};const kA=i.hTemplate||function(kI,kK,kJ){return 512};var kG=i.extent||[];const ky=i.extentCRSIsWGS84||false;var T=i.minZoom||0;var kC=i.maxZoom||23;var kD=i.spanLevel||0;if(!i.showRegion||"insideoutside".indexOf(i.showRegion)===-1){i.showRegion="inside"}var kH=new hK({transform:kx,png8:i.png8||false,retry:i.retry||false,retryTime:i.retryTime||600,transparentPng:true,dataType:i.dataType||1,spanLevel:kD,tileTypeName:"xyz",cacheSize:256,customLayer:true,clipTile:false,boundary:i.boundary||false,showRegion:i.showRegion,useThumbData:i.useThumbData||false});if(i.zIndex){kH.zIndex=i.zIndex}(kG.length===4)&&ky&&(kG=dI.fromEPSG4326(kG));kH.getTilesUrl=function(kJ,kP,kN){if(!kJ||kP<0||kP<(T+kD)||kP>(kC+kD)){kH.tileCache.clear();return null}if(kx.source!=="BD09MC"){kJ.x=dI.getTilesLoop(kP,kJ.x)}if(kG.length===4){var kO=dI.getTileRangeExtent([kP,kJ.x,kJ.y]);var kM=e([kO.minX,kO.minY,kO.maxX,kO.maxY]);if(!kM){return null}}var kK="";if(kv){kK=kv;var kL=/[^\{}]*\{(.*)\}[^\}]*/;kK.match(kL);var kI=[];if(RegExp.$1){kI=RegExp.$1.split(",")}kK=kK.replace(/\{(.*)\}/,kI[(kJ.x+kJ.y)%kI.length]);kK=kK.replace(/\[x\]/gi,kB(kJ.x,kJ.y,kP));kK=kK.replace(/\[y\]/gi,kF(kJ.x,kJ.y,kP));kK=kK.replace(/\[z\]/gi,kz(kJ.x,kJ.y,kP));kK=kK.replace(/\[b\]/gi,kE(kJ.x,kJ.y,kP));kK=kK.replace(/\[w\]/gi,kw(kJ.x,kJ.y,kP));kK=kK.replace(/\[h\]/gi,kA(kJ.x,kJ.y,kP))}else{return null}return kK};function e(kI){if(kG&&kG instanceof Array&&kG.length===4){if((kG[0]<=kI[2]&&kG[1]<=kI[3])&&(kG[2]>=kI[0]&&kG[3]>=kI[1])){return true}else{return false}}return true}hL.sendMessage(aZ(4,3,7),["layer","xyz"]);return kH}function dy(i){this.src=c9();this.tileMaskUvCache=new aA(64,{clearCallback:function(kx){}});var kw=6;if(i.pixelMap){this.opacity=typeof i.pixelMap.opacity==="number"?i.pixelMap.opacity:1;ch(this.opacity,0,1);if(this.opacity<1){i.useThumbData=false}var kv=i.pixelMap||{};this.colors=kv.colors||["#F9F871","#FFC75F","#FF9671","#FF6F91","#D65DB1","#845EC2"];this.positions=kv.positions||[0,0.2,0.4,0.6,0.8,1];this.domain=kv.domain||[0,255];this.clamp=kv.clamp||this.domain;this.noData=(kv.noData!==undefined)?kv.noData:-99999;this.fomularC=kv.fomularC||"float generateValue(vec4 pixel){return pixel.r * 255.;}";this.fomularJS=kv.fomularJS||function(kx){return kx.r};this.maskPng=kv.maskPng||null;if(this.maskPng){this.loadMaskPng(this.maskPng)}this.maskData=kv.maskData||-1;this.maskCoord=kv.maskCoord||null;this.fHashcode=o({str:this.fomularC});var e=this.canPixelMap();if(e){this.isPixelMap=true;this.setPixelMap()}kw=i.pixelMap.cacheSize||kw}var T=new ki(i);T.ontology=this;this.layer=T;this.cacheSize=kw;this.tileCache=new aA(this.cacheSize,{clearCallback:function(kx){}});this.tileImageDataCache=new aA(this.cacheSize,{clearCallback:function(kx){}});hL.sendMessage(aZ(4,3,16),["layer","pixel"])}dy.inherits(e6.BaseClass,"PixelLayer");e6.extend(dy.prototype,{canPixelMap:function(){if(this.colors&&this.positions){return true}return false},setPixelMap:function(){if(!this.isPixelMap||!this.canPixelMap()){return}var i=this.colors;var e=this.positions;this.pHashcode=o({colors:i,positions:e});this.pixelColorMap=hR.generateColorRamp(i,e)},setDomain:function(e){if(e instanceof Array&&e.length===2){this.domain=e;this.doOnceDraw()}},setClamp:function(e){if(e instanceof Array&&e.length===2){this.clamp=e;this.doOnceDraw()}},setNoData:function(e){this.noData=e;this.doOnceDraw()},setPositions:function(e){this.positions=e;this.setPixelMap();this.doOnceDraw()},setColors:function(e){this.colors=e;this.setPixelMap();this.doOnceDraw()},setFomular:function(e,i){if(e&&i){this.fomularJS=e;this.fomularC=i;this.fHashcode=o({str:this.fomularC});this.doOnceDraw()}},setOpacity:function(e){this.opacity=e;this.doOnceDraw()},setIsPixelMap:function(e){this.isPixelMap=e;this.doOnceDraw()},setMaskPng:function(e){this.maskPng=e;this.loadMaskPng(this.maskPng);this.doOnceDraw()},setMaskData:function(e){this.maskData=e;this.doOnceDraw()},setMaskCoord:function(e){this.maskCoord=e||null;this.calMaskBox();this.doOnceDraw()},setZIndex:function(e){if(this.layer&&parseInt(e)>0){this.layer.setZIndex(e)}},getZIndex:function(){if(this.layer){return this.layer.zIndex}},setUpLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("up");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},setDownLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("down");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},setZIndexTop:function(){if(this.layer){this.layer.setZIndexTop()}},doOnceDraw:function(){if(this.layer.map){var e=new fS("onupdate");this.layer.map.dispatchEvent(e)}},_getInLayer:function(kD){if(!this.map){return null}var kC=Math.floor(this.map.getZoom());var kv=dI.transformBDmcPoint(kD,this.layer.transform);var kz=dI.getTileCoordForXYAndZ_(kv[0],kv[1],kC,false);var T=kz.join("-");var e=this.tileCache.getData(T);if(e){return e}var kw=this.layer.zIndex;var ky=this.map._featureMgr.result.bkData;var kA=ky[kw][2];var kE=null;for(var kx=0;kx<kA.length;kx++){var kz=kA[kx];var kB=kz.tileInfo.zoom+"-"+kz.tileInfo.col+"-"+kz.tileInfo.row;if(T===kB){kE=kz;break}}this.tileCache.setData(T,kE);return kE},_initEvent:function(kw){this.map=kw;var T=this;this._layerMouseEvent=function(kA){if(!T.map){return}var ky;var i=kA.point;var kz=T._getInLayer(i);if(kz){T.prox=kz;ky=new fS("onmousemove");T.map.platform.style.cursor=T.map.config.overlayMoveCursor}else{T.map.platform.style.cursor=T.map.config.defaultCursor;T.prox=null}if(ky){ky.point=kA.point;ky.pixel=kA.pixel;ky.latLng=kA.latlng;T.dispatchEvent(ky)}};this._layerClickEvent=function(kA){if(!T.map){return}var ky;var i=kA.point;var kz=T.getImagePixel(i);if(kz){ky=new fS(kA.type);ky.point=i;ky.pixel=kA.pixel;ky.latLng=kA.latlng;ky.color=kz;ky.value=T.getValue(ky.color);T.dispatchEvent(ky)}};kw.addEventListener("onmousemove",this._layerMouseEvent);var kv=["onclick","dblclick"];for(var e=0;e<kv.length;e++){var kx=kv[e];kw.addEventListener(kx,this._layerClickEvent)}kw.addEventListener("removetilelayer",function(i){if(i.target&&i.target.ontology){if(i.target.ontology.src===T.src){kw.removeEventListener("onmousemove",T._layerMouseEvent);kw.removeEventListener("onclick",T._layerClickEvent);kw.removeEventListener("ondblclick",T._layerClickEvent);T._clearCache()}}});kw.on("destroy",function(){T._clearCache()})},_clearCache:function(){var e=this;e.prox=null;e.tileCache.clear();e.tileImageDataCache.clear();e.tileMaskUvCache.clear();e._layerMouseEvent=null;e._layerClickEvent=null;e.imageMaskObject=null;e.pHashcode=null;e.pixelColorMap=null;e.layer.ontology=null;e.layer=null},getImagePixel:function(kA){if(!this.map){return null}var kv=dI.transformBDmcPoint(kA,this.layer.transform);var kz=this._getInLayer(kA);if(!kz){return null}if(!this.getImageMaskPixel(kv)){return null}var kx=[kz.tileInfo.zoom,kz.tileInfo.col,kz.tileInfo.row];var ky=dI.getTileRangeExtent(kx);var e=this.getImageObject(kz.textureSource,kx.join("-"));var T=Math.floor((kv[0]-ky.minX)/(ky.maxX-ky.minX)*e.width);var i=Math.floor((-kv[1]+ky.maxY)/(ky.maxY-ky.minY)*e.height);var kw=Math.floor((i*e.width+T)*4);return[e.data.data[kw],e.data.data[kw+1],e.data.data[kw+2],e.data.data[kw+3],]},getImageObject:function(kw,kv){var kx=this.tileImageDataCache.getData(kv);if(kx){return kx}var i=document.createElement("canvas");i.width=kw.width;i.height=kw.height;var T=i.getContext("2d");T.drawImage(kw,0,0,kw.width,kw.height);var e={width:kw.width,height:kw.height,data:T.getImageData(0,0,kw.width,kw.height)};this.tileImageDataCache.setData(kv,e);T=null;i=null;return e},getValue:function(i){if(this.isPixelMap&&i&&this.fomularJS){if(!(i instanceof Array)){i=this.getImagePixel(i.point)}var e=this.fomularJS({r:i[0],g:i[1],b:i[2],a:i[3]});if(e>=this.clamp[0]&&e<=this.clamp[1]){return e}}return null},setMaskImageObject:function(T){var e=document.createElement("canvas");e.width=T.width;e.height=T.height;var i=e.getContext("2d");i.drawImage(T,0,0,T.width,T.height);this.imageMaskObject={width:T.width,height:T.height,data:i.getImageData(0,0,T.width,T.height)};i=null;e=null},getImageMaskPixel:function(e){if(!this.imageMaskObject||!this.maskBox){return true}var kv=[e];var kA=this.maskBox||[];var kx=kA[1][0]-kA[0][0];var kw=kA[1][1]-kA[0][1];var T=Math.floor((kv[0][0]-kA[0][0])/kx*this.imageMaskObject.width);var i=Math.floor((-kv[0][1]+kA[1][1])/kw*this.imageMaskObject.height);var kz=Math.floor((i*this.imageMaskObject.width+T)*4);if(T>this.imageMaskObject.width||T<0){return null}if(i>this.imageMaskObject.height||i<0){return null}var ky=this.imageMaskObject.data.data;if(kz+3>ky.length){return false}if(ky[kz+3]>0){if(this.maskData>-1&&this.maskData!==ky[kz]){return false}return true}return false},calMaskBox:function(){var T=this.maskCoord||[];if(this.hasMaskPng&&T&&T.length===2){var e=[];for(var kv=0;kv<T.length;kv++){e[kv]=dI.transformBDmcPoint(jr.convertLL2MC(T[kv]),this.layer.transform)}this.maskBox=e;this.tileMaskUvCache.clear()}else{this.maskBox=null}},buildFillMaskVertex:function(kB,kz,ky){var kA=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];if(!this.maskBox){return kA}var kD=[kB,kz,ky].join("-");var e=this.tileMaskUvCache.getData(kD);if(e){return e}if(this.hasMaskPng){var kG=this.maskBox||[];var kx=[ky,kB,kz];var kC=dI.getTileRangeExtent(kx);var kw=kG[1][0]-kG[0][0];var T=kG[1][1]-kG[0][1];var kF=(kC.minX-kG[0][0])/kw;var kE=(kC.minY-kG[0][1])/T;var kv=(kC.maxX-kG[0][0])/kw;var i=(kC.maxY-kG[0][1])/T;kA=[kF,kE,kv,kE,kv,i,kF,kE,kv,i,kF,i]}this.tileMaskUvCache.setData(kD,kA);return kA},loadMaskPng:function(T){var e=this;function i(kw,kv){e.maskTextureSource=kv?kw:null;if(kv){e.hasMaskPng=true;e.setMaskImageObject(kw);e.calMaskBox();e.doOnceDraw()}else{e.hasMaskPng=false}}this.imageLoad(T,i)},imageLoad:function(i,kw){if(!i){kw&&kw(null,false)}var e=new Image();e.crossOrigin="anonymous";e.onload=function kv(){kw&&kw(this,true)};e.onerror=function T(){kw&&kw(null,false)};e.src=i},toString:function(){return"PixelLayer"}});function js(i,e){this.id=i;this.layerName=e;this.properties=null}function eh(e){this._opt=e||{};this._layerId=c9();this._opt.defaultOrder=(this._opt.defaultOrder===undefined)?true:this._opt.defaultOrder;this.minZoom=this._opt.minZoom||3;this.maxZoom=this._opt.maxZoom||23;this.useThumb=(this._opt.useThumb===undefined)?true:this._opt.useThumb;this.gridModel=this._opt.gridModel||eh.GridModel.BAIDUWEB;this.noCollision=(this._opt.noCollision===undefined)?true:this._opt.noCollision;if(this.gridModel===eh.GridModel.BAIDUWEB){this._opt.reference="BD09MC"}else{if(!this._opt.transform){this._opt.transform={source:"BD09MC",target:"BD09MC"};this._opt.reference="BD09MC"}else{this._opt.reference=this._opt.transform.source||"GCJ02";if(this._opt.reference==="EPSG3857"){this._opt.reference="WGS84"}}}this.loadModule=false;if(this._opt.useWorker===undefined){this._opt.useWorker=true}this.upStyle=this._opt.useWorker?false:"useMain";this._stateCube={};hL.sendMessage(aZ(4,3,8),["layer","mvt"]);var i=this;hh.load("mvtParse",function(){i._async()},true);i.init(e)}eh.GridModel={BAIDUWEB:0,GOOGLEWEB:1};eh.LayerTypes={POINT:"point",LINE:"line",FILL:"fill"};eh.inherits(e6.BaseClass,"MVTLayer");e6.extend(eh.prototype,{_async:function(){this.loadModule=true;this.mvt=new eh.MVTParse(this._opt);this.resolveStyle(this._opt);if(this.upStyle){this.doOnceDraw()}},init:function(i){i.dataType=2;i.cacheSize=256;if(i.spanLevel===undefined||typeof i.spanLevel!=="number"){i.spanLevel=0}if(this.gridModel===eh.GridModel.BAIDUWEB){var e=this.createTileLayer(i);i.spanLevel=0;this.spanLevel=0}else{if(this.gridModel===eh.GridModel.GOOGLEWEB){var e=new ki(i);this.spanLevel=i.spanLevel}}var kv={type:"vector",layerId:this._layerId,g:this.gridModel,mc:this._opt.reference==="BD09MC"?true:false,};this.layerOption=Object.assign(kv,this._opt);if(i.index&&i.index>0){e.zIndex=i.index}e.loadTileData=this._loadTile.bind(this);e.ontology=this;this.layer=e;var T=this;e.addEventListener("ontilesloadstart",function(){T.dispatchEvent(new fS("ontilesloadstart"))});e.addEventListener("ontilesloadend",function(){T.dispatchEvent(new fS("ontilesloadend"))})},createTileLayer:function(i){const kv=i.tileUrlTemplate||"";const kA=i.xTemplate||function(kH,kJ,kI){return kH};const kF=i.yTemplate||function(kH,kJ,kI){return kJ};const ky=i.zTemplate||function(kH,kJ,kI){return kI};const kE=i.bTemplate||function(kH,kK,kJ){const kI=jr.tileToBoundRange({col:kH,row:kK,zoom:kJ,baseTileSize:256});return kI.MC.sw.lng+","+kI.MC.sw.lat+","+kI.MC.ne.lng+","+kI.MC.ne.lat};var kG=i.extent||[];const kz=i.extentCRSIsWGS84||false;var T=i.minZoom||0;var kC=i.maxZoom||23;var kD=i.spanLevel||0;var kB=new hK({transparentPng:true,dataType:2,spanLevel:kD,tileTypeName:"web",cacheSize:256,customLayer:true,clipTile:false,boundary:false,useThumbData:i.useThumbData||false});if(kG.length===4){if(kz){kG=dI.fromEPSG4326(kG)}var kw=dI.transformPointArr([kG[0],kG[1]],"EPSG3857","BD09MC");var kx=dI.transformPointArr([kG[2],kG[3]],"EPSG3857","BD09MC");kG=[kw[0],kw[1],kx[0],kx[1]]}kB.getTilesUrl=function(kI,kO,kN){if(!kI||kO<0||kO<(T+kD)||kO>(kC+kD)){kB.tileCache.clear();return null}if(kG.length===4){const kL=jr.tileToBoundRange({col:x,row:y,zoom:z,baseTileSize:256});var kM=e([kL.MC.getMin().lng,kL.MC.getMin().lat,kL.MC.getMax().lng,kL.MC.getMax().lat]);if(!kM){return null}}var kJ="";if(kv){kJ=kv;var kK=/[^\{}]*\{(.*)\}[^\}]*/;kJ.match(kK);var kH=[];if(RegExp.$1){kH=RegExp.$1.split(",")}kJ=kJ.replace(/\{(.*)\}/,kH[(kI.x+kI.y)%kH.length]);kJ=kJ.replace(/\[x\]/gi,kA(kI.x,kI.y,kO));kJ=kJ.replace(/\[y\]/gi,kF(kI.x,kI.y,kO));kJ=kJ.replace(/\[z\]/gi,ky(kI.x,kI.y,kO));kJ=kJ.replace(/\[b\]/gi,kE(kI.x,kI.y,kO))}else{return null}return kJ};function e(kH){if(kG&&kG instanceof Array&&kG.length===4){if((kG[0]<=kH[2]&&kG[1]<=kH[3])&&(kG[2]>=kH[0]&&kG[3]>=kH[1])){return true}else{return false}}return true}return kB},compileExpress:function(i,e){var i=eh.ExpressParse.normalizePropertyExpression(i,e);return i},resolveStyle:function(kx){var kv=kx||{};if(kv.style){var kw={};if(!kv.layers||kv.layers.length===0){var kz=eh.LayerTypes.POINT;var i=eh.LayerTypes.LINE;var ky=eh.LayerTypes.FILL;if(kv.style[kz]){kv.style[kz].type="point"}if(kv.style[i]){kv.style[i].type="polyline"}if(kv.style[ky]){kv.style[ky].type="polygon"}}for(var T in kv.style){if(kv.style.hasOwnProperty(T)){var e=kv.style[T];this._styleFormat(e.type,e.painter,T,kw)}}this.styleExpress=kw}},_styleFormat:function(kw,e,i,kv){var ky={};var kz=c5[kw];if(!kz){return}for(var T in e){if(e.hasOwnProperty(T)){var kx=this.compileExpress(e[T],kz[T]);ky[T]=kx}}kv[i]={type:kw,painter:ky}},evaluateContext:function(e,T,kv){var i=e+"_"+T.getId();var kw=this._stateCube[i];if(kw){T.setState(kw)}else{T._state={}}return{properties:function(){return T&&T.getProperties()},featureState:kv===true?{}:(T&&T.getState())}},evaluates:function(i,kv,kw){if(!this.styleExpress||!this.styleExpress.hasOwnProperty(i)){return null}var ky=this.styleExpress[i].painter;var e={};for(var T in ky){if(ky.hasOwnProperty(T)){var kx=ky[T].evaluate(this.evaluateContext(i,kv,kw));e[T]=kx}}return e},_updateState:function(T,kv,e){if(T instanceof js&&T.layerName&&T.id){var i=T.layerName+"_"+T.id;if(e){this._set(kv,this._stateCube,i)}else{this._stateCube[i]=kv}this._stateCube[i].rank=(this._stateCube[i].rank||0)+1}else{if(typeof T==="string"){if(e){this._set(kv,this._stateCube,T)}else{this._stateCube[T]=kv}this._stateCube[T].rank=(this._stateCube[T].rank||0)+1}}},updateState:function(kw,kx,e){var T=JSON.stringify(this._stateCube);if(!(kx&&typeof kx==="object"&&Object.keys(kx).length>0)){return}if(!e){this._stateCube={}}if(kw instanceof Array){for(var kv=0;kv<kw.length;kv++){this._updateState(kw[kv],kx,e)}}else{this._updateState(kw,kx,e)}var ky=JSON.stringify(this._stateCube);if(T!==ky){this.doOnceDraw()}},replaceAllState:function(e){var i=JSON.stringify(this._stateCube);this._stateCube=e;var T=JSON.stringify(this._stateCube);if(i!==T){this.doOnceDraw()}},getAllState:function(){return this._stateCube},getStateByLayerName:function(){},removeState:function(kv){var e=JSON.stringify(this._stateCube);if(kv instanceof Array){for(var T=0;T<kv.length;T++){if(kv[T] instanceof js&&kv[T].layerName){delete this._stateCube[kv[T].layerName+"_"+kv[T].id]}else{if(typeof kv[T]==="string"){delete this._stateCube[kv[T]]}}}}else{if(kv instanceof js&&kv.layerName){delete this._stateCube[kv.layerName+"_"+kv.id]}else{if(typeof kv==="string"){delete this._stateCube[kv]}}}var kw=JSON.stringify(this._stateCube);if(e!==kw){this.doOnceDraw()}},clearState:function(){var e=JSON.stringify(this._stateCube);if(e!=="{}"){this._stateCube={};this.doOnceDraw()}},_set:function(i,kw,T){var kv=kw[T]||(kw[T]={});for(var e in i){kv[e]=i[e]}},doOnceDraw:function(){if(this.map){var e=new fS("onupdate");this.map.dispatchEvent(e)}},_releaseOutViewTileData:function(e){if(!this.map||!this.map.dispatcher){return}var i=this;e.layerId=this._layerId;this.map.dispatcher.broadcast("release",e,function(kx,T){for(var kw=0;kw<T.length;kw++){for(var kv=0;kv<T[kw].length;kv++){i.layer.tileCache.removeData(T[kw][kv].tileKey);i.layer._checkLayerTilesLoaded()}}})},_loadTile:function(kx,T){this.curViewTilesInfo=kx;if(!this.loadModule||!this.upStyle){return}var kI=this.layer.map;this._releaseOutViewTileData(kx);var ky=kI.getZoom();if(ky<this.minZoom||ky>this.maxZoom){kI._featureMgr.clearData(this.layer.drawIndex);kI._featureMgr.clearLabelOverlayData(this.layer.drawIndex);kI._featureMgr.clearLabelData(this.layer.drawIndex);return}var kz=this.layer.getZoomState();if(T){this.thumbCache={};var kG=-1;this.layer.tileLabels=[];var kC=kI._customLabelMgr.virtualTiles["mvt_"+this.layer.drawIndex];if(kC&&kC.label){this.layer.tileLabels.push(kC.label)}for(var kE=0,kD=kx.length;kE<kD;kE++){var kF=kx[kE];var kv=this.layer.getTileKey(kF);var kH=this.layer.tileCache.getData(kv);kG=kF.zoom;if(this.useThumb){this._setThumbData(kH,kF,kz)}else{if(kH&&kH.status==="ready"){kI._featureMgr.setData(kH,this.layer.drawIndex,2);this._loadCacheLabel(kF,kH)}}}this.layer.tileLabels.labelZoom=kG;this.layer.updateLabels(kz);if(!this.noCollision){var kw=Math.floor(ky);var kB=ky-kw;var kA=Math.floor(this.layer.LAST_CALC_ZOOM);var e=this.layer.LAST_CALC_ZOOM-kA;var kK=false;if(this.layer.hasZoomChange){if(Math.abs(ky-this.layer.LAST_CALC_ZOOM)>=0.5){kK=true}else{if(kB<0.5&&e>=0.5){kK=true}else{if(kB>=0.5&&e<0.5){kK=true}}}if(kK){this.layer.cacheDataCollideLabels(0)}this.layer.LAST_CALC_ZOOM=ky}else{if(this.layer.tileLabels.length>0){this.layer.cacheDataCollideLabels(e6.Browser.ie?50:30)}}}else{this.layer.cacheDataCollideLabels(0)}return}for(var kE=0,kD=kx.length;kE<kD;kE++){var kF=kx[kE];var kv=this.layer.getTileKey(kF);var kH=this.layer.tileCache.getData(kv);if(!kH){kH={status:"init",retry:0};this.layer.numTileLoading++}if(kH.status!=="ignore"&&kH.status!=="ready"&&kH.status!=="loading"){kH.status="loading";this.layer.tileCache.setData(kv,kH);if(this.upStyle==="useMain"){var kJ=this;this._loadTileData(kF,function(kL,kM,i){kJ._tileDataCbk(kL,kM,i)})}else{if(this.upStyle){this._loadTileDataByWorker(kF)}}}}},_loadCacheLabel:function(T,i){var kw=i.tileData.hasChangeLabel();if(kw){i.label.status="init"}if(i.label.status==="ready"){i.label.tileInfo=i.tileInfo;this.layer.tileLabels.push(i.label);if(i.label.textureSources&&i.label.textureSources[T.zoom]&&this.map._webglMapScene){var kv=this.map._webglMapScene._painter;var e=i.label.imgKey;if(!kv._labelTextureAtlasOffset[e]){kv._addToAsyncJob(i.label.textureSources[T.zoom])}}}else{if(i.label.status!=="processing"){this._processLabelData(i)}}},getLayerVisible:function(i){var T=this._opt.style;if(!T||!T[i]){return true}else{if(T[i].visible===false){return false}else{var kw=this._opt.style[i].minZoom||3;var e=this._opt.style[i].maxZoom||23;var kv=this.map.getZoom();if(kv<kw||kv>e){return false}return true}}},_setThumbData:function(i,e,T){if(T===1){this._dataFitGrid(i,e,3)}else{if(T===-1){if(i&&i.status==="ready"){this.map._featureMgr.setData(i,this.layer.drawIndex,2);this._loadCacheLabel(e,i)}else{this._findChildZoomTile(e,3)}}}},_findParent:function(kv,ky){var T=this.minZoom;var e=kv.col;var kB=kv.row;var kA=kv.zoom;for(var kz=1;kz<=ky;kz++){var kw=this._getParentTiles(e,kB,kA,T);if(kw===null){continue}kw.tileSize=kv.tileSize;kw.tileTypeName=kv.tileTypeName;kw.transform=kv.transform;var kC=this.layer.getTileKey(kw);var kx=this.layer.tileCache.getData(kC);if(kx&&kx.status==="ready"){kx.key=kC;return kx}e=kw.col;kB=kw.row;kA=kw.zoom}return false},_findChild:function(i,ky){var kA=this.maxZoom;var e=i.col;var kB=i.row;var kz=i.zoom;var kw=this._getChildTiles(e,kB,kz,kA,ky);if(!kw){return false}for(var kv=0;kv<kw.length;kv++){var T=this.layer.getTileKey(kw[kv]);var kx=this.layer.tileCache.getData(T);if(this.curViewTilesInfo["id_"+kw[kv].col+"_"+kw[kv].row+"_"+kw[kv].zoom]&&(!kx||kx.status!=="ready")){return false}}return true},_dataFitGrid:function(T,i,kv){var e=this._findParent(i,kv);if(e){if(this.thumbCache[e.key]){this.map._featureMgr.setData(T,this.layer.drawIndex,2);this._loadCacheLabel(i,T)}else{if(this.thumbCache[e.key]===undefined){if(this._findChild(e.tileInfo,i.zoom-e.tileInfo.zoom)){this.thumbCache[e.key]=true;this.map._featureMgr.setData(T,this.layer.drawIndex,2);this._loadCacheLabel(i,T)}else{this.thumbCache[e.key]=false;this.layer.map._featureMgr.setData(e,this.layer.drawIndex,0);this._loadCacheLabel(e.tileInfo,e)}}}}else{if(T&&T.status==="ready"){this.map._featureMgr.setData(T,this.layer.drawIndex,2);this._loadCacheLabel(i,T)}}},_findChildZoomTile:function(T,kz){var kC=this.maxZoom;var e=T.col;var kD=T.row;var kB=T.zoom;for(var kA=1;kA<=kz;kA++){var kE=false;var kx=this._getChildTiles(e,kD,kB,kC,kA);if(!kx){continue}for(var kw=0;kw<kx.length;kw++){var kv=this.layer.getTileKey(kx[kw]);var ky=this.layer.tileCache.getData(kv);if(ky&&ky.status==="ready"){this.layer.map._featureMgr.setData(ky,this.layer.drawIndex,1);this._loadCacheLabel(kx[kw],ky);kE=true}}if(kE){break}}},_getParentTiles:function(e,T,i,kv){if(i-1<kv){return null}return{col:Math.floor(e/2),row:Math.floor(T/2),zoom:i-1,useZoom:i-1,loopOffsetX:0}},_getChildTiles:function(kv,kE,kD,kC,ky){var kF=[];if(kD+ky>kC){return null}var kB=Math.pow(2,ky);var e=kv*kB;var kA=kE*kB;var kz=kD+ky;var kF=[];for(var kw=0;kw<kB;kw++){var kx=e+kw;for(var T=0;T<kB;T++){var i=kA+T;kF.push({col:kx,row:i,zoom:kz,useZoom:kz,loopOffsetX:0})}}return kF},_loadTileDataByWorker:function(i){if(!this.map||!this.map.dispatcher){return}var kx=this.map.dispatcher.getActor();if(!kx){return}var T=i.col;var kC=i.row;var kB=i.zoom;var e=this.layer.getTilesUrl(new fr(T,kC),kB,i);if(!e){return}var kw=this.layer.getTileKey(i);var kz="id_"+T+"_"+kC+"_"+kB;var ky=this._opt.header||null;if(this._opt.header instanceof Function){ky=this._opt.header(e)}if(this._opt.urlCallback instanceof Function){e=this._opt.urlCallback(e)}var kv={type:"vector",layerId:this._layerId,x:T,y:kC,z:kB,tileKey:kw,tileUrl:e,spanLevel:this._opt.spanLevel,header:ky,encrypt:this._opt.encrypt||false};var kA=this;kx.send("loadTile",kv,function(kF,kE){if(!kA.layer.tileCache){kA.layer._checkLayerTilesLoaded();return}var kD=kA.layer.tileCache.getData(kw);if(!kD){kA.layer._checkLayerTilesLoaded();return}if(kF||!kE){kD.status="ignore";kA.layer._checkLayerTilesLoaded()}else{var kG=new eh.TileFamilyParse(kA.layerOption,kv).deserialize(kE,kA);kD.tileInfo=i;kD.tileData=kG;kA._processLabelData(kD);kA.layer.callbackDataQueue.push([kw,kD,kz]);if(kA.processDataTimer){return}kA.processDataTimer=setTimeout(function(){while(kA.layer&&kA.layer.callbackDataQueue.length>0){kA.layer._checkLayerTilesLoaded();var kI=kA.layer.callbackDataQueue.shift();kA._setTileData(kI[0],kI[1],kI[2])}var kH=new fS("onupdate");kA.map.dispatchEvent(kH);kA.processDataTimer=null},0)}})},_loadTileData:function(i,e){var kv=i.col;var kz=i.row;var kw=i.zoom;var T=this.layer.getTilesUrl(new fr(kv,kz),kw,i);if(!T){return}var ky=this.layer.getTileKey(i);var kx=new XMLHttpRequest();kx.open("GET",T,true);kx.responseType="arraybuffer";kx.timeout=3000;kx.ontimeout=function(){e&&e(null,ky,i)};kx.onreadystatechange=function(kA){if(this.readyState===4){if(this.status===200){e&&e(kx.response,ky,i);return}if(this.status>=400||this.status===0){e&&e(null,ky,i)}else{e&&e(null,ky,i)}}};kx.send()},_tileDataCbk:function(kw,ky,i){var e=this.layer.tileCache.getData(ky);if(!e){return}var kx=this.layer.map;var T=this;if(!kw||typeof kw==="string"){e.status="init";e.reloadTimer=setTimeout(function(){if(e.retry<3){e.retry++;e.status="loading";T._loadTileData(i,function(kA,kB,kz){T._tileDataCbk(kA,kB,kz)})}else{e.status="ignore"}},3000);return}if(e.reloadTimer){clearTimeout(e.reloadTimer);e.reloadTimer=null}var kv=(function(kz){return function(){var kA=i.col;var kD=i.row;var kB=i.zoom;var kC="id_"+kA+"_"+kD+"_"+kB;e.tileInfo=i;e.tileData=T.mvt.readFeatures(kz,T,kx,{x:kA,y:kD,z:kB,g:T.gridModel,mc:T._opt.transform&&T._opt.transform.source==="BD09MC"?true:false});T._processLabelData(e);T.layer.callbackDataQueue.push([ky,e,kC]);if(T.processDataTimer){return}T.processDataTimer=setTimeout(function(){while(T.layer.callbackDataQueue.length>0){var kE=T.layer.callbackDataQueue.shift();T._setTileData(kE[0],kE[1],kE[2])}T.doOnceDraw();T.processDataTimer=null},200)}})(kw);kx.jobScheduler.addJob(kv)},_setTileData:function(T,e,i){e.status="ready";this.layer.tileCache.setData(T,e);if(this.layer.curViewTilesInfo[i]){e.dataType=hY}},_processLabelData:function(T){if(!T.tileData){return}T.label=T.tileData.getTileLabels();if(!T.label){return}if(T.label.status==="processing"){return}var i=T.tileInfo;var e=this._getTileTexImgKey(i);T.label.imgKey=e;T.label.status="processing";var kv=this;kv.layer.updateAllIconsTextureCoords(T);this.layer.labelProcessor.loadIconImages(T,function(kx){kv.layer.updateAllIconsTextureCoords(kx)},true);var kw=this.layer.map.tileMgr.getLabelTextCanvas();kw.drawCustomLabelsOnCanvas(T.label.fixedLabel,function(kx){if(kx){if(!T.label.textureHeights){T.label.textureHeights=[]}T.label.textureHeights[i.useZoom]=kx.height}kv.layer._doWorkAfterLabelImageLoad(T,kx,null,e)})},_getTileTexImgKey:function(i){var e="mvt_"+this.layer.drawIndex+"_"+i.col+"_"+i.row+"_"+i.zoom+"_";e=bD.getGUID(e);return e},_updateBRushCube:function(ky){var kA=ky.tileData;for(var T in kA){if(kA.hasOwnProperty(T)){var e=kA[T];for(var kw=0;kw<e.length;kw++){var kv=e[kw];var kx=kv.getBox();var kz={minX:kx[0],minY:kx[1],maxX:kx[2],maxY:kx[3],lN:T,f:kv}}}}},intersectFeatures:function(e){var kx=this._geojsonToSouceXY(e);var T=this._bboxTile(kx);T=this._intersectTile(kx,T);if(!T){return null}var kz=this.layer.map._featureMgr.result.bkData[this.layer.drawIndex][2];var kv=[];var kE=null;for(var kA=0;kA<kz.length;kA++){var kw=kz[kA].tileInfo;var kF=kw.zoom+"_"+kw.col+"_"+kw.row;if(T[kF]){if(!kz[kA].tileData||!kz[kA].tileData.layers){continue}var ky=kz[kA].tileData.layers;var kD=null;for(var kC in ky){var kB=ky[kC];if(T[kF][4]){this._featuresInter(kC,kB.features,kv)}else{if(kB.layerType==="Point"||kB.layerType==="MultiPoint"){if(!kE){kE=this._geojsonToScreenXY(e)}this._pointFeaturesInter(kC,kB.features,kv,kE)}else{if(!kD){kD=this._geojsonToTileXY(kx,T[kF])}if(!kD){continue}this._noPointFeaturesInter(kC,kB.features,kv,kD)}}}}}return kv.length===0?null:kv},_featuresInter:function(T,kv,kw){for(var i in kv){if(!kv[i]._visible){continue}if(kw[T+"_"+kv[i].getId()]){continue}kv[i].layerName=T;var e=new js(kv[i].getId(),T);e.properties=kv[i].getProperties();kw.push(e);kw[T+"_"+kv[i].getId()]=true}},_pointFeaturesInter:function(kw,kx,ky,kv){for(var T in kx){if(!kx[T]._visible){continue}if(ky[kw+"_"+kx[T].getId()]){continue}var kz=kx[T].getPointGeoJSON(this.layer.map);if(!kz){continue}var i=eh.booleanDisjoint(kz,kv);if(!i){kx[T].layerName=kw;var e=new js(kx[T].getId(),kw);e.properties=kx[T].getProperties();ky.push(e);ky[kw+"_"+kx[T].getId()]=true}}},_noPointFeaturesInter:function(kw,kx,ky,kv){for(var T in kx){if(!kx[T]._visible){continue}if(ky[kw+"_"+kx[T].getId()]){continue}var i=eh.booleanDisjoint(kx[T].geojson,kv);if(!i){kx[T].layerName=kw;var e=new js(kx[T].getId(),kw);e.properties=kx[T].getProperties();ky.push(e);ky[kw+"_"+kx[T].getId()]=true}}},pickFeatures:function(kI,kw){if(this.running){return}var T=Math.floor(this.map.getZoom()+this.spanLevel);if(this.gridModel===eh.GridModel.BAIDUWEB){var kG=Math.pow(2,18-T);var kx=Math.floor(kI.lng/kG/256);var kA=Math.floor(kI.lat/kG/256);var kv=kI.lng/kG-kx*256;var kB=kI.lat/kG-kA*256;var kz=[kv,kB];var kO=[T,kx,kA]}else{var kM=dI.transformBDmcPoint(kI,this.layer.transform);var kH=dI.getPointPixelCoor(kI,T,this.layer.transform);var kO=dI.getTileCoordForCoordAndZ(kM,T);var kz=dI.getRelativePixelCoor(kO,kH)}var kP=this.layer.map._featureMgr.result.bkData[this.layer.drawIndex][2];var kF=kO.join("_");var kC=[];for(var kK=0;kK<kP.length;kK++){var kL=kP[kK].tileInfo;var kQ=kL.zoom+"_"+kL.col+"_"+kL.row;if(kF===kQ){this.running=true;if(!kP[kK].tileData||!kP[kK].tileData.layers){continue}var kD=kP[kK].tileData.layers;for(var kN in kD){var ky=kD[kN].features;for(var kJ in ky){if(!ky[kJ]._visible){continue}if(kC[kN+"_"+ky[kJ].getId()]){continue}if(ky[kJ].getType()===fZ.POINT||ky[kJ].getType()===fZ.MULTI_POINT){var e=ky[kJ].isPointInGeometry(kw,this.layer.map)}else{var e=ky[kJ].isPointInBox(kz);if(e){e=ky[kJ].isPointInGeometry(kz)}}if(e){ky[kJ].layerName=kN;var kE=new js(ky[kJ].getId(),kN);kE.properties=ky[kJ].getProperties();kC.push(kE);kC[kN+"_"+ky[kJ].getId()]=true}}}break}}this.running=false;return kC},_geojsonToScreenXY:function(T){var i=JSON.parse(JSON.stringify(T));var e=this;gJ.coordEachReplace(i,function(kx){var kv=jr.convertLL2MC(new cD(kx[0],kx[1]));var kw=e.map.pointToPixelIn(kv);return[kw.x,kw.y]});return i},_geojsonToTileXY:function(T,kw){if(kw.length<4){return null}var i=JSON.parse(JSON.stringify(T));var kv=Math.floor(this.map.getZoom()+this.spanLevel);if(this.gridModel===eh.GridModel.BAIDUWEB){var e=Math.pow(2,(18-kv))}else{var e=dI.resolutions[kv]}gJ.coordEachReplace(i,function(kx){return[(kx[0]-kw[2])/e,(kx[1]-kw[3])/e]});return i},_geojsonToSouceXY:function(T){var i=JSON.parse(JSON.stringify(T));var e=this;gJ.coordEachReplace(i,function(kx){var kv=jr.convertLL2MC(new cD(kx[0],kx[1]));var kw=[kv.lng,kv.lat];if(e.gridModel!==eh.GridModel.BAIDUWEB){kw=dI.transformBDmcPoint(kv,e.layer.transform)}return kw});return i},_bboxTile:function(T){var ky=gJ.bbox(T);var kD=Math.floor(this.map.getZoom()+this.spanLevel);if(this.gridModel===eh.GridModel.BAIDUWEB){var kB=new cD(ky[0],ky[1]);var kE=new cD(ky[2],ky[3]);var kz=Math.pow(2,18-kD);var kF=Math.floor(kB.lng/kz/256);var kx=Math.floor(kB.lat/kz/256);var kw=Math.floor(kE.lng/kz/256);var i=Math.floor(kE.lat/kz/256);return[kD,kF,kx,kw,i]}else{var e=[ky[0],ky[3]];var kA=[ky[2],ky[1]];var kC=dI.getTileCoordForCoordAndZ(e,kD);var kv=dI.getTileCoordForCoordAndZ(kA,kD);return[kC[0],kC[1],kC[2],kv[1],kv[2]]}},_intersectTile:function(e,ky){var kF={};if(ky.length<5){return null}var kB=gJ.getType(e);var kG=false;if(e.type==="Feature"&&kB==="Polygon"){kG=true}for(var kw=ky[1];kw<=ky[3];kw++){for(var kv=ky[2];kv<=ky[4];kv++){if(this.gridModel===eh.GridModel.BAIDUWEB){var kA=jr.tileToBoundRange({col:kw,row:kv,zoom:ky[0],baseTileSize:256});var kx=[kA.MC.sw.lng,kA.MC.sw.lat,kA.MC.ne.lng,kA.MC.ne.lat]}else{var kA=dI.getTileRangeExtent([ky[0],kw,kv]);var kx=[kA.minX,kA.minY,kA.maxX,kA.maxY]}var kz={type:"Feature"};kz.bbox=kx;kz.geometry={type:"Polygon",coordinates:[[[kx[0],kx[1]],[kx[2],kx[1]],[kx[2],kx[3]],[kx[0],kx[3]],[kx[0],kx[1]],]]};var T=eh.booleanDisjoint(kz,e);if(!T){var kE=ky[0]+"_"+kw+"_"+kv;var kD=[kw,kv,kx[0],kx[1],false];if(kG){var kC=eh.booleanContains(e,kz);if(kC){kD[4]=true}}kF[kE]=kD}}}return Object.keys(kF).length===0?null:kF},_initEvent:function(ky){this.map=ky;if(!this.map.dispatcher){this.map.dispatcher=new cI(hA(),eh)}var kw=this;this.map.dispatcher.broadcast("setLayerStyle",kw.layerOption,function(kA,i){kw.upStyle=true;if(kw.loadModule){kw.doOnceDraw()}});var kv=this;var e=false;this._layerMouseEvent=function(kC){if(!kv.map||!kv._listeners){return}if(!kv._listeners.onmousemove||Object.keys(kv._listeners.onmousemove).length===0){return}var kA;var i=kC.point;var kB=kv.pickFeatures(i,kC.pixel);if(kB&&kB.length>0){kA=new fS("onmousemove");kA.value=kB;kv.map.platform.style.cursor=kv.map.config.overlayMoveCursor;e=true}else{kv.map.platform.style.cursor=kv.map.config.defaultCursor;if(!e||!kv._listeners.onmouseout||Object.keys(kv._listeners.onmouseout).length===0){return}kA=new fS("onmouseout");e=false}if(kA){kA.point=kC.point;kA.pixel=kC.pixel;kA.latLng=kC.latlng;kv.dispatchEvent(kA)}};this._layerClickEvent=function(kC){if(!kv.map||!kv._listeners){return}if((!kv._listeners.onclick&&!kv._listeners.dblclick)||(Object.keys(kv._listeners.onclick).length===0&&Object.keys(kv._listeners.dblclick).length===0)){return}var kA;var i=kC.point;var kB=kv.pickFeatures(i,kC.pixel);kA=new fS(kC.type);kA.point=i;kA.pixel=kC.pixel;kA.latLng=kC.latlng;kA.value=kB;kv.dispatchEvent(kA)};ky.addEventListener("onmousemove",this._layerMouseEvent);var kx=["onclick","dblclick"];for(var T=0;T<kx.length;T++){var kz=kx[T];ky.addEventListener(kz,this._layerClickEvent)}ky.addEventListener("removetilelayer",function(i){if(i.target&&i.target.ontology){if(i.target.ontology===kv){kv.layer.tileCache.clear();kv.stateCube={};kv.upStyle=false;ky.removeEventListener("onmousemove",kv._layerMouseEvent);ky.removeEventListener("onclick",kv._layerClickEvent);ky.removeEventListener("ondblclick",kv._layerClickEvent);kv.layer.ontology=null;kv.layer=null;if(ky.dispatcher){ky.dispatcher.broadcast("removeLayer",kv.layerOption,function(kC,kA){var kE=ky.tileMgr.tileLayers;var kB=false;for(var kD=0;kD<kE.length;kD++){if(kE[kD].ontology instanceof eh){kB=true;break}}if(!kB&&ky.dispatcher){ky.dispatcher.remove();ky.dispatcher=null}})}}}});ky.on("destroy",function(){if(kv.map&&kv.map.dispatcher){kv.map.dispatcher.remove();kv.map.dispatcher=null}kv.layer.ontology=null;kv.layer=null});this.addEventListener("onmousemove",function(){})},setStyle:function(e){this._opt.style=e;if(!this.map||!this.loadModule){return}this.resolveStyle(this._opt);var i=this;if(this.upStyle===true){this.map.dispatcher.stop();this.map.dispatcher.broadcast("stop",null,function(kv,T){i.layerOption=Object.assign(i.layerOption,i._opt);i.map.dispatcher.broadcast("setLayerStyle",i.layerOption,function(kx,kw){i.layer.tileCache.clear();i.doOnceDraw()})})}else{i.layer.tileCache.clear();i.doOnceDraw()}},setZIndex:function(e){if(this.layer&&parseInt(e)>0){this.layer.setZIndex(e)}},getZIndex:function(){if(this.layer){return this.layer.zIndex}},setZIndexTop:function(){if(this.layer){this.layer.setZIndexTop()}},setUpLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("up");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},setDownLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("down");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},toString:function(){return"MVTLayer"}});eh._generateTexture=function(ky,kx,T){var kw=document.createElement("canvas");var e;var kv;if(kx.strokeStyle==="dashed"){e=16;kv=e*8}else{if(kx.strokeStyle==="dotted"){e=32;kv=e*2}}kw.width=e;kw.height=kv;var i=kw.getContext("2d");i.fillStyle=kx.strokeColor;i.globalAlpha=kx.strokeOpacity;var kz=kx.strokeWeight*2;if(kx.strokeStyle==="dashed"){kz=eh._drawDashArrayTexture(i,e,kv,kx)}else{if(kx.strokeStyle==="dotted"){kz=eh._drawDottedTexture(i,e,kv,kx.strokeWeight)}}if(window.createImageBitmap&&!kx.sync){createImageBitmap(kw,{imageOrientation:"flipY"}).then(function(kA){T(null,{totalDashLen:kz,texture:kA,textureSize:[e,kv]})})}else{T(null,{totalDashLen:kz,texture:kw.toDataURL(),textureSize:[e,kv]})}};eh._drawDashArrayTexture=function(kB,kv,kx,T){var kz=T.dashArray;if(!kz){kB.fillRect(0,0,kv,kx/2);return T.strokeWeight*4}else{var kA=0;if(kz.length%2!==0){kz=kz.concat(kz)}for(var kw=0;kw<kz.length;kw++){kA+=kz[kw]}var e=0;for(var kw=0;kw<kz.length;kw++){var ky=kz[kw]/kA*kx;if(kw%2===0){kB.fillRect(0,e,kv,ky)}e+=ky}return kA}};eh._drawDottedTexture=function(i,e,T,kv){i.beginPath();i.arc(e/2,e/2,e/2,0,2*Math.PI);i.fill();i.closePath();return kv*2};var V=function(e){var e=e||{};this.inputCRS=e.inputCRS||"EPSG3857";this.outCRS=e.outCRS||"EPSG3857";this.minZoom=e.minZoom||3;this.maxZoom=e.maxZoom||19;this.retry=e.retry||false;this.retryTime=e.retryTime||600;this.useThumbData=e.useThumbData||true;this.lastZoom=3;this.cacheSize=e.cacheSize||128;this.tileType=ig.getInstance("web");this._mapCenter={};this._featureMgr=[[],[],[]];this._gridRefs={row:{},col:{}};this.tileCache=new aA(this.cacheSize,{clearCallback:function(i){}})};V.inherits(de,"BaiduLayer");e6.extend(V.prototype,{fetch:function(i,kv,kw){var kv=Math.ceil(kv)||3;var i=i||[];if(i.length!==4||kv>19){kw(null);return}var e=this.getZoomState(kv);var T=this.calCoord(i,kv,e);this.curViewTilesInfo=this.calTilesOrders(T.sw,T.ne,kv);this.clearData();this.clearRefs();this.loadLayerData(this.curViewTilesInfo,e,true,kw)},calCoord:function(T,kv,i){if(T.length!==4){return}var e=gcoord.transform([T[0],T[1]],gcoord[this.inputCRS],gcoord.BD09MC);var kw=gcoord.transform([T[2],T[3]],gcoord[this.inputCRS],gcoord.BD09MC);if(kw[1]>19505879.362428114||e[1]<-15949096.637571886){kw[1]=19505879.362428114;e[1]=-15949096.637571886}this._mapCenter[kv]=new cD((e[0]+kw[0])/2,(e[1]+kw[1])/2);return{sw:e,ne:kw}},calTilesOrders:function(kA,kG,kC){var kD=this.tileType.getMercatorSize(kC,kC);var ky=[Math.floor(kA[0]/kD),Math.floor(kA[1]/kD)];var i=[Math.floor(kG[0]/kD),Math.floor(kG[1]/kD)];var kz=ky[0]-1;var kx=i[0]+2;var kw=ky[1]-1;var kF=i[1]+2;var kB=[];for(var kv=kz;kv<kx;kv++){for(var kE=kw;kE<kF;kE++){var T={col:kv,row:kE,zoom:kC,useZoom:kC,tileTypeName:"web",loopOffsetX:0,tileSize:256,baseTileSize:256,mercatorSize:kD,combine:false,dataIndex:256};kB.push(T);var e="id_"+kv+"_"+kE+"_"+kC;kB[e]=true}}kB.sort((function(kH){return function(kI,kJ){return((0.4*Math.abs(kI.col-kH[0])+0.6*Math.abs(kI.row-kH[1]))-(0.4*Math.abs(kJ.col-kH[0])+0.6*Math.abs(kJ.row-kH[1])))}})([(kz+kx)/2,(kw+kF)/2]));kB.zoom=kC;kB.tileTypeName="web";return kB},getZoomState:function(i){var e=i-this.lastZoom;if(e>0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState||0},loadLayerData:function(kC,kv,kw,kB){this.thumbCache={};if(kw){for(var kz=0,kx=kC.length;kz<kx;kz++){var T=kC[kz];var ky=this.getTileKey(T);var e=this.tileCache.getData(ky);if(e&&e.status==="ready"){e.key=ky;this.setData(e,2)}else{if(this.useThumbData){kv===1&&this.setThumbData(T.col,T.row,T.zoom,T.useZoom,kv)}}}this.calOutData(kB)}for(var kz=0,kx=kC.length;kz<kx;kz++){var T=kC[kz];var ky=this.getTileKey(T);var e=this.tileCache.getData(ky);if(!e){this.tileCache.setData(ky,{});var kA=this;this.loadRasterTileData(T,function(i,kD){kA.rasterTileDataCbk(i,kD,kB)})}}},loadRasterTileData:function(i,e){var T=new Image();var kw=i.col;var kz=i.row;var kx=i.zoom;var kv=this.getTilesUrl(new fr(kw,kz),kx);if(!kv){return}var ky=this.getTileKey(i);T=this.loadTileImage(kv,i,ky,e);T.tileInfo=i},loadTileImage:function(kz,e,T,kx){var kv=new Image();kv.crossOrigin="anonymous";var ky=this;var kw;function kA(){if(ky.retry){kw&&clearInterval(kw);kw=null}}if(this.retry){var i=1;kw=setInterval(function(){if(i>3){kA();return}var kB=ky.getTilesUrl(new fr(e.col,e.row),e.zoom,i);kv.src=kB;i++},this.retryTime)}kv.onload=function(){kA();kx&&kx(this,T)};kv.onerror=function(){kA();kx&&kx(null,T)};kv.src=kz;return kv},rasterTileDataCbk:function(kw,kv,kz){if(!kw||typeof kw==="string"){this.tileCache.removeData(kv);return}var i=kw.tileInfo;var T=i.col;var kB=i.row;var kA=i.zoom;var e=this.tileCache.getData(kv);if(!e){return}e.textureSource=kw;e.dataType=gS;e.tileInfo=i;e.status="ready";this.tileCache.setData(kv,e);var kx="id_"+T+"_"+kB+"_"+kA;var ky=false;if(this.curViewTilesInfo[kx]){e.png8=this.png8||false;e.key=kv;this.setData(e,2);ky=true}if(ky){this.calOutData(kz,e)}},getTilesUrl:function(kw,kD,i){var ky=i||0;var T=kw.x;var kE=kw.y;var kA=j6("ditu","normal");var kz=kA.udt;var kC=es.B_NORMAL_MAP.tileUrls;var kx=Math.abs(T+kE+ky)%kC.length;var kB=kC[kx];if(T<0){T="M"+(-T)}if(kE<0){kE="M"+(-kE)}var kv="x="+T+"&y="+kE+"&z="+Math.floor(kD);kv+="&styles=pl&scaler=2&udt="+kz+"&from=jsapi3_0";var e=kB+"?qt=vtile&"+kv;return e},calOutData:function(kB,T){if(!T){for(var ky=0;ky<this._featureMgr.length;ky++){var e=this._featureMgr[ky];for(var kw=0;kw<e.length;kw++){var kv=e[kw].tileInfo;if(ky===2){var kz=e[kw].extent;if(kz){this.addRefs(kz,kv.col,kv.row)}else{var kA=this.calBoxCoord(kv);if(!kA){continue}e[kw].extent=this.findRefs(kA,kv.col,kv.row)}}}}kB({size:this.curViewTilesInfo.length,zoom:this.lastZoom,data:this._featureMgr})}else{var kx=this.calBoxCoord(T.tileInfo);if(!kx){return}T.extent=this.findRefs(kx,T.tileInfo.col,T.tileInfo.row);kB({zoom:this.lastZoom,size:this.curViewTilesInfo.length,data:[[],[],[T]]})}},calOutData_back:function(kD,kv){if(!kv){var kx;var kE;var kB;for(var kz=0;kz<this._featureMgr.length;kz++){var T=this._featureMgr[kz];for(var ky=0;ky<T.length;ky++){var kw=T[ky].tileInfo;if(kz===2){if(ky===0){var kA=this.calBoxCoord(kw);T[0].extent=kA;kx=T[0];kE=kA[2]-kA[0];kB=kA[3]-kA[1]}else{if(kx&&kE&&kB){var e=(kw.row-kx.tileInfo.row)*kB;var kC=(kw.col-kx.tileInfo.col)*kE;var kA=kx.extent;T[ky].extent=[kA[0]+kC,kA[1]+e,kA[2]+kC,kA[3]+e]}}}else{var kA=this.calBoxCoord(kw);T[ky].extent=kA}}}kD({size:this.curViewTilesInfo.length,zoom:this.lastZoom,data:this._featureMgr})}else{if(this._featureMgr[2].length===1){var kA=this.calBoxCoord(kv.tileInfo);kv.extent=kA;this.featureCell=kv;this.cellW=kA[2]-kA[0];this.cellH=kA[3]-kA[1]}else{var e=(kv.tileInfo.row-this.featureCell.tileInfo.row)*this.cellH;var kC=(kv.tileInfo.col-this.featureCell.tileInfo.col)*this.cellW;var kA=this.featureCell.extent;kv.extent=[kA[0]+kC,kA[1]+e,kA[2]+kC,kA[3]+e]}kD({zoom:this.lastZoom,size:this.curViewTilesInfo.length,data:[[],[],[kv]]})}},calBoxCoord:function(e){var i=jr.prototype.tileToBound(e,this._mapCenter[e.zoom]).LL;var T=gcoord.transform([i.sw.lng,i.sw.lat],gcoord.BD09LL,gcoord[this.outCRS]);var kv=gcoord.transform([i.ne.lng,i.ne.lat],gcoord.BD09LL,gcoord[this.outCRS]);return[T[0],T[1],kv[0],kv[1]]},clearData:function(){this._featureMgr=[[],[],[]]},addRefs:function(i,e,T){this._gridRefs.row[T]=i[1];this._gridRefs.row[T+1]=i[3];this._gridRefs.col[e]=i[0];this._gridRefs.col[e+1]=i[2]},findRefs:function(i,e,kv){var T=[];this._gridRefs.row[kv]&&(T[1]=this._gridRefs.row[kv]);this._gridRefs.row[kv+1]&&(T[3]=this._gridRefs.row[kv+1]);this._gridRefs.col[e]&&(T[0]=this._gridRefs.col[e]);this._gridRefs.col[e+1]&&(T[2]=this._gridRefs.col[e+1]);!this._gridRefs.row[kv]&&(this._gridRefs.row[kv]=i[1])&&(T[1]=i[1]);!this._gridRefs.row[kv+1]&&(this._gridRefs.row[kv+1]=i[3])&&(T[3]=i[3]);!this._gridRefs.col[e]&&(this._gridRefs.col[e]=i[0])&&(T[0]=i[0]);!this._gridRefs.col[e+1]&&(this._gridRefs.col[e+1]=i[2])&&(T[2]=i[2]);return T},clearRefs:function(){this._gridRefs={row:{},col:{}}},destroy:function(){this.tileCache.clear();this.clearData();this.clearRefs();this._mapCenter={}},setData:function(kw,T){var e=this._featureMgr[T];for(var kv=0;kv<e.length;kv++){if(e[kv].key&&e[kv].key===kw.key){e[kv]=kw;return}}e.push(kw)},getTileKey:function(e,kv){kv=kv||{};var i=typeof kv.useZoom==="number"?kv.useZoom:e.useZoom;var T="default";return"web_"+T+"_"+e.col+"_"+e.row+"_"+e.zoom+"_"+i},setThumbData:function(i,kw,kv,e,T){if(T===1){if(this._findParentZoomTile(i,kw,kv,e,8)===false){this._findChildZoomTile(i,kw,kv,e,3)}}else{if(T===-1){if(this._findChildZoomTile(i,kw,kv,e,3)===false){this._findParentZoomTile(i,kw,kv,e,8)}}}this.sortThumbData()},_findParentZoomTile:function(ky,kH,kG,kw,kB){var kx="web";var T=3;var e=ky;var kE=kH;var kC=kG;var kD=kw;for(var kA=1;kA<=kB;kA++){var kv=this.tileType.getParentTile(e,kE,kC,kD,T);if(kv===null){continue}var kF=this.getTileKey(kv);var kz=this.tileCache.getData(kF);if(kz&&kz.status==="ready"){if(this.thumbCache[kF]){continue}kz.key=kF;this.setData(kz,0);this.thumbCache[kF]=true;return true}e=kv.col;kE=kv.row;kC=kv.zoom;kD=kv.useZoom}return false},_findChildZoomTile:function(kz,kB,e,kw,kK){var kI="web";var kE=21;var ky=kz;var kA=kB;var kC=e;var kv=kw;var kx=true;for(var kH=1;kH<=kK;kH++){var kF=false;var T=this.tileType.getChildTiles(ky,kA,kC,kv,kE,kH);if(!T){continue}for(var kG=0;kG<T.length;kG++){var kD=this.getTileKey(T[kG]);var kJ=this.tileCache.getData(kD);if(kJ&&kJ.status==="ready"){if(!this.thumbCache[kD]){kJ.key=kD;this.setData(kJ,1);this.thumbCache[kD]=true}kF=true}else{kx=false}}if(kF){break}}return kx},sortThumbData:function(){var e=this._featureMgr;if(!e){return}if(e[0]&&e[0].length>0){e[0].sort(function(T,i){return T.tileInfo.useZoom-i.tileInfo.useZoom})}}});function dE(T,i){aS.call(this,i);if(!bX(T)){throw new Error("createDOM参数类型错误，请检查是否为Function")}var e=i||{};this.config={};this.config.enableMassClear=false;this.config.minZoom=e.minZoom||3;this.config.maxZoom=e.maxZoom||21;this.config.offsetX=e.offsetX||0;this.config.offsetY=e.offsetY||0;this.config.coordinate=e.coordinate||"BD09";this.config.enableDraggingMap=e.enableDraggingMap||false;this.createDOM=T;this.data=e.data||null;this.overlaysList=[];hL.sendMessage(aZ(4,3,13),["layer","overlay"])}dE.inherits(de,"CustomHtmlLayer");e6.extend(dE.prototype,{initialize:function(i){this.map=i;var e=this;this._zoomShowEvent=function(kv){var T=e.map.getZoom();if(T<e.config.minZoom||T>e.config.maxZoom){e.hide()}else{e.show()}};this.addToMap();this.initEvent(i)},initEvent:function(){if(!this.overlaysList||!this.map){return}var e=this;this.map.addEventListener("zoomend",e._zoomShowEvent);this.map.on("destory",function(){e._distory()})},addEventListener:function(kv,kx){if(!this.overlaysList||!this.map){return}var kw=this.overlaysList;var e=this.overlaysList.length;for(var T=0;T<e;T++){kw[T].addEventListener(kv,kx)}},show:function(){if(!this.overlaysList){return}var e=this.overlaysList.length;if(e>0){for(var T=0;T<e;T++){this.overlaysList[T].show()}}},hide:function(){if(!this.overlaysList){return}var e=this.overlaysList.length;if(e>0){for(var T=0;T<e;T++){this.overlaysList[T].hide()}}},addToMap:function(){if(!this.overlaysList||!this.map){return}var e=this.overlaysList.length;var kv=this.overlaysList;if(e>0){for(var T=0;T<e;T++){this.map.addOverlay(kv[T])}}},render:function(i){this.config.enableMassClear=false;this.config.point=i.points;this.config.properties=i.properties;var e=new bR(this.createDOM,this.config);return e},setData:function(e){var kv=this;if(this.map&&(this.map.getZoom()<this.config.minZoom||this.map.getZoom()>this.config.maxZoom)){return}this.data=e;var T=gJ.getType(e);if(T.toLowerCase()==="point"){var i=new gJ({reference:this.config.coordinate});i.readFeaturesFromObject(e,{isPoints:true},function(kx){var kw=kv.render(kx);kw.id="cus_"+parseInt(Math.random()*1000000,10);kv.overlaysList.push(kw)});i=null}},updateData:function(e){this.removeAllOverlays();this.data=null;this.overlaysList=[];this.setData(e);this.addToMap();this.initEvent()},removeLayer:function(T){if(!(T instanceof dE)||!this.map){return}var kv=T.overlaysList;for(var e=0;e<kv.length;e++){this.map.removeOverlay(kv[e])}this._distory(T)},removeAllOverlays:function(){if(!this.map||!this.overlaysList){return}var T=this.overlaysList;for(var e=0;e<T.length;e++){this.map.removeOverlay(T[e])}},removeOverlay:function(T){if(!this.map||!(this.overlaysList)||this.overlaysList.length<=0){return}var e=this.overlaysList.length;var kw=this.overlaysList;if(typeof T==="string"){for(var kv=0;kv<e;kv++){if(kw[kv].id===T){this.map.removeOverlay(kw[kv]);kw.splice(kv,1)}}}else{if(T instanceof aS){for(var kv=0;kv<e;kv++){if(T===kw[kv]){this.map.removeOverlay(T);this.overlaysList.splice(kv,1);return}}}}},_distory:function(){this.map.removeEventListener("zoomend",this._zoomShowEvent);var T=this.overlaysList;for(var e=0;e<T.length;e++){T[e].div=null}this.overlaysList=[];this.createDOM=null;this.config=null;this.data=null},getCustomOverlays:function(){return this.overlaysList},toString:function(){return"CustomHtmlLayer"}});function iC(e){aS.call(this,e);var e=e||{};this.options={};this.options.callback=e.callback?e.callback:null;this._auth=false;this._remove=false;this.currentFloor=e.floor||1;this.currentFloorName="B1";this.currentFloorKV=[];this.currentFloorStr="";this.currentUid="";this.currentCityId=0;this.floorsCache=[];this.spotFillCache=[];this.spotFillLayer;this.spotFillData=[];this.spotOutFillLayer;this.spotOutFillData=[];this.cusInLabelUids=[];this.cusInBubbleUids=[];this.cusOutLabelUids=[];this.cusOutBubbleUids=[];this.labels=[];this.labelDatas=[];this.outLabels=[];this.outLabelDatas=[];this.bubbleDatas=[];this.jixieDatas=[];this.indoorUids;this.outdoorUids;this.indoorChange=true;this.cityChange=true;hL.sendMessage(aZ(4,3,14),["layer","parking"])}iC.inherits(de,"ParkingSpot");e6.extend(iC.prototype,{initialize:function(e){this.map=e;this.map.parking=this;this._verify()},_verify:function(){var e=this;ke.request(function(T){if(T&&T.result&&!T.result["error"]&&T.content&&!T.content["errno"]){var kv=T.content["data"];e._auth=true;e.indoorUids=kv.support_indoor;e.outdoorUids=kv.support_outdoor;e._bindCityChange();e._bindIndoorChange();setInterval(function(){e.getIndoorDataByUid(e.currentUid,e.currentFloorName)},60000);var i=new aI(e.map);if(i&&i._getIdByLoc){i._getIdByLoc(i._loc,function(kw){e.currentCityId=kw;e.getOutdoorDataByCityId(e.currentCityId);setInterval(function(){e.getOutdoorDataByCityId(e.currentCityId)},60000)})}}else{console.error("你未开通智能停车高级服务！")}},{qt:d0,ak:eW})},_initGraph:function(e){if(e==="indoor"){this.spotFillLayer=new ea({crs:"BD09LL",enablePicked:true,autoSelect:true,zIndex:1,selectedColor:"#e5e7eb",pickWidth:2,pickHeight:2,style:{fillColor:["match",["get","state"],1,"#ffbfbb",2,"#ddf4d7","#e5e7eb"],fillOpacity:1,strokeWeight:1,strokeColor:"#fff"}})}else{this.spotOutFillLayer=new ea({crs:"BD09LL",enablePicked:true,autoSelect:true,zIndex:1,selectedColor:"#e5e7eb",pickWidth:2,pickHeight:2,style:{fillColor:["match",["get","state"],1,"#ffbfbb",2,"#ddf4d7","#e5e7eb"],fillOpacity:1,strokeWeight:1,strokeColor:"#fff"}})}},_bindCityChange:function(){var e=this;this.map.addEventListener("citychange",function(i){e.cityChange=true;if(e.currentCityId!==i.code){e.currentCityId=i.code;e.getOutdoorDataByCityId(i.code)}})},_bindIndoorChange:function(){var e=this;var i=function(kz){var ky=kz._indoorData[e.currentUid]?kz._indoorData[e.currentUid].floors:[];var kx=[];for(var kw=0;kw<ky.length;kw++){if(ky[kw].floorName.charAt(0)==="B"||ky[kw].floorName.charAt(0)==="M"){e.currentFloorKV[ky[kw].floorName]=kw;kx.push(ky[kw].floorName)}}e.currentFloorStr=kx.join(",");e.getDataBefore(e.currentUid,e.currentFloorStr)};if(e.currentUid||e.map._indoorMgr.currentUid){var kv=e.map._indoorMgr;e.currentUid=kv.currentUid;e.currentFloor=kv.currentFloor;i(kv);var T=kv.getIndoorData(e.currentUid);e.currentFloorName=T.floors[e.currentFloor]?T.floors[e.currentFloor].floorName:"";e.getIndoorDataByUid(e.currentUid,e.currentFloorName,true)}map.on("indoor_status_changed",function(kz){var kw=kz.uid;var kx=kz.floor;e.indoorChange=true;e.hideLayer("indoor");var kA=e.map._indoorMgr;if(e.currentUid||e.map._indoorMgr.currentUid){var kA=e.map._indoorMgr;e.currentUid=kA.currentUid;e.currentFloor=kA.currentFloor;i(kA)}if(!kw){e.hideLabel()}else{if(this._indoorMgr&&this._indoorMgr._indoorData[kw]){var ky=this._indoorMgr._indoorData[kw];e.currentUid=kw;e.currentFloor=kx;e.currentFloorName=ky.floors[kx].floorName;if(e.currentFloorName.charAt(0)==="F"){e.hideLabel()}e.getIndoorDataByUid(kw,e.currentFloorName,e.indoorChange)}}})},_unzip:function(kw){if(!kw||typeof kw!=="string"){return}var e=atob(kw);var kx=new Uint8Array(e.length);for(var kv=0;kv<e.length;kv++){kx[kv]=e.charCodeAt(kv)}var T=pako.inflate(kx,{to:"string"});return JSON.parse(T)},getDataBefore:function(T,kv){if(!T||!kv||this._remove){return}var e=this;var i=kv.split(",");ke.request(function(ky){if(ky&&ky.result&&!ky.result["error"]&&ky.content){var kA=ky.content;if(!kA){return}for(var kx=0;kx<i.length;kx++){if(kA[i[kx]]){var kz=e._unzip(kA[i[kx]]);var kw=e.currentFloorKV[i[kx]];e.floorsCache[kw]=kz}}e.spotFillCache[T]=e.floorsCache}else{console.log("获取室内车位数据失败，请检查是否已开通智能停车服务！")}},{qt:B,ak:eW,building_uid:T,floor:kv})},getOutdoorDataByCityId:function(i){if(i&&typeof i==="number"){i=i.toString()||"131"}if(!this.outdoorUids[i]||this._remove){return}var e=this;ke.request(function(T){if(T&&T.result&&!T.result["error"]&&T.content){var kv=e._unzip(T.content);if(!kv||!kv.carport_data){return}e.spotOutFillData=e._parseParkingData(kv);if(e.cityChange){if(e.cusOutLabelUids){e.map.removeLabelsFromMapTile(e.cusOutLabelUids)}e._addLabels(kv.carport_data,"outdoor");e.cityChange=false}if(e.cusOutBubbleUids){e.map.removeLabelsFromMapTile(e.cusOutBubbleUids)}e._addJixieLabels(kv.bubble_data);if(!e.spotOutFillLayer){e._addLabels(kv.carport_data,"outdoor");e._initGraph("outdoor");e._initEvent("outdoor",e.options.callback);e.addToMap("outdoor")}else{e.spotOutFillLayer.setData(e.spotOutFillData)}}else{console.log("获取室外车位数据失败，请检查是否已开通智能停车服务！")}},{qt:B,ak:eW,city_id:i})},getIndoorDataByUid:function(kv,kx,i){if(!kv||!kx||this._remove||!this.indoorUids[this.currentCityId]||(this.indoorUids[this.currentCityId]&&!this.indoorUids[this.currentCityId].includes(kv))){return}var T=this;var ky=function(kz){if(T.cusInBubbleUids){T.map.removeLabelsFromMapTile(T.cusInBubbleUids)}if(kz.bubble_data&&kz.bubble_data.length>0){T._addBubbles(kz.bubble_data)}if(T.cusInLabelUids){T.map.removeLabelsFromMapTile(T.cusInLabelUids)}T._addLabels(kz.carport_data,"indoor")};if(this.spotFillCache[kv]&&this.spotFillCache[kv][this.currentFloor]&&i){var kw=this.spotFillCache[kv][this.currentFloor];var e=T._parseParkingData(kw);T.spotFillLayer.setData(e);ky(kw)}ke.request(function(kz){if(kz&&kz.result&&!kz.result["error"]&&kz.content){var kA=T._unzip(kz.content[kx]);if(!kA||!kA.carport_data){return}T.spotFillData=T._parseParkingData(kA);if(kA&&kA.carport_data.length>0){T.floorsCache[T.currentFloor]=kA;T.spotFillCache[kv]=T.floorsCache}if(!T.spotFillLayer){T._addLabels(kA.carport_data,"indoor");T._addBubbles(kA.bubble_data);T._initGraph("indoor");T._initEvent("indoor",T.options.callback);T.addToMap("indoor")}else{if(kA&&kA.carport_data.length>0){T.spotFillLayer.setData(T.spotFillData)}}ky(kA)}else{console.log("获取室内车位数据失败，请检查是否已开通智能停车服务！")}},{qt:B,ak:eW,building_uid:kv,floor:kx})},addToMap:function(e){if(!this.map){return}if(e==="indoor"&&this.spotFillLayer){this.map.addNormalLayer(this.spotFillLayer);this.spotFillLayer.setData(this.spotFillData)}else{if(this.spotOutFillLayer){this.map.addNormalLayer(this.spotOutFillLayer);this.spotOutFillLayer.setData(this.spotOutFillData)}}},_parseParkingData:function(kv){if(!kv){return}var T=kv.carport_data;var e={type:"FeatureCollection",features:[]};if(!T){var i={type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[]}};e.features.push(i);return e}T.forEach(function(kw){if(kw.geo&&typeof kw.geo==="string"){kw.geo=JSON.parse(kw.geo)}var kx={type:"Feature",properties:{center:[kw.x,kw.y],state:kw.carport_state,type:kw.carport_type,name:kw.carport_name,uid:kw.carport_uid,floor:kw.floor,angle:kw.angle,label:kw.label},geometry:{type:"Polygon",coordinates:[kw.geo]}};e.features.push(kx)});return e},_initEvent:function(i,T){if(!this.map){return}var e=this;if(i==="indoor"){this.spotFillLayer.addEventListener("click",function(kA){if(kA.value.dataIndex!==-1&&kA.value.dataItem){var ky=kA.value.dataItem;var kv=ky.properties.center;var kw=ky.properties.bubble_data;var kz="";switch(ky.properties.state){case 1:kz="占用";break;case 2:kz="空闲";break;case 0:kz="未知";break;default:kz="未知";break}var kx={center:kv,state:kz,properties:ky.properties};T&&T(kx)}})}else{this.spotOutFillLayer.addEventListener("click",function(kA){if(kA.value.dataIndex!==-1&&kA.value.dataItem){var ky=kA.value.dataItem;var kv=ky.properties.center;var kw=ky.properties.bubble_data;var kz="";switch(ky.properties.state){case 1:kz="占用";break;case 2:kz="空闲";break;case 0:kz="未知";break;default:kz="未知";break}var kx={center:kv,state:kz,properties:ky.properties};T&&T(kx)}})}this.map.on("destory",function(){e._distory()})},_addBubbles:function(ky){if(!ky){return}this.bubbleDatas=[];this.cusInBubbleUids=[];for(var kx=0;kx<ky.length;kx++){var e=ky[kx].bubble.name+"："+ky[kx].bubble.label;var kz=ky[kx].bubble.rank.split("-");var kv=ky[kx].bubble.color;var kA=jr.convertLL2MC(new cD(ky[kx].x,ky[kx].y));var kw="bubble_"+ky[kx].poi_uid+Math.floor(Math.random()*Math.pow(10,6));var T={position:kA,uid:kw,name:e,displayRange:kz,textMargin:8,direction:0,rank:60000,textOnIcon:true,iconSize:[100,24],noStretch:true,icon:"//bj.bcebos.com/v1/mapopen-pub-jsapigl/assets/images/spot/jixie_bk.png",style:{haloSize:0,fontSize:28,color:"#fff",strokeColor:"#fff",padding:[10,0],}};this.bubbleDatas.push(T);this.cusInBubbleUids.push(kw)}this.map.addLabelsToMapTile(this.bubbleDatas)},_addJixieLabels:function(kw){if(!kw){return}this.jixieDatas=[];this.cusOutBubbleUids=[];for(var kv=0;kv<kw.length;kv++){var kx=jr.convertLL2MC(new cD(kw[kv].x,kw[kv].y));var T="out_bubble_"+kw[kv].poi_uid;var e={position:kx,uid:T,name:kw[kv].poi_name,displayRange:[15,22],textMargin:0,direction:0,rank:60000,textOnIcon:true,iconSize:[20,30],icon:"//bj.bcebos.com/v1/mapopen-pub-jsapigl/assets/images/spot/bubble.png",style:{haloSize:0,fontSize:22,color:"#fff",strokeColor:"#fff"}};this.jixieDatas.push(e);this.cusOutBubbleUids.push(T)}this.map.addLabelsToMapTile(this.jixieDatas)},_addLabels:function(kx,kv){if(kv==="indoor"){this.labelDatas=[];this.inLabelUids=[]}else{if(kv==="outdoor"){this.outLabelDatas=[];this.outLabelUids=[]}}for(var T=0;T<kx.length;T++){var ky=jr.convertLL2MC(new cD(kx[T].x,kx[T].y));var e="carspot_lb_"+kv+"_"+kx[T].carport_name;if(kx[T].label){var kw={position:ky,uid:e,name:kx[T].carport_name+"\\["+kx[T].label+"]",displayRange:[3,22],textMargin:0,direction:0,rank:50000,style:{haloSize:2,fontSize:24,color:"#008857",strokeColor:"#fff"}}}else{var kw={position:ky,uid:e,name:kx[T].carport_name,displayRange:[3,22],textMargin:0,direction:0,rank:50000,style:{haloSize:2,fontSize:22,color:"#657d95",strokeColor:"#fff"}}}if(kv==="indoor"){this.cusInLabelUids.push(e);this.labelDatas.push(kw)}else{if(kv==="outdoor"){this.cusOutLabelUids.push(e);this.outLabelDatas.push(kw)}}}if(kv==="indoor"){this.map.addLabelsToMapTile(this.labelDatas)}else{if(kv==="outdoor"){this.map.addLabelsToMapTile(this.outLabelDatas)}}},removeParkingSpot:function(){if(this.spotFillLayer){this.map.removeNormalLayer(this.spotFillLayer);this.spotFillLayer=null;this.spotFillData=[]}if(this.spotOutFillLayer){this.map.removeNormalLayer(this.spotOutFillLayer);this.spotOutFillLayer=null;this.spotOutFillData=[]}if(this.cusOutLabelUids){this.map.removeLabelsFromMapTile(this.cusOutLabelUids);this.cusOutLabelUids=[]}if(this.cusOutBubbleUids){this.map.removeLabelsFromMapTile(this.cusOutBubbleUids);this.cusOutBubbleUids=[]}if(this.cusInLabelUids){this.map.removeLabelsFromMapTile(this.cusInLabelUids);this.cusInLabelUids=[]}if(this.cusInBubbleUids){this.map.removeLabelsFromMapTile(this.cusInBubbleUids);this.cusInBubbleUids=[]}this.spotFillCache=[];this.floorsCache=[];this._remove=true},hideLayer:function(e){if(e==="indoor"&&this.spotFillLayer){var i=this._parseParkingData([]);this.spotFillLayer.setData(i)}else{if(e==="outdoor"&&this.spotOutFillLayer){var i=this._parseParkingData([]);this.spotOutFillLayer.setData(i)}}},hideLabel:function(){if(this.cusInLabelUids){this.map.removeLabelsFromMapTile(this.cusInLabelUids)}if(this.cusInBubbleUids){this.map.removeLabelsFromMapTile(this.cusInBubbleUids)}},showLayer:function(e){if(e==="indoor"&&this.spotFillLayer){var i=this._parseParkingData([]);this.spotFillLayer.setData(i)}else{if(e==="outdoor"&&this.spotOutFillLayer){}}},searchParkingRoute:function(T,e,i){if(!this.auth){return}},toString:function(){return"ParkingSpot"}});function cs(e){e=e||{};this.visible=(e.visible===undefined?true:!!e.visible);this.minZoom=e.minZoom||3;this.maxZoom=e.maxZoom||21;this.opacity=isNaN(Number(e.opacity))?1:Math.max(0,Math.min(1,Number(e.opacity)));this.zIndex=e.zIndex||1;this.enablePicked=e.enablePicked||false;this.autoSelect=e.autoSelect||false;this.popEvent=e.popEvent||true;this.autoUpdate=false;this.pickWidth=e.pickWidth||30;this.pickHeight=e.pickHeight||30;this.center=e.referCenter||null;this.isTop=e.isTop||false;this.guid=bD.getGUID("normal_layer_")}cs.inherits(de,"NormalLayer");e6.extend(cs.prototype,{onInit:function(kv,kw){if(this.zIndex>0){this.adjustZIndex(kv);kv._normalLayerMgr.sortLayer()}else{var e=kv._featureMgr.result.bkData;this.zIndex=e.length||1}var T={tileTypeName:this.getType?this.getType():"custom",dataType:this.toString(),ontology:this};kv._featureMgr.createLayer(this.zIndex,T);this.map=kv;this.gl=kw;this.onAdd(kv,kw);var i=this;kv.on("destroy",function(){i.onDestroy()})},adjustZIndex:function(i){if(i&&i._featureMgr){var e=i._featureMgr.result.bkData;while(e[this.zIndex]){this.zIndex+=1}}},_getAdjoinZIndex:function(kw){var T=this.zIndex;if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;if(kw==="up"){for(var kv=this.zIndex+1;kv<e.length;kv++){if(e[kv]){T=kv+1;break}}}else{for(var kv=this.zIndex-1;kv>0;kv--){if(e[kv]){T=kv;break}}}}return T},setTargetZIndex:function(e){this.zIndex=e;if(this.map){this.map._normalLayerMgr.sortLayer()}},setZIndex:function(kz){kz=Math.abs(Math.floor(kz))||1;if(!kz||kz===this.zIndex){return}var kw=this.map._featureMgr.result.bkData;var kv=this.map.tileMgr.tileLayers;var kB=this.map._normalLayerMgr.layers;function kC(kH){var kF=null;var kG=[kv,kB];for(var kD=0;kD<kG.length;kD++){for(var kE=0;kE<kG[kD].length;kE++){if(kG[kD][kE].zIndex===kH){kF=kG[kD][kE];break}}if(kF){break}}return kF}var T=[];var ky=[];var kA=this.zIndex;var i=kC(kz);if(kw[kz]&&i){T.push(i);ky.push(kw[kz]);this.setTargetZIndex(kz);kw[kz]=kw[kA];kw[kA]=null}else{this.setTargetZIndex(kz);kw[kz]=kw[kA];kw[kA]=null;this.doOnceDraw();return}var kx=kz+1;while(kx){var e=kC(kx);if(kw[kx]&&e){T.push(e);ky.push(kw[kx]);T.shift().setTargetZIndex(kx);kw[kx]=ky.shift();kx+=1}else{T.shift().setTargetZIndex(kx);kw[kx]=ky.shift();kx=0}}this.doOnceDraw()},setRefCenter:function(e){if(e instanceof cD){this.center=e;this.parseData&&this.parseData(e)}},getRefCenter:function(){return this.center},setTop:function(e){this.isTop=!!e;this.doOnceDraw()},setOpacity:function(e){if(isNaN(Number(e))){return}this.opacity=Math.max(0,Math.min(1,Number(e)));this.doOnceDraw()},getOpacity:function(){return this.opacity},setZIndexTop:function(){var e=this.map._featureMgr.result.bkData;e[e.length]=e[this.zIndex];e[this.zIndex]=null;this.setTargetZIndex(e.length-1);this.doOnceDraw()},setUpLevel:function(){var e=this._getAdjoinZIndex("up");if(this.zIndex!==e){this.setZIndex(e)}},setDownLevel:function(){var e=this._getAdjoinZIndex("down");if(this.zIndex!==e){this.setZIndex(e)}},onAdd:function(e,i){throw new Error("用户未实现onAdd方法")},preRender:function(i,e){},rgbToIndex:function(kw){var kz=kw.length/4;var kv=Math.floor(kz/2);const T=function(kB){return kw[kB]+kw[kB+1]*256+kw[kB+2]*65536-1};for(var ky=0;;ky++){var kx=kv+ky;var kA=kv-ky;if(kx===kA){var e=T(kx*4);if(e>-1){return e}continue}if(kx<kz){var e=T(kx*4);if(e>-1){return e}}if(kA>=0){var e=T(kA*4);if(e>-1){return e}}if(kx>=kz&&kA<0){break}}return -1},testEvent:function(){if(this.enablePicked||this.autoSelect){return true}return false},pick:function(kz,ky,kv){var T=this.gl;var kA=this.map.config.ratio;this.map._normalLayerMgr.saveFramebuffer();this.map._normalLayerMgr.bindFramebuffer(this.map._normalLayerMgr.pickFBO);this.map._normalLayerMgr.clear();this.map._webglPainter._camera._updatePolyLayerMatrix(this.center);var i=this.map._webglPainter._camera._modelViewMatrixLayer;var kx=mat4.create(Float64Array);mat4.multiply(kx,this.map._webglPainter.projMatrix,i);this.render(T,kx,{isPickRender:true});var e=new Uint8Array(4*this.pickWidth*this.pickHeight);T.readPixels(kz*kA-Math.floor(this.pickWidth/2),T.canvas.height-ky*kA-Math.floor(this.pickHeight/2),this.pickWidth,this.pickHeight,T.RGBA,T.UNSIGNED_BYTE,e);var kw=this.rgbToIndex(e);if(this.getPickedItem){var kB=this.getPickedItem(kw,kv)}this.map._normalLayerMgr.restoreFramebuffer();return kB},render:function(T,e,i){throw new Error("用户未实现render方法")},afterRender:function(i,e){},onDestroy:function(e,i){},onHide:function(e,i){},onShow:function(e,i){},doOnceDraw:function(){if(this.map){var e=new fS("onupdate");this.map.dispatchEvent(e)}},doRender:function(){if(!this.map){return false}var e=this.map.getZoom();if(this.visible){if(e>=this.minZoom&&e<=this.maxZoom){if(!this._status){this.onShow(this.map,this.gl);this._status=1}return true}}if(this._status){this.onHide(this.map,this.gl);this._status=0}return false},getZIndex:function(){if(this.zIndex===undefined){throw new Error("图层未添加到地图")}},getVisible:function(){return this.visible},setVisible:function(e){this.visible=e;this.doOnceDraw()},getMinZoom:function(){return this.minZoom},setMinZoom:function(e){if(e<=this.maxZoom){this.minZoom=e}},getMaxZoom:function(){return this.maxZoom},setMaxZoom:function(e){if(e>=this.minZoom){this.maxZoom=e}},dispatcher:function(kw,kv,T){var i=new fS(T);i.pixel=kw.pixel;i.latLng=kw.latlng;i.value=kv;this.dispatchEvent(i)},hasEvent:function(e){if(this.enablePicked){if(e.substr(0,2)!=="on"){e+="on"}if(this._listeners&&this._listeners[e]&&Object.keys(this._listeners[e]).length>0){return true}return false}return false},toString:function(){return"normal"}});function g2(i){i=i||{};const e={alpha:false,antialias:false};this.options=Object.assign({},e,i);if(!window.THREE){throw new Error("ThreeLayer requires THREE")}cs.call(this,this.options);hL.sendMessage(aZ(4,3,18),["layer","threejs"])}g2.inherits(cs,"ThreeLayer");e6.extend(g2.prototype,{onAdd:function(kw,kv){if(!this.options){throw new Error("ThreeLayer requires reCreate")}const e=this.map=kw;this._state=d1.WebGLState.get(kv,e._webGLStateId);this.customCoords=e.toFormatCoords;const i=e.getContainer();const T=i.offsetWidth;const kB=i.offsetHeight;const kz=new THREE.PerspectiveCamera(35,T/kB,10,4000);kz.matrixAutoUpdate=false;const kA=new THREE.WebGLRenderer({context:kv,alpha:this.options.alpha,antialias:this.options.antialias});kA.setSize(T,kB);kA.autoClear=false;const ky=new THREE.Scene();this.scene=ky;this.camera=kz;this.renderer=kA;const kx=new THREE.AmbientLight(16777215,1);ky.add(kx);if(this.options.onInit){this.options.onInit.bind(this)(kA,ky,kz)}this.animate()},preRender:function(i,e){if(!this.options){throw new Error("ThreeLayer requires reCreate")}if(this.options.preRender){this.options.preRender.bind(this)(this.renderer,this.scene,this.camera)}},afterRender:function(i,e){if(!this.options){throw new Error("ThreeLayer requires reCreate")}if(this.options.afterRender){this.options.afterRender.bind(this)(this.renderer,this.scene,this.camera)}},render:function(kw,i,T){if(!this.options){throw new Error("ThreeLayer requires reCreate")}this.statesForange=this._state.getRealState();this.renderer.resetState();var e=this.map._webglMapCamera._updatePolyLayerMatrix();var kv=new THREE.Matrix4().fromArray(e);this.camera.matrixWorld=kv.invert();if(this.options.onRender){this.options.onRender.bind(this)(this.renderer,this.scene,this.camera)}else{this.renderer.render(this.scene,this.camera)}this.renderer.resetState();this._state.setState(this.statesForange)},triggerRepaint:function(){this.needsUpdate=true;this.animate()},triggerStop:function(){this.needsUpdate=false},animate:function(){if(this.needsUpdate){this.doOnceDraw()}else{return}var e=this;this.frameTimer=requestAnimationFrame(function(){e.animate()})},refreshMap:function(){if(this.map){this.doOnceDraw()}},convertLngLat:function(e){this.customCoords.setCenter(this.center);const i=this.customCoords.lngLatsToCoords([e]);return i[0]},add:function(e){this.scene.add(e);this.refreshMap()},remove:function(e){this.scene.remove(e);this.refreshMap()},getScene:function(){return this.scene},getCamera:function(){return this.camera},getRender:function(){return this.renderer},onDestroy:function(){if(this.options.onDestroy){this.options.onDestroy.bind(this)(this.renderer,this.scene,this.camera)}cancelAnimationFrame(this.frameTimer);this.customCoords=null;this._clearScene(this.scene);this.scene=undefined;this.camera=undefined;this.renderer.dispose();this.renderer=undefined;this.map=null;THREE.Cache.clear();this.options=null},onHide:function(){if(this.options.onHide){this.options.onHide.bind(this)(this.renderer,this.scene,this.camera)}},onShow:function(){if(this.options.onShow){this.options.onShow.bind(this)(this.renderer,this.scene,this.camera)}},getMap:function(){if(this.map){return this.map}return null},_clearScene:function(i){var e=this;i.traverse(function(T){e._clearGroup(T)})},_clearGroup:function(T){const e=function(kv){if(kv.geometry){kv.geometry.dispose()}if(kv.material&&kv.material.dispose){kv.material.dispose()}if(kv.material.texture&&kv.material.texture.dispose){kv.material.texture.dispose()}};const i=function(kv){var kw=kv.children.filter(function(kx){return kx});kw.forEach(function(kx){if(kx.children.length){i(kx)}else{if(kx.isMesh){e(kx)}}});kw=null};i(T)}});function eb(e){e=e||{};cs.call(this,e);this.base_opt={idKey:"id",crs:"BD09LL",isFlat:true,drawPart:1,selectedIndex:-1,selectedColor:"rgba(20, 20, 200, 1.0)"};this.setBaseOptions(e);this.loadModule=false;this._stateCube={};this.def=[];this.DEL_COUNT=100;this.delIndexs=[];var i=this;hh.load("mvtParse",function(){i._async()},true);this.select_color=this.getColorStyleForGL(this.base_opt.selectedColor);var T=new Int8Array(4);this.int32View=new Int32Array(T.buffer,0,1);this.float32View=new Float32Array(T.buffer,0,1)}eb.inherits(cs,"FeatureLayer");e6.extend(eb.prototype,{_async:function(){this.loadModule=true;this.resolveStyle();this.parseData()},compileExpress:function(i,e){var i=eh.ExpressParse.normalizePropertyExpression(i,e);return i},resolveStyle:function(){var e=this.style_opt||{};var kv=c5[this.type];if(this._appendStyle){kv=JSON.parse(JSON.stringify(kv));Object.assign(kv,this._appendStyle)}if(e&&this.type&&kv){var T={};for(var i in e){var kx=kv[i];if(e.hasOwnProperty(i)&&kx!==undefined){var kw=this.compileExpress(e[i],kx);T[i]=kw}}this.styleExpress=T}},evaluateContext:function(e,T){var i=T.id||e;var kv=this._stateCube[i];return{properties:function(){return T&&T.properties},featureState:kv||{}}},evaluates:function(i,kv){if(!this.styleExpress){return null}var kx=this.styleExpress;var e={};for(var T in kx){if(kx.hasOwnProperty(T)){var kw=kx[T].evaluate(this.evaluateContext(i,kv));e[T]=kw}}return e},_updateState:function(T,i,e){if(e){this._set(i,this._stateCube,T)}else{this._stateCube[T]=i}},_set:function(i,kw,T){var kv=kw[T]||(kw[T]={});for(var e in i){kv[e]=i[e]}},updateState:function(kw,kx,e){var T=JSON.stringify(this._stateCube);if(!(kx&&typeof kx==="object"&&Object.keys(kx).length>0)){return}if(!e){this._stateCube={}}if(kw instanceof Array){for(var kv=0;kv<kw.length;kv++){this._updateState(kw[kv],kx,e)}}else{this._updateState(kw,kx,e)}var ky=JSON.stringify(this._stateCube);if(T!==ky){this.parseData()}if(this.attach){this.attach.updateState(kw,kx,e)}},replaceAllState:function(e){var i=JSON.stringify(this._stateCube);this._stateCube=e;var T=JSON.stringify(this._stateCube);if(i!==T){this.parseData()}},getAllState:function(){return this._stateCube},removeState:function(kv){var e=JSON.stringify(this._stateCube);if(kv instanceof Array){for(var T=0;T<kv.length;T++){delete this._stateCube[kv[T]]}}else{delete this._stateCube[kv]}var kw=JSON.stringify(this._stateCube);if(e!==kw){this.parseData()}},clearState:function(){var e=JSON.stringify(this._stateCube);if(e!=="{}"){this._stateCube={};this.parseData()}},getType:function(){return"feature"},setData:function(T,kv){if(T.length<=0){return}this.params=kv=kv||{};this.data=T;this.delIndexs=[];this._stateCube={};if(kv.changeCenter&&T&&T.features&&T.features[0]){var e=T.features[0];var kw=null;if(e.geometry&&e.geometry.type==="Point"){kw=e.geometry.coordinates}if(e.geometry&&(e.geometry.type==="LineString"||e.geometry.type==="MultiLineString"||e.geometry.type==="Polygon")){var i=e.geometry.coordinates[0];if(i&&i[0]){kw=i[0]}}if(kw){if(this.base_opt.crs==="BD09LL"){this.center=new cD(kw[0],kw[1])}else{kw=gcoord.transform(kw,this.base_opt.crs,gcoord.BD09LL);this.center=new cD(kw[0],kw[1])}}}this.parseData&&this.parseData(this.center)},getData:function(){return this.data},addDelIndex:function(T){if(this.delIndexs.length>=this.DEL_COUNT){new Error("超出"+this.DEL_COUNT+"个限制")}var e=false;for(var kv=0;kv<this.delIndexs.length;kv++){if(this.delIndexs[kv]===T){e=true;break}}if(!e){this.delIndexs.push(T);this.doOnceDraw()}if(this.attach){this.attach.addDelIndex(T)}},removeDelIndex:function(e){for(var T=0;T<this.delIndexs.length;T++){if(this.delIndexs[T]===e){this.delIndexs.splice(T,1);this.doOnceDraw();return}}if(this.attach){this.attach.removeDelIndex(e)}},clearDelIndex:function(){this.delIndexs=[];this.doOnceDraw();if(this.attach){this.attach.clearDelIndex()}},setBaseOptions:function(i){i=i||{};var e=Object.assign({},this.getBaseOptions());Object.assign(this.base_opt,i);this.onOptionsChanged&&this.onOptionsChanged(this.getBaseOptions(),e);if(i.data){this.setData(i.data);delete i.data}},setStyleOptions:function(i){i=i||{};var e=Object.assign({},this.getStyleOptions());Object.assign(this.style_opt,i);this.onOptionsChanged&&this.onOptionsChanged(this.getStyleOptions(),e);if(i.data){this.setData(i.data);delete i.data}else{if(i.autoRender!==false){}}},getBaseOptions:function(){return this.base_opt||{}},getStyleOptions:function(){return this.style_opt||{}},getProperty:function(e,kv,T){if(Object.prototype.toString.call(kv)==="[object Function]"){return kv(T)}else{var i=T[e]||kv;if("properties" in T&&e in T.properties){i=T.properties[e]}return i}},getPickedItem:function(i,e){if(this.autoSelect){if(e==="onmousemove"){this.selectedIndex=i}else{this.selectedIndex=-1}}if(e==="onclick"&&this.enablePicked){this.selectedIndex=i}var T=this.dataset?this.dataset.normal:[];return{dataIndex:i,dataItem:T[i]}},formatData:function(T){var i=new gJ({reference:this.base_opt.crs});var kw=i.readFeaturesFromObject(T,{isPoints:true});var e=null;var kv=this;if(this.base_opt.nodeStrict){e=JSON.parse(JSON.stringify(T));gJ.coordEachReplace(e,function(kx){return[kx[0].toFixed(kv.base_opt.nodeJoin),kx[1].toFixed(kv.base_opt.nodeJoin)]})}return{normal:T.features,inner:kw,join:e?e.features:null}},_pointGeoFilter:function(kI){var kY=[];for(var kZ=0;kZ<kI.features.length;kZ++){var kD=kI.features[kZ];if(kD.geometry.type!=="LineString"){continue}var kx=kD.geometry.coordinates;var kG=kD.properties||{};if(kx.length<2){continue}var kA=kY.length;if(this.base_opt.nodeBreakpoint||this.base_opt.nodeMiddleShow){var kJ;var kN=0;for(var kW=0;kW<kx.length;kW++){var kO=jr.convertLL2MC(new cD(kx[kW][0],kx[kW][1]));if(kJ&&kJ.similar(kO)){continue}if(kW>0){var kQ=kY[kY.length-1];var kB=kQ.geometry.coordinates;var kS=bf(kO.lat-kB[1],kO.lng-kB[0]);kY[kY.length-1].properties.endPoint=kO.lng+","+kO.lat;kY[kY.length-1].properties.rotation=kS;if(kW>1){var kK=kY[kY.length-2];var kL=kK.geometry.coordinates;kS=g0(kL,kB,[kO.lng,kO.lat]);kY[kY.length-1].properties.rotationPlus=Math.abs(kS)}}var kP=JSON.parse(JSON.stringify(kG));kP.index=kZ;kP.line_node_type=kW===0?1:3;kP.startPoint=kW===0?"":kJ.lng+","+kJ.lat;kP.endPoint="";kP.rotationPlus=0;kY.push({type:"Feature",properties:kP,geometry:{coordinates:[kO.lng,kO.lat],type:"Point"}});kJ=kO;kN++}if(kN===1){kY.splice(kY.length-1,1)}if(kN>=2&&kY[kY.length-1].properties.endPoint===""){var kz=kY[kY.length-2];var T=kz.geometry.coordinates;var ky=kY[kY.length-1];var e=ky.geometry.coordinates;var kS=bf(e[1]-T[1],e[0]-T[0]);kP.rotation=kS;kP.line_node_type=2}}else{var kz=kx[0];var kX=jr.convertLL2MC(new cD(kz[0],kz[1]));var kF=kx[1];var kV=jr.convertLL2MC(new cD(kF[0],kF[1]));var ky=kx[kx.length-1];var k1=jr.convertLL2MC(new cD(ky[0],ky[1]));var kM=kx[kx.length-2];var kC=jr.convertLL2MC(new cD(kM[0],kM[1]));var kR=[[kV,kX],[k1,kC]];for(var kW=0;kW<2;kW++){var k0=[kR[kW][0].lng,kR[kW][0].lat];var kH=[kR[kW][1].lng,kR[kW][1].lat];var kP=JSON.parse(JSON.stringify(kG));kP.index=kZ;var kS=bf(k0[1]-kH[1],k0[0]-kH[0]);kP.rotation=kS;kP.line_node_type=kW===0?1:2;kP.startPoint=kW===0?"":k0.join(",");kP.endPoint=kW===0?kH.join(","):"";kP.rotationPlus=0;kY.push({type:"Feature",properties:kP,geometry:{coordinates:kW===0?kH:k0,type:"Point"}})}}if(this.base_opt.nodeMiddleShow&&kA+1<=kY.length){var kw=kY.length;for(var kU=kA+1;kU<kw;kU++){var kE=JSON.parse(JSON.stringify(kY[kU]));var kv=kY[kU].geometry.coordinates;kE.properties.line_node_type=4;kE.properties.startPoint="";kE.properties.endPoint="";kE.properties.rotationPlus=0;kE.properties.rotation=kY[kU-1].properties.rotation;var kT=kY[kU-1].geometry.coordinates;kE.geometry.coordinates=[(kv[0]+kT[0])/2,(kv[1]+kT[1])/2];kY.push(kE)}}}return{type:"FeatureCollection",features:kY}},_toFormatPointGeometry:function(e,i){if(!i){var kv=jr.convertLL2MC(e)}else{var kv=e}var kw=this.map._normalLayerMgr.base;var T=[kv.lng-kw.lng,kv.lat-kw.lat];return T},getColorStyleForGL:function(kv,e,T){var i=hR.formatColorCssToRgbaArray(kv,e,T);return i},rgb2value:function(e){return e[0]+e[1]*256+e[2]*65536-1},int8ArrayToFloat:function(e){var i=(e[3]<<24|e[2]<<16|e[1]<<8|e[0]);this.int32View[0]=i&4294967295;return this.float32View[0]},_toFormatPolGeometry:function(kw,e){var kv=[];if(!e){kv[0]=this._toFormatCoords(kw)}else{for(var T=0;T<kw.length;T++){kv.push(this._toFormatCoords(kw[T]))}}return kv},_toFormatCoords:function(kB){var kA=[];var kx=[];kA.pointsArray=kx;var kC=jr.convertLL2MC(kB[0]);if(this.center){var e=jr.convertLL2MC(this.center)}else{var e=this.map._normalLayerMgr.base}var kz=[kC.lng-e.lng,kC.lat-e.lat];kA.push(kz);kx.push(kz[0],kz[1]);for(var kw=1,kv=1,T=kB.length;kw<T;kw++){kC=jr.convertLL2MC(kB[kw]);var ky=[kC.lng-e.lng,kC.lat-e.lat];if(ky[0]!==kA[kv-1][0]||ky[1]!==kA[kv-1][1]){kA.push(ky);kx.push(ky[0],ky[1]);kv++}}return kA},onDestroy:function(){this.data=null;this.params={};this._stateCube={};this.delIndexs.length=0},toString:function(){return"FeatureLayer"}});function bY(e){e=e||{};this.type="polyline";this.style_opt={sequence:false,marginLength:16,traceControl:null,traceColor:[],traceDisappear:false,linksLine:false,strokeColorControl:null,strokeColor:"rgba(25, 25, 250, 1)",strokeWeight:2,borderCovered:true,borderColor:"rgba(27, 142, 236, 1)",borderWeight:0,borderMask:true,strokeOpacity:1,strokeLineJoin:"round",strokeLineCap:"square",strokeTextureUrl:"",strokeTextureWidth:16,strokeTextureHeight:16,strokeStyle:"solid",dashArray:[8,4]};this.setStyleOptions(e.style||{});this._bufferArray=[];this._texture={};e.nodeShow=e.nodeShow===undefined?false:e.nodeShow;e.linkLine=e.linkLine===undefined?true:e.linkLine;e.nodeMask=e.nodeMask===undefined?false:e.nodeMask;e.nodeStrict=e.nodeStrict===undefined?false:e.nodeStrict;e.nodeJoin=e.nodeJoin===undefined?5:e.nodeJoin;e.nodeBreakpoint=e.nodeBreakpoint===undefined?false:e.nodeBreakpoint;e.nodeMiddleShow=e.nodeMiddleShow===undefined?false:e.nodeMiddleShow;e.nodeMinZoom=(!e.nodeMinZoom||e.nodeMinZoom<3||e.nodeMinZoom>25)?6:e.nodeMinZoom;eb.call(this,e);if(e.nodeShow){var i=JSON.parse(JSON.stringify(e));i=Object.assign(i,{enablePicked:false,autoSelect:false,coorSysMc:true});this.attachNode=new aX(i)}hL.sendMessage(aZ(4,3,10),["layer","line"])}bY.Segment={START_POINT:1,END_POINT:2,BREAK_POINT:3,MIDDLE_POINT:4,1:1,2:2,3:3,4:4};bY.inherits(eb,"LineLayer");e6.extend(bY.prototype,{onAdd:function(e,i){if(this.attachNode){this.attachNode.onAdd(e,i)}if(!this.map){this.map=e;this.gl=i}if(!this.buffer){this.parseData()}},parseData:function(e){if(!this.loadModule||!this.styleExpress||!this.map||!this.map._normalLayerMgr){return}var T=this.getData();if(!T){return}var kv=this.dataset=this.formatData(T);this.dispatchEvent(new fS("ondataparsed"));var i=this.linesParse(kv.inner);this.lines=this.combineLine(i);if(!this.base_opt.nodeStrict){this.buffer=this.createBufferData(this.lines)}else{this.buffer=this.createBufferArrData(this.lines[0])}this.doOnceDraw()},linesParse:function(kI){var kA=[[],[]];var kx=0;var kE=-1;for(var kM=0;kM<kI.length;kM++){var kO=kI[kM].points;var ky=false;if(!(kO[0] instanceof cD)){ky=true}var kC=kI[kM].properties||{};var kv=kC.hasOwnProperty(this.base_opt.idKey)?kC[this.base_opt.idKey]:false;var kB=kM;var kG=-1;if(kI[kM].index!==undefined){kB=kI[kM].index}if(kI[kM].brotherIndex!==undefined){kG=kI[kM].brotherIndex}if(kE!==kB){kE=kB;kx=0}var kN=this.evaluates(kB,{properties:kC,id:kv});kN=Object.assign(JSON.parse(JSON.stringify(cy[this.type])),kN||{});if(this.base_opt.nodeStrict){kC.line_node_type=1;var kz=this.styleExpress.shapeType.evaluate(this.evaluateContext(kB,{properties:kC,id:kv}));kC.line_node_type=2;var kw=this.styleExpress.shapeType.evaluate(this.evaluateContext(kB,{properties:kC,id:kv}))}if(kN.borderWeight!==0){var e=this.getColorStyleForGL(kN.borderColor,undefined,false);if(kN.borderWeight<0){this.style_opt.borderMask=false}var kD=kN.strokeWeight/2+kN.borderWeight;if(kD>0){var kL=this.buildLineVertex(kN,kI[kM],ky,kD,e,kx);kA[0][kA[0].length]={index:kB,styleData:kL,textureKey:-1,texture:null,textureSize:null,zoomWithMap:true,start:aX.hasMask(kz),end:aX.hasMask(kw),overlay:{_config:{textureRepeat:true},_totalDashLen:null,}}}}var kJ=kN.strokeWeight/2;var kK=this.getColorStyleForGL(kN.strokeColor,kN.strokeOpacity,false);if(kG>-1&&this.style_opt.linksLine&&this.style_opt.strokeColorControl instanceof Function){var kF=this.style_opt.strokeColorControl(kB,kG);kK=this.getColorStyleForGL(kF,undefined,false)}var kL=this.buildLineVertex(kN,kI[kM],ky,kJ,kK,kx);var kF=this._generateTexture(kN)||{};var kH=kF.value||null;var T={index:kB,styleData:kL,textureKey:kF.key||-1,texture:kH?kH.texture:null,textureSize:kH?kH.textureSize:null,zoomWithMap:true,start:this.base_opt.nodeMask&&aX.hasMask(kz),end:this.base_opt.nodeMask&&aX.hasMask(kw),overlay:{_config:{textureRepeat:true},_totalDashLen:kH?kH.totalDashLen:null,}};if(this.style_opt.borderCovered&&!this.base_opt.nodeStrict){kA[1][kA[1].length]=T}else{kA[0][kA[0].length]=T}if(kL[0]&&kL[0][0] instanceof Array){kx=kL[0][0][kL[0][0].length-1]/10||0}}return kA},combineLine:function(kx){var kD=[];var kv=[];var kJ=[];for(var kz=0;kz<kx.length;kz++){var kF={};var ky=kx[kz];var T=-1;for(var kA=0;kA<ky.length;kA++){if(!this.base_opt.nodeStrict){if(!kF[ky[kA].textureKey]){kF[ky[kA].textureKey]=[{style:[],styleData:[[],[]],index:[]}]}this._mergeOnePolylineData(kF[ky[kA].textureKey],ky[kA])}else{var kI=ky[kA];if(T!==ky[kA].index){T=ky[kA].index;var kH=this.dataset.join[kI.index];if(!kH.properties){kH.properties={}}kH.properties.__index=ky[kA].index;this._onLine(kH,kv,kI.start,kI.end)}}}kD.push(kF)}if(kv.length>0){var kF={};for(var kA=0;kA<kv.length;kA++){var ky=kv[kA];if(!kF[kA+1]){kF[kA+1]={}}var kw=[];for(var kz=0;kz<ky.length;kz++){var kB=ky[kz].properties.__index;kw.push(kB);var kC=this._findLineIndex(kB,kx[0]);if(kC>=0){var kH=kx[0][kC];if(!kF[kA+1][kH.textureKey]){kF[kA+1][kH.textureKey]=[{style:[],styleData:[[],[]],index:[]}]}this._mergeOnePolylineData(kF[kA+1][kH.textureKey],kH);var e=kx[0][kC+1];if(e&&e.index===kB){if(!kF[kA+1][e.textureKey]){kF[kA+1][e.textureKey]=[{style:[],styleData:[[],[]],index:[]}]}this._mergeOnePolylineData(kF[kA+1][e.textureKey],e)}}}kJ.push(kw)}kD[0]=kF}if(this.attachNode){var kG=this._pointGeoFilter(this.getData());var kE=JSON.parse(JSON.stringify(this.params||{}));kE.nodeStrictIndex=kJ;this.attachNode.setData(kG,kE)}return kD},_findLineIndex:function(e,kv){for(var T=0;T<kv.length;T++){if(kv[T].index===e){return T}}return -1},_pointOnLine:function(kz,ky,e,kx){var kA=e[kx];if(kz.length>0){for(var kw=0;kw<kA.length;kw++){var kB=kA[kw];for(var kv=0;kv<kz.length;kv++){var T=eh.booleanDisjoint({type:"Feature",geometry:{coordinates:kz[kv],type:"Point",}},kB);if(!T){return true}}}}for(var kw=0;kw<kA.length;kw++){var kB=kA[kw];var kz=kB.properties.__nodes||[];if(kz.length>0){for(var kv=0;kv<kz.length;kv++){var T=eh.booleanDisjoint({type:"Feature",geometry:{coordinates:kz[kv],type:"Point",}},ky);if(!T){return true}}}}return false},_onLine:function(kv,e,kA,T){if(kv.geometry.type!=="LineString"){return -1}var kz=kv.geometry.coordinates;var ky=[];if(kA){ky.push(kz[0])}if(T){ky.push(kz[kz.length-1])}kv.properties.__nodes=ky;var kx=false;for(var kw=0;kw<e.length;kw++){kx=this._pointOnLine(ky,kv,e,kw);if(!kx){e[kw].push(kv);return kw}}e.push([kv]);return e.length-1},_mergeOnePolylineData:function(e,kG){var kE=e.length-1;var kw=e[kE];var i=e[kE]["styleData"][0];var kB=e[kE]["styleData"][1];var kC=10;for(var kv=0;kv<kG.styleData.length;kv++){var T=kG.styleData[kv];var kF=T[0];var ky=T[1];var kA=i.length/kC;var kD=kF.length/(kC-1);if(kA+kD>65536){kE++;kw=e[kE]={style:[],styleData:[[],[]],index:[],texture:null,textureSize:null,zoomWithMap:null,overlay:null};i=kw.styleData[0];kB=kw.styleData[1];kA=0}if(kw.styleData[0].length===0){kw.texture=kG.texture;kw.textureSize=kG.textureSize;kw.zoomWithMap=kG.zoomWithMap;kw.overlay=kG.overlay}kw.index[kw.index.length]=kG.index;for(var kz=0;kz<kD;kz++){i[i.length]=kF[kz*(kC-1)];i[i.length]=kF[kz*(kC-1)+1];i[i.length]=kF[kz*(kC-1)+2];i[i.length]=kF[kz*(kC-1)+3];i[i.length]=kF[kz*(kC-1)+4];i[i.length]=kF[kz*(kC-1)+5];i[i.length]=kF[kz*(kC-1)+6];i[i.length]=kF[kz*(kC-1)+7];i[i.length]=kF[kz*(kC-1)+8];i[i.length]=kG.index}for(var kx=0;kx<ky.length;kx++){kB[kB.length]=ky[kx]+kA}}},buildLineVertex:function(T,kI,kv,kw,kz,ky){var kB=[];var kF=[];var kH=[];var kC=kI.points;var kG=T.strokeLineCap;var e=T.strokeLineJoin;var kx=iQ.JOININDEX[e];var kE=iQ.CAPINDEX[kG];var kD=this._toFormatPolGeometry(kC,kv);for(var kA=0;kA<kD.length;kA++){if(kD[kA].length<2){continue}if(kB.length/6+gz.getVertexCount(kD[kA].length)>65536){kH.push([kB,kF]);kB=[];kF=[]}gz.buildData(kD[kA],kx,kE,kB,kF,kz,kw,undefined,ky)}kH.push([kB,kF]);return kH},createBuffer:function(i){var T=13;var e=[{name:"a_pos",components:2,offset:0,type:"Float32"},{name:"a_normal",components:2,offset:8,type:"Float32"},{name:"a_color",components:4,offset:16,type:"Uint8",normalize:true},{name:"a_data",components:4,offset:20,type:"Float32"},{name:"a_id",components:1,offset:36,type:"Float32"}];return new w(i,{components:T,members:e},w.BufferType.VERTEX)},createBufferArrData:function(kF){var kC=[];var kD=0;for(var kI in kF){if(!kF.hasOwnProperty(kI)){continue}var ky=kF[kI];var kH=[];for(var kv in ky){if(!ky.hasOwnProperty(kv)){continue}var kB=ky[kv];var kE=[];for(var kA=0;kA<kB.length;kA++){var kx=kB[kA].styleData[0];var kz=kB[kA].styleData[1];if(!kx||!kx.length){continue}if(!this._bufferArray[kE.length+kD]){this._bufferArray[kE.length+kD]={vertex:null,element1:null,vao1:null}}var kG=this._bufferArray[kE.length+kD];kG.textureKey=kv;kG.index=kB[kA].index;if(!kG.vertex){var kw=new Float32Array(kx.length);kw.set(kx);kG.vertex=this.createBuffer(kw)}var T=new Uint16Array(kz.length);T.set(kz);if(!kG.element1){kG.element1=new w(T,{components:1},w.BufferType.ELEMENT,kz.length)}if(!kG.vao1){kG.vao1=new dV()}var e=new Float32Array(kx);e.set(kx);kG.vao1.update(this.gl,kG.vertex,e,kx.length,kG.element1,T,kz.length);kE.push(kG)}kH.push(kE);kD+=kE.length}kC.push(kH)}return kC},createBufferData:function(kE){var kB=[];var kC=0;for(var ky=0;ky<kE.length;ky++){var kF=kE[ky];var kD=[];for(var kH in kF){if(!kF.hasOwnProperty(kH)){continue}var kA=kF[kH];for(var kz=0;kz<kA.length;kz++){var kw=kA[kz].styleData[0];var kx=kA[kz].styleData[1];if(!kw||!kw.length){continue}if(!this._bufferArray[kD.length+kC]){this._bufferArray[kD.length+kC]={vertex:null,element1:null,vao1:null}}var kG=this._bufferArray[kD.length+kC];kG.textureKey=kH;kG.index=kA[kz].index;if(!kG.vertex){var kv=new Float32Array(kw.length);kv.set(kw);kG.vertex=this.createBuffer(kv)}var T=new Uint16Array(kx.length);T.set(kx);if(!kG.element1){kG.element1=new w(T,{components:1},w.BufferType.ELEMENT,kx.length)}if(!kG.vao1){kG.vao1=new dV()}var e=new Float32Array(kw);e.set(kw);kG.vao1.update(this.gl,kG.vertex,e,kw.length,kG.element1,T,kx.length);kD.push(kG)}}kC+=kD.length;kB.push(kD)}return kB},_generateTexture:function(kv){if(kv.strokeTextureUrl){var kw=kv.strokeTextureUrl+"_"+kv.strokeWeight;if(this._texture[kw]){return{key:kw,value:this._texture[kw]}}var ky=kv.strokeTextureUrl;var kx=kv.strokeTextureWidth||16;var i=kv.strokeTextureHeight||16;var kz=kv.strokeWeight*Math.round(i/kx);var e={totalDashLen:kz,texture:ky,textureSize:[kx,i]};this._texture[kw]=e;return{key:kw,value:e}}if(kv.strokeStyle==="dashed"||kv.strokeStyle==="dotted"){var kw=[kv.strokeStyle,kv.strokeWeight,kv.strokeColor,kv.strokeOpacity,kv.dashArray.join(",")];kw=kw.join("-");if(this._texture[kw]){return{key:kw,value:this._texture[kw]}}kv.sync=true;var T=this;eh._generateTexture(null,kv,function(kB,kA){T._texture[kw]=kA});return{key:kw,value:this._texture[kw]}}return null},preRender:function(T,i,e){},render:function(kz,kv,ky){if(!this.buffer){return}ky=ky||{};this.pickModel=ky.isPickRender||false;var T=this.map._webglPainter;var e=T._state;if(this.base_opt.nodeShow&&this.attachNode){if(this.base_opt.nodeStrict){for(var kx=0;kx<this.buffer.length;kx++){ky.renderIndex=kx;for(var kw=0;kw<this.buffer[kx].length;kw++){this._renderItem(kz,T,this.buffer[kx][kw],kv,ky)}}}else{if(this.map.getZoom()>this.base_opt.nodeMinZoom&&this.base_opt.nodeMask){kz.clear(kz.STENCIL_BUFFER_BIT);kz.stencilFunc(kz.ALWAYS,1,255);e.stencilOp(kz.KEEP,kz.KEEP,kz.REPLACE);kz.stencilMask(255);e.colorMask(false,false,false,false);ky.isMask=true;this.attachNode.render(kz,kv,ky);kz.stencilFunc(kz.NOTEQUAL,1,255);kz.stencilMask(0);e.stencilOp(kz.KEEP,kz.KEEP,kz.KEEP);e.colorMask(true,true,true,true)}for(var kx=0;kx<this.buffer[0].length;kx++){this.drawLine(T,this.buffer[0][kx],false)}for(var kx=0;kx<this.buffer[1].length;kx++){this.drawLine(T,this.buffer[1][kx],false)}if(this.map.getZoom()>this.base_opt.nodeMinZoom){kz.clear(kz.STENCIL_BUFFER_BIT);kz.stencilMask(255);kz.stencilFunc(kz.ALWAYS,1,255);ky.isMask=false;this.attachNode.render(kz,kv,ky)}}return}if(this.buffer[0].length>0){if(this.style_opt.borderMask&&this.style_opt.borderCovered){kz.clear(kz.STENCIL_BUFFER_BIT);kz.stencilFunc(kz.ALWAYS,1,255);e.stencilOp(kz.KEEP,kz.KEEP,kz.REPLACE);kz.stencilMask(255);e.colorMask(false,false,false,false);for(var kx=0;kx<this.buffer[1].length;kx++){this.drawLine(T,this.buffer[1][kx],true)}kz.stencilFunc(kz.NOTEQUAL,1,255);kz.stencilMask(0);e.stencilOp(kz.KEEP,kz.KEEP,kz.KEEP);e.colorMask(true,true,true,true);for(var kx=0;kx<this.buffer[0].length;kx++){this.drawLine(T,this.buffer[0][kx],false)}kz.clear(kz.STENCIL_BUFFER_BIT);kz.stencilMask(255);kz.stencilFunc(kz.ALWAYS,1,255);for(var kx=0;kx<this.buffer[1].length;kx++){this.drawLine(T,this.buffer[1][kx],false,true)}return}else{for(var kx=0;kx<this.buffer[0].length;kx++){this.drawLine(T,this.buffer[0][kx],false)}}}for(var kx=0;kx<this.buffer[1].length;kx++){this.drawLine(T,this.buffer[1][kx],false)}},_renderItem:function(ky,i,kx,T,kw){var e=i._state;if(this.map.getZoom()>this.base_opt.nodeMinZoom&&this.base_opt.nodeMask){ky.clear(ky.STENCIL_BUFFER_BIT);ky.stencilFunc(ky.ALWAYS,1,255);e.stencilOp(ky.KEEP,ky.KEEP,ky.REPLACE);ky.stencilMask(255);e.colorMask(false,false,false,false);kw.isMask=true;this.attachNode.render(ky,T,kw);ky.stencilFunc(ky.NOTEQUAL,1,255);ky.stencilMask(0);e.stencilOp(ky.KEEP,ky.KEEP,ky.KEEP);e.colorMask(true,true,true,true)}for(var kv=0;kv<kx.length;kv++){this.drawLine(i,kx[kv],false)}if(this.map.getZoom()>this.base_opt.nodeMinZoom){ky.clear(ky.STENCIL_BUFFER_BIT);ky.stencilMask(255);ky.stencilFunc(ky.ALWAYS,1,255);kw.isMask=false;this.attachNode.render(ky,T,kw)}},traceControl:function(i){if(this.style_opt.traceControl instanceof Function){var e=this.style_opt.traceControl(i);if(e instanceof Array&&e.length===i.length){return e}}return[]},_formatArrayBuffer:function(kv,i){var e;if(i){e=new Int32Array(this.DEL_COUNT)}else{e=new Int16Array(this.DEL_COUNT)}if(kv&&kv.length){var T=0;for(;T<kv.length&&T<this.DEL_COUNT;T++){e[T]=parseInt(kv[T])}if(T<this.DEL_COUNT){e[T]=-1}}else{e[0]=-1}return e},drawLine:function(kP,kI,kM,kR){if(!kI.element1||(kI.element1&&kI.element1.length===0)){return}var kN=kP.gl;var kx=kP.programMgr.useProgram("linelayer",{def:this.def});var kC=this._texture[kI.textureKey];var kD=null;var kQ=0;var kF=this.map.getZoom();var kE=this;if(kC){var kG=kC.texture;if(kG instanceof HTMLCanvasElement||(window.ImageBitmap&&kG instanceof window.ImageBitmap)){if(!kC.glTexture){kC.glTexture=d1.utils.createTexture(kN,kG,{flipY:false,wrap:kN.REPEAT,mipmap:true,unpackAlpha:true})}kD=kC.glTexture}else{if(!kC.glTexture){kC.glTexture={status:"init"};var kT=new Image();kT.crossOrigin="anonymous";kT.onload=function(){kC.glTexture.texture=d1.utils.createTexture(kN,this,{flipY:false,wrap:kN.REPEAT,mipmap:true,unpackAlpha:true});kC.glTexture.status="done";kE.doOnceDraw()};kT.src=kG}if(kC.glTexture.status!=="done"){return}kD=kC.glTexture.texture}kP._state.activeTexture(kN.TEXTURE4);kN.bindTexture(kN.TEXTURE_2D,kD);if(kx.uniforms.lastSampler!==4){kN.uniform1i(kx.uniforms.u_image,4);kx.uniforms.lastSampler=4}kQ=kC.totalDashLen}var kv=this.opacity;if(kx.lastState.opacity!==kv){kN.uniform1f(kx.uniforms.u_opacity,kv);kx.lastState.opacity=kv}var ky=this.style_opt.sequence;if(kx.lastState.sequence!==ky){kN.uniform1i(kx.uniforms.u_sequence,ky);kx.lastState.sequence=ky}var T=this.style_opt.marginLength;if(kx.lastState.marginLength!==T){kN.uniform1f(kx.uniforms.u_margin_length,T);kx.lastState.marginLength=T}if(kx.lastState.dash!==kQ){kN.uniform1f(kx.uniforms.u_dash_length,kQ);kx.lastState.dash=kQ}if(kx.lastState.mapZoom!==kF){kN.uniform1f(kx.uniforms.u_map_zoom,kF);kx.lastState.mapZoom=kF}var kJ=kP._camera._modelViewMatrixLayer;if(!kx.lastState.projMatrix){kN.uniformMatrix4fv(kx.uniforms.u_proj_matrix,false,kP.projMatrix);kx.lastState.projMatrix=true}kN.uniformMatrix4fv(kx.uniforms.u_mv_matrix,false,kJ);var kS=Math.pow(2,18-this.map.getZoom());if(kx.lastState.scale!==kS){kN.uniform1f(kx.uniforms.u_scale,kS);kx.lastState.scale=kS}var kB=this.base_opt.isFlat;if(kx.lastState.isFlat!==kB){kN.uniform1i(kx.uniforms.u_flat,kB);kx.lastState.isFlat=kB}var kL=this.base_opt.drawPart||1;if(kx.lastState.drawPart!==kL){kN.uniform1i(kx.uniforms.u_draw_part,kL);kx.lastState.drawPart=kL}var kz=kP._camera._far||4000;if(kx.lastState.cameraFar!==kz){kN.uniform1f(kx.uniforms.u_camera_far,kz);kx.lastState.cameraFar=kz}kN.uniform1i(kx.uniforms.u_no_gradual,kR||false);var kH;if(!(this.style_opt.traceColor instanceof Array)||this.style_opt.traceColor.length<3){kH=[153,153,153]}else{kH=this.style_opt.traceColor.slice(0,3)}kN.uniform3fv(kx.uniforms.u_trace_color,kH);kN.uniform1i(kx.uniforms.u_trace_disappear,this.style_opt.traceDisappear||false);kN.uniform1i(kx.uniforms.u_pick_model,kM||this.pickModel);if(kx.lastState.selectColor!==this.select_color){kN.uniform4fv(kx.uniforms.u_pick_color,this.select_color);kx.lastState.selectColor=this.select_color}if(kx.lastState.pickTag!==this.selectedIndex){kN.uniform1i(kx.uniforms.u_pick_tag,this.selectedIndex+1);kx.lastState.pickTag=this.selectedIndex}var kO=new Int16Array(this.DEL_COUNT);if(this.delIndexs.length){for(var kK=0;kK<this.delIndexs.length&&kK<this.DEL_COUNT;kK++){kO[kK]=this.delIndexs[kK]}}kN.uniform1iv(kx.uniforms["u_del_tags[0]"],kO);var kw=this._formatArrayBuffer(kI.index);kN.uniform1iv(kx.uniforms["u_trace_index[0]"],kw);var e=this.traceControl(kI.index);var kA=this._formatArrayBuffer(e,true);kN.uniform1iv(kx.uniforms["u_trace_len[0]"],kA);kI.vao1.bind(kN,kx,kI.vertex,kI.element1);kN.drawElements(kN.TRIANGLES,kI.element1.length,kN.UNSIGNED_SHORT,0);tags=null},onDestroy:function(e,i){this.lines=null;this.buffer=null;this._bufferArray=[];this._texture={};eb.prototype.onDestroy.call(this);if(this.attachNode){this.attachNode.onDestroy()}},toString:function(){return"LineLayer"}});function ea(e){e=e||{};this.type="polygon";this.style_opt={fillColor:"#142655",fillOpacity:1,pattern:false,patternMask:true,patternUrl:"",patternMapping:"0, 0, 32, 32",patternScale:1,patternOffset:"0, 0"};this.setStyleOptions(e.style||{});this._bufferArray=[];this._texture=null;eb.call(this,e);e.border=e.border===undefined?true:e.border;if(e.border){var i=JSON.parse(JSON.stringify(e));i=Object.assign(i,{enablePicked:false,autoSelect:false});this.attach=new bY(i)}hL.sendMessage(aZ(4,3,11),["layer","fill"])}ea.inherits(eb,"FillLayer");e6.extend(ea.prototype,{onAdd:function(e,i){if(this.attach){this.attach.onAdd(e,i)}if(!this.map){this.map=e;this.gl=i}if(!this.buffer){this.parseData()}},parseData:function(e){if(!this.loadModule||!this.styleExpress||!this.map||!this.map._normalLayerMgr){return}var T=this.getData();if(!T){return}if(this.attach){if(e&&e instanceof cD){this.attach.center=e}this.attach.setData(T,this.params)}var kv=this.dataset=this.formatData(T);this.dispatchEvent(new fS("ondataparsed"));var i=this.fillsParse(kv.inner);this.fills=this.combineFill(i);this.buffer=this.createBufferData(this.fills);this.doOnceDraw()},fillsParse:function(kC){var kJ=[];for(var kB=0;kB<kC.length;kB++){var kA=kC[kB].points;var T=false;if(!(kA[0] instanceof cD)){T=true}var kG=kC[kB].properties||{};var kI=kG.hasOwnProperty(this.base_opt.idKey)?kG[this.base_opt.idKey]:false;var kx=kB;if(kC[kB].index!==undefined){kx=kC[kB].index}var e=this.evaluates(kx,{properties:kG,id:kI});e=Object.assign(JSON.parse(JSON.stringify(cy[this.type])),e||{});var kH=this.getColorStyleForGL(e.fillColor,e.fillOpacity,true).join(",");var kF=[];if(this.style_opt.pattern&&this.style_opt.patternUrl){kF=[e.patternMapping.split(","),e.patternScale,e.patternOffset.split(",")]}var kw=this.buildFillVertex(kA,T);var kE=kw[0].length/2*3;var ky=new Float32Array(kE);var kD=0;for(var kz=0;kz<kw[0].length;kz++){ky[kD]=kw[0][kz];kD++;if((kz+1)%2===0){ky[kD]=kx;kD++}}var kv=[kH,ky,kw[1],kF];kv.hasMultipleParts=T;kJ.push(kv)}return kJ},buildFillVertex:function(kv,e){var kB=this._toFormatPolGeometry(kv,e);var kC=[];var ky;var kz=[];var kx=0;for(var kw=0;kw<kB.length;kw++){if(kw>0){kx+=kB[kw-1].length}ky=hS(kB[kw].pointsArray,null,null,kx);for(var T=0,kA=ky.length;T<kA;T+=3){kC.push(ky[T],ky[T+1],ky[T+2])}kz=kz.concat(kB[kw].pointsArray)}var kD=[new Float32Array(kz),new Uint16Array(kC)];return kD},combineFill:function(T){var kA={};var e=[];for(var kx=0;kx<T.length;kx++){var kz=this._cloneFill(T[kx]);if(kz.hasMultipleParts){e.push(kz)}else{var kw=kz[0]+"_"+kz[3].join("-");if(kA[kw]){if((kA[kw][1].length+kz[1].length)/3<65536){this.mergeDataItem(kA[kw],kz,kA[kw][1].length/3)}else{e.push(this._cloneFill(kA[kw]));kA[kw]=kz}}else{kA[kw]=kz}}}var ky=Object.keys(kA);for(var kv=0;kv<ky.length;kv++){e.push(kA[ky[kv]])}return e},_cloneFill:function(kw){var kv=kw[1].constructor;var i=new kv(kw[1].length);i.set(kw[1],0);var kx=kw[2].constructor;var T=new kx(kw[2].length);T.set(kw[2],0);var e=[kw[0],i,T,kw[3]];if(kw.hasMultipleParts){e.hasMultipleParts=kw.hasMultipleParts}return e},mergeDataItem:function(e,kx,T){var i=e[1];var kw=kx[1];var kv=e[2];var ky=kx[2];e[1]=this.concatTypedArray(i,kw);e[2]=this.concatTypedArray(kv,ky,T);return e},concatTypedArray:function(e,ky,kx){if(e.constructor===ArrayBuffer){var kv=new Uint8Array(e.byteLength+ky.byteLength);kv.set(new Uint8Array(e),0);kv.set(new Uint8Array(ky),e.byteLength);return kv.buffer}else{var kw=e.constructor;var kv=new kw(e.length+ky.length);kv.set(e,0);if(kx){for(var T=0;T<ky.length;T++){ky[T]+=kx}}kv.set(ky,e.length);return kv}},createBuffer:function(i){var T=3;var e=[{name:"a_pos",components:2,offset:0,type:"Float32"},{name:"a_id",components:1,offset:8,type:"Float32"}];return new w(i,{components:T,members:e},w.BufferType.VERTEX)},createBufferData:function(kx){var ky=[];for(var T=0;T<kx.length;T++){var kw=kx[T][1];var e=kx[T][2];if(!kw||!kw.length){continue}if(!this._bufferArray[ky.length]){this._bufferArray[ky.length]={vertex:null,element1:null,vao1:null};var kv=this._bufferArray[ky.length];kv.vertex=this.createBuffer(kw);kv.element1=new w(e,{components:1},w.BufferType.ELEMENT,e.length);kv.vao1=new dV()}else{var kv=this._bufferArray[ky.length];kv.vao1.update(this.gl,kv.vertex,kw,kw.length,kv.element1,e,e.length)}ky.push(kv)}return ky},preRender:function(T,i,e){},render:function(kx,kz,e){if(!this.buffer){return}e=e||{};if(this.style_opt.pattern&&this.style_opt.patternUrl){if(!this._texture){this._texture={status:"init"};var kB=this;var kw=new Image();kw.crossOrigin="anonymous";kw.onload=function(){kB._texture=d1.utils.createTexture(kx,this,{flipY:true,wrap:kx.REPEAT,mipmap:false,unpackAlpha:true});kB._texture.size=[this.width,this.height];kB._texture.status="done";kB.doOnceDraw()};kw.src=this.style_opt.patternUrl}if(this._texture.status!=="done"){return}}this.pickModel=e.isPickRender||false;var kA=this.map._webglPainter;var kC=kA._state;for(var kv=0;kv<this.buffer.length;kv++){var T=this.fills[kv][0];T=T.split(",");T=[T[0]/255,T[1]/255,T[2]/255,parseFloat(T[3])];var ky=this.fills[kv][3];if(this.fills[kv].hasMultipleParts){kx.clear(kx.STENCIL_BUFFER_BIT);kx.stencilFunc(kx.NEVER,0,255);kC.stencilOp(kx.INVERT,kx.INVERT,kx.INVERT);kx.stencilMask(255);kC.colorMask(false,false,false,false);this.drawFill(kA,this.buffer[kv],T,ky);kx.stencilFunc(kx.EQUAL,255,255);kx.stencilMask(0);kC.stencilOp(kx.KEEP,kx.KEEP,kx.KEEP);kC.colorMask(true,true,true,true);this.drawFill(kA,this.buffer[kv],T,ky);kx.clear(kx.STENCIL_BUFFER_BIT);kx.stencilMask(255);kx.stencilFunc(kx.ALWAYS,1,255)}else{this.drawFill(kA,this.buffer[kv],T,ky)}}if(this.attach&&!this.pickModel){this.attach.render(kx,kz,e)}},drawFill:function(kL,kD,kE,kJ){if(kD.element1&&kD.element1.length===0){return}var kI=kL.gl;var kx=kL.programMgr.useProgram("filllayer",{def:this.def});var kF=kL._camera._modelViewMatrixLayer;if(!kx.lastState.projMatrix){kI.uniformMatrix4fv(kx.uniforms.u_proj_matrix,false,kL.projMatrix);kx.lastState.projMatrix=true}kI.uniformMatrix4fv(kx.uniforms.u_mv_matrix,false,kF);kI.uniform4fv(kx.uniforms.u_color,kE);var T=this.opacity;if(kx.lastState.opacity!==T){kI.uniform1f(kx.uniforms.u_opacity,T);kx.lastState.opacity=T}var ky=this.style_opt.pattern;if(ky&&this._texture){kL._state.activeTexture(kI.TEXTURE5);kI.bindTexture(kI.TEXTURE_2D,this._texture);if(kx.uniforms.lastSampler!==5){kI.uniform1i(kx.uniforms.u_image,5);kx.uniforms.lastSampler=5}var kB=this._texture.size;if(kx.lastState.size!==kB){kI.uniform2fv(kx.uniforms.u_size,kB);kx.lastState.size=kB}}if(kx.lastState.pattern!==ky){kI.uniform1i(kx.uniforms.u_pattern,ky);kx.lastState.pattern=ky}var kv=this.style_opt.patternMask;if(kx.lastState.patternMask!==kv){kI.uniform1i(kx.uniforms.u_pattern_mask,kv);kx.lastState.patternMask=kv}var kC=this.map.getZoom();if(kx.lastState.mapZoom!==kC){kI.uniform1f(kx.uniforms.u_map_zoom,kC);kx.lastState.mapZoom=kC}var e=kJ.length>=3?kJ[0]:[0,0,0,0];if(kx.lastState.bound!==e){kI.uniform4fv(kx.uniforms.u_bound,e);kx.lastState.bound=e}var kM=kJ.length>=3?kJ[1]:0;if(kx.lastState.scale!==kM){kI.uniform1f(kx.uniforms.u_scale,kM);kx.lastState.scale=kM}var kw=kJ.length>=3?kJ[2]:[0,0];if(kx.lastState.offset!==kw){kI.uniform2fv(kx.uniforms.u_offset,kw);kx.lastState.offset=kw}var kA=this.base_opt.isFlat;if(kx.lastState.isFlat!==kA){kI.uniform1i(kx.uniforms.u_flat,kA);kx.lastState.isFlat=kA}var kH=this.base_opt.drawPart||1;if(kx.lastState.drawPart!==kH){kI.uniform1i(kx.uniforms.u_draw_part,kH);kx.lastState.drawPart=kH}var kz=kL._camera._far||4000;if(kx.lastState.cameraFar!==kz){kI.uniform1f(kx.uniforms.u_camera_far,kz);kx.lastState.cameraFar=kz}kI.uniform1i(kx.uniforms.u_pick_model,this.pickModel);if(kx.lastState.selectColor!==this.select_color){kI.uniform4fv(kx.uniforms.u_pick_color,this.select_color);kx.lastState.selectColor=this.select_color}if(kx.lastState.pickTag!==this.selectedIndex){kI.uniform1i(kx.uniforms.u_pick_tag,this.selectedIndex+1);kx.lastState.pickTag=this.selectedIndex}var kK=new Int16Array(this.DEL_COUNT);if(this.delIndexs.length){for(var kG=0;kG<this.delIndexs.length&&kG<this.DEL_COUNT;kG++){kK[kG]=this.delIndexs[kG]}}kI.uniform1iv(kx.uniforms["u_del_tags[0]"],kK);kD.vao1.bind(kI,kx,kD.vertex,kD.element1);kI.drawElements(kI.TRIANGLES,kD.element1.length,kI.UNSIGNED_SHORT,0);tags=null},onDestroy:function(e,i){this.fills=null;this.buffer=null;this._bufferArray=[];this._texture=null;eb.prototype.onDestroy.call(this);if(this.attach){this.attach.onDestroy()}},toString:function(){return"FillLayer"}});function aX(e){e=e||{};this.type="point";this.style_opt={visibility:true,nodeType:aX.NodeType.SHAPE,shapeType:aX.ShapeType.TRIANGLE,anchor:aX.Anchor.CENTER,size:32,scale:1,rotation:0,offset:[0,0],color:"green",opacity:1,strokeColor:"red",strokeWeight:0};this.setStyleOptions(e.style||{});this._bufferArray=[];e.isFlat=e.isFlat===undefined?true:e.isFlat;eb.call(this,e);hL.sendMessage(aZ(4,3,9,2),["layer","point","shape"])}aX.Anchor={CENTER:0,TOP_LEFT:1,TOP_CENTER:2,TOP_RIGHT:3,RIGHT_CENTER:4,BOTTOM_RIGHT:5,BOTTOM_CENTER:6,BOTTOM_LEFT:7,LEFT_CENTER:8,0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8};aX.NodeType={ICON:1,SHAPE:2};aX.ShapeType={CIRCLE:0,TRIANGLE:2,CROSS:4,ARROW:5,ARROW_TAIL:6,0:0,2:2,4:4,5:5,6:6};aX.inherits(eb,"PointShapeLayer");aX.hasMask=function(e){if(e===aX.ShapeType.TRIANGLE||e===aX.ShapeType.ARROW){return true}else{return false}};e6.extend(aX.prototype,{onAdd:function(e,i){if(!this.map){this.map=e;this.gl=i}if(!this.buffer){this.parseData()}},parseData:function(){if(!this.loadModule||!this.styleExpress||!this.map||!this.map._normalLayerMgr){return}var kw=this.getData();if(!kw){return}var kx=this.dataset=this.formatData(kw);this.dispatchEvent(new fS("ondataparsed"));var ky=this.pointsParse(kx);this.buffer=[];var e=0;for(var T=0;T<ky.length;T++){var kv=this.combineVertex(ky[T]);this.buffer.push(this.createBufferData(kv,e));e+=kv.length}this.doOnceDraw()},preRender:function(T,i,e){},pointsParse:function(kz){var kG=kz.inner;var kB=[];var kH=this.params.nodeStrictIndex||[];for(var kA=0;kA<kG.length;kA++){var kF=kG[kA];var kC=kF.properties||{};var kE=kC.hasOwnProperty(this.base_opt.idKey)?kC[this.base_opt.idKey]:false;var kw=this.evaluates(kF.properties.index,{properties:kC,id:kE});kw=Object.assign(JSON.parse(JSON.stringify(cy[this.type])),kw||{});if(this.base_opt.nodeBreakpoint===false&&kC.line_node_type===3){continue}if(!kw.visibility){continue}var e=this._toFormatPointGeometry(kF.points,this.base_opt.coorSysMc);kw.position=e;kw.index=isNaN(kC.index)?kA:kC.index;kw.id=isNaN(kE)||kE===false?kA:kE;kw.anchor=aX.Anchor[kw.anchor]===undefined?"center":kw.anchor;kw.shapeType=aX.ShapeType[kw.shapeType]===undefined?0:kw.shapeType;if(kC.line_node_type===1&&this.base_opt.linkLine){kw.rotation-=180}kw.lineNodeType=kC.line_node_type||9;if(kC.startPoint){var ky=kC.startPoint.split(",");if(ky.length==2){var kv=new cD(parseFloat(ky[0]),parseFloat(ky[1]));var kx=this._toFormatPointGeometry(kv,this.base_opt.coorSysMc);kw.startPoint=kx}}if(kC.endPoint){var ky=kC.endPoint.split(",");if(ky.length==2){var kv=new cD(parseFloat(ky[0]),parseFloat(ky[1]));var kD=this._toFormatPointGeometry(kv,this.base_opt.coorSysMc);kw.endPoint=kD}}if(kH.length===0){if(!kB[0]){kB[0]=[]}kB[0].push(kw)}else{var T=this._findTargetGroup(kw.index,kH);if(T>=0){if(!kB[T]){kB[T]=[]}kB[T].push(kw)}}}return kB},_findTargetGroup:function(T,kw){for(var kv=0;kv<kw.length;kv++){for(var e=0;e<kw[kv].length;e++){if(kw[kv][e]===T){return kv}}}return -1},combineVertex:function(kB){var kE=[{vertex:[],indices:[]}];var kz=kE[kE.length-1].vertex;var kC=kE[kE.length-1].indices;for(var ky=0,kA=kB.length;ky<kA;ky++){var T=kB[ky];if((kz.length+16*4)>65536){kE.push({vertex:[],indices:[]});kz=kE[kE.length-1].vertex;kC=kE[kE.length-1].indices}for(var kx=0;kx<4;kx++){kz.push(T.position[0],T.position[1]);var kv=this.int8ArrayToFloat([T.anchor,kx,T.shapeType,T.lineNodeType]);kz.push(kv);kz.push(T.size,T.scale,T.rotation*Math.PI/180);kz.push(T.offset[0],T.offset[1]);var e=this.getColorStyleForGL(T.color,undefined,true);var kD=this.getColorStyleForGL(T.strokeColor,undefined,true);kz.push(this.rgb2value(e),T.opacity,this.rgb2value(kD),T.strokeWeight);if(T.startPoint){kz.push(T.startPoint[0],T.startPoint[1])}else{kz.push(0.1,0.1)}if(T.endPoint){kz.push(T.endPoint[0],T.endPoint[1])}else{kz.push(0.1,0.1)}kz.push(T.index,T.id)}var kw=(kC.length/6)*4;kC.push(kw,kw+2,kw+1,kw,kw+3,kw+2)}return kE},createBuffer:function(i){var T=18;var e=[{name:"a_pos",components:2,offset:0,type:"Float32"},{name:"a_shape",components:4,offset:8,type:"Uint8"},{name:"a_transform",components:3,offset:12,type:"Float32"},{name:"a_offset",components:2,offset:24,type:"Float32"},{name:"a_data",components:4,offset:32,type:"Float32"},{name:"a_start",components:2,offset:48,type:"Float32"},{name:"a_end",components:2,offset:56,type:"Float32"},{name:"a_index",components:1,offset:64,type:"Float32"},{name:"a_id",components:1,offset:68,type:"Float32"}];return new w(i,{components:T,members:e},w.BufferType.VERTEX)},createBufferData:function(ky,e){var kz=[];e=e||0;for(var kv=0;kv<ky.length;kv++){var kx=new Float32Array(ky[kv].vertex.length);kx.set(ky[kv].vertex);var T=new Uint16Array(ky[kv].indices.length);T.set(ky[kv].indices);if(!kx||!kx.length){continue}if(!this._bufferArray[kz.length+e]){this._bufferArray[kz.length+e]={vertex:null,element1:null,vao1:null};var kw=this._bufferArray[kz.length+e];kw.vertex=this.createBuffer(kx);kw.element1=new w(T,{components:1},w.BufferType.ELEMENT,T.length);kw.vao1=new dV()}else{var kw=this._bufferArray[kz.length+e];kw.vao1.update(this.gl,kw.vertex,kx,kx.length,kw.element1,T,T.length)}kz.push(kw)}return kz},render:function(kz,kv,ky){if(!this.buffer){return}ky=ky||{};this.pickModel=ky.isPickRender||false;var T=ky.isMask===undefined?false:ky.isMask;var e=this.map._webglPainter;if(ky.renderIndex!==undefined&&this.buffer.length>ky.renderIndex){for(var kw=0;kw<this.buffer[ky.renderIndex].length;kw++){this.drawPointShape(e,this.buffer[ky.renderIndex][kw],T)}}else{for(var kx=0;kx<this.buffer.length;kx++){for(var kw=0;kw<this.buffer[kx].length;kw++){this.drawPointShape(e,this.buffer[kx][kw],T)}}}},drawPointShape:function(kB,e,kw){if(e.element1&&e.element1.length===0){return}var T=kB.gl;var i=kB.programMgr.useProgram("pointshapelayer",{def:this.def});var kA=kB._camera._modelViewMatrixLayer;if(!i.lastState.projMatrix){T.uniformMatrix4fv(i.uniforms.u_proj_matrix,false,kB.projMatrix);i.lastState.projMatrix=true}T.uniformMatrix4fv(i.uniforms.u_mv_matrix,false,kA);var kv=this.map.getZoom();if(i.lastState.mapZoom!==kv){T.uniform1f(i.uniforms.u_map_zoom,kv);i.lastState.mapZoom=kv}var kz=kB._camera._far||4000;if(i.lastState.cameraFar!==kz){T.uniform1f(i.uniforms.u_camera_far,kz);i.lastState.cameraFar=kz}if(i.lastState.isMask!==kw){T.uniform1i(i.uniforms.u_mask,kw);i.lastState.isMask=kw}T.uniform1i(i.uniforms.u_pick_model,this.pickModel||false);var ky=[2/this.map.width,2/this.map.height];if(i.lastState.resolutionRatio!==ky){T.uniform2fv(i.uniforms.u_resolution_ratio,ky);i.lastState.resolutionRatio=ky}var kx=this.base_opt.isFlat;if(i.lastState.isFlat!==kx){T.uniform1i(i.uniforms.u_flat,kx);i.lastState.isFlat=kx}if(i.lastState.selectColor!==this.select_color){T.uniform4fv(i.uniforms.u_pick_color,this.select_color);i.lastState.selectColor=this.select_color}if(i.lastState.pickTag!==this.selectedIndex){T.uniform1i(i.uniforms.u_pick_tag,this.selectedIndex+1);i.lastState.pickTag=this.selectedIndex}e.vao1.bind(T,i,e.vertex,e.element1);T.drawElements(T.TRIANGLES,e.element1.length,T.UNSIGNED_SHORT,0)},onDestroy:function(e,i){this.buffer=null;this._bufferArray=[];eb.prototype.onDestroy.call(this)},toString:function(){return"PointShapeLayer"}});function gj(e){e=e||{};this.type="point";this.style_opt={visibility:true,nodeType:gj.NodeType.ICON,icon:"",iconObj:null,anchors:[0,0],sizes:[32,32],scale:1,rotation:0,offset:[0,0],opacity:1,};this._appendStyle={anchors:{format:"object",defaultValue:[0,0]},sizes:{format:"object",defaultValue:[32,32]},};this.setStyleOptions(e.style||{});this._bufferArray=[];e.isFlat=e.isFlat===undefined?true:e.isFlat;e.isFixed=e.isFixed===undefined?true:e.isFixed;e.refLevel=e.refLevel===undefined?18:e.refLevel;eb.call(this,e);hL.sendMessage(aZ(4,3,9,1),["layer","point","icon"])}gj.NodeType={ICON:1,SHAPE:2};gj.inherits(eb,"PointIconLayer");e6.extend(gj.prototype,{onAdd:function(i,T){if(!this.map){this.map=i;this.gl=T}if(!this.buffer){this.parseData()}var e=this;i.addEventListener("oniconupdate",function(kv){e.updateVertex()})},parseData:function(){if(!this.loadModule||!this.styleExpress||!this.map||!this.map._normalLayerMgr){return}var e=this.getData();if(!e){return}this.dataset=this.formatData(e);this.dispatchEvent(new fS("ondataparsed"));this.updateVertex()},updateVertex:function(){if(!this.dataset){return}var i=this.pointsParse(this.dataset);this.updateAllIconsTextureCoords(i[0]);var e=this;this.map._normalLayerMgr.loadIconImages(i[0],function(T){e.updateAllIconsTextureCoords(i[0])},true)},updateAllIconsTextureCoords:function(kx){var kz=[];for(var kv=0;kv<kx.length;kv++){var ky=kx[kv];if(this.map._webglMapScene){var T=this.map._webglMapScene._painter;if(ky.icon instanceof HTMLCanvasElement){var kw=ky.icon.id}else{var kw=ky.icon}if(T._iconTextureAtlasCoords[kw]){ky.texcoord=T._iconTextureAtlasCoords[kw];kz.push(ky)}}}this.buffer=[];var e=[{vertex:[],indices:[]}];for(var kv=0;kv<kz.length;kv++){this.combineVertex(kz[kv],e)}this.buffer.push(this.createBufferData(e));this.doOnceDraw()},preRender:function(T,i,e){},pointsParse:function(kv){var kC=kv.inner;var kx=[];for(var kw=0;kw<kC.length;kw++){var kA=kC[kw];var ky=kA.properties||{};var kz=ky.hasOwnProperty(this.base_opt.idKey)?ky[this.base_opt.idKey]:false;var T=this.evaluates(kA.properties.index,{properties:ky,id:kz});var kE=JSON.parse(JSON.stringify(cy[this.type]));if(this._appendStyle){for(var kB in this._appendStyle){kE[kB]=this._appendStyle[kB].defaultValue}}T=Object.assign(kE,T||{});if(this.base_opt.nodeBreakpoint===false&&ky.line_node_type===3){continue}if(!T.visibility){continue}var e=this._toFormatPointGeometry(kA.points,this.base_opt.coorSysMc);T.position=e;T.index=isNaN(ky.index)?kw:ky.index;T.id=isNaN(kz)||kz===false?kw:kz;if(!T.icon&&this.style_opt.iconObj&&this.style_opt.iconObj instanceof Function){var kD=this.style_opt.iconObj(T,ky);T.icon=kD.canvas;if(kD.id!==undefined){T.icon.id=this.guid+"_"+kD.id}else{T.icon.id=this.guid+"_"+T.id}}if(!kx[0]){kx[0]=[]}kx[0].push(T)}return kx},combineVertex:function(kw,e){var kv=e[e.length-1].vertex;var kx=e[e.length-1].indices;if((kv.length+14*4)>65536){e.push({vertex:[],indices:[]});kv=e[e.length-1].vertex;kx=e[e.length-1].indices}for(var T=3;T>=0;T--){kv.push(kw.position[0],kw.position[1]);kv.push(kw.sizes[0],kw.sizes[1],kw.anchors[0],kw.anchors[1]);kv.push(kw.scale,kw.rotation*Math.PI/180,4-T,kw.opacity);kv.push(kw.offset[0],kw.offset[1],kw.texcoord[T*2],kw.texcoord[T*2+1]);kv.push(kw.index,kw.id)}var i=(kx.length/6)*4;kx.push(i,i+2,i+1,i,i+3,i+2)},createBuffer:function(i){var T=14;var e=[{name:"a_pos",components:2,offset:0,type:"Float32"},{name:"a_shape",components:4,offset:8,type:"Float32"},{name:"a_style",components:4,offset:24,type:"Float32"},{name:"a_data",components:4,offset:40,type:"Float32"},{name:"a_index",components:1,offset:56,type:"Float32"},{name:"a_id",components:1,offset:60,type:"Float32"}];return new w(i,{components:T,members:e},w.BufferType.VERTEX)},createBufferData:function(kx){var ky=[];for(var T=0;T<kx.length;T++){var kw=new Float32Array(kx[T].vertex.length);kw.set(kx[T].vertex);var e=new Uint16Array(kx[T].indices.length);e.set(kx[T].indices);if(!kw||!kw.length){continue}if(!this._bufferArray[ky.length]){this._bufferArray[ky.length]={vertex:null,element1:null,vao1:null};var kv=this._bufferArray[ky.length];kv.vertex=this.createBuffer(kw);kv.element1=new w(e,{components:1},w.BufferType.ELEMENT,e.length);kv.vao1=new dV()}else{var kv=this._bufferArray[ky.length];kv.vao1.update(this.gl,kv.vertex,kw,kw.length,kv.element1,e,e.length)}ky.push(kv)}return ky},render:function(kz,kv,ky){if(!this.buffer){return}ky=ky||{};this.pickModel=ky.isPickRender||false;var T=ky.isMask===undefined?false:ky.isMask;var e=this.map._webglPainter;if(ky.renderIndex!==undefined&&this.buffer.length>ky.renderIndex){for(var kw=0;kw<this.buffer[ky.renderIndex].length;kw++){this.drawPointIcon(e,this.buffer[ky.renderIndex][kw],T)}}else{for(var kx=0;kx<this.buffer.length;kx++){for(var kw=0;kw<this.buffer[kx].length;kw++){this.drawPointIcon(e,this.buffer[kx][kw],T)}}}},drawPointIcon:function(kE,i,ky){if(i.element1&&i.element1.length===0){return}var kw=kE.gl;var kv=kE.programMgr.useProgram("pointiconlayer",{def:this.def});var kD=kE._camera._modelViewMatrixLayer;if(!kv.lastState.projMatrix){kw.uniformMatrix4fv(kv.uniforms.u_proj_matrix,false,kE.projMatrix);kv.lastState.projMatrix=true}kw.uniformMatrix4fv(kv.uniforms.u_mv_matrix,false,kD);var kx=this.map.getZoom();if(kv.lastState.mapZoom!==kx){kw.uniform1f(kv.uniforms.u_map_zoom,kx);kv.lastState.mapZoom=kx}var kC=kE._camera._far||4000;if(kv.lastState.cameraFar!==kC){kw.uniform1f(kv.uniforms.u_camera_far,kC);kv.lastState.cameraFar=kC}kw.uniform1i(kv.uniforms.u_pick_model,this.pickModel||false);var kB=[2/this.map.width,2/this.map.height];if(kv.lastState.resolutionRatio!==kB){kw.uniform2fv(kv.uniforms.u_resolution_ratio,kB);kv.lastState.resolutionRatio=kB}var kA=this.base_opt.isFlat;if(kv.lastState.isFlat!==kA){kw.uniform1i(kv.uniforms.u_flat,kA);kv.lastState.isFlat=kA}var e=this.base_opt.isFixed;if(kv.lastState.isFixed!==e){kw.uniform1i(kv.uniforms.u_fixed,e);kv.lastState.isFixed=e}var T=this.base_opt.refLevel;if(kv.lastState.refLevel!==T){kw.uniform1f(kv.uniforms.u_ref_level,T);kv.lastState.isFlat=T}if(kv.lastState.selectColor!==this.select_color){kw.uniform4fv(kv.uniforms.u_pick_color,this.select_color);kv.lastState.selectColor=this.select_color}if(kv.lastState.pickTag!==this.selectedIndex){kw.uniform1i(kv.uniforms.u_pick_tag,this.selectedIndex+1);kv.lastState.pickTag=this.selectedIndex}var kz=kE._iconTextureAtlas.getTexture();kE._state.activeTexture(kw.TEXTURE5);kw.bindTexture(kw.TEXTURE_2D,kz);if(kv.uniforms.lastSamper!==5){kw.uniform1i(kv.uniforms.u_sampler,5);kv.uniforms.lastSamper=5}i.vao1.bind(kw,kv,i.vertex,i.element1);kw.drawElements(kw.TRIANGLES,i.element1.length,kw.UNSIGNED_SHORT,0)},onDestroy:function(e,i){this.buffer=null;this._bufferArray=[];eb.prototype.onDestroy.call(this)},toString:function(){return"PointIconLayer"}});var he=null;bD.register(function(i){if(i.config&&i.config.isOverviewMap){return}if(i.isLoaded()){K(i);he=jB(i)}else{i.addEventListener("load",function(){K(this);he=jB(this)})}i.cityName="中国";i.cCode="1";var e={};e.enableRequest=true;e.request=function(){if(e.enableRequest){e.enableRequest=false;setTimeout(function(){e._request()},500)}};e._request=function(){var kv=i.getBoundsIn();if(!kv){return}var kx=i.getZoom();var T=kv.getSouthWest();var kw=kv.getNorthEast();ke.request(function(kB){if(kB.current_city["code"]>=9000&&kB.current_city["code"]<=9378){kB.current_city["name"]="台湾省"}if(kB.current_city["code"]>=20000&&kB.current_city["code"]<=20499){kB.current_city["name"]="新加坡"}if(kB.current_city["code"]>=20500&&kB.current_city["code"]<=25999){kB.current_city["name"]="泰国"}if(kB.current_city["code"]>=26000&&kB.current_city["code"]<=29999){kB.current_city["name"]="日本"}if(kB.current_city["code"]>=30000&&kB.current_city["code"]<=30999){kB.current_city["name"]="韩国"}if(kB.current_city["code"]>=31000&&kB.current_city["code"]<=37000){kB.current_city["name"]="亚太"}if(kB.current_city["code"]>=46609&&kB.current_city["code"]<=52505){kB.current_city["name"]="欧洲"}if(kB.current_city["code"]>=39509&&kB.current_city["code"]<=53500){kB.current_city["name"]="南美洲"}if(kB.current_city["code"]>=54000&&kB.current_city["code"]<=70000){kB.current_city["name"]="北美洲"}if(kB.current_city["code"]===54003&&kB.current_city["code"]>=60731&&kB.current_city["code"]<=61123){kB.current_city["name"]="美国"}if(kB.current_city["code"]===54015||kB.current_city["code"]>=57970&&kB.current_city["code"]<=60223){kB.current_city["name"]="加拿大"}if(kB.current_city["code"]===54025||kB.current_city["code"]>=54338&&kB.current_city["code"]<=57374){kB.current_city["name"]="墨西哥"}e.enableRequest=true;if(kB&&kB.current_city){var kA=kB.current_city["name"];var kz=kB.current_city["code"];if(kz!==i.cCode){var ky=new fS("oncitychange");ky.name=kA;ky.code=kz;i.dispatchEvent(ky)}i.cityName=kA;i.cCode=kz;if(!b2()){c7(i)}}},{qt:"cen",b:T.lng+","+T.lat+";"+kw.lng+","+kw.lat,l:kx},"","",true)};i.addEventListener("load",function(T){e.request()});i.addEventListener("moveend",function(T){e.request()});i.addEventListener("zoomend",function(T){e.request()});e.request()});function jB(T){var e={};var i=new kc(e);T.addControl(i);return i}function K(i){if(i.temp.copyadded){return}i.temp.copyadded=true;if(!i.cpyCtrl){var kv=new ji(2,2);i.config.cpyCtrlOffset=kv;if(b2()){kv.width=72;kv.height=0}var T=new gh({offset:kv,printable:true});i.cpyCtrl=T}if(!b2()){c7(i);i.addEventListener("maptypechange",function(){c7(i)})}i.addControl(T);var e=new bG();e._opts={printable:true};i.logoCtrl=e;i.addControl(e);i.addEventListener("resize",function(){if(this.getSize().width>=300&&i.getSize().height>=100){e.show();T.setOffset(i.config.cpyCtrlOffset)}else{e.hide();T.setOffset(new ji(4,2))}});if(i.getSize().width>=300&&i.getSize().height>=100){e.show()}else{e.hide();T.setOffset(new ji(4,2))}i.addEventListener("oncopyrightoffsetchange",function(kw){i.logoCtrl.setOffset(kw.target.logo);i.cpyCtrl.setOffset(kw.target.cpy)});i.dispatchEvent(new fS("oncopyrightaddend"))}function c7(kK){if(!kK.cpyCtrl){var kS=new ji(2,2);if(b2()){kS.width=72;kS.height=0}var kN=new gh({offset:kS,printable:true});kK.cpyCtrl=kN}var k1=kK.cityName||"中国";var kL=kK.getMapType();var kM=["常州市","南昌市","乌鲁木齐市","无锡市","福州市","泉州市","珠海市","贵阳市"];var kE=["北京市","上海市","广州市","深圳市","宁波市","石家庄市","沈阳市","长春市","青岛市","温州市","台州市","金华市","佛山市","中山市","昆明市","南宁市","苏州市","西安市","济南市","郑州市","合肥市","呼和浩特市","杭州市","成都市","武汉市","长沙市","天津市","南京市","重庆市","大连市","东莞市","厦门市"];var kG=["香港特别行政区"];var kA=["台湾省"];var kT=["日本"];var kZ=["韩国"];var kO=["泰国"];var kR=["亚太"];var kB=["新加坡"];var k0=["欧洲"];var kv=["南美洲"];var kW=["北美洲"];var T=["美国"];var kQ=["墨西哥"];var ky=["加拿大"];for(var kX in kM){if(kM[kX]===k1){var kH=true;break}}for(var kX in kE){if(kE[kX]===k1){var kw=true;break}}for(var kX in kG){if(kG[kX]===k1){var k3=true;break}}if(kA[0]===k1){var kV=true}if(kB[0]===k1){var i=true}if(kT[0]===k1){var kD=true}if(kZ[0]===k1){var kJ=true}if(kO[0]===k1){var kI=true}if(kR[0]===k1){var kz=true}if(k0[0]===k1){var kF=true}if(kv[0]===k1){var kC=true}if(kW[0]===k1){var e=true}if(T[0]===k1){var kY=true}if(ky[0]===k1){var kU=true}if(kQ[0]===k1){var kx=true}var k2=["&copy;&nbsp;2023 Baidu - GS(2023)3206号 - 甲测资字11111342 - 京ICP证030173号 - Data &copy; "];var kP="rgba(255, 255, 255, 0.701961)";if(kK.getZoom()<=9){k2=["&copy;&nbsp;2023 Baidu - GS(2023)3206号 - 甲测资字11111342 - 京ICP证030173号 - Data &copy; "]}else{if(kV){k2=["&copy;&nbsp;2023 Baidu - GS(2023)3206号 - 甲测资字11111342 - 京ICP证030173号 - Data &copy; "]}else{if(kD||kJ){k2=["&copy;&nbsp;2023 Baidu - GS(2023)3206号 - 甲测资字11111342 - 京ICP证030173号 - Data &copy; "]}else{if(i||kI){k2=["&copy;&nbsp;2023 Baidu - GS(2023)3206号 - 甲测资字11111342 - 京ICP证030173号 - Data &copy; "]}else{if(kz){k2=["&copy;&nbsp;2023 Baidu - GS(2023)3206号 - 甲测资字11111342 - 京ICP证030173号 - Data &copy; "]}else{if(kF){k2=["&copy;&nbsp;2023 Baidu - GS(2023)3206号 - 甲测资字11111342 - 京ICP证030173号 - Data &copy; "]}else{if(kC){k2=["&copy;&nbsp;2023 Baidu - GS(2023)3206号 - 甲测资字11111342 - 京ICP证030173号 - Data &copy; "]}else{if(e){k2=["&copy;&nbsp;2023 Baidu - GS(2023)3206号 - 甲测资字11111342 - 京ICP证030173号 - Data &copy; "]}}}}}}}}if(kK.getZoom()<=9){k2.push("百度智图");k2.push(' &amp; <a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>');k2.push(' &amp; <a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>');if(kL===BMAP_SATELLITE_MAP||kL===BMAP_HYBRID_MAP){k2.push(' &amp; <a target="_blank" href="http://www.eso.org/public/">ESO</a>');kP="rgba(0,0,0,.7)"}}else{if(kD||kJ){k2.push('<a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>')}else{if(i||kI){k2.push('<a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>')}else{if(kz){k2.push('<a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>');k2.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>')}else{if(kF){k2.push('<a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>');k2.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>')}else{if(kC){k2.push('<a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>');k2.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>')}else{if(kY||kx||kU){k2.push('<a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>');k2.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>')}else{if(e){k2.push('<a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>');k2.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>')}else{k2.push("百度智图");if(kH){k2.push(' &amp; <a target="_blank" href="http://www.palmcity.cn/palmcity/">PalmCity</a>')}if(k3){k2.push(' &amp; <a target="_blank" href="http://www.mapking.com/HongKong/eng/home/MapKing_Webmap.html">MapKing</a>')}if(kV){k2.push(' &amp; <a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>');k2.push(' &amp; <a target="_blank" href="http://www.localking.com.tw/about/localking.aspx">樂客LocalKing</a>')}if(kL===BMAP_SATELLITE_MAP||kL===BMAP_HYBRID_MAP){kP="rgba(0,0,0,.7)"}}}}}}}}}k2.unshift('<span style="background: '+kP+';padding: 0px 1px;line-height: 16px;display: inline;height: 16px;">');k2.push("</span>");k2=k2.join("");kK.cpyCtrl.addCopyright({id:1,content:k2})}function kc(e){this["defaultAnchor"]=BMAP_ANCHOR_TOP_RIGHT;this["defaultOffset"]=e.defaultOffset||new ji(90,6);this._cZIndex=9999;this._visible=false}kc.prototype=new gU();kc.prototype.initialize=function(kw){this._map=kw;var kv=this;var e=b3("div");var i=e.style;i.left=i.top="50%";i.display="none";i.padding="24px";i.overflow="visible";i.position="absolute";i.width="50%";i.maxWidth="360px";i.transform="translate(-50% , -50%)";i.zIndex="9999";i.background="#fff";i.userSelect="none";var kx=b3("span",{style:"margin-top: 12px;\n    margin-bottom: -12px;\n    margin-left: calc(100% - 48px);\n    width: 56px;\n    height: 32px;\n    font-size: 14px;\n    text-align: center;\n    line-height: 32px;\n    display: block;\n    cursor: pointer;\n    background: #3894FF;\n    border: solid 1px #3f51b53b;\n    color: #fff;\n    border-radius: 3px;"});kx.innerText="确定";kx.addEventListener("click",function(){kv.hide()});var T=b3("div");var ky=T.style;ky.position="relative";ky.width="100%";ky.height="100%";ky.color="#000";ky.fontSize="14px";ky.wordBreak="break-all";e.appendChild(T);e.appendChild(kx);kw.getContainer().appendChild(e);return e};kc.prototype._setPosition=function(){};kc.prototype.update=function(e){if(!this.isVisible()){this._container.firstChild.innerText=e;this.show()}};window.BMAP_STATUS_SUCCESS=0;window.BMAP_STATUS_CITY_LIST=1;window.BMAP_STATUS_UNKNOWN_LOCATION=2;window.BMAP_STATUS_UNKNOWN_ROUTE=3;window.BMAP_STATUS_INVALID_KEY=4;window.BMAP_STATUS_INVALID_REQUEST=5;window.BMAP_STATUS_PERMISSION_DENIED=6;window.BMAP_STATUS_SERVICE_UNAVAILABLE=7;window.BMAP_STATUS_TIMEOUT=8;window.BMAP_ROUTE_TYPE_WALKING=2;window.BMAP_ROUTE_TYPE_DRIVING=3;window.BMAP_ROUTE_TYPE_RIDING=6;window.BMAP_ROUTE_STATUS_NORMAL=0;window.BMAP_ROUTE_STATUS_EMPTY=1;window.BMAP_ROUTE_STATUS_ADDRESS=2;var B="carport_list";var d0="carport_auth";var dk="cur";var aa="cen";var J="s";var dD="con";var dv="bd";var cX="nb";var hd="bt";var aP="nav";var ip="walk";var f1="gc";var d4="rgc";var L="dec";var iH="iploc";var gV="bse";var gq="nse";var dh="s";var ew="bsl";var fY="bda";var et="sa";var bb="nba";var ix="drag";var jj="ext";var jX="exts";var j0="hip";var hP="ride";var kb="drct";var b7="ldt";var fx=2;var bk=4;var f8=7;var iy=11;var ce=12;var e1=14;var cU=15;var ek=18;var aB=20;var ba=21;var I=19;var a=23;var iT=26;var aD=28;var gr=31;var fd=35;var iI=44;var bi=45;var ay=46;var jV=47;var gw=-1;var bd=0;var bC=1;var jo=2;var dT=3;window.BMAP_POI_TYPE_NORMAL=0;var cH=1;var iA=2;BMapGL.I=e6.I;var bM={};bM.removeHtml=function(e){e=e.replace(/<\/?[^>]*>/g,"");e=e.replace(/[ | ]* /g," ");return e};bM.parseGeoExtReg1=function(e){return e.replace(/([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*),([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*)(,)/g,"$1,$2;")};bM.parseGeoExtReg2=function(i,e){var T=new RegExp("(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){"+e+"}","ig");return i.replace(T,"$1")};var dL=0;var dj=1;var U=2;bM.unique=function(T){var kx=false;var kw=[];var ky={};for(var kv=0,e=T.length;kv<e;kv++){if(!ky[T[kv]]){ky[T[kv]]=true;kw.push(T[kv])}}return kw};bM.getBestLevel=function(T,i){if(i){var e=Math.min(i.width/1100,i.height/660);T=Math.round(T+(Math.log(e)/Math.log(2)))}if(T<1){T=1}if(T>21){T=21}return T};bM.parseGeo=function(ky,kB){if(typeof ky!="string"||!ky){return}var kD=ky.split("|");var e;var kw;var T;if(kD.length==1){e=b8(ky)}else{e=b8(kD[2]);kw=b8(kD[0]);T=b8(kD[1]);if(!kB){return e}}var kz={type:e.geoType};if(kB){switch(kz.type){case U:var kA=new cD(e.geo[0][0],e.geo[0][1]);var kC=jr.convertMC2LL(kA);kz.point=kC;kz.points=[kC];break;case dj:kz.points=[];var kE=e.geo[0];for(var kx=0,kv=kE.length-1;kx<kv;kx+=2){var kF=new cD(kE[kx],kE[kx+1]);kF=jr.convertMC2LL(kF);kz.points.push(kF)}kw=new cD(kw.geo[0][0],kw.geo[0][1]);T=new cD(T.geo[0][0],T.geo[0][1]);kw=jr.convertMC2LL(kw);T=jr.convertMC2LL(T);kz.bounds=new ie(kw,T);break;default:break}}return kz};bM.parseGeoExt=function(kO,kF){if(!kF){kF=0}else{if(kF<0.25){kF=0}else{if(kF>0.25&&kF<1){kF=1}else{if(kF>32){kF=32}}}}var kA=kO.split("|");if(kA.length==1){var kv=b8(kA[0]);return{type:kv.type,bound:"",points:kv.geo.join(",")}}else{if(kA.length>1){var kG=kO.split(";.=");var kC=[];var kw=[];var kH=0;var kL=kG.length;for(var kI=0;kI<kL;kI++){var kN=kG[kI];if(kL>1){if(kI==0){kN=kN+";"}if(kI>0&&kI<kL-1){kN=".="+kN+";"}if(kI==kL-1){kN=".="+kN}}var kx=kN.split("|");var kK=b8(kx[0]);var kJ=b8(kx[1]);kC.push(kK.geo.join(","));kC.push(kJ.geo.join(","));var kv=b8(kx[2]);kH=kv.type;var kM=kv.geo.join(",");kM=bM.parseGeoExtReg1(kM);if(kF>0){kM=bM.parseGeoExtReg2(kM,kF)}kw.push(kM)}if(kL<=1){kw=kw.join(";")}if(kL==2){var T=kw[0]+";"+kw[1];var ky=T.split(";");var e=[];for(var kI=0;kI<ky.length;kI++){var kB=ky[kI].split(",")[0];var kz=ky[kI].split(",")[1];var kD=new cD(kB,kz);var kE=jr.convertMC2LL(kD);e.push(kE)}kw=e}return{type:kH,bound:kC.join(";"),points:kw}}}};bM.getPoiPoint=function(e){var T=[];var i=null;if(e.toString()=="Point"){i=e}else{if(typeof e=="string"){T=e6.trim(e).split(",");if(T.length<2){return}T[0]=parseFloat(e6.trim(T[0]));T[1]=parseFloat(e6.trim(T[1]))}else{T=e.slice(0);if(T.length<2){return}}i=new BMap.Point(T[0],T[1])}return i};bM.parseGeoStr=function(T){var i=T.split(",");var e=new cD(i[0],i[1]);return jr.convertMC2LL(e)};bM.level={country:4,province:11,city:12,area:13};var hr=["=",".","-","*"];var df=1<<23;function b8(kB){var kA=ia(kB.charAt(0));var T=kB.substr(1);var kD=0;var e=T.length;var kE=[];var ky=[];var kz=[];while(kD<e){if(T.charAt(kD)==hr[0]){if((e-kD)<13){return 0}kz=ej(T.substr(kD,13),kE);if(kz<0){return 0}kD+=13}else{if(T.charAt(kD)==";"){ky.push(kE.slice(0));kE.length=0;++kD}else{if((e-kD)<8){return 0}kz=ck(T.substr(kD,8),kE);if(kz<0){return 0}kD+=8}}}for(var kx=0,kv=ky.length;kx<kv;kx++){for(var kw=0,kC=ky[kx].length;kw<kC;kw++){ky[kx][kw]/=100}}return{geoType:kA,geo:ky}}function ia(i){var e=-1;if(i==hr[1]){e=U}else{if(i==hr[2]){e=dj}else{if(i==hr[3]){e=dL}}}return e}function ej(kw,T){var e=0;var ky=0;var kx=0;for(var kv=0;kv<6;kv++){kx=dC(kw.substr(1+kv,1));if(kx<0){return -1-kv}e+=kx<<(6*kv);kx=dC(kw.substr(7+kv,1));if(kx<0){return -7-kv}ky+=kx<<(6*kv)}T.push(e);T.push(ky);return 0}function ck(kx,kv){var T=kv.length;if(T<2){return -1}var e=0;var kz=0;var ky=0;for(var kw=0;kw<4;kw++){ky=dC(kx.substr(kw,1));if(ky<0){return -1-kw}e+=ky<<(6*kw);ky=dC(kx.substr(4+kw,1));if(ky<0){return -5-kw}kz+=ky<<(6*kw)}if(e>df){e=df-e}if(kz>df){kz=df-kz}kv.push(kv[T-2]+e);kv.push(kv[T-1]+kz);return 0}function dC(i){var e=i.charCodeAt(0);if(i>="A"&&i<="Z"){return e-"A".charCodeAt(0)}else{if(i>="a"&&i<="z"){return(26+e-"a".charCodeAt(0))}else{if(i>="0"&&i<="9"){return(52+e-"0".charCodeAt(0))}else{if(i=="+"){return 62}else{if(i=="/"){return 63}}}}}return -1}bM.pathToPoints=function(kx){var kv=[];if(typeof kx!=="string"){return kv}else{var kw=kx.split(";");for(var T=0;T<kw.length;T++){var e=kw[T].split(",");kv.push(new cD(e[0],e[1]))}}return kv};bM.pointsToString=function(kw){var kv="";if(typeof kw!=="object"){return kw}else{for(var T=0;T<kw.length;T++){var e=kw[T].lat+","+kw[T].lng;if(T!==kw.length-1){kv=kv+e+"|"}else{kv=kv+e}}}return kv};bM.stringToPoints=function(kx){var kv=[];if(typeof kx!=="string"||!kx){return kv}else{var kw=kx.split("|");for(var T=0;T<kw.length;T++){var e=kw[T].split(",");kv.push(new cD(e[1],e[0]))}}return kv};window.BMAP_POI_TYPE_NORMAL=0;window.BMAP_POI_TYPE_BUSSTOP=1;window.BMAP_POI_TYPE_BUSLINE=2;window.BMAP_POI_TYPE_SUBSTOP=3;window.BMAP_POI_TYPE_SUBLINE=4;var R=0;var hU=1;var fM={};window.APIPack=fM;function aI(i,e){de.call(this);this._loc={};this.setLocation(i);e=e||{};e.renderOptions=e.renderOptions||{};this._opts={renderOptions:{panel:e.renderOptions.panel||null,map:e.renderOptions.map||null,autoViewport:e.renderOptions.autoViewport||true,selectFirstResult:e.renderOptions.selectFirstResult,highlightMode:e.renderOptions.highlightMode,enableDragging:e.renderOptions.enableDragging||false},onSearchComplete:e.onSearchComplete||function(){},onMarkersSet:e.onMarkersSet||function(){},onInfoHtmlSet:e.onInfoHtmlSet||function(){},onResultsHtmlSet:e.onResultsHtmlSet||function(){},onGetBusListComplete:e.onGetBusListComplete||function(){},onGetBusLineComplete:e.onGetBusLineComplete||function(){},onBusListHtmlSet:e.onBusListHtmlSet||function(){},onBusLineHtmlSet:e.onBusLineHtmlSet||function(){},onPolylinesSet:e.onPolylinesSet||function(){},reqFrom:e.reqFrom||""};if(typeof e!="undefined"&&typeof e.renderOptions!="undefined"&&typeof e.renderOptions["autoViewport"]!="undefined"){this._opts.renderOptions.autoViewport=e.renderOptions["autoViewport"]}else{this._opts.renderOptions.autoViewport=true}this._opts.renderOptions.panel=e6.G(this._opts.renderOptions.panel)}aI.inherits(de,"BaseSearch");e6.extend(aI.prototype,{getResults:function(){if(!this._isMultiKey){return this._results}else{return this._arrResults}},enableAutoViewport:function(){this._opts.renderOptions.autoViewport=true},disableAutoViewport:function(){this._opts.renderOptions.autoViewport=false},setLocation:function(e){if(!e){return}this._loc.src=e},setSearchCompleteCallback:function(e){this._opts.onSearchComplete=e||function(){}},setMarkersSetCallback:function(e){this._opts.onMarkersSet=e||function(){}},setPolylinesSetCallback:function(e){this._opts.onPolylinesSet=e||function(){}},setInfoHtmlSetCallback:function(e){this._opts.onInfoHtmlSet=e||function(){}},setResultsHtmlSetCallback:function(e){this._opts.onResultsHtmlSet=e||function(){}},getStatus:function(){return this._status}});var cG=function(T,i){aI.call(this,T,i);i=i||{};i.renderOptions=i.renderOptions||{};this.setPageCapacity(i.pageCapacity);if(typeof i.renderOptions["selectFirstResult"]!="undefined"&&!i.renderOptions["selectFirstResult"]){this.disableFirstResultSelection()}else{this.enableFirstResultSelection()}this._overlays=[];this._arrPois=[];this._curIndex=-1;this._queryList=[];var e=this;hh.load("localSearch",function(){e._check()},true)};cG.inherits(aI,"LocalSearch");cG.DEFAULT_PAGE_CAPACITY=10;cG.MIN_PAGE_CAPACITY=1;cG.MAX_PAGE_CAPACITY=100;cG.DEFAULT_RADIUS=2000;cG.MAX_RADIUS=100000;e6.extend(cG.prototype,{search:function(e,i){this._queryList.push({method:"search",arguments:[e,i]});hL.sendMessage(aZ(4,4,6,1),["service","poi","normal"])},searchInBounds:function(e,T,i){this._queryList.push({method:"searchInBounds",arguments:[e,T,i]});hL.sendMessage(aZ(4,4,6,2),["service","poi","bound"])},searchNearby:function(T,i,e,kv){this._queryList.push({method:"searchNearby",arguments:[T,i,e,kv]});hL.sendMessage(aZ(4,4,6,3),["service","poi","circle"])},clearResults:function(){delete this._json;delete this._status;delete this._results;delete this._ud;this._curIndex=-1;this._setStatus();if(this._opts.renderOptions.panel){this._opts.renderOptions.panel.innerHTML=""}},gotoPage:function(){},enableFirstResultSelection:function(){this._opts.renderOptions.selectFirstResult=true},disableFirstResultSelection:function(){this._opts.renderOptions.selectFirstResult=false},setPageCapacity:function(e){if(typeof e=="number"&&!isNaN(e)){this._opts.pageCapacity=e<1?cG.DEFAULT_PAGE_CAPACITY:(e>cG.MAX_PAGE_CAPACITY?cG.DEFAULT_PAGE_CAPACITY:e)}else{this._opts.pageCapacity=cG.DEFAULT_PAGE_CAPACITY}},getPageCapacity:function(){return this._opts.pageCapacity},toString:function(){return"LocalSearch"}});function bl(i){this._opts={};e6.extend(this._opts,i);this._queryList=[];var e=this;hh.load("otherSearch",function(){e._asyncSearch()})}bl.inherits(de,"Geocoder");e6.extend(bl.prototype,{getPoint:function(e,T,i){this._queryList.push({method:"getPoint",arguments:[e,T,i]})},getLocation:function(e,T,i){this._queryList.push({method:"getLocation",arguments:[e,T,i]})},toString:function(){return"Geocoder"}});function c2(e){e=e||{};this.config={timeout:e.timeout||1000*10,maximumAge:e.maximumAge||0,enableHighAccuracy:e.enableHighAccuracy===undefined?true:e.enableHighAccuracy,SDKLocation:e.SDKLocation||false};this._pendingCalls=[];var i=this;hh.load("otherSearch",function(){var T=i._pendingCalls.length;for(var kv=0;kv<T;kv++){var kw=i._pendingCalls[kv];i[kw.method].apply(i,kw.arguments)}})}e6.extend(c2.prototype,{getCurrentPosition:function(e,i){this._pendingCalls.push({method:"getCurrentPosition",arguments:arguments})},getStatus:function(){return BMAP_STATUS_UNKNOWN_LOCATION},enableSDKLocation:function(){if(b2()){this.config.SDKLocation=true}},disableSDKLocation:function(){this.config.SDKLocation=false}});function ft(){this._queryList=[];var e=this;hh.load("otherSearch",function(){e._asyncSearch()})}ft.inherits(de,"Boundary");e6.extend(ft.prototype,{get:function(i,e){this._queryList.push({method:"get",arguments:[i,e]})},toString:function(){return"Boundary"},parsebdStr:function(i,e){}});function fm(i){i=i||{};i.renderOptions=i.renderOptions||{};this._opts={renderOptions:{map:i.renderOptions.map||null}};this._queryList=[];var e=this;hh.load("otherSearch",function(){e._asyncSearch()})}fm.inherits(de,"LocalCity");e6.extend(fm.prototype,{get:function(e){this._queryList.push({method:"get",arguments:[e]})},toString:function(){return"LocalCity"}});function hu(e,T){de.call(this);this.markersList=[];this.destList=[];this.pointsList=[];this._opts=T;this.json=e;this.map=this._opts.renderOptions.map||null;this.sType=this._opts.sType;this.infoWindow=null;this.curPointIndex=0;this.startName="";this.endIndex=1;this.endName="";this.resCity=[0,0,0,0,0,0,0];this.locPois=[];this.curPageIndex=[1,1,1,1,1,1,1];this.totalPage=[1,1,1,1,1,1,1];this.resCount=[0,0,0,0,0,0,0];this.resType=[0,0,0,0,0,0,0];this.qInfo=[{n:"",c:0,u:0,x:0,y:0,t:-1},{n:"",c:0,u:0,x:0,y:0,t:-1},{n:"",c:0,u:0,x:0,y:0,t:-1},{n:"",c:0,u:0,x:0,y:0,t:-1},{n:"",c:0,u:0,x:0,y:0,t:-1},{n:"",c:0,u:0,x:0,y:0,t:-1},{n:"",c:0,u:0,x:0,y:0,t:-1}];this.curSelectedIndex=-1;this.tpList=[];this.tpListInMap=[];var i=this;hh.load("route",function(){})}hu.inherits(de,"RouteAddr");function eG(T,i){aI.call(this,T,i);this.QUERY_TYPE_BUSLIST=dh;this.RETURN_TYPE_BUSLIST=cU;this.QUERY_TYPE_BUSLINE=ew;this.RETURN_TYPE_BUSLINE=ek;this._queryList=[];var e=this;hh.load("buslineSearch",function(){e._asyncSearch()})}var fK=C.staticHost+"/wolfman/static/common/images/";eG._iconOpen=C.apiIMG+"/iw_plus.gif";eG._iconClose=C.apiIMG+"/iw_minus.gif";eG._stopUrl=fK+"new/bus-stop-1x_ddd4723.png";eG.inherits(aI,"BusLineSearch");e6.extend(eG.prototype,{getBusList:function(e){this._queryList.push({method:"getBusList",arguments:[e]})},getBusLine:function(e){this._queryList.push({method:"getBusLine",arguments:[e]})},setGetBusListCompleteCallback:function(e){this._opts.onGetBusListComplete=e||function(){}},setGetBusLineCompleteCallback:function(e){this._opts.onGetBusLineComplete=e||function(){}},setBusListHtmlSetCallback:function(e){this._opts.onBusListHtmlSet=e||function(){}},setBusLineHtmlSetCallback:function(e){this._opts.onBusLineHtmlSet=e||function(){}},setPolylinesSetCallback:function(e){this._opts.onPolylinesSet=e||function(){}}});function jk(i){aI.call(this,i);i=i||{};this._options={input:i.input||null,baseDom:i.baseDom||null,types:i.types||[],onSearchComplete:i.onSearchComplete||function(){}};this._loc.src=i.location||"全国";this._word="";this._show=false;this._suggestion=null;this._inputValue="";this._initialize();var e=this;hh.load("autocomplete",function(){e._asyncSearch()},true)}jk.inherits(aI,"Autocomplete");e6.extend(jk.prototype,{_initialize:function(){},show:function(){this._show=true},hide:function(){this._show=false},setTypes:function(e){this._options.types=e},setLocation:function(e){this._loc.src=e},search:function(e){this._word=e},setInputValue:function(e){this._inputValue=e},setSearchCompleteCallback:function(e){this._options.onSearchComplete=e}});var j2=function(i,e){aI.call(this,i,e)};e6.inherit(j2,aI,"BaseRoute");e6.extend(j2.prototype,{clearResults:function(){}});window.BMAP_TRANSIT_POLICY_RECOMMEND=0;window.BMAP_TRANSIT_POLICY_LEAST_TIME=4;window.BMAP_TRANSIT_POLICY_LEAST_TRANSFER=1;window.BMAP_TRANSIT_POLICY_LEAST_WALKING=2;window.BMAP_TRANSIT_POLICY_AVOID_SUBWAYS=3;window.BMAP_TRANSIT_POLICY_FIRST_SUBWAYS=5;window.BMAP_LINE_TYPE_BUS=0;window.BMAP_LINE_TYPE_SUBWAY=1;window.BMAP_LINE_TYPE_FERRY=2;window.BMAP_LINE_TYPE_TRAIN=3;window.BMAP_LINE_TYPE_AIRPLANE=4;window.BMAP_LINE_TYPE_COACH=5;var iB=3;var ei=4;var ah=1;var iz=2;var aY=5;var cW=6;window.BMAP_TRANSIT_TYPE_IN_CITY=0;window.BMAP_TRANSIT_TYPE_CROSS_CITY=1;window.BMAP_TRANSIT_PLAN_TYPE_ROUTE=0;window.BMAP_TRANSIT_PLAN_TYPE_LINE=1;window.BMAP_TRANSIT_TYPE_POLICY_TRAIN=0;window.BMAP_TRANSIT_TYPE_POLICY_AIRPLANE=1;window.BMAP_TRANSIT_TYPE_POLICY_COACH=2;window.BMAP_INTERCITY_POLICY_LEAST_TIME=0;window.BMAP_INTERCITY_POLICY_EARLY_START=1;window.BMAP_INTERCITY_POLICY_CHEAP_PRICE=2;function eV(T,i){j2.call(this,T,i);i=i||{};this.setPolicy(i.policy);this.setIntercityPolicy(i.intercityPolicy);this.setTransitTypePolicy(i.transitTypePolicy);this.setPageCapacity(i.pageCapacity);this.QUERY_TYPE=hd;this.RETURN_TYPE=e1;this.ROUTE_TYPE=hU;this._overlays=[];this._curIndex=-1;this._opts._enableTraffic=i.enableTraffic||false;this._queryList=[];var e=this;hh.load("route",function(){e._asyncSearch()},true)}eV.MAX_PAGE_CAPACITY=100;eV.LINE_TYPE_MAPPING=[0,1,0,0,0,0,0,0,2,0,0,0,1,1,1];eV.LINE_TYPE_MAPPING_CROSS_CITY=[0,3,4,0,0,0,5];e6.inherit(eV,j2,"TransitRoute");e6.extend(eV.prototype,{setPolicy:function(e){if(e>=BMAP_TRANSIT_POLICY_RECOMMEND&&e<=BMAP_TRANSIT_POLICY_FIRST_SUBWAYS){this._opts.policy=e}else{this._opts.policy=BMAP_TRANSIT_POLICY_RECOMMEND}},setIntercityPolicy:function(e){if(e>=BMAP_INTERCITY_POLICY_LEAST_TIME&&e<=BMAP_INTERCITY_POLICY_CHEAP_PRICE){this._opts.intercityPolicy=e}else{this._opts.intercityPolicy=BMAP_INTERCITY_POLICY_LEAST_TIME}},setTransitTypePolicy:function(e){if(e>=BMAP_TRANSIT_TYPE_POLICY_TRAIN&&e<=BMAP_TRANSIT_TYPE_POLICY_COACH){this._opts.transitTypePolicy=e}else{this._opts.transitTypePolicy=BMAP_TRANSIT_TYPE_POLICY_TRAIN}},_internalSearch:function(i,e){this._queryList.push({method:"_internalSearch",arguments:[i,e]})},search:function(i,e){this._queryList.push({method:"search",arguments:[i,e]})},setPageCapacity:function(e){if(typeof e==="string"){e=parseInt(e,10);if(isNaN(e)){this._opts.pageCapacity=eV.MAX_PAGE_CAPACITY;return}}if(typeof e!=="number"){this._opts.pageCapacity=eV.MAX_PAGE_CAPACITY;return}if(e>=1&&e<=eV.MAX_PAGE_CAPACITY){this._opts.pageCapacity=Math.round(e)}else{this._opts.pageCapacity=eV.MAX_PAGE_CAPACITY}},toString:function(){return"TransitRoute"},_shortTitle:function(e){return e.replace(/\(.*\)/,"")}});window.BMAP_HIGHLIGHT_STEP=1;window.BMAP_HIGHLIGHT_ROUTE=2;var cL=function(e,kv){j2.call(this,e,kv);this._overlays=[];this._curIndex=-1;this._queryList=[];var T=this;var i=this._opts.renderOptions;if(i.highlightMode!==BMAP_HIGHLIGHT_STEP&&i.highlightMode!==BMAP_HIGHLIGHT_ROUTE){i.highlightMode=BMAP_HIGHLIGHT_STEP}this._enableDragging=this._opts.renderOptions.enableDragging?true:false;hh.load("route",function(){T._asyncSearch()},true);if(this.init_d){this.init_d()}};cL.ROAD_TYPE=["","环岛","无属性道路","主路","高速连接路","交叉点内路段","连接道路","停车场内部道路","服务区内部道路","桥","步行街","辅路","匝道","全封闭道路","未定义交通区域","POI连接路","隧道","步行道","公交专用道","提前右转道"];e6.inherit(cL,j2,"DWRoute");e6.extend(cL.prototype,{search:function(T,e,i){this._queryList.push({method:"search",arguments:[T,e,i]})}});var i1=function(e,T){j2.call(this,e,T);this._overlays=[];this._queryList=[];var i=this;this.map=T.renderOptions.map;this._enableDragging=this._opts.renderOptions.enableDragging?true:false;this._menu=new BMapGL.ContextMenu();this._menu.addItem(new ic("删除该点",function(kx,kw,kv){i._deleteVia(kv.curNo-1)},60));this.map.addContextMenu(this._menu,true);hh.load("route",function(){i._asyncSearch()},true);if(this.init_d){this.init_d()}};e6.inherit(i1,j2,"LineLayerRoute");e6.extend(i1.prototype,{search:function(T,e,i){this._queryList.push({method:"search",arguments:[T,e,i]})}});window.BMAP_DRIVING_POLICY_DEFAULT=0;window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS=3;window.BMAP_DRIVING_POLICY_FIRST_HIGHWAYS=4;window.BMAP_DRIVING_POLICY_AVOID_CONGESTION=5;window.BMAP_TRAFFICE_STATUS_NONE=0;window.BMAP_TRAFFICE_STATUS_NORMAL=1;window.BMAP_TRAFFICE_STATUS_SLOW=2;window.BMAP_TRAFFICE_STATUS_JAM=3;function cw(e,i){cL.call(this,e,i);i=i||{};this._opts._enableTraffic=i.enableTraffic||false;this.setPolicy(i.policy);this.QUERY_TYPE=aP;this.RETURN_TYPE=aB;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_DRIVING;hL.sendMessage(aZ(4,4,1,1),["service","drive","overlay"])}function ga(e,i){i1.call(this,e,i);i=i||{};this.setPolicy(i.policy);this.QUERY_TYPE=aP;hL.sendMessage(aZ(4,4,1,2),["service","drive","layer"])}e6.inherit(ga,i1,"DrivingRouteLine");e6.inherit(cw,cL,"DrivingRoute");cw.prototype.setPolicy=function(e){if(e>=BMAP_DRIVING_POLICY_DEFAULT&&e<=BMAP_DRIVING_POLICY_AVOID_CONGESTION){this._opts.policy=e}else{this._opts.policy=BMAP_DRIVING_POLICY_DEFAULT}};ga.prototype.setPolicy=function(e){if(e>=BMAP_DRIVING_POLICY_DEFAULT&&e<=BMAP_DRIVING_POLICY_AVOID_CONGESTION){this._opts.policy=e}else{this._opts.policy=BMAP_DRIVING_POLICY_DEFAULT}};function fy(e,i){cL.call(this,e,i);this.QUERY_TYPE=ip;this.RETURN_TYPE=gr;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_WALKING;this._enableDragging=false;hL.sendMessage(aZ(4,4,4),["service","walk"])}e6.inherit(fy,cL,"WalkingRoute");function da(e,i){cL.call(this,e,i);this.QUERY_TYPE=hP;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_RIDING;this._enableDragging=false;hL.sendMessage(aZ(4,4,3),["service","ride"])}e6.inherit(da,cL,"RidingRoute");function X(e,i){i1.call(this,e,i);i=i||{};this.QUERY_TYPE=b7;this.setPolicy(i.policy);hL.sendMessage(aZ(4,4,2),["service","truck"])}e6.inherit(X,i1,"TruckRoute");X.prototype.setPolicy=function(e){if(e>=BMAP_DRIVING_POLICY_DEFAULT&&e<=BMAP_DRIVING_POLICY_AVOID_CONGESTION){this._opts.policy=e}else{this._opts.policy=BMAP_DRIVING_POLICY_DEFAULT}};window.BMAP_MODE_DRIVING="driving";window.BMAP_MODE_TRANSIT="transit";window.BMAP_MODE_WALKING="walking";window.BMAP_MODE_NAVIGATION="navigation";var a5={web:"//api.map.baidu.com/direction?",android:"bdapp://map/direction?",ios:"baidumap://map/direction?"};function iY(e){this.opts=e||{}}e6.extend(iY.prototype,{routeCall:function(kv,e,T){var i=this;hh.load("route",function(){i._asyncSearch(kv,e,T)})}});function eg(){return Pano.getStreetViewCoverageLayer(bD)}function eX(){Pano.PanoramaService.call(this)}e6.inherit(eX,Pano.PanoramaService,"PanoramaService");e6.extend(eX.prototype,{getPanoramaById:function(T,i){var e=this;this.getPanoById(T,function(kv){i&&i(e._makeData(kv))})},getPanoramaByLocation:function(e,T){e=jr.convertLL2MC(e);var i=this;this.getPanoByLocation(e,50,function(kv){T&&T(i._makeData(kv))})},_makeData:function(T){if(!T){return null}var i={};var e=T.content[0];i.description=e.Rname||e.Info||"";i.id=e.ID;i.pointX=e.X/100;i.pointY=e.Y/100;i.position=jr.convertMC2LL(new cD(i.pointX,i.pointY));return i}});function fo(){if(window.PANORAMA_URL){return Pano.getPanoControl(bD,{imgPath:C.imgPath,tileBaseUrl:C.panoTilePath,})}return Pano.getPanoControl(bD)}function P(T,e){if(!e){return}this.content=T;if(e.position&&!Array.isArray(e.position)){e.position=jr.convertLL2MC(e.position);this.position=e.position;this.hideDistance=!!e.hideDistance}else{this.hideDistance=true}var i=this._createDom();Pano.PanoOverlay.call(this,e.position,{dom:i,altitude:e.altitude,})}e6.inherit(P,Pano.PanoOverlay,"PanoramaLabel");e6.extend(P.prototype,{init:function(e){var i=this;this._pano=e;this.updatedDistance();Pano.PanoOverlay.prototype.init.call(this,e);this._pano.on("dataload",function(T){i.updatedDistance()})},_createDom:function(){var kv=this.content;var ky=document.createElement("div");var i=ky.style;i.position="absolute";i.backgroundColor="rgba(29, 29, 29, 0.8)";i.padding="7px 0";i.height="19px";i.font="16px arial";i.color="white";i.whiteSpace="nowrap";i.borderRadius="4px";var e=document.createElement("div");e.style["float"]="left";e.style["lineHeight"]="19px";ky.appendChild(e);var T=document.createElement("span");T.style.margin="0 14px";T.innerText=kv;e.appendChild(T);if(!this.hideDistance){var kx=document.createElement("span");kx.style.color="color:rgba(255,255,255,0.3)";kx.innerText="|";e.appendChild(kx);var kw=document.createElement("span");kw.style.margin="0 8px";kw.style.color="#60c7fa";kw.style.fontSize="12px";kw.innerText="0米";e.appendChild(kw);this._distanceDom=kw}this._dom=ky;this._titleDom=T;return ky},updatedDistance:function(){if(this.hideDistance){return}var T=0;if(this._pano){var i=this._pano.position;var e=this.position;if(i&&!i.equals(e)){T=jr.getDistanceByMC(i,e)}}if(T>100){T=T/1000;T=T<100?T.toFixed(2):T.toFixed(0);T+="公里"}else{T=T<100?T.toFixed(2):T.toFixed(0);T+="米"}this._distanceDom.innerText=T},});function d(i){if(typeof i==="string"&&/^(?!#)(\w)*/.test(i)){i="#"+i}var kv={};if(window.PANORAMA_URL){kv.imgPath=C.imgPath;kv.tileBaseUrls=[C.panoTilePath]}var e=Pano.init(i,kv);var T=e.setPosition;e.setPosition=function(kx){var ky=jr.convertLL2MC(kx);T.call(e,ky)};var kw=e.addEventListener;e.addEventListener=function(kx,ky){if(kx==="position_changed"){kw.call(e,kx,function(kz){var kA=jr.convertMC2LL(kz);ky(kA)})}else{kw.call(e,kx,ky)}};hL.sendMessage(aZ(4,3,5),["layer","pano"]);return e}bD.Map=h0;bD.MapType=es;bD.Point=cD;bD.Pixel=fr;bD.Size=ji;bD.Bounds=ie;bD.PrivateRegionDataModel=cS;bD.TileLayer=hK;bD.Copyright=m;bD.Projection=bD.Project=jr;bD.XYZProjection=bD.XYZProject=dI;bD.Convertor=f3;bD.RenderTypeUtils=dc;bD.Overlay=aS;bD.Label=h7;bD.Marker=s;bD.Symbol=fp;bD.SVGSymbol=dR;bD.Icon=jL;bD.Polyline=br;bD.BezierCurve=cN;bD.PolylineMultipart=eu;bD.Polygon=iX;bD.MapMask=kh;bD.Prism=bx;bD.Marker3D=el;bD.GroundOverlay=f9;bD.GroundPoint=dW;bD.CustomOverlay=bR;bD.CustomHtmlLayer=dE;bD.ParkingSpot=iC;bD.InfoWindow=ec;bD.SimpleInfoWindow=ii;bD.Circle=aV;bD.Control=gU;bD.NavigationControl=jZ;bD.IndoorManager=dd;bD.NavigationControl3D=e8;bD.CopyrightControl=gh;bD.ScaleControl=ku;bD.CityListControl=by;bD.MapTypeControl=v;bD.ZoomControl=ju;bD.LocationControl=gA;bD.LogoControl=bG;bD.DistanceTool=cl;bD.ContextMenu=hB;bD.MenuItem=ic;bD.OperationMask=ak;bD.Animation=fH;bD.ViewAnimation=q;bD.Transitions=gN;bD.Event=fS;bD.trafficLayer=jW;bD.TrafficLayer=jy;bD.GeoJSONLayer=aO;bD.XYZLayer=ki;bD.PixelLayer=dy;bD.GeoJSONParse=gJ;bD.NormalLayer=cs;bD.ThreeLayer=g2;bD.LineLayer=bY;bD.FillLayer=ea;bD.PointShapeLayer=aX;bD.PointIconLayer=gj;bD.Entity=js;bD.MVTLayer=eh;bD.BaiduLayer=V;bD.Geolocation=c2;bD.Geocoder=bl;bD.Boundary=ft;bD.DistrictLayer=d7;bD.LocalCity=fm;bD.LocalSearch=cG;bD.Autocomplete=jk;bD.BusLineSearch=eG;bD.WalkingRoute=fy;bD.RidingRoute=da;bD.DrivingRoute=cw;bD.DrivingRouteLine=ga;bD.TransitRoute=eV;bD.RouteSearch=iY;bD.TruckRoute=X;bD.PanoramaCoverageLayer=eg;bD.PanoramaControl=fo;bD.PanoramaService=eX;bD.PanoramaLabel=P;bD.Panorama=d;function hs(e,i){for(var T in i){e[T]=i[T]}}bD.fetchDebug&&bD.fetchDebug.init();bD.verify();bD.apiLoad();bD.frequency();bD.getSeckeyCid();window._layer=1;e6.extend(d7.prototype,{_asyncSearch:function(){for(var T=0,e=this._queryList.length;T<e;T++){var kv=this._queryList[T];this[kv.method].apply(this,kv.arguments)}delete this._queryList},addDistrict:function(){if(this._opts.districts){var e=this._opts.districts;if(typeof e==="string"){this.getDistrictData(e)}else{if(Object.prototype.toString.call(e)==="[object Array]"){var i=this.parseArrayParams(e);this.getDistrictData(i)}}}},parseArrayParams:function(e){var kw="";for(var kv=0;kv<e.length;kv++){if(e[kv] instanceof Array){kw+="(";for(var T=0;T<e.length;T++){kw+=e[T]}kw+=")"}else{kw+="("+e[kv]+")"}}return kw},getDistrictData:function(e){var i=this;ke.request(function(kv){var T=i._parseGeoData(kv);i._drawToMap(i,T)},{qt:jX,adnames:e,level:i._opts.kind})},_drawToMap:function(kE,kA){var kD=kA.boundaries.length;if(kD===0){alert("未能获取当前输入行政区域");return}var kF=this._config.fillColor;var kx=this._config.fillOpacity;var T=this._config.strokeColor;var e=this._config.strokeOpacity;var kB=this._config.strokeWeight;if(typeof kF==="string"){var kv=kF;var kG=[];for(var kz=0;kz<kD;kz++){var kC=new BMapGL.Polygon(kA.boundaries[kz],{strokeWeight:kB,strokeColor:T,strokeOpacity:e,fillColor:kv,fillOpacity:kx});kC.style={strokeWeight:kB,strokecolor:T,strokeOpacity:e,fillColor:kv,fillOpacity:kx};this.disOverlays.push(kC);this.addEventListenerIn();kE._map.addOverlay(kC);kG=kG.concat(kC.getPath())}if(this._config.viewport){kE._map.setViewport(kG)}}else{if(Object.prototype.toString.call(kF)==="[object Array]"){var kG=[];var ky=kF.length;if(ky<kD){for(var kz=0,kw=0;kz<kD-ky;kz++){if(kw<ky-1){kF.push(kF[kw++])}else{kF.push(kF[0])}}}for(var kz=0;kz<kD;kz++){var kv=kF[kz];var kC=new BMapGL.Polygon(kA.boundaries[kz],{strokeWeight:kB,strokeColor:T,strokeOpacity:e,fillColor:kv,fillOpacity:kx});kC.style={strokeWeight:kB,strokecolor:T,strokeOpacity:e,fillColor:kv,fillOpacity:kx};this.disOverlays.push(kC);this.addEventListenerIn();kE._map.addOverlay(kC);kG=kG.concat(kC.getPath())}if(this._config.viewport){kE._map.setViewport(kG)}}}},_parseGeoData:function(kE){var kH={};kH.boundaries=[];if(kE&&kE.content&&kE.content["geo"]){for(var kM=0;kM<kE.content["geo"].length;kM++){var kv=bM.parseGeo(kE.content["geo"][kM],false);if(kv.geo&&kv.geo.length&&kv.geo.length>0){var kK=kv.geo.length;for(jG=0;jG<kK;jG++){var T=kv.geo[jG];if(T&&T.length&&T.length>0){var kC=T.length-1;var kJ=[];var kB=false;var kI=0;var kG=0;for(var kL=0;kL<kC;kL+=2){var kz=T[kL];var kx=T[kL+1];var kF=new cD(kz,kx);kF=jr.convertMC2LL(kF);if(kL<kC-3){var i=T[kL+2];var e=T[kL+3];var kD=new cD(i,e);kD=jr.convertMC2LL(kD)}kJ.push(kF.lng+", "+kF.lat)}if(kB===true){if(kI>kG){var kN=kI;kI=kG;kG=kN}var kA=kJ;var ky=kJ.splice(kI+1);var kw=ky.splice(kG-kI);kA=kA.concat(kw);kH.boundaries.push(kA.join(";"));kH.boundaries.push(ky.join(";"));kB=false;continue}if(kJ.length!==0){kH.boundaries.push(kJ.join(";"))}}}}}}return kH},deleteDistrict:function(kv){var T=kv.disOverlays;for(var e=0;e<T.length;e++){this._map.removeOverlay(T[e])}},addEventListener:function(e,i){this.eventAndCallback[e]=i},addEventListenerIn:function(){var kv=this;var kx=Object.keys(kv.eventAndCallback);if(kx.length>0){for(var T=0;T<kx.length;T++){var kw=kv.eventAndCallback[kx[T]];for(var e=0;e<kv.disOverlays.length;e++){kv.disOverlays[e].addEventListener(kx[T],kw)}}}},searchBoundary:function(i,kw){i=i||{};var e=i.name||"";var T=i.kind||0;var kv=this;ke.request(function(ky){var kx=kv._parseGeoData(ky);kw&&kw(kx)},{qt:jX,adnames:e,level:T})}});window._layer=2;})(BMapGL,"BMapGL");