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B,OAAO,EAAAA,sBAAA,OAAI,CAACtc,gBAAgB,cAAAsc,sBAAA,uBAArBA,sBAAA,CAAuB7X,UAAU,KAAI,CAAC;IAC/C,CAAC;IAAA8X,GAAA,EACD,SAAAA,IAAsB5yB,KAAa,EAAE;MACnC,IAAI,IAAI,CAACqW,gBAAgB,IAAI,IAAI,CAACA,gBAAgB,CAACyE,UAAU,KAAK9a,KAAK,EAAE;QACvE,IAAI,CAACkZ,uBAAuB,GAAG,IAAI;QACnC,IAAI,CAAC7C,gBAAgB,CAACyE,UAAU,GAAG9a,KAAK;MAC1C;IACF;EAAC;IAAAD,GAAA;IAAAqS,GAAA,EACD,SAAAA,IAAA,EAA+B;MAAA,IAAAygB,sBAAA;MAC7B,OAAO,EAAAA,sBAAA,OAAI,CAACxc,gBAAgB,cAAAwc,sBAAA,uBAArBA,sBAAA,CAAuB9Y,SAAS,KAAI,CAAC;IAC9C,CAAC;IAAA6Y,GAAA,EAED,SAAAA,IAAqB5yB,KAAa,EAAE;MAClC,IAAI,IAAI,CAACqW,gBAAgB,IAAI,IAAI,CAACA,gBAAgB,CAAC0D,SAAS,KAAK/Z,KAAK,EAAE;QACtE,IAAI,CAACkZ,uBAAuB,GAAG,IAAI;QACnC,IAAI,CAAC7C,gBAAgB,CAAC0D,SAAS,GAAG/Z,KAAK;MACzC;IACF;EAAC;AAAA,EApvE2BL,qBAAqB;;ACtDnD;;AAE2B;AACa;AACE;AAC1C;AACwC;AACD;AACF;AACK;;AAE1C;AAC2C;AACa;AACL;AACH;AACK;AAEV;AACL;AACE;;AAExC;AAC2C;AACU;AACJ;AACX;AACI;AACO;AACH;;AAE9C;AACoD;AACG;AACL;AACH;;AAE/C;AAC4D;AACJ;AACH;AACF;AACD;AACD;;AAEjD;AAC8C;AACE;AACH;AACD;AACD;AACF;AACG;AACE;AACP;AACvC;AACyD;AACG;AACD;AACM;AACP","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///./src/timelineEventsEmitter.ts","webpack:///./src/enums/timelineKeyframeShape.ts","webpack:///./src/utils/timelineUtils.ts","webpack:///./src/settings/defaults/defaultGroupStyle.ts","webpack:///./src/settings/defaults/defaultTimelineKeyframeStyle.ts","webpack:///./src/settings/defaults/defaultTimelineRowStyle.ts","webpack:///./src/utils/timelineStyleUtils.ts","webpack:///./src/enums/timelineElementType.ts","webpack:///./src/utils/timelineDraggableData.ts","webpack:///./src/utils/events/timelineBaseEvent.ts","webpack:///./src/utils/events/timelineKeyframeChangedEvent.ts","webpack:///./src/enums/timelineEventSource.ts","webpack:///./src/utils/events/timelineTimeChangedEvent.ts","webpack:///./src/enums/timelineSelectionEventSource.ts","webpack:///./src/utils/events/timelineSelectedEvent.ts","webpack:///./src/utils/events/timelineClickEvent.ts","webpack:///./src/utils/events/timelineDragEvent.ts","webpack:///./src/enums/timelineInteractionMode.ts","webpack:///./src/enums/timelineCursorType.ts","webpack:///./src/enums/timelineCapShape.ts","webpack:///./src/enums/timelineSelectionMode.ts","webpack:///./src/enums/timelineEvents.ts","webpack:///./src/enums/timelineScrollSource.ts","webpack:///./src/settings/defaults/defaultTimelineConsts.ts","webpack:///./src/settings/defaults/defaultTimelineStyle.ts","webpack:///./src/settings/defaults/defaultTimelineOptions.ts","webpack:///./src/timeline.ts","webpack:///./src/animation-timeline.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"timelineModule\"] = factory();\n\telse\n\t\troot[\"timelineModule\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/* eslint-disable @typescript-eslint/no-explicit-any */\ninterface TimelineEvent {\n topic: string;\n callback: (args: any) => void;\n}\n\n/**\n * Timeline events emitter.\n */\nexport class TimelineEventsEmitter {\n /**\n * Active events subscriptions.\n */\n _subscriptions: TimelineEvent[] = [];\n\n /**\n * Subscribe event.\n * @param topic event name.\n * @param callback callback to be added.\n */\n on(topic: string, callback: (args: T) => void): boolean {\n if (!callback) {\n return false;\n }\n\n this._subscriptions.push({\n topic: topic,\n callback: callback,\n } as TimelineEvent);\n return true;\n }\n /**\n * Remove an event from the subscriptions list.\n */\n off(topic: string, callback: (args: T) => void): boolean {\n const before = this._subscriptions.length;\n this._subscriptions = this._subscriptions.filter((event) => {\n return event && event.callback != callback && event.topic != topic;\n });\n return before !== this._subscriptions.length;\n }\n\n /**\n * Unsubscribe all\n */\n offAll(): void {\n // Remove all callbacks from array.\n this._subscriptions.length = 0;\n }\n\n /**\n * Emit event.\n * @param topic Event name.\n * @param args Event arguments.\n */\n emit(topic: string, args: T): void {\n this._subscriptions.forEach((event) => {\n if (event?.topic === topic && event?.callback) {\n event.callback(args);\n }\n });\n }\n}\n","export enum TimelineKeyframeShape {\n None = 'none',\n Rhomb = 'rhomb',\n Circle = 'circle',\n Rect = 'rect',\n}\n","import { TimelineRanged } from '../models/timelineRanged';\nimport { TimelineOptions } from '../settings/timelineOptions';\n\nconst defaultDenominators = [1, 2, 5, 10];\nexport class TimelineUtils {\n static drawLine(ctx: CanvasRenderingContext2D, x1: number, y1: number, x2: number, y2: number): void {\n ctx.moveTo(x1, y1);\n ctx.lineTo(x2, y2);\n }\n /**\n * Check is valid number.\n */\n static isNumber(val?: number | null): boolean {\n if (typeof val === 'number' && (val || val === 0) && !isNaN(val) && Number.isFinite(val)) {\n return true;\n }\n\n return false;\n }\n static deleteElement(array: Array, element: T): Array {\n const index: number = array.indexOf(element);\n if (index !== -1) {\n return array.splice(index, 1);\n }\n return array;\n }\n\n /**\n * Check rectangle overlap x,y\n */\n static isOverlap(x: number, y: number, rectangle: DOMRect): boolean {\n if (!rectangle) {\n return false;\n }\n\n if (rectangle.x <= x && rectangle.x + rectangle.width >= x && rectangle.y <= y && rectangle.y + rectangle.height >= y) {\n return true;\n }\n\n return false;\n }\n /**\n * Find beautiful step for the header line gauge.\n */\n static findGoodStep(originalStep: number, divisionCheck = 0, denominators: number[] = defaultDenominators): number {\n if (!denominators) {\n denominators = defaultDenominators;\n }\n if (originalStep <= 0 || isNaN(originalStep) || !Number.isFinite(originalStep)) {\n return originalStep;\n }\n let step = originalStep;\n let lastDistance = null;\n const pow = TimelineUtils.getPowArgument(originalStep);\n for (let i = 0; i < denominators.length; i++) {\n const denominator = denominators[i];\n const calculatedStep = denominator * Math.pow(10, pow);\n if (divisionCheck && divisionCheck % calculatedStep != 0) {\n continue;\n }\n const distance = TimelineUtils.getDistance(originalStep, calculatedStep);\n\n if (distance == 0 || (distance <= 0.1 && pow > 0)) {\n lastDistance = distance;\n step = calculatedStep;\n break;\n } else if (!lastDistance || lastDistance > distance) {\n lastDistance = distance;\n step = calculatedStep;\n }\n }\n\n return step;\n }\n /**\n * Keep value in min, max bounds.\n */\n static keepInBounds(value: number, min: number | null | undefined = null, max: number | null | undefined = null): number {\n if (TimelineUtils.isNumber(value)) {\n if (TimelineUtils.isNumber(min) && (min || min === 0)) {\n value = Math.max(value, min);\n }\n if (TimelineUtils.isNumber(max) && (max || max === 0)) {\n value = Math.min(value, max);\n }\n }\n\n return value;\n }\n static setMinMax(to: TimelineRanged, from: TimelineRanged | null, shrink = false): TimelineRanged {\n if (!from || !to) {\n return to;\n }\n const fromMin = from ? from.min : Number.NaN;\n const toMin = to.min;\n const isFromMinNumber = (fromMin || fromMin === 0) && TimelineUtils.isNumber(fromMin);\n const isToMinNumber = (toMin || toMin === 0) && TimelineUtils.isNumber(toMin);\n // get absolute min and max bounds:\n if (isFromMinNumber && isToMinNumber) {\n to.min = shrink ? Math.min(fromMin, toMin) : Math.max(fromMin, toMin);\n } else if (isFromMinNumber) {\n to.min = fromMin;\n }\n const fromMax = from ? from.max : Number.NaN;\n const toMax = to.max;\n const isFromMaxNumber = (fromMax || fromMax === 0) && TimelineUtils.isNumber(fromMax);\n const isToMaxNumber = (toMax || toMax === 0) && TimelineUtils.isNumber(toMax);\n if (isFromMaxNumber && isToMaxNumber) {\n to.max = shrink ? Math.max(fromMax, toMax) : Math.min(fromMax, toMax);\n } else if (isFromMaxNumber) {\n to.max = fromMax;\n }\n\n return to;\n }\n static shrinkSelf(rect: DOMRect, value: number): DOMRect {\n if (!rect) {\n return rect;\n }\n rect.x -= value;\n rect.y -= value;\n rect.width += value;\n rect.height += value;\n return rect;\n }\n /**\n * Check whether rectangle intersects another rectangle\n */\n static isRectIntersects(rect: DOMRect, rect2: DOMRect, touch = false): boolean {\n if (!rect || !rect2) {\n console.log('Rectangles cannot be empty');\n return false;\n }\n const right = rect2.x + rect2.width;\n const bottom = rect2.y + rect2.height;\n if (touch) {\n if (\n // Left\n rect.x <= right &&\n // Right\n rect2.x <= rect.x + rect.width &&\n // Top\n rect.y <= bottom &&\n // Bottom\n rect2.y <= rect.y + rect.height\n ) {\n return true;\n } else {\n return false;\n }\n } else {\n if (\n // Left\n rect.x < right &&\n // Right\n rect2.x < rect.x + rect.width &&\n // Top\n rect.y < bottom &&\n // Bottom\n rect2.y < rect.y + rect.height\n ) {\n return true;\n } else {\n return false;\n }\n }\n }\n\n static getDistance(x1: number, y1: number, x2?: number, y2?: number): number {\n if (x2 != undefined && y2 != undefined) {\n return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));\n } else {\n return Math.abs(x1 - y1);\n }\n }\n\n /**\n * Get sign of the number. 1 or -1.\n */\n static sign(p: number): number {\n return p >= 0 ? 1 : -1;\n }\n\n /**\n * Clear browser text selection.\n */\n static clearBrowserSelection(): void {\n if (!window) {\n return;\n }\n if (window.getSelection) {\n const selection = window.getSelection();\n if (selection) {\n selection.removeAllRanges();\n }\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const doc: any = window.document;\n if (doc.selection) {\n doc.selection.empty();\n }\n }\n }\n static getPowArgument(toCheck: number): number {\n if (!toCheck || toCheck === 0 || !isFinite(toCheck)) {\n return 1;\n }\n // some optimization for numbers:\n if (toCheck >= 10 && toCheck < 100) {\n return 1;\n } else if (toCheck >= 100 && toCheck < 1000) {\n return 2;\n } else if (toCheck >= 1000 && toCheck < 10000) {\n return 3;\n }\n\n toCheck = Math.abs(toCheck);\n let category = 0;\n const s = this.sign(toCheck);\n if (toCheck > 1) {\n while (toCheck >= 1) {\n toCheck = Math.floor(toCheck / 10.0);\n category++;\n }\n\n return s * category - 1;\n } else if (toCheck > 0.0) {\n // Get number of zeros before the number.\n const zerosCount = Math.floor(Math.log(toCheck) / Math.log(10) + 1) - 1;\n return zerosCount;\n } else {\n return 1;\n }\n }\n\n static deepClone = (previousOptions: T): T => {\n return JSON.parse(JSON.stringify(previousOptions)) as T;\n };\n\n static cloneOptions = (previousOptions: TimelineOptions): TimelineOptions => {\n const clonedValue = JSON.parse(\n JSON.stringify(previousOptions, (key, value) => {\n // No need to clone HTML element passed as ID.\n return key === 'id' ? undefined : value;\n }),\n );\n clonedValue.id = previousOptions.id;\n return clonedValue;\n };\n /**\n * Merge options. New keys will be added.\n */\n static mergeOptions(previousOptions: TimelineOptions, newOptions: TimelineOptions): TimelineOptions {\n newOptions = newOptions || ({} as TimelineOptions);\n // Apply incoming options to default. (override default)\n // Deep clone default options:\n const toArg = TimelineUtils.cloneOptions(previousOptions);\n // Merge options with the default.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const mergeOptionsDeep = (to: any, from: any): void => {\n if (!to || !from) {\n return;\n }\n // eslint-disable-next-line prefer-const\n for (let key in from) {\n if (Object.prototype.hasOwnProperty.call(from, key)) {\n if (from[key] !== undefined) {\n if (typeof from[key] === 'object') {\n if (key === 'id') {\n if (from[key] && from[key] !== to[key]) {\n to[key] = from[key];\n }\n } else {\n if (!to[key]) {\n to[key] = from[key];\n } else {\n mergeOptionsDeep(to[key], from[key]);\n }\n }\n } else {\n to[key] = from[key];\n }\n }\n }\n }\n };\n\n mergeOptionsDeep(toArg, newOptions);\n return toArg;\n }\n /**\n * Format numbers with len\n */\n static timePadZero(num: number, len = 2): string {\n let str = String(num);\n const threshold = Math.pow(10, len - 1);\n if (num < threshold) {\n while (String(threshold).length > str.length) {\n str = `0${num}`;\n }\n }\n return str;\n }\n}\n","import { TimelineGroupStyle } from '../styles/timelineGroupStyle';\nexport const defaultRowHeight = 24;\nconst margin = 4;\nexport const defaultGroupStyle = {\n height: 'auto',\n marginTop: margin,\n /**\n * Default group fill color.\n */\n fillColor: '#094771',\n} as TimelineGroupStyle;\n","import { TimelineKeyframeShape } from '../../enums/timelineKeyframeShape';\nimport { TimelineKeyframeStyle } from '../styles/timelineKeyframeStyle';\n\nexport const defaultTimelineKeyframeStyle = {\n /**\n * keyframe fill color.\n */\n fillColor: 'DarkOrange',\n shape: TimelineKeyframeShape.Rhomb,\n /**\n * Selected keyframe fill color.\n */\n selectedFillColor: 'red',\n strokeColor: 'black',\n selectedStrokeColor: 'black',\n strokeThickness: 0.2,\n height: 'auto',\n width: 'auto',\n} as TimelineKeyframeStyle;\n","import { TimelineRowStyle } from '../styles/timelineRowStyle';\nimport { defaultGroupStyle, defaultRowHeight } from './defaultGroupStyle';\nimport { defaultTimelineKeyframeStyle } from './defaultTimelineKeyframeStyle';\n\nexport const defaultTimelineRowStyle = {\n /**\n * Row height in pixels.\n */\n height: defaultRowHeight,\n marginBottom: 2,\n fillColor: '#252526',\n /**\n * Style for the all keyframes in a current row.\n * Individual keyframe can have own style.\n */\n keyframesStyle: defaultTimelineKeyframeStyle,\n /**\n * Style of the groups.\n */\n groupsStyle: defaultGroupStyle,\n} as TimelineRowStyle;\n","import { TimelineOptions } from '../settings/timelineOptions';\nimport { TimelineRowStyle } from '../settings/styles/timelineRowStyle';\nimport { TimelineKeyframeShape } from '../enums/timelineKeyframeShape';\nimport { TimelineUtils } from './timelineUtils';\nimport { TimelineGroupStyle } from '../settings/styles/timelineGroupStyle';\nimport { TimelineKeyframe } from '../models/timelineKeyframe';\n\nimport { TimelineGroup } from '../models/timelineGroup';\nimport { TimelineRow } from '../models/timelineRow';\nimport { defaultGroupStyle } from '../settings/defaults/defaultGroupStyle';\nimport { defaultTimelineKeyframeStyle } from '../settings/defaults/defaultTimelineKeyframeStyle';\nimport { defaultTimelineRowStyle } from '../settings/defaults/defaultTimelineRowStyle';\n\nconst undefinedConst = typeof undefined;\n\n// TODO: create merged style for each element instead of getting per property.\nexport class TimelineStyleUtils {\n static getGroup(groupModel: TimelineGroup | string | null | undefined): TimelineGroup | null {\n const style = groupModel;\n if (style && typeof style === 'string') {\n return null;\n }\n return (style || null) as TimelineGroup;\n }\n static getGroupStyle(groupModel: TimelineGroup | string | null | undefined): TimelineGroupStyle | null {\n return TimelineStyleUtils.getGroup(groupModel)?.style || null;\n }\n static getFirstSet(defaultValue: T, ...params: Array): T {\n return TimelineStyleUtils.getValue(defaultValue, false, ...params);\n }\n /**\n * Get first value set or default.\n * @param defaultValue default value in a case when no value is set.\n * @param returnFalseIfAnyFalse - find first negative bool and return false.\n * @param params collection of values to check.\n * @returns value.\n */\n static getValue(defaultValue: T, returnFalseIfAnyFalse = false, ...params: Array): T {\n const valuesFound: T[] = [];\n let found = false;\n params.forEach((value: T | undefined | null) => {\n if (found) {\n return;\n }\n if (typeof value === undefinedConst) {\n return;\n } else if (typeof value === 'number') {\n if (!TimelineUtils.isNumber(value)) {\n return;\n }\n } else if (typeof value === 'boolean') {\n valuesFound.push(value as T);\n // No need to search for other values. First false is turning off current bool functionality.\n if (returnFalseIfAnyFalse && value === false) {\n found = true;\n }\n return;\n } else if (!value) {\n return;\n }\n valuesFound.push(value as T);\n });\n const toReturn = valuesFound && valuesFound.length > 0 ? valuesFound[0] : defaultValue;\n if (found) {\n return false as T;\n }\n return TimelineStyleUtils.getValueOrDefault(toReturn, defaultValue) as T;\n }\n\n static getValueOrDefault(value: T, defaultValue: T): T | undefined {\n if (typeof value === undefinedConst) {\n return defaultValue;\n } else if (typeof value == 'boolean') {\n // variable is a boolean\n return value as T;\n } else if (typeof value == 'number') {\n // variable is a boolean\n if (value || value === 0) {\n return value as T;\n } else {\n return defaultValue;\n }\n }\n return value || defaultValue;\n }\n static keyframeWidth(\n keyframe: TimelineKeyframe | null | undefined,\n group: TimelineGroup | string | null | undefined,\n rowStyle: TimelineRowStyle | null | undefined,\n options: TimelineOptions | null | undefined,\n ): number | string {\n return TimelineStyleUtils.getFirstSet(\n // default value\n defaultTimelineKeyframeStyle.width || '',\n keyframe?.style?.width,\n // exact style\n TimelineStyleUtils.getGroupStyle(group)?.keyframesStyle?.width,\n rowStyle?.keyframesStyle?.width,\n rowStyle?.groupsStyle?.keyframesStyle?.width,\n // global styles\n options?.rowsStyle?.groupsStyle?.keyframesStyle?.width,\n // default keyframe style\n options?.rowsStyle?.keyframesStyle?.width,\n );\n }\n static keyframeHeight(\n keyframe: TimelineKeyframe | null | undefined,\n group: TimelineGroup | string | null | undefined,\n rowStyle: TimelineRowStyle | null | undefined,\n options: TimelineOptions | null | undefined,\n ): number | string {\n return TimelineStyleUtils.getFirstSet(\n // default value\n defaultTimelineKeyframeStyle.height || '',\n keyframe?.style?.height,\n // exact style\n TimelineStyleUtils.getGroupStyle(group)?.keyframesStyle?.height,\n rowStyle?.keyframesStyle?.height,\n rowStyle?.groupsStyle?.keyframesStyle?.height,\n // global styles\n options?.rowsStyle?.groupsStyle?.keyframesStyle?.height,\n // default keyframe style\n options?.rowsStyle?.keyframesStyle?.height,\n );\n }\n static keyframeShape(keyframe: TimelineKeyframe | null, group: TimelineGroup | string | null | undefined, rowStyle: TimelineRowStyle | null, options: TimelineOptions | null): TimelineKeyframeShape {\n const defaultValue = defaultTimelineKeyframeStyle.shape || TimelineKeyframeShape.Rhomb;\n return TimelineStyleUtils.getFirstSet(\n // default value\n defaultValue,\n // exact style\n keyframe?.style?.shape,\n // style set by keyframe group\n TimelineStyleUtils.getGroupStyle(group)?.keyframesStyle?.shape,\n // style from the keyframe group\n rowStyle?.groupsStyle?.keyframesStyle?.shape,\n // style set by keyframe style\n rowStyle?.keyframesStyle?.shape,\n // style set by keyframe group style, applied when group is set\n group ? options?.rowsStyle?.groupsStyle?.keyframesStyle?.shape : undefined,\n // Style set by global options\n options?.rowsStyle?.keyframesStyle?.shape,\n );\n }\n static keyframeFillColor(keyframe: TimelineKeyframe | null, group: TimelineGroup | string | null | undefined, rowStyle: TimelineRowStyle | null, options: TimelineOptions | null): string {\n const defaultValue = defaultTimelineKeyframeStyle.fillColor || '';\n return TimelineStyleUtils.getFirstSet(\n // default value\n defaultValue,\n // exact style\n keyframe?.style?.fillColor,\n // style set by keyframe group\n TimelineStyleUtils.getGroupStyle(group)?.keyframesStyle?.fillColor,\n // style from the keyframe group\n rowStyle?.groupsStyle?.keyframesStyle?.fillColor,\n // style set by keyframe style\n rowStyle?.keyframesStyle?.fillColor,\n // style set by keyframe group style, applied when group is set\n group ? options?.rowsStyle?.groupsStyle?.keyframesStyle?.fillColor : undefined,\n // Style set by global options\n options?.rowsStyle?.keyframesStyle?.fillColor,\n );\n }\n static keyframeSelectedFillColor(keyframe: TimelineKeyframe | null, group: TimelineGroup | string | null | undefined, rowStyle: TimelineRowStyle | null, options: TimelineOptions | null): string {\n const defaultValue = defaultTimelineKeyframeStyle.selectedFillColor || '';\n return TimelineStyleUtils.getFirstSet(\n // default value\n defaultValue,\n // exact style\n keyframe?.style?.selectedFillColor,\n // style set by keyframe group\n TimelineStyleUtils.getGroupStyle(group)?.keyframesStyle?.selectedFillColor,\n // style from the keyframe group\n rowStyle?.groupsStyle?.keyframesStyle?.selectedFillColor,\n // style set by keyframe style\n rowStyle?.keyframesStyle?.selectedFillColor,\n // style set by keyframe group style, applied when group is set\n group ? options?.rowsStyle?.groupsStyle?.keyframesStyle?.selectedFillColor : undefined,\n // Style set by global options\n options?.rowsStyle?.keyframesStyle?.selectedFillColor,\n );\n }\n\n static keyframeStrokeThickness(keyframe: TimelineKeyframe | null, group: TimelineGroup | string | null | undefined, rowStyle: TimelineRowStyle | null, options: TimelineOptions | null): number {\n const defaultValue = defaultTimelineKeyframeStyle.strokeThickness || 0;\n return TimelineStyleUtils.getFirstSet(\n // default value\n defaultValue,\n // exact style\n keyframe?.style?.strokeThickness,\n // style set by keyframe group\n TimelineStyleUtils.getGroupStyle(group)?.keyframesStyle?.strokeThickness,\n // style from the keyframe group\n rowStyle?.groupsStyle?.keyframesStyle?.strokeThickness,\n // style set by keyframe style\n rowStyle?.keyframesStyle?.strokeThickness,\n // style set by keyframe group style, applied when group is set\n group ? options?.rowsStyle?.groupsStyle?.keyframesStyle?.strokeThickness : undefined,\n // Style set by global options\n options?.rowsStyle?.keyframesStyle?.strokeThickness,\n );\n }\n\n static keyframeStrokeColor(keyframe: TimelineKeyframe | null, group: TimelineGroup | string | null | undefined, rowStyle: TimelineRowStyle | null, options: TimelineOptions | null): string {\n const defaultValue = defaultTimelineKeyframeStyle.strokeColor || '';\n return TimelineStyleUtils.getFirstSet(\n // default value\n defaultValue,\n // exact style\n keyframe?.style?.strokeColor,\n // style set by keyframe group\n TimelineStyleUtils.getGroupStyle(group)?.keyframesStyle?.strokeColor,\n // style from the keyframe group\n rowStyle?.groupsStyle?.keyframesStyle?.strokeColor,\n // style set by keyframe style\n rowStyle?.keyframesStyle?.strokeColor,\n // style set by keyframe group style, applied when group is set\n group ? options?.rowsStyle?.groupsStyle?.keyframesStyle?.strokeColor : undefined,\n // Style set by global options\n options?.rowsStyle?.keyframesStyle?.strokeColor,\n );\n }\n static keyframeSelectedStrokeColor(keyframe: TimelineKeyframe | null, group: TimelineGroup | string | null, rowStyle: TimelineRowStyle | null, options: TimelineOptions | null): string {\n const defaultValue = defaultTimelineKeyframeStyle.selectedStrokeColor || '';\n return TimelineStyleUtils.getFirstSet(\n // default value\n defaultValue,\n // exact style\n keyframe?.style?.selectedStrokeColor,\n // style set by keyframe group\n TimelineStyleUtils.getGroupStyle(group)?.keyframesStyle?.selectedStrokeColor,\n // style from the keyframe group\n rowStyle?.groupsStyle?.keyframesStyle?.selectedStrokeColor,\n // style set by keyframe style\n rowStyle?.keyframesStyle?.selectedStrokeColor,\n // style set by keyframe group style, applied when group is set\n group ? options?.rowsStyle?.groupsStyle?.keyframesStyle?.selectedStrokeColor : undefined,\n // Style set by global options\n options?.rowsStyle?.keyframesStyle?.selectedStrokeColor,\n );\n }\n\n static groupHeight(options: TimelineOptions | null | undefined, group: TimelineGroup | string | null | undefined, rowStyle: TimelineRowStyle | null | undefined): number | string {\n return TimelineStyleUtils.getFirstSet(\n // default value\n defaultGroupStyle.height || 'auto',\n // exact group style\n TimelineStyleUtils.getGroupStyle(group)?.height,\n // Row row style\n rowStyle?.groupsStyle?.height,\n // global styles\n options?.rowsStyle?.groupsStyle?.height,\n );\n }\n\n static groupMarginTop(options: TimelineOptions | null | undefined, group: TimelineGroup | string | null | undefined, rowStyle: TimelineRowStyle | null | undefined): number | string {\n return TimelineStyleUtils.getFirstSet(\n // default value\n defaultGroupStyle.marginTop || 'auto',\n // exact style\n TimelineStyleUtils.getGroupStyle(group)?.marginTop,\n // Row row style\n rowStyle?.groupsStyle?.marginTop,\n // global styles\n options?.rowsStyle?.groupsStyle?.marginTop,\n );\n }\n\n static groupFillColor(options: TimelineOptions | null | undefined, group: TimelineGroup | string | null | undefined, rowStyle: TimelineRowStyle | null | undefined): string {\n return TimelineStyleUtils.getFirstSet(\n // default value\n defaultGroupStyle.fillColor || '',\n // exact style\n TimelineStyleUtils.getGroupStyle(group)?.fillColor,\n // Row row style\n rowStyle?.groupsStyle?.fillColor,\n // global styles\n options?.rowsStyle?.groupsStyle?.fillColor,\n );\n }\n static groupTextColor(options: TimelineOptions | null | undefined, group: TimelineGroup | string | null | undefined, rowStyle: TimelineRowStyle | null | undefined): string {\n return TimelineStyleUtils.getFirstSet(\n // default value\n defaultGroupStyle.textColor || '',\n // exact style\n TimelineStyleUtils.getGroupStyle(group)?.textColor,\n // Row row style\n rowStyle?.groupsStyle?.textColor,\n // global styles\n options?.rowsStyle?.groupsStyle?.textColor,\n );\n }\n static groupLabel(group: TimelineGroup | string | null | undefined): string|undefined {\n return TimelineStyleUtils.getGroup(group)?.label || '';\n }\n static groupStrokeColor(options: TimelineOptions | null | undefined, group: TimelineGroup | string | null | undefined, rowStyle: TimelineRowStyle | null | undefined): string {\n return TimelineStyleUtils.getFirstSet(\n // default value\n defaultGroupStyle.strokeColor || '',\n // exact style\n TimelineStyleUtils.getGroupStyle(group)?.strokeColor,\n // Row row style\n rowStyle?.groupsStyle?.strokeColor,\n // global styles\n options?.rowsStyle?.groupsStyle?.strokeColor,\n );\n }\n\n static groupStrokeThickness(options: TimelineOptions | null | undefined, group: TimelineGroup | string | null | undefined, rowStyle: TimelineRowStyle | null | undefined): number {\n return (\n TimelineStyleUtils.getFirstSet(\n // default value\n defaultGroupStyle.strokeThickness || '',\n // exact style\n TimelineStyleUtils.getGroupStyle(group)?.strokeThickness,\n // Row row style\n rowStyle?.groupsStyle?.strokeThickness,\n // global styles\n options?.rowsStyle?.groupsStyle?.strokeThickness,\n ) || 0\n );\n }\n\n static groupsRadii(\n options: TimelineOptions | null | undefined,\n group: TimelineGroup | string | null | undefined,\n rowStyle: TimelineRowStyle | null | undefined,\n ): number | DOMPointInit | Iterable {\n return (\n TimelineStyleUtils.getFirstSet(\n // default value\n defaultGroupStyle.radii || '',\n // exact style\n TimelineStyleUtils.getGroupStyle(group)?.radii,\n // Row row style\n rowStyle?.groupsStyle?.radii,\n // global styles\n options?.rowsStyle?.groupsStyle?.radii,\n ) || 0\n );\n }\n\n /**\n * Get current row height from styles\n */\n static getRowHeight(rowStyle: TimelineRowStyle | null, options: TimelineOptions | null): number {\n const defaultValue = defaultTimelineRowStyle.height || 0;\n return TimelineStyleUtils.getFirstSet(\n // default value\n defaultValue,\n // exact style\n rowStyle?.height,\n // Style set by global options\n options?.rowsStyle?.height,\n );\n }\n static getRowMarginBottom(rowStyle: TimelineRowStyle | null, options: TimelineOptions | null): number {\n const defaultValue = defaultTimelineRowStyle.marginBottom || 0;\n return TimelineStyleUtils.getFirstSet(\n // default value\n defaultValue,\n // exact style\n rowStyle?.marginBottom,\n // Style set by global options\n options?.rowsStyle?.marginBottom,\n );\n }\n\n static getRowFillColor(rowStyle: TimelineRowStyle | null, options: TimelineOptions | null): string {\n const defaultValue = defaultTimelineRowStyle.fillColor || '';\n return TimelineStyleUtils.getFirstSet(\n // default value\n defaultValue,\n // exact style\n rowStyle?.fillColor,\n // Style set by global options\n options?.rowsStyle?.fillColor,\n );\n }\n\n static headerHeight(options: TimelineOptions | null, defaultRowHeight = 30): number {\n return options?.headerHeight || defaultRowHeight;\n }\n static keyframeDraggable(keyframe: TimelineKeyframe | null, group: TimelineGroup | string | null, row: TimelineRow | null, options: TimelineOptions | null, defaultValue = true): boolean {\n const findFirstNegativeBool = true;\n const boolResult = TimelineStyleUtils.getValue(\n defaultValue,\n findFirstNegativeBool,\n // Keyframe settings\n keyframe?.draggable,\n // Group settings\n TimelineStyleUtils.getGroup(group)?.keyframesDraggable,\n // Row settings\n row?.keyframesDraggable,\n // Start from global settings first.\n options?.keyframesDraggable,\n );\n return boolResult;\n }\n\n static groupDraggable(group: TimelineGroup | string | null | undefined, row: TimelineRow | null, options: TimelineOptions): boolean {\n const findFirstNegativeBool = true;\n const boolResult = TimelineStyleUtils.getValue(\n true,\n findFirstNegativeBool,\n // Group settings\n TimelineStyleUtils.getGroup(group)?.draggable,\n // Row settings\n row?.groupsDraggable,\n // Start from global settings first.\n options?.groupsDraggable,\n );\n return boolResult;\n }\n}\n","/**\n * Internal element type.\n */\nexport enum TimelineElementType {\n /**\n * Timeline\n */\n Timeline = 'timeline',\n /**\n * Keyframes\n */\n Keyframe = 'keyframe',\n /**\n * Keyframes connected and presenting one group.\n */\n Group = 'group',\n /**\n * Timeline row.\n */\n Row = 'row',\n None = 'none',\n}\n","import { TimelineElementType } from '../enums/timelineElementType';\nimport { TimelineElementDragState } from './timelineElementDragState';\n\n/**\n * Information about current drag state.\n */\nexport class TimelineDraggableData {\n /**\n * Whether position was changed.\n */\n changed = false;\n /**\n * Drag initial click target.\n */\n target!: TimelineElementDragState;\n /**\n * Elements to be dragged.\n * Can be multiple elements, but drag will be started with target.\n */\n elements!: TimelineElementDragState[];\n /**\n * Dragging type.\n */\n type: TimelineElementType = TimelineElementType.None;\n /**\n * Prev value.\n */\n val!: number;\n /**\n * Prev value.\n */\n prevVal!: number;\n}\n","/**\n * Timeline base preventable event.\n */\nexport class TimelineBaseEvent {\n private _prevented = false;\n /**\n * Prevent default click logic.\n */\n preventDefault(): void {\n this._prevented = true;\n }\n\n isPrevented(): boolean {\n return this._prevented;\n }\n}\n","import { TimelineBaseEvent } from './timelineBaseEvent';\nimport { TimelineElement } from '../timelineElement';\nimport { TimelineEventSource } from '../../enums/timelineEventSource';\n\nexport class TimelineKeyframeChangedEvent extends TimelineBaseEvent {\n /**\n * Value to be used.\n */\n val!: number;\n /**\n * Previous value.\n */\n prevVal!: number;\n /**\n * Target element\n */\n target!: TimelineElement;\n /**\n * Event source.\n */\n source!: TimelineEventSource;\n}\n","export enum TimelineEventSource {\n /**\n * Changed by user interaction events.\n */\n User = 'user',\n /**\n * Changed programmatically.\n */\n Programmatically = 'programmatically',\n /**\n * Changed by the set time function.\n */\n SetTimeMethod = 'setTimeMethod',\n}\n","import { TimelineBaseEvent } from './timelineBaseEvent';\nimport { TimelineEventSource } from '../../enums/timelineEventSource';\n\nexport class TimelineTimeChangedEvent extends TimelineBaseEvent {\n /**\n * New value to be set if not prevented.\n */\n val = 0;\n /**\n * previous value, that actually set at the moment.\n */\n prevVal = 0;\n /**\n * Source of the change.\n */\n source: TimelineEventSource = TimelineEventSource.User;\n}\n","/**\n * Timeline selection event type.\n */\nexport enum TimelineSelectionEventSource {\n /**\n * Keyframe selection is performed.\n */\n Keyframes = 'keyframes',\n}\n","import { TimelineSelectionEventSource } from '../../enums/timelineSelectionEventSource';\nimport { TimelineKeyframe } from '../../models/timelineKeyframe';\n\nexport class TimelineSelectedEvent {\n /**\n * Selected Keyframes list.\n */\n selected: TimelineKeyframe[] = [];\n /**\n * Changed selection.\n */\n changed: TimelineKeyframe[] = [];\n /**\n * Selection mode.\n */\n mode: TimelineSelectionEventSource = TimelineSelectionEventSource.Keyframes;\n}\n","import { TimelineElement } from '../timelineElement';\nimport { TimelinePoint } from '../timelinePoint';\nimport { TimelineBaseEvent } from './timelineBaseEvent';\n\nexport class TimelineClickEvent extends TimelineBaseEvent {\n args: MouseEvent | TouchEvent | null = null;\n /**\n * Clicked screen position.\n */\n get pos(): DOMPoint | null {\n return this.point?.pos || null;\n }\n get val(): number {\n if (this.point) {\n return this.point.val;\n }\n return NaN;\n }\n /**\n * All elements located under current mouse activity.\n */\n elements: TimelineElement[] = [];\n /**\n * Element that selected as target under the click.\n */\n target: TimelineElement | null = null;\n /**\n * Timeline current active drag position.\n */\n point: TimelinePoint | null = null;\n}\n","import { TimelinePoint } from '../timelinePoint';\nimport { TimelineBaseEvent } from './timelineBaseEvent';\nimport { TimelineElementDragState } from '../timelineElementDragState';\n\nexport class TimelineDragEvent extends TimelineBaseEvent {\n args: MouseEvent | TouchEvent | null = null;\n get pos(): DOMPoint | null {\n return this.point?.pos || null;\n }\n /**\n * Elements to be dragged as a group.\n */\n elements: TimelineElementDragState[] | null = null;\n /**\n * Target element\n */\n target: TimelineElementDragState | null = null;\n /**\n * Timeline current active drag position.\n */\n point: TimelinePoint | null = null;\n /**\n * Timeline previous drag position.\n */\n prevPoint: TimelinePoint | null = null;\n}\n","export enum TimelineInteractionMode {\n /**\n * Keyframe selection tool selecting single or group of keyframes.\n */\n Selection = 'selection',\n /**\n * Pan tool with the possibility to select keyframes.\n */\n Pan = 'pan',\n /**\n * Allow only pan without any keyframes interaction.\n * Timeline still can be moved and controlled by option 'timelineDraggable'.\n */\n NonInteractivePan = 'nonInteractivePan',\n /**\n * Zoom tool.\n */\n Zoom = 'zoom',\n\n /**\n * No iteraction, except moving a timeline.\n * Timeline still can be moved and controlled by option 'timelineDraggable'.\n */\n None = 'none',\n}\n","export enum TimelineCursorType {\n Alias = 'alias',\n AllScroll = 'all-scroll',\n Auto = 'auto',\n Cell = 'cell',\n ContextMenu = 'context-menu',\n ColResize = 'col-resize',\n Copy = 'copy',\n Crosshair = 'crosshair',\n Default = 'default',\n EResize = 'e-resize',\n EWResize = 'ew-resize',\n Grab = 'grab',\n Grabbing = 'grabbing',\n Help = 'help',\n Move = 'move',\n NResize = 'n-resize',\n NEResize = 'ne-resize',\n NESWResize = 'nesw-resize',\n NSResize = 'ns-resize',\n NWResize = 'nw-resize',\n NWSEResize = 'nwse-resize',\n NoDrop = 'no-drop',\n None = 'none',\n NotAllowed = 'not-allowed',\n Pointer = 'pointer',\n Progress = 'progress',\n RowResize = 'row-resize',\n SResize = 's-resize',\n SEResize = 'se-resize',\n SWResize = 'sw-resize',\n Text = 'text',\n WResize = 'w-resize',\n Wait = 'wait',\n ZoomIn = 'zoom-in',\n ZoomOut = 'zoom-out',\n}\n","export enum TimelineCapShape {\n None = 'none',\n Triangle = 'triangle',\n Rect = 'rect',\n}\n","/**\n * Timeline selection mode.\n */\nexport enum TimelineSelectionMode {\n /**\n * Select new items. deselect changed.\n */\n Normal = 'normal',\n /**\n * Append current selection.\n */\n Append = 'append',\n /**\n * Revert selection of a specified nodes.\n */\n Revert = 'revert',\n}\n","/**\n * Event names of the component.\n */\nexport enum TimelineEvents {\n Selected = 'selected',\n TimeChanged = 'timechanged',\n KeyframeChanged = 'keyframeChanged',\n DragStarted = 'dragStarted',\n Drag = 'drag',\n DragFinished = 'dragFinished',\n Scroll = 'scroll',\n ScrollFinished = 'scrollFinished',\n ContextMenu = 'onContextMenu',\n DoubleClick = 'doubleClick',\n MouseDown = 'mouseDown',\n}\n","export enum TimelineScrollSource {\n DefaultMode = 'none',\n ZoomMode = 'zoom',\n ScrollBySelection = 'scrollBySelection',\n}\n","import { TimelineConsts } from '../timelineConsts';\n\nexport const defaultTimelineConsts: TimelineConsts = {\n /**\n * Private. Auto pan speed.\n */\n autoPanSpeed: 50,\n /**\n * Private. scroll speed when mouse drag is used (from 0 to 1)\n */\n scrollByDragSpeed: 0.12,\n /**\n * Private. Determine whether item was clicked.\n */\n clickDetectionMs: 120,\n /**\n * Private. Timeout to detect double click.\n */\n doubleClickTimeoutMs: 400,\n /**\n * Private. Time in ms used to refresh scrollbars when pan is finished.\n */\n scrollFinishedTimeoutMs: 500,\n /**\n * Private. Auto pan padding\n */\n autoPanByScrollPadding: 10,\n /**\n * Private. Click threshold\n */\n clickThreshold: 3,\n /**\n * Private. Private.Click min radius for the elements detection.\n */\n clickDetectionMinRadius: 2,\n /**\n * Private. Skip some auto pan/scroll actions if they are executed more rapid than this value.\n */\n autoPanSpeedLimit: 10,\n /**\n * Private. Default auto size for the group. It's percents.\n */\n defaultGroupHeight: 0.7,\n} as TimelineConsts;\n","import { TimelineCapShape } from '../../enums/timelineCapShape';\nimport { TimelineCursorType } from '../../enums/timelineCursorType';\nimport { TimelineStyle } from '../styles/timelineStyle';\n\nexport const defaultTimelineStyle = {\n width: 2,\n marginTop: 15,\n marginBottom: 0,\n strokeColor: 'DarkOrange',\n fillColor: 'DarkOrange',\n capStyle: {\n width: 4,\n height: 10,\n /**\n * Draw timeline rectangular cap.\n */\n capType: TimelineCapShape.Rect,\n strokeColor: 'DarkOrange',\n fillColor: 'DarkOrange',\n },\n cursor: TimelineCursorType.EWResize,\n} as TimelineStyle;\n","import { TimelineOptions } from '../timelineOptions';\nimport { defaultGroupStyle } from './defaultGroupStyle';\nimport { defaultTimelineKeyframeStyle } from './defaultTimelineKeyframeStyle';\nimport { defaultTimelineRowStyle } from './defaultTimelineRowStyle';\nimport { defaultTimelineStyle } from './defaultTimelineStyle';\n\nexport const defaultTimelineOptions = {\n /**\n * Snap all selected keyframes as a bundle during the drag.\n */\n snapAllKeyframesOnMove: false,\n\n /**\n * Check whether snapping is enabled.\n */\n snapEnabled: true,\n\n /**\n * Timeline style.\n */\n timelineStyle: defaultTimelineStyle,\n /**\n * approximate step for the timeline in pixels for 1 second\n */\n stepPx: 120,\n /**\n * Number of units that should fit into one stepPx. (1 second by a default)\n */\n stepVal: 1000,\n stepSmallPx: 30,\n /**\n * Snap step in units. from 0 to stepVal\n */\n snapStep: 200,\n /**\n * additional left margin in pixels to start the line gauge from.\n */\n leftMargin: 25,\n headerFillColor: '#101011',\n fillColor: '#101011',\n\n labelsColor: '#D5D5D5',\n /**\n * Header gauge tick color.\n */\n tickColor: '#D5D5D5',\n /**\n * Selection rectangle color.\n */\n selectionColor: 'White',\n\n /**\n * Default rows style.\n * Can be overridden by setting style individually for each row.\n */\n rowsStyle: defaultTimelineRowStyle,\n\n /**\n * Style for the all keyframes in a current row.\n * Individual keyframe can have own style.\n */\n keyframesStyle: defaultTimelineKeyframeStyle,\n /**\n * Style of the groups.\n */\n groupsStyle: defaultGroupStyle,\n /**\n * Header height in pixels\n */\n headerHeight: 30,\n font: '11px sans-serif',\n /**\n * Default zoom level = 1. where screen pixels are equals to the corresponding stepVal stepPx.\n */\n zoom: 1,\n /**\n * Default zoom speed.\n */\n zoomSpeed: 0.1,\n /**\n * Max zoom value.\n */\n zoomMin: 0.1,\n /**\n * Min zoom value.\n */\n zoomMax: 8,\n /**\n * Set this to true in a MAC OS environment: The Meta key will be used instead of the Ctrl key.\n */\n controlKeyIsMetaKey: false,\n /**\n * Access the scroll container via this class for e.g. scroll bar styling.\n */\n scrollContainerClass: 'scroll-container',\n /**\n * keyframes group is draggable.\n */\n groupsDraggable: true,\n /**\n * keyframes are draggable.\n */\n keyframesDraggable: true,\n /**\n * Timeline can be dragged or position can be changed by user interaction. Default: true\n */\n timelineDraggable: true,\n /**\n * Start drawing timeline from this min point.\n * Bounds for the keyframe dragging.\n */\n min: 0,\n /**\n * Max bounds timeline can navigate to.\n */\n max: Number.MAX_VALUE,\n} as TimelineOptions;\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n// bundle entry point\n\nimport { TimelineEventsEmitter } from './timelineEventsEmitter';\nimport { TimelineConsts } from './settings/timelineConsts';\n\n// @public timeline models\nimport { TimelineRanged } from './models/timelineRanged';\nimport { TimelineModel } from './models/timelineModel';\nimport { TimelineRow } from './models/timelineRow';\nimport { TimelineKeyframe } from './models/timelineKeyframe';\n// @public styles\nimport { TimelineOptions } from './settings/timelineOptions';\n\nimport { TimelineStyleUtils } from './utils/timelineStyleUtils';\nimport { TimelineUtils } from './utils/timelineUtils';\nimport { TimelineElement } from './utils/timelineElement';\n\n// @private helper containers.\nimport { TimelineCutBoundsRectResults } from './utils/timelineCutBoundsRectResults';\nimport { TimelineSelectionResults } from './utils/timelineSelectionResults';\nimport { TimelineMouseData } from './utils/timelineMouseData';\nimport { TimelineElementDragState } from './utils/timelineElementDragState';\nimport { TimelineDraggableData } from './utils/timelineDraggableData';\n\n// @private virtual model\nimport { TimelineGroupViewModel } from './viewModels/timelineGroupViewModel';\nimport { TimelineKeyframeViewModel } from './viewModels/timelineKeyframeViewModel';\nimport { TimelineRowViewModel } from './viewModels/timelineRowViewModel';\nimport { TimelineViewModel } from './viewModels/timelineViewModel';\n\n// @public events\nimport { TimelineKeyframeChangedEvent } from './utils/events/timelineKeyframeChangedEvent';\nimport { TimelineTimeChangedEvent } from './utils/events/timelineTimeChangedEvent';\nimport { TimelineSelectedEvent } from './utils/events/timelineSelectedEvent';\nimport { TimelineScrollEvent } from './utils/events/timelineScrollEvent';\nimport { TimelineClickEvent } from './utils/events/timelineClickEvent';\nimport { TimelineDragEvent } from './utils/events/timelineDragEvent';\n\n// @public enums\nimport { TimelineKeyframeShape } from './enums/timelineKeyframeShape';\nimport { TimelineInteractionMode } from './enums/timelineInteractionMode';\nimport { TimelineElementType } from './enums/timelineElementType';\nimport { TimelineCursorType } from './enums/timelineCursorType';\nimport { TimelineCapShape } from './enums/timelineCapShape';\nimport { TimelineEventSource } from './enums/timelineEventSource';\nimport { TimelineSelectionMode } from './enums/timelineSelectionMode';\nimport { TimelineEvents } from './enums/timelineEvents';\n// @private defaults are exposed:\n\nimport { TimelineScrollSource } from './enums/timelineScrollSource';\nimport { defaultTimelineConsts } from './settings/defaults/defaultTimelineConsts';\nimport { defaultTimelineOptions } from './settings/defaults/defaultTimelineOptions';\n\nexport class Timeline extends TimelineEventsEmitter {\n /**\n * component container.\n */\n _container: HTMLElement | null = null;\n /**\n * Dynamically generated canvas inside of the container.\n */\n _canvas: HTMLCanvasElement | null = null;\n /**\n * Dynamically generated scroll container.\n */\n _scrollContainer: HTMLElement | null = null;\n /**\n * Dynamically generated virtual scroll content.\n * While canvas has no real size, this element is used to create virtual scroll on the parent element.\n */\n _scrollContent: HTMLElement | null = null;\n /**\n * Rendering context\n */\n _ctx: CanvasRenderingContext2D | null = null;\n /**\n * Components settings\n */\n _options!: TimelineOptions;\n /**\n * Drag start position.\n */\n _startPosMouseArgs: TimelineMouseData | null = null;\n /**\n * Drag scroll started position.\n */\n _scrollStartPos: DOMPoint | null = null;\n /**\n * Private. Current mouse position that is used to track values between mouse up/down events.\n * Can be null, use public methods and properties instead.\n */\n _currentPos: TimelineMouseData | null = null;\n\n /**\n * Private. Current active mouse area selection rectangle displayed during the mouse up/down drag events.\n */\n _selectionRect: DOMRect | null = null;\n /**\n * Private. Whether selection rectangle is displayed.\n */\n _selectionRectEnabled = false;\n /**\n * Private. Information in regard of current active drag state.\n */\n _drag: TimelineDraggableData | null = null;\n _startedDragWithCtrl = false;\n _startedDragWithShiftKey = false;\n _scrollProgrammatically = false;\n _clickTimeout: number | null = null;\n _lastClickTime = 0;\n _lastClickPoint: DOMPoint | null = null;\n _consts: TimelineConsts = defaultTimelineConsts;\n /**\n * Private. whether click is allowed.\n */\n _clickAllowed = false;\n /**\n * Private. scroll finished timer reference.\n */\n _scrollFinishedTimerRef?: number | null = null;\n /**\n * Private.Current timeline position.\n * Please use public get\\set methods to properly change the timeline position.\n */\n _val = 0;\n _pixelRatio = 1;\n /**\n * Private. Current zoom level. Please use publicly available properties to set zoom levels.\n */\n _currentZoom = 0;\n /**\n * Private. Ref for the auto pan scroll interval.\n */\n _intervalRef?: number | null = null;\n /**\n * Private.\n * When last auto pan scroll action was started.\n */\n _autoPanLastActionDate = 0;\n /**\n * Private.\n * Is pan mouse interactions are started.\n */\n _isPanStarted = false;\n /**\n * Private.\n * Component interaction mode. Please use publicly available methods.\n */\n _interactionMode = TimelineInteractionMode.Selection;\n\n _lastUsedArgs: MouseEvent | TouchEvent | null = null;\n /**\n * Private.\n * Current set timeline model.\n */\n _model: TimelineModel | null = null;\n /**\n * Private.\n * Indication when scroll are drag or click is started.\n */\n _scrollAreaClickOrDragStarted = false;\n /**\n * Create Timeline instance\n * @param options Timeline settings.\n * @param model Timeline model.\n */\n constructor(options: TimelineOptions | null = null, model: TimelineModel | null = null) {\n super();\n this._options = TimelineUtils.cloneOptions(defaultTimelineOptions);\n // Allow to create instance without an error to perform tests.\n if (options || model) {\n this.initialize(options, model);\n }\n }\n\n /**\n * Initialize Timeline\n * @param options Timeline settings.\n * @param model Timeline model.\n */\n public initialize = (options: TimelineOptions | null, model: TimelineModel | null): void => {\n this._model = model;\n if (!options || !options.id) {\n throw new Error(`Element cannot be empty. Should be string or DOM element.`);\n }\n\n this._generateContainers(options.id);\n this._options = TimelineUtils.cloneOptions(defaultTimelineOptions);\n if (options) {\n this._options = this._setOptions(options);\n }\n this._subscribeComponentEvents();\n this.rescale();\n this.redraw();\n };\n\n /**\n * Generate component html.\n * @param id container.\n */\n _generateContainers = (id: string | HTMLElement): void => {\n if (id instanceof HTMLElement) {\n this._container = id as HTMLElement;\n } else {\n this._container = document.getElementById(id);\n }\n\n if (!this._container) {\n throw new Error(`Element cannot be empty. Should be string or DOM element.`);\n }\n\n this._scrollContainer = document.createElement('div');\n this._scrollContent = document.createElement('div');\n this._canvas = document.createElement('canvas');\n\n if (!this._canvas || !this._canvas.getContext) {\n console.log('Cannot initialize canvas context.');\n return;\n }\n this._container.innerHTML = '';\n this._container.style.position = 'relative';\n // Generate size container:\n this._canvas.style.cssText =\n 'image-rendering: -moz-crisp-edges;' +\n 'image-rendering: -webkit-crisp-edges;' +\n 'image-rendering: pixelated;' +\n 'image-rendering: crisp-edges;' +\n 'user-select: none;' +\n '-webkit-user-select: none;' +\n '-khtml-user-select: none;' +\n '-moz-user-select: none;' +\n '-o-user-select: none;' +\n 'user-select: none;' +\n 'touch-action: none;' +\n 'position: relative;' +\n '-webkit-user-drag: none;' +\n '-khtml-user-drag: none;' +\n '-moz-user-drag: none;' +\n '-o-user-drag: none;' +\n 'user-drag: none;' +\n 'padding: inherit';\n\n // Those styles are hardcoded and required for the proper scrolling.\n this._scrollContainer.style.cssText = 'overflow: scroll;' + 'position: absolute;' + 'width: 100%;' + 'height: 100%;';\n this._scrollContent.style.width = this._scrollContent.style.height = '100%';\n\n // add the text node to the created div\n this._scrollContainer.appendChild(this._scrollContent);\n this._container.appendChild(this._scrollContainer);\n const scrollBarWidth = this._scrollContainer.offsetWidth - this._scrollContent.clientWidth;\n // Calculate current browser scrollbar size and add offset for the canvas\n this._canvas.style.width = this._canvas.style.height = 'calc(100% -' + (scrollBarWidth || 17) + 'px)';\n\n this._container.appendChild(this._canvas);\n this._ctx = this._getCtx();\n };\n /**\n * Get drawing context\n */\n _getCtx(): CanvasRenderingContext2D | null {\n if (!this._canvas) {\n return null;\n }\n if (this._ctx) {\n return this._ctx;\n }\n this._ctx = this._canvas.getContext('2d');\n return this._ctx;\n }\n /**\n * Subscribe current component on the related events.\n * Private. Use initialize method instead.\n */\n _subscribeComponentEvents = (): void => {\n // Allow to call event multiple times, revoke current subscription and subscribe again.\n this._unsubscribeComponentEvents();\n if (!this._container || !this._scrollContainer || !this._canvas) {\n throw Error(`Cannot subscribe on scroll events while one of the containers is null or empty. Please call initialize method first`);\n }\n if (this._container) {\n this._container.addEventListener('wheel', this._handleWheelEvent);\n }\n if (this._scrollContainer) {\n this._scrollContainer.addEventListener('scroll', this._handleScrollEvent);\n this._scrollContainer.addEventListener('touchstart', this._handleScrollMouseDownEvent);\n this._scrollContainer.addEventListener('mousedown', this._handleScrollMouseDownEvent);\n }\n document.addEventListener('keyup', this._handleKeyUp, false);\n document.addEventListener('keydown', this._handleKeyDown, false);\n window.addEventListener('blur', this._handleBlurEvent, false);\n window.addEventListener('resize', this._handleWindowResizeEvent, false);\n if (this._canvas) {\n this._canvas.addEventListener('touchstart', this._handleMouseDownEvent, false);\n this._canvas.addEventListener('mousedown', this._handleMouseDownEvent, false);\n this._canvas.addEventListener('contextmenu', this._handleContextMenu, false);\n }\n window.addEventListener('mousemove', this._handleMouseMoveEvent, false);\n window.addEventListener('touchmove', this._handleMouseMoveEvent, false);\n window.addEventListener('mouseup', this._handleMouseUpEvent, false);\n window.addEventListener('touchend', this._handleMouseUpEvent, false);\n };\n\n /**\n * Private. Use dispose method instead.\n */\n _unsubscribeComponentEvents = (): void => {\n this._container?.removeEventListener('wheel', this._handleWheelEvent);\n\n if (this._scrollContainer) {\n this._scrollContainer.removeEventListener('scroll', this._handleScrollEvent);\n this._scrollContainer.removeEventListener('touchstart', this._handleScrollMouseDownEvent);\n this._scrollContainer.removeEventListener('mousedown', this._handleScrollMouseDownEvent);\n } else {\n console.warn(`Cannot unsubscribe scroll while it's already empty`);\n }\n window.removeEventListener('blur', this._handleBlurEvent);\n window.removeEventListener('resize', this._handleWindowResizeEvent);\n document.removeEventListener('keydown', this._handleKeyDown);\n document.removeEventListener('keyup', this._handleKeyUp);\n if (this._canvas) {\n this._canvas.removeEventListener('touchstart', this._handleMouseDownEvent);\n this._canvas.removeEventListener('mousedown', this._handleMouseDownEvent);\n this._canvas.removeEventListener('contextmenu', this._handleContextMenu);\n } else {\n console.warn(`Cannot unsubscribe canvas while it's already empty`);\n }\n window.removeEventListener('mousemove', this._handleMouseMoveEvent);\n window.removeEventListener('touchmove', this._handleMouseMoveEvent);\n window.removeEventListener('mouseup', this._handleMouseUpEvent);\n window.removeEventListener('touchend', this._handleMouseUpEvent);\n };\n /**\n * Dispose current component: unsubscribe component and user events.\n */\n public dispose = (): void => {\n // Unsubscribe all user events.\n this.offAll();\n // Stop times\n this._stopAutoPan();\n this._clearScrollFinishedTimer();\n this._unsubscribeComponentEvents();\n if (this._container) {\n this._container.innerHTML = '';\n }\n this._container = null;\n this._canvas = null;\n this._scrollContainer = null;\n this._scrollContent = null;\n this._ctx = null;\n this._cleanUpSelection();\n };\n /**\n * On key up is received.\n */\n _handleKeyUp = (event: KeyboardEvent): void => {\n if (this._interactionMode === TimelineInteractionMode.Zoom) {\n this._setZoomCursor(event);\n }\n };\n /**\n * On key down is received.\n */\n _handleKeyDown = (event: KeyboardEvent): void => {\n if (this._interactionMode === TimelineInteractionMode.Zoom) {\n this._setZoomCursor(event);\n }\n };\n _setZoomCursor = (e: MouseEvent | KeyboardEvent): void => {\n if (this._controlKeyPressed(e)) {\n this._setCursor(TimelineCursorType.ZoomOut);\n } else {\n this._setCursor(TimelineCursorType.ZoomIn);\n }\n };\n _handleBlurEvent = (): void => {\n this._cleanUpSelection(true);\n };\n _handleWindowResizeEvent = (): void => {\n // Rescale and redraw\n this.rescale();\n this.redraw();\n };\n\n _clearScrollFinishedTimer = (): void => {\n if (this._scrollFinishedTimerRef) {\n clearTimeout(this._scrollFinishedTimerRef);\n this._scrollFinishedTimerRef = null;\n }\n };\n _handleScrollMouseDownEvent = (): void => {\n this._scrollAreaClickOrDragStarted = true;\n };\n _handleScrollEvent = (args: Event): void => {\n const scrollProgrammatically = this._scrollProgrammatically;\n if (this._scrollProgrammatically) {\n this._scrollProgrammatically = false;\n }\n // Stop previous running timeout.\n this._clearScrollFinishedTimer();\n // Set a timeout to run event 'scrolling end'.\n // Auto scroll is used to repeat scroll when drag element or select items outside of the visible area.\n this._scrollFinishedTimerRef = window.setTimeout(() => {\n if (!this._isPanStarted) {\n this._clearScrollFinishedTimer();\n\n this.rescale();\n this.redraw();\n }\n this._emitScrollEvent(args, scrollProgrammatically, TimelineEvents.ScrollFinished);\n }, this._consts.scrollFinishedTimeoutMs);\n\n this.redraw();\n this._emitScrollEvent(args, scrollProgrammatically);\n };\n _controlKeyPressed = (e: MouseEvent | KeyboardEvent | TouchEvent): boolean => {\n if (!this._options || this._options.controlKeyIsMetaKey === undefined) {\n return e.metaKey || e.ctrlKey;\n }\n return this._options.controlKeyIsMetaKey || this._options.controlKeyIsMetaKey ? e.metaKey : e.ctrlKey;\n };\n _handleWheelEvent = (event: WheelEvent): void => {\n if (!this._scrollContainer || !this._canvas) {\n // Component is not initialized yet.\n return;\n }\n if (this._controlKeyPressed(event)) {\n event.preventDefault();\n const mousePosArguments = this._getMousePos(this._canvas, event);\n const mousePos = Math.max(0, mousePosArguments.pos.x || 0);\n this._zoom(TimelineUtils.sign(event.deltaY), this._options.zoomSpeed || 0, mousePos);\n } else {\n this.scrollTop = this._scrollContainer.scrollTop + event.deltaY;\n event.preventDefault();\n }\n };\n _zoom = (direction: number, speed: number, x: number): void => {\n if (speed && speed > 0 && speed <= 1) {\n const deltaSpeed = TimelineUtils.getDistance(this._canvasClientWidth() / 2, x) * 0.2;\n x = x + deltaSpeed;\n const diff = this._canvasClientWidth() / x;\n const val = this._fromScreen(x);\n const zoom = direction * this._currentZoom * speed;\n //this._options.zoom\n this._currentZoom = this._setZoom(this._currentZoom + zoom);\n // Get only after zoom is set\n const zoomCenter = this.valToPx(val);\n let newScrollLeft = Math.round(zoomCenter - this._canvasClientWidth() / diff);\n if (newScrollLeft <= 0) {\n newScrollLeft = 0;\n }\n\n this._rescaleInternal(newScrollLeft + this._canvasClientWidth(), null, TimelineScrollSource.ZoomMode);\n this.scrollLeft = newScrollLeft;\n\n this.redraw();\n }\n };\n /**\n * Zoom in\n * @param speed value from 0 to 1\n */\n public zoomIn = (speed = this._options.zoomSpeed): void => {\n const width = this._scrollContainer?.clientWidth || 0;\n if (speed && width) {\n this._zoom(1, speed, width / 2);\n }\n };\n /**\n * Zoom out.\n * @param speed value from 0 to 1\n */\n public zoomOut = (speed = this._options.zoomSpeed): void => {\n const width = this._scrollContainer?.clientWidth || 0;\n if (speed && width) {\n this._zoom(-1, speed, width / 2);\n }\n };\n /**\n * Set direct zoom value.\n * @param zoom zoom value to set. percent 0-1 and etc.\n * @param min min zoom.\n * @param max max zoom.\n * @return normalized value.\n */\n _setZoom = (zoom: number, min: number | null | undefined = null, max: number | null | undefined = null): number => {\n min = TimelineUtils.isNumber(min) ? min : this._options?.zoomMin;\n max = TimelineUtils.isNumber(max) ? max : this._options?.zoomMax;\n if (TimelineUtils.isNumber(zoom)) {\n zoom = TimelineUtils.keepInBounds(zoom, min, max);\n zoom = zoom || 1;\n this._currentZoom = zoom;\n return zoom;\n }\n\n return zoom;\n };\n\n /**\n * Set direct zoom value.\n * @public\n * @param zoom zoom value to set. percent 0-1 and etc.\n * @return normalized value.\n */\n setZoom = (zoom: number): number => {\n const prevZoom = this.getZoom();\n if (prevZoom !== zoom) {\n const zoomSet = this._setZoom(zoom);\n if (prevZoom != zoomSet) {\n this.rescale();\n this.redraw();\n return zoomSet;\n }\n }\n return prevZoom;\n };\n /**\n * Get current zoom level.\n */\n getZoom = (): number => {\n if (TimelineUtils.isNumber(this._currentZoom)) {\n return this._currentZoom || 1;\n }\n return 1;\n };\n _getClickDetectionRadius = (point: TimelineMouseData): number => {\n const defaultValue = this._consts.clickDetectionMinRadius || 1;\n return Math.max(defaultValue, point?.radius || defaultValue);\n };\n\n _handleContextMenu = (args: MouseEvent | TouchEvent): void => {\n // Prevent drag of the canvas if canvas is selected as text:\n TimelineUtils.clearBrowserSelection();\n if (!this._canvas || !this._scrollContainer) {\n this._cleanUpSelection();\n return;\n }\n const mousePosTimeline = this._trackMousePos(this._canvas, args);\n\n const clickRadius = this._getClickDetectionRadius(mousePosTimeline);\n const elements = this.elementFromPoint(mousePosTimeline.pos, clickRadius, []);\n\n const target = this._findDraggableElement(elements, mousePosTimeline.val);\n // Create click event\n const event = new TimelineClickEvent();\n event.point = mousePosTimeline;\n event.args = args;\n // all elements under the click:\n event.elements = elements;\n // target element.\n event.target = target;\n\n super.emit(TimelineEvents.ContextMenu, event);\n };\n\n /**\n * @param args\n */\n _handleMouseDownEvent = (args: MouseEvent | TouchEvent): void => {\n // Prevent drag of the canvas if canvas is selected as text:\n TimelineUtils.clearBrowserSelection();\n if (!this._canvas || !this._scrollContainer) {\n this._cleanUpSelection();\n return;\n }\n this._startPosMouseArgs = this._trackMousePos(this._canvas, args);\n\n if (!this._startPosMouseArgs) {\n return;\n }\n let isDoubleClick = Date.now() - this._lastClickTime < this._consts.doubleClickTimeoutMs;\n // Don't allow to perform double click if mouse was moved to far.\n if (\n this._lastClickPoint &&\n this._startPosMouseArgs &&\n TimelineUtils.getDistance(this._lastClickPoint.x, this._lastClickPoint.y, this._startPosMouseArgs.pos.x, this._startPosMouseArgs.pos.y) > this._consts.clickThreshold\n ) {\n isDoubleClick = false;\n }\n\n this._lastClickPoint = this._startPosMouseArgs.pos;\n this._scrollStartPos = { x: this._scrollContainer.scrollLeft, y: this._scrollContainer.scrollTop } as DOMPoint;\n this._clickAllowed = true;\n let onlyElements: TimelineElementType[] | null = null;\n if (this._interactionMode === TimelineInteractionMode.NonInteractivePan || this._interactionMode === TimelineInteractionMode.None) {\n // Allow to select only timeline. Timeline position can be disabled/enabled by properties.\n onlyElements = [TimelineElementType.Timeline];\n }\n const clickRadius = this._getClickDetectionRadius(this._startPosMouseArgs);\n const elements = this.elementFromPoint(this._startPosMouseArgs.pos, clickRadius, onlyElements);\n\n const target = this._findDraggableElement(elements, this._startPosMouseArgs.val);\n // Create click event\n const event = new TimelineClickEvent();\n event.point = this._startPosMouseArgs;\n event.args = args;\n // all elements under the click:\n event.elements = elements;\n // target element.\n event.target = target;\n\n if (isDoubleClick) {\n super.emit(TimelineEvents.DoubleClick, event);\n return;\n }\n\n super.emit(TimelineEvents.MouseDown, event);\n\n this._clickTimeout = Date.now();\n this._lastClickTime = Date.now();\n if (event.isPrevented()) {\n // Mouse up will be also prevented\n this._cleanUpSelection();\n return;\n }\n\n this._currentPos = this._startPosMouseArgs;\n\n // Select keyframes on mouse down\n if (target && this._interactionMode !== TimelineInteractionMode.Zoom) {\n this._drag = new TimelineDraggableData();\n this._drag.val = target.val;\n this._drag.type = target.type;\n this._drag.target = this._setElementDragState(target, target.val);\n\n if (target.type === TimelineElementType.Keyframe) {\n this._startedDragWithCtrl = this._controlKeyPressed(args);\n this._startedDragWithShiftKey = args.shiftKey;\n // get all related selected keyframes if we are selecting one.\n if (target?.keyframe && !target?.keyframe?.selected && !this._controlKeyPressed(args)) {\n this._selectInternal(target.keyframe);\n }\n // Allow to drag all selected keyframes on a screen\n this._drag.elements = this.getSelectedElements().map((element) => {\n return this._setElementDragState(element, element.val);\n });\n } else if (target.type === TimelineElementType.Group) {\n const keyframes = this._drag.target.keyframes;\n\n if (keyframes && Array.isArray(keyframes)) {\n this._drag.elements = keyframes.map((keyframe) => {\n return this._setElementDragState(this._convertToTimelineElement(this._drag?.target.row || null, keyframe), keyframe.val);\n });\n }\n } else {\n this._drag.elements = [this._drag.target];\n }\n }\n\n this.redraw();\n };\n _setElementDragState = (element: TimelineElement | TimelineElementDragState, val: number): TimelineElementDragState => {\n const state = element as TimelineElementDragState;\n state.prevVal = state.val;\n if (state.startedVal === undefined || state.startedVal === null) {\n state.startedVal = val;\n }\n if (state.prevVal === undefined || state.prevVal === null) {\n state.prevVal = val;\n }\n state.val = val;\n return state;\n };\n /**\n * Check is mouse left button is clicked.\n */\n isLeftButtonClicked = (args: MouseEvent | TouchEvent | any): boolean => {\n return !!args && args.buttons == 1;\n };\n\n /**\n * Browser mouse move handler.\n */\n _handleMouseMoveEvent = (args: MouseEvent | TouchEvent | null): void => {\n if (!args) {\n args = this._lastUsedArgs;\n } else {\n this._lastUsedArgs = args;\n }\n if (!args || !this._canvas) {\n return;\n }\n const touchEventArgs = args as TouchEvent;\n const isTouch = touchEventArgs.changedTouches && touchEventArgs.changedTouches.length > 0;\n this._currentPos = this._trackMousePos(this._canvas, args);\n if (!this._isPanStarted && this._selectionRect && this._clickTimeoutIsOver()) {\n // TODO: implement selection by rect\n if (this._interactionMode === TimelineInteractionMode.None || this._interactionMode === TimelineInteractionMode.Zoom || this._interactionMode === TimelineInteractionMode.NonInteractivePan) {\n this._selectionRectEnabled = false;\n } else {\n this._selectionRectEnabled = true;\n }\n } else {\n this._selectionRectEnabled = false;\n }\n\n args = args as MouseEvent;\n const isLeftClicked = this.isLeftButtonClicked(args);\n if (!isLeftClicked) {\n this._scrollAreaClickOrDragStarted = false;\n }\n // On dragging is started.\n if (this._startPosMouseArgs) {\n // On left button is on hold by the user\n if (isLeftClicked || isTouch) {\n if (this._drag && !this._startedDragWithCtrl) {\n const convertedVal = this._currentPos.val;\n if (this._drag.type === TimelineElementType.Timeline) {\n this._setTimeInternal(convertedVal, TimelineEventSource.User);\n } else if ((this._drag.type == TimelineElementType.Keyframe || this._drag.type == TimelineElementType.Group) && this._drag.elements) {\n const offset = Math.floor(convertedVal - this._drag.val);\n const movedOffset = this._moveElements(offset, this._drag.elements, TimelineEventSource.User);\n if (movedOffset !== 0) {\n if (!this._drag.changed) {\n this._drag.prevVal = this._drag.val;\n const eventArgs = this._emitDragStartedEvent(this._drag);\n if (!eventArgs || eventArgs.isPrevented()) {\n // Cleanup drag here, so drag finished will be ignored.\n this._cleanUpSelection(true);\n this._drag = null;\n return;\n }\n }\n\n this._drag.changed = true;\n this._drag.val += offset;\n this._emitDragEvent(this._drag);\n }\n }\n }\n\n if ((this._interactionMode === TimelineInteractionMode.Pan || this._interactionMode === TimelineInteractionMode.NonInteractivePan) && !this._drag) {\n this._isPanStarted = true;\n this._setCursor(TimelineCursorType.Grabbing);\n // Track scroll by drag.\n this._scrollByPan(this._startPosMouseArgs.pos, this._currentPos.pos, this._scrollStartPos);\n } else {\n if (this._interactionMode !== TimelineInteractionMode.None) {\n // Track scroll by mouse or touch out of the area.\n this._scrollBySelectionOutOfBounds(this._currentPos.pos);\n }\n }\n\n this.redraw();\n } else {\n // Fallback. Cancel mouse move when focus was lost and mouse down is still counted.\n this._cleanUpSelection(true);\n this.redraw();\n }\n } else if (!isTouch) {\n // Set mouse over cursors\n let onlyElements: TimelineElementType[] | null = null;\n if (this._interactionMode === TimelineInteractionMode.NonInteractivePan || this._interactionMode === TimelineInteractionMode.None) {\n // Allow to select only timeline. Timeline position can be disabled/enabled by properties.\n onlyElements = [TimelineElementType.Timeline];\n }\n const clickRadius = this._getClickDetectionRadius(this._currentPos);\n const elements = this.elementFromPoint(this._currentPos.pos, clickRadius, onlyElements);\n const target = this._findDraggableElement(elements, this._currentPos.val);\n if (this._isPanStarted || this._interactionMode === TimelineInteractionMode.Pan || this._interactionMode === TimelineInteractionMode.NonInteractivePan) {\n if (isLeftClicked) {\n this._setCursor(TimelineCursorType.Grabbing);\n } else {\n this._setCursor(TimelineCursorType.Grab);\n }\n } else {\n if (this._interactionMode === TimelineInteractionMode.Zoom) {\n this._setZoomCursor(args);\n return;\n } else {\n this._setCursor(TimelineCursorType.Default);\n }\n }\n\n if (target) {\n let cursor: TimelineCursorType | null = null;\n if (target.type === TimelineElementType.Group) {\n cursor = cursor || TimelineCursorType.EWResize;\n } else if (target.type == TimelineElementType.Keyframe) {\n cursor = cursor || TimelineCursorType.Pointer;\n } else if (target.type == TimelineElementType.Timeline) {\n cursor = cursor || this._options?.timelineStyle?.cursor || null;\n }\n\n if (cursor) {\n this._setCursor(cursor);\n }\n }\n }\n\n if (isTouch) {\n args.preventDefault();\n }\n };\n\n /**\n * Move elements\n * @param offset vector to move elements along.\n * @param elements Element to move.\n * @returns real moved value.\n */\n _moveElements(offset: number, elements: TimelineElementDragState[], source: TimelineEventSource = TimelineEventSource.Programmatically): number {\n if (!elements) {\n return 0;\n }\n let isChanged = false;\n if (Math.abs(offset) > 0) {\n // Find drag min and max bounds:\n let bounds = { min: Number.MIN_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER } as TimelineRanged;\n // Set min max from the options.\n bounds = TimelineUtils.setMinMax(bounds, this._options);\n elements.forEach((p) => {\n if (!p || !p.keyframe) {\n return;\n }\n // find allowed bounds for the draggable items.\n // find for each row and keyframe separately.\n const currentBounds = TimelineUtils.setMinMax(TimelineUtils.setMinMax({ min: bounds.min, max: bounds.max }, p.keyframe), p.row || null);\n const expectedKeyframeValue = this._options?.snapAllKeyframesOnMove ? this.snapVal(p.keyframe.val) : p.keyframe.val;\n const newPosition = expectedKeyframeValue + offset;\n // Check that move offset will hit min bounds\n if ((currentBounds.min || currentBounds.min === 0) && TimelineUtils.isNumber(currentBounds.min) && newPosition < currentBounds.min) {\n // Return to the bounds:\n offset = offset + TimelineUtils.getDistance(currentBounds.min, newPosition);\n }\n if ((currentBounds.max || currentBounds.max === 0) && TimelineUtils.isNumber(currentBounds.max) && newPosition > currentBounds.max) {\n // Return to the bounds:\n offset = offset - TimelineUtils.getDistance(currentBounds.max, newPosition);\n }\n });\n\n if (Math.abs(offset) > 0) {\n // don't allow to move less than zero offset.\n elements.forEach((element) => {\n if (!element?.keyframe) {\n return;\n }\n const prevVal = element.keyframe.val;\n const toSet = prevVal + offset;\n const newValue = this._setKeyframePos(element, toSet, source);\n isChanged = newValue !== prevVal;\n });\n }\n\n if (isChanged) {\n return offset;\n }\n }\n\n return 0;\n }\n\n /**\n * Mouse up handler.\n */\n _handleMouseUpEvent = (args: MouseEvent | TouchEvent): void => {\n this._scrollAreaClickOrDragStarted = false;\n if (!this._canvas) {\n return;\n }\n if (this._startPosMouseArgs) {\n //window.releaseCapture();\n const pos = this._trackMousePos(this._canvas, args);\n\n // Click detection.\n if (this._clickAllowed || !this._clickTimeoutIsOver() || (this._drag && (this._startedDragWithCtrl || this._startedDragWithShiftKey))) {\n if (this._options && this._interactionMode === TimelineInteractionMode.Zoom) {\n const direction = this._controlKeyPressed(args) ? 1 : -1;\n const mouseArgs = this._getMousePos(this._canvas, args);\n const mousePos = Math.max(0, mouseArgs.pos.x || 0);\n this._zoom(direction, this._options.zoomSpeed || 0, mousePos);\n } else {\n this._performClick(pos, this._drag);\n }\n } else if (!this._drag && this._selectionRect && this._selectionRectEnabled) {\n if (this._interactionMode === TimelineInteractionMode.Zoom) {\n // TODO: implement zoom by screen rect.\n } else if (this._interactionMode !== TimelineInteractionMode.None) {\n const keyframes = this._getKeyframesByRectangle(this._selectionRect);\n const selectionMode = args.shiftKey ? TimelineSelectionMode.Append : TimelineSelectionMode.Normal;\n this.select(keyframes, selectionMode);\n }\n }\n\n this._cleanUpSelection();\n this.redraw();\n }\n };\n\n /**\n * Canvas client height.\n */\n _canvasClientHeight = (): number => {\n if (this._canvas) {\n return this._canvas.clientHeight;\n }\n return 0;\n };\n\n /**\n * Canvas client width.\n */\n _canvasClientWidth = (): number => {\n if (this._canvas) {\n return this._canvas.clientWidth;\n }\n return 0;\n };\n\n /**\n * Get all keyframes under the screen rectangle.\n * @param screenRect screen coordinates to get keyframes.\n */\n _getKeyframesByRectangle = (screenRect: DOMRect): TimelineKeyframe[] => {\n const keyframesModels: Array = [];\n this._forEachKeyframe((keyframeViewModel) => {\n const intersects =\n keyframeViewModel.shape === TimelineKeyframeShape.Rect\n ? TimelineUtils.isRectIntersects(keyframeViewModel.size, screenRect)\n : TimelineUtils.isOverlap(keyframeViewModel.size.x, keyframeViewModel.size.y, screenRect);\n\n if (intersects) {\n keyframesModels.push(keyframeViewModel.model);\n }\n });\n return keyframesModels;\n };\n\n /**\n * Private.\n * Perform timeline click.\n */\n _performClick = (pos: TimelineMouseData, drag: TimelineDraggableData | null): boolean => {\n let isChanged = false;\n if (drag && drag.type === TimelineElementType.Keyframe) {\n let mode = TimelineSelectionMode.Normal;\n if (this._startedDragWithCtrl && this._controlKeyPressed(pos.args)) {\n if (this._controlKeyPressed(pos.args)) {\n mode = TimelineSelectionMode.Revert;\n }\n } else if (this._startedDragWithShiftKey && pos.args.shiftKey) {\n mode = TimelineSelectionMode.Append;\n }\n // Reverse selected keyframe selection by a click:\n isChanged = this._selectInternal(drag?.target?.keyframe || null, mode).selectionChanged || isChanged;\n\n if (pos.args.shiftKey && this._options?.timelineDraggable !== false) {\n // Set current timeline position if it's not a drag or selection rect small or fast click.\n isChanged = this._setTimeInternal(pos.val, TimelineEventSource.User) || isChanged;\n }\n } else {\n // deselect keyframes if any:\n isChanged = this._selectInternal(null).selectionChanged || isChanged;\n\n if (this._options?.timelineDraggable !== false) {\n // change timeline pos:\n // Set current timeline position if it's not a drag or selection rect small or fast click.\n isChanged = this._setTimeInternal(pos.val, TimelineEventSource.User) || isChanged;\n }\n }\n\n return isChanged;\n };\n /**\n * Set keyframe value.\n * @param keyframe\n * @param value\n * @return set value.\n */\n _setKeyframePos = (element: TimelineElementDragState, value: number, source: TimelineEventSource = TimelineEventSource.Programmatically): number => {\n if (!element || !element.keyframe) {\n return value;\n }\n value = Math.floor(value);\n if (element.keyframe && element.keyframe.val != value) {\n element.prevVal = element.val;\n element.val = value;\n element.keyframe.val = value;\n const event = this._emitKeyframeChanged(element, source);\n if (event.isPrevented()) {\n element.val = event.prevVal;\n element.keyframe.val = event.prevVal;\n }\n\n return value;\n }\n\n return value;\n };\n\n /**\n * @param cursor to set.\n */\n _setCursor = (cursor: string): void => {\n if (this._canvas && this._canvas.style.cursor != cursor) {\n this._canvas.style.cursor = cursor;\n }\n };\n\n /**\n * Set component interaction mode.\n */\n public setInteractionMode = (mode: TimelineInteractionMode): void => {\n if (this._interactionMode != mode) {\n this._interactionMode = mode;\n // Avoid any conflicts with other modes, clean current state.\n this._cleanUpSelection(true);\n this.redraw();\n }\n };\n /**\n * Get current interaction mode.\n */\n public getInteractionMode = (): TimelineInteractionMode => {\n return this._interactionMode;\n };\n /**\n * Private.\n * Helper method. Convert model element to timeline element.\n */\n _convertToTimelineElement = (rowModel: TimelineRow | null, keyframe: TimelineKeyframe): TimelineElement => {\n const data = {\n type: TimelineElementType.Keyframe,\n val: keyframe.val,\n keyframe: keyframe,\n row: rowModel,\n } as TimelineElement;\n return data;\n };\n\n public getSelectedKeyframes = (): TimelineKeyframe[] => {\n const selected = this.getSelectedElements();\n return selected.map((p) => p.keyframe) as TimelineKeyframe[];\n };\n\n /**\n * Get selected timeline elements.\n */\n public getSelectedElements = (): TimelineElement[] => {\n const selected: TimelineElement[] = [];\n this._forEachKeyframe((keyframe): void => {\n if (keyframe && keyframe.model.selected) {\n selected.push(this._convertToTimelineElement(keyframe.rowViewModel.model, keyframe.model));\n }\n return;\n });\n\n return selected;\n };\n /**\n * Get all keyframe models available in the model.\n */\n public getAllKeyframes = (): TimelineKeyframe[] => {\n const keyframes: TimelineKeyframe[] = [];\n this._forEachKeyframe((keyframe): void => {\n keyframes.push(keyframe.model);\n });\n\n return keyframes;\n };\n\n public selectAllKeyframes = (): TimelineSelectionResults => {\n return this.select(this.getAllKeyframes(), TimelineSelectionMode.Normal);\n };\n public deselectAll = (): TimelineSelectionResults => {\n return this.select(null);\n };\n\n private _changeNodeState = (state: TimelineSelectionResults, node: TimelineKeyframe, value: boolean): boolean => {\n if (node.selected !== value) {\n const selectable = typeof node.selectable === 'boolean' ? node.selectable : true;\n if (!value || (value && selectable)) {\n node.selected = value;\n state.changed.push(node);\n return true;\n }\n }\n\n return false;\n };\n\n public select = (nodes: TimelineKeyframe[] | TimelineKeyframe | null, mode = TimelineSelectionMode.Normal): TimelineSelectionResults => {\n const results = this._selectInternal(nodes, mode);\n if (results.selectionChanged) {\n this.redraw();\n }\n return results;\n };\n\n /**\n * Select keyframes\n * @param nodes keyframe or list of the keyframes to be selected.\n * @param mode selection mode.\n */\n public _selectInternal = (nodes: TimelineKeyframe[] | TimelineKeyframe | null, mode = TimelineSelectionMode.Normal): TimelineSelectionResults => {\n if (!nodes) {\n nodes = [];\n }\n if (!Array.isArray(nodes)) {\n nodes = [nodes];\n }\n\n const state = {\n selectionChanged: false,\n selected: this.getSelectedKeyframes(),\n changed: [] as Array,\n } as TimelineSelectionResults;\n const nodesArray = nodes as TimelineKeyframe[];\n //const state = this.selectedSubject.getValue();\n if (nodesArray && mode === TimelineSelectionMode.Append) {\n nodes.forEach((node) => {\n const changed = this._changeNodeState(state, node, true);\n if (changed && node.selected) {\n state.selected.push(node);\n }\n });\n } else if (nodesArray && mode === TimelineSelectionMode.Revert) {\n nodes.forEach((node) => {\n if (state.selected.indexOf(node) >= 0) {\n this._changeNodeState(state, node, false);\n TimelineUtils.deleteElement(state.selected, node);\n } else {\n this._changeNodeState(state, node, true);\n if (node.selected) {\n state.selected.push(node);\n }\n }\n });\n } else if (mode === TimelineSelectionMode.Normal) {\n const selectedItems: Array = [];\n if (nodes) {\n nodes.forEach((node) => {\n this._changeNodeState(state, node, true);\n if (node.selected) {\n selectedItems.push(node);\n }\n });\n }\n\n state.selected.forEach((node) => {\n const exists = nodesArray.indexOf(node) >= 0;\n // Deselect\n if (!exists) {\n this._changeNodeState(state, node, false);\n }\n });\n\n if (state.changed.length > 0) {\n if (selectedItems) {\n state.selected = selectedItems;\n } else {\n state.selected.length = 0;\n }\n }\n }\n\n if (state.changed.length > 0) {\n state.selectionChanged = true;\n this._emitKeyframesSelected(state);\n }\n\n return state;\n };\n\n /**\n * foreach visible keyframe.\n */\n _forEachKeyframe(callback: (keyframe: TimelineKeyframeViewModel, index?: number, newRow?: boolean) => void, onRowCallback?: (rowViewModel: TimelineRowViewModel) => void): void {\n if (!callback && !onRowCallback) {\n return;\n }\n if (!this._model) {\n return;\n }\n\n const calculatedModel = this._generateViewModel();\n if (!calculatedModel) {\n return;\n }\n\n calculatedModel?.rowsViewModels?.forEach((rowViewModel) => {\n if (!rowViewModel) {\n return;\n }\n onRowCallback && onRowCallback(rowViewModel);\n let nextRow = true;\n if (callback) {\n rowViewModel.keyframesViewModels.forEach((keyframeViewModel, keyframeIndex) => {\n if (keyframeViewModel) {\n callback(keyframeViewModel, keyframeIndex, nextRow);\n }\n\n nextRow = false;\n });\n }\n });\n }\n\n /**\n * Private.\n * Create extended mouse position and calculate size of the selection rectangle.\n */\n _trackMousePos(canvas: HTMLCanvasElement, mouseArgs: MouseEvent | TouchEvent): TimelineMouseData {\n const clickArgs = this._getMousePos(canvas, mouseArgs);\n const pos = clickArgs.pos;\n clickArgs.originalVal = this._mousePosToVal(pos.x, false);\n clickArgs.snapVal = this._mousePosToVal(pos.x, true);\n clickArgs.val = clickArgs.originalVal;\n if (this._options && this._options.snapEnabled) {\n clickArgs.val = clickArgs.snapVal;\n }\n\n if (this._startPosMouseArgs) {\n if (!this._selectionRect) {\n this._selectionRect = {} as DOMRect;\n }\n const startPos = this._startPosMouseArgs.pos;\n // get the pos with the virtualization:\n const x = Math.floor(startPos.x + ((this._scrollStartPos?.x || 0) - this.scrollLeft));\n const y = Math.floor(startPos.y + ((this._scrollStartPos?.y || 0) - this.scrollTop));\n this._selectionRect.x = Math.min(x, pos.x);\n this._selectionRect.y = Math.min(y, pos.y);\n this._selectionRect.width = Math.max(x, pos.x) - this._selectionRect.x;\n this._selectionRect.height = Math.max(y, pos.y) - this._selectionRect.y;\n // Once mouse was moved outside of the bounds it's not a click anymore\n if (this._clickAllowed) {\n this._clickAllowed = this._selectionRect.height <= this._consts.clickThreshold && this._selectionRect.width <= this._consts.clickThreshold;\n }\n }\n\n return clickArgs;\n }\n\n /**\n * Get scroll container client width.\n */\n getClientWidth(): number {\n return this._scrollContainer?.clientWidth || 0;\n }\n /**\n * Get scroll container client height.\n */\n getClientHeight(): number {\n return this._scrollContainer?.clientHeight || 0;\n }\n _cleanUpSelection(forcePrevent = false): void {\n if (this._drag) {\n this._emitDragFinishedEvent(this._drag, forcePrevent);\n }\n this._startPosMouseArgs = null;\n this._drag = null;\n this._scrollAreaClickOrDragStarted = false;\n this._startedDragWithCtrl = false;\n this._startedDragWithShiftKey = false;\n this._selectionRect = null;\n this._clickTimeout = null;\n this._scrollStartPos = null;\n this._isPanStarted = false;\n this._clickAllowed = false;\n this._stopAutoPan();\n }\n\n /**\n * Check whether click timeout is over.\n */\n _clickTimeoutIsOver(): boolean {\n // Duration before the selection can be tracked.\n if (this._clickTimeout && Date.now() - this._clickTimeout > this._consts.clickDetectionMs) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Automatically pan. Scroll canvas when selection is made and mouse outside of the bounds.\n */\n _startAutoPan = (): void => {\n if (this._consts.autoPanSpeed) {\n if (!this._intervalRef) {\n // Repeat move calls to\n this._intervalRef = window.setInterval(() => {\n this._handleMouseMoveEvent(null);\n }, this._consts.autoPanSpeed);\n }\n }\n };\n\n /**\n * Stop current running auto pan\n */\n _stopAutoPan = (): void => {\n if (this._intervalRef) {\n clearInterval(this._intervalRef);\n this._intervalRef = null;\n }\n\n this._autoPanLastActionDate = 0;\n };\n\n /**\n * Check whether auto pan should be slowed down a bit.\n */\n _checkUpdateSpeedTooFast(): boolean {\n // Slow down updated a bit.\n if (this._autoPanLastActionDate && Date.now() - this._autoPanLastActionDate <= this._consts.autoPanSpeedLimit) {\n return true;\n }\n\n this._autoPanLastActionDate = Date.now();\n return false;\n }\n\n /**\n * Scroll virtual canvas when pan mode is enabled.\n */\n _scrollByPan(start: DOMPoint, pos: DOMPoint, scrollStartPos: DOMPoint | null): void {\n if (!start || !pos || !this._scrollContainer) {\n return;\n }\n let x = 0;\n let y = 0;\n if (scrollStartPos) {\n x = scrollStartPos.x;\n y = scrollStartPos.y;\n }\n const offsetX = Math.round(start.x - pos.x);\n const newLeft = x + offsetX;\n\n if (offsetX > 0) {\n this._rescaleInternal(newLeft + this._canvasClientWidth());\n }\n\n if (offsetX > 0 && newLeft + this._canvasClientWidth() >= this._scrollContainer.scrollWidth - 5) {\n this.scrollLeft = this._scrollContainer.scrollWidth;\n } else {\n this.scrollLeft = newLeft;\n }\n this.scrollTop = Math.round(y + start.y - pos.y);\n }\n\n _scrollBySelectionOutOfBounds(pos: DOMPoint): boolean {\n if (!this._scrollContainer) {\n return false;\n }\n const x = pos.x;\n const y = pos.y;\n let isChanged = false;\n let speedX = 0;\n let speedY = 0;\n // Small offset to start auto pan earlier.\n const bounds = this._consts.autoPanByScrollPadding;\n const isLeft = x <= bounds;\n const isRight = x >= this._canvasClientWidth() - bounds;\n const isTop = y <= bounds;\n const isBottom = y >= this._canvasClientHeight() - bounds;\n let newWidth = null;\n let newHeight = null;\n if (isLeft || isRight || isTop || isBottom) {\n // Auto move init\n this._startAutoPan();\n\n if (this._checkUpdateSpeedTooFast()) {\n return false;\n }\n\n const scrollSpeedMultiplier = isNaN(this._consts.scrollByDragSpeed) ? 1 : this._consts.scrollByDragSpeed;\n if (isLeft) {\n // Get normalized speed.\n speedX = -TimelineUtils.getDistance(x, bounds) * scrollSpeedMultiplier;\n } else if (isRight) {\n // Get normalized speed:\n speedX = TimelineUtils.getDistance(x, this._canvasClientWidth() - bounds) * scrollSpeedMultiplier;\n newWidth = this.scrollLeft + this._canvasClientWidth() + speedX;\n }\n\n if (isTop) {\n // Get normalized speed.\n speedY = (-TimelineUtils.getDistance(x, bounds) * scrollSpeedMultiplier) / 4;\n } else if (isBottom) {\n // Get normalized speed:\n speedY = (TimelineUtils.getDistance(x, this._canvasClientHeight() - bounds) * scrollSpeedMultiplier) / 4;\n newHeight = this._scrollContainer.scrollTop + this._canvasClientHeight();\n }\n } else {\n this._stopAutoPan();\n }\n\n if (newWidth || newHeight) {\n this._rescaleInternal(newWidth, newHeight, TimelineScrollSource.ScrollBySelection);\n }\n\n if (Math.abs(speedX) > 0) {\n this.scrollLeft = this._scrollContainer.scrollLeft + speedX;\n isChanged = true;\n }\n\n if (Math.abs(speedY) > 0) {\n this.scrollTop = this._scrollContainer.scrollTop + speedY;\n isChanged = true;\n }\n\n return isChanged;\n }\n\n /**\n * Convert screen pixel to value.\n */\n public pxToVal(px: number): number {\n if (!this._options) {\n return px;\n }\n let min = this._options.min || 0;\n if (!TimelineUtils.isNumber(min)) {\n min = 0;\n }\n const stepPx = this._options.stepPx || 0;\n if (stepPx === 0) {\n return px;\n }\n min *= this._currentZoom || 1;\n const steps = (this._options.stepVal || 0) * this._currentZoom || 1;\n const val = min + (px / stepPx) * steps;\n return val;\n }\n\n /**\n * Convert value to local screen component coordinates.\n */\n _toScreenPx = (val: number): number => {\n return this.valToPx(val) - this.scrollLeft + this._leftMargin();\n };\n /**\n * Convert screen local coordinates to a global value info.\n */\n _fromScreen = (px: number): number => {\n return this.pxToVal(this.scrollLeft + px - this._leftMargin());\n };\n /**\n * Convert area value to global screen pixel coordinates.\n */\n public valToPx = (val: number): number => {\n if (!this._options || !this._options.stepPx) {\n return val;\n }\n let min = this._options.min || 0;\n if (!TimelineUtils.isNumber(min)) {\n min = 0;\n }\n min *= this._currentZoom || 1;\n const steps = (this._options.stepVal || 0) * this._currentZoom || 1;\n return (-min + val) * (this._options.stepPx / steps);\n };\n\n /**\n * Snap a value to a nearest grid point.\n */\n public snapVal(val: number): number {\n // Snap a value if configured.\n if (this._options && this._options.snapEnabled && this._options.snapStep) {\n const stops = this._options.snapStep;\n const step = val / stops;\n const stepsFit = Math.round(step);\n const minSteps = Math.abs(this._options.min || 0) / this._options.snapStep;\n const minOffset = TimelineUtils.sign(this._options.min || 1) * (minSteps - Math.floor(minSteps)) * this._options.snapStep;\n val = Math.round(minOffset) + Math.round(stepsFit * stops);\n }\n\n val = TimelineUtils.keepInBounds(val, this._options.min, this._options.max);\n return val;\n }\n\n /**\n * Convert mouse position to the timeline units considering all the scrolling and offsets.\n */\n _mousePosToVal = (x: number, snapEnabled = false): number => {\n const mousePos = Math.min(x, this._canvasClientWidth());\n let convertedVal = this._fromScreen(mousePos);\n convertedVal = Math.round(convertedVal);\n if (snapEnabled) {\n convertedVal = this.snapVal(convertedVal);\n }\n\n return convertedVal;\n };\n\n /**\n * Format line gauge text.\n * Default formatting is HMS\n * @param ms milliseconds to convert.\n * @param isSeconds whether seconds are passed.\n */\n _formatUnitsText = (ms: number): string => {\n const sign = TimelineUtils.sign(ms) < 0 ? '-' : '';\n ms = Math.abs(ms);\n // 1- Convert to seconds:\n let seconds = ms / 1000;\n\n const year = Math.floor(seconds / (365 * 86400));\n seconds = seconds % (365 * 86400);\n\n const days = Math.floor(seconds / 86400);\n seconds = seconds % 86400;\n\n // 2- Extract hours:\n const hours = Math.floor(seconds / 3600); // 3,600 seconds in 1 hour\n seconds = seconds % 3600; // seconds remaining after extracting hours\n // 3- Extract minutes:\n const minutes = Math.floor(seconds / 60); // 60 seconds in 1 minute\n // 4- Keep only seconds not extracted to minutes:\n seconds = seconds % 60;\n let str = '';\n if (year) {\n str += year + ':';\n }\n\n if (days) {\n str += days + ':';\n }\n\n if (hours) {\n str += hours + ':';\n }\n\n if (minutes) {\n str += hours ? TimelineUtils.timePadZero(minutes) : minutes + ':';\n }\n\n if (!isNaN(seconds)) {\n str += minutes ? TimelineUtils.timePadZero(seconds) : seconds;\n }\n\n return sign + str;\n };\n /**\n * Left padding of the timeline.\n */\n _leftMargin = (): number => {\n return this._options?.leftMargin || 0;\n };\n /**\n * Private.\n * Render line gauge ticks.\n */\n _renderTicks = (): void => {\n if (!this._ctx || !this._ctx.canvas || this._ctx.canvas.clientWidth <= 0 || this._ctx.canvas.clientHeight <= 0 || !this._options || !this._options.stepPx) {\n return;\n }\n const screenWidth = this._canvasClientWidth() - this._leftMargin();\n let from = this.pxToVal(this.scrollLeft);\n let to = this.pxToVal(this.scrollLeft + screenWidth);\n if (isNaN(from) || isNaN(to) || from === to) {\n return;\n }\n\n if (to < from) {\n const wasToVal = to;\n to = from;\n from = wasToVal;\n }\n\n const valDistance = TimelineUtils.getDistance(from, to);\n if (valDistance <= 0) {\n return;\n }\n\n // Find the nearest 'beautiful' step for a gauge.\n // 'beautiful' step. Ex: should be dividable by 1/2/5/10!\n const step = TimelineUtils.findGoodStep(valDistance / (screenWidth / this._options.stepPx), 0, this._options?.denominators);\n\n // Find beautiful start point:\n const fromVal = Math.floor(from / step) * step;\n\n // Find a beautiful end point:\n const toVal = Math.ceil(to / step) * step + step;\n\n if (!TimelineUtils.isNumber(step) || step <= 0 || Math.abs(toVal - fromVal) === 0) {\n return;\n }\n let smallStep = 0;\n if (this._options.stepSmallPx) {\n smallStep = TimelineUtils.findGoodStep(valDistance / (screenWidth / this._options.stepSmallPx), 0, this._options?.denominators);\n }\n\n let lastTextStart = 0;\n this._ctx.save();\n const headerHeight = TimelineStyleUtils.headerHeight(this._options);\n const tickHeight = headerHeight / 2;\n const smallTickHeight = headerHeight / 1.3;\n for (let i = fromVal; i <= toVal; i += step) {\n // local\n const sharpPos = this._getSharp(this._toScreenPx(i));\n this._ctx.save();\n this._ctx.beginPath();\n this._ctx.setLineDash([4]);\n this._ctx.lineWidth = 1;\n if (this._options.tickColor) {\n this._ctx.strokeStyle = this._options.tickColor;\n }\n TimelineUtils.drawLine(this._ctx, sharpPos, tickHeight, sharpPos, headerHeight);\n this._ctx.stroke();\n if (this._options.labelsColor) {\n this._ctx.fillStyle = this._options.labelsColor;\n }\n if (this._options.font) {\n this._ctx.font = this._options.font;\n }\n\n const text = this._formatUnitsText(i);\n const textSize = this._ctx.measureText(text);\n\n const textX = sharpPos - textSize.width / 2;\n // skip text render if there is no space for it.\n if (isNaN(lastTextStart) || lastTextStart <= textX) {\n lastTextStart = textX + textSize.width;\n this._ctx.fillText(text, textX, 10);\n }\n\n this._ctx.restore();\n if (!TimelineUtils.isNumber(smallStep) || smallStep <= 0) {\n continue;\n }\n // Draw small steps\n for (let x = i + smallStep; x < i + step; x += smallStep) {\n // local\n const nextSharpPos = this._getSharp(this._toScreenPx(x));\n this._ctx.beginPath();\n this._ctx.lineWidth = this._pixelRatio;\n if (this._options.tickColor) {\n this._ctx.strokeStyle = this._options.tickColor;\n }\n TimelineUtils.drawLine(this._ctx, nextSharpPos, smallTickHeight, nextSharpPos, headerHeight);\n this._ctx.stroke();\n }\n }\n\n this._ctx.restore();\n };\n\n /**\n * Private.\n * Calculate virtual view model.\n * Determine screen positions for the model elements given.\n */\n _generateViewModel = (): TimelineViewModel => {\n const toReturn = {\n size: {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n } as DOMRect,\n min: null,\n max: null,\n rowsViewModels: [],\n keyframesViewModels: [],\n } as TimelineViewModel;\n\n if (!this._model) {\n return toReturn;\n }\n const rows = this._model.rows;\n if (!rows || !Array.isArray(rows) || rows.length <= 0) {\n return toReturn;\n }\n let rowAbsoluteHeight = TimelineStyleUtils.headerHeight(this._options);\n rows.forEach((row, index) => {\n if (!row || row.hidden) {\n return;\n }\n\n // draw with scroll virtualization:\n const rowHeight = TimelineStyleUtils.getRowHeight(row.style || null, this._options);\n const marginBottom = TimelineStyleUtils.getRowMarginBottom(row.style || null, this._options);\n const currentRowY = rowAbsoluteHeight - (this._scrollContainer ? this._scrollContainer.scrollTop : 0);\n rowAbsoluteHeight += rowHeight + marginBottom;\n if (index == 0) {\n toReturn.size.y = currentRowY;\n }\n\n toReturn.size.height = Math.max(rowAbsoluteHeight + rowHeight, toReturn.size.height);\n const rowSize = { x: 0, y: currentRowY, width: this._canvasClientWidth(), height: rowHeight } as DOMRect;\n const rowViewModel = {\n size: rowSize,\n marginBottom: marginBottom,\n model: row,\n index: index,\n min: null,\n max: null,\n groupsViewModels: [],\n keyframesViewModels: [],\n } as TimelineRowViewModel;\n toReturn.rowsViewModels.push(rowViewModel);\n if (!row.keyframes || !row.keyframes.forEach || row.keyframes.length <= 0) {\n return;\n }\n\n // Get min and max ms to draw keyframe rows:\n if (row && row.keyframes) {\n row.keyframes.forEach((keyframe) => {\n if (!keyframe || !TimelineUtils.isNumber(keyframe.val)) {\n console.log('Unexpected null keyframe or having invalid value');\n return;\n }\n if (keyframe.hidden) {\n return;\n }\n let groupViewModel: TimelineGroupViewModel | null = rowViewModel.groupsViewModels?.find((p) => keyframe.group === p.groupModel) || null;\n if (!groupViewModel) {\n groupViewModel = {\n min: keyframe.val,\n max: keyframe.val,\n size: null,\n groupModel: keyframe.group,\n keyframesViewModels: [],\n } as TimelineGroupViewModel;\n // TimelineStyleUtils.groupFillColor(rowViewModel.model.style || null, this._options);\n rowViewModel.groupsViewModels.push(groupViewModel);\n }\n const keyframeShape = TimelineStyleUtils.keyframeShape(keyframe, keyframe.group, row.style || null, this._options);\n const keyframeSize = this._getKeyframePosition(keyframe, groupViewModel, rowViewModel, keyframeShape);\n const keyframeViewModel = {\n model: keyframe,\n rowViewModel: rowViewModel,\n groupViewModel: groupViewModel,\n size: keyframeSize,\n shape: keyframeShape,\n } as TimelineKeyframeViewModel;\n\n const min = groupViewModel.min === null ? keyframe.val : Math.min(keyframe.val, groupViewModel.min);\n const max = groupViewModel.max === null ? keyframe.val : Math.max(keyframe.val, groupViewModel.max);\n if (TimelineUtils.isNumber(min)) {\n groupViewModel.min = min;\n }\n if (TimelineUtils.isNumber(max)) {\n groupViewModel.max = max;\n }\n // All keyframes in the row\n rowViewModel.keyframesViewModels.push(keyframeViewModel);\n // All keyframes in the group\n groupViewModel.keyframesViewModels.push(keyframeViewModel);\n // All keyframes in the component\n toReturn.keyframesViewModels.push(keyframeViewModel);\n });\n }\n\n rowViewModel.groupsViewModels.forEach((groupViewModel) => {\n // Extend row min max bounds by a group bounds. It's used to notify needed visible bounds for the row.\n TimelineUtils.setMinMax(rowViewModel, groupViewModel, true);\n // get group screen coords\n const groupRect = this._getKeyframesGroupSize(groupViewModel, rowViewModel);\n groupViewModel.size = groupRect;\n });\n\n // Extend screen bounds by a current calculation:\n TimelineUtils.setMinMax(toReturn, rowViewModel, true);\n });\n if (TimelineUtils.isNumber(toReturn.max) && (toReturn.max || toReturn.max === 0)) {\n toReturn.size.width = this.valToPx(toReturn.max);\n }\n return toReturn;\n };\n\n /**\n * Render timeline rows.\n */\n _renderRows = (): void => {\n if (!this._ctx) {\n return;\n }\n const viewModel = this._generateViewModel();\n if (!viewModel?.rowsViewModels) {\n return;\n }\n try {\n this._ctx.save();\n\n viewModel.rowsViewModels.forEach((rowViewModel) => {\n if (!rowViewModel || !this._ctx) {\n return;\n }\n\n this._ctx.fillStyle = TimelineStyleUtils.getRowFillColor(rowViewModel.model.style || null, this._options);\n //this._ctx.fillRect(data.areaRect.x, data.areaRect.y, data.areaRect.w, data.areaRect.h);\n // Note: bounds used instead of the clip while clip is slow!\n const bounds = this._cutBounds(rowViewModel.size);\n if (bounds?.rect) {\n const rect = bounds?.rect;\n this._ctx.fillRect(rect.x, rect.y, rect.width, rect.height);\n }\n\n this._renderGroupBounds(rowViewModel);\n });\n } finally {\n this._ctx.restore();\n }\n };\n /**\n * Render group for the row.\n */\n _renderGroupBounds = (rowViewModel: TimelineRowViewModel): void => {\n if (!rowViewModel || !this._ctx) {\n return;\n }\n\n rowViewModel?.groupsViewModels?.forEach((groupsViewModels) => {\n if (!this._ctx) {\n return;\n }\n if ((groupsViewModels?.keyframesViewModels?.length || 0) <= 1) {\n return;\n }\n const groupFillColor = TimelineStyleUtils.groupFillColor(this._options, groupsViewModels.groupModel, rowViewModel?.model?.style);\n const groupTextColor = TimelineStyleUtils.groupTextColor(this._options, groupsViewModels.groupModel, rowViewModel?.model?.style);\n const groupLabel = TimelineStyleUtils.groupLabel(groupsViewModels.groupModel);\n const strokeColor = TimelineStyleUtils.groupStrokeColor(this._options, groupsViewModels.groupModel, rowViewModel?.model?.style);\n let groupStrokeThickness = TimelineStyleUtils.groupStrokeThickness(this._options, groupsViewModels.groupModel, rowViewModel?.model?.style);\n const groupsRadii = TimelineStyleUtils.groupsRadii(this._options, groupsViewModels.groupModel, rowViewModel?.model?.style);\n if (!groupsViewModels.size) {\n console.log('Size of the group cannot be calculated');\n return;\n }\n\n try {\n this._ctx.save();\n\n // get the bounds on a canvas\n const rectBounds = this._cutBounds(groupsViewModels.size);\n if (rectBounds?.rect) {\n const rect = rectBounds.rect;\n if (!strokeColor) {\n groupStrokeThickness = 0;\n }\n // Manipulate it again\n this._ctx.strokeStyle = groupStrokeThickness > 0 ? strokeColor : '';\n this._ctx.fillStyle = groupFillColor;\n this._ctx.lineWidth = groupStrokeThickness;\n // Different radii for each corner, top-left clockwise to bottom-left\n this._ctx.beginPath();\n this._ctx.roundRect(rect.x + groupStrokeThickness, rect.y + groupStrokeThickness, rect.width - groupStrokeThickness, rect.height - groupStrokeThickness, groupsRadii);\n this._ctx.fill();\n this._ctx.fillStyle = groupTextColor;\n this._ctx.font = \"bold\";\n this._ctx.fillText(groupLabel||'',rect.x + 8, rect.y + 12);\n if (groupStrokeThickness > 0) {\n this._ctx.stroke();\n }\n }\n } finally {\n this._ctx.restore();\n }\n });\n };\n /**\n * Method is used for the canvas drawing optimization.\n * Bounds are cut to draw only visible parts for the active canvas.\n */\n _cutBounds = (rect: DOMRect): TimelineCutBoundsRectResults | null => {\n if (!rect) {\n return null;\n }\n // default bounds: minX, maxX, minY, maxY\n const testOffset = 0;\n const minX = 0 + testOffset;\n const maxX = this._canvasClientWidth() - testOffset;\n const minY = TimelineStyleUtils.headerHeight(this._options) + testOffset;\n const maxY = this._canvasClientHeight() - testOffset;\n\n return this._cutBoundsWhenOverlap(rect, minX, maxX, minY, maxY);\n };\n _cutBoundsWhenOverlap = (rect: DOMRect, minX: number, maxX: number, minY: number, maxY: number): TimelineCutBoundsRectResults | null => {\n if (!rect) {\n return null;\n }\n\n if (\n // At the moment it's a check of top and left intersection.\n TimelineUtils.isRectIntersects(rect, {\n x: minX,\n y: minY,\n width: TimelineUtils.getDistance(minX, maxX),\n height: TimelineUtils.getDistance(minY, maxY),\n } as DOMRect)\n ) {\n const y = Math.max(rect.y, minY);\n const x = Math.max(rect.x, minX);\n const offsetW = rect.x - x;\n const offsetH = rect.y - y;\n\n return {\n rect: { height: rect.height + offsetH, width: rect.width + offsetW, x: x, y: y },\n overlapY: Math.abs(offsetH) > 0,\n overlapX: Math.abs(offsetW) > 0,\n } as TimelineCutBoundsRectResults;\n }\n return null;\n };\n /**\n * Calculate keyframe group screen rect size that is used during the rendering.\n * @param row\n * @param rowY row screen coords y position\n */\n _getKeyframesGroupSize = (groupViewModel: TimelineGroupViewModel, rowViewModel: TimelineRowViewModel): DOMRect => {\n const rowY = rowViewModel.size.y;\n const rowHeight = rowViewModel.size.height;\n const groupModel = groupViewModel.groupModel || null;\n let groupHeight = TimelineStyleUtils.groupHeight(this._options, groupModel, rowViewModel?.model?.style);\n\n let marginTop = TimelineStyleUtils.groupMarginTop(this._options, groupModel, rowViewModel?.model?.style);\n const isAutoHeight = groupHeight === 'auto';\n if (!groupHeight || isAutoHeight) {\n groupHeight = Math.floor(rowHeight);\n }\n groupHeight = typeof groupHeight === 'string' ? parseInt(groupHeight) : groupHeight;\n if (groupHeight > rowHeight) {\n groupHeight = rowHeight;\n }\n const isAutoMargin = marginTop === 'auto';\n if (typeof marginTop === 'string') {\n if (isAutoMargin) {\n marginTop = (rowHeight - groupHeight) / 2;\n } else {\n marginTop = parseInt(marginTop) || 0;\n }\n }\n\n if (!isAutoMargin) {\n if (isAutoHeight) {\n groupHeight -= marginTop * 2;\n }\n }\n\n // draw keyframes rows.\n const xMin = this._toScreenPx(groupViewModel.min); // local\n const xMax = this._toScreenPx(groupViewModel.max); // local\n\n return {\n x: xMin,\n y: rowY + marginTop,\n height: groupHeight,\n width: TimelineUtils.getDistance(xMin, xMax),\n } as DOMRect;\n };\n\n _getKeyframePosition = (keyframe: TimelineKeyframe, groupViewModel: TimelineGroupViewModel, rowViewModel: TimelineRowViewModel, keyframeShape: TimelineKeyframeShape): DOMRect | null => {\n if (!keyframe) {\n console.log('keyframe should be defined.');\n return null;\n }\n\n const val = keyframe.val;\n if (!TimelineUtils.isNumber(val)) {\n return null;\n }\n\n const rowSize = rowViewModel.size;\n // get center of the lane:\n let y = rowSize.y + rowSize.height / 2;\n const groupModel = groupViewModel?.groupModel || null;\n let height: number | string = TimelineStyleUtils.keyframeHeight(keyframe, groupModel, rowViewModel?.model?.style, this._options);\n let width: number | string = TimelineStyleUtils.keyframeWidth(keyframe, groupModel, rowViewModel?.model?.style, this._options);\n\n if (height === 'auto') {\n height = rowSize.height / 3;\n }\n if (width === 'auto') {\n width = height;\n }\n height = Number(height);\n if (!Number.isNaN(height) && height && (height as number) > 0) {\n const x = Math.floor(this._toScreenPx(val));\n y = Math.floor(y);\n const rect = {\n x: x, // local\n y: y,\n height: height,\n width: width,\n } as DOMRect;\n // Rect we are drawing in the center\n if (keyframeShape === TimelineKeyframeShape.Rect) {\n rect.y = rect.y - rect.height / 2;\n rect.x = rect.x - rect.width / 2;\n }\n return rect;\n }\n\n return null;\n };\n\n _renderKeyframes = (): void => {\n this._forEachKeyframe((keyframeViewModel) => {\n if (!this._ctx) {\n return;\n }\n const size = keyframeViewModel.size;\n\n if (size) {\n const x = this._getSharp(size.x);\n const y = size.y;\n const bounds = this._cutBounds({\n x: x - size.width / 2,\n y: y - size.height / 2,\n width: size.width,\n height: size.height,\n } as DOMRect);\n if (!bounds) {\n return;\n }\n\n this._ctx.save();\n\n try {\n // Performance FIX: use clip only when we are in the collision! Clip is slow!\n // Other keyframes should be hidden by bounds check.\n // Note: clip with just render part of the keyframe\n if (bounds && bounds.overlapY) {\n this._ctx.beginPath();\n this._ctx.rect(0, TimelineStyleUtils.headerHeight(this._options), this._canvasClientWidth(), this._canvasClientWidth());\n this._ctx.clip();\n }\n\n this._renderKeyframe(this._ctx, keyframeViewModel);\n } finally {\n this._ctx.restore();\n }\n }\n });\n };\n\n _renderKeyframe = (ctx: CanvasRenderingContext2D, keyframeViewModel: TimelineKeyframeViewModel): void => {\n const shape = keyframeViewModel.shape;\n if (shape === TimelineKeyframeShape.None) {\n return;\n }\n const size = keyframeViewModel.size;\n const x = this._getSharp(size.x);\n const y = size.y;\n\n const keyframe = keyframeViewModel.model;\n const row = keyframeViewModel.rowViewModel.model;\n const rowStyle = row.style || null;\n const groupModel = keyframeViewModel?.groupViewModel?.groupModel || null;\n const keyframeColor = keyframe.selected\n ? TimelineStyleUtils.keyframeSelectedFillColor(keyframe, groupModel, rowStyle, this._options)\n : TimelineStyleUtils.keyframeFillColor(keyframe, groupModel, rowStyle, this._options);\n const border = TimelineStyleUtils.keyframeStrokeThickness(keyframe, groupModel, rowStyle, this._options);\n let strokeColor = '';\n if (border > 0) {\n if (keyframe.selected) {\n strokeColor = TimelineStyleUtils.keyframeSelectedStrokeColor(keyframe, groupModel, rowStyle, this._options);\n } else {\n strokeColor = TimelineStyleUtils.keyframeStrokeColor(keyframe, groupModel, rowStyle, this._options);\n }\n }\n\n if (shape == TimelineKeyframeShape.Rhomb) {\n ctx.beginPath();\n ctx.translate(x, y);\n ctx.rotate((45 * Math.PI) / 180);\n if (border > 0 && strokeColor) {\n ctx.fillStyle = strokeColor;\n ctx.rect(-size.width / 2, -size.height / 2, size.width, size.height);\n ctx.fill();\n }\n\n ctx.fillStyle = keyframeColor;\n // draw main keyframe data with offset.\n ctx.translate(border, border);\n ctx.rect(-size.width / 2, -size.height / 2, size.width - border * 2, size.height - border * 2);\n ctx.fill();\n } else if (shape == TimelineKeyframeShape.Circle) {\n ctx.beginPath();\n if (border > 0 && strokeColor) {\n ctx.fillStyle = strokeColor;\n ctx.arc(x, y, size.height, 0, 2 * Math.PI);\n }\n ctx.fillStyle = keyframeColor;\n ctx.arc(x, y, size.height - border, 0, 2 * Math.PI);\n ctx.fill();\n } else if (shape == TimelineKeyframeShape.Rect) {\n ctx.beginPath();\n\n if (border > 0 && strokeColor) {\n ctx.fillStyle = strokeColor;\n ctx.rect(x, y, size.width, size.height);\n ctx.fill();\n }\n\n ctx.fillStyle = keyframeColor;\n ctx.rect(x + border, y + border, size.width - border, size.height - border);\n ctx.fill();\n }\n };\n\n _renderSelectionRect = (): void => {\n if (this._drag || !this._ctx || !this._canvas) {\n return;\n }\n this._ctx.save();\n const thickness = 1;\n if (this._selectionRect && this._selectionRectEnabled) {\n this._ctx.setLineDash([4]);\n this._ctx.lineWidth = this._pixelRatio;\n const selectionColor = this._options.selectionColor;\n if (selectionColor) {\n this._ctx.strokeStyle = selectionColor;\n }\n this._ctx.strokeRect(\n this._getSharp(this._selectionRect.x, thickness),\n this._getSharp(this._selectionRect.y, thickness),\n Math.floor(this._selectionRect.width),\n Math.floor(this._selectionRect.height),\n );\n }\n this._ctx.restore();\n };\n\n _renderBackground = (): void => {\n if (!this._ctx || !this._canvas) {\n return;\n }\n if (this._options.fillColor) {\n this._ctx.save();\n this._ctx.beginPath();\n this._ctx.rect(0, 0, this._canvasClientWidth(), this._canvasClientHeight());\n this._ctx.fillStyle = this._options.fillColor;\n this._ctx.fill();\n this._ctx.restore();\n } else {\n // Clear if bg not set.\n this._ctx.clearRect(0, 0, this._canvas.width, this._canvas.height);\n }\n };\n\n _renderTimeline = (): void => {\n if (!this._ctx || !this._options || !this._options.timelineStyle) {\n return;\n }\n const style = this._options.timelineStyle;\n this._ctx.save();\n try {\n const thickness = style.width || 1;\n this._ctx.lineWidth = thickness * this._pixelRatio;\n const timeLinePos = this._getSharp(this._toScreenPx(this._val), thickness);\n if (style.strokeColor) {\n this._ctx.strokeStyle = style.strokeColor;\n }\n if (style.fillColor) {\n this._ctx.fillStyle = style.fillColor;\n }\n const y = style.marginTop || 0;\n const yBottom = style.marginBottom || 0;\n this._ctx.beginPath();\n const canvasHeight = this._canvasClientHeight() - yBottom;\n TimelineUtils.drawLine(this._ctx, timeLinePos, y, timeLinePos, canvasHeight);\n this._ctx.stroke();\n this._renderTimelineCap(timeLinePos, y);\n } finally {\n this._ctx.restore();\n }\n };\n /**\n * Render timeline cap top.\n */\n _renderTimelineCap = (timeLinePos: number, y: number): void => {\n const capStyle = this._options?.timelineStyle?.capStyle;\n if (!this._ctx || !capStyle) {\n return;\n }\n if (capStyle.capType === TimelineCapShape.None) {\n return;\n }\n this._ctx.save();\n try {\n const capSize = capStyle.width || 0;\n const capHeight = capStyle.height || 0;\n if (capSize && capHeight) {\n this._ctx.strokeStyle = capStyle.strokeColor || '';\n this._ctx.fillStyle = capStyle.fillColor || 'white';\n if (capStyle.capType === TimelineCapShape.Triangle) {\n this._ctx.beginPath();\n this._ctx.moveTo(timeLinePos - capSize / 2, y);\n this._ctx.lineTo(timeLinePos + capSize / 2, y);\n this._ctx.lineTo(timeLinePos, capHeight);\n this._ctx.closePath();\n this._ctx.stroke();\n } else if (capStyle.capType === TimelineCapShape.Rect) {\n this._ctx.fillRect(timeLinePos - capSize / 2, y, capSize, capHeight);\n this._ctx.fill();\n }\n }\n } finally {\n this._ctx.restore();\n }\n };\n _renderHeaderBackground = (): void => {\n if (!this._ctx || !this._options) {\n return;\n }\n if (TimelineStyleUtils.headerHeight(this._options)) {\n this._ctx.save();\n // draw ticks background\n this._ctx.lineWidth = this._pixelRatio;\n if (this._options.headerFillColor) {\n // draw ticks background\n this._ctx.lineWidth = this._pixelRatio;\n // draw header background\n this._ctx.fillStyle = this._options.headerFillColor;\n this._ctx.fillRect(0, 0, this._canvasClientWidth(), TimelineStyleUtils.headerHeight(this._options));\n } else {\n this._ctx.clearRect(0, 0, this._canvasClientWidth(), TimelineStyleUtils.headerHeight(this._options));\n }\n this._ctx.restore();\n }\n };\n\n redraw = (): void => {\n if (window?.requestAnimationFrame) {\n window.requestAnimationFrame(this._redrawInternal);\n } else {\n this._redrawInternal();\n }\n };\n\n /**\n * perform scroll to max right.\n */\n public scrollToRightBounds = (): void => {\n if (this._scrollContainer && this._scrollContainer.scrollLeft !== this._scrollContainer.scrollWidth) {\n this.scrollLeft = this._scrollContainer.scrollWidth;\n }\n };\n\n /**\n * Redraw parts of the component in the specific order.\n */\n _redrawInternal = (): void => {\n if (!this._ctx || !this._scrollContainer) {\n console.log('Context is not initialized');\n return;\n }\n // Rescale when animation is played out of the bounds.\n if (this.valToPx(this._val) > this._scrollContainer.scrollWidth) {\n this.rescale();\n if (!this._isPanStarted && this._drag && this._drag.type !== TimelineElementType.Timeline) {\n this.scrollToRightBounds();\n }\n }\n\n this._renderBackground();\n this._renderRows();\n // Render after rows\n this._renderHeaderBackground();\n this._renderTicks();\n this._renderKeyframes();\n this._renderSelectionRect();\n this._renderTimeline();\n };\n\n /**\n * Find sharp pixel position\n */\n _getSharp = (pos: number, thickness = 1): number => {\n pos = Math.round(pos);\n if (thickness % 2 == 0) {\n return pos;\n }\n\n return pos + this._pixelRatio / 2;\n };\n\n /**\n * Get current time:\n */\n public getTime = (): number => {\n return this._val;\n };\n\n /**\n * Set current time internal\n * @param val value.\n * @param source event source.\n */\n _setTimeInternal = (val: number, source: TimelineEventSource = TimelineEventSource.Programmatically): boolean => {\n if (!this._options) {\n return false;\n }\n val = Math.round(val);\n val = TimelineUtils.keepInBounds(val, this._options.min);\n if (this._val != val) {\n const prevVal = this._val;\n const timelineEvent = new TimelineTimeChangedEvent();\n timelineEvent.val = val;\n timelineEvent.prevVal = prevVal;\n timelineEvent.source = source;\n this._val = val;\n this.emit(TimelineEvents.TimeChanged, timelineEvent);\n if (timelineEvent.isPrevented()) {\n this._val = prevVal;\n return false;\n }\n return true;\n }\n\n return false;\n };\n public setTime = (val: number): boolean => {\n // don't allow to change time during drag:\n if (this._drag && this._drag.type === TimelineElementType.Timeline) {\n return false;\n }\n\n const isChanged = this._setTimeInternal(val, TimelineEventSource.SetTimeMethod);\n if (isChanged) {\n this.rescale();\n this.redraw();\n }\n\n return isChanged;\n };\n\n public getOptions = (): TimelineOptions => {\n return this._options;\n };\n\n /**\n * Current scroll left position.\n */\n public get scrollLeft(): number {\n return this._scrollContainer?.scrollLeft || 0;\n }\n public set scrollLeft(value: number) {\n if (this._scrollContainer && this._scrollContainer.scrollLeft !== value) {\n this._scrollProgrammatically = true;\n this._scrollContainer.scrollLeft = value;\n }\n }\n public get scrollTop(): number {\n return this._scrollContainer?.scrollTop || 0;\n }\n\n public set scrollTop(value: number) {\n if (this._scrollContainer && this._scrollContainer.scrollTop !== value) {\n this._scrollProgrammatically = true;\n this._scrollContainer.scrollTop = value;\n }\n }\n\n /**\n * Set options and render the component.\n * Note: Options will be merged\\appended with the defaults and component will be invalidated/rendered again.\n */\n public setOptions = (toSet: TimelineOptions): TimelineOptions => {\n this._options = this._setOptions(toSet);\n this.rescale();\n this.redraw();\n // Merged options:\n return this._options;\n };\n\n /**\n * Private. Apply html container styles from options if any is set.\n */\n _applyContainersStyles = (): void => {\n if (this._scrollContainer && this._options) {\n const classList = this._scrollContainer.classList;\n if (this._options.scrollContainerClass && !classList.contains(this._options.scrollContainerClass)) {\n classList.add(this._options.scrollContainerClass);\n }\n if (this._options.fillColor) {\n this._scrollContainer.style.background = this._options.fillColor;\n }\n }\n };\n _setOptions = (toSet: TimelineOptions): TimelineOptions => {\n if (!toSet) {\n return this._options || {};\n }\n this._options = TimelineUtils.mergeOptions(this._options, toSet);\n // Normalize and validate spans per value.\n this._options.snapStep = TimelineUtils.keepInBounds(this._options.snapStep || 0, 0, this._options.stepVal || 0);\n this._currentZoom = this._setZoom(this._options.zoom || 0, this._options.zoomMin, this._options.zoomMax);\n this._options.min = TimelineUtils.isNumber(this._options.min) ? this._options.min : 0;\n this._options.max = TimelineUtils.isNumber(this._options.max) ? this._options.max : Number.MAX_VALUE;\n this._applyContainersStyles();\n // Prevent current active dragging of the timeline, while it's set that it's not allowed anymore.\n if (toSet.timelineDraggable === false) {\n if (this._drag && this._drag.type === TimelineElementType.Timeline) {\n this._cleanUpSelection();\n }\n }\n return this._options;\n };\n\n /**\n * Get current model.\n */\n public getModel = (): TimelineModel | null => {\n return this._model;\n };\n\n /**\n * Set model and redraw application.\n * @param data\n */\n public setModel = (data: TimelineModel): void => {\n this._model = data;\n this.rescale();\n this.redraw();\n };\n\n _getMousePos = (canvas: HTMLCanvasElement, e: TouchEvent | MouseEvent | any): TimelineMouseData => {\n let radius = 1;\n let clientX = 0;\n let clientY = 0;\n if (e.changedTouches && e.changedTouches.length > 0) {\n // TODO: implement better touch support\n const touch = e.changedTouches[0];\n clientX = touch.clientX;\n clientY = touch.clientY;\n radius = Math.max(radius, touch.radiusX, touch.radiusY);\n } else {\n clientX = e.clientX;\n clientY = e.clientY;\n }\n\n const rect = canvas.getBoundingClientRect(), // abs. size of element\n scaleX = canvas.width / this._pixelRatio / rect.width, // relationship bitmap vs. element for X\n scaleY = canvas.height / this._pixelRatio / rect.height; // relationship bitmap vs. element for Y\n\n const x = (clientX - rect.left) * scaleX;\n const y = (clientY - rect.top) * scaleY;\n // scale mouse coordinates after they have been adjusted to be relative to element\n return {\n pos: { x, y } as DOMPoint,\n radius,\n args: e,\n } as TimelineMouseData;\n };\n\n /**\n * Apply container div size to the container on changes detected.\n */\n _updateCanvasScale = (): boolean => {\n if (!this._scrollContainer || !this._container || !this._ctx) {\n console.log('Component should be initialized first.');\n return false;\n }\n let changed = false;\n const width = this._scrollContainer.clientWidth * this._pixelRatio;\n const height = this._scrollContainer.clientHeight * this._pixelRatio;\n if (Math.floor(width) != Math.floor(this._ctx.canvas.width)) {\n this._ctx.canvas.width = width;\n changed = true;\n }\n\n if (Math.floor(height) != Math.floor(this._ctx.canvas.height)) {\n this._ctx.canvas.height = height;\n changed = true;\n }\n\n if (changed) {\n this._ctx.setTransform(this._pixelRatio, 0, 0, this._pixelRatio, 0, 0);\n }\n return changed;\n };\n\n /**\n * Rescale and update size of the container.\n */\n public rescale = (): boolean => {\n return this._rescaleInternal();\n };\n\n /**\n * This method is used to draw additional space when after there are no keyframes.\n * When scrolled we should allow to indefinitely scroll right, so space should be extended to drag keyframes outside of the current size bounds.\n */\n _rescaleInternal = (newWidth: number | null = null, newHeight: number | null = null, scrollMode = TimelineScrollSource.DefaultMode): boolean => {\n let changed = this._updateCanvasScale();\n if (!this._scrollContent) {\n return changed;\n }\n const data = this._generateViewModel();\n if (data && data.size) {\n const additionalOffset = this._options.stepPx || 0;\n newWidth = newWidth || 0;\n // content should be not less than current timeline position + width of the timeline\n const timelineGlobalPos = this.valToPx(this._val) + this._leftMargin();\n let timelinePos = 0;\n const rightPosition = this.scrollLeft + this.getClientWidth();\n\n if (timelineGlobalPos >= rightPosition) {\n if (scrollMode == TimelineScrollSource.ScrollBySelection) {\n // When item (timeline, selection rectangle) is just dragged to the right corner.\n timelinePos = Math.floor(timelineGlobalPos + this._leftMargin());\n } else {\n // When timeline is playing and we need to add next screen (when timeline goes out of the bounds.)\n timelinePos = Math.floor(timelineGlobalPos + this.getClientWidth() + this._leftMargin());\n }\n }\n const keyframeW = data.size.width + this._leftMargin() + additionalOffset;\n\n newWidth = Math.max(\n // New expected component width.\n newWidth,\n // keyframes max width\n keyframeW,\n // not less than current scroll position\n rightPosition,\n timelinePos,\n );\n\n const minWidthPx = Math.floor(newWidth) + 'px';\n if (minWidthPx != this._scrollContent.style.minWidth) {\n this._scrollContent.style.minWidth = minWidthPx;\n changed = true;\n }\n\n newHeight = Math.max(\n // active size\n Math.floor(data.size.height + this._canvasClientHeight() * 0.2),\n (this._scrollContainer?.scrollTop || 0) + this._canvasClientHeight() - 1,\n Math.round(newHeight || 0),\n );\n\n const h = Math.floor(newHeight) + 'px';\n if (this._scrollContent.style.minHeight != h) {\n this._scrollContent.style.minHeight = h;\n return changed;\n }\n }\n return changed;\n };\n\n /**\n * Filter elements that can be dragged.\n * Filtration is done based on the timeline styles and options.\n */\n _filterDraggableElements = (elements: TimelineElement[]): TimelineElement[] => {\n // filter and sort: Timeline, individual keyframes, groups (distance).\n const filteredElements = elements.filter((element) => {\n if (!element) {\n return false;\n }\n if (element.type === TimelineElementType.Keyframe) {\n if (!TimelineStyleUtils.keyframeDraggable(element.keyframe || null, element.keyframe?.group || null, element?.row || null, this._options)) {\n return false;\n }\n } else if (element.type === TimelineElementType.Group) {\n if (!TimelineStyleUtils.groupDraggable(element.group || null, element.row || null, this._options)) {\n return false;\n }\n } else if (element.type === TimelineElementType.Timeline) {\n if (this._options?.timelineDraggable === false) {\n return false;\n }\n } else if (element.type === TimelineElementType.Row) {\n return false;\n }\n return true;\n });\n return filteredElements;\n };\n /**\n * Filter and sort draggable elements by the priority to get first draggable element closest to the passed value.\n */\n _findDraggableElement = (elements: TimelineElement[], val: number | null = null): TimelineElement | null => {\n // filter and sort: Timeline, individual keyframes, groups (distance).\n const getPriority = (type: TimelineElementType): number => {\n if (type === TimelineElementType.Timeline) {\n return 1;\n } else if (type === TimelineElementType.Keyframe) {\n return 2;\n } else if (type === TimelineElementType.Group) {\n return 3;\n }\n return -1;\n };\n\n const sortDraggable = (a: TimelineElement, b: TimelineElement): number => {\n let prioA = getPriority(a.type);\n let prioB = getPriority(b.type);\n if (prioA === prioB) {\n if (val === null) {\n return 0;\n }\n\n // Sort by distance\n prioA = TimelineUtils.getDistance(a.val, val);\n prioB = TimelineUtils.getDistance(b.val, val);\n if (prioA === prioB) {\n return 0;\n }\n return prioA < prioB ? 1 : -1;\n }\n\n return prioA < prioB ? 1 : -1;\n };\n const sorted = this._filterDraggableElements(elements).sort(sortDraggable);\n if (sorted.length > 0) {\n return sorted[sorted.length - 1];\n }\n\n return null;\n };\n /**\n * get all clickable elements by the given local screen coordinate.\n */\n public elementFromPoint = (pos: DOMPoint, clickRadius: number, onlyTypes?: TimelineElementType[] | null): TimelineElement[] => {\n clickRadius = Math.max(clickRadius, 1);\n const toReturn: TimelineElement[] = [];\n\n if (!pos) {\n return toReturn;\n }\n\n const headerHeight = TimelineStyleUtils.headerHeight(this._options);\n // Check whether we can drag timeline.\n const timeLinePos = this._toScreenPx(this._val);\n let width = 0;\n const timelineStyle = this._options?.timelineStyle;\n if (timelineStyle) {\n width = Math.max((timelineStyle.width || 1) * this._pixelRatio, (timelineStyle?.capStyle?.width || 0) * this._pixelRatio || 1) + clickRadius;\n }\n // Allow to select timeline only by half of a header to allow select by a selector top most keyframes row.\n if (pos.y <= headerHeight * 0.5 || (pos.x >= timeLinePos - width / 2 && pos.x <= timeLinePos + width / 2)) {\n toReturn.push({\n val: this._val,\n type: TimelineElementType.Timeline,\n } as TimelineElement);\n }\n const snap = this._options.snapEnabled;\n if (pos.y >= headerHeight && this._options.keyframesDraggable) {\n this._forEachKeyframe(\n (keyframeViewModel, _, isNextRow): void => {\n const rowViewModel = keyframeViewModel.rowViewModel;\n // Check keyframes group overlap\n if (isNextRow) {\n if (rowViewModel.groupsViewModels) {\n rowViewModel.groupsViewModels.forEach((groupViewModel) => {\n if (!groupViewModel?.size) {\n return;\n }\n const keyframesGroupOverlapped = TimelineUtils.isOverlap(pos.x, pos.y, groupViewModel.size);\n if (keyframesGroupOverlapped) {\n const keyframesModels = groupViewModel?.keyframesViewModels.map((p) => p.model) || [];\n const groupElement = {\n // TODO:\n val: this._mousePosToVal(pos.x, snap),\n type: TimelineElementType.Group,\n group: groupViewModel.groupModel,\n row: rowViewModel.model,\n keyframes: keyframesModels,\n } as TimelineElement;\n\n const snapped = this.snapVal(groupViewModel.min);\n // get snapped mouse pos based on a min value.\n groupElement.val += groupViewModel.min - snapped;\n toReturn.push(groupElement);\n }\n });\n }\n }\n\n const keyframePosRect = keyframeViewModel.size;\n if (keyframePosRect) {\n let isMouseOver = false;\n if (keyframeViewModel.shape === TimelineKeyframeShape.Rect) {\n const extendedMouseRect = TimelineUtils.shrinkSelf({ x: pos.x, y: pos.y, height: clickRadius, width: clickRadius } as DOMRect, clickRadius);\n isMouseOver = TimelineUtils.isRectIntersects(extendedMouseRect, keyframePosRect, true);\n } else {\n const dist = TimelineUtils.getDistance(keyframePosRect.x, keyframePosRect.y, pos.x, pos.y);\n isMouseOver = dist <= keyframePosRect.height + clickRadius;\n }\n if (isMouseOver) {\n toReturn.push({\n keyframe: keyframeViewModel.model,\n keyframes: [keyframeViewModel.model],\n val: keyframeViewModel.model.val,\n row: keyframeViewModel.rowViewModel.model,\n type: TimelineElementType.Keyframe,\n } as TimelineElement);\n }\n }\n },\n (rowViewModel) => {\n const rowOverlapped = TimelineUtils.isOverlap(pos.x, pos.y, rowViewModel.size);\n if (rowOverlapped) {\n const row = {\n val: this._mousePosToVal(pos.x, snap),\n keyframes: rowViewModel.model.keyframes,\n type: TimelineElementType.Row,\n row: rowViewModel.model,\n } as TimelineElement;\n toReturn.push(row);\n }\n },\n );\n }\n\n if (!onlyTypes || onlyTypes.length === 0) {\n return toReturn;\n } else {\n return toReturn.filter((p) => onlyTypes && onlyTypes.includes(p.type));\n }\n };\n\n /**\n * Subscribe user callback on time changed.\n */\n public onTimeChanged = (callback: (eventArgs: TimelineTimeChangedEvent) => void): void => {\n this.on(TimelineEvents.TimeChanged, callback);\n };\n /**\n * Subscribe user callback on drag started event.\n */\n public onDragStarted = (callback: (eventArgs: TimelineDragEvent) => void): void => {\n this.on(TimelineEvents.DragStarted, callback);\n };\n /**\n * Subscribe user callback on drag event.\n */\n public onDrag = (callback: (eventArgs: TimelineDragEvent) => void): void => {\n this.on(TimelineEvents.Drag, callback);\n };\n /**\n * Subscribe user callback on drag finished event.\n */\n public onDragFinished = (callback: (eventArgs: TimelineDragEvent) => void): void => {\n this.on(TimelineEvents.DragFinished, callback);\n };\n /**\n * Subscribe user callback on double click.\n */\n public onDoubleClick = (callback: (eventArgs: TimelineClickEvent) => void): void => {\n this.on(TimelineEvents.DoubleClick, callback);\n };\n /**\n * Subscribe user callback on keyframe changed event.\n */\n public onKeyframeChanged = (callback: (eventArgs: TimelineKeyframeChangedEvent) => void): void => {\n this.on(TimelineEvents.KeyframeChanged, callback);\n };\n /**\n * Subscribe user callback on drag finished event.\n */\n public onMouseDown = (callback: (eventArgs: TimelineClickEvent) => void): void => {\n this.on(TimelineEvents.MouseDown, callback);\n };\n\n /**\n * Subscribe user callback on selected.\n */\n public onSelected = (callback: (eventArgs: TimelineSelectedEvent) => void): void => {\n this.on(TimelineEvents.Selected, callback);\n };\n /**\n * Subscribe user callback on scroll event\n */\n public onScroll = (callback: (eventArgs: TimelineScrollEvent) => void): void => {\n this.on(TimelineEvents.Scroll, callback);\n };\n /**\n * Subscribe on scroll finished event.\n */\n public onScrollFinished = (callback: (eventArgs: TimelineScrollEvent) => void): void => {\n this.on(TimelineEvents.ScrollFinished, callback);\n };\n /**\n * Subscribe on canvas context menu event.\n */\n public onContextMenu = (callback: (eventArgs: TimelineClickEvent) => void): void => {\n this.on(TimelineEvents.ContextMenu, callback);\n };\n\n /**\n * Private.\n * Emit internally scroll eve\n */\n _emitScrollEvent = (args: Event | null, scrollProgrammatically: boolean, eventType = TimelineEvents.Scroll): TimelineScrollEvent => {\n const scrollEvent = {\n args: args,\n scrollProgrammatically: scrollProgrammatically,\n scrollLeft: this.scrollLeft,\n scrollTop: this.scrollTop,\n scrollHeight: this._scrollContainer?.scrollHeight || 0,\n scrollWidth: this._scrollContainer?.scrollWidth || 0,\n } as TimelineScrollEvent;\n super.emit(eventType, scrollEvent);\n return scrollEvent;\n };\n _emitKeyframeChanged = (element: TimelineElementDragState, source: TimelineEventSource = TimelineEventSource.Programmatically): TimelineKeyframeChangedEvent => {\n const args = new TimelineKeyframeChangedEvent();\n args.val = element.val;\n args.prevVal = element.prevVal;\n args.target = element;\n args.source = source;\n this.emit(TimelineEvents.KeyframeChanged, args);\n return args;\n };\n _emitDragStartedEvent = (dragState: TimelineDraggableData): TimelineDragEvent | null => {\n if (!dragState) {\n return null;\n }\n const args = this._getDragEventArgs(dragState, this._currentPos);\n this.emit(TimelineEvents.DragStarted, args);\n if (args.isPrevented()) {\n this._preventDrag(args, dragState, true);\n }\n return args;\n };\n /**\n * Private emit timeline event that dragging element is finished.\n * @param forcePrevent - needed when during dragging components set to the state when they cannot be dragged anymore. (used only as recovery state).\n * @returns\n */\n _emitDragFinishedEvent = (dragState: TimelineDraggableData, forcePrevent = false): TimelineDragEvent | null => {\n if (!dragState || !dragState.changed) {\n return null;\n }\n const args = this._getDragEventArgs(dragState, this._currentPos);\n if (forcePrevent) {\n args.preventDefault();\n }\n this.emit(TimelineEvents.DragFinished, args);\n if (args.isPrevented()) {\n this._preventDrag(args, dragState, true);\n }\n return args;\n };\n _preventDrag = (dragArgs: TimelineDragEvent, data: TimelineDraggableData, toStart = false): void => {\n if (dragArgs.elements) {\n dragArgs.elements.forEach((element) => {\n const toSet = toStart ? element.startedVal : element.prevVal;\n this._setKeyframePos(element, toSet);\n });\n }\n data.val = data.prevVal;\n // Set prev active point\n dragArgs.point = dragArgs.prevPoint;\n };\n _emitDragEvent = (dragState: TimelineDraggableData): TimelineDragEvent | null => {\n if (!dragState) {\n return null;\n }\n const args = this._getDragEventArgs(dragState, this._currentPos);\n this.emit(TimelineEvents.Drag, args);\n if (args.isPrevented()) {\n this._preventDrag(args, dragState, false);\n }\n return args;\n };\n _emitKeyframesSelected = (state: TimelineSelectionResults): TimelineSelectedEvent => {\n const args = new TimelineSelectedEvent();\n args.selected = state.selected;\n args.changed = state.changed;\n this.emit(TimelineEvents.Selected, args);\n return args;\n };\n _getDragEventArgs = (dragState: TimelineDraggableData, point: TimelineMouseData | null): TimelineDragEvent => {\n const draggableArguments = new TimelineDragEvent();\n draggableArguments.point = point;\n // Get cloned list\n draggableArguments.elements = [...(dragState.elements || [])];\n draggableArguments.target = dragState?.target || null;\n return draggableArguments;\n };\n}\n","// bundle entry point\n\nexport * from './timeline';\nexport * from './timelineEventsEmitter';\nexport * from './settings/timelineConsts';\n// @ public timeline models.\nexport * from './models/timelineRanged';\nexport * from './models/timelineModel';\nexport * from './models/timelineRow';\nexport * from './models/timelineKeyframe';\n\n// @public styles\nexport * from './settings/timelineOptions';\nexport * from './settings/styles/timelineKeyframeStyle';\nexport * from './settings/styles/timelineRowStyle';\nexport * from './settings/styles/timelineStyle';\nexport * from './settings/styles/timelineGroupStyle';\n\nexport * from './utils/timelineStyleUtils';\nexport * from './utils/timelineUtils';\nexport * from './utils/timelineElement';\n\n// @private helper containers.\nexport * from './utils/timelineSelectable';\nexport * from './utils/timelineCutBoundsRectResults';\nexport * from './utils/timelineSelectionResults';\nexport * from './utils/timelinePoint';\nexport * from './utils/timelineMouseData';\nexport * from './utils/timelineElementDragState';\nexport * from './utils/timelineDraggableData';\n\n// @private virtual model\nexport * from './viewModels/timelineGroupViewModel';\nexport * from './viewModels/timelineKeyframeViewModel';\nexport * from './viewModels/timelineRowViewModel';\nexport * from './viewModels/timelineViewModel';\n\n// @public events\nexport * from './utils/events/timelineKeyframeChangedEvent';\nexport * from './utils/events/timelineTimeChangedEvent';\nexport * from './utils/events/timelineSelectedEvent';\nexport * from './utils/events/timelineScrollEvent';\nexport * from './utils/events/timelineClickEvent';\nexport * from './utils/events/timelineDragEvent';\n\n// @public enums\nexport * from './enums/timelineKeyframeShape';\nexport * from './enums/timelineInteractionMode';\nexport * from './enums/timelineScrollSource';\nexport * from './enums/timelineElementType';\nexport * from './enums/timelineCursorType';\nexport * from './enums/timelineCapShape';\nexport * from './enums/timelineEventSource';\nexport * from './enums/timelineSelectionMode';\nexport * from './enums/timelineEvents';\n// @private defaults are exposed:\nexport * from './settings/defaults/defaultTimelineStyle';\nexport * from './settings/defaults/defaultTimelineRowStyle';\nexport * from './settings/defaults/defaultTimelineOptions';\nexport * from './settings/defaults/defaultTimelineKeyframeStyle';\nexport * from './settings/defaults/defaultTimelineConsts';\nexport * from './settings/defaults/defaultGroupStyle';\n"],"names":["TimelineEventsEmitter","_classCallCheck","_defineProperty","_createClass","key","value","on","topic","callback","_subscriptions","push","off","before","length","filter","event","offAll","emit","args","forEach","TimelineKeyframeShape","defaultDenominators","TimelineUtils","drawLine","ctx","x1","y1","x2","y2","moveTo","lineTo","isNumber","val","isNaN","Number","isFinite","deleteElement","array","element","index","indexOf","splice","isOverlap","x","y","rectangle","width","height","findGoodStep","originalStep","divisionCheck","arguments","undefined","denominators","step","lastDistance","pow","getPowArgument","i","denominator","calculatedStep","Math","distance","getDistance","keepInBounds","min","max","setMinMax","to","from","shrink","fromMin","NaN","toMin","isFromMinNumber","isToMinNumber","fromMax","toMax","isFromMaxNumber","isToMaxNumber","shrinkSelf","rect","isRectIntersects","rect2","touch","console","log","right","bottom","sqrt","abs","sign","p","clearBrowserSelection","window","getSelection","selection","removeAllRanges","doc","document","empty","toCheck","category","s","floor","zerosCount","mergeOptions","previousOptions","newOptions","toArg","cloneOptions","mergeOptionsDeep","Object","prototype","hasOwnProperty","call","_typeof","timePadZero","num","len","str","String","threshold","concat","JSON","parse","stringify","clonedValue","id","defaultRowHeight","margin","defaultGroupStyle","marginTop","fillColor","defaultTimelineKeyframeStyle","shape","Rhomb","selectedFillColor","strokeColor","selectedStrokeColor","strokeThickness","defaultTimelineRowStyle","marginBottom","keyframesStyle","groupsStyle","undefinedConst","TimelineStyleUtils","getGroup","groupModel","style","getGroupStyle","_TimelineStyleUtils$g","getFirstSet","defaultValue","_len","params","Array","_key","getValue","apply","returnFalseIfAnyFalse","valuesFound","found","_len2","_key2","toReturn","getValueOrDefault","keyframeWidth","keyframe","group","rowStyle","options","_keyframe$style","_TimelineStyleUtils$g2","_rowStyle$keyframesSt","_rowStyle$groupsStyle","_options$rowsStyle","_options$rowsStyle2","rowsStyle","keyframeHeight","_keyframe$style2","_TimelineStyleUtils$g3","_rowStyle$keyframesSt2","_rowStyle$groupsStyle2","_options$rowsStyle3","_options$rowsStyle4","keyframeShape","_keyframe$style3","_TimelineStyleUtils$g4","_rowStyle$groupsStyle3","_rowStyle$keyframesSt3","_options$rowsStyle5","_options$rowsStyle6","keyframeFillColor","_keyframe$style4","_TimelineStyleUtils$g5","_rowStyle$groupsStyle4","_rowStyle$keyframesSt4","_options$rowsStyle7","_options$rowsStyle8","keyframeSelectedFillColor","_keyframe$style5","_TimelineStyleUtils$g6","_rowStyle$groupsStyle5","_rowStyle$keyframesSt5","_options$rowsStyle9","_options$rowsStyle10","keyframeStrokeThickness","_keyframe$style6","_TimelineStyleUtils$g7","_rowStyle$groupsStyle6","_rowStyle$keyframesSt6","_options$rowsStyle11","_options$rowsStyle12","keyframeStrokeColor","_keyframe$style7","_TimelineStyleUtils$g8","_rowStyle$groupsStyle7","_rowStyle$keyframesSt7","_options$rowsStyle13","_options$rowsStyle14","keyframeSelectedStrokeColor","_keyframe$style8","_TimelineStyleUtils$g9","_rowStyle$groupsStyle8","_rowStyle$keyframesSt8","_options$rowsStyle15","_options$rowsStyle16","groupHeight","_TimelineStyleUtils$g10","_rowStyle$groupsStyle9","_options$rowsStyle17","groupMarginTop","_TimelineStyleUtils$g11","_rowStyle$groupsStyle10","_options$rowsStyle18","groupFillColor","_TimelineStyleUtils$g12","_rowStyle$groupsStyle11","_options$rowsStyle19","groupTextColor","_TimelineStyleUtils$g13","_rowStyle$groupsStyle12","_options$rowsStyle20","textColor","groupLabel","_TimelineStyleUtils$g14","label","groupStrokeColor","_TimelineStyleUtils$g15","_rowStyle$groupsStyle13","_options$rowsStyle21","groupStrokeThickness","_TimelineStyleUtils$g16","_rowStyle$groupsStyle14","_options$rowsStyle22","groupsRadii","_TimelineStyleUtils$g17","_rowStyle$groupsStyle15","_options$rowsStyle23","radii","getRowHeight","_options$rowsStyle24","getRowMarginBottom","_options$rowsStyle25","getRowFillColor","_options$rowsStyle26","headerHeight","keyframeDraggable","row","_TimelineStyleUtils$g18","findFirstNegativeBool","boolResult","draggable","keyframesDraggable","groupDraggable","_TimelineStyleUtils$g19","groupsDraggable","TimelineElementType","TimelineDraggableData","None","TimelineBaseEvent","preventDefault","_prevented","isPrevented","TimelineKeyframeChangedEvent","_TimelineBaseEvent","_this","_callSuper","_inherits","TimelineEventSource","TimelineTimeChangedEvent","User","TimelineSelectionEventSource","TimelineSelectedEvent","Keyframes","TimelineClickEvent","get","_this$point","point","pos","TimelineDragEvent","TimelineInteractionMode","TimelineCursorType","TimelineCapShape","TimelineSelectionMode","TimelineEvents","TimelineScrollSource","defaultTimelineConsts","autoPanSpeed","scrollByDragSpeed","clickDetectionMs","doubleClickTimeoutMs","scrollFinishedTimeoutMs","autoPanByScrollPadding","clickThreshold","clickDetectionMinRadius","autoPanSpeedLimit","defaultGroupHeight","defaultTimelineStyle","capStyle","capType","Rect","cursor","EWResize","defaultTimelineOptions","snapAllKeyframesOnMove","snapEnabled","timelineStyle","stepPx","stepVal","stepSmallPx","snapStep","leftMargin","headerFillColor","labelsColor","tickColor","selectionColor","font","zoom","zoomSpeed","zoomMin","zoomMax","controlKeyIsMetaKey","scrollContainerClass","timelineDraggable","MAX_VALUE","Timeline","_TimelineEventsEmitte","model","Selection","_model","Error","_generateContainers","_options","_setOptions","_subscribeComponentEvents","rescale","redraw","HTMLElement","_container","getElementById","_scrollContainer","createElement","_scrollContent","_canvas","getContext","innerHTML","position","cssText","appendChild","scrollBarWidth","offsetWidth","clientWidth","_ctx","_getCtx","_unsubscribeComponentEvents","addEventListener","_handleWheelEvent","_handleScrollEvent","_handleScrollMouseDownEvent","_handleKeyUp","_handleKeyDown","_handleBlurEvent","_handleWindowResizeEvent","_handleMouseDownEvent","_handleContextMenu","_handleMouseMoveEvent","_handleMouseUpEvent","_this$_container","removeEventListener","warn","_stopAutoPan","_clearScrollFinishedTimer","_cleanUpSelection","_interactionMode","Zoom","_setZoomCursor","e","_controlKeyPressed","_setCursor","ZoomOut","ZoomIn","_scrollFinishedTimerRef","clearTimeout","_scrollAreaClickOrDragStarted","scrollProgrammatically","_scrollProgrammatically","setTimeout","_isPanStarted","_emitScrollEvent","ScrollFinished","_consts","metaKey","ctrlKey","mousePosArguments","_getMousePos","mousePos","_zoom","deltaY","scrollTop","direction","speed","deltaSpeed","_canvasClientWidth","diff","_fromScreen","_currentZoom","_setZoom","zoomCenter","valToPx","newScrollLeft","round","_rescaleInternal","ZoomMode","scrollLeft","_this$_scrollContaine","_this$_scrollContaine2","_this$_options","_this$_options2","prevZoom","getZoom","zoomSet","radius","mousePosTimeline","_trackMousePos","clickRadius","_getClickDetectionRadius","elements","elementFromPoint","target","_findDraggableElement","_superPropGet","ContextMenu","_startPosMouseArgs","isDoubleClick","Date","now","_lastClickTime","_lastClickPoint","_scrollStartPos","_clickAllowed","onlyElements","NonInteractivePan","DoubleClick","MouseDown","_clickTimeout","_currentPos","_drag","type","_setElementDragState","Keyframe","_target$keyframe","_startedDragWithCtrl","_startedDragWithShiftKey","shiftKey","selected","_selectInternal","getSelectedElements","map","Group","keyframes","isArray","_this$_drag","_convertToTimelineElement","state","prevVal","startedVal","buttons","_lastUsedArgs","touchEventArgs","isTouch","changedTouches","_selectionRect","_clickTimeoutIsOver","_selectionRectEnabled","isLeftClicked","isLeftButtonClicked","convertedVal","_setTimeInternal","offset","movedOffset","_moveElements","changed","eventArgs","_emitDragStartedEvent","_emitDragEvent","Pan","Grabbing","_scrollByPan","_scrollBySelectionOutOfBounds","Grab","Default","Pointer","_this$_options3","mouseArgs","_performClick","_getKeyframesByRectangle","selectionMode","Append","Normal","select","clientHeight","screenRect","keyframesModels","_forEachKeyframe","keyframeViewModel","intersects","size","drag","isChanged","_drag$target","_this$_options4","mode","Revert","selectionChanged","_this$_options5","source","Programmatically","_emitKeyframeChanged","rowModel","data","rowViewModel","getAllKeyframes","node","selectable","nodes","results","getSelectedKeyframes","nodesArray","_changeNodeState","selectedItems","exists","_emitKeyframesSelected","_intervalRef","setInterval","clearInterval","_autoPanLastActionDate","_leftMargin","px","pxToVal","steps","snapVal","ms","seconds","year","days","hours","minutes","_this$_options6","_this$_options7","canvas","screenWidth","wasToVal","valDistance","fromVal","toVal","ceil","smallStep","_this$_options8","lastTextStart","save","tickHeight","smallTickHeight","sharpPos","_getSharp","_toScreenPx","beginPath","setLineDash","lineWidth","strokeStyle","stroke","fillStyle","text","_formatUnitsText","textSize","measureText","textX","fillText","restore","nextSharpPos","_pixelRatio","rowsViewModels","keyframesViewModels","rows","rowAbsoluteHeight","hidden","rowHeight","currentRowY","rowSize","groupsViewModels","_rowViewModel$groupsV","groupViewModel","find","keyframeSize","_getKeyframePosition","groupRect","_getKeyframesGroupSize","viewModel","_generateViewModel","bounds","_cutBounds","fillRect","_renderGroupBounds","_rowViewModel$groupsV2","_groupsViewModels$key","_rowViewModel$model","_rowViewModel$model2","_rowViewModel$model3","_rowViewModel$model4","_rowViewModel$model5","rectBounds","roundRect","fill","testOffset","minX","maxX","minY","maxY","_canvasClientHeight","_cutBoundsWhenOverlap","offsetW","offsetH","overlapY","overlapX","_rowViewModel$model6","_rowViewModel$model7","rowY","isAutoHeight","parseInt","isAutoMargin","xMin","xMax","_rowViewModel$model8","_rowViewModel$model9","clip","_renderKeyframe","_keyframeViewModel$gr","keyframeColor","border","translate","rotate","PI","Circle","arc","thickness","strokeRect","clearRect","timeLinePos","_val","yBottom","canvasHeight","_renderTimelineCap","_this$_options9","capSize","capHeight","Triangle","closePath","_window","requestAnimationFrame","_redrawInternal","scrollWidth","scrollToRightBounds","_renderBackground","_renderRows","_renderHeaderBackground","_renderTicks","_renderKeyframes","_renderSelectionRect","_renderTimeline","timelineEvent","TimeChanged","SetTimeMethod","toSet","classList","contains","add","background","_applyContainersStyles","clientX","clientY","radiusX","radiusY","getBoundingClientRect","scaleX","scaleY","left","top","setTransform","newWidth","newHeight","scrollMode","DefaultMode","_updateCanvasScale","_this$_scrollContaine3","additionalOffset","timelineGlobalPos","timelinePos","rightPosition","getClientWidth","ScrollBySelection","keyframeW","minWidthPx","minWidth","h","minHeight","filteredElements","_element$keyframe","_this$_options10","Row","getPriority","sortDraggable","a","b","prioA","prioB","sorted","_filterDraggableElements","sort","onlyTypes","_this$_options11","_timelineStyle$capSty","snap","_","isNextRow","keyframesGroupOverlapped","groupElement","_mousePosToVal","snapped","keyframePosRect","isMouseOver","extendedMouseRect","dist","rowOverlapped","includes","DragStarted","Drag","DragFinished","KeyframeChanged","Selected","Scroll","_this$_scrollContaine4","_this$_scrollContaine5","eventType","scrollEvent","scrollHeight","dragState","_getDragEventArgs","_preventDrag","forcePrevent","dragArgs","toStart","_setKeyframePos","prevPoint","draggableArguments","_toConsumableArray","initialize","_this2","MIN_SAFE_INTEGER","MAX_SAFE_INTEGER","_this2$_options","currentBounds","expectedKeyframeValue","newPosition","newValue","onRowCallback","_calculatedModel$rows","calculatedModel","nextRow","keyframeIndex","clickArgs","originalVal","_this$_scrollStartPos","_this$_scrollStartPos2","startPos","_this$_scrollContaine6","getClientHeight","_this$_scrollContaine7","_emitDragFinishedEvent","_checkUpdateSpeedTooFast","start","scrollStartPos","offsetX","newLeft","speedX","speedY","isLeft","isRight","isTop","isBottom","_startAutoPan","scrollSpeedMultiplier","stops","stepsFit","minSteps","minOffset","_this$_scrollContaine8","set","_this$_scrollContaine9"],"sourceRoot":""}