UNPKG

ag-charts-core

Version:

Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue

2 lines 163 kB
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var n in t)__defProp(e,n,{get:t[n],enumerable:!0})},__copyProps=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of __getOwnPropNames(t))!__hasOwnProp.call(e,i)&&i!==n&&__defProp(e,i,{get:()=>t[i],enumerable:!(r=__getOwnPropDesc(t,i))||r.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__decorateClass=(e,t,n,r)=>{for(var i=r>1?void 0:r?__getOwnPropDesc(t,n):t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=(r?s(t,n,i):s(i))||i);return r&&i&&__defProp(t,n,i),i},main_exports={};__export(main_exports,{AGGREGATION_INDEX_UNSET:()=>AGGREGATION_INDEX_UNSET,AGGREGATION_INDEX_X_MAX:()=>AGGREGATION_INDEX_X_MAX,AGGREGATION_INDEX_X_MIN:()=>AGGREGATION_INDEX_X_MIN,AGGREGATION_INDEX_Y_MAX:()=>AGGREGATION_INDEX_Y_MAX,AGGREGATION_INDEX_Y_MIN:()=>AGGREGATION_INDEX_Y_MIN,AGGREGATION_MAX_POINTS:()=>AGGREGATION_MAX_POINTS,AGGREGATION_MIN_RANGE:()=>AGGREGATION_MIN_RANGE,AGGREGATION_SPAN:()=>AGGREGATION_SPAN,AGGREGATION_THRESHOLD:()=>AGGREGATION_THRESHOLD,AbstractModuleInstance:()=>AbstractModuleInstance,ActionOnSet:()=>ActionOnSet,AdjacencyListGraph:()=>AdjacencyListGraph,AsyncAwaitQueue:()=>AsyncAwaitQueue,BASE_FONT_SIZE:()=>BASE_FONT_SIZE,BREAK_TRANSFORM_CHAIN:()=>BREAK_TRANSFORM_CHAIN,BaseProperties:()=>BaseProperties,Border:()=>Border,CARTESIAN_AXIS_TYPE:()=>CARTESIAN_AXIS_TYPE,CARTESIAN_POSITION:()=>CARTESIAN_POSITION,CallbackCache:()=>CallbackCache,ChangeDetectableProperties:()=>ChangeDetectableProperties,ChartAxisDirection:()=>ChartAxisDirection,ChartUpdateType:()=>ChartUpdateType,CleanupRegistry:()=>CleanupRegistry,Color:()=>Color,DEFAULT_ANNOTATION_HANDLE_FILL:()=>DEFAULT_ANNOTATION_HANDLE_FILL,DEFAULT_ANNOTATION_STATISTICS_COLOR:()=>DEFAULT_ANNOTATION_STATISTICS_COLOR,DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE:()=>DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE,DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL:()=>DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL,DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE:()=>DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE,DEFAULT_ANNOTATION_STATISTICS_FILL:()=>DEFAULT_ANNOTATION_STATISTICS_FILL,DEFAULT_ANNOTATION_STATISTICS_STROKE:()=>DEFAULT_ANNOTATION_STATISTICS_STROKE,DEFAULT_CAPTION_ALIGNMENT:()=>DEFAULT_CAPTION_ALIGNMENT,DEFAULT_CAPTION_LAYOUT_STYLE:()=>DEFAULT_CAPTION_LAYOUT_STYLE,DEFAULT_FIBONACCI_STROKES:()=>DEFAULT_FIBONACCI_STROKES,DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL:()=>DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR:()=>DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,DEFAULT_POLAR_SERIES_STROKE:()=>DEFAULT_POLAR_SERIES_STROKE,DEFAULT_SHADOW_COLOUR:()=>DEFAULT_SHADOW_COLOUR,DEFAULT_SPARKLINE_CROSSHAIR_STROKE:()=>DEFAULT_SPARKLINE_CROSSHAIR_STROKE,DEFAULT_TEXTBOX_COLOR:()=>DEFAULT_TEXTBOX_COLOR,DEFAULT_TEXTBOX_FILL:()=>DEFAULT_TEXTBOX_FILL,DEFAULT_TEXTBOX_STROKE:()=>DEFAULT_TEXTBOX_STROKE,DEFAULT_TEXT_ANNOTATION_COLOR:()=>DEFAULT_TEXT_ANNOTATION_COLOR,DEFAULT_TOOLBAR_POSITION:()=>DEFAULT_TOOLBAR_POSITION,Debug:()=>debug_logger_exports,DebugMetrics:()=>debug_metrics_exports,DeclaredSceneChangeDetection:()=>DeclaredSceneChangeDetection,DeclaredSceneObjectChangeDetection:()=>DeclaredSceneObjectChangeDetection,Deprecated:()=>Deprecated,DeprecatedAndRenamedTo:()=>DeprecatedAndRenamedTo,EllipsisChar:()=>EllipsisChar,ErrorType:()=>ErrorType,EventEmitter:()=>EventEmitter,FONT_SIZE:()=>FONT_SIZE,FONT_SIZE_RATIO:()=>FONT_SIZE_RATIO,IS_DARK_THEME:()=>IS_DARK_THEME,InterpolationProperties:()=>InterpolationProperties,LRUCache:()=>LRUCache,LineSplitter:()=>LineSplitter,Logger:()=>logger_exports,LonLatBBox:()=>LonLatBBox,MementoCaretaker:()=>MementoCaretaker,ModuleRegistry:()=>moduleRegistry_exports,ModuleType:()=>ModuleType,ObserveChanges:()=>ObserveChanges,PALETTE_ALT_DOWN_FILL:()=>PALETTE_ALT_DOWN_FILL,PALETTE_ALT_DOWN_STROKE:()=>PALETTE_ALT_DOWN_STROKE,PALETTE_ALT_NEUTRAL_FILL:()=>PALETTE_ALT_NEUTRAL_FILL,PALETTE_ALT_NEUTRAL_STROKE:()=>PALETTE_ALT_NEUTRAL_STROKE,PALETTE_ALT_UP_FILL:()=>PALETTE_ALT_UP_FILL,PALETTE_ALT_UP_STROKE:()=>PALETTE_ALT_UP_STROKE,PALETTE_DOWN_FILL:()=>PALETTE_DOWN_FILL,PALETTE_DOWN_STROKE:()=>PALETTE_DOWN_STROKE,PALETTE_NEUTRAL_FILL:()=>PALETTE_NEUTRAL_FILL,PALETTE_NEUTRAL_STROKE:()=>PALETTE_NEUTRAL_STROKE,PALETTE_UP_FILL:()=>PALETTE_UP_FILL,PALETTE_UP_STROKE:()=>PALETTE_UP_STROKE,POLAR_AXIS_SHAPE:()=>POLAR_AXIS_SHAPE,POLAR_AXIS_TYPE:()=>POLAR_AXIS_TYPE,PREV_NEXT_KEYS:()=>PREV_NEXT_KEYS,Padding:()=>Padding,ParallelStateMachine:()=>ParallelStateMachine,PolarZIndexMap:()=>PolarZIndexMap,PropertiesArray:()=>PropertiesArray,Property:()=>addFakeTransformToInstanceProperty,ProxyOnWrite:()=>ProxyOnWrite,ProxyProperty:()=>ProxyProperty,ProxyPropertyOnWrite:()=>ProxyPropertyOnWrite,SKIP_JS_BUILTINS:()=>SKIP_JS_BUILTINS,ScaleAlignment:()=>ScaleAlignment,SceneArrayChangeDetection:()=>SceneArrayChangeDetection,SceneChangeDetection:()=>SceneChangeDetection,SceneObjectChangeDetection:()=>SceneObjectChangeDetection,SceneRefChangeDetection:()=>SceneRefChangeDetection,SeriesContentZIndexMap:()=>SeriesContentZIndexMap,SeriesZIndexMap:()=>SeriesZIndexMap,SimpleCache:()=>SimpleCache,SpanJoin:()=>SpanJoin,StateMachine:()=>StateMachine,StateMachineProperty:()=>StateMachineProperty,TRIPLE_EQ:()=>TRIPLE_EQ,TextMeasurer:()=>TextMeasurer,TickIntervals:()=>TickIntervals,ToolbarButtonProperties:()=>ToolbarButtonProperties,TrimEdgeGuard:()=>TrimEdgeGuard,UnknownError:()=>UnknownError,ValidationError:()=>ValidationError,Vec2:()=>vector_exports,Vec4:()=>vector4_exports,Vertex:()=>Vertex,WeakCache:()=>WeakCache,ZIndexMap:()=>ZIndexMap,addEscapeEventListener:()=>addEscapeEventListener,addFakeTransformToInstanceProperty:()=>addFakeTransformToInstanceProperty,addMouseCloseListener:()=>addMouseCloseListener,addObserverToInstanceProperty:()=>addObserverToInstanceProperty,addOverrideFocusVisibleEventListener:()=>addOverrideFocusVisibleEventListener,addTouchCloseListener:()=>addTouchCloseListener,addTransformToInstanceProperty:()=>addTransformToInstanceProperty,aggregationBucketForDatum:()=>aggregationBucketForDatum,aggregationDatumMatchesIndex:()=>aggregationDatumMatchesIndex,aggregationDomain:()=>aggregationDomain,aggregationIndexForXRatio:()=>aggregationIndexForXRatio,aggregationRangeFittingPoints:()=>aggregationRangeFittingPoints,aggregationXRatioForDatumIndex:()=>aggregationXRatioForDatumIndex,aggregationXRatioForXValue:()=>aggregationXRatioForXValue,and:()=>and,angleBetween:()=>angleBetween,angularPadding:()=>angularPadding,appendEllipsis:()=>appendEllipsis,arcDistanceSquared:()=>arcDistanceSquared,areScalingEqual:()=>areScalingEqual,array:()=>array,arrayLength:()=>arrayLength,arrayOf:()=>arrayOf,arrayOfDefs:()=>arrayOfDefs,arraysEqual:()=>arraysEqual,assignIfNotStrictlyEqual:()=>assignIfNotStrictlyEqual,attachDescription:()=>attachDescription,attachListener:()=>attachListener,autoSizedLabelOptionsDefs:()=>autoSizedLabelOptionsDefs,barHighlightOptionsDef:()=>barHighlightOptionsDef,bezier2DDistance:()=>bezier2DDistance,bezier2DExtrema:()=>bezier2DExtrema,boolean:()=>boolean,borderOptionsDef:()=>borderOptionsDef,boxCollides:()=>boxCollides,boxContains:()=>boxContains,boxEmpty:()=>boxEmpty,boxesEqual:()=>boxesEqual,buildDateFormatter:()=>buildDateFormatter,cachedTextMeasurer:()=>cachedTextMeasurer,calcLineHeight:()=>calcLineHeight,calculatePlacement:()=>calculatePlacement,callWithContext:()=>callWithContext,callback:()=>callback,callbackDefs:()=>callbackDefs,callbackOf:()=>callbackOf,checkDatum:()=>checkDatum,circularSliceArray:()=>circularSliceArray,clamp:()=>clamp,clampArray:()=>clampArray,clipLines:()=>clipLines,clipSpanX:()=>clipSpanX,collapseSpanToPoint:()=>collapseSpanToPoint,collectAggregationLevels:()=>collectAggregationLevels,color:()=>color,colorStopsOrderValidator:()=>colorStopsOrderValidator,colorUnion:()=>colorUnion,commonChartOptionsDefs:()=>commonChartOptionsDefs,commonSeriesOptionsDefs:()=>commonSeriesOptionsDefs,commonSeriesThemeableOptionsDefs:()=>commonSeriesThemeableOptionsDefs,compactAggregationIndices:()=>compactAggregationIndices,compareDates:()=>compareDates,computeExtremesAggregation:()=>computeExtremesAggregation,computeExtremesAggregationPartial:()=>computeExtremesAggregationPartial,constant:()=>constant,contextMenuItemsArray:()=>contextMenuItemsArray,countFractionDigits:()=>countFractionDigits,countLines:()=>countLines,createAggregationIndices:()=>createAggregationIndices,createButton:()=>createButton,createCanvasContext:()=>createCanvasContext,createCheckbox:()=>createCheckbox,createDeprecationWarning:()=>createDeprecationWarning,createElement:()=>createElement,createElementId:()=>createElementId,createIcon:()=>createIcon,createId:()=>createId,createIdsGenerator:()=>createIdsGenerator,createNumberFormatter:()=>createNumberFormatter,createSelect:()=>createSelect,createSvgElement:()=>createSvgElement,createTextArea:()=>createTextArea,createTicks:()=>createTicks,date:()=>date,dateToNumber:()=>dateToNumber,dateTruncationForDomain:()=>dateTruncationForDomain,datesSortOrder:()=>datesSortOrder,debounce:()=>debounce,decodeIntervalValue:()=>decodeIntervalValue,deepClone:()=>deepClone,deepFreeze:()=>deepFreeze,defaultEpoch:()=>defaultEpoch,defined:()=>defined,diffArrays:()=>diffArrays,distribute:()=>distribute,downloadUrl:()=>downloadUrl,dropFirstWhile:()=>dropFirstWhile,dropLastWhile:()=>dropLastWhile,durationDay:()=>durationDay,durationHour:()=>durationHour,durationMinute:()=>durationMinute,durationMonth:()=>durationMonth,durationSecond:()=>durationSecond,durationWeek:()=>durationWeek,durationYear:()=>durationYear,easeIn:()=>easeIn,easeInOut:()=>easeInOut,easeInOutQuad:()=>easeInOutQuad,easeInQuad:()=>easeInQuad,easeOut:()=>easeOut,easeOutQuad:()=>easeOutQuad,encodedToTimestamp:()=>encodedToTimestamp,enterpriseRegistry:()=>enterpriseRegistry,entries:()=>entries,errorBarOptionsDefs:()=>errorBarOptionsDefs,errorBarThemeableOptionsDefs:()=>errorBarThemeableOptionsDefs,estimateTickCount:()=>estimateTickCount,evaluateBezier:()=>evaluateBezier,every:()=>every,expandLegendPosition:()=>expandLegendPosition,extent:()=>extent,extractDecoratedProperties:()=>extractDecoratedProperties,extractDomain:()=>extractDomain,fillGradientDefaults:()=>fillGradientDefaults,fillImageDefaults:()=>fillImageDefaults,fillOptionsDef:()=>fillOptionsDef,fillPatternDefaults:()=>fillPatternDefaults,findMaxIndex:()=>findMaxIndex,findMaxValue:()=>findMaxValue,findMinIndex:()=>findMinIndex,findMinMax:()=>findMinMax,findMinValue:()=>findMinValue,findRangeExtent:()=>findRangeExtent,first:()=>first,focusCursorAtEnd:()=>focusCursorAtEnd,fontFamilyFull:()=>fontFamilyFull,fontOptionsDef:()=>fontOptionsDef,formatNumber:()=>formatNumber,formatObjectValidator:()=>formatObjectValidator,formatPercent:()=>formatPercent,formatValue:()=>formatValue,fromPairs:()=>fromPairs,generateUUID:()=>generateUUID,geoJson:()=>geoJson,getAngleRatioRadians:()=>getAngleRatioRadians,getAttribute:()=>getAttribute,getDocument:()=>getDocument,getElementBBox:()=>getElementBBox,getIconClassNames:()=>getIconClassNames,getLastFocus:()=>getLastFocus,getMaxInnerRectSize:()=>getMaxInnerRectSize,getMidpointsForIndices:()=>getMidpointsForIndices,getMinOuterRectSize:()=>getMinOuterRectSize,getPath:()=>getPath,getTickTimeInterval:()=>getTickTimeInterval,getWindow:()=>getWindow,googleFont:()=>googleFont,gradientColorStops:()=>gradientColorStops,gradientStrict:()=>gradientStrict,greaterThan:()=>greaterThan,groupBy:()=>groupBy,guardTextEdges:()=>guardTextEdges,hasNoModifiers:()=>hasNoModifiers,hasRequiredInPath:()=>hasRequiredInPath,highlightOptionsDef:()=>highlightOptionsDef,htmlElement:()=>htmlElement,inRange:()=>inRange,initRovingTabIndex:()=>initRovingTabIndex,insertListItemsSorted:()=>insertListItemsSorted,instanceOf:()=>instanceOf,interpolationOptionsDefs:()=>interpolationOptionsDefs,intervalCeil:()=>intervalCeil,intervalEpoch:()=>intervalEpoch,intervalExtent:()=>intervalExtent,intervalFloor:()=>intervalFloor,intervalHierarchy:()=>intervalHierarchy,intervalMilliseconds:()=>intervalMilliseconds,intervalNext:()=>intervalNext,intervalPrevious:()=>intervalPrevious,intervalRange:()=>intervalRange,intervalRangeCount:()=>intervalRangeCount,intervalRangeNumeric:()=>intervalRangeNumeric,intervalRangeStartIndex:()=>intervalRangeStartIndex,intervalStep:()=>intervalStep,intervalUnit:()=>intervalUnit,inverseEaseOut:()=>inverseEaseOut,isArray:()=>isArray,isBetweenAngles:()=>isBetweenAngles,isBoolean:()=>isBoolean,isButtonClickEvent:()=>isButtonClickEvent,isColor:()=>isColor,isContinuous:()=>isContinuous,isDate:()=>isDate,isDecoratedObject:()=>isDecoratedObject,isDefined:()=>isDefined,isDenseInterval:()=>isDenseInterval,isEmptyObject:()=>isEmptyObject,isEnumKey:()=>isEnumKey,isEnumValue:()=>isEnumValue,isFiniteNumber:()=>isFiniteNumber,isFunction:()=>isFunction,isGradientFill:()=>isGradientFill,isGradientFillArray:()=>isGradientFillArray,isGradientOrPatternFill:()=>isGradientOrPatternFill,isHtmlElement:()=>isHtmlElement,isImageFill:()=>isImageFill,isInputPending:()=>isInputPending,isInteger:()=>isInteger,isKeyOf:()=>isKeyOf,isNegative:()=>isNegative,isNumber:()=>isNumber,isNumberEqual:()=>isNumberEqual,isNumberObject:()=>isNumberObject,isObject:()=>isObject,isObjectLike:()=>isObjectLike,isObjectWithProperty:()=>isObjectWithProperty,isObjectWithStringProperty:()=>isObjectWithStringProperty,isPatternFill:()=>isPatternFill,isPlainObject:()=>isPlainObject,isPointLabelDatum:()=>isPointLabelDatum,isProperties:()=>isProperties,isRegExp:()=>isRegExp,isScaleValid:()=>isScaleValid,isSegmentTruncated:()=>isSegmentTruncated,isString:()=>isString,isStringFillArray:()=>isStringFillArray,isStringObject:()=>isStringObject,isSymbol:()=>isSymbol,isTextTruncated:()=>isTextTruncated,isTruncated:()=>isTruncated,isUnitTimeCategoryScaling:()=>isUnitTimeCategoryScaling,isValidDate:()=>isValidDate,isValidNumberFormat:()=>isValidNumberFormat,iterate:()=>iterate,joinFormatted:()=>joinFormatted,jsonApply:()=>jsonApply,jsonDiff:()=>jsonDiff,jsonPropertyCompare:()=>jsonPropertyCompare,jsonWalk:()=>jsonWalk,kebabCase:()=>kebabCase,labelBoxOptionsDef:()=>labelBoxOptionsDef,legendPositionValidator:()=>legendPositionValidator,lessThan:()=>lessThan,lessThanOrEqual:()=>lessThanOrEqual,levenshteinDistance:()=>levenshteinDistance,lineDashOptionsDef:()=>lineDashOptionsDef,lineDistanceSquared:()=>lineDistanceSquared,lineHighlightOptionsDef:()=>lineHighlightOptionsDef,lineSegmentOptions:()=>lineSegmentOptions,lineSegmentation:()=>lineSegmentation,linear:()=>linear,linearGaugeSeriesOptionsDef:()=>linearGaugeSeriesOptionsDef,linearGaugeSeriesThemeableOptionsDef:()=>linearGaugeSeriesThemeableOptionsDef,linearGaugeTargetOptionsDef:()=>linearGaugeTargetOptionsDef,linearPoints:()=>linearPoints,listDecoratedProperties:()=>listDecoratedProperties,lowestGranularityForInterval:()=>lowestGranularityForInterval,lowestGranularityUnitForTicks:()=>lowestGranularityUnitForTicks,lowestGranularityUnitForValue:()=>lowestGranularityUnitForValue,makeAccessibleClickListener:()=>makeAccessibleClickListener,mapValues:()=>mapValues,markerOptionsDefs:()=>markerOptionsDefs,markerStyleOptionsDefs:()=>markerStyleOptionsDefs,measureTextSegments:()=>measureTextSegments,memo:()=>memo,merge:()=>merge,mergeArrayDefaults:()=>mergeArrayDefaults,mergeDefaults:()=>mergeDefaults,modulus:()=>modulus,multiSeriesHighlightOptionsDef:()=>multiSeriesHighlightOptionsDef,nearestSquared:()=>nearestSquared,nearestSquaredInContainer:()=>nearestSquaredInContainer,nextPowerOf2:()=>nextPowerOf2,niceTicksDomain:()=>niceTicksDomain,normalisedExtentWithMetadata:()=>normalisedExtentWithMetadata,normalisedTimeExtentWithMetadata:()=>normalisedTimeExtentWithMetadata,normalizeAngle180:()=>normalizeAngle180,normalizeAngle360:()=>normalizeAngle360,normalizeAngle360FromDegrees:()=>normalizeAngle360FromDegrees,normalizeAngle360Inclusive:()=>normalizeAngle360Inclusive,number:()=>number,numberFormatValidator:()=>numberFormatValidator,numberMin:()=>numberMin,numberRange:()=>numberRange,object:()=>object,objectsEqual:()=>objectsEqual,objectsEqualWith:()=>objectsEqualWith,optionsDefs:()=>optionsDefs,or:()=>or,padding:()=>padding,paddingOptions:()=>paddingOptions,parseColor:()=>parseColor,parseNumberFormat:()=>parseNumberFormat,partialAssign:()=>partialAssign,pause:()=>pause,pick:()=>pick,placeLabels:()=>placeLabels,positiveNumber:()=>positiveNumber,positiveNumberNonZero:()=>positiveNumberNonZero,previousPowerOf2:()=>previousPowerOf2,radialGaugeSeriesOptionsDef:()=>radialGaugeSeriesOptionsDef,radialGaugeSeriesThemeableOptionsDef:()=>radialGaugeSeriesThemeableOptionsDef,radialGaugeTargetOptionsDef:()=>radialGaugeTargetOptionsDef,range:()=>range,rangeValidator:()=>rangeValidator,ratio:()=>ratio,readIntegratedWrappedValue:()=>readIntegratedWrappedValue,required:()=>required,rescaleSpan:()=>rescaleSpan,rescaleVisibleRange:()=>rescaleVisibleRange,resetIds:()=>resetIds,rotatePoint:()=>rotatePoint,roundTo:()=>roundTo,safeCall:()=>safeCall,seriesLabelOptionsDefs:()=>seriesLabelOptionsDefs,setAttribute:()=>setAttribute,setAttributes:()=>setAttributes,setDocument:()=>setDocument,setElementBBox:()=>setElementBBox,setElementStyle:()=>setElementStyle,setElementStyles:()=>setElementStyles,setPath:()=>setPath,setWindow:()=>setWindow,shadowOptionsDefs:()=>shadowOptionsDefs,shallowClone:()=>shallowClone,shapeHighlightOptionsDef:()=>shapeHighlightOptionsDef,shapeSegmentOptions:()=>shapeSegmentOptions,shapeSegmentation:()=>shapeSegmentation,shapeValidator:()=>shapeValidator,simpleMemorize:()=>simpleMemorize,simpleMemorize2:()=>simpleMemorize2,smoothPoints:()=>smoothPoints,solveBezier:()=>solveBezier,sortAndUniqueDates:()=>sortAndUniqueDates,sortBasedOnArray:()=>sortBasedOnArray,spanRange:()=>spanRange,splitBezier2D:()=>splitBezier2D,stepPoints:()=>stepPoints,stopPageScrolling:()=>stopPageScrolling,strictObjectKeys:()=>strictObjectKeys,strictUnion:()=>strictUnion,string:()=>string,stringLength:()=>stringLength,stringifyValue:()=>stringifyValue,strokeOptionsDef:()=>strokeOptionsDef,textOrSegments:()=>textOrSegments,themeOperator:()=>themeOperator,throttle:()=>throttle,tickFormat:()=>tickFormat,tickStep:()=>tickStep,toArray:()=>toArray,toDegrees:()=>toDegrees,toFontString:()=>toFontString,toIterable:()=>toIterable,toPlainText:()=>toPlainText,toRadians:()=>toRadians,toTextString:()=>toTextString,toolbarButtonOptionsDefs:()=>toolbarButtonOptionsDefs,tooltipOptionsDefs:()=>tooltipOptionsDefs,transformIntegratedCategoryValue:()=>transformIntegratedCategoryValue,truncateLine:()=>truncateLine,typeUnion:()=>typeUnion,undocumented:()=>undocumented,unguardTextEdges:()=>unguardTextEdges,union:()=>union,unionSymbol:()=>unionSymbol,unique:()=>unique,validate:()=>validate,without:()=>without,wrapLines:()=>wrapLines,wrapText:()=>wrapText,wrapTextOrSegments:()=>wrapTextOrSegments,wrapTextSegments:()=>wrapTextSegments}),module.exports=__toCommonJS(main_exports);var debug_logger_exports={};__export(debug_logger_exports,{Time:()=>Time,check:()=>check,create:()=>create,inDevelopmentMode:()=>inDevelopmentMode});function toArray(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function unique(e){return Array.from(new Set(e))}function groupBy(e,t){return e.reduce((n,r)=>{const i=t(r);return n[i]??(n[i]=[]),n[i].push(r),n},{})}function arraysEqual(e,t){if(e==null||t==null||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(Array.isArray(e[n])&&Array.isArray(t[n])){if(!arraysEqual(e[n],t[n]))return!1}else if(e[n]!==t[n])return!1;return!0}function circularSliceArray(e,t,n=0){if(e.length===0)return[];const r=[];for(let i=0;i<t;i++)r.push(e.at((i+n)%e.length));return r}function sortBasedOnArray(e,t){const n=new Map;for(const[r,i]of t.entries())n.set(i,r);return e.sort((r,i)=>{const o=n.get(r)??1/0,s=n.get(i)??1/0;return o-s})}function dropFirstWhile(e,t){let n=0;for(;n<e.length&&t(e[n]);)n+=1;const r=n;r!==0&&e.splice(0,r)}function dropLastWhile(e,t){let n=e.length-1;for(;n>=0&&t(e[n]);)n-=1;const r=e.length-1-n;r!==0&&e.splice(e.length-r,r)}function distribute(e,t,n){const r=[e],i=Math.round((t-e)/(n-1));if(i>0)for(let o=e+i;o<t&&!(r.push(o)>=n-1);o+=i);return r.push(t),r}var verifiedGlobals={};typeof globalThis.window<"u"&&(verifiedGlobals.window=globalThis.window),typeof document<"u"?verifiedGlobals.document=document:typeof globalThis.global<"u"&&(verifiedGlobals.document=globalThis.document);function getDocument(e){return e?verifiedGlobals.document?.[e]:verifiedGlobals.document}function getWindow(e){return e?verifiedGlobals.window?.[e]:verifiedGlobals.window}function setDocument(e){verifiedGlobals.document=e}function setWindow(e){verifiedGlobals.window=e}function createElement(e,t,n){const r=getDocument().createElement(e);if(typeof t=="object"&&(n=t,t=void 0),t)for(const i of t.split(" "))r.classList.add(i);return n&&Object.assign(r.style,n),r}function createSvgElement(e){return getDocument().createElementNS("http://www.w3.org/2000/svg",e)}function downloadUrl(e,t){const n=getDocument("body"),r=createElement("a",{display:"none"});r.href=e,r.download=t,n.appendChild(r),r.click(),setTimeout(()=>r.remove())}function attachListener(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var style;function parseColor(e){if(style==null){const n=getWindow("Option");style=new n().style}style.color=e;const t=style.color||null;return style.color="",t}var logger_exports={};__export(logger_exports,{error:()=>error,errorOnce:()=>errorOnce,log:()=>log,logGroup:()=>logGroup,reset:()=>reset,table:()=>table,warn:()=>warn,warnOnce:()=>warnOnce});var doOnceCache=new Set;function log(...e){console.log(...e)}function warn(e,...t){console.warn(`AG Charts - ${e}`,...t)}function error(e,...t){typeof e=="object"?console.error("AG Charts error",e,...t):console.error(`AG Charts - ${e}`,...t)}function table(...e){console.table(...e)}function guardOnce(e,t,n){let r;e instanceof Error?r=e.message:typeof e=="string"?r=e:typeof e=="object"?r=JSON.stringify(e):r=String(e);const i=`${t}: ${r}`;doOnceCache.has(i)||(n(e),doOnceCache.add(i))}function warnOnce(e,...t){guardOnce(e,"Logger.warn",n=>warn(n,...t))}function errorOnce(e,...t){guardOnce(e,"Logger.error",n=>error(n,...t))}function reset(){doOnceCache.clear()}function logGroup(e,t){console.groupCollapsed(e);try{return t()}finally{console.groupEnd()}}var LongTimePeriodThreshold=2e3,timeOfLastLog=Date.now();function logTimeGap(){const e=Date.now()-timeOfLastLog;if(e>LongTimePeriodThreshold){const t=(Math.floor(e/100)/10).toFixed(1);log(`**** ${t}s since last log message ****`)}timeOfLastLog=Date.now()}function create(...e){return Object.assign((...n)=>{check(...e)&&(typeof n[0]=="function"&&(n=toArray(n[0]())),logTimeGap(),log(...n))},{check:()=>check(...e),group:(n,r)=>check(...e)?logGroup(n,r):r()})}function check(...e){return e.length===0&&e.push(!0),toArray(getWindow("agChartsDebug")).some(n=>e.includes(n))}function inDevelopmentMode(e){if(check("dev"))return e()}function Time(e,t={}){const{logResult:n=!0,logStack:r=!1,logArgs:i=!1,logData:o}=t;return function(s,a,c){const l=c.value;c.value=function(...u){const f=performance.now(),h=l.apply(this,u),g={duration:performance.now()-f};return n&&(g.result=h),i&&(g.args=u),r&&(g.stack=new Error("Stack trace for timing debug").stack),o&&(g.logData=o(this)),log(e,g),h}}}var debug_metrics_exports={};__export(debug_metrics_exports,{flush:()=>flush,record:()=>record});var metrics=new Map;function record(e,t){check("scene:stats:verbose")&&metrics.set(e,t)}function flush(){const e=Object.fromEntries(metrics);return metrics.clear(),e}var enterpriseRegistry={},moduleRegistry_exports={};__export(moduleRegistry_exports,{RegistryMode:()=>RegistryMode,getAxisModule:()=>getAxisModule,getChartModule:()=>getChartModule,getPresetModule:()=>getPresetModule,getSeriesModule:()=>getSeriesModule,hasModule:()=>hasModule,isEnterprise:()=>isEnterprise,isIntegrated:()=>isIntegrated,isModuleType:()=>isModuleType,isUmd:()=>isUmd,listModules:()=>listModules,listModulesByType:()=>listModulesByType,register:()=>register,registerModules:()=>registerModules,reset:()=>reset2,setRegistryMode:()=>setRegistryMode});var ModuleType=(e=>(e.Chart="chart",e.Axis="axis",e.Series="series",e.Plugin="plugin",e.AxisPlugin="axis:plugin",e.SeriesPlugin="series:plugin",e.Preset="preset",e))(ModuleType||{}),RegistryMode=(e=>(e.Enterprise="enterprise",e.Integrated="integrated",e.UMD="umd",e))(RegistryMode||{}),registeredModes=new Set,registeredModules=new Map;function registerModuleDefinition(e){if(registeredModules.set(e.name,e),e.dependencies)for(const t of e.dependencies)register(t)}function register(e){const t=registeredModules.get(e.name);if(!t){registerModuleDefinition(e);return}if(t.version===e.version){!t.enterprise&&e.enterprise&&registerModuleDefinition(e);return}throw new Error([`AG Charts - Module '${e.name}' already registered with different version:`,`${t.version} vs ${e.version}`,"","Check your package.json for conflicting dependencies - depending on your package manager","one of these commands may help:","- npm ls ag-charts-community","- yarn why ag-charts-community"].join(` `))}function registerModules(e){for(const t of e.flat())register(t)}function reset2(){registeredModes.clear(),registeredModules.clear()}function hasModule(e){return registeredModules.has(e)}function*listModules(){for(const e of registeredModules.values())yield e}function*listModulesByType(e){for(const t of registeredModules.values())isModuleType(e,t)&&(yield t)}function getAxisModule(e){const t=registeredModules.get(e);if(isModuleType("axis",t))return t}function getChartModule(e){const t=registeredModules.get(e);if(isModuleType("chart",t))return t;throw new Error("AG Charts - Unknown chart type; Check options are correctly structured and series types are specified")}function getPresetModule(e){const t=registeredModules.get(e);if(isModuleType("preset",t))return t}function getSeriesModule(e){const t=registeredModules.get(e);if(isModuleType("series",t))return t}function setRegistryMode(e){registeredModes.add(e)}function isEnterprise(){return registeredModes.has("enterprise")}function isIntegrated(){return registeredModes.has("integrated")}function isUmd(){return registeredModes.has("umd")}function isModuleType(e,t){return t?.type===e}var CleanupRegistry=class{constructor(){this.callbacks=new Set}flush(){for(const e of this.callbacks)e();this.callbacks.clear()}merge(e){for(const t of e.callbacks)this.callbacks.add(t)}register(...e){for(const t of e)t&&this.callbacks.add(t)}},AbstractModuleInstance=class{constructor(){this.cleanup=new CleanupRegistry}destroy(){this.cleanup.flush()}};function extractDomain(e){return e.domain}var ScaleAlignment=(e=>(e[e.Leading=0]="Leading",e[e.Trailing=1]="Trailing",e[e.Interpolate=2]="Interpolate",e))(ScaleAlignment||{}),EventEmitter=class{constructor(){this.events=new Map}on(e,t){return this.events.has(e)||this.events.set(e,new Set),this.events.get(e)?.add(t),()=>this.off(e,t)}off(e,t){const n=this.events.get(e);n&&(n.delete(t),n.size===0&&this.events.delete(e))}emit(e,t){const n=this.events.get(e);if(n)for(const r of n)r(t)}clear(e){e?this.events.delete(e):this.events.clear()}},LRUCache=class{constructor(e){if(this.maxCacheSize=e,this.store=new Map,e<=0)throw new Error("LRUCache size must be greater than 0")}get(e){if(!this.store.has(e))return;const t=this.store.get(e);return this.store.delete(e),this.store.set(e,t),t}has(e){return this.store.has(e)}set(e,t){return this.store.set(e,t),this.store.size>this.maxCacheSize&&this.store.delete(this.store.keys().next().value),t}clear(){this.store.clear()}};function clamp(e,t,n){return Math.min(n,Math.max(e,t))}function inRange(e,t,n=1e-10){return e>=t[0]-n&&e<=t[1]+n}function isNumberEqual(e,t,n=1e-10){return e===t||Math.abs(e-t)<n}function isNegative(e){return Math.sign(e)===-1||Object.is(e,-0)}function isInteger(e){return e%1===0}function roundTo(e,t=2){const n=10**t;return Math.round(e*n)/n}function modulus(e,t){return Math.floor(e%t+(e<0?Math.abs(t):0))}function countFractionDigits(e){if(Math.floor(e)===e)return 0;let t=String(e),n=0;if(e<1e-6||e>=1e21){let i;[t,i]=t.split("e"),i!=null&&(n=Number(i))}const r=t.split(".")[1]?.length??0;return Math.max(r-n,0)}function isDefined(e){return e!=null}function isArray(e){return Array.isArray(e)}function isBoolean(e){return typeof e=="boolean"}function isDate(e){return e instanceof Date}function isValidDate(e){return isDate(e)&&!Number.isNaN(Number(e))}function isRegExp(e){return e instanceof RegExp}function isFunction(e){return typeof e=="function"}function isObject(e){return typeof e=="object"&&e!==null&&!isArray(e)}function isObjectLike(e){return isArray(e)||isPlainObject(e)}function isPlainObject(e){return typeof e=="object"&&e!==null&&e.constructor?.name==="Object"}function isEmptyObject(e){if(typeof e!="object"||e===null)return!1;for(const t in e)return!1;return!0}function isString(e){return typeof e=="string"}function isNumber(e){return typeof e=="number"}function isFiniteNumber(e){return Number.isFinite(e)}function isHtmlElement(e){return typeof globalThis.window<"u"&&e instanceof HTMLElement}function isEnumKey(e,t){return isString(t)&&Object.keys(e).includes(t)}function isEnumValue(e,t){return Object.values(e).includes(t)}function isSymbol(e){return typeof e=="symbol"}function isColor(e){return isString(e)&&(e==="none"||parseColor(e)!=null)}function isKeyOf(e,t){return e in t}var formatRegEx=/^(?:(.)?([<>=^]))?([+\-( ])?([$€£¥₣₹#])?(0)?(\d+)?(,)?(?:\.(\d+))?(~)?([%a-z])?$/i,surroundedRegEx=/^((?:[^#]|#[^{])*)#{([^}]+)}(.*)$/;function isValidNumberFormat(e){if(!isString(e))return!1;const t=surroundedRegEx.exec(e);return formatRegEx.test(t?t[2]:e)}function parseNumberFormat(e){let t,n;const r=surroundedRegEx.exec(e);r&&([,t,e,n]=r);const i=formatRegEx.exec(e);if(!i){logger_exports.warnOnce(`The number formatter is invalid: ${e}`);return}const[,o,s,a,c,l,u,f,h,d,g]=i;return{fill:o,align:s,sign:a,symbol:c,zero:l,width:Number.parseInt(u),comma:f,precision:Number.parseInt(h),trim:!!d,type:g,prefix:t,suffix:n}}function createNumberFormatter(e){const t=typeof e=="string"?parseNumberFormat(e):e;if(t==null)return;const{fill:n,align:r,sign:i="-",symbol:o,zero:s,width:a,comma:c,type:l,prefix:u="",suffix:f="",precision:h}=t;let{trim:d}=t;const g=h==null||Number.isNaN(h);let p;if(!l)p=decimalTypes.g,d=!0;else if(l in decimalTypes&&l in integerTypes)p=g?integerTypes[l]:decimalTypes[l];else if(l in decimalTypes)p=decimalTypes[l];else if(l in integerTypes)p=integerTypes[l];else throw new Error(`The number formatter type is invalid: ${l}`);const y=l?6:12;let m;g||(m=h);let b=r,v=n;return s&&(v??(v="0"),b??(b="=")),(T,M)=>{let A;m!=null?A=m:l==="f"||l==="%"?A=M??y:l?A=y:A=M??y;let x=p(T,A);d&&(x=removeTrailingZeros(x)),c&&(x=insertSeparator(x,c));const S=getSymbolPrefix(o,l),_=S?.length??0;S&&(x=`${S}${x}`),l==="s"&&(x=`${x}${getSIPrefix(T)}`),(l==="%"||l==="p")&&(x=`${x}%`);const{value:k,prefixLength:C}=addSign(T,x,i),R=C+_;let L=k;return a!=null&&!Number.isNaN(a)&&(L=addPadding(L,a,v??" ",b,R)),L=`${u}${L}${f}`,L}}var integerTypes={b:e=>absFloor(e).toString(2),c:e=>String.fromCodePoint(e),d:e=>Math.round(Math.abs(e)).toFixed(0),o:e=>absFloor(e).toString(8),x:e=>absFloor(e).toString(16),X:e=>integerTypes.x(e).toUpperCase(),n:e=>integerTypes.d(e),"%":e=>`${absFloor(e*100).toFixed(0)}`},decimalTypes={e:(e,t)=>Math.abs(e).toExponential(t),E:(e,t)=>decimalTypes.e(e,t).toUpperCase(),f:(e,t)=>Math.abs(e).toFixed(t),F:(e,t)=>decimalTypes.f(e,t).toUpperCase(),g:(e,t)=>{if(e===0)return"0";const n=Math.abs(e),r=Math.floor(Math.log10(n));return r>=-4&&r<t?n.toFixed(t-1-r):n.toExponential(t-1)},G:(e,t)=>decimalTypes.g(e,t).toUpperCase(),n:(e,t)=>decimalTypes.g(e,t),p:(e,t)=>decimalTypes.r(e*100,t),r:(e,t)=>{if(e===0)return"0";const n=Math.abs(e),i=Math.floor(Math.log10(n))-(t-1);if(i<=0)return n.toFixed(-i);const o=10**i;return(Math.round(n/o)*o).toFixed()},s:(e,t)=>{const n=getSIPrefixPower(e);return decimalTypes.r(e/10**n,t)},"%":(e,t)=>decimalTypes.f(e*100,t)},minSIPrefix=-24,maxSIPrefix=24,siPrefixes={[minSIPrefix]:"y",[-21]:"z",[-18]:"a",[-15]:"f",[-12]:"p",[-9]:"n",[-6]:"\xB5",[-3]:"m",0:"",3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",[maxSIPrefix]:"Y"},minusSign="\u2212";function absFloor(e){return Math.floor(Math.abs(e))}function removeTrailingZeros(e){if(!e.endsWith("0")||!e.includes("."))return e;let t=e.length-1;for(;t>0;)if(e[t]=="0")t-=1;else if(e[t]=="."){t-=1;break}else break;return e.substring(0,t+1)}function insertSeparator(e,t){let n=e.indexOf(".");n<0&&(n=e.length);const r=e.substring(0,n).split(""),i=e.substring(n);for(let o=r.length-3;o>0;o-=3)r.splice(o,0,t);return`${r.join("")}${i}`}function getSIPrefix(e){return siPrefixes[getSIPrefixPower(e)]}function getSIPrefixPower(e){return clamp(minSIPrefix,e?Math.floor(Math.log10(Math.abs(e))/3)*3:0,maxSIPrefix)}function addSign(e,t,n=""){if(n==="(")return e>=0?{value:t,prefixLength:0}:{value:`(${t})`,prefixLength:1};let r="";return e<0?r=minusSign:n==="+"?r="+":n===" "&&(r=" "),{value:`${r}${t}`,prefixLength:r.length}}function addPadding(e,t,n=" ",r=">",i=0){const o=t-e.length;if(o<=0)return e;const s=n.repeat(o);if(r==="="){const a=Math.min(Math.max(i,0),e.length),c=e.slice(0,a),l=e.slice(a);return`${c}${s}${l}`}if(r===">"||!r)return s+e;if(r==="<")return`${e}${s}`;if(r==="^"){const a=Math.ceil(o/2),c=Math.floor(o/2);return`${n.repeat(a)}${e}${n.repeat(c)}`}return s+e}function getSymbolPrefix(e,t){if(e==="#")switch(t){case"b":return"0b";case"o":return"0o";case"x":return"0x";case"X":return"0X";default:return""}return e??""}var CONSTANTS={periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};function dayOfYear(e,t=new Date(e.getFullYear(),0,1)){const n=e.getTimezoneOffset()-t.getTimezoneOffset(),r=e.getTime()-t.getTime()+n*6e4,i=36e5*24;return Math.floor(r/i)}function weekOfYear(e,t){const r=new Date(e.getFullYear(),0,1).getDay(),i=(t-r+7)%7,o=new Date(e.getFullYear(),0,i+1);return o<=e?Math.floor(dayOfYear(e,o)/7)+1:0}var SUNDAY=0,MONDAY=1,THURSDAY=4;function isoWeekOfYear(e,t=e.getFullYear()){const r=new Date(t,0,1).getDay(),i=(THURSDAY-r+7)%7,o=new Date(t,0,i-(THURSDAY-MONDAY)+1);return o<=e?Math.floor(dayOfYear(e,o)/7)+1:isoWeekOfYear(e,t-1)}function timezone(e){const t=e.getTimezoneOffset(),n=Math.abs(t);return`${t>0?"-":"+"}${pad(Math.floor(n/60),2,"0")}${pad(Math.floor(n%60),2,"0")}`}var FORMATTERS={a:e=>CONSTANTS.shortDays[e.getDay()],A:e=>CONSTANTS.days[e.getDay()],b:e=>CONSTANTS.shortMonths[e.getMonth()],B:e=>CONSTANTS.months[e.getMonth()],c:"%x, %X",d:(e,t)=>pad(e.getDate(),2,t??"0"),e:"%_d",f:(e,t)=>pad(e.getMilliseconds()*1e3,6,t??"0"),H:(e,t)=>pad(e.getHours(),2,t??"0"),I:(e,t)=>{const n=e.getHours()%12;return n===0?"12":pad(n,2,t??"0")},j:(e,t)=>pad(dayOfYear(e)+1,3,t??"0"),m:(e,t)=>pad(e.getMonth()+1,2,t??"0"),M:(e,t)=>pad(e.getMinutes(),2,t??"0"),L:(e,t)=>pad(e.getMilliseconds(),3,t??"0"),p:e=>e.getHours()<12?"AM":"PM",Q:e=>String(e.getTime()),s:e=>String(Math.floor(e.getTime()/1e3)),S:(e,t)=>pad(e.getSeconds(),2,t??"0"),u:e=>{let t=e.getDay();return t<1&&(t+=7),String(t%7)},U:(e,t)=>pad(weekOfYear(e,SUNDAY),2,t??"0"),V:(e,t)=>pad(isoWeekOfYear(e),2,t??"0"),w:(e,t)=>pad(e.getDay(),2,t??"0"),W:(e,t)=>pad(weekOfYear(e,MONDAY),2,t??"0"),x:"%-m/%-d/%Y",X:"%-I:%M:%S %p",y:(e,t)=>pad(e.getFullYear()%100,2,t??"0"),Y:(e,t)=>pad(e.getFullYear(),4,t??"0"),Z:e=>timezone(e),"%":()=>"%"},PADS={_:" ",0:"0","-":""};function pad(e,t,n){const r=String(Math.floor(e));return r.length>=t?r:`${n.repeat(t-r.length)}${r}`}function buildDateFormatter(e){const t=[];for(;e.length>0;){let n=e.indexOf("%");if(n!==0){const a=n>0?e.substring(0,n):e;t.push(a)}if(n<0)break;const r=e[n+1],i=PADS[r];i!=null&&n++;const o=e[n+1],s=FORMATTERS[o];if(typeof s=="function")t.push([s,i]);else if(typeof s=="string"){const a=buildDateFormatter(s);t.push([a,i])}else t.push(`${i??""}${o}`);e=e.substring(n+2)}return n=>{const r=typeof n=="number"?new Date(n):n;return t.map(i=>typeof i=="string"?i:i[0](r,i[1])).join("")}}function debounce(e,t=0,n){const{leading:r=!1,trailing:i=!0,maxWait:o=1/0}=n??{};let s,a;if(o<t)throw new Error("Value of maxWait cannot be lower than waitMs.");function c(...l){if(r&&!a){a=Date.now(),s=setTimeout(()=>a=null,t),e(...l);return}let u=t;if(o!==1/0&&a){const f=Date.now()-a;t>o-f&&(u=o-f)}clearTimeout(s),a??(a=Date.now()),s=setTimeout(()=>{a=null,i&&e(...l)},u)}return Object.assign(c,{cancel(){clearTimeout(s),a=null}})}function throttle(e,t,n){const{leading:r=!0,trailing:i=!0}=n??{};let o,s,a=!1;function c(){i&&s?(o=setTimeout(c,t),e(...s)):a=!1,s=null}function l(...u){a?s=u:(a=!0,o=setTimeout(c,t),r?e(...u):s=u)}return Object.assign(l,{cancel(){clearTimeout(o),a=!1,s=null}})}function safeCall(e,t,n=""){try{return e(...t)}catch(r){const i=n?` \`${n}\``:"";warnOnce(`Uncaught exception in user callback${i}`,r)}}var EllipsisChar="\u2026",LineSplitter=/\r?\n/g,TrimEdgeGuard="\u200B";function toFontString({fontSize:e,fontStyle:t,fontWeight:n,fontFamily:r}){let i="";return t&&t!=="normal"&&(i+=`${t} `),n&&n!=="normal"&&n!==400&&(i+=`${n} `),i+=`${e}px`,i+=` ${r}`,i}function calcLineHeight(e,t=1.15){return Math.round(e*t)}function toTextString(e){return String(e??"")}var TrimCharsRegex=/[\s.,;:-]{1,5}$/;function appendEllipsis(e){return e.replace(TrimCharsRegex,"")+EllipsisChar}function guardTextEdges(e){return TrimEdgeGuard+e+TrimEdgeGuard}function unguardTextEdges(e){return e.replaceAll(TrimEdgeGuard,"")}function isTruncated(e){return isArray(e)?isSegmentTruncated(e.at(-1)):isTextTruncated(toTextString(e))}function isTextTruncated(e){return e.endsWith(EllipsisChar)}function isSegmentTruncated(e){return toTextString(e?.text).endsWith(EllipsisChar)}function joinFormatted(e,t="and",n=String,r=1/0){if(e.length===0)return"";if(e.length===1)return n(e[0]);e=e.map(n);const i=e.pop();if(e.length>=r){const o=e.length-(r-1);return`${e.slice(0,r-1).join(", ")}, and ${o} more ${t} ${i}`}return`${e.join(", ")} ${t} ${i}`}function stringifyValue(e,t=1/0){if(typeof e=="number"){if(Number.isNaN(e))return"NaN";if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity"}const n=JSON.stringify(e)??typeof e;return n.length>t?`${n.slice(0,t)}... (+${n.length-t} characters)`:n}function countLines(e){let t=1;for(let n=0;n<e.length;n++)e.codePointAt(n)===10&&t++;return t}function levenshteinDistance(e,t){if(e===t)return 0;const[n,r]=e.length<t.length?[e,t]:[t,e],i=n.length,o=r.length;let s=new Array(i+1).fill(0).map((c,l)=>l),a=new Array(i+1);for(let c=1;c<=o;c++){a[0]=c;for(let l=1;l<=i;l++){const u=r[c-1]===n[l-1]?0:1;a[l]=Math.min(s[l]+1,a[l-1]+1,s[l-1]+u)}[s,a]=[a,s]}return s[i]}function kebabCase(e){return e.replaceAll(KEBAB_CASE_REGEX,(t,n)=>(n>0?"-":"")+t.toLowerCase())}var KEBAB_CASE_REGEX=/[A-Z]+(?![a-z])|[A-Z]/g;function toPlainText(e,t=""){return e==null?t:isArray(e)?e.map(n=>toTextString(n.text)).join(""):isString(e)?e:String(e)}var descriptionSymbol=Symbol("description"),requiredSymbol=Symbol("required"),markedSymbol=Symbol("marked"),undocumentedSymbol=Symbol("undocumented"),unionSymbol=Symbol("union"),similarOptionsMap=[["placement","position"],["padding","spacing","gap"],["color","fill","stroke"],["whisker","wick"],["nodeClick","seriesNodeClick"],["nodeDoubleClick","seriesNodeDoubleClick"],["src","url"]].reduce((e,t)=>{for(const n of t)e.set(n.toLowerCase(),new Set(t.filter(r=>r!==n)));return e},new Map),ErrorType=(e=>(e.Invalid="invalid",e.Required="required",e.Unknown="unknown",e))(ErrorType||{});function extendPath(e,t){return isFiniteNumber(t)?`${e}[${t}]`:e?`${e}.${t}`:t}var ValidationError=class{constructor(e,t,n,r,i){this.type=e,this.description=t,this.value=n,this.path=r,this.key=i}setUnionType(e,t){if(this.path.startsWith(t)){const n=this.path.slice(t.length);this.altPath=`${t}[type=${e}]${n}`}}getPrefix(){const{altPath:e=this.path,key:t}=this;return!e&&!t?"Value":`Option \`${t?extendPath(e,t):e}\``}toString(){const{description:e="unknown",type:t,value:n}=this;return t==="required"&&n==null?`${this.getPrefix()} is required and has not been provided; expecting ${e}, ignoring.`:`${this.getPrefix()} cannot be set to \`${stringifyValue(n,50)}\`; expecting ${e}, ignoring.`}},UnknownError=class extends ValidationError{constructor(e,t,n,r){super("unknown",void 0,t,n,r),this.suggestions=e,this.key=r}getPrefix(){return`Unknown option \`${extendPath(this.altPath??this.path,this.key)}\``}getPostfix(){const e=joinFormatted(findSuggestions(this.key,this.suggestions),"or",t=>`\`${t}\``);return e?`; Did you mean ${e}? Ignoring.`:", ignoring."}toString(){return`${this.getPrefix()}${this.getPostfix()}`}};function validate(e,t,n=""){if(!isObject(e))return{cleared:null,invalid:[new ValidationError("required","an object",e,n)]};const r={},i=[],o=new Set(Object.keys(e)),s=[];if(unionSymbol in t){const a=Object.keys(t),c=t[unionSymbol];if(e.type!=null&&a.includes(e.type)||e.type==null&&c!=null){const{type:l=c,...u}=e,f=validate(u,t[l],n);Object.assign(r,{type:l},f.cleared);for(const h of f.invalid)h.setUnionType(l,n);i.push(...f.invalid)}else{const l=joinFormatted(a,"or",u=>`'${u}'`);i.push(new ValidationError("required",`a keyword such as ${l}`,e.type,n,"type"))}return{cleared:r,invalid:i}}for(const a of Object.keys(t)){const c=t[a],l=c[requiredSymbol],u=e[a];if(o.delete(a),u===void 0&&(c[undocumentedSymbol]||s.push(a),!l))continue;const f=extendPath(n,a);if(isFunction(c)){const d=c(u,{options:e,path:f});if(typeof d=="object"){if(i.push(...d.invalid),d.valid){r[a]=d.cleared;continue}else if(hasRequiredInPath(d.invalid,f))continue}else if(d){r[a]=u;continue}i.push(new ValidationError(l?"required":"invalid",c[descriptionSymbol],u,n,a))}else{const h=validate(u,c,f);h.cleared!=null&&(r[a]=h.cleared),i.push(...h.invalid)}}for(const a of o){const c=e[a];c!==void 0&&i.push(new UnknownError(s,c,n,a))}return{cleared:r,invalid:i}}function findSuggestions(e,t,n=2){const r=e.toLowerCase(),i=similarOptionsMap.get(r);return t.filter(o=>{const s=o.toLowerCase();return i?.has(o)===!0||s.includes(r)||levenshteinDistance(r,s)<=n})}function attachDescription(e,t){if(isFunction(e)){let r=function(i,o){return e(i,o)};var n=r;return r[descriptionSymbol]=t,r}else return{...e,[descriptionSymbol]:t}}function required(e){return Object.assign(isFunction(e)?(t,n)=>e(t,n):optionsDefs(e),{[requiredSymbol]:!0,[descriptionSymbol]:e[descriptionSymbol]})}function undocumented(e){return Object.assign(isFunction(e)?(t,n)=>e(t,n):optionsDefs(e),{[undocumentedSymbol]:!0,[descriptionSymbol]:e[descriptionSymbol]})}var optionsDefs=(e,t="an object",n=!1)=>attachDescription((r,i)=>{const o=validate(r,e,i.path),s=!hasRequiredInPath(o.invalid,i.path);return{valid:s,cleared:s||!n?o.cleared:null,invalid:o.invalid}},t),typeUnion=(e,t,n)=>({...e,[descriptionSymbol]:t,[unionSymbol]:n}),and=(...e)=>attachDescription((t,n)=>{const r=[];for(const i of e){const o=i(t,n);if(typeof o=="object"){if(r.push(...o.invalid),!o.valid)return{valid:!1,cleared:t,invalid:r};t=o.cleared}else if(!o)return!1}return{valid:!0,cleared:t,invalid:r}},joinFormatted(e.filter(t=>!t[undocumentedSymbol]).map(t=>t[descriptionSymbol]).filter(isDefined),"and")),or=(...e)=>attachDescription((t,n)=>{for(const r of e){const i=r(t,n);if(typeof i=="object"?i.valid:i)return i}return!1},joinFormatted(e.filter(t=>!t[undocumentedSymbol]).map(t=>t[descriptionSymbol]).filter(isDefined),"or")),isComparable=e=>isFiniteNumber(e)||isValidDate(e),isValidDateValue=e=>isDate(e)||(isFiniteNumber(e)||isString(e))&&isValidDate(new Date(e)),array=attachDescription(isArray,"an array"),boolean=attachDescription(isBoolean,"a boolean"),callback=attachDescription(isFunction,"a function"),color=attachDescription(isColor,"a color string"),date=attachDescription(isValidDateValue,"a date"),defined=attachDescription(isDefined,"a defined value"),number=attachDescription(isFiniteNumber,"a number"),object=attachDescription(isObject,"an object"),string=attachDescription(isString,"a string"),htmlElement=attachDescription(e=>typeof HTMLElement>"u"||e instanceof HTMLElement,"an html element"),arrayLength=(e,t=1/0)=>{let n;return t===1/0?n=`an array of at least ${e} items`:e===t?n=`an array of exactly ${e} items`:e===0?n=`an array of no more than ${t} items`:n=`an array of at least ${e} and no more than ${t} items`,attachDescription(r=>isArray(r)&&r.length>=e&&r.length<=t,n)},stringLength=(e,t=1/0)=>{let n;return t===1/0?n=`a string of at least ${e} characters`:e===t?n=`an string of exactly ${e} characters`:e===0?n=`an string of no more than ${t} characters`:n=`an string of at least ${e} and no more than ${t} characters`,attachDescription(r=>isString(r)&&r.length>=e&&r.length<=t,n)},numberMin=(e,t=!0)=>attachDescription(n=>isFiniteNumber(n)&&(n>e||t&&n===e),`a number greater than ${t?"or equal to ":""}${e}`),numberRange=(e,t)=>attachDescription(n=>isFiniteNumber(n)&&n>=e&&n<=t,`a number between ${e} and ${t} inclusive`),positiveNumber=numberMin(0),positiveNumberNonZero=numberMin(0,!1),ratio=numberRange(0,1),lessThan=e=>attachDescription((t,{options:n})=>!isComparable(t)||!isComparable(n[e])||t<n[e],`the value to be less than \`${e}\``),lessThanOrEqual=e=>attachDescription((t,{options:n})=>!isComparable(t)||!isComparable(n[e])||t<=n[e],`the value to be less than or equal to \`${e}\``),greaterThan=e=>attachDescription((t,{options:n})=>!isComparable(t)||!isComparable(n[e])||t>n[e],`the value to be greater than \`${e}\``);function union(...e){isObject(e[0])&&(e=Object.values(e[0]));const t=joinFormatted(e,"or",n=>`'${n}'`);return attachDescription(n=>e.includes(n),`a keyword such as ${t}`)}function strictUnion(){return union}var constant=e=>attachDescription(t=>e===t,`the value ${JSON.stringify(e)}`),instanceOf=(e,t)=>attachDescription(n=>n instanceof e,t??`an instance of ${e.name}`),arrayOf=(e,t,n=!0)=>attachDescription((r,i)=>{if(!isArray(r))return!1;let o=n;const s=[],a=[],c=l=>{o=n?o&&l:o||l};if(r.length===0)return{valid:!0,cleared:s,invalid:a};for(let l=0;l<r.length;l++){const u=r[l],f=e(u,{options:u,path:`${i.path}[${l}]`});typeof f=="object"?(c(f.valid),a.push(...f.invalid),f.cleared!=null&&s.push(f.cleared)):(c(f),f&&s.push(u))}return{valid:o,cleared:o||!n?s:null,invalid:a}},t??`${e[descriptionSymbol]} array`),arrayOfDefs=(e,t="an object array")=>attachDescription((n,r)=>{if(!isArray(n))return!1;const i=[],o=[];for(let s=0;s<n.length;s++){const a=`${r.path}[${s}]`,c=validate(n[s],e,a);hasRequiredInPath(c.invalid,a)||i.push(c.cleared),o.push(...c.invalid)}return{valid:!0,cleared:i,invalid:o}},t),callbackOf=(e,t)=>attachDescription((n,r)=>{if(!isFunction(n))return!1;if(markedSymbol in n)return!0;const i=t??e[descriptionSymbol];return{valid:!0,cleared:Object.assign((...s)=>{const a=safeCall(n,s);if(a==null)return;const c=e(a,{options:a,path:""});if(typeof c=="object"){if(warnCallbackErrors(c,r,i,a),c.valid)return c.cleared}else{if(c)return a;warnOnce(`Callback \`${r.path}\` returned an invalid value \`${stringifyValue(a,50)}\`; expecting ${i}, ignoring.`)}},{[markedSymbol]:!0}),invalid:[]}},"a function"),callbackDefs=(e,t="an object")=>attachDescription((n,r)=>{if(!isFunction(n))return!1;if(markedSymbol in n)return!0;const i=t;return{valid:!0,cleared:Object.assign((...s)=>{const a=safeCall(n,s,r.path);if(a==null)return;const c=validate(a,e);return warnCallbackErrors(c,r,i,a),c.cleared},{[markedSymbol]:!0}),invalid:[]}},"a function");function hasRequiredInPath(e,t){return e.some(n=>n.type==="required"&&n.path===t)}function warnCallbackErrors(e,t,n,r){if(e.invalid.length!==0){if(isArray(r)){const i=n??e.invalid[0]?.description??"a valid value";return warnOnce(`Callback \`${t.path}\` returned an invalid value \`${stringifyValue(r,50)}\`; expecting ${i}, ignoring.`)}for(const i of e.invalid){if(i instanceof UnknownError)return warnOnce(`Callback \`${t.path}\` returned an unknown property \`${extendPath(i.path,i.key)}\`${i.getPostfix()}`);const o=stringifyValue(i.value,50);warnOnce(i.key?`Callback \`${t.path}\` returned an invalid property \`${extendPath(i.path,i.key)}\`: \`${o}\`; expecting ${i.description}, ignoring.`:`Callback \`${t.path}\` returned an invalid value \`${o}\`; expecting ${n??i.description}, ignoring.`)}}}var themeOperator=e=>{if(!isObject(e))return!1;const t=Object.keys(e);return t.length===1&&t[0].startsWith("$")},colorStop=optionsDefs({color,stop:ratio},""),colorStopsOrderValidator=attachDescription(e=>{let t=-1/0;for(const n of e)if(n?.stop!=null){if(n.stop<t)return!1;t=n.stop}return!0},"color stops to be defined in ascending order"),gradientColorStops=and(arrayLength(2),arrayOf(colorStop),colorStopsOrderValidator),gradientBounds=union("axis","item","series"),gradientStrict=optionsDefs({type:required(constant("gradient")),colorStops:required(gradientColorStops),rotation:number,gradient:undocumented(union("linear","radial","conic")),bounds:undocumented(gradientBounds),reverse:undocumented(boolean),colorSpace:undocumented(union("rgb","oklch"))},"a gradient object with color stops"),strokeOptionsDef={stroke:color,strokeWidth:positiveNumber,strokeOpacity:ratio},fillGradientDefaults=optionsDefs({type:required(constant("gradient")),gradient:required(union("linear","radial","conic")),bounds:required(gradientBounds),colorStops:required(or(gradientColorStops,and(arrayLength(2),arrayOf(color)))),rotation:required(number),reverse:required(boolean),colorSpace:required(union("rgb","oklch"))}),fillPatternDefaults=optionsDefs({type:required(constant("pattern")),pattern:required(union("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses")),path:stringLength(2),width:required(positiveNumber),height:required(positiveNumbe