Icard/angular-clarity-master(work.../node_modules/highcharts/modules/draggable-points.js

7 lines
18 KiB
JavaScript
Raw Permalink Normal View History

2024-07-16 14:55:36 +00:00
!/**
* Highcharts JS v11.4.1 (2024-04-04)
*
* (c) 2009-2024 Torstein Honsi
*
* License: www.highcharts.com/license
*/function(e){"object"==typeof module&&module.exports?(e.default=e,module.exports=e):"function"==typeof define&&define.amd?define("highcharts/modules/draggable-points",["highcharts"],function(t){return e(t),e.Highcharts=t,e}):e("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(e){"use strict";var t=e?e._modules:{};function r(e,t,r,o){e.hasOwnProperty(t)||(e[t]=o.apply(null,r),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:t,module:e[t]}})))}r(t,"Extensions/DraggablePoints/DragDropUtilities.js",[t["Core/Utilities.js"]],function(e){let{addEvent:t}=e;return{addEvents:function(e,r,o,a){let i=r.map(r=>t(e,r,o,a));return function(){for(let e of i)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}}}),r(t,"Extensions/DraggablePoints/DragDropDefaults.js",[],function(){return{dragSensitivity:2,dragHandle:{className:"highcharts-drag-handle",color:"#fff",lineColor:"rgba(0, 0, 0, 0.6)",lineWidth:1,zIndex:901},guideBox:{default:{className:"highcharts-drag-box-default",lineWidth:1,lineColor:"#888",color:"rgba(0, 0, 0, 0.1)",cursor:"move",zIndex:900}}}}),r(t,"Extensions/DraggablePoints/DraggableChart.js",[t["Core/Animation/AnimationUtilities.js"],t["Extensions/DraggablePoints/DragDropUtilities.js"],t["Extensions/DraggablePoints/DragDropDefaults.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,t,r,o,a){let{animObject:i}=e,{addEvents:s,countProps:n,getFirstProp:d,getNormalizedEvent:l}=t,{doc:g}=o,{addEvent:p,merge:h,pick:u}=a;function x(){let e=this.dragHandles||{};if(e){for(let t of Object.keys(e))e[t].destroy&&e[t].destroy();delete this.dragHandles}}function c(e,t){let o=this.dragGuideBox,a=h(r.guideBox,t),i=h(a.default,a[e]);return o.attr({class:i.className,stroke:i.lineColor,strokeWidth:i.lineWidth,fill:i.color,cursor:i.cursor,zIndex:i.zIndex}).css({pointerEvents:"none"})}function m(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;let o=function(e){let t=e.series,r=t.options.data||[],o=t.options.dragDrop.groupBy,a=[];if(t.boosted)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,i=a.chart;u(a.options.dragDrop&&a.options.dragDrop.liveRedraw,!0)||(i.dragGuideBox=r=a.getGuideBox(o),i.setGuideBoxState("default",a.options.dragDrop.guideBox).add(a.group)),i.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 y(e,t){let r=t.dragDropData;if(r&&r.isDragging&&r.draggedPastSensitivity&&r.point.series){let o=r.point,a=r.newPoints,i=n(a),s=1===i?d(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(){v(t)})}delete t.dragDropData,t.dragGuideBox&&(t.dragGuideBox.destroy(),delete t.dragGuideBox)}function P(){this.hasAddedDragDropEvents||function(e){let 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;let r=["draggableX","draggableY"],o=e.dragDropProps||{};for(let e of Object.keys(o))(t=o[e]).optionName