var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); window.TILE_VERSION={"ditu":{"normal":{"version":"088","updateDate":"20230403"},"satellite":{"version":"009","updateDate":"20230403"},"normalTraffic":{"version":"081","updateDate":"20230403"},"satelliteTraffic":{"version":"083","updateDate":"20230403"},"mapJS":{"version":"104","updateDate":"20230403"},"satelliteStreet":{"version":"083","updateDate":"20230403"},"earthVector":{"version":"001","updateDate":"20230403"}},"webapp":{"high_normal":{"version":"001","updateDate":"20230403"},"lower_normal":{"version":"002","updateDate":"20230403"}},"api_for_mobile":{"vector":{"version":"002","updateDate":"20230403"},"vectorIcon":{"version":"002","updateDate":"20230403"}}};window.MSV={"mapstyle":{"version":"001","updateDate":"20230227"}};window.BMAP_AUTHENTIC_KEY="9wBqaFhhzGDcRsTi24BN8NsNxGUpeFEc"; (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=0;i--)n>(e=t[i])&&(n=e),r1&&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;u0?"&":"?";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=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=90o?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>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<>>9<<4)]=e;var s=1732584193,u=-271733879,h=-1732584194,c=271733878;for(n=0;n>5]>>>e%32&255);return n}function F(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e>5]|=(255&t.charCodeAt(e/8))<>>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://web.archive.org/web/20230404102250/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://web.archive.org/web/20230404102250/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="//web.archive.org/web/20230404102250/https://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=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=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=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;n0?", ":"")+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=0&&t=0&&t0&&(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;s0?(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)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 h0?(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=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;nl?(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;n0&&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 ".concat(t)),this;if(t instanceof Array){for(var e=0,n=t.length;e0&&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;ri&&(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]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),r65535?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;i0&&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(0c))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&&u1)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=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);n0&&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;t0&&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;a2&&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;i0&&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;03&&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=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;C0;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;R1&&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);n0){var o=i.split("/");e.push(o)}}for(var a=e[0],s=1,u=e.length-1;s=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=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;d0?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;p0&&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),l2&&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),e0},e.getNodeKeysByLevel=function(t){if(to&&(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;rS&&(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 tT&&(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 .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.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;l0&&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=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=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);n0&&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;i10||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);n180?(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),ts&&(o=s),o512;)c++,l=360/(2*Math.pow(2,c-2)*h);if(c>a){var f=c-a;l*=Math.pow(2,f),c=a}c1&&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||"//web.archive.org/web/20230404102250/https://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''},_generatePanHtml:function(){return'
'},_generatePanBtnHtml:function(){return'
'},_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;"),'
'},_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=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||"//web.archive.org/web/20230404102250/https://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='全景',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="//web.archive.org/web/20230404102250/https://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=["//web.archive.org/web/20230404102250/https://apisv0.bdimg.com/","//web.archive.org/web/20230404102250/https://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(bw,fk){var eP=eP||{version:"20150702",emptyFn:function(){}};(function(){eP._log=[];var i=0;var T={};eP.BaseClass=function(jV){T[(this.hashCode=(jV||eP.BaseClass.guid()))]=this};eP.BaseClass.guid=function(){return"mz_"+(i++).toString(36)};eP.BaseClass.create=function(){var jV=new eP.BaseClass();jV.decontrol();return jV};var e=eP.instance=eP.I=function(jV){return T[jV]};eP.BaseClass.prototype.dispose=function(){if(this.hashCode){delete T[this.hashCode]}for(var jV in this){if(typeof this[jV]!="function"){delete this[jV]}}};eP.BaseClass.prototype.getHashCode=function(){if(!this.hashCode){T[(this.hashCode=eP.BaseClass.guid())]=this}return this.hashCode};eP.BaseClass.prototype.decontrol=function(){delete T[this.hashCode]};eP.BaseClass.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"};eP.BaseClass.prototype._wlog=function(jW,jX){var jV=eP._log;if(jV.length>100){jV.reverse().length=50;jV.reverse()}jV[jV.length]="["+jW+"]["+(this._className||"Object")+" "+this.hashCode+"] "+jX}})();Function.prototype.inherits=function(jV,T){var e,jW,jY=this.prototype,jX=function(){};jX.prototype=jV.prototype;jW=this.prototype=new jX();if(typeof(T)=="string"){jW._className=T}for(e in jY){jW[e]=jY[e]}this.prototype.constructor=jY.constructor;jY=jX=null;return jW};eP.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};eP.BaseClass.prototype.on=eP.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 jV=i.hashCode||eP.BaseClass.guid();i.hashCode=jV;if(e[T][jV]){this._wlog("warning","repeat key:"+jV)}e[T][jV]=i};eP.BaseClass.prototype.off=eP.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]}};eP.BaseClass.prototype.fire=eP.BaseClass.prototype.dispatchEvent=function(jV){if(!this._listeners){this._listeners={}}var T,e=this._listeners,jW=jV.type;jV.target=jV.srcElement=jV.target||jV.srcElement||this;jV.currentTarget=this;if(typeof this[jW]=="function"){this[jW](jV)}if(typeof e[jW]=="object"){for(T in e[jW]){if(typeof e[jW][T]=="function"){e[jW][T].call(this,jV)}}}return jV.returnValue};eP.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};eP.Browser=(function(){var T=navigator.userAgent;var jW=0;var e=0;var jX=0;var i=0;var j1=0;var jZ=0;var j0=0;var jY=0;var jV=0;var j2=0;if(typeof window.opera==="object"&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(T)){jX=parseFloat(RegExp.$2)}else{if(/OPR(\/(\d+)(\..?)?)/.test(T)){jX=parseInt(RegExp.$2,10)}else{if(/Edge\/((\d+)\.\d+)/.test(T)){jW=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)){j1=parseFloat(RegExp.$2)}else{if(navigator.vendor==="Netscape"&&/Netscape(\s|\/)(\d+(\.\d+)?)/.test(T)){j0=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)){jY=parseInt(RegExp.$1,10)}else{if(!e&&!jW&&T.indexOf("Gecko")>-1&&T.indexOf("KHTML")===-1&&/rv\:(\d+(\.\d+)?)/.test(T)){jV=parseFloat(RegExp.$1)}else{if(!jW&&/chrome\/(\d+(\.\d+)?)/i.test(T)){jZ=parseFloat(RegExp.$1)}else{if(!jW&&/AppleWebKit\/(\d+(\.\d+)?)/.test(T)){j2=parseInt(RegExp.$1,10)}}}}var j3={edge:jW,ie:e,firefox:j1,netscape:j0,opera:jX,safari:i,chrome:jZ,gecko:jV,trident:jY,webkit:j2};return j3})();window.FeBrowser=eP.Browser;eP.Dom={};eP.Dom.createDom=function(i,e){if(eP.isIE&&e&&e.name){i="<"+i+' name="'+eP.String.escapeHTML(e.name)+'">'}var T=document.createElement(i);if(e){eP.Dom.setProperties(T,e)}return T};eP.Dom.getOffset=function(jV){var jY=eP.Dom.getOwnerDocument(jV);var jX=eP.isGecko>0&&jY.getBoxObjectFor&&eP.Dom.getStyle(jV,"position")=="absolute"&&(jV.style.top===""||jV.style.left==="");var jZ={left:0,top:0};var i=(eP.isIE&&!eP.isStrict)?jY.body:jY.documentElement;if(jV==i){return jZ}var T=null;var jW;if(jV.getBoundingClientRect){jW=jV.getBoundingClientRect();jZ.left=jW.left+Math.max(jY.documentElement.scrollLeft,jY.body.scrollLeft);jZ.top=jW.top+Math.max(jY.documentElement.scrollTop,jY.body.scrollTop);jZ.left-=jY.documentElement.clientLeft;jZ.top-=jY.documentElement.clientTop;if(eP.isIE&&!eP.isStrict){jZ.left-=2;jZ.top-=2}}else{if(jY.getBoxObjectFor&&!jX){jW=jY.getBoxObjectFor(jV);var e=jY.getBoxObjectFor(i);jZ.left=jW.screenX-e.screenX;jZ.top=jW.screenY-e.screenY}else{T=jV;do{jZ.left+=T.offsetLeft;jZ.top+=T.offsetTop;if(eP.isWebkit>0&&eP.Dom.getStyle(T,"position")=="fixed"){jZ.left+=jY.body.scrollLeft;jZ.top+=jY.body.scrollTop;break}T=T.offsetParent}while(T&&T!=jV);if(eP.isOpera>0||(eP.isWebkit>0&&eP.Dom.getStyle(jV,"position")=="absolute")){jZ.top-=jY.body.offsetTop}T=jV.offsetParent;while(T&&T!=jY.body){jZ.left-=T.scrollLeft;if(!eP.isOpera||T.tagName!="TR"){jZ.top-=T.scrollTop}T=T.offsetParent}}}return jZ};eP.Dom.getOwnerDocument=function(e){return e.nodeType==9?e:e.ownerDocument||e.document};eP.Dom.setProperties=function(i,e){eP.each(e,function(jV,T){eP.Dom._setProperty(i,T,jV)})};eP.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 eP.Dom._DIRECT_ATTRIBUTE_MAP){i.setAttribute(eP.Dom._DIRECT_ATTRIBUTE_MAP[e],T)}else{i[e]=T}}}}};eP.Dom._DIRECT_ATTRIBUTE_MAP={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder"};eP.G=function(){for(var T=[],jV=arguments.length-1;jV>-1;jV--){var jW=arguments[jV];T[jV]=null;if(typeof jW=="object"&&jW&&jW.dom){T[jV]=jW.dom}else{if((typeof jW=="object"&&jW&&jW.tagName)||jW==window||jW==document){T[jV]=jW}else{if(typeof jW=="string"&&(jW=document.getElementById(jW))){T[jV]=jW}}}}return T.length<2?T[0]:T};eP.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(" ")}};eP.addClassName=eP.ac;eP.each=function(jX,e){if(typeof e!="function"){return jX}if(jX){if(jX.length===undefined){for(var T in jX){e.call(jX[T],jX[T],T)}}else{for(var jV=0,jW=jX.length;jV0&&!window.opera){/MSIE (\d+(\.\d+)?)/.test(navigator.userAgent);eP.isIE=parseFloat(RegExp.$1)}})();eP.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}};eP.removeClassName=eP.rc;eP.show=function(){this.each(arguments,function(e){if(e=eP.G(e)){e.style.display=""}})};eP.trim=function(e){return e.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};eP.getElementsByClassName=function(e,i){if(e.getElementsByClassName){return e.getElementsByClassName(i)}else{return(function T(j2,j0){if(j0==null){j0=document}var jZ=[],jY=j0.getElementsByTagName("*"),jV=jY.length,j1=new RegExp("(^|\\s)"+j2+"(\\s|$)"),jX,jW;for(jX=0,jW=0;jX-1};eP.insertHTML=function(jV,e,T){jV=eP.G(jV);if(jV===null){return jV}var i,jW;if(jV.insertAdjacentHTML){jV.insertAdjacentHTML(e,T)}else{i=jV.ownerDocument.createRange();e=e.toUpperCase();if(e=="AFTERBEGIN"||e=="BEFOREEND"){i.selectNodeContents(jV);i.collapse(e=="AFTERBEGIN")}else{jW=e=="BEFOREBEGIN";i[jW?"setStartBefore":"setEndAfter"](jV);i.collapse(jW)}i.insertNode(i.createContextualFragment(T))}return jV};if(typeof HTMLElement!="undefined"&&HTMLElement.prototype.__lookupGetter__&&!HTMLElement.prototype.__lookupGetter__("children")&&!window.opera){try{HTMLElement.prototype.__defineGetter__("children",function(){for(var T=[],jV=0,jX,jW=0,e=this.childNodes.length;jW-1};eP.isEmptyObject=function(T){if(Object.prototype.toString.call(T)==="[object Object]"){for(var e in T){return false}return true}else{return false}};var bP=window.location.protocol==="http:"?"http:":"https:";var en={fontFamily:'Arial,Helvetica,"PingFang SC","Hiragino Sans GB",STHeiti,sans-serif',mapStyleNameIdPair:{"default":0,"grayed-out":1},mapHost:bP+"//web.archive.org/web/20230404102250/https://map.baidu.com",apiHost:bP+"//web.archive.org/web/20230404102250/https://api.map.baidu.com",apiIMG:bP+"//web.archive.org/web/20230404102250/https://api.map.baidu.com/images",staticHost:bP+"//web.archive.org/web/20230404102250/https://webmap0.bdimg.com",imgPath:bP+"//web.archive.org/web/20230404102250/https://webmap0.bdimg.com/image/api/",tileDomain:[bP+"//web.archive.org/web/20230404102250/https://maponline0.bdimg.com",bP+"//web.archive.org/web/20230404102250/https://maponline1.bdimg.com",bP+"//web.archive.org/web/20230404102250/https://maponline2.bdimg.com",bP+"//web.archive.org/web/20230404102250/https://maponline3.bdimg.com"],panoTilePath:"//web.archive.org/web/20230404102250/https://apisv1.bdimg.com/",optDomain:"https://web.archive.org/web/20230404102250/http://10.120.25.45:8017",rasterTilePath:"/tile/",vectorTilePath:"/pvd/",originTilePath:[bP+"//web.archive.org/web/20230404102250/https://pcor.baidu.com"],stylePath:"//web.archive.org/web/20230404102250/https://maponline0.bdimg.com/sty/",getIconSetPath:function(e){var i="map_icons2x/";if(typeof e==="string"&&this.mapStyleNameIdPair[e]>0){i="map_icons2x_"+(this.mapStyleNameIdPair[e]-1)+"/"}return bP+this.stylePath+i},getMapStyleFiles:function(T){var jW=true;if(typeof T==="string"&&T!=="default"){jW=false}var jX=jW?"":"_"+(this.mapStyleNameIdPair[T]-1);var i=bx();var jV="udt="+i.udt+"&v="+i.ver;var e=bP+this.stylePath;return[e+"icons_2x"+jX+".js?"+jV,e+"fs"+jX+".js?"+jV,e+"indoor_fs.js?"+jV]},tvc:{ditu:{normal:{version:"088",updateDate:"20210726"},satellite:{version:"009",updateDate:"20210726"},normalTraffic:{version:"081",updateDate:"20210726"},satelliteTraffic:{version:"083",updateDate:"20210726"},mapJS:{version:"104",updateDate:"20210726"},satelliteStreet:{version:"083",updateDate:"20210726"},panoClick:{version:"1033",updateDate:"20180108"},panoUdt:{version:"20180108",updateDate:"20180108"},panoSwfAPI:{version:"20150123",updateDate:"20150123"},panoSwfPlace:{version:"20141112",updateDate:"20141112"},earthVector:{version:"001",updateDate:"20210726"}}},msv:{mapstyle:{updateDate:"20221108",version:"001"}}};en.imgResources={blankGIF:en.staticHost+"/res/litemapapi/v1d1/images/blank.gif?20170501",markerPng:en.staticHost+"/res/litemapapi/v1d1/images/marker.png?20170501",locPng:en.staticHost+"/res/litemapapi/v1d1/images/loc.png?20180918",locNewPng:en.staticHost+"/res/litemapapi/v1d1/images/loc_new.png?20190314",zoomPng:en.staticHost+"/res/litemapapi/v1d1/images/zoombtn.png?20180918",mapLogoPng:en.staticHost+"/res/litemapapi/v1d1/images/logo-2x.png?20190226"};var B=en;var i0="ruler.cur";if(eP.Browser.ie||eP.Browser.edge){eP.extend(B,{distCursor:"url("+B.imgPath+i0+"),crosshair",defaultCursor:"url("+B.imgPath+"openhand.cur),default",draggingCursor:"url("+B.imgPath+"closedhand.cur),move"})}else{if(eP.Browser.firefox){eP.extend(B,{distCursor:"url("+B.imgPath+i0+"),crosshair",defaultCursor:"-moz-grab",draggingCursor:"-moz-grabbing"})}else{if(eP.Browser.chrome||eP.Browser.safari){eP.extend(B,{distCursor:"url("+B.imgPath+i0+") 2 6,crosshair",defaultCursor:"url("+B.imgPath+"openhand.cur) 8 8,default",draggingCursor:"url("+B.imgPath+"closedhand.cur) 8 8,move"});if(eP.Platform.macintosh){B.defaultCursor="-webkit-grab";B.draggingCursor="-webkit-grabbing"}}else{eP.extend(B,{distCursor:"url("+B.imgPath+i0+"),crosshair",defaultCursor:"url("+B.imgPath+"openhand.cur),default",draggingCursor:"url("+B.imgPath+"closedhand.cur),move"})}}}bw=bw||{};bw.version="gl";bw._register=[];bw.register=function(e){this._register[this._register.length]=e};bw.guid=1;bw.getGUID=function(e){return(e||"")+bw.guid++};var eF=window.BMAP_AUTHENTIC_KEY||"";function R(e,i,jV){var T=new Date();T.setTime(T.getTime()+jV*24*60*60*1000);document.cookie=e+"="+escape(i)+";expires="+T.toGMTString()}function a2(e,i){if(navigator.cookieEnabled){return R(e,i,30)}if(localStorage){return localStorage.setItem(e,i)}if(sessionStorage){return sessionStorage.setItem(e,i)}}bw.getSeckeyCid=function(){var i=+new Date();var e=bP+"//web.archive.org/web/20230404102250/https://dlswbr.baidu.com/heicha/mw/abclite-2063-s.js?_t="+i;gC.load(e,iy)};function iy(){if(window.___abvk){a2("SECKEY_ABVK",window.___abvk)}}window.__abbaidu_2063_cb=function(i){var e=JSON.parse(i);a2("BMAP_SECKEY",e.data)};bw.bmapVerifyCbk=function(jW){if(jW&&jW.error!==0){bw=null;BMapGL=null;var jX="百度未授权使用地图API,可能是因为您提供的密钥不是有效的百度地图开放平台密钥,或此密钥未对本应用的百度地图JavaScriptAPI授权。您可以访问如下网址了解如何获取有效的密钥:https://lbs.baidu.com/apiconsole/key#。";switch(jW.error){case 101:jX="您所使用的密钥ak有问题,不支持jsapi服务,可以访问该网址了解如何获取有效密钥:http://lbsyun.baidu.com/apiconsole/key#。";break;case 102:jX="MCODE参数不存在,mobile类型MCODE参数必需,详情查看:http://lbsyun.baidu.com/apiconsole/key#。";break;case 200:jX="APP不存在,AK有误请检查再重试,详情查看:http://lbsyun.baidu.com/apiconsole/key#。";break;case 201:jX="APP被您禁用啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 202:jX="APP被管理员删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 203:jX="APP类型错误,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 210:jX="APP IP校验失败,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 220:jX="APP Referer校验失败。请检查该ak设置的白名单与访问所有的域名是否一致。详情查看:http://lbsyun.baidu.com/apiconsole/key#";break;case 230:jX="APP Mcode码校验失败,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 240:jX="APP服务被禁用了,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 250:jX="该用户不存在... 请登录 https://lbs.baidu.com 的控制台,注册成为开发者申请ak吧。";break;case 251:jX="该用户被自己删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情。";break;case 252:jX="该用户被管理员删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 了解如何获取有效密钥,或请联系我们了解详情。";break;case 260:jX="您所使用的密钥AK不包含该服务呢,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看服务选择情况,或请联系我们了解详情。";break;case 261:jX="您所使用的密钥AK的该服务被禁用啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看服务选择情况,或请联系我们了解详情。";break;case 401:jX="您所使用的AK并发超限了,请登录 http://lbsyun.baidu.com/cashier/quota#/home 了解详情。";break;case 302:jX="您所使用的AK天配额超限了,请登录 http://lbsyun.baidu.com/cashier/quota#/home 了解详情。";break}alert(jX);var T=document.getElementsByClassName("bmap-container");if(T){for(var jV=0;jVi){this._removeOld()}if(!e[T]){e.push(jV)}e[T]=jV;jV._key_=T};hT.prototype.getHitRate=function(){return Math.round(this._totalHitTimes/this._totalGetTimes*1000)/1000};hT.prototype.getData=function(i){var e=this._cache[i];if(e){this._totalHitTimes++}this._totalGetTimes++;return e};hT.prototype.removeData=function(jW){if(this._options.clearCallback){this._options.clearCallback(this._cache[jW])}var T=this._cache;var jX=T[jW];for(var jV=0,e=T.length;jV=0;jW--){var jV=this._cache[jW]._key_;if(!jX[jV]){T.splice(jW,1);if(this._options.clearCallback){this._options.clearCallback(T[jV])}delete T[jV]}}};hT.prototype.getDataCount=function(){return this._cache.length};function iD(){}eP.extend(iD.prototype,{centerAndZoomIn:function(j0,T,j1){var jY=this;if(!j0&&!T){return}j0=j0||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 jZ(){jY._earth=new bw.Earth(jY,{showRealSunlight:jY.config.showRealSunlight,showMilkyway:jY.config.showMilkyway,earthBackground:jY.config.earthBackground});jY._proxyEarthEvents();jY._changeEarthMapType(BMAP_EARTH_MAP);eP.extend(jY,bw.EarthView.prototype);if(!jY._navigationCtrl&&jY.config.showControls){jY._navigationCtrl=new bw.NavigationControl3D(jY)}delete jY.temp.originMapType}gQ.load("earth",function(){if(bw["FeatureStyle"+jY.config.style]){jZ()}else{jY.loadMapStyleFiles(function(){jZ()})}})}}this.lastLevel=this.zoomLevel||T;this.zoomLevel=T;var jW=new fA("onload");jW.point=j0;jW.zoom=T;this.centerPoint=this.restrictCenter(new cu(j0.lng,j0.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 jX=new m(i,"baidu",this.mapType);var jV=new hi({mapType:this.mapType,copyright:jX,customLayer:false,baseLayer:true,tileTypeName:"web"});jV._isInnerLayer=true;this.addTileLayer(jV);if(this.mapType===BMAP_SATELLITE_MAP&&this._isHybridShow===true){this._addHybirdMap()}}this.dispatchEvent(jW);this.loaded=true;j1=j1||{};j1.callback&&j1.callback()},_setPlatformPosition:function(j1,j0,j4){j4=j4||{};if(j1===0&&j0===0&&!j4.point){return}if(isNaN(j4.initMapOffsetX)){j4.initMapOffsetX=this.offsetX}if(isNaN(j4.initMapOffsetY)){j4.initMapOffsetY=this.offsetY}var j2=j1+j4.initMapOffsetX;var jZ=j0+j4.initMapOffsetY;if(j4.point){var i=this.restrictCenter(j4.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new fA("oncenter_changed"))}}else{var jV=this.offsetX-j2;var e=this.offsetY-jZ;var T=this.getZoomUnits();var jY=this.centerPoint.lng;var jX=this.centerPoint.lat;var jW=new cu(jY,jX);this.centerPoint=this.restrictCenter(new cu(jW.lng+jV*T,jW.lat-e*T),T);this.fire(new fA("oncenter_changed"));if(this.zoomLevel<10){j2=this.offsetX-(this.centerPoint.lng-jW.lng)/T;jZ=this.offsetY+(this.centerPoint.lat-jW.lat)/T}}this.offsetX=j2;this.offsetY=jZ;var j3=this.platform.style;j3.left=j2+"px";j3.top=jZ+"px";this.maskLayer.style.left=-j2+"px";this.maskLayer.style.top=-jZ+"px";if(j4.dispatchEvent!==false){this.dispatchEvent(new fA("onmoving"))}},zoomTo:function(e,jY,j2){j2=j2||{};j2.zoomCenter=jY;if(j2.noAnimation!==true){this.deepZoomTo(e,j2);return}if(typeof e!=="number"){return}var jW=ec[this.mapType];if(!jW){return}var T=e;e=this._getProperZoom(e).zoom;if(e===this.zoomLevel){var jZ=new fA("onzoomexceeded");jZ.targetZoom=T;this.dispatchEvent(jZ);j2.callback&&j2.callback();return}this.lastLevel=this.zoomLevel;if(jY){this.temp._cPoint=jY;this.temp._cPixel=this.pointToPixelIn(jY)}else{if(this.getInfoWindow()){var j1=this.getInfoWindow().getPoint();this.temp._cPixel=this.pointToPixelIn(j1);this.temp._cPoint=j1}}if(this.config.zoomCenter){jY=this.config.zoomCenter;this.temp._cPoint=jY;this.temp._cPixel=this.pointToPixelIn(jY)}if(jY||this.temp.infoWin&&this.temp.infoWin.isOpen()){var i=this.temp._cPoint;var j0=this.temp._cPixel;var jV=this.getZoomUnits(e);var jX=new cu(i.lng+jV*(this.width/2-j0.x),i.lat-jV*(this.height/2-j0.y));this.centerPoint=this.restrictCenter(jX,jV,e);if(this.centerPoint.zoom){e=this.centerPoint.zoom}}if(j2.fireEvent!==false){this.dispatchEvent(new fA("onzoomstart"))}if(e!==this.zoomLevel){this.zoomLevel=e;this.dispatchEvent(new fA("onzooming"));this.dispatchEvent(new fA("onzoomstartcode"))}if(j2.fireEvent!==false){this.dispatchEvent(new fA("onzoomend"))}if(j2.callback){j2.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(jZ,jV){jV=jV||{};var jX=jZ-this.zoomLevel;var jW=this._getProperZoom(jZ);if(jW.exceeded){var e=new fA("onzoomexceeded");e.targetZoom=jZ;this.dispatchEvent(e);return}var i;if(jV.zoomCenter){i=this.pointToPixelIn(jV.zoomCenter)}else{if(this.getInfoWindow()){i=this.pointToPixelIn(this.getInfoWindow().getPoint(),{zoom:this.lastLevel})}else{var i=new fa(this.width/2,this.height/2)}}this.lastLevel=this.zoomLevel;var jY=this.deepZoom||new aD(this);var T=jX>0?1:-1;jY.zoomMap(i,jX,T,null,jV)},flyToIn:function(j0,e){if(e===this.zoomLevel){this.panToIn(j0);return}var jX=this._getProperZoom(e);if(jX.exceeded){var j1=new fA("onzoomexceeded");j1.targetZoom=e;this.dispatchEvent(j1);return}var jZ=e-this.zoomLevel;var T=new fa(this.width/2,this.height/2);var i=this.pointToPixelIn(j0);var jY=new iL(i.x-T.x,i.y-T.y);this.lastLevel=this.zoomLevel;if(Math.abs(jZ)>=4||Math.abs(jY.width)>this.width||Math.abs(jY.height)>this.height){this.centerAndZoomIn(j0,e);return}var jW=this.deepZoom||new aD(this);var jV=jZ>0?1:-1;jW.zoomMap(i,jZ,jV,jY)},panToIn:function(i,T){T=T||{};if(!i||i.equals(this.centerPoint)){T.callback&&T.callback();return}var jV=this.pointToPixelIn(i);var e=Math.round(this.width/2);var jW=Math.round(this.height/2);if(Math.abs(e-jV.x)>this.width||Math.abs(jW-jV.y)>this.height||T.noAnimation===true){this._panToIn(e-jV.x,jW-jV.y,i);T.callback&&T.callback()}else{this._panBy(e-jV.x,jW-jV.y,T)}},_panToIn:function(i,e,jV){var T=this.temp;if(T.operating===true){return}if(T.dragAni){T.dragAni.stop();T.dragAni=null;this.dispatchEvent(new fA("onmoveend"))}this.dispatchEvent(new fA("onmovestart"));this._setPlatformPosition(i,e,{point:jV});this.dispatchEvent(new fA("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,jW){if(this.temp.operating===true){return}jW=jW||{};this.dispatchEvent(new fA("onmovestart"));var jV=this;var T=jV.temp;T.pl=jV.offsetX;T.pt=jV.offsetY;if(T.tlPan){T.tlPan.cancel()}if(T.dragAni){T.dragAni.stop();T.dragAni=null;this.dispatchEvent(new fA("onmoveend"))}T.tlPan=new fq({fps:jW.fps||jV.config.fps,duration:jW.duration||jV.config.actionDuration,transition:jW.transition||gq.easeInOutQuad,render:function(jX){this.terminative=jV.temp.operating;if(jV.temp.operating){return}jV._setPlatformPosition(Math.ceil(i*jX),Math.ceil(e*jX),{initMapOffsetX:T.pl,initMapOffsetY:T.pt})},finish:function(jX){jV.dispatchEvent(new fA("onmoveend"));jV.temp.tlPan=false;if(jV.temp.stopArrow===true){jV.temp.stopArrow=false;if(jV.temp.arrow!==0){jV._arrow()}}jW.callback&&jW.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(j3,i,e){this.isRestrict=false;i=i||this.getZoomUnits();e=e||this.zoomLevel;var j1=this.pixelToPointIn(new fa(this.width,0),{center:j3,zoom:e});var jZ=this.pixelToPointIn(new fa(0,this.height),{center:j3,zoom:e});var j4=j3.lng;var j9=j3.lat;if(this.config.restrictBounds!==null&&!this.config.restrictBounds.isEmpty()){var j8=this.config.restrictBounds;var jV=j8.getSouthWest();var j6=j8.getNorthEast();var j2=iU.convertLL2MC(jV);var jX=iU.convertLL2MC(j6);j3.lng=this.calcNewLngByBounds(j4,jZ,j1,j2.lng,jX.lng,i);j3.lat=this.calcNewLatByBounds(j9,jZ,j1,j2.lat,jX.lat,i);return j3}var j0=this.pixelToPointIn(new fa(0,0),{center:j3,zoom:e});var jW=this.pixelToPointIn(new fa(0,this.height),{center:j3,zoom:e});if(this.zoomLevel<5){if(j0.lat>hx.MAX_LAT&&jW.lathx.MAX_LAT){this.isRestrict=true;j3.lat=hx.MAX_LAT-this.height/2*i}else{if(jW.lat=hx.HIGH_RES_MIN_RATIO?2:1,enableEarth:c0.ifEnableEarth(),defaultMaxBounds:new hL(new cu(-21364736,-10616832),new cu(23855104,15859712)),showControls:false,showRealSunlight:true,showMilkyway:true,earthBackground:null,showStreetLayer:true,minZoom:null,maxZoom:null,style:"default",backgroundColor:null,enableIconClick:false,autoSafeArea:false,ak:null,webgl2:false,restrictCenter:true,restrictBounds:null,smaa:true,preserveDrawingBuffer:false,privateOn:false,privateRegions:null,popRightClick:false};for(var T in i){if(i.hasOwnProperty(T)){this.config[T]=i[T];if(T==="fixCenterWhenResize"){this.config.enableResizeOnCenter=i[T]}}}if(i.style){if(i.style["styleId"]&&i.style["styleId"].length<32){this.config.style=i.style["styleId"]}else{this.config.style=i.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};if(i.displayOptions){for(var e in i.displayOptions){if(i.displayOptions.hasOwnProperty(e)){this._displayOptions[e]=i.displayOptions[e]}}}if(this.config.restrictCenter===false){this._enableTiltZoom=0;this._enableHeadingZoom=0}},getMinZoom:function(){var T;if(ec[this.mapType][this._renderType]){T=ec[this.mapType][this._renderType].minZoom}else{T=ec[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(ee){jV=true;T=e}if(this._renderType!=="webgl"){T=Math.round(T)}return{zoom:T,exceeded:jV}},getContainer:function(){return this.container},getZoomUnits:function(T){if(this.mapType===BMAP_EARTH_MAP){return Math.pow(2,18-this._earth.getImageZoom())}var e=ec[this.mapType];if(typeof e!=="object"){return null}var i=T||this.zoomLevel;return Math.pow(2,(e.zoomLevelBase-i))},pointToPixelIn:function(j6,j8){if(!j6){return}j8=j8||{};if(this.mapType===BMAP_EARTH_MAP){var jX;if(!j6._llPt){jX=iU.convertMC2LL(j6);j6._llPt=jX}jX=j6._llPt;var j2=null;var jW=null;if(typeof j8.zoom==="number"){var j5=this._earth;var j7=j5._getEarthZoomByImgZoom(j8.zoom);if(j7<=3){j2=j5._generateTmpPMatrix(j7)}jW=j5._generateTmpMVMatrix(j5.getCenter(),j7)}var jY=this._earth.fromLatLngToPixel(jX,{useRound:false,isCalcOnBack:true,matrixInfo:{modelViewMatrix:jW,projectionMatrix:j2}});return jY}if((this._heading%360===0&&this._tilt===0)||!this._webglMapCamera){var j4=this.getZoomUnits(j8.zoom);var j0=j8.center||this.centerPoint;var jV=this.width/2;var jZ=this.height/2;var j3;if(j6.lng*j0.lng<0){var i=Math.abs(j6.lng-j0.lng);var e=(eS._mc180X*2-i)/j4;if(j0.lng<0){j3=jV-e}else{j3=jV+e}}else{j3=(j6.lng-j0.lng)/j4+jV}var j1=(j0.lat-j6.lat)/j4+jZ;if(j8.useRound!==false){j3=Math.round(j3);j1=Math.round(j1)}return new fa(j3,j1)}var T=this._webglMapCamera.fromMCToScreenPixel(j6.lng,j6.lat,j8);if(j8.useRound===false){return T}T.x=Math.round(T.x);T.y=Math.round(T.y);return T},pixelToPointIn:function(e,j2){if(!e){return}j2=j2||{};if(this.mapType===BMAP_EARTH_MAP){if(typeof j2.zoom==="number"){var j0=this._earth;var jX=null;var T=null;var j1=j0._getEarthZoomByImgZoom(j2.zoom);if(j1<=3){jX=j0._generateTmpPMatrix(j1)}T=j0._generateTmpMVMatrix(j0.getCenter(),j1)}var i=this._earth.fromPixelToLatLng(e,{matrixInfo:{modelViewMatrix:T,projectionMatrix:jX}});if(i===null){return null}return iU.convertLL2MC(i)}if((this._heading%360!==0||this._tilt>0)&&this._webglMapCamera){return this._webglMapCamera.fromScreenPixelToMC(e.x,e.y,j2)}var jY=j2.center||this.centerPoint;var jZ=this.getZoomUnits(j2.zoom);var jW=jY.lng+jZ*(e.x-this.width/2);var jV=jY.lat-jZ*(e.y-this.height/2);return new cu(jW,jV)},pointToOverlayPixelIn:function(e,jV){jV=jV||{};var T=this.pointToPixelIn(e,{zoom:jV.zoom,center:jV.center,forLabel:true,frustumTest:true,useRound:jV.useRound});if(!T){return}if(jV.fixPosition&&this.mapType!=="B_EARTH_MAP"){var jW=this.getSize();var i=this.worldSize(jV.zoom);if(T.x>jW.width){while(T.x>jW.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 iU()},lnglatToMercator:function(e,jV){var i=new cu(e,jV);var T=iU.convertLL2MC(i);return[T.lng,T.lat]},mercatorToLnglat:function(i,e){if(isNaN(i)||isNaN(e)){return[]}i=parseFloat(i);e=parseFloat(e);var jV=new cu(i,e);var T=iU.convertMC2LL(jV);return[T.lng,T.lat]},getBoundsIn:function(){if(!this._bounds){return}var j8=arguments[0];if(this.mapType===BMAP_EARTH_MAP&&this._earth){var j2=this._earth.getCustomBounds();if(!j2){return this.config.defaultMaxBounds}var j1=j2.getSouthWest();var e=j2.getNorthEast();if(j1.lng>e.lng){e.lng=180}var kp=iU.convertLL2MC(j1);var kf=iU.convertLL2MC(e);var j5=this.config.defaultMaxBounds;var ke=Math.max(kp.lng,j5.sw.lng);var kd=Math.max(kp.lat,j5.sw.lat);var j7=Math.min(kf.lng,j5.ne.lng);var j6=Math.min(kf.lat,j5.ne.lat);var ka=new hL(new cu(ke,kd),new cu(j7,j6));ka.pointBottomLeft=new cu(ke,kd);ka.pointBottomRight=new cu(j7,kd);ka.pointTopLeft=new cu(ke,j6);ka.pointTopRight=new cu(j7,j6);ka.setMinMax();ka.makeNormalizedPoint(this._earth.getHeading());return ka}j8=j8||{};var jW=j8.margins||[0,0,0,0];var kk=this.pixelToPointIn({x:jW[3],y:this.height-jW[2]},j8);var ko=this.pixelToPointIn({x:this.width-jW[1],y:jW[0]},j8);var kc=typeof j8.heading==="number"?j8.heading:(this._heading%360);var T=typeof j8.tilt==="number"?j8.tilt:this._tilt;var j4=this._webglMapCamera;if((kc===0&&T===0)||!j4){this._bounds.setSouthWest(kk);this._bounds.setNorthEast(ko);this._bounds.pointBottomLeft=kk;this._bounds.pointBottomRight=new cu(ko.lng,kk.lat);this._bounds.pointTopRight=ko;this._bounds.pointTopLeft=new cu(kk.lng,ko.lat);this._bounds.setMinMax();this._bounds.makeNormalizedPoint(kc);return this._bounds}var kb=this.pixelToPointIn({x:jW[3],y:jW[0]},j8);var jV=j4.getPosition();var kq=Math.sqrt(Math.pow(kb.lng-jV[0],2)+Math.pow(kb.lat-jV[1],2));var kl=this.getZoomUnits();var ks=kq/kl;var ki=j4._frustumSideLen;var j0=j4._fovy;if(ks>ki||(90-T)jY){jY=kh[km].lng}if(kh[km].latj3){j3=kh[km].lat}}this._bounds.setSouthWest(new cu(kn,kt));this._bounds.setNorthEast(new cu(jY,j3));this._bounds.pointTopLeft=kb;this._bounds.pointTopRight=ko;this._bounds.pointBottomRight=j9;this._bounds.pointBottomLeft=kk;this._bounds.makeNormalizedPoint(kc);this._bounds.setMinMax();return this._bounds},isLoaded:function(){return !!this.loaded},_getBestLevel:function(i,j4){var jX=0;if(this._renderType==="webgl"&&!bU()){jX=100}var jY=j4.margins||[10,10,10,10];var jV=j4.zoomFactor||0;var jZ=jY[1]+jY[3];var jW=jY[0]+jY[2];var e=this.getMinZoom();var j3=this.getMaxZoom();var j2=i.toSpan();var j1=j2.width/(this.width-jZ-jX);var j0=j2.height/(this.height-jW-jX);var T=18-p(Math.max(j1,j0));if(Tj3){T=j3}T+=jV;if(this._renderType!=="webgl"){T=Math.floor(T)}return T},getViewportIn:function(j4,jW){if(this.mapType===BMAP_EARTH_MAP){j4=j4||[];var jY=[];for(var j5=0;j5=0;j3--){jZ.extend(jX[j3])}if(jZ.isEmpty()){return j0}}var j9=jZ.getCenter();var e=this._getBestLevel(jZ,jW);if(jW.margins){var T=jW.margins;var j8=(T[1]-T[3])/2;var j1=(T[0]-T[2])/2;var j7=this.getZoomUnits(e);j9.lng=j9.lng+j7*j8;j9.lat=j9.lat+j7*j1}return{center:j9,zoom:e}},setViewportIn:function(jV,jW){if(this.mapType===BMAP_EARTH_MAP){var j0;if(jV&&jV.center){var T=iU.convertMC2LL(jV.center);var jY=this._earth._getEarthZoomByImgZoom(jV.zoom,T);j0={center:T,zoom:jY}}else{j0=[];for(var jX=0;jXhx.MAX_DRAG_TILT_L2){i.setTilt(hx.MAX_DRAG_TILT_L2,{callback:function(){i._changeEarthMapType(e)}})}else{i._changeEarthMapType(e)}},_changeEarthMapType:function(T){var jV=this;var jY=jV.tileMgr.tileLayers;if(this._mapTypeChangAni){this._mapTypeChangAni.stop()}var jX;if(this._earth){jX=this._earth.getEarthCanvas()}if(!this._earth){this.maskLayer.style.opacity=1;this.maskLayer.style.zIndex=999;this.maskLayer.style.background="#000"}this._mapTypeChangAni=new fq({duration:400,render:function(e){if(!jV._earth){return}jX.style.opacity=e},finish:function(){for(var e=jY.length-1,jZ=e;jZ>=0;jZ--){var j1=jY[jZ].tilesDiv;if(j1){j1.style.visibility="hidden"}if(jY[jZ]._isInnerLayer&&jV._renderType!=="webgl"){jV.removeTileLayer(jY[jZ])}}jV._mapTypeChangAni=null;jV._mapTypeChanging=false;function j0(){var j5=jV.getZoom()-2;var j6=jV.getCenterIn();var j3=iU.convertMC2LL(j6);jV._earth=new bw.Earth(jV,{center:j3,zoom:j5,showRealSunlight:jV.config.showRealSunlight,showMilkyway:jV.config.showMilkyway,earthBackground:jV.config.earthBackground});jV._proxyEarthEvents();var j2=jV.mapType;jV.mapType=T;var j4=new fA("onmaptypechange");j4.zoomLevel=this.zoomLevel;j4.mapType=T;j4.exMapType=j2;jV.dispatchEvent(j4);jV._setMapTypeStatus(T);eP.extend(jV,bw.EarthView.prototype);if(!jV._navigationCtrl&&jV.config.showControls){jV._navigationCtrl=new eR(jV)}}if(!jV._earth){if(bw["FeatureStyle"+jV.config.style]){j0()}else{jV.loadMapStyleFiles(function(){j0()})}}if(parseInt(jV.maskLayer.style.opacity,10)===1){setTimeout(function(){jV.maskLayer.style.zIndex=9;jV.maskLayer.style.opacity=0},1000)}}});if(!this._earth){return}var i=this.mapType;this.mapType=T;var jW=new fA("onmaptypechange");jW.zoomLevel=this.zoomLevel;jW.mapType=T;jW.exMapType=i;this.dispatchEvent(jW);jV._setMapTypeStatus(T);eP.extend(jV,bw.EarthView.prototype)},getMapStyleId:function(){if(typeof this.config.style==="string"){return this.config.style}return this.config.mapStyleId||"custom"},_setMapTypeStatus:function(T){var jZ=arguments[1];if(T===BMAP_EARTH_MAP){var jX=this._earth.getEarthCanvas();if(jX){jX.style.display=""}var j0={noAnimation:true};this._earth.setCenter(iU.convertMC2LL(this.centerPoint),j0);this._earth.setImageZoom(this.zoomLevel,j0);this._earth.setTilt(this.getTilt(),j0);this._earth.setHeading(this.getHeading(),j0)}else{if(this.preMapType===BMAP_EARTH_MAP&&this._earth){var jY=this._earth;var jV=jY.getMapZoom();var jW=jY._imageRawZoom||jV;var i=jW-jV;var e=jY.getCenter();if(this._renderType==="webgl"){this._tilt=jY.getTilt();if(this.zoomLevel>7){this._heading=jY.getHeading();jZ&&jZ(e,jV);return}if(jY.getHeading()!==0){jY.setTilt(this.getTilt());jY.setHeading(this.getHeading(),{callback:function(){jZ&&jZ(e,jV)}})}else{jZ&&jZ(e,jV)}return}if(i<0.1&&jY.getTilt()===0&&jY.getHeading()===0){jZ&&jZ(e,jV);return}jY.setTilt(0);jY.setHeading(0);jY.setZoom(jY.getZoom()-i,{callback:function(){jZ&&jZ(e,jV)}})}}},_proxyEarthEvents:function(){var jW=this;var jX=this._earth;jX.on("tilesload",function(i){jW.fire(i)});jX.on("centerandzoom",function(i){jW.dispatchEvent(new fA("onmoveend"));jW.dispatchEvent(new fA("onzoomend"))});function jV(i){jW.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=3?e:3},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(jV){jV=jV||this._initDate;var T=fn(jV);var e=iU.convertLL2MC(new cu(T[0],T[1]));var j3=e.latLng;var jY=bw.Projection.convertMC2LL(this.centerPoint);var j0=jV.getUTCHours();var j2=j0+24*jY.lng/360;var j1=j2-12;var jZ=j1*60*0.25;var jX=Math.asin(Math.sin(im(jY.lat))*Math.sin(im(j3.lat))+Math.cos(im(jY.lat))*Math.cos(im(j3.lat))*Math.cos(im(jZ)));var jW=Math.asin(Math.sin(im(jZ))*Math.cos(im(j3.lat))/Math.cos(jX));var i="north";if(jY.lat=19){return hx.MAX_DRAG_TILT}else{if(e<=18){if(e=this._enableTiltZoom-2){return(1-(this._enableTiltZoom-e)/2)*hx.MAX_DRAG_TILT_L2}return 0}return hx.MAX_DRAG_TILT_L2}else{return(hx.MAX_DRAG_TILT-hx.MAX_DRAG_TILT_L2)*(e-18)+hx.MAX_DRAG_TILT_L2}}},worldSize:function(i){var e=i||this.zoomLevel;return hx.WORLD_SIZE_MC/this.getZoomUnits(e)},setTrafficOn:function(e){if(e&&Number(e)>1){jo.setZIndex(Number(e))}this.addTileLayer(jo)},setTrafficOff:function(){this.removeTileLayer(jo)},showOverlayContainer:function(){this.setDisplayOptions({overlay:true})},hideOverlayContainer:function(){this.setDisplayOptions({overlay:false})},addLabelsToMapTile:function(jY,jX){for(var jV=0;jV"-1"){gC.load(jY)}else{bw["customStyleInfo_"+j6].xhr=hS.post(jY,j3,window["styleCbk_"+j6])}})}else{if(jY.indexOf("jsonp")>"-1"){gC.load(jY)}else{bw["customStyleInfo_"+j6].xhr=hS.post(jY,j3,window["styleCbk_"+j6])}}})}},getFeatureStyleTags:function(){var e=[];var jW=Object.keys(bw);for(var jV=0;jV-1&&bw[T]){e.push(T)}}return e},setCopyrightOffset:function(jV,i){var T=new fA("oncopyrightoffsetchange",{logo:jV,cpy:i});this.dispatchEvent(T)},_setTextRenderType:function(e){if(e){this.config.textRenderType=e;return}if(this.config.textRenderType!==null){return}if(bU()){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 fA("ondestroy"));var e=this.config.mapStyleId||0;delete bw["customStyleInfo_"+e];bw.BMAP_INSTANCES&&(bw.BMAP_INSTANCES-=1);if(!bw.BMAP_INSTANCES){this.destroyStyle()}this.config={};this.clearSpots();this._webGLStateId&&dL.WebGLState.remove(this._webGLStateId);this.container.onselectstart=null;this.container.style.backgroundImage="";this.maskLayer=null;this.platform=null;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="";window.FeatureStyle=null;window.iconSetInfo_high=null;window.indoorStyle=null;window._indoorMgr=null},600)},destroyStyle:function(){var e=[];var jW=Object.keys(bw);for(var jV=0;jV-1||T.indexOf("iconSetInfo")>-1||T.indexOf("indoorStyle")>-1){e.push(T)}}for(var jV=0;jV2){j6.push(jX.join("|"))}}return j6.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={};eP.extend(i,e.stylers);delete i.curZoomRegionId;delete i.curZoomRegion;delete i.level;if(eP.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 jV=e.stylers["level"];var T={};eP.extend(T,i);if(jV===undefined){return T}else{T[parseInt(jV,10)]=true;return T}},onStyleDataBack:function(jW,e,i,jV,jY,T){if(jW.status!==0){return}if(jW.data.style.length===3){if(!T.baseFs){T.baseFs=jW.data.style}bw.StyleBody=jW.data.style[2]}else{bw.StyleBody=jW.data.style}var jX=T.baseFs;bw["FeatureStyle"+i]=jX;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 aV={map:null,labelCache:{},calcDrawMc:function(T,i,e){var jV=[];switch(i){case"fill":jV=this.calcFill(T,e);break;case"line":break;case"building3d":jV=this.calcBuilding3d(T,e);break}return jV},calcFill:function(jW,T){var jX=[];for(var jV=0;jV0){jZ=jW.verticesLength[T-1]}end=jW.verticesLength[T];var jX=[];var jV="";if(jW.vertex){jX=jW.vertex;jV="building3d"}else{if(jW.data[0]){jX=jW.data[0];jV=jW.type}else{continue}}var jY=this.calcDrawMc(jX.slice(jZ,end),jV,e);this.map.addAreaSpot(jY,{userData:{styleId:jW.styleIds[T],type:"mapstyle"}})}},addLabelIntoAreaSpots:function(e){if(u.environment!=="customEditor"){return}for(var jW=0;jWjY){return jY}while(jZT){jZ=jW}else{jY=jW}jW=(jY-jZ)*0.5+jZ}return jW};ci.prototype.solve=function(e,i){return this.sampleCurveY(this.solveCurveX(e,i))};var gq={};function fq(T){var e={duration:1000,fps:30,delay:0,transition:gq.linear,dropLastAnimation:false};if(T){for(var jV in T){e[jV]=T[jV]}}if(T.beginTime){this._beginTime=T.beginTime}this._callbacks=[];this._options=e;if(e.delay){var jW=this;setTimeout(function(){jW._doStart()},e.delay)}else{this._doStart()}this._pauseTime=0}fq.INFINITE="INFINITE";fq.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===fq.INFINITE){this._endTime=null}else{this._endTime=this._beginTime+this._options.duration}this._loop()}};fq.prototype._loop=function(jV){var jY=this;jV=jV||new Date().getTime();jV=jV-this._pauseTime;if(!this._beginTime){this._beginTime=jV}if(!this._endTime&&typeof this._options.duration==="number"){this._endTime=this._beginTime+this._options.duration}if(jY._endTime!==null&&jV>=jY._endTime){if(jY._options.dropLastAnimation===false){jY._options.render(jY._options.transition(1),1,jV)}if(typeof jY._options.finish==="function"){jY._options.finish(jV,this)}for(var jX=0,e=jY._callbacks.length;jX=jW.percentage&&jV0){i.unselectable="on";i.selectstart=function(){return false};i.onmousedown=function(T){T.preventDefault();return false}}else{var e=jM(i);e.MozUserSelect="none";e.WebkitUserSelect="none";i.addEventListener("mousedown",function(T){T.preventDefault()},false)}}function aR(e){return e&&e.parentNode&&e.parentNode.nodeType!==11}function bI(i,e){i.insertAdjacentHTML("beforeEnd",e);return i.lastChild}function fD(T,i){var jV=document.createElement("div");jV.innerHTML=i;var e=jV.childNodes[0];return T.parentNode.insertBefore(e,T)}function ah(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 hb(i){ah(i);return c(i)}function gH(){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 h8(jW){if(!jW){return}jW.onload=jW.onerror=null;var T=jW.attributes,jV,e,jX;if(T){e=T.length;for(jV=0;jV>4);j1=((j0&15)<<4)|(jY>>2);jZ=((jY&3)<<6)|jX;T=T+String.fromCharCode(j3);if(jY!==64){T=T+String.fromCharCode(j1)}if(jX!==64){T=T+String.fromCharCode(jZ)}j3=j1=jZ="";j2=j0=jY=jX=""}while(jV-1||e.indexOf("iPad")>-1){return true}return false}function hF(){var e=navigator.userAgent;if(e.indexOf("Android")>-1){return true}return false}function im(e){return e*Math.PI/180}function e1(e){return e/Math.PI*180}function bA(e,jW){var jV=Math.pow(10,jW);if(typeof e==="number"){return Math.round(e*jV)/jV}for(var T=0;Te){T=e}}return T}function d7(e,i){while(e<0){e+=i}return e%i}function hC(i,e){return(i>=0&&e>=0)||(i<0&&e<0)}function L(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 ij(jV,T){for(var e=0;ejV||T.lati){return false}return true}function iT(jZ,jY,jX,jV){var jW=V(jX,jV,jZ);var T=V(jX,jV,jY);var i=V(jZ,jY,jX);var e=V(jZ,jY,jV);if(jW*T<0&&i*e<0){return true}else{if(jW===0&&iJ(jX,jV,jZ)){return true}else{if(T===0&&iJ(jX,jV,jY)){return true}else{if(i===0&&iJ(jZ,jY,jX)){return true}else{if(e===0&&iJ(jZ,jY,jV)){return true}else{return false}}}}}}function hq(T,i){var e=i.parentNode;if(e.lastChild===i){e.appendChild(T)}else{e.insertBefore(T,i.nextSibling)}}function dK(j1,j2){if(j2===0){return j1}var j0=0;var jY=0;if(!j1){throw"异常"}if(j1.length===0){return[]}for(var jW=1,T=j1.length-1;jWj0){jY=jW;j0=jZ}}var e=[];if(j0>=j2){var j4=j1.slice(0,jY);var j3=j1.slice(jY,j1.length);var jX=dK(j4,j2);var jV=dK(j3,j2);for(var jW=0,T=jX.length;jW=0){jV=Math.floor(T/65536)*65536;i=jV;e=T-jV}else{jV=Math.floor(-T/65536)*65536;i=-jV;e=T+jV}return[i,e]}function cA(e){if(e.lng>=0&&e.lat>=0){return new cu(e.lng-10000000,e.lat-6000000)}if(e.lng>=0&&e.lat<0){return new cu(e.lng-10000000,e.lat+6000000)}if(e.lng<0&&e.lat>=0){return new cu(e.lng+10000000,e.lat-6000000)}if(e.lng<0&&e.lat<0){return new cu(e.lng+10000000,e.lat+6000000)}}var hX=null;if(window.performance&&window.performance.now){hX=function(){return performance.now()}}else{if(Date.now){hX=function(){return Date.now()}}else{hX=function(){return(new Date).getTime()}}}function hB(jV,e,i){var T="mouseWheel";if(eP.Platform.macintosh){if(!isNaN(jV)&&(jV<10||jV!==120)&&(e%1===0&&e<5)){T="padScroll"}if(eP.Browser.firefox&&(e%1===0&&e<5&&i===0)){T="padScroll"}}if(eP.Browser.safari&&jV===12){T="mouseWheel"}return T}function bJ(j4,jZ){var j3=j4[0];var j2=j4[1];var jV=false;for(var jY=0,jX=jZ.length-2;jYj2)!==(T>j2))&&(j3<(j0-j1)*(j2-jW)/(T-jW)+j1);if(e){jV=!jV}jX=jY}return jV}function ar(jW,jY){var e=jY.length;var T=0;var jX=false;for(var jV=0;jV=jY[jV].lat)&&(jW.lat=jY[T].lat)&&(jW.lati){T=Math.pow(T-i+1,jV)+i-1}else{if(Tthis.ll.lng&&e.lngthis.ll.lat&&e.latg7){return ax}return fm};hg.prototype.normalize=function(i,jV,e,T){if(i>e){this.ll.lng=e;this.ru.lng=i}else{this.ll.lng=i;this.ru.lng=e}if(jV>T){this.ll.lat=T;this.ru.lat=jV}else{this.ll.lat=jV;this.ru.lat=T}};function eo(i,jV,e,T){this.sp={lng:i,lat:jV};this.ep={lng:e,lat:T};this.mbr=new hg(i,jV,e,T)}function hZ(jV,e,jX,jW){for(var T=0;T=e[T]&&jV.lng<=e[T+1]&&jV.lat>=jX[T]&&jV.lat<=jX[T+1]){return true}}return false}function f9(j0){var i=j0.lng;var jZ=j0.lat;var jV=Math.sqrt(i*i+jZ*jZ);var jX=Math.atan2(jZ,i);var T=jV+gk(jZ);var jW=jX+gj(i);var e=T*Math.cos(jW);var jY=T*Math.sin(jW);return{lng:e+ht,lat:jY+hs}}function aY(j0){var i=j0.lng-ht;var jZ=j0.lat-hs;var jV=Math.sqrt(i*i+jZ*jZ);var jX=Math.atan2(jZ,i);var T=jV-gk(jZ);var jW=jX-gj(i);var e=T*Math.cos(jW);var jY=T*Math.sin(jW);return{lng:e,lat:jY}}function gk(e){return Math.sin(e*fz*iG)*gG}function gj(e){return Math.cos(e*fz*iG)*gF}function aq(T,i,e){return((i.lng-T.lng)*(e.lat-T.lat)-(e.lng-T.lng)*(i.lat-T.lat))}function hy(i,e){return Math.abs(i-e)<=g7}function gr(jV,T){var i=jV.lat*iG;var j0=jV.lng*iG;var e=T.lat*iG;var jZ=T.lng*iG;var jX=Math.cos(i)*Math.cos(e);var jW=Math.cos(j0)*Math.cos(jZ);var j2=Math.sin(i)*Math.sin(e);var j1=Math.sin(j0)*Math.sin(jZ);var j3=jX*jW+jX*j1+j2;if(j3<-1){j3=-1}else{if(j3>1){j3=1}}var jY=Math.acos(j3)*ip;return jY}function h(jZ,jY){var i=jZ.lat*iG;var e=jY.lat*iG;var jV=jZ.lng*iG;var T=jY.lng*iG;var jX=i-e;var jW=jV-T;var j0=Math.sin(jX/2)*Math.sin(jX/2)+Math.cos(i)*Math.cos(e)*Math.sin(jW/2)*Math.sin(jW/2);return 2*Math.asin(Math.sqrt(j0))*ip}function gp(j0,T){var j2=by(j0,T);var j1=180;var jZ=90;var jY=-180;var jW=-90;var jX=T.sp;var jV=T.ep;j1=jX.lng=j1&&j2.lng<=jW&&j2.lat>=jZ){return gr(j0,j2)}else{var i=h(j0,T.sp);var e=h(j0,T.ep);return ijV.lat){if(aq({lng:cX[e],lat:cV[e]},{lng:cX[(e+1)%ac],lat:cV[(e+1)%ac]},jV)>0){++T}}}else{if(cV[(e+1)%ac]<=jV.lat){if(aq({lng:cX[e],lat:cV[e]},{lng:cX[(e+1)%ac],lat:cV[(e+1)%ac]},jV)<0){--T}}}}return T===0?fm:hP}function jB(jV){var jY={};if(jV.lngeO[2]+0.4||jV.lat>eO[3]+0.4){jY.lng=jV.lng;jY.lat=jV.lat;return jY}else{if(hZ(jV,ex,ew,ii)){jY=f9(jV);return jY}}var e=0;var j1=dA;var T=0;var jZ=new hg();var j0=1;if(bG(jV)===fm){for(var jX=0;jXt[2]+0.4||i.lat>t[3]+0.4){T.lng=i.lng;T.lat=i.lat;return T}else{if(hZ(i,b4,b2,ii)){T=aY(i);return T}}var e=jB(i);if(i.lng===e.lng&&i.lat===e.lng){T.lng=i.lng;T.lat=i.lat;return T}return decryptPt1(i,jB)}function ie(i,e){if(e===3&&i instanceof cu){var T=jB(i);return new cu(T.lng,T.lat)}else{return i}}function ez(i,e){if(e===3&&i instanceof cu){var T=eQ(i);return new cu(T.lng,T.lat)}else{if(e===5&&i instanceof cu){return new cu(i.lng,i.lat)}else{return i}}}function o(jX){if(!jX){jX={}}var jY=JSON.stringify(jX);var jW=0,T,jV,e;if(jY.length===0){return jW}for(T=0,e=jY.length;Ti-kZ?kZ:k0},e.offset=function(i,kZ){return kY(i=new Date(+i),null==kZ?1:Math.floor(kZ)),i},e.range=function(k0,i,kZ){var k1=[];if(k0=e.ceil(k0),kZ=null==kZ?1:Math.floor(kZ),!(i>k0&&kZ>0)){return k1}do{k1.push(new Date(+k0))}while(kY(k0,kZ),kX(k0),i>k0);return k1},e.filter=function(i){return kQ(function(kZ){for(;kX(kZ),!i(kZ);){kZ.setTime(kZ-1)}},function(kZ,k0){for(;--k0>=0;){for(;kY(kZ,1),!i(kZ);){}}})},T&&(e.count=function(i,kZ){return kA.setTime(+i),kE.setTime(+kZ),kX(kA),kX(kE),Math.floor(T(kA,kE))},e.every=function(i){return i=Math.floor(i),isFinite(i)&&i>0?i>1?e.filter(kW?function(kZ){return kW(kZ)%i===0}:function(kZ){return e.count(0,kZ)%i===0}):e:null}),e}function kF(e){return kQ(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())*kz)/kN})}function kx(e){return kQ(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)/kN})}var kA=new Date,kE=new Date,kL=kQ(function(){},function(i,T){i.setTime(+i+T)},function(i,T){return T-i});kL.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?kQ(function(i){i.setTime(Math.floor(i/e)*e)},function(i,T){i.setTime(+i+T*e)},function(i,T){return(T-i)/e}):kL:null};var kU=kL.range,kS=1000,kz=60000,kP=3600000,kH=86400000,kN=604800000,j1=kQ(function(e){e.setTime(Math.floor(e/kS)*kS)},function(i,T){i.setTime(+i+T*kS)},function(i,T){return(T-i)/kS},function(e){return e.getUTCSeconds()}),kR=j1.range,kG=kQ(function(e){e.setTime(Math.floor(e/kz)*kz)},function(i,T){i.setTime(+i+T*kz)},function(i,T){return(T-i)/kz},function(e){return e.getMinutes()}),j9=kG.range,kt=kQ(function(i){var T=i.getTimezoneOffset()*kz%kP;0>T&&(T+=kP),i.setTime(Math.floor((+i-T)/kP)*kP+T)},function(i,T){i.setTime(+i+T*kP)},function(i,T){return(T-i)/kP},function(e){return e.getHours()}),kM=kt.range,kj=kQ(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())*kz)/kH},function(e){return e.getDate()-1}),j0=kj.range,kg=kF(0),ki=kF(1),jW=kF(2),ke=kF(3),j3=kF(4),kw=kF(5),kD=kF(6),jY=kg.range,kv=ki.range,j7=jW.range,ks=ke.range,kI=j3.range,ku=kw.range,kT=kD.range,kK=kQ(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()}),kV=kK.range,kd=kQ(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()});kd.every=function(e){return isFinite(e=Math.floor(e))&&e>0?kQ(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 j6=kd.range,kB=kQ(function(e){e.setUTCSeconds(0,0)},function(i,T){i.setTime(+i+T*kz)},function(i,T){return(T-i)/kz},function(e){return e.getUTCMinutes()}),kl=kB.range,kk=kQ(function(e){e.setUTCMinutes(0,0,0)},function(i,T){i.setTime(+i+T*kP)},function(i,T){return(T-i)/kP},function(e){return e.getUTCHours()}),kh=kk.range,kf=kQ(function(e){e.setUTCHours(0,0,0,0)},function(i,T){i.setUTCDate(i.getUTCDate()+T)},function(i,T){return(T-i)/kH},function(e){return e.getUTCDate()-1}),kc=kf.range,kb=kx(0),ka=kx(1),j8=kx(2),j5=kx(3),j4=kx(4),jZ=kx(5),jX=kx(6),jV=kb.range,kr=ka.range,kO=j8.range,kC=j5.range,kJ=j4.range,kq=jZ.range,kp=jX.range,ko=kQ(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()}),kn=ko.range,j2=kQ(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()});j2.every=function(e){return isFinite(e=Math.floor(e))&&e>0?kQ(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 km=j2.range;ky.timeInterval=kQ,ky.timeMillisecond=kL,ky.timeMilliseconds=kU,ky.utcMillisecond=kL,ky.utcMilliseconds=kU,ky.timeSecond=j1,ky.timeSeconds=kR,ky.utcSecond=j1,ky.utcSeconds=kR,ky.timeMinute=kG,ky.timeMinutes=j9,ky.timeHour=kt,ky.timeHours=kM,ky.timeDay=kj,ky.timeDays=j0,ky.timeWeek=kg,ky.timeWeeks=jY,ky.timeSunday=kg,ky.timeSundays=jY,ky.timeMonday=ki,ky.timeMondays=kv,ky.timeTuesday=jW,ky.timeTuesdays=j7,ky.timeWednesday=ke,ky.timeWednesdays=ks,ky.timeThursday=j3,ky.timeThursdays=kI,ky.timeFriday=kw,ky.timeFridays=ku,ky.timeSaturday=kD,ky.timeSaturdays=kT,ky.timeMonth=kK,ky.timeMonths=kV,ky.timeYear=kd,ky.timeYears=j6,ky.utcMinute=kB,ky.utcMinutes=kl,ky.utcHour=kk,ky.utcHours=kh,ky.utcDay=kf,ky.utcDays=kc,ky.utcWeek=kb,ky.utcWeeks=jV,ky.utcSunday=kb,ky.utcSundays=jV,ky.utcMonday=ka,ky.utcMondays=kr,ky.utcTuesday=j8,ky.utcTuesdays=kO,ky.utcWednesday=j5,ky.utcWednesdays=kC,ky.utcThursday=j4,ky.utcThursdays=kJ,ky.utcFriday=jZ,ky.utcFridays=kq,ky.utcSaturday=jX,ky.utcSaturdays=kp,ky.utcMonth=ko,ky.utcMonths=kn,ky.utcYear=j2,ky.utcYears=km,Object.defineProperty(ky,"__esModule",{value:!0})});function eZ(e){this._elemType=e;this._objCollection={}}eZ.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=bV(this._elemType);e=bw.getGUID("obj_pool_");this._objCollection[e]=i;return i};eZ.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}};eZ.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 hS={get:function(i,jW,e,T){var jV=new XMLHttpRequest();jV.open("GET",i,true);jV.timeout=10000;jV.ontimeout=function(){T&&T()};jV.onreadystatechange=function(jX){if(this.readyState===4){if(this.status===200){jW&&jW(jV.responseText)}else{e&&e()}}};jV.send()},post:function(i,jX,jW,e,T){var jV=new XMLHttpRequest();jV.open("POST",i,true);jV.setRequestHeader("Content-type","application/x-www-form-urlencoded");jV.timeout=10000;jV.ontimeout=function(){T&&T()};jV.onreadystatechange=function(jY){if(this.readyState===4){if(this.status===200){jW&&jW(jV.responseText,jX)}else{e&&e()}}};jV.send(jX);return jV}};var gC=(function(e){function i(jX,T,jW){if(jX.indexOf("v=")===-1){jX+="&v=gl"}var jV=bV("script",{src:jX,type:"text/javascript",charset:"utf-8"});if(jV.addEventListener){jV.addEventListener("load",function(jZ){var jY=jZ.target;jY.parentNode.removeChild(jY);T&&T()},false);jV.addEventListener("error",function(jZ){if(jZ){var jY=jZ.target;jY&&jY.parentNode&&jY.parentNode.removeChild(jY)}jW&&jW(null)},false)}else{if(jV.attachEvent){jV.attachEvent("onreadystatechange",function(jZ){var jY=window.event.srcElement;if(jY&&(jY.readyState==="loaded"||jY.readyState==="complete")){jY.parentNode.removeChild(jY)}T&&T()})}}e.getElementsByTagName("head")[0].appendChild(jV)}return{load:function(jY,T,jV){if(typeof jY==="string"){i(jY,T,jV)}else{if(jY.length>0){var jX=jY.length;for(var jW=0;jW-1){return{col:jV,row:j1,zoom:j0,useZoom:T}}else{var jY=jQ.mapZoomBaseIndex[j0];var jX=jQ.baseScaleZoom[jY+1];if(!jX){return null}var jZ=this.getFactorByZooms(jX,j0);var e=jQ.baseZoomInfo[jX];return{col:Math.floor(jV/jZ),row:Math.floor(j1/jZ),zoom:jX,useZoom:e[e.length-1]}}return null}if(j0-1-1){return[{col:jW,row:jY,zoom:e,useZoom:T}]}else{var j9=0;var j6=e;while(j9j5){return null}var j4=Math.pow(2,kb);var i=jW*j4;var j3=jY*j4;var j0=e+kb;var j2=[];for(var j8=0;j8<2;j8++){var jX=i+j8;for(var j7=0;j7<2;j7++){var jZ=j3+j7;j2.push({col:jX,row:jZ,zoom:j0,useZoom:j0})}}return j2},getFactorByZooms:function(i,jV){var T=jQ.mapZoomBaseIndex[i];var jW=jQ.mapZoomBaseIndex[jV];var e=jQ.baseScaleZoomMercatorSize[T];var jX=jQ.baseScaleZoomMercatorSize[jW];return e/jX}};var c0={};var Z=["swiftshader","microsoft basic render driver"];var ha=["intel","nvidia","amd","apple","geforce"];function gt(e){e=e.toLowerCase();if(Z.indexOf(e)>=0){return true}if(e.indexOf("mobile")>=0){return true}return false}function cw(T){T=T.toLowerCase();for(var e=0;e=0){return true}}return false}function jO(e){if(!e){return false}if(gt(e)){return false}if(cw(e)){return true}return false}c0.ifEnableEarth=function(i){var e=c0.ifEnableEarth;if(!i&&typeof e._enable==="boolean"){return e._enable}if(c0.ifSupportWebGL()){e._enable=true;return true}e._enable=false;return false};c0.ifEnableWebGLMap=function(i){var e=c0.ifEnableWebGLMap;if(!i&&typeof e._enable==="boolean"){return e._enable}if(c0.ifSupportWebGL()){if(aH.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};c0.params={};c0.ifSupportWebGL=function(){var i=c0.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 jW=null;var j2={alpha:true,antialias:false,failIfMajorPerformanceCaveat:false,preserveDrawingBuffer:false,stencil:false};try{jW=T.getContext("webgl",j2)||T.getContext("experimental-webgl",j2)}catch(jY){i._supportWebGL=false}if(jW===null){i._supportWebGL=false}else{i._supportWebGL=true;var j0=jW.getExtension("WEBGL_debug_renderer_info");var jZ="";if(j0){jZ=jW.getParameter(j0.UNMASKED_RENDERER_WEBGL);if(jO(jZ)===true){i._supportWebGL=true}var j1=jW.getParameter(j0.UNMASKED_VENDOR_WEBGL);i._renderer=jZ;i._vendor=j1}if(!j0&&eP.Browser.firefox){i._supportWebGL=true}if(!j0&&eP.Platform.macintosh){i._supportWebGL=true}if(jW.drawingBufferWidth!==T.width||jW.drawingBufferHeight!==T.height){i._supportWebGL=false}if(jW.getParameter(jW.MAX_VERTEX_TEXTURE_IMAGE_UNITS)<4){i._supportWebGL=false}var jV=jW.getParameter(jW.MAX_TEXTURE_SIZE);c0.params.maxTextureSize=jV;if(jV<4096){i._supportWebGL=false}var jX=jW.getParameter(jW.MAX_TEXTURE_IMAGE_UNITS);if(jX<8){i._supportWebGL=false}if(!jW.getShaderPrecisionFormat||jW.getShaderPrecisionFormat(jW.FRAGMENT_SHADER,jW.HIGH_FLOAT).precision<23){i._supportWebGL=false}}return i._supportWebGL};c0.ifSupportCanvas2d=function(){var jW=c0.ifSupportCanvas2d;if(typeof jW.supportCanvas2d==="boolean"){return jW.supportCanvas2d}var T=document.createElement("canvas");var i=null;try{i=T.getContext("2d")}catch(jV){jW.supportCanvas2d=false}if(i===null){jW.supportCanvas2d=false}else{jW.supportCanvas2d=true}return jW.supportCanvas2d};c0.ifCanvas2dInBlackList=function(){return true};c0.ifEnableCanvas2dMap=function(){return false;var i=navigator.userAgent;var e=0;var jV=0;var jW=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)){jV=parseFloat(RegExp.$1);if(jV>=6.1){if(/chrome\/(\d+\.\d)/i.test(i)){e=parseFloat(RegExp.$1);if(e>=31){return true}}if(/MSIE (\d+(\.\d+)?)/.test(i)){jW=parseFloat(RegExp.$1);if(jW>=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};c0.ifSupportCSS3=function(jZ,i){var jY=document.createElement("div");var jX="Webkit Moz O ms".split(" ");var e=jX.length;var T="";var jV=jY.style;if(jZ in jV){T=jZ}jZ=jZ.replace(/^[a-z]/,function(j0){return j0.toUpperCase()});while(e--){var jW=jX[e]+jZ;if(jW in jV){T=jW;break}}if(i){return T}else{return T.length>0?true:false}};c0.isModernBrowser=c0.ifSupportCanvas2d()&&c0.ifSupportCSS3("transform");function ay(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}ay.prototype.setData=function(jV,jX){var i=this._cache;var T=this._size;if(T===0){return}var e=this._curSize;if(e===T){this._removeOld()}var jW;if(!i[jV]){jW={key:jV,data:jX,older:null,newwer:null};i[jV]=jW;if(this._least===null){this._least=jW}if(this._most===null){this._most=jW}this._curSize++}else{jW=i[jV];jW.data=jX;if(this._most===jW){return}jW.older&&(jW.older.newer=jW.newer);jW.newer&&(jW.newer.older=jW.older);if(this._least===jW){this._least=jW.newer}}if(this._most&&this._most!==jW){this._most.newer=jW;jW.older=this._most;this._most=jW;jW.newer=null}};ay.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};ay.prototype.getAllData=function(){return this._cache};ay.prototype.getHitRate=function(){return this._hitTimes/this._getDataTimes};ay.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--};ay.prototype._removeOld=function(){var e=this._cache;var jV=Math.round(this._size*0.6);var T=0;while(this._least&&T=72.004&&T<=137.8347&&i>=0.8293&&i<=55.8271}function kB(kG,kF){var kJ,i,kL,T=(kL=300+(kJ=kG-105)+2*(i=kF-35)+0.1*kJ*kJ+0.1*kJ*i+0.1*kq(kp(kJ)),kL+=2*(20*kk(6*kJ*kD)+20*kk(2*kJ*kD))/3,(kL+=2*(20*kk(kJ*kD)+40*kk(kJ/3*kD))/3)+2*(150*kk(kJ/12*kD)+300*kk(kJ/30*kD))/3),kE=function(kO,kN){var kM=2*kO-100+3*kN+0.2*kN*kN+0.1*kO*kN+0.2*kq(kp(kO));return kM+=2*(20*kk(6*kO*kD)+20*kk(2*kO*kD))/3,kM+=2*(20*kk(kN*kD)+40*kk(kN/3*kD))/3,kM+2*(160*kk(kN/12*kD)+320*kk(kN*kD/30))/3}(kG-105,kF-35),kI=kF/180*kD,kH=kk(kI),kK=kq(kH=1-kj*kH*kH);return[T=180*T/(kv/kK*km(kI)*kD),kE=180*kE/(kv*(1-kj)/(kH*kK)*kD)]}function ks(kE){var i=kE[0],T=kE[1];if(!ky(i,T)){return[i,T]}var kF=kB(i,T);return[i+kF[0],T+kF[1]]}function kl(kG){var kK=kG[0],T=kG[1];if(!ky(kK,T)){return[kK,T]}for(var kE=[kK,T],kI=kE[0],kF=kE[1],kJ=ks([kI,kF]),kH=kJ[0]-kK,kL=kJ[1]-T;kp(kH)>0.000001||kp(kL)>0.000001;){kH=(kJ=ks([kI-=kH,kF-=kL]))[0]-kK,kL=kJ[1]-T}return[kI,kF]}var kw=Math.sin,kx=Math.cos,j3=Math.atan2,kA=Math.sqrt,ki=3000*Math.PI/180;function ko(kE){var i=kE[0]-0.0065,T=kE[1]-0.006,kG=kA(i*i+T*T)-0.00002*kw(T*ki),kF=j3(T,i)-0.000003*kx(i*ki);return[kG*kx(kF),kG*kw(kF)]}function j7(kE){var i=kE[0],T=kE[1],kG=kA(i*i+T*T)+0.00002*kw(T*ki),kF=j3(T,i)+0.000003*kx(i*ki);return[kG*kx(kF)+0.0065,kG*kw(kF)+0.006]}var kf=180/Math.PI,jY=Math.PI/180,j0=6378137,kC=20037508.342789244;function kc(i){return[i[0]*kf/j0,(0.5*Math.PI-2*Math.atan(Math.exp(-i[1]/j0)))*kf]}function kr(kE){var i=Math.abs(kE[0])<=180?kE[0]:kE[0]-360*(kE[0]<0?-1:1),T=[j0*i*jY,j0*Math.log(Math.tan(0.25*Math.PI+0.5*kE[1]*jY))];return T[0]>kC&&(T[0]=kC),T[0]<-kC&&(T[0]=-kC),T[1]>kC&&(T[1]=kC),T[1]<-kC&&(T[1]=-kC),T}var kb,ka,j9,kh,j6,jV,kg=Math.abs,kt=[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],j5=[75,60,45,30,15,0],jX=[[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]],ku=[[-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 j4(kF,T,kE){var kH=kg(T)/kE[9],kG=kE[0]+kE[1]*kg(kF),i=kE[2]+kE[3]*kH+kE[4]*Math.pow(kH,2)+kE[5]*Math.pow(kH,3)+kE[6]*Math.pow(kH,4)+kE[7]*Math.pow(kH,5)+kE[8]*Math.pow(kH,6);return[kG*=kF<0?-1:1,i*=T<0?-1:1]}function kn(kE){for(var i=kE[0],T=kE[1],kG=[],kF=0;kFj5[kF]){kG=ku[kF];break}}return j4(i,T,kG)}function j2(kE){for(var i=kE[0],T=kE[1],kG=[],kF=0;kF=kt[kF]){kG=jX[kF];break}}return j4(i,T,kG)}function j1(T,i){if(!T){throw new Error(i)}}function kd(i){return !!i&&"[object Array]"===Object.prototype.toString.call(i)}function j8(i){return !isNaN(Number(i))&&null!==i&&!kd(i)}function jZ(){for(var kE=[],i=0;i=2,"Invalid input coordinate: "+kI),j1(j8(kI[0])&&j8(kI[1]),"Invalid input coordinate: "+kI),kI=kI.map(Number),kF=!0);var kE=kJ;return kF?kE(kI):(jW(kI,(function(kL){var i;i=kE(kL),kL[0]=i[0],kL[1]=i[1]})),kI)}})}));var ho={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(jX){var jY=jX.replace("#","");if(jY.length===3){jY+="f"}else{if(jY.length===6){jY+="ff"}}var e=[];var jW=jY.length;var jV=jW===8?2:1;for(var T=0;T=0&&jW<60){jY=jZ;jX=T;e=0}else{if(jW>=60&&jW<120){jY=T;jX=jZ;e=0}else{if(jW>=120&&jW<180){jY=0;jX=jZ;e=T}else{if(jW>=180&&jW<240){jY=0;jX=T;e=jZ}else{if(jW>=240&&jW<300){jY=T;jX=0;e=jZ}else{if(jW>=300&&jW<360){jY=jZ;jX=0;e=T}}}}}}jY=(jY+i)*255>255?255:(jY+i)*255;jX=(jX+i)*255>255?255:(jX+i)*255;e=(e+i)*255>255?255:(e+i)*255;return[Math.round(jY),Math.round(jX),Math.round(e)]},formatColorCssToRgbaArray:function(jX,T,jV){jV=(typeof jV!=="boolean")?true:jV;if(typeof jX!=="string"){return jV?[0,0,0,1]:[0,0,0,255]}var i=(jX||"Black").trim().toLowerCase();var e=[];var jW=ho.ColorRefTable[i];if(jW!==undefined){i=jW[0]}e=ho.parseCSSColor(i);if(T!==undefined&&!isNaN(Number(T))){T=Number(T);e[3]=ho.fitTo(T,0,1)}else{e[3]=Number((e[3]/255).toFixed(2))}if(!jV){e[3]=Math.floor(e[3]*255)}return e},fitTo:function(T,i,e){if(Te){T=e}}return T},generateColorRamp:function(e,j1,j2,jV,j7){j2=j2||[];jV=jV||"#ccc";j7=j7||1;const T=document.createElement("canvas");const j8=T.getContext("2d");T.width=256;T.height=j7;const jX=j1[0];const j4=j1[j1.length-1];if(e.length===j1.length){const j5=j8.createLinearGradient(0,0,256,1);for(var j0=0;j0>16)+(kf>>16)+(ke>>16);return(kd<<16)|(ke&65535)}function j6(kc,kd){return(kc<>>(32-kd))}function j1(kh,ke,kd,kc,kg,kf){return j7(j6(j7(j7(ke,kh),j7(kc,kf)),kg),kd)}function e(ke,kd,ki,kh,kc,kg,kf){return j1((kd&ki)|(~kd&kh),ke,kd,kc,kg,kf)}function jY(ke,kd,ki,kh,kc,kg,kf){return j1((kd&kh)|(ki&~kh),ke,kd,kc,kg,kf)}function j4(ke,kd,ki,kh,kc,kg,kf){return j1(kd^ki^kh,ke,kd,kc,kg,kf)}function ka(ke,kd,ki,kh,kc,kg,kf){return j1(ki^(kd|~kh),ke,kd,kc,kg,kf)}function T(km,kh){km[kh>>5]|=128<<(kh%32);km[((kh+64)>>>9<<4)+14]=kh;var ke;var kg;var kf;var kd;var kc;var kl=1732584193;var kk=-271733879;var kj=-1732584194;var ki=271733878;for(ke=0;ke>5]>>>(ke%32))&255)}return kc}function j0(kd){var kf;var kc=[];kc[(kd.length>>2)-1]=undefined;for(kf=0;kf>5]|=(kd.charCodeAt(kf/8)&255)<<(kf%32)}return kc}function jZ(kc){return j5(T(j0(kc),kc.length*8))}function kb(ke,kh){var kd;var kg=j0(ke);var kc=[];var kf=[];var ki;kc[15]=kf[15]=undefined;if(kg.length>16){kg=T(kg,ke.length*8)}for(kd=0;kd<16;kd+=1){kc[kd]=kg[kd]^909522486;kf[kd]=kg[kd]^1549556828}ki=T(kc.concat(j0(kh)),512+kh.length*8);return j5(T(kf.concat(ki),512+128))}function j9(kf){var ke="0123456789abcdef";var kd="";var kc;var kg;for(kg=0;kg>>4)&15)+ke.charAt(kc&15)}return kd}function j2(kc){return unescape(encodeURIComponent(kc))}function jV(kc){return jZ(j2(kc))}function j3(kc){return j9(jV(kc))}function i(kc,kd){return kb(j2(kc),j2(kd))}function j8(kc,kd){return j9(i(kc,kd))}function jW(kd,ke,kc){if(!ke){if(!kc){return j3(kd)}return jV(kd)}if(!kc){return j8(ke,kd)}return i(ke,kd)}if(typeof define==="function"&&define.amd){define(function(){return jW})}else{if(typeof module==="object"&&module.exports){module.exports=jW}else{jX.md5=jW}}})(this);var cG={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:"";ap&&ap(this.config,e);this.sender=true;if(T){this.sender=false}this.hosts=this.urlScope(this.hosts);this.sendError=this.notifyError();var jV=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};this.config.jsError&&this.handleJavaScriptError(jV);this.config.resourceError&&this.handleResourceError(jV);this.config.ajaxError&&this.handleAjaxError(jV)},handleJavaScriptError:function(T){var e=this;var i=T.onerror;T.onerror=function(jZ,jY,jV,jX,jW){if(e.isFetch(e.category.JS)&&e.hostExit(jY)){if(jW&&jW.stack){e.sendError({title:jZ,msg:jW.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof jZ==="string"){e.sendError({title:jZ,msg:JSON.stringify({resourceUrl:jY,rowNum:jV,colNum:jX}),category:"js",level:e.levels.ERROR})}}}if(i&&bQ(i)){i&&i.apply(T,arguments)}}},handleResourceError:function(i){var e=this;i.addEventListener("error",function(jX){if(jX){var jY=jX.target||jX.srcElement;var jW=jY instanceof HTMLScriptElement||jY instanceof HTMLLinkElement||jY instanceof HTMLImageElement;if(!jW){if(!i.onerror){var T=jX.filename||null;if(!e.isFetch(e.category.JS)||!e.hostExit(T)){return}if(jX.error&&jX.error.stack){e.sendError({title:jX.message,msg:jX.error.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof jX.message==="string"){e.sendError({title:jX.message,msg:JSON.stringify({resourceUrl:T,rowNum:jX.lineno,colNum:jX.cowno}),category:e.category.JS,level:e.levels.ERROR})}}}return}var jV=jY.src||jY.href;if(e.isFetch(e.category.RESOURCE)&&e.hostExit(jV)){e.sendError({title:jY.nodeName,msg:jV,category:e.category.RESOURCE,level:e.levels.ERROR})}}},true)},handleAjaxError:function(jX){var e=this;var jW=jX.location.protocol;if(jW==="file:"){return}if(!jX.XMLHttpRequest){return}var i=jX.XMLHttpRequest;var T=i.prototype.send;var jV=function(jZ){if(jZ&&jZ.currentTarget&&jZ.currentTarget.status!==200){var jY=jZ.target.responseURL;if(e.isFetch(e.category.AJAX)&&e.hostExit(jY)){e.sendError({title:jY,msg:JSON.stringify({response:jZ.target.response,responseURL:jY,status:jZ.target.status,statusText:jZ.target.statusText}),category:e.category.AJAX,level:e.levels.ERROR})}}};i.prototype.send=function(){if(this["addEventListener"]){this["addEventListener"]("error",jV);this["addEventListener"]("load",jV);this["addEventListener"]("abort",jV)}else{var jY=this["onreadystatechange"];this["onreadystatechange"]=function(jZ){if(this.readyState===4){jV(jZ)}jY&&jY.apply(this,arguments)}}return T.apply(this,arguments)}},notifyError:function(T){var i=T||1000;this._idleWorkerTicker=(function(jV){return function(){jV.runJob()}})(this);var e=this;return function(jW){if(jW.url){if(!e.isFetch(jW.category)){return}var jV=jW.url||"";if(!e.hostExit(jV)){return}delete jW.url}if(!navigator.onLine){return}e.collections.push(jW);e.checkJob(i)}},runJob:function(){if(this.collections.length===0){clearInterval(this.idleWork);this.idleWork=null;return}var jW=this.collections.slice(0,2);var T=i3(JSON.stringify({dataset:jW}));var jV=new Date().getTime();var i=en.apiIMG+"/blank.gif?product=jsapi&v=gl&l="+T+"&ak="+eF+"&t="+jV;if(this.sender){try{var jY=document.createElement("div");jY.style="width:0;height:0;visibility: hidden;opacity: 0;z-index:-999;background-image: url("+i+");";document.querySelector("BODY").appendChild(jY);setTimeout(function(){document.querySelector("BODY").removeChild(jY)})}catch(jX){}}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(jV){var T={};var jX=Object.keys(B);if(B&&jX.length>0){for(var jW in B){if(B[jW]&&(typeof B[jW]!=="function")){T[jW]=B[jW]}}}try{var jZ=JSON.stringify(T);if(jZ.length>2){return jV+"|"+jZ}else{return jV}}catch(jY){return jV}},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 jW=T.host+T.pathname;if(this.ignoreUrl.indexOf(jW)===-1&&this.hosts.indexOf(T.host)>-1){return true}return false}catch(jV){return false}},isFetch:function(e){return this.config[e+"Error"]||false}};bw.fetchDebug=cG;var jE={request:function(j3,jZ,jV,j6,jX){var j0=new Date()["getTime"]();var j2=(Math.random()*100000)["toFixed"](0);bw._rd["_cbk"+j2]=function(j7){if(j7.result&&j7.result["error"]&&j7.result["error"]===202){alert("该AK因为恶意行为已经被管理员封禁!");return}jV=jV||{};j3&&j3(j7,jV);delete bw._rd["_cbk"+j2]};j6=j6||"";var j5;var jW;if(jV&&jV.useEncodeURI){j5=i4(jZ,encodeURI);jW=i4(jZ)}else{j5=i4(jZ,encodeURIComponent);jW=i4(jZ)}var i=B.apiHost+"/"+j6+"?"+j5+"&ie=utf-8&oue=1&fromproduct=jsapi";var j1=B.apiHost+"/"+j6+"?"+jW+"&ie=utf-8&oue=1&fromproduct=jsapi";if(!jX){i+="&res=api";j1+="&res=api"}i+="&callback="+fk+"._rd._cbk"+j2;j1+="&callback="+fk+"._rd._cbk"+j2;var jY=window.___abvk?window.___abvk:jE.getSeckeyCidItem("SECKEY_ABVK");var e=jE.getSeckeyCidItem("BMAP_SECKEY");var j4=encodeURIComponent(jY+","+e);var T=jY+","+e;i+="&ak="+eF+"&v=gl&seckey="+j4+"&timeStamp="+j0;j1+="&ak="+eF+"&v=gl&seckey="+T+"&timeStamp="+j0;i+=i6()(j1);gC.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;bw._rd={};var da={request:function(i,j0){var jW=new Date()["getTime"]();var jZ=(Math.random()*100000).toFixed(0);if(j0){BMapGL._rd["_cbk"+jZ]=function(j2){j0&&j0(j2);delete BMapGL._rd["_cbk"+jZ]};i+="&callback=BMapGL._rd._cbk"+jZ}function jX(j3){var j2;var j4=new RegExp("(^| )"+j3+"=([^;]*)(;|$)");if(j2=document.cookie.match(j4)){return unescape(j2[2])}else{return -1}}if(i.indexOf("v=")===-1){i+="&v=gl"}var jV=window.___abvk?window.___abvk:this.getSeckeyCidItem("SECKEY_ABVK");var e=this.getSeckeyCidItem("BMAP_SECKEY");var j1=encodeURIComponent(jV+","+e);var T=jV+","+e;signUrl=i+"&seckey="+T+"&timeStamp="+jW;i+="&seckey="+j1+"&timeStamp="+jW;i+=i6()(signUrl);var jY=bV("script",{src:i,type:"text/javascript",charset:"utf-8"});if(jY.addEventListener){jY.addEventListener("load",function(j3){var j2=j3.target;j2.parentNode.removeChild(j2)},false);jY.addEventListener("error",function(j2){j0&&j0([,,,,,])},false)}else{if(jY.attachEvent){jY.attachEvent("onreadystatechange",function(j3){var j2=window.event.srcElement;if(j2&&(j2.readyState=="loaded"||j2.readyState=="complete")){j2.parentNode.removeChild(j2)}})}}document.getElementsByTagName("head")[0].appendChild(jY);jY=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 gx(){this._map=null;this._container;this._type="control";this.blockInfoWindow=true;this._visible=true}gx.inherits(c2,"Control");eP.extend(gx.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&&bQ(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){eP.ac(i,"BMap_noprint")}eP.on(i,"contextmenu",hb)}},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=bI(this._opts.container,'
')}else{var i='
';if(e&&e.config.autoSafeArea&&cq()){this._safeAreaContainer=bI(this._map.container,i);this._safeAreaContainer.style.position="absolute";this._safeAreaContainer.style.bottom="env(safe-area-inset-bottom)";this._container=bI(this._safeAreaContainer,i)}else{this._container=bI(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(jV){if(this.anchorFixed||typeof jV!=="number"||isNaN(jV)||jVBMAP_ANCHOR_BOTTOM_RIGHT){jV=this.defaultAnchor}this._opts.offset=this._opts.offset||this.defaultOffset;var T=this._opts.anchor;this._opts.anchor=jV;if(!this._container){return}var jX=this._container;var e=this._opts.offset.width;var jW=this._opts.offset.height;jX.style.left=jX.style.top=jX.style.right=jX.style.bottom="auto";switch(jV){case BMAP_ANCHOR_TOP_LEFT:jX.style.top=jW+"px";jX.style.left=e+"px";break;case BMAP_ANCHOR_TOP_RIGHT:jX.style.top=jW+"px";jX.style.right=e+"px";break;case BMAP_ANCHOR_BOTTOM_LEFT:jX.style.bottom=jW+"px";jX.style.left=e+"px";break;case BMAP_ANCHOR_BOTTOM_RIGHT:jX.style.bottom=jW+"px";jX.style.right=e+"px";break;default:break}var i=["TL","TR","BL","BR"];eP.rc(this._container,"anchor"+i[T]);eP.ac(this._container,"anchor"+i[jV])},getAnchor:function(){return this._opts.anchor},setOffset:function(e){if(!e){return}this._opts=this._opts||{};this._opts.offset=new iL(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 fA("onshow"))},hide:function(){if(this._visible===false){return}this._visible=false;if(this._container){this._container.style.display="none"}this.dispatchEvent(new fA("onhide"))},isPrintable:function(){return !!this._opts.printable},isVisible:function(){if(!this._container&&!this._map){return false}return !!this._visible},_asyncLoadCode:function(){var e=this;gQ.load("control",function(){if(e._asyncDraw){e._asyncDraw()}})}});var d9={TOP_LEFT:0,TOP_RIGHT:1,BOTTOM_LEFT:2,BOTTOM_RIGHT:3};bw.ControlAnchor=d9;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 fV(e){gx.call(this);e=e||{};this._opts={printable:false};eP.extend(this._opts,e);this._copyrightCollection=[];this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT;this.defaultOffset=new iL(5,2);this.setAnchor(e.anchor);this._canShow=true;this.sateMapStyle=false;this.blockInfoWindow=false;this._asyncLoadCode()}fV.inherits(gx,"CopyrightControl");eP.extend(fV.prototype,{initialize:function(e){this._map=e;return this._container},addCopyright:function(jV){var e={minZoom:0,bounds:null,content:"",mapType:""};for(var T in jV){e[T]=jV[T]}if(this._map){var jY=e.minZoom;if(jY===-1||jYthis._map.getMaxZoom()){e.minZoom=this._map.getMinZoom()}if(e.mapType!==""&&!ec[e.mapType]){e.mapType=BMAPGL_NORMAL_MAP}}var jW=this.getCopyright(jV.id);if(jW){for(var jX in e){jW[jX]=e[jX]}}else{this._copyrightCollection.push(e)}},getCopyright:function(jV){for(var T=0,e=this._copyrightCollection.length;T=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){gx.call(this);i=i||{};this._opts={printable:false};this.defaultAnchor=BMAP_ANCHOR_TOP_RIGHT;this.defaultOffset=new iL(10,10);this.setAnchor(i.anchor);this._opts=eP.extend(eP.extend(this._opts,{offset:this.defaultOffset,enableSwitch:true}),i);var e=this;gQ.load("control",function(){e._asyncDraw()})}v.inherits(gx,"MapTypeControl");eP.extend(v.prototype,{initialize:function(e){this._map=e;return this._container},showStreetLayer:function(e){this._map.showStreetLayer(e)}});function iX(e){gx.call(this);e=e||{};this._opts={};this._opts=eP.extend(this._opts,e);this._zoomInDisabled=false;this._zoomOutDisabled=false;this._zoomInTapped=false;this._zoomOutTapped=false;this.defaultAnchor=d9.BOTTOM_RIGHT;this.defaultOffset=new iL(15,20);this.setAnchor(e.anchor);this._asyncLoadCode()}iX.inherits(gx,"ZoomControl");eP.extend(iX.prototype,{initialize:function(e){this._map=e;return this._container}});function ge(e){gx.call(this);e=e||{};this._opts={autoZoom:true,autoViewport:true};this._opts=eP.extend(this._opts,e);this.defaultAnchor=d9.BOTTOM_LEFT;this.defaultOffset=new iL(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()}ge.inherits(gx,"LocationControl");eP.extend(ge.prototype,{initialize:function(e){this._map=e;return this._container},startLocation:function(){this._startLocationCalled=true},stopLocationTrace:function(){},setOptions:function(e){e=e||{};eP.extend(this._opts,e)}});function bz(e){gx.call(this);e=e||{};this._opts={};this._opts=eP.extend(this._opts,e);this.defaultAnchor=d9.BOTTOM_LEFT;this.defaultOffset=new iL(5,15);if(bU()){this.defaultOffset=new iL(10,10)}this.setAnchor(e.anchor)}bz.inherits(gx,"LogoControl");eP.extend(bz.prototype,{initialize:function(i){this._map=i;var e=this._container=document.createElement("div");e.innerHTML='';i.getContainer().appendChild(e);return e}});function at(e,i){this._map=e;this._indoorInfo=i;this._visible=true;this._adjustVisible=true;this._isMobile=bU();this._sizeConfig={FLOOR_BTN_HEIGHT:this._isMobile?35:26,SWITCH_ARROW_HEIGHT:this._isMobile?20:15};this._init()}at.prototype._init=function(){this._render();this._bindDom();this._bind();this._adjustDisplayHeight();var e=new fA("onindoor_bar_show");e.uid=this._indoorInfo.uid;this._map.dispatchEvent(e)};at.prototype._render=function(){if(!this._indoorInfo){return}var jZ=this._isMobile;var e=this._div=bV("div");eP.ac(e,"floor-select-container");jZ&&eP.ac(e,"mobile");jZ&&eP.ac(e,"all-border-radius");var i=this._btnTop=bV("button");eP.ac(i,"floor-switch-top");eP.ac(i,"top-border-radius");var jX=bV("div");eP.ac(jX,"floor-switch-top-icon");i.appendChild(jX);var jW=this._btnBottom=bV("button");var T=bV("div");eP.ac(T,"floor-switch-bottom-icon");jW.appendChild(T);eP.ac(jW,"floor-switch-bottom");eP.ac(jW,"bottom-border-radius");var jV=this._floorsContainer=bV("div");eP.ac(jV,"floors-container");jV.appendChild(this._createFloorsDom());this._div.appendChild(i);this._div.appendChild(jV);this._div.appendChild(jW);var j0=0;if(this._btnTop.style.display===""){j0=2*this._sizeConfig.SWITCH_ARROW_HEIGHT}this._div.style.height=parseInt(this._floorsContainer.style.height,10)+j0+"px";this._map.getContainer().appendChild(this._div);if(!jZ){var jY=this;setTimeout(function(){jY._div.style.right="20px"},20)}};at.prototype._createFloorsDom=function(){if(!this._indoorInfo){return}var T=this._ol=bV("ol");var jX=this._indoorInfo.currentFloor;for(var jW=this._indoorInfo.floors.length-1;jW>=0;jW--){var jY=this._indoorInfo.floors[jW].floorName;var e=bV("li");var jV=bV("button");eP.ac(jV,"btn-select-floor");if(jW===jX){eP.ac(jV,"selected")}jV.setAttribute("data-floor",jW);jV.innerHTML=jY;e.appendChild(jV);T.appendChild(e)}return T};at.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()};at.prototype._bindDom=function(){var e=this;eP.on(this._floorsContainer,"click",function(jV){var T=jV.target||jV.srcElement;if(T.tagName.toLowerCase()==="button"){e._map.showIndoor(e._indoorInfo.uid,parseInt(T.getAttribute("data-floor"),10));var i=new fA("onindoor_bar_click");i.uid=e._indoorInfo.uid;e._map.dispatchEvent(i)}});eP.on(this._floorsContainer,"mouseover",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){eP.ac(i,"hover")}});eP.on(this._floorsContainer,"mouseout",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){eP.rc(i,"hover")}});eP.on(this._floorsContainer,"touchstart",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){eP.ac(i,"onmousedown")}});eP.on(this._floorsContainer,"touchend",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){eP.rc(i,"onmousedown")}});eP.on(this._btnTop,"mouseover",function(i){if(this._disable){return}eP.ac(this,"hover")});eP.on(this._btnTop,"mouseout",function(i){eP.rc(this,"hover")});eP.on(this._btnBottom,"mouseover",function(i){if(this._disable){return}eP.ac(this,"hover")});eP.on(this._btnBottom,"mouseout",function(i){eP.rc(this,"hover")});eP.on(this._btnTop,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}eP.ac(this,"onmousedown")});eP.on(this._btnTop,"touchend",function(i){eP.rc(this,"onmousedown")});eP.on(this._btnBottom,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}eP.ac(this,"onmousedown")});eP.on(this._btnBottom,"touchend",function(i){eP.rc(this,"onmousedown")});eP.on(this._btnTop,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)+26)});eP.on(this._btnBottom,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)-26)});eP.on(this._div,"mousemove",ah);eP.on(this._div,"wheel",hb);eP.on(this._div,"mousewheel",hb);this._map.addEventListener("resize",function(){e._adjustDisplayHeight()})};at.prototype._adjustDisplayHeight=function(){if(!this._indoorInfo){return}var jX=this._map.getSize().height;var jY=this._sizeConfig.FLOOR_BTN_HEIGHT;var jZ=jX-291-100;if(this._isMobile){jZ=jX-12-108-this._map.config.bottomOffset}var e=this._indoorInfo.floors.length;var T=e*jY;var jV=e;var j1=0;var j2=this._floorsContainer.children[0];if(T>jZ){this._showArrow=true;eP.rc(j2.children[0].children[0],"top-border-radius");eP.rc(j2.children[e-1].children[0],"bottom-border-radius")}else{this._showArrow=false;eP.ac(j2.children[0].children[0],"top-border-radius");eP.ac(j2.children[e-1].children[0],"bottom-border-radius")}while(T>jZ){if(jV===0){break}jV--;j1=2*this._sizeConfig.SWITCH_ARROW_HEIGHT;T=jV*jY+j1}this._currentDisplayHeight=T;if(jV<3){this._setAdjustVisbile(false)}else{this._setAdjustVisbile(true)}this._floorsContainer.style.height=jV*jY+"px";var jW=this._indoorInfo.currentFloor;var i=e-jW;var j0=jW-1;this._div.style.height=parseInt(this._floorsContainer.style.height,10)+j1+"px";var j3=-(e-(jW+Math.round(jV/2)))*jY;this._setBarSliderTop(j3);if(jV=i*T){jV=e-i*T;eP.ac(this._btnBottom,"disable");eP.rc(this._btnBottom,"hover");this._btnBottom._disable=true}else{eP.rc(this._btnBottom,"disable");this._btnBottom._disable=false}if(jV>=0){jV=0;eP.ac(this._btnTop,"disable");eP.rc(this._btnTop,"hover");this._btnTop._disable=true}else{eP.rc(this._btnTop,"disable");this._btnTop._disable=false}this._ol.style.top=jV+"px"};at.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"}};at.prototype._bind=function(){var i=this._map;var e=this;i.on("indoor_status_changed",function(jZ){if(e._visible===false){return}var T=e._ol;var jX=jZ.uid;if(!jX){return}var jY=jZ.floor;for(var jW=0;jW=hx.HIGH_RES_MIN_RATIO?2:1;this._imgPath=B.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()}eP.extend(ir.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=bV("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=bV("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(){ij(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 fA("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 fA("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 fA("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 cN(T,i){this._map=T;this._target=T;var jV=T.temp.originMapType||T.mapType;if(jV==="B_EARTH_MAP"&&T._earth){this._target=T._earth}this._outContainer=i||T.getContainer();this._imgRatio=f3()>=hx.HIGH_RES_MIN_RATIO?2:1;this._imgPath=B.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()}eP.extend(cN.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=bV("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(jV){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 fA("ontiltmsdown"));e._tiltAni=new fq({duration:9999999,render:function(jW){i=e._target.getTilt();if(T==="in"&&i0){e._target.setTilt(i-1,{noAnimation:true})}}},finish:function(){e._tiltAni=null}});e._clickTimer=null},200);jV.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(jV){if(!e._enabled){return}if(!e._clickTimer){return}if(e._target.getLock()){return}clearTimeout(e._clickTimer);e._map.fire(new fA("ontiltclick"));var i=e._target.getTilt();e._target.setLock(true);jV.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(i0){i=78}if(this._mouseOver){e=52}if(this._enabled===false){jV=26;e=0;i=0}var jW="-"+(110+i+jV+e)+"px 1px";this._div&&(this._div.style.backgroundPosition=jW);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 g9(i){c2.call(this);this._opts={container:null,cursor:"default",marker:true};this._opts=eP.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;gQ.load("menu",function(){e._draw()})}g9.inherits(c2,"ContextMenu");eP.extend(g9.prototype,{initialize:function(i,e){this._map=i;this._overlay=e||null},remove:function(){this._map=this._overlay=null},addItem:function(jW,e){if(!jW||jW._type!="menuitem"||jW._text==""||jW._width<=0){return}for(var jV=0,T=this._items.length;jVthis._items.length-1){e=-1}jW._insertIndex=e;if(e===-1){this._items.push(jW);this._rItems.push(jW)}else{this._items.splice(e,0,jW);this._rItems.splice(e,0,jW)}},removeItem:function(jV){if(!jV||jV._type!="menuitem"){return}for(var T=0,e=this._items.length;Tthis._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 jV=0,e=this._items.length;jVT){this._items[jV]._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 hJ(T,jV,i){if(!T||!jV||typeof jV!="function"){return}c2.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=jV;this._map=null;this._type="menuitem";this._contextmenu=null;this._container=null;this._enabled=true;var e=this;gQ.load("menu",function(){e._draw()})}hJ.inherits(c2,"MenuItem");eP.extend(hJ.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 hL(e,i){this.setSouthWest(e);this.setNorthEast(i)}eP.extend(hL.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.lngthis.sw.lat&&e.ne.latMath.max(this.sw.lng,this.ne.lng)||Math.max(T.sw.lat,T.ne.lat)Math.max(this.sw.lat,this.ne.lat)){return null}var jW=Math.max(this.sw.lng,T.sw.lng);var i=Math.min(this.ne.lng,T.ne.lng);var jV=Math.max(this.sw.lat,T.sw.lat);var e=Math.min(this.ne.lat,T.ne.lat);return new hL(new cu(jW,jV),new cu(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.lngT){this.sw.lat=T}if(this.ne.lat=0&&e<90||e>=270&&e<360){if(this.normalizedTopRight.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 cu(0,0)}var T;var jW;T=new cu(Math.abs(e.lng),Math.abs(e.lat));for(var jV=0;jV=this.MCBAND[jV]){jW=this.MC2LL[jV];break}}var jX=this.convertor(e,jW);return new co(jX.lat,jX.lng)},convertLL2MC:function(jY){if(!jY){return new cu(0,0)}var j0=jY.lat;var jV=jY.lng;jV=this.getLoop(jY.lng,-180,180);j0=b8(j0,-85,85);var jX;for(var jW=0;jW=this.LLBAND[jW]){jX=this.LL2MC[jW];break}}if(!jX){for(jW=0;jWe){T-=e-i}while(Ti-1){e=e-i}while(e<0){e=e+i}return e},getLoopBox:function(e,jV){var i=this.HALF_SIZE*2;if(e[0]>0&&jV[2]<0){jV[2]=jV[2]+i}else{if(e[0]<0&&jV[0]>0){jV[0]=jV[0]-i}}return jV},createOrUpdateTileCoord:function(T,e,jV,i){if(i!==undefined){i[0]=T;i[1]=e;i[2]=jV;return i}else{return[T,e,jV]}},createOrUpdateTileRange:function(e,jV,jW,T,i){if(i!==undefined){i.minX=e;i.maxX=jV;i.minY=jW;i.maxY=T;return i}else{return{minX:e,maxX:jV,minY:jW,maxY:T}}},fromEPSG4326:function(T,j0,jY){var jW=T.length;var jX=jY>1?jY:2;var e=j0;if(e===undefined){if(jX>2){e=T.slice()}else{e=new Array(jW)}}for(var jV=0;jVthis.MAX_SAFE_Y){jZ=this.MAX_SAFE_Y}else{if(jZ<-this.MAX_SAFE_Y){jZ=-this.MAX_SAFE_Y}}e[jV+1]=jZ}return e},toEPSG4326:function(T,jZ,jY){var jW=T.length;var jX=jY>1?jY:2;var e=jZ;if(e===undefined){if(jX>2){e=T.slice()}else{e=new Array(jW)}}for(var jV=0;jV90){i=90}}while(e<-180){e+=360}while(e>180){e-=360}e=e||0;i=i||0;cu.call(this,e,i)}co.inherits(cu,"LatLng");eP.extend(co.prototype,{equals:function(e){return(this.lat===e.lat&&this.lng===e.lng)},clone:function(){return new co(this.lat,this.lng)},add:function(e){return new co(this.lng+e.lng,this.lat+e.lat)},sub:function(e){return new co(this.lat-e.lat,this.lng-e.lng)},mult:function(e){return new co(this.lng*e,this.lat*e)},div:function(e){return new co(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"}});function cC(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 co(e.lat,e.lng);this._ne=new co(i.lat,i.lng);this._swLng=e.lng;this._swLat=e.lat;this._neLng=i.lng;this._neLat=i.lat}}eP.extend(cC.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._neLngthis._swLat&&e._neLatMath.max(this._swLng,this._neLng)||Math.max(T._swLat,T._neLat)Math.max(this._swLat,this._neLat)){return false}var jW=Math.max(this._swLng,T._swLng);var i=Math.min(this._neLng,T._neLng);var jV=Math.max(this._swLat,T._swLat);var e=Math.min(this._neLat,T._neLat);this._sw=new co(jV,jW);this._ne=new co(e,i);this._swLng=jW;this._swLat=jV;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 co(0,0)}if(!this._ne){this._ne=new co(0,0)}if(!this._swLng||this._swLng>i){this._sw.lng=this._swLng=i}if(!this._neLng||this._neLngT){this._sw.lat=this._swLat=T}if(!this._neLat||this._neLate.lat){this._swLat=e.lat}if(this._swLng>e.lng){this._swLng=e.lng}if(this._neLat10){T&&T({status:25});return}var e=B.apiHost+"?qt=coords&coords=";eP.each(i,function(jX){e+=jX.lng+","+jX.lat+";"});e=e.replace(/;$/gi,"");e=e+"&from="+jW+"&to="+jV+"&v=gl&type=webgl&ak="+eF;da.request(e,function(jY){data=jY.content;if(typeof data!=="undefined"&&data!==null&&data.status===0){var jX=[];eP.each(data.result,function(jZ){jX.push(new cu(jZ.x,jZ.y))});delete data.result;data.points=jX}else{if(jY.result&&jY.result.error){data={status:jY.result.errror,message:"访问错误,请参考错误状态码https://lbsyun.baidu.com/index.php?title=webapi/appendix"}}}T&&T(data)})}});var d6={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 ai={_map:null,_html:"
",_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=bI(this._map.container,this._html);eP.on(e,"mouseup",function(T){if(T.button==2){hb(T)}});eP.on(e,"contextmenu",hb);e.style.display="none"},getDrawPoint:function(jV,jY,jW){jV=window.event||jV;var i=jV.offsetX||jV.layerX||0;var jX=parseInt(jV.offsetY)||parseInt(jV.layerY)||0;var T=jV.target||jV.srcElement;if(T!=ai.getDom(this._map)&&jY==true){while(T&&T!=this._map.container){if(!(T.clientWidth==0&&T.clientHeight==0&&T.offsetParent&&T.offsetParent.nodeName.toLowerCase()=="td")){i+=T.offsetLeft;jX+=T.offsetTop}T=T.offsetParent}}if(T!=ai.getDom(this._map)&&T!=this._map.container){return}if(typeof i==="undefined"||typeof jX==="undefined"){return}if(isNaN(i)||isNaN(jX)){return}if(jW){i=i+jW.x;jX=jX+jW.y}return this._map.pixelToPointIn(new fa(i,jX))},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 aQ(){this._type="overlay"}aQ.inherits(eP.BaseClass,"Overlay");aQ.getZIndex=function(i,e){i=i*1;if(!i){return 0}if(e){i=iU.convertMC2LL(new cu(0,i)).lat}return(i*-100000)<<1};eP.extend(aQ.prototype,{_i:function(T){this._map=T;if(!this.domElement&&bQ(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;eP.each(i,function(jV){eP.on(e.domElement,jV,ah)})}}}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 fA("onremove"))},hide:function(){this._visible=false;eP.hide(this.domElement)},show:function(){this._visible=true;eP.show(this.domElement)},getMap:function(){return this._map},dispose:function(){eP.BaseClass.prototype.decontrol.call(this)}});function et(){eP.BaseClass.call(this);aQ.call(this);this._visible=true;this._visibleInternal=true;this.zIndex=0;this.infoWindow=null;this._dblclickTime=0}et.inherits(aQ,"OverlayInternal");eP.extend(et.prototype,{initialize:function(e){this.map=e;eP.BaseClass.call(this,this.hashCode);return null},draw:function(){},remove:function(){this.decontrol();aQ.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,jV){if(!T){return this.point}else{var e=jV?jV.width:0;var jW=jV?jV.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+jW}else{i.x=i.x+e;i.y=i.y+jW}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 aO(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()}aO.prototype._init=function(){if(this.map._renderType!=="webgl"){this._createOverlayContainers()}else{this._createWebGLOverlayContainers()}this._bind()};aO.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)}};aO.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)};aO.prototype._createOverlayDiv=function(e,jV){var T=bV("div");var i=T.style;i.position="absolute";i.top=i.left=i.width=i.height="0";i.zIndex=jV;e.appendChild(T);return T};aO.prototype._bind=function(){var jW=this.map;var jV=this;function i(jY){jV.draw(jY)}if(jW._renderType!=="webgl"){jW.addEventListener("load",i);jW.addEventListener("moveend",i);jW.addEventListener("resize",i);jW.addEventListener("zoomend",i);jW.addEventListener("zooming_inner",i)}else{jW.on("update",i)}jW.on("destroy",function(){jW._overlays={};jW._overlayArray=[];jW._customOverlays=[];jW.overlayDiv=null;jW.overlayDivEx=null;var jY=Object.keys(jW._panes);for(var jZ=0;jZ0;jY--){if(jV._customOverlays[jY].enableMassClear!==false){this.removeOverlay(jV._customOverlays[jY]);jV._customOverlays.splice(jY,1)}}});jW.addEventListener("infowindowopen",function(jZ){var jY=this.infoWindow;if(jY){eP.hide(jY.popDom);eP.hide(jY.shadowDom)}});function T(){if(this.getMapType()==="B_EARTH_MAP"||this._renderType==="webgl"){if(jV._zoomingOrMoving===false){this._panes.markerMouseTarget.style.display="none";jV._zoomingOrMoving=true}}}function e(j0){if(this.getMapType()==="B_EARTH_MAP"||this._renderType==="webgl"){if(jV._zoomingOrMoving===true){if(this._panes.markerMouseTarget){this._panes.markerMouseTarget.style.display=""}jV._zoomingOrMoving=false;for(var jZ=0;jZ1){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 hL();this.points=[];this.greatCirclePoints=[];this._parseCache=[];this._holesCache=[];this._parseCacheGL=[];this._parseCacheGLRaw=[];this._areaCacheGL=[];this._strokeStyleInfoForGL=[[]];this._fillStyleInfoForGL="";this.vertexMarkers=[];this._temp={}}ik.JOININDEX={miter:0,round:1,bevel:2};ik.CAPINDEX={round:0,butt:1,square:2};ik.inherits(et,"Graph");ik.getGraphPoints=function(i){var e=[];if(!i||i.length===0){return e}if(typeof i==="string"){var T=i.split(";");eP.each(T,function(jW){var jV=jW.split(",");e.push(new cu(jV[0],jV[1]))})}if(i.constructor===Array&&i.length>0){e=i}return e};ik.parseTolerance={0:[0.09,0.005,0.0001,0.00001],1:[9000,500,20,1]};eP.extend(ik.prototype,{initialize:function(e){this.map=e;return null},draw:function(){},setPoints:function(e){this._clearCache();this.points=ik.getGraphPoints(e).slice(0);this._calcBounds()},setPathIn:function(e){this.setPoints(e)},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds=new hL();if(!this.hasMultipleParts){eP.each(this.points,function(i){e._bounds.extend(i)})}else{eP.each(this.points,function(i){eP.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 cu(e.lng,e.lat);this._calcBounds()},setPositionAt:function(i,e){if(!e||!this.points[i]){return}var T=iU.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 hL(iU.convertMC2LL(e.getSouthWest()),iU.convertMC2LL(e.getNorthEast()));i.setMinMax();return i},remove:function(){if(this.map){this.map.removeEventListener("onmousemove",this._graphMouseEvent);this.map.removeEventListener("onclick",this._graphClickEvent)}et.prototype.remove.call(this);this._clearCache();var e=new fA("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;gQ.load("poly",function(){e.addVertexs()},true)},disableEditing:function(){this._config.enableEditing=false;var e=this;gQ.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;e0){jX=this.greatCirclePoints}var jW=e.config.coordType===2?1:e.config.coordType;var jY=this.getParseTolerance(e.getZoom(),jW);if(!this.hasMultipleParts){var j1=dK(jX,jY)}else{var j1=[];for(var T=0;TjW.maxY){T.bottom=4;T.all+=T.bottom}}if(e>jW.maxX){T.right=2;T.all+=T.right}else{if(e=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 dB.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 dB.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(jV,jW,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(jV,jW==null?null:jW.angleTo(jV))};this.addMarkerAngle=function(jV,T){this.points.push(jV);this.angles.push(T)};this.getMarkerPoints=function(){return this.points};this.getMarkerAngles=function(){for(var jV=0;jV1){j1*=Math.sqrt(kg);j0*=Math.sqrt(kg)}var j8=(j3==jZ?-1:1)*Math.sqrt(((Math.pow(j1,2)*Math.pow(j0,2))-(Math.pow(j1,2)*Math.pow(ko.y,2))-(Math.pow(j0,2)*Math.pow(ko.x,2)))/(Math.pow(j1,2)*Math.pow(ko.y,2)+Math.pow(j0,2)*Math.pow(ko.x,2)));if(isNaN(j8)){j8=0}var j7=new dB.Point(j8*j1*ko.y/j0,j8*-j0*ko.x/j1);var jW=new dB.Point((kj.x+j4.x)/2+Math.cos(T)*j7.x-Math.sin(T)*j7.y,(kj.y+j4.y)/2+Math.sin(T)*j7.x+Math.cos(T)*j7.y);var ke=function(kp){return Math.sqrt(Math.pow(kp[0],2)+Math.pow(kp[1],2))};var ka=function(kq,kp){return(kq[0]*kp[0]+kq[1]*kp[1])/(ke(kq)*ke(kp))};var km=function(kq,kp){return(kq[0]*kp[1]=1){kk=0}var kd=1-jZ?1:-1;var ki=kn+kd*(kk/2);var i=new dB.Point(jW.x+j1*Math.cos(ki),jW.y+j0*Math.sin(ki));kh.addMarkerAngle(i,ki-kd*Math.PI/2);kh.addMarkerAngle(j4,ki-kd*Math.PI);j2.addPoint(j4.x,j4.y);if(kf!=null){var ka=j1>j0?j1:j0;var kb=j1>j0?1:j1/j0;var j9=j1>j0?j0/j1:1;kf.translate(jW.x,jW.y);kf.rotate(T);kf.scale(kb,j9);kf.arc(0,0,ka,kn,kn+kk,1-jZ);kf.scale(1/kb,1/j9);kf.rotate(-T);kf.translate(-jW.x,-jW.y)}}break;case"Z":case"z":if(kf!=null){kf.closePath()}kh.current=kh.start}}return j2};this.getMarkers=function(){var jV=this.PathParser.getMarkerPoints();var jX=this.PathParser.getMarkerAngles();var jW=[];for(var T=0;Tthis.x2){this.x2=jW}}if(jX!=null){if(isNaN(this.y1)||isNaN(this.y2)){this.y1=jX;this.y2=jX}if(jXthis.y2){this.y2=jX}}};this.addX=function(jW){this.addPoint(jW,null)};this.addY=function(jW){this.addPoint(null,jW)};this.addBoundingBox=function(jW){this.addPoint(jW.x1,jW.y1);this.addPoint(jW.x2,jW.y2)};this.addQuadraticCurve=function(j1,j0,jX,jW,j3,j2){var jZ=j1+2/3*(jX-j1);var jY=j0+2/3*(jW-j0);var j5=jZ+1/3*(j3-j1);var j4=jY+1/3*(j2-j0);this.addBezierCurve(j1,j0,jZ,j5,jY,j4,j3,j2)};this.addBezierCurve=function(j9,j8,j0,jY,j5,j3,kb,ka){var j1=[j9,j8],jZ=[j0,jY],jX=[j5,j3],jW=[kb,ka];this.addPoint(j1[0],j1[1]);this.addPoint(jW[0],jW[1]);for(i8=0;i8<=1;i8++){var kc=function(kg){return Math.pow(1-kg,3)*j1[i8]+3*Math.pow(1-kg,2)*kg*jZ[i8]+3*(1-kg)*Math.pow(kg,2)*jX[i8]+Math.pow(kg,3)*jW[i8]};var ke=6*j1[i8]-12*jZ[i8]+6*jX[i8];var kf=-3*j1[i8]+9*jZ[i8]-9*jX[i8]+3*jW[i8];var kd=3*jZ[i8]-3*j1[i8];if(kf==0){if(ke==0){continue}var j7=-kd/ke;if(0=0){jV=jV+1}else{jV=1+jV}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("+jV+")"}if(!this.isReDraw){this._refresh(e)}}};e8.prototype._refresh=function(e){e.textureCoord=e.textureCoordGLMap=null;var i=new fA("onstatus_change");i.overlay=e;i.action="setIcon";i.imageUrlChanged=true;setTimeout(function(){e.fire(i)},100)};e8.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}};e8.prototype.getCurrentImageUrl=function(){return this.id};e8.prototype.getRenderData=function(){this._renderData=this.generateRenderData();return this._renderData};e8.prototype.toString=function(){return"Symbol"};var fo={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 b3={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 dD(i,e){e8.call(this);e=e||{};this.style={anchor:e.anchor||new iL(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 iL(0,0);this.anchor=new iL(0,0);this._rawPath=i;this._buildPath(true)}dD.inherits(e8,"SVGSymbol");dD.generateKey=function(jV,i){if(!jV){return null}if(parseInt(jV)){jV=parseInt(jV)}if(typeof jV==="number"){if(!fo[jV]&&![0,1,2,0,4][jV]){return null}}var e={anchor:i.anchor||new iL(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:jV,style:e});return"symbol_svg_icon_"+T};eP.extend(dD.prototype,{_buildPath:function(j6){var j0=this;var j2=j0._rawPath;if(parseInt(j2)){j2=parseInt(j2)}if(fo[j2]){j2=fo[j2]}j0.id=dD.generateKey(j2,j0.style);if(!j0.id){return}switch(j2){case b3.BMap_Symbol_SHAPE_CIRCLE:var j3=j0._calSize(2),j1=j3,kb=j0.style.scale,jW=j0._anchor;this.size=new iL(j3,j1);this.anchor=new iL(j3/2+jW.width*kb,j1/2+jW.height*kb);j0.path=b3.BMap_Symbol_SHAPE_CIRCLE;break;case b3.BMap_Symbol_SHAPE_RECTANGLE:var j3=j0._calSize(4),j1=j0._calSize(2),jW=j0._anchor,j8=j0.style.strokeWeight!==undefined?j0.style.strokeWeight:j0.style.scale,kb=j0.style.scale;this.size=new iL(j3,j1);this._originOffset=new iL(Math.floor(-j8/2),Math.floor(-j8/2));this.anchor=new iL(j3/2+jW.width*kb,j1/2+jW.height*kb);j0.path=b3.BMap_Symbol_SHAPE_RECTANGLE;break;case b3.BMap_Symbol_SHAPE_STAR:var j3=j0._calSize(20),j1=j3,jW=j0._anchor,kb=j0.style.scale;this.size=new iL(j3,j1);this.anchor=new iL(j3/2+jW.width*kb,j1/2+jW.height*kb);j0.path=b3.BMap_Symbol_SHAPE_STAR;break;default:var j2=new dB(j2),jV=j2.bounds(),j5=j0.style.rotation*Math.PI/180,j8=j0.style.strokeWeight!==undefined?j0.style.strokeWeight:j0.style.scale,kb=j0.style.scale,jW=j0._anchor;var ka=new iL(Math.floor(jV.x1*kb-j8/2),Math.floor(jV.y1*kb-j8/2)),e={topleft:new fa(Math.floor(jV.x1*kb-j8/2)-kb*jW.width,Math.floor(jV.y1*kb-j8/2)-kb*jW.height),bottomleft:new fa(Math.floor(jV.x1*kb-j8/2)-kb*jW.width,Math.ceil(jV.y2*kb-j8/2)-kb*jW.height),topright:new fa(Math.ceil(jV.x2*kb+j8/2)-kb*jW.width,Math.floor(jV.y1*kb-j8/2)-kb*jW.height),bottomright:new fa(Math.ceil(jV.x2*kb+j8/2)-kb*jW.width,Math.ceil(jV.y2*kb+j8/2)-kb*jW.height)},i={},j9=[],jZ=[];var j7=e.topleft.x===0?0:Math.atan(e.topleft.y/e.topleft.x),T=j7+j5;for(var j4 in e){var jY=Math.cos(j5)*e[j4].x-Math.sin(j5)*e[j4].y,jX=Math.sin(j5)*e[j4].x+Math.cos(j5)*e[j4].y;i[j4]=new fa(jY,jX);j9.push(jY);jZ.push(jX)}xmax=Math.max.apply(Math,j9),ymax=Math.max.apply(Math,jZ),xmin=Math.min.apply(Math,j9),ymin=Math.min.apply(Math,jZ);this.size=new iL(Math.ceil(xmax-xmin),Math.ceil(ymax-ymin));this.anchor=new iL(-xmin,-ymin);this._originOffset=new iL(xmin-i.topleft.x,ymin-i.topleft.y);this._innerOffset=new fa(ka.width,ka.height);this._rotationAngle=j5;j0.path=j2;break}this.imageSize=new iL(this.size.width,this.size.height);this.offset=this.anchor;if(j6){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 j1=this,jV=this.style.scale,j2,j3=this.size;if(this.context){j2=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}j2.clearRect(0,0,this.size.width*2,this.size.height*2);j2.fillStyle=ho.convert2rgba(j1.style.fillColor,j1.style.fillOpacity);j2.strokeStyle=ho.convert2rgba(j1.style.strokeColor,j1.style.strokeOpacity);j2.save()}else{return false}j2.scale(2,2);j2.lineCap="round";j2.lineJoin="round";j2.lineWidth=j1.style.strokeWeight||jV;if(j1._originOffset){j2.translate(-j1._originOffset.width,-j1._originOffset.height)}if(j1._rotationAngle){j2.rotate(j1._rotationAngle)}if(j1._innerOffset){j2.translate(-j1._innerOffset.x,-j1._innerOffset.y)}switch(j1.path){case b3.BMap_Symbol_SHAPE_CIRCLE:j2.arc(j3.width/2,j3.height/2,jV,0,2*Math.PI);break;case b3.BMap_Symbol_SHAPE_RECTANGLE:j2.rect(0,0,4*jV,2*jV);break;case b3.BMap_Symbol_SHAPE_STAR:j2.beginPath();var jX=j3.width/2,jZ=jV*10;var jW=(2*Math.PI)/10;for(var jY=11;jY!=0;jY--){var e=jZ*(jY%2+1)/2;var j0=jW*jY;j2.lineTo((e*Math.sin(j0))+jX,(e*Math.cos(j0))+jX)}j2.closePath();break;default:j2.lineWidth=j2.lineWidth/jV;j2.scale(jV,jV);j1.path.draw(j2)}j2.fill();j2.stroke();j2.restore();this.data=j2.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=ho.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()}});bw.SymbolShapeType=b3;function jd(jX,jV,T){if(!jX||!jV){return}this.imageUrl=null;this.imageDom=null;if(typeof jX==="string"){this.imageUrl=jX}else{this.imageDom=jX;if(!this.imageDom.id){this.imageDom.id=bw.getGUID("icon_dom_")}}this.size=jV;var jW=new iL(Math.floor(jV.width/2),Math.floor(jV.height/2));var i={offset:jW,imageOffset:new iL(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)}jd.prototype.setImageUrl=function(e){if(!e){return}this.imageUrl=e;this._renderData=null};jd.prototype.getCurrentImageUrl=function(){if(window.devicePixelRatio>1&&this.srcSetObject["2x"]){return this.srcSetObject["2x"]}return this.imageUrl};jd.prototype.setPrintImageUrl=function(e){if(!e){return}this.printImageUrl=e};jd.prototype.setSize=function(e){if(!e){return}this.size=new iL(e.width,e.height);this._renderData=null};jd.prototype.setOffset=function(e){if(!e){return}this.anchor=this.offset=new iL(e.width,e.height);this._renderData=null};jd.prototype.setAnchor=function(e){this.setOffset(e)};jd.prototype.setImageOffset=function(e){if(!e){return}this.imageOffset=new iL(e.width,e.height);this._renderData=null};jd.prototype.setInfoWindowOffset=function(e){if(!e){return}this.infoWindowOffset=new iL(e.width,e.height)};jd.prototype.setImageSize=function(e){if(!e){return}this.imageSize=new iL(e.width,e.height)};jd.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};jd.prototype.toString=function(){return"Icon"};jd.prototype.generateRenderData=function(jX){var T=this.offset;var e=this.size;var jZ=this.imageOffset;var jY=[];jY.push(-T.width,T.height-e.height,0);jY.push(e.width-T.width,T.height-e.height,0);jY.push(e.width-T.width,T.height,0);jY.push(-T.width,T.height-e.height,0);jY.push(e.width-T.width,T.height,0);jY.push(-T.width,T.height,0);if(jX!==0){for(var jW=0;jW730){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=B.imgPath;this.overlay=null;var e=this;gQ.load("infowindow",function(){e._draw()})}dV.inherits(eP.BaseClass,"InfoWindow");eP.extend(dV.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(){eP.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=iU.convertMC2LL(e);return ez(i)}return iU.convertMC2LL(e)},getOffset:function(){return this._config.offset},dispose:function(){eP.BaseClass.prototype.decontrol.call(this)},toString:function(){return"InfoWindow"}});hx.prototype.openInfoWindow=function(T,e){T.latLng=new co(e.lat,e.lng);var i=iU.convertLL2MC(e);this.openInfoWindowIn(T,i)};hx.prototype.closeInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeInfoWindow()}};hx.prototype.openInfoWindowIn=function(jV,e){if(!jV||jV.toString()!=="InfoWindow"||!e||e.toString()!=="Point"){return}var i=this.temp;if(!i.marker){var T=new jd(B.imgPath+"blank.gif",{width:1,height:1});i.marker=new jz(e,{icon:T,width:1,height:1,offset:new iL(0,0),infoWindowOffset:new iL(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openInfoWindow(jV)};et.prototype.openInfoWindow=function(e){if(this.map){this.map.closeInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;eP.BaseClass.call(e,e.hashCode)}};et.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 bc(T,i){et.call(this);this.content=T;this.map=null;this.domElement=null;this._config={width:0,offset:new iL(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;var e=this;gQ.load("marker",function(){e._draw()})}bc.inherits(et,"Label");eP.extend(bc.prototype,{setPoint:function(e){if(e&&e.toString()==="Point"&&!this.getMarker()){if(this.coordType===BMAP_COORD_GCJ02){var i=ie(e,3);this.point=this._config.point=new cu(i.lng,i.lat)}else{this.point=this._config.point=new cu(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 iL(e.width,e.height)},getOffset:function(){return this._config.offset},setStyle:function(e){e=e||{};this._config.styles=eP.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 hE(T,i){var jV={};for(var e in i){if(i.hasOwnProperty(e)){if(e==="position"){jV.point=iU.convertLL2MC(i[e]);this.latLng=new co(i[e]["lat"],i[e]["lng"])}else{jV[e]=i[e]}}}bc.call(this,T,jV)}hE.inherits(bc,"LabelOut");eP.extend(hE.prototype,{toString:function(){return"Label"},setPosition:function(e){this.latLng=new co(e.lat,e.lng);var i=iU.convertLL2MC(e);this.setPoint(i)},getPosition:function(){return this.latLng}});window.BMAP_ANIMATION_DROP=1;window.BMAP_ANIMATION_BOUNCE=2;function jz(e,i){et.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 iL(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._isDragging=false;var T=this;gQ.load("marker",function(){T._draw()})}jz.TOP_ZINDEX=aQ.getZIndex(-90)+1000000;jz.DRAG_ZINDEX=jz.TOP_ZINDEX+1000000;jz._injectMethond=function(e){eP.extend(jz.prototype,e)};jz.inherits(et,"Marker");eP.extend(jz.prototype,{toString:function(){return"Marker"},setOptions:function(e){this.setConfig(e);if(!e.icon){this._config.icon=new jd(B.imgPath+"marker_red.png",new iL(23,25),{offset:new iL(10,25),infoWindowOffset:new iL(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 bc)){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=ie(e,3);this.point=this._config.point=new cu(i.lng,i.lat);this.latLng=iU.convertMC2LL(i)}else{this.point=this._config.point=new cu(e.lng,e.lat);this.latLng=iU.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 co(e.lat,e.lng);var i=iU.convertLL2MC(e);jz.call(this,i,T)}s.inherits(jz,"MarkerOut");eP.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 gm();var jX=e.readFeaturesFromObject(T)||[];for(var jV=0,jW=jX.length;jV1||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 jV=i.getCurrentImageUrl()!==e;this._config.icon=i;this.textureCoord=this.textureCoordGLMap=null;this.draw();var T=new fA("onstatus_change");T.overlay=this;T.action="setIcon";T.imageUrlChanged=jV;this.fire(T)}},getIcon:function(){return this._config.icon},setPosition:function(e){this.latLng=new co(e.lat,e.lng);var i=iU.convertLL2MC(e);this.setPositionIn(i)},getPosition:function(){var e=this.getPositionIn();return iU.convertMC2LL(e)}});function fK(T,e){ik.call(this,e);this._normalizedBounds=new hL();this.setPoints(T);var i=this;gQ.load("poly",function(){i._draw()})}fK.inherits(ik,"Polyline");eP.extend(fK.prototype,{getBoundsIn:function(e){if(!e){this._bounds.setMinMax();return this._bounds}this._normalizedBounds.setMinMax();return this._normalizedBounds},setPoints:function(jY){this._clearCache();this.points=ik.getGraphPoints(jY).slice(0);if(this._config.geodesic===true){this.greatCirclePoints.length=0;for(var jW=0;jW15437726){if(jX.lng0){eP.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{eP.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<-hx.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>hx.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-hx.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=hx.WORLD_SIZE_MC_HALF}},calcGreatCirclePoints:function(jV,T){var jX=jV.latLng;var jW=T.latLng;if(jX.equals(jW)){return}var e=iU.getDistance(im(jX.lng),im(jX.lat),im(jW.lng),im(jW.lat));if(e<250000){return}var j1=Math.round(e/150000);var j5=this.calcAngularDistance(jX,jW);this.greatCirclePoints.push(jV);var j4=jX.lng;var j3=jV;for(var jY=0;jY30037726){if(j2.lng30037726){if(T.lng0){eP.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{eP.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<-hx.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>hx.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-hx.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=hx.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(jV,jX){var T=[];for(var e=0;e0){eP.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{eP.each(e.points,function(i){eP.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<-hx.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>hx.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-hx.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=hx.WORLD_SIZE_MC_HALF}}});function g4(T,e){ik.call(this,e);e=e||{};if(typeof e.fillOpacity==="number"){this._config.fillOpacity=e.fillOpacity}else{this._config.fillOpacity=0.6}b8(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);var i=this;gQ.load("poly",function(){i._draw()})}g4.inherits(ik,"Polygon");eP.extend(g4.prototype,{setPoints:function(jX){var jV=[];if(typeof jX==="string"||jX.length===1||jX[0] instanceof cu||jX[0] instanceof co||this instanceof gL||jX.length===0){if(jX.length===1){jX=jX[0]}var e=this._processSinglePointArray(jX);this._userPoints=e.userPoints;jV=e.innerPoints;this.hasMultipleParts=false}else{this._userPoints=[];for(var jW=0;jW1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new cu(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 cu(e.lng,e.lat);this.points[i]=new cu(e.lng,e.lat);if(i===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new cu(e.lng,e.lat)}this._calcBounds()},setPositionAt:function(i,e){if(!this._userPoints[i]){return}var T=iU.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 it(T,e){if(!T||T.length===0){return}var i=this.setPath(T,true);g4.call(this,i,e)}it.inherits(g4,"PolygonOut");eP.extend(it.prototype,{toString:function(){return"Polygon"},toGeoJSON:function(){var jW="Polygon";var jX=[];var jZ=this.getPath();if(this.hasMultipleParts){jW="Multi"+jW;for(var jV=0;jV1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new cu(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 cu(e.lng,e.lat);this.points[i]=new cu(e.lng,e.lat);if(i===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new cu(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 fA("onlineupdate");i.overlay=this;this.dispatchEvent(i)},getAltitude:function(){return this._config.altitude}});function bq(jZ,jX,j0){if(!jZ||jZ.length===0){return}this.userPath=jZ;var e=[];if(typeof jZ==="string"||jZ[0] instanceof cu||jZ[0] instanceof co){var j1=this._processSinglePointArray(jZ);for(var jW=0;jW1||e<0){return}this._config.opacity=e;this.doOnceDraw()},getOpacity:function(){return this._config.opacity},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(jV){if(!this._config.isPixelMap||!this.canPixelMap()){return null}if(!this.getImageMaskPixel(jV)){return null}if(this.imageObject){var T=Math.floor((jV.lng-this.points[3].lng)/this.lngMC);var e=Math.floor((-jV.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 jV=this._toOverlayPixelsGL([e]);var j0=this.maskOverlayPixels;var jX=j0[1][0]-j0[0][0];var jW=j0[1][1]-j0[0][1];var T=Math.floor((jV[0][0]-j0[0][0])/jX*this.imageMaskObject.width);var i=Math.floor((-jV[0][1]+j0[1][1])/jW*this.imageMaskObject.height);var jZ=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 jY=this.imageMaskObject.data.data;if(jZ+3>jY.length){return false}if(jY[jZ+3]>0){if(this._config.maskData>-1&&this._config.maskData!==jY[jZ]){return false}return true}return false},doOnceDraw:function(){var e=new fA("onlineupdate");e.overlay=this;this.dispatchEvent(e)},destroy:function(){this.points=[];this.imageMaskObject=null}});function fP(jW,T){if(!jW){return}T=T||{};var jY=[new cu(jW.sw.lng,jW.ne.lat),new cu(jW.ne.lng,jW.ne.lat),new cu(jW.ne.lng,jW.sw.lat),new cu(jW.sw.lng,jW.sw.lat)];var e=ik.getGraphPoints(jY).slice(0);var jX=[];for(var jV=0;jV730){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=B.imgPath;this.overlay=null;var e=this;gQ.load("simpleInfowindow",function(){e._draw()})}hO.inherits(eP.BaseClass,"SimpleInfoWindow");eP.extend(hO.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(){eP.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(){eP.BaseClass.prototype.decontrol.call(this)},toString:function(){return"SimpleInfoWindow"}});hx.prototype.openSimpleInfoWindow=function(jV,e){if(!jV||jV.toString()!="SimpleInfoWindow"||!e||e.toString()!="Point"){return}var i=this.temp;if(!i.marker){var T=new jd(B.imgPath+"blank.gif",{width:1,height:1});i.marker=new jz(e,{icon:T,width:1,height:1,offset:new iL(0,0),infoWindowOffset:new iL(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openSimpleInfoWindow(jV)};hx.prototype.closeSimpleInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeSimpleInfoWindow()}};et.prototype.openSimpleInfoWindow=function(e){if(this.map){this.map.closeSimpleInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;eP.BaseClass.call(e,e.hashCode)}};et.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 cg(T,e){ik.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);var i=this;gQ.load("poly",function(){i._draw()})}cg.inherits(ik,"MapMask");eP.extend(cg.prototype,{setPoints:function(i){var e=ik.getGraphPoints(i).slice(0);this.hasMultipleParts=false;ik.prototype.setPoints.call(this,e)},setPathIn:function(e){this.setPoints(e)},_processSinglePointArray:function(e){var i=ik.getGraphPoints(e).slice(0);innerPoints=i.slice(0);if(innerPoints.length>1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new cu(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 jH(jX,T){if(!jX||jX.length===0){return}var jW=[];if(jX[0] instanceof cu){var e=this._processSinglePointArray(jX);for(var jV=0;jV=ec[this.mapTypeName].webgl.minZoom){if(ec[this.mapTypeName].webgl){if(jZ>=ec[this.mapTypeName].webgl.minZoom){this.minZoom=jZ}else{this.minZoom=ec[this.mapTypeName].webgl.minZoom}}else{if(jZ>=ec[this.mapTypeName].minZoom){this.minZoom=jZ}else{this.minZoom=ec[this.mapTypeName].minZoom}}}if(typeof T==="number"){if(ec[this.mapTypeName].webgl){if(T<=ec[this.mapTypeName].webgl.maxZoom){this.maxZoom=T}else{this.maxZoom=ec[this.mapTypeName].webgl.maxZoom}}else{if(T<=ec[this.mapTypeName].maxZoom){this.maxZoom=T}else{this.maxZoom=ec[this.mapTypeName].maxZoom}}}if(this.maxZoomthis.maxZoom){return false}var jX=this.containsPoint(e,jW);if(jX){return jX}for(var T=0;Tthis.maxZoom){return jW}for(var T=0;T0){j2[jY.name]=jY;j2.push(jY.name)}var j6=j2.length-j4.bufferNumber;for(var j7=0;j6>0&&j70&&this._transparentPng){this.img.src=B.imgPath+"blank.gif"}else{this.img.src=this.src}};hw.prototype._callCbks=function(){var T=this;for(var e=0;e8);function i2(e){this.tileLayers=[];this.map=e;this.bufferNumber=300;this.mapTiles=[];this.bufferTiles=[];this.config=ec[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={}}bw.register(function(i){if(i._renderType==="webgl"){return}var e=i.tileMgr=new i2(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)})});eP.extend(i2.prototype,{addTileLayer:function(jV){var T=this;var i=jV.target;T.tileLayers.push(i);if(T.map.loaded){T.moveGridTiles()}},removeTileLayer:function(j2){var j3=this;var j0=j2.target;var jY=j0.mapType;var jX=j3.mapTiles;var j5=j3.bufferTiles;for(var T in j5){var jV=T.split("-")[1];if(jV==jY){delete j5[T]}}for(var T in jX){var jV=T.split("-")[1];if(jV==jY){delete jX[T]}}if(j3.zoomsDiv&&j3.zoomsDiv.parentNode){j3.zoomsDiv.parentNode.removeChild(j3.zoomsDiv);j3.zoomsDiv.innerHTML=""}var jW=j3.map;if(jW.deepZoom){var j4=jW.deepZoom.preDeepZoomDiv;if(j4&&j4.parentNode){j4.parentNode.removeChild(j4)}}for(var j1=0,jZ=j3.tileLayers.length;j1=1.5?2:1;this.normalUdt=jy("ditu","normal").udt;this.numLoading=0;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}}hi.inherits(c2,"TileLayer");eP.extend(hi.prototype,{isTransparentPng:function(){return this.transparentPng},getTilesUrl:function(j2,e){var T=ec[this.mapType];if(typeof T!=="object"){return null}var jV=j2.x;var j3=j2.y;if(this.mapType!==BMAP_SATELLITE_MAP){var j3=eS.calcLoopParam(j3,e).col}var i="";if(this.opts.tileUrlTemplate){i=this.opts.tileUrlTemplate;i=i.replace(/\{X\}/,j3);i=i.replace(/\{Y\}/,jV);i=i.replace(/\{Z\}/,e)}else{if(this.mapType===BMAPGL_NORMAL_MAP){var j1=this.isCanvasMap?0:1;var jX=T.tileUrls[Math.abs(j3+jV)%T.tileUrls.length];if(window.offLineIPAddress){jX=window.offLineIPAddress+"tile5/"}var jW=this.map.config.style;i=jX+"?qt=vtile&x="+jV+"&y="+j3+"&z="+e+(jW==="default"?"":("&styleId=1"))+"&styles=pl&udt="+this.normalUdt+"&scaler="+this.scaler+"&showtext="+j1;i=i.replace(/-(\d+)/gi,"M$1")}if(this.mapType===BMAP_SATELLITE_MAP){var jY=jy("ditu","satellite");var j0=jY.ver;var jZ=jY.udt;i=T.tileUrls[Math.abs(j3+jV)%T.tileUrls.length]+"u=x="+jV+";y="+j3+";z="+e+";v="+j0+";type=sate&fm=46&udt="+jZ;i=i.replace(/-(\d+)/gi,"M$1")}}return i},initialize:function(jY){this.map=jY;if(jY._renderType==="webgl"){var jX=null;if(this.customLayer!==false){jX=this.getTilesUrl}eP.extend(this,e6);this.labelProcessor=new iW(this);this.callbackDataQueue=[];if(jX){this.getTilesUrl=jX}var T=this;jY.on("indoor_data_refresh",function(jZ){if(!T.baseLayer){return}T._refreshIndoorData(jZ.uid,jZ.floor)});jY.on("custom_labels_ready",function(jZ){if(!T.baseLayer&&jZ.model==="custom"){return}if((jZ.model==="custom"&&T.drawIndex===0)||jZ.model==="mvt_"+T.drawIndex){T._doWorkAfterLabelImageLoad(jZ.virtualTile,jZ.labelCanvas,null,jZ.imgKey)}});jY.on("glmoduleloaded",function(){if(!T.baseLayer){return}T.updateAllIconsTextureCoords()});jY.on("layer_update",function(j0){if(T.dataType===2&&jY.customLoaded){T.clearCache();var jZ=new fA("onlayer_clear");jY.fire(jZ)}});if(this.ontology&&this.ontology._initEvent){this.ontology._initEvent(jY)}}if(!jY.temp.layerZIndex){jY.temp.layerZIndex=0}this.zIndex=this.zIndex||0;if(jY.getRenderType()==="dom"){this.zIndex=jY.tileMgr.tileLayers.length}else{if(this.baseLayer){this.zIndex=0}else{if(this.zIndex>0){this.adjustZIndex()}else{var e=jY._featureMgr.result.bkData;this.zIndex=e.length||1}}}if(!jY.temp.layid){jY.temp.layid=0}if(!this.opts.mapType){this.mapType="BMAP_CUSTOM_LAYER_"+jY.temp.layid;jY.temp.layid++}else{this.mapType=this.opts.mapType}var jV=ec[this.mapType];if(!jV){ec[this.mapType]={tileUrls:[],tileSize:256,baseUnits:256,zoomLevelMin:1,zoomLevelMax:19,minZoom:3,maxZoom:19,minDataZoom:3,maxDataZoom:19,zoomLevelBase:18,errorUrl:B.imgPath+"/blank.gif",bounds:new hL(new cu(-21364736,-10616832),new cu(23855104,15859712)),imgExtend:"png"}}if(jY._renderType!=="webgl"){var jW=bI(jY.platform,'
');jW.style.display="";jW.style.left=Math.ceil(-jY.offsetX+jY.width/2)+"px";jW.style.top=Math.ceil(-jY.offsetY+jY.height/2)+"px";this.tilesDiv=jW}this.isCanvasMap=jY.isCanvasMap();this.lastZoom=jY.getZoom();var i=this;this.addEventListener("initDrawData",function(jZ){if(i.opts.boundary){i.addBoundary(i.opts.boundary)}});jY.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(jW){var T=this.zIndex;if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;if(jW==="up"){for(var jV=this.zIndex+1;jV0;jV--){if(e[jV]){T=jV;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 eS.calcLoopParam(e,i)},addBoundary:function(jX){if(!jX||!this.map){return}if(typeof jX==="string"){jX=[jX]}for(var jV=0;jV-1;jW--){var jX={};T=jV.children[jW].style;jX.top=parseInt(T.top,10);jX.left=parseInt(T.left,10);this._zoomAniInfo[jW]=jX}},prepareLabelLayer:function(){var jW=this._map;if(this._enableCanvas2dMap&&jW.canvas2dMapMgr){if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.parentNode.removeChild(this.touchZoomLabelCanvas)}var i=jW.canvas2dMapMgr._labelCanvas;this.touchZoomLabelCanvas=i.cloneNode(false);var e=this.touchZoomLabelCanvas.getContext("2d");e.drawImage(i,0,0);jW.platform.insertBefore(this.touchZoomLabelCanvas,jW.platform.firstChild);var jV=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-(jW.offsetX+jV))+"px "+(this._fixPosition.y-(jW.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 jV=this._map;if(jV.getRenderType()==="dom"){if(jV.overlayDiv){jV.overlayDiv.style.visibility="hidden"}if(jV.overlayDivEx){jV.overlayDivEx.style.visibility="hidden"}}var jX=jV.tileMgr.tileLayers;var jW;for(var T=0,e=jX.length;T-1;j4--){var j2=this._zoomAniInfo[j4];j3=jV.children[j4].style;var jW=j2.left-jZ.x;var T=j2.top-jZ.y;j2.dx=jW*e-jW;j2.dy=T*e-T;j2.preDx=jW-jW;j2.preDy=T-T;kb=j2.preDx+(j2.dx-j2.preDx);j0=j2.preDy+(j2.dy-j2.preDy)+j1;j3.left=j2.left+kb+"px";j3.top=j2.top+j0+"px";j3.width=j3.height=256*e+"px"}if(this._enableCanvas2dMap){var ka=!j9._isIE9?"translate3d(0px, "+j1+"px, 0) scale("+e+")":"translate(0px, "+j1+"px) scale("+e+")";this.touchZoomLabelCanvas.style[j6]=ka}},setZoomFinish:function(){this._animationDiv=null},startAnimation:function(jY){this.prepareLayer();this.hideNonAnimationLayers();var kh=this._map;if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.style.display="none"}jY=jY||{};var kf=jY.zoomCount||0;var j3=jY.fixPosition;var kd=jY.fixMCPosition;var j1=jY.pixOffset;this._zoomCount=kf;var jV=kh.getZoom();var kg=jV+kf;var e=kh.config.enableContinuousZoom;var j7=0.5;var j2=5;var T=Math.pow(2,kf);var kj=this._baseLayerDiv;var j4={x:j3.x-parseInt(kj.style.left,10)-kh.offsetX,y:j3.y-parseInt(kj.style.top,10)-kh.offsetY};var jZ=this._animationDiv;var kb=jZ.children.length;var kl=this._preZoomTimes;var ke=[];var kc=this._transformStyleName;var j0=this._transformOriginStyleName;for(var ka=kb-1;ka>-1;ka--){var j8={};var j9=jZ.children[ka].style;j8.top=parseInt(j9.top,10);j8.left=parseInt(j9.left,10);var jX=j8.left-j4.x;var jW=j8.top-j4.y;j8.dx=jX*T-jX;j8.dy=jW*T-jW;j8.preDx=jX*kl-jX;j8.preDy=jW*kl-jW;ke[ka]=j8}var ki=this;var j6;var kk;var j5;this._zoomAni=new fq({fps:60,duration:e?500:1,transition:function(i){i=i*j2/(2*j7);return j2*i-j7*i*i},render:function(ku){ku=ku*(4*j7)/(j2*j2);j6=kl+ku*(T-kl);var kn=jV+p(j6);var ks=null;var kr=0;var kv=0;if(jY.onAnimationBeforeLooping){var kw=jY.onAnimationBeforeLooping(ku,kn);ks=kw.loopingCenter;kr=kw.yDiff;kv=kw.totalYDiff}for(var ko=ke.length-1;ko>-1;ko--){var kp=ke[ko];if(jZ.children[ko]){var kt=jZ.children[ko].style;kk=kp.preDx+(kp.dx-kp.preDx)*ku-j1.width*ku;j5=kp.preDy+(kp.dy-kp.preDy)*ku-j1.height*ku+kr;kt.left=kp.left+kk+"px";kt.top=kp.top+j5+"px";kt.height=kt.width=256*j6+"px"}}var km=j1.width*ku;var kq=j1.height*ku;if(kh.isRestrict){ki._enableCanvas2dMap&&ki._canvas2dMapMgr.clearLabel()}else{ki._enableCanvas2dMap&&ki._canvas2dMapMgr.drawLabel(j6,j3,jV,kg,kf,ku,km,kq,kv,kr)}ki._preZoomTimes=j6;ki._preRenderTick=ku;jY.onAnimationLooping&&jY.onAnimationLooping(ku,kn,ks)},finish:function(){ki._preZoomTimes=1;ki._zoomAni=null;ki._animationDiv=null;jY.onAnimationFinish&&jY.onAnimationFinish();ki.showNonAnimationLayers()}});return this._zoomAni},stopAnimation:function(){if(this._zoomAni){this._zoomAni.stop();this._zoomAni=null}}});function jS(e){this._initVars(e);this._initColorCanvas();this._bindEvent(e)}eP.extend(jS.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=bV("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(j8){var j7=j8.textImg;var T=j8.textPos;var j5=this.ratio;var j3=this.sizeRatio/j5;var jW=this._colorCtx;var j0=this._colorCvsSize;jW.clearRect(0,0,j0,j0);var j2=0;var e=0;var jZ=0;for(var j1=0;j1j2){j2=T[j1].width;e=j1;jZ=T[j1].drawX}}j2/=j3;var j4=0;for(var j1=0,jY=T.length;j1j2){j2=j6.width/j3}j4+=j6.height/j3+2*j5}var jV=jW.getImageData(0,0,j2,j4);var jX=jW.getImageData(0,0,j2,j4);return[jV,jX]},_bindEvent:function(i){var e=this,T=i._map;T.addEventListener("onspotmouseover",function(jY){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(jY.spots.length>0){var jX=jY.spots[0].userdata.uid;var jW=jY.spots[0].userdata.name;var jV=e.findLabelByUid(jX,jW);jV&&e._toHighLightColor(jV)}});T.addEventListener("onspotmouseout",function(jY){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(jY.spots.length>0){var jX=jY.spots[0].userdata.uid;var jW=jY.spots[0].userdata.name;var jV=e.findLabelByUid(jX,jW);jV&&e._toDefaultColor(jV)}});T.addEventListener("onspotclick",function(jY){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(jY.spots&&jY.spots.length>0){var jX=jY.spots[0].userdata.uid;var jW=jY.spots[0].userdata.name;var jV=e.findLabelByUid(jX,jW);jV&&e._changeBaseMapState(jV)}else{e._recoverNormalState()}});T.on("spot_status_reset",function(){e._recoverNormalState()});T.on("spot_highlight",function(jW){var jV=e.findLabelByUid(jW.uid);jV&&e._changeBaseMapState(jV)})},_getTextBound:function(j6){if(!j6.textPos){return null}var j4=this.ratio;var j2=this.sizeRatio/j4;var T=j6.textPos;var j5=j6.baseDrawX;var j3=j6.baseDrawY;var j0=j5*j4+(T[0].drawX-j5)/j2;var jY=j3*j4+(T[0].drawY-j3)/j2;var jW=j0+T[0].width/j2;var e=jY+T[0].height/j2;for(var j1=0,jZ=T.length;j1jW){jW=jX+j7.width}if(jV+j7.height>e){e=jV+j7.height}}return[j0,jY,jW,e]},_toHighLightColor:function(T){if(T._tempRank&&T._tempRank==this.RANK5){return}var jZ=this._getTextBound(T);if(!jZ){return}var jV=Math.round(jZ[0]);var i=Math.round(jZ[1]);var e=this.getLabelImageData(T);var jX=e[0];var jW=e[1];var jY=this._canvas2dMapMgr.getFilterImageData(jX,this.RANK5);T._oldImgData=jW;this._labelCtx.putImageData(jY,jV,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(jV){var T=this._canvas2dMapMgr;var i=jV.guid;var e=jV.guidExt;var jW={guid:i,name:jV.name,guidExt:e};T._labelStrategy.setStrategyInfo(jW);T._loadData()},_recoverNormalState:function(){var e=this._canvas2dMapMgr;e._labelStrategy.setStrategyInfo(null);e._loadData()},findLabelByUid:function(jX,jV){var jZ=this._canvas2dMapMgr,e=jZ._computedLabel;for(var jW=0,T=e.length;jWkZ){kZ=k2.drawX+k2.width}if(k2.drawY+k2.height>kY){kY=k2.drawY+k2.height}}}}}else{j3.tileX=jV;j3.tileY=T;ka=jV+j3.minXOriginal;j8=T+j3.minYOriginal;kZ=jV+j3.maxXOriginal;kY=T+j3.maxYOriginal}if(ka!=undefined){var kR=kO+(ka-kO)/kH;var kQ=kN+(j8-kN)/kH;var kt=kO+(kZ-kO)/kH;var kr=kN+(kY-kN)/kH;j3.minX=kR;j3.minY=kQ;j3.maxX=kt;j3.maxY=kr;var kV=(kR+kt)/2,kU=(kQ+kr)/2,kC=j9+(kV-kS/2)*kd,kA=j7+(kB/2-kU)*kd;j3.geoX=kC;j3.geoY=kA;kv.push(j3)}}}if(k6){for(var ks=0,ko=k6.length;kskZ){kZ=ki+kT.width}if(j6+kT.height>kY){kY=j6+kT.height}if(kc.length===2){var kh=kc[1];var kf=kO+kh.destX;var j5=kN+kh.destY;if(j5kZ){kZ=kf+kh.width}if(j5+kh.height>kY){kY=j5+kh.height}}kK._tempBounds=[ka,j8,kZ,kY];var kz=j4.iconPos;var jY=kz.geoX;var jW=kz.geoY;var kO=(jY-j9)/kd+kS/2;var kN=(j7-jW)/kd+kB/2;var ka=kO+kz.destX;var j8=kN+kz.destY;var kZ=ka+kz.width;var kY=j8+kz.height;j4.textPos=j4.textPos||j4._textPos;var kc=j4.textPos;var kT=kc[0];var ki=kO+kT.destX;var j6=kN+kT.destY;if(kikY){kY=j6+kT.height}if(kc.length===2){var kh=kc[1];var kf=kO+kh.destX;var j5=kN+kh.destY;if(kfkY){kY=j5+kh.height}}j4._tempBounds=[ka,j8,kZ,kY]}for(var ks=0,ko=k6.length;ksk4[2]||k0[3]k4[3])){kb++;if(kw.textPos){kw._textPos=kw.textPos;delete kw.textPos}}var k4=k5._tempBounds;if(!(k0[2]k4[2]||k0[3]k4[3])){kb++;if(k5.textPos){k5._textPos=k5.textPos;delete k5.textPos}}if(kb>=2){if(kW.textPos){kW._textPos=kW.textPos;delete kW.textPos}}}}for(var ks=0,ko=k6.length;kskZ){kZ=kT.drawX+kT.width}if(kT.drawY+kT.height>kY){kY=kT.drawY+kT.height}if(kc.length===2){var kh=kc[1];kh.drawX=kO+kh.destX;kh.drawY=kN+kh.destY;if(kh.drawXkZ){kZ=kh.drawX+kh.width}if(kh.drawY+kh.height>kY){kY=kh.drawY+kh.height}}}var kR=kO+(ka-kO)/kH;var kQ=kN+(j8-kN)/kH;var kt=kO+(kZ-kO)/kH;var kr=kN+(kY-kN)/kH;kx.minX=kR;kx.minY=kQ;kx.maxX=kt;kx.maxY=kr;var kJ=(kR+kt)/2;var kI=(kQ+kr)/2;var jZ=j9+(kJ-kS/2)*kd;var jX=j7+(kB/2-kI)*kd;kx.geoX=jZ;kx.geoY=jX;kv.push(kx)}}var kL=this._strategyInfo;if(kL){var ku=kL.guid;var kD=kL.name;var kk=kL.guidExt;for(var ks=0,ko=kv.length;ksky.maxX-kq||kW.maxY-kqky.maxY-kq)){kW.arrIntersectIndex.push(kp)}}}for(var ks=0,ko=kv.length;ksj0){var T=jY.splice(0,jX);for(var j1=0,jZ=T.length;j10){this.isDrawText=true}},_loadLabelData:function(j4,j3,j2,T,j5,e){var jX=j4.toString();var jV=j3.toString();var jZ="cbk_"+jX.replace("-","_")+"_"+jV.replace("-","__")+"_"+Math.floor(j2);var j9=fk+"."+jZ;var j8=this._labelDataUrls;var j1=Math.abs(j4+j3)%j8.length;var ke=j8[j1];if(window.offLineIPAddress){ke=window.offLineIPAddress+"pvd/"}var i=this.labelStyleParam;var j7="?qt=vtile";var ka="";if(this._map.config.style!=="default"){ka="&styleId=1"}var j6="x={x}&y={y}&z={z}&udt={udt}&v={v}&styles={styles}"+ka+"&textonly=1&textimg=1&scaler={scaler}&fn="+encodeURIComponent(j9);var kb=eS.calcLoopParam(j4,j2).col;var j0=this.ratio>1?2:1;var jY=j6.replace(/{x}/,kb).replace(/{y}/,j3).replace(/{z}/,Math.floor(j2)).replace(/{styles}/,i).replace(/{udt}/,this._udt).replace(/{v}/,this._version).replace(/{scaler}/,j0);var jW=ke+j7+"¶m="+window.encodeURIComponent(eL(jY));var kd=this;var kc=kd._map;bw[jZ]=function(kf){kd._vectorDrawLib.parseLabelData(kf,j4,j3,j2,T,j5,function(kk){var kh=kc.getCenterIn();var kl=kc.getZoom();var kn="viewKey_"+Math.floor(kh.lng)+"_"+Math.floor(kh.lat)+"_"+kl;kd._labelCount--;var ko=kd._getCache(j4,j3,j2,T).updateLabelCounter;kd._labelCount-=ko;var ki=kd._curViewLabels;if(kn===e||(kd._labelCount<0&&kl===j2)){ki.push(kk)}if(kn===e){kd.statResponseCount++}if(kd._labelCount<=0){var kg=(new Date()).getTime();kd.updateLabel();var kj=(new Date()).getTime();var km=new fA("oncanvasmaploaded");km.drawTime=kj-kg;if(kd.statResponseCount===kd.statRequestCount){km.isAllLoadedDrawing=true}kc.dispatchEvent(km)}kd._setCacheValue(j4,j3,j2,T,kk);delete bw[jZ]})};gC.load(jW)},drawLabel:function(T,jV,j2,i,j0,jW,e,jX,j1,jY){var jZ=this;if(!jZ._computedLabel){return}if(jZ._computedLabel._zoom!==j2){jZ.clearLabel();return}jZ._map.temp.isPermitSpotOver=false;jZ.clearLabel();jZ._vectorDrawLib.zoomingIconAndText(this._labelCtx,jZ._computedLabel,T,jV,i,j0,jW,e,jX,j1,jY)},_addSpotData:function(){this._spotData=[];var j2=this._map.getZoom();for(var jX=0,jW=this._computedLabel.length;jXj2)){continue}var jY=[];jY[0]=(jZ.minX-jZ.maxX)/2;jY[1]=(jZ.minY-jZ.maxY)/2;jY[2]=(jZ.maxX-jZ.minX)/2;jY[3]=(jZ.maxY-jZ.minY)/2;var jV=null;if(jZ.iconPos){jV=new cu(jZ.iconPos.geoX,jZ.iconPos.geoY)}var T=jZ.name?jZ.name.replace("\\\\","
"):"";if(jZ.iconPos&&jZ.iconPos.iconType.indexOf("ditie")>-1&&this._map.getZoom()>14){T=""}var j1={n:T,pt:new cu(jZ.geoX,jZ.geoY),userdata:{iconPoint:jV,uid:jZ.guid,name:T,type:jZ.iconPos?jZ.iconPos.iconType:"",iconImg:jZ.iconImg,mapPoi:true,adver_log:jZ.adver_log||""},bd:jY,tag:"MAP_SPOT_INFO"};this._spotData.push(j1)}var j0=new fA("onspotsdataready");j0.spots=this._spotData;this._map._spotDataOnCanvas=this._spotData;this._map.dispatchEvent(j0)},isClickableLabel:function(e){if(e.isDel||(!e.guid&&!e.name)){return false}return true},getFilterImageData:function(T,jY){var jZ=T.data,jX=this._labelStrategy,jY=parseInt(jY);for(var j0=0,jW=jZ.length;j00&&!j3){continue}var j7=Math.round(kg[0]/100);var j6=Math.round(kg[1]/100);var kj={lng:kd+j7,lat:kc-(ka*j0-j6)};var jY=j7/j0;var jX=ka-j6/j0;var kb=kg[7]||"";var ko=kg[5];var ke={type:"fixed",name:kb,textImg:j9,rank:kg[4],baseX:jY,baseY:jX,iconPos:null,textPos:null,guid:kg[3]||"",tracer:kk,direction:ko,startScale:3};if((ko!==iQ&&j3||!j3)&&kn!==null){ke.iconPos=this._getIconPosition(kn,j2,jY,jX,kj);if(ke.iconPos){T=ke.iconPos.width;j8=ke.iconPos.height}}if(T===0){ke.direction=iQ}if(j3){ke.textPos=this._getTextDrawData(kg,jY,jX,T,j8)}if(ke.textPos||ke.iconPos){kf.push(ke)}}}},_isVisible:function(e,i){var jV;if(!this._binaryCache[e]){jV=e.toString(2);if(jV.length<8){jV=new Array(8-jV.length+1).join("0")+jV}this._binaryCache[e]=jV}jV=this._binaryCache[e];var T=e9[i].start;return jV[i-T]==="1"},_getIconPosition:function(jZ,jX,T,i,e){var jV=this._map.config.style;var j0=bw["iconSetInfo"+jV][jZ];if(!j0){if(jZ.charCodeAt(0)>=48&&jZ.charCodeAt(0)<=57){j0=bw["iconSetInfo"+jV]["_"+jZ]}}if(!j0){return null}var jW=j0[0];var jY=j0[1];jW=jW*jX;jY=jY*jX;return{srcX:0,srcY:0,destX:T-jW/2,destY:i-jY/2,width:jW,height:jY,geoX:e.lng,geoY:e.lat,mcPt:e,iconType:jZ}},_getTextDrawData:function(j6,j5,j4,jV,j2){var kb=j6[5];if(typeof kb!=="number"){kb=0}var j0=this.ratio;var jZ=j0/2;jV*=jZ;j2*=jZ;var j1=j6[12];var jW=j1.length;var ke=0;var kd=0;var ka=[];var j9=0;var kc=0;for(var j8=0;j80&&e>0){ka.push({srcX:jX,srcY:i,destX:ke,destY:kd,width:T,height:e})}}if(ka.length>0){return ka}return null},_getLineLabelInfo:function(j3,jV,jW,ki,kv,ka,kg,kf,kh,j9){if(j3.length!==10){return}var kk=this.ratio;var T=this.ratio;var kr=j3[7].length;var kb=j3[1];var kt=j3[3];var kz=j3[8];var jZ=j3[4];var e=2;var jX=jZ.slice(0,e);for(var kw=e;kwj7){j7=kD+jY}if(kC+j1>j6){j6=kC+j1}}kc.push({angle:j5,srcX:j0,srcY:j2,destX:kD,destY:kC,width:jY,height:j1})}var ks={type:"line",textImg:jV,rank:kb,baseX:kp,baseY:kn,arrWordPos:kc,minXOriginal:kl,minYOriginal:kj,maxXOriginal:j7,maxYOriginal:j6,text:""};j9.push(ks)}},alterColor:function(jY,e,jX){var T=this._colorCtx,i=this._canvas2dMapMgr;T.clearRect(0,0,jY.width,jY.height);T.drawImage(e,jY.srcX,jY.srcY,jY.width,jY.height,0,0,jY.width,jY.height);var jW=T.getImageData(0,0,jY.width,jY.height),jV=i.getFilterImageData(jW,jX);T.putImageData(jV,0,0)},drawIconAndText:function(ka,j9,e){var j1=this.ratio;var jZ=this.sizeRatio/j1;var j3=2/j1;var kl=this;for(var kd=0,kb=j9.length;kd10&&kg<350){ka.save();var kj=Math.round(km+kf.width/2);var ki=Math.round(kk+kf.height/2);ka.translate(kj,ki);ka.rotate(-kg/180*Math.PI);ka.drawImage(j7,kf.srcX,kf.srcY,kf.width,kf.height,-Math.round(kf.width/2),-Math.round(kf.height/2),kf.width/jZ,kf.height/jZ);ka.restore()}else{ka.drawImage(j7,kf.srcX,kf.srcY,kf.width,kf.height,km,kk,kf.width/jZ,kf.height/jZ)}}}}}},isCollide:function(jX,j6,j5,e,jZ,T,j1){for(var jW=0,jV=T.length;jWj0[1]+j0[3]+j4||j5+jZj0[2]+j0[4]+j3)){return true}}}return false},zoomingIconAndText:function(kl,kf,jV,kj,kk,kM,ks,j3,ky,kr,kc){var kN=this.ratio;var j4=this.sizeRatio/kN;var kO=2/kN;var kY=kN/2;var kI=kj.x;var kH=kj.y;var km=2*kN;if(kc!==0){kH+=kr}var j7=undefined,j0=undefined,jX=undefined,j2=undefined,kb=undefined;var kx=kM>0?true:false;if(!kx){j7=[];var kB=1-ks}for(var kU=0,kS=kf.length;kU10&&ki<350){var kK=kD+kL.width/2;var kJ=kC+kL.height/2;var jW=ki/180*Math.PI;var kp=Math.cos(jW);var j8=Math.sin(jW);var kA=kp;var j9=kp;var kz=j8;var ka=-j8;var kh=kK-kK*kp-kJ*j8;var e=kJ+kK*j8-kJ*kp;kl.save();kl.transform(kA,ka,kz,j9,kh,e);kl.drawImage(jY,kL.srcX,kL.srcY,j2,kb,j0,jX,j2/j4,kb/j4);kl.restore()}else{kl.drawImage(jY,kL.srcX,kL.srcY,j2,kb,j0,jX,j2/j4,kb/j4)}!kx&&j7.push([kU,j0,jX,j2,kb])}}kl.restore()}}}});function ek(e){this.initVars(e)}eP.extend(ek.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(jX,j1){var jZ=this;this.bizData=jX;this.objTextsPng=null;this.arrIconsPng=null;var T=jX.textsPng;var j3=jX.iconsPng;if(!T||!j3){return}var j0=new Image();j0.onload=function(){jZ.objTextsPng=this;jZ.calcIconAndTextInfo(j1);this.onload=null};j0.src=this.base64Prefix+T;var j2=j3.length;var e=[];for(var jW=0;jWjZ.width||i>jZ.height)&&(e>jZ.width||j3>jZ.height)){return false}return true},_setPlatformPosition:function(j2,j1,j4){j4=j4||{};if(j2===0&&j1===0&&!j4.point){return}if(isNaN(j4.initMapOffsetX)){j4.initMapOffsetX=this.offsetX}if(isNaN(j4.initMapOffsetY)){j4.initMapOffsetY=this.offsetY}var jY=im(this._heading);if(this._tilt>0){j1=j1/Math.cos(im(this._tilt))}var j3=j2*Math.cos(jY)+j1*Math.sin(jY);var j0=-j2*Math.sin(jY)+j1*Math.cos(jY);j3=j3+j4.initMapOffsetX;j0=j0+j4.initMapOffsetY;if(j4.point){var i=this.restrictCenter(j4.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new fA("oncenter_changed"))}}else{var jV=this.offsetX-j3;var e=this.offsetY-j0;var jZ=this.centerPoint.lng;var jX=this.centerPoint.lat;var jW=new cu(jZ,jX);var T=this.getZoomUnits();this.centerPoint=this.restrictCenter(new cu(jW.lng+jV*T,jW.lat-e*T),T);this.fire(new fA("oncenter_changed"))}this.offsetX=j3;this.offsetY=j0;this.dispatchEvent(new fA("onmoving"))},restrictCenter:function(j3,e){if(this.config.restrictCenter===false){return j3}e=e||this.getZoomUnits();var j1=this.pixelToPointIn(new fa(this.width,0),{center:j3});var jY=this.pixelToPointIn(new fa(0,this.height),{center:j3});var j4=j3.lng;var j9=j3.lat;if(this.config.restrictBounds!==null&&!this.config.restrictBounds.isEmpty()){var j8=this.config.restrictBounds;var T=j8.getSouthWest();var j6=j8.getNorthEast();var j2=iU.convertLL2MC(T);var jW=iU.convertLL2MC(j6);var jZ=this.calcNewZoomByRestriction(j4,j9,jY,j1,j2.lng,jW.lng,j2.lat,jW.lat);if(jZ>this.zoomLevel){this.zoomLevel=jZ;return j3}j3.lng=this.calcNewLngByBounds(j4,jY,j1,j2.lng,jW.lng,e);j3.lat=this.calcNewLatByBounds(j9,jY,j1,j2.lat,jW.lat,e);return j3}var j0=this.pixelToPointIn(new fa(0,0),{center:j3});var jV=this.pixelToPointIn(new fa(0,this.height),{center:j3});if(this.zoomLevel<5){if(j0.lat>hx.MAX_LAT&&jV.lathx.MAX_LAT){j3.lat=hx.MAX_LAT-this.height/2*e}else{if(jV.latjX&&e.latjY&&e.lngjX){jW=jX-this.height/2*e}else{if(jV.latT){i=T-this.width/2*e}else{if(jX.lngjW){this._tilt=jW}if(j6){if(this._heading%360!==0||this._tilt>0){var i=this._webglMapCamera.fromScreenPixelToMC(T.x,T.y,{center:jZ,zoom:this.zoomLevel});if(i){var j3=i.sub(jY);var jV=jZ.sub(j3);this.centerPoint=this.restrictCenter(jV)}}else{var j0=this.getZoomUnits();var jV=new cu(j6.lng-j0*(T.x-this.width/2),j6.lat+j0*(T.y-this.height/2));this.centerPoint=this.restrictCenter(jV,j0)}this.fire(new fA("oncenter_changed"))}this._checkFireZoomend();j7.callback&&j7.callback();return}this._animationInfo.zoom={current:this.zoomLevel,diff:e-this.zoomLevel,target:e};var j4=this;j4._checkFireZoomend();var j5=this._tilt;if(this.fixPoint||j5>hx.MAX_DRAG_TILT_L2){j7.renderCallback=function(){var kb=j4.getCurrentMaxTilt();if(j4._tilt>kb){j4._tilt=kb}var kc=j4.fixPixel;if(!j4.fixPixel||!j4.fixPoint){return}var j8=j4.fixPixel;var ki=j4.fixPoint;var kf=j4.fixCenter;var kd=j4.mousePosMCPoint;if(j4._heading%360!==0||j4._tilt>0){var j9=j4._webglMapCamera.fromScreenPixelToMC(j8.x,j8.y,{center:kf,zoom:j4.zoomLevel,tilt:j4._tilt});if(j9){var kh=j9.sub(kd);var ka=kf.sub(kh);j4.centerPoint=j4.restrictCenter(ka)}}else{var ke=j8;var kg=j4.getZoomUnits();var ka=new cu(ki.lng-kg*(ke.x-j4.width/2),ki.lat+kg*(ke.y-j4.height/2));j4.centerPoint=j4.restrictCenter(ka,kg)}j4.fire(new fA("oncenter_changed"))}}if(j7.fromMouseWheel===true){this._startInfiniteZoomAnimation(j7);j7.callback&&j7.callback();return}this._startAnimation(j7)},_checkFireZoomend:function(){var e=this;if(e.fireZoomendTimer){clearTimeout(e.fireZoomendTimer)}e.fireZoomendTimer=setTimeout(function(){if(e.zoomEventStatus==="zooming"){e.fire(new fA("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,kp,ka){ka=ka||{};var jW=this._getProperZoom(kp);kp=jW.zoom;if(this.centerPoint.equals(T)&&this.zoomLevel===kp&&typeof ka.heading!=="number"&&typeof ka.tilt!=="number"){return}var e=this.getHeading()%360;var j2=this.getTilt();var j8=0;var kc=0;var j5=this.getBounds().containsPoint(T);if(typeof ka.heading==="number"){j8=ka.heading}else{if(j5){j8=e}}if(typeof ka.tilt==="number"){kc=ka.tilt}else{if(j5){kc=j2}}this._heading=e;var km=j8-e;var ki=kc-j2;var j6=this;var jY=this.zoomLevel;var jZ=1.42;var ke=this.zoomScale(kp-jY);var kr=this.getZoomUnits();var j4=this.centerPoint.div(kr);var ks=T.div(kr);var kl=this.worldSize();var kh=jZ;var kg=Math.max(this.width,this.height);var kf=kg/ke;var j3=ks.sub(j4).mag();var i=kh*kh;function ko(ku){var kt=(kf*kf-kg*kg+(ku?-1:1)*i*i*j3*j3)/(2*(ku?kf:kg)*i*j3);return Math.log(Math.sqrt(kt*kt+1)-kt)}function jV(kt){return(Math.exp(kt)-Math.exp(-kt))/2}function j0(kt){return(Math.exp(kt)+Math.exp(-kt))/2}function j9(kt){return jV(kt)/j0(kt)}var j1=ko(0);var kj=function(kt){return(j0(j1)/j0(j1+kh*kt))};var kk=function(kt){return kg*((j0(j1)*j9(j1+kh*kt)-jV(j1))/i)/j3};var jX=(ko(1)-j1)/kh;if(Math.abs(j3)<0.000001||jX===Infinity||isNaN(jX)){if(Math.abs(kg-kf)<0.000001){this._animationInfo.zoom={current:this.zoomLevel,diff:kp-this.zoomLevel};this._animationInfo.center={current:this.centerPoint,diff:T.sub(this.centerPoint)};this._animationInfo.heading={current:e,diff:j8-e};this._animationInfo.tilt={current:j2,diff:kc-j2};this.setLock(true);this._startAnimation({callback:function(kt){j6.setLock(false);if(ka.callback){ka.callback(kt)}},duration:ka.duration});return}var kq=kf5){kn=(jX-5)/2+kn}}var kb=ka.duration||1000*jX/kn;if(isNaN(kb)){var kd={};for(var j7 in ka){kd[j7]=ka[j7];kd.noAnimation=true}this.centerAndZoomIn(T,kp,kd);return}this.fire(new fA("onmovestart"));this.fire(new fA("onzoomstart"));this.setLock(true);this._startAnimation({duration:kb,renderCallback:function(kt,ku){var kv=kt*jX;var ky=kk(kv);var kx=jY+j6.scaleZoom(1/kj(kv));if(kxj6.getMaxZoom()){kx=j6.getMaxZoom()}if(kx!==j6.zoomLevel){j6.zoomLevel=kx;j6.fire(new fA("onzoom_changed"))}j6.centerPoint=j4.add(ks.sub(j4).mult(ky)).mult(kr);j6.fire(new fA("oncenter_changed"));if(typeof j8==="number"){var kw=kt/0.7;if(kw>1){kw=1}j6.setHeading(e+km*kt,{noAnimation:true})}if(typeof kc==="number"){j6.setTilt(j2+ki*kt,{noAnimation:true})}},callback:function(kt,ku){j6.setLock(false);if(ku&&ku.stop===true){j6.fire(new fA("onmoveend"));j6.fire(new fA("onzoomend"));ka.callback&&ka.callback(kt);return}if(kp!==j6.zoomLevel){j6.zoomLevel=kp;j6.fire(new fA("onzoom_changed"))}j6.fire(new fA("onmoveend"));j6.fire(new fA("onzoomend"));ka.callback&&ka.callback(kt)}})},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 jV=this.pointToPixelIn(i);var e=Math.round(this.width/2);var jX=Math.round(this.height/2);var jW=this._ifUseAnimation(i,this.zoomLevel);if(T.noAnimation===true||jW===false){this._stopAllAnimations();this._panToIn(e-jV.x,jX-jV.y,i);T.callback&&T.callback();return}this.flyToIn(i,this.zoomLevel,T)},_panToIn:function(i,e,jV){var T=this.temp;if(T.operating===true){return}if(T.dragAni){T.dragAni.stop(false,{readyToMove:true});T.dragAni=null}this.dispatchEvent(new fA("onmovestart"));this._setPlatformPosition(i,e,{point:jV});this.dispatchEvent(new fA("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,jW){if(this.temp.operating===true){return}jW=jW||{};this.dispatchEvent(new fA("onmovestart"));var jV=this;var T=jV.temp;T.pl=jV.offsetX;T.pt=jV.offsetY;if(T.tlPan){T.tlPan.cancel()}if(T.dragAni){T.dragAni.stop(false,{readyToMove:true});T.dragAni=null}T.tlPan=new fq({fps:jW.fps||jV.config.fps,duration:jW.duration||jV.config.actionDuration,transition:jW.transition||gq.easeInOutQuad,render:function(jX){this.terminative=jV.temp.operating;if(jV.temp.operating){return}jV._setPlatformPosition(i*jX,e*jX,{initMapOffsetX:T.pl,initMapOffsetY:T.pt})},finish:function(jX){jV.dispatchEvent(new fA("onmoveend"));jV.temp.tlPan=false;if(jV.temp.stopArrow===true){jV.temp.stopArrow=false;if(jV.temp.arrow!==0){jV._arrow()}}}})},_startAnimation:function(i){var jW=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 jX=i.duration||500;var jY=i.transition||gq.ease;var e=new fA("onanimation_start");this.fire(e);if(i.unstopable){jW=this._animationInfoUnstopable}var jV=new fq({duration:jX,transition:jY,render:function(j1,j0){for(var jZ in jW){if(!jW.hasOwnProperty(jZ)){continue}var j3=jW[jZ].current;var j2=jW[jZ].diff;T._setValueTick(jZ,j3,j2,j1)}if(i.renderCallback){i.renderCallback(j1,j0)}},finish:function(jZ){T.fire(new fA("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(jZ)}},onStop:function(jZ){jZ=jZ||{};T.fire(new fA("onanimation_end"));if(jZ.stopCurrentAnimation){T._animationInfo={}}T._ani=null;if(i.mapNeedCbk){i.mapNeedCbk()}if(i.callback){i.callback(null,{stop:true})}}});if(i.unstopable){T._unstopableAni=jV}else{T._ani=jV}},_startInfiniteZoomAnimation:function(e){var i=this;if(i._ani){i._ani.stop(!!e.goToEnd,{stopCurrentAnimation:e.stopCurrentAnimation})}if(i._infiniteAni){return}this.fire(new fA("onanimation_start"));i._infiniteAni=new fq({duration:10000,transition:gq.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 fA("onanimation_end"));if(e.callback){e.callback()}},onStop:function(){i._infiniteAni=null;i._animationInfo={};i.fire(new fA("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 fA("on"+e+"_changed"))}return}else{if(e==="center"){this.centerPoint=T}}this["_"+e]=T;this.fire(new fA("on"+e+"_changed"))},_setValueTick:function(e,jW,jV,i){if(e==="center"){var T=new cu(jW.lng+jV.lng*i,jW.lat+jV.lat*i);this._setValue(e,T);return}if(e==="zoom"){this._setValue(e,Math.pow(jW,1-i)*Math.pow(jW+jV,i));return}this._setValue(e,jW+jV*i)},setHeading:function(jV,i){i=i||{};if(jV===this._heading){i.callback&&i.callback();return}var T=d7(this._heading,360);var e=d7(jV,360);if(e===T){this._heading=jV;i.callback&&i.callback();return}if(i.noAnimation){this._setValue("heading",jV);i.callback&&i.callback();return}if(i.unstopable){this._animationInfoUnstopable.heading={current:this._heading,diff:jV-this._heading}}else{this._animationInfo.heading={current:this._heading,diff:jV-this._heading}}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>hx.MAX_TILT){e=hx.MAX_TILT}if(e0){j3=1/Math.sqrt(j3);j6[0]=j5[0]*j3;j6[1]=j5[1]*j3}return j6};j1.dot=function(j4,j3){return j4[0]*j3[0]+j4[1]*j3[1]};j1.cross=function(j5,j4,j3){var j6=j4[0]*j3[1]-j4[1]*j3[0];j5[0]=j5[1]=0;j5[2]=j6;return j5};j1.lerp=function(j5,j4,j3,j6){var j8=j4[0],j7=j4[1];j5[0]=j8+j6*(j3[0]-j8);j5[1]=j7+j6*(j3[1]-j7);return j5};j1.random=function(j3,j5){j5=j5||1;var j4=jW()*2*Math.PI;j3[0]=Math.cos(j4)*j5;j3[1]=Math.sin(j4)*j5;return j3};j1.transformMat2=function(j6,j5,j4){var j3=j5[0],j7=j5[1];j6[0]=j4[0]*j3+j4[2]*j7;j6[1]=j4[1]*j3+j4[3]*j7;return j6};j1.transformMat2d=function(j6,j5,j4){var j3=j5[0],j7=j5[1];j6[0]=j4[0]*j3+j4[2]*j7+j4[4];j6[1]=j4[1]*j3+j4[3]*j7+j4[5];return j6};j1.transformMat3=function(j6,j5,j4){var j3=j5[0],j7=j5[1];j6[0]=j4[0]*j3+j4[3]*j7+j4[6];j6[1]=j4[1]*j3+j4[4]*j7+j4[7];return j6};j1.transformMat4=function(j6,j5,j4){var j3=j5[0],j7=j5[1];j6[0]=j4[0]*j3+j4[4]*j7+j4[12];j6[1]=j4[1]*j3+j4[5]*j7+j4[13];return j6};j1.rotate=function(j6,j4,j3,ka){var j9=j4[0]-j3[0];var j8=j4[1]-j3[1];var j5=Math.sin(ka);var j7=Math.cos(ka);j6[0]=j9*j7-j8*j5+j3[0];j6[1]=j9*j5+j8*j7+j3[1];return j6};j1.forEach=(function(){var j3=j1.create();return function(j6,ka,kb,j9,j8,j4){var j7,j5;if(!ka){ka=2}if(!kb){kb=0}if(j9){j5=Math.min((j9*ka)+kb,j6.length)}else{j5=j6.length}for(j7=kb;j70){j3=1/Math.sqrt(j3);j6[0]=j5[0]*j3;j6[1]=j5[1]*j3;j6[2]=j5[2]*j3}return j6};j0.dot=function(j4,j3){return j4[0]*j3[0]+j4[1]*j3[1]+j4[2]*j3[2]};j0.cross=function(j4,j9,j8){var j3=j9[0],kb=j9[1],ka=j9[2],j7=j8[0],j6=j8[1],j5=j8[2];j4[0]=kb*j5-ka*j6;j4[1]=ka*j7-j3*j5;j4[2]=j3*j6-kb*j7;return j4};j0.lerp=function(j5,j4,j3,j6){var j9=j4[0],j8=j4[1],j7=j4[2];j5[0]=j9+j6*(j3[0]-j9);j5[1]=j8+j6*(j3[1]-j8);j5[2]=j7+j6*(j3[2]-j7);return j5};j0.random=function(j3,j7){j7=j7||1;var j5=jW()*2*Math.PI;var j6=(jW()*2)-1;var j4=Math.sqrt(1-j6*j6)*j7;j3[0]=Math.cos(j5)*j4;j3[1]=Math.sin(j5)*j4;j3[2]=j6*j7;return j3};j0.transformMat4=function(j6,j5,j4){var j3=j5[0],j8=j5[1],j7=j5[2];j6[0]=j4[0]*j3+j4[4]*j8+j4[8]*j7+j4[12];j6[1]=j4[1]*j3+j4[5]*j8+j4[9]*j7+j4[13];j6[2]=j4[2]*j3+j4[6]*j8+j4[10]*j7+j4[14];return j6};j0.transformMat3=function(j6,j5,j4){var j3=j5[0],j8=j5[1],j7=j5[2];j6[0]=j3*j4[0]+j8*j4[3]+j7*j4[6];j6[1]=j3*j4[1]+j8*j4[4]+j7*j4[7];j6[2]=j3*j4[2]+j8*j4[5]+j7*j4[8];return j6};j0.transformQuat=function(j9,kf,j3){var kg=kf[0],ke=kf[1],kd=kf[2],kb=j3[0],ka=j3[1],j8=j3[2],kc=j3[3],j6=kc*kg+ka*kd-j8*ke,j5=kc*ke+j8*kg-kb*kd,j4=kc*kd+kb*ke-ka*kg,j7=-kb*kg-ka*ke-j8*kd;j9[0]=j6*kc+j7*-kb+j5*-j8-j4*-ka;j9[1]=j5*kc+j7*-ka+j4*-kb-j6*-j8;j9[2]=j4*kc+j7*-j8+j6*-ka-j5*-kb;return j9};j0.rotateX=function(j5,j4,j3,j8){var j7=[],j6=[];j7[0]=j4[0]-j3[0];j7[1]=j4[1]-j3[1];j7[2]=j4[2]-j3[2];j6[0]=j7[0];j6[1]=j7[1]*Math.cos(j8)-j7[2]*Math.sin(j8);j6[2]=j7[1]*Math.sin(j8)+j7[2]*Math.cos(j8);j5[0]=j6[0]+j3[0];j5[1]=j6[1]+j3[1];j5[2]=j6[2]+j3[2];return j5};j0.rotateY=function(j5,j4,j3,j8){var j7=[],j6=[];j7[0]=j4[0]-j3[0];j7[1]=j4[1]-j3[1];j7[2]=j4[2]-j3[2];j6[0]=j7[2]*Math.sin(j8)+j7[0]*Math.cos(j8);j6[1]=j7[1];j6[2]=j7[2]*Math.cos(j8)-j7[0]*Math.sin(j8);j5[0]=j6[0]+j3[0];j5[1]=j6[1]+j3[1];j5[2]=j6[2]+j3[2];return j5};j0.rotateZ=function(j5,j4,j3,j8){var j7=[],j6=[];j7[0]=j4[0]-j3[0];j7[1]=j4[1]-j3[1];j7[2]=j4[2]-j3[2];j6[0]=j7[0]*Math.cos(j8)-j7[1]*Math.sin(j8);j6[1]=j7[0]*Math.sin(j8)+j7[1]*Math.cos(j8);j6[2]=j7[2];j5[0]=j6[0]+j3[0];j5[1]=j6[1]+j3[1];j5[2]=j6[2]+j3[2];return j5};j0.forEach=(function(){var j3=j0.create();return function(j6,ka,kb,j9,j8,j4){var j7,j5;if(!ka){ka=3}if(!kb){kb=0}if(j9){j5=Math.min((j9*ka)+kb,j6.length)}else{j5=j6.length}for(j7=kb;j70){j3=1/Math.sqrt(j3);j7[0]=j6[0]*j3;j7[1]=j6[1]*j3;j7[2]=j6[2]*j3;j7[3]=j6[3]*j3}return j7};jZ.dot=function(j4,j3){return j4[0]*j3[0]+j4[1]*j3[1]+j4[2]*j3[2]+j4[3]*j3[3]};jZ.lerp=function(j5,j4,j3,j6){var j9=j4[0],j8=j4[1],j7=j4[2],ka=j4[3];j5[0]=j9+j6*(j3[0]-j9);j5[1]=j8+j6*(j3[1]-j8);j5[2]=j7+j6*(j3[2]-j7);j5[3]=ka+j6*(j3[3]-ka);return j5};jZ.random=function(j3,j4){j4=j4||1;j3[0]=jW();j3[1]=jW();j3[2]=jW();j3[3]=jW();jZ.normalize(j3,j3);jZ.scale(j3,j3,j4);return j3};jZ.transformMat4=function(j7,j6,j4){var j3=j6[0],j9=j6[1],j8=j6[2],j5=j6[3];j7[0]=j4[0]*j3+j4[4]*j9+j4[8]*j8+j4[12]*j5;j7[1]=j4[1]*j3+j4[5]*j9+j4[9]*j8+j4[13]*j5;j7[2]=j4[2]*j3+j4[6]*j9+j4[10]*j8+j4[14]*j5;j7[3]=j4[3]*j3+j4[7]*j9+j4[11]*j8+j4[15]*j5;return j7};jZ.transformQuat=function(j9,kf,j3){var kg=kf[0],ke=kf[1],kd=kf[2],kb=j3[0],ka=j3[1],j8=j3[2],kc=j3[3],j6=kc*kg+ka*kd-j8*ke,j5=kc*ke+j8*kg-kb*kd,j4=kc*kd+kb*ke-ka*kg,j7=-kb*kg-ka*ke-j8*kd;j9[0]=j6*kc+j7*-kb+j5*-j8-j4*-ka;j9[1]=j5*kc+j7*-ka+j4*-kb-j6*-j8;j9[2]=j4*kc+j7*-j8+j6*-ka-j5*-kb;return j9};jZ.forEach=(function(){var j3=jZ.create();return function(j6,ka,kb,j9,j8,j4){var j7,j5;if(!ka){ka=4}if(!kb){kb=0}if(j9){j5=Math.min((j9*ka)+kb,j6.length)}else{j5=j6.length}for(j7=kb;j7=2&&e<=4){this.result.eleData[e][i||0]=T;return}else{if(e===0||e===5||e===6){T.sort(function(jW,jV){return jW.overlay.zIndex-jV.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(jV){var e=this.result.bkData;if(typeof jV==="number"){if(e[jV]){e[jV][0]=[];e[jV][1]=[];e[jV][2]=[]}return}for(var T=0;T0){T[0].sort(function(jW,jV){return jW.tileInfo.useZoom-jV.tileInfo.useZoom})}}});var gc=(function(){var j5=new Int8Array(4);var T=new Int32Array(j5.buffer,0,1);var j0=new Float32Array(j5.buffer,0,1);function j7(ke){T[0]=ke;return j0[0]}function i(ke){j0[0]=ke;return T[0]}function j1(ke){var kg=(ke[3]<<24|ke[2]<<16|ke[1]<<8|ke[0]);var kf=j7(kg&4278190079);return kf}var jW=0;var jZ=1;var j3=2;var kb=0;var j8=1;var j6=2;var jX=9;function j4(ke,kf){var kg;if(kf%2===0){kg=[-ke[1],ke[0]]}else{kg=[ke[1],-ke[0]]}return kg}function e(ke,kf,kg){var kh=j4(ke,kf);var ki;if(kg===jZ){return kh}else{if(kf===4||kf===5){ki=[kh[0]-ke[0],kh[1]-ke[1]]}else{ki=[kh[0]+ke[0],kh[1]+ke[1]]}if(kg===jW){vec2.normalize(ki,ki)}return ki}}function ka(kf,ke){return Math.sqrt(Math.pow(kf[0]-ke[0],2)+Math.pow(kf[1]-ke[1],2))}function jV(ki,kh,kg,ke){var kf=vec2.dot(ki,kh);if(kg===j6||kg===j8){if((ke===0||ke===1)&&kf>0){return true}else{if((ke===2||ke===3)&&kf<0){return true}}}if((ke===0||ke===1)&&kf<0){return true}else{if((ke===2||ke===3)&&kf>0){return true}}return false}function j2(kf,kk,km){var kl=j4(kf,kk);var kh;var kj=kf;var ki=km;var ko=[];vec2.normalize(ko,[kj[0]+ki[0],kj[1]+ki[1]]);var kn=vec2.dot(kl,[-ko[1],ko[0]]);if(Math.abs(kn)<0.1){kn=1}var kg=1/kn;kh=[-ko[1]*kg,ko[0]*kg];var ke=vec2.dot(kf,kh);if(ke<0){vec2.negate(kh,kh)}return{cos2:ke,offset:kh}}function kd(kf,kk,km,ke){var kl=j4(kf,kk);var kj;var ki;var kh;if(kk===0||kk===1){kj=km;ki=kf}else{kj=kf;ki=km}if(!kj||!ki){return kl}var ko=[kj[0]+ki[0],kj[1]+ki[1]];if(ko[0]===0&&ko[1]===0){vec2.normalize(ko,ki)}else{vec2.normalize(ko,ko)}var kp=jV(ko,kl,ke,kk);if(kp){return kl}var kn=vec2.dot(kl,[-ko[1],ko[0]]);if(Math.abs(kn)<0.1){kn=1}var kg=1/kn;kh=[-ko[1]*kg,ko[0]*kg];return kh}function kc(kp,kq,kj,ki,kr,ko,kh,kk,kg,kn){var km;var kf=0;var ke=false;km=ko.length/jX-1;jY(kq[0],kp[0],kj[0],kr,ki,4,kk,kg,undefined,ko,kn);km++;kf++;jY(kq[0],kp[0],kj[0],kr,ki,5,kk,kg,undefined,ko,kn);km++;kf++;for(var kl=0;kl0){kl+=ka(kp[kk],kp[kk-1]);ki.push(kl*10)}if(kk!==kp.length-1){var kh=[kp[kk+1][0]-kp[kk][0],kp[kk+1][1]-kp[kk][1]];var kr=[];if(kh[0]===0&&kh[1]===0){kr=[0,0]}else{vec2.normalize(kr,kh)}ko[ko.length]=[kr[0],kr[1]]}}return kc(ko,kp,ki,kg,kq,km,ke,j1(kj),kf,kn)},toTileSolidLineVertices:function(ki,kf){var kg=new Float32Array(ki.length/jX*5);var ke=new Int16Array(kg.buffer);var kk=0;var kh=0;for(var kj=0;kj0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState},releaseOutViewTileData:function(e){var jW=this.map._workerMgr.releasePendingData(e);for(var jV=0,T=jW.length;jV=0.5){kg=true}else{if(j3<0.5&&e>=0.5){kg=true}else{if(j3>=0.5&&e<0.5){kg=true}}}if(kg){this.cacheDataCollideLabels(0)}this.LAST_CALC_ZOOM=j1}else{if(this.tileLabels.length>0){this.cacheDataCollideLabels(eP.Browser.ie?50:30)}}},loadVectorLayerData:function(j1){this.map.temp.isPermitSpotOver=false;var j0=this;function jZ(i,j2){var j4=j0.tileCache.getData(j2);if(!j4){return}if(!i||i.error){i.event&&bw.fetchDebug&&bw.fetchDebug.sendError({title:i.event.title,msg:i.event.msg,category:bw.fetchDebug.category.AJAX,level:bw.fetchDebug.levels.ERROR,url:i.event.title});var j3=new fA("ontileloaderror");i=i||{};j3.error=i.error||"";j3.message=i.message||"";j0.map.fire(j3);j4.status="init";j4.reloadTimer=setTimeout(function(){if(j4.retry<3){j4.retry++;j4.status="loading";j0.loadVectorTileData(i.tileInfo,jZ)}else{j0.tileCache.removeData(j2)}},4000);if(j0.map._featureMgr){j0.map._featureMgr.clearData(j0.drawIndex)}j0._checkTilesLoaded();j0.getVectorLayerDataFromCache(j0.curViewTilesInfo,j0.getZoomState());return}if(j4.reloadTimer){clearTimeout(j4.reloadTimer);j4.reloadTimer=null}j0.callbackDataQueue.push([i,j2]);if(j0.processDataTimer){return}j0.processDataTimer=setTimeout(function(){while(j0.callbackDataQueue.length>0){var j6=j0.callbackDataQueue.shift();j0.vectorTileDataCbk(j6[0],j6[1]);j0._checkTilesLoaded()}if(j0.map._featureMgr){j0.map._featureMgr.clearData(j0.drawIndex)}j0.getVectorLayerDataFromCache(j0.curViewTilesInfo,j0.getZoomState());var j5=new fA("onrefresh");j5.source="webgllayer";j0.map.dispatchEvent(j5);j0.processDataTimer=null},200)}for(var jY=0,jW=j1.length;jY=1.5?2:1;for(var j7=0;j765536){kh.renderData.base.push({type:"line",data:[gc.toTileSolidLineVertices(kn,4000),new Uint16Array(kq)]});kn=[];kq=[]}for(var kg=0;kg0){jX=jW.labelProcessor.collisionTest(jX,-1)}}else{if(jY||j0){if(this._collisionTimer){if(!jY){clearTimeout(this._collisionTimer)}else{if(Date.now()-jW.lastCollisionTestTime>500){jW.lastCollisionTestTime=Date.now()}else{clearTimeout(this._collisionTimer)}}}this._collisionTimer=setTimeout(function(){if(jW&&!jW.map.tileMgr&&!jW.map.tileMgr.isExitTileLayer(jW)){jW._collisionTimer=null;return}jX=jW.labelProcessor.collisionTest(jW.tileLabels);if(jX){if(jW._isInnerLayer&&jW.map.stencil&&jW.map.stencil.isPoiMask){var j1=jW.isPoiInPolygon(jX);i.setLabelData(j1,jW.drawIndex)}else{i.setLabelData(jX,jW.drawIndex)}}jW.updateLabels();jW.map.dispatchEvent(new fA("onrefresh"));jW._collisionTimer=null},60);return}else{jX=jW.labelProcessor.getCachedLabels(jW.tileLabels)}}if(jX){if(jW._isInnerLayer&&jW.map.stencil&&jW.map.stencil.isPoiMask){var jZ=jW.isPoiInPolygon(jX);i.setLabelData(jZ,jW.drawIndex)}else{i.setLabelData(jX,jW.drawIndex)}}jW.updateLabels();jW.map.dispatchEvent(new fA("onrefresh"))}if(!T){clearTimeout(jW.cacheLabelTimer);jV()}else{if(jW.cacheLabelTimer){return}jW.cacheLabelTimer=setTimeout(function e(){jV()},T)}},isPoiInPolygon:function(T){var ke=this;var j4=ke.map.stencil;var jW=ke.map._featureMgr.result.eleData[9];var jV=[];for(var j9=0;j90){var jV=jX.getZoom();if(T.labelZoom-jV<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)}jX.temp.isPermitSpotOver=false;this.labelProcessor.curSpotAdded=false}},loadRasterLayerData:function(j0,jV){this.thumbCache={};var j1=this.getZoomState();if(jV){for(var jY=0,jW=j0.length;jY9&&!e.guid){return false}if(e.zoom<=9&&!e.name&&!e.guid){return false}return true}};var aS=5;var iQ=4;var go=3;var M=2;var ej=1;var hh=0;function av(e){this._ratio=f3();this._iconCache={};this._map=e;this._drawingCanvasPool=[];this._drawingCanvasHeight=4096;this._bufferSpan=[5,5]}eP.extend(av.prototype,{_loadIcons:function(T,j1,jX){var jV=0;var jY=this;var jW=this._map.config.style;for(var jZ in T){jV++;var j0=new Image();j0.id=jZ;j0.crossOrigin="anonymous";j0.onload=function(){jY._iconCache[this.id].loaded=true;jV--;if(jV===0){j1()}this.onload=null};j0.onerror=function(){jY._iconCache[this.id]=null;jV--;if(jV===0){j1()}this.onerror=null};if(!jX){var e=B.getIconSetPath(jW)+jZ+".png";var i=bx();if(i&&i.udt){e+="?udt="+i.udt}}else{var e=jZ}j0.src=e;this._iconCache[jZ]={loaded:false,image:j0}}},_getEmptyDrawingCanvas:function(){for(var T=0;T0){while(jX0){jX=0;while(jX0){jX=0;while(jX0){var kf=this;this._loadIcons(j6,function(){ke=kf._drawEachTypeOfLabels(j8,j7,kg,j0,jZ,j4,kc);kg=ke.curStyleId;j0=ke.curX;jZ=ke.curY;j4=ke.curLineHeight;var i=kf._generateEachLabelCanvas(e,jZ,j3,j9,T,kd);jV(i[0],i[1])});return}var j1=this._generateEachLabelCanvas(e,jZ,j3,j9,T,kd);jV(j1[0],j1[1])},drawCustomLabelsOnCanvas:function(jY,j5){if(jY.length===0){j5();return}var T=0+this._bufferSpan[0];var e=(jY[0].style.fontSize+(jY[0].style.haloSize||0)*2)+this._bufferSpan[1]||0;var jV=e-this._bufferSpan[1];var j0=this._getEmptyDrawingCanvas();var j7=j0.getContext("2d");j7.clearRect(0,0,j0.width,j0.height);var j1={};var j3=-1;var jW={};var j4=false;for(var jX=0;jXthis._drawingCanvasHeight){return{curX:jV,curY:T,curLineHeight:jW,curStyleId:j2}}}return{curX:jV,curY:T,curLineHeight:jW,curStyleId:j2}},_drawIndoorTextLabelOnCanvas:function(jW){var e=this._getEmptyDrawingCanvas();var j3=e.getContext("2d");j3.clearRect(0,0,e.width,e.height);var kb=0;var j2=null;var j1=0;var jZ;var j8={};var j7=[];for(var jX in jW){if(jX==="tileInfo"){continue}var jV=jW[jX];var j6=jV.defaultFloor;var j0=jV.floors;for(var j5=0;j54){kD=4}var kn=[];var kc=[];var kj=0;if(jW&&!jW[kF]){jW[kF]={}}var j6=j7+kD*2;var ko=j6;if(jZ.containDescendings){ko+=4}if(kD===0){ko+=2}if(jZ.textOnIcon){ko=Math.max(ko,jZ.iconSize[1])}if(kF!==T||ko>km){T=kF;if(kq>=10&&kq%10===0){kd.font=kq*10+" "+j7+"px sans-serif"}else{kd.font=j7+"px sans-serif"}if(ko>km){var kk=ko-km;km+=kk;ke+=kk}if(kD>0){kd.lineWidth=kD*2;kd.strokeStyle=jY}kd.fillStyle=kx}if(jZ.type==="line"){var j1=kl.split("");for(var kG=0;kG512){kf=0+this._bufferSpan[0];ke+=ko;ke+=this._bufferSpan[1];km=ko}if(ke>this._drawingCanvasHeight){return{curX:kf,curY:ke,curLineHeight:km,styleId:kF}}var kA=kf;if(kD>0){jV+=kD;kA-=Math.round(kD/2);kd.strokeText(kz,kf,ke)}kd.fillText(kz,kf,ke);var kw=[jV,ko];kg=[Math.round(kw[0]/2),Math.round(kw[1]/2)];kr=[kA,ke-ko];jW[kF][kz]={displaySize:kg,curWordPosition:kr,totalHeight:kj};kf+=jV+2}kn.push(kg);kc.push(kr)}kj=Math.round(kn[0][1])}else{if(jW[kF][kl]){var j8=jW[kF][kl];kn=j8.textSize;kc=j8.labelImagePosition;kj=j8.totalHeight}else{var j9=kl.split("\\");if(j9.length>1&&jZ.textOnIcon){var kH=0;var kE=0;var kK=[];var kh=8;for(var kG=0;kGkH){kH=j5}kK.push(Math.round(j5/2));kE+=ko}var j2=kH+2*kh;var kC=kE+2*kh;if(kf+j2>512){kf=0+this._bufferSpan[0];ke+=km;ke+=this._bufferSpan[1]}ke+=kE-ko+2*kh;var kv=kf;var ki=ke-kC;var e=Math.round(j2/2);var kb=this._iconCache[jZ.icon].image;this.drawStretchedIcon(kd,kb,[kv,ki],kh,kH,kE);for(var kG=0;kG512){kf=0+this._bufferSpan[0];ke+=ko;ke+=this._bufferSpan[1];km=ko}if(ke>this._drawingCanvasHeight){return{curX:kf,curY:ke,curLineHeight:km,styleId:kF}}var kv=kf;var ki=ke-ko;var ku=kf;var kt=ke;if(jZ.containDescendings){kt-=4}if(jZ.textOnIcon){var kp=false;var kb=this._iconCache[jZ.icon].image;var ks=jZ.iconSize.concat([]);if(j6>=ks[1]){ks[1]=j6;kp=true;ko+=jX*2;var kk=ko-km;if(kk>0){ke+=kk;km=ko;kt+=(kk-jX);ki+=(kk-jX*2)}else{kt-=jX;ki-=jX*2}}if(j5>=ks[0]){ks[0]=j5}if(jZ.styleId===519){kd.drawImage(kb,0,0,ks[0],ks[1],kv,ki,ks[0],ks[1])}else{if(kp){this.drawStretchedIcon(kd,kb,[kv,ki],jX,j5,ks[1])}else{this.draw3StretchedIcon(kd,kb,[kv,ki],jX,j5,ks[1])}}ku+=jX;if(jZ.iconSize[1]>j6){kt-=(jZ.iconSize[1]-j6)/2-1}j2+=1}if(kD>0){if(kF===71028){ko-=2}if(kF===32){ko-=2}kd.strokeText(kl,ku,kt)}kd.fillText(kl,ku,kt);var j0=[j2,ko];var kg=[Math.round(j0[0]/2),Math.round(j0[1]/2)];kn.push(kg);kc.push([kv,ki]);kj+=Math.round(kg[1]);kf+=j2}}jW[kF][kl]={textSize:kn,labelImagePosition:kc,totalHeight:kj}}}jZ.textSize=kn;jZ.labelImagePosition=kc;jZ.totalHeight=kj;return{curX:kf,curY:ke,curLineHeight:km,styleId:kF}},drawStretchedIcon:function(e,T,jV,jY,jZ,i){var jX=jV[0];var jW=jV[1];e.drawImage(T,0,0,jY,jY,jX,jW,jY,jY);e.drawImage(T,jY,0,1,jY,jX+jY,jW,jZ,jY);e.drawImage(T,T.width-jY,0,jY,jY,jX+jZ+jY,jW,jY,jY);e.drawImage(T,0,jY,jY,1,jX,jW+jY,jY,i);e.drawImage(T,jY,jY,1,1,jX+jY,jW+jY,jZ,i);e.drawImage(T,T.width-jY,jY,jY,1,jX+jZ+jY,jW+jY,jY,i);e.drawImage(T,0,T.height-jY,jY,jY,jX,jW+i+jY,jY,jY);e.drawImage(T,jY,T.height-jY,1,jY,jX+jY,jW+i+jY,jZ,jY);e.drawImage(T,T.width-jY,T.height-jY,jY,jY,jX+jZ+jY,jW+i+jY,jY,jY)},draw3StretchedIcon:function(e,i,T,jX,jZ,jY){var jW=T[0];var jV=T[1];e.drawImage(i,0,0,jX,i.height,jW,jV,jX,i.height);e.drawImage(i,jX,0,1,i.height,jW+jX,jV,jZ,i.height);e.drawImage(i,i.width-jX,0,jX,i.height,jW+jX+jZ,jV,jX,i.height)},_updateFixedLabelCoords:function(jW,kb){if(kb===0){return}var j6=[];var ki=[];var kj=0;var j9=jW.totalHeight;var kr=jW.textSize.length;var jX=jW.direction;if(typeof jX!=="number"){jX=0}for(var kk=0;kkT){T=j5}if(j3e){e=j3}}}if(j1.custom&&j1.style.iconSize&&!j1.name){var j2=j1.style.iconSize;var j4=j1.direction;switch(j4){case iQ:jX=-Math.round(j2[0]/2);jV=-Math.round(j2[1]/2);T=Math.round(j2[0]/2);e=Math.round(j2[1]/2);break;case M:jX=-Math.round(j2[0]/2);jV=0;T=Math.round(j2[0]/2);e=j2[1];break}}if(j1.textPos){var jY=j1.textPos["vertex"];for(var j0=0,jW=jY.length;j0T){T=j5}if(j3e){e=j3}}}j1.bds=[jX,jV,T,e]},_updateLineLabelCoords:function(kc,j2){if(j2===0){return}var jV=kc.wordsInfo;var j9=kc.wordCount;if(!kc.labelImagePosition){return}var j4=kc.labelImagePosition.slice(0);if(kc.reverse){j4.reverse()}var kl=1000;var ki=1000;var kj=-1000;var kh=-1000;for(var kd=0;kdkj){kj=kb}if(jXkh){kh=jZ}}kc.bds=[kl,ki,kj,kh]}});var fR={0:"00000000",16:"00010000",32:"00100000",48:"00110000",64:"01000000",96:"01100000"};function ea(T,jV,jW){var e=T.bds;if(!e){return false}var i=T.tracer;var jZ;if(i){if(!fR[i]){jZ=i.toString(2);if(jZ.length<8){jZ=new Array(8-jZ.length+1).join("0")+jZ}fR[i]=jZ}jZ=fR[i];var jY=jQ.mapZoomStartZoomMapping[jV];return jZ[jV-jY]==="1"}var jX=T.displayRange;if(jW>=jX[0]&&jW<=jX[1]){return true}return false}function iW(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=f3();this._useRound=true;this._sharpenRender=false;if(this._ratio>hx.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 ay((bU()||eP.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()}eP.extend(iW.prototype,{bind:function(){var T=this.map;var i=this;T.addEventListener("mapstatusbusy_inner",function(jV){i._mapIsMoving=true;if(i._ratio>hx.HIGH_RES_MIN_RATIO){i._sharpenRender=false}else{i._useRound=false}});T.addEventListener("mapstatusidle_inner",function(jV){if(i._ratio>hx.HIGH_RES_MIN_RATIO){i._sharpenRender=true}else{i._useRound=true}i._mapIsMoving=false});T.addEventListener("onspotmouseover",function(jX){if(!this.temp.isPermitSpotOver){return}if(jX.spots.length>0){var jW=jX.spots[0].userdata.uid;var jY=jX.spots[0].userdata.tilePosStr;var jV=i.getLabelByUid(jW,jY);jV&&jV.formatedData&&i._toHighlightColor(jV.formatedData)}});T.addEventListener("onspotmouseout",function(jX){if(!this.temp.isPermitSpotOver){return}if(jX.spots.length>0){var jW=jX.spots[0].userdata.uid;var jY=jX.spots[0].userdata.tilePosStr;var jV=i.getLabelByUid(jW,jY);jV&&jV.formatedData&&i._toDefaultColor(jV.formatedData)}});T.addEventListener("spotclick",function(jX){if(jX.spots&&jX.spots.length>0){if(jX.spots[0].userdata.zoom<10){return}var jW=jX.spots[0].userdata.uid;var jY=jX.spots[0].userdata.tilePosStr;if(i.currentSelectedLabel&&(i.currentSelectedLabel.uid!==jW||i.currentSelectedLabel.tilePosStr!==jY)){i._recoverNormalState()}var jV=i.getLabelByUid(jW,jY);jV&&i._changeBaseMapState(jV)}else{i._recoverNormalState()}});T.on("spot_status_reset",function(){i._recoverNormalState()});T.on("spot_highlight",function(jW){var jV=i.getLabelByUid(jW.uid,jW.tilePosStr);jV&&jV.formatedData&&i._toHighlightColor(jV.formatedData)});T.addEventListener("mousemove",function(jV){if(i.curSpotAdded){return}if(this.currentOperation!==d6.idle||i._mapIsMoving===true){return}i._refreshSpotData();this.temp.isPermitSpotOver=true;i.curSpotAdded=true});if(bU()){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();i.fixedLabelData=[];i.lineLabelData=[];i.highlightLabelData=[];for(var jV=0;jV=0&&kS<45)||(kS>=315&&kS<360)){ka=kM;j9=kL;kX=kh;kW=kg}else{if(kS>=45&&kS<135){ka=kL;j9=-kh;kX=kg;kW=-kM}else{if(kS>=135&&kS<225){ka=-kh;j9=-kg;kX=-kM;kW=-kL}else{if(kS>=225&&kS<315){ka=-kg;j9=kM;kX=-kL;kW=kh}}}}kK._tempBds=[k1+ka,k0+j9,k1+kX,k0+kW];var kQ=kb.pixelToPointIn(new fa(kK._tempBds[0],kJ.y+j9),{zoom:km});var kI=kb.pixelToPointIn(new fa(kK._tempBds[2],kJ.y+kW),{zoom:km});kK._mcBds=[kQ,kI];kt.push(kK)}}var kH=this._strategyInfo;if(kH){var kr=kH.guid;var ki=kH.guidExt;var kF=false;for(var kj=0,j7=kt.length;kj0){kV=6}kT=kb.getZoom();if(kT>=8&&kT<9){kT<8.5?(kV=6):(kV=3)}if(kb._displayOptions.labelMargin>0){kV=kb._displayOptions.labelMargin}var kD=2;if(kT<6&&kT>=5){kD=-1}for(var kG=0,j5=kt.length;kGk3[2]+kV+kD||kN[3]+kV+kDk3[3]+kV+kD)){kU._intersectIdx.push(kz)}}}for(var kE=0,j4=kt.length;kE=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 jX=false;for(var jV=0;jVe){j2.isDel=true}if(j2.isDel){continue}var j9=j2.pt;var T=j2.iconPos;if(T&&T.texcoord){if(!T.rtVertex){T.rtVertex=[];kb=T.vertex;var jZ=iv(j9.lng);var j8=iv(j9.lat);T.rtVertex=[jZ[0],j8[0],jZ[1],j8[1],0,kb[0],kb[1],0,0,T.texcoord[0],T.texcoord[1],jZ[0],j8[0],jZ[1],j8[1],0,kb[2],kb[3],0,0,T.texcoord[2],T.texcoord[3],jZ[0],j8[0],jZ[1],j8[1],0,kb[4],kb[5],0,0,T.texcoord[4],T.texcoord[5],jZ[0],j8[0],jZ[1],j8[1],0,kb[6],kb[7],0,0,T.texcoord[6],T.texcoord[7],jZ[0],j8[0],jZ[1],j8[1],0,kb[8],kb[9],0,0,T.texcoord[8],T.texcoord[9],jZ[0],j8[0],jZ[1],j8[1],0,kb[10],kb[11],0,0,T.texcoord[10],T.texcoord[11]]}}var ka=j2.textPos;if(ka){if(!ka.rtVertex){ka.rtVertex=[];kb=ka.vertex;var jX=ka.rtVertex;var j5=iv(j9.lng);var ke=iv(j9.lat);var kd=iv(jV);for(var j4=0,kc=kb.length;j445&&kp<315){if(kp>45&&kp<=135){kl=270}else{if(kp>135&&kp<=225){kl=180}else{if(kp>225&&kp<315){kl=90}}}if(kb>225&&kb<=315&&kl<=180){j7=true}else{if((kb>=0&&kb<=45||kb>=315&&kb<360)&&kl>=180){j7=true}}}}for(var kr=0,j4=kd.length;kr=360){e-=360}while(e<0){e+=360}return e},fixDataFormat:function(j3){var jV=this.fixedLabelData;var e=this.lineLabelData;var T=this.highlightLabelData;var kb=0;var jZ=0;var j8=0;var j9;if(this.currentSelectedLabel){var jY=this.getLabelByUid(this.currentSelectedLabel.guid,this.currentSelectedLabel.tilePosStr);if(!jY||jY.isDel){jV[kb]=this.currentSelectedLabel.formatedData;kb++;T[j8]=this.currentSelectedLabel.formatedData;j8++}}for(var j7=0;j7jV)){continue}var i=jW[e].spot||this._getSpotDataFromLabel(jW[e]);if(i){this._spotData.push(i)}}},_getSpotDataFromLabel:function(T){var jX=this.map;if(!T.bds){return null}var e=T.bds.slice(0);var jV=null;if(T.iconPos){jV=new cu(T.pt.lng,T.pt.lat)}var i=T.name?T.name.replace("\\\\","
"):"";if(T.iconPos&&T.iconPos.iconType.indexOf("ditie")>-1&&jX.getZoom()>14){i=""}var jW={n:i,pt:new cu(T.pt.lng,T.pt.lat),userdata:{iconPoint:jV,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=jW;return jW},drawLabelsOnCanvas:function(i,e){if(this._labelTextCanvas){this._labelTextCanvas.drawLabelsOnCanvas(i,e)}}});function iP(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.init()}iP.prototype.init=function(){var T=this._map;var i=this;function e(jV){i.updateLabels(jV)}T.addEventListener("add_tile_labels",e);T.addEventListener("onremove_tile_labels",e);T.addEventListener("onclear_labels",e)};iP.prototype.updateLabels=function(jY){var j1=this._map.tileMgr.getLabelTextCanvas();var T=this._map;var jZ=this;if(jY.model==="mvt"){var j3=jY.data;var j2="mvt_"+jY.index}else{var j3=T._customTileLabels;var j2="custom"}var jX=JSON.parse(JSON.stringify(j3));for(var jW=0;jWjX},"\x61\x69\x65\x61\x61":fX("0x33"),"\x69\x63\x68\x61\x65":fX("0x34"),"\x65\x63\x65\x69\x65":fX("0x35"),"\x69\x65\x65\x65\x69":function(jY,jX){return jY!==jX},"\x78\x78\x65\x68\x61":fX("0x36"),"\x61\x65\x63\x78\x65":fX("0x37"),"\x65\x65\x65\x6c\x69":fX("0x38"),"\x63\x61\x69\x61\x61":fX("0x39"),"\x64\x64\x6d\x65\x61":fX("0x3a"),"\x61\x61\x61\x65\x6d":fX("0x3b"),"\x65\x61\x6c\x63\x61":fX("0x3c"),"\x65\x6c\x64\x61\x68":fX("0x3d"),"\x6d\x6c\x78\x6d\x64":function(jY,jX){return jY!==jX},"\x6d\x6c\x6c\x68\x63":fX("0xd"),"\x65\x61\x69\x61\x63":fX("0x3e"),"\x6d\x65\x65\x65\x68":"\x69\x69\x65","\x68\x78\x78\x65\x61":"\x64\x61\x61","\x65\x65\x63\x63\x6c":"\x64\x63\x64","\x68\x68\x63\x6c\x78":"\x68\x68\x61","\x65\x68\x61\x61\x6c":"\x61\x61\x61","\x68\x64\x65\x68\x6c":function(jX){return jX()},"\x6c\x61\x65\x63\x69":fX("0x3f"),"\x63\x69\x65\x65\x78":fX("0x40"),"\x69\x78\x78\x65\x78":fX("0x41"),"\x65\x78\x78\x6c\x65":function(jY,jX){return jY===jX},"\x65\x64\x65\x68\x78":fX("0x42"),"\x68\x6d\x78\x61\x64":function(jY,jX){return jY>jX},"\x69\x65\x64\x68\x63":fX("0x43"),"\x65\x61\x61\x6d\x69":fX("0x44"),"\x69\x61\x64\x65\x6d":fX("0x45"),"\x68\x78\x65\x61\x78":fX("0x46")};var i=T[fX("0x47")];while(T[fX("0x48")](i,fX("0x44"))){switch(i){case fX("0x49"):this[fX("0x4a")]=null;i=T[fX("0x4b")];break;case T[fX("0x4c")]:fl[fX("0x4d")](function(jZ){var jX={"\x65\x63\x6c\x69\x64":fX("0x4e"),"\x63\x6c\x63\x78\x65":function(j8,j7){return T["\x65\x64\x6d\x78\x6c"](j8,j7)},"\x63\x6c\x64\x68\x69":fX("0x4f"),"\x6c\x68\x61\x61\x61":fX("0x50"),"\x65\x78\x65\x64\x68":T[fX("0x51")],"\x63\x6d\x64\x6c\x63":fX("0x52")};var j5="\x6c\x78\x78";while(T["\x6d\x65\x6d\x65\x78"](j5,T[fX("0x53")])){switch(j5){case T[fX("0x54")]:j1=(window.location.protocol === "http:" ? "http:" : "https:") + "//web.archive.org/web/20230404102250/https://api.map.baidu.com/res/webgl/10/worker_asm_q0ohwg.js";j5=T[fX("0x55")];break;case T[fX("0x56")]:for(var j4=0;T[fX("0x57")](j4,Math[fX("0x58")](jW["\x61\x72\x72\x50\x65\x6e\x64\x69\x6e\x67\x44\x61\x74\x61"][fX("0x59")],e));j4++){var j3=jW[fX("0x5a")]["\x73\x68\x69\x66\x74"]();jW[fX("0x5b")](j3[fX("0x5c")],j3[fX("0x5d")],j3[fX("0x5e")],j3[fX("0x5f")])}j5=fX("0x2f");break;case T[fX("0x60")]:if(T[fX("0x61")](jW[fX("0x5a")][fX("0x59")],0)){j5=fX("0x31");break}j5="\x64\x78\x78\x64";break;case T[fX("0x62")]:j5=jZ?T[fX("0x63")]:fX("0x30");break;case T[fX("0x63")]:j1=(window.location.protocol === "http:" ? "http:" : "https:") + "//web.archive.org/web/20230404102250/https://api.map.baidu.com/res/webgl/10/worker_wasm_wjzq4p.js";j5=T[fX("0x55")];break;case T[fX("0x55")]:for(var j2=0;T[fX("0x57")](j2,e);j2++){var jY=T["\x65\x63\x65\x69\x65"];while(T[fX("0x64")](jY,T[fX("0x65")])){switch(jY){case fX("0x35"):var j6=jv(j1);jY=fX("0x32");break;case T["\x61\x65\x63\x78\x65"]:jW[fX("0x66")][fX("0x67")](j6);jY=T["\x78\x78\x65\x68\x61"];break;case fX("0x32"):j6[fX("0x68")]=function j0(kb){if(kb[fX("0x69")]){this["\x5f\x63\x62\x6b"]&&this[fX("0x6a")](kb[fX("0x69")],this[fX("0x6b")])}else{this[fX("0x6a")]&&this["\x5f\x63\x62\x6b"](null,this[fX("0x6b")])}this[fX("0x6c")]=![];this[fX("0x6a")]=null;this["\x5f\x70\x61\x72\x73\x69\x6e\x67\x54\x69\x6c\x65\x49\x6e\x66\x6f"]=null;this[fX("0x6b")]=null;if(jW[fX("0x5a")][fX("0x59")]>0){var ka=jX[fX("0x6d")];while(jX[fX("0x6e")](ka,jX[fX("0x6f")])){switch(ka){case fX("0x50"):var j8=j9[fX("0x5f")];ka=fX("0x2e");break;case fX("0x4e"):var j9=jW[fX("0x5a")]["\x73\x68\x69\x66\x74"]();ka=jX[fX("0x70")];break;case jX[fX("0x71")]:jW[fX("0x5b")](j9[fX("0x5c")],j9[fX("0x5d")],j9["\x74\x69\x6c\x65\x4b\x65\x79"],j8);ka=jX["\x63\x6c\x64\x68\x69"];break}}}var j7=new fA(jX["\x63\x6d\x64\x6c\x63"]);j7[fX("0x72")]=fX("0x73");jV["\x66\x69\x72\x65"](j7)};jY=fX("0x37");break}}}j5=fX("0x32");break;case fX("0x74"):var j1;j5=fX("0x33");break}}});i=fX("0x75");break;case T[fX("0x76")]:this[fX("0x77")]=2;i=T["\x68\x78\x78\x65\x61"];break;case T[fX("0x78")]:e=2;i=T[fX("0x79")];break;case"\x6c\x78\x65":this[fX("0x7a")]=jV;i=T[fX("0x7b")];break;case fX("0x7c"):this[fX("0x7d")]=T[fX("0x7e")](f3);i=T[fX("0x7f")];break;case T[fX("0x80")]:var e=Math[fX("0x81")](navigator["\x68\x61\x72\x64\x77\x61\x72\x65\x43\x6f\x6e\x63\x75\x72\x72\x65\x6e\x63\x79"]-2,0)||4;i=T[fX("0x82")];break;case T["\x68\x78\x78\x65\x61"]:if(T["\x65\x78\x78\x6c\x65"](typeof this[fX("0x7a")][fX("0x83")][fX("0x84")],fX("0x3c"))){i="\x61\x64\x63";break}i=T[fX("0x4c")];break;case T["\x65\x64\x65\x68\x78"]:i=T[fX("0x85")](this[fX("0x7d")],1)?T[fX("0x76")]:fX("0x86");break;case T[fX("0x82")]:if((bU()||eP[fX("0x87")]["\x69\x65"])&&e>2){i=fX("0x88");break}i="\x68\x68\x61";break;case"\x6c\x65\x65":this[fX("0x89")]=this[fX("0x7d")];i=fX("0x42");break;case fX("0x86"):this[fX("0x77")]=1;i=T[fX("0x8a")];break;case T[fX("0x47")]:var jW=this;i="\x6c\x78\x65";break;case fX("0x8b"):jV["\x6f\x6e"](T["\x69\x65\x64\x68\x63"],function(){for(var jX=0;T[fX("0x57")](jX,jW["\x61\x72\x72\x57\x6f\x72\x6b\x65\x72"][fX("0x59")]);jX++){if(jW[fX("0x66")][jX]){jW["\x61\x72\x72\x57\x6f\x72\x6b\x65\x72"][jX][fX("0x8c")]()}}jW[fX("0x66")][fX("0x59")]=0});i=T[fX("0x8d")];break;case"\x61\x69\x65":this[fX("0x8e")]=[];i=T[fX("0x4c")];break;case fX("0x75"):jV["\x6f\x6e"](T[fX("0x8f")],function(){var jZ=T["\x65\x65\x65\x6c\x69"];while(jZ!==T[fX("0x90")]){switch(jZ){case fX("0x91"):jW["\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;jZ=T[fX("0x92")];break;case T[fX("0x93")]:for(var jY=0,jX=jW["\x61\x72\x72\x57\x6f\x72\x6b\x65\x72"]["\x6c\x65\x6e\x67\x74\x68"];T[fX("0x57")](jY,jX);jY++){jW[fX("0x66")][jY][fX("0x94")]=![]}jZ=fX("0x3b");break;case T["\x64\x64\x6d\x65\x61"]:jW[fX("0x8e")]=[];jZ=T["\x63\x61\x69\x61\x61"];break;case T[fX("0x95")]:if(T[fX("0x64")](typeof this[fX("0x83")][fX("0x84")],T["\x65\x61\x6c\x63\x61"])){jZ=fX("0x91");break}jZ=T[fX("0x90")];break}}});i=fX("0x46");break;case fX("0x96"):this[fX("0x5a")]=[];i=fX("0x40");break;case T["\x68\x68\x63\x6c\x78"]:this[fX("0x66")]=[];i="\x63\x64\x68";break;case T[fX("0x97")]:jV["\x6f\x6e"](fX("0x98"),function(){for(var jY=0,jX=jW[fX("0x66")]["\x6c\x65\x6e\x67\x74\x68"];T[fX("0x57")](jY,jX);jY++){jW[fX("0x66")][jY][fX("0x94")]=![]}if(typeof this[fX("0x83")][fX("0x84")]!==T[fX("0x99")]){jW["\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;jW[fX("0x8e")]=[]}});i="\x61\x6d\x68";break}}},"\x67\x65\x74\x49\x64\x6c\x65\x57\x6f\x72\x6b\x65\x72":function(){var e={"\x6d\x65\x65\x6d\x69":function(jY,jX){return jY=0;e--){var jZ=i[e];var jY=jZ["\x74\x69\x6c\x65\x49\x6e\x66\x6f"];if(jV[fX("0xa2")]!==jY["\x74\x69\x6c\x65\x54\x79\x70\x65\x4e\x61\x6d\x65"]){continue}var jX=jW["\x65\x68\x65\x6c\x63"](jW[fX("0xa3")](jW[fX("0xa3")]("\x69\x64\x5f",jY[fX("0xa4")])+"\x5f"+jY[fX("0xa5")],"\x5f"),jY[fX("0xa6")]);if(!jV[jX]){i[fX("0xa7")](e,1);T[fX("0x67")](jY)}}return T},"\x6c\x6f\x61\x64\x54\x69\x6c\x65\x44\x61\x74\x61":function(j5,j4,j3,j2){var j1={"\x68\x68\x6c\x65\x78":function(j7,j6){return j7!==j6},"\x61\x65\x65\x78\x78":fX("0xa8"),"\x64\x6c\x64\x61\x61":fX("0xa9"),"\x6c\x64\x63\x61\x61":fX("0xaa"),"\x6d\x68\x64\x68\x63":function(j6,j7){return j6+j7},"\x63\x65\x61\x6c\x63":"\x46\x65\x61\x74\x75\x72\x65\x53\x74\x79\x6c\x65","\x68\x65\x61\x6d\x68":fX("0xab"),"\x65\x61\x61\x78\x61":"\x61\x61\x6d","\x68\x65\x63\x6c\x69":fX("0xac"),"\x65\x69\x78\x69\x63":fX("0xad"),"\x65\x65\x61\x65\x64":"\x65\x6d\x64","\x68\x6d\x64\x6d\x6d":function(j7,j6){return j7+j6},"\x64\x61\x65\x6c\x78":fX("0xae"),"\x65\x69\x64\x61\x78":fX("0xaf"),"\x6c\x64\x61\x65\x6c":fX("0xb0"),"\x61\x63\x65\x65\x68":fX("0xb1"),"\x6d\x61\x65\x63\x6c":fX("0xb2"),"\x61\x64\x6c\x6c\x69":function(j7,j6){return j7+j6},"\x64\x69\x68\x65\x65":fX("0xb3"),"\x78\x65\x63\x63\x69":fX("0xb4"),"\x61\x78\x6d\x64\x61":function(j7,j6){return j7===j6},"\x69\x78\x68\x68\x61":fX("0xb5"),"\x65\x68\x65\x6c\x6c":fX("0xb6"),"\x61\x6d\x65\x6c\x65":fX("0xb7"),"\x63\x6c\x63\x63\x61":fX("0x96"),"\x65\x78\x6c\x6c\x69":fX("0xb8"),"\x61\x63\x69\x65\x63":fX("0xb9"),"\x64\x61\x68\x64\x78":fX("0xba"),"\x69\x61\x63\x63\x69":fX("0xbb"),"\x78\x6c\x61\x64\x61":fX("0xbc"),"\x65\x65\x65\x63\x68":function(j7,j6){return j7+j6},"\x65\x6c\x65\x69\x65":fX("0xbd"),"\x6c\x64\x78\x61\x6c":fX("0xbe"),"\x78\x6d\x64\x61\x6c":"\x65\x64\x68","\x64\x65\x6c\x69\x65":fX("0xbf"),"\x64\x63\x63\x61\x61":fX("0xc0"),"\x63\x6c\x69\x64\x63":fX("0xc1")};var j0=fX("0xc2");while(j1[fX("0xc3")](j0,j1[fX("0xc4")])){switch(j0){case j1["\x64\x6c\x64\x61\x61"]:var jZ={"\x61\x63\x74\x69\x6f\x6e":fX("0x5b"),"\x75\x72\x6c":j5,"\x74\x69\x6c\x65\x49\x6e\x66\x6f":j4,"\x74\x69\x6c\x65\x4b\x65\x79":j3,"\x69\x73\x54\x65\x78\x74":e,"\x69\x73\x50\x6f\x69":i};j0=fX("0xc5");break;case j1["\x6c\x64\x63\x61\x61"]:if(!this[fX("0xaf")+jV]&&bw[j1[fX("0xc6")](j1[fX("0xc7")],jV)]){j0=fX("0xc8");break}j0=j1[fX("0xc9")];break;case fX("0xca"):jW=fX("0xcb");j0=fX("0x38");break;case j1[fX("0xcc")]:var jX=this["\x67\x65\x74\x49\x64\x6c\x65\x57\x6f\x72\x6b\x65\x72"]();j0=fX("0xb7");break;case j1["\x68\x65\x63\x6c\x69"]:if(T&&bw[j1[fX("0xcd")]+jV]){j0=j1["\x65\x65\x61\x65\x64"];break}j0=fX("0xae");break;case fX("0xc8"):this[fX("0xaf")+jV]=JSON[fX("0xce")](bw[j1["\x68\x6d\x64\x6d\x6d"](j1[fX("0xc7")],jV)]);j0=j1[fX("0xc9")];break;case j1[fX("0xcf")]:if(this[j1[fX("0xd0")](j1[fX("0xd1")],jV)]){j0="\x61\x6d\x65";break}j0=fX("0xba");break;case fX("0xd2"):var jW=jV;j0=fX("0xd3");break;case j1[fX("0xd4")]:jX[fX("0xd5")]=j4;j0=j1[fX("0xd6")];break;case fX("0x38"):if(!jX[fX("0x94")]){j0=fX("0xaa");break}j0=fX("0xb2");break;case"\x65\x65\x63":jX[fX("0x6b")]=j3;j0=j1[fX("0xd7")];break;case"\x65\x64\x61":jX["\x69\x73\x53\x65\x6e\x64\x46\x53"]=!![];j0=j1[fX("0xd8")];break;case fX("0xba"):jZ[fX("0xbd")]=this[j1[fX("0xd9")](j1[fX("0xda")],jW)];j0=j1[fX("0xdb")];break;case fX("0xc5"):var jV=this[fX("0x7a")][fX("0xdc")]();j0=fX("0xdd");break;case fX("0xdd"):var T=!!j1[fX("0xde")](jV[fX("0xdf")](fX("0xe0")),0);j0=fX("0xd2");break;case fX("0xbb"):jZ[fX("0xe1")]=this[fX("0x4a")];j0=fX("0xe2");break;case fX("0xb2"):jX[fX("0xe3")](jZ);j0=j1[fX("0xc4")];break;case j1[fX("0xe4")]:if(!this[fX("0xe5")]){j0=fX("0xe6");break}j0=fX("0xac");break;case j1["\x65\x68\x65\x6c\x6c"]:jX[fX("0x6a")]=j2;j0=fX("0xb0");break;case"\x68\x65\x61":if(T){j0=fX("0xca");break}j0=fX("0x38");break;case j1[fX("0xe7")]:var i=this[fX("0x7a")][fX("0xe8")][fX("0xe9")];j0=j1[fX("0xea")];break;case fX("0xc0"):jZ[fX("0xeb")]=jV;j0="\x65\x64\x61";break;case fX("0xab"):if(!this[j1[fX("0xda")]+jW]){j0=j1[fX("0xec")];break}j0=j1["\x69\x78\x68\x68\x61"];break;case j1[fX("0xed")]:jZ[fX("0xee")]=this[j1[fX("0xd9")](j1[fX("0xd1")],jV)];j0=j1[fX("0xef")];break;case fX("0xbe"):this[fX("0x5a")][fX("0x67")](jY);j0=fX("0xa8");break;case"\x65\x68\x69":if(T&&this[fX("0x4a")]){j0=j1[fX("0xf0")];break}j0="\x6c\x65\x68";break;case j1["\x63\x6c\x63\x63\x61"]:var e=i?this["\x6d\x61\x70"][fX("0xe8")]["\x70\x6f\x69\x54\x65\x78\x74"]:![];j0=j1["\x78\x6c\x61\x64\x61"];break;case fX("0xb8"):this[j1[fX("0xf1")](fX("0xb3"),jW)]=JSON[fX("0xce")](bw[j1[fX("0xf2")]+jW]);j0=j1["\x69\x78\x68\x68\x61"];break;case fX("0xbf"):var jY={"\x75\x72\x6c":j5,"\x74\x69\x6c\x65\x49\x6e\x66\x6f":j4,"\x74\x69\x6c\x65\x4b\x65\x79":j3,"\x63\x62\x6b":j2};j0=j1["\x6c\x64\x78\x61\x6c"];break;case j1[fX("0xf3")]:this[fX("0xe5")]=JSON[fX("0xce")](bw[fX("0xf4")]);j0=j1[fX("0xf5")];break;case fX("0xbc"):j0=jX?fX("0xb6"):j1[fX("0xf6")];break;case fX("0xe2"):jZ[fX("0xf7")]={"\x77\x6f\x72\x64\x53\x70\x61\x63\x65\x52\x61\x74\x69\x6f":this[fX("0x89")],"\x74\x65\x78\x74\x53\x69\x7a\x65\x52\x61\x74\x69\x6f":this[fX("0x77")]};j0=j1["\x64\x63\x63\x61\x61"];break;case fX("0xb4"):jZ[fX("0xf4")]=this[fX("0xe5")];j0="\x65\x68\x69";break;case fX("0xf8"):if(!this[fX("0x4a")]){j0=j1[fX("0xf9")];break}j0=fX("0xae");break;case fX("0xc1"):this[fX("0x4a")]=JSON[fX("0xce")](bw[j1[fX("0xf1")](j1[fX("0xcd")],jV)]);j0=j1[fX("0xcf")];break}}}};eP["\x65\x78\x74\x65\x6e\x64"](jg[fX("0xfa")],gT);function iC(i){this.tileLayers=[];this.map=i;var e=this.config=ec[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}bw.register(function(i){if(i._renderType!=="webgl"){return}var e=i.tileMgr=new iC(i);i.addEventListener("addtilelayer",function(jV){e.addWebGLLayer(jV.target)});i.addEventListener("removetilelayer",function(jV){e.removeWebGLLayer(jV.target)});i.on("update",function T(jW){if(i.getFeatureStyleTags().length===0||!i.customLoaded){return}var jV=false;if(jW.changedStatus&&jW.changedStatus.onzoom_changed){jV=true}e.loadLayersData({zoomChanged:jV})});i.on("style_changed",function(){e.loadLayersData()});i.on("destroy",function(){for(var jV=0;jV1){for(var e=1;e0&&this.map.customLoaded){this.loadLayersData()}else{var jV=this;this.map.loadMapStyleFiles(function(){jV.loadLayersData()})}},removeWebGLLayer:function(jX){var jY=false;for(var jW=0,jV=this.tileLayers.length;jW0){this.loadLayersData()}if(this.tileLayers.length===1){this.map.setDisplayOptions({isFlat:false})}else{var e=false;for(var jW=1;jW50);if(!e){if(!this.syncLoadTimer){this.syncLoadTimer=setTimeout(function(){jV._loadLayersFromCache(T);jV.syncLoadTimer=null},40)}}else{this._loadLayersFromCache(T)}if(!jV.map.viewAnimationTime){this.timer&&window.clearTimeout(this.timer)}this.timer=window.setTimeout(function(){if(!jV.map){return}if(jV.map.viewAnimationTime){if(new Date().getTime()-jV.map.viewAnimationTime<1000){return}jV.map.viewAnimationTime=new Date().getTime()}var jX=jV.tileLayers.length;jV.tilesInfoCache={};for(var jZ=0;jZ0});var T=j0.length;this.tilesInfoCache={};for(var jW=0;jWeS._mc180X){var j6=eS.getSpaceDistanceInPixel(jY);kp=Math.ceil(j6/jX)}if(kh.sw.lng19505879.362428114||kh.sw.lat<-15949096.637571886){kh.ne.lat=19505879.362428114;kh.sw.lat=-15949096.637571886}var j2=[Math.floor(kh.sw.lng/kc)-jV,Math.floor(kh.sw.lat/kc)];var kC=[Math.floor(kh.ne.lng/kc)+kp,Math.floor(kh.ne.lat/kc)];kb=j2[0];ks=kC[0]+1;ki=j2[1];kw=kC[1]+1;var j7=[];for(var j4=kb;j4=0?j4-jZ:j4+jZ;var ke="id_"+kd+"_"+j9+"_"+jY;if(!j7[ke]){var j5={col:kd,row:j9,zoom:jY,useZoom:ku,loopOffsetX:0,tileSize:kj,baseTileSize:jX,mercatorSize:kc,combine:false};j7.push(j5);j7[ke]=true}}}if(this.map._tilt>0){for(var kA=0;kA0&&ka.x0&&ka.ykn.lng&&ko.minYkn.lat){continue}if(!this.ifTileInMapBounds(ko,kh,kv,kD)){j7.splice(kA,1);kA--}}}j7.sort((function(i){return function(T,kF){return((0.4*Math.abs(T.col-i[0])+0.6*Math.abs(T.row-i[1]))-(0.4*Math.abs(kF.col-i[0])+0.6*Math.abs(kF.row-i[1])))}})([kg,j0]));j7.zoom=jY;j7.tileTypeName=kE;return j7},calcXYZTilesInfo:function(j6,jZ,j5,ka,jY,kd){var j1=kd.width;var kb=kd.height;var j0=Math.floor(j5);var j2=null;if(jY.transform.target==="EPSG3857"){var jV=du.transformBDmcPoint(j6,jY.transform);var jW=du.getRangeExtent(jV,j1,kb,j0,jY.transform);j2=[jW.minX,jW.minY,jW.maxX,jW.maxY]}else{if(jY.transform.source==="BD09MC"){var jV=[j6.lng,j6.lat];j2=[jZ.sw.lng,jZ.sw.lat,jZ.ne.lng,jZ.ne.lat]}else{var jV=du.transformBDmcPoint(j6,jY.transform);var jX=du.transformBDmcPoint(jZ.ne,jY.transform);var j4=du.transformBDmcPoint(jZ.sw,jY.transform);j2=du.getLoopBox(jV,[j4[0],j4[1],jX[0],jX[1]])}}if(!jV||!j2){return[]}j0=j0+jY.spanLevel;var T=du.getTileRangeForExtentFactory(j2,j0,jY.transform);var e=[];var ke=du.getResolutionScale(j0,jY.transform);for(var j9=T.minX;j9<=T.maxX;j9++){for(var j7=T.minY;j7<=T.maxY;j7++){var j8={col:j9,row:j7,zoom:j0,useZoom:j0,tileTypeName:ka,loopOffsetX:0,tileSize:256*ke,transform:jY.transform,combine:false,dataIndex:0};e.push(j8);var j3="id_"+j9+"_"+j7+"_"+j0;e[j3]=true}}var kc=du.getTileCoordForCoordAndZ(jV,j0);e.sort((function(i){return function(kf,kg){return((0.4*Math.abs(kf.col-i[0])+0.6*Math.abs(kf.row-i[1]))-(0.4*Math.abs(kg.col-i[0])+0.6*Math.abs(kg.row-i[1])))}})([kc[1],kc[2]]));e.zoom=j0;e.tileTypeName=ka;return e},getCurrentViewTilesInfo:function(T,jV){var i=this._getTilesInfoKey(T,jV);var e=this.tilesInfoCache[i];if(!e){return this.calcTilesInfo(T,jV)}return e},ifTileInMapBounds:function(e,jX,T,jW){var i=jX.normalizedBottomLeft;var j8=jX.normalizedTopRight;var j0=jX.normalizedTopLeft;var jY=jX.normalizedBottomRight;var jV=false;var j7=new cu(e.minX,e.minY);var j4=new cu(e.maxX,e.maxY);var jZ=new cu(j4.lng,j7.lat);var j5=new cu(j7.lng,j4.lat);var j2=[j5,j4,jZ,j7];for(var j6=0,j1=j2.length;j60){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState}});function il(e){this.map=e;this.gl=null;this.layers=[];this.mouseEventThrottle=this.throttle(this.pick,400).bind(this);this.base=new cu(12069475.280738307,3929271.1724863998)}bw.register(function(i){if(i._renderType!=="webgl"){return}var e=i._normalLayerMgr=new il(i);i.toFormatCoords=function(jX){var jY=[];for(var jW=0;jW0})},_layerMouseEvent:function(i){this.mouseEventThrottle(i,"onmousemove")},_layerClickEvent:function(i){this.pick(i,"onclick")},_layerDBLClickEvent:function(i){this.pick(i,"ondblclick")},throttle:function(T,e){var jV=null;var i=Date.now();return function(){var jZ=Date.now();var jY=e-(jZ-i);var jX=this;var jW=arguments;if(jV){clearTimeout(jV)}if(jY<=0){T.apply(jX,jW);i=Date.now()}else{jV=setTimeout(function(){T.apply(jX,jW)},jY)}}},pick:function(j1,jZ){if(!this.layers.length){return false}var jV=false;var jW=false;var T=false;for(var jY=0;jY80*kt){ko=km=ks[0];kn=kl=ks[1];for(var kr=kt;krkm){km=kA}if(ky>kl){kl=ky}}kB=Math.max(km-ko,kl-kn)}T(kw,kp,kt,ko,kn,kB,null,ku);return kp}function kg(kp,kr,kl,kq,km){var kn;var ko;if(km===(kk(kp,kr,kl,kq)>0)){for(kn=kr;kn=kr;kn-=kq){ko=jY(kn,kp[kn],kp[kn+1],ko)}}if(ko&&j4(ko,ko.next)){kc(ko);ko=ko.next}return ko}function j8(ko,kl){if(!ko){return ko}if(!kl){kl=ko}var kn=ko;var km;do{km=false;if(!kn.steiner&&(j4(kn,kn.next)||ke(kn.prev,kn,kn.next)===0)){kc(kn);kn=kl=kn.prev;if(kn===kn.next){return null}km=true}else{kn=kn.next}}while(km||kn!==kl);return kl}function T(km,ko,kr,kp,kl,kv,ku,ks){if(!km){return}if(!ku&&kv){j3(km,kp,kl,kv)}var kt=km;var kn;var kq;while(km.prev!==km.next){kn=km.prev;kq=km.next;if(kv?kj(km,kp,kl,kv):kb(km)){ko.push(kn.i/kr+ks);ko.push(km.i/kr+ks);ko.push(kq.i/kr+ks);kc(km);km=kq.next;kt=kq.next;continue}km=kq;if(km===kt){if(!ku){T(j8(km),ko,kr,kp,kl,kv,1,ks)}else{if(ku===1){km=j7(km,ko,kr,ks);T(km,ko,kr,kp,kl,kv,2,ks)}else{if(ku===2){j6(km,ko,kr,kp,kl,kv,ks)}}}break}}}function kb(kn){var km=kn.prev;var kl=kn;var kp=kn.next;if(ke(km,kl,kp)>=0){return false}var ko=kn.next.next;while(ko!==kn.prev){if(j5(km.x,km.y,kl.x,kl.y,kp.x,kp.y,ko.x,ko.y)&&ke(ko.prev,ko,ko.next)>=0){return false}ko=ko.next}return true}function kj(kq,kr,kp,kx){var ku=kq.prev;var kt=kq;var ks=kq.next;if(ke(ku,kt,ks)>=0){return false}var ky=ku.xkt.x?(ku.x>ks.x?ku.x:ks.x):(kt.x>ks.x?kt.x:ks.x);var kn=ku.y>kt.y?(ku.y>ks.y?ku.y:ks.y):(kt.y>ks.y?kt.y:ks.y);var km=e(ky,kv,kr,kp,kx);var kw=e(ko,kn,kr,kp,kx);var kl=kq.nextZ;while(kl&&kl.z<=kw){if(kl!==kq.prev&&kl!==kq.next&&j5(ku.x,ku.y,kt.x,kt.y,ks.x,ks.y,kl.x,kl.y)&&ke(kl.prev,kl,kl.next)>=0){return false}kl=kl.nextZ}kl=kq.prevZ;while(kl&&kl.z>=km){if(kl!==kq.prev&&kl!==kq.next&&j5(ku.x,ku.y,kt.x,kt.y,ks.x,ks.y,kl.x,kl.y)&&ke(kl.prev,kl,kl.next)>=0){return false}kl=kl.prevZ}return true}function j7(kr,kn,kq,kp){var ko=kr;do{var km=ko.prev;var kl=ko.next.next;if(!j4(km,kl)&&i(km,ko,ko.next,kl)&&kf(km,kl)&&kf(kl,km)){kn.push(km.i/kq+kp);kn.push(ko.i/kq+kp);kn.push(kl.i/kq+kp);kc(ko);kc(ko.next);ko=kr=kl}ko=ko.next}while(ko!==kr);return ko}function j6(kl,kn,kp,ko,km,ku,kq){var kt=kl;do{var ks=kt.next.next;while(ks!==kt.prev){if(kt.i!==ks.i&&kd(kt,ks)){var kr=j2(kt,ks);kt=j8(kt,kt.next);kr=j8(kr,kr.next);T(kt,kn,kp,ko,km,ku,null,kq);T(kr,kn,kp,ko,km,ku,null,kq);return}ks=ks.next}kt=kt.next}while(kt!==kl)}function ka(kn,ku,kq,kp){var kr=[];var ko;var ks;var kl;var km;var kt;for(ko=0,ks=ku.length;ko=km.next.y){var ku=km.x+(kq-km.y)*(km.next.x-km.x)/(km.next.y-km.y);if(ku<=kr&&ku>ko){ko=ku;if(ku===kr){if(kq===km.y){return km}if(kq===km.next.y){return km.next}}kn=km.x=km.x&&km.x>=kx&&j5(kqkn.x))&&kf(km,kl)){kn=km;kw=ks}}km=km.next}return kn}function j3(kp,kl,ko,km){var kn=kp;do{if(kn.z===null){kn.z=e(kn.x,kn.y,kl,ko,km)}kn.prevZ=kn.prev;kn.nextZ=kn.next;kn=kn.next}while(kn!==kp);kn.prevZ.nextZ=null;kn.prevZ=null;jW(kn)}function jW(kr){var ko;var kn;var km;var kq;var ks;var kl;var kt;var kp;var ku=1;do{kn=kr;kr=null;ks=null;kl=0;while(kn){kl++;km=kn;kt=0;for(ko=0;ko0||(kp>0&&km)){if(kt===0){kq=km;km=km.nextZ;kp--}else{if(kp===0||!km){kq=kn;kn=kn.nextZ;kt--}else{if(kn.z<=km.z){kq=kn;kn=kn.nextZ;kt--}else{kq=km;km=km.nextZ;kp--}}}if(ks){ks.nextZ=kq}else{kr=kq}kq.prevZ=ks;ks=kq}kn=km}ks.nextZ=null;ku*=2}while(kl>1);return kr}function e(km,kp,kl,ko,kn){km=32767*(km-kl)/kn;kp=32767*(kp-ko)/kn;km=(km|(km<<8))&16711935;km=(km|(km<<4))&252645135;km=(km|(km<<2))&858993459;km=(km|(km<<1))&1431655765;kp=(kp|(kp<<8))&16711935;kp=(kp|(kp<<4))&252645135;kp=(kp|(kp<<2))&858993459;kp=(kp|(kp<<1))&1431655765;return km|(kp<<1)}function jZ(kn){var km=kn;var kl=kn;do{if(km.x=0&&(kp-kn)*(kq-km)-(kr-kn)*(ko-km)>=0&&(kr-kn)*(ks-km)-(kl-kn)*(kq-km)>=0}function kd(km,kl){return km.next.i!==kl.i&&km.prev.i!==kl.i&&!j9(km,kl)&&kf(km,kl)&&kf(kl,km)&&jV(km,kl)}function ke(kn,km,kl){return(km.y-kn.y)*(kl.x-km.x)-(km.x-kn.x)*(kl.y-km.y)}function j4(km,kl){return km.x===kl.x&&km.y===kl.y}function i(kn,kl,km,ko){if((j4(kn,kl)&&j4(km,ko))||(j4(kn,ko)&&j4(km,kl))){return true}return ke(kn,kl,km)>0!==ke(kn,kl,ko)>0&&ke(km,ko,kn)>0!==ke(km,ko,kl)>0}function j9(km,kl){var kn=km;do{if(kn.i!==km.i&&kn.next.i!==km.i&&kn.i!==kl.i&&kn.next.i!==kl.i&&i(kn,kn.next,km,kl)){return true}kn=kn.next}while(kn!==km);return false}function kf(km,kl){return ke(km.prev,km,km.next)<0?ke(km,kl,km.next)>=0&&ke(km,km.prev,kl)>=0:ke(km,kl,km.prev)<0||ke(km,km.next,kl)<0}function jV(kn,km){var kq=kn;var kl=false;var kp=(kn.x+km.x)/2;var ko=(kn.y+km.y)/2;do{if(((kq.y>ko)!==(kq.next.y>ko))&&(kp<(kq.next.x-kq.x)*(ko-kq.y)/(kq.next.y-kq.y)+kq.x)){kl=!kl}kq=kq.next}while(kq!==kn);return kl}function j2(kn,km){var kl=new ki(kn.i,kn.x,kn.y);var ko=new ki(km.i,km.x,km.y);var kq=kn.next;var kp=km.prev;kn.next=km;km.prev=kn;kl.next=kq;kq.prev=kl;ko.next=kl;kl.prev=ko;kp.next=ko;ko.prev=kp;return ko}function jY(km,kl,kp,kn){var ko=new ki(km,kl,kp);if(!kn){ko.prev=ko;ko.next=ko}else{ko.next=kn.next;ko.prev=kn;kn.next.prev=ko;kn.next=ko}return ko}function kc(kl){kl.next.prev=kl.prev;kl.prev.next=kl.next;if(kl.prevZ){kl.prevZ.nextZ=kl.nextZ}if(kl.nextZ){kl.nextZ.prevZ=kl.prevZ}}function ki(km,kl,kn){this.i=km;this.x=kl;this.y=kn;this.prev=null;this.next=null;this.z=null;this.prevZ=null;this.nextZ=null;this.steiner=false}j1.deviation=function(kq,kv,ks,kn){var kt=kv&&kv.length;var kp=kt?kv[0]*ks:kq.length;var km=Math.abs(kk(kq,0,kp,ks));if(kt){for(var kr=0,ku=kv.length;kr0){kn+=kp[ko-1].length;kl.holes.push(kn)}}return kl};return j1})();function cz(i,e){this.id=fS();this.workerPool=i;this.actors=[];this.currentActorIndex=0;this.ready=false;this.init(e)}cz.prototype.init=function(jX){const e=this.workerPool.acquire(this.id);for(var jV=0;jV"){this.setBusy(false);const jY=this.callbacks[jZ];delete this.callbacks[jZ];if(jY){if(jW.error){jY(hW(jW.error))}else{jY(null,hW(jW.data))}}}else{var T=this;const i=[];const e=jW.hasCallback?function(j0,j1){T.target.postMessage({id:jZ,action:"",sourceMapId:T.mapId,error:j0?jc(j0):null,data:jc(j1,i)},i)}:function(j0){};const jX=hW(jW.data);if(this.parent[jW.action]){this.parent[jW.action](jW.sourceMapId,jX,e)}}};jb.prototype.send=function(i,T,jY,jV,jW,jZ){if(i==="release"){this.releasePendingData(T,jY);return}if(this.busy){this.taskQueue.push({action:i,data:T,callback:jY,targetMapId:jV,mustQueue:jW,callbackMetadata:jZ});return}this.setBusy(true);var jX=Math.round((Math.random()*1000000000000000000)).toString(36).substring(0,10);const e=this.mapId+"_"+i+"_"+jX;if(jY){jY.metadata=jZ;this.callbacks[e]=jY}const j0=[];this.target.postMessage({id:e,action:i,hasCallback:!!jY,targetMapId:jV,mustQueue:jW,sourceMapId:this.mapId,data:jc(T,j0)},j0);return{cancel:function(){if(jY){delete this.callbacks[e]}this.target.postMessage({id:e,action:"",targetMapId:jV,sourceMapId:this.mapId})}}};jb.prototype.stop=function(){this.taskQueue.length=0;this.busy=false;this.callbacks={}};jb.prototype.remove=function(){this.taskQueue.length=0;this.busy=false;this.target.removeEventListener("message",this.receive,false)};jb.prototype.releasePendingData=function(e,jY){var T=[];var jW=this.taskQueue;for(var jV=jW.length-1;jV>=0;jV--){var jX=jW[jV]["data"];if(!jX||!jX.layerId){break}if(jX.layerId!==e.layerId){continue}if(!e["id_"+jX.x+"_"+jX.y+"_"+jX.z]){jW.splice(jV,1);T.push(jX)}}jY(null,T)};var jL;function g8(){if(!jL){jL=new he()}return jL}function he(){this.active={}}he.prototype.acquire=function(i){if(!this.workers){this.workers=[];var T=(window.location.protocol === "http:" ? "http:" : "https:") + "//web.archive.org/web/20230404102250/https://api.map.baidu.com/res/webgl/10/worker_mvt_wx1hqj.js";while(this.workers.length=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)}}})};c1.prototype._checkIndoorByMove=function(){var T=this._map;var j1=T.getSize();var j6={x:j1.width/2,y:j1.height/2};var j5=Math.max(j1.width,j1.height);var j7=[];for(var j2 in this._indoorData){var e=this._indoorData[j2].center;var jV=T.pointToPixelIn(new bw.Point(e[0],e[1]));var jY=cf(j6,jV);j7.push({uid:j2,distance:jY})}if(j7.length===0){return}j7.sort(function(j8,i){return j8.distance-i.distance});var jX=j7[0];var j3=T.getCenterIn();var jW=false;for(var j0=0;j0jZ[0]&&j3.lat>jZ[1]&&j3.lng=this._autoEnterZoom){this._checkIndoorByMove()}};c1.prototype.removeData=function(T,jW){if(!this._indoorData[T]){return}var jV=this._indoorData[T];for(var e=0;e>>0;var j8=(ka)&255;var j7=(ka>>8)&255;var j5=(ka>>16)&255;var j6=(ka>>24)&255;j0[j9]=[j8,j7,j5,j6];return j0[j9]}return{getStyleFromCache:function(kc,j7,ka,kb,j6,j9,j5){kc=kc||"default";var j8=kc+"-"+j7+"-"+ka+"-"+kb;if(j9){j8+="-indoor"}if(j6){if(!j4[j8]){j4[j8]=j1(j7,ka,kb,j6)}return j4[j8]}if(!jV[j8]){jV[j8]=j1(j7,ka,kb,j6,j5)}return jV[j8]}}})();bw.register(function(i){var e=new hV(i)});function hV(e){e.container.appendChild(this.render());this.bind(e)}hV.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};hV.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";eP.ac(e._ripple,"ripple-playing")});i.addEventListener("hotclick",function(T){if(!T||!T.pixel||!(T.pixel instanceof fa)){return}e._div.style.left=T.pixel.x+"px";e._div.style.top=T.pixel.y+"px";eP.ac(e._ripple,"ripple-playing")});eP.on(e._ripple,"transitionend",function(){eP.rc(e._ripple,"ripple-playing")})};function bT(e){c2.call(this);if(!e){return}this._opts={};this._map=e;this._maxLat=84.6;this._minLat=-80.6;this._maxLatMC=iU.convertLL2MC(new co(this._maxLat,0)).lat;this._minLatMC=iU.convertLL2MC(new co(this._minLat,0)).lat}bT.inherits(c2,"ToolbarItem");eP.extend(bT.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,">")}});function cc(T,i){bT.call(this,T);i=i||{};this._opts=eP.extend(eP.extend(this._opts||{},{autoClear:false,tips:"测距",followText:"单击确定起点,双击结束绘制",unit:"metric",showResult:true,lineColor:"blue",lineStroke:2,opacity:1,lineStyle:"solid",cursor:B.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=B.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;gQ.load("tools",function(){e._draw()})}cc.inherits(bT,"PolylineTItem");eP.extend(cc.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;Tj1){jV-=jX;jZ-=this._loopOffset}while(jVthis._mc180X){e-=this._mcTSpan}while(ethis._mc180X){i.lng-=this._mcTSpan;e-=this._mcTSpan;jW-=this._mcTSpan}while(i.lng=j2){var j1=jV+j4;if(this.isTileBlank(j1,e,j7)===true){continue}var T="id_"+j1+"_"+j8+"_"+e;if(!j3[T]){j3[T]=true;j5.push([j1,j8,e,0])}}else{if(jV<=jY){var j1=jV-j4;if(this.isTileBlank(j1,e,j7)===true){continue}var T="id_"+j1+"_"+j8+"_"+e;if(!j3[T]){j3[T]=true;j5.push([j1,j8,e,0])}}}}for(var jZ=0,jX=j5.length;jZ=0;jZ--){var jV=j3[jZ][0];if(this.isTileBlank(jV,e,j7)){j3.splice(jZ,1)}}return j3},isTileBlank:function(T,jW,e){var jX=Math.pow(2,jW-3);var i=Math.round(this._validPixels*jX);var jV=6*jX*256/e;while(T>jV/2-1){T-=jV}while(T<-(jV/2)){T+=jV}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 ethis._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 eS=new bB();function eh(){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}eh.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}};eh.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};eh.prototype.getType=function(){return this._type};eh.prototype.getGeometry=function(){return this._geometry};eh.prototype.getId=function(){return this._id};eh.prototype.getProperties=function(){return this._properties};eh.prototype.getBox=function(){return this._box};eh.prototype.getState=function(){if(Object.keys(this._state).length>0){return this._state}else{return null}};eh.prototype.getStyle=function(){return this._style};eh.prototype.getStyleFunction=function(){return this._styleFunction};eh.prototype.setType=function(e){return this._type=e};eh.prototype.setGeometry=function(e){this._geometry=e};eh.prototype.setStyle=function(e){if(!e||Object.keys(e).length===0){return}for(var i in e){this.set(i,e[i],this._style)}};eh.prototype.setState=function(e){for(var i in e){this.set(i,e[i],this._state)}};eh.prototype.setId=function(e){this._id=e};eh.prototype.setProperties=function(e){for(var i in e){this.set(i,e[i],this._properties)}};eh.prototype.setBox=function(e){return this._box=e};eh.prototype.isPointInBox=function(e){return this._pointInBox(e,this._box)};eh.prototype.getPointGeoJSON=function(jV){var j4=this.renderData;if(j4){var jY=j4.active;if(!j4[jY]||!j4[jY]["poi"]){return null}var j3=[];var j0=j4[jY]["poi"];for(var j1=0;j10){j2="MultiPolygon"}return{type:"Feature",properties:{},geometry:{type:j2,coordinates:[j3]}}}}};eh.prototype._pointInBox=function(e,i){if(i[0]>e[0]||i[1]>e[1]||i[2]jX[jY].bds[0])&&(T.y-jW.yjX[jY].bds[1])){if(e.getTilt()>55){var jZ=e.pointToOverlayPixelIn(jX[jY].pt);if(jZ.outOfFrustum){continue}}j1=true;break}}}}return j1};eh.prototype._pixelPnpoly=function(jW,jY){var e=jY.length;var T=0;var jX=false;for(var jV=0;jV=jY[jV].lat)&&(jW.lat=jY[T].lat)&&(jW.lat1){for(var j6=1;j6j7){j2=Math.sqrt(Math.min(jW,ka))}if((T==null)||(T>j2)){jV=Math.sqrt(ka-jX)/Math.sqrt(j7);j4=Math.sqrt(jW-jX)/Math.sqrt(j7);T=j2;j3=j6}T=Math.min(T,j2)}}return{dist:T}};eh.prototype.isPointInGeometry=function(T,j0){var e=false;switch(this._type){case fF.POINT:e=this._pixelPnpoint(T,this.renderData,j0);break;case fF.LINE_STRING:var jW=this._getProximity({lng:T[0],lat:T[1]},this._geometry);var jZ=this.renderData[this.renderData.active];if(!jZ||!jZ.line||!jZ.line[0]||!jZ.line[0].width){var jY=2}else{var jY=this.renderData[this.renderData.active]["line"][0].width;if(this.grid===d0.GridModel.GOOGLEWEB){jY=Math.max(jY/2*du.gridScaleFromBDMCTo3857,2)}else{jY=Math.max(jY/2,2)}}if(jW.distj9[0]){j8[0]=j9[0]}if(j8[1]>j9[1]){j8[1]=j9[1]}if(j8[2]=0){continue}const j1=j0[j2];jX[j2]=jc(j1,jY)}if(j0 instanceof Error){jX.message=j0.message}}if(e!=="Object"){jX["_$name"]=e}return jX}else{if(j0 instanceof Function){return null}}throw new Error("不能被序列化")}function hW(jX){if(jX===null||jX===undefined||typeof jX==="boolean"||typeof jX==="number"||typeof jX==="string"||jX instanceof Boolean||jX instanceof Number||jX instanceof String||jX instanceof Date||jX instanceof RegExp||fx(jX)||f8(jX)||ArrayBuffer.isView(jX)||jX instanceof ImageData){return jX}if(Array.isArray(jX)){var e=jX["_$name"];if(e){var jV=iO[e]["_class"];if(!jV){throw new Error("不能被反序列化")}if(jV.deserialize){return jV.deserialize(jX)}}const jW=[];for(var T=0;T=jW.minZoom&&jW.map.getZoom()<=jW.maxZoom){if(!jW._onMap){jW.addDataToMap();jW._onMap=true}}else{if(jW._onMap){jW.removeDataFromMap();jW._onMap=false}}};this.map.on("zoomend",this._onZoomEvent);var jW=this;var e=false;var jV={x:0,y:0};this._layerMouseEvent=function(j1){if(!jW.map||!jW._listeners||!jW.visible||!jW._onMap){return}if(!jW._listeners.onmousemove||Object.keys(jW._listeners.onmousemove).length===0){return}var j0=jW.pickOverlays(j1);var i;if(j0&&j0.length>0){i=new fA("onmousemove");i.features=j0;jW.map.platform.style.cursor=jW.map.config.overlayMoveCursor;e=true}else{if(!e||!jW._listeners.onmouseout||Object.keys(jW._listeners.onmouseout).length===0){return}jW.map.platform.style.cursor=jW.map.config.defaultCursor;i=new fA("onmouseout");i.features=null;e=false}if(i){i.point=j1.point;i.pixel=j1.pixel;i.latLng=j1.latlng;jW.dispatchEvent(i)}};this._layerClickEvent=function(j2){if(!jW.map||!jW._listeners||!jW.visible){return}if((!jW._listeners.onclick&&!jW._listeners.dblclick)||(Object.keys(jW._listeners.onclick).length===0&&Object.keys(jW._listeners.dblclick).length===0)){return}var j0={x:j2.clientX,y:j2.clientY};if(Math.abs(j0.x-jV.x)>jW.clickDistrict||Math.abs(j0.y-jV.y)>jW.clickDistrict){return}var j1=jW.pickOverlays(j2);var i=new fA(j2.type);i.point=j2.point;i.pixel=j2.pixel;i.latLng=j2.latlng;i.features=j1;jW.dispatchEvent(i)};this._layerMouseDownEvent=function(i){jV={x:i.clientX,y:i.clientY}};jY.addEventListener("onmousemove",this._layerMouseEvent);jY.addEventListener("onmouseout",this._layerMouseEvent);jY.addEventListener("onmousedown",this._layerMouseDownEvent);var jX=["onclick"];for(var T=0;T0){this.clearData()}this.dataSource=e;this.overlayData=this.gParse.readFeaturesFromObject(e,{markerStyle:this.markerStyle,polylineStyle:this.polylineStyle,polygonStyle:this.polygonStyle},this._register.bind(this))};aM.prototype._register=function(e){e.layerName=this.layerName;e.setZIndex(this.level)};aM.prototype.resetStyle=function(){for(var e=0;e=0){this.overlayData.splice(e,1);this.map.removeOverlay(i)}}};aM.prototype.findItemIndex=function(T){var i=-1;for(var e=0;e=this.minZoom&&this.map.getZoom()<=this.maxZoom){for(var e=0;e0){for(var e=0;e0){this.removeDataFromMap()}this.overlayData=[]};aM.prototype.pickOverlays=function(jZ){var jY=[];if(!this.visible||!this._onMap){return null}for(var jW=0;jW=0&&T0?jY:null};aM.prototype.setLevel=function(e){if(e>-999&&e<9999){this.level=e;for(var T=0;T(j2+j3)){j7.tileCache.clear();return null}if(jX.source!=="BD09MC"){j9.x=du.getTilesLoop(kf,j9.x)}if(j6.length===4){var ke=du.getTileRangeExtent([kf,j9.x,j9.y]);var kc=e([ke.minX,ke.minY,ke.maxX,ke.maxY]);if(!kc){return null}}var ka="";if(jV){ka=jV;var kb=/[^\{}]*\{(.*)\}[^\}]*/;ka.match(kb);var j8=[];if(RegExp.$1){j8=RegExp.$1.split(",")}ka=ka.replace(/\{(.*)\}/,j8[(j9.x+j9.y)%j8.length]);ka=ka.replace(/\[x\]/gi,j1(j9.x,j9.y,kf));ka=ka.replace(/\[y\]/gi,j5(j9.x,j9.y,kf));ka=ka.replace(/\[z\]/gi,jZ(j9.x,j9.y,kf));ka=ka.replace(/\[b\]/gi,j4(j9.x,j9.y,kf));ka=ka.replace(/\[w\]/gi,jW(j9.x,j9.y,kf));ka=ka.replace(/\[h\]/gi,j0(j9.x,j9.y,kf))}else{return null}return ka};function e(j8){if(j6&&j6 instanceof Array&&j6.length===4){if((j6[0]<=j8[2]&&j6[1]<=j8[3])&&(j6[2]>=j8[0]&&j6[3]>=j8[1])){return true}else{return false}}return true}return j7}function dk(i){this.src=cY();this.tileMaskUvCache=new ay(64,{clearCallback:function(jX){}});var jW=6;if(i.pixelMap){this.opacity=typeof i.pixelMap.opacity==="number"?i.pixelMap.opacity:1;b8(this.opacity,0,1);if(this.opacity<1){i.useThumbData=false}var jV=i.pixelMap||{};this.colors=jV.colors||["#F9F871","#FFC75F","#FF9671","#FF6F91","#D65DB1","#845EC2"];this.positions=jV.positions||[0,0.2,0.4,0.6,0.8,1];this.domain=jV.domain||[0,255];this.clamp=jV.clamp||this.domain;this.noData=(jV.noData!==undefined)?jV.noData:-99999;this.fomularC=jV.fomularC||"float generateValue(vec4 pixel){return pixel.r * 255.;}";this.fomularJS=jV.fomularJS||function(jX){return jX.r};this.maskPng=jV.maskPng||null;if(this.maskPng){this.loadMaskPng(this.maskPng)}this.maskData=jV.maskData||-1;this.maskCoord=jV.maskCoord||null;this.fHashcode=o({str:this.fomularC});var e=this.canPixelMap();if(e){this.isPixelMap=true;this.setPixelMap()}jW=i.pixelMap.cacheSize||jW}var T=new jI(i);T.ontology=this;this.layer=T;this.cacheSize=jW;this.tileCache=new ay(this.cacheSize,{clearCallback:function(jX){}});this.tileImageDataCache=new ay(this.cacheSize,{clearCallback:function(jX){}})}dk.inherits(eP.BaseClass,"PixelLayer");eP.extend(dk.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=ho.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 fA("onupdate");this.layer.map.dispatchEvent(e)}},_getInLayer:function(j3){if(!this.map){return null}var j2=Math.floor(this.map.getZoom());var jV=du.transformBDmcPoint(j3,this.layer.transform);var jZ=du.getTileCoordForXYAndZ_(jV[0],jV[1],j2,false);var T=jZ.join("-");var e=this.tileCache.getData(T);if(e){return e}var jW=this.layer.zIndex;var jY=this.map._featureMgr.result.bkData;var j0=jY[jW][2];var j4=null;for(var jX=0;jX=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 jV=[e];var j0=this.maskBox||[];var jX=j0[1][0]-j0[0][0];var jW=j0[1][1]-j0[0][1];var T=Math.floor((jV[0][0]-j0[0][0])/jX*this.imageMaskObject.width);var i=Math.floor((-jV[0][1]+j0[1][1])/jW*this.imageMaskObject.height);var jZ=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 jY=this.imageMaskObject.data.data;if(jZ+3>jY.length){return false}if(jY[jZ+3]>0){if(this.maskData>-1&&this.maskData!==jY[jZ]){return false}return true}return false},calMaskBox:function(){var T=this.maskCoord||[];if(this.hasMaskPng&&T&&T.length===2){var e=[];for(var jV=0;jV0){e.zIndex=i.index}e.loadTileData=this._loadTile.bind(this);e.ontology=this;this.layer=e},createTileLayer:function(i){const jV=i.tileUrlTemplate||"";const j0=i.xTemplate||function(j7,j9,j8){return j7};const j4=i.yTemplate||function(j7,j9,j8){return j9};const jY=i.zTemplate||function(j7,j9,j8){return j8};const j3=i.bTemplate||function(j7,ka,j9){const j8=iU.tileToBoundRange({col:j7,row:ka,zoom:j9,baseTileSize:256});return j8.MC.sw.lng+","+j8.MC.sw.lat+","+j8.MC.ne.lng+","+j8.MC.ne.lat};var j5=i.extent||[];const jZ=i.extentCRSIsWGS84||false;var T=i.minZoom||0;var j1=i.maxZoom||23;var j2=i.spanLevel||0;var j6=new hi({transparentPng:true,dataType:2,spanLevel:j2,tileTypeName:"web",cacheSize:256,customLayer:true,clipTile:false,boundary:false,useThumbData:i.useThumbData||false});if(j5.length===4){if(jZ){j5=du.fromEPSG4326(j5)}var jW=du.transformPointArr([j5[0],j5[1]],"EPSG3857","BD09MC");var jX=du.transformPointArr([j5[2],j5[3]],"EPSG3857","BD09MC");j5=[jW[0],jW[1],jX[0],jX[1]]}j6.getTilesUrl=function(j8,ke,kd){if(!j8||ke<0||ke<(T+j2)||ke>(j1+j2)){j6.tileCache.clear();return null}if(j5.length===4){const kb=iU.tileToBoundRange({col:x,row:y,zoom:z,baseTileSize:256});var kc=e([kb.MC.getMin().lng,kb.MC.getMin().lat,kb.MC.getMax().lng,kb.MC.getMax().lat]);if(!kc){return null}}var j9="";if(jV){j9=jV;var ka=/[^\{}]*\{(.*)\}[^\}]*/;j9.match(ka);var j7=[];if(RegExp.$1){j7=RegExp.$1.split(",")}j9=j9.replace(/\{(.*)\}/,j7[(j8.x+j8.y)%j7.length]);j9=j9.replace(/\[x\]/gi,j0(j8.x,j8.y,ke));j9=j9.replace(/\[y\]/gi,j4(j8.x,j8.y,ke));j9=j9.replace(/\[z\]/gi,jY(j8.x,j8.y,ke));j9=j9.replace(/\[b\]/gi,j3(j8.x,j8.y,ke))}else{return null}return j9};function e(j7){if(j5&&j5 instanceof Array&&j5.length===4){if((j5[0]<=j7[2]&&j5[1]<=j7[3])&&(j5[2]>=j7[0]&&j5[3]>=j7[1])){return true}else{return false}}return true}return j6},compileExpress:function(i,e){var i=d0.ExpressParse.normalizePropertyExpression(i,e);return i},resolveStyle:function(jX){var jV=jX||{};if(jV.style){var jW={};if(!jV.layers||jV.layers.length===0){var jZ=d0.LayerTypes.POINT;var i=d0.LayerTypes.LINE;var jY=d0.LayerTypes.FILL;if(jV.style[jZ]){jV.style[jZ].type="point"}if(jV.style[i]){jV.style[i].type="polyline"}if(jV.style[jY]){jV.style[jY].type="polygon"}}for(var T in jV.style){if(jV.style.hasOwnProperty(T)){var e=jV.style[T];this._styleFormat(e.type,e.painter,T,jW)}}this.styleExpress=jW}},_styleFormat:function(jW,e,i,jV){var jY={};var jZ=cU[jW];if(!jZ){return}for(var T in e){if(e.hasOwnProperty(T)){var jX=this.compileExpress(e[T],jZ[T]);jY[T]=jX}}jV[i]={type:jW,painter:jY}},evaluateContext:function(e,T,jV){var i=e+"_"+T.getId();var jW=this._stateCube[i];if(jW){T.setState(jW)}else{T._state={}}return{properties:function(){return T&&T.getProperties()},featureState:jV===true?{}:(T&&T.getState())}},evaluates:function(i,jV,jW){if(!this.styleExpress||!this.styleExpress.hasOwnProperty(i)){return null}var jY=this.styleExpress[i].painter;var e={};for(var T in jY){if(jY.hasOwnProperty(T)){var jX=jY[T].evaluate(this.evaluateContext(i,jV,jW));e[T]=jX}}return e},_updateState:function(T,jV,e){if(T instanceof iV&&T.layerName&&T.id){var i=T.layerName+"_"+T.id;if(e){this._set(jV,this._stateCube,i)}else{this._stateCube[i]=jV}this._stateCube[i].rank=(this._stateCube[i].rank||0)+1}else{if(typeof T==="string"){if(e){this._set(jV,this._stateCube,T)}else{this._stateCube[T]=jV}this._stateCube[T].rank=(this._stateCube[T].rank||0)+1}}},updateState:function(jW,jX,e){var T=JSON.stringify(this._stateCube);if(!(jX&&typeof jX==="object"&&Object.keys(jX).length>0)){return}if(!e){this._stateCube={}}if(jW instanceof Array){for(var jV=0;jVthis.maxZoom){j8._featureMgr.clearData(this.layer.drawIndex);j8._featureMgr.clearLabelOverlayData(this.layer.drawIndex);j8._featureMgr.clearLabelData(this.layer.drawIndex);return}var jZ=this.layer.getZoomState();if(T){this.thumbCache={};var j6=-1;this.layer.tileLabels=[];var j2=j8._customLabelMgr.virtualTiles["mvt_"+this.layer.drawIndex];if(j2&&j2.label){this.layer.tileLabels.push(j2.label)}for(var j4=0,j3=jX.length;j4=0.5){ka=true}else{if(j1<0.5&&e>=0.5){ka=true}else{if(j1>=0.5&&e<0.5){ka=true}}}if(ka){this.layer.cacheDataCollideLabels(0)}this.layer.LAST_CALC_ZOOM=jY}else{if(this.layer.tileLabels.length>0){this.layer.cacheDataCollideLabels(eP.Browser.ie?50:30)}}}else{this.layer.cacheDataCollideLabels(0)}return}for(var j4=0,j3=jX.length;j4e){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(jV,jY){var T=this.minZoom;var e=jV.col;var j1=jV.row;var j0=jV.zoom;for(var jZ=1;jZ<=jY;jZ++){var jW=this._getParentTiles(e,j1,j0,T);if(jW===null){continue}jW.tileSize=jV.tileSize;jW.tileTypeName=jV.tileTypeName;jW.transform=jV.transform;var j2=this.layer.getTileKey(jW);var jX=this.layer.tileCache.getData(j2);if(jX&&jX.status==="ready"){jX.key=j2;return jX}e=jW.col;j1=jW.row;j0=jW.zoom}return false},_findChild:function(i,jY){var j0=this.maxZoom;var e=i.col;var j1=i.row;var jZ=i.zoom;var jW=this._getChildTiles(e,j1,jZ,j0,jY);if(!jW){return false}for(var jV=0;jVj2){return null}var j1=Math.pow(2,jY);var e=jV*j1;var j0=j4*j1;var jZ=j3+jY;var j5=[];for(var jW=0;jW0){var j8=j0.layer.callbackDataQueue.shift();j0._setTileData(j8[0],j8[1],j8[2])}var j7=new fA("onupdate");j0.map.dispatchEvent(j7);j0.processDataTimer=null},0)}})},_loadTileData:function(i,e){var jV=i.col;var jZ=i.row;var jW=i.zoom;var T=this.layer.getTilesUrl(new fa(jV,jZ),jW,i);if(!T){return}var jY=this.layer.getTileKey(i);var jX=new XMLHttpRequest();jX.open("GET",T,true);jX.responseType="arraybuffer";jX.timeout=3000;jX.ontimeout=function(){e&&e(null,jY,i)};jX.onreadystatechange=function(j0){if(this.readyState===4){if(this.status===200){e&&e(jX.response,jY,i);return}if(this.status>=400||this.status===0){e&&e(null,jY,i)}else{e&&e(null,jY,i)}}};jX.send()},_tileDataCbk:function(jW,jY,i){var e=this.layer.tileCache.getData(jY);if(!e){return}var jX=this.layer.map;var T=this;if(!jW||typeof jW==="string"){e.status="init";e.reloadTimer=setTimeout(function(){if(e.retry<3){e.retry++;e.status="loading";T._loadTileData(i,function(j0,j1,jZ){T._tileDataCbk(j0,j1,jZ)})}else{e.status="ignore"}},3000);return}if(e.reloadTimer){clearTimeout(e.reloadTimer);e.reloadTimer=null}var jV=(function(jZ){return function(){var j0=i.col;var j3=i.row;var j1=i.zoom;var j2="id_"+j0+"_"+j3+"_"+j1;e.tileInfo=i;e.tileData=T.mvt.readFeatures(jZ,T,jX,{x:j0,y:j3,z:j1,g:T.gridModel,mc:T._opt.transform&&T._opt.transform.source==="BD09MC"?true:false});T._processLabelData(e);T.layer.callbackDataQueue.push([jY,e,j2]);if(T.processDataTimer){return}T.processDataTimer=setTimeout(function(){while(T.layer.callbackDataQueue.length>0){var j4=T.layer.callbackDataQueue.shift();T._setTileData(j4[0],j4[1],j4[2])}T.doOnceDraw();T.processDataTimer=null},200)}})(jW);jX.jobScheduler.addJob(jV)},_setTileData:function(T,e,i){e.status="ready";this.layer.tileCache.setData(T,e);if(this.layer.curViewTilesInfo[i]){e.dataType=hv}},_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 jV=this;jV.layer.updateAllIconsTextureCoords(T);this.layer.labelProcessor.loadIconImages(T,function(jX){jV.layer.updateAllIconsTextureCoords(jX)},true);var jW=this.layer.map.tileMgr.getLabelTextCanvas();jW.drawCustomLabelsOnCanvas(T.label.fixedLabel,function(jX){if(jX){if(!T.label.textureHeights){T.label.textureHeights=[]}T.label.textureHeights[i.useZoom]=jX.height}jV.layer._doWorkAfterLabelImageLoad(T,jX,null,e)})},_getTileTexImgKey:function(i){var e="mvt_"+this.layer.drawIndex+"_"+i.col+"_"+i.row+"_"+i.zoom+"_";e=bw.getGUID(e);return e},_updateBRushCube:function(jY){var j0=jY.tileData;for(var T in j0){if(j0.hasOwnProperty(T)){var e=j0[T];for(var jW=0;jW0){j0=new fA("onmousemove");j0.value=j1;jV.map.platform.style.cursor=jV.map.config.overlayMoveCursor;e=true}else{jV.map.platform.style.cursor=jV.map.config.defaultCursor;if(!e||!jV._listeners.onmouseout||Object.keys(jV._listeners.onmouseout).length===0){return}j0=new fA("onmouseout");e=false}if(j0){j0.point=j2.point;j0.pixel=j2.pixel;j0.latLng=j2.latlng;jV.dispatchEvent(j0)}};this._layerClickEvent=function(j2){if(!jV.map||!jV._listeners){return}if((!jV._listeners.onclick&&!jV._listeners.dblclick)||(Object.keys(jV._listeners.onclick).length===0&&Object.keys(jV._listeners.dblclick).length===0)){return}var j0;var i=j2.point;var j1=jV.pickFeatures(i,j2.pixel);j0=new fA(j2.type);j0.point=i;j0.pixel=j2.pixel;j0.latLng=j2.latlng;j0.value=j1;jV.dispatchEvent(j0)};jY.addEventListener("onmousemove",this._layerMouseEvent);var jX=["onclick","dblclick"];for(var T=0;T0){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"}});d0._generateTexture=function(jY,jX,T){var jW=document.createElement("canvas");var e;var jV;if(jX.strokeStyle==="dashed"){e=16;jV=e*8}else{if(jX.strokeStyle==="dotted"){e=32;jV=e*2}}jW.width=e;jW.height=jV;var i=jW.getContext("2d");i.fillStyle=jX.strokeColor;i.globalAlpha=jX.strokeOpacity;var jZ=jX.strokeWeight*2;if(jX.strokeStyle==="dashed"){jZ=d0._drawDashArrayTexture(i,e,jV,jX)}else{if(jX.strokeStyle==="dotted"){jZ=d0._drawDottedTexture(i,e,jV,jX.strokeWeight)}}if(window.createImageBitmap&&!jX.sync){createImageBitmap(jW,{imageOrientation:"flipY"}).then(function(j0){T(null,{totalDashLen:jZ,texture:j0,textureSize:[e,jV]})})}else{T(null,{totalDashLen:jZ,texture:jW.toDataURL(),textureSize:[e,jV]})}};d0._drawDashArrayTexture=function(j1,jV,jX,T){var jZ=T.dashArray;if(!jZ){j1.fillRect(0,0,jV,jX/2);return T.strokeWeight*4}else{var j0=0;if(jZ.length%2!==0){jZ=jZ.concat(jZ)}for(var jW=0;jW19){jW(null);return}var e=this.getZoomState(jV);var T=this.calCoord(i,jV,e);this.curViewTilesInfo=this.calTilesOrders(T.sw,T.ne,jV);this.clearData();this.clearRefs();this.loadLayerData(this.curViewTilesInfo,e,true,jW)},calCoord:function(T,jV,i){if(T.length!==4){return}var e=gcoord.transform([T[0],T[1]],gcoord[this.inputCRS],gcoord.BD09MC);var jW=gcoord.transform([T[2],T[3]],gcoord[this.inputCRS],gcoord.BD09MC);if(jW[1]>19505879.362428114||e[1]<-15949096.637571886){jW[1]=19505879.362428114;e[1]=-15949096.637571886}this._mapCenter[jV]=new cu((e[0]+jW[0])/2,(e[1]+jW[1])/2);return{sw:e,ne:jW}},calTilesOrders:function(j0,j6,j2){var j3=this.tileType.getMercatorSize(j2,j2);var jY=[Math.floor(j0[0]/j3),Math.floor(j0[1]/j3)];var i=[Math.floor(j6[0]/j3),Math.floor(j6[1]/j3)];var jZ=jY[0]-1;var jX=i[0]+2;var jW=jY[1]-1;var j5=i[1]+2;var j1=[];for(var jV=jZ;jV0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState||0},loadLayerData:function(j2,jV,jW,j1){this.thumbCache={};if(jW){for(var jZ=0,jX=j2.length;jZ3){j0();return}var j1=jY.getTilesUrl(new fa(e.col,e.row),e.zoom,i);jV.src=j1;i++},this.retryTime)}jV.onload=function(){j0();jX&&jX(this,T)};jV.onerror=function(){j0();jX&&jX(null,T)};jV.src=jZ;return jV},rasterTileDataCbk:function(jW,jV,jZ){if(!jW||typeof jW==="string"){this.tileCache.removeData(jV);return}var i=jW.tileInfo;var T=i.col;var j1=i.row;var j0=i.zoom;var e=this.tileCache.getData(jV);if(!e){return}e.textureSource=jW;e.dataType=gv;e.tileInfo=i;e.status="ready";this.tileCache.setData(jV,e);var jX="id_"+T+"_"+j1+"_"+j0;var jY=false;if(this.curViewTilesInfo[jX]){e.png8=this.png8||false;e.key=jV;this.setData(e,2);jY=true}if(jY){this.calOutData(jZ,e)}},getTilesUrl:function(jW,j3,i){var jY=i||0;var T=jW.x;var j4=jW.y;var j0=jy("ditu","normal");var jZ=j0.udt;var j2=ec.B_NORMAL_MAP.tileUrls;var jX=Math.abs(T+j4+jY)%j2.length;var j1=j2[jX];if(T<0){T="M"+(-T)}if(j4<0){j4="M"+(-j4)}var jV="x="+T+"&y="+j4+"&z="+Math.floor(j3);jV+="&styles=pl&scaler=2&udt="+jZ+"&from=jsapi3_0";var e=j1+"?qt=vtile&"+jV;return e},calOutData:function(j1,T){if(!T){for(var jY=0;jY0){e[0].sort(function(T,i){return T.tileInfo.useZoom-i.tileInfo.useZoom})}}});function dr(T,i){aQ.call(this,i);if(!bQ(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=[]}dr.inherits(c2,"CustomHtmlLayer");eP.extend(dr.prototype,{initialize:function(i){this.map=i;var e=this;this._zoomShowEvent=function(jV){var T=e.map.getZoom();if(Te.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(jV,jX){if(!this.overlaysList||!this.map){return}var jW=this.overlaysList;var e=this.overlaysList.length;for(var T=0;T0){for(var T=0;T0){for(var T=0;T0){for(var T=0;Tthis.config.maxZoom)){return}this.data=e;var T=gm.getType(e);if(T.toLowerCase()==="point"){var i=new gm({reference:this.config.coordinate});i.readFeaturesFromObject(e,{isPoints:true},function(jX){var jW=jV.render(jX);jW.id="cus_"+parseInt(Math.random()*1000000,10);jV.overlaysList.push(jW)});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 dr)||!this.map){return}var jV=T.overlaysList;for(var e=0;e0){this.adjustZIndex(jV);jV._normalLayerMgr.sortLayer()}else{var e=jV._featureMgr.result.bkData;this.zIndex=e.length||1}var T={tileTypeName:this.getType?this.getType():"custom",dataType:this.toString(),ontology:this};jV._featureMgr.createLayer(this.zIndex,T);this.map=jV;this.gl=jW;this.onAdd(jV,jW);var i=this;jV.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(jW){var T=this.zIndex;if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;if(jW==="up"){for(var jV=this.zIndex+1;jV0;jV--){if(e[jV]){T=jV;break}}}}return T},setTargetZIndex:function(e){this.zIndex=e;if(this.map){this.map._normalLayerMgr.sortLayer()}},setZIndex:function(jZ){jZ=Math.abs(Math.floor(jZ))||1;if(!jZ||jZ===this.zIndex){return}var jW=this.map._featureMgr.result.bkData;var jV=this.map.tileMgr.tileLayers;var j1=this.map._normalLayerMgr.layers;function j2(j7){var j5=null;var j6=[jV,j1];for(var j3=0;j3-1){return e}continue}if(jX-1){return e}}if(j0>=0){var e=T(j0*4);if(e>-1){return e}}if(jX>=jZ&&j0<0){break}}return -1},pick:function(jZ,jY,jV){var T=this.gl;var j0=this.map.config.ratio;this.map._normalLayerMgr.saveFramebuffer();this.map._normalLayerMgr.bindFramebuffer(this.map._normalLayerMgr.pickFBO);this.map._normalLayerMgr.clear();var i=this.map._webglPainter._camera._modelViewMatrixLayer;var jX=mat4.create(Float64Array);mat4.multiply(jX,this.map._webglPainter.projMatrix,i);this.render(T,jX,{isPickRender:true});var e=new Uint8Array(4*this.pickWidth*this.pickHeight);T.readPixels(jZ*j0-Math.floor(this.pickWidth/2),T.canvas.height-jY*j0-Math.floor(this.pickHeight/2),this.pickWidth,this.pickHeight,T.RGBA,T.UNSIGNED_BYTE,e);var jW=this.rgbToIndex(e);if(this.getPickedItem){var j1=this.getPickedItem(jW,jV)}this.map._normalLayerMgr.restoreFramebuffer();return j1},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 fA("onupdate");this.map.dispatchEvent(e)}},doRender:function(){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(jW,jV,T){var i=new fA(T);i.pixel=jW.pixel;i.latLng=jW.latlng;i.value=jV;this.dispatchEvent(i)},hasEvent:function(e){if(this.enablePicked){if(e.substr(0,2)!=="on"){e+="on"}if(this._listeners[e]&&Object.keys(this._listeners[e]).length>0){return true}return false}return false},toString:function(){return"normal"}});function dU(e){e=e||{};cj.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;gQ.load("mvtParse",function(){i._async()},true);this.select_color=this.getColorStyleForGL(this.base_opt.selectedColor)}dU.inherits(cj,"FeatureLayer");eP.extend(dU.prototype,{_async:function(){this.loadModule=true;this.resolveStyle();this.parseData()},compileExpress:function(i,e){var i=d0.ExpressParse.normalizePropertyExpression(i,e);return i},resolveStyle:function(){var e=this.style_opt||{};if(e&&this.type&&cU[this.type]){var T={};for(var i in e){var jW=cU[this.type][i];if(e.hasOwnProperty(i)&&jW!==undefined){var jV=this.compileExpress(e[i],jW);T[i]=jV}}this.styleExpress=T}},evaluateContext:function(e,T){var i=T.id||e;var jV=this._stateCube[i];return{properties:function(){return T&&T.properties},featureState:jV||{}}},evaluates:function(i,jV){if(!this.styleExpress){return null}var jX=this.styleExpress;var e={};for(var T in jX){if(jX.hasOwnProperty(T)){var jW=jX[T].evaluate(this.evaluateContext(i,jV));e[T]=jW}}return e},_updateState:function(T,i,e){if(e){this._set(i,this._stateCube,T)}else{this._stateCube[T]=i}},_set:function(i,jW,T){var jV=jW[T]||(jW[T]={});for(var e in i){jV[e]=i[e]}},updateState:function(jW,jX,e){var T=JSON.stringify(this._stateCube);if(!(jX&&typeof jX==="object"&&Object.keys(jX).length>0)){return}if(!e){this._stateCube={}}if(jW instanceof Array){for(var jV=0;jV=this.DEL_COUNT){new Error("超出"+this.DEL_COUNT+"个限制")}var e=false;for(var jV=0;jV0){var j7=this.buildLineVertex(e,j3[j2],T,jW,jY);j0[0][j0[0].length]={index:jX,styleData:j7,textureKey:-1,texture:null,textureSize:null,zoomWithMap:true,overlay:{_config:{textureRepeat:true},_totalDashLen:null,}}}}var jV=e.strokeWeight/2;var jZ=this.getColorStyleForGL(e.strokeColor,e.strokeOpacity,false);var j7=this.buildLineVertex(e,j3[j2],T,jV,jZ);var j8=this._generateTexture(e)||{};var j4=j8.value||null;j0[1][j0[1].length]={index:jX,styleData:j7,textureKey:j8.key||-1,texture:j4?j4.texture:null,textureSize:j4?j4.textureSize:null,zoomWithMap:true,overlay:{_config:{textureRepeat:true},_totalDashLen:j4?j4.totalDashLen:null,}}}return j0},combineLine:function(jX){var e=[];for(var T=0;T65536){j4++;jW=e[j4]={style:[],styleData:[[],[]],texture:null,textureSize:null,zoomWithMap:null,overlay:null};i=jW.styleData[0];j1=jW.styleData[1];j0=0}if(jW.styleData[0].length===0){jW.texture=j6.texture;jW.textureSize=j6.textureSize;jW.zoomWithMap=j6.zoomWithMap;jW.overlay=j6.overlay}for(var jZ=0;jZ65536){j7.push([j0,j4]);j0=[];j4=[]}gc.buildData(j2[jZ],jX,j3,j0,j4,jY,jW)}j7.push([j0,j4]);return j7},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)},createBufferData:function(j4){var j1=[];var j2=0;for(var jY=0;jY0){if(this.style_opt.borderMask){jY.clear(jY.STENCIL_BUFFER_BIT);jY.stencilFunc(jY.ALWAYS,1,255);e.stencilOp(jY.KEEP,jY.KEEP,jY.REPLACE);jY.stencilMask(255);e.colorMask(false,false,false,false);for(var jW=0;jW0){jX+=j1[jW-1].length}jY=hp(j1[jW].pointsArray,null,null,jX);for(var T=0,j0=jY.length;T=3?j9[0]:[0,0,0,0];if(jX.lastState.bound!==e){j8.uniform4fv(jX.uniforms.u_bound,e);jX.lastState.bound=e}var kc=j9.length>=3?j9[1]:0;if(jX.lastState.scale!==kc){j8.uniform1f(jX.uniforms.u_scale,kc);jX.lastState.scale=kc}var jW=j9.length>=3?j9[2]:[0,0];if(jX.lastState.offset!==jW){j8.uniform2fv(jX.uniforms.u_offset,jW);jX.lastState.offset=jW}var j0=this.base_opt.isFlat;if(jX.lastState.isFlat!==j0){j8.uniform1i(jX.uniforms.u_flat,j0);jX.lastState.isFlat=j0}var j7=this.base_opt.drawPart||1;if(jX.lastState.drawPart!==j7){j8.uniform1i(jX.uniforms.u_draw_part,j7);jX.lastState.drawPart=j7}var jZ=kb._camera._far||4000;if(jX.lastState.cameraFar!==jZ){j8.uniform1f(jX.uniforms.u_camera_far,jZ);jX.lastState.cameraFar=jZ}j8.uniform1i(jX.uniforms.u_pick_model,this.pickModel);if(jX.lastState.selectColor!==this.select_color){j8.uniform4fv(jX.uniforms.u_pick_color,this.select_color);jX.lastState.selectColor=this.select_color}if(jX.lastState.pickTag!==this.selectedIndex){j8.uniform1i(jX.uniforms.u_pick_tag,this.selectedIndex+1);jX.lastState.pickTag=this.selectedIndex}var ka=new Int16Array(this.DEL_COUNT);if(this.delIndexs.length){for(var j6=0;j6=9000&&j1.current_city["code"]<=9378){j1.current_city["name"]="台湾省"}if(j1.current_city["code"]>=20000&&j1.current_city["code"]<=20499){j1.current_city["name"]="新加坡"}if(j1.current_city["code"]>=20500&&j1.current_city["code"]<=25999){j1.current_city["name"]="泰国"}if(j1.current_city["code"]>=26000&&j1.current_city["code"]<=29999){j1.current_city["name"]="日本"}if(j1.current_city["code"]>=30000&&j1.current_city["code"]<=30999){j1.current_city["name"]="韩国"}if(j1.current_city["code"]>=31000&&j1.current_city["code"]<=37000){j1.current_city["name"]="亚太"}if(j1.current_city["code"]>=46609&&j1.current_city["code"]<=52505){j1.current_city["name"]="欧洲"}if(j1.current_city["code"]>=39509&&j1.current_city["code"]<=53500){j1.current_city["name"]="南美洲"}if(j1.current_city["code"]>=54000&&j1.current_city["code"]<=70000){j1.current_city["name"]="北美洲"}if(j1.current_city["code"]===54003&&j1.current_city["code"]>=60731&&j1.current_city["code"]<=61123){j1.current_city["name"]="美国"}if(j1.current_city["code"]===54015||j1.current_city["code"]>=57970&&j1.current_city["code"]<=60223){j1.current_city["name"]="加拿大"}if(j1.current_city["code"]===54025||j1.current_city["code"]>=54338&&j1.current_city["code"]<=57374){j1.current_city["name"]="墨西哥"}e.enableRequest=true;if(j1&&j1.current_city){var j0=j1.current_city["name"];var jZ=j1.current_city["code"];if(jZ!==i.cCode){var jY=new fA("oncitychange");jY.name=j0;jY.code=jZ;i.dispatchEvent(jY)}i.cityName=j0;i.cCode=jZ;if(!bU()){cW(i)}}},{qt:"cen",b:T.lng+","+T.lat+";"+jW.lng+","+jW.lat,l:jX},"","",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 J(i){if(i.temp.copyadded){return}i.temp.copyadded=true;if(!i.cpyCtrl){var jV=new iL(2,2);i.config.cpyCtrlOffset=jV;if(bU()){jV.width=72;jV.height=0}var T=new fV({offset:jV,printable:true});i.cpyCtrl=T}if(!bU()){cW(i);i.addEventListener("maptypechange",function(){cW(i)})}i.addControl(T);var e=new bz();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 iL(4,2))}});if(i.getSize().width>=300&&i.getSize().height>=100){e.show()}else{e.hide();T.setOffset(new iL(4,2))}i.addEventListener("oncopyrightoffsetchange",function(jW){i.logoCtrl.setOffset(jW.target.logo);i.cpyCtrl.setOffset(jW.target.cpy)});i.dispatchEvent(new fA("oncopyrightaddend"))}function cW(ka){if(!ka.cpyCtrl){var ki=new iL(2,2);if(bU()){ki.width=72;ki.height=0}var kd=new fV({offset:ki,printable:true});ka.cpyCtrl=kd}var kr=ka.cityName||"中国";var kb=ka.getMapType();var kc=["常州市","南昌市","乌鲁木齐市","无锡市","福州市","泉州市","珠海市","贵阳市"];var j4=["北京市","上海市","广州市","深圳市","宁波市","石家庄市","沈阳市","长春市","青岛市","温州市","台州市","金华市","佛山市","中山市","昆明市","南宁市","苏州市","西安市","济南市","郑州市","合肥市","呼和浩特市","杭州市","成都市","武汉市","长沙市","天津市","南京市","重庆市","大连市","东莞市","厦门市"];var j6=["香港特别行政区"];var j0=["台湾省"];var kj=["日本"];var kp=["韩国"];var ke=["泰国"];var kh=["亚太"];var j1=["新加坡"];var kq=["欧洲"];var jV=["南美洲"];var km=["北美洲"];var T=["美国"];var kg=["墨西哥"];var jY=["加拿大"];for(var kn in kc){if(kc[kn]===kr){var j7=true;break}}for(var kn in j4){if(j4[kn]===kr){var jW=true;break}}for(var kn in j6){if(j6[kn]===kr){var kt=true;break}}if(j0[0]===kr){var kl=true}if(j1[0]===kr){var i=true}if(kj[0]===kr){var j3=true}if(kp[0]===kr){var j9=true}if(ke[0]===kr){var j8=true}if(kh[0]===kr){var jZ=true}if(kq[0]===kr){var j5=true}if(jV[0]===kr){var j2=true}if(km[0]===kr){var e=true}if(T[0]===kr){var ko=true}if(jY[0]===kr){var kk=true}if(kg[0]===kr){var jX=true}var ks=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "];var kf="rgba(255, 255, 255, 0.701961)";if(ka.getZoom()<=9){ks=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(kl){ks=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(j3||j9){ks=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(i||j8){ks=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(jZ){ks=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(j5){ks=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(j2){ks=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(e){ks=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}}}}}}}}if(ka.getZoom()<=9){ks.push("百度智图");ks.push(' & OpenStreetMap');ks.push(' & HERE');if(kb===BMAP_SATELLITE_MAP||kb===BMAP_HYBRID_MAP){ks.push(' & ESO');kf="rgba(0,0,0,.7)"}}else{if(j3||j9){ks.push('OpenStreetMap')}else{if(i||j8){ks.push('HERE')}else{if(jZ){ks.push('HERE');ks.push(' & Mapbox')}else{if(j5){ks.push('OpenStreetMap');ks.push(' & Mapbox')}else{if(j2){ks.push('OpenStreetMap');ks.push(' & Mapbox')}else{if(ko||jX||kk){ks.push('HERE');ks.push(' & Mapbox')}else{if(e){ks.push('OpenStreetMap');ks.push(' & Mapbox')}else{ks.push("百度智图");if(j7){ks.push(' & PalmCity')}if(kt){ks.push(' & MapKing')}if(kl){ks.push(' & HERE');ks.push(' & 樂客LocalKing')}if(kb===BMAP_SATELLITE_MAP||kb===BMAP_HYBRID_MAP){kf="rgba(0,0,0,.7)"}}}}}}}}}ks.unshift('');ks.push("");ks=ks.join("");ka.cpyCtrl.addCopyright({id:1,content:ks})}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 c8="cur";var Y="cen";var I="s";var dq="con";var dh="bd";var cM="nb";var gN="bt";var aN="nav";var hU="walk";var fH="gc";var dN="rgc";var K="dec";var ia="iploc";var gy="bse";var f4="nse";var c5="bl";var eg="bsl";var fE="bda";var ed="sa";var a6="nba";var h1="drag";var iM="ext";var jp="exts";var js="hip";var hm="ride";var jC="drct";var fg=2;var bd=4;var fO=7;var h2=11;var b5=12;var eK=14;var cJ=15;var d4=18;var az=20;var a5=21;var H=19;var a=23;var io=26;var aB=28;var f5=31;var eW=35;var ib=44;var bb=45;var aw=46;var jn=47;var ga=-1;var a8=0;var bv=1;var iR=2;var dF=3;window.BMAP_POI_TYPE_NORMAL=0;var cy=1;var h4=2;BMapGL.I=eP.I;var bF={};bF.removeHtml=function(e){e=e.replace(/<\/?[^>]*>/g,"");e=e.replace(/[ | ]* /g," ");return e};bF.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;")};bF.parseGeoExtReg2=function(i,e){var T=new RegExp("(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){"+e+"}","ig");return i.replace(T,"$1")};var dx=0;var c7=1;var S=2;bF.unique=function(T){var jX=false;var jW=[];var jY={};for(var jV=0,e=T.length;jV21){T=21}return T};bF.parseGeo=function(jY,j1){if(typeof jY!="string"||!jY){return}var j3=jY.split("|");var e;var jW;var T;if(j3.length==1){e=bZ(jY)}else{e=bZ(j3[2]);jW=bZ(j3[0]);T=bZ(j3[1]);if(!j1){return e}}var jZ={type:e.geoType};if(j1){switch(jZ.type){case S:var j0=new cu(e.geo[0][0],e.geo[0][1]);var j2=iU.convertMC2LL(j0);jZ.point=j2;jZ.points=[j2];break;case c7:jZ.points=[];var j4=e.geo[0];for(var jX=0,jV=j4.length-1;jX0.25&&j5<1){j5=1}else{if(j5>32){j5=32}}}}var j0=ke.split("|");if(j0.length==1){var jV=bZ(j0[0]);return{type:jV.type,bound:"",points:jV.geo.join(",")}}else{if(j0.length>1){var j6=ke.split(";.=");var j2=[];var jW=[];var j7=0;var kb=j6.length;for(var j8=0;j81){if(j8==0){kd=kd+";"}if(j8>0&&j80){kc=bF.parseGeoExtReg2(kc,j5)}jW.push(kc)}if(kb<=1){jW=jW.join(";")}if(kb==2){var T=jW[0]+";"+jW[1];var jY=T.split(";");var e=[];for(var j8=0;j8c3){e=c3-e}if(jZ>c3){jZ=c3-jZ}jV.push(jV[T-2]+e);jV.push(jV[T-1]+jZ);return 0}function dp(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}bF.pathToPoints=function(jX){var jV=[];if(typeof jX!=="string"){return jV}else{var jW=jX.split(";");for(var T=0;Tcx.MAX_PAGE_CAPACITY?cx.DEFAULT_PAGE_CAPACITY:e)}else{this._opts.pageCapacity=cx.DEFAULT_PAGE_CAPACITY}},getPageCapacity:function(){return this._opts.pageCapacity},toString:function(){return"LocalSearch"}});function be(i){this._opts={};eP.extend(this._opts,i);this._queryList=[];var e=this;gQ.load("otherSearch",function(){e._asyncSearch()})}be.inherits(c2,"Geocoder");eP.extend(be.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 cR(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;gQ.load("otherSearch",function(){var T=i._pendingCalls.length;for(var jV=0;jV=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=eE.MAX_PAGE_CAPACITY;return}}if(typeof e!=="number"){this._opts.pageCapacity=eE.MAX_PAGE_CAPACITY;return}if(e>=1&&e<=eE.MAX_PAGE_CAPACITY){this._opts.pageCapacity=Math.round(e)}else{this._opts.pageCapacity=eE.MAX_PAGE_CAPACITY}},toString:function(){return"TransitRoute"},_shortTitle:function(e){return e.replace(/\(.*\)/,"")}});window.BMAP_HIGHLIGHT_STEP=1;window.BMAP_HIGHLIGHT_ROUTE=2;var cB=function(e,jV){ju.call(this,e,jV);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;gQ.load("route",function(){T._asyncSearch()},true);if(this.init_d){this.init_d()}};cB.ROAD_TYPE=["","环岛","无属性道路","主路","高速连接路","交叉点内路段","连接道路","停车场内部道路","服务区内部道路","桥","步行街","辅路","匝道","全封闭道路","未定义交通区域","POI连接路","隧道","步行道","公交专用道","提前右转道"];eP.inherit(cB,ju,"DWRoute");eP.extend(cB.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 cn(e,i){cB.call(this,e,i);i=i||{};this._opts._enableTraffic=i.enableTraffic||false;this.setPolicy(i.policy);this.QUERY_TYPE=aN;this.RETURN_TYPE=az;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_DRIVING}eP.inherit(cn,cB,"DrivingRoute");cn.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 fh(e,i){cB.call(this,e,i);this.QUERY_TYPE=hU;this.RETURN_TYPE=f5;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_WALKING;this._enableDragging=false}eP.inherit(fh,cB,"WalkingRoute");function cZ(e,i){cB.call(this,e,i);this.QUERY_TYPE=hm;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_RIDING;this._enableDragging=false}eP.inherit(cZ,cB,"RidingRoute");window.BMAP_MODE_DRIVING="driving";window.BMAP_MODE_TRANSIT="transit";window.BMAP_MODE_WALKING="walking";window.BMAP_MODE_NAVIGATION="navigation";var a0={web:"//web.archive.org/web/20230404102250/https://api.map.baidu.com/direction?",android:"bdapp://map/direction?",ios:"baidumap://map/direction?"};function iu(e){this.opts=e||{}}eP.extend(iu.prototype,{routeCall:function(jV,e,T){var i=this;gQ.load("route",function(){i._asyncSearch(jV,e,T)})}});function dZ(){return Pano.getStreetViewCoverageLayer(bw)}function eG(){Pano.PanoramaService.call(this)}eP.inherit(eG,Pano.PanoramaService,"PanoramaService");eP.extend(eG.prototype,{getPanoramaById:function(T,i){var e=this;this.getPanoById(T,function(jV){i&&i(e._makeData(jV))})},getPanoramaByLocation:function(e,T){e=iU.convertLL2MC(e);var i=this;this.getPanoByLocation(e,50,function(jV){T&&T(i._makeData(jV))})},_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=iU.convertMC2LL(new cu(i.pointX,i.pointY));return i}});function e7(){if(window.PANORAMA_URL){return Pano.getPanoControl(bw,{imgPath:B.imgPath,tileBaseUrl:B.panoTilePath,})}return Pano.getPanoControl(bw)}function O(T,e){if(!e){return}this.content=T;if(e.position&&!Array.isArray(e.position)){e.position=iU.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,})}eP.inherit(O,Pano.PanoOverlay,"PanoramaLabel");eP.extend(O.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 jV=this.content;var jY=document.createElement("div");var i=jY.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";jY.appendChild(e);var T=document.createElement("span");T.style.margin="0 14px";T.innerText=jV;e.appendChild(T);if(!this.hideDistance){var jX=document.createElement("span");jX.style.color="color:rgba(255,255,255,0.3)";jX.innerText="|";e.appendChild(jX);var jW=document.createElement("span");jW.style.margin="0 8px";jW.style.color="#60c7fa";jW.style.fontSize="12px";jW.innerText="0米";e.appendChild(jW);this._distanceDom=jW}this._dom=jY;this._titleDom=T;return jY},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=iU.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 jV={};if(window.PANORAMA_URL){jV.imgPath=B.imgPath;jV.tileBaseUrls=[B.panoTilePath]}var e=Pano.init(i,jV);var T=e.setPosition;e.setPosition=function(jX){var jY=iU.convertLL2MC(jX);T.call(e,jY)};var jW=e.addEventListener;e.addEventListener=function(jX,jY){if(jX==="position_changed"){jW.call(e,jX,function(jZ){var j0=iU.convertMC2LL(jZ);jY(j0)})}else{jW.call(e,jX,jY)}};return e}bw.Map=hx;bw.MapType=ec;bw.Point=cu;bw.Pixel=fa;bw.Size=iL;bw.Bounds=hL;bw.PrivateRegionDataModel=cH;bw.TileLayer=hi;bw.Copyright=m;bw.Projection=bw.Project=iU;bw.XYZProjection=bw.XYZProject=du;bw.Convertor=fJ;bw.RenderTypeUtils=c0;bw.Overlay=aQ;bw.Label=hE;bw.Marker=s;bw.Symbol=e8;bw.SVGSymbol=dD;bw.Icon=jd;bw.Symbol=e8;bw.SVGSymbol=dD;bw.Polyline=bk;bw.BezierCurve=cD;bw.PolylineMultipart=ee;bw.Polygon=it;bw.MapMask=jH;bw.Prism=bq;bw.Marker3D=d5;bw.GroundOverlay=fP;bw.CustomOverlay=bK;bw.CustomHtmlLayer=dr;bw.InfoWindow=dV;bw.SimpleInfoWindow=hO;bw.Circle=aT;bw.Control=gx;bw.NavigationControl=jr;bw.NavigationControl3D=eR;bw.CopyrightControl=fV;bw.ScaleControl=jU;bw.CityListControl=br;bw.MapTypeControl=v;bw.ZoomControl=iX;bw.LocationControl=ge;bw.LogoControl=bz;bw.DistanceTool=cc;bw.ContextMenu=g9;bw.MenuItem=hJ;bw.OperationMask=ai;bw.Animation=fq;bw.ViewAnimation=q;bw.Transitions=gq;bw.Event=fA;bw.trafficLayer=jo;bw.TrafficLayer=i1;bw.GeoJSONLayer=aM;bw.XYZLayer=jI;bw.PixelLayer=dk;bw.GeoJSONParse=gm;bw.NormalLayer=cj;bw.LineLayer=bR;bw.FillLayer=dT;bw.Entity=iV;bw.MVTLayer=d0;bw.BaiduLayer=U;bw.Geolocation=cR;bw.Geocoder=be;bw.Boundary=fc;bw.DistrictLayer=dQ;bw.LocalCity=e5;bw.LocalSearch=cx;bw.Autocomplete=iN;bw.BusLineSearch=eq;bw.WalkingRoute=fh;bw.RidingRoute=cZ;bw.DrivingRoute=cn;bw.TransitRoute=eE;bw.RouteSearch=iu;bw.PanoramaCoverageLayer=dZ;bw.PanoramaControl=e7;bw.PanoramaService=eG;bw.PanoramaLabel=O;bw.Panorama=d;function g0(e,i){for(var T in i){e[T]=i[T]}}bw.fetchDebug&&bw.fetchDebug.init();bw.verify();bw.apiLoad();bw.frequency();bw.getSeckeyCid();window._layer=1;eP.extend(dQ.prototype,{_asyncSearch:function(){for(var T=0,e=this._queryList.length;T0){var ka=jV.geo.length;for(i8=0;i80){var j2=T.length-1;var j9=[];var j1=false;var j8=0;var j6=0;for(var kb=0;kbj6){var kd=j8;j8=j6;j6=kd}var j0=j9;var jY=j9.splice(j8+1);var jW=jY.splice(j6-j8);j0=j0.concat(jW);j7.boundaries.push(j0.join(";"));j7.boundaries.push(jY.join(";"));j1=false;continue}if(j9.length!==0){j7.boundaries.push(j9.join(";"))}}}}}}return j7},deleteDistrict:function(jV){var T=jV.disOverlays;for(var e=0;e0){for(var T=0;T