!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("cesium/Cesium"),require("jquery")):"function"==typeof define&&define.amd?define(["cesium/Cesium","jquery"],e):"object"==typeof exports?exports.draw=e(require("cesium/Cesium"),require("jquery")):t.draw=e(t.Cesium,t.jQuery)}("undefined"!=typeof self?self:this,function(t,e){return function(t){function e(i){if(r[i])return r[i].exports;var n=r[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,i){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=3)}([function(e,r){e.exports=t},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.PlotUtil=void 0;var n=function(){function t(t,e){for(var r=0;r=t[1]&&e[0]>=t[0]?r=i+Math.PI:e[1]>=t[1]&&e[0]=t[0]&&(r=Math.PI-i),r}},{key:"MathDistance",value:function(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}},{key:"isClockWise",value:function(t,e,r){return(r[1]-t[1])*(e[0]-t[0])>(e[1]-t[1])*(r[0]-t[0])}},{key:"getBisectorNormals",value:function(t,e,r,i){var n=this.getNormal(e,r,i),o=null,a=null,s=null,l=null,u=null,c=Math.sqrt(n[0]*n[0]+n[1]*n[1]),h=n[0]/c,f=n[1]/c,d=this.MathDistance(e,r),p=this.MathDistance(r,i);return c>this.ZERO_TOLERANCE?this.isClockWise(e,r,i)?(s=t*d,l=r[0]-s*f,u=r[1]+s*h,o=[l,u],s=t*p,l=r[0]+s*f,u=r[1]-s*h,a=[l,u]):(s=t*d,l=r[0]+s*f,u=r[1]-s*h,o=[l,u],s=t*p,l=r[0]-s*f,u=r[1]+s*h,a=[l,u]):(l=r[0]+t*(e[0]-r[0]),u=r[1]+t*(e[1]-r[1]),o=[l,u],l=r[0]+t*(i[0]-r[0]),u=r[1]+t*(i[1]-r[1]),a=[l,u]),[o,a]}},{key:"getCubicValue",value:function(t,e,r,i,n){t=Math.max(Math.min(t,1),0);var o=1-t,a=t*t,s=a*t,l=o*o,u=l*o;return[u*e[0]+3*l*t*r[0]+3*o*a*i[0]+s*n[0],u*e[1]+3*l*t*r[1]+3*o*a*i[1]+s*n[1]]}},{key:"getNormal",value:function(t,e,r){var i=t[0]-e[0],n=t[1]-e[1],o=Math.sqrt(i*i+n*n);i/=o,n/=o;var a=r[0]-e[0],s=r[1]-e[1],l=Math.sqrt(a*a+s*s);return a/=l,s/=l,[i+a,n+s]}},{key:"getArcPoints",value:function(t,e,r,i){var n=null,o=null,a=[],s=i-r;s=s<0?s+2*Math.PI:s;for(var l=0;l<=100;l++){var u=r+s*l/100;n=t[0]+e*Math.cos(u),o=t[1]+e*Math.sin(u),a.push([n,o])}return a}},{key:"getBaseLength",value:function(t){return Math.pow(this.wholeDistance(t),.99)}},{key:"wholeDistance",value:function(t){var e=0,r=this;return t&&Array.isArray(t)&&t.length>0&&t.forEach(function(i,n){nf*n&&(c=f*n);var d=c*s,p=c*o;c=c>u?u:c;var g=c*a,P=this.getThirdPoint(e[e.length-2],h,0,c,!0),v=this.getThirdPoint(e[e.length-2],h,0,g,!0),w=this.getThirdPoint(h,P,this.HALF_PI,d,!1),m=this.getThirdPoint(h,P,this.HALF_PI,d,!0);return[this.getThirdPoint(h,v,this.HALF_PI,p,!1),w,h,m,this.getThirdPoint(h,v,this.HALF_PI,p,!0)]}},{key:"getTailPoints",value:function(t){if(t){var e=t.points,r=t.tailWidthFactor,i=t.swallowTailFactor,n=this.getBaseLength(e),o=n*r,a=this.getThirdPoint(e[1],e[0],this.HALF_PI,o,!1),s=this.getThirdPoint(e[1],e[0],this.HALF_PI,o,!0),l=o*i;return[a,this.getThirdPoint(e[1],e[0],0,l,!0),s]}}},{key:"getArrowBodyPoints",value:function(t,e,r,i){for(var n=this.wholeDistance(t),o=this.getBaseLength(t),a=o*i,s=this.MathDistance(e,r),l=(a-s)/2,u=0,c=[],h=[],f=1;fa*this.headTailFactor&&(n=a*this.headTailFactor);var s=n*this.headWidthFactor,l=n*this.neckWidthFactor;n=n>i?i:n;var u=n*this.neckHeightFactor,c=this.plotUtil.getThirdPoint(t[t.length-2],o,0,n,!0),h=this.plotUtil.getThirdPoint(t[t.length-2],o,0,u,!0),f=this.plotUtil.getThirdPoint(o,c,Math.PI/2,s,!1),d=this.plotUtil.getThirdPoint(o,c,Math.PI/2,s,!0);return[this.plotUtil.getThirdPoint(o,h,Math.PI/2,l,!1),f,o,d,this.plotUtil.getThirdPoint(o,h,Math.PI/2,l,!0)]}},{key:"getArrowBodyPoints",value:function(t,e,r,i){for(var n=this.plotUtil.wholeDistance(t),o=this.plotUtil.getBaseLength(t),a=o*i,s=this.plotUtil.MathDistance(e,r),l=(a-s)/2,u=0,c=[],h=[],f=1;f=Math.PI/2&&o=Math.PI&&o<1.5*Math.PI?(s=n*Math.sin(o-Math.PI),l=n*Math.cos(o-Math.PI),u=this.plotUtil.getThirdPoint(t,i,Math.PI/2,s,!0),a=this.plotUtil.getThirdPoint(i,u,Math.PI/2,l,!0)):(s=n*Math.sin(2*Math.PI-o),l=n*Math.cos(2*Math.PI-o),u=this.plotUtil.getThirdPoint(t,i,Math.PI/2,s,!0),a=this.plotUtil.getThirdPoint(i,u,Math.PI/2,l,!1)),a}},{key:"getArrowPoints",value:function(t,e,r,i){var n=this.plotUtil.Mid(t,e),o=this.plotUtil.MathDistance(n,r),a=this.plotUtil.getThirdPoint(r,n,0,.3*o,!0),s=this.plotUtil.getThirdPoint(r,n,0,.5*o,!0);a=this.plotUtil.getThirdPoint(n,a,Math.PI/2,o/5,i),s=this.plotUtil.getThirdPoint(n,s,Math.PI/2,o/4,i);var l=[n,a,s,r],u=this.getArrowHeadPoints(l);if(!(u&&Array.isArray(u)&&u.length>0))throw new Error("插值出错");var c=[u[0],u[4]],h=c[0],f=c[1],d=this.plotUtil.MathDistance(t,e)/this.plotUtil.getBaseLength(l)/2,p=this.getArrowBodyPoints(l,h,f,d);if(p){var g=p.length,P=p.slice(0,g/2),v=p.slice(g/2,g);return P.push(h),v.push(f),P=P.reverse(),P.push(e),v=v.reverse(),v.push(t),P.reverse().concat(u,v)}}},{key:"getArrowHeadPoints",value:function(t){var e=this.plotUtil.getBaseLength(t),r=e*this.headHeightFactor,i=t[t.length-1],n=r*this.headWidthFactor,o=r*this.neckWidthFactor,a=r*this.neckHeightFactor,s=this.plotUtil.getThirdPoint(t[t.length-2],i,0,r,!0),l=this.plotUtil.getThirdPoint(t[t.length-2],i,0,a,!0),u=this.plotUtil.getThirdPoint(i,s,Math.PI/2,n,!1),c=this.plotUtil.getThirdPoint(i,s,Math.PI/2,n,!0);return[this.plotUtil.getThirdPoint(i,l,Math.PI/2,o,!1),u,i,c,this.plotUtil.getThirdPoint(i,l,Math.PI/2,o,!0)]}},{key:"getArrowBodyPoints",value:function(t,e,r,i){for(var n=this.plotUtil.wholeDistance(t),o=this.plotUtil.getBaseLength(t),a=o*i,s=this.plotUtil.MathDistance(e,r),l=(a-s)/2,u=0,c=[],h=[],f=1;f