fengmap.plugin.navi.min.js 83.0 KB
/**Released Version v3.1.5,BUILD 69,Time 1706862864190. Fengmap Javascript SDK , see: https://www.fengmap.com for details**/
!function(t,i){"object"==typeof exports&&"object"==typeof module?module.exports=i():"function"==typeof define&&define.amd?define([],i):"object"==typeof exports?exports.fengmap=i():t.fengmap=i()}(this,function(){return n=[function(D,F,t){"use strict";t.r(F);var A={MODULE_SHORTEST:1,MODULE_BEST:2},Y={PRIORITY_DEFAULT:1,PRIORITY_LIFTFIRST:2,PRIORITY_ESCALATORFIRST:3,PRIORITY_STAIRFIRST:4,PRIORITY_LIFTONLY:5,PRIORITY_ESCALATORONLY:6,PRIORITY_STAIRONLY:7,PRIORITY_ACCESSIBLEONLY:8,PRIORITY_LIFTFIRST1:9,PRIORITY_ESCALATORFIRST1:10,PRIORITY_STAIRFIRST1:11},V={ZH:"zh",EN:"en"};function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Z(t,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,function(t){t=function(t,i){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===i?String:Number)(t);n=n.call(t,i||"default");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==r(t)?t:String(t)}(e.key),e)}}function B(t,i,n){return i&&Z(t.prototype,i),n&&Z(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var t=B(function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")}),z=(Object.assign(t.prototype,{h:function(t,i){void 0===this.u&&(this.u={});var n=this.u;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(i)&&n[t].push(i)},v:function(t,i){var n;return void 0!==this.u&&void 0!==(n=this.u)[t]&&-1!==n[t].indexOf(i)},M:function(t,i){var n;void 0!==this.u&&void 0!==(t=this.u[t])&&-1!==(n=t.indexOf(i))&&t.splice(n,1)},k:function(t){if(void 0!==this.u){var i=this.u[t.type];if(void 0!==i)for(var n=i.slice(0),e=0,r=n.length;e<r;e++)n[e].call(this,t)}}}),t);function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function H(t,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,function(t){t=function(t,i){if("object"!=s(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===i?String:Number)(t);n=n.call(t,i||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==s(t)?t:String(t)}(e.key),e)}}var X=function(){function i(t){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}var t,n,e;return t=i,(n=[{key:"start",value:function(){this.startTime=U(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}},{key:"stop",value:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}},{key:"getElapsedTime",value:function(){return this.getDelta(),this.elapsedTime}},{key:"getDelta",value:function(){var t,i=0;return this.autoStart&&!this.running?(this.start(),0):(this.running&&(i=((t=U())-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=i),i)}}])&&H(t.prototype,n),e&&H(t,e),Object.defineProperty(t,"prototype",{writable:!1}),i}();function U(){return("undefined"==typeof performance?Date:performance).now()}for(var o=[],i=0;i<256;i++)o[i]=(i<16?"0":"")+i.toString(16);var n=1234567,e={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var t=4294967295*Math.random()|0,i=4294967295*Math.random()|0,n=4294967295*Math.random()|0,e=4294967295*Math.random()|0;return(o[255&t]+o[t>>8&255]+o[t>>16&255]+o[t>>24&255]+"-"+o[255&i]+o[i>>8&255]+"-"+o[i>>16&15|64]+o[i>>24&255]+"-"+o[63&n|128]+o[n>>8&255]+"-"+o[n>>16&255]+o[n>>24&255]+o[255&e]+o[e>>8&255]+o[e>>16&255]+o[e>>24&255]).toUpperCase()},clamp:function(t,i,n){return Math.max(i,Math.min(n,t))},euclideanModulo:function(t,i){return(t%i+i)%i},mapLinear:function(t,i,n,e,r){return e+(t-i)*(r-e)/(n-i)},lerp:function(t,i,n){return(1-n)*t+n*i},smoothstep:function(t,i,n){return t<=i?0:n<=t?1:(t=(t-i)/(n-i))*t*(3-2*t)},smootherstep:function(t,i,n){return t<=i?0:n<=t?1:(t=(t-i)/(n-i))*t*t*(t*(6*t-15)+10)},randInt:function(t,i){return t+Math.floor(Math.random()*(i-t+1))},randFloat:function(t,i){return t+Math.random()*(i-t)},randFloatSpread:function(t){return t*(.5-Math.random())},seededRandom:function(t){return((n=16807*(n=void 0!==t?t%2147483647:n)%2147483647)-1)/2147483646},degToRad:function(t){return t*e.DEG2RAD},radToDeg:function(t){return t*e.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))},setQuaternionFromProperEuler:function(t,i,n,e,r){var s=Math.cos,o=Math.sin,h=s(n/2),u=o(n/2),a=s((i+e)/2),f=o((i+e)/2),c=s((i-e)/2),l=o((i-e)/2),v=s((e-i)/2),y=o((e-i)/2);switch(r){case"XYX":t.set(h*f,u*c,u*l,h*a);break;case"YZY":t.set(u*l,h*f,u*c,h*a);break;case"ZXZ":t.set(u*c,u*l,h*f,h*a);break;case"XZX":t.set(h*f,u*y,u*v,h*a);break;case"YXY":t.set(u*v,h*f,u*y,h*a);break;case"ZYZ":t.set(u*y,u*v,h*f,h*a);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}};function h(t){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function q(t,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,function(t){t=function(t,i){if("object"!=h(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===i?String:Number)(t);n=n.call(t,i||"default");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==h(t)?t:String(t)}(e.key),e)}}t=function(){function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,e=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1,r=this,s=o;if(!(r instanceof s))throw new TypeError("Cannot call a class as a function");Object.defineProperty(this,"isQuaternion",{value:!0}),this.g=t,this.S=i,this._=n,this.O=e}var t,i,n;return t=o,n=[{key:"slerp",value:function(t,i,n,e){return n.copy(t).slerp(i,e)}},{key:"slerpFlat",value:function(t,i,n,e,r,s,o){var h,u,a,f=n[e+0],c=n[e+1],l=n[e+2],n=n[e+3],e=r[s+0],v=r[s+1],y=r[s+2],r=r[s+3];n===r&&f===e&&c===v&&l===y||(s=1-o,h=0<=(u=f*e+c*v+l*y+n*r)?1:-1,(a=1-u*u)>Number.EPSILON&&(a=Math.sqrt(a),u=Math.atan2(a,u*h),s=Math.sin(s*u)/a,o=Math.sin(o*u)/a),f=f*s+e*(u=o*h),c=c*s+v*u,l=l*s+y*u,n=n*s+r*u,s===1-o&&(f*=a=1/Math.sqrt(f*f+c*c+l*l+n*n),c*=a,l*=a,n*=a)),t[i]=f,t[i+1]=c,t[i+2]=l,t[i+3]=n}},{key:"multiplyQuaternionsFlat",value:function(t,i,n,e,r,s){var o=n[e],h=n[e+1],u=n[e+2],n=n[e+3],e=r[s],a=r[s+1],f=r[s+2],r=r[s+3];return t[i]=o*r+n*e+h*f-u*a,t[i+1]=h*r+n*a+u*e-o*f,t[i+2]=u*r+n*f+o*a-h*e,t[i+3]=n*r-o*e-h*a-u*f,t}}],(i=[{key:"x",get:function(){return this.g},set:function(t){this.g=t,this.j()}},{key:"y",get:function(){return this.S},set:function(t){this.S=t,this.j()}},{key:"z",get:function(){return this._},set:function(t){this._=t,this.j()}},{key:"w",get:function(){return this.O},set:function(t){this.O=t,this.j()}},{key:"set",value:function(t,i,n,e){return this.g=t,this.S=i,this._=n,this.O=e,this.j(),this}},{key:"clone",value:function(){return new this.constructor(this.g,this.S,this._,this.O)}},{key:"copy",value:function(t){return this.g=t.x,this.S=t.y,this._=t.z,this.O=t.w,this.j(),this}},{key:"setFromEuler",value:function(t,i){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t.g,e=t.S,r=t._,s=t._order,t=Math.cos,o=Math.sin,h=t(n/2),u=t(e/2),a=t(r/2),f=o(n/2),c=o(e/2),l=o(r/2);switch(s){case"XYZ":this.g=f*u*a+h*c*l,this.S=h*c*a-f*u*l,this._=h*u*l+f*c*a,this.O=h*u*a-f*c*l;break;case"YXZ":this.g=f*u*a+h*c*l,this.S=h*c*a-f*u*l,this._=h*u*l-f*c*a,this.O=h*u*a+f*c*l;break;case"ZXY":this.g=f*u*a-h*c*l,this.S=h*c*a+f*u*l,this._=h*u*l+f*c*a,this.O=h*u*a-f*c*l;break;case"ZYX":this.g=f*u*a-h*c*l,this.S=h*c*a+f*u*l,this._=h*u*l-f*c*a,this.O=h*u*a+f*c*l;break;case"YZX":this.g=f*u*a+h*c*l,this.S=h*c*a+f*u*l,this._=h*u*l-f*c*a,this.O=h*u*a-f*c*l;break;case"XZY":this.g=f*u*a-h*c*l,this.S=h*c*a-f*u*l,this._=h*u*l+f*c*a,this.O=h*u*a+f*c*l;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return!1!==i&&this.j(),this}},{key:"setFromAxisAngle",value:function(t,i){var i=i/2,n=Math.sin(i);return this.g=t.x*n,this.S=t.y*n,this._=t.z*n,this.O=Math.cos(i),this.j(),this}},{key:"setFromRotationMatrix",value:function(t){var t=t.elements,i=t[0],n=t[4],e=t[8],r=t[1],s=t[5],o=t[9],h=t[2],u=t[6],t=t[10],a=i+s+t;return 0<a?(a=.5/Math.sqrt(a+1),this.O=.25/a,this.g=(u-o)*a,this.S=(e-h)*a,this._=(r-n)*a):s<i&&t<i?(a=2*Math.sqrt(1+i-s-t),this.O=(u-o)/a,this.g=.25*a,this.S=(n+r)/a,this._=(e+h)/a):t<s?(a=2*Math.sqrt(1+s-i-t),this.O=(e-h)/a,this.g=(n+r)/a,this.S=.25*a,this._=(o+u)/a):(a=2*Math.sqrt(1+t-i-s),this.O=(r-n)/a,this.g=(e+h)/a,this.S=(o+u)/a,this._=.25*a),this.j(),this}},{key:"setFromUnitVectors",value:function(t,i){var n=t.dot(i)+1;return n<1e-6?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this.g=-t.y,this.S=t.x,this._=0):(this.g=0,this.S=-t.z,this._=t.y)):(this.g=t.y*i.z-t.z*i.y,this.S=t.z*i.x-t.x*i.z,this._=t.x*i.y-t.y*i.x),this.O=n,this.normalize()}},{key:"angleTo",value:function(t){return 2*Math.acos(Math.abs(e.clamp(this.dot(t),-1,1)))}},{key:"rotateTowards",value:function(t,i){var n=this.angleTo(t);return 0!==n&&(i=Math.min(1,i/n),this.slerp(t,i)),this}},{key:"identity",value:function(){return this.set(0,0,0,1)}},{key:"invert",value:function(){return this.conjugate()}},{key:"conjugate",value:function(){return this.g*=-1,this.S*=-1,this._*=-1,this.j(),this}},{key:"dot",value:function(t){return this.g*t.g+this.S*t.S+this._*t._+this.O*t.O}},{key:"lengthSq",value:function(){return this.g*this.g+this.S*this.S+this._*this._+this.O*this.O}},{key:"length",value:function(){return Math.sqrt(this.g*this.g+this.S*this.S+this._*this._+this.O*this.O)}},{key:"normalize",value:function(){var t=this.length();return 0===t?(this.g=0,this.S=0,this._=0,this.O=1):(this.g=this.g*(t=1/t),this.S=this.S*t,this._=this._*t,this.O=this.O*t),this.j(),this}},{key:"multiply",value:function(t,i){return void 0!==i?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,i)):this.multiplyQuaternions(this,t)}},{key:"premultiply",value:function(t){return this.multiplyQuaternions(t,this)}},{key:"multiplyQuaternions",value:function(t,i){var n=t.g,e=t.S,r=t._,t=t.O,s=i.g,o=i.S,h=i._,i=i.O;return this.g=n*i+t*s+e*h-r*o,this.S=e*i+t*o+r*s-n*h,this._=r*i+t*h+n*o-e*s,this.O=t*i-n*s-e*o-r*h,this.j(),this}},{key:"slerp",value:function(t,i){if(0!==i){if(1===i)return this.copy(t);var n,e=this.g,r=this.S,s=this._,o=this.O,h=o*t.O+e*t.g+r*t.S+s*t._;h<0?(this.O=-t.O,this.g=-t.g,this.S=-t.S,this._=-t._,h=-h):this.copy(t),1<=h?(this.O=o,this.g=e,this.S=r,this._=s):((t=1-h*h)<=Number.EPSILON?(this.O=(n=1-i)*o+i*this.O,this.g=n*e+i*this.g,this.S=n*r+i*this.S,this._=n*s+i*this._,this.normalize()):(n=Math.sqrt(t),t=Math.atan2(n,h),h=Math.sin((1-i)*t)/n,i=Math.sin(i*t)/n,this.O=o*h+this.O*i,this.g=e*h+this.g*i,this.S=r*h+this.S*i,this._=s*h+this._*i),this.j())}return this}},{key:"equals",value:function(t){return t.g===this.g&&t.S===this.S&&t._===this._&&t.O===this.O}},{key:"fromArray",value:function(t){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return this.g=t[i],this.S=t[i+1],this._=t[i+2],this.O=t[i+3],this.j(),this}},{key:"toArray",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return t[i]=this.g,t[i+1]=this.S,t[i+2]=this._,t[i+3]=this.O,t}},{key:"fromBufferAttribute",value:function(t,i){return this.g=t.getX(i),this.S=t.getY(i),this._=t.getZ(i),this.O=t.getW(i),this}},{key:"_onChange",value:function(t){return this.j=t,this}},{key:"_onChangeCallback",value:function(){}}])&&q(t.prototype,i),n&&q(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}();function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Q(t,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,function(t){t=function(t,i){if("object"!=u(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===i?String:Number)(t);n=n.call(t,i||"default");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==u(t)?t:String(t)}(e.key),e)}}var c=function(){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,e=this,r=s;if(!(e instanceof r))throw new TypeError("Cannot call a class as a function");Object.defineProperty(this,"isVector3",{value:!0}),this.x=t,this.y=i,this.z=n}var t,i,n;return t=s,(i=[{key:"set",value:function(t,i,n){return void 0===n&&(n=this.z),this.x=t,this.y=i,this.z=n,this}},{key:"setScalar",value:function(t){return this.x=t,this.y=t,this.z=t,this}},{key:"setX",value:function(t){return this.x=t,this}},{key:"setY",value:function(t){return this.y=t,this}},{key:"setZ",value:function(t){return this.z=t,this}},{key:"setComponent",value:function(t,i){switch(t){case 0:this.x=i;break;case 1:this.y=i;break;case 2:this.z=i;break;default:throw new Error("index is out of range: "+t)}return this}},{key:"getComponent",value:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}},{key:"clone",value:function(){return new this.constructor(this.x,this.y,this.z)}},{key:"copy",value:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}},{key:"add",value:function(t,i){return void 0!==i?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,i)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)}},{key:"addScalar",value:function(t){return this.x+=t,this.y+=t,this.z+=t,this}},{key:"addVectors",value:function(t,i){return this.x=t.x+i.x,this.y=t.y+i.y,this.z=t.z+i.z,this}},{key:"addScaledVector",value:function(t,i){return this.x+=t.x*i,this.y+=t.y*i,this.z+=t.z*i,this}},{key:"sub",value:function(t,i){return void 0!==i?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,i)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)}},{key:"subScalar",value:function(t){return this.x-=t,this.y-=t,this.z-=t,this}},{key:"subVectors",value:function(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this.z=t.z-i.z,this}},{key:"multiply",value:function(t,i){return void 0!==i?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,i)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)}},{key:"multiplyScalar",value:function(t){return this.x*=t,this.y*=t,this.z*=t,this}},{key:"multiplyVectors",value:function(t,i){return this.x=t.x*i.x,this.y=t.y*i.y,this.z=t.z*i.z,this}},{key:"applyEuler",value:function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(G.setFromEuler(t))}},{key:"applyAxisAngle",value:function(t,i){return this.applyQuaternion(G.setFromAxisAngle(t,i))}},{key:"applyMatrix3",value:function(t){var i=this.x,n=this.y,e=this.z,t=t.elements;return this.x=t[0]*i+t[3]*n+t[6]*e,this.y=t[1]*i+t[4]*n+t[7]*e,this.z=t[2]*i+t[5]*n+t[8]*e,this}},{key:"applyNormalMatrix",value:function(t){return this.applyMatrix3(t).normalize()}},{key:"applyMatrix4",value:function(t){var i=this.x,n=this.y,e=this.z,t=t.elements,r=1/(t[3]*i+t[7]*n+t[11]*e+t[15]);return this.x=(t[0]*i+t[4]*n+t[8]*e+t[12])*r,this.y=(t[1]*i+t[5]*n+t[9]*e+t[13])*r,this.z=(t[2]*i+t[6]*n+t[10]*e+t[14])*r,this}},{key:"applyQuaternion",value:function(t){var i=this.x,n=this.y,e=this.z,r=t.x,s=t.y,o=t.z,t=t.w,h=t*i+s*e-o*n,u=t*n+o*i-r*e,a=t*e+r*n-s*i,i=-r*i-s*n-o*e;return this.x=h*t+i*-r+u*-o-a*-s,this.y=u*t+i*-s+a*-r-h*-o,this.z=a*t+i*-o+h*-s-u*-r,this}},{key:"project",value:function(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}},{key:"unproject",value:function(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}},{key:"transformDirection",value:function(t){var i=this.x,n=this.y,e=this.z,t=t.elements;return this.x=t[0]*i+t[4]*n+t[8]*e,this.y=t[1]*i+t[5]*n+t[9]*e,this.z=t[2]*i+t[6]*n+t[10]*e,this.normalize()}},{key:"divide",value:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}},{key:"divideScalar",value:function(t){return this.multiplyScalar(1/t)}},{key:"min",value:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}},{key:"max",value:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}},{key:"clamp",value:function(t,i){return this.x=Math.max(t.x,Math.min(i.x,this.x)),this.y=Math.max(t.y,Math.min(i.y,this.y)),this.z=Math.max(t.z,Math.min(i.z,this.z)),this}},{key:"clampScalar",value:function(t,i){return this.x=Math.max(t,Math.min(i,this.x)),this.y=Math.max(t,Math.min(i,this.y)),this.z=Math.max(t,Math.min(i,this.z)),this}},{key:"clampLength",value:function(t,i){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(i,n)))}},{key:"floor",value:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}},{key:"ceil",value:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}},{key:"round",value:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}},{key:"roundToZero",value:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}},{key:"negate",value:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}},{key:"dot",value:function(t){return this.x*t.x+this.y*t.y+this.z*t.z}},{key:"lengthSq",value:function(){return this.x*this.x+this.y*this.y+this.z*this.z}},{key:"length",value:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}},{key:"manhattanLength",value:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}},{key:"normalize",value:function(){return this.divideScalar(this.length()||1)}},{key:"setLength",value:function(t){return this.normalize().multiplyScalar(t)}},{key:"lerp",value:function(t,i){return this.x+=(t.x-this.x)*i,this.y+=(t.y-this.y)*i,this.z+=(t.z-this.z)*i,this}},{key:"lerpVectors",value:function(t,i,n){return this.x=t.x+(i.x-t.x)*n,this.y=t.y+(i.y-t.y)*n,this.z=t.z+(i.z-t.z)*n,this}},{key:"cross",value:function(t,i){return void 0!==i?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,i)):this.crossVectors(this,t)}},{key:"crossVectors",value:function(t,i){var n=t.x,e=t.y,t=t.z,r=i.x,s=i.y,i=i.z;return this.x=e*i-t*s,this.y=t*r-n*i,this.z=n*s-e*r,this}},{key:"projectOnVector",value:function(t){var i=t.lengthSq();return 0===i?this.set(0,0,0):(i=t.dot(this)/i,this.copy(t).multiplyScalar(i))}},{key:"projectOnPlane",value:function(t){return a.copy(this).projectOnVector(t),this.sub(a)}},{key:"reflect",value:function(t){return this.sub(a.copy(t).multiplyScalar(2*this.dot(t)))}},{key:"angleTo",value:function(t){var i=Math.sqrt(this.lengthSq()*t.lengthSq());return 0===i?Math.PI/2:(t=this.dot(t)/i,Math.acos(e.clamp(t,-1,1)))}},{key:"distanceTo",value:function(t){return Math.sqrt(this.distanceToSquared(t))}},{key:"distanceToSquared",value:function(t){var i=this.x-t.x,n=this.y-t.y,t=this.z-t.z;return i*i+n*n+t*t}},{key:"manhattanDistanceTo",value:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}},{key:"setFromSpherical",value:function(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}},{key:"setFromSphericalCoords",value:function(t,i,n){var e=Math.sin(i)*t;return this.x=e*Math.sin(n),this.y=Math.cos(i)*t,this.z=e*Math.cos(n),this}},{key:"setFromCylindrical",value:function(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}},{key:"setFromCylindricalCoords",value:function(t,i,n){return this.x=t*Math.sin(i),this.y=n,this.z=t*Math.cos(i),this}},{key:"setFromMatrixPosition",value:function(t){t=t.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}},{key:"setFromMatrixScale",value:function(t){var i=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),t=this.setFromMatrixColumn(t,2).length();return this.x=i,this.y=n,this.z=t,this}},{key:"setFromMatrixColumn",value:function(t,i){return this.fromArray(t.elements,4*i)}},{key:"setFromMatrix3Column",value:function(t,i){return this.fromArray(t.elements,3*i)}},{key:"equals",value:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}},{key:"fromArray",value:function(t){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return this.x=t[i],this.y=t[i+1],this.z=t[i+2],this}},{key:"toArray",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return t[i]=this.x,t[i+1]=this.y,t[i+2]=this.z,t}},{key:"fromBufferAttribute",value:function(t,i,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(i),this.y=t.getY(i),this.z=t.getZ(i),this}},{key:"random",value:function(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}}])&&Q(t.prototype,i),n&&Q(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(),a=new c,G=new t;function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function W(t,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,function(t){t=function(t,i){if("object"!=f(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===i?String:Number)(t);n=n.call(t,i||"default");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==f(t)?t:String(t)}(e.key),e)}}var t=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.T={x:Number.MAX_VALUE,y:Number.MAX_VALUE},this.R={x:-Number.MAX_VALUE,y:-Number.MAX_VALUE}}var i,n,e;return i=t,(n=[{key:"min",get:function(){return this.T}},{key:"max",get:function(){return this.R}},{key:"center",get:function(){var t={x:Number.NaN,y:Number.NaN};return this.valid()&&(t.x=(this.min.x+this.max.x)/2,t.y=(this.min.y+this.max.y)/2),t}},{key:"size",get:function(){var t={x:Number.NaN,y:Number.NaN};return this.valid()&&(t.x=this.max.x-this.min.x,t.y=this.max.y-this.min.y),t}},{key:"copy",value:function(t){return this.R.x=t.max.x,this.R.y=t.max.y,this.T.x=t.min.x,this.T.y=t.min.y,this}},{key:"clone",value:function(){return(new t).copy(this)}},{key:"reset",value:function(){this.T={x:Number.MAX_VALUE,y:Number.MAX_VALUE},this.R={x:-Number.MAX_VALUE,y:-Number.MAX_VALUE}}},{key:"toObject",value:function(){return{min:this.min,max:this.max,center:this.center,size:this.size}}},{key:"expand",value:function(t){this.P(t)}},{key:"expandByCoords",value:function(t){this.I(t)}},{key:"valid",value:function(){return this.C()}},{key:"isCross",value:function(t){var i=!0;return t.max.x<this.min.x&&(i=!1),t.min.x>this.max.x&&(i=!1),t.max.y<this.min.y&&(i=!1),i=t.min.y>this.max.y?!1:i}}])&&W(i.prototype,n),e&&W(i,e),Object.defineProperty(i,"prototype",{writable:!1}),t}(),l=(Object.assign(t.prototype,{C:function(){return!(this.min.x>this.max.x||this.min.y>this.max.y)},P:function(t){t&&t.valid()&&(t.min.x<this.min.x&&(this.min.x=t.min.x),t.min.y<this.min.y&&(this.min.y=t.min.y),t.max.x>this.max.x&&(this.max.x=t.max.x),t.max.y>this.max.y)&&(this.max.y=t.max.y)},I:function(t){var i=this;t&&0!=t.length&&t.forEach(function(t){t.x<i.min.x&&(i.min.x=t.x),t.y<i.min.y&&(i.min.y=t.y),t.x>i.max.x&&(i.max.x=t.x),t.y>i.max.y&&(i.max.y=t.y)})}}),t),$=function(t,i,n){n=n||2;var e,r,s,o,h,u=i&&i.length,a=u?i[0]*n:t.length,f=J(t,0,a,n,!0),c=[];if(f&&f.next!==f.prev){if(u&&(f=function(t,i,n,e){var r,s,o,h,u=[];for(r=0,s=i.length;r<s;r++)h=i[r]*e,o=r<s-1?i[r+1]*e:t.length,(h=J(t,h,o,e,!1))===h.next&&(h.steiner=!0),u.push(function(t){var i=t,n=t;for(;(i.x<n.x||i.x===n.x&&i.y<n.y)&&(n=i),i=i.next,i!==t;);return n}(h));for(u.sort(K),r=0;r<u.length;r++)!function(t,i){(i=function(t,i){var n,e=i,r=t.x,s=t.y,o=-1/0;do{if(s<=e.y&&s>=e.next.y&&e.next.y!==e.y){var h=e.x+(s-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(h<=r&&o<h){if((o=h)===r){if(s===e.y)return e;if(s===e.next.y)return e.next}n=e.x<e.next.x?e:e.next}}}while(e=e.next,e!==i);if(!n)return null;if(r!==o){var u,a=n,f=n.x,c=n.y,l=1/0;for(e=n;r>=e.x&&e.x>=f&&r!==e.x&&T(s<c?r:o,s,f,c,s<c?o:r,s,e.x,e.y)&&(u=Math.abs(s-e.y)/(r-e.x),E(e,t))&&(u<l||u===l&&(e.x>n.x||e.x===n.x&&function(t,i){return x(t.prev,t,i.prev)<0&&x(i.next,t,t.next)<0}(n,e)))&&(n=e,l=u),(e=e.next)!==a;);}return n}(t,i))&&(t=nt(i,t),O(i,i.next),O(t,t.next))}(u[r],n),n=O(n,n.next);return n}(t,i,f,n)),t.length>80*n){for(var l=e=t[0],v=r=t[1],y=n;y<a;y+=n)(s=t[y])<l&&(l=s),(o=t[y+1])<v&&(v=o),e<s&&(e=s),r<o&&(r=o);h=0!==(h=Math.max(e-l,r-v))?1/h:0}j(f,c,n,l,v,h)}return c};function J(t,i,n,e,r){var s,o;if(r===0<function(t,i,n,e){for(var r=0,s=i,o=n-e;s<n;s+=e)r+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return r}(t,i,n,e))for(s=i;s<n;s+=e)o=et(s,t[s],t[s+1],o);else for(s=n-e;i<=s;s-=e)o=et(s,t[s],t[s+1],o);return o&&R(o,o.next)&&(P(o),o=o.next),o}function O(t,i){if(!t)return t;i=i||t;var n,e=t;do{if(n=!1,e.steiner||!R(e,e.next)&&0!==x(e.prev,e,e.next))e=e.next;else{if(P(e),(e=i=e.prev)===e.next)break;n=!0}}while(n||e!==i);return i}function j(t,i,n,e,r,s,o){if(t){if(!o&&s){for(var h=t,u=e,a=r,f=s,c=h;null===c.z&&(c.z=tt(c.x,c.y,u,a,f)),c.prevZ=c.prev,c.nextZ=c.next,(c=c.next)!==h;);c.prevZ.nextZ=null,c.prevZ=null;var l,v,y,d,b,m,p,M,k=c,g=1;do{for(v=k,b=k=null,m=0;v;){for(m++,y=v,l=p=0;l<g&&(p++,y=y.nextZ);l++);for(M=g;0<p||0<M&&y;)0!==p&&(0===M||!y||v.z<=y.z)?(v=(d=v).nextZ,p--):(y=(d=y).nextZ,M--),b?b.nextZ=d:k=d,d.prevZ=b,b=d;v=y}}while(b.nextZ=null,g*=2,1<m)}for(var w,S,_=t;t.prev!==t.next;)if(w=t.prev,S=t.next,s?function(t,i,n,e){var r=t.prev,s=t,o=t.next;if(0<=x(r,s,o))return;var h=(r.x<s.x?r.x<o.x?r:o:s.x<o.x?s:o).x,u=(r.y<s.y?r.y<o.y?r:o:s.y<o.y?s:o).y,a=(r.x>s.x?r.x>o.x?r:o:s.x>o.x?s:o).x,f=(r.y>s.y?r.y>o.y?r:o:s.y>o.y?s:o).y,c=tt(h,u,i,n,e),l=tt(a,f,i,n,e),v=t.prevZ,y=t.nextZ;for(;v&&v.z>=c&&y&&y.z<=l;){if(v!==t.prev&&v!==t.next&&T(r.x,r.y,s.x,s.y,o.x,o.y,v.x,v.y)&&0<=x(v.prev,v,v.next))return;if(v=v.prevZ,y!==t.prev&&y!==t.next&&T(r.x,r.y,s.x,s.y,o.x,o.y,y.x,y.y)&&0<=x(y.prev,y,y.next))return;y=y.nextZ}for(;v&&v.z>=c;){if(v!==t.prev&&v!==t.next&&T(r.x,r.y,s.x,s.y,o.x,o.y,v.x,v.y)&&0<=x(v.prev,v,v.next))return;v=v.prevZ}for(;y&&y.z<=l;){if(y!==t.prev&&y!==t.next&&T(r.x,r.y,s.x,s.y,o.x,o.y,y.x,y.y)&&0<=x(y.prev,y,y.next))return;y=y.nextZ}return 1}(t,e,r,s):function(t){var i=t.prev,n=t,e=t.next;if(0<=x(i,n,e))return;var r=t.next.next;for(;r!==t.prev;){if(T(i.x,i.y,n.x,n.y,e.x,e.y,r.x,r.y)&&0<=x(r.prev,r,r.next))return;r=r.next}return 1}(t))i.push(w.i/n),i.push(t.i/n),i.push(S.i/n),P(t),t=S.next,_=S.next;else if((t=S)===_){o?1===o?j(t=function(t,i,n){var e=t;do{var r=e.prev,s=e.next.next}while(!R(r,s)&&it(r,e,e.next,s)&&E(r,s)&&E(s,r)&&(i.push(r.i/n),i.push(e.i/n),i.push(s.i/n),P(e),P(e.next),e=t=s),e=e.next,e!==t);return O(e)}(O(t),i,n),i,n,e,r,s,2):2===o&&function(t,i,n,e,r,s){var o=t;do{for(var h,u=o.next.next;u!==o.prev;){if(o.i!==u.i&&function(t,i){return t.next.i!==i.i&&t.prev.i!==i.i&&!function(t,i){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==i.i&&n.next.i!==i.i&&it(n,n.next,t,i))return 1}while(n=n.next,n!==t);return}(t,i)&&(E(t,i)&&E(i,t)&&function(t,i){var n=t,e=!1,r=(t.x+i.x)/2,s=(t.y+i.y)/2;for(;n.y>s!=n.next.y>s&&n.next.y!==n.y&&r<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(e=!e),n=n.next,n!==t;);return e}(t,i)&&(x(t.prev,t,i.prev)||x(t,i.prev,i))||R(t,i)&&0<x(t.prev,t,t.next)&&0<x(i.prev,i,i.next))}(o,u))return h=nt(o,u),o=O(o,o.next),h=O(h,h.next),j(o,i,n,e,r,s),j(h,i,n,e,r,s);u=u.next}}while(o=o.next,o!==t)}(t,i,n,e,r,s):j(O(t),i,n,e,r,s,1);break}}}function K(t,i){return t.x-i.x}function tt(t,i,n,e,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(i=1431655765&((i=858993459&((i=252645135&((i=16711935&((i=32767*(i-e)*r)|i<<8))|i<<4))|i<<2))|i<<1))<<1}function T(t,i,n,e,r,s,o,h){return 0<=(r-o)*(i-h)-(t-o)*(s-h)&&0<=(t-o)*(e-h)-(n-o)*(i-h)&&0<=(n-o)*(s-h)-(r-o)*(e-h)}function x(t,i,n){return(i.y-t.y)*(n.x-i.x)-(i.x-t.x)*(n.y-i.y)}function R(t,i){return t.x===i.x&&t.y===i.y}function it(t,i,n,e){var r=y(x(t,i,n)),s=y(x(t,i,e)),o=y(x(n,e,t)),h=y(x(n,e,i));return r!==s&&o!==h||0===r&&v(t,n,i)||0===s&&v(t,e,i)||0===o&&v(n,t,e)||!(0!==h||!v(n,i,e))}function v(t,i,n){return i.x<=Math.max(t.x,n.x)&&i.x>=Math.min(t.x,n.x)&&i.y<=Math.max(t.y,n.y)&&i.y>=Math.min(t.y,n.y)}function y(t){return 0<t?1:t<0?-1:0}function E(t,i){return x(t.prev,t,t.next)<0?0<=x(t,i,t.next)&&0<=x(t,t.prev,i):x(t,i,t.prev)<0||x(t,t.next,i)<0}function nt(t,i){var n=new rt(t.i,t.x,t.y),e=new rt(i.i,i.x,i.y),r=t.next,s=i.prev;return(t.next=i).prev=t,(n.next=r).prev=n,(e.next=n).prev=e,(s.next=e).prev=s,e}function et(t,i,n,e){t=new rt(t,i,n);return e?(t.next=e.next,(t.prev=e).next.prev=t,e.next=t):(t.prev=t).next=t,t}function P(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function rt(t,i,n){this.i=t,this.x=i,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function st(t){return function(t){if(Array.isArray(t))return ot(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,i){var n;if(t)return"string"==typeof t?ot(t,i):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ot(t,i):void 0}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ot(t,i){(null==i||i>t.length)&&(i=t.length);for(var n=0,e=new Array(i);n<i;n++)e[n]=t[n];return e}var d={area:function(t){for(var i=t.length,n=0,e=i-1,r=0;r<i;e=r++)n+=t[e].x*t[r].y-t[r].x*t[e].y;return.5*n},isClockWise:function(t){return d.area(t)<0},triangulateShape:function(t,i){var n=[],e=[],r=[],s=(ht(t),ut(n,t),t.length);i.forEach(ht);for(var o=0;o<i.length;o++)e.push(s),s+=i[o].length,ut(n,i[o]);for(var h=$(n,e),u=0;u<h.length;u+=3)r.push(h.slice(u,u+3));return r},triangulate:function(t){(r=[]).push.apply(r,st(t[0]));for(var i=[],n=1;n<t.length;n++){var e=[];e.push.apply(e,st(t[n])),i.push(e)}if(!d.isClockWise(r))for(var r=r.reverse(),s=0,o=i.length;s<o;s++){var h=i[s];d.isClockWise(h)&&(i[s]=h.reverse())}return d.triangulateShape(r,i)}};function ht(t){var i,n=t.length;2<n&&(n=t[n-1],i=t[0],n.x===i.x)&&n.y===i.y&&t.pop()}function ut(t,i){for(var n=0;n<i.length;n++)t.push(i[n].x),t.push(i[n].y)}function b(t){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function at(t,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,function(t){t=function(t,i){if("object"!=b(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===i?String:Number)(t);n=n.call(t,i||"default");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==b(t)?t:String(t)}(e.key),e)}}function ft(t,i,n){return i&&at(t.prototype,i),n&&at(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var m=1e-5,p=.001,ct=Math.PI/180,lt=180/Math.PI,t=ft(function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")});Object.assign(t.prototype,{N:function(){return m},L:function(){return ct},D:function(){return lt},F:function(t){return t<m&&-m<t},A:function(t){return m<t},Y:function(t){return t<-m},V:function(t,i,n){i=(t.x-n.x)*(i.y-n.y)-(i.x-n.x)*(t.y-n.y);return Math.abs(i)<m?0:i},distanceOfTwoPoints:function(t,i){return t&&i?Math.sqrt((t.x-i.x)*(t.x-i.x)+(t.y-i.y)*(t.y-i.y)):Number.NaN},distance:function(t,i){return Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2))},isPolygonContainPoint:function(t,i){for(var n=0,e=0;e<t.length;e++){var r=t[e].x,s=t[e].y,o=0,h=0,h=(e<t.length-1?(o=t[e+1].x,t[e+1]):(o=t[0].x,t[0])).y;if(r===i.x&&s===i.y||o===i.x&&h===i.y)return!0;if(h!==s){var u=r+(i.y-s)*(o-r)/(h-s);if(u===i.x)return!0;r!==o?u<=Math.max(r,o)&&u>=Math.min(r,o)&&u>i.x&&u!==r&&(u===o&&0<(s-i.y)*(h-i.y)?n+=2:n++):u<=Math.max(r,o)&&u>=Math.min(r,o)&&u>i.x&&(u===o&&0<(s-i.y)*(h-i.y)?n+=2:n++)}}return 0<n%2},isPolygonContainPoint2:function(t,i){var n=t.length;if(n<3)return!1;for(var e=n-1,r=0,s=0;s<n;s++){var o=t[s],h=t[e];o.y>i.y!=h.y>i.y&&i.x<(h.x-o.x)*(i.y-o.y)/(h.y-o.y)+o.x&&(o.y>h.y?r++:r--),e=s}return 0!=r},isPolygonInPolygon:function(t,i){var n=Object.assign([],t),e=Object.assign([],i);n.push(n[0]),e.push(e[0]);for(var r=0;r<n.length-1;r++){var s=n[r];if(!this.isPolygonContainPoint(e,s)&&!this.isPolygonContainPoint2(e,s))return!1}for(var o=0;o<n.length-1;o++)for(var h=0;h<e.length-1;h++)if(this.Z(n[o],n[o+1],e[h],e[h+1]).isintersect&&!this.B(e[h],e[h+1],n[o])&&!this.B(e[h],e[h+1],n[o+1]))return!1;return!0},H:function(t,i,n,e){return!(Math.max(t.x,i.x)<Math.min(n.x,e.x)||Math.max(t.y,i.y)<Math.min(n.y,e.y)||Math.max(n.x,e.x)<Math.min(t.x,i.x)||Math.max(n.y,e.y)<Math.min(t.y,i.y))},X:function(t,i,n,e){return!(Math.max(t.x,i.x)<Math.min(n.x,e.x)||Math.max(t.y,i.y)<Math.min(n.y,e.y)||Math.max(n.x,e.x)<Math.min(t.x,i.x)||Math.max(n.y,e.y)<Math.min(t.y,i.y)||0===this.V(n,i,t)&&0===this.V(i,e,t)||this.V(n,i,t)*this.V(i,e,t)<0||this.V(t,e,n)*this.V(e,i,n)<0)},U:function(t,i,n){return!(t.x<i.x||t.y<i.y||t.x>n.x||t.y>n.y)},q:function(t,i,n){var e=Math.min(i.x,n.x),r=Math.max(i.x,n.x),s=Math.min(i.y,n.y),i=Math.max(i.y,n.y);return!(t.x<e||t.x>r||t.y<s||t.y>i)},G:function(t,i,n){var e=Math.min(n.x,i.x),r=Math.max(n.x,i.x),s=Math.min(n.y,i.y),n=Math.max(n.y,i.y);return!(t.x<e||t.x>r||t.y<s||t.y>n)},W:function(t,i,n){for(var e,r,s=!1,o=0;o<n;o++)e=i[o],r=i[(o+1)%n],(e.y<t.y&&r.y>=t.y||r.y<t.y&&e.y>=t.y)&&(e.x<=t.x||r.x<=t.x)&&e.x+(t.y-e.y)/(r.y-e.y)*(r.x-e.x)<t.x&&(s=!s);return s},$:function(t,i,n){return(t.x-i.x)*(n.y-i.y)==(n.x-i.x)*(t.y-i.y)&&Math.min(i.x,n.x)<=t.x&&t.x<=Math.max(i.x,n.x)&&Math.min(i.y,n.y)<=t.y&&t.y<=Math.max(i.y,n.y)},J:function(t,i){return Math.sqrt((t.x-i.x)*(t.x-i.x)+(t.y-i.y)*(t.y-i.y))},K:function(t,i){return(t.x-i.x)*(t.x-i.x)+(t.y-i.y)*(t.y-i.y)},tt:function(t,i,n){var e=i.x,i=i.y,r=n.x,n=n.y,s=t.x,t=t.y,o=r-e,h=n-i,u=o*o+h*h,a=s-e,f=t-i,c=a*a+f*f;return this.F(u)?this.F(c)?0:c:(u=Math.sqrt(u),f=this.A(h=(o=o/u)*a+(a=h/u)*f)?this.Y(h-u)?(f=s-(e+h*o))*f+(u=t-(i+h*a))*u:(e=s-r)*e+(o=t-n)*o:c,this.F(f)?0:f)},it:function(t,i,n,e){var r,s=i.x,o=i.y,h=n.x,u=n.y,a=t.x,t=t.y,f=h-s,c=u-o,l=Math.sqrt(f*f+c*c),v=a-s,y=t-o,d=Math.sqrt(v*v+y*y);return this.F(l)?(e.x=i.x,e.y=i.y,this.F(r=d)?0:r):(r=this.A(c=(f=f/l)*v+(v=c/l)*y)?this.Y(c-l)?(l=a-(y=s+c*f),f=t-(s=o+c*v),o=Math.sqrt(l*l+f*f),e.x=y,e.y=s,o):(c=a-h,v=t-u,l=Math.sqrt(c*c+v*v),e.x=n.x,e.y=n.y,l):(e.x=i.x,e.y=i.y,d),this.F(r)?0:r)},nt:function(t,i){for(var n=0,e=0,r=0,s=0;s<i;s++){var o=t[s],h=t[(s+1)%i],u=(o.x*h.y-o.y*h.x)/2;n+=u,e+=u*(o.x+h.x)/3,r+=u*(o.y+h.y)/3}return{x:e/=n,y:r/=n}},et:function(t){for(var i=d.triangulate([t]),n=0,e=0,r=0,s=0;s<i.length;s++){var o=t[i[s][0]],h=t[i[s][1]],u=t[i[s][2]],a=h.x-o.x,f=h.y-o.y,c=u.x-o.x,a=(a*(u.y-o.y)-c*f)/2;n+=a,e+=(o.x+h.x+u.x)/3*a,r+=(o.y+h.y+u.y)/3*a}return{x:e/n,y:r/n}},rt:function(t,i){if(i<3)return 0;for(var n=0,e=0;e<i;++e){var r=t[e],s=t[(e+1)%i];n+=r.x*s.y-r.y*s.x}return Math.abs(n/2)},st:function(t,i,n,e,r){var s,o;return this.X(t,i,n,e)?(s=(e.x-n.x)*(t.y-i.y)-(i.x-t.x)*(n.y-e.y),o=(t.y-n.y)*(i.x-t.x)*(e.x-n.x)+n.x*(e.y-n.y)*(i.x-t.x)-t.x*(i.y-t.y)*(e.x-n.x),r.x=o/s,s=(t.x-i.x)*(e.y-n.y)-(i.y-t.y)*(n.x-e.x),o=i.y*(t.x-i.x)*(e.y-n.y)+(e.x-i.x)*(e.y-n.y)*(t.y-i.y)-e.y*(n.x-e.x)*(i.y-t.y),r.y=o/s,1):0},ot:function(t,i,n,e,r){var s=Math.min(n.x,e.x),o=Math.max(n.x,e.x),h=Math.min(n.y,e.y),u=Math.max(n.y,e.y),a=t.x,f=t.y,c=n.x,l=n.y,v=e.x,y=e.y;if(90==i)return!(t.x<s||t.x>o||(Math.abs(o-s<p)?t.y>=l&&t.y<=y||t.y>=y&&t.y<=l?(r.x=t.x,r.y=t.y,0):l<y&&t.x<l?(r.x=c,r.y=l,0):!(y<l&&t.x<y)||(r.x=v,r.y=y,0):(r.y=d=(y-l)/(v-c)*(a-c)+l,r.x=a,d<f||!this.G(r,n,e))));if(270==i)return!(t.x<s||t.x>o||(Math.abs(o-s<p)?t.y>=l&&t.y<=y||t.y>=y&&t.y<=l?(r.x=t.x,r.y=t.y,0):l<y&&t.y>y?(r.x=v,r.y=y,0):!(y<l&&t.y>l)||(r.x=c,r.y=l,0):(r.y=d=(y-l)/(v-c)*(a-c)+l,r.x=a,f<d||!this.G(r,n,e))));if(270!=i&&90!=i&&Math.abs(o-s<p)){var t=s,d=Math.tan(i/180*Math.PI)*(t-a)+f;if(r.y=d,r.x=t,this.G(r,n,e))return o=d-f,0<(s=t-a)/Math.sqrt(s*s+o*o)*Math.cos(i/180*Math.PI)}return Math.abs(u-h<=p)?(d=h,t=1/Math.tan(i/180*Math.PI)*(d-f)+a,r.x=t,r.y=d,!!this.G(r,n,e)&&(s=d-f,0<(o=t-a)/Math.sqrt(o*o+s*s)*Math.cos(i/180*Math.PI))):(t=f+(u=Math.tan(i/180*Math.PI))*((d=(l-f-((h=(y-l)/(v-c))*c-u*a))/(u-h))-a),r.x=d,r.y=t,!!this.G(r,n,e)&&(o=d-a,s=t-f,Math.abs(o)<=p&&Math.abs(s)<=p||0<o/Math.sqrt(o*o+s*s)*Math.cos(i/180*Math.PI)))},ht:function(t,i){return Math.abs(t.x-i.x)<m&&Math.abs(t.y-i.y)<m},ut:function(t,i,n,e){var r,s,o,h,u=t.x,a=t.y,f=i.x,c=i.y,l=n.x,v=n.y;return this.ht(t,i)||this.ht(t,n)?(e.x=u,e.y=a,!0):(o=Math.min(i.x,n.x),h=Math.max(i.x,n.x),r=Math.min(i.y,n.y),s=Math.max(i.y,n.y),Math.abs(f-l)<1e-5?(e.x=f,r<=(e.y=a)&&a<=s):Math.abs(c-v)<1e-5?(e.x=u,e.y=c,o<=u&&u<=h):(h=a+(r=-1/((v-c)/(l-f)))*((o=(c-a-((s=(v-c)/(l-f))*f-r*u))/(r-s))-u),e.x=o,e.y=h,!!this.G(e,i,n)||!(!this.ht(t,i)&&!this.ht(t,n))))},ft:function(t,i){return{x:t.y*i.z-t.z*i.y,y:t.z*i.x-t.x*i.z,z:t.x*i.y-t.y*i.x}},ct:function(t,i){return t.x*i.x+t.y*i.y+t.z*i.z},lt:function(t){return Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z)},vt:function(t,i){return t.x*i.x+t.y*i.y},yt:function(t,i){return t.x*i.y-t.y*i.x},dt:function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},bt:function(t,i){var n,e;return 0==t.x&&0==t.y||0==i.x&&0==i.y?0:(n={x:t.x,y:t.y,z:0},e={x:i.x,y:i.y,z:0},n=this.ft(n,e),e=this.vt(t,i),e=Math.acos(e/(this.dt(t)*this.dt(i))),0<n.z?e/Math.PI*180:360-e/Math.PI*180)},Mt:function(t,i,n,e){for(var r=0;r<n.length;r++){var s=n[r],o=n[(r+1)%n.length];if(1==this.st(t,i,s,o,e))return!0}return!1},kt:function(t,i,n,e,r){var s=Math.min(t.x,n.x,e.x),o=Math.max(t.x,n.x,e.x),h=Math.min(t.y,n.y,e.y),u=Math.max(t.y,n.y,e.y),o=Math.sqrt((o-s)*(o-s)+(u-h)*(u-h)),s=i/180*Math.PI,u=o*Math.cos(s)+t.x,h=o*Math.sin(s)+t.y;return 1==this.st(t,{x:u,y:h},n,e,r)},gt:function(t){var i={x:null,y:null},n=0,e=0;1<t.length&&t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y&&t.pop();for(var r=0;r<t.length;r++)n+=t[r].x,e+=t[r].y;return i.x=n/t.length,i.y=e/t.length,i},wt:function(t,i,n,e){var r=[],s=t.x-i,o=t.x+i,h=t.y-i,u=t.y+i,a=Math.min(n.x,e.x),f=Math.max(n.x,e.x),c=Math.min(n.y,e.y),l=Math.max(n.y,e.y);return f<s||o<a||l<h||u<c||(s=e.x-n.x,o=e.y-n.y,(h=(t=(s*(h=t.x-n.x)+o*(u=t.y-n.y))/(e=s*s+o*o))*t-(h*h+u*u-i*i)/e)<0)||(u=Math.sqrt(h),e={x:n.x-s*(i=-t+u),y:n.y-o*i},s={x:n.x-s*(h=-t-u),y:n.y-o*h},i!==h&&(a<=e.x&&e.x<=f&&c<=e.y&&e.y<=l&&r.push(e),a<=s.x)&&s.x<=f&&c<=s.y&&s.y<=l&&r.push(s)),r},St:function(t,i,n){var e,r={};if(t.x!=i.x)return e=i=(i.y-t.y)/(i.x-t.x),i=t.y-i*t.x,r.x=(+n.x- -1*e*n.y-e*i)/(e*e+1),r.y=(e*e*n.y- -1*e*n.x- -1*i)/(e*e+1),r;r.x=t.x,r.y=n.y},Z:function(t,i,n,e){var r,s,o,h,u={point:null,isintersect:!1};return t==n||t==e?(u.isintersect=!0,u.point=t):i==n||i==e?(u.isintersect=!0,u.point=i):(r={x:i.x-t.x,y:i.y-t.y},s={x:e.x-n.x,y:e.y-n.y},o={x:n.x-t.x,y:n.y-t.y},e={x:e.x-t.x,y:e.y-t.y},i={x:i.x-n.x,y:i.y-n.y},n={x:-o.x,y:-o.y},h=this.yt(s,r),Math.abs(h)<=1e-5||this.yt(o,r)*this.yt(e,r)<=-5e-4&&this.yt(n,s)*this.yt(i,s)<-5e-4&&(e=this.yt(s,o)/h,u.point={x:t.x+r.x*e,y:t.y+r.y*e},u.isintersect=!0)),u},_t:function(t,i,n){t.x===i.x&&(i.x=i.x+1),t.y===i.y&&(i.y=i.y+1),i.x===n.x&&(n.x=n.x+1),i.y===n.y&&(n.y=n.y+1);var e=i.x-t.x,t=i.y-t.y,r=n.x-i.x;return!(0<e*(n.y-i.y)-t*r)},getAngle:function(t){var i=t.p1,t=t.p2,n=t.x-i.x,t=t.y-i.y,i=Math.sqrt(n*n+t*t),i=Math.asin(Math.abs(t)/i);return 0<n&&0<t?i:n<0&&0<t?Math.PI-i:n<0&&t<0?Math.PI+i:0<n&&t<0?2*Math.PI-i:0==n&&0<t?i:0==n&&t<0?3*Math.PI/2:0<n&&0==t?i:n<0&&0==t?Math.PI:null},Ot:function(t){var i=this.distanceOfTwoPoints(t[0],t[1]),n=this.distanceOfTwoPoints(t[1],t[2]),t=this.distanceOfTwoPoints(t[0],t[2]),e=(i+n+t)/2;return Math.sqrt(e*(e-i)*(e-n)*(e-t))},jt:function(t,i){var n,e,r,s,o;return this.it(t,i[0],i[1],{})<1e-4||this.it(t,i[0],i[2],{})<1e-4||this.it(t,i[1],i[2],{})<1e-4||(s={x:i[1].x-i[0].x,y:i[1].y-i[0].y},n={x:i[0].x-i[2].x,y:i[0].y-i[2].y},e={x:i[2].x-i[1].x,y:i[2].y-i[1].y},o={x:t.x-i[0].x,y:t.y-i[0].y},r={x:t.x-i[1].x,y:t.y-i[1].y},t={x:t.x-i[2].x,y:t.y-i[2].y},i=this.yt(s,o),s=this.yt(e,r),o=this.yt(n,t),m<i*s&&m<s*o)},Tt:function(t,i,n){var e=n.length,r={isintersect:!1,start:null,end:null,type:0,outer:null},s=[];if(this.jt(t,n)&&(r.start=t),this.jt(i,n)&&(r.end=i),null!=r.start&&null!=r.end)r.isintersect=!0,r.type=1;else{for(var o=(n[1].x+n[2].x)/2,h=(n[1].y+n[2].y)/2,u=1;u<e;u++){var a,f=this.Z(t,i,n[u-1],n[u]);if(f.isintersect){if(null!=r.start)return r.end=f.point,r.isintersect=!0,r.outer="end",a=this.bt({x:o-n[0].x,y:h-n[0].y},{x:i.x-n[0].x,y:i.y-n[0].y}),r.type=0<(a=a<180?a:a-360)?2:3,r;if(null!=r.end)return r.start=f.point,r.isintersect=!0,r.outer="start",a=this.bt({x:o-n[0].x,y:h-n[0].y},{x:t.x-n[0].x,y:t.y-n[0].y}),r.type=0<(a=a<180?a:a-360)?2:3,r;s.push(f)}}var c,l=this.Z(t,i,n[0],n[e-1]);if(l.isintersect){if(null!=r.start)return r.end=l.point,r.isintersect=!0,r.outer="end",c=this.bt({x:o-n[0].x,y:h-n[0].y},{x:i.x-n[0].x,y:i.y-n[0].y}),r.type=0<(c=c<180?c:c-360)?2:3,r;if(null!=r.end)return r.start=l.point,r.isintersect=!0,r.outer="start",c=this.bt({x:o-n[0].x,y:h-n[0].y},{x:t.x-n[0].x,y:t.y-n[0].y}),r.type=0<(c=c<180?c:c-360)?2:3,r;s.push(l)}2!=s.length||this.distanceOfTwoPoints(s[0].point,s[1].point)<.01||(this.distanceOfTwoPoints(s[0].point,t)<=this.distanceOfTwoPoints(s[0].point,i)?(r.start=s[0].point,r.end=s[1].point):(r.start=s[1].point,r.end=s[0].point),r.isintersect=!0,r.type=4)}return r},xt:function(t,i,n){var e=n.length,r={isintersect:!1,start:null,end:null},s=[];if(this.jt(t,n)&&(r.start=t),this.jt(i,n)&&(r.end=i),null!=r.start&&null!=r.end)r.isintersect=!0;else{for(var o=1;o<e;o++){var h=this.Z(t,i,n[o-1],n[o]);if(h.isintersect){if(null!=r.start)return r.end=h.point,r.isintersect=!0,r;if(null!=r.end)return r.start=t,r.isintersect=!0,r;s.push(h)}}var u=this.Z(t,i,n[0],n[e-1]);if(u.isintersect){if(null!=r.start)return r.end=u.point,r.isintersect=!0,r;if(null!=r.end)return r.start=t,r.isintersect=!0,r;s.push(u)}2==s.length&&(r.start=(this.distanceOfTwoPoints(s[0].point,t)<=this.distanceOfTwoPoints(s[0].point,i)?s[0]:s[1]).point,r.end=(this.distanceOfTwoPoints(s[0].point,t)>this.distanceOfTwoPoints(s[0].point,i)?s[0]:s[1]).point,r.isintersect=!0)}return r},Rt:function(r,t){if(0==t.length)return[r];for(var i,n,e=this.Et(t),s=[],o=(e.sort(function(t,i){var n=(t.Pt.x-r.Pt.x)*(t.Pt.x-r.Pt.x)+(t.Pt.y-r.Pt.y)*(t.Pt.y-r.Pt.y),e=(i.Pt.x-r.Pt.x)*(i.Pt.x-r.Pt.x)+(i.Pt.y-r.Pt.y)*(i.Pt.y-r.Pt.y),t=(t.It.x-r.Pt.x)*(t.It.x-r.Pt.x)+(t.It.y-r.Pt.y)*(t.It.y-r.Pt.y),i=(i.It.x-r.Pt.x)*(i.It.x-r.Pt.x)+(i.It.y-r.Pt.y)*(i.It.y-r.Pt.y);return(n<t?n:t)<(e<i?e:i)}),0),o=0;o<e.length;o++)this.distanceOfTwoPoints(e[o].Pt,e[o].It)<.01||(i=this.distanceOfTwoPoints(e[o].Pt,r.Pt),n=this.distanceOfTwoPoints(e[o].It,r.Pt),i<.01?r.Pt=e[o].It:n<.01?r.Pt=e[o].Pt:i<n?.1<this.distanceOfTwoPoints(r.Pt,e[o].Pt)&&(s.push({Ct:r.Ct,Pt:r.Pt,It:e[o].Pt,J:r.J,Nt:r.Nt}),r.Pt=e[o].It):.1<this.distanceOfTwoPoints(r.Pt,e[o].It)&&(s.push({Ct:r.Ct,Pt:r.Pt,It:e[o].It,J:r.J,Nt:r.Nt}),r.Pt=e[o].Pt),e.splice(o,1));return.1<this.distanceOfTwoPoints(r.Pt,r.It)&&s.push(r),s},Et:function(t){var i=[];if(1==t.length)return t;for(var n=t[0],e=1;0<t.length;){if(e>=t.length){if(i.push(n),t.splice(0,1),t.length<1)break;n=t[0],e=1}if(1===t.length){i.push(n);break}this.B(n.Pt,n.It,t[e].Pt)?(this.B(n.Pt,n.It,t[e].It)||(n.It=t[e].It),t.splice(e,1)):this.B(n.Pt,n.It,t[e].It)?(n.Pt=t[e].Pt,t.splice(e,1)):this.B(t[e].Pt,t[e].It,n.Pt)?(n=(this.B(t[e].Pt,t[e].It,n.It)||(t[e].It=n.It),t[e]),t.splice(e,1)):this.B(t[e].Pt,t[e].It,n.It)?(t[e].Pt=n.Pt,n=t[e],t.splice(e,1)):e++}return i},B:function(t,i,n){var e=t.x-n.x,r=t.y-n.y,s=i.x-n.x,o=i.y-n.y,h=this.distanceOfTwoPoints(t,n),n=this.distanceOfTwoPoints(i,n),t=this.distanceOfTwoPoints(t,i);return e*o-r*s<1e-5&&h+n-t<.001}});var w=new t,vt={Drive:1,Walk:0},t={BROWSER:0,WX:1},yt=(Object.freeze(t),{document:"undefined"!=typeof document?document:{},window:"undefined"!=typeof window?window:{},environment:t.BROWSER,XMLHttpRequest:"undefined"!=typeof XMLHttpRequest?XMLHttpRequest:{}}),dt={Auto:1,SpecifiedDistance:2},t={RIGHT:2,LEFT:4,BOTTOM:8,TOP:16,RIGHT_BOTTOM:32,LEFT_BOTTOM:64,RIGHT_TOP:128,LEFT_TOP:256,CENTER:512},bt=(Object.freeze(t),t);function mt(t,i){var n,e,r,s,o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(o)return e=!(n=!0),{s:function(){o=o.call(t)},n:function(){var t=o.next();return n=t.done,t},e:function(t){e=!0,r=t},f:function(){try{n||null==o.return||o.return()}finally{if(e)throw r}}};if(Array.isArray(t)||(o=Mt(t))||i&&t&&"number"==typeof t.length)return o&&(t=o),s=0,{s:i=function(){},n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},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.")}function M(t){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pt(t){return function(t){if(Array.isArray(t))return kt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Mt(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mt(t,i){var n;if(t)return"string"==typeof t?kt(t,i):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kt(t,i):void 0}function kt(t,i){(null==i||i>t.length)&&(i=t.length);for(var n=0,e=new Array(i);n<i;n++)e[n]=t[n];return e}function gt(t,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,function(t){t=function(t,i){if("object"!=M(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===i?String:Number)(t);n=n.call(t,i||"default");if("object"!=M(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==M(t)?t:String(t)}(e.key),e)}}var t=function(){function i(t){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");this.Lt=t.type,this.stepLength=.7,this.Dt=180/Math.PI,this.Ft=[295829355.45,147914677.73,73957338.86,36978669.43,18489334.72,9244667.36,4622333.68,2311166.84,1155583.42,577791.71,288895.85,144447.93,72223.96,36111.98,18056,9028,4514,2257,1128,564,282,141,70,35,17,8,4,2,1],this.At=null,this.Yt=null,this.Vt=5,this.Zt=!0,this.Bt=.2,this.zt=!1,this.Ht=!0,this.Xt=!1,this.Ut=1.2,this.qt=80,this.Qt=30,this.Gt=21,this.Wt=!0,this.$t=22,this.Jt=1.3,this.Kt="",this.ti=100,this.ii=3,this.ni=1,this.ei=6,this.ri=10,this.si=5,this.oi=0,this.hi=!1,this.ui=!1,this.ai=!1,this.fi=!1,this.ci=0,this.li=0,this.vi=0,this.yi=0,this.di=null,this.bi=null,this.mi=!1,this.pi=null,this.Mi=null,this.ki=!1,this.gi=!1,this.wi=null,this.Si=0,this._i=V.ZH,this.Oi=A.MODULE_SHORTEST,this.ji=Y.PRIORITY_DEFAULT,this.Ti=!1,this.xi=!0,this.Ri=[],this.Ei=!1,this.Pi=!1,this.Ii=new Map,this.Ci=!0,this.crossCircles,this.Ni=dt.Auto,this.Li={radius:.5,dash:{size:4,gap:2}},this.Di="#002FA7",this.Fi=!0,this.Ai=0,this.Yi=new X,this.Vi=new z,this.Zi=(window&&"undefined"!==window.fengmap?window:getApp().globalData).fengmap,this.on=this.on.bind(this),this.Bi(t),this.zi()}var t,n,e;return t=i,(n=[{key:"locationMarker",get:function(){return this.Hi},set:function(t){this.Hi=t}},{key:"lineFillMode",get:function(){return this.Ni},set:function(t){this.Ni=t}},{key:"naviResult",get:function(){return this.Xi}},{key:"followPosition",get:function(){return this.Zt},set:function(t){this.Zt=t}},{key:"on",value:function(t,i){this.Vi.h(t,i)}},{key:"off",value:function(t,i){this.Vi.M(t,i)}},{key:"dispose",value:function(){this.stop(),this.At=null,this.Yt&&(this.Yt.dispose(),this.Yt=null)}},{key:"setLanguage",value:function(t){this._i!=t&&(this._i=t,this.Ui())}},{key:"setObstructions",value:function(t){this.Yt.setObstructions(t)}},{key:"setStartPoint",value:function(t,i){this.qi=Object.assign({},this.qi,t,{x:t.x,y:t.y,level:t.level,buildingID:t.buildingID,height:"number"==typeof t.height?t.height:this.ei});var n=null;return n=t.url&&!i?this.Qi(this.qi,!0):n}},{key:"setDestPoint",value:function(t,i){this.Gi=Object.assign({},this.Gi,t,{x:t.x,y:t.y,level:t.level,buildingID:t.buildingID,height:"number"==typeof t.height?t.height:this.ei});var n=null;return n=t.url&&!i?this.Qi(this.Gi,!1):n}},{key:"route",value:function(t,i,n){this.Bi(t),this.Wi(),this.$i({mode:t.mode,priority:t.priority,toDoors:t.toDoors,obstruct:this.xi,viapoints:t.viapoints,barrierFree:t.barrierFree},i,n)}},{key:"naviConstraint",value:function(t){if(this.qi&&this.Gi){null==this.Ji&&this.Ki(),t.buildingID=void 0!==t.buildingID?t.buildingID:null;var i={},n=[],e=Number.MAX_VALUE,r=0,s={index:-1,coords:{level:t.level,buildingID:t.buildingID},angle:null,distance:Number.MAX_VALUE,distanceToNext:Number.MAX_VALUE,remain:this.tn,relDirection:1,time:null,dots:[],insertIndex:-1,toNext:null,buildingIndex:-1};this.nn&&this.nn.coords.buildingID!==t.buildingID&&(this.nn.insertIndex=-1);for(var o=0;o<this.Ji.length;o++){if(this.Ji[o].bid!==t.buildingID);else for(var h=this.Ji[o].naviPoints,u=1;u<h.length;u++){var a,f,c=h[u-1],l=h[u],v=c.index-r;this.nn&&this.nn.index>c.index||(v=this.en[o].result.naviDescriptionsData[v].endPoint,c.level===t.level&&l.level===t.level&&(a=w.it(t,c,l,i))<e&&(1===u||null===this.nn||this.nn&&this.nn.coords.buildingID===t.buildingID&&this.nn&&this.nn.insertIndex<=u)&&(null!=this.rn&&(f=(t.x-this.rn.x)*(l.x-c.x)+(t.y-this.rn.y)*(l.y-c.y),0===Math.abs(f)&&null!=this.nn?s.relDirection=this.nn.relDirection:f<0&&(s.relDirection=-1)),s.distance=a,Object.assign(s.coords,i),s.angle=this.sn(c,l),s.index=c.index,s.distanceToNext=w.J(i,v),s.insertIndex=u,s.toNext=w.J(i,l),s.buildingIndex=o,this.hn(s),n.push(Object.assign({},s)),e=a))}r+=this.en[o].result.naviDescriptionsData.length}var y=s;if(this.nn)for(var d=n.length-2;0<=d;d--)n[d].remain>=y.remain&&n[d].remain<this.nn.remain&&(n[d].distance<=y.distance||Math.abs(4<=y.insertIndex-this.nn.insertIndex)&&y.buildingIndex==this.nn.buildingIndex)&&(y=n[d]);return y.time=t.time,this.rn=t,y.remain<.5?this.nn=null:this.nn=y,y}}},{key:"pathConstraint",value:function(t,i){return this.Yt?this.Yt.pathConstraint(t,i):null}},{key:"locate",value:function(t,i){this.ui&&this.stop(),this.un(t,i),this.rn=t}},{key:"locateNoConstraint",value:function(t,i){this.ui&&this.stop(),this.an(t,i),this.rn=t}},{key:"clearLocationMarker",value:function(){this.Hi&&(this.Hi.remove(),this.Hi=null)}},{key:"clearMarkers",value:function(){this.fn&&(this.fn.remove(),this.fn=null,this.qi=null),this.cn&&(this.cn.remove(),this.cn=null,this.Gi=null)}},{key:"drawNaviLine",value:function(t){if(this.qi&&this.Gi)return this.ln=this.vn(this.yn,t),this.ln}},{key:"clearNaviLine",value:function(){this.ln&&(this.ln.remove(),this.ln=null)}},{key:"clearAll",value:function(){this.clearMarkers(),this.clearNaviLine(),this.clearLocationMarker()}},{key:"overview",value:function(t,i){var n=this;if(0!==this.yn.length){for(var e=new l,r=[],s=0;s<this.yn.length;s++)!function(){var i=[Number.MAX_VALUE,-Number.MAX_VALUE];n.yn[s].resultbuild.forEach(function(t){i[0]=Math.min(i[0],t.level),i[1]=Math.max(i[1],t.level),e.I(t.pointList)}),r.push({bid:n.yn[s].bid,levelRange:i})}();this.dn(t,e,r,i)}}},{key:"focusNaviLineSegment",value:function(t,i,n){if(0!=this.en.length){for(var e,r,s,o=null,h=null,u=0;u<this.en.length;u++){var a=this.en[u].result.naviDescriptionsData;if(t-a.length<0){o=a[t],h=this.en[u].bid;break}t-=a.length}h&&o&&((e=new l).I([o.startPoint,o.endPoint]),r=[Math.min(o.startLevel,o.endLevel),Math.max(o.startLevel,o.endLevel)],s=this.At.getBuilding(h),this.dn(i,e,r,s,n))}}},{key:"simulate",value:function(t){var i,n,e=this;this.qi&&this.Gi&&0!==this.yn.length&&(this.ui&&this.stop(),this.ui=!0,this.Bi(t),i={},this.mi=!1,this.pi=this.At.getRotation(),n=i.Ut||this.Ut,i.Gt=i.Gt||this.Gt||0,this.bn(),this.Hi.rotateTo({heading:-this.pi}),this.Zt?this.mn(this.qi.level,this.qi.buildingID,n,function(){e.ui&&e.pn(e.qi,n,function(){var t;e.ui&&(t=i.Gt>e.$t?e.$t:i.Gt,e.Wt?e.Mn(e.qt,n,function(){e.ui&&e.kn(t,n,function(){e.ui&&e.gn()})}):e.kn(t,n,function(){e.ui&&e.gn()}))})}):this.ui&&this.gn())}},{key:"pause",value:function(){this.fi=!0}},{key:"resume",value:function(){this.fi=!1}},{key:"stop",value:function(){this.hi=!0,this.Yi.stop(),this.wn&&this.At.off("update",this.wn),this.fi=!1,this.bi=null,this.Mi=null,this.vi=0,this.mi=!1,this.wi=null,this.Si=0,this.ki=!1,this.gi=!1,this.wn=null,this.ui=!1,this.ai=!1,this.ci=0,this.li=0,this.di=null,this.nn=null}},{key:"getSpeed",value:function(){return this.Vt}},{key:"setSpeed",value:function(t){this.Vt=t}},{key:"addZoomCircle",value:function(t){if(0!=t.length){var i,n=null==t[0].buildingID?null:t[0].buildingID;this.Ii.has(n)?i=this.Ii.get(n):(i=new Map,this.Ii.set(n,i));for(var e,r=0;r<t.length;r++)i.has(t[r].level)||i.set(t[r].level,[]),(e=i.get(t[r].level)).push.apply(e,pt(t[r].circle))}}},{key:"stopZoomCircle",value:function(){this.Ci=!1}},{key:"constraintTrack",value:function(t){return this.Yt.constraintTrack(t)}},{key:"setLineFillMode",value:function(t){this.Ni=t}},{key:"setPassedLineDistance",value:function(t){this.ln&&this.Ni==dt.SpecifiedDistance&&this.ln.moveProportion(t/this.tn)}}])&&gt(t.prototype,n),e&&gt(t,e),Object.defineProperty(t,"prototype",{writable:!1}),i}(),wt=(Object.assign(t.prototype,{Bi:function(t){t&&(void 0!==t.map&&(this.At=t.map),void 0!==t.analyser&&(this.Yt=t.analyser),void 0!==t.speed&&(this.Vt=t.speed),void 0!==t.followSpeed&&(this.Bt=t.followSpeed),void 0!==t.followPosition&&(this.Zt=t.followPosition),void 0!==t.followAngle&&(this.zt=t.followAngle),void 0!==t.locationMarkerFollowAngle&&(this.Ht=t.locationMarkerFollowAngle),void 0!==t.isMultiLevels&&(this.Xt=t.isMultiLevels),void 0!==t.inTime&&(this.Ut=t.inTime),void 0!==t.tiltAngle&&(this.qt=t.tiltAngle),void 0!==t.changeFloorTiltAngle&&(this.Qt=t.changeFloorTiltAngle),void 0!==t.changeTiltAngle&&(this.Wt=t.changeTiltAngle),void 0!==t.zoom&&(this.Gt=t.zoom),void 0!==t.maxZoom&&(this.$t=t.maxZoom),void 0!==t.extendScale&&(this.Jt=t.extendScale),void 0!==t.locationMarkerUrl&&(this.Kt=t.locationMarkerUrl),void 0!==t.locationMarkerSize&&(this.ti=t.locationMarkerSize),void 0!==t.locationMarkerHeight&&(this.ii=t.locationMarkerHeight),void 0!==t.lineMarkerHeight&&(this.ni=t.lineMarkerHeight),void 0!==t.imageMarkerHeight&&(this.ei=t.imageMarkerHeight),void 0!==t.directionAssert&&(this.ri=t.directionAssert),void 0!==t.combineAsset&&(this.si=t.combineAsset),void 0!==t.completeDistance&&(this.oi=t.completeDistance),void 0!==t._i&&(this.ri=t.directionAssert),void 0!==t.mode&&(this.Oi=t.mode),void 0!==t.priority&&(this.ji=t.priority),void 0!==t.toDoors&&(this.Ti=t.toDoors),void 0!==t.obstruct&&(this.xi=t.obstruct),void 0!==t.viapoints&&(this.Ri=t.viapoints),void 0!==t.barrierFree&&(this.Ei=t.barrierFree),void 0!==t.lineStyle&&Object.assign(this.Li,t.lineStyle),void 0!==t.linePassed&&(this.Fi=t.linePassed),void 0!==t.lineFillMode)&&(this.Ni=t.lineFillMode)},zi:function(){1===this.Lt?this.Sn=void 0!==this.Zi.FMNaviDriveAnalyser&&this.Yt instanceof this.Zi.FMNaviDriveAnalyser:this.Sn=void 0!==this.Zi.FMNaviAnalyser&&(this.Yt instanceof this.Zi.FMNaviAnalyser||this.Yt instanceof this.Zi.FMNaviWalkAnalyser),this.qi=null,this.Gi=null,this.fn=null,this.cn=null,this.Hi=null,this.wn=null,this.Wi()},bn:function(){this.Hi instanceof this.Zi.FMLocationMarker?this.Hi.moveTo({buildingID:this.qi.buildingID,level:this.qi.level,x:this.qi.x,y:this.qi.y}):this.Hi=new this.Zi.FMLocationMarker({id:"location",buildingID:this.qi.buildingID,level:this.qi.level,x:this.qi.x,y:this.qi.y,url:this.Kt||"",size:this.ti,height:this.ii}),this.Hi.addTo(this.At)},_n:function(t){for(var i,n=arguments.length<=1?0:arguments.length-1,e=0;e<n;e++){var r=e+1<1||arguments.length<=e+1?void 0:arguments[e+1];if(t[r])return t[r]}return(i=(arguments.length<=1?0:arguments.length-1)-1+1)<1||arguments.length<=i?void 0:arguments[i]},On:function(t){if(this.qi&&this.Gi)return t==this.qi.level||t==this._detData.level},Wi:function(){this.Xi=null,this.jn=[],this.Tn=[],this.yn=[],this.xn=[],this.en=[],this.Ji=[],this.Rn=[],this.En=[],this.tn=0,this.Pn=[],this.nn=null,this.rn=null},Qi:function(t,i){if(t.level){var n=t.url||(i?"image/small/marker/nav_location_start.png":"image/small/marker/nav_location_dest.png"),e=i?this.fn:this.cn,r=(e&&e.remove(),(null!=t.buildingID?this.At.getBuilding(t.buildingID):this.At).getFloor(t.level));if(r)return(e=new this.Zi.FMImageMarker(Object.assign({map:this.At,url:n,callback:function(){t.callback&&t.callback(e)},anchor:bt.BOTTOM,depth:!1,collision:!1},t))).addTo(r),i?this.fn=e:this.cn=e,e}},$i:function(t,i,n){var e=this;this.qi&&this.Gi&&(t=Object.assign({start:Object.assign({},this.qi),dest:Object.assign({},this.Gi)},t),this.In(t,function(t){e.Xi=t,e.Cn(),e.crossCircles=e.Nn(e.yn,e.Ii),e.Ln(),e.Dn(),e.Fn(),e.Ki(),i&&i(t)},function(t){n&&n(t)}))},Cn:function(){if(this.Xi&&this.Xi.subs&&0!=this.Xi.subs.length){for(var t=this.Xi.subs[0].buildingID,i=[],n=[],e=[],r=0;r<this.Xi.subs.length;r++){var s=this.Xi.subs[r];s.buildingID!==t&&(e.push({bid:t,result:i}),i=[],t=s.buildingID),i.push(s),r==this.Xi.subs.length-1&&e.push({bid:t,result:i})}for(var o=0;o<e.length;o++){var h=this.An(e[o].result);n.push({bid:e[o].bid,resultbuild:h})}this.jn=e,this.yn=n}},An:function(t){for(var i=[],n=Number.NaN,e=null,r=0;r<t.length;r++){var s,o=t[r];n!=o.levels[0]&&((e={length:0,level:o.levels[0],pointList:[]}).pointList.push(o.waypoint.points[0]),i.push(e),n=o.levels[0]),o.levels[0]==o.levels[1]?((s=e.pointList).push.apply(s,pt(o.waypoint.points.slice(1))),e.length+=o.distance):(e={length:0,level:o.levels[0],pointList:[o.waypoint.points[0]]},i.push(e),e={length:0,level:o.levels[1],pointList:[o.waypoint.points[1]]},i.push(e))}return i},Ln:function(){for(var t=0;t<this.yn.length;t++){var i=this.yn[t].resultbuild;this.Yn(i)}},Yn:function(t){for(var i=0;i<t.length-1;i++){var n,e,r=t[i];r.length&&(n=r.pointList[r.pointList.length-1],e=t[i+1].pointList[0],.2<w.J(n,e))&&r.pointList.push(Object.assign({},e))}},Dn:function(){for(var t=0;t<this.yn.length;t++){var i=this.yn[t].resultbuild,i=this.Vn(i);this.xn.push({bid:this.yn[t].bid,groupsPoints:i})}},Vn:function(t){for(var i=[],n=null,e=null,r=0;r<t.length;r++){var s=t[r],o=n==s.level;0==s.length&&0!=r&&r!=t.length-1||(o||(n=s.level,e&&i.push(e),e={level:s.level,pointList:[]}),e.pointList=e.pointList.concat(s.pointList))}return e&&i.push(e),i},Fn:function(){if(this.Xi)for(var t=0;t<this.jn.length;t++){var i=this.jn[t].bid,n=this.jn[t].result,n=this.Ui(n);this.en.push({bid:i,result:n}),this.tn+=n.naviDistance}},Ui:function(t){if(t){for(var i=[],n=[],e=[],r=0,s=this._i,o=t,h=0,u=null,a=0;a<o.length;a++){var f=o[a],c=f.waypoint.points,l=f.waypoint.direction[s],l=(i.push(f.instruction[s]),{startDirection:l[0],startIndex:void 0,startLevel:f.levels[0],startPoint:c[0],endDirection:l[1],endIndex:void 0,endLevel:f.levels[1],endPoint:c.slice(-1)[0],distance:f.distance});f.levels[0]==f.levels[1]?(l.startIndex=h,h+=c.length-1,l.endIndex=h):h=0,n.push(l),null!=u&&f.levels[0]==f.levels[1]||(u={level:f.levels[1],distance:0},e.push(u)),u.distance+=f.distance,r+=f.distance}return{naviDescriptions:i,naviDescriptionsData:n,naviFloorsDistance:e,naviDistance:r}}},Ki:function(){if(this.jn){for(var t=0,i=[],n=0;n<this.jn.length;n++){for(var e=this.jn[n].result,r=this.jn[n].bid,s=this.Zn(e),o=this.Bn(e),h=0;h<s.length;h++)s[h].index+=t;for(var u=0;u<o.length;u++)o[u].index+=t;var a=this.en[n].result.naviDistance;t+=e.length,i.push({bid:r,distance:a,naviPoints:s,naviSubPoints:o})}this.Ji=i}},Zn:function(t){if(!t)return[];for(var i=[],n=t,e=0;e<n.length;e++){var r=n[e];if(r.levels[0]==r.levels[1])for(var s=e+1==n.length?null:n[e+1],o=r.waypoint.points,h=null==s||s.levels[0]!=s.levels[1]?o.length:o.length-1,u=0;u<h;u++){var a={x:o[u].x,y:o[u].y,z:0,level:r.levels[0],index:e};i.push(a)}}return i},Bn:function(t){if(!t)return[];for(var i=[],n=t,e=0;e<n.length;e++){var r=n[e].waypoint.points,s={x:r[0].x,y:r[0].y,level:r[0].level,index:e};i.push(s),e==n.length-1&&(s={x:r.slice(-1)[0].x,y:r.slice(-1)[0].y,level:r.slice(-1)[0].level,index:n.length},i.push(s))}return i},zn:function(t,i){var n=null;if(0!=t.length){for(var e=[],r=0;r<t.length;)t[r].distance==i&&e.push(t[r]),r+=1;if(1<e.length){for(var s=0;s<e.length;s++)if(0<=e[s].relDirection){n=e[s];break}n=n||e[0]}else 1==e.length&&(n=e[0])}return n},hn:function(t){if(-1!=t.buildingIndex&&-1!==t.insertIndex){for(var i,n,e=t.buildingIndex,r=this.Ji[e].naviPoints,s=0,o=r.length-1;o>t.insertIndex;o--)o-1>=t.insertIndex&&(i=r[o],n=r[o-1],i.level===n.level)&&(s+=w.J(i,n));r[t.insertIndex]&&r[t.insertIndex].level===t.coords.level&&(s+=w.J(r[t.insertIndex],t.coords));for(var h=e+1;h<this.Ji.length;h++)s+=this.Ji[h].distance;t.remain=s}},vn:function(t,i){var r=this;if(0===t.length)return null;1!==this.Lt||this.Li.hasOwnProperty("color")||(this.Li.color=this.Di);for(var n=Object.assign({},this.Li),s=(i&&i.style&&Object.assign(n,i.style),i&&i.height?i.height:this.ni),o=[],e=0;e<t.length;e++)for(var h=t[e].bid,u=t[e].resultbuild,a=0;a<u.length;a++)!function(){var t=u[a],i=t.pointList;if(0===i.length)return;var t=t.level,n=[],e=(i.forEach(function(t){var i=parseFloat(""+t.x),t=parseFloat(""+t.y);n.push({x:i,y:t,z:s})}),i.length<2&&(e=parseFloat(""+i[0].x),i=parseFloat(""+i[0].y),n.push({x:e,y:i,z:s})),new r.Zi.FMSegment);e.level=t,e.points=n,e.buildingID=h,o.push(e)}();n=new this.Zi.FMLineMarker(Object.assign({segments:o},n));return n.passed=i&&null!=i.passed?i.passed:this.Fi,n.addTo(this.At),n},In:function(t,i,n){var e=this;this.Yt.route(t,function(t){e.Ti&&t.door&&(e.Gi.x=t.door.x,e.Gi.y=t.door.y),i&&i(t)},function(t){n&&n(t)})},pn:function(t,i,n){this.At.setCenter({x:t.x,y:t.y,animate:"number"==typeof i,duration:"number"==typeof i?i:0,finish:n})},Mn:function(t,i,n){this.At.setTilt({tilt:t,animate:"number"==typeof i,duration:"number"==typeof i?i:0,finish:n})},Hn:function(t,i,n){this.At.setRotation({rotation:t,animate:"number"==typeof i,duration:"number"==typeof i?i:0,finish:n})},kn:function(t,i,n){this.At.setZoom({zoom:t,animate:"number"==typeof i,duration:"number"==typeof i?i:0,finish:n},!0)},mn:function(t,i,n,e){var r,i=null==i?((r=this.At).setVisibleLevels([t]),r.getLevel()):((r=this.At.getBuilding(i)).setVisibleLevels([t]),r.level);return i==t?(e&&e(),null):r.setLevel({level:t,animate:"number"==typeof n,duration:"number"==typeof n?n:0,finish:e})},Xn:function(t){var i=this.Tn;if(0===i.length)return[];for(var n=[],e=0,r=0;r<i.length;r++){var s=i[r];if(!(s.pointList.length<=1))for(var o=s.level,h=0;h<s.pointList.length;h++){for(var u=s.pointList[h],u=new c(u.x,0,u.y),a=(u.level=o,-1),f=1;f<t.length;f++)if(e<t[f].Un){a=t[f-1].qn;break}u.qn=-1!==a?a:t[t.length-1].qn,n.push(u),e++}}return n},Qn:function(t,i){if(0===i)return t[0];for(var n,e,r=0,s=0,o=t[0],h=1;h<t.length;h++)if((n=t[h]).bid!==o.bid)o=n;else if(n.level!==o.level)o=n;else{if(i<=(r+=(e=n.clone().sub(o)).length()))return e.normalize(),(e=o.clone().add(e.clone().multiplyScalar(i-s))).level=n.level,e.index=n.qn!=o.index?o.index:n.qn,e.bid=(n.bid!=o.bid?o:n).bid,e;(o=n.clone()).level=n.level,o.index=n.qn,o.bid=n.bid,s=r}var u=t[t.length-1];return u.index=u.qn,u.bid=u.bid,u},Gn:function(t){var e,r,s,i,n;return t&&0!==t.length?(r=0,s=e=-1,t=t.map(function(t,i){var n=new c(t.startPoint.x,0,t.startPoint.y);return n.level=t.startLevel,n.qn=i,e=i,t.startLevel!==t.endLevel?(r+=s,n.Un=r,r++):n.Un=t.startIndex+r,s=t.endIndex,n}),i=this._naviDescriptionsData[this._naviDescriptionsData.length-1],(n=new c(i.endPoint.x,0,i.endPoint.y)).level=i.endLevel,n.qn=e+1,n.Un=i.endIndex+r,t.push(n),t):[]},Wn:function(t){var i,n,e,r=this;this.Hi&&(this.gi?(i={x:t.x,y:t.y,height:this.Hi.height,level:t.level,buildingID:t.bid},this.Hi.moveTo(i),this.gi=!1):(n=(i={}).Ut||this.Ut,i.Gt=i.Gt||this.Gt||0,e=i.Gt>this.$t?this.$t:i.Gt,this.Xt||(this.$n(t),this.Hi.visible=!0),this.Wt&&this.Mn(this.qt,n,null),this.pn(t,n,function(){r.kn(e,n,function(){r.ki=!1})})))},Jn:function(t){this.Hi&&(this.$n(t),this.gi=!1)},sn:function(t,i){var n=new c(0,0,1),t=new c(t.x,0,t.y),i=new c(i.x,0,i.y).clone().sub(t).normalize(),t=i.angleTo(n)*w.D();return 0<i.clone().cross(n).y?360-t:t},Kn:function(t,i,n){return t===i?t:(180<Math.abs(i-t)&&(t<i?t+=360:i+=360),(t*(1-n)+i*n)%360)},te:function(t,i){var n=this.Ft,e=Math.floor(t),r=n[e-1]*(1-t%1)+n[e]*(t%1);for(r*=i,e=0;r<n[e];)e++;return e+1-(r-n[e])/(n[e-1]-n[e])},ie:function(t){var i,n,e;this.hi||yt.window.requestAnimationFrame(this.ie.bind(this,t)),this.ai||(t.cnt++,t.cnt!==t.step)||(t.cnt=0,i=this.Yi.getDelta(),this.gi)||this.ki||this.fi||(this.vi+=this.Vt*i,this.vi<=0)||this.Vt*i==0||(i=Object.assign({},this.Qn(t.ps,this.vi)),n=this.tn-this.vi,e=i.y,i.y=i.z,i.z=e,this.di={distance:0,remain:n<this.yi?this.yi:n,walk:this.vi,point:i,level:i.level,buildingID:i.bid,index:i.index-1},null!=this.bi&&(this.Mi=this.sn(this.bi,i)),this.bi=Object.assign({},i),!i||n<this.yi&&this.mi?this.ai=!0:(n<this.yi&&!this.mi&&(this.mi=!0),this.Si||(this.Si=t.ps[0].level),null==this.wi&&(this.wi=t.ps[0].bid||"outdoor"),this.ui&&(e=i.bid||"outdoor",this.wi!==e?(this.gi=!0,this.wi=e,this.ci++,this.li=0,this.Si=i.level,this.ne(1,i),this.Vi.k({type:"transit",level:i.level,buildingID:i.bid})):this.Si!==i.level&&(this.Si=i.level,this.li++,this.ne(0,i),this.Vi.k({type:"transit",level:i.level,buildingID:i.bid})))))},ne:function(t,i){var n=this;if(this.Zt){var e={},r=e.Ut||this.Ut,s=(e.Gt=e.Gt||this.Gt||0,e.Gt>this.$t?this.$t:e.Gt);if(1===t)return this.ee(i.level,i.bid,function(){n.mn(i.level,i.bid,r,function(){n.Wn(i)})});this.ki=!0,this.Wt&&this.Mn(this.Qt,r,null),this.Xt||(this.Hi.visible=!1),this.ee(i.level,i.bid,function(){n.mn(i.level,i.bid,r,function(){n.kn(s,r,function(){n.pn(i,r,function(){n.Wt?n.Mn(n.qt,r,function(){n.Wn(i)}):n.Wn(i)})})})})}else if(1===t)return this.ee(i.level,i.bid,function(){n.Wn(i)})},re:function(){this.hi=!1;for(var t=[],i=0;i<this.Ji.length;i++){for(var n=this.Ji[i].naviPoints,e=[],r=0;r<n.length;r++){var s=new c(n[r].x,0,n[r].y);s.qn=n[r].index,s.level=n[r].level,s.bid=this.Ji[i].bid,e.push(s)}t.push.apply(t,e)}this.Yi.start(),this.ai=!1,this.ci=0,this.li=0,this.ie({step:2,cnt:0,ps:t})},se:function(){if(!(this.ki||this.gi||this.fi)){if(this.bi){var t,i,n=new c(this.Hi.x,this.Hi.y,0).lerp(this.bi,this.mi?1:this.Bt),e=(n.level=this.bi.level,n.buildingID=this.bi.bid,this.naviConstraint(n));if(e.index<0)return;if(this.Hi.moveTo({x:n.x,y:n.y,height:this.ii,level:n.level,buildingID:n.buildingID}),this.ln&&(this.ln.passed?this.ln.moveProportion(1-e.remain/this.tn):this.ln.moveProportion(0)),this.Ci)for(var r=0;r<this.crossCircles.length;r++)e.coords.buildingID==this.crossCircles[r].bid&&e.coords.level==this.crossCircles[r].level&&e.remain<=this.crossCircles[r].point.remain&&e.remain>=this.crossCircles[r].remain&&(t=!0,i=this.crossCircles[r].point);if(this.Vi.k(Object.assign({},this.di,this.oe(e,t,i))),t=!1,i=null,this.Zt?this.pn(n):this.At.updateCountDown_=0,this.ai)return this.stop(),void this.Vi.k({type:"complete"})}null!=this.Mi&&(n=this.Kn(this.pi,this.Mi,this.Bt),this.pi=n,this.Hi.rotateTo({heading:-n}),this.zt)&&this.Hn(n)}},gn:function(){this.re(),this.wn=this.se.bind(this),this.At.on("update",this.wn)},un:function(t,i){var n,e,r=this.naviConstraint(t);if(this.Ni==dt.Auto&&this.ln&&(this.ln.passed?this.ln.moveProportion(1-r.remain/this.tn):this.ln.moveProportion(0)),this.Ci)for(var s=0;s<this.crossCircles.length;s++)r.coords.buildingID==this.crossCircles[s].bid&&r.coords.leve==this.crossCircles[s].level&&r.remain<=this.crossCircles[s].point.remain&&r.remain>=this.crossCircles[s].remain&&(n=!0,e=this.crossCircles[s].point);this.Vi.k(this.oe(r,n,e)),n=!1,e=null,this.Hi&&(r.coords.height=this.ii,this.Hi.moveTo(r.coords),void 0!==i?this.Hi.rotateTo({heading:i}):this.Hi.rotateTo({heading:-r.angle}))},an:function(t,i){var n,e,r=this.naviConstraint(t);if(this.Ci)for(var s=0;s<this.crossCircles.length;s++)r.coords.buildingID==this.crossCircles[s].bid&&r.coords.leve==this.crossCircles[s].level&&r.remain<=this.crossCircles[s].point.remain&&r.remain>=this.crossCircles[s].remain&&(n=!0,e=this.crossCircles[s].point);this.Vi.k(this.oe(r,n,e)),n=!1,e=null,this.Hi&&(t.height=this.ii,this.Hi.moveTo(t),void 0!==i?this.Hi.rotateTo({heading:i}):this.Hi.rotateTo({heading:-r.angle}))},he:function(t,i){for(var n=[{x:t.min.x,y:t.min.y},{x:t.min.x,y:t.max.y},{x:t.max.x,y:t.max.y},{x:t.max.x,y:t.min.y}],e=new l,r=0;r<i.length;r++)for(var s=i[r].levelRange,o=0;o<s.length;o++)for(var h=0,h=o===s.length-1?this.ni+2*this.Li.radius:this.ni,u=0;u<n.length;u++){var a=this.Zi.FMUtil.coordsMapToScreen(this.At,{x:n[u].x,y:n[u].y,buildingID:i[r].bid,level:s[o],height:h});a&&e.I([a])}return e},ue:function(t,i){var t=this.he(t,i).size,i=this.At.getContainer().clientHeight,n=this.At.getContainer().clientWidth;return n/i>t.x/t.y?t.y/i:t.x/n},ae:function(t,i,n,e,r,s){var o=this,h=this.ue(t,i),u=this.At.getZoom();h?(u=this.te(this.At.getZoom(),h*(n||1)),r=e-1):u-=1,this.At.setZoom({zoom:u,animate:!1,finish:function(){++r===e?s&&s({zoom:u}):o.ae(t,i,n,e,r,s)}})},fe:function(t,i){for(var n=this.he(t,i),e=[],r=0;r<i.length;r++)for(var s=i[r].levelRange,o=i[r].bid||this.At.getMapOptions().buildingID,h=0;h<s.length;h++){var u=this.At.getBuilding(o).getFloor(s[h]).height;e.push(this.Zi.FMUtil.coordsScreenToMap(this.At,{x:(n.max.x+n.min.x)/2,y:(n.max.y+n.min.y)/2,z:u+2*this.Li.radius}))}for(var a=new c,f=0;f<e.length;f++)a.add(e[f]);return a.divideScalar(e.length),a},ce:function(n,e,r,s,o,h){var u=this;this.ae(n,e,r,10,0,function(t){var i=u.fe(n,e);u.At.setCenter({animate:!1,x:i.x,y:i.y,finish:function(){++o===s?h&&h({zoom:t.zoom,center:i}):u.ce(n,e,r,s,o,h)}})})},dn:function(t,s,o,h){for(var u=this,a=t&&void 0!==t.ratio?t.ratio:1,i=t&&void 0!==t.rotation?t.rotation:0,n=t&&void 0!==t.tilt?t.tilt:30,f=!t||void 0===t.animate||t.animate,e=1,r=[1],c=0;c<o.length;c++){for(var l=o[c].levelRange,v=[],y=l[0];y<=l[1];)v.push(y),y++;null==o[c].bid?e=(r=v)[Math.floor((v.length-1)/2)]:this.At.getBuilding(o[c].bid).setVisibleLevels(v)}this.At.setVisibleLevels(r,function(){u.At.setLevel({level:e,animate:f,finish:function(){var t=r.length%2==0?u.At.getFloorSpace()/2:0;u.At.getInteracations().controls.panAdd({x:0,y:t,z:0}),u.At.setCenter({animate:f,x:s.center.x,y:s.center.y,finish:function(){u.At.setTilt({tilt:n,animate:f,finish:function(){u.At.setRotation({rotation:i,animate:f,finish:function(){var i=u.At.getInteracations(),t=u.At.copyCamera(),n=i.copyControls(t),e=i.controls,r=u.At.camera;i.controls=n,u.At.camera=t,u.At.getInteracations().controls.update(),u.ce(s,o,a,10,0,function(t){i.controls=e,u.At.camera=r,n.dispose(),n=null,u.At.enableUpdateRender(),u.At.setZoom({animate:f,zoom:t.zoom,duration:.5}),u.At.setCenter({animate:f,x:t.center.x,y:t.center.y,duration:.5,finish:function(){h&&h()}})})}})}})}})}})})},ee:function(t,i,n){if(null==t||null==i)return n&&n(),null;for(var e=this.At.getBuilding(i).levelChart,r=this.At.getVisibleLevels(),s=null,o=0;o<e.length;o++)if(o%2==1&&e[o]===t&&(s=e[o-1],r.indexOf(s)<0)){this.At.setVisibleLevels([s]);break}return null==s||this.At.getLevel()===s?(n&&n(),null):this.At.setLevel({level:s,animate:"number"==typeof duration,duration:"number"==typeof duration?duration:0,finish:n})},Nn:function(t,i){if(!i)return[];for(var n=0,e=0,r=[],s=0;s<t.length;s++)for(var o=t[s].resultbuild,h=0;h<o.length;h++)e+=o[h].length;for(var u=0;u<t.length;u++)for(var a=t[u].bid,f=t[u].resultbuild,c=0;c<f.length;c++){var l=f[c].level,v=f[c].pointList;if(0<c&&(n+=f[c-1].length),!(v.length<=1)&&(i.has(a)&&i.get(a).has(l)))for(var y=0,d=i.get(a).get(l),b=0;b<v.length;b++){0<b&&(y+=w.distance(v[b-1],v[b]));var m,p=mt(d);try{for(p.s();!(m=p.n()).done;){var M,k=m.value,g=this.le(v,k,b);g&&(g.remain=0==b?e-(n+y):e-(n+y-g.disIntersectToPoint),M=e-(n+y-g.disCenterToPoint),r.push({center:k.center,radius:k.radius,remain:M,point:g,level:l,bid:a}))}}catch(t){p.e(t)}finally{p.f()}}}return r},le:function(t,i,n){var e=0;if(0==n)return w.K(t[n],i.center)<=.001?Object.assign({disIntersectToCenter:disIntersectToCenter,disIntersectToPoint:e},t[n]):null;if(!(w.K(i.center,t[n-1])<=.001)&&w.tt(i.center,t[n-1],t[n])<=.001){var r,s=mt(i.points);try{for(s.s();!(r=s.n()).done;){var o=r.value;if(!w.G(o,i.center,t[n]))for(var h=n;0<h;h--)if(w.G(o,t[h-1],t[h])&&w.tt(o,t[h-1],t[h])<=.001){for(var u=[o],a=h;a<=n;a++)u.push(t[a]);for(var f=0;f<u.length-1;f++)e+=w.distance(u[f],u[f+1]);return o.disIntersectToPoint=e,o.disCenterToPoint=w.distance(i.center,t[n]),o}}}catch(t){s.e(t)}finally{s.f()}}return null},$n:function(t){var t={x:this.Hi.x,y:this.Hi.y,height:this.Hi.height,level:t.level,buildingID:t.bid},i=this.xn[this.ci].groupsPoints[this.li];i&&i.pointList&&0<i.pointList.length&&(t=Object.assign(t,i.pointList[0])),this.Hi.moveTo(t)},oe:function(t,i,n){i={distance:t.distance,remain:t.remain,distanceToNext:t.distanceToNext,angle:t.angle,point:t.coords,level:t.coords.level,buildingID:t.coords.buildingID,index:t.index,enterCircle:i,intersect:n};return this.Lt===vt.Drive?(i.type="driving",i.drive=this.tn-t.remain):(i.type="walking",i.walk=this.tn-t.remain),i}}),t);function k(t){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function St(t,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,function(t){t=function(t,i){if("object"!=k(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===i?String:Number)(t);n=n.call(t,i||"default");if("object"!=k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==k(t)?t:String(t)}(e.key),e)}}function _t(t,i,n){i=g(i);var e=t,i=Ot()?Reflect.construct(i,n||[],g(t).constructor):i.apply(t,n);if(i&&("object"===k(i)||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");t=e;if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Ot(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ot=function(){return!!t})()}function jt(){return(jt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,i,n){var e=function(t,i){for(;!Object.prototype.hasOwnProperty.call(t,i)&&null!==(t=g(t)););return t}(t,i);if(e)return(e=Object.getOwnPropertyDescriptor(e,i)).get?e.get.call(arguments.length<3?t:n):e.value}).apply(this,arguments)}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Tt(t,i){return(Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function S(t){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function xt(t,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,function(t){t=function(t,i){if("object"!=S(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===i?String:Number)(t);n=n.call(t,i||"default");if("object"!=S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==S(t)?t:String(t)}(e.key),e)}}function Rt(t,i,n){i=I(i);var e=t,i=Et()?Reflect.construct(i,n||[],I(t).constructor):i.apply(t,n);if(i&&("object"===S(i)||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");t=e;if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Et(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Et=function(){return!!t})()}function _(){return(_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,i,n){var e=function(t,i){for(;!Object.prototype.hasOwnProperty.call(t,i)&&null!==(t=I(t)););return t}(t,i);if(e)return(e=Object.getOwnPropertyDescriptor(e,i)).get?e.get.call(arguments.length<3?t:n):e.value}).apply(this,arguments)}function I(t){return(I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Pt(t,i){return(Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function C(t){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function It(t,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,function(t){t=function(t,i){if("object"!=C(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===i?String:Number)(t);n=n.call(t,i||"default");if("object"!=C(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==C(t)?t:String(t)}(e.key),e)}}function Ct(t,i,n){i=L(i);var e=t,i=Nt()?Reflect.construct(i,n||[],L(t).constructor):i.apply(t,n);if(i&&("object"===C(i)||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");t=e;if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Nt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Nt=function(){return!!t})()}function N(){return(N="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,i,n){var e=function(t,i){for(;!Object.prototype.hasOwnProperty.call(t,i)&&null!==(t=L(t)););return t}(t,i);if(e)return(e=Object.getOwnPropertyDescriptor(e,i)).get?e.get.call(arguments.length<3?t:n):e.value}).apply(this,arguments)}function L(t){return(L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Lt(t,i){return(Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}var Dt,Ft={FMNaviMode:A,FMNaviPriority:Y,FMLanguageType:V,FMNavigation:function(){var t,i=e,n=wt;if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");function e(t,i,n){if(this instanceof e)return _t(this,e,[t,i,n]);throw new TypeError("Cannot call a class as a function")}return i.prototype=Object.create(n&&n.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),n&&Tt(i,n),i=e,(n=[{key:"on",value:function(t,i){jt(g(e.prototype),"on",this).call(this,t,i)}},{key:"off",value:function(t,i){jt(g(e.prototype),"off",this).call(this,t,i)}}])&&St(i.prototype,n),t&&St(i,t),Object.defineProperty(i,"prototype",{writable:!1}),e}(),FMNavigationDrive:function(){var t,i=e,n=wt;if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");function e(t,i,n){if(this instanceof e)return t.type=vt.Drive,(t=Rt(this,e,[t,i,n])).Vt=7,t.Bt=.2,t;throw new TypeError("Cannot call a class as a function")}return i.prototype=Object.create(n&&n.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),n&&Pt(i,n),i=e,(n=[{key:"on",value:function(t,i){_(I(e.prototype),"on",this).call(this,t,i)}},{key:"off",value:function(t,i){_(I(e.prototype),"off",this).call(this,t,i)}},{key:"locate",value:function(t,i){_(I(e.prototype),"locate",this).call(this,t,i)}},{key:"route",value:function(t,i,n){_(I(e.prototype),"route",this).call(this,t,i,n)}},{key:"locateNoConstraint",value:function(t,i){_(I(e.prototype),"locateNoConstraint",this).call(this,t,i)}},{key:"simulate",value:function(t){_(I(e.prototype),"simulate",this).call(this,t)}},{key:"naviResult",get:function(){return this.Xi}}])&&xt(i.prototype,n),t&&xt(i,t),Object.defineProperty(i,"prototype",{writable:!1}),e}(),FMNavigationWalk:function(){var t,i=e,n=wt;if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");function e(t,i,n){if(this instanceof e)return t.type=vt.Walk,Ct(this,e,[t,i,n]);throw new TypeError("Cannot call a class as a function")}return i.prototype=Object.create(n&&n.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),n&&Lt(i,n),i=e,(n=[{key:"on",value:function(t,i){N(L(e.prototype),"on",this).call(this,t,i)}},{key:"off",value:function(t,i){N(L(e.prototype),"off",this).call(this,t,i)}},{key:"route",value:function(t,i,n){N(L(e.prototype),"route",this).call(this,t,i,n)}}])&&It(i.prototype,n),t&&It(i,t),Object.defineProperty(i,"prototype",{writable:!1}),e}()},At=window.fengmap||{};for(Dt in Ft)At[Dt]=Ft[Dt];window.fengmap=At;F.default=At}],e={},r.m=n,r.c=e,r.d=function(t,i,n){r.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"ve",{value:!0})},r.t=function(i,t){if(1&t&&(i=r(i)),8&t)return i;if(4&t&&"object"==typeof i&&i&&i.ve)return i;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:i}),2&t&&"string"!=typeof i)for(var e in i)r.d(n,e,function(t){return i[t]}.bind(null,e));return n},r.n=function(t){var i=t&&t.ve?function(){return t.default}:function(){return t};return r.d(i,"a",i),i},r.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},r.p="",r(r.s=0).default;function r(t){var i;return(e[t]||(i=e[t]={i:t,l:!1,exports:{}},n[t].call(i.exports,i,i.exports,r),i.l=!0,i)).exports}var n,e});