highcharts
Version:
JavaScript charting framework
11 lines • 18.4 kB
JavaScript
!/**
* Highcharts JS v13.0.1 (2026-08-17)
* @module highcharts/modules/draggable-points
* @requires highcharts
*
* (c) 2009-2026 Highsoft AS
* Author: Torstein Hønsi
*
* A commercial license may be required depending on use,
* see www.highcharts.com/license
*/function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(e._Highcharts):"function"==typeof define&&define.amd?define("highcharts/modules/draggable-points",["highcharts/highcharts"],function(e){return t(e)}):"object"==typeof exports?exports["highcharts/modules/draggable-points"]=t(e._Highcharts):e.Highcharts=t(e.Highcharts)}("u"<typeof window?this:window,e=>(()=>{"use strict";var t={944(t){t.exports=e}};let r={};function o(e){let a=r[e];if(void 0!==a)return a.exports;let i=r[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.n=e=>{let t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var a=t[r++],i=t[r++];o.o(e,a)?0===i&&r++:0===i?Object.defineProperty(e,a,{enumerable:!0,value:t[r++]}):Object.defineProperty(e,a,{enumerable:!0,get:i})}else for(var a in t)o.o(t,a)&&!o.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);let a={};o.d(a,{default:()=>_});var i=o(944),s=o.n(i);let n={addEvents:function(e,t,r,o){let a=t.map(t=>(0,i.addEvent)(e,t,r,o));return function(){for(let e of a)e()}},countProps:function(e){return Object.keys(e).length},getFirstProp:function(e){for(let t in e)if(Object.hasOwnProperty.call(e,t))return e[t]},getNormalizedEvent:function(e,t){return(void 0===e.chartX||void 0===e.chartY)&&t.pointer?.normalize(e)||e}},d={className:"highcharts-drag-handle",color:"#fff",lineColor:"rgba(0, 0, 0, 0.6)",lineWidth:1,zIndex:901},l={default:{className:"highcharts-drag-box-default",lineWidth:1,lineColor:"#888",color:"rgba(0, 0, 0, 0.1)",cursor:"move",zIndex:900}},{addEvents:p,countProps:g,getFirstProp:h,getNormalizedEvent:u}=n,{doc:c}=s();function m(){let e=this.dragHandles||{};if(e){for(let t of Object.keys(e))e[t].destroy&&e[t].destroy();delete this.dragHandles}}function x(e,t){let r=this.dragGuideBox,o=(0,i.merge)(l,t),a=(0,i.merge)(o.default,o[e]);return r.attr({class:a.className,stroke:a.lineColor,strokeWidth:a.lineWidth,fill:a.color,cursor:a.cursor,zIndex:a.zIndex}).css({pointerEvents:"none"})}function y(e){let t=this.options.chart||{},r=t.panKey&&t.panKey+"Key";return e[this.zooming.key&&this.zooming.key+"Key"]||e[r]}function f(e){return({left:"right",right:"left",top:"bottom",bottom:"top"})[e]}function D(e,t){let r,o=function(e){let t=e.series,r=t.options.data||[],o=t.options.dragDrop.groupBy,a=[];if(t.boosted&&(0,i.isArray)(r))for(let e=0,o=r.length;e<o;++e)a.push(new t.pointClass(t,r[e])),a[a.length-1].index=e;else a=t.points;return e.options[o]?a.filter(t=>t.options[o]===e.options[o]):[e]}(t),a=t.series,s=a.chart;(a.options.dragDrop?.liveRedraw??!0)||(s.dragGuideBox=r=a.getGuideBox(o),s.setGuideBoxState("default",a.options.dragDrop?.guideBox).add(a.group)),s.dragDropData={origin:function(e,t,r){let o={chartX:e.chartX,chartY:e.chartY,guideBox:r&&{x:r.attr("x"),y:r.attr("y"),width:r.attr("width"),height:r.attr("height")},points:{}};for(let r of t){let t=r.series.dragDropProps||{},a={};for(let o of Object.keys(t)){let i=t[o],s=r.series[i.axis+"Axis"];a[o]=r[o],r.series.chart.mapView&&r.plotX&&r.plotY?a[o+"Offset"]="x"===o?r.plotX:r.plotY:a[o+"Offset"]=s.toPixels(r[o])-(s.horiz?e.chartX:e.chartY)}a.point=r,o.points[r.id]=a}return o}(e,o,r),point:t,groupedPoints:o,isDragging:!0}}function v(e,t){let r=t.dragDropData;if(r&&r.isDragging&&r.draggedPastSensitivity&&r.point.series){let o=r.point,a=r.newPoints,i=g(a),s=1===i?h(a):null;t.dragHandles&&t.hideDragHandles(),e.preventDefault(),t.cancelClick=!0,o.firePointEvent("drop",{origin:r.origin,chartX:e.chartX,chartY:e.chartY,newPoints:a,numNewPoints:i,newPoint:s&&s.newValues,newPointId:s&&s.point.id},function(){b(t)})}delete t.dragDropData,t.dragGuideBox&&(t.dragGuideBox.destroy(),delete t.dragGuideBox)}function P(){var e;let t;!this.hasAddedDragDropEvents&&(e=this,t=e.container,function(e){let t=e.series?e.series.length:0;if(e.hasCartesianSeries&&!e.polar||e.mapView){for(;t--;)if(e.series[t].options.dragDrop&&function(e){let t,r=["draggableX","draggableY"],o=e.dragDropProps||{};for(let e of Object.keys(o))(t=o[e]).optionName&&r.push(t.optionName);let a=r.length;for(;a--;)if(e.options.dragDrop[r[a]])return!0}(e.series[t]))return!0}return!1}(e)&&(p(t,["mousedown","touchstart"],t=>{!function(e,t){let r=t.hoverPoint,o=(0,i.merge)(r&&r.series.options.dragDrop,r&&r.options.dragDrop),a=o.draggableX||!1,s=o.draggableY||!1;if(t.cancelClick=!1,!(!(a||s)||t.zoomOrPanKeyPressed(e))&&!t.hasDraggedAnnotation){if(t.dragDropData&&t.dragDropData.isDragging)return v(e,t);r&&function(e){let t,r,o,a=e.series,i=a.chart,s=a.options.dragDrop||{},n=e.options&&e.options.dragDrop,d=a.dragDropProps;for(let e in d)"x"===(t=d[e]).axis&&t.move?r=!0:"y"===t.axis&&t.move&&(o=!0);return(s.draggableX&&r||s.draggableY&&o)&&!(n&&!1===n.draggableX&&!1===n.draggableY)&&(!!(a.yAxis&&a.xAxis)||i.mapView)}(r)&&(t.mouseIsDown=!1,D(e,r),r.firePointEvent("dragStart",e))}}(u(t,e),e)}),p(t,["mousemove","touchmove"],t=>{!function(e,t){if(t.zoomOrPanKeyPressed(e))return;let r=t.dragDropData,o,a,s,n=0,d;if(r&&r.isDragging&&r.point.series){var l;let p,u,c,m,x;a=(o=r.point).series.options.dragDrop,e.preventDefault(),r.draggedPastSensitivity||(l=o.options.dragDrop?.dragSensitivity??a?.dragSensitivity??2??2,u=(p=t.dragDropData.origin).chartX,c=p.chartY,m=e.chartX,r.draggedPastSensitivity=Math.sqrt((m-u)*(m-u)+((x=e.chartY)-c)*(x-c))>l),r.draggedPastSensitivity&&(r.newPoints=function(e,t){let r=e.point,o=r.series,a=o.chart,s=(0,i.merge)(o.options.dragDrop,r.options.dragDrop),n={},d=e.updateProp,l={},p=r.series.dragDropProps;for(let e in p){let t=p[e];(!d||d===e&&t.resize&&(!t.optionName||!1!==s[t.optionName]))&&(d||t.move&&("x"===t.axis&&s.draggableX||"y"===t.axis&&s.draggableY))&&(a.mapView?n["x"===e?"lon":"lat"]=t:n[e]=t)}for(let o of d?[r]:e.groupedPoints)l[o.id]={point:o,newValues:o.getDropValues(e.origin,t,n)};return l}(r,e),d=1===(n=g(s=r.newPoints))?h(s):null,o.firePointEvent("drag",{origin:r.origin,newPoints:r.newPoints,newPoint:d&&d.newValues,newPointId:d&&d.point.id,numNewPoints:n,chartX:e.chartX,chartY:e.chartY},function(){var t,r,a;let s,n,d,l,p,g,h,u,c,m,x,y,D,v,P,w,z;d=(n=(s=o.series).chart).dragDropData,p=(l=(0,i.merge)(s.options.dragDrop,o.options.dragDrop)).draggableX,g=l.draggableY,h=d.origin,u=d.updateProp,c=e.chartX-h.chartX,m=e.chartY-h.chartY,x=c,n.inverted&&(c=-m,m=-x),l.liveRedraw??!0?(b(n,!1),o.showDragHandles()):u?(t=o,r=c,a=m,v=(D=(y=t.series).chart).dragDropData,P=y.dragDropProps[v.updateProp],w=v.newPoints[t.id].newValues,z="function"==typeof P.resizeSide?P.resizeSide(w,t):P.resizeSide,P.beforeResize&&P.beforeResize(D.dragGuideBox,w,t),function(e,t,r){let o;switch(t){case"left":o={x:e.attr("x")+r.x,width:Math.max(1,e.attr("width")-r.x)};break;case"right":o={width:Math.max(1,e.attr("width")+r.x)};break;case"top":o={y:e.attr("y")+r.y,height:Math.max(1,e.attr("height")-r.y)};break;case"bottom":o={height:Math.max(1,e.attr("height")+r.y)}}e.attr(o)}(D.dragGuideBox,"x"===P.axis&&y.xAxis.reversed||"y"===P.axis&&y.yAxis.reversed?f(z):z,{x:"x"===P.axis?r-(v.origin.prevdX||0):0,y:"y"===P.axis?a-(v.origin.prevdY||0):0})):n.dragGuideBox.translate(p?c:0,g?m:0),h.prevdX=c,h.prevdY=m}))}}(u(t,e),e)},{passive:!1}),(0,i.addEvent)(t,"mouseleave",t=>{v(u(t,e),e)}),e.unbindDragDropMouseUp=p(c,["mouseup","touchend"],t=>{v(u(t,e),e)},{passive:!1}),e.hasAddedDragDropEvents=!0,(0,i.addEvent)(e,"destroy",()=>{e.unbindDragDropMouseUp&&e.unbindDragDropMouseUp()})))}function b(e,t){let r,o=e.dragDropData.newPoints,a=(0,i.animObject)(t);for(let t of(e.isDragDropAnimating=!0,Object.keys(o)))(r=o[t]).point.update(r.newValues,!1);e.redraw(a),setTimeout(()=>{delete e.isDragDropAnimating,e.hoverPoint&&!e.dragHandles&&e.hoverPoint.showDragHandles()},a.duration)}let w={compose:function(e){let t=e.prototype;t.hideDragHandles||(t.hideDragHandles=m,t.setGuideBoxState=x,t.zoomOrPanKeyPressed=y,(0,i.addEvent)(e,"render",P))},flipResizeSide:f,initDragDrop:D},{flipResizeSide:z}=w,A={x:{axis:"x",move:!0},y:{axis:"y",move:!0}},N={x:{axis:"x",move:!0},y:{axis:"y",move:!1,resize:!0,beforeResize:(e,t,r)=>{let o,a=(0,i.pick)(r.yBottom,r.series.translatedThreshold),s=e.attr("y"),n=(0,i.isNumber)(r.stackY)?r.stackY-(r.y||0):r.series.options.threshold||0,d=n+t.y;(r.series.yAxis.reversed?d<n:d>=n)?(o=e.attr("height"),e.attr({height:Math.max(0,Math.round(o+(a?a-s-o:0)))})):e.attr({y:Math.round(s+(a?a-s:0))})},resizeSide:(e,t)=>{let r=t.series.chart.dragHandles,o=e.y>=(t.series.options.threshold||0)?"top":"bottom",a=z(o);return r&&r[a]&&(r[a].destroy(),delete r[a]),o},handlePositioner:e=>{let t=e.shapeArgs||e.graphic&&e.graphic.getBBox()||{},r=e.series.yAxis.reversed,o=e.series.options.threshold||0,a=e.y||0;return{x:t.x||0,y:!r&&a>=o||r&&a<o?t.y||0:(t.y||0)+(t.height||0)}},handleFormatter:e=>{let t=e.shapeArgs||{},r=t.r||0,o=t.width||0,a=o/2;return[["M",r,0],["L",a-5,0],["A",1,1,0,0,0,a+5,0],["A",1,1,0,0,0,a-5,0],["M",a+5,0],["L",o-r,0]]}}},H={x:N.x,low:{optionName:"draggableLow",axis:"y",move:!0,resize:!0,resizeSide:"bottom",handlePositioner:e=>({x:e.shapeArgs.x||0,y:e.lowPlot}),handleFormatter:N.y.handleFormatter,propValidate:(e,t)=>e<=t.q1},q1:{optionName:"draggableQ1",axis:"y",move:!0,resize:!0,resizeSide:"bottom",handlePositioner:e=>({x:e.shapeArgs.x||0,y:e.q1Plot}),handleFormatter:N.y.handleFormatter,propValidate:(e,t)=>e<=t.median&&e>=t.low},median:{axis:"y",move:!0},q3:{optionName:"draggableQ3",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:e=>({x:e.shapeArgs.x||0,y:e.q3Plot}),handleFormatter:N.y.handleFormatter,propValidate:(e,t)=>e<=t.high&&e>=t.median},high:{optionName:"draggableHigh",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:e=>({x:e.shapeArgs.x||0,y:e.highPlot}),handleFormatter:N.y.handleFormatter,propValidate:(e,t)=>e>=t.q3}},S={x:N.x,low:{...H.low,propValidate:(e,t)=>e<=t.high},high:{...H.high,propValidate:(e,t)=>e>=t.low}},B={x:N.x,y:N.y,target:{optionName:"draggableTarget",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:e=>{let t=e.targetGraphic.getBBox();return{x:e.barX,y:t.y+t.height/2}},handleFormatter:N.y.handleFormatter}},F={x:N.x,low:{optionName:"draggableLow",axis:"y",move:!0,resize:!0,resizeSide:"bottom",handlePositioner:e=>({x:e.shapeArgs.x,y:e.plotLow}),handleFormatter:N.y.handleFormatter,propValidate:(e,t)=>e<=t.open&&e<=t.close},high:{optionName:"draggableHigh",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:e=>({x:e.shapeArgs.x,y:e.plotHigh}),handleFormatter:N.y.handleFormatter,propValidate:(e,t)=>e>=t.open&&e>=t.close},open:{optionName:"draggableOpen",axis:"y",move:!0,resize:!0,resizeSide:e=>e.open>=e.close?"top":"bottom",handlePositioner:e=>({x:e.shapeArgs.x,y:e.plotOpen}),handleFormatter:N.y.handleFormatter,propValidate:(e,t)=>e<=t.high&&e>=t.low},close:{optionName:"draggableClose",axis:"y",move:!0,resize:!0,resizeSide:e=>e.open>=e.close?"bottom":"top",handlePositioner:e=>({x:e.shapeArgs.x,y:e.plotClose}),handleFormatter:N.y.handleFormatter,propValidate:(e,t)=>e<=t.high&&e>=t.low}},V={x:N.x,y:(0,i.merge)(N.y,{handleFormatter:e=>e.isSum||e.isIntermediateSum?null:N?.y?.handleFormatter?.(e)||null})},M={x:{axis:"x",move:!0},low:{optionName:"draggableLow",axis:"y",move:!0,resize:!0,resizeSide:"bottom",handlePositioner:e=>{let t=e.shapeArgs||e.graphic.getBBox();return{x:t.x||0,y:(t.y||0)+(t.height||0)}},handleFormatter:N.y.handleFormatter,propValidate:(e,t)=>e<=t.high},high:{optionName:"draggableHigh",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:e=>{let t=e.shapeArgs||e.graphic.getBBox();return{x:t.x||0,y:t.y||0}},handleFormatter:N.y.handleFormatter,propValidate:(e,t)=>e>=t.low}},X={x:M.x,low:{optionName:"draggableLow",axis:"y",move:!0,resize:!0,resizeSide:"bottom",handlePositioner:e=>{let t=e.graphics&&e.graphics[0]&&e.graphics[0].getBBox();return t?{x:t.x+t.width/2,y:t.y+t.height/2}:{x:-999,y:-999}},handleFormatter:Y,propValidate:M.low.propValidate},high:{optionName:"draggableHigh",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:e=>{let t=e.graphics&&e.graphics[1]&&e.graphics[1].getBBox();return t?{x:t.x+t.width/2,y:t.y+t.height/2}:{x:-999,y:-999}},handleFormatter:Y,propValidate:M.high.propValidate}},O={y:{axis:"y",move:!0},x:{optionName:"draggableX1",axis:"x",move:!0,resize:!0,resizeSide:"left",handlePositioner:e=>j(e,"x"),handleFormatter:k,propValidate:(e,t)=>e<=t.x2},x2:{optionName:"draggableX2",axis:"x",move:!0,resize:!0,resizeSide:"right",handlePositioner:e=>j(e,"x2"),handleFormatter:k,propValidate:(e,t)=>e>=t.x}};function Y(e){let t=e.graphic?e.graphic.getBBox().width/2+1:4;return[["M",0-t,0],["a",t,t,0,1,0,2*t,0],["a",t,t,0,1,0,-2*t,0]]}function k(e){let t=e.shapeArgs||e.graphic.getBBox(),r=t.r||0,o=t.height-r,a=t.height/2;return[["M",0,r],["L",0,a-5],["A",1,1,0,0,0,0,a+5],["A",1,1,0,0,0,0,a-5],["M",0,a+5],["L",0,o]]}function j(e,t){let r=e.series,o=r.xAxis,a=r.yAxis,i=r.chart.inverted,s=r.columnMetrics?r.columnMetrics.offset:-e.shapeArgs.height/2,n=o.toPixels(e[t],!0),d=a.toPixels(e.y,!0);return i&&(n=o.len-n,d=a.len-d),{x:Math.round(n),y:Math.round(d+=s)}}let E={arearange:X,boxplot:H,bullet:B,column:N,columnrange:M,errorbar:S,flags:A,gantt:{y:O.y,start:(0,i.merge)(O.x,{optionName:"draggableStart",validateIndividualDrag:e=>!e.milestone}),end:(0,i.merge)(O.x2,{optionName:"draggableEnd",validateIndividualDrag:e=>!e.milestone})},line:A,ohlc:F,waterfall:V,xrange:O},{addEvents:L,getNormalizedEvent:C}=n,{initDragDrop:G}=w;function I(e){let t=e.series&&e.series.chart,r=t&&t.dragDropData;t&&t.dragHandles&&!(r&&(r.isDragging&&r.draggedPastSensitivity||r.isHoveringHandle===e.id))&&t.hideDragHandles()}function T(){let e=this;setTimeout(()=>{e.series&&I(e)},10)}function K(){let e=this;setTimeout(()=>{let t,r,o,a;return o=(r=(t=e.series)&&t.chart)&&r.dragDropData,a=r&&r.is3d&&r.is3d(),void(r&&!(o&&o.isDragging&&o.draggedPastSensitivity)&&!r.isDragDropAnimating&&t.options.dragDrop&&!a&&(r.dragHandles&&r.hideDragHandles(),e.showDragHandles()))},12)}function q(){let e=this.series.chart,t=e.dragHandles;t&&t.point===this.id&&e.hideDragHandles()}function $(e,t,r){let o=this.series,a=o.chart,s=a.mapView,n=(0,i.merge)(o.options.dragDrop,this.options.dragDrop),d={},l=e.points[this.id],p=1===Object.keys(r).length,g=(e,t)=>{let r=t.toUpperCase(),a=o.chart.time,s=+!!o[`${t}Axis`].categories,d=n[`dragPrecision${r}`]??s,l=a.parse(n[`dragMin${r}`])??-1/0,p=a.parse(n[`dragMax${r}`])??1/0,g=e;return d&&(g=Math.round(g/d)*d),(0,i.clamp)(g,l,p)},h=(e,t,r)=>{if(s){let o=t.toUpperCase(),d=n[`dragPrecision${o}`]??0,l=s.pixelsToLonLat({x:0,y:0}),p=s.pixelsToLonLat({x:a.plotBox.width,y:a.plotBox.height}),g=n[`dragMin${o}`]??l?.[r]??-1/0,h=n[`dragMax${o}`]??p?.[r]??1/0,u=e[r];if("Orthographic"===s.projection.options.name)return u;if("lat"===r){(isNaN(g)||g>s.projection.maxLatitude)&&(g=s.projection.maxLatitude),(isNaN(h)||h<-1*s.projection.maxLatitude)&&(h=-1*s.projection.maxLatitude);let e=h;h=g,g=e}if(!s.projection.hasCoordinates){let t=s.pixelsToLonLat({x:e.chartX-a.plotLeft,y:a.plotHeight-e.chartY+a.plotTop});t&&(u=t[r])}return d&&(u=Math.round(u/d)*d),(0,i.clamp)(u,g,h)}};for(let e of Object.keys(r)){let a=r[e],n=l.point[e],u=o[a.axis+"Axis"],c=s?h(t,a.axis,e):g(u.toValue((u.horiz?t.chartX:t.chartY)+l[e+"Offset"]),a.axis);(0,i.isNumber)(c)&&!(p&&a.propValidate&&!a.propValidate(c,this))&&void 0!==n&&(d[e]=c)}return d}function R(){let e=this,t=e.series,r=t.chart,{inverted:o,renderer:a}=r,s=(0,i.merge)(t.options.dragDrop,e.options.dragDrop),n=t.dragDropProps||{},l=r.dragHandles;for(let p of Object.keys(n)){let g,h,u,c=n[p],m=(0,i.merge)(d,c.handleOptions,s.dragHandle),x={class:m.className,"stroke-width":m.lineWidth,fill:m.color,stroke:m.lineColor},y=m.pathFormatter||c.handleFormatter,f=c.handlePositioner,D=!c.validateIndividualDrag||c.validateIndividualDrag(e);if(c.resize&&D&&c.resizeSide&&y&&(s["draggable"+c.axis.toUpperCase()]||s[c.optionName])&&!1!==s[c.optionName]){l?l.point=e.id:l=r.dragHandles={group:a.g("drag-drop-handles").add(t.markerGroup||t.group),point:e.id},g=f(e),x.d=u=y(e);let s=e.series.xAxis.categories?-.5:0;if(!u||g.x<s||g.y<0)continue;x.cursor=m.cursor||("x"===c.axis!=!!o?"ew-resize":"ns-resize"),(h=l[c.optionName])||(h=l[c.optionName]=a.path().add(l.group)),x.translateX=o?t.yAxis.len-g.y:g.x,x.translateY=o?t.xAxis.len-g.x:g.y,o&&(x.rotation=-90),h.attr(x),L(h.element,["touchstart","mousedown"],t=>{!function(e,t,r){let o=t.series.chart;o.zoomOrPanKeyPressed(e)||(o.mouseIsDown=!1,G(e,t),o.dragDropData.updateProp=e.updateProp=r,t.firePointEvent("dragStart",e),e.stopPropagation(),e.preventDefault())}(C(t,r),e,p)},{passive:!1}),(0,i.addEvent)(l.group.element,"mouseover",()=>{r.dragDropData=r.dragDropData||{},r.dragDropData.isHoveringHandle=e.id}),L(l.group.element,["touchend","mouseout"],()=>{!function(e){let t=e.series.chart;t.dragDropData&&e.id===t.dragDropData.isHoveringHandle&&delete t.dragDropData.isHoveringHandle,t.hoverPoint||I(e)}(e)})}}}function U(e){let t=this.chart,r=1/0,o=-1/0,a=1/0,s=-1/0,n;for(let t of e){let e=t.graphic&&t.graphic.getBBox()||t.shapeArgs;if(e){let d,l=t.x2;(0,i.isNumber)(l)&&(d=t.series.xAxis.translate(l,!1,!1,!1,!0));let p=!(e.width||e.height||e.x||e.y);n=!0,r=Math.min(t.plotX||0,d||0,p?1/0:e.x||0,r),o=Math.max(t.plotX||0,d||0,(e.x||0)+(e.width||0),o),a=Math.min(t.plotY||0,p?1/0:e.y||0,a),s=Math.max((e.y||0)+(e.height||0),s)}}return n?t.renderer.rect(r,a,o-r,s-a):t.renderer.g()}let W=s();({compose:function(e,t){w.compose(e);let r=t.prototype;if(!r.dragDropProps){let e=t.prototype.pointClass,o=t.types,a=e.prototype;for(let t of(a.getDropValues=$,a.showDragHandles=R,(0,i.addEvent)(e,"mouseOut",T),(0,i.addEvent)(e,"mouseOver",K),(0,i.addEvent)(e,"remove",q),r.dragDropProps=E.line,r.getGuideBox=U,["arearange","boxplot","bullet","column","columnrange","errorbar","flags","gantt","ohlc","waterfall","xrange"]))o[t]&&(o[t].prototype.dragDropProps=E[t]);for(let e of["bellcurve","gauge","histogram","map","mapline","pareto","pie","sankey","sma","sunburst","treemap","vector","windbarb","wordcloud"])o[e]&&(o[e].prototype.dragDropProps=null)}}}).compose(W.Chart,W.Series);let _=s();return a.default})());