{"version":3,"file":"brochure-4408d499.js","sources":["../../../node_modules/@oddcamp/analytics/src/index.js","../../../assets/javascript/brochure/base/analytics.js","../../../assets/javascript/shared/atoms/form-range.js","../../../assets/javascript/shared/atoms/reset-cookie.js","../../../node_modules/lottie-web/build/player/lottie.js","../../../assets/javascript/brochure/atoms/animations.js","../../../assets/javascript/brochure/atoms/tracker.js","../../../node_modules/fitty/dist/fitty.module.js","../../../node_modules/@popperjs/core/lib/enums.js","../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../../../node_modules/@popperjs/core/lib/utils/math.js","../../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/contains.js","../../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","../../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","../../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","../../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","../../../node_modules/@popperjs/core/lib/utils/within.js","../../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","../../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","../../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js","../../../node_modules/@popperjs/core/lib/modifiers/arrow.js","../../../node_modules/@popperjs/core/lib/utils/getVariation.js","../../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js","../../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js","../../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","../../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","../../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","../../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","../../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","../../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","../../../node_modules/@popperjs/core/lib/utils/computeOffsets.js","../../../node_modules/@popperjs/core/lib/utils/detectOverflow.js","../../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","../../../node_modules/@popperjs/core/lib/modifiers/flip.js","../../../node_modules/@popperjs/core/lib/modifiers/hide.js","../../../node_modules/@popperjs/core/lib/modifiers/offset.js","../../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","../../../node_modules/@popperjs/core/lib/utils/getAltAxis.js","../../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","../../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","../../../node_modules/@popperjs/core/lib/utils/orderModifiers.js","../../../node_modules/@popperjs/core/lib/utils/debounce.js","../../../node_modules/@popperjs/core/lib/utils/mergeByName.js","../../../node_modules/@popperjs/core/lib/createPopper.js","../../../node_modules/@popperjs/core/lib/popper.js","../../../assets/javascript/brochure/components/calculator.js","../../../assets/javascript/brochure/components/rates-matrix.js","../../../assets/javascript/brochure/components/rates-matrix-new.js","../../../assets/javascript/brochure/components/faq-table.js","../../../assets/javascript/brochure/components/piggy-bank-feature.js","../../../node_modules/page-flip/dist/js/page-flip.browser.js","../../../assets/javascript/brochure/components/piggy-book.js","../../../node_modules/ssr-window/ssr-window.esm.js","../../../node_modules/dom7/node_modules/ssr-window/ssr-window.esm.js","../../../node_modules/dom7/dom7.esm.js","../../../node_modules/swiper/shared/dom.js","../../../node_modules/swiper/shared/utils.js","../../../node_modules/swiper/shared/get-support.js","../../../node_modules/swiper/shared/get-device.js","../../../node_modules/swiper/shared/get-browser.js","../../../node_modules/swiper/core/modules/resize/resize.js","../../../node_modules/swiper/core/modules/observer/observer.js","../../../node_modules/swiper/core/events-emitter.js","../../../node_modules/swiper/core/update/updateSize.js","../../../node_modules/swiper/core/update/updateSlides.js","../../../node_modules/swiper/core/update/updateAutoHeight.js","../../../node_modules/swiper/core/update/updateSlidesOffset.js","../../../node_modules/swiper/core/update/updateSlidesProgress.js","../../../node_modules/swiper/core/update/updateProgress.js","../../../node_modules/swiper/core/update/updateSlidesClasses.js","../../../node_modules/swiper/core/update/updateActiveIndex.js","../../../node_modules/swiper/core/update/updateClickedSlide.js","../../../node_modules/swiper/core/update/index.js","../../../node_modules/swiper/core/translate/getTranslate.js","../../../node_modules/swiper/core/translate/setTranslate.js","../../../node_modules/swiper/core/translate/minTranslate.js","../../../node_modules/swiper/core/translate/maxTranslate.js","../../../node_modules/swiper/core/translate/translateTo.js","../../../node_modules/swiper/core/translate/index.js","../../../node_modules/swiper/core/transition/setTransition.js","../../../node_modules/swiper/core/transition/transitionEmit.js","../../../node_modules/swiper/core/transition/transitionStart.js","../../../node_modules/swiper/core/transition/transitionEnd.js","../../../node_modules/swiper/core/transition/index.js","../../../node_modules/swiper/core/slide/slideTo.js","../../../node_modules/swiper/core/slide/slideToLoop.js","../../../node_modules/swiper/core/slide/slideNext.js","../../../node_modules/swiper/core/slide/slidePrev.js","../../../node_modules/swiper/core/slide/slideReset.js","../../../node_modules/swiper/core/slide/slideToClosest.js","../../../node_modules/swiper/core/slide/slideToClickedSlide.js","../../../node_modules/swiper/core/slide/index.js","../../../node_modules/swiper/core/loop/loopCreate.js","../../../node_modules/swiper/core/loop/loopFix.js","../../../node_modules/swiper/core/loop/loopDestroy.js","../../../node_modules/swiper/core/loop/index.js","../../../node_modules/swiper/core/grab-cursor/setGrabCursor.js","../../../node_modules/swiper/core/grab-cursor/unsetGrabCursor.js","../../../node_modules/swiper/core/grab-cursor/index.js","../../../node_modules/swiper/core/events/onTouchStart.js","../../../node_modules/swiper/core/events/onTouchMove.js","../../../node_modules/swiper/core/events/onTouchEnd.js","../../../node_modules/swiper/core/events/onResize.js","../../../node_modules/swiper/core/events/onClick.js","../../../node_modules/swiper/core/events/onScroll.js","../../../node_modules/swiper/core/events/index.js","../../../node_modules/swiper/core/breakpoints/setBreakpoint.js","../../../node_modules/swiper/core/breakpoints/getBreakpoint.js","../../../node_modules/swiper/core/breakpoints/index.js","../../../node_modules/swiper/core/classes/addClasses.js","../../../node_modules/swiper/core/classes/removeClasses.js","../../../node_modules/swiper/core/classes/index.js","../../../node_modules/swiper/core/images/loadImage.js","../../../node_modules/swiper/core/images/preloadImages.js","../../../node_modules/swiper/core/images/index.js","../../../node_modules/swiper/core/check-overflow/index.js","../../../node_modules/swiper/core/defaults.js","../../../node_modules/swiper/core/moduleExtendParams.js","../../../node_modules/swiper/core/core.js","../../../node_modules/swiper/modules/keyboard/keyboard.js","../../../assets/javascript/brochure/components/gallery.js","../../../assets/javascript/brochure/components/header.js","../../../assets/javascript/brochure/components/hero-banner.js","../../../assets/javascript/brochure/components/clearing-number-examples-dropdown.js","../../../assets/javascript/brochure/pages/info-page.js","../../../assets/javascript/brochure/pages/disclaimer-page.js"],"sourcesContent":["import { isPlainObject } from \"lodash\"\n\nconst SERVICES = [`plausible`]\n\nfunction enableAutoEventAnalytics({\n attributeName = `event-analytics`,\n sourceNode = document,\n targets = [`a`, `button`],\n services = SERVICES,\n debug = false,\n} = {}) {\n if (!window || !document) {\n debugLog(\n debug,\n `Auto event analytics could not be enabled due to absence of DOM`\n )\n return false\n }\n\n if (\n !attributeName ||\n !(sourceNode === document || sourceNode instanceof Element) ||\n !targets ||\n !targets.length ||\n !services ||\n !services.length\n ) {\n debugLog(\n debug,\n `Auto event analytics could not be enabled due to faulty parameters provided`\n )\n return false\n }\n\n debugLog(debug, `Auto event analytics enabled`)\n\n const targetsSelector = targets\n .map((t) => `${t}[data-${attributeName}]`)\n .join(`,`)\n\n const docClick = (e) => {\n const targetNode = e.target.closest(targetsSelector)\n if (!targetNode) return\n\n if (!anyServicesAvailable(services)) {\n debugLog(\n debug,\n `Auto event analytics requested, but no services available`\n )\n return\n }\n\n let data = null\n try {\n data = JSON.parse(targetNode.getAttribute(`data-${attributeName}`))\n } catch (e) {\n //\n }\n\n analyticizeEvent({ data, services, debug })\n }\n\n sourceNode.addEventListener(`click`, docClick)\n\n return () => {\n sourceNode.removeEventListener(`click`, docClick)\n\n debugLog(debug, `Auto event analytics disabled`)\n }\n}\n\nfunction analyticizeEvent({ data, services = SERVICES, debug = false } = {}) {\n if (!anyServicesAvailable(services)) {\n debugLog(debug, `Auto event analytics requested, but no services available`)\n return\n }\n\n if (!data || !data.name || !(data.props && isPlainObject(data.props))) {\n debugLog(\n debug,\n `Auto event analytics requested, but not accomplished due to faulty data attribute value provided`\n )\n return\n }\n\n services.forEach((service) => {\n switch (service) {\n case `plausible`: {\n if (window && window.plausible) {\n debugLog(\n debug,\n `Plausible event analytics request has been fulfilled`,\n data\n )\n\n window.plausible(data.name, {\n props: data.props,\n callback: () => {\n debugLog(debug, `Plausible event has been analyzed`, data)\n },\n })\n } else {\n debugLog(\n debug,\n `Plausible event analysation requested, but service is not available`\n )\n }\n break\n }\n }\n })\n}\n\nfunction anyServicesAvailable(services) {\n return !!services.find((service) => {\n switch (service) {\n case `plausible`: {\n return !!window.plausible\n }\n }\n\n return false\n })\n}\n\nfunction debugLog(debug, ...props) {\n if (!debug) return\n console.log(`[oddcamp/analytics]`, ...props) // eslint-disable-line no-console\n}\n\nexport { enableAutoEventAnalytics, analyticizeEvent }\n","import { enableAutoEventAnalytics } from \"@oddcamp/analytics\"\n\nenableAutoEventAnalytics()\n","import { Controller } from \"@hotwired/stimulus\"\n\nimport Stimulus from \"../utils/stimulus\"\n\nclass FormRange extends Controller {\n #trackColor = null\n #trackProgressColor = null\n\n connect() {\n const styles = window.getComputedStyle(this.element)\n this.#trackColor = styles.getPropertyValue(`--track-color`).trim()\n this.#trackProgressColor = styles\n .getPropertyValue(`--track-progress-color`)\n .trim()\n\n this.input()\n this.element.addEventListener(`input`, this.input, { passive: true })\n }\n\n input = () => {\n if (!this.#trackColor || !this.#trackProgressColor) return\n\n const value = Math.round(\n ((this.element.value - this.element.min) /\n (this.element.max - this.element.min)) *\n 100\n )\n\n this.element.style.setProperty(\n `--webkit-slider-runnable-background`,\n `linear-gradient(to right, ${this.#trackProgressColor} 0%, ${\n this.#trackProgressColor\n } ${value}%, ${this.#trackColor} ${value}%, ${this.#trackColor} 100%)`\n )\n }\n}\n\nStimulus.register(`form-range`, FormRange)\n","import { Controller } from \"@hotwired/stimulus\"\nimport Cookies from \"js-cookie\"\n\nimport Stimulus from \"../utils/stimulus\"\n\nclass ResetCookie extends Controller {\n static values = { name: String }\n\n doIt() {\n Cookies.remove(this.nameValue)\n window.scrollTo({ top: 0, behavior: `instant` })\n window.location.reload()\n }\n}\n\nStimulus.register(`reset-cookie`, ResetCookie)\n","(typeof navigator !== \"undefined\") && (function(root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(function() {\n return factory(root);\n });\n } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory(root);\n } else {\n root.lottie = factory(root);\n root.bodymovin = root.lottie;\n }\n}((window || {}), function(window) {\n\t/* global locationHref:writable, animationManager, subframeEnabled:writable, defaultCurveSegments:writable, roundValues,\r\nexpressionsPlugin:writable, PropertyFactory, ShapePropertyFactory, Matrix, idPrefix:writable, _useWebWorker:writable */\r\n/* exported locationHref, subframeEnabled, expressionsPlugin, idPrefix, _useWebWorker */\r\n\r\n'use strict';\r\n\r\n/* exported svgNS, locationHref, initialDefaultFrame, _useWebWorker */\r\n\r\nvar svgNS = 'http://www.w3.org/2000/svg';\r\n\r\nvar locationHref = '';\r\n\r\nvar initialDefaultFrame = -999999;\r\n\r\nvar _useWebWorker = false;\r\n\r\n/* global createSizedArray */\r\n/* exported subframeEnabled, expressionsPlugin, isSafari, cachedColors, bmPow, bmSqrt, bmFloor, bmMax, bmMin, ProjectInterface,\r\ndefaultCurveSegments, degToRads, roundCorner, bmRnd, styleDiv, BMEnterFrameEvent, BMCompleteEvent, BMCompleteLoopEvent,\r\nBMSegmentStartEvent, BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, BMAnimationConfigErrorEvent, createElementID,\r\naddSaturationToRGB, addBrightnessToRGB, addHueToRGB, rgbToHex */\r\n\r\nvar subframeEnabled = true;\r\nvar idPrefix = '';\r\nvar expressionsPlugin;\r\nvar isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\r\nvar cachedColors = {};\r\nvar bmRnd;\r\nvar bmPow = Math.pow;\r\nvar bmSqrt = Math.sqrt;\r\nvar bmFloor = Math.floor;\r\nvar bmMax = Math.max;\r\nvar bmMin = Math.min;\r\n\r\nvar BMMath = {};\r\n(function () {\r\n var propertyNames = ['abs', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atanh', 'atan2', 'ceil', 'cbrt', 'expm1', 'clz32', 'cos', 'cosh', 'exp', 'floor', 'fround', 'hypot', 'imul', 'log', 'log1p', 'log2', 'log10', 'max', 'min', 'pow', 'random', 'round', 'sign', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc', 'E', 'LN10', 'LN2', 'LOG10E', 'LOG2E', 'PI', 'SQRT1_2', 'SQRT2'];\r\n var i;\r\n var len = propertyNames.length;\r\n for (i = 0; i < len; i += 1) {\r\n BMMath[propertyNames[i]] = Math[propertyNames[i]];\r\n }\r\n}());\r\n\r\nfunction ProjectInterface() { return {}; }\r\n\r\nBMMath.random = Math.random;\r\nBMMath.abs = function (val) {\r\n var tOfVal = typeof val;\r\n if (tOfVal === 'object' && val.length) {\r\n var absArr = createSizedArray(val.length);\r\n var i;\r\n var len = val.length;\r\n for (i = 0; i < len; i += 1) {\r\n absArr[i] = Math.abs(val[i]);\r\n }\r\n return absArr;\r\n }\r\n return Math.abs(val);\r\n};\r\nvar defaultCurveSegments = 150;\r\nvar degToRads = Math.PI / 180;\r\nvar roundCorner = 0.5519;\r\n\r\nfunction roundValues(flag) {\r\n if (flag) {\r\n bmRnd = Math.round;\r\n } else {\r\n bmRnd = function (val) {\r\n return val;\r\n };\r\n }\r\n}\r\nroundValues(false);\r\n\r\nfunction styleDiv(element) {\r\n element.style.position = 'absolute';\r\n element.style.top = 0;\r\n element.style.left = 0;\r\n element.style.display = 'block';\r\n element.style.transformOrigin = '0 0';\r\n element.style.webkitTransformOrigin = '0 0';\r\n element.style.backfaceVisibility = 'visible';\r\n element.style.webkitBackfaceVisibility = 'visible';\r\n element.style.transformStyle = 'preserve-3d';\r\n element.style.webkitTransformStyle = 'preserve-3d';\r\n element.style.mozTransformStyle = 'preserve-3d';\r\n}\r\n\r\nfunction BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {\r\n this.type = type;\r\n this.currentTime = currentTime;\r\n this.totalTime = totalTime;\r\n this.direction = frameMultiplier < 0 ? -1 : 1;\r\n}\r\n\r\nfunction BMCompleteEvent(type, frameMultiplier) {\r\n this.type = type;\r\n this.direction = frameMultiplier < 0 ? -1 : 1;\r\n}\r\n\r\nfunction BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {\r\n this.type = type;\r\n this.currentLoop = currentLoop;\r\n this.totalLoops = totalLoops;\r\n this.direction = frameMultiplier < 0 ? -1 : 1;\r\n}\r\n\r\nfunction BMSegmentStartEvent(type, firstFrame, totalFrames) {\r\n this.type = type;\r\n this.firstFrame = firstFrame;\r\n this.totalFrames = totalFrames;\r\n}\r\n\r\nfunction BMDestroyEvent(type, target) {\r\n this.type = type;\r\n this.target = target;\r\n}\r\n\r\nfunction BMRenderFrameErrorEvent(nativeError, currentTime) {\r\n this.type = 'renderFrameError';\r\n this.nativeError = nativeError;\r\n this.currentTime = currentTime;\r\n}\r\n\r\nfunction BMConfigErrorEvent(nativeError) {\r\n this.type = 'configError';\r\n this.nativeError = nativeError;\r\n}\r\n\r\nfunction BMAnimationConfigErrorEvent(type, nativeError) {\r\n this.type = type;\r\n this.nativeError = nativeError;\r\n}\r\n\r\nvar createElementID = (function () {\r\n var _count = 0;\r\n return function createID() {\r\n _count += 1;\r\n return idPrefix + '__lottie_element_' + _count;\r\n };\r\n}());\r\n\r\nfunction HSVtoRGB(h, s, v) {\r\n var r;\r\n var g;\r\n var b;\r\n var i;\r\n var f;\r\n var p;\r\n var q;\r\n var t;\r\n i = Math.floor(h * 6);\r\n f = h * 6 - i;\r\n p = v * (1 - s);\r\n q = v * (1 - f * s);\r\n t = v * (1 - (1 - f) * s);\r\n switch (i % 6) {\r\n case 0: r = v; g = t; b = p; break;\r\n case 1: r = q; g = v; b = p; break;\r\n case 2: r = p; g = v; b = t; break;\r\n case 3: r = p; g = q; b = v; break;\r\n case 4: r = t; g = p; b = v; break;\r\n case 5: r = v; g = p; b = q; break;\r\n default: break;\r\n }\r\n return [r,\r\n g,\r\n b];\r\n}\r\n\r\nfunction RGBtoHSV(r, g, b) {\r\n var max = Math.max(r, g, b);\r\n var min = Math.min(r, g, b);\r\n var d = max - min;\r\n var h;\r\n var s = (max === 0 ? 0 : d / max);\r\n var v = max / 255;\r\n\r\n switch (max) {\r\n case min: h = 0; break;\r\n case r: h = (g - b) + d * (g < b ? 6 : 0); h /= 6 * d; break;\r\n case g: h = (b - r) + d * 2; h /= 6 * d; break;\r\n case b: h = (r - g) + d * 4; h /= 6 * d; break;\r\n default: break;\r\n }\r\n\r\n return [\r\n h,\r\n s,\r\n v,\r\n ];\r\n}\r\n\r\nfunction addSaturationToRGB(color, offset) {\r\n var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\r\n hsv[1] += offset;\r\n if (hsv[1] > 1) {\r\n hsv[1] = 1;\r\n } else if (hsv[1] <= 0) {\r\n hsv[1] = 0;\r\n }\r\n return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\r\n}\r\n\r\nfunction addBrightnessToRGB(color, offset) {\r\n var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\r\n hsv[2] += offset;\r\n if (hsv[2] > 1) {\r\n hsv[2] = 1;\r\n } else if (hsv[2] < 0) {\r\n hsv[2] = 0;\r\n }\r\n return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\r\n}\r\n\r\nfunction addHueToRGB(color, offset) {\r\n var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\r\n hsv[0] += offset / 360;\r\n if (hsv[0] > 1) {\r\n hsv[0] -= 1;\r\n } else if (hsv[0] < 0) {\r\n hsv[0] += 1;\r\n }\r\n return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\r\n}\r\n\r\nvar rgbToHex = (function () {\r\n var colorMap = [];\r\n var i;\r\n var hex;\r\n for (i = 0; i < 256; i += 1) {\r\n hex = i.toString(16);\r\n colorMap[i] = hex.length === 1 ? '0' + hex : hex;\r\n }\r\n\r\n return function (r, g, b) {\r\n if (r < 0) {\r\n r = 0;\r\n }\r\n if (g < 0) {\r\n g = 0;\r\n }\r\n if (b < 0) {\r\n b = 0;\r\n }\r\n return '#' + colorMap[r] + colorMap[g] + colorMap[b];\r\n };\r\n}());\r\n\r\nfunction BaseEvent() {}\r\nBaseEvent.prototype = {\r\n triggerEvent: function (eventName, args) {\r\n if (this._cbs[eventName]) {\r\n var callbacks = this._cbs[eventName];\r\n for (var i = 0; i < callbacks.length; i += 1) {\r\n callbacks[i](args);\r\n }\r\n }\r\n },\r\n addEventListener: function (eventName, callback) {\r\n if (!this._cbs[eventName]) {\r\n this._cbs[eventName] = [];\r\n }\r\n this._cbs[eventName].push(callback);\r\n\r\n return function () {\r\n this.removeEventListener(eventName, callback);\r\n }.bind(this);\r\n },\r\n removeEventListener: function (eventName, callback) {\r\n if (!callback) {\r\n this._cbs[eventName] = null;\r\n } else if (this._cbs[eventName]) {\r\n var i = 0;\r\n var len = this._cbs[eventName].length;\r\n while (i < len) {\r\n if (this._cbs[eventName][i] === callback) {\r\n this._cbs[eventName].splice(i, 1);\r\n i -= 1;\r\n len -= 1;\r\n }\r\n i += 1;\r\n }\r\n if (!this._cbs[eventName].length) {\r\n this._cbs[eventName] = null;\r\n }\r\n }\r\n },\r\n};\r\n\r\n/* exported createTypedArray, createSizedArray */\r\n\r\nvar createTypedArray = (function () {\r\n function createRegularArray(type, len) {\r\n var i = 0;\r\n var arr = [];\r\n var value;\r\n switch (type) {\r\n case 'int16':\r\n case 'uint8c':\r\n value = 1;\r\n break;\r\n default:\r\n value = 1.1;\r\n break;\r\n }\r\n for (i = 0; i < len; i += 1) {\r\n arr.push(value);\r\n }\r\n return arr;\r\n }\r\n function createTypedArrayFactory(type, len) {\r\n if (type === 'float32') {\r\n return new Float32Array(len);\r\n } if (type === 'int16') {\r\n return new Int16Array(len);\r\n } if (type === 'uint8c') {\r\n return new Uint8ClampedArray(len);\r\n }\r\n return createRegularArray(type, len);\r\n }\r\n if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {\r\n return createTypedArrayFactory;\r\n }\r\n return createRegularArray;\r\n}());\r\n\r\nfunction createSizedArray(len) {\r\n return Array.apply(null, { length: len });\r\n}\r\n\r\n/* global svgNS */\r\n/* exported createNS */\r\n\r\nfunction createNS(type) {\r\n // return {appendChild:function(){},setAttribute:function(){},style:{}}\r\n return document.createElementNS(svgNS, type);\r\n}\r\n\r\n/* exported createTag */\r\n\r\nfunction createTag(type) {\r\n // return {appendChild:function(){},setAttribute:function(){},style:{}}\r\n return document.createElement(type);\r\n}\r\n\r\nfunction DynamicPropertyContainer() {}\r\nDynamicPropertyContainer.prototype = {\r\n addDynamicProperty: function (prop) {\r\n if (this.dynamicProperties.indexOf(prop) === -1) {\r\n this.dynamicProperties.push(prop);\r\n this.container.addDynamicProperty(this);\r\n this._isAnimated = true;\r\n }\r\n },\r\n iterateDynamicProperties: function () {\r\n this._mdf = false;\r\n var i;\r\n var len = this.dynamicProperties.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.dynamicProperties[i].getValue();\r\n if (this.dynamicProperties[i]._mdf) {\r\n this._mdf = true;\r\n }\r\n }\r\n },\r\n initDynamicPropertyContainer: function (container) {\r\n this.container = container;\r\n this.dynamicProperties = [];\r\n this._mdf = false;\r\n this._isAnimated = false;\r\n },\r\n};\r\n\r\n/* exported getBlendMode */\r\n\r\nvar getBlendMode = (function () {\r\n var blendModeEnums = {\r\n 0: 'source-over',\r\n 1: 'multiply',\r\n 2: 'screen',\r\n 3: 'overlay',\r\n 4: 'darken',\r\n 5: 'lighten',\r\n 6: 'color-dodge',\r\n 7: 'color-burn',\r\n 8: 'hard-light',\r\n 9: 'soft-light',\r\n 10: 'difference',\r\n 11: 'exclusion',\r\n 12: 'hue',\r\n 13: 'saturation',\r\n 14: 'color',\r\n 15: 'luminosity',\r\n };\r\n\r\n return function (mode) {\r\n return blendModeEnums[mode] || '';\r\n };\r\n}());\r\n\r\n/* exported lineCapEnum, lineJoinEnum */\r\n\r\nvar lineCapEnum = {\r\n 1: 'butt',\r\n 2: 'round',\r\n 3: 'square',\r\n};\r\n\r\nvar lineJoinEnum = {\r\n 1: 'miter',\r\n 2: 'round',\r\n 3: 'bevel',\r\n};\r\n\r\n/* global createTypedArray */\r\n\r\n/*!\r\n Transformation Matrix v2.0\r\n (c) Epistemex 2014-2015\r\n www.epistemex.com\r\n By Ken Fyrstenberg\r\n Contributions by leeoniya.\r\n License: MIT, header required.\r\n */\r\n\r\n/**\r\n * 2D transformation matrix object initialized with identity matrix.\r\n *\r\n * The matrix can synchronize a canvas context by supplying the context\r\n * as an argument, or later apply current absolute transform to an\r\n * existing context.\r\n *\r\n * All values are handled as floating point values.\r\n *\r\n * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix\r\n * @prop {number} a - scale x\r\n * @prop {number} b - shear y\r\n * @prop {number} c - shear x\r\n * @prop {number} d - scale y\r\n * @prop {number} e - translate x\r\n * @prop {number} f - translate y\r\n * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context\r\n * @constructor\r\n */\r\n\r\nvar Matrix = (function () {\r\n var _cos = Math.cos;\r\n var _sin = Math.sin;\r\n var _tan = Math.tan;\r\n var _rnd = Math.round;\r\n\r\n function reset() {\r\n this.props[0] = 1;\r\n this.props[1] = 0;\r\n this.props[2] = 0;\r\n this.props[3] = 0;\r\n this.props[4] = 0;\r\n this.props[5] = 1;\r\n this.props[6] = 0;\r\n this.props[7] = 0;\r\n this.props[8] = 0;\r\n this.props[9] = 0;\r\n this.props[10] = 1;\r\n this.props[11] = 0;\r\n this.props[12] = 0;\r\n this.props[13] = 0;\r\n this.props[14] = 0;\r\n this.props[15] = 1;\r\n return this;\r\n }\r\n\r\n function rotate(angle) {\r\n if (angle === 0) {\r\n return this;\r\n }\r\n var mCos = _cos(angle);\r\n var mSin = _sin(angle);\r\n return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n }\r\n\r\n function rotateX(angle) {\r\n if (angle === 0) {\r\n return this;\r\n }\r\n var mCos = _cos(angle);\r\n var mSin = _sin(angle);\r\n return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);\r\n }\r\n\r\n function rotateY(angle) {\r\n if (angle === 0) {\r\n return this;\r\n }\r\n var mCos = _cos(angle);\r\n var mSin = _sin(angle);\r\n return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);\r\n }\r\n\r\n function rotateZ(angle) {\r\n if (angle === 0) {\r\n return this;\r\n }\r\n var mCos = _cos(angle);\r\n var mSin = _sin(angle);\r\n return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n }\r\n\r\n function shear(sx, sy) {\r\n return this._t(1, sy, sx, 1, 0, 0);\r\n }\r\n\r\n function skew(ax, ay) {\r\n return this.shear(_tan(ax), _tan(ay));\r\n }\r\n\r\n function skewFromAxis(ax, angle) {\r\n var mCos = _cos(angle);\r\n var mSin = _sin(angle);\r\n return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)\r\n ._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)\r\n ._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);\r\n }\r\n\r\n function scale(sx, sy, sz) {\r\n if (!sz && sz !== 0) {\r\n sz = 1;\r\n }\r\n if (sx === 1 && sy === 1 && sz === 1) {\r\n return this;\r\n }\r\n return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);\r\n }\r\n\r\n function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {\r\n this.props[0] = a;\r\n this.props[1] = b;\r\n this.props[2] = c;\r\n this.props[3] = d;\r\n this.props[4] = e;\r\n this.props[5] = f;\r\n this.props[6] = g;\r\n this.props[7] = h;\r\n this.props[8] = i;\r\n this.props[9] = j;\r\n this.props[10] = k;\r\n this.props[11] = l;\r\n this.props[12] = m;\r\n this.props[13] = n;\r\n this.props[14] = o;\r\n this.props[15] = p;\r\n return this;\r\n }\r\n\r\n function translate(tx, ty, tz) {\r\n tz = tz || 0;\r\n if (tx !== 0 || ty !== 0 || tz !== 0) {\r\n return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);\r\n }\r\n return this;\r\n }\r\n\r\n function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {\r\n var _p = this.props;\r\n\r\n if (a2 === 1 && b2 === 0 && c2 === 0 && d2 === 0 && e2 === 0 && f2 === 1 && g2 === 0 && h2 === 0 && i2 === 0 && j2 === 0 && k2 === 1 && l2 === 0) {\r\n // NOTE: commenting this condition because TurboFan deoptimizes code when present\r\n // if(m2 !== 0 || n2 !== 0 || o2 !== 0){\r\n _p[12] = _p[12] * a2 + _p[15] * m2;\r\n _p[13] = _p[13] * f2 + _p[15] * n2;\r\n _p[14] = _p[14] * k2 + _p[15] * o2;\r\n _p[15] *= p2;\r\n // }\r\n this._identityCalculated = false;\r\n return this;\r\n }\r\n\r\n var a1 = _p[0];\r\n var b1 = _p[1];\r\n var c1 = _p[2];\r\n var d1 = _p[3];\r\n var e1 = _p[4];\r\n var f1 = _p[5];\r\n var g1 = _p[6];\r\n var h1 = _p[7];\r\n var i1 = _p[8];\r\n var j1 = _p[9];\r\n var k1 = _p[10];\r\n var l1 = _p[11];\r\n var m1 = _p[12];\r\n var n1 = _p[13];\r\n var o1 = _p[14];\r\n var p1 = _p[15];\r\n\r\n /* matrix order (canvas compatible):\r\n * ace\r\n * bdf\r\n * 001\r\n */\r\n _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;\r\n _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;\r\n _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;\r\n _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;\r\n\r\n _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;\r\n _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;\r\n _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;\r\n _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;\r\n\r\n _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;\r\n _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;\r\n _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;\r\n _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;\r\n\r\n _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;\r\n _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;\r\n _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;\r\n _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;\r\n\r\n this._identityCalculated = false;\r\n return this;\r\n }\r\n\r\n function isIdentity() {\r\n if (!this._identityCalculated) {\r\n this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0 || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0 || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0 || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1);\r\n this._identityCalculated = true;\r\n }\r\n return this._identity;\r\n }\r\n\r\n function equals(matr) {\r\n var i = 0;\r\n while (i < 16) {\r\n if (matr.props[i] !== this.props[i]) {\r\n return false;\r\n }\r\n i += 1;\r\n }\r\n return true;\r\n }\r\n\r\n function clone(matr) {\r\n var i;\r\n for (i = 0; i < 16; i += 1) {\r\n matr.props[i] = this.props[i];\r\n }\r\n return matr;\r\n }\r\n\r\n function cloneFromProps(props) {\r\n var i;\r\n for (i = 0; i < 16; i += 1) {\r\n this.props[i] = props[i];\r\n }\r\n }\r\n\r\n function applyToPoint(x, y, z) {\r\n return {\r\n x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],\r\n y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],\r\n z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14],\r\n };\r\n /* return {\r\n x: x * me.a + y * me.c + me.e,\r\n y: x * me.b + y * me.d + me.f\r\n }; */\r\n }\r\n function applyToX(x, y, z) {\r\n return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];\r\n }\r\n function applyToY(x, y, z) {\r\n return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];\r\n }\r\n function applyToZ(x, y, z) {\r\n return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];\r\n }\r\n\r\n function getInverseMatrix() {\r\n var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];\r\n var a = this.props[5] / determinant;\r\n var b = -this.props[1] / determinant;\r\n var c = -this.props[4] / determinant;\r\n var d = this.props[0] / determinant;\r\n var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;\r\n var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;\r\n var inverseMatrix = new Matrix();\r\n inverseMatrix.props[0] = a;\r\n inverseMatrix.props[1] = b;\r\n inverseMatrix.props[4] = c;\r\n inverseMatrix.props[5] = d;\r\n inverseMatrix.props[12] = e;\r\n inverseMatrix.props[13] = f;\r\n return inverseMatrix;\r\n }\r\n\r\n function inversePoint(pt) {\r\n var inverseMatrix = this.getInverseMatrix();\r\n return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);\r\n }\r\n\r\n function inversePoints(pts) {\r\n var i;\r\n var len = pts.length;\r\n var retPts = [];\r\n for (i = 0; i < len; i += 1) {\r\n retPts[i] = inversePoint(pts[i]);\r\n }\r\n return retPts;\r\n }\r\n\r\n function applyToTriplePoints(pt1, pt2, pt3) {\r\n var arr = createTypedArray('float32', 6);\r\n if (this.isIdentity()) {\r\n arr[0] = pt1[0];\r\n arr[1] = pt1[1];\r\n arr[2] = pt2[0];\r\n arr[3] = pt2[1];\r\n arr[4] = pt3[0];\r\n arr[5] = pt3[1];\r\n } else {\r\n var p0 = this.props[0];\r\n var p1 = this.props[1];\r\n var p4 = this.props[4];\r\n var p5 = this.props[5];\r\n var p12 = this.props[12];\r\n var p13 = this.props[13];\r\n arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;\r\n arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;\r\n arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;\r\n arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;\r\n arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;\r\n arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;\r\n }\r\n return arr;\r\n }\r\n\r\n function applyToPointArray(x, y, z) {\r\n var arr;\r\n if (this.isIdentity()) {\r\n arr = [x, y, z];\r\n } else {\r\n arr = [\r\n x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],\r\n x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],\r\n x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14],\r\n ];\r\n }\r\n return arr;\r\n }\r\n\r\n function applyToPointStringified(x, y) {\r\n if (this.isIdentity()) {\r\n return x + ',' + y;\r\n }\r\n var _p = this.props;\r\n return Math.round((x * _p[0] + y * _p[4] + _p[12]) * 100) / 100 + ',' + Math.round((x * _p[1] + y * _p[5] + _p[13]) * 100) / 100;\r\n }\r\n\r\n function toCSS() {\r\n // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed.\r\n /* if(this.isIdentity()) {\r\n return '';\r\n } */\r\n var i = 0;\r\n var props = this.props;\r\n var cssValue = 'matrix3d(';\r\n var v = 10000;\r\n while (i < 16) {\r\n cssValue += _rnd(props[i] * v) / v;\r\n cssValue += i === 15 ? ')' : ',';\r\n i += 1;\r\n }\r\n return cssValue;\r\n }\r\n\r\n function roundMatrixProperty(val) {\r\n var v = 10000;\r\n if ((val < 0.000001 && val > 0) || (val > -0.000001 && val < 0)) {\r\n return _rnd(val * v) / v;\r\n }\r\n return val;\r\n }\r\n\r\n function to2dCSS() {\r\n // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed.\r\n /* if(this.isIdentity()) {\r\n return '';\r\n } */\r\n var props = this.props;\r\n var _a = roundMatrixProperty(props[0]);\r\n var _b = roundMatrixProperty(props[1]);\r\n var _c = roundMatrixProperty(props[4]);\r\n var _d = roundMatrixProperty(props[5]);\r\n var _e = roundMatrixProperty(props[12]);\r\n var _f = roundMatrixProperty(props[13]);\r\n return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';\r\n }\r\n\r\n return function () {\r\n this.reset = reset;\r\n this.rotate = rotate;\r\n this.rotateX = rotateX;\r\n this.rotateY = rotateY;\r\n this.rotateZ = rotateZ;\r\n this.skew = skew;\r\n this.skewFromAxis = skewFromAxis;\r\n this.shear = shear;\r\n this.scale = scale;\r\n this.setTransform = setTransform;\r\n this.translate = translate;\r\n this.transform = transform;\r\n this.applyToPoint = applyToPoint;\r\n this.applyToX = applyToX;\r\n this.applyToY = applyToY;\r\n this.applyToZ = applyToZ;\r\n this.applyToPointArray = applyToPointArray;\r\n this.applyToTriplePoints = applyToTriplePoints;\r\n this.applyToPointStringified = applyToPointStringified;\r\n this.toCSS = toCSS;\r\n this.to2dCSS = to2dCSS;\r\n this.clone = clone;\r\n this.cloneFromProps = cloneFromProps;\r\n this.equals = equals;\r\n this.inversePoints = inversePoints;\r\n this.inversePoint = inversePoint;\r\n this.getInverseMatrix = getInverseMatrix;\r\n this._t = this.transform;\r\n this.isIdentity = isIdentity;\r\n this._identity = true;\r\n this._identityCalculated = false;\r\n\r\n this.props = createTypedArray('float32', 16);\r\n this.reset();\r\n };\r\n}());\r\n\r\n/* eslint-disable */\r\n/*\r\n Copyright 2014 David Bau.\r\n\r\n Permission is hereby granted, free of charge, to any person obtaining\r\n a copy of this software and associated documentation files (the\r\n \"Software\"), to deal in the Software without restriction, including\r\n without limitation the rights to use, copy, modify, merge, publish,\r\n distribute, sublicense, and/or sell copies of the Software, and to\r\n permit persons to whom the Software is furnished to do so, subject to\r\n the following conditions:\r\n\r\n The above copyright notice and this permission notice shall be\r\n included in all copies or substantial portions of the Software.\r\n\r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n */\r\n\r\n(function (pool, math) {\r\n//\r\n// The following constants are related to IEEE 754 limits.\r\n//\r\n var global = this,\r\n width = 256, // each RC4 output is 0 <= x < 256\r\n chunks = 6, // at least six RC4 outputs for each double\r\n digits = 52, // there are 52 significant digits in a double\r\n rngname = 'random', // rngname: name for Math.random and Math.seedrandom\r\n startdenom = math.pow(width, chunks),\r\n significance = math.pow(2, digits),\r\n overflow = significance * 2,\r\n mask = width - 1,\r\n nodecrypto; // node.js crypto module, initialized at the bottom.\r\n\r\n//\r\n// seedrandom()\r\n// This is the seedrandom function described above.\r\n//\r\n function seedrandom(seed, options, callback) {\r\n var key = [];\r\n options = (options === true) ? { entropy: true } : (options || {});\r\n\r\n // Flatten the seed string or build one from local entropy if needed.\r\n var shortseed = mixkey(flatten(\r\n options.entropy ? [seed, tostring(pool)] :\r\n (seed === null) ? autoseed() : seed, 3), key);\r\n\r\n // Use the seed to initialize an ARC4 generator.\r\n var arc4 = new ARC4(key);\r\n\r\n // This function returns a random double in [0, 1) that contains\r\n // randomness in every bit of the mantissa of the IEEE 754 value.\r\n var prng = function() {\r\n var n = arc4.g(chunks), // Start with a numerator n < 2 ^ 48\r\n d = startdenom, // and denominator d = 2 ^ 48.\r\n x = 0; // and no 'extra last byte'.\r\n while (n < significance) { // Fill up all significant digits by\r\n n = (n + x) * width; // shifting numerator and\r\n d *= width; // denominator and generating a\r\n x = arc4.g(1); // new least-significant-byte.\r\n }\r\n while (n >= overflow) { // To avoid rounding up, before adding\r\n n /= 2; // last byte, shift everything\r\n d /= 2; // right using integer math until\r\n x >>>= 1; // we have exactly the desired bits.\r\n }\r\n return (n + x) / d; // Form the number within [0, 1).\r\n };\r\n\r\n prng.int32 = function() { return arc4.g(4) | 0; };\r\n prng.quick = function() { return arc4.g(4) / 0x100000000; };\r\n prng.double = prng;\r\n\r\n // Mix the randomness into accumulated entropy.\r\n mixkey(tostring(arc4.S), pool);\r\n\r\n // Calling convention: what to return as a function of prng, seed, is_math.\r\n return (options.pass || callback ||\r\n function(prng, seed, is_math_call, state) {\r\n if (state) {\r\n // Load the arc4 state from the given state if it has an S array.\r\n if (state.S) { copy(state, arc4); }\r\n // Only provide the .state method if requested via options.state.\r\n prng.state = function() { return copy(arc4, {}); };\r\n }\r\n\r\n // If called as a method of Math (Math.seedrandom()), mutate\r\n // Math.random because that is how seedrandom.js has worked since v1.0.\r\n if (is_math_call) { math[rngname] = prng; return seed; }\r\n\r\n // Otherwise, it is a newer calling convention, so return the\r\n // prng directly.\r\n else return prng;\r\n })(\r\n prng,\r\n shortseed,\r\n 'global' in options ? options.global : (this == math),\r\n options.state);\r\n }\r\n math['seed' + rngname] = seedrandom;\r\n\r\n//\r\n// ARC4\r\n//\r\n// An ARC4 implementation. The constructor takes a key in the form of\r\n// an array of at most (width) integers that should be 0 <= x < (width).\r\n//\r\n// The g(count) method returns a pseudorandom integer that concatenates\r\n// the next (count) outputs from ARC4. Its return value is a number x\r\n// that is in the range 0 <= x < (width ^ count).\r\n//\r\n function ARC4(key) {\r\n var t, keylen = key.length,\r\n me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];\r\n\r\n // The empty key [] is treated as [0].\r\n if (!keylen) { key = [keylen++]; }\r\n\r\n // Set up S using the standard key scheduling algorithm.\r\n while (i < width) {\r\n s[i] = i++;\r\n }\r\n for (i = 0; i < width; i++) {\r\n s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))];\r\n s[j] = t;\r\n }\r\n\r\n // The \"g\" method returns the next (count) outputs as one number.\r\n me.g = function(count) {\r\n // Using instance members instead of closure state nearly doubles speed.\r\n var t, r = 0,\r\n i = me.i, j = me.j, s = me.S;\r\n while (count--) {\r\n t = s[i = mask & (i + 1)];\r\n r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))];\r\n }\r\n me.i = i; me.j = j;\r\n return r;\r\n // For robust unpredictability, the function call below automatically\r\n // discards an initial batch of values. This is called RC4-drop[256].\r\n // See http://google.com/search?q=rsa+fluhrer+response&btnI\r\n };\r\n }\r\n\r\n//\r\n// copy()\r\n// Copies internal state of ARC4 to or from a plain object.\r\n//\r\n function copy(f, t) {\r\n t.i = f.i;\r\n t.j = f.j;\r\n t.S = f.S.slice();\r\n return t;\r\n }\r\n\r\n//\r\n// flatten()\r\n// Converts an object tree to nested arrays of strings.\r\n//\r\n function flatten(obj, depth) {\r\n var result = [], typ = (typeof obj), prop;\r\n if (depth && typ == 'object') {\r\n for (prop in obj) {\r\n try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}\r\n }\r\n }\r\n return (result.length ? result : typ == 'string' ? obj : obj + '\\0');\r\n }\r\n\r\n//\r\n// mixkey()\r\n// Mixes a string seed into a key that is an array of integers, and\r\n// returns a shortened string seed that is equivalent to the result key.\r\n//\r\n function mixkey(seed, key) {\r\n var stringseed = seed + '', smear, j = 0;\r\n while (j < stringseed.length) {\r\n key[mask & j] =\r\n mask & ((smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++));\r\n }\r\n return tostring(key);\r\n }\r\n\r\n//\r\n// autoseed()\r\n// Returns an object for autoseeding, using window.crypto and Node crypto\r\n// module if available.\r\n//\r\n function autoseed() {\r\n try {\r\n if (nodecrypto) { return tostring(nodecrypto.randomBytes(width)); }\r\n var out = new Uint8Array(width);\r\n (global.crypto || global.msCrypto).getRandomValues(out);\r\n return tostring(out);\r\n } catch (e) {\r\n var browser = global.navigator,\r\n plugins = browser && browser.plugins;\r\n return [+new Date(), global, plugins, global.screen, tostring(pool)];\r\n }\r\n }\r\n\r\n//\r\n// tostring()\r\n// Converts an array of charcodes to a string\r\n//\r\n function tostring(a) {\r\n return String.fromCharCode.apply(0, a);\r\n }\r\n\r\n//\r\n// When seedrandom.js is loaded, we immediately mix a few bits\r\n// from the built-in RNG into the entropy pool. Because we do\r\n// not want to interfere with deterministic PRNG state later,\r\n// seedrandom will not call math.random on its own again after\r\n// initialization.\r\n//\r\n mixkey(math.random(), pool);\r\n\r\n//\r\n// Nodejs and AMD support: export the implementation as a module using\r\n// either convention.\r\n//\r\n\r\n// End anonymous scope, and pass initial values.\r\n})(\r\n [], // pool: entropy pool starts empty\r\n BMMath // math: package containing random, pow, and seedrandom\r\n);\r\n/* eslint-disable */\r\nvar BezierFactory = (function () {\r\n /**\r\n * BezierEasing - use bezier curve for transition easing function\r\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\r\n *\r\n * Credits: is based on Firefox's nsSMILKeySpline.cpp\r\n * Usage:\r\n * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])\r\n * spline.get(x) => returns the easing value | x must be in [0, 1] range\r\n *\r\n */\r\n\r\n var ob = {};\r\n ob.getBezierEasing = getBezierEasing;\r\n var beziers = {};\r\n\r\n function getBezierEasing(a, b, c, d, nm) {\r\n var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\\./g, 'p');\r\n if (beziers[str]) {\r\n return beziers[str];\r\n }\r\n var bezEasing = new BezierEasing([a, b, c, d]);\r\n beziers[str] = bezEasing;\r\n return bezEasing;\r\n }\r\n\r\n // These values are established by empiricism with tests (tradeoff: performance VS precision)\r\n var NEWTON_ITERATIONS = 4;\r\n var NEWTON_MIN_SLOPE = 0.001;\r\n var SUBDIVISION_PRECISION = 0.0000001;\r\n var SUBDIVISION_MAX_ITERATIONS = 10;\r\n\r\n var kSplineTableSize = 11;\r\n var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\r\n\r\n var float32ArraySupported = typeof Float32Array === 'function';\r\n\r\n function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }\r\n function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }\r\n function C(aA1) { return 3.0 * aA1; }\r\n\r\n // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\r\n function calcBezier(aT, aA1, aA2) {\r\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\r\n }\r\n\r\n // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\r\n function getSlope(aT, aA1, aA2) {\r\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\r\n }\r\n\r\n function binarySubdivide(aX, aA, aB, mX1, mX2) {\r\n var currentX,\r\n currentT,\r\n i = 0;\r\n do {\r\n currentT = aA + (aB - aA) / 2.0;\r\n currentX = calcBezier(currentT, mX1, mX2) - aX;\r\n if (currentX > 0.0) {\r\n aB = currentT;\r\n } else {\r\n aA = currentT;\r\n }\r\n } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\r\n return currentT;\r\n }\r\n\r\n function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\r\n for (var i = 0; i < NEWTON_ITERATIONS; ++i) {\r\n var currentSlope = getSlope(aGuessT, mX1, mX2);\r\n if (currentSlope === 0.0) return aGuessT;\r\n var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\r\n aGuessT -= currentX / currentSlope;\r\n }\r\n return aGuessT;\r\n }\r\n\r\n /**\r\n * points is an array of [ mX1, mY1, mX2, mY2 ]\r\n */\r\n function BezierEasing(points) {\r\n this._p = points;\r\n this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\r\n this._precomputed = false;\r\n\r\n this.get = this.get.bind(this);\r\n }\r\n\r\n BezierEasing.prototype = {\r\n\r\n get: function (x) {\r\n var mX1 = this._p[0],\r\n mY1 = this._p[1],\r\n mX2 = this._p[2],\r\n mY2 = this._p[3];\r\n if (!this._precomputed) this._precompute();\r\n if (mX1 === mY1 && mX2 === mY2) return x; // linear\r\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\r\n if (x === 0) return 0;\r\n if (x === 1) return 1;\r\n return calcBezier(this._getTForX(x), mY1, mY2);\r\n },\r\n\r\n // Private part\r\n\r\n _precompute: function () {\r\n var mX1 = this._p[0],\r\n mY1 = this._p[1],\r\n mX2 = this._p[2],\r\n mY2 = this._p[3];\r\n this._precomputed = true;\r\n if (mX1 !== mY1 || mX2 !== mY2) { this._calcSampleValues(); }\r\n },\r\n\r\n _calcSampleValues: function () {\r\n var mX1 = this._p[0],\r\n mX2 = this._p[2];\r\n for (var i = 0; i < kSplineTableSize; ++i) {\r\n this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\r\n }\r\n },\r\n\r\n /**\r\n * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.\r\n */\r\n _getTForX: function (aX) {\r\n var mX1 = this._p[0],\r\n mX2 = this._p[2],\r\n mSampleValues = this._mSampleValues;\r\n\r\n var intervalStart = 0.0;\r\n var currentSample = 1;\r\n var lastSample = kSplineTableSize - 1;\r\n\r\n for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {\r\n intervalStart += kSampleStepSize;\r\n }\r\n --currentSample;\r\n\r\n // Interpolate to provide an initial guess for t\r\n var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);\r\n var guessForT = intervalStart + dist * kSampleStepSize;\r\n\r\n var initialSlope = getSlope(guessForT, mX1, mX2);\r\n if (initialSlope >= NEWTON_MIN_SLOPE) {\r\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\r\n } if (initialSlope === 0.0) {\r\n return guessForT;\r\n }\r\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\r\n },\r\n };\r\n\r\n return ob;\r\n}());\r\n\r\n(function () {\r\n var lastTime = 0;\r\n var vendors = ['ms', 'moz', 'webkit', 'o'];\r\n for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { // eslint-disable-line no-plusplus\r\n window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];\r\n window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];\r\n }\r\n if (!window.requestAnimationFrame) {\r\n window.requestAnimationFrame = function (callback) {\r\n var currTime = new Date().getTime();\r\n var timeToCall = Math.max(0, 16 - (currTime - lastTime));\r\n var id = setTimeout(function () {\r\n callback(currTime + timeToCall);\r\n },\r\n timeToCall);\r\n lastTime = currTime + timeToCall;\r\n return id;\r\n };\r\n }\r\n if (!window.cancelAnimationFrame) {\r\n window.cancelAnimationFrame = function (id) {\r\n clearTimeout(id);\r\n };\r\n }\r\n}());\r\n\r\n/* exported extendPrototype, getDescriptor, createProxyFunction */\r\n\r\nfunction extendPrototype(sources, destination) {\r\n var i;\r\n var len = sources.length;\r\n var sourcePrototype;\r\n for (i = 0; i < len; i += 1) {\r\n sourcePrototype = sources[i].prototype;\r\n for (var attr in sourcePrototype) {\r\n if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];\r\n }\r\n }\r\n}\r\n\r\nfunction getDescriptor(object, prop) {\r\n return Object.getOwnPropertyDescriptor(object, prop);\r\n}\r\n\r\nfunction createProxyFunction(prototype) {\r\n function ProxyFunction() {}\r\n ProxyFunction.prototype = prototype;\r\n return ProxyFunction;\r\n}\r\n\r\n/* global segmentsLengthPool, defaultCurveSegments, createSizedArray, bmPow, bmSqrt, bmFloor, createTypedArray, bezierLengthPool */\r\n/* exported bez */\r\n\r\nfunction bezFunction() {\r\n var math = Math;\r\n\r\n function pointOnLine2D(x1, y1, x2, y2, x3, y3) {\r\n var det1 = (x1 * y2) + (y1 * x3) + (x2 * y3) - (x3 * y2) - (y3 * x1) - (x2 * y1);\r\n return det1 > -0.001 && det1 < 0.001;\r\n }\r\n\r\n function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {\r\n if (z1 === 0 && z2 === 0 && z3 === 0) {\r\n return pointOnLine2D(x1, y1, x2, y2, x3, y3);\r\n }\r\n var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));\r\n var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));\r\n var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));\r\n var diffDist;\r\n if (dist1 > dist2) {\r\n if (dist1 > dist3) {\r\n diffDist = dist1 - dist2 - dist3;\r\n } else {\r\n diffDist = dist3 - dist2 - dist1;\r\n }\r\n } else if (dist3 > dist2) {\r\n diffDist = dist3 - dist2 - dist1;\r\n } else {\r\n diffDist = dist2 - dist1 - dist3;\r\n }\r\n return diffDist > -0.0001 && diffDist < 0.0001;\r\n }\r\n\r\n var getBezierLength = (function () {\r\n return function (pt1, pt2, pt3, pt4) {\r\n var curveSegments = defaultCurveSegments;\r\n var k;\r\n var i;\r\n var len;\r\n var ptCoord;\r\n var perc;\r\n var addedLength = 0;\r\n var ptDistance;\r\n var point = [];\r\n var lastPoint = [];\r\n var lengthData = bezierLengthPool.newElement();\r\n len = pt3.length;\r\n for (k = 0; k < curveSegments; k += 1) {\r\n perc = k / (curveSegments - 1);\r\n ptDistance = 0;\r\n for (i = 0; i < len; i += 1) {\r\n ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];\r\n point[i] = ptCoord;\r\n if (lastPoint[i] !== null) {\r\n ptDistance += bmPow(point[i] - lastPoint[i], 2);\r\n }\r\n lastPoint[i] = point[i];\r\n }\r\n if (ptDistance) {\r\n ptDistance = bmSqrt(ptDistance);\r\n addedLength += ptDistance;\r\n }\r\n lengthData.percents[k] = perc;\r\n lengthData.lengths[k] = addedLength;\r\n }\r\n lengthData.addedLength = addedLength;\r\n return lengthData;\r\n };\r\n }());\r\n\r\n function getSegmentsLength(shapeData) {\r\n var segmentsLength = segmentsLengthPool.newElement();\r\n var closed = shapeData.c;\r\n var pathV = shapeData.v;\r\n var pathO = shapeData.o;\r\n var pathI = shapeData.i;\r\n var i;\r\n var len = shapeData._length;\r\n var lengths = segmentsLength.lengths;\r\n var totalLength = 0;\r\n for (i = 0; i < len - 1; i += 1) {\r\n lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);\r\n totalLength += lengths[i].addedLength;\r\n }\r\n if (closed && len) {\r\n lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);\r\n totalLength += lengths[i].addedLength;\r\n }\r\n segmentsLength.totalLength = totalLength;\r\n return segmentsLength;\r\n }\r\n\r\n function BezierData(length) {\r\n this.segmentLength = 0;\r\n this.points = new Array(length);\r\n }\r\n\r\n function PointData(partial, point) {\r\n this.partialLength = partial;\r\n this.point = point;\r\n }\r\n\r\n var buildBezierData = (function () {\r\n var storedData = {};\r\n\r\n return function (pt1, pt2, pt3, pt4) {\r\n var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\\./g, 'p');\r\n if (!storedData[bezierName]) {\r\n var curveSegments = defaultCurveSegments;\r\n var k;\r\n var i;\r\n var len;\r\n var ptCoord;\r\n var perc;\r\n var addedLength = 0;\r\n var ptDistance;\r\n var point;\r\n var lastPoint = null;\r\n if (pt1.length === 2 && (pt1[0] !== pt2[0] || pt1[1] !== pt2[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt1[0] + pt3[0], pt1[1] + pt3[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt2[0] + pt4[0], pt2[1] + pt4[1])) {\r\n curveSegments = 2;\r\n }\r\n var bezierData = new BezierData(curveSegments);\r\n len = pt3.length;\r\n for (k = 0; k < curveSegments; k += 1) {\r\n point = createSizedArray(len);\r\n perc = k / (curveSegments - 1);\r\n ptDistance = 0;\r\n for (i = 0; i < len; i += 1) {\r\n ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];\r\n point[i] = ptCoord;\r\n if (lastPoint !== null) {\r\n ptDistance += bmPow(point[i] - lastPoint[i], 2);\r\n }\r\n }\r\n ptDistance = bmSqrt(ptDistance);\r\n addedLength += ptDistance;\r\n bezierData.points[k] = new PointData(ptDistance, point);\r\n lastPoint = point;\r\n }\r\n bezierData.segmentLength = addedLength;\r\n storedData[bezierName] = bezierData;\r\n }\r\n return storedData[bezierName];\r\n };\r\n }());\r\n\r\n function getDistancePerc(perc, bezierData) {\r\n var percents = bezierData.percents;\r\n var lengths = bezierData.lengths;\r\n var len = percents.length;\r\n var initPos = bmFloor((len - 1) * perc);\r\n var lengthPos = perc * bezierData.addedLength;\r\n var lPerc = 0;\r\n if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {\r\n return percents[initPos];\r\n }\r\n var dir = lengths[initPos] > lengthPos ? -1 : 1;\r\n var flag = true;\r\n while (flag) {\r\n if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {\r\n lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);\r\n flag = false;\r\n } else {\r\n initPos += dir;\r\n }\r\n if (initPos < 0 || initPos >= len - 1) {\r\n // FIX for TypedArrays that don't store floating point values with enough accuracy\r\n if (initPos === len - 1) {\r\n return percents[initPos];\r\n }\r\n flag = false;\r\n }\r\n }\r\n return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;\r\n }\r\n\r\n function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {\r\n var t1 = getDistancePerc(percent, bezierData);\r\n var u1 = 1 - t1;\r\n var ptX = math.round((u1 * u1 * u1 * pt1[0] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[0] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[0] + t1 * t1 * t1 * pt2[0]) * 1000) / 1000;\r\n var ptY = math.round((u1 * u1 * u1 * pt1[1] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[1] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[1] + t1 * t1 * t1 * pt2[1]) * 1000) / 1000;\r\n return [ptX, ptY];\r\n }\r\n\r\n var bezierSegmentPoints = createTypedArray('float32', 8);\r\n\r\n function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {\r\n if (startPerc < 0) {\r\n startPerc = 0;\r\n } else if (startPerc > 1) {\r\n startPerc = 1;\r\n }\r\n var t0 = getDistancePerc(startPerc, bezierData);\r\n endPerc = endPerc > 1 ? 1 : endPerc;\r\n var t1 = getDistancePerc(endPerc, bezierData);\r\n var i;\r\n var len = pt1.length;\r\n var u0 = 1 - t0;\r\n var u1 = 1 - t1;\r\n var u0u0u0 = u0 * u0 * u0;\r\n var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase\r\n var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase\r\n var t0t0t0 = t0 * t0 * t0;\r\n //\r\n var u0u0u1 = u0 * u0 * u1;\r\n var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase\r\n var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase\r\n var t0t0t1 = t0 * t0 * t1;\r\n //\r\n var u0u1u1 = u0 * u1 * u1;\r\n var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase\r\n var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase\r\n var t0t1t1 = t0 * t1 * t1;\r\n //\r\n var u1u1u1 = u1 * u1 * u1;\r\n var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase\r\n var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase\r\n var t1t1t1 = t1 * t1 * t1;\r\n for (i = 0; i < len; i += 1) {\r\n bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\r\n bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\r\n bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\r\n bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\r\n }\r\n\r\n return bezierSegmentPoints;\r\n }\r\n\r\n return {\r\n getSegmentsLength: getSegmentsLength,\r\n getNewSegment: getNewSegment,\r\n getPointInSegment: getPointInSegment,\r\n buildBezierData: buildBezierData,\r\n pointOnLine2D: pointOnLine2D,\r\n pointOnLine3D: pointOnLine3D,\r\n };\r\n}\r\n\r\nvar bez = bezFunction();\r\n\r\n/* global _useWebWorker */\r\n\r\nvar dataManager = (function () {\r\n var _counterId = 1;\r\n var processes = [];\r\n var workerFn;\r\n var workerInstance;\r\n var workerProxy = {\r\n onmessage: function () {\r\n\r\n },\r\n postMessage: function (path) {\r\n workerFn({\r\n data: path,\r\n });\r\n },\r\n };\r\n var _workerSelf = {\r\n postMessage: function (data) {\r\n workerProxy.onmessage({\r\n data: data,\r\n });\r\n },\r\n };\r\n function createWorker(fn) {\r\n if (window.Worker && window.Blob && _useWebWorker) {\r\n var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], { type: 'text/javascript' });\r\n // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });\r\n var url = URL.createObjectURL(blob);\r\n return new Worker(url);\r\n }\r\n workerFn = fn;\r\n return workerProxy;\r\n }\r\n\r\n function setupWorker() {\r\n if (!workerInstance) {\r\n workerInstance = createWorker(function workerStart(e) {\r\n /* exported dataManager */\r\n\r\n function dataFunctionManager() {\r\n // var tCanvasHelper = createTag('canvas').getContext('2d');\r\n\r\n function completeLayers(layers, comps) {\r\n var layerData;\r\n var i;\r\n var len = layers.length;\r\n var j;\r\n var jLen;\r\n var k;\r\n var kLen;\r\n for (i = 0; i < len; i += 1) {\r\n layerData = layers[i];\r\n if (('ks' in layerData) && !layerData.completed) {\r\n layerData.completed = true;\r\n if (layerData.tt) {\r\n layers[i - 1].td = layerData.tt;\r\n }\r\n if (layerData.hasMask) {\r\n var maskProps = layerData.masksProperties;\r\n jLen = maskProps.length;\r\n for (j = 0; j < jLen; j += 1) {\r\n if (maskProps[j].pt.k.i) {\r\n convertPathsToAbsoluteValues(maskProps[j].pt.k);\r\n } else {\r\n kLen = maskProps[j].pt.k.length;\r\n for (k = 0; k < kLen; k += 1) {\r\n if (maskProps[j].pt.k[k].s) {\r\n convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);\r\n }\r\n if (maskProps[j].pt.k[k].e) {\r\n convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (layerData.ty === 0) {\r\n layerData.layers = findCompLayers(layerData.refId, comps);\r\n completeLayers(layerData.layers, comps);\r\n } else if (layerData.ty === 4) {\r\n completeShapes(layerData.shapes);\r\n } else if (layerData.ty === 5) {\r\n completeText(layerData);\r\n }\r\n }\r\n }\r\n }\r\n\r\n function findCompLayers(id, comps) {\r\n var i = 0;\r\n var len = comps.length;\r\n while (i < len) {\r\n if (comps[i].id === id) {\r\n if (!comps[i].layers.__used) {\r\n comps[i].layers.__used = true;\r\n return comps[i].layers;\r\n }\r\n return JSON.parse(JSON.stringify(comps[i].layers));\r\n }\r\n i += 1;\r\n }\r\n return null;\r\n }\r\n\r\n function completeShapes(arr) {\r\n var i;\r\n var len = arr.length;\r\n var j;\r\n var jLen;\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (arr[i].ty === 'sh') {\r\n if (arr[i].ks.k.i) {\r\n convertPathsToAbsoluteValues(arr[i].ks.k);\r\n } else {\r\n jLen = arr[i].ks.k.length;\r\n for (j = 0; j < jLen; j += 1) {\r\n if (arr[i].ks.k[j].s) {\r\n convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);\r\n }\r\n if (arr[i].ks.k[j].e) {\r\n convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);\r\n }\r\n }\r\n }\r\n } else if (arr[i].ty === 'gr') {\r\n completeShapes(arr[i].it);\r\n }\r\n }\r\n }\r\n\r\n function convertPathsToAbsoluteValues(path) {\r\n var i;\r\n var len = path.i.length;\r\n for (i = 0; i < len; i += 1) {\r\n path.i[i][0] += path.v[i][0];\r\n path.i[i][1] += path.v[i][1];\r\n path.o[i][0] += path.v[i][0];\r\n path.o[i][1] += path.v[i][1];\r\n }\r\n }\r\n\r\n function checkVersion(minimum, animVersionString) {\r\n var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];\r\n if (minimum[0] > animVersion[0]) {\r\n return true;\r\n } if (animVersion[0] > minimum[0]) {\r\n return false;\r\n }\r\n if (minimum[1] > animVersion[1]) {\r\n return true;\r\n } if (animVersion[1] > minimum[1]) {\r\n return false;\r\n }\r\n if (minimum[2] > animVersion[2]) {\r\n return true;\r\n } if (animVersion[2] > minimum[2]) {\r\n return false;\r\n }\r\n return null;\r\n }\r\n\r\n var checkText = (function () {\r\n var minimumVersion = [4, 4, 14];\r\n\r\n function updateTextLayer(textLayer) {\r\n var documentData = textLayer.t.d;\r\n textLayer.t.d = {\r\n k: [\r\n {\r\n s: documentData,\r\n t: 0,\r\n },\r\n ],\r\n };\r\n }\r\n\r\n function iterateLayers(layers) {\r\n var i;\r\n var len = layers.length;\r\n for (i = 0; i < len; i += 1) {\r\n if (layers[i].ty === 5) {\r\n updateTextLayer(layers[i]);\r\n }\r\n }\r\n }\r\n\r\n return function (animationData) {\r\n if (checkVersion(minimumVersion, animationData.v)) {\r\n iterateLayers(animationData.layers);\r\n if (animationData.assets) {\r\n var i;\r\n var len = animationData.assets.length;\r\n for (i = 0; i < len; i += 1) {\r\n if (animationData.assets[i].layers) {\r\n iterateLayers(animationData.assets[i].layers);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n }());\r\n\r\n var checkChars = (function () {\r\n var minimumVersion = [4, 7, 99];\r\n return function (animationData) {\r\n if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {\r\n var i;\r\n var len = animationData.chars.length;\r\n var j;\r\n var jLen;\r\n var pathData;\r\n var paths;\r\n for (i = 0; i < len; i += 1) {\r\n if (animationData.chars[i].data && animationData.chars[i].data.shapes) {\r\n paths = animationData.chars[i].data.shapes[0].it;\r\n jLen = paths.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n pathData = paths[j].ks.k;\r\n if (!pathData.__converted) {\r\n convertPathsToAbsoluteValues(paths[j].ks.k);\r\n pathData.__converted = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n };\r\n }());\r\n\r\n var checkPathProperties = (function () {\r\n var minimumVersion = [5, 7, 15];\r\n\r\n function updateTextLayer(textLayer) {\r\n var pathData = textLayer.t.p;\r\n if (typeof pathData.a === 'number') {\r\n pathData.a = {\r\n a: 0,\r\n k: pathData.a,\r\n };\r\n }\r\n if (typeof pathData.p === 'number') {\r\n pathData.p = {\r\n a: 0,\r\n k: pathData.p,\r\n };\r\n }\r\n if (typeof pathData.r === 'number') {\r\n pathData.r = {\r\n a: 0,\r\n k: pathData.r,\r\n };\r\n }\r\n }\r\n\r\n function iterateLayers(layers) {\r\n var i;\r\n var len = layers.length;\r\n for (i = 0; i < len; i += 1) {\r\n if (layers[i].ty === 5) {\r\n updateTextLayer(layers[i]);\r\n }\r\n }\r\n }\r\n\r\n return function (animationData) {\r\n if (checkVersion(minimumVersion, animationData.v)) {\r\n iterateLayers(animationData.layers);\r\n if (animationData.assets) {\r\n var i;\r\n var len = animationData.assets.length;\r\n for (i = 0; i < len; i += 1) {\r\n if (animationData.assets[i].layers) {\r\n iterateLayers(animationData.assets[i].layers);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n }());\r\n\r\n var checkColors = (function () {\r\n var minimumVersion = [4, 1, 9];\r\n\r\n function iterateShapes(shapes) {\r\n var i;\r\n var len = shapes.length;\r\n var j;\r\n var jLen;\r\n for (i = 0; i < len; i += 1) {\r\n if (shapes[i].ty === 'gr') {\r\n iterateShapes(shapes[i].it);\r\n } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {\r\n if (shapes[i].c.k && shapes[i].c.k[0].i) {\r\n jLen = shapes[i].c.k.length;\r\n for (j = 0; j < jLen; j += 1) {\r\n if (shapes[i].c.k[j].s) {\r\n shapes[i].c.k[j].s[0] /= 255;\r\n shapes[i].c.k[j].s[1] /= 255;\r\n shapes[i].c.k[j].s[2] /= 255;\r\n shapes[i].c.k[j].s[3] /= 255;\r\n }\r\n if (shapes[i].c.k[j].e) {\r\n shapes[i].c.k[j].e[0] /= 255;\r\n shapes[i].c.k[j].e[1] /= 255;\r\n shapes[i].c.k[j].e[2] /= 255;\r\n shapes[i].c.k[j].e[3] /= 255;\r\n }\r\n }\r\n } else {\r\n shapes[i].c.k[0] /= 255;\r\n shapes[i].c.k[1] /= 255;\r\n shapes[i].c.k[2] /= 255;\r\n shapes[i].c.k[3] /= 255;\r\n }\r\n }\r\n }\r\n }\r\n\r\n function iterateLayers(layers) {\r\n var i;\r\n var len = layers.length;\r\n for (i = 0; i < len; i += 1) {\r\n if (layers[i].ty === 4) {\r\n iterateShapes(layers[i].shapes);\r\n }\r\n }\r\n }\r\n\r\n return function (animationData) {\r\n if (checkVersion(minimumVersion, animationData.v)) {\r\n iterateLayers(animationData.layers);\r\n if (animationData.assets) {\r\n var i;\r\n var len = animationData.assets.length;\r\n for (i = 0; i < len; i += 1) {\r\n if (animationData.assets[i].layers) {\r\n iterateLayers(animationData.assets[i].layers);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n }());\r\n\r\n var checkShapes = (function () {\r\n var minimumVersion = [4, 4, 18];\r\n\r\n function completeClosingShapes(arr) {\r\n var i;\r\n var len = arr.length;\r\n var j;\r\n var jLen;\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (arr[i].ty === 'sh') {\r\n if (arr[i].ks.k.i) {\r\n arr[i].ks.k.c = arr[i].closed;\r\n } else {\r\n jLen = arr[i].ks.k.length;\r\n for (j = 0; j < jLen; j += 1) {\r\n if (arr[i].ks.k[j].s) {\r\n arr[i].ks.k[j].s[0].c = arr[i].closed;\r\n }\r\n if (arr[i].ks.k[j].e) {\r\n arr[i].ks.k[j].e[0].c = arr[i].closed;\r\n }\r\n }\r\n }\r\n } else if (arr[i].ty === 'gr') {\r\n completeClosingShapes(arr[i].it);\r\n }\r\n }\r\n }\r\n\r\n function iterateLayers(layers) {\r\n var layerData;\r\n var i;\r\n var len = layers.length;\r\n var j;\r\n var jLen;\r\n var k;\r\n var kLen;\r\n for (i = 0; i < len; i += 1) {\r\n layerData = layers[i];\r\n if (layerData.hasMask) {\r\n var maskProps = layerData.masksProperties;\r\n jLen = maskProps.length;\r\n for (j = 0; j < jLen; j += 1) {\r\n if (maskProps[j].pt.k.i) {\r\n maskProps[j].pt.k.c = maskProps[j].cl;\r\n } else {\r\n kLen = maskProps[j].pt.k.length;\r\n for (k = 0; k < kLen; k += 1) {\r\n if (maskProps[j].pt.k[k].s) {\r\n maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;\r\n }\r\n if (maskProps[j].pt.k[k].e) {\r\n maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (layerData.ty === 4) {\r\n completeClosingShapes(layerData.shapes);\r\n }\r\n }\r\n }\r\n\r\n return function (animationData) {\r\n if (checkVersion(minimumVersion, animationData.v)) {\r\n iterateLayers(animationData.layers);\r\n if (animationData.assets) {\r\n var i;\r\n var len = animationData.assets.length;\r\n for (i = 0; i < len; i += 1) {\r\n if (animationData.assets[i].layers) {\r\n iterateLayers(animationData.assets[i].layers);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n }());\r\n\r\n function completeData(animationData) {\r\n if (animationData.__complete) {\r\n return;\r\n }\r\n checkColors(animationData);\r\n checkText(animationData);\r\n checkChars(animationData);\r\n checkPathProperties(animationData);\r\n checkShapes(animationData);\r\n completeLayers(animationData.layers, animationData.assets);\r\n animationData.__complete = true;\r\n }\r\n\r\n function completeText(data) {\r\n if (data.t.a.length === 0 && !('m' in data.t.p)) {\r\n data.singleShape = true;\r\n }\r\n }\r\n\r\n var moduleOb = {};\r\n moduleOb.completeData = completeData;\r\n moduleOb.checkColors = checkColors;\r\n moduleOb.checkChars = checkChars;\r\n moduleOb.checkPathProperties = checkPathProperties;\r\n moduleOb.checkShapes = checkShapes;\r\n moduleOb.completeLayers = completeLayers;\r\n\r\n return moduleOb;\r\n }\r\n if (!_workerSelf.dataManager) {\r\n _workerSelf.dataManager = dataFunctionManager();\r\n }\r\n\r\n /* exported assetLoader */\r\n if (!_workerSelf.assetLoader) {\r\n _workerSelf.assetLoader = (function () {\r\n function formatResponse(xhr) {\r\n // using typeof doubles the time of execution of this method,\r\n // so if available, it's better to use the header to validate the type\r\n var contentTypeHeader = xhr.getResponseHeader('content-type');\r\n if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {\r\n return xhr.response;\r\n }\r\n if (xhr.response && typeof xhr.response === 'object') {\r\n return xhr.response;\r\n } if (xhr.response && typeof xhr.response === 'string') {\r\n return JSON.parse(xhr.response);\r\n } if (xhr.responseText) {\r\n return JSON.parse(xhr.responseText);\r\n }\r\n return null;\r\n }\r\n\r\n function loadAsset(path, fullPath, callback, errorCallback) {\r\n var response;\r\n var xhr = new XMLHttpRequest();\r\n // set responseType after calling open or IE will break.\r\n try {\r\n // This crashes on Android WebView prior to KitKat\r\n xhr.responseType = 'json';\r\n } catch (err) {} // eslint-disable-line no-empty\r\n xhr.onreadystatechange = function () {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 200) {\r\n response = formatResponse(xhr);\r\n callback(response);\r\n } else {\r\n try {\r\n response = formatResponse(xhr);\r\n callback(response);\r\n } catch (err) {\r\n if (errorCallback) {\r\n errorCallback(err);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n try {\r\n xhr.open('GET', path, true);\r\n } catch (error) {\r\n xhr.open('GET', fullPath + '/' + path, true);\r\n }\r\n xhr.send();\r\n }\r\n return {\r\n load: loadAsset,\r\n };\r\n }());\r\n }\r\n\r\n if (e.data.type === 'loadAnimation') {\r\n _workerSelf.assetLoader.load(\r\n e.data.path,\r\n e.data.fullPath,\r\n function (data) {\r\n _workerSelf.dataManager.completeData(data);\r\n _workerSelf.postMessage({\r\n id: e.data.id,\r\n payload: data,\r\n status: 'success',\r\n });\r\n },\r\n function () {\r\n _workerSelf.postMessage({\r\n id: e.data.id,\r\n status: 'error',\r\n });\r\n }\r\n );\r\n } else if (e.data.type === 'complete') {\r\n var animation = e.data.animation;\r\n _workerSelf.dataManager.completeData(animation);\r\n _workerSelf.postMessage({\r\n id: e.data.id,\r\n payload: animation,\r\n status: 'success',\r\n });\r\n } else if (e.data.type === 'loadData') {\r\n _workerSelf.assetLoader.load(\r\n e.data.path,\r\n e.data.fullPath,\r\n function (data) {\r\n _workerSelf.postMessage({\r\n id: e.data.id,\r\n payload: data,\r\n status: 'success',\r\n });\r\n },\r\n function () {\r\n _workerSelf.postMessage({\r\n id: e.data.id,\r\n status: 'error',\r\n });\r\n }\r\n );\r\n }\r\n });\r\n\r\n workerInstance.onmessage = function (event) {\r\n var data = event.data;\r\n var id = data.id;\r\n var process = processes[id];\r\n processes[id] = null;\r\n if (data.status === 'success') {\r\n process.onComplete(data.payload);\r\n } else if (process.onError) {\r\n process.onError();\r\n }\r\n };\r\n }\r\n }\r\n\r\n function createProcess(onComplete, onError) {\r\n _counterId += 1;\r\n var id = 'processId_' + _counterId;\r\n processes[id] = {\r\n onComplete: onComplete,\r\n onError: onError,\r\n };\r\n return id;\r\n }\r\n\r\n function loadAnimation(path, onComplete, onError) {\r\n setupWorker();\r\n var processId = createProcess(onComplete, onError);\r\n workerInstance.postMessage({\r\n type: 'loadAnimation',\r\n path: path,\r\n fullPath: window.location.origin + window.location.pathname,\r\n id: processId,\r\n });\r\n }\r\n\r\n function loadData(path, onComplete, onError) {\r\n setupWorker();\r\n var processId = createProcess(onComplete, onError);\r\n workerInstance.postMessage({\r\n type: 'loadData',\r\n path: path,\r\n fullPath: window.location.origin + window.location.pathname,\r\n id: processId,\r\n });\r\n }\r\n\r\n function completeAnimation(anim, onComplete, onError) {\r\n setupWorker();\r\n var processId = createProcess(onComplete, onError);\r\n workerInstance.postMessage({\r\n type: 'complete',\r\n animation: anim,\r\n id: processId,\r\n });\r\n }\r\n\r\n return {\r\n loadAnimation: loadAnimation,\r\n loadData: loadData,\r\n completeAnimation: completeAnimation,\r\n };\r\n}());\r\n\r\n/* exported getFontProperties */\r\n\r\nfunction getFontProperties(fontData) {\r\n var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];\r\n\r\n var fWeight = 'normal'; var\r\n fStyle = 'normal';\r\n var len = styles.length;\r\n var styleName;\r\n for (var i = 0; i < len; i += 1) {\r\n styleName = styles[i].toLowerCase();\r\n switch (styleName) {\r\n case 'italic':\r\n fStyle = 'italic';\r\n break;\r\n case 'bold':\r\n fWeight = '700';\r\n break;\r\n case 'black':\r\n fWeight = '900';\r\n break;\r\n case 'medium':\r\n fWeight = '500';\r\n break;\r\n case 'regular':\r\n case 'normal':\r\n fWeight = '400';\r\n break;\r\n case 'light':\r\n case 'thin':\r\n fWeight = '200';\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n return {\r\n style: fStyle,\r\n weight: fontData.fWeight || fWeight,\r\n };\r\n}\r\n\r\n/* global createNS, createTag, getFontProperties */\r\n/* exported FontManager */\r\n\r\nvar FontManager = (function () {\r\n var maxWaitingTime = 5000;\r\n var emptyChar = {\r\n w: 0,\r\n size: 0,\r\n shapes: [],\r\n };\r\n var combinedCharacters = [];\r\n // Hindi characters\r\n combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366,\r\n 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379,\r\n 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);\r\n\r\n var surrogateModifiers = [\r\n 'd83cdffb',\r\n 'd83cdffc',\r\n 'd83cdffd',\r\n 'd83cdffe',\r\n 'd83cdfff',\r\n ];\r\n\r\n var zeroWidthJoiner = [65039, 8205];\r\n\r\n function trimFontOptions(font) {\r\n var familyArray = font.split(',');\r\n var i;\r\n var len = familyArray.length;\r\n var enabledFamilies = [];\r\n for (i = 0; i < len; i += 1) {\r\n if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {\r\n enabledFamilies.push(familyArray[i]);\r\n }\r\n }\r\n return enabledFamilies.join(',');\r\n }\r\n\r\n function setUpNode(font, family) {\r\n var parentNode = createTag('span');\r\n // Node is invisible to screen readers.\r\n parentNode.setAttribute('aria-hidden', true);\r\n parentNode.style.fontFamily = family;\r\n var node = createTag('span');\r\n // Characters that vary significantly among different fonts\r\n node.innerText = 'giItT1WQy@!-/#';\r\n // Visible - so we can measure it - but not on the screen\r\n parentNode.style.position = 'absolute';\r\n parentNode.style.left = '-10000px';\r\n parentNode.style.top = '-10000px';\r\n // Large font size makes even subtle changes obvious\r\n parentNode.style.fontSize = '300px';\r\n // Reset any font properties\r\n parentNode.style.fontVariant = 'normal';\r\n parentNode.style.fontStyle = 'normal';\r\n parentNode.style.fontWeight = 'normal';\r\n parentNode.style.letterSpacing = '0';\r\n parentNode.appendChild(node);\r\n document.body.appendChild(parentNode);\r\n\r\n // Remember width with no applied web font\r\n var width = node.offsetWidth;\r\n node.style.fontFamily = trimFontOptions(font) + ', ' + family;\r\n return { node: node, w: width, parent: parentNode };\r\n }\r\n\r\n function checkLoadedFonts() {\r\n var i;\r\n var len = this.fonts.length;\r\n var node;\r\n var w;\r\n var loadedCount = len;\r\n for (i = 0; i < len; i += 1) {\r\n if (this.fonts[i].loaded) {\r\n loadedCount -= 1;\r\n } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {\r\n this.fonts[i].loaded = true;\r\n } else {\r\n node = this.fonts[i].monoCase.node;\r\n w = this.fonts[i].monoCase.w;\r\n if (node.offsetWidth !== w) {\r\n loadedCount -= 1;\r\n this.fonts[i].loaded = true;\r\n } else {\r\n node = this.fonts[i].sansCase.node;\r\n w = this.fonts[i].sansCase.w;\r\n if (node.offsetWidth !== w) {\r\n loadedCount -= 1;\r\n this.fonts[i].loaded = true;\r\n }\r\n }\r\n if (this.fonts[i].loaded) {\r\n this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);\r\n this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);\r\n }\r\n }\r\n }\r\n\r\n if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {\r\n setTimeout(this.checkLoadedFontsBinded, 20);\r\n } else {\r\n setTimeout(this.setIsLoadedBinded, 10);\r\n }\r\n }\r\n\r\n function createHelper(def, fontData) {\r\n var tHelper = createNS('text');\r\n tHelper.style.fontSize = '100px';\r\n // tHelper.style.fontFamily = fontData.fFamily;\r\n\r\n var fontProps = getFontProperties(fontData);\r\n tHelper.setAttribute('font-family', fontData.fFamily);\r\n tHelper.setAttribute('font-style', fontProps.style);\r\n tHelper.setAttribute('font-weight', fontProps.weight);\r\n tHelper.textContent = '1';\r\n if (fontData.fClass) {\r\n tHelper.style.fontFamily = 'inherit';\r\n tHelper.setAttribute('class', fontData.fClass);\r\n } else {\r\n tHelper.style.fontFamily = fontData.fFamily;\r\n }\r\n def.appendChild(tHelper);\r\n var tCanvasHelper = createTag('canvas').getContext('2d');\r\n tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily;\r\n // tCanvasHelper.font = ' 100px '+ fontData.fFamily;\r\n return tHelper;\r\n }\r\n\r\n function addFonts(fontData, defs) {\r\n if (!fontData) {\r\n this.isLoaded = true;\r\n return;\r\n }\r\n if (this.chars) {\r\n this.isLoaded = true;\r\n this.fonts = fontData.list;\r\n return;\r\n }\r\n\r\n var fontArr = fontData.list;\r\n var i;\r\n var len = fontArr.length;\r\n var _pendingFonts = len;\r\n for (i = 0; i < len; i += 1) {\r\n var shouldLoadFont = true;\r\n var loadedSelector;\r\n var j;\r\n fontArr[i].loaded = false;\r\n fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');\r\n fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');\r\n if (!fontArr[i].fPath) {\r\n fontArr[i].loaded = true;\r\n _pendingFonts -= 1;\r\n } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {\r\n loadedSelector = document.querySelectorAll('style[f-forigin=\"p\"][f-family=\"' + fontArr[i].fFamily + '\"], style[f-origin=\"3\"][f-family=\"' + fontArr[i].fFamily + '\"]');\r\n\r\n if (loadedSelector.length > 0) {\r\n shouldLoadFont = false;\r\n }\r\n\r\n if (shouldLoadFont) {\r\n var s = createTag('style');\r\n s.setAttribute('f-forigin', fontArr[i].fOrigin);\r\n s.setAttribute('f-origin', fontArr[i].origin);\r\n s.setAttribute('f-family', fontArr[i].fFamily);\r\n s.type = 'text/css';\r\n s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + \"; font-style: normal; src: url('\" + fontArr[i].fPath + \"');}\";\r\n defs.appendChild(s);\r\n }\r\n } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {\r\n loadedSelector = document.querySelectorAll('link[f-forigin=\"g\"], link[f-origin=\"1\"]');\r\n\r\n for (j = 0; j < loadedSelector.length; j += 1) {\r\n if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {\r\n // Font is already loaded\r\n shouldLoadFont = false;\r\n }\r\n }\r\n\r\n if (shouldLoadFont) {\r\n var l = createTag('link');\r\n l.setAttribute('f-forigin', fontArr[i].fOrigin);\r\n l.setAttribute('f-origin', fontArr[i].origin);\r\n l.type = 'text/css';\r\n l.rel = 'stylesheet';\r\n l.href = fontArr[i].fPath;\r\n document.body.appendChild(l);\r\n }\r\n } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {\r\n loadedSelector = document.querySelectorAll('script[f-forigin=\"t\"], script[f-origin=\"2\"]');\r\n\r\n for (j = 0; j < loadedSelector.length; j += 1) {\r\n if (fontArr[i].fPath === loadedSelector[j].src) {\r\n // Font is already loaded\r\n shouldLoadFont = false;\r\n }\r\n }\r\n\r\n if (shouldLoadFont) {\r\n var sc = createTag('link');\r\n sc.setAttribute('f-forigin', fontArr[i].fOrigin);\r\n sc.setAttribute('f-origin', fontArr[i].origin);\r\n sc.setAttribute('rel', 'stylesheet');\r\n sc.setAttribute('href', fontArr[i].fPath);\r\n defs.appendChild(sc);\r\n }\r\n }\r\n fontArr[i].helper = createHelper(defs, fontArr[i]);\r\n fontArr[i].cache = {};\r\n this.fonts.push(fontArr[i]);\r\n }\r\n if (_pendingFonts === 0) {\r\n this.isLoaded = true;\r\n } else {\r\n // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.\r\n // Adding this timeout seems to fix it\r\n setTimeout(this.checkLoadedFonts.bind(this), 100);\r\n }\r\n }\r\n\r\n function addChars(chars) {\r\n if (!chars) {\r\n return;\r\n }\r\n if (!this.chars) {\r\n this.chars = [];\r\n }\r\n var i;\r\n var len = chars.length;\r\n var j;\r\n var jLen = this.chars.length;\r\n var found;\r\n for (i = 0; i < len; i += 1) {\r\n j = 0;\r\n found = false;\r\n while (j < jLen) {\r\n if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {\r\n found = true;\r\n }\r\n j += 1;\r\n }\r\n if (!found) {\r\n this.chars.push(chars[i]);\r\n jLen += 1;\r\n }\r\n }\r\n }\r\n\r\n function getCharData(char, style, font) {\r\n var i = 0;\r\n var len = this.chars.length;\r\n while (i < len) {\r\n if (this.chars[i].ch === char && this.chars[i].style === style && this.chars[i].fFamily === font) {\r\n return this.chars[i];\r\n }\r\n i += 1;\r\n }\r\n if (((typeof char === 'string' && char.charCodeAt(0) !== 13) || !char)\r\n && console\r\n && console.warn // eslint-disable-line no-console\r\n && !this._warned\r\n ) {\r\n this._warned = true;\r\n console.warn('Missing character from exported characters list: ', char, style, font); // eslint-disable-line no-console\r\n }\r\n return emptyChar;\r\n }\r\n\r\n function measureText(char, fontName, size) {\r\n var fontData = this.getFontByName(fontName);\r\n var index = char.charCodeAt(0);\r\n if (!fontData.cache[index + 1]) {\r\n var tHelper = fontData.helper;\r\n // Canvas version\r\n // fontData.cache[index] = tHelper.measureText(char).width / 100;\r\n // SVG version\r\n // console.log(tHelper.getBBox().width)\r\n if (char === ' ') {\r\n tHelper.textContent = '|' + char + '|';\r\n var doubleSize = tHelper.getComputedTextLength();\r\n tHelper.textContent = '||';\r\n var singleSize = tHelper.getComputedTextLength();\r\n fontData.cache[index + 1] = (doubleSize - singleSize) / 100;\r\n } else {\r\n tHelper.textContent = char;\r\n fontData.cache[index + 1] = (tHelper.getComputedTextLength()) / 100;\r\n }\r\n }\r\n return fontData.cache[index + 1] * size;\r\n }\r\n\r\n function getFontByName(name) {\r\n var i = 0;\r\n var len = this.fonts.length;\r\n while (i < len) {\r\n if (this.fonts[i].fName === name) {\r\n return this.fonts[i];\r\n }\r\n i += 1;\r\n }\r\n return this.fonts[0];\r\n }\r\n\r\n function isModifier(firstCharCode, secondCharCode) {\r\n var sum = firstCharCode.toString(16) + secondCharCode.toString(16);\r\n return surrogateModifiers.indexOf(sum) !== -1;\r\n }\r\n\r\n function isZeroWidthJoiner(firstCharCode, secondCharCode) {\r\n if (!secondCharCode) {\r\n return firstCharCode === zeroWidthJoiner[1];\r\n }\r\n return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];\r\n }\r\n\r\n function isCombinedCharacter(char) {\r\n return combinedCharacters.indexOf(char) !== -1;\r\n }\r\n\r\n function setIsLoaded() {\r\n this.isLoaded = true;\r\n }\r\n\r\n var Font = function () {\r\n this.fonts = [];\r\n this.chars = null;\r\n this.typekitLoaded = 0;\r\n this.isLoaded = false;\r\n this._warned = false;\r\n this.initTime = Date.now();\r\n this.setIsLoadedBinded = this.setIsLoaded.bind(this);\r\n this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);\r\n };\r\n Font.isModifier = isModifier;\r\n Font.isZeroWidthJoiner = isZeroWidthJoiner;\r\n Font.isCombinedCharacter = isCombinedCharacter;\r\n\r\n var fontPrototype = {\r\n addChars: addChars,\r\n addFonts: addFonts,\r\n getCharData: getCharData,\r\n getFontByName: getFontByName,\r\n measureText: measureText,\r\n checkLoadedFonts: checkLoadedFonts,\r\n setIsLoaded: setIsLoaded,\r\n };\r\n\r\n Font.prototype = fontPrototype;\r\n\r\n return Font;\r\n}());\r\n\r\n/* global initialDefaultFrame, BezierFactory, degToRads, bez, createTypedArray */\r\n/* exported PropertyFactory */\r\n\r\nvar PropertyFactory = (function () {\r\n var initFrame = initialDefaultFrame;\r\n var mathAbs = Math.abs;\r\n\r\n function interpolateValue(frameNum, caching) {\r\n var offsetTime = this.offsetTime;\r\n var newValue;\r\n if (this.propType === 'multidimensional') {\r\n newValue = createTypedArray('float32', this.pv.length);\r\n }\r\n var iterationIndex = caching.lastIndex;\r\n var i = iterationIndex;\r\n var len = this.keyframes.length - 1;\r\n var flag = true;\r\n var keyData;\r\n var nextKeyData;\r\n var keyframeMetadata;\r\n\r\n while (flag) {\r\n keyData = this.keyframes[i];\r\n nextKeyData = this.keyframes[i + 1];\r\n if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {\r\n if (keyData.h) {\r\n keyData = nextKeyData;\r\n }\r\n iterationIndex = 0;\r\n break;\r\n }\r\n if ((nextKeyData.t - offsetTime) > frameNum) {\r\n iterationIndex = i;\r\n break;\r\n }\r\n if (i < len - 1) {\r\n i += 1;\r\n } else {\r\n iterationIndex = 0;\r\n flag = false;\r\n }\r\n }\r\n keyframeMetadata = this.keyframesMetadata[i] || {};\r\n\r\n var k;\r\n var kLen;\r\n var perc;\r\n var jLen;\r\n var j;\r\n var fnc;\r\n var nextKeyTime = nextKeyData.t - offsetTime;\r\n var keyTime = keyData.t - offsetTime;\r\n var endValue;\r\n if (keyData.to) {\r\n if (!keyframeMetadata.bezierData) {\r\n keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);\r\n }\r\n var bezierData = keyframeMetadata.bezierData;\r\n if (frameNum >= nextKeyTime || frameNum < keyTime) {\r\n var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;\r\n kLen = bezierData.points[ind].point.length;\r\n for (k = 0; k < kLen; k += 1) {\r\n newValue[k] = bezierData.points[ind].point[k];\r\n }\r\n // caching._lastKeyframeIndex = -1;\r\n } else {\r\n if (keyframeMetadata.__fnct) {\r\n fnc = keyframeMetadata.__fnct;\r\n } else {\r\n fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;\r\n keyframeMetadata.__fnct = fnc;\r\n }\r\n perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));\r\n var distanceInLine = bezierData.segmentLength * perc;\r\n\r\n var segmentPerc;\r\n var addedLength = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastAddedLength : 0;\r\n j = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastPoint : 0;\r\n flag = true;\r\n jLen = bezierData.points.length;\r\n while (flag) {\r\n addedLength += bezierData.points[j].partialLength;\r\n if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {\r\n kLen = bezierData.points[j].point.length;\r\n for (k = 0; k < kLen; k += 1) {\r\n newValue[k] = bezierData.points[j].point[k];\r\n }\r\n break;\r\n } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {\r\n segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;\r\n kLen = bezierData.points[j].point.length;\r\n for (k = 0; k < kLen; k += 1) {\r\n newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;\r\n }\r\n break;\r\n }\r\n if (j < jLen - 1) {\r\n j += 1;\r\n } else {\r\n flag = false;\r\n }\r\n }\r\n caching._lastPoint = j;\r\n caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;\r\n caching._lastKeyframeIndex = i;\r\n }\r\n } else {\r\n var outX;\r\n var outY;\r\n var inX;\r\n var inY;\r\n var keyValue;\r\n len = keyData.s.length;\r\n endValue = nextKeyData.s || keyData.e;\r\n if (this.sh && keyData.h !== 1) {\r\n if (frameNum >= nextKeyTime) {\r\n newValue[0] = endValue[0];\r\n newValue[1] = endValue[1];\r\n newValue[2] = endValue[2];\r\n } else if (frameNum <= keyTime) {\r\n newValue[0] = keyData.s[0];\r\n newValue[1] = keyData.s[1];\r\n newValue[2] = keyData.s[2];\r\n } else {\r\n var quatStart = createQuaternion(keyData.s);\r\n var quatEnd = createQuaternion(endValue);\r\n var time = (frameNum - keyTime) / (nextKeyTime - keyTime);\r\n quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));\r\n }\r\n } else {\r\n for (i = 0; i < len; i += 1) {\r\n if (keyData.h !== 1) {\r\n if (frameNum >= nextKeyTime) {\r\n perc = 1;\r\n } else if (frameNum < keyTime) {\r\n perc = 0;\r\n } else {\r\n if (keyData.o.x.constructor === Array) {\r\n if (!keyframeMetadata.__fnct) {\r\n keyframeMetadata.__fnct = [];\r\n }\r\n if (!keyframeMetadata.__fnct[i]) {\r\n outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];\r\n outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];\r\n inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];\r\n inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];\r\n fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;\r\n keyframeMetadata.__fnct[i] = fnc;\r\n } else {\r\n fnc = keyframeMetadata.__fnct[i];\r\n }\r\n } else if (!keyframeMetadata.__fnct) {\r\n outX = keyData.o.x;\r\n outY = keyData.o.y;\r\n inX = keyData.i.x;\r\n inY = keyData.i.y;\r\n fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;\r\n keyData.keyframeMetadata = fnc;\r\n } else {\r\n fnc = keyframeMetadata.__fnct;\r\n }\r\n perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));\r\n }\r\n }\r\n\r\n endValue = nextKeyData.s || keyData.e;\r\n keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;\r\n\r\n if (this.propType === 'multidimensional') {\r\n newValue[i] = keyValue;\r\n } else {\r\n newValue = keyValue;\r\n }\r\n }\r\n }\r\n }\r\n caching.lastIndex = iterationIndex;\r\n return newValue;\r\n }\r\n\r\n // based on @Toji's https://github.com/toji/gl-matrix/\r\n function slerp(a, b, t) {\r\n var out = [];\r\n var ax = a[0];\r\n var ay = a[1];\r\n var az = a[2];\r\n var aw = a[3];\r\n var bx = b[0];\r\n var by = b[1];\r\n var bz = b[2];\r\n var bw = b[3];\r\n\r\n var omega;\r\n var cosom;\r\n var sinom;\r\n var scale0;\r\n var scale1;\r\n\r\n cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n if (cosom < 0.0) {\r\n cosom = -cosom;\r\n bx = -bx;\r\n by = -by;\r\n bz = -bz;\r\n bw = -bw;\r\n }\r\n if ((1.0 - cosom) > 0.000001) {\r\n omega = Math.acos(cosom);\r\n sinom = Math.sin(omega);\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n } else {\r\n scale0 = 1.0 - t;\r\n scale1 = t;\r\n }\r\n out[0] = scale0 * ax + scale1 * bx;\r\n out[1] = scale0 * ay + scale1 * by;\r\n out[2] = scale0 * az + scale1 * bz;\r\n out[3] = scale0 * aw + scale1 * bw;\r\n\r\n return out;\r\n }\r\n\r\n function quaternionToEuler(out, quat) {\r\n var qx = quat[0];\r\n var qy = quat[1];\r\n var qz = quat[2];\r\n var qw = quat[3];\r\n var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);\r\n var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);\r\n var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);\r\n out[0] = heading / degToRads;\r\n out[1] = attitude / degToRads;\r\n out[2] = bank / degToRads;\r\n }\r\n\r\n function createQuaternion(values) {\r\n var heading = values[0] * degToRads;\r\n var attitude = values[1] * degToRads;\r\n var bank = values[2] * degToRads;\r\n var c1 = Math.cos(heading / 2);\r\n var c2 = Math.cos(attitude / 2);\r\n var c3 = Math.cos(bank / 2);\r\n var s1 = Math.sin(heading / 2);\r\n var s2 = Math.sin(attitude / 2);\r\n var s3 = Math.sin(bank / 2);\r\n var w = c1 * c2 * c3 - s1 * s2 * s3;\r\n var x = s1 * s2 * c3 + c1 * c2 * s3;\r\n var y = s1 * c2 * c3 + c1 * s2 * s3;\r\n var z = c1 * s2 * c3 - s1 * c2 * s3;\r\n\r\n return [x, y, z, w];\r\n }\r\n\r\n function getValueAtCurrentTime() {\r\n var frameNum = this.comp.renderedFrame - this.offsetTime;\r\n var initTime = this.keyframes[0].t - this.offsetTime;\r\n var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;\r\n if (!(frameNum === this._caching.lastFrame || (this._caching.lastFrame !== initFrame && ((this._caching.lastFrame >= endTime && frameNum >= endTime) || (this._caching.lastFrame < initTime && frameNum < initTime))))) {\r\n if (this._caching.lastFrame >= frameNum) {\r\n this._caching._lastKeyframeIndex = -1;\r\n this._caching.lastIndex = 0;\r\n }\r\n\r\n var renderResult = this.interpolateValue(frameNum, this._caching);\r\n this.pv = renderResult;\r\n }\r\n this._caching.lastFrame = frameNum;\r\n return this.pv;\r\n }\r\n\r\n function setVValue(val) {\r\n var multipliedValue;\r\n if (this.propType === 'unidimensional') {\r\n multipliedValue = val * this.mult;\r\n if (mathAbs(this.v - multipliedValue) > 0.00001) {\r\n this.v = multipliedValue;\r\n this._mdf = true;\r\n }\r\n } else {\r\n var i = 0;\r\n var len = this.v.length;\r\n while (i < len) {\r\n multipliedValue = val[i] * this.mult;\r\n if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {\r\n this.v[i] = multipliedValue;\r\n this._mdf = true;\r\n }\r\n i += 1;\r\n }\r\n }\r\n }\r\n\r\n function processEffectsSequence() {\r\n if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {\r\n return;\r\n }\r\n if (this.lock) {\r\n this.setVValue(this.pv);\r\n return;\r\n }\r\n this.lock = true;\r\n this._mdf = this._isFirstFrame;\r\n var i;\r\n var len = this.effectsSequence.length;\r\n var finalValue = this.kf ? this.pv : this.data.k;\r\n for (i = 0; i < len; i += 1) {\r\n finalValue = this.effectsSequence[i](finalValue);\r\n }\r\n this.setVValue(finalValue);\r\n this._isFirstFrame = false;\r\n this.lock = false;\r\n this.frameId = this.elem.globalData.frameId;\r\n }\r\n\r\n function addEffect(effectFunction) {\r\n this.effectsSequence.push(effectFunction);\r\n this.container.addDynamicProperty(this);\r\n }\r\n\r\n function ValueProperty(elem, data, mult, container) {\r\n this.propType = 'unidimensional';\r\n this.mult = mult || 1;\r\n this.data = data;\r\n this.v = mult ? data.k * mult : data.k;\r\n this.pv = data.k;\r\n this._mdf = false;\r\n this.elem = elem;\r\n this.container = container;\r\n this.comp = elem.comp;\r\n this.k = false;\r\n this.kf = false;\r\n this.vel = 0;\r\n this.effectsSequence = [];\r\n this._isFirstFrame = true;\r\n this.getValue = processEffectsSequence;\r\n this.setVValue = setVValue;\r\n this.addEffect = addEffect;\r\n }\r\n\r\n function MultiDimensionalProperty(elem, data, mult, container) {\r\n this.propType = 'multidimensional';\r\n this.mult = mult || 1;\r\n this.data = data;\r\n this._mdf = false;\r\n this.elem = elem;\r\n this.container = container;\r\n this.comp = elem.comp;\r\n this.k = false;\r\n this.kf = false;\r\n this.frameId = -1;\r\n var i;\r\n var len = data.k.length;\r\n this.v = createTypedArray('float32', len);\r\n this.pv = createTypedArray('float32', len);\r\n this.vel = createTypedArray('float32', len);\r\n for (i = 0; i < len; i += 1) {\r\n this.v[i] = data.k[i] * this.mult;\r\n this.pv[i] = data.k[i];\r\n }\r\n this._isFirstFrame = true;\r\n this.effectsSequence = [];\r\n this.getValue = processEffectsSequence;\r\n this.setVValue = setVValue;\r\n this.addEffect = addEffect;\r\n }\r\n\r\n function KeyframedValueProperty(elem, data, mult, container) {\r\n this.propType = 'unidimensional';\r\n this.keyframes = data.k;\r\n this.keyframesMetadata = [];\r\n this.offsetTime = elem.data.st;\r\n this.frameId = -1;\r\n this._caching = {\r\n lastFrame: initFrame, lastIndex: 0, value: 0, _lastKeyframeIndex: -1,\r\n };\r\n this.k = true;\r\n this.kf = true;\r\n this.data = data;\r\n this.mult = mult || 1;\r\n this.elem = elem;\r\n this.container = container;\r\n this.comp = elem.comp;\r\n this.v = initFrame;\r\n this.pv = initFrame;\r\n this._isFirstFrame = true;\r\n this.getValue = processEffectsSequence;\r\n this.setVValue = setVValue;\r\n this.interpolateValue = interpolateValue;\r\n this.effectsSequence = [getValueAtCurrentTime.bind(this)];\r\n this.addEffect = addEffect;\r\n }\r\n\r\n function KeyframedMultidimensionalProperty(elem, data, mult, container) {\r\n this.propType = 'multidimensional';\r\n var i;\r\n var len = data.k.length;\r\n var s;\r\n var e;\r\n var to;\r\n var ti;\r\n for (i = 0; i < len - 1; i += 1) {\r\n if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {\r\n s = data.k[i].s;\r\n e = data.k[i + 1].s;\r\n to = data.k[i].to;\r\n ti = data.k[i].ti;\r\n if ((s.length === 2 && !(s[0] === e[0] && s[1] === e[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], s[0] + to[0], s[1] + to[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], e[0] + ti[0], e[1] + ti[1])) || (s.length === 3 && !(s[0] === e[0] && s[1] === e[1] && s[2] === e[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], s[0] + to[0], s[1] + to[1], s[2] + to[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], e[0] + ti[0], e[1] + ti[1], e[2] + ti[2]))) {\r\n data.k[i].to = null;\r\n data.k[i].ti = null;\r\n }\r\n if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {\r\n if (s.length === 2 || (s[2] === e[2] && to[2] === 0 && ti[2] === 0)) {\r\n data.k[i].to = null;\r\n data.k[i].ti = null;\r\n }\r\n }\r\n }\r\n }\r\n this.effectsSequence = [getValueAtCurrentTime.bind(this)];\r\n this.data = data;\r\n this.keyframes = data.k;\r\n this.keyframesMetadata = [];\r\n this.offsetTime = elem.data.st;\r\n this.k = true;\r\n this.kf = true;\r\n this._isFirstFrame = true;\r\n this.mult = mult || 1;\r\n this.elem = elem;\r\n this.container = container;\r\n this.comp = elem.comp;\r\n this.getValue = processEffectsSequence;\r\n this.setVValue = setVValue;\r\n this.interpolateValue = interpolateValue;\r\n this.frameId = -1;\r\n var arrLen = data.k[0].s.length;\r\n this.v = createTypedArray('float32', arrLen);\r\n this.pv = createTypedArray('float32', arrLen);\r\n for (i = 0; i < arrLen; i += 1) {\r\n this.v[i] = initFrame;\r\n this.pv[i] = initFrame;\r\n }\r\n this._caching = { lastFrame: initFrame, lastIndex: 0, value: createTypedArray('float32', arrLen) };\r\n this.addEffect = addEffect;\r\n }\r\n\r\n function getProp(elem, data, type, mult, container) {\r\n var p;\r\n if (!data.k.length) {\r\n p = new ValueProperty(elem, data, mult, container);\r\n } else if (typeof (data.k[0]) === 'number') {\r\n p = new MultiDimensionalProperty(elem, data, mult, container);\r\n } else {\r\n switch (type) {\r\n case 0:\r\n p = new KeyframedValueProperty(elem, data, mult, container);\r\n break;\r\n case 1:\r\n p = new KeyframedMultidimensionalProperty(elem, data, mult, container);\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n if (p.effectsSequence.length) {\r\n container.addDynamicProperty(p);\r\n }\r\n return p;\r\n }\r\n\r\n var ob = {\r\n getProp: getProp,\r\n };\r\n return ob;\r\n}());\r\n\r\n/* global Matrix, degToRads, PropertyFactory, extendPrototype, DynamicPropertyContainer */\r\n/* exported TransformPropertyFactory */\r\n\r\nvar TransformPropertyFactory = (function () {\r\n var defaultVector = [0, 0];\r\n\r\n function applyToMatrix(mat) {\r\n var _mdf = this._mdf;\r\n this.iterateDynamicProperties();\r\n this._mdf = this._mdf || _mdf;\r\n if (this.a) {\r\n mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\r\n }\r\n if (this.s) {\r\n mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\r\n }\r\n if (this.sk) {\r\n mat.skewFromAxis(-this.sk.v, this.sa.v);\r\n }\r\n if (this.r) {\r\n mat.rotate(-this.r.v);\r\n } else {\r\n mat.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2])\r\n .rotateY(this.or.v[1])\r\n .rotateX(this.or.v[0]);\r\n }\r\n if (this.data.p.s) {\r\n if (this.data.p.z) {\r\n mat.translate(this.px.v, this.py.v, -this.pz.v);\r\n } else {\r\n mat.translate(this.px.v, this.py.v, 0);\r\n }\r\n } else {\r\n mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);\r\n }\r\n }\r\n function processKeys(forceRender) {\r\n if (this.elem.globalData.frameId === this.frameId) {\r\n return;\r\n }\r\n if (this._isDirty) {\r\n this.precalculateMatrix();\r\n this._isDirty = false;\r\n }\r\n\r\n this.iterateDynamicProperties();\r\n\r\n if (this._mdf || forceRender) {\r\n var frameRate;\r\n this.v.cloneFromProps(this.pre.props);\r\n if (this.appliedTransformations < 1) {\r\n this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\r\n }\r\n if (this.appliedTransformations < 2) {\r\n this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\r\n }\r\n if (this.sk && this.appliedTransformations < 3) {\r\n this.v.skewFromAxis(-this.sk.v, this.sa.v);\r\n }\r\n if (this.r && this.appliedTransformations < 4) {\r\n this.v.rotate(-this.r.v);\r\n } else if (!this.r && this.appliedTransformations < 4) {\r\n this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2])\r\n .rotateY(this.or.v[1])\r\n .rotateX(this.or.v[0]);\r\n }\r\n if (this.autoOriented) {\r\n var v1;\r\n var v2;\r\n frameRate = this.elem.globalData.frameRate;\r\n if (this.p && this.p.keyframes && this.p.getValueAtTime) {\r\n if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {\r\n v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);\r\n v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);\r\n } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {\r\n v1 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t / frameRate), 0);\r\n v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);\r\n } else {\r\n v1 = this.p.pv;\r\n v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);\r\n }\r\n } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {\r\n v1 = [];\r\n v2 = [];\r\n var px = this.px;\r\n var py = this.py;\r\n if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {\r\n v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);\r\n v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);\r\n v2[0] = px.getValueAtTime((px.keyframes[0].t) / frameRate, 0);\r\n v2[1] = py.getValueAtTime((py.keyframes[0].t) / frameRate, 0);\r\n } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {\r\n v1[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t / frameRate), 0);\r\n v1[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t / frameRate), 0);\r\n v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);\r\n v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);\r\n } else {\r\n v1 = [px.pv, py.pv];\r\n v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);\r\n v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);\r\n }\r\n } else {\r\n v2 = defaultVector;\r\n v1 = v2;\r\n }\r\n this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));\r\n }\r\n if (this.data.p && this.data.p.s) {\r\n if (this.data.p.z) {\r\n this.v.translate(this.px.v, this.py.v, -this.pz.v);\r\n } else {\r\n this.v.translate(this.px.v, this.py.v, 0);\r\n }\r\n } else {\r\n this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);\r\n }\r\n }\r\n this.frameId = this.elem.globalData.frameId;\r\n }\r\n\r\n function precalculateMatrix() {\r\n if (!this.a.k) {\r\n this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\r\n this.appliedTransformations = 1;\r\n } else {\r\n return;\r\n }\r\n if (!this.s.effectsSequence.length) {\r\n this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\r\n this.appliedTransformations = 2;\r\n } else {\r\n return;\r\n }\r\n if (this.sk) {\r\n if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {\r\n this.pre.skewFromAxis(-this.sk.v, this.sa.v);\r\n this.appliedTransformations = 3;\r\n } else {\r\n return;\r\n }\r\n }\r\n if (this.r) {\r\n if (!this.r.effectsSequence.length) {\r\n this.pre.rotate(-this.r.v);\r\n this.appliedTransformations = 4;\r\n }\r\n } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {\r\n this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2])\r\n .rotateY(this.or.v[1])\r\n .rotateX(this.or.v[0]);\r\n this.appliedTransformations = 4;\r\n }\r\n }\r\n\r\n function autoOrient() {\r\n //\r\n // var prevP = this.getValueAtTime();\r\n }\r\n\r\n function addDynamicProperty(prop) {\r\n this._addDynamicProperty(prop);\r\n this.elem.addDynamicProperty(prop);\r\n this._isDirty = true;\r\n }\r\n\r\n function TransformProperty(elem, data, container) {\r\n this.elem = elem;\r\n this.frameId = -1;\r\n this.propType = 'transform';\r\n this.data = data;\r\n this.v = new Matrix();\r\n // Precalculated matrix with non animated properties\r\n this.pre = new Matrix();\r\n this.appliedTransformations = 0;\r\n this.initDynamicPropertyContainer(container || elem);\r\n if (data.p && data.p.s) {\r\n this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);\r\n this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);\r\n if (data.p.z) {\r\n this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);\r\n }\r\n } else {\r\n this.p = PropertyFactory.getProp(elem, data.p || { k: [0, 0, 0] }, 1, 0, this);\r\n }\r\n if (data.rx) {\r\n this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);\r\n this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);\r\n this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);\r\n if (data.or.k[0].ti) {\r\n var i;\r\n var len = data.or.k.length;\r\n for (i = 0; i < len; i += 1) {\r\n data.or.k[i].to = null;\r\n data.or.k[i].ti = null;\r\n }\r\n }\r\n this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this);\r\n // sh Indicates it needs to be capped between -180 and 180\r\n this.or.sh = true;\r\n } else {\r\n this.r = PropertyFactory.getProp(elem, data.r || { k: 0 }, 0, degToRads, this);\r\n }\r\n if (data.sk) {\r\n this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);\r\n this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);\r\n }\r\n this.a = PropertyFactory.getProp(elem, data.a || { k: [0, 0, 0] }, 1, 0, this);\r\n this.s = PropertyFactory.getProp(elem, data.s || { k: [100, 100, 100] }, 1, 0.01, this);\r\n // Opacity is not part of the transform properties, that's why it won't use this.dynamicProperties. That way transforms won't get updated if opacity changes.\r\n if (data.o) {\r\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);\r\n } else {\r\n this.o = { _mdf: false, v: 1 };\r\n }\r\n this._isDirty = true;\r\n if (!this.dynamicProperties.length) {\r\n this.getValue(true);\r\n }\r\n }\r\n\r\n TransformProperty.prototype = {\r\n applyToMatrix: applyToMatrix,\r\n getValue: processKeys,\r\n precalculateMatrix: precalculateMatrix,\r\n autoOrient: autoOrient,\r\n };\r\n\r\n extendPrototype([DynamicPropertyContainer], TransformProperty);\r\n TransformProperty.prototype.addDynamicProperty = addDynamicProperty;\r\n TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;\r\n\r\n function getTransformProperty(elem, data, container) {\r\n return new TransformProperty(elem, data, container);\r\n }\r\n\r\n return {\r\n getTransformProperty: getTransformProperty,\r\n };\r\n}());\r\n\r\n/* global createSizedArray, createSizedArray, pointPool */\r\n\r\nfunction ShapePath() {\r\n this.c = false;\r\n this._length = 0;\r\n this._maxLength = 8;\r\n this.v = createSizedArray(this._maxLength);\r\n this.o = createSizedArray(this._maxLength);\r\n this.i = createSizedArray(this._maxLength);\r\n}\r\n\r\nShapePath.prototype.setPathData = function (closed, len) {\r\n this.c = closed;\r\n this.setLength(len);\r\n var i = 0;\r\n while (i < len) {\r\n this.v[i] = pointPool.newElement();\r\n this.o[i] = pointPool.newElement();\r\n this.i[i] = pointPool.newElement();\r\n i += 1;\r\n }\r\n};\r\n\r\nShapePath.prototype.setLength = function (len) {\r\n while (this._maxLength < len) {\r\n this.doubleArrayLength();\r\n }\r\n this._length = len;\r\n};\r\n\r\nShapePath.prototype.doubleArrayLength = function () {\r\n this.v = this.v.concat(createSizedArray(this._maxLength));\r\n this.i = this.i.concat(createSizedArray(this._maxLength));\r\n this.o = this.o.concat(createSizedArray(this._maxLength));\r\n this._maxLength *= 2;\r\n};\r\n\r\nShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {\r\n var arr;\r\n this._length = Math.max(this._length, pos + 1);\r\n if (this._length >= this._maxLength) {\r\n this.doubleArrayLength();\r\n }\r\n switch (type) {\r\n case 'v':\r\n arr = this.v;\r\n break;\r\n case 'i':\r\n arr = this.i;\r\n break;\r\n case 'o':\r\n arr = this.o;\r\n break;\r\n default:\r\n arr = [];\r\n break;\r\n }\r\n if (!arr[pos] || (arr[pos] && !replace)) {\r\n arr[pos] = pointPool.newElement();\r\n }\r\n arr[pos][0] = x;\r\n arr[pos][1] = y;\r\n};\r\n\r\nShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {\r\n this.setXYAt(vX, vY, 'v', pos, replace);\r\n this.setXYAt(oX, oY, 'o', pos, replace);\r\n this.setXYAt(iX, iY, 'i', pos, replace);\r\n};\r\n\r\nShapePath.prototype.reverse = function () {\r\n var newPath = new ShapePath();\r\n newPath.setPathData(this.c, this._length);\r\n var vertices = this.v;\r\n var outPoints = this.o;\r\n var inPoints = this.i;\r\n var init = 0;\r\n if (this.c) {\r\n newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);\r\n init = 1;\r\n }\r\n var cnt = this._length - 1;\r\n var len = this._length;\r\n\r\n var i;\r\n for (i = init; i < len; i += 1) {\r\n newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);\r\n cnt -= 1;\r\n }\r\n return newPath;\r\n};\r\n\r\n/* global extendPrototype, roundCorner, BezierFactory, shapePool, degToRads,\r\n shapeCollectionPool, PropertyFactory, bmMin, DynamicPropertyContainer */\r\n/* exported ShapePropertyFactory */\r\n\r\nvar ShapePropertyFactory = (function () {\r\n var initFrame = -999999;\r\n\r\n function interpolateShape(frameNum, previousValue, caching) {\r\n var iterationIndex = caching.lastIndex;\r\n var keyPropS;\r\n var keyPropE;\r\n var isHold;\r\n var j;\r\n var k;\r\n var jLen;\r\n var kLen;\r\n var perc;\r\n var vertexValue;\r\n var kf = this.keyframes;\r\n if (frameNum < kf[0].t - this.offsetTime) {\r\n keyPropS = kf[0].s[0];\r\n isHold = true;\r\n iterationIndex = 0;\r\n } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {\r\n keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];\r\n /* if(kf[kf.length - 1].s){\r\n keyPropS = kf[kf.length - 1].s[0];\r\n }else{\r\n keyPropS = kf[kf.length - 2].e[0];\r\n } */\r\n isHold = true;\r\n } else {\r\n var i = iterationIndex;\r\n var len = kf.length - 1;\r\n var flag = true;\r\n var keyData;\r\n var nextKeyData;\r\n var keyframeMetadata;\r\n while (flag) {\r\n keyData = kf[i];\r\n nextKeyData = kf[i + 1];\r\n if ((nextKeyData.t - this.offsetTime) > frameNum) {\r\n break;\r\n }\r\n if (i < len - 1) {\r\n i += 1;\r\n } else {\r\n flag = false;\r\n }\r\n }\r\n keyframeMetadata = this.keyframesMetadata[i] || {};\r\n isHold = keyData.h === 1;\r\n iterationIndex = i;\r\n if (!isHold) {\r\n if (frameNum >= nextKeyData.t - this.offsetTime) {\r\n perc = 1;\r\n } else if (frameNum < keyData.t - this.offsetTime) {\r\n perc = 0;\r\n } else {\r\n var fnc;\r\n if (keyframeMetadata.__fnct) {\r\n fnc = keyframeMetadata.__fnct;\r\n } else {\r\n fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;\r\n keyframeMetadata.__fnct = fnc;\r\n }\r\n perc = fnc((frameNum - (keyData.t - this.offsetTime)) / ((nextKeyData.t - this.offsetTime) - (keyData.t - this.offsetTime)));\r\n }\r\n keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];\r\n }\r\n keyPropS = keyData.s[0];\r\n }\r\n jLen = previousValue._length;\r\n kLen = keyPropS.i[0].length;\r\n caching.lastIndex = iterationIndex;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n for (k = 0; k < kLen; k += 1) {\r\n vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;\r\n previousValue.i[j][k] = vertexValue;\r\n vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;\r\n previousValue.o[j][k] = vertexValue;\r\n vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;\r\n previousValue.v[j][k] = vertexValue;\r\n }\r\n }\r\n }\r\n\r\n function interpolateShapeCurrentTime() {\r\n var frameNum = this.comp.renderedFrame - this.offsetTime;\r\n var initTime = this.keyframes[0].t - this.offsetTime;\r\n var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;\r\n var lastFrame = this._caching.lastFrame;\r\n if (!(lastFrame !== initFrame && ((lastFrame < initTime && frameNum < initTime) || (lastFrame > endTime && frameNum > endTime)))) {\r\n /// /\r\n this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;\r\n this.interpolateShape(frameNum, this.pv, this._caching);\r\n /// /\r\n }\r\n this._caching.lastFrame = frameNum;\r\n return this.pv;\r\n }\r\n\r\n function resetShape() {\r\n this.paths = this.localShapeCollection;\r\n }\r\n\r\n function shapesEqual(shape1, shape2) {\r\n if (shape1._length !== shape2._length || shape1.c !== shape2.c) {\r\n return false;\r\n }\r\n var i;\r\n var len = shape1._length;\r\n for (i = 0; i < len; i += 1) {\r\n if (shape1.v[i][0] !== shape2.v[i][0]\r\n || shape1.v[i][1] !== shape2.v[i][1]\r\n || shape1.o[i][0] !== shape2.o[i][0]\r\n || shape1.o[i][1] !== shape2.o[i][1]\r\n || shape1.i[i][0] !== shape2.i[i][0]\r\n || shape1.i[i][1] !== shape2.i[i][1]) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n function setVValue(newPath) {\r\n if (!shapesEqual(this.v, newPath)) {\r\n this.v = shapePool.clone(newPath);\r\n this.localShapeCollection.releaseShapes();\r\n this.localShapeCollection.addShape(this.v);\r\n this._mdf = true;\r\n this.paths = this.localShapeCollection;\r\n }\r\n }\r\n\r\n function processEffectsSequence() {\r\n if (this.elem.globalData.frameId === this.frameId) {\r\n return;\r\n } if (!this.effectsSequence.length) {\r\n this._mdf = false;\r\n return;\r\n }\r\n if (this.lock) {\r\n this.setVValue(this.pv);\r\n return;\r\n }\r\n this.lock = true;\r\n this._mdf = false;\r\n var finalValue;\r\n if (this.kf) {\r\n finalValue = this.pv;\r\n } else if (this.data.ks) {\r\n finalValue = this.data.ks.k;\r\n } else {\r\n finalValue = this.data.pt.k;\r\n }\r\n var i;\r\n var len = this.effectsSequence.length;\r\n for (i = 0; i < len; i += 1) {\r\n finalValue = this.effectsSequence[i](finalValue);\r\n }\r\n this.setVValue(finalValue);\r\n this.lock = false;\r\n this.frameId = this.elem.globalData.frameId;\r\n }\r\n\r\n function ShapeProperty(elem, data, type) {\r\n this.propType = 'shape';\r\n this.comp = elem.comp;\r\n this.container = elem;\r\n this.elem = elem;\r\n this.data = data;\r\n this.k = false;\r\n this.kf = false;\r\n this._mdf = false;\r\n var pathData = type === 3 ? data.pt.k : data.ks.k;\r\n this.v = shapePool.clone(pathData);\r\n this.pv = shapePool.clone(this.v);\r\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n this.paths = this.localShapeCollection;\r\n this.paths.addShape(this.v);\r\n this.reset = resetShape;\r\n this.effectsSequence = [];\r\n }\r\n\r\n function addEffect(effectFunction) {\r\n this.effectsSequence.push(effectFunction);\r\n this.container.addDynamicProperty(this);\r\n }\r\n\r\n ShapeProperty.prototype.interpolateShape = interpolateShape;\r\n ShapeProperty.prototype.getValue = processEffectsSequence;\r\n ShapeProperty.prototype.setVValue = setVValue;\r\n ShapeProperty.prototype.addEffect = addEffect;\r\n\r\n function KeyframedShapeProperty(elem, data, type) {\r\n this.propType = 'shape';\r\n this.comp = elem.comp;\r\n this.elem = elem;\r\n this.container = elem;\r\n this.offsetTime = elem.data.st;\r\n this.keyframes = type === 3 ? data.pt.k : data.ks.k;\r\n this.keyframesMetadata = [];\r\n this.k = true;\r\n this.kf = true;\r\n var len = this.keyframes[0].s[0].i.length;\r\n this.v = shapePool.newElement();\r\n this.v.setPathData(this.keyframes[0].s[0].c, len);\r\n this.pv = shapePool.clone(this.v);\r\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n this.paths = this.localShapeCollection;\r\n this.paths.addShape(this.v);\r\n this.lastFrame = initFrame;\r\n this.reset = resetShape;\r\n this._caching = { lastFrame: initFrame, lastIndex: 0 };\r\n this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];\r\n }\r\n KeyframedShapeProperty.prototype.getValue = processEffectsSequence;\r\n KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;\r\n KeyframedShapeProperty.prototype.setVValue = setVValue;\r\n KeyframedShapeProperty.prototype.addEffect = addEffect;\r\n\r\n var EllShapeProperty = (function () {\r\n var cPoint = roundCorner;\r\n\r\n function EllShapePropertyFactory(elem, data) {\r\n /* this.v = {\r\n v: createSizedArray(4),\r\n i: createSizedArray(4),\r\n o: createSizedArray(4),\r\n c: true\r\n }; */\r\n this.v = shapePool.newElement();\r\n this.v.setPathData(true, 4);\r\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n this.paths = this.localShapeCollection;\r\n this.localShapeCollection.addShape(this.v);\r\n this.d = data.d;\r\n this.elem = elem;\r\n this.comp = elem.comp;\r\n this.frameId = -1;\r\n this.initDynamicPropertyContainer(elem);\r\n this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\r\n this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);\r\n if (this.dynamicProperties.length) {\r\n this.k = true;\r\n } else {\r\n this.k = false;\r\n this.convertEllToPath();\r\n }\r\n }\r\n\r\n EllShapePropertyFactory.prototype = {\r\n reset: resetShape,\r\n getValue: function () {\r\n if (this.elem.globalData.frameId === this.frameId) {\r\n return;\r\n }\r\n this.frameId = this.elem.globalData.frameId;\r\n this.iterateDynamicProperties();\r\n\r\n if (this._mdf) {\r\n this.convertEllToPath();\r\n }\r\n },\r\n convertEllToPath: function () {\r\n var p0 = this.p.v[0];\r\n var p1 = this.p.v[1];\r\n var s0 = this.s.v[0] / 2;\r\n var s1 = this.s.v[1] / 2;\r\n var _cw = this.d !== 3;\r\n var _v = this.v;\r\n _v.v[0][0] = p0;\r\n _v.v[0][1] = p1 - s1;\r\n _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;\r\n _v.v[1][1] = p1;\r\n _v.v[2][0] = p0;\r\n _v.v[2][1] = p1 + s1;\r\n _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;\r\n _v.v[3][1] = p1;\r\n _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;\r\n _v.i[0][1] = p1 - s1;\r\n _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;\r\n _v.i[1][1] = p1 - s1 * cPoint;\r\n _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;\r\n _v.i[2][1] = p1 + s1;\r\n _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;\r\n _v.i[3][1] = p1 + s1 * cPoint;\r\n _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;\r\n _v.o[0][1] = p1 - s1;\r\n _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;\r\n _v.o[1][1] = p1 + s1 * cPoint;\r\n _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;\r\n _v.o[2][1] = p1 + s1;\r\n _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;\r\n _v.o[3][1] = p1 - s1 * cPoint;\r\n },\r\n };\r\n\r\n extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);\r\n\r\n return EllShapePropertyFactory;\r\n }());\r\n\r\n var StarShapeProperty = (function () {\r\n function StarShapePropertyFactory(elem, data) {\r\n this.v = shapePool.newElement();\r\n this.v.setPathData(true, 0);\r\n this.elem = elem;\r\n this.comp = elem.comp;\r\n this.data = data;\r\n this.frameId = -1;\r\n this.d = data.d;\r\n this.initDynamicPropertyContainer(elem);\r\n if (data.sy === 1) {\r\n this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);\r\n this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);\r\n this.convertToPath = this.convertStarToPath;\r\n } else {\r\n this.convertToPath = this.convertPolygonToPath;\r\n }\r\n this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);\r\n this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\r\n this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);\r\n this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);\r\n this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);\r\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n this.localShapeCollection.addShape(this.v);\r\n this.paths = this.localShapeCollection;\r\n if (this.dynamicProperties.length) {\r\n this.k = true;\r\n } else {\r\n this.k = false;\r\n this.convertToPath();\r\n }\r\n }\r\n\r\n StarShapePropertyFactory.prototype = {\r\n reset: resetShape,\r\n getValue: function () {\r\n if (this.elem.globalData.frameId === this.frameId) {\r\n return;\r\n }\r\n this.frameId = this.elem.globalData.frameId;\r\n this.iterateDynamicProperties();\r\n if (this._mdf) {\r\n this.convertToPath();\r\n }\r\n },\r\n convertStarToPath: function () {\r\n var numPts = Math.floor(this.pt.v) * 2;\r\n var angle = (Math.PI * 2) / numPts;\r\n /* this.v.v.length = numPts;\r\n this.v.i.length = numPts;\r\n this.v.o.length = numPts; */\r\n var longFlag = true;\r\n var longRad = this.or.v;\r\n var shortRad = this.ir.v;\r\n var longRound = this.os.v;\r\n var shortRound = this.is.v;\r\n var longPerimSegment = (2 * Math.PI * longRad) / (numPts * 2);\r\n var shortPerimSegment = (2 * Math.PI * shortRad) / (numPts * 2);\r\n var i;\r\n var rad;\r\n var roundness;\r\n var perimSegment;\r\n var currentAng = -Math.PI / 2;\r\n currentAng += this.r.v;\r\n var dir = this.data.d === 3 ? -1 : 1;\r\n this.v._length = 0;\r\n for (i = 0; i < numPts; i += 1) {\r\n rad = longFlag ? longRad : shortRad;\r\n roundness = longFlag ? longRound : shortRound;\r\n perimSegment = longFlag ? longPerimSegment : shortPerimSegment;\r\n var x = rad * Math.cos(currentAng);\r\n var y = rad * Math.sin(currentAng);\r\n var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);\r\n var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);\r\n x += +this.p.v[0];\r\n y += +this.p.v[1];\r\n this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true);\r\n\r\n /* this.v.v[i] = [x,y];\r\n this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];\r\n this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];\r\n this.v._length = numPts; */\r\n longFlag = !longFlag;\r\n currentAng += angle * dir;\r\n }\r\n },\r\n convertPolygonToPath: function () {\r\n var numPts = Math.floor(this.pt.v);\r\n var angle = (Math.PI * 2) / numPts;\r\n var rad = this.or.v;\r\n var roundness = this.os.v;\r\n var perimSegment = (2 * Math.PI * rad) / (numPts * 4);\r\n var i;\r\n var currentAng = -Math.PI * 0.5;\r\n var dir = this.data.d === 3 ? -1 : 1;\r\n currentAng += this.r.v;\r\n this.v._length = 0;\r\n for (i = 0; i < numPts; i += 1) {\r\n var x = rad * Math.cos(currentAng);\r\n var y = rad * Math.sin(currentAng);\r\n var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);\r\n var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);\r\n x += +this.p.v[0];\r\n y += +this.p.v[1];\r\n this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true);\r\n currentAng += angle * dir;\r\n }\r\n this.paths.length = 0;\r\n this.paths[0] = this.v;\r\n },\r\n\r\n };\r\n extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);\r\n\r\n return StarShapePropertyFactory;\r\n }());\r\n\r\n var RectShapeProperty = (function () {\r\n function RectShapePropertyFactory(elem, data) {\r\n this.v = shapePool.newElement();\r\n this.v.c = true;\r\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n this.localShapeCollection.addShape(this.v);\r\n this.paths = this.localShapeCollection;\r\n this.elem = elem;\r\n this.comp = elem.comp;\r\n this.frameId = -1;\r\n this.d = data.d;\r\n this.initDynamicPropertyContainer(elem);\r\n this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\r\n this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);\r\n this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);\r\n if (this.dynamicProperties.length) {\r\n this.k = true;\r\n } else {\r\n this.k = false;\r\n this.convertRectToPath();\r\n }\r\n }\r\n\r\n RectShapePropertyFactory.prototype = {\r\n convertRectToPath: function () {\r\n var p0 = this.p.v[0];\r\n var p1 = this.p.v[1];\r\n var v0 = this.s.v[0] / 2;\r\n var v1 = this.s.v[1] / 2;\r\n var round = bmMin(v0, v1, this.r.v);\r\n var cPoint = round * (1 - roundCorner);\r\n this.v._length = 0;\r\n\r\n if (this.d === 2 || this.d === 1) {\r\n this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);\r\n this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);\r\n if (round !== 0) {\r\n this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);\r\n this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);\r\n this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);\r\n this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);\r\n this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);\r\n this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);\r\n } else {\r\n this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);\r\n this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);\r\n }\r\n } else {\r\n this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);\r\n if (round !== 0) {\r\n this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);\r\n this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);\r\n this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);\r\n this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);\r\n this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);\r\n this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);\r\n this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);\r\n } else {\r\n this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);\r\n this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);\r\n this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);\r\n }\r\n }\r\n },\r\n getValue: function () {\r\n if (this.elem.globalData.frameId === this.frameId) {\r\n return;\r\n }\r\n this.frameId = this.elem.globalData.frameId;\r\n this.iterateDynamicProperties();\r\n if (this._mdf) {\r\n this.convertRectToPath();\r\n }\r\n },\r\n reset: resetShape,\r\n };\r\n extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);\r\n\r\n return RectShapePropertyFactory;\r\n }());\r\n\r\n function getShapeProp(elem, data, type) {\r\n var prop;\r\n if (type === 3 || type === 4) {\r\n var dataProp = type === 3 ? data.pt : data.ks;\r\n var keys = dataProp.k;\r\n if (keys.length) {\r\n prop = new KeyframedShapeProperty(elem, data, type);\r\n } else {\r\n prop = new ShapeProperty(elem, data, type);\r\n }\r\n } else if (type === 5) {\r\n prop = new RectShapeProperty(elem, data);\r\n } else if (type === 6) {\r\n prop = new EllShapeProperty(elem, data);\r\n } else if (type === 7) {\r\n prop = new StarShapeProperty(elem, data);\r\n }\r\n if (prop.k) {\r\n elem.addDynamicProperty(prop);\r\n }\r\n return prop;\r\n }\r\n\r\n function getConstructorFunction() {\r\n return ShapeProperty;\r\n }\r\n\r\n function getKeyframedConstructorFunction() {\r\n return KeyframedShapeProperty;\r\n }\r\n\r\n var ob = {};\r\n ob.getShapeProp = getShapeProp;\r\n ob.getConstructorFunction = getConstructorFunction;\r\n ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;\r\n return ob;\r\n}());\r\n\r\n/* global shapeCollectionPool, initialDefaultFrame, extendPrototype, DynamicPropertyContainer */\r\n/* exported ShapeModifiers */\r\n\r\nvar ShapeModifiers = (function () {\r\n var ob = {};\r\n var modifiers = {};\r\n ob.registerModifier = registerModifier;\r\n ob.getModifier = getModifier;\r\n\r\n function registerModifier(nm, factory) {\r\n if (!modifiers[nm]) {\r\n modifiers[nm] = factory;\r\n }\r\n }\r\n\r\n function getModifier(nm, elem, data) {\r\n return new modifiers[nm](elem, data);\r\n }\r\n\r\n return ob;\r\n}());\r\n\r\nfunction ShapeModifier() {}\r\nShapeModifier.prototype.initModifierProperties = function () {};\r\nShapeModifier.prototype.addShapeToModifier = function () {};\r\nShapeModifier.prototype.addShape = function (data) {\r\n if (!this.closed) {\r\n // Adding shape to dynamic properties. It covers the case where a shape has no effects applied, to reset it's _mdf state on every tick.\r\n data.sh.container.addDynamicProperty(data.sh);\r\n var shapeData = { shape: data.sh, data: data, localShapeCollection: shapeCollectionPool.newShapeCollection() };\r\n this.shapes.push(shapeData);\r\n this.addShapeToModifier(shapeData);\r\n if (this._isAnimated) {\r\n data.setAsAnimated();\r\n }\r\n }\r\n};\r\nShapeModifier.prototype.init = function (elem, data) {\r\n this.shapes = [];\r\n this.elem = elem;\r\n this.initDynamicPropertyContainer(elem);\r\n this.initModifierProperties(elem, data);\r\n this.frameId = initialDefaultFrame;\r\n this.closed = false;\r\n this.k = false;\r\n if (this.dynamicProperties.length) {\r\n this.k = true;\r\n } else {\r\n this.getValue(true);\r\n }\r\n};\r\nShapeModifier.prototype.processKeys = function () {\r\n if (this.elem.globalData.frameId === this.frameId) {\r\n return;\r\n }\r\n this.frameId = this.elem.globalData.frameId;\r\n this.iterateDynamicProperties();\r\n};\r\n\r\nextendPrototype([DynamicPropertyContainer], ShapeModifier);\r\n\r\n/* global extendPrototype, ShapeModifier, PropertyFactory, segmentsLengthPool, bez, shapePool, ShapeModifiers */\r\n\r\nfunction TrimModifier() {\r\n}\r\nextendPrototype([ShapeModifier], TrimModifier);\r\nTrimModifier.prototype.initModifierProperties = function (elem, data) {\r\n this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);\r\n this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);\r\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);\r\n this.sValue = 0;\r\n this.eValue = 0;\r\n this.getValue = this.processKeys;\r\n this.m = data.m;\r\n this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;\r\n};\r\n\r\nTrimModifier.prototype.addShapeToModifier = function (shapeData) {\r\n shapeData.pathsData = [];\r\n};\r\n\r\nTrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {\r\n var segments = [];\r\n if (e <= 1) {\r\n segments.push({\r\n s: s,\r\n e: e,\r\n });\r\n } else if (s >= 1) {\r\n segments.push({\r\n s: s - 1,\r\n e: e - 1,\r\n });\r\n } else {\r\n segments.push({\r\n s: s,\r\n e: 1,\r\n });\r\n segments.push({\r\n s: 0,\r\n e: e - 1,\r\n });\r\n }\r\n var shapeSegments = [];\r\n var i;\r\n var len = segments.length;\r\n var segmentOb;\r\n for (i = 0; i < len; i += 1) {\r\n segmentOb = segments[i];\r\n if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {\r\n var shapeS;\r\n var shapeE;\r\n if (segmentOb.s * totalModifierLength <= addedLength) {\r\n shapeS = 0;\r\n } else {\r\n shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;\r\n }\r\n if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {\r\n shapeE = 1;\r\n } else {\r\n shapeE = ((segmentOb.e * totalModifierLength - addedLength) / shapeLength);\r\n }\r\n shapeSegments.push([shapeS, shapeE]);\r\n }\r\n }\r\n if (!shapeSegments.length) {\r\n shapeSegments.push([0, 0]);\r\n }\r\n return shapeSegments;\r\n};\r\n\r\nTrimModifier.prototype.releasePathsData = function (pathsData) {\r\n var i;\r\n var len = pathsData.length;\r\n for (i = 0; i < len; i += 1) {\r\n segmentsLengthPool.release(pathsData[i]);\r\n }\r\n pathsData.length = 0;\r\n return pathsData;\r\n};\r\n\r\nTrimModifier.prototype.processShapes = function (_isFirstFrame) {\r\n var s;\r\n var e;\r\n if (this._mdf || _isFirstFrame) {\r\n var o = (this.o.v % 360) / 360;\r\n if (o < 0) {\r\n o += 1;\r\n }\r\n if (this.s.v > 1) {\r\n s = 1 + o;\r\n } else if (this.s.v < 0) {\r\n s = 0 + o;\r\n } else {\r\n s = this.s.v + o;\r\n }\r\n if (this.e.v > 1) {\r\n e = 1 + o;\r\n } else if (this.e.v < 0) {\r\n e = 0 + o;\r\n } else {\r\n e = this.e.v + o;\r\n }\r\n\r\n if (s > e) {\r\n var _s = s;\r\n s = e;\r\n e = _s;\r\n }\r\n s = Math.round(s * 10000) * 0.0001;\r\n e = Math.round(e * 10000) * 0.0001;\r\n this.sValue = s;\r\n this.eValue = e;\r\n } else {\r\n s = this.sValue;\r\n e = this.eValue;\r\n }\r\n var shapePaths;\r\n var i;\r\n var len = this.shapes.length;\r\n var j;\r\n var jLen;\r\n var pathsData;\r\n var pathData;\r\n var totalShapeLength;\r\n var totalModifierLength = 0;\r\n\r\n if (e === s) {\r\n for (i = 0; i < len; i += 1) {\r\n this.shapes[i].localShapeCollection.releaseShapes();\r\n this.shapes[i].shape._mdf = true;\r\n this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;\r\n if (this._mdf) {\r\n this.shapes[i].pathsData.length = 0;\r\n }\r\n }\r\n } else if (!((e === 1 && s === 0) || (e === 0 && s === 1))) {\r\n var segments = [];\r\n var shapeData;\r\n var localShapeCollection;\r\n for (i = 0; i < len; i += 1) {\r\n shapeData = this.shapes[i];\r\n // if shape hasn't changed and trim properties haven't changed, cached previous path can be used\r\n if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {\r\n shapeData.shape.paths = shapeData.localShapeCollection;\r\n } else {\r\n shapePaths = shapeData.shape.paths;\r\n jLen = shapePaths._length;\r\n totalShapeLength = 0;\r\n if (!shapeData.shape._mdf && shapeData.pathsData.length) {\r\n totalShapeLength = shapeData.totalShapeLength;\r\n } else {\r\n pathsData = this.releasePathsData(shapeData.pathsData);\r\n for (j = 0; j < jLen; j += 1) {\r\n pathData = bez.getSegmentsLength(shapePaths.shapes[j]);\r\n pathsData.push(pathData);\r\n totalShapeLength += pathData.totalLength;\r\n }\r\n shapeData.totalShapeLength = totalShapeLength;\r\n shapeData.pathsData = pathsData;\r\n }\r\n\r\n totalModifierLength += totalShapeLength;\r\n shapeData.shape._mdf = true;\r\n }\r\n }\r\n var shapeS = s;\r\n var shapeE = e;\r\n var addedLength = 0;\r\n var edges;\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n shapeData = this.shapes[i];\r\n if (shapeData.shape._mdf) {\r\n localShapeCollection = shapeData.localShapeCollection;\r\n localShapeCollection.releaseShapes();\r\n // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group\r\n if (this.m === 2 && len > 1) {\r\n edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);\r\n addedLength += shapeData.totalShapeLength;\r\n } else {\r\n edges = [[shapeS, shapeE]];\r\n }\r\n jLen = edges.length;\r\n for (j = 0; j < jLen; j += 1) {\r\n shapeS = edges[j][0];\r\n shapeE = edges[j][1];\r\n segments.length = 0;\r\n if (shapeE <= 1) {\r\n segments.push({\r\n s: shapeData.totalShapeLength * shapeS,\r\n e: shapeData.totalShapeLength * shapeE,\r\n });\r\n } else if (shapeS >= 1) {\r\n segments.push({\r\n s: shapeData.totalShapeLength * (shapeS - 1),\r\n e: shapeData.totalShapeLength * (shapeE - 1),\r\n });\r\n } else {\r\n segments.push({\r\n s: shapeData.totalShapeLength * shapeS,\r\n e: shapeData.totalShapeLength,\r\n });\r\n segments.push({\r\n s: 0,\r\n e: shapeData.totalShapeLength * (shapeE - 1),\r\n });\r\n }\r\n var newShapesData = this.addShapes(shapeData, segments[0]);\r\n if (segments[0].s !== segments[0].e) {\r\n if (segments.length > 1) {\r\n var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];\r\n if (lastShapeInCollection.c) {\r\n var lastShape = newShapesData.pop();\r\n this.addPaths(newShapesData, localShapeCollection);\r\n newShapesData = this.addShapes(shapeData, segments[1], lastShape);\r\n } else {\r\n this.addPaths(newShapesData, localShapeCollection);\r\n newShapesData = this.addShapes(shapeData, segments[1]);\r\n }\r\n }\r\n this.addPaths(newShapesData, localShapeCollection);\r\n }\r\n }\r\n shapeData.shape.paths = localShapeCollection;\r\n }\r\n }\r\n } else if (this._mdf) {\r\n for (i = 0; i < len; i += 1) {\r\n // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.\r\n // Don't remove this even if it's losing cached info.\r\n this.shapes[i].pathsData.length = 0;\r\n this.shapes[i].shape._mdf = true;\r\n }\r\n }\r\n};\r\n\r\nTrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {\r\n var i;\r\n var len = newPaths.length;\r\n for (i = 0; i < len; i += 1) {\r\n localShapeCollection.addShape(newPaths[i]);\r\n }\r\n};\r\n\r\nTrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {\r\n shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);\r\n shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);\r\n if (newShape) {\r\n shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);\r\n }\r\n shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);\r\n};\r\n\r\nTrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {\r\n shapePath.setXYAt(points[1], points[5], 'o', pos);\r\n shapePath.setXYAt(points[2], points[6], 'i', pos + 1);\r\n if (newShape) {\r\n shapePath.setXYAt(points[0], points[4], 'v', pos);\r\n }\r\n shapePath.setXYAt(points[3], points[7], 'v', pos + 1);\r\n};\r\n\r\nTrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {\r\n var pathsData = shapeData.pathsData;\r\n var shapePaths = shapeData.shape.paths.shapes;\r\n var i;\r\n var len = shapeData.shape.paths._length;\r\n var j;\r\n var jLen;\r\n var addedLength = 0;\r\n var currentLengthData;\r\n var segmentCount;\r\n var lengths;\r\n var segment;\r\n var shapes = [];\r\n var initPos;\r\n var newShape = true;\r\n if (!shapePath) {\r\n shapePath = shapePool.newElement();\r\n segmentCount = 0;\r\n initPos = 0;\r\n } else {\r\n segmentCount = shapePath._length;\r\n initPos = shapePath._length;\r\n }\r\n shapes.push(shapePath);\r\n for (i = 0; i < len; i += 1) {\r\n lengths = pathsData[i].lengths;\r\n shapePath.c = shapePaths[i].c;\r\n jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;\r\n for (j = 1; j < jLen; j += 1) {\r\n currentLengthData = lengths[j - 1];\r\n if (addedLength + currentLengthData.addedLength < shapeSegment.s) {\r\n addedLength += currentLengthData.addedLength;\r\n shapePath.c = false;\r\n } else if (addedLength > shapeSegment.e) {\r\n shapePath.c = false;\r\n break;\r\n } else {\r\n if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {\r\n this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);\r\n newShape = false;\r\n } else {\r\n segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[j], shapePaths[i].o[j - 1], shapePaths[i].i[j], (shapeSegment.s - addedLength) / currentLengthData.addedLength, (shapeSegment.e - addedLength) / currentLengthData.addedLength, lengths[j - 1]);\r\n this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);\r\n // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);\r\n newShape = false;\r\n shapePath.c = false;\r\n }\r\n addedLength += currentLengthData.addedLength;\r\n segmentCount += 1;\r\n }\r\n }\r\n if (shapePaths[i].c && lengths.length) {\r\n currentLengthData = lengths[j - 1];\r\n if (addedLength <= shapeSegment.e) {\r\n var segmentLength = lengths[j - 1].addedLength;\r\n if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {\r\n this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);\r\n newShape = false;\r\n } else {\r\n segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[0], shapePaths[i].o[j - 1], shapePaths[i].i[0], (shapeSegment.s - addedLength) / segmentLength, (shapeSegment.e - addedLength) / segmentLength, lengths[j - 1]);\r\n this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);\r\n // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);\r\n newShape = false;\r\n shapePath.c = false;\r\n }\r\n } else {\r\n shapePath.c = false;\r\n }\r\n addedLength += currentLengthData.addedLength;\r\n segmentCount += 1;\r\n }\r\n if (shapePath._length) {\r\n shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);\r\n shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);\r\n }\r\n if (addedLength > shapeSegment.e) {\r\n break;\r\n }\r\n if (i < len - 1) {\r\n shapePath = shapePool.newElement();\r\n newShape = true;\r\n shapes.push(shapePath);\r\n segmentCount = 0;\r\n }\r\n }\r\n return shapes;\r\n};\r\n\r\nShapeModifiers.registerModifier('tm', TrimModifier);\r\n\r\n/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, roundCorner, ShapeModifiers */\r\n\r\nfunction RoundCornersModifier() {}\r\nextendPrototype([ShapeModifier], RoundCornersModifier);\r\nRoundCornersModifier.prototype.initModifierProperties = function (elem, data) {\r\n this.getValue = this.processKeys;\r\n this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);\r\n this._isAnimated = !!this.rd.effectsSequence.length;\r\n};\r\n\r\nRoundCornersModifier.prototype.processPath = function (path, round) {\r\n var clonedPath = shapePool.newElement();\r\n clonedPath.c = path.c;\r\n var i;\r\n var len = path._length;\r\n var currentV;\r\n var currentI;\r\n var currentO;\r\n var closerV;\r\n var distance;\r\n var newPosPerc;\r\n var index = 0;\r\n var vX;\r\n var vY;\r\n var oX;\r\n var oY;\r\n var iX;\r\n var iY;\r\n for (i = 0; i < len; i += 1) {\r\n currentV = path.v[i];\r\n currentO = path.o[i];\r\n currentI = path.i[i];\r\n if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {\r\n if ((i === 0 || i === len - 1) && !path.c) {\r\n clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);\r\n /* clonedPath.v[index] = currentV;\r\n clonedPath.o[index] = currentO;\r\n clonedPath.i[index] = currentI; */\r\n index += 1;\r\n } else {\r\n if (i === 0) {\r\n closerV = path.v[len - 1];\r\n } else {\r\n closerV = path.v[i - 1];\r\n }\r\n distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));\r\n newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;\r\n iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;\r\n vX = iX;\r\n iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;\r\n vY = iY;\r\n oX = vX - (vX - currentV[0]) * roundCorner;\r\n oY = vY - (vY - currentV[1]) * roundCorner;\r\n clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);\r\n index += 1;\r\n\r\n if (i === len - 1) {\r\n closerV = path.v[0];\r\n } else {\r\n closerV = path.v[i + 1];\r\n }\r\n distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));\r\n newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;\r\n oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;\r\n vX = oX;\r\n oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;\r\n vY = oY;\r\n iX = vX - (vX - currentV[0]) * roundCorner;\r\n iY = vY - (vY - currentV[1]) * roundCorner;\r\n clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);\r\n index += 1;\r\n }\r\n } else {\r\n clonedPath.setTripleAt(path.v[i][0], path.v[i][1], path.o[i][0], path.o[i][1], path.i[i][0], path.i[i][1], index);\r\n index += 1;\r\n }\r\n }\r\n return clonedPath;\r\n};\r\n\r\nRoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {\r\n var shapePaths;\r\n var i;\r\n var len = this.shapes.length;\r\n var j;\r\n var jLen;\r\n var rd = this.rd.v;\r\n\r\n if (rd !== 0) {\r\n var shapeData;\r\n var localShapeCollection;\r\n for (i = 0; i < len; i += 1) {\r\n shapeData = this.shapes[i];\r\n localShapeCollection = shapeData.localShapeCollection;\r\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\r\n localShapeCollection.releaseShapes();\r\n shapeData.shape._mdf = true;\r\n shapePaths = shapeData.shape.paths.shapes;\r\n jLen = shapeData.shape.paths._length;\r\n for (j = 0; j < jLen; j += 1) {\r\n localShapeCollection.addShape(this.processPath(shapePaths[j], rd));\r\n }\r\n }\r\n shapeData.shape.paths = shapeData.localShapeCollection;\r\n }\r\n }\r\n if (!this.dynamicProperties.length) {\r\n this._mdf = false;\r\n }\r\n};\r\n\r\nShapeModifiers.registerModifier('rd', RoundCornersModifier);\r\n\r\n/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, ShapeModifiers */\r\n\r\nfunction PuckerAndBloatModifier() {}\r\nextendPrototype([ShapeModifier], PuckerAndBloatModifier);\r\nPuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {\r\n this.getValue = this.processKeys;\r\n this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);\r\n this._isAnimated = !!this.amount.effectsSequence.length;\r\n};\r\n\r\nPuckerAndBloatModifier.prototype.processPath = function (path, amount) {\r\n var percent = amount / 100;\r\n var centerPoint = [0, 0];\r\n var pathLength = path._length;\r\n var i = 0;\r\n for (i = 0; i < pathLength; i += 1) {\r\n centerPoint[0] += path.v[i][0];\r\n centerPoint[1] += path.v[i][1];\r\n }\r\n centerPoint[0] /= pathLength;\r\n centerPoint[1] /= pathLength;\r\n var clonedPath = shapePool.newElement();\r\n clonedPath.c = path.c;\r\n var vX;\r\n var vY;\r\n var oX;\r\n var oY;\r\n var iX;\r\n var iY;\r\n for (i = 0; i < pathLength; i += 1) {\r\n vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;\r\n vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;\r\n oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;\r\n oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;\r\n iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;\r\n iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;\r\n clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);\r\n }\r\n return clonedPath;\r\n};\r\n\r\nPuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {\r\n var shapePaths;\r\n var i;\r\n var len = this.shapes.length;\r\n var j;\r\n var jLen;\r\n var amount = this.amount.v;\r\n\r\n if (amount !== 0) {\r\n var shapeData;\r\n var localShapeCollection;\r\n for (i = 0; i < len; i += 1) {\r\n shapeData = this.shapes[i];\r\n localShapeCollection = shapeData.localShapeCollection;\r\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\r\n localShapeCollection.releaseShapes();\r\n shapeData.shape._mdf = true;\r\n shapePaths = shapeData.shape.paths.shapes;\r\n jLen = shapeData.shape.paths._length;\r\n for (j = 0; j < jLen; j += 1) {\r\n localShapeCollection.addShape(this.processPath(shapePaths[j], amount));\r\n }\r\n }\r\n shapeData.shape.paths = shapeData.localShapeCollection;\r\n }\r\n }\r\n if (!this.dynamicProperties.length) {\r\n this._mdf = false;\r\n }\r\n};\r\nShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);\r\n\r\n/* global extendPrototype, ShapeModifier, TransformPropertyFactory, PropertyFactory, Matrix, ShapeModifiers */\r\n\r\nfunction RepeaterModifier() {}\r\nextendPrototype([ShapeModifier], RepeaterModifier);\r\n\r\nRepeaterModifier.prototype.initModifierProperties = function (elem, data) {\r\n this.getValue = this.processKeys;\r\n this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);\r\n this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);\r\n this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);\r\n this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);\r\n this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);\r\n this.data = data;\r\n if (!this.dynamicProperties.length) {\r\n this.getValue(true);\r\n }\r\n this._isAnimated = !!this.dynamicProperties.length;\r\n this.pMatrix = new Matrix();\r\n this.rMatrix = new Matrix();\r\n this.sMatrix = new Matrix();\r\n this.tMatrix = new Matrix();\r\n this.matrix = new Matrix();\r\n};\r\n\r\nRepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {\r\n var dir = inv ? -1 : 1;\r\n var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);\r\n var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);\r\n pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);\r\n rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);\r\n rMatrix.rotate(-transform.r.v * dir * perc);\r\n rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);\r\n sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);\r\n sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);\r\n sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);\r\n};\r\n\r\nRepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {\r\n this.elem = elem;\r\n this.arr = arr;\r\n this.pos = pos;\r\n this.elemsData = elemsData;\r\n this._currentCopies = 0;\r\n this._elements = [];\r\n this._groups = [];\r\n this.frameId = -1;\r\n this.initDynamicPropertyContainer(elem);\r\n this.initModifierProperties(elem, arr[pos]);\r\n while (pos > 0) {\r\n pos -= 1;\r\n // this._elements.unshift(arr.splice(pos,1)[0]);\r\n this._elements.unshift(arr[pos]);\r\n }\r\n if (this.dynamicProperties.length) {\r\n this.k = true;\r\n } else {\r\n this.getValue(true);\r\n }\r\n};\r\n\r\nRepeaterModifier.prototype.resetElements = function (elements) {\r\n var i;\r\n var len = elements.length;\r\n for (i = 0; i < len; i += 1) {\r\n elements[i]._processed = false;\r\n if (elements[i].ty === 'gr') {\r\n this.resetElements(elements[i].it);\r\n }\r\n }\r\n};\r\n\r\nRepeaterModifier.prototype.cloneElements = function (elements) {\r\n var newElements = JSON.parse(JSON.stringify(elements));\r\n this.resetElements(newElements);\r\n return newElements;\r\n};\r\n\r\nRepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {\r\n var i;\r\n var len = elements.length;\r\n for (i = 0; i < len; i += 1) {\r\n elements[i]._render = renderFlag;\r\n if (elements[i].ty === 'gr') {\r\n this.changeGroupRender(elements[i].it, renderFlag);\r\n }\r\n }\r\n};\r\n\r\nRepeaterModifier.prototype.processShapes = function (_isFirstFrame) {\r\n var items;\r\n var itemsTransform;\r\n var i;\r\n var dir;\r\n var cont;\r\n var hasReloaded = false;\r\n if (this._mdf || _isFirstFrame) {\r\n var copies = Math.ceil(this.c.v);\r\n if (this._groups.length < copies) {\r\n while (this._groups.length < copies) {\r\n var group = {\r\n it: this.cloneElements(this._elements),\r\n ty: 'gr',\r\n };\r\n group.it.push({\r\n a: { a: 0, ix: 1, k: [0, 0] }, nm: 'Transform', o: { a: 0, ix: 7, k: 100 }, p: { a: 0, ix: 2, k: [0, 0] }, r: { a: 1, ix: 6, k: [{ s: 0, e: 0, t: 0 }, { s: 0, e: 0, t: 1 }] }, s: { a: 0, ix: 3, k: [100, 100] }, sa: { a: 0, ix: 5, k: 0 }, sk: { a: 0, ix: 4, k: 0 }, ty: 'tr',\r\n });\r\n\r\n this.arr.splice(0, 0, group);\r\n this._groups.splice(0, 0, group);\r\n this._currentCopies += 1;\r\n }\r\n this.elem.reloadShapes();\r\n hasReloaded = true;\r\n }\r\n cont = 0;\r\n var renderFlag;\r\n for (i = 0; i <= this._groups.length - 1; i += 1) {\r\n renderFlag = cont < copies;\r\n this._groups[i]._render = renderFlag;\r\n this.changeGroupRender(this._groups[i].it, renderFlag);\r\n if (!renderFlag) {\r\n var elems = this.elemsData[i].it;\r\n var transformData = elems[elems.length - 1];\r\n if (transformData.transform.op.v !== 0) {\r\n transformData.transform.op._mdf = true;\r\n transformData.transform.op.v = 0;\r\n } else {\r\n transformData.transform.op._mdf = false;\r\n }\r\n }\r\n cont += 1;\r\n }\r\n\r\n this._currentCopies = copies;\r\n /// /\r\n\r\n var offset = this.o.v;\r\n var offsetModulo = offset % 1;\r\n var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);\r\n var pProps = this.pMatrix.props;\r\n var rProps = this.rMatrix.props;\r\n var sProps = this.sMatrix.props;\r\n this.pMatrix.reset();\r\n this.rMatrix.reset();\r\n this.sMatrix.reset();\r\n this.tMatrix.reset();\r\n this.matrix.reset();\r\n var iteration = 0;\r\n\r\n if (offset > 0) {\r\n while (iteration < roundOffset) {\r\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);\r\n iteration += 1;\r\n }\r\n if (offsetModulo) {\r\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);\r\n iteration += offsetModulo;\r\n }\r\n } else if (offset < 0) {\r\n while (iteration > roundOffset) {\r\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);\r\n iteration -= 1;\r\n }\r\n if (offsetModulo) {\r\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);\r\n iteration -= offsetModulo;\r\n }\r\n }\r\n i = this.data.m === 1 ? 0 : this._currentCopies - 1;\r\n dir = this.data.m === 1 ? 1 : -1;\r\n cont = this._currentCopies;\r\n var j;\r\n var jLen;\r\n while (cont) {\r\n items = this.elemsData[i].it;\r\n itemsTransform = items[items.length - 1].transform.mProps.v.props;\r\n jLen = itemsTransform.length;\r\n items[items.length - 1].transform.mProps._mdf = true;\r\n items[items.length - 1].transform.op._mdf = true;\r\n items[items.length - 1].transform.op.v = this._currentCopies === 1\r\n ? this.so.v\r\n : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));\r\n\r\n if (iteration !== 0) {\r\n if ((i !== 0 && dir === 1) || (i !== this._currentCopies - 1 && dir === -1)) {\r\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);\r\n }\r\n this.matrix.transform(rProps[0], rProps[1], rProps[2], rProps[3], rProps[4], rProps[5], rProps[6], rProps[7], rProps[8], rProps[9], rProps[10], rProps[11], rProps[12], rProps[13], rProps[14], rProps[15]);\r\n this.matrix.transform(sProps[0], sProps[1], sProps[2], sProps[3], sProps[4], sProps[5], sProps[6], sProps[7], sProps[8], sProps[9], sProps[10], sProps[11], sProps[12], sProps[13], sProps[14], sProps[15]);\r\n this.matrix.transform(pProps[0], pProps[1], pProps[2], pProps[3], pProps[4], pProps[5], pProps[6], pProps[7], pProps[8], pProps[9], pProps[10], pProps[11], pProps[12], pProps[13], pProps[14], pProps[15]);\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n itemsTransform[j] = this.matrix.props[j];\r\n }\r\n this.matrix.reset();\r\n } else {\r\n this.matrix.reset();\r\n for (j = 0; j < jLen; j += 1) {\r\n itemsTransform[j] = this.matrix.props[j];\r\n }\r\n }\r\n iteration += 1;\r\n cont -= 1;\r\n i += dir;\r\n }\r\n } else {\r\n cont = this._currentCopies;\r\n i = 0;\r\n dir = 1;\r\n while (cont) {\r\n items = this.elemsData[i].it;\r\n itemsTransform = items[items.length - 1].transform.mProps.v.props;\r\n items[items.length - 1].transform.mProps._mdf = false;\r\n items[items.length - 1].transform.op._mdf = false;\r\n cont -= 1;\r\n i += dir;\r\n }\r\n }\r\n return hasReloaded;\r\n};\r\n\r\nRepeaterModifier.prototype.addShape = function () {};\r\n\r\nShapeModifiers.registerModifier('rp', RepeaterModifier);\r\n\r\n/* global createSizedArray, shapePool */\r\n\r\nfunction ShapeCollection() {\r\n this._length = 0;\r\n this._maxLength = 4;\r\n this.shapes = createSizedArray(this._maxLength);\r\n}\r\n\r\nShapeCollection.prototype.addShape = function (shapeData) {\r\n if (this._length === this._maxLength) {\r\n this.shapes = this.shapes.concat(createSizedArray(this._maxLength));\r\n this._maxLength *= 2;\r\n }\r\n this.shapes[this._length] = shapeData;\r\n this._length += 1;\r\n};\r\n\r\nShapeCollection.prototype.releaseShapes = function () {\r\n var i;\r\n for (i = 0; i < this._length; i += 1) {\r\n shapePool.release(this.shapes[i]);\r\n }\r\n this._length = 0;\r\n};\r\n\r\n/* global createSizedArray, createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */\r\n\r\nfunction DashProperty(elem, data, renderer, container) {\r\n this.elem = elem;\r\n this.frameId = -1;\r\n this.dataProps = createSizedArray(data.length);\r\n this.renderer = renderer;\r\n this.k = false;\r\n this.dashStr = '';\r\n this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);\r\n this.dashoffset = createTypedArray('float32', 1);\r\n this.initDynamicPropertyContainer(container);\r\n var i;\r\n var len = data.length || 0;\r\n var prop;\r\n for (i = 0; i < len; i += 1) {\r\n prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);\r\n this.k = prop.k || this.k;\r\n this.dataProps[i] = { n: data[i].n, p: prop };\r\n }\r\n if (!this.k) {\r\n this.getValue(true);\r\n }\r\n this._isAnimated = this.k;\r\n}\r\n\r\nDashProperty.prototype.getValue = function (forceRender) {\r\n if (this.elem.globalData.frameId === this.frameId && !forceRender) {\r\n return;\r\n }\r\n this.frameId = this.elem.globalData.frameId;\r\n this.iterateDynamicProperties();\r\n this._mdf = this._mdf || forceRender;\r\n if (this._mdf) {\r\n var i = 0;\r\n var len = this.dataProps.length;\r\n if (this.renderer === 'svg') {\r\n this.dashStr = '';\r\n }\r\n for (i = 0; i < len; i += 1) {\r\n if (this.dataProps[i].n !== 'o') {\r\n if (this.renderer === 'svg') {\r\n this.dashStr += ' ' + this.dataProps[i].p.v;\r\n } else {\r\n this.dashArray[i] = this.dataProps[i].p.v;\r\n }\r\n } else {\r\n this.dashoffset[0] = this.dataProps[i].p.v;\r\n }\r\n }\r\n }\r\n};\r\nextendPrototype([DynamicPropertyContainer], DashProperty);\r\n\r\n/* global createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */\r\nfunction GradientProperty(elem, data, container) {\r\n this.data = data;\r\n this.c = createTypedArray('uint8c', data.p * 4);\r\n var cLength = data.k.k[0].s ? (data.k.k[0].s.length - data.p * 4) : data.k.k.length - data.p * 4;\r\n this.o = createTypedArray('float32', cLength);\r\n this._cmdf = false;\r\n this._omdf = false;\r\n this._collapsable = this.checkCollapsable();\r\n this._hasOpacity = cLength;\r\n this.initDynamicPropertyContainer(container);\r\n this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);\r\n this.k = this.prop.k;\r\n this.getValue(true);\r\n}\r\n\r\nGradientProperty.prototype.comparePoints = function (values, points) {\r\n var i = 0;\r\n var len = this.o.length / 2;\r\n var diff;\r\n while (i < len) {\r\n diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);\r\n if (diff > 0.01) {\r\n return false;\r\n }\r\n i += 1;\r\n }\r\n return true;\r\n};\r\n\r\nGradientProperty.prototype.checkCollapsable = function () {\r\n if (this.o.length / 2 !== this.c.length / 4) {\r\n return false;\r\n }\r\n if (this.data.k.k[0].s) {\r\n var i = 0;\r\n var len = this.data.k.k.length;\r\n while (i < len) {\r\n if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {\r\n return false;\r\n }\r\n i += 1;\r\n }\r\n } else if (!this.comparePoints(this.data.k.k, this.data.p)) {\r\n return false;\r\n }\r\n return true;\r\n};\r\n\r\nGradientProperty.prototype.getValue = function (forceRender) {\r\n this.prop.getValue();\r\n this._mdf = false;\r\n this._cmdf = false;\r\n this._omdf = false;\r\n if (this.prop._mdf || forceRender) {\r\n var i;\r\n var len = this.data.p * 4;\r\n var mult;\r\n var val;\r\n for (i = 0; i < len; i += 1) {\r\n mult = i % 4 === 0 ? 100 : 255;\r\n val = Math.round(this.prop.v[i] * mult);\r\n if (this.c[i] !== val) {\r\n this.c[i] = val;\r\n this._cmdf = !forceRender;\r\n }\r\n }\r\n if (this.o.length) {\r\n len = this.prop.v.length;\r\n for (i = this.data.p * 4; i < len; i += 1) {\r\n mult = i % 2 === 0 ? 100 : 1;\r\n val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];\r\n if (this.o[i - this.data.p * 4] !== val) {\r\n this.o[i - this.data.p * 4] = val;\r\n this._omdf = !forceRender;\r\n }\r\n }\r\n }\r\n this._mdf = !forceRender;\r\n }\r\n};\r\n\r\nextendPrototype([DynamicPropertyContainer], GradientProperty);\r\n\r\n/* exported buildShapeString */\r\n\r\nvar buildShapeString = function (pathNodes, length, closed, mat) {\r\n if (length === 0) {\r\n return '';\r\n }\r\n var _o = pathNodes.o;\r\n var _i = pathNodes.i;\r\n var _v = pathNodes.v;\r\n var i;\r\n var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);\r\n for (i = 1; i < length; i += 1) {\r\n shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[i][0], _i[i][1]) + ' ' + mat.applyToPointStringified(_v[i][0], _v[i][1]);\r\n }\r\n if (closed && length) {\r\n shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[0][0], _i[0][1]) + ' ' + mat.applyToPointStringified(_v[0][0], _v[0][1]);\r\n shapeString += 'z';\r\n }\r\n return shapeString;\r\n};\r\n\r\n/* global Howl */\r\n/* exported audioControllerFactory */\r\n\r\nvar audioControllerFactory = (function () {\r\n function AudioController(audioFactory) {\r\n this.audios = [];\r\n this.audioFactory = audioFactory;\r\n this._volume = 1;\r\n this._isMuted = false;\r\n }\r\n\r\n AudioController.prototype = {\r\n addAudio: function (audio) {\r\n this.audios.push(audio);\r\n },\r\n pause: function () {\r\n var i;\r\n var len = this.audios.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.audios[i].pause();\r\n }\r\n },\r\n resume: function () {\r\n var i;\r\n var len = this.audios.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.audios[i].resume();\r\n }\r\n },\r\n setRate: function (rateValue) {\r\n var i;\r\n var len = this.audios.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.audios[i].setRate(rateValue);\r\n }\r\n },\r\n createAudio: function (assetPath) {\r\n if (this.audioFactory) {\r\n return this.audioFactory(assetPath);\r\n } if (Howl) {\r\n return new Howl({\r\n src: [assetPath],\r\n });\r\n }\r\n return {\r\n isPlaying: false,\r\n play: function () { this.isPlaying = true; },\r\n seek: function () { this.isPlaying = false; },\r\n playing: function () {},\r\n rate: function () {},\r\n setVolume: function () {},\r\n };\r\n },\r\n setAudioFactory: function (audioFactory) {\r\n this.audioFactory = audioFactory;\r\n },\r\n setVolume: function (value) {\r\n this._volume = value;\r\n this._updateVolume();\r\n },\r\n mute: function () {\r\n this._isMuted = true;\r\n this._updateVolume();\r\n },\r\n unmute: function () {\r\n this._isMuted = false;\r\n this._updateVolume();\r\n },\r\n getVolume: function () {\r\n return this._volume;\r\n },\r\n _updateVolume: function () {\r\n var i;\r\n var len = this.audios.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));\r\n }\r\n },\r\n };\r\n\r\n return function () {\r\n return new AudioController();\r\n };\r\n}());\r\n\r\n/* global createTag, createNS, isSafari, dataManager */\r\n/* exported ImagePreloader */\r\n\r\nvar ImagePreloader = (function () {\r\n var proxyImage = (function () {\r\n var canvas = createTag('canvas');\r\n canvas.width = 1;\r\n canvas.height = 1;\r\n var ctx = canvas.getContext('2d');\r\n ctx.fillStyle = 'rgba(0,0,0,0)';\r\n ctx.fillRect(0, 0, 1, 1);\r\n return canvas;\r\n }());\r\n\r\n function imageLoaded() {\r\n this.loadedAssets += 1;\r\n if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {\r\n if (this.imagesLoadedCb) {\r\n this.imagesLoadedCb(null);\r\n }\r\n }\r\n }\r\n function footageLoaded() {\r\n this.loadedFootagesCount += 1;\r\n if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {\r\n if (this.imagesLoadedCb) {\r\n this.imagesLoadedCb(null);\r\n }\r\n }\r\n }\r\n\r\n function getAssetsPath(assetData, assetsPath, originalPath) {\r\n var path = '';\r\n if (assetData.e) {\r\n path = assetData.p;\r\n } else if (assetsPath) {\r\n var imagePath = assetData.p;\r\n if (imagePath.indexOf('images/') !== -1) {\r\n imagePath = imagePath.split('/')[1];\r\n }\r\n path = assetsPath + imagePath;\r\n } else {\r\n path = originalPath;\r\n path += assetData.u ? assetData.u : '';\r\n path += assetData.p;\r\n }\r\n return path;\r\n }\r\n\r\n function testImageLoaded(img) {\r\n var _count = 0;\r\n var intervalId = setInterval(function () {\r\n var box = img.getBBox();\r\n if (box.width || _count > 500) {\r\n this._imageLoaded();\r\n clearInterval(intervalId);\r\n }\r\n _count += 1;\r\n }.bind(this), 50);\r\n }\r\n\r\n function createImageData(assetData) {\r\n var path = getAssetsPath(assetData, this.assetsPath, this.path);\r\n var img = createNS('image');\r\n if (isSafari) {\r\n this.testImageLoaded(img);\r\n } else {\r\n img.addEventListener('load', this._imageLoaded, false);\r\n }\r\n img.addEventListener('error', function () {\r\n ob.img = proxyImage;\r\n this._imageLoaded();\r\n }.bind(this), false);\r\n img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);\r\n if (this._elementHelper.append) {\r\n this._elementHelper.append(img);\r\n } else {\r\n this._elementHelper.appendChild(img);\r\n }\r\n var ob = {\r\n img: img,\r\n assetData: assetData,\r\n };\r\n return ob;\r\n }\r\n\r\n function createImgData(assetData) {\r\n var path = getAssetsPath(assetData, this.assetsPath, this.path);\r\n var img = createTag('img');\r\n img.crossOrigin = 'anonymous';\r\n img.addEventListener('load', this._imageLoaded, false);\r\n img.addEventListener('error', function () {\r\n ob.img = proxyImage;\r\n this._imageLoaded();\r\n }.bind(this), false);\r\n img.src = path;\r\n var ob = {\r\n img: img,\r\n assetData: assetData,\r\n };\r\n return ob;\r\n }\r\n\r\n function createFootageData(data) {\r\n var ob = {\r\n assetData: data,\r\n };\r\n var path = getAssetsPath(data, this.assetsPath, this.path);\r\n dataManager.loadData(path, function (footageData) {\r\n ob.img = footageData;\r\n this._footageLoaded();\r\n }.bind(this), function () {\r\n ob.img = {};\r\n this._footageLoaded();\r\n }.bind(this));\r\n return ob;\r\n }\r\n\r\n function loadAssets(assets, cb) {\r\n this.imagesLoadedCb = cb;\r\n var i;\r\n var len = assets.length;\r\n for (i = 0; i < len; i += 1) {\r\n if (!assets[i].layers) {\r\n if (!assets[i].t || assets[i].t === 'seq') {\r\n this.totalImages += 1;\r\n this.images.push(this._createImageData(assets[i]));\r\n } else if (assets[i].t === 3) {\r\n this.totalFootages += 1;\r\n this.images.push(this.createFootageData(assets[i]));\r\n }\r\n }\r\n }\r\n }\r\n\r\n function setPath(path) {\r\n this.path = path || '';\r\n }\r\n\r\n function setAssetsPath(path) {\r\n this.assetsPath = path || '';\r\n }\r\n\r\n function getAsset(assetData) {\r\n var i = 0;\r\n var len = this.images.length;\r\n while (i < len) {\r\n if (this.images[i].assetData === assetData) {\r\n return this.images[i].img;\r\n }\r\n i += 1;\r\n }\r\n return null;\r\n }\r\n\r\n function destroy() {\r\n this.imagesLoadedCb = null;\r\n this.images.length = 0;\r\n }\r\n\r\n function loadedImages() {\r\n return this.totalImages === this.loadedAssets;\r\n }\r\n\r\n function loadedFootages() {\r\n return this.totalFootages === this.loadedFootagesCount;\r\n }\r\n\r\n function setCacheType(type, elementHelper) {\r\n if (type === 'svg') {\r\n this._elementHelper = elementHelper;\r\n this._createImageData = this.createImageData.bind(this);\r\n } else {\r\n this._createImageData = this.createImgData.bind(this);\r\n }\r\n }\r\n\r\n function ImagePreloaderFactory() {\r\n this._imageLoaded = imageLoaded.bind(this);\r\n this._footageLoaded = footageLoaded.bind(this);\r\n this.testImageLoaded = testImageLoaded.bind(this);\r\n this.createFootageData = createFootageData.bind(this);\r\n this.assetsPath = '';\r\n this.path = '';\r\n this.totalImages = 0;\r\n this.totalFootages = 0;\r\n this.loadedAssets = 0;\r\n this.loadedFootagesCount = 0;\r\n this.imagesLoadedCb = null;\r\n this.images = [];\r\n }\r\n\r\n ImagePreloaderFactory.prototype = {\r\n loadAssets: loadAssets,\r\n setAssetsPath: setAssetsPath,\r\n setPath: setPath,\r\n loadedImages: loadedImages,\r\n loadedFootages: loadedFootages,\r\n destroy: destroy,\r\n getAsset: getAsset,\r\n createImgData: createImgData,\r\n createImageData: createImageData,\r\n imageLoaded: imageLoaded,\r\n footageLoaded: footageLoaded,\r\n setCacheType: setCacheType,\r\n };\r\n\r\n return ImagePreloaderFactory;\r\n}());\r\n\r\n/* exported featureSupport */\r\n\r\nvar featureSupport = (function () {\r\n var ob = {\r\n maskType: true,\r\n };\r\n if (/MSIE 10/i.test(navigator.userAgent) || /MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent) || /Edge\\/\\d./i.test(navigator.userAgent)) {\r\n ob.maskType = false;\r\n }\r\n return ob;\r\n}());\r\n\r\n/* global createNS */\r\n/* exported filtersFactory */\r\n\r\nvar filtersFactory = (function () {\r\n var ob = {};\r\n ob.createFilter = createFilter;\r\n ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;\r\n\r\n function createFilter(filId, skipCoordinates) {\r\n var fil = createNS('filter');\r\n fil.setAttribute('id', filId);\r\n if (skipCoordinates !== true) {\r\n fil.setAttribute('filterUnits', 'objectBoundingBox');\r\n fil.setAttribute('x', '0%');\r\n fil.setAttribute('y', '0%');\r\n fil.setAttribute('width', '100%');\r\n fil.setAttribute('height', '100%');\r\n }\r\n return fil;\r\n }\r\n\r\n function createAlphaToLuminanceFilter() {\r\n var feColorMatrix = createNS('feColorMatrix');\r\n feColorMatrix.setAttribute('type', 'matrix');\r\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\r\n feColorMatrix.setAttribute('values', '0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1');\r\n return feColorMatrix;\r\n }\r\n\r\n return ob;\r\n}());\r\n\r\n/* global createSizedArray, PropertyFactory, TextAnimatorDataProperty, bez, addHueToRGB,\r\n addSaturationToRGB, addBrightnessToRGB, LetterProps, Matrix, extendPrototype, DynamicPropertyContainer */\r\n\r\nfunction TextAnimatorProperty(textData, renderType, elem) {\r\n this._isFirstFrame = true;\r\n this._hasMaskedPath = false;\r\n this._frameId = -1;\r\n this._textData = textData;\r\n this._renderType = renderType;\r\n this._elem = elem;\r\n this._animatorsData = createSizedArray(this._textData.a.length);\r\n this._pathData = {};\r\n this._moreOptions = {\r\n alignment: {},\r\n };\r\n this.renderedLetters = [];\r\n this.lettersChangedFlag = false;\r\n this.initDynamicPropertyContainer(elem);\r\n}\r\n\r\nTextAnimatorProperty.prototype.searchProperties = function () {\r\n var i;\r\n var len = this._textData.a.length;\r\n var animatorProps;\r\n var getProp = PropertyFactory.getProp;\r\n for (i = 0; i < len; i += 1) {\r\n animatorProps = this._textData.a[i];\r\n this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);\r\n }\r\n if (this._textData.p && 'm' in this._textData.p) {\r\n this._pathData = {\r\n a: getProp(this._elem, this._textData.p.a, 0, 0, this),\r\n f: getProp(this._elem, this._textData.p.f, 0, 0, this),\r\n l: getProp(this._elem, this._textData.p.l, 0, 0, this),\r\n r: getProp(this._elem, this._textData.p.r, 0, 0, this),\r\n p: getProp(this._elem, this._textData.p.p, 0, 0, this),\r\n m: this._elem.maskManager.getMaskProperty(this._textData.p.m),\r\n };\r\n this._hasMaskedPath = true;\r\n } else {\r\n this._hasMaskedPath = false;\r\n }\r\n this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);\r\n};\r\n\r\nTextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {\r\n this.lettersChangedFlag = lettersChangedFlag;\r\n if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {\r\n return;\r\n }\r\n this._isFirstFrame = false;\r\n var alignment = this._moreOptions.alignment.v;\r\n var animators = this._animatorsData;\r\n var textData = this._textData;\r\n var matrixHelper = this.mHelper;\r\n var renderType = this._renderType;\r\n var renderedLettersCount = this.renderedLetters.length;\r\n var xPos;\r\n var yPos;\r\n var i;\r\n var len;\r\n var letters = documentData.l;\r\n var pathInfo;\r\n var currentLength;\r\n var currentPoint;\r\n var segmentLength;\r\n var flag;\r\n var pointInd;\r\n var segmentInd;\r\n var prevPoint;\r\n var points;\r\n var segments;\r\n var partialLength;\r\n var totalLength;\r\n var perc;\r\n var tanAngle;\r\n var mask;\r\n if (this._hasMaskedPath) {\r\n mask = this._pathData.m;\r\n if (!this._pathData.n || this._pathData._mdf) {\r\n var paths = mask.v;\r\n if (this._pathData.r.v) {\r\n paths = paths.reverse();\r\n }\r\n // TODO: release bezier data cached from previous pathInfo: this._pathData.pi\r\n pathInfo = {\r\n tLength: 0,\r\n segments: [],\r\n };\r\n len = paths._length - 1;\r\n var bezierData;\r\n totalLength = 0;\r\n for (i = 0; i < len; i += 1) {\r\n bezierData = bez.buildBezierData(paths.v[i],\r\n paths.v[i + 1],\r\n [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],\r\n [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);\r\n pathInfo.tLength += bezierData.segmentLength;\r\n pathInfo.segments.push(bezierData);\r\n totalLength += bezierData.segmentLength;\r\n }\r\n i = len;\r\n if (mask.v.c) {\r\n bezierData = bez.buildBezierData(paths.v[i],\r\n paths.v[0],\r\n [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],\r\n [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);\r\n pathInfo.tLength += bezierData.segmentLength;\r\n pathInfo.segments.push(bezierData);\r\n totalLength += bezierData.segmentLength;\r\n }\r\n this._pathData.pi = pathInfo;\r\n }\r\n pathInfo = this._pathData.pi;\r\n\r\n currentLength = this._pathData.f.v;\r\n segmentInd = 0;\r\n pointInd = 1;\r\n segmentLength = 0;\r\n flag = true;\r\n segments = pathInfo.segments;\r\n if (currentLength < 0 && mask.v.c) {\r\n if (pathInfo.tLength < Math.abs(currentLength)) {\r\n currentLength = -Math.abs(currentLength) % pathInfo.tLength;\r\n }\r\n segmentInd = segments.length - 1;\r\n points = segments[segmentInd].points;\r\n pointInd = points.length - 1;\r\n while (currentLength < 0) {\r\n currentLength += points[pointInd].partialLength;\r\n pointInd -= 1;\r\n if (pointInd < 0) {\r\n segmentInd -= 1;\r\n points = segments[segmentInd].points;\r\n pointInd = points.length - 1;\r\n }\r\n }\r\n }\r\n points = segments[segmentInd].points;\r\n prevPoint = points[pointInd - 1];\r\n currentPoint = points[pointInd];\r\n partialLength = currentPoint.partialLength;\r\n }\r\n\r\n len = letters.length;\r\n xPos = 0;\r\n yPos = 0;\r\n var yOff = documentData.finalSize * 1.2 * 0.714;\r\n var firstLine = true;\r\n var animatorProps;\r\n var animatorSelector;\r\n var j;\r\n var jLen;\r\n var letterValue;\r\n\r\n jLen = animators.length;\r\n\r\n var mult;\r\n var ind = -1;\r\n var offf;\r\n var xPathPos;\r\n var yPathPos;\r\n var initPathPos = currentLength;\r\n var initSegmentInd = segmentInd;\r\n var initPointInd = pointInd;\r\n var currentLine = -1;\r\n var elemOpacity;\r\n var sc;\r\n var sw;\r\n var fc;\r\n var k;\r\n var letterSw;\r\n var letterSc;\r\n var letterFc;\r\n var letterM = '';\r\n var letterP = this.defaultPropsArray;\r\n var letterO;\r\n\r\n //\r\n if (documentData.j === 2 || documentData.j === 1) {\r\n var animatorJustifyOffset = 0;\r\n var animatorFirstCharOffset = 0;\r\n var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;\r\n var lastIndex = 0;\r\n var isNewLine = true;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (letters[i].n) {\r\n if (animatorJustifyOffset) {\r\n animatorJustifyOffset += animatorFirstCharOffset;\r\n }\r\n while (lastIndex < i) {\r\n letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;\r\n lastIndex += 1;\r\n }\r\n animatorJustifyOffset = 0;\r\n isNewLine = true;\r\n } else {\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n if (animatorProps.t.propType) {\r\n if (isNewLine && documentData.j === 2) {\r\n animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;\r\n }\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n if (mult.length) {\r\n animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;\r\n } else {\r\n animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;\r\n }\r\n }\r\n }\r\n isNewLine = false;\r\n }\r\n }\r\n if (animatorJustifyOffset) {\r\n animatorJustifyOffset += animatorFirstCharOffset;\r\n }\r\n while (lastIndex < i) {\r\n letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;\r\n lastIndex += 1;\r\n }\r\n }\r\n //\r\n\r\n for (i = 0; i < len; i += 1) {\r\n matrixHelper.reset();\r\n elemOpacity = 1;\r\n if (letters[i].n) {\r\n xPos = 0;\r\n yPos += documentData.yOffset;\r\n yPos += firstLine ? 1 : 0;\r\n currentLength = initPathPos;\r\n firstLine = false;\r\n if (this._hasMaskedPath) {\r\n segmentInd = initSegmentInd;\r\n pointInd = initPointInd;\r\n points = segments[segmentInd].points;\r\n prevPoint = points[pointInd - 1];\r\n currentPoint = points[pointInd];\r\n partialLength = currentPoint.partialLength;\r\n segmentLength = 0;\r\n }\r\n letterM = '';\r\n letterFc = '';\r\n letterSw = '';\r\n letterO = '';\r\n letterP = this.defaultPropsArray;\r\n } else {\r\n if (this._hasMaskedPath) {\r\n if (currentLine !== letters[i].line) {\r\n switch (documentData.j) {\r\n case 1:\r\n currentLength += totalLength - documentData.lineWidths[letters[i].line];\r\n break;\r\n case 2:\r\n currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;\r\n break;\r\n default:\r\n break;\r\n }\r\n currentLine = letters[i].line;\r\n }\r\n if (ind !== letters[i].ind) {\r\n if (letters[ind]) {\r\n currentLength += letters[ind].extra;\r\n }\r\n currentLength += letters[i].an / 2;\r\n ind = letters[i].ind;\r\n }\r\n currentLength += (alignment[0] * letters[i].an) * 0.005;\r\n var animatorOffset = 0;\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n if (animatorProps.p.propType) {\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n if (mult.length) {\r\n animatorOffset += animatorProps.p.v[0] * mult[0];\r\n } else {\r\n animatorOffset += animatorProps.p.v[0] * mult;\r\n }\r\n }\r\n if (animatorProps.a.propType) {\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n if (mult.length) {\r\n animatorOffset += animatorProps.a.v[0] * mult[0];\r\n } else {\r\n animatorOffset += animatorProps.a.v[0] * mult;\r\n }\r\n }\r\n }\r\n flag = true;\r\n // Force alignment only works with a single line for now\r\n if (this._pathData.a.v) {\r\n currentLength = letters[0].an * 0.5 + ((totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind) / (len - 1);\r\n currentLength += this._pathData.f.v;\r\n }\r\n while (flag) {\r\n if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {\r\n perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;\r\n xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;\r\n yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;\r\n matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, -(alignment[1] * yOff) * 0.01);\r\n flag = false;\r\n } else if (points) {\r\n segmentLength += currentPoint.partialLength;\r\n pointInd += 1;\r\n if (pointInd >= points.length) {\r\n pointInd = 0;\r\n segmentInd += 1;\r\n if (!segments[segmentInd]) {\r\n if (mask.v.c) {\r\n pointInd = 0;\r\n segmentInd = 0;\r\n points = segments[segmentInd].points;\r\n } else {\r\n segmentLength -= currentPoint.partialLength;\r\n points = null;\r\n }\r\n } else {\r\n points = segments[segmentInd].points;\r\n }\r\n }\r\n if (points) {\r\n prevPoint = currentPoint;\r\n currentPoint = points[pointInd];\r\n partialLength = currentPoint.partialLength;\r\n }\r\n }\r\n }\r\n offf = letters[i].an / 2 - letters[i].add;\r\n matrixHelper.translate(-offf, 0, 0);\r\n } else {\r\n offf = letters[i].an / 2 - letters[i].add;\r\n matrixHelper.translate(-offf, 0, 0);\r\n\r\n // Grouping alignment\r\n matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, (-alignment[1] * yOff) * 0.01, 0);\r\n }\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n if (animatorProps.t.propType) {\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean \"isNewLine\"\r\n if (xPos !== 0 || documentData.j !== 0) {\r\n if (this._hasMaskedPath) {\r\n if (mult.length) {\r\n currentLength += animatorProps.t.v * mult[0];\r\n } else {\r\n currentLength += animatorProps.t.v * mult;\r\n }\r\n } else if (mult.length) {\r\n xPos += animatorProps.t.v * mult[0];\r\n } else {\r\n xPos += animatorProps.t.v * mult;\r\n }\r\n }\r\n }\r\n }\r\n if (documentData.strokeWidthAnim) {\r\n sw = documentData.sw || 0;\r\n }\r\n if (documentData.strokeColorAnim) {\r\n if (documentData.sc) {\r\n sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];\r\n } else {\r\n sc = [0, 0, 0];\r\n }\r\n }\r\n if (documentData.fillColorAnim && documentData.fc) {\r\n fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];\r\n }\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n if (animatorProps.a.propType) {\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n if (mult.length) {\r\n matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);\r\n } else {\r\n matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);\r\n }\r\n }\r\n }\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n if (animatorProps.s.propType) {\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n if (mult.length) {\r\n matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult[0]), 1 + ((animatorProps.s.v[1] - 1) * mult[1]), 1);\r\n } else {\r\n matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult), 1 + ((animatorProps.s.v[1] - 1) * mult), 1);\r\n }\r\n }\r\n }\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n if (animatorProps.sk.propType) {\r\n if (mult.length) {\r\n matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);\r\n } else {\r\n matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);\r\n }\r\n }\r\n if (animatorProps.r.propType) {\r\n if (mult.length) {\r\n matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);\r\n } else {\r\n matrixHelper.rotateZ(-animatorProps.r.v * mult);\r\n }\r\n }\r\n if (animatorProps.ry.propType) {\r\n if (mult.length) {\r\n matrixHelper.rotateY(animatorProps.ry.v * mult[1]);\r\n } else {\r\n matrixHelper.rotateY(animatorProps.ry.v * mult);\r\n }\r\n }\r\n if (animatorProps.rx.propType) {\r\n if (mult.length) {\r\n matrixHelper.rotateX(animatorProps.rx.v * mult[0]);\r\n } else {\r\n matrixHelper.rotateX(animatorProps.rx.v * mult);\r\n }\r\n }\r\n if (animatorProps.o.propType) {\r\n if (mult.length) {\r\n elemOpacity += ((animatorProps.o.v) * mult[0] - elemOpacity) * mult[0];\r\n } else {\r\n elemOpacity += ((animatorProps.o.v) * mult - elemOpacity) * mult;\r\n }\r\n }\r\n if (documentData.strokeWidthAnim && animatorProps.sw.propType) {\r\n if (mult.length) {\r\n sw += animatorProps.sw.v * mult[0];\r\n } else {\r\n sw += animatorProps.sw.v * mult;\r\n }\r\n }\r\n if (documentData.strokeColorAnim && animatorProps.sc.propType) {\r\n for (k = 0; k < 3; k += 1) {\r\n if (mult.length) {\r\n sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];\r\n } else {\r\n sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;\r\n }\r\n }\r\n }\r\n if (documentData.fillColorAnim && documentData.fc) {\r\n if (animatorProps.fc.propType) {\r\n for (k = 0; k < 3; k += 1) {\r\n if (mult.length) {\r\n fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];\r\n } else {\r\n fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;\r\n }\r\n }\r\n }\r\n if (animatorProps.fh.propType) {\r\n if (mult.length) {\r\n fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);\r\n } else {\r\n fc = addHueToRGB(fc, animatorProps.fh.v * mult);\r\n }\r\n }\r\n if (animatorProps.fs.propType) {\r\n if (mult.length) {\r\n fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);\r\n } else {\r\n fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);\r\n }\r\n }\r\n if (animatorProps.fb.propType) {\r\n if (mult.length) {\r\n fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);\r\n } else {\r\n fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);\r\n }\r\n }\r\n }\r\n }\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n\r\n if (animatorProps.p.propType) {\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n if (this._hasMaskedPath) {\r\n if (mult.length) {\r\n matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);\r\n } else {\r\n matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);\r\n }\r\n } else if (mult.length) {\r\n matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);\r\n } else {\r\n matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);\r\n }\r\n }\r\n }\r\n if (documentData.strokeWidthAnim) {\r\n letterSw = sw < 0 ? 0 : sw;\r\n }\r\n if (documentData.strokeColorAnim) {\r\n letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';\r\n }\r\n if (documentData.fillColorAnim && documentData.fc) {\r\n letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';\r\n }\r\n\r\n if (this._hasMaskedPath) {\r\n matrixHelper.translate(0, -documentData.ls);\r\n\r\n matrixHelper.translate(0, (alignment[1] * yOff) * 0.01 + yPos, 0);\r\n if (this._pathData.p.v) {\r\n tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);\r\n var rot = (Math.atan(tanAngle) * 180) / Math.PI;\r\n if (currentPoint.point[0] < prevPoint.point[0]) {\r\n rot += 180;\r\n }\r\n matrixHelper.rotate((-rot * Math.PI) / 180);\r\n }\r\n matrixHelper.translate(xPathPos, yPathPos, 0);\r\n currentLength -= (alignment[0] * letters[i].an) * 0.005;\r\n if (letters[i + 1] && ind !== letters[i + 1].ind) {\r\n currentLength += letters[i].an / 2;\r\n currentLength += (documentData.tr * 0.001) * documentData.finalSize;\r\n }\r\n } else {\r\n matrixHelper.translate(xPos, yPos, 0);\r\n\r\n if (documentData.ps) {\r\n // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);\r\n matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);\r\n }\r\n switch (documentData.j) {\r\n case 1:\r\n matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);\r\n break;\r\n case 2:\r\n matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);\r\n break;\r\n default:\r\n break;\r\n }\r\n matrixHelper.translate(0, -documentData.ls);\r\n matrixHelper.translate(offf, 0, 0);\r\n matrixHelper.translate((alignment[0] * letters[i].an) * 0.005, (alignment[1] * yOff) * 0.01, 0);\r\n xPos += letters[i].l + (documentData.tr * 0.001) * documentData.finalSize;\r\n }\r\n if (renderType === 'html') {\r\n letterM = matrixHelper.toCSS();\r\n } else if (renderType === 'svg') {\r\n letterM = matrixHelper.to2dCSS();\r\n } else {\r\n letterP = [matrixHelper.props[0], matrixHelper.props[1], matrixHelper.props[2], matrixHelper.props[3], matrixHelper.props[4], matrixHelper.props[5], matrixHelper.props[6], matrixHelper.props[7], matrixHelper.props[8], matrixHelper.props[9], matrixHelper.props[10], matrixHelper.props[11], matrixHelper.props[12], matrixHelper.props[13], matrixHelper.props[14], matrixHelper.props[15]];\r\n }\r\n letterO = elemOpacity;\r\n }\r\n\r\n if (renderedLettersCount <= i) {\r\n letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);\r\n this.renderedLetters.push(letterValue);\r\n renderedLettersCount += 1;\r\n this.lettersChangedFlag = true;\r\n } else {\r\n letterValue = this.renderedLetters[i];\r\n this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;\r\n }\r\n }\r\n};\r\n\r\nTextAnimatorProperty.prototype.getValue = function () {\r\n if (this._elem.globalData.frameId === this._frameId) {\r\n return;\r\n }\r\n this._frameId = this._elem.globalData.frameId;\r\n this.iterateDynamicProperties();\r\n};\r\n\r\nTextAnimatorProperty.prototype.mHelper = new Matrix();\r\nTextAnimatorProperty.prototype.defaultPropsArray = [];\r\nextendPrototype([DynamicPropertyContainer], TextAnimatorProperty);\r\n\r\n/* global PropertyFactory, degToRads, TextSelectorProp */\r\n/* exported TextAnimatorDataProperty */\r\n\r\nfunction TextAnimatorDataProperty(elem, animatorProps, container) {\r\n var defaultData = { propType: false };\r\n var getProp = PropertyFactory.getProp;\r\n var textAnimatorAnimatables = animatorProps.a;\r\n this.a = {\r\n r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,\r\n rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,\r\n ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,\r\n sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,\r\n sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,\r\n s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,\r\n a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,\r\n o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,\r\n p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,\r\n sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,\r\n sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,\r\n fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,\r\n fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,\r\n fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,\r\n fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,\r\n t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData,\r\n };\r\n\r\n this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);\r\n this.s.t = animatorProps.s.t;\r\n}\r\n\r\nfunction LetterProps(o, sw, sc, fc, m, p) {\r\n this.o = o;\r\n this.sw = sw;\r\n this.sc = sc;\r\n this.fc = fc;\r\n this.m = m;\r\n this.p = p;\r\n this._mdf = {\r\n o: true,\r\n sw: !!sw,\r\n sc: !!sc,\r\n fc: !!fc,\r\n m: true,\r\n p: true,\r\n };\r\n}\r\n\r\nLetterProps.prototype.update = function (o, sw, sc, fc, m, p) {\r\n this._mdf.o = false;\r\n this._mdf.sw = false;\r\n this._mdf.sc = false;\r\n this._mdf.fc = false;\r\n this._mdf.m = false;\r\n this._mdf.p = false;\r\n var updated = false;\r\n\r\n if (this.o !== o) {\r\n this.o = o;\r\n this._mdf.o = true;\r\n updated = true;\r\n }\r\n if (this.sw !== sw) {\r\n this.sw = sw;\r\n this._mdf.sw = true;\r\n updated = true;\r\n }\r\n if (this.sc !== sc) {\r\n this.sc = sc;\r\n this._mdf.sc = true;\r\n updated = true;\r\n }\r\n if (this.fc !== fc) {\r\n this.fc = fc;\r\n this._mdf.fc = true;\r\n updated = true;\r\n }\r\n if (this.m !== m) {\r\n this.m = m;\r\n this._mdf.m = true;\r\n updated = true;\r\n }\r\n if (p.length && (this.p[0] !== p[0] || this.p[1] !== p[1] || this.p[4] !== p[4] || this.p[5] !== p[5] || this.p[12] !== p[12] || this.p[13] !== p[13])) {\r\n this.p = p;\r\n this._mdf.p = true;\r\n updated = true;\r\n }\r\n return updated;\r\n};\r\n\r\n/* global FontManager, initialDefaultFrame, getFontProperties */\r\n/* exported TextProperty */\r\n\r\nfunction TextProperty(elem, data) {\r\n this._frameId = initialDefaultFrame;\r\n this.pv = '';\r\n this.v = '';\r\n this.kf = false;\r\n this._isFirstFrame = true;\r\n this._mdf = false;\r\n this.data = data;\r\n this.elem = elem;\r\n this.comp = this.elem.comp;\r\n this.keysIndex = 0;\r\n this.canResize = false;\r\n this.minimumFontSize = 1;\r\n this.effectsSequence = [];\r\n this.currentData = {\r\n ascent: 0,\r\n boxWidth: this.defaultBoxWidth,\r\n f: '',\r\n fStyle: '',\r\n fWeight: '',\r\n fc: '',\r\n j: '',\r\n justifyOffset: '',\r\n l: [],\r\n lh: 0,\r\n lineWidths: [],\r\n ls: '',\r\n of: '',\r\n s: '',\r\n sc: '',\r\n sw: 0,\r\n t: 0,\r\n tr: 0,\r\n sz: 0,\r\n ps: null,\r\n fillColorAnim: false,\r\n strokeColorAnim: false,\r\n strokeWidthAnim: false,\r\n yOffset: 0,\r\n finalSize: 0,\r\n finalText: [],\r\n finalLineHeight: 0,\r\n __complete: false,\r\n\r\n };\r\n this.copyData(this.currentData, this.data.d.k[0].s);\r\n\r\n if (!this.searchProperty()) {\r\n this.completeTextData(this.currentData);\r\n }\r\n}\r\n\r\nTextProperty.prototype.defaultBoxWidth = [0, 0];\r\n\r\nTextProperty.prototype.copyData = function (obj, data) {\r\n for (var s in data) {\r\n if (Object.prototype.hasOwnProperty.call(data, s)) {\r\n obj[s] = data[s];\r\n }\r\n }\r\n return obj;\r\n};\r\n\r\nTextProperty.prototype.setCurrentData = function (data) {\r\n if (!data.__complete) {\r\n this.completeTextData(data);\r\n }\r\n this.currentData = data;\r\n this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;\r\n this._mdf = true;\r\n};\r\n\r\nTextProperty.prototype.searchProperty = function () {\r\n return this.searchKeyframes();\r\n};\r\n\r\nTextProperty.prototype.searchKeyframes = function () {\r\n this.kf = this.data.d.k.length > 1;\r\n if (this.kf) {\r\n this.addEffect(this.getKeyframeValue.bind(this));\r\n }\r\n return this.kf;\r\n};\r\n\r\nTextProperty.prototype.addEffect = function (effectFunction) {\r\n this.effectsSequence.push(effectFunction);\r\n this.elem.addDynamicProperty(this);\r\n};\r\n\r\nTextProperty.prototype.getValue = function (_finalValue) {\r\n if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {\r\n return;\r\n }\r\n this.currentData.t = this.data.d.k[this.keysIndex].s.t;\r\n var currentValue = this.currentData;\r\n var currentIndex = this.keysIndex;\r\n if (this.lock) {\r\n this.setCurrentData(this.currentData);\r\n return;\r\n }\r\n this.lock = true;\r\n this._mdf = false;\r\n var i; var\r\n len = this.effectsSequence.length;\r\n var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;\r\n for (i = 0; i < len; i += 1) {\r\n // Checking if index changed to prevent creating a new object every time the expression updates.\r\n if (currentIndex !== this.keysIndex) {\r\n finalValue = this.effectsSequence[i](finalValue, finalValue.t);\r\n } else {\r\n finalValue = this.effectsSequence[i](this.currentData, finalValue.t);\r\n }\r\n }\r\n if (currentValue !== finalValue) {\r\n this.setCurrentData(finalValue);\r\n }\r\n this.v = this.currentData;\r\n this.pv = this.v;\r\n this.lock = false;\r\n this.frameId = this.elem.globalData.frameId;\r\n};\r\n\r\nTextProperty.prototype.getKeyframeValue = function () {\r\n var textKeys = this.data.d.k;\r\n var frameNum = this.elem.comp.renderedFrame;\r\n var i = 0; var\r\n len = textKeys.length;\r\n while (i <= len - 1) {\r\n if (i === len - 1 || textKeys[i + 1].t > frameNum) {\r\n break;\r\n }\r\n i += 1;\r\n }\r\n if (this.keysIndex !== i) {\r\n this.keysIndex = i;\r\n }\r\n return this.data.d.k[this.keysIndex].s;\r\n};\r\n\r\nTextProperty.prototype.buildFinalText = function (text) {\r\n var charactersArray = [];\r\n var i = 0;\r\n var len = text.length;\r\n var charCode;\r\n var secondCharCode;\r\n var shouldCombine = false;\r\n while (i < len) {\r\n charCode = text.charCodeAt(i);\r\n if (FontManager.isCombinedCharacter(charCode)) {\r\n charactersArray[charactersArray.length - 1] += text.charAt(i);\r\n } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {\r\n secondCharCode = text.charCodeAt(i + 1);\r\n if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {\r\n if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {\r\n charactersArray[charactersArray.length - 1] += text.substr(i, 2);\r\n shouldCombine = false;\r\n } else {\r\n charactersArray.push(text.substr(i, 2));\r\n }\r\n i += 1;\r\n } else {\r\n charactersArray.push(text.charAt(i));\r\n }\r\n } else if (charCode > 0xDBFF) {\r\n secondCharCode = text.charCodeAt(i + 1);\r\n if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {\r\n shouldCombine = true;\r\n charactersArray[charactersArray.length - 1] += text.substr(i, 2);\r\n i += 1;\r\n } else {\r\n charactersArray.push(text.charAt(i));\r\n }\r\n } else if (FontManager.isZeroWidthJoiner(charCode)) {\r\n charactersArray[charactersArray.length - 1] += text.charAt(i);\r\n shouldCombine = true;\r\n } else {\r\n charactersArray.push(text.charAt(i));\r\n }\r\n i += 1;\r\n }\r\n return charactersArray;\r\n};\r\n\r\nTextProperty.prototype.completeTextData = function (documentData) {\r\n documentData.__complete = true;\r\n var fontManager = this.elem.globalData.fontManager;\r\n var data = this.data;\r\n var letters = [];\r\n var i; var\r\n len;\r\n var newLineFlag; var index = 0; var\r\n val;\r\n var anchorGrouping = data.m.g;\r\n var currentSize = 0; var currentPos = 0; var currentLine = 0; var\r\n lineWidths = [];\r\n var lineWidth = 0;\r\n var maxLineWidth = 0;\r\n var j; var\r\n jLen;\r\n var fontData = fontManager.getFontByName(documentData.f);\r\n var charData; var\r\n cLength = 0;\r\n\r\n var fontProps = getFontProperties(fontData);\r\n documentData.fWeight = fontProps.weight;\r\n documentData.fStyle = fontProps.style;\r\n documentData.finalSize = documentData.s;\r\n documentData.finalText = this.buildFinalText(documentData.t);\r\n len = documentData.finalText.length;\r\n documentData.finalLineHeight = documentData.lh;\r\n var trackingOffset = (documentData.tr / 1000) * documentData.finalSize;\r\n var charCode;\r\n if (documentData.sz) {\r\n var flag = true;\r\n var boxWidth = documentData.sz[0];\r\n var boxHeight = documentData.sz[1];\r\n var currentHeight; var\r\n finalText;\r\n while (flag) {\r\n finalText = this.buildFinalText(documentData.t);\r\n currentHeight = 0;\r\n lineWidth = 0;\r\n len = finalText.length;\r\n trackingOffset = (documentData.tr / 1000) * documentData.finalSize;\r\n var lastSpaceIndex = -1;\r\n for (i = 0; i < len; i += 1) {\r\n charCode = finalText[i].charCodeAt(0);\r\n newLineFlag = false;\r\n if (finalText[i] === ' ') {\r\n lastSpaceIndex = i;\r\n } else if (charCode === 13 || charCode === 3) {\r\n lineWidth = 0;\r\n newLineFlag = true;\r\n currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;\r\n }\r\n if (fontManager.chars) {\r\n charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);\r\n cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;\r\n } else {\r\n // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;\r\n cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);\r\n }\r\n if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {\r\n if (lastSpaceIndex === -1) {\r\n len += 1;\r\n } else {\r\n i = lastSpaceIndex;\r\n }\r\n currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;\r\n finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\\r');\r\n // finalText = finalText.substr(0,i) + \"\\r\" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);\r\n lastSpaceIndex = -1;\r\n lineWidth = 0;\r\n } else {\r\n lineWidth += cLength;\r\n lineWidth += trackingOffset;\r\n }\r\n }\r\n currentHeight += (fontData.ascent * documentData.finalSize) / 100;\r\n if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {\r\n documentData.finalSize -= 1;\r\n documentData.finalLineHeight = (documentData.finalSize * documentData.lh) / documentData.s;\r\n } else {\r\n documentData.finalText = finalText;\r\n len = documentData.finalText.length;\r\n flag = false;\r\n }\r\n }\r\n }\r\n lineWidth = -trackingOffset;\r\n cLength = 0;\r\n var uncollapsedSpaces = 0;\r\n var currentChar;\r\n for (i = 0; i < len; i += 1) {\r\n newLineFlag = false;\r\n currentChar = documentData.finalText[i];\r\n charCode = currentChar.charCodeAt(0);\r\n if (charCode === 13 || charCode === 3) {\r\n uncollapsedSpaces = 0;\r\n lineWidths.push(lineWidth);\r\n maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;\r\n lineWidth = -2 * trackingOffset;\r\n val = '';\r\n newLineFlag = true;\r\n currentLine += 1;\r\n } else {\r\n val = currentChar;\r\n }\r\n if (fontManager.chars) {\r\n charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);\r\n cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;\r\n } else {\r\n // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);\r\n // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;\r\n cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);\r\n }\r\n\r\n //\r\n if (currentChar === ' ') {\r\n uncollapsedSpaces += cLength + trackingOffset;\r\n } else {\r\n lineWidth += cLength + trackingOffset + uncollapsedSpaces;\r\n uncollapsedSpaces = 0;\r\n }\r\n letters.push({\r\n l: cLength, an: cLength, add: currentSize, n: newLineFlag, anIndexes: [], val: val, line: currentLine, animatorJustifyOffset: 0,\r\n });\r\n if (anchorGrouping == 2) { // eslint-disable-line eqeqeq\r\n currentSize += cLength;\r\n if (val === '' || val === ' ' || i === len - 1) {\r\n if (val === '' || val === ' ') {\r\n currentSize -= cLength;\r\n }\r\n while (currentPos <= i) {\r\n letters[currentPos].an = currentSize;\r\n letters[currentPos].ind = index;\r\n letters[currentPos].extra = cLength;\r\n currentPos += 1;\r\n }\r\n index += 1;\r\n currentSize = 0;\r\n }\r\n } else if (anchorGrouping == 3) { // eslint-disable-line eqeqeq\r\n currentSize += cLength;\r\n if (val === '' || i === len - 1) {\r\n if (val === '') {\r\n currentSize -= cLength;\r\n }\r\n while (currentPos <= i) {\r\n letters[currentPos].an = currentSize;\r\n letters[currentPos].ind = index;\r\n letters[currentPos].extra = cLength;\r\n currentPos += 1;\r\n }\r\n currentSize = 0;\r\n index += 1;\r\n }\r\n } else {\r\n letters[index].ind = index;\r\n letters[index].extra = 0;\r\n index += 1;\r\n }\r\n }\r\n documentData.l = letters;\r\n maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;\r\n lineWidths.push(lineWidth);\r\n if (documentData.sz) {\r\n documentData.boxWidth = documentData.sz[0];\r\n documentData.justifyOffset = 0;\r\n } else {\r\n documentData.boxWidth = maxLineWidth;\r\n switch (documentData.j) {\r\n case 1:\r\n documentData.justifyOffset = -documentData.boxWidth;\r\n break;\r\n case 2:\r\n documentData.justifyOffset = -documentData.boxWidth / 2;\r\n break;\r\n default:\r\n documentData.justifyOffset = 0;\r\n }\r\n }\r\n documentData.lineWidths = lineWidths;\r\n\r\n var animators = data.a; var animatorData; var\r\n letterData;\r\n jLen = animators.length;\r\n var based; var ind; var\r\n indexes = [];\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorData = animators[j];\r\n if (animatorData.a.sc) {\r\n documentData.strokeColorAnim = true;\r\n }\r\n if (animatorData.a.sw) {\r\n documentData.strokeWidthAnim = true;\r\n }\r\n if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {\r\n documentData.fillColorAnim = true;\r\n }\r\n ind = 0;\r\n based = animatorData.s.b;\r\n for (i = 0; i < len; i += 1) {\r\n letterData = letters[i];\r\n letterData.anIndexes[j] = ind;\r\n if ((based == 1 && letterData.val !== '') || (based == 2 && letterData.val !== '' && letterData.val !== ' ') || (based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1)) || (based == 4 && (letterData.n || i == len - 1))) { // eslint-disable-line eqeqeq\r\n if (animatorData.s.rn === 1) {\r\n indexes.push(ind);\r\n }\r\n ind += 1;\r\n }\r\n }\r\n data.a[j].s.totalChars = ind;\r\n var currentInd = -1; var\r\n newInd;\r\n if (animatorData.s.rn === 1) {\r\n for (i = 0; i < len; i += 1) {\r\n letterData = letters[i];\r\n if (currentInd != letterData.anIndexes[j]) { // eslint-disable-line eqeqeq\r\n currentInd = letterData.anIndexes[j];\r\n newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];\r\n }\r\n letterData.anIndexes[j] = newInd;\r\n }\r\n }\r\n }\r\n documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;\r\n documentData.ls = documentData.ls || 0;\r\n documentData.ascent = (fontData.ascent * documentData.finalSize) / 100;\r\n};\r\n\r\nTextProperty.prototype.updateDocumentData = function (newData, index) {\r\n index = index === undefined ? this.keysIndex : index;\r\n var dData = this.copyData({}, this.data.d.k[index].s);\r\n dData = this.copyData(dData, newData);\r\n this.data.d.k[index].s = dData;\r\n this.recalculate(index);\r\n this.elem.addDynamicProperty(this);\r\n};\r\n\r\nTextProperty.prototype.recalculate = function (index) {\r\n var dData = this.data.d.k[index].s;\r\n dData.__complete = false;\r\n this.keysIndex = 0;\r\n this._isFirstFrame = true;\r\n this.getValue(dData);\r\n};\r\n\r\nTextProperty.prototype.canResizeFont = function (_canResize) {\r\n this.canResize = _canResize;\r\n this.recalculate(this.keysIndex);\r\n this.elem.addDynamicProperty(this);\r\n};\r\n\r\nTextProperty.prototype.setMinimumFontSize = function (_fontValue) {\r\n this.minimumFontSize = Math.floor(_fontValue) || 1;\r\n this.recalculate(this.keysIndex);\r\n this.elem.addDynamicProperty(this);\r\n};\r\n\r\n/* global extendPrototype, BezierFactory, PropertyFactory, DynamicPropertyContainer */\r\n/* exported TextSelectorProp */\r\n\r\nvar TextSelectorProp = (function () {\r\n var max = Math.max;\r\n var min = Math.min;\r\n var floor = Math.floor;\r\n\r\n function TextSelectorPropFactory(elem, data) {\r\n this._currentTextLength = -1;\r\n this.k = false;\r\n this.data = data;\r\n this.elem = elem;\r\n this.comp = elem.comp;\r\n this.finalS = 0;\r\n this.finalE = 0;\r\n this.initDynamicPropertyContainer(elem);\r\n this.s = PropertyFactory.getProp(elem, data.s || { k: 0 }, 0, 0, this);\r\n if ('e' in data) {\r\n this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);\r\n } else {\r\n this.e = { v: 100 };\r\n }\r\n this.o = PropertyFactory.getProp(elem, data.o || { k: 0 }, 0, 0, this);\r\n this.xe = PropertyFactory.getProp(elem, data.xe || { k: 0 }, 0, 0, this);\r\n this.ne = PropertyFactory.getProp(elem, data.ne || { k: 0 }, 0, 0, this);\r\n this.sm = PropertyFactory.getProp(elem, data.sm || { k: 100 }, 0, 0, this);\r\n this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);\r\n if (!this.dynamicProperties.length) {\r\n this.getValue();\r\n }\r\n }\r\n\r\n TextSelectorPropFactory.prototype = {\r\n getMult: function (ind) {\r\n if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {\r\n this.getValue();\r\n }\r\n // var easer = bez.getEasingCurve(this.ne.v/100,0,1-this.xe.v/100,1);\r\n var x1 = 0;\r\n var y1 = 0;\r\n var x2 = 1;\r\n var y2 = 1;\r\n if (this.ne.v > 0) {\r\n x1 = this.ne.v / 100.0;\r\n } else {\r\n y1 = -this.ne.v / 100.0;\r\n }\r\n if (this.xe.v > 0) {\r\n x2 = 1.0 - this.xe.v / 100.0;\r\n } else {\r\n y2 = 1.0 + this.xe.v / 100.0;\r\n }\r\n var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;\r\n\r\n var mult = 0;\r\n var s = this.finalS;\r\n var e = this.finalE;\r\n var type = this.data.sh;\r\n if (type === 2) {\r\n if (e === s) {\r\n mult = ind >= e ? 1 : 0;\r\n } else {\r\n mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\r\n }\r\n mult = easer(mult);\r\n } else if (type === 3) {\r\n if (e === s) {\r\n mult = ind >= e ? 0 : 1;\r\n } else {\r\n mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\r\n }\r\n\r\n mult = easer(mult);\r\n } else if (type === 4) {\r\n if (e === s) {\r\n mult = 0;\r\n } else {\r\n mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\r\n if (mult < 0.5) {\r\n mult *= 2;\r\n } else {\r\n mult = 1 - 2 * (mult - 0.5);\r\n }\r\n }\r\n mult = easer(mult);\r\n } else if (type === 5) {\r\n if (e === s) {\r\n mult = 0;\r\n } else {\r\n var tot = e - s;\r\n /* ind += 0.5;\r\n mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */\r\n ind = min(max(0, ind + 0.5 - s), e - s);\r\n var x = -tot / 2 + ind;\r\n var a = tot / 2;\r\n mult = Math.sqrt(1 - (x * x) / (a * a));\r\n }\r\n mult = easer(mult);\r\n } else if (type === 6) {\r\n if (e === s) {\r\n mult = 0;\r\n } else {\r\n ind = min(max(0, ind + 0.5 - s), e - s);\r\n mult = (1 + (Math.cos((Math.PI + Math.PI * 2 * (ind) / (e - s))))) / 2; // eslint-disable-line\r\n }\r\n mult = easer(mult);\r\n } else {\r\n if (ind >= floor(s)) {\r\n if (ind - s < 0) {\r\n mult = max(0, min(min(e, 1) - (s - ind), 1));\r\n } else {\r\n mult = max(0, min(e - ind, 1));\r\n }\r\n }\r\n mult = easer(mult);\r\n }\r\n // Smoothness implementation.\r\n // The smoothness represents a reduced range of the original [0; 1] range.\r\n // if smoothness is 25%, the new range will be [0.375; 0.625]\r\n // Steps are:\r\n // - find the lower value of the new range (threshold)\r\n // - if multiplier is smaller than that value, floor it to 0\r\n // - if it is larger,\r\n // - subtract the threshold\r\n // - divide it by the smoothness (this will return the range to [0; 1])\r\n // Note: If it doesn't work on some scenarios, consider applying it before the easer.\r\n if (this.sm.v !== 100) {\r\n var smoothness = this.sm.v * 0.01;\r\n if (smoothness === 0) {\r\n smoothness = 0.00000001;\r\n }\r\n var threshold = 0.5 - smoothness * 0.5;\r\n if (mult < threshold) {\r\n mult = 0;\r\n } else {\r\n mult = (mult - threshold) / smoothness;\r\n if (mult > 1) {\r\n mult = 1;\r\n }\r\n }\r\n }\r\n return mult * this.a.v;\r\n },\r\n getValue: function (newCharsFlag) {\r\n this.iterateDynamicProperties();\r\n this._mdf = newCharsFlag || this._mdf;\r\n this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;\r\n if (newCharsFlag && this.data.r === 2) {\r\n this.e.v = this._currentTextLength;\r\n }\r\n var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;\r\n var o = this.o.v / divisor;\r\n var s = this.s.v / divisor + o;\r\n var e = (this.e.v / divisor) + o;\r\n if (s > e) {\r\n var _s = s;\r\n s = e;\r\n e = _s;\r\n }\r\n this.finalS = s;\r\n this.finalE = e;\r\n },\r\n };\r\n extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);\r\n\r\n function getTextSelectorProp(elem, data, arr) {\r\n return new TextSelectorPropFactory(elem, data, arr);\r\n }\r\n\r\n return {\r\n getTextSelectorProp: getTextSelectorProp,\r\n };\r\n}());\r\n\r\n/* global createSizedArray, pooling */\r\n/* exported poolFactory */\r\n\r\nvar poolFactory = (function () {\r\n return function (initialLength, _create, _release) {\r\n var _length = 0;\r\n var _maxLength = initialLength;\r\n var pool = createSizedArray(_maxLength);\r\n\r\n var ob = {\r\n newElement: newElement,\r\n release: release,\r\n };\r\n\r\n function newElement() {\r\n var element;\r\n if (_length) {\r\n _length -= 1;\r\n element = pool[_length];\r\n } else {\r\n element = _create();\r\n }\r\n return element;\r\n }\r\n\r\n function release(element) {\r\n if (_length === _maxLength) {\r\n pool = pooling.double(pool);\r\n _maxLength *= 2;\r\n }\r\n if (_release) {\r\n _release(element);\r\n }\r\n pool[_length] = element;\r\n _length += 1;\r\n }\r\n\r\n return ob;\r\n };\r\n}());\r\n\r\n/* global createSizedArray */\r\n/* exported pooling */\r\n\r\nvar pooling = (function () {\r\n function double(arr) {\r\n return arr.concat(createSizedArray(arr.length));\r\n }\r\n\r\n return {\r\n double: double,\r\n };\r\n}());\r\n\r\n/* global createTypedArray, poolFactory */\r\n/* exported pointPool */\r\n\r\nvar pointPool = (function () {\r\n function create() {\r\n return createTypedArray('float32', 2);\r\n }\r\n return poolFactory(8, create);\r\n}());\r\n\r\n/* global ShapePath, pointPool, poolFactory */\r\n/* exported shapePool */\r\n\r\nvar shapePool = (function () {\r\n function create() {\r\n return new ShapePath();\r\n }\r\n\r\n function release(shapePath) {\r\n var len = shapePath._length;\r\n var i;\r\n for (i = 0; i < len; i += 1) {\r\n pointPool.release(shapePath.v[i]);\r\n pointPool.release(shapePath.i[i]);\r\n pointPool.release(shapePath.o[i]);\r\n shapePath.v[i] = null;\r\n shapePath.i[i] = null;\r\n shapePath.o[i] = null;\r\n }\r\n shapePath._length = 0;\r\n shapePath.c = false;\r\n }\r\n\r\n function clone(shape) {\r\n var cloned = factory.newElement();\r\n var i;\r\n var len = shape._length === undefined ? shape.v.length : shape._length;\r\n cloned.setLength(len);\r\n cloned.c = shape.c;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n cloned.setTripleAt(shape.v[i][0], shape.v[i][1], shape.o[i][0], shape.o[i][1], shape.i[i][0], shape.i[i][1], i);\r\n }\r\n return cloned;\r\n }\r\n\r\n var factory = poolFactory(4, create, release);\r\n factory.clone = clone;\r\n\r\n return factory;\r\n}());\r\n\r\n/* global createSizedArray, ShapeCollection, shapePool, pooling */\r\n/* exported shapeCollectionPool */\r\n\r\nvar shapeCollectionPool = (function () {\r\n var ob = {\r\n newShapeCollection: newShapeCollection,\r\n release: release,\r\n };\r\n\r\n var _length = 0;\r\n var _maxLength = 4;\r\n var pool = createSizedArray(_maxLength);\r\n\r\n function newShapeCollection() {\r\n var shapeCollection;\r\n if (_length) {\r\n _length -= 1;\r\n shapeCollection = pool[_length];\r\n } else {\r\n shapeCollection = new ShapeCollection();\r\n }\r\n return shapeCollection;\r\n }\r\n\r\n function release(shapeCollection) {\r\n var i;\r\n var len = shapeCollection._length;\r\n for (i = 0; i < len; i += 1) {\r\n shapePool.release(shapeCollection.shapes[i]);\r\n }\r\n shapeCollection._length = 0;\r\n\r\n if (_length === _maxLength) {\r\n pool = pooling.double(pool);\r\n _maxLength *= 2;\r\n }\r\n pool[_length] = shapeCollection;\r\n _length += 1;\r\n }\r\n\r\n return ob;\r\n}());\r\n\r\n/* global poolFactory, bezierLengthPool */\r\n/* exported segmentsLengthPool */\r\n\r\nvar segmentsLengthPool = (function () {\r\n function create() {\r\n return {\r\n lengths: [],\r\n totalLength: 0,\r\n };\r\n }\r\n\r\n function release(element) {\r\n var i;\r\n var len = element.lengths.length;\r\n for (i = 0; i < len; i += 1) {\r\n bezierLengthPool.release(element.lengths[i]);\r\n }\r\n element.lengths.length = 0;\r\n }\r\n\r\n return poolFactory(8, create, release);\r\n}());\r\n\r\n/* global createTypedArray, defaultCurveSegments, poolFactory */\r\n/* exported bezierLengthPool */\r\n\r\nvar bezierLengthPool = (function () {\r\n function create() {\r\n return {\r\n addedLength: 0,\r\n percents: createTypedArray('float32', defaultCurveSegments),\r\n lengths: createTypedArray('float32', defaultCurveSegments),\r\n };\r\n }\r\n return poolFactory(8, create);\r\n}());\r\n\r\n/* exported markerParser */\r\n\r\nvar markerParser = (\r\n\r\n function () {\r\n function parsePayloadLines(payload) {\r\n var lines = payload.split('\\r\\n');\r\n var keys = {};\r\n var line;\r\n var keysCount = 0;\r\n for (var i = 0; i < lines.length; i += 1) {\r\n line = lines[i].split(':');\r\n if (line.length === 2) {\r\n keys[line[0]] = line[1].trim();\r\n keysCount += 1;\r\n }\r\n }\r\n if (keysCount === 0) {\r\n throw new Error();\r\n }\r\n return keys;\r\n }\r\n\r\n return function (_markers) {\r\n var markers = [];\r\n for (var i = 0; i < _markers.length; i += 1) {\r\n var _marker = _markers[i];\r\n var markerData = {\r\n time: _marker.tm,\r\n duration: _marker.dr,\r\n };\r\n try {\r\n markerData.payload = JSON.parse(_markers[i].cm);\r\n } catch (_) {\r\n try {\r\n markerData.payload = parsePayloadLines(_markers[i].cm);\r\n } catch (__) {\r\n markerData.payload = {\r\n name: _markers[i],\r\n };\r\n }\r\n }\r\n markers.push(markerData);\r\n }\r\n return markers;\r\n };\r\n }());\r\n\r\n/* global AudioElement, FootageElement, FontManager */\r\n\r\nfunction BaseRenderer() {}\r\nBaseRenderer.prototype.checkLayers = function (num) {\r\n var i;\r\n var len = this.layers.length;\r\n var data;\r\n this.completeLayers = true;\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (!this.elements[i]) {\r\n data = this.layers[i];\r\n if (data.ip - data.st <= (num - this.layers[i].st) && data.op - data.st > (num - this.layers[i].st)) {\r\n this.buildItem(i);\r\n }\r\n }\r\n this.completeLayers = this.elements[i] ? this.completeLayers : false;\r\n }\r\n this.checkPendingElements();\r\n};\r\n\r\nBaseRenderer.prototype.createItem = function (layer) {\r\n switch (layer.ty) {\r\n case 2:\r\n return this.createImage(layer);\r\n case 0:\r\n return this.createComp(layer);\r\n case 1:\r\n return this.createSolid(layer);\r\n case 3:\r\n return this.createNull(layer);\r\n case 4:\r\n return this.createShape(layer);\r\n case 5:\r\n return this.createText(layer);\r\n case 6:\r\n return this.createAudio(layer);\r\n case 13:\r\n return this.createCamera(layer);\r\n case 15:\r\n return this.createFootage(layer);\r\n default:\r\n return this.createNull(layer);\r\n }\r\n};\r\n\r\nBaseRenderer.prototype.createCamera = function () {\r\n throw new Error('You\\'re using a 3d camera. Try the html renderer.');\r\n};\r\n\r\nBaseRenderer.prototype.createAudio = function (data) {\r\n return new AudioElement(data, this.globalData, this);\r\n};\r\n\r\nBaseRenderer.prototype.createFootage = function (data) {\r\n return new FootageElement(data, this.globalData, this);\r\n};\r\n\r\nBaseRenderer.prototype.buildAllItems = function () {\r\n var i;\r\n var len = this.layers.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.buildItem(i);\r\n }\r\n this.checkPendingElements();\r\n};\r\n\r\nBaseRenderer.prototype.includeLayers = function (newLayers) {\r\n this.completeLayers = false;\r\n var i;\r\n var len = newLayers.length;\r\n var j;\r\n var jLen = this.layers.length;\r\n for (i = 0; i < len; i += 1) {\r\n j = 0;\r\n while (j < jLen) {\r\n if (this.layers[j].id === newLayers[i].id) {\r\n this.layers[j] = newLayers[i];\r\n break;\r\n }\r\n j += 1;\r\n }\r\n }\r\n};\r\n\r\nBaseRenderer.prototype.setProjectInterface = function (pInterface) {\r\n this.globalData.projectInterface = pInterface;\r\n};\r\n\r\nBaseRenderer.prototype.initItems = function () {\r\n if (!this.globalData.progressiveLoad) {\r\n this.buildAllItems();\r\n }\r\n};\r\nBaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {\r\n var elements = this.elements;\r\n var layers = this.layers;\r\n var i = 0;\r\n var len = layers.length;\r\n while (i < len) {\r\n if (layers[i].ind == parentName) { // eslint-disable-line eqeqeq\r\n if (!elements[i] || elements[i] === true) {\r\n this.buildItem(i);\r\n this.addPendingElement(element);\r\n } else {\r\n hierarchy.push(elements[i]);\r\n elements[i].setAsParent();\r\n if (layers[i].parent !== undefined) {\r\n this.buildElementParenting(element, layers[i].parent, hierarchy);\r\n } else {\r\n element.setHierarchy(hierarchy);\r\n }\r\n }\r\n }\r\n i += 1;\r\n }\r\n};\r\n\r\nBaseRenderer.prototype.addPendingElement = function (element) {\r\n this.pendingElements.push(element);\r\n};\r\n\r\nBaseRenderer.prototype.searchExtraCompositions = function (assets) {\r\n var i;\r\n var len = assets.length;\r\n for (i = 0; i < len; i += 1) {\r\n if (assets[i].xt) {\r\n var comp = this.createComp(assets[i]);\r\n comp.initExpressions();\r\n this.globalData.projectInterface.registerComposition(comp);\r\n }\r\n }\r\n};\r\n\r\nBaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {\r\n this.globalData.fontManager = new FontManager();\r\n this.globalData.fontManager.addChars(animData.chars);\r\n this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);\r\n this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);\r\n this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);\r\n this.globalData.imageLoader = this.animationItem.imagePreloader;\r\n this.globalData.audioController = this.animationItem.audioController;\r\n this.globalData.frameId = 0;\r\n this.globalData.frameRate = animData.fr;\r\n this.globalData.nm = animData.nm;\r\n this.globalData.compSize = {\r\n w: animData.w,\r\n h: animData.h,\r\n };\r\n};\r\n\r\n/* global createElementID, extendPrototype, BaseRenderer, NullElement, SVGShapeElement, SVGTextLottieElement,\r\nIImageElement, SVGCompElement, ISolidElement, createNS, locationHref, createSizedArray, expressionsPlugin */\r\n\r\nfunction SVGRenderer(animationItem, config) {\r\n this.animationItem = animationItem;\r\n this.layers = null;\r\n this.renderedFrame = -1;\r\n this.svgElement = createNS('svg');\r\n var ariaLabel = '';\r\n if (config && config.title) {\r\n var titleElement = createNS('title');\r\n var titleId = createElementID();\r\n titleElement.setAttribute('id', titleId);\r\n titleElement.textContent = config.title;\r\n this.svgElement.appendChild(titleElement);\r\n ariaLabel += titleId;\r\n }\r\n if (config && config.description) {\r\n var descElement = createNS('desc');\r\n var descId = createElementID();\r\n descElement.setAttribute('id', descId);\r\n descElement.textContent = config.description;\r\n this.svgElement.appendChild(descElement);\r\n ariaLabel += ' ' + descId;\r\n }\r\n if (ariaLabel) {\r\n this.svgElement.setAttribute('aria-labelledby', ariaLabel);\r\n }\r\n var defs = createNS('defs');\r\n this.svgElement.appendChild(defs);\r\n var maskElement = createNS('g');\r\n this.svgElement.appendChild(maskElement);\r\n this.layerElement = maskElement;\r\n this.renderConfig = {\r\n preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',\r\n imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',\r\n contentVisibility: (config && config.contentVisibility) || 'visible',\r\n progressiveLoad: (config && config.progressiveLoad) || false,\r\n hideOnTransparent: !((config && config.hideOnTransparent === false)),\r\n viewBoxOnly: (config && config.viewBoxOnly) || false,\r\n viewBoxSize: (config && config.viewBoxSize) || false,\r\n className: (config && config.className) || '',\r\n id: (config && config.id) || '',\r\n focusable: config && config.focusable,\r\n filterSize: {\r\n width: (config && config.filterSize && config.filterSize.width) || '100%',\r\n height: (config && config.filterSize && config.filterSize.height) || '100%',\r\n x: (config && config.filterSize && config.filterSize.x) || '0%',\r\n y: (config && config.filterSize && config.filterSize.y) || '0%',\r\n },\r\n };\r\n\r\n this.globalData = {\r\n _mdf: false,\r\n frameNum: -1,\r\n defs: defs,\r\n renderConfig: this.renderConfig,\r\n };\r\n this.elements = [];\r\n this.pendingElements = [];\r\n this.destroyed = false;\r\n this.rendererType = 'svg';\r\n}\r\n\r\nextendPrototype([BaseRenderer], SVGRenderer);\r\n\r\nSVGRenderer.prototype.createNull = function (data) {\r\n return new NullElement(data, this.globalData, this);\r\n};\r\n\r\nSVGRenderer.prototype.createShape = function (data) {\r\n return new SVGShapeElement(data, this.globalData, this);\r\n};\r\n\r\nSVGRenderer.prototype.createText = function (data) {\r\n return new SVGTextLottieElement(data, this.globalData, this);\r\n};\r\n\r\nSVGRenderer.prototype.createImage = function (data) {\r\n return new IImageElement(data, this.globalData, this);\r\n};\r\n\r\nSVGRenderer.prototype.createComp = function (data) {\r\n return new SVGCompElement(data, this.globalData, this);\r\n};\r\n\r\nSVGRenderer.prototype.createSolid = function (data) {\r\n return new ISolidElement(data, this.globalData, this);\r\n};\r\n\r\nSVGRenderer.prototype.configAnimation = function (animData) {\r\n this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\r\n if (this.renderConfig.viewBoxSize) {\r\n this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);\r\n } else {\r\n this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);\r\n }\r\n\r\n if (!this.renderConfig.viewBoxOnly) {\r\n this.svgElement.setAttribute('width', animData.w);\r\n this.svgElement.setAttribute('height', animData.h);\r\n this.svgElement.style.width = '100%';\r\n this.svgElement.style.height = '100%';\r\n this.svgElement.style.transform = 'translate3d(0,0,0)';\r\n this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;\r\n }\r\n if (this.renderConfig.className) {\r\n this.svgElement.setAttribute('class', this.renderConfig.className);\r\n }\r\n if (this.renderConfig.id) {\r\n this.svgElement.setAttribute('id', this.renderConfig.id);\r\n }\r\n if (this.renderConfig.focusable !== undefined) {\r\n this.svgElement.setAttribute('focusable', this.renderConfig.focusable);\r\n }\r\n this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio);\r\n // this.layerElement.style.transform = 'translate3d(0,0,0)';\r\n // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = \"0px 0px 0px\";\r\n this.animationItem.wrapper.appendChild(this.svgElement);\r\n // Mask animation\r\n var defs = this.globalData.defs;\r\n\r\n this.setupGlobalData(animData, defs);\r\n this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;\r\n this.data = animData;\r\n\r\n var maskElement = createNS('clipPath');\r\n var rect = createNS('rect');\r\n rect.setAttribute('width', animData.w);\r\n rect.setAttribute('height', animData.h);\r\n rect.setAttribute('x', 0);\r\n rect.setAttribute('y', 0);\r\n var maskId = createElementID();\r\n maskElement.setAttribute('id', maskId);\r\n maskElement.appendChild(rect);\r\n this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + maskId + ')');\r\n\r\n defs.appendChild(maskElement);\r\n this.layers = animData.layers;\r\n this.elements = createSizedArray(animData.layers.length);\r\n};\r\n\r\nSVGRenderer.prototype.destroy = function () {\r\n if (this.animationItem.wrapper) {\r\n this.animationItem.wrapper.innerText = '';\r\n }\r\n this.layerElement = null;\r\n this.globalData.defs = null;\r\n var i;\r\n var len = this.layers ? this.layers.length : 0;\r\n for (i = 0; i < len; i += 1) {\r\n if (this.elements[i]) {\r\n this.elements[i].destroy();\r\n }\r\n }\r\n this.elements.length = 0;\r\n this.destroyed = true;\r\n this.animationItem = null;\r\n};\r\n\r\nSVGRenderer.prototype.updateContainerSize = function () {\r\n};\r\n\r\nSVGRenderer.prototype.buildItem = function (pos) {\r\n var elements = this.elements;\r\n if (elements[pos] || this.layers[pos].ty === 99) {\r\n return;\r\n }\r\n elements[pos] = true;\r\n var element = this.createItem(this.layers[pos]);\r\n\r\n elements[pos] = element;\r\n if (expressionsPlugin) {\r\n if (this.layers[pos].ty === 0) {\r\n this.globalData.projectInterface.registerComposition(element);\r\n }\r\n element.initExpressions();\r\n }\r\n this.appendElementInPos(element, pos);\r\n if (this.layers[pos].tt) {\r\n if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {\r\n this.buildItem(pos - 1);\r\n this.addPendingElement(element);\r\n } else {\r\n element.setMatte(elements[pos - 1].layerId);\r\n }\r\n }\r\n};\r\n\r\nSVGRenderer.prototype.checkPendingElements = function () {\r\n while (this.pendingElements.length) {\r\n var element = this.pendingElements.pop();\r\n element.checkParenting();\r\n if (element.data.tt) {\r\n var i = 0;\r\n var len = this.elements.length;\r\n while (i < len) {\r\n if (this.elements[i] === element) {\r\n element.setMatte(this.elements[i - 1].layerId);\r\n break;\r\n }\r\n i += 1;\r\n }\r\n }\r\n }\r\n};\r\n\r\nSVGRenderer.prototype.renderFrame = function (num) {\r\n if (this.renderedFrame === num || this.destroyed) {\r\n return;\r\n }\r\n if (num === null) {\r\n num = this.renderedFrame;\r\n } else {\r\n this.renderedFrame = num;\r\n }\r\n // console.log('-------');\r\n // console.log('FRAME ',num);\r\n this.globalData.frameNum = num;\r\n this.globalData.frameId += 1;\r\n this.globalData.projectInterface.currentFrame = num;\r\n this.globalData._mdf = false;\r\n var i;\r\n var len = this.layers.length;\r\n if (!this.completeLayers) {\r\n this.checkLayers(num);\r\n }\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].prepareFrame(num - this.layers[i].st);\r\n }\r\n }\r\n if (this.globalData._mdf) {\r\n for (i = 0; i < len; i += 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].renderFrame();\r\n }\r\n }\r\n }\r\n};\r\n\r\nSVGRenderer.prototype.appendElementInPos = function (element, pos) {\r\n var newElement = element.getBaseElement();\r\n if (!newElement) {\r\n return;\r\n }\r\n var i = 0;\r\n var nextElement;\r\n while (i < pos) {\r\n if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {\r\n nextElement = this.elements[i].getBaseElement();\r\n }\r\n i += 1;\r\n }\r\n if (nextElement) {\r\n this.layerElement.insertBefore(newElement, nextElement);\r\n } else {\r\n this.layerElement.appendChild(newElement);\r\n }\r\n};\r\n\r\nSVGRenderer.prototype.hide = function () {\r\n this.layerElement.style.display = 'none';\r\n};\r\n\r\nSVGRenderer.prototype.show = function () {\r\n this.layerElement.style.display = 'block';\r\n};\r\n\r\n/* global CVContextData, Matrix, extendPrototype, BaseRenderer, CVShapeElement, CVTextElement,\r\nCVImageElement, CVCompElement, CVSolidElement, SVGRenderer, createTag, createSizedArray */\r\n\r\nfunction CanvasRenderer(animationItem, config) {\r\n this.animationItem = animationItem;\r\n this.renderConfig = {\r\n clearCanvas: (config && config.clearCanvas !== undefined) ? config.clearCanvas : true,\r\n context: (config && config.context) || null,\r\n progressiveLoad: (config && config.progressiveLoad) || false,\r\n preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',\r\n imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',\r\n contentVisibility: (config && config.contentVisibility) || 'visible',\r\n className: (config && config.className) || '',\r\n id: (config && config.id) || '',\r\n };\r\n this.renderConfig.dpr = (config && config.dpr) || 1;\r\n if (this.animationItem.wrapper) {\r\n this.renderConfig.dpr = (config && config.dpr) || window.devicePixelRatio || 1;\r\n }\r\n this.renderedFrame = -1;\r\n this.globalData = {\r\n frameNum: -1,\r\n _mdf: false,\r\n renderConfig: this.renderConfig,\r\n currentGlobalAlpha: -1,\r\n };\r\n this.contextData = new CVContextData();\r\n this.elements = [];\r\n this.pendingElements = [];\r\n this.transformMat = new Matrix();\r\n this.completeLayers = false;\r\n this.rendererType = 'canvas';\r\n}\r\nextendPrototype([BaseRenderer], CanvasRenderer);\r\n\r\nCanvasRenderer.prototype.createShape = function (data) {\r\n return new CVShapeElement(data, this.globalData, this);\r\n};\r\n\r\nCanvasRenderer.prototype.createText = function (data) {\r\n return new CVTextElement(data, this.globalData, this);\r\n};\r\n\r\nCanvasRenderer.prototype.createImage = function (data) {\r\n return new CVImageElement(data, this.globalData, this);\r\n};\r\n\r\nCanvasRenderer.prototype.createComp = function (data) {\r\n return new CVCompElement(data, this.globalData, this);\r\n};\r\n\r\nCanvasRenderer.prototype.createSolid = function (data) {\r\n return new CVSolidElement(data, this.globalData, this);\r\n};\r\n\r\nCanvasRenderer.prototype.createNull = SVGRenderer.prototype.createNull;\r\n\r\nCanvasRenderer.prototype.ctxTransform = function (props) {\r\n if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {\r\n return;\r\n }\r\n if (!this.renderConfig.clearCanvas) {\r\n this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);\r\n return;\r\n }\r\n this.transformMat.cloneFromProps(props);\r\n var cProps = this.contextData.cTr.props;\r\n this.transformMat.transform(cProps[0], cProps[1], cProps[2], cProps[3], cProps[4], cProps[5], cProps[6], cProps[7], cProps[8], cProps[9], cProps[10], cProps[11], cProps[12], cProps[13], cProps[14], cProps[15]);\r\n // this.contextData.cTr.transform(props[0],props[1],props[2],props[3],props[4],props[5],props[6],props[7],props[8],props[9],props[10],props[11],props[12],props[13],props[14],props[15]);\r\n this.contextData.cTr.cloneFromProps(this.transformMat.props);\r\n var trProps = this.contextData.cTr.props;\r\n this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);\r\n};\r\n\r\nCanvasRenderer.prototype.ctxOpacity = function (op) {\r\n /* if(op === 1){\r\n return;\r\n } */\r\n if (!this.renderConfig.clearCanvas) {\r\n this.canvasContext.globalAlpha *= op < 0 ? 0 : op;\r\n this.globalData.currentGlobalAlpha = this.contextData.cO;\r\n return;\r\n }\r\n this.contextData.cO *= op < 0 ? 0 : op;\r\n if (this.globalData.currentGlobalAlpha !== this.contextData.cO) {\r\n this.canvasContext.globalAlpha = this.contextData.cO;\r\n this.globalData.currentGlobalAlpha = this.contextData.cO;\r\n }\r\n};\r\n\r\nCanvasRenderer.prototype.reset = function () {\r\n if (!this.renderConfig.clearCanvas) {\r\n this.canvasContext.restore();\r\n return;\r\n }\r\n this.contextData.reset();\r\n};\r\n\r\nCanvasRenderer.prototype.save = function (actionFlag) {\r\n if (!this.renderConfig.clearCanvas) {\r\n this.canvasContext.save();\r\n return;\r\n }\r\n if (actionFlag) {\r\n this.canvasContext.save();\r\n }\r\n var props = this.contextData.cTr.props;\r\n if (this.contextData._length <= this.contextData.cArrPos) {\r\n this.contextData.duplicate();\r\n }\r\n var i;\r\n var arr = this.contextData.saved[this.contextData.cArrPos];\r\n for (i = 0; i < 16; i += 1) {\r\n arr[i] = props[i];\r\n }\r\n this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO;\r\n this.contextData.cArrPos += 1;\r\n};\r\n\r\nCanvasRenderer.prototype.restore = function (actionFlag) {\r\n if (!this.renderConfig.clearCanvas) {\r\n this.canvasContext.restore();\r\n return;\r\n }\r\n if (actionFlag) {\r\n this.canvasContext.restore();\r\n this.globalData.blendMode = 'source-over';\r\n }\r\n this.contextData.cArrPos -= 1;\r\n var popped = this.contextData.saved[this.contextData.cArrPos];\r\n var i;\r\n var arr = this.contextData.cTr.props;\r\n for (i = 0; i < 16; i += 1) {\r\n arr[i] = popped[i];\r\n }\r\n this.canvasContext.setTransform(popped[0], popped[1], popped[4], popped[5], popped[12], popped[13]);\r\n popped = this.contextData.savedOp[this.contextData.cArrPos];\r\n this.contextData.cO = popped;\r\n if (this.globalData.currentGlobalAlpha !== popped) {\r\n this.canvasContext.globalAlpha = popped;\r\n this.globalData.currentGlobalAlpha = popped;\r\n }\r\n};\r\n\r\nCanvasRenderer.prototype.configAnimation = function (animData) {\r\n if (this.animationItem.wrapper) {\r\n this.animationItem.container = createTag('canvas');\r\n var containerStyle = this.animationItem.container.style;\r\n containerStyle.width = '100%';\r\n containerStyle.height = '100%';\r\n var origin = '0px 0px 0px';\r\n containerStyle.transformOrigin = origin;\r\n containerStyle.mozTransformOrigin = origin;\r\n containerStyle.webkitTransformOrigin = origin;\r\n containerStyle['-webkit-transform'] = origin;\r\n containerStyle.contentVisibility = this.renderConfig.contentVisibility;\r\n this.animationItem.wrapper.appendChild(this.animationItem.container);\r\n this.canvasContext = this.animationItem.container.getContext('2d');\r\n if (this.renderConfig.className) {\r\n this.animationItem.container.setAttribute('class', this.renderConfig.className);\r\n }\r\n if (this.renderConfig.id) {\r\n this.animationItem.container.setAttribute('id', this.renderConfig.id);\r\n }\r\n } else {\r\n this.canvasContext = this.renderConfig.context;\r\n }\r\n this.data = animData;\r\n this.layers = animData.layers;\r\n this.transformCanvas = {\r\n w: animData.w,\r\n h: animData.h,\r\n sx: 0,\r\n sy: 0,\r\n tx: 0,\r\n ty: 0,\r\n };\r\n this.setupGlobalData(animData, document.body);\r\n this.globalData.canvasContext = this.canvasContext;\r\n this.globalData.renderer = this;\r\n this.globalData.isDashed = false;\r\n this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;\r\n this.globalData.transformCanvas = this.transformCanvas;\r\n this.elements = createSizedArray(animData.layers.length);\r\n\r\n this.updateContainerSize();\r\n};\r\n\r\nCanvasRenderer.prototype.updateContainerSize = function () {\r\n this.reset();\r\n var elementWidth;\r\n var elementHeight;\r\n if (this.animationItem.wrapper && this.animationItem.container) {\r\n elementWidth = this.animationItem.wrapper.offsetWidth;\r\n elementHeight = this.animationItem.wrapper.offsetHeight;\r\n this.animationItem.container.setAttribute('width', elementWidth * this.renderConfig.dpr);\r\n this.animationItem.container.setAttribute('height', elementHeight * this.renderConfig.dpr);\r\n } else {\r\n elementWidth = this.canvasContext.canvas.width * this.renderConfig.dpr;\r\n elementHeight = this.canvasContext.canvas.height * this.renderConfig.dpr;\r\n }\r\n var elementRel;\r\n var animationRel;\r\n if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {\r\n var par = this.renderConfig.preserveAspectRatio.split(' ');\r\n var fillType = par[1] || 'meet';\r\n var pos = par[0] || 'xMidYMid';\r\n var xPos = pos.substr(0, 4);\r\n var yPos = pos.substr(4);\r\n elementRel = elementWidth / elementHeight;\r\n animationRel = this.transformCanvas.w / this.transformCanvas.h;\r\n if ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice')) {\r\n this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\r\n this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\r\n } else {\r\n this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\r\n this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\r\n }\r\n\r\n if (xPos === 'xMid' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) {\r\n this.transformCanvas.tx = ((elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2) * this.renderConfig.dpr;\r\n } else if (xPos === 'xMax' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) {\r\n this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;\r\n } else {\r\n this.transformCanvas.tx = 0;\r\n }\r\n if (yPos === 'YMid' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) {\r\n this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2) * this.renderConfig.dpr;\r\n } else if (yPos === 'YMax' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) {\r\n this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w))) * this.renderConfig.dpr;\r\n } else {\r\n this.transformCanvas.ty = 0;\r\n }\r\n } else if (this.renderConfig.preserveAspectRatio === 'none') {\r\n this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\r\n this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\r\n this.transformCanvas.tx = 0;\r\n this.transformCanvas.ty = 0;\r\n } else {\r\n this.transformCanvas.sx = this.renderConfig.dpr;\r\n this.transformCanvas.sy = this.renderConfig.dpr;\r\n this.transformCanvas.tx = 0;\r\n this.transformCanvas.ty = 0;\r\n }\r\n this.transformCanvas.props = [this.transformCanvas.sx, 0, 0, 0, 0, this.transformCanvas.sy, 0, 0, 0, 0, 1, 0, this.transformCanvas.tx, this.transformCanvas.ty, 0, 1];\r\n /* var i, len = this.elements.length;\r\n for(i=0;i= 0; i -= 1) {\r\n if (this.elements[i]) {\r\n this.elements[i].destroy();\r\n }\r\n }\r\n this.elements.length = 0;\r\n this.globalData.canvasContext = null;\r\n this.animationItem.container = null;\r\n this.destroyed = true;\r\n};\r\n\r\nCanvasRenderer.prototype.renderFrame = function (num, forceRender) {\r\n if ((this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender) || this.destroyed || num === -1) {\r\n return;\r\n }\r\n this.renderedFrame = num;\r\n this.globalData.frameNum = num - this.animationItem._isFirstFrame;\r\n this.globalData.frameId += 1;\r\n this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;\r\n this.globalData.projectInterface.currentFrame = num;\r\n\r\n // console.log('--------');\r\n // console.log('NEW: ',num);\r\n var i;\r\n var len = this.layers.length;\r\n if (!this.completeLayers) {\r\n this.checkLayers(num);\r\n }\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].prepareFrame(num - this.layers[i].st);\r\n }\r\n }\r\n if (this.globalData._mdf) {\r\n if (this.renderConfig.clearCanvas === true) {\r\n this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);\r\n } else {\r\n this.save();\r\n }\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].renderFrame();\r\n }\r\n }\r\n if (this.renderConfig.clearCanvas !== true) {\r\n this.restore();\r\n }\r\n }\r\n};\r\n\r\nCanvasRenderer.prototype.buildItem = function (pos) {\r\n var elements = this.elements;\r\n if (elements[pos] || this.layers[pos].ty === 99) {\r\n return;\r\n }\r\n var element = this.createItem(this.layers[pos], this, this.globalData);\r\n elements[pos] = element;\r\n element.initExpressions();\r\n /* if(this.layers[pos].ty === 0){\r\n element.resize(this.globalData.transformCanvas);\r\n } */\r\n};\r\n\r\nCanvasRenderer.prototype.checkPendingElements = function () {\r\n while (this.pendingElements.length) {\r\n var element = this.pendingElements.pop();\r\n element.checkParenting();\r\n }\r\n};\r\n\r\nCanvasRenderer.prototype.hide = function () {\r\n this.animationItem.container.style.display = 'none';\r\n};\r\n\r\nCanvasRenderer.prototype.show = function () {\r\n this.animationItem.container.style.display = 'block';\r\n};\r\n\r\n/* global extendPrototype, BaseRenderer, SVGRenderer, SVGShapeElement, HShapeElement, SVGTextLottieElement,\r\nHTextElement, HCameraElement, IImageElement, HImageElement, SVGCompElement, HCompElement, ISolidElement,\r\nHSolidElement, styleDiv, createTag, createNS */\r\n\r\nfunction HybridRenderer(animationItem, config) {\r\n this.animationItem = animationItem;\r\n this.layers = null;\r\n this.renderedFrame = -1;\r\n this.renderConfig = {\r\n className: (config && config.className) || '',\r\n imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',\r\n hideOnTransparent: !(config && config.hideOnTransparent === false),\r\n filterSize: {\r\n width: (config && config.filterSize && config.filterSize.width) || '400%',\r\n height: (config && config.filterSize && config.filterSize.height) || '400%',\r\n x: (config && config.filterSize && config.filterSize.x) || '-100%',\r\n y: (config && config.filterSize && config.filterSize.y) || '-100%',\r\n },\r\n };\r\n this.globalData = {\r\n _mdf: false,\r\n frameNum: -1,\r\n renderConfig: this.renderConfig,\r\n };\r\n this.pendingElements = [];\r\n this.elements = [];\r\n this.threeDElements = [];\r\n this.destroyed = false;\r\n this.camera = null;\r\n this.supports3d = true;\r\n this.rendererType = 'html';\r\n}\r\n\r\nextendPrototype([BaseRenderer], HybridRenderer);\r\n\r\nHybridRenderer.prototype.buildItem = SVGRenderer.prototype.buildItem;\r\n\r\nHybridRenderer.prototype.checkPendingElements = function () {\r\n while (this.pendingElements.length) {\r\n var element = this.pendingElements.pop();\r\n element.checkParenting();\r\n }\r\n};\r\n\r\nHybridRenderer.prototype.appendElementInPos = function (element, pos) {\r\n var newDOMElement = element.getBaseElement();\r\n if (!newDOMElement) {\r\n return;\r\n }\r\n var layer = this.layers[pos];\r\n if (!layer.ddd || !this.supports3d) {\r\n if (this.threeDElements) {\r\n this.addTo3dContainer(newDOMElement, pos);\r\n } else {\r\n var i = 0;\r\n var nextDOMElement;\r\n var nextLayer;\r\n var tmpDOMElement;\r\n while (i < pos) {\r\n if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) {\r\n nextLayer = this.elements[i];\r\n tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();\r\n nextDOMElement = tmpDOMElement || nextDOMElement;\r\n }\r\n i += 1;\r\n }\r\n if (nextDOMElement) {\r\n if (!layer.ddd || !this.supports3d) {\r\n this.layerElement.insertBefore(newDOMElement, nextDOMElement);\r\n }\r\n } else if (!layer.ddd || !this.supports3d) {\r\n this.layerElement.appendChild(newDOMElement);\r\n }\r\n }\r\n } else {\r\n this.addTo3dContainer(newDOMElement, pos);\r\n }\r\n};\r\n\r\nHybridRenderer.prototype.createShape = function (data) {\r\n if (!this.supports3d) {\r\n return new SVGShapeElement(data, this.globalData, this);\r\n }\r\n return new HShapeElement(data, this.globalData, this);\r\n};\r\n\r\nHybridRenderer.prototype.createText = function (data) {\r\n if (!this.supports3d) {\r\n return new SVGTextLottieElement(data, this.globalData, this);\r\n }\r\n return new HTextElement(data, this.globalData, this);\r\n};\r\n\r\nHybridRenderer.prototype.createCamera = function (data) {\r\n this.camera = new HCameraElement(data, this.globalData, this);\r\n return this.camera;\r\n};\r\n\r\nHybridRenderer.prototype.createImage = function (data) {\r\n if (!this.supports3d) {\r\n return new IImageElement(data, this.globalData, this);\r\n }\r\n return new HImageElement(data, this.globalData, this);\r\n};\r\n\r\nHybridRenderer.prototype.createComp = function (data) {\r\n if (!this.supports3d) {\r\n return new SVGCompElement(data, this.globalData, this);\r\n }\r\n return new HCompElement(data, this.globalData, this);\r\n};\r\n\r\nHybridRenderer.prototype.createSolid = function (data) {\r\n if (!this.supports3d) {\r\n return new ISolidElement(data, this.globalData, this);\r\n }\r\n return new HSolidElement(data, this.globalData, this);\r\n};\r\n\r\nHybridRenderer.prototype.createNull = SVGRenderer.prototype.createNull;\r\n\r\nHybridRenderer.prototype.getThreeDContainerByPos = function (pos) {\r\n var i = 0;\r\n var len = this.threeDElements.length;\r\n while (i < len) {\r\n if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {\r\n return this.threeDElements[i].perspectiveElem;\r\n }\r\n i += 1;\r\n }\r\n return null;\r\n};\r\n\r\nHybridRenderer.prototype.createThreeDContainer = function (pos, type) {\r\n var perspectiveElem = createTag('div');\r\n var style;\r\n var containerStyle;\r\n styleDiv(perspectiveElem);\r\n var container = createTag('div');\r\n styleDiv(container);\r\n if (type === '3d') {\r\n style = perspectiveElem.style;\r\n style.width = this.globalData.compSize.w + 'px';\r\n style.height = this.globalData.compSize.h + 'px';\r\n var center = '50% 50%';\r\n style.webkitTransformOrigin = center;\r\n style.mozTransformOrigin = center;\r\n style.transformOrigin = center;\r\n containerStyle = container.style;\r\n var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';\r\n containerStyle.transform = matrix;\r\n containerStyle.webkitTransform = matrix;\r\n }\r\n\r\n perspectiveElem.appendChild(container);\r\n // this.resizerElem.appendChild(perspectiveElem);\r\n var threeDContainerData = {\r\n container: container,\r\n perspectiveElem: perspectiveElem,\r\n startPos: pos,\r\n endPos: pos,\r\n type: type,\r\n };\r\n this.threeDElements.push(threeDContainerData);\r\n return threeDContainerData;\r\n};\r\n\r\nHybridRenderer.prototype.build3dContainers = function () {\r\n var i;\r\n var len = this.layers.length;\r\n var lastThreeDContainerData;\r\n var currentContainer = '';\r\n for (i = 0; i < len; i += 1) {\r\n if (this.layers[i].ddd && this.layers[i].ty !== 3) {\r\n if (currentContainer !== '3d') {\r\n currentContainer = '3d';\r\n lastThreeDContainerData = this.createThreeDContainer(i, '3d');\r\n }\r\n lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);\r\n } else {\r\n if (currentContainer !== '2d') {\r\n currentContainer = '2d';\r\n lastThreeDContainerData = this.createThreeDContainer(i, '2d');\r\n }\r\n lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);\r\n }\r\n }\r\n len = this.threeDElements.length;\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem);\r\n }\r\n};\r\n\r\nHybridRenderer.prototype.addTo3dContainer = function (elem, pos) {\r\n var i = 0;\r\n var len = this.threeDElements.length;\r\n while (i < len) {\r\n if (pos <= this.threeDElements[i].endPos) {\r\n var j = this.threeDElements[i].startPos;\r\n var nextElement;\r\n while (j < pos) {\r\n if (this.elements[j] && this.elements[j].getBaseElement) {\r\n nextElement = this.elements[j].getBaseElement();\r\n }\r\n j += 1;\r\n }\r\n if (nextElement) {\r\n this.threeDElements[i].container.insertBefore(elem, nextElement);\r\n } else {\r\n this.threeDElements[i].container.appendChild(elem);\r\n }\r\n break;\r\n }\r\n i += 1;\r\n }\r\n};\r\n\r\nHybridRenderer.prototype.configAnimation = function (animData) {\r\n var resizerElem = createTag('div');\r\n var wrapper = this.animationItem.wrapper;\r\n var style = resizerElem.style;\r\n style.width = animData.w + 'px';\r\n style.height = animData.h + 'px';\r\n this.resizerElem = resizerElem;\r\n styleDiv(resizerElem);\r\n style.transformStyle = 'flat';\r\n style.mozTransformStyle = 'flat';\r\n style.webkitTransformStyle = 'flat';\r\n if (this.renderConfig.className) {\r\n resizerElem.setAttribute('class', this.renderConfig.className);\r\n }\r\n wrapper.appendChild(resizerElem);\r\n\r\n style.overflow = 'hidden';\r\n var svg = createNS('svg');\r\n svg.setAttribute('width', '1');\r\n svg.setAttribute('height', '1');\r\n styleDiv(svg);\r\n this.resizerElem.appendChild(svg);\r\n var defs = createNS('defs');\r\n svg.appendChild(defs);\r\n this.data = animData;\r\n // Mask animation\r\n this.setupGlobalData(animData, svg);\r\n this.globalData.defs = defs;\r\n this.layers = animData.layers;\r\n this.layerElement = this.resizerElem;\r\n this.build3dContainers();\r\n this.updateContainerSize();\r\n};\r\n\r\nHybridRenderer.prototype.destroy = function () {\r\n if (this.animationItem.wrapper) {\r\n this.animationItem.wrapper.innerText = '';\r\n }\r\n this.animationItem.container = null;\r\n this.globalData.defs = null;\r\n var i;\r\n var len = this.layers ? this.layers.length : 0;\r\n for (i = 0; i < len; i += 1) {\r\n this.elements[i].destroy();\r\n }\r\n this.elements.length = 0;\r\n this.destroyed = true;\r\n this.animationItem = null;\r\n};\r\n\r\nHybridRenderer.prototype.updateContainerSize = function () {\r\n var elementWidth = this.animationItem.wrapper.offsetWidth;\r\n var elementHeight = this.animationItem.wrapper.offsetHeight;\r\n var elementRel = elementWidth / elementHeight;\r\n var animationRel = this.globalData.compSize.w / this.globalData.compSize.h;\r\n var sx;\r\n var sy;\r\n var tx;\r\n var ty;\r\n if (animationRel > elementRel) {\r\n sx = elementWidth / (this.globalData.compSize.w);\r\n sy = elementWidth / (this.globalData.compSize.w);\r\n tx = 0;\r\n ty = ((elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2);\r\n } else {\r\n sx = elementHeight / (this.globalData.compSize.h);\r\n sy = elementHeight / (this.globalData.compSize.h);\r\n tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2;\r\n ty = 0;\r\n }\r\n var style = this.resizerElem.style;\r\n style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)';\r\n style.transform = style.webkitTransform;\r\n};\r\n\r\nHybridRenderer.prototype.renderFrame = SVGRenderer.prototype.renderFrame;\r\n\r\nHybridRenderer.prototype.hide = function () {\r\n this.resizerElem.style.display = 'none';\r\n};\r\n\r\nHybridRenderer.prototype.show = function () {\r\n this.resizerElem.style.display = 'block';\r\n};\r\n\r\nHybridRenderer.prototype.initItems = function () {\r\n this.buildAllItems();\r\n if (this.camera) {\r\n this.camera.setup();\r\n } else {\r\n var cWidth = this.globalData.compSize.w;\r\n var cHeight = this.globalData.compSize.h;\r\n var i;\r\n var len = this.threeDElements.length;\r\n for (i = 0; i < len; i += 1) {\r\n var style = this.threeDElements[i].perspectiveElem.style;\r\n style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px';\r\n style.perspective = style.webkitPerspective;\r\n }\r\n }\r\n};\r\n\r\nHybridRenderer.prototype.searchExtraCompositions = function (assets) {\r\n var i;\r\n var len = assets.length;\r\n var floatingContainer = createTag('div');\r\n for (i = 0; i < len; i += 1) {\r\n if (assets[i].xt) {\r\n var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null);\r\n comp.initExpressions();\r\n this.globalData.projectInterface.registerComposition(comp);\r\n }\r\n }\r\n};\r\n\r\n/* global createSizedArray, createElementID, PropertyFactory, ShapePropertyFactory, createNS, locationHref */\r\n\r\nfunction MaskElement(data, element, globalData) {\r\n this.data = data;\r\n this.element = element;\r\n this.globalData = globalData;\r\n this.storedData = [];\r\n this.masksProperties = this.data.masksProperties || [];\r\n this.maskElement = null;\r\n var defs = this.globalData.defs;\r\n var i;\r\n var len = this.masksProperties ? this.masksProperties.length : 0;\r\n this.viewData = createSizedArray(len);\r\n this.solidPath = '';\r\n\r\n var path;\r\n var properties = this.masksProperties;\r\n var count = 0;\r\n var currentMasks = [];\r\n var j;\r\n var jLen;\r\n var layerId = createElementID();\r\n var rect;\r\n var expansor;\r\n var feMorph;\r\n var x;\r\n var maskType = 'clipPath';\r\n var maskRef = 'clip-path';\r\n for (i = 0; i < len; i += 1) {\r\n if ((properties[i].mode !== 'a' && properties[i].mode !== 'n') || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {\r\n maskType = 'mask';\r\n maskRef = 'mask';\r\n }\r\n\r\n if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {\r\n rect = createNS('rect');\r\n rect.setAttribute('fill', '#ffffff');\r\n rect.setAttribute('width', this.element.comp.data.w || 0);\r\n rect.setAttribute('height', this.element.comp.data.h || 0);\r\n currentMasks.push(rect);\r\n } else {\r\n rect = null;\r\n }\r\n\r\n path = createNS('path');\r\n if (properties[i].mode === 'n') {\r\n // TODO move this to a factory or to a constructor\r\n this.viewData[i] = {\r\n op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),\r\n prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),\r\n elem: path,\r\n lastPath: '',\r\n };\r\n defs.appendChild(path);\r\n } else {\r\n count += 1;\r\n\r\n path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');\r\n path.setAttribute('clip-rule', 'nonzero');\r\n var filterID;\r\n\r\n if (properties[i].x.k !== 0) {\r\n maskType = 'mask';\r\n maskRef = 'mask';\r\n x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);\r\n filterID = createElementID();\r\n expansor = createNS('filter');\r\n expansor.setAttribute('id', filterID);\r\n feMorph = createNS('feMorphology');\r\n feMorph.setAttribute('operator', 'erode');\r\n feMorph.setAttribute('in', 'SourceGraphic');\r\n feMorph.setAttribute('radius', '0');\r\n expansor.appendChild(feMorph);\r\n defs.appendChild(expansor);\r\n path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');\r\n } else {\r\n feMorph = null;\r\n x = null;\r\n }\r\n\r\n // TODO move this to a factory or to a constructor\r\n this.storedData[i] = {\r\n elem: path,\r\n x: x,\r\n expan: feMorph,\r\n lastPath: '',\r\n lastOperator: '',\r\n filterId: filterID,\r\n lastRadius: 0,\r\n };\r\n if (properties[i].mode === 'i') {\r\n jLen = currentMasks.length;\r\n var g = createNS('g');\r\n for (j = 0; j < jLen; j += 1) {\r\n g.appendChild(currentMasks[j]);\r\n }\r\n var mask = createNS('mask');\r\n mask.setAttribute('mask-type', 'alpha');\r\n mask.setAttribute('id', layerId + '_' + count);\r\n mask.appendChild(path);\r\n defs.appendChild(mask);\r\n g.setAttribute('mask', 'url(' + locationHref + '#' + layerId + '_' + count + ')');\r\n\r\n currentMasks.length = 0;\r\n currentMasks.push(g);\r\n } else {\r\n currentMasks.push(path);\r\n }\r\n if (properties[i].inv && !this.solidPath) {\r\n this.solidPath = this.createLayerSolidPath();\r\n }\r\n // TODO move this to a factory or to a constructor\r\n this.viewData[i] = {\r\n elem: path,\r\n lastPath: '',\r\n op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),\r\n prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),\r\n invRect: rect,\r\n };\r\n if (!this.viewData[i].prop.k) {\r\n this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);\r\n }\r\n }\r\n }\r\n\r\n this.maskElement = createNS(maskType);\r\n\r\n len = currentMasks.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.maskElement.appendChild(currentMasks[i]);\r\n }\r\n\r\n if (count > 0) {\r\n this.maskElement.setAttribute('id', layerId);\r\n this.element.maskedElement.setAttribute(maskRef, 'url(' + locationHref + '#' + layerId + ')');\r\n defs.appendChild(this.maskElement);\r\n }\r\n if (this.viewData.length) {\r\n this.element.addRenderableComponent(this);\r\n }\r\n}\r\n\r\nMaskElement.prototype.getMaskProperty = function (pos) {\r\n return this.viewData[pos].prop;\r\n};\r\n\r\nMaskElement.prototype.renderFrame = function (isFirstFrame) {\r\n var finalMat = this.element.finalTransform.mat;\r\n var i;\r\n var len = this.masksProperties.length;\r\n for (i = 0; i < len; i += 1) {\r\n if (this.viewData[i].prop._mdf || isFirstFrame) {\r\n this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);\r\n }\r\n if (this.viewData[i].op._mdf || isFirstFrame) {\r\n this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);\r\n }\r\n if (this.masksProperties[i].mode !== 'n') {\r\n if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {\r\n this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());\r\n }\r\n if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {\r\n var feMorph = this.storedData[i].expan;\r\n if (this.storedData[i].x.v < 0) {\r\n if (this.storedData[i].lastOperator !== 'erode') {\r\n this.storedData[i].lastOperator = 'erode';\r\n this.storedData[i].elem.setAttribute('filter', 'url(' + locationHref + '#' + this.storedData[i].filterId + ')');\r\n }\r\n feMorph.setAttribute('radius', -this.storedData[i].x.v);\r\n } else {\r\n if (this.storedData[i].lastOperator !== 'dilate') {\r\n this.storedData[i].lastOperator = 'dilate';\r\n this.storedData[i].elem.setAttribute('filter', null);\r\n }\r\n this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);\r\n }\r\n }\r\n }\r\n }\r\n};\r\n\r\nMaskElement.prototype.getMaskelement = function () {\r\n return this.maskElement;\r\n};\r\n\r\nMaskElement.prototype.createLayerSolidPath = function () {\r\n var path = 'M0,0 ';\r\n path += ' h' + this.globalData.compSize.w;\r\n path += ' v' + this.globalData.compSize.h;\r\n path += ' h-' + this.globalData.compSize.w;\r\n path += ' v-' + this.globalData.compSize.h + ' ';\r\n return path;\r\n};\r\n\r\nMaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {\r\n var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];\r\n var i;\r\n var len;\r\n len = pathNodes._length;\r\n for (i = 1; i < len; i += 1) {\r\n // pathString += \" C\"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + \" \"+pathNodes.i[i][0]+','+pathNodes.i[i][1] + \" \"+pathNodes.v[i][0]+','+pathNodes.v[i][1];\r\n pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[i][0] + ',' + pathNodes.i[i][1] + ' ' + pathNodes.v[i][0] + ',' + pathNodes.v[i][1];\r\n }\r\n // pathString += \" C\"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + \" \"+pathNodes.i[0][0]+','+pathNodes.i[0][1] + \" \"+pathNodes.v[0][0]+','+pathNodes.v[0][1];\r\n if (pathNodes.c && len > 1) {\r\n pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[0][0] + ',' + pathNodes.i[0][1] + ' ' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];\r\n }\r\n // pathNodes.__renderedString = pathString;\r\n\r\n if (viewData.lastPath !== pathString) {\r\n var pathShapeValue = '';\r\n if (viewData.elem) {\r\n if (pathNodes.c) {\r\n pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;\r\n }\r\n viewData.elem.setAttribute('d', pathShapeValue);\r\n }\r\n viewData.lastPath = pathString;\r\n }\r\n};\r\n\r\nMaskElement.prototype.destroy = function () {\r\n this.element = null;\r\n this.globalData = null;\r\n this.maskElement = null;\r\n this.data = null;\r\n this.masksProperties = null;\r\n};\r\n\r\n/**\r\n * @file\r\n * Handles AE's layer parenting property.\r\n *\r\n */\r\n\r\nfunction HierarchyElement() {}\r\n\r\nHierarchyElement.prototype = {\r\n /**\r\n * @function\r\n * Initializes hierarchy properties\r\n *\r\n */\r\n initHierarchy: function () {\r\n // element's parent list\r\n this.hierarchy = [];\r\n // if element is parent of another layer _isParent will be true\r\n this._isParent = false;\r\n this.checkParenting();\r\n },\r\n /**\r\n * @function\r\n * Sets layer's hierarchy.\r\n * @param {array} hierarch\r\n * layer's parent list\r\n *\r\n */\r\n setHierarchy: function (hierarchy) {\r\n this.hierarchy = hierarchy;\r\n },\r\n /**\r\n * @function\r\n * Sets layer as parent.\r\n *\r\n */\r\n setAsParent: function () {\r\n this._isParent = true;\r\n },\r\n /**\r\n * @function\r\n * Searches layer's parenting chain\r\n *\r\n */\r\n checkParenting: function () {\r\n if (this.data.parent !== undefined) {\r\n this.comp.buildElementParenting(this, this.data.parent, []);\r\n }\r\n },\r\n};\r\n\r\n/**\r\n * @file\r\n * Handles element's layer frame update.\r\n * Checks layer in point and out point\r\n *\r\n */\r\n\r\nfunction FrameElement() {}\r\n\r\nFrameElement.prototype = {\r\n /**\r\n * @function\r\n * Initializes frame related properties.\r\n *\r\n */\r\n initFrame: function () {\r\n // set to true when inpoint is rendered\r\n this._isFirstFrame = false;\r\n // list of animated properties\r\n this.dynamicProperties = [];\r\n // If layer has been modified in current tick this will be true\r\n this._mdf = false;\r\n },\r\n /**\r\n * @function\r\n * Calculates all dynamic values\r\n *\r\n * @param {number} num\r\n * current frame number in Layer's time\r\n * @param {boolean} isVisible\r\n * if layers is currently in range\r\n *\r\n */\r\n prepareProperties: function (num, isVisible) {\r\n var i;\r\n var len = this.dynamicProperties.length;\r\n for (i = 0; i < len; i += 1) {\r\n if (isVisible || (this._isParent && this.dynamicProperties[i].propType === 'transform')) {\r\n this.dynamicProperties[i].getValue();\r\n if (this.dynamicProperties[i]._mdf) {\r\n this.globalData._mdf = true;\r\n this._mdf = true;\r\n }\r\n }\r\n }\r\n },\r\n addDynamicProperty: function (prop) {\r\n if (this.dynamicProperties.indexOf(prop) === -1) {\r\n this.dynamicProperties.push(prop);\r\n }\r\n },\r\n};\r\n\r\n/* global TransformPropertyFactory, Matrix */\r\n\r\nfunction TransformElement() {}\r\n\r\nTransformElement.prototype = {\r\n initTransform: function () {\r\n this.finalTransform = {\r\n mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : { o: 0 },\r\n _matMdf: false,\r\n _opMdf: false,\r\n mat: new Matrix(),\r\n };\r\n if (this.data.ao) {\r\n this.finalTransform.mProp.autoOriented = true;\r\n }\r\n\r\n // TODO: check TYPE 11: Guided elements\r\n if (this.data.ty !== 11) {\r\n // this.createElements();\r\n }\r\n },\r\n renderTransform: function () {\r\n this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;\r\n this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;\r\n\r\n if (this.hierarchy) {\r\n var mat;\r\n var finalMat = this.finalTransform.mat;\r\n var i = 0;\r\n var len = this.hierarchy.length;\r\n // Checking if any of the transformation matrices in the hierarchy chain has changed.\r\n if (!this.finalTransform._matMdf) {\r\n while (i < len) {\r\n if (this.hierarchy[i].finalTransform.mProp._mdf) {\r\n this.finalTransform._matMdf = true;\r\n break;\r\n }\r\n i += 1;\r\n }\r\n }\r\n\r\n if (this.finalTransform._matMdf) {\r\n mat = this.finalTransform.mProp.v.props;\r\n finalMat.cloneFromProps(mat);\r\n for (i = 0; i < len; i += 1) {\r\n mat = this.hierarchy[i].finalTransform.mProp.v.props;\r\n finalMat.transform(mat[0], mat[1], mat[2], mat[3], mat[4], mat[5], mat[6], mat[7], mat[8], mat[9], mat[10], mat[11], mat[12], mat[13], mat[14], mat[15]);\r\n }\r\n }\r\n }\r\n },\r\n globalToLocal: function (pt) {\r\n var transforms = [];\r\n transforms.push(this.finalTransform);\r\n var flag = true;\r\n var comp = this.comp;\r\n while (flag) {\r\n if (comp.finalTransform) {\r\n if (comp.data.hasMask) {\r\n transforms.splice(0, 0, comp.finalTransform);\r\n }\r\n comp = comp.comp;\r\n } else {\r\n flag = false;\r\n }\r\n }\r\n var i;\r\n var len = transforms.length;\r\n var ptNew;\r\n for (i = 0; i < len; i += 1) {\r\n ptNew = transforms[i].mat.applyToPointArray(0, 0, 0);\r\n // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);\r\n pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];\r\n }\r\n return pt;\r\n },\r\n mHelper: new Matrix(),\r\n};\r\n\r\nfunction RenderableElement() {\r\n\r\n}\r\n\r\nRenderableElement.prototype = {\r\n initRenderable: function () {\r\n // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange\r\n this.isInRange = false;\r\n // layer's display state\r\n this.hidden = false;\r\n // If layer's transparency equals 0, it can be hidden\r\n this.isTransparent = false;\r\n // list of animated components\r\n this.renderableComponents = [];\r\n },\r\n addRenderableComponent: function (component) {\r\n if (this.renderableComponents.indexOf(component) === -1) {\r\n this.renderableComponents.push(component);\r\n }\r\n },\r\n removeRenderableComponent: function (component) {\r\n if (this.renderableComponents.indexOf(component) !== -1) {\r\n this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);\r\n }\r\n },\r\n prepareRenderableFrame: function (num) {\r\n this.checkLayerLimits(num);\r\n },\r\n checkTransparency: function () {\r\n if (this.finalTransform.mProp.o.v <= 0) {\r\n if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {\r\n this.isTransparent = true;\r\n this.hide();\r\n }\r\n } else if (this.isTransparent) {\r\n this.isTransparent = false;\r\n this.show();\r\n }\r\n },\r\n /**\r\n * @function\r\n * Initializes frame related properties.\r\n *\r\n * @param {number} num\r\n * current frame number in Layer's time\r\n *\r\n */\r\n checkLayerLimits: function (num) {\r\n if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {\r\n if (this.isInRange !== true) {\r\n this.globalData._mdf = true;\r\n this._mdf = true;\r\n this.isInRange = true;\r\n this.show();\r\n }\r\n } else if (this.isInRange !== false) {\r\n this.globalData._mdf = true;\r\n this.isInRange = false;\r\n this.hide();\r\n }\r\n },\r\n renderRenderable: function () {\r\n var i;\r\n var len = this.renderableComponents.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.renderableComponents[i].renderFrame(this._isFirstFrame);\r\n }\r\n /* this.maskManager.renderFrame(this.finalTransform.mat);\r\n this.renderableEffectsManager.renderFrame(this._isFirstFrame); */\r\n },\r\n sourceRectAtTime: function () {\r\n return {\r\n top: 0,\r\n left: 0,\r\n width: 100,\r\n height: 100,\r\n };\r\n },\r\n getLayerSize: function () {\r\n if (this.data.ty === 5) {\r\n return { w: this.data.textData.width, h: this.data.textData.height };\r\n }\r\n return { w: this.data.width, h: this.data.height };\r\n },\r\n};\r\n\r\n/* global extendPrototype, RenderableElement, createProxyFunction */\r\n\r\nfunction RenderableDOMElement() {}\r\n\r\n(function () {\r\n var _prototype = {\r\n initElement: function (data, globalData, comp) {\r\n this.initFrame();\r\n this.initBaseData(data, globalData, comp);\r\n this.initTransform(data, globalData, comp);\r\n this.initHierarchy();\r\n this.initRenderable();\r\n this.initRendererElement();\r\n this.createContainerElements();\r\n this.createRenderableComponents();\r\n this.createContent();\r\n this.hide();\r\n },\r\n hide: function () {\r\n if (!this.hidden && (!this.isInRange || this.isTransparent)) {\r\n var elem = this.baseElement || this.layerElement;\r\n elem.style.display = 'none';\r\n this.hidden = true;\r\n }\r\n },\r\n show: function () {\r\n if (this.isInRange && !this.isTransparent) {\r\n if (!this.data.hd) {\r\n var elem = this.baseElement || this.layerElement;\r\n elem.style.display = 'block';\r\n }\r\n this.hidden = false;\r\n this._isFirstFrame = true;\r\n }\r\n },\r\n renderFrame: function () {\r\n // If it is exported as hidden (data.hd === true) no need to render\r\n // If it is not visible no need to render\r\n if (this.data.hd || this.hidden) {\r\n return;\r\n }\r\n this.renderTransform();\r\n this.renderRenderable();\r\n this.renderElement();\r\n this.renderInnerContent();\r\n if (this._isFirstFrame) {\r\n this._isFirstFrame = false;\r\n }\r\n },\r\n renderInnerContent: function () {},\r\n prepareFrame: function (num) {\r\n this._mdf = false;\r\n this.prepareRenderableFrame(num);\r\n this.prepareProperties(num, this.isInRange);\r\n this.checkTransparency();\r\n },\r\n destroy: function () {\r\n this.innerElem = null;\r\n this.destroyBaseElement();\r\n },\r\n };\r\n extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);\r\n}());\r\n\r\n/* exported ProcessedElement */\r\n\r\nfunction ProcessedElement(element, position) {\r\n this.elem = element;\r\n this.pos = position;\r\n}\r\n\r\n/* global createNS */\r\n\r\nfunction SVGStyleData(data, level) {\r\n this.data = data;\r\n this.type = data.ty;\r\n this.d = '';\r\n this.lvl = level;\r\n this._mdf = false;\r\n this.closed = data.hd === true;\r\n this.pElem = createNS('path');\r\n this.msElem = null;\r\n}\r\n\r\nSVGStyleData.prototype.reset = function () {\r\n this.d = '';\r\n this._mdf = false;\r\n};\r\n\r\nfunction SVGShapeData(transformers, level, shape) {\r\n this.caches = [];\r\n this.styles = [];\r\n this.transformers = transformers;\r\n this.lStr = '';\r\n this.sh = shape;\r\n this.lvl = level;\r\n // TODO find if there are some cases where _isAnimated can be false.\r\n // For now, since shapes add up with other shapes. They have to be calculated every time.\r\n // One way of finding out is checking if all styles associated to this shape depend only of this shape\r\n this._isAnimated = !!shape.k;\r\n // TODO: commenting this for now since all shapes are animated\r\n var i = 0;\r\n var len = transformers.length;\r\n while (i < len) {\r\n if (transformers[i].mProps.dynamicProperties.length) {\r\n this._isAnimated = true;\r\n break;\r\n }\r\n i += 1;\r\n }\r\n}\r\n\r\nSVGShapeData.prototype.setAsAnimated = function () {\r\n this._isAnimated = true;\r\n};\r\n\r\n/* exported SVGTransformData */\r\n\r\nfunction SVGTransformData(mProps, op, container) {\r\n this.transform = {\r\n mProps: mProps,\r\n op: op,\r\n container: container,\r\n };\r\n this.elements = [];\r\n this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;\r\n}\r\n\r\n/* global DashProperty, PropertyFactory, extendPrototype, DynamicPropertyContainer */\r\n\r\nfunction SVGStrokeStyleData(elem, data, styleOb) {\r\n this.initDynamicPropertyContainer(elem);\r\n this.getValue = this.iterateDynamicProperties;\r\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\r\n this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);\r\n this.d = new DashProperty(elem, data.d || {}, 'svg', this);\r\n this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);\r\n this.style = styleOb;\r\n this._isAnimated = !!this._isAnimated;\r\n}\r\n\r\nextendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);\r\n\r\n/* global PropertyFactory, extendPrototype, DynamicPropertyContainer */\r\n\r\nfunction SVGFillStyleData(elem, data, styleOb) {\r\n this.initDynamicPropertyContainer(elem);\r\n this.getValue = this.iterateDynamicProperties;\r\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\r\n this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);\r\n this.style = styleOb;\r\n}\r\n\r\nextendPrototype([DynamicPropertyContainer], SVGFillStyleData);\r\n\r\n/* global PropertyFactory, degToRads, GradientProperty, createElementID, createNS, locationHref,\r\nextendPrototype, DynamicPropertyContainer, lineCapEnum, lineJoinEnum */\r\n\r\nfunction SVGGradientFillStyleData(elem, data, styleOb) {\r\n this.initDynamicPropertyContainer(elem);\r\n this.getValue = this.iterateDynamicProperties;\r\n this.initGradientData(elem, data, styleOb);\r\n}\r\n\r\nSVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {\r\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\r\n this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);\r\n this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);\r\n this.h = PropertyFactory.getProp(elem, data.h || { k: 0 }, 0, 0.01, this);\r\n this.a = PropertyFactory.getProp(elem, data.a || { k: 0 }, 0, degToRads, this);\r\n this.g = new GradientProperty(elem, data.g, this);\r\n this.style = styleOb;\r\n this.stops = [];\r\n this.setGradientData(styleOb.pElem, data);\r\n this.setGradientOpacity(data, styleOb);\r\n this._isAnimated = !!this._isAnimated;\r\n};\r\n\r\nSVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {\r\n var gradientId = createElementID();\r\n var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');\r\n gfill.setAttribute('id', gradientId);\r\n gfill.setAttribute('spreadMethod', 'pad');\r\n gfill.setAttribute('gradientUnits', 'userSpaceOnUse');\r\n var stops = [];\r\n var stop;\r\n var j;\r\n var jLen;\r\n jLen = data.g.p * 4;\r\n for (j = 0; j < jLen; j += 4) {\r\n stop = createNS('stop');\r\n gfill.appendChild(stop);\r\n stops.push(stop);\r\n }\r\n pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + locationHref + '#' + gradientId + ')');\r\n this.gf = gfill;\r\n this.cst = stops;\r\n};\r\n\r\nSVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {\r\n if (this.g._hasOpacity && !this.g._collapsable) {\r\n var stop;\r\n var j;\r\n var jLen;\r\n var mask = createNS('mask');\r\n var maskElement = createNS('path');\r\n mask.appendChild(maskElement);\r\n var opacityId = createElementID();\r\n var maskId = createElementID();\r\n mask.setAttribute('id', maskId);\r\n var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');\r\n opFill.setAttribute('id', opacityId);\r\n opFill.setAttribute('spreadMethod', 'pad');\r\n opFill.setAttribute('gradientUnits', 'userSpaceOnUse');\r\n jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;\r\n var stops = this.stops;\r\n for (j = data.g.p * 4; j < jLen; j += 2) {\r\n stop = createNS('stop');\r\n stop.setAttribute('stop-color', 'rgb(255,255,255)');\r\n opFill.appendChild(stop);\r\n stops.push(stop);\r\n }\r\n maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + locationHref + '#' + opacityId + ')');\r\n if (data.ty === 'gs') {\r\n maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);\r\n maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);\r\n if (data.lj === 1) {\r\n maskElement.setAttribute('stroke-miterlimit', data.ml);\r\n }\r\n }\r\n this.of = opFill;\r\n this.ms = mask;\r\n this.ost = stops;\r\n this.maskId = maskId;\r\n styleOb.msElem = maskElement;\r\n }\r\n};\r\n\r\nextendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);\r\n\r\n/* global PropertyFactory, DashProperty, extendPrototype, SVGGradientFillStyleData, DynamicPropertyContainer */\r\n\r\nfunction SVGGradientStrokeStyleData(elem, data, styleOb) {\r\n this.initDynamicPropertyContainer(elem);\r\n this.getValue = this.iterateDynamicProperties;\r\n this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);\r\n this.d = new DashProperty(elem, data.d || {}, 'svg', this);\r\n this.initGradientData(elem, data, styleOb);\r\n this._isAnimated = !!this._isAnimated;\r\n}\r\n\r\nextendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);\r\n\r\n/* global createNS */\r\n/* exported ShapeGroupData */\r\n\r\nfunction ShapeGroupData() {\r\n this.it = [];\r\n this.prevViewData = [];\r\n this.gr = createNS('g');\r\n}\r\n\r\n/* global Matrix, buildShapeString, bmFloor */\r\n/* exported SVGElementsRenderer */\r\n\r\nvar SVGElementsRenderer = (function () {\r\n var _identityMatrix = new Matrix();\r\n var _matrixHelper = new Matrix();\r\n\r\n var ob = {\r\n createRenderFunction: createRenderFunction,\r\n };\r\n\r\n function createRenderFunction(data) {\r\n switch (data.ty) {\r\n case 'fl':\r\n return renderFill;\r\n case 'gf':\r\n return renderGradient;\r\n case 'gs':\r\n return renderGradientStroke;\r\n case 'st':\r\n return renderStroke;\r\n case 'sh':\r\n case 'el':\r\n case 'rc':\r\n case 'sr':\r\n return renderPath;\r\n case 'tr':\r\n return renderContentTransform;\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n function renderContentTransform(styleData, itemData, isFirstFrame) {\r\n if (isFirstFrame || itemData.transform.op._mdf) {\r\n itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);\r\n }\r\n if (isFirstFrame || itemData.transform.mProps._mdf) {\r\n itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());\r\n }\r\n }\r\n\r\n function renderPath(styleData, itemData, isFirstFrame) {\r\n var j;\r\n var jLen;\r\n var pathStringTransformed;\r\n var redraw;\r\n var pathNodes;\r\n var l;\r\n var lLen = itemData.styles.length;\r\n var lvl = itemData.lvl;\r\n var paths;\r\n var mat;\r\n var props;\r\n var iterations;\r\n var k;\r\n for (l = 0; l < lLen; l += 1) {\r\n redraw = itemData.sh._mdf || isFirstFrame;\r\n if (itemData.styles[l].lvl < lvl) {\r\n mat = _matrixHelper.reset();\r\n iterations = lvl - itemData.styles[l].lvl;\r\n k = itemData.transformers.length - 1;\r\n while (!redraw && iterations > 0) {\r\n redraw = itemData.transformers[k].mProps._mdf || redraw;\r\n iterations -= 1;\r\n k -= 1;\r\n }\r\n if (redraw) {\r\n iterations = lvl - itemData.styles[l].lvl;\r\n k = itemData.transformers.length - 1;\r\n while (iterations > 0) {\r\n props = itemData.transformers[k].mProps.v.props;\r\n mat.transform(props[0], props[1], props[2], props[3], props[4], props[5], props[6], props[7], props[8], props[9], props[10], props[11], props[12], props[13], props[14], props[15]);\r\n iterations -= 1;\r\n k -= 1;\r\n }\r\n }\r\n } else {\r\n mat = _identityMatrix;\r\n }\r\n paths = itemData.sh.paths;\r\n jLen = paths._length;\r\n if (redraw) {\r\n pathStringTransformed = '';\r\n for (j = 0; j < jLen; j += 1) {\r\n pathNodes = paths.shapes[j];\r\n if (pathNodes && pathNodes._length) {\r\n pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);\r\n }\r\n }\r\n itemData.caches[l] = pathStringTransformed;\r\n } else {\r\n pathStringTransformed = itemData.caches[l];\r\n }\r\n itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;\r\n itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;\r\n }\r\n }\r\n\r\n function renderFill(styleData, itemData, isFirstFrame) {\r\n var styleElem = itemData.style;\r\n\r\n if (itemData.c._mdf || isFirstFrame) {\r\n styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');\r\n }\r\n if (itemData.o._mdf || isFirstFrame) {\r\n styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);\r\n }\r\n }\r\n\r\n function renderGradientStroke(styleData, itemData, isFirstFrame) {\r\n renderGradient(styleData, itemData, isFirstFrame);\r\n renderStroke(styleData, itemData, isFirstFrame);\r\n }\r\n\r\n function renderGradient(styleData, itemData, isFirstFrame) {\r\n var gfill = itemData.gf;\r\n var hasOpacity = itemData.g._hasOpacity;\r\n var pt1 = itemData.s.v;\r\n var pt2 = itemData.e.v;\r\n\r\n if (itemData.o._mdf || isFirstFrame) {\r\n var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';\r\n itemData.style.pElem.setAttribute(attr, itemData.o.v);\r\n }\r\n if (itemData.s._mdf || isFirstFrame) {\r\n var attr1 = styleData.t === 1 ? 'x1' : 'cx';\r\n var attr2 = attr1 === 'x1' ? 'y1' : 'cy';\r\n gfill.setAttribute(attr1, pt1[0]);\r\n gfill.setAttribute(attr2, pt1[1]);\r\n if (hasOpacity && !itemData.g._collapsable) {\r\n itemData.of.setAttribute(attr1, pt1[0]);\r\n itemData.of.setAttribute(attr2, pt1[1]);\r\n }\r\n }\r\n var stops;\r\n var i;\r\n var len;\r\n var stop;\r\n if (itemData.g._cmdf || isFirstFrame) {\r\n stops = itemData.cst;\r\n var cValues = itemData.g.c;\r\n len = stops.length;\r\n for (i = 0; i < len; i += 1) {\r\n stop = stops[i];\r\n stop.setAttribute('offset', cValues[i * 4] + '%');\r\n stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');\r\n }\r\n }\r\n if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {\r\n var oValues = itemData.g.o;\r\n if (itemData.g._collapsable) {\r\n stops = itemData.cst;\r\n } else {\r\n stops = itemData.ost;\r\n }\r\n len = stops.length;\r\n for (i = 0; i < len; i += 1) {\r\n stop = stops[i];\r\n if (!itemData.g._collapsable) {\r\n stop.setAttribute('offset', oValues[i * 2] + '%');\r\n }\r\n stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);\r\n }\r\n }\r\n if (styleData.t === 1) {\r\n if (itemData.e._mdf || isFirstFrame) {\r\n gfill.setAttribute('x2', pt2[0]);\r\n gfill.setAttribute('y2', pt2[1]);\r\n if (hasOpacity && !itemData.g._collapsable) {\r\n itemData.of.setAttribute('x2', pt2[0]);\r\n itemData.of.setAttribute('y2', pt2[1]);\r\n }\r\n }\r\n } else {\r\n var rad;\r\n if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {\r\n rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\r\n gfill.setAttribute('r', rad);\r\n if (hasOpacity && !itemData.g._collapsable) {\r\n itemData.of.setAttribute('r', rad);\r\n }\r\n }\r\n if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {\r\n if (!rad) {\r\n rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\r\n }\r\n var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);\r\n\r\n var percent = itemData.h.v;\r\n if (percent >= 1) {\r\n percent = 0.99;\r\n } else if (percent <= -1) {\r\n percent = -0.99;\r\n }\r\n var dist = rad * percent;\r\n var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];\r\n var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];\r\n gfill.setAttribute('fx', x);\r\n gfill.setAttribute('fy', y);\r\n if (hasOpacity && !itemData.g._collapsable) {\r\n itemData.of.setAttribute('fx', x);\r\n itemData.of.setAttribute('fy', y);\r\n }\r\n }\r\n // gfill.setAttribute('fy','200');\r\n }\r\n }\r\n\r\n function renderStroke(styleData, itemData, isFirstFrame) {\r\n var styleElem = itemData.style;\r\n var d = itemData.d;\r\n if (d && (d._mdf || isFirstFrame) && d.dashStr) {\r\n styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);\r\n styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);\r\n }\r\n if (itemData.c && (itemData.c._mdf || isFirstFrame)) {\r\n styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');\r\n }\r\n if (itemData.o._mdf || isFirstFrame) {\r\n styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);\r\n }\r\n if (itemData.w._mdf || isFirstFrame) {\r\n styleElem.pElem.setAttribute('stroke-width', itemData.w.v);\r\n if (styleElem.msElem) {\r\n styleElem.msElem.setAttribute('stroke-width', itemData.w.v);\r\n }\r\n }\r\n }\r\n\r\n return ob;\r\n}());\r\n\r\n/* global Matrix */\r\n\r\nfunction ShapeTransformManager() {\r\n this.sequences = {};\r\n this.sequenceList = [];\r\n this.transform_key_count = 0;\r\n}\r\n\r\nShapeTransformManager.prototype = {\r\n addTransformSequence: function (transforms) {\r\n var i;\r\n var len = transforms.length;\r\n var key = '_';\r\n for (i = 0; i < len; i += 1) {\r\n key += transforms[i].transform.key + '_';\r\n }\r\n var sequence = this.sequences[key];\r\n if (!sequence) {\r\n sequence = {\r\n transforms: [].concat(transforms),\r\n finalTransform: new Matrix(),\r\n _mdf: false,\r\n };\r\n this.sequences[key] = sequence;\r\n this.sequenceList.push(sequence);\r\n }\r\n return sequence;\r\n },\r\n processSequence: function (sequence, isFirstFrame) {\r\n var i = 0;\r\n var len = sequence.transforms.length;\r\n var _mdf = isFirstFrame;\r\n while (i < len && !isFirstFrame) {\r\n if (sequence.transforms[i].transform.mProps._mdf) {\r\n _mdf = true;\r\n break;\r\n }\r\n i += 1;\r\n }\r\n if (_mdf) {\r\n var props;\r\n sequence.finalTransform.reset();\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n props = sequence.transforms[i].transform.mProps.v.props;\r\n sequence.finalTransform.transform(props[0], props[1], props[2], props[3], props[4], props[5], props[6], props[7], props[8], props[9], props[10], props[11], props[12], props[13], props[14], props[15]);\r\n }\r\n }\r\n sequence._mdf = _mdf;\r\n },\r\n processSequences: function (isFirstFrame) {\r\n var i;\r\n var len = this.sequenceList.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.processSequence(this.sequenceList[i], isFirstFrame);\r\n }\r\n },\r\n getNewKey: function () {\r\n this.transform_key_count += 1;\r\n return '_' + this.transform_key_count;\r\n },\r\n};\r\n\r\n/* global ShapePropertyFactory, SVGShapeData */\r\n\r\nfunction CVShapeData(element, data, styles, transformsManager) {\r\n this.styledShapes = [];\r\n this.tr = [0, 0, 0, 0, 0, 0];\r\n var ty = 4;\r\n if (data.ty === 'rc') {\r\n ty = 5;\r\n } else if (data.ty === 'el') {\r\n ty = 6;\r\n } else if (data.ty === 'sr') {\r\n ty = 7;\r\n }\r\n this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element);\r\n var i;\r\n var len = styles.length;\r\n var styledShape;\r\n for (i = 0; i < len; i += 1) {\r\n if (!styles[i].closed) {\r\n styledShape = {\r\n transforms: transformsManager.addTransformSequence(styles[i].transforms),\r\n trNodes: [],\r\n };\r\n this.styledShapes.push(styledShape);\r\n styles[i].elements.push(styledShape);\r\n }\r\n }\r\n}\r\n\r\nCVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;\r\n\r\n/* global LayerExpressionInterface, EffectsExpressionInterface, CompExpressionInterface, ShapeExpressionInterface,\r\nTextExpressionInterface, getBlendMode,createElementID, EffectsManager */\r\n\r\nfunction BaseElement() {\r\n}\r\n\r\nBaseElement.prototype = {\r\n checkMasks: function () {\r\n if (!this.data.hasMask) {\r\n return false;\r\n }\r\n var i = 0;\r\n var len = this.data.masksProperties.length;\r\n while (i < len) {\r\n if ((this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false)) {\r\n return true;\r\n }\r\n i += 1;\r\n }\r\n return false;\r\n },\r\n initExpressions: function () {\r\n this.layerInterface = LayerExpressionInterface(this);\r\n if (this.data.hasMask && this.maskManager) {\r\n this.layerInterface.registerMaskInterface(this.maskManager);\r\n }\r\n var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);\r\n this.layerInterface.registerEffectsInterface(effectsInterface);\r\n\r\n if (this.data.ty === 0 || this.data.xt) {\r\n this.compInterface = CompExpressionInterface(this);\r\n } else if (this.data.ty === 4) {\r\n this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);\r\n this.layerInterface.content = this.layerInterface.shapeInterface;\r\n } else if (this.data.ty === 5) {\r\n this.layerInterface.textInterface = TextExpressionInterface(this);\r\n this.layerInterface.text = this.layerInterface.textInterface;\r\n }\r\n },\r\n setBlendMode: function () {\r\n var blendModeValue = getBlendMode(this.data.bm);\r\n var elem = this.baseElement || this.layerElement;\r\n\r\n elem.style['mix-blend-mode'] = blendModeValue;\r\n },\r\n initBaseData: function (data, globalData, comp) {\r\n this.globalData = globalData;\r\n this.comp = comp;\r\n this.data = data;\r\n this.layerId = createElementID();\r\n\r\n // Stretch factor for old animations missing this property.\r\n if (!this.data.sr) {\r\n this.data.sr = 1;\r\n }\r\n // effects manager\r\n this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);\r\n },\r\n getType: function () {\r\n return this.type;\r\n },\r\n sourceRectAtTime: function () {},\r\n};\r\n\r\n/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement */\r\n\r\nfunction NullElement(data, globalData, comp) {\r\n this.initFrame();\r\n this.initBaseData(data, globalData, comp);\r\n this.initFrame();\r\n this.initTransform(data, globalData, comp);\r\n this.initHierarchy();\r\n}\r\n\r\nNullElement.prototype.prepareFrame = function (num) {\r\n this.prepareProperties(num, true);\r\n};\r\n\r\nNullElement.prototype.renderFrame = function () {\r\n};\r\n\r\nNullElement.prototype.getBaseElement = function () {\r\n return null;\r\n};\r\n\r\nNullElement.prototype.destroy = function () {\r\n};\r\n\r\nNullElement.prototype.sourceRectAtTime = function () {\r\n};\r\n\r\nNullElement.prototype.hide = function () {\r\n};\r\n\r\nextendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);\r\n\r\n/* global filtersFactory, featureSupport, filtersFactory, createElementID, createNS, MaskElement, SVGEffects, locationHref */\r\n\r\nfunction SVGBaseElement() {\r\n}\r\n\r\nSVGBaseElement.prototype = {\r\n initRendererElement: function () {\r\n this.layerElement = createNS('g');\r\n },\r\n createContainerElements: function () {\r\n this.matteElement = createNS('g');\r\n this.transformedElement = this.layerElement;\r\n this.maskedElement = this.layerElement;\r\n this._sizeChanged = false;\r\n var layerElementParent = null;\r\n // If this layer acts as a mask for the following layer\r\n var filId;\r\n var fil;\r\n var gg;\r\n if (this.data.td) {\r\n if (this.data.td == 3 || this.data.td == 1) { // eslint-disable-line eqeqeq\r\n var masker = createNS('mask');\r\n masker.setAttribute('id', this.layerId);\r\n masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq\r\n masker.appendChild(this.layerElement);\r\n layerElementParent = masker;\r\n this.globalData.defs.appendChild(masker);\r\n // This is only for IE and Edge when mask if of type alpha\r\n if (!featureSupport.maskType && this.data.td == 1) { // eslint-disable-line eqeqeq\r\n masker.setAttribute('mask-type', 'luminance');\r\n filId = createElementID();\r\n fil = filtersFactory.createFilter(filId);\r\n this.globalData.defs.appendChild(fil);\r\n fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());\r\n gg = createNS('g');\r\n gg.appendChild(this.layerElement);\r\n layerElementParent = gg;\r\n masker.appendChild(gg);\r\n gg.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');\r\n }\r\n } else if (this.data.td == 2) { // eslint-disable-line eqeqeq\r\n var maskGroup = createNS('mask');\r\n maskGroup.setAttribute('id', this.layerId);\r\n maskGroup.setAttribute('mask-type', 'alpha');\r\n var maskGrouper = createNS('g');\r\n maskGroup.appendChild(maskGrouper);\r\n filId = createElementID();\r\n fil = filtersFactory.createFilter(filId);\r\n /// /\r\n\r\n // This solution doesn't work on Android when meta tag with viewport attribute is set\r\n /* var feColorMatrix = createNS('feColorMatrix');\r\n feColorMatrix.setAttribute('type', 'matrix');\r\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\r\n feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');\r\n fil.appendChild(feColorMatrix); */\r\n /// /\r\n var feCTr = createNS('feComponentTransfer');\r\n feCTr.setAttribute('in', 'SourceGraphic');\r\n fil.appendChild(feCTr);\r\n var feFunc = createNS('feFuncA');\r\n feFunc.setAttribute('type', 'table');\r\n feFunc.setAttribute('tableValues', '1.0 0.0');\r\n feCTr.appendChild(feFunc);\r\n /// /\r\n this.globalData.defs.appendChild(fil);\r\n var alphaRect = createNS('rect');\r\n alphaRect.setAttribute('width', this.comp.data.w);\r\n alphaRect.setAttribute('height', this.comp.data.h);\r\n alphaRect.setAttribute('x', '0');\r\n alphaRect.setAttribute('y', '0');\r\n alphaRect.setAttribute('fill', '#ffffff');\r\n alphaRect.setAttribute('opacity', '0');\r\n maskGrouper.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');\r\n maskGrouper.appendChild(alphaRect);\r\n maskGrouper.appendChild(this.layerElement);\r\n layerElementParent = maskGrouper;\r\n if (!featureSupport.maskType) {\r\n maskGroup.setAttribute('mask-type', 'luminance');\r\n fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());\r\n gg = createNS('g');\r\n maskGrouper.appendChild(alphaRect);\r\n gg.appendChild(this.layerElement);\r\n layerElementParent = gg;\r\n maskGrouper.appendChild(gg);\r\n }\r\n this.globalData.defs.appendChild(maskGroup);\r\n }\r\n } else if (this.data.tt) {\r\n this.matteElement.appendChild(this.layerElement);\r\n layerElementParent = this.matteElement;\r\n this.baseElement = this.matteElement;\r\n } else {\r\n this.baseElement = this.layerElement;\r\n }\r\n if (this.data.ln) {\r\n this.layerElement.setAttribute('id', this.data.ln);\r\n }\r\n if (this.data.cl) {\r\n this.layerElement.setAttribute('class', this.data.cl);\r\n }\r\n // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped\r\n if (this.data.ty === 0 && !this.data.hd) {\r\n var cp = createNS('clipPath');\r\n var pt = createNS('path');\r\n pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');\r\n var clipId = createElementID();\r\n cp.setAttribute('id', clipId);\r\n cp.appendChild(pt);\r\n this.globalData.defs.appendChild(cp);\r\n\r\n if (this.checkMasks()) {\r\n var cpGroup = createNS('g');\r\n cpGroup.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');\r\n cpGroup.appendChild(this.layerElement);\r\n this.transformedElement = cpGroup;\r\n if (layerElementParent) {\r\n layerElementParent.appendChild(this.transformedElement);\r\n } else {\r\n this.baseElement = this.transformedElement;\r\n }\r\n } else {\r\n this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');\r\n }\r\n }\r\n if (this.data.bm !== 0) {\r\n this.setBlendMode();\r\n }\r\n },\r\n renderElement: function () {\r\n if (this.finalTransform._matMdf) {\r\n this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());\r\n }\r\n if (this.finalTransform._opMdf) {\r\n this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);\r\n }\r\n },\r\n destroyBaseElement: function () {\r\n this.layerElement = null;\r\n this.matteElement = null;\r\n this.maskManager.destroy();\r\n },\r\n getBaseElement: function () {\r\n if (this.data.hd) {\r\n return null;\r\n }\r\n return this.baseElement;\r\n },\r\n createRenderableComponents: function () {\r\n this.maskManager = new MaskElement(this.data, this, this.globalData);\r\n this.renderableEffectsManager = new SVGEffects(this);\r\n },\r\n setMatte: function (id) {\r\n if (!this.matteElement) {\r\n return;\r\n }\r\n this.matteElement.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');\r\n },\r\n};\r\n\r\n/* global ProcessedElement */\r\n\r\nfunction IShapeElement() {\r\n}\r\n\r\nIShapeElement.prototype = {\r\n addShapeToModifiers: function (data) {\r\n var i;\r\n var len = this.shapeModifiers.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.shapeModifiers[i].addShape(data);\r\n }\r\n },\r\n isShapeInAnimatedModifiers: function (data) {\r\n var i = 0;\r\n var len = this.shapeModifiers.length;\r\n while (i < len) {\r\n if (this.shapeModifiers[i].isAnimatedWithShape(data)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n },\r\n renderModifiers: function () {\r\n if (!this.shapeModifiers.length) {\r\n return;\r\n }\r\n var i;\r\n var len = this.shapes.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.shapes[i].sh.reset();\r\n }\r\n\r\n len = this.shapeModifiers.length;\r\n var shouldBreakProcess;\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame);\r\n // workaround to fix cases where a repeater resets the shape so the following processes get called twice\r\n // TODO: find a better solution for this\r\n if (shouldBreakProcess) {\r\n break;\r\n }\r\n }\r\n },\r\n\r\n searchProcessedElement: function (elem) {\r\n var elements = this.processedElements;\r\n var i = 0;\r\n var len = elements.length;\r\n while (i < len) {\r\n if (elements[i].elem === elem) {\r\n return elements[i].pos;\r\n }\r\n i += 1;\r\n }\r\n return 0;\r\n },\r\n addProcessedElement: function (elem, pos) {\r\n var elements = this.processedElements;\r\n var i = elements.length;\r\n while (i) {\r\n i -= 1;\r\n if (elements[i].elem === elem) {\r\n elements[i].pos = pos;\r\n return;\r\n }\r\n }\r\n elements.push(new ProcessedElement(elem, pos));\r\n },\r\n prepareFrame: function (num) {\r\n this.prepareRenderableFrame(num);\r\n this.prepareProperties(num, this.isInRange);\r\n },\r\n};\r\n\r\n/* global TextProperty, TextAnimatorProperty, buildShapeString, LetterProps */\r\n\r\nfunction ITextElement() {\r\n}\r\n\r\nITextElement.prototype.initElement = function (data, globalData, comp) {\r\n this.lettersChangedFlag = true;\r\n this.initFrame();\r\n this.initBaseData(data, globalData, comp);\r\n this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);\r\n this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);\r\n this.initTransform(data, globalData, comp);\r\n this.initHierarchy();\r\n this.initRenderable();\r\n this.initRendererElement();\r\n this.createContainerElements();\r\n this.createRenderableComponents();\r\n this.createContent();\r\n this.hide();\r\n this.textAnimator.searchProperties(this.dynamicProperties);\r\n};\r\n\r\nITextElement.prototype.prepareFrame = function (num) {\r\n this._mdf = false;\r\n this.prepareRenderableFrame(num);\r\n this.prepareProperties(num, this.isInRange);\r\n if (this.textProperty._mdf || this.textProperty._isFirstFrame) {\r\n this.buildNewText();\r\n this.textProperty._isFirstFrame = false;\r\n this.textProperty._mdf = false;\r\n }\r\n};\r\n\r\nITextElement.prototype.createPathShape = function (matrixHelper, shapes) {\r\n var j;\r\n var jLen = shapes.length;\r\n var pathNodes;\r\n var shapeStr = '';\r\n for (j = 0; j < jLen; j += 1) {\r\n pathNodes = shapes[j].ks.k;\r\n shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);\r\n }\r\n return shapeStr;\r\n};\r\n\r\nITextElement.prototype.updateDocumentData = function (newData, index) {\r\n this.textProperty.updateDocumentData(newData, index);\r\n};\r\n\r\nITextElement.prototype.canResizeFont = function (_canResize) {\r\n this.textProperty.canResizeFont(_canResize);\r\n};\r\n\r\nITextElement.prototype.setMinimumFontSize = function (_fontSize) {\r\n this.textProperty.setMinimumFontSize(_fontSize);\r\n};\r\n\r\nITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {\r\n if (documentData.ps) {\r\n matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);\r\n }\r\n matrixHelper.translate(0, -documentData.ls, 0);\r\n switch (documentData.j) {\r\n case 1:\r\n matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);\r\n break;\r\n case 2:\r\n matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);\r\n break;\r\n default:\r\n break;\r\n }\r\n matrixHelper.translate(xPos, yPos, 0);\r\n};\r\n\r\nITextElement.prototype.buildColor = function (colorData) {\r\n return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';\r\n};\r\n\r\nITextElement.prototype.emptyProp = new LetterProps();\r\n\r\nITextElement.prototype.destroy = function () {\r\n\r\n};\r\n\r\n/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement */\r\n\r\nfunction ICompElement() {}\r\n\r\nextendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);\r\n\r\nICompElement.prototype.initElement = function (data, globalData, comp) {\r\n this.initFrame();\r\n this.initBaseData(data, globalData, comp);\r\n this.initTransform(data, globalData, comp);\r\n this.initRenderable();\r\n this.initHierarchy();\r\n this.initRendererElement();\r\n this.createContainerElements();\r\n this.createRenderableComponents();\r\n if (this.data.xt || !globalData.progressiveLoad) {\r\n this.buildAllItems();\r\n }\r\n this.hide();\r\n};\r\n\r\n/* ICompElement.prototype.hide = function(){\r\n if(!this.hidden){\r\n this.hideElement();\r\n var i,len = this.elements.length;\r\n for( i = 0; i < len; i+=1 ){\r\n if(this.elements[i]){\r\n this.elements[i].hide();\r\n }\r\n }\r\n }\r\n}; */\r\n\r\nICompElement.prototype.prepareFrame = function (num) {\r\n this._mdf = false;\r\n this.prepareRenderableFrame(num);\r\n this.prepareProperties(num, this.isInRange);\r\n if (!this.isInRange && !this.data.xt) {\r\n return;\r\n }\r\n\r\n if (!this.tm._placeholder) {\r\n var timeRemapped = this.tm.v;\r\n if (timeRemapped === this.data.op) {\r\n timeRemapped = this.data.op - 1;\r\n }\r\n this.renderedFrame = timeRemapped;\r\n } else {\r\n this.renderedFrame = num / this.data.sr;\r\n }\r\n var i;\r\n var len = this.elements.length;\r\n if (!this.completeLayers) {\r\n this.checkLayers(this.renderedFrame);\r\n }\r\n // This iteration needs to be backwards because of how expressions connect between each other\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);\r\n if (this.elements[i]._mdf) {\r\n this._mdf = true;\r\n }\r\n }\r\n }\r\n};\r\n\r\nICompElement.prototype.renderInnerContent = function () {\r\n var i;\r\n var len = this.layers.length;\r\n for (i = 0; i < len; i += 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].renderFrame();\r\n }\r\n }\r\n};\r\n\r\nICompElement.prototype.setElements = function (elems) {\r\n this.elements = elems;\r\n};\r\n\r\nICompElement.prototype.getElements = function () {\r\n return this.elements;\r\n};\r\n\r\nICompElement.prototype.destroyElements = function () {\r\n var i;\r\n var len = this.layers.length;\r\n for (i = 0; i < len; i += 1) {\r\n if (this.elements[i]) {\r\n this.elements[i].destroy();\r\n }\r\n }\r\n};\r\n\r\nICompElement.prototype.destroy = function () {\r\n this.destroyElements();\r\n this.destroyBaseElement();\r\n};\r\n\r\n/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, createNS */\r\n\r\nfunction IImageElement(data, globalData, comp) {\r\n this.assetData = globalData.getAssetData(data.refId);\r\n this.initElement(data, globalData, comp);\r\n this.sourceRect = {\r\n top: 0, left: 0, width: this.assetData.w, height: this.assetData.h,\r\n };\r\n}\r\n\r\nextendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);\r\n\r\nIImageElement.prototype.createContent = function () {\r\n var assetPath = this.globalData.getAssetsPath(this.assetData);\r\n\r\n this.innerElem = createNS('image');\r\n this.innerElem.setAttribute('width', this.assetData.w + 'px');\r\n this.innerElem.setAttribute('height', this.assetData.h + 'px');\r\n this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);\r\n this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);\r\n\r\n this.layerElement.appendChild(this.innerElem);\r\n};\r\n\r\nIImageElement.prototype.sourceRectAtTime = function () {\r\n return this.sourceRect;\r\n};\r\n\r\n/* global extendPrototype, IImageElement, createNS */\r\n\r\nfunction ISolidElement(data, globalData, comp) {\r\n this.initElement(data, globalData, comp);\r\n}\r\nextendPrototype([IImageElement], ISolidElement);\r\n\r\nISolidElement.prototype.createContent = function () {\r\n var rect = createNS('rect');\r\n /// /rect.style.width = this.data.sw;\r\n /// /rect.style.height = this.data.sh;\r\n /// /rect.style.fill = this.data.sc;\r\n rect.setAttribute('width', this.data.sw);\r\n rect.setAttribute('height', this.data.sh);\r\n rect.setAttribute('fill', this.data.sc);\r\n this.layerElement.appendChild(rect);\r\n};\r\n\r\n/* global PropertyFactory, extendPrototype, RenderableElement, BaseElement, FrameElement */\r\n\r\nfunction AudioElement(data, globalData, comp) {\r\n this.initFrame();\r\n this.initRenderable();\r\n this.assetData = globalData.getAssetData(data.refId);\r\n this.initBaseData(data, globalData, comp);\r\n this._isPlaying = false;\r\n this._canPlay = false;\r\n var assetPath = this.globalData.getAssetsPath(this.assetData);\r\n this.audio = this.globalData.audioController.createAudio(assetPath);\r\n this._currentTime = 0;\r\n this.globalData.audioController.addAudio(this);\r\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };\r\n}\r\n\r\nAudioElement.prototype.prepareFrame = function (num) {\r\n this.prepareRenderableFrame(num, true);\r\n this.prepareProperties(num, true);\r\n if (!this.tm._placeholder) {\r\n var timeRemapped = this.tm.v;\r\n this._currentTime = timeRemapped;\r\n } else {\r\n this._currentTime = num / this.data.sr;\r\n }\r\n};\r\n\r\nextendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);\r\n\r\nAudioElement.prototype.renderFrame = function () {\r\n if (this.isInRange && this._canPlay) {\r\n if (!this._isPlaying) {\r\n this.audio.play();\r\n this.audio.seek(this._currentTime / this.globalData.frameRate);\r\n this._isPlaying = true;\r\n } else if (!this.audio.playing()\r\n || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1\r\n ) {\r\n this.audio.seek(this._currentTime / this.globalData.frameRate);\r\n }\r\n }\r\n};\r\n\r\nAudioElement.prototype.show = function () {\r\n // this.audio.play()\r\n};\r\n\r\nAudioElement.prototype.hide = function () {\r\n this.audio.pause();\r\n this._isPlaying = false;\r\n};\r\n\r\nAudioElement.prototype.pause = function () {\r\n this.audio.pause();\r\n this._isPlaying = false;\r\n this._canPlay = false;\r\n};\r\n\r\nAudioElement.prototype.resume = function () {\r\n this._canPlay = true;\r\n};\r\n\r\nAudioElement.prototype.setRate = function (rateValue) {\r\n this.audio.rate(rateValue);\r\n};\r\n\r\nAudioElement.prototype.volume = function (volumeValue) {\r\n this.audio.volume(volumeValue);\r\n};\r\n\r\nAudioElement.prototype.getBaseElement = function () {\r\n return null;\r\n};\r\n\r\nAudioElement.prototype.destroy = function () {\r\n};\r\n\r\nAudioElement.prototype.sourceRectAtTime = function () {\r\n};\r\n\r\nAudioElement.prototype.initExpressions = function () {\r\n};\r\n\r\n/* global extendPrototype, RenderableElement, BaseElement, FrameElement, FootageInterface */\r\n\r\nfunction FootageElement(data, globalData, comp) {\r\n this.initFrame();\r\n this.initRenderable();\r\n this.assetData = globalData.getAssetData(data.refId);\r\n this.footageData = globalData.imageLoader.getAsset(this.assetData);\r\n this.initBaseData(data, globalData, comp);\r\n}\r\n\r\nFootageElement.prototype.prepareFrame = function () {\r\n};\r\n\r\nextendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);\r\n\r\nFootageElement.prototype.getBaseElement = function () {\r\n return null;\r\n};\r\n\r\nFootageElement.prototype.renderFrame = function () {\r\n};\r\n\r\nFootageElement.prototype.destroy = function () {\r\n};\r\n\r\nFootageElement.prototype.initExpressions = function () {\r\n this.layerInterface = FootageInterface(this);\r\n};\r\n\r\nFootageElement.prototype.getFootageData = function () {\r\n return this.footageData;\r\n};\r\n\r\n/* global createSizedArray, PropertyFactory, extendPrototype, SVGRenderer, ICompElement, SVGBaseElement */\r\n\r\nfunction SVGCompElement(data, globalData, comp) {\r\n this.layers = data.layers;\r\n this.supports3d = true;\r\n this.completeLayers = false;\r\n this.pendingElements = [];\r\n this.elements = this.layers ? createSizedArray(this.layers.length) : [];\r\n // this.layerElement = createNS('g');\r\n this.initElement(data, globalData, comp);\r\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };\r\n}\r\n\r\nextendPrototype([SVGRenderer, ICompElement, SVGBaseElement], SVGCompElement);\r\n\r\n/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement,\r\nRenderableDOMElement, ITextElement, createSizedArray, createNS */\r\n\r\nfunction SVGTextLottieElement(data, globalData, comp) {\r\n this.textSpans = [];\r\n this.renderType = 'svg';\r\n this.initElement(data, globalData, comp);\r\n}\r\n\r\nextendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);\r\n\r\nSVGTextLottieElement.prototype.createContent = function () {\r\n if (this.data.singleShape && !this.globalData.fontManager.chars) {\r\n this.textContainer = createNS('text');\r\n }\r\n};\r\n\r\nSVGTextLottieElement.prototype.buildTextContents = function (textArray) {\r\n var i = 0;\r\n var len = textArray.length;\r\n var textContents = [];\r\n var currentTextContent = '';\r\n while (i < len) {\r\n if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {\r\n textContents.push(currentTextContent);\r\n currentTextContent = '';\r\n } else {\r\n currentTextContent += textArray[i];\r\n }\r\n i += 1;\r\n }\r\n textContents.push(currentTextContent);\r\n return textContents;\r\n};\r\n\r\nSVGTextLottieElement.prototype.buildNewText = function () {\r\n var i;\r\n var len;\r\n\r\n var documentData = this.textProperty.currentData;\r\n this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);\r\n if (documentData.fc) {\r\n this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));\r\n } else {\r\n this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');\r\n }\r\n if (documentData.sc) {\r\n this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));\r\n this.layerElement.setAttribute('stroke-width', documentData.sw);\r\n }\r\n this.layerElement.setAttribute('font-size', documentData.finalSize);\r\n var fontData = this.globalData.fontManager.getFontByName(documentData.f);\r\n if (fontData.fClass) {\r\n this.layerElement.setAttribute('class', fontData.fClass);\r\n } else {\r\n this.layerElement.setAttribute('font-family', fontData.fFamily);\r\n var fWeight = documentData.fWeight;\r\n var fStyle = documentData.fStyle;\r\n this.layerElement.setAttribute('font-style', fStyle);\r\n this.layerElement.setAttribute('font-weight', fWeight);\r\n }\r\n this.layerElement.setAttribute('aria-label', documentData.t);\r\n\r\n var letters = documentData.l || [];\r\n var usesGlyphs = !!this.globalData.fontManager.chars;\r\n len = letters.length;\r\n\r\n var tSpan;\r\n var matrixHelper = this.mHelper;\r\n var shapes;\r\n var shapeStr = '';\r\n var singleShape = this.data.singleShape;\r\n var xPos = 0;\r\n var yPos = 0;\r\n var firstLine = true;\r\n var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;\r\n if (singleShape && !usesGlyphs && !documentData.sz) {\r\n var tElement = this.textContainer;\r\n var justify = 'start';\r\n switch (documentData.j) {\r\n case 1:\r\n justify = 'end';\r\n break;\r\n case 2:\r\n justify = 'middle';\r\n break;\r\n default:\r\n justify = 'start';\r\n break;\r\n }\r\n tElement.setAttribute('text-anchor', justify);\r\n tElement.setAttribute('letter-spacing', trackingOffset);\r\n var textContent = this.buildTextContents(documentData.finalText);\r\n len = textContent.length;\r\n yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;\r\n for (i = 0; i < len; i += 1) {\r\n tSpan = this.textSpans[i] || createNS('tspan');\r\n tSpan.textContent = textContent[i];\r\n tSpan.setAttribute('x', 0);\r\n tSpan.setAttribute('y', yPos);\r\n tSpan.style.display = 'inherit';\r\n tElement.appendChild(tSpan);\r\n this.textSpans[i] = tSpan;\r\n yPos += documentData.finalLineHeight;\r\n }\r\n\r\n this.layerElement.appendChild(tElement);\r\n } else {\r\n var cachedSpansLength = this.textSpans.length;\r\n var shapeData;\r\n var charData;\r\n for (i = 0; i < len; i += 1) {\r\n if (!usesGlyphs || !singleShape || i === 0) {\r\n tSpan = cachedSpansLength > i ? this.textSpans[i] : createNS(usesGlyphs ? 'path' : 'text');\r\n if (cachedSpansLength <= i) {\r\n tSpan.setAttribute('stroke-linecap', 'butt');\r\n tSpan.setAttribute('stroke-linejoin', 'round');\r\n tSpan.setAttribute('stroke-miterlimit', '4');\r\n this.textSpans[i] = tSpan;\r\n this.layerElement.appendChild(tSpan);\r\n }\r\n tSpan.style.display = 'inherit';\r\n }\r\n\r\n matrixHelper.reset();\r\n matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);\r\n if (singleShape) {\r\n if (letters[i].n) {\r\n xPos = -trackingOffset;\r\n yPos += documentData.yOffset;\r\n yPos += firstLine ? 1 : 0;\r\n firstLine = false;\r\n }\r\n this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);\r\n xPos += letters[i].l || 0;\r\n // xPos += letters[i].val === ' ' ? 0 : trackingOffset;\r\n xPos += trackingOffset;\r\n }\r\n if (usesGlyphs) {\r\n charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\r\n shapeData = (charData && charData.data) || {};\r\n shapes = shapeData.shapes ? shapeData.shapes[0].it : [];\r\n if (!singleShape) {\r\n tSpan.setAttribute('d', this.createPathShape(matrixHelper, shapes));\r\n } else {\r\n shapeStr += this.createPathShape(matrixHelper, shapes);\r\n }\r\n } else {\r\n if (singleShape) {\r\n tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');\r\n }\r\n tSpan.textContent = letters[i].val;\r\n tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\r\n }\r\n //\r\n }\r\n if (singleShape && tSpan) {\r\n tSpan.setAttribute('d', shapeStr);\r\n }\r\n }\r\n while (i < this.textSpans.length) {\r\n this.textSpans[i].style.display = 'none';\r\n i += 1;\r\n }\r\n\r\n this._sizeChanged = true;\r\n};\r\n\r\nSVGTextLottieElement.prototype.sourceRectAtTime = function () {\r\n this.prepareFrame(this.comp.renderedFrame - this.data.st);\r\n this.renderInnerContent();\r\n if (this._sizeChanged) {\r\n this._sizeChanged = false;\r\n var textBox = this.layerElement.getBBox();\r\n this.bbox = {\r\n top: textBox.y,\r\n left: textBox.x,\r\n width: textBox.width,\r\n height: textBox.height,\r\n };\r\n }\r\n return this.bbox;\r\n};\r\n\r\nSVGTextLottieElement.prototype.renderInnerContent = function () {\r\n if (!this.data.singleShape) {\r\n this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\r\n if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {\r\n this._sizeChanged = true;\r\n var i;\r\n var len;\r\n var renderedLetters = this.textAnimator.renderedLetters;\r\n\r\n var letters = this.textProperty.currentData.l;\r\n\r\n len = letters.length;\r\n var renderedLetter;\r\n var textSpan;\r\n for (i = 0; i < len; i += 1) {\r\n if (!letters[i].n) {\r\n renderedLetter = renderedLetters[i];\r\n textSpan = this.textSpans[i];\r\n if (renderedLetter._mdf.m) {\r\n textSpan.setAttribute('transform', renderedLetter.m);\r\n }\r\n if (renderedLetter._mdf.o) {\r\n textSpan.setAttribute('opacity', renderedLetter.o);\r\n }\r\n if (renderedLetter._mdf.sw) {\r\n textSpan.setAttribute('stroke-width', renderedLetter.sw);\r\n }\r\n if (renderedLetter._mdf.sc) {\r\n textSpan.setAttribute('stroke', renderedLetter.sc);\r\n }\r\n if (renderedLetter._mdf.fc) {\r\n textSpan.setAttribute('fill', renderedLetter.fc);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n};\r\n\r\n/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement,\r\nFrameElement, RenderableDOMElement, Matrix, SVGStyleData, SVGStrokeStyleData, SVGFillStyleData,\r\nSVGGradientFillStyleData, SVGGradientStrokeStyleData, locationHref, getBlendMode, ShapeGroupData,\r\nTransformPropertyFactory, SVGTransformData, ShapePropertyFactory, SVGShapeData, SVGElementsRenderer, ShapeModifiers,\r\nlineCapEnum, lineJoinEnum */\r\n\r\nfunction SVGShapeElement(data, globalData, comp) {\r\n // List of drawable elements\r\n this.shapes = [];\r\n // Full shape data\r\n this.shapesData = data.shapes;\r\n // List of styles that will be applied to shapes\r\n this.stylesList = [];\r\n // List of modifiers that will be applied to shapes\r\n this.shapeModifiers = [];\r\n // List of items in shape tree\r\n this.itemsData = [];\r\n // List of items in previous shape tree\r\n this.processedElements = [];\r\n // List of animated components\r\n this.animatedContents = [];\r\n this.initElement(data, globalData, comp);\r\n // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\r\n // List of elements that have been created\r\n this.prevViewData = [];\r\n // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\r\n}\r\n\r\nextendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);\r\n\r\nSVGShapeElement.prototype.initSecondaryElement = function () {\r\n};\r\n\r\nSVGShapeElement.prototype.identityMatrix = new Matrix();\r\n\r\nSVGShapeElement.prototype.buildExpressionInterface = function () {};\r\n\r\nSVGShapeElement.prototype.createContent = function () {\r\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);\r\n this.filterUniqueShapes();\r\n};\r\n\r\n/*\r\nThis method searches for multiple shapes that affect a single element and one of them is animated\r\n*/\r\nSVGShapeElement.prototype.filterUniqueShapes = function () {\r\n var i;\r\n var len = this.shapes.length;\r\n var shape;\r\n var j;\r\n var jLen = this.stylesList.length;\r\n var style;\r\n var tempShapes = [];\r\n var areAnimated = false;\r\n for (j = 0; j < jLen; j += 1) {\r\n style = this.stylesList[j];\r\n areAnimated = false;\r\n tempShapes.length = 0;\r\n for (i = 0; i < len; i += 1) {\r\n shape = this.shapes[i];\r\n if (shape.styles.indexOf(style) !== -1) {\r\n tempShapes.push(shape);\r\n areAnimated = shape._isAnimated || areAnimated;\r\n }\r\n }\r\n if (tempShapes.length > 1 && areAnimated) {\r\n this.setShapesAsAnimated(tempShapes);\r\n }\r\n }\r\n};\r\n\r\nSVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {\r\n var i;\r\n var len = shapes.length;\r\n for (i = 0; i < len; i += 1) {\r\n shapes[i].setAsAnimated();\r\n }\r\n};\r\n\r\nSVGShapeElement.prototype.createStyleElement = function (data, level) {\r\n // TODO: prevent drawing of hidden styles\r\n var elementData;\r\n var styleOb = new SVGStyleData(data, level);\r\n\r\n var pathElement = styleOb.pElem;\r\n if (data.ty === 'st') {\r\n elementData = new SVGStrokeStyleData(this, data, styleOb);\r\n } else if (data.ty === 'fl') {\r\n elementData = new SVGFillStyleData(this, data, styleOb);\r\n } else if (data.ty === 'gf' || data.ty === 'gs') {\r\n var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;\r\n elementData = new GradientConstructor(this, data, styleOb);\r\n this.globalData.defs.appendChild(elementData.gf);\r\n if (elementData.maskId) {\r\n this.globalData.defs.appendChild(elementData.ms);\r\n this.globalData.defs.appendChild(elementData.of);\r\n pathElement.setAttribute('mask', 'url(' + locationHref + '#' + elementData.maskId + ')');\r\n }\r\n }\r\n\r\n if (data.ty === 'st' || data.ty === 'gs') {\r\n pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);\r\n pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);\r\n pathElement.setAttribute('fill-opacity', '0');\r\n if (data.lj === 1) {\r\n pathElement.setAttribute('stroke-miterlimit', data.ml);\r\n }\r\n }\r\n\r\n if (data.r === 2) {\r\n pathElement.setAttribute('fill-rule', 'evenodd');\r\n }\r\n\r\n if (data.ln) {\r\n pathElement.setAttribute('id', data.ln);\r\n }\r\n if (data.cl) {\r\n pathElement.setAttribute('class', data.cl);\r\n }\r\n if (data.bm) {\r\n pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);\r\n }\r\n this.stylesList.push(styleOb);\r\n this.addToAnimatedContents(data, elementData);\r\n return elementData;\r\n};\r\n\r\nSVGShapeElement.prototype.createGroupElement = function (data) {\r\n var elementData = new ShapeGroupData();\r\n if (data.ln) {\r\n elementData.gr.setAttribute('id', data.ln);\r\n }\r\n if (data.cl) {\r\n elementData.gr.setAttribute('class', data.cl);\r\n }\r\n if (data.bm) {\r\n elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);\r\n }\r\n return elementData;\r\n};\r\n\r\nSVGShapeElement.prototype.createTransformElement = function (data, container) {\r\n var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);\r\n var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);\r\n this.addToAnimatedContents(data, elementData);\r\n return elementData;\r\n};\r\n\r\nSVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {\r\n var ty = 4;\r\n if (data.ty === 'rc') {\r\n ty = 5;\r\n } else if (data.ty === 'el') {\r\n ty = 6;\r\n } else if (data.ty === 'sr') {\r\n ty = 7;\r\n }\r\n var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);\r\n var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);\r\n this.shapes.push(elementData);\r\n this.addShapeToModifiers(elementData);\r\n this.addToAnimatedContents(data, elementData);\r\n return elementData;\r\n};\r\n\r\nSVGShapeElement.prototype.addToAnimatedContents = function (data, element) {\r\n var i = 0;\r\n var len = this.animatedContents.length;\r\n while (i < len) {\r\n if (this.animatedContents[i].element === element) {\r\n return;\r\n }\r\n i += 1;\r\n }\r\n this.animatedContents.push({\r\n fn: SVGElementsRenderer.createRenderFunction(data),\r\n element: element,\r\n data: data,\r\n });\r\n};\r\n\r\nSVGShapeElement.prototype.setElementStyles = function (elementData) {\r\n var arr = elementData.styles;\r\n var j;\r\n var jLen = this.stylesList.length;\r\n for (j = 0; j < jLen; j += 1) {\r\n if (!this.stylesList[j].closed) {\r\n arr.push(this.stylesList[j]);\r\n }\r\n }\r\n};\r\n\r\nSVGShapeElement.prototype.reloadShapes = function () {\r\n this._isFirstFrame = true;\r\n var i;\r\n var len = this.itemsData.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.prevViewData[i] = this.itemsData[i];\r\n }\r\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);\r\n this.filterUniqueShapes();\r\n len = this.dynamicProperties.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.dynamicProperties[i].getValue();\r\n }\r\n this.renderModifiers();\r\n};\r\n\r\nSVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {\r\n var ownTransformers = [].concat(transformers);\r\n var i;\r\n var len = arr.length - 1;\r\n var j;\r\n var jLen;\r\n var ownStyles = [];\r\n var ownModifiers = [];\r\n var currentTransform;\r\n var modifier;\r\n var processedPos;\r\n for (i = len; i >= 0; i -= 1) {\r\n processedPos = this.searchProcessedElement(arr[i]);\r\n if (!processedPos) {\r\n arr[i]._render = render;\r\n } else {\r\n itemsData[i] = prevViewData[processedPos - 1];\r\n }\r\n if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createStyleElement(arr[i], level);\r\n } else {\r\n itemsData[i].style.closed = false;\r\n }\r\n if (arr[i]._render) {\r\n if (itemsData[i].style.pElem.parentNode !== container) {\r\n container.appendChild(itemsData[i].style.pElem);\r\n }\r\n }\r\n ownStyles.push(itemsData[i].style);\r\n } else if (arr[i].ty === 'gr') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createGroupElement(arr[i]);\r\n } else {\r\n jLen = itemsData[i].it.length;\r\n for (j = 0; j < jLen; j += 1) {\r\n itemsData[i].prevViewData[j] = itemsData[i].it[j];\r\n }\r\n }\r\n this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);\r\n if (arr[i]._render) {\r\n if (itemsData[i].gr.parentNode !== container) {\r\n container.appendChild(itemsData[i].gr);\r\n }\r\n }\r\n } else if (arr[i].ty === 'tr') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createTransformElement(arr[i], container);\r\n }\r\n currentTransform = itemsData[i].transform;\r\n ownTransformers.push(currentTransform);\r\n } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);\r\n }\r\n this.setElementStyles(itemsData[i]);\r\n } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {\r\n if (!processedPos) {\r\n modifier = ShapeModifiers.getModifier(arr[i].ty);\r\n modifier.init(this, arr[i]);\r\n itemsData[i] = modifier;\r\n this.shapeModifiers.push(modifier);\r\n } else {\r\n modifier = itemsData[i];\r\n modifier.closed = false;\r\n }\r\n ownModifiers.push(modifier);\r\n } else if (arr[i].ty === 'rp') {\r\n if (!processedPos) {\r\n modifier = ShapeModifiers.getModifier(arr[i].ty);\r\n itemsData[i] = modifier;\r\n modifier.init(this, arr, i, itemsData);\r\n this.shapeModifiers.push(modifier);\r\n render = false;\r\n } else {\r\n modifier = itemsData[i];\r\n modifier.closed = true;\r\n }\r\n ownModifiers.push(modifier);\r\n }\r\n this.addProcessedElement(arr[i], i + 1);\r\n }\r\n len = ownStyles.length;\r\n for (i = 0; i < len; i += 1) {\r\n ownStyles[i].closed = true;\r\n }\r\n len = ownModifiers.length;\r\n for (i = 0; i < len; i += 1) {\r\n ownModifiers[i].closed = true;\r\n }\r\n};\r\n\r\nSVGShapeElement.prototype.renderInnerContent = function () {\r\n this.renderModifiers();\r\n var i;\r\n var len = this.stylesList.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.stylesList[i].reset();\r\n }\r\n this.renderShape();\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.stylesList[i]._mdf || this._isFirstFrame) {\r\n if (this.stylesList[i].msElem) {\r\n this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d);\r\n // Adding M0 0 fixes same mask bug on all browsers\r\n this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;\r\n }\r\n this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');\r\n }\r\n }\r\n};\r\n\r\nSVGShapeElement.prototype.renderShape = function () {\r\n var i;\r\n var len = this.animatedContents.length;\r\n var animatedContent;\r\n for (i = 0; i < len; i += 1) {\r\n animatedContent = this.animatedContents[i];\r\n if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {\r\n animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);\r\n }\r\n }\r\n};\r\n\r\nSVGShapeElement.prototype.destroy = function () {\r\n this.destroyBaseElement();\r\n this.shapesData = null;\r\n this.itemsData = null;\r\n};\r\n\r\n/* global createNS */\r\n\r\nfunction SVGTintFilter(filter, filterManager) {\r\n this.filterManager = filterManager;\r\n var feColorMatrix = createNS('feColorMatrix');\r\n feColorMatrix.setAttribute('type', 'matrix');\r\n feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');\r\n feColorMatrix.setAttribute('values', '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0');\r\n feColorMatrix.setAttribute('result', 'f1');\r\n filter.appendChild(feColorMatrix);\r\n feColorMatrix = createNS('feColorMatrix');\r\n feColorMatrix.setAttribute('type', 'matrix');\r\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\r\n feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');\r\n feColorMatrix.setAttribute('result', 'f2');\r\n filter.appendChild(feColorMatrix);\r\n this.matrixFilter = feColorMatrix;\r\n if (filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k) {\r\n var feMerge = createNS('feMerge');\r\n filter.appendChild(feMerge);\r\n var feMergeNode;\r\n feMergeNode = createNS('feMergeNode');\r\n feMergeNode.setAttribute('in', 'SourceGraphic');\r\n feMerge.appendChild(feMergeNode);\r\n feMergeNode = createNS('feMergeNode');\r\n feMergeNode.setAttribute('in', 'f2');\r\n feMerge.appendChild(feMergeNode);\r\n }\r\n}\r\n\r\nSVGTintFilter.prototype.renderFrame = function (forceRender) {\r\n if (forceRender || this.filterManager._mdf) {\r\n var colorBlack = this.filterManager.effectElements[0].p.v;\r\n var colorWhite = this.filterManager.effectElements[1].p.v;\r\n var opacity = this.filterManager.effectElements[2].p.v / 100;\r\n this.matrixFilter.setAttribute('values', (colorWhite[0] - colorBlack[0]) + ' 0 0 0 ' + colorBlack[0] + ' ' + (colorWhite[1] - colorBlack[1]) + ' 0 0 0 ' + colorBlack[1] + ' ' + (colorWhite[2] - colorBlack[2]) + ' 0 0 0 ' + colorBlack[2] + ' 0 0 0 ' + opacity + ' 0');\r\n }\r\n};\r\n\r\n/* global createNS */\r\n\r\nfunction SVGFillFilter(filter, filterManager) {\r\n this.filterManager = filterManager;\r\n var feColorMatrix = createNS('feColorMatrix');\r\n feColorMatrix.setAttribute('type', 'matrix');\r\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\r\n feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');\r\n filter.appendChild(feColorMatrix);\r\n this.matrixFilter = feColorMatrix;\r\n}\r\nSVGFillFilter.prototype.renderFrame = function (forceRender) {\r\n if (forceRender || this.filterManager._mdf) {\r\n var color = this.filterManager.effectElements[2].p.v;\r\n var opacity = this.filterManager.effectElements[6].p.v;\r\n this.matrixFilter.setAttribute('values', '0 0 0 0 ' + color[0] + ' 0 0 0 0 ' + color[1] + ' 0 0 0 0 ' + color[2] + ' 0 0 0 ' + opacity + ' 0');\r\n }\r\n};\r\n\r\n/* global createNS */\r\n\r\nfunction SVGGaussianBlurEffect(filter, filterManager) {\r\n // Outset the filter region by 100% on all sides to accommodate blur expansion.\r\n filter.setAttribute('x', '-100%');\r\n filter.setAttribute('y', '-100%');\r\n filter.setAttribute('width', '300%');\r\n filter.setAttribute('height', '300%');\r\n\r\n this.filterManager = filterManager;\r\n var feGaussianBlur = createNS('feGaussianBlur');\r\n filter.appendChild(feGaussianBlur);\r\n this.feGaussianBlur = feGaussianBlur;\r\n}\r\n\r\nSVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {\r\n if (forceRender || this.filterManager._mdf) {\r\n // Empirical value, matching AE's blur appearance.\r\n var kBlurrinessToSigma = 0.3;\r\n var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma;\r\n\r\n // Dimensions mapping:\r\n //\r\n // 1 -> horizontal & vertical\r\n // 2 -> horizontal only\r\n // 3 -> vertical only\r\n //\r\n var dimensions = this.filterManager.effectElements[1].p.v;\r\n var sigmaX = (dimensions == 3) ? 0 : sigma; // eslint-disable-line eqeqeq\r\n var sigmaY = (dimensions == 2) ? 0 : sigma; // eslint-disable-line eqeqeq\r\n\r\n this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY);\r\n\r\n // Repeat edges mapping:\r\n //\r\n // 0 -> off -> duplicate\r\n // 1 -> on -> wrap\r\n var edgeMode = (this.filterManager.effectElements[2].p.v == 1) ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq\r\n this.feGaussianBlur.setAttribute('edgeMode', edgeMode);\r\n }\r\n};\r\n\r\n/* global createNS, createElementID, locationHref, bmFloor */\r\n\r\nfunction SVGStrokeEffect(elem, filterManager) {\r\n this.initialized = false;\r\n this.filterManager = filterManager;\r\n this.elem = elem;\r\n this.paths = [];\r\n}\r\n\r\nSVGStrokeEffect.prototype.initialize = function () {\r\n var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;\r\n var path;\r\n var groupPath;\r\n var i;\r\n var len;\r\n if (this.filterManager.effectElements[1].p.v === 1) {\r\n len = this.elem.maskManager.masksProperties.length;\r\n i = 0;\r\n } else {\r\n i = this.filterManager.effectElements[0].p.v - 1;\r\n len = i + 1;\r\n }\r\n groupPath = createNS('g');\r\n groupPath.setAttribute('fill', 'none');\r\n groupPath.setAttribute('stroke-linecap', 'round');\r\n groupPath.setAttribute('stroke-dashoffset', 1);\r\n for (i; i < len; i += 1) {\r\n path = createNS('path');\r\n groupPath.appendChild(path);\r\n this.paths.push({ p: path, m: i });\r\n }\r\n if (this.filterManager.effectElements[10].p.v === 3) {\r\n var mask = createNS('mask');\r\n var id = createElementID();\r\n mask.setAttribute('id', id);\r\n mask.setAttribute('mask-type', 'alpha');\r\n mask.appendChild(groupPath);\r\n this.elem.globalData.defs.appendChild(mask);\r\n var g = createNS('g');\r\n g.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');\r\n while (elemChildren[0]) {\r\n g.appendChild(elemChildren[0]);\r\n }\r\n this.elem.layerElement.appendChild(g);\r\n this.masker = mask;\r\n groupPath.setAttribute('stroke', '#fff');\r\n } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {\r\n if (this.filterManager.effectElements[10].p.v === 2) {\r\n elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;\r\n while (elemChildren.length) {\r\n this.elem.layerElement.removeChild(elemChildren[0]);\r\n }\r\n }\r\n this.elem.layerElement.appendChild(groupPath);\r\n this.elem.layerElement.removeAttribute('mask');\r\n groupPath.setAttribute('stroke', '#fff');\r\n }\r\n this.initialized = true;\r\n this.pathMasker = groupPath;\r\n};\r\n\r\nSVGStrokeEffect.prototype.renderFrame = function (forceRender) {\r\n if (!this.initialized) {\r\n this.initialize();\r\n }\r\n var i;\r\n var len = this.paths.length;\r\n var mask;\r\n var path;\r\n for (i = 0; i < len; i += 1) {\r\n if (this.paths[i].m !== -1) {\r\n mask = this.elem.maskManager.viewData[this.paths[i].m];\r\n path = this.paths[i].p;\r\n if (forceRender || this.filterManager._mdf || mask.prop._mdf) {\r\n path.setAttribute('d', mask.lastPath);\r\n }\r\n if (forceRender || this.filterManager.effectElements[9].p._mdf || this.filterManager.effectElements[4].p._mdf || this.filterManager.effectElements[7].p._mdf || this.filterManager.effectElements[8].p._mdf || mask.prop._mdf) {\r\n var dasharrayValue;\r\n if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {\r\n var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;\r\n var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;\r\n var l = path.getTotalLength();\r\n dasharrayValue = '0 0 0 ' + l * s + ' ';\r\n var lineLength = l * (e - s);\r\n var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;\r\n var units = Math.floor(lineLength / segment);\r\n var j;\r\n for (j = 0; j < units; j += 1) {\r\n dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';\r\n }\r\n dasharrayValue += '0 ' + l * 10 + ' 0 0';\r\n } else {\r\n dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;\r\n }\r\n path.setAttribute('stroke-dasharray', dasharrayValue);\r\n }\r\n }\r\n }\r\n if (forceRender || this.filterManager.effectElements[4].p._mdf) {\r\n this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);\r\n }\r\n\r\n if (forceRender || this.filterManager.effectElements[6].p._mdf) {\r\n this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);\r\n }\r\n if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {\r\n if (forceRender || this.filterManager.effectElements[3].p._mdf) {\r\n var color = this.filterManager.effectElements[3].p.v;\r\n this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');\r\n }\r\n }\r\n};\r\n\r\n/* global createNS */\r\n\r\nfunction SVGTritoneFilter(filter, filterManager) {\r\n this.filterManager = filterManager;\r\n var feColorMatrix = createNS('feColorMatrix');\r\n feColorMatrix.setAttribute('type', 'matrix');\r\n feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');\r\n feColorMatrix.setAttribute('values', '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0');\r\n feColorMatrix.setAttribute('result', 'f1');\r\n filter.appendChild(feColorMatrix);\r\n var feComponentTransfer = createNS('feComponentTransfer');\r\n feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\r\n filter.appendChild(feComponentTransfer);\r\n this.matrixFilter = feComponentTransfer;\r\n var feFuncR = createNS('feFuncR');\r\n feFuncR.setAttribute('type', 'table');\r\n feComponentTransfer.appendChild(feFuncR);\r\n this.feFuncR = feFuncR;\r\n var feFuncG = createNS('feFuncG');\r\n feFuncG.setAttribute('type', 'table');\r\n feComponentTransfer.appendChild(feFuncG);\r\n this.feFuncG = feFuncG;\r\n var feFuncB = createNS('feFuncB');\r\n feFuncB.setAttribute('type', 'table');\r\n feComponentTransfer.appendChild(feFuncB);\r\n this.feFuncB = feFuncB;\r\n}\r\n\r\nSVGTritoneFilter.prototype.renderFrame = function (forceRender) {\r\n if (forceRender || this.filterManager._mdf) {\r\n var color1 = this.filterManager.effectElements[0].p.v;\r\n var color2 = this.filterManager.effectElements[1].p.v;\r\n var color3 = this.filterManager.effectElements[2].p.v;\r\n var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];\r\n var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];\r\n var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];\r\n this.feFuncR.setAttribute('tableValues', tableR);\r\n this.feFuncG.setAttribute('tableValues', tableG);\r\n this.feFuncB.setAttribute('tableValues', tableB);\r\n // var opacity = this.filterManager.effectElements[2].p.v/100;\r\n // this.matrixFilter.setAttribute('values',(colorWhite[0]- colorBlack[0])+' 0 0 0 '+ colorBlack[0] +' '+ (colorWhite[1]- colorBlack[1]) +' 0 0 0 '+ colorBlack[1] +' '+ (colorWhite[2]- colorBlack[2]) +' 0 0 0 '+ colorBlack[2] +' 0 0 0 ' + opacity + ' 0');\r\n }\r\n};\r\n\r\n/* global createNS */\r\n\r\nfunction SVGProLevelsFilter(filter, filterManager) {\r\n this.filterManager = filterManager;\r\n var effectElements = this.filterManager.effectElements;\r\n var feComponentTransfer = createNS('feComponentTransfer');\r\n\r\n if (effectElements[10].p.k || effectElements[10].p.v !== 0 || effectElements[11].p.k || effectElements[11].p.v !== 1 || effectElements[12].p.k || effectElements[12].p.v !== 1 || effectElements[13].p.k || effectElements[13].p.v !== 0 || effectElements[14].p.k || effectElements[14].p.v !== 1) {\r\n this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);\r\n }\r\n if (effectElements[17].p.k || effectElements[17].p.v !== 0 || effectElements[18].p.k || effectElements[18].p.v !== 1 || effectElements[19].p.k || effectElements[19].p.v !== 1 || effectElements[20].p.k || effectElements[20].p.v !== 0 || effectElements[21].p.k || effectElements[21].p.v !== 1) {\r\n this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);\r\n }\r\n if (effectElements[24].p.k || effectElements[24].p.v !== 0 || effectElements[25].p.k || effectElements[25].p.v !== 1 || effectElements[26].p.k || effectElements[26].p.v !== 1 || effectElements[27].p.k || effectElements[27].p.v !== 0 || effectElements[28].p.k || effectElements[28].p.v !== 1) {\r\n this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);\r\n }\r\n if (effectElements[31].p.k || effectElements[31].p.v !== 0 || effectElements[32].p.k || effectElements[32].p.v !== 1 || effectElements[33].p.k || effectElements[33].p.v !== 1 || effectElements[34].p.k || effectElements[34].p.v !== 0 || effectElements[35].p.k || effectElements[35].p.v !== 1) {\r\n this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);\r\n }\r\n\r\n if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {\r\n feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\r\n filter.appendChild(feComponentTransfer);\r\n feComponentTransfer = createNS('feComponentTransfer');\r\n }\r\n\r\n if (effectElements[3].p.k || effectElements[3].p.v !== 0 || effectElements[4].p.k || effectElements[4].p.v !== 1 || effectElements[5].p.k || effectElements[5].p.v !== 1 || effectElements[6].p.k || effectElements[6].p.v !== 0 || effectElements[7].p.k || effectElements[7].p.v !== 1) {\r\n feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\r\n filter.appendChild(feComponentTransfer);\r\n this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);\r\n this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);\r\n this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);\r\n }\r\n}\r\n\r\nSVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {\r\n var feFunc = createNS(type);\r\n feFunc.setAttribute('type', 'table');\r\n feComponentTransfer.appendChild(feFunc);\r\n return feFunc;\r\n};\r\n\r\nSVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {\r\n var cnt = 0;\r\n var segments = 256;\r\n var perc;\r\n var min = Math.min(inputBlack, inputWhite);\r\n var max = Math.max(inputBlack, inputWhite);\r\n var table = Array.call(null, { length: segments });\r\n var colorValue;\r\n var pos = 0;\r\n var outputDelta = outputWhite - outputBlack;\r\n var inputDelta = inputWhite - inputBlack;\r\n while (cnt <= 256) {\r\n perc = cnt / 256;\r\n if (perc <= min) {\r\n colorValue = inputDelta < 0 ? outputWhite : outputBlack;\r\n } else if (perc >= max) {\r\n colorValue = inputDelta < 0 ? outputBlack : outputWhite;\r\n } else {\r\n colorValue = (outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma));\r\n }\r\n table[pos] = colorValue;\r\n pos += 1;\r\n cnt += 256 / (segments - 1);\r\n }\r\n return table.join(' ');\r\n};\r\n\r\nSVGProLevelsFilter.prototype.renderFrame = function (forceRender) {\r\n if (forceRender || this.filterManager._mdf) {\r\n var val;\r\n var effectElements = this.filterManager.effectElements;\r\n if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {\r\n val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);\r\n this.feFuncRComposed.setAttribute('tableValues', val);\r\n this.feFuncGComposed.setAttribute('tableValues', val);\r\n this.feFuncBComposed.setAttribute('tableValues', val);\r\n }\r\n\r\n if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {\r\n val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);\r\n this.feFuncR.setAttribute('tableValues', val);\r\n }\r\n\r\n if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {\r\n val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);\r\n this.feFuncG.setAttribute('tableValues', val);\r\n }\r\n\r\n if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {\r\n val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);\r\n this.feFuncB.setAttribute('tableValues', val);\r\n }\r\n\r\n if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {\r\n val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);\r\n this.feFuncA.setAttribute('tableValues', val);\r\n }\r\n }\r\n};\r\n\r\n/* global createNS, rgbToHex, degToRads */\r\n\r\nfunction SVGDropShadowEffect(filter, filterManager) {\r\n var filterSize = filterManager.container.globalData.renderConfig.filterSize;\r\n filter.setAttribute('x', filterSize.x);\r\n filter.setAttribute('y', filterSize.y);\r\n filter.setAttribute('width', filterSize.width);\r\n filter.setAttribute('height', filterSize.height);\r\n this.filterManager = filterManager;\r\n\r\n var feGaussianBlur = createNS('feGaussianBlur');\r\n feGaussianBlur.setAttribute('in', 'SourceAlpha');\r\n feGaussianBlur.setAttribute('result', 'drop_shadow_1');\r\n feGaussianBlur.setAttribute('stdDeviation', '0');\r\n this.feGaussianBlur = feGaussianBlur;\r\n filter.appendChild(feGaussianBlur);\r\n\r\n var feOffset = createNS('feOffset');\r\n feOffset.setAttribute('dx', '25');\r\n feOffset.setAttribute('dy', '0');\r\n feOffset.setAttribute('in', 'drop_shadow_1');\r\n feOffset.setAttribute('result', 'drop_shadow_2');\r\n this.feOffset = feOffset;\r\n filter.appendChild(feOffset);\r\n var feFlood = createNS('feFlood');\r\n feFlood.setAttribute('flood-color', '#00ff00');\r\n feFlood.setAttribute('flood-opacity', '1');\r\n feFlood.setAttribute('result', 'drop_shadow_3');\r\n this.feFlood = feFlood;\r\n filter.appendChild(feFlood);\r\n\r\n var feComposite = createNS('feComposite');\r\n feComposite.setAttribute('in', 'drop_shadow_3');\r\n feComposite.setAttribute('in2', 'drop_shadow_2');\r\n feComposite.setAttribute('operator', 'in');\r\n feComposite.setAttribute('result', 'drop_shadow_4');\r\n filter.appendChild(feComposite);\r\n\r\n var feMerge = createNS('feMerge');\r\n filter.appendChild(feMerge);\r\n var feMergeNode;\r\n feMergeNode = createNS('feMergeNode');\r\n feMerge.appendChild(feMergeNode);\r\n feMergeNode = createNS('feMergeNode');\r\n feMergeNode.setAttribute('in', 'SourceGraphic');\r\n this.feMergeNode = feMergeNode;\r\n this.feMerge = feMerge;\r\n this.originalNodeAdded = false;\r\n feMerge.appendChild(feMergeNode);\r\n}\r\n\r\nSVGDropShadowEffect.prototype.renderFrame = function (forceRender) {\r\n if (forceRender || this.filterManager._mdf) {\r\n if (forceRender || this.filterManager.effectElements[4].p._mdf) {\r\n this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);\r\n }\r\n if (forceRender || this.filterManager.effectElements[0].p._mdf) {\r\n var col = this.filterManager.effectElements[0].p.v;\r\n this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));\r\n }\r\n if (forceRender || this.filterManager.effectElements[1].p._mdf) {\r\n this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);\r\n }\r\n if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {\r\n var distance = this.filterManager.effectElements[3].p.v;\r\n var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;\r\n var x = distance * Math.cos(angle);\r\n var y = distance * Math.sin(angle);\r\n this.feOffset.setAttribute('dx', x);\r\n this.feOffset.setAttribute('dy', y);\r\n }\r\n /* if(forceRender || this.filterManager.effectElements[5].p._mdf){\r\n if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {\r\n this.feMerge.removeChild(this.feMergeNode);\r\n this.originalNodeAdded = false;\r\n } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {\r\n this.feMerge.appendChild(this.feMergeNode);\r\n this.originalNodeAdded = true;\r\n }\r\n } */\r\n }\r\n};\r\n\r\n/* global createElementID, createNS */\r\n\r\nvar _svgMatteSymbols = [];\r\n\r\nfunction SVGMatte3Effect(filterElem, filterManager, elem) {\r\n this.initialized = false;\r\n this.filterManager = filterManager;\r\n this.filterElem = filterElem;\r\n this.elem = elem;\r\n elem.matteElement = createNS('g');\r\n elem.matteElement.appendChild(elem.layerElement);\r\n elem.matteElement.appendChild(elem.transformedElement);\r\n elem.baseElement = elem.matteElement;\r\n}\r\n\r\nSVGMatte3Effect.prototype.findSymbol = function (mask) {\r\n var i = 0;\r\n var len = _svgMatteSymbols.length;\r\n while (i < len) {\r\n if (_svgMatteSymbols[i] === mask) {\r\n return _svgMatteSymbols[i];\r\n }\r\n i += 1;\r\n }\r\n return null;\r\n};\r\n\r\nSVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {\r\n var parentNode = mask.layerElement.parentNode;\r\n if (!parentNode) {\r\n return;\r\n }\r\n var children = parentNode.children;\r\n var i = 0;\r\n var len = children.length;\r\n while (i < len) {\r\n if (children[i] === mask.layerElement) {\r\n break;\r\n }\r\n i += 1;\r\n }\r\n var nextChild;\r\n if (i <= len - 2) {\r\n nextChild = children[i + 1];\r\n }\r\n var useElem = createNS('use');\r\n useElem.setAttribute('href', '#' + symbolId);\r\n if (nextChild) {\r\n parentNode.insertBefore(useElem, nextChild);\r\n } else {\r\n parentNode.appendChild(useElem);\r\n }\r\n};\r\n\r\nSVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {\r\n if (!this.findSymbol(mask)) {\r\n var symbolId = createElementID();\r\n var masker = createNS('mask');\r\n masker.setAttribute('id', mask.layerId);\r\n masker.setAttribute('mask-type', 'alpha');\r\n _svgMatteSymbols.push(mask);\r\n var defs = elem.globalData.defs;\r\n defs.appendChild(masker);\r\n var symbol = createNS('symbol');\r\n symbol.setAttribute('id', symbolId);\r\n this.replaceInParent(mask, symbolId);\r\n symbol.appendChild(mask.layerElement);\r\n defs.appendChild(symbol);\r\n var useElem = createNS('use');\r\n useElem.setAttribute('href', '#' + symbolId);\r\n masker.appendChild(useElem);\r\n mask.data.hd = false;\r\n mask.show();\r\n }\r\n elem.setMatte(mask.layerId);\r\n};\r\n\r\nSVGMatte3Effect.prototype.initialize = function () {\r\n var ind = this.filterManager.effectElements[0].p.v;\r\n var elements = this.elem.comp.elements;\r\n var i = 0;\r\n var len = elements.length;\r\n while (i < len) {\r\n if (elements[i] && elements[i].data.ind === ind) {\r\n this.setElementAsMask(this.elem, elements[i]);\r\n }\r\n i += 1;\r\n }\r\n this.initialized = true;\r\n};\r\n\r\nSVGMatte3Effect.prototype.renderFrame = function () {\r\n if (!this.initialized) {\r\n this.initialize();\r\n }\r\n};\r\n\r\n/* global createElementID, filtersFactory, SVGTintFilter, SVGFillFilter, SVGStrokeEffect, SVGTritoneFilter,\r\nSVGProLevelsFilter, SVGDropShadowEffect, SVGMatte3Effect, SVGGaussianBlurEffect, locationHref */\r\n\r\nfunction SVGEffects(elem) {\r\n var i;\r\n var len = elem.data.ef ? elem.data.ef.length : 0;\r\n var filId = createElementID();\r\n var fil = filtersFactory.createFilter(filId, true);\r\n var count = 0;\r\n this.filters = [];\r\n var filterManager;\r\n for (i = 0; i < len; i += 1) {\r\n filterManager = null;\r\n if (elem.data.ef[i].ty === 20) {\r\n count += 1;\r\n filterManager = new SVGTintFilter(fil, elem.effectsManager.effectElements[i]);\r\n } else if (elem.data.ef[i].ty === 21) {\r\n count += 1;\r\n filterManager = new SVGFillFilter(fil, elem.effectsManager.effectElements[i]);\r\n } else if (elem.data.ef[i].ty === 22) {\r\n filterManager = new SVGStrokeEffect(elem, elem.effectsManager.effectElements[i]);\r\n } else if (elem.data.ef[i].ty === 23) {\r\n count += 1;\r\n filterManager = new SVGTritoneFilter(fil, elem.effectsManager.effectElements[i]);\r\n } else if (elem.data.ef[i].ty === 24) {\r\n count += 1;\r\n filterManager = new SVGProLevelsFilter(fil, elem.effectsManager.effectElements[i]);\r\n } else if (elem.data.ef[i].ty === 25) {\r\n count += 1;\r\n filterManager = new SVGDropShadowEffect(fil, elem.effectsManager.effectElements[i]);\r\n } else if (elem.data.ef[i].ty === 28) {\r\n // count += 1;\r\n filterManager = new SVGMatte3Effect(fil, elem.effectsManager.effectElements[i], elem);\r\n } else if (elem.data.ef[i].ty === 29) {\r\n count += 1;\r\n filterManager = new SVGGaussianBlurEffect(fil, elem.effectsManager.effectElements[i]);\r\n }\r\n if (filterManager) {\r\n this.filters.push(filterManager);\r\n }\r\n }\r\n if (count) {\r\n elem.globalData.defs.appendChild(fil);\r\n elem.layerElement.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');\r\n }\r\n if (this.filters.length) {\r\n elem.addRenderableComponent(this);\r\n }\r\n}\r\n\r\nSVGEffects.prototype.renderFrame = function (_isFirstFrame) {\r\n var i;\r\n var len = this.filters.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.filters[i].renderFrame(_isFirstFrame);\r\n }\r\n};\r\n\r\n/* global Matrix, createTypedArray */\r\n\r\nfunction CVContextData() {\r\n this.saved = [];\r\n this.cArrPos = 0;\r\n this.cTr = new Matrix();\r\n this.cO = 1;\r\n var i;\r\n var len = 15;\r\n this.savedOp = createTypedArray('float32', len);\r\n for (i = 0; i < len; i += 1) {\r\n this.saved[i] = createTypedArray('float32', 16);\r\n }\r\n this._length = len;\r\n}\r\n\r\nCVContextData.prototype.duplicate = function () {\r\n var newLength = this._length * 2;\r\n var currentSavedOp = this.savedOp;\r\n this.savedOp = createTypedArray('float32', newLength);\r\n this.savedOp.set(currentSavedOp);\r\n var i = 0;\r\n for (i = this._length; i < newLength; i += 1) {\r\n this.saved[i] = createTypedArray('float32', 16);\r\n }\r\n this._length = newLength;\r\n};\r\n\r\nCVContextData.prototype.reset = function () {\r\n this.cArrPos = 0;\r\n this.cTr.reset();\r\n this.cO = 1;\r\n};\r\n\r\n/* global CVEffects, getBlendMode, CVMaskElement, Matrix */\r\n\r\nfunction CVBaseElement() {\r\n}\r\n\r\nCVBaseElement.prototype = {\r\n createElements: function () {},\r\n initRendererElement: function () {},\r\n createContainerElements: function () {\r\n this.canvasContext = this.globalData.canvasContext;\r\n this.renderableEffectsManager = new CVEffects(this);\r\n },\r\n createContent: function () {},\r\n setBlendMode: function () {\r\n var globalData = this.globalData;\r\n if (globalData.blendMode !== this.data.bm) {\r\n globalData.blendMode = this.data.bm;\r\n var blendModeValue = getBlendMode(this.data.bm);\r\n globalData.canvasContext.globalCompositeOperation = blendModeValue;\r\n }\r\n },\r\n createRenderableComponents: function () {\r\n this.maskManager = new CVMaskElement(this.data, this);\r\n },\r\n hideElement: function () {\r\n if (!this.hidden && (!this.isInRange || this.isTransparent)) {\r\n this.hidden = true;\r\n }\r\n },\r\n showElement: function () {\r\n if (this.isInRange && !this.isTransparent) {\r\n this.hidden = false;\r\n this._isFirstFrame = true;\r\n this.maskManager._isFirstFrame = true;\r\n }\r\n },\r\n renderFrame: function () {\r\n if (this.hidden || this.data.hd) {\r\n return;\r\n }\r\n this.renderTransform();\r\n this.renderRenderable();\r\n this.setBlendMode();\r\n var forceRealStack = this.data.ty === 0;\r\n this.globalData.renderer.save(forceRealStack);\r\n this.globalData.renderer.ctxTransform(this.finalTransform.mat.props);\r\n this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v);\r\n this.renderInnerContent();\r\n this.globalData.renderer.restore(forceRealStack);\r\n if (this.maskManager.hasMasks) {\r\n this.globalData.renderer.restore(true);\r\n }\r\n if (this._isFirstFrame) {\r\n this._isFirstFrame = false;\r\n }\r\n },\r\n destroy: function () {\r\n this.canvasContext = null;\r\n this.data = null;\r\n this.globalData = null;\r\n this.maskManager.destroy();\r\n },\r\n mHelper: new Matrix(),\r\n};\r\nCVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;\r\nCVBaseElement.prototype.show = CVBaseElement.prototype.showElement;\r\n\r\n/* global extendPrototype, BaseElement, TransformElement, CVBaseElement,HierarchyElement, FrameElement,\r\nRenderableElement, SVGShapeElement, IImageElement, createTag */\r\n\r\nfunction CVImageElement(data, globalData, comp) {\r\n this.assetData = globalData.getAssetData(data.refId);\r\n this.img = globalData.imageLoader.getAsset(this.assetData);\r\n this.initElement(data, globalData, comp);\r\n}\r\nextendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement);\r\n\r\nCVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement;\r\nCVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;\r\n\r\nCVImageElement.prototype.createContent = function () {\r\n if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) {\r\n var canvas = createTag('canvas');\r\n canvas.width = this.assetData.w;\r\n canvas.height = this.assetData.h;\r\n var ctx = canvas.getContext('2d');\r\n\r\n var imgW = this.img.width;\r\n var imgH = this.img.height;\r\n var imgRel = imgW / imgH;\r\n var canvasRel = this.assetData.w / this.assetData.h;\r\n var widthCrop;\r\n var heightCrop;\r\n var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio;\r\n if ((imgRel > canvasRel && par === 'xMidYMid slice') || (imgRel < canvasRel && par !== 'xMidYMid slice')) {\r\n heightCrop = imgH;\r\n widthCrop = heightCrop * canvasRel;\r\n } else {\r\n widthCrop = imgW;\r\n heightCrop = widthCrop / canvasRel;\r\n }\r\n ctx.drawImage(this.img, (imgW - widthCrop) / 2, (imgH - heightCrop) / 2, widthCrop, heightCrop, 0, 0, this.assetData.w, this.assetData.h);\r\n this.img = canvas;\r\n }\r\n};\r\n\r\nCVImageElement.prototype.renderInnerContent = function () {\r\n this.canvasContext.drawImage(this.img, 0, 0);\r\n};\r\n\r\nCVImageElement.prototype.destroy = function () {\r\n this.img = null;\r\n};\r\n\r\n/* global createSizedArray, PropertyFactory, extendPrototype, CanvasRenderer, ICompElement, CVBaseElement */\r\n\r\nfunction CVCompElement(data, globalData, comp) {\r\n this.completeLayers = false;\r\n this.layers = data.layers;\r\n this.pendingElements = [];\r\n this.elements = createSizedArray(this.layers.length);\r\n this.initElement(data, globalData, comp);\r\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };\r\n}\r\n\r\nextendPrototype([CanvasRenderer, ICompElement, CVBaseElement], CVCompElement);\r\n\r\nCVCompElement.prototype.renderInnerContent = function () {\r\n var ctx = this.canvasContext;\r\n ctx.beginPath();\r\n ctx.moveTo(0, 0);\r\n ctx.lineTo(this.data.w, 0);\r\n ctx.lineTo(this.data.w, this.data.h);\r\n ctx.lineTo(0, this.data.h);\r\n ctx.lineTo(0, 0);\r\n ctx.clip();\r\n var i;\r\n var len = this.layers.length;\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].renderFrame();\r\n }\r\n }\r\n};\r\n\r\nCVCompElement.prototype.destroy = function () {\r\n var i;\r\n var len = this.layers.length;\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (this.elements[i]) {\r\n this.elements[i].destroy();\r\n }\r\n }\r\n this.layers = null;\r\n this.elements = null;\r\n};\r\n\r\n/* global createSizedArray, ShapePropertyFactory, MaskElement */\r\n\r\nfunction CVMaskElement(data, element) {\r\n this.data = data;\r\n this.element = element;\r\n this.masksProperties = this.data.masksProperties || [];\r\n this.viewData = createSizedArray(this.masksProperties.length);\r\n var i;\r\n var len = this.masksProperties.length;\r\n var hasMasks = false;\r\n for (i = 0; i < len; i += 1) {\r\n if (this.masksProperties[i].mode !== 'n') {\r\n hasMasks = true;\r\n }\r\n this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3);\r\n }\r\n this.hasMasks = hasMasks;\r\n if (hasMasks) {\r\n this.element.addRenderableComponent(this);\r\n }\r\n}\r\n\r\nCVMaskElement.prototype.renderFrame = function () {\r\n if (!this.hasMasks) {\r\n return;\r\n }\r\n var transform = this.element.finalTransform.mat;\r\n var ctx = this.element.canvasContext;\r\n var i;\r\n var len = this.masksProperties.length;\r\n var pt;\r\n var pts;\r\n var data;\r\n ctx.beginPath();\r\n for (i = 0; i < len; i += 1) {\r\n if (this.masksProperties[i].mode !== 'n') {\r\n if (this.masksProperties[i].inv) {\r\n ctx.moveTo(0, 0);\r\n ctx.lineTo(this.element.globalData.compSize.w, 0);\r\n ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h);\r\n ctx.lineTo(0, this.element.globalData.compSize.h);\r\n ctx.lineTo(0, 0);\r\n }\r\n data = this.viewData[i].v;\r\n pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0);\r\n ctx.moveTo(pt[0], pt[1]);\r\n var j;\r\n var jLen = data._length;\r\n for (j = 1; j < jLen; j += 1) {\r\n pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);\r\n ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);\r\n }\r\n pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);\r\n ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);\r\n }\r\n }\r\n this.element.globalData.renderer.save(true);\r\n ctx.clip();\r\n};\r\n\r\nCVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;\r\n\r\nCVMaskElement.prototype.destroy = function () {\r\n this.element = null;\r\n};\r\n\r\n/* global ShapeTransformManager, extendPrototype, BaseElement, TransformElement, CVBaseElement, IShapeElement,\r\nHierarchyElement, FrameElement, RenderableElement, RenderableDOMElement, PropertyFactory, degToRads, GradientProperty,\r\nDashProperty, TransformPropertyFactory, CVShapeData, ShapeModifiers, bmFloor, lineCapEnum, lineJoinEnum */\r\n\r\nfunction CVShapeElement(data, globalData, comp) {\r\n this.shapes = [];\r\n this.shapesData = data.shapes;\r\n this.stylesList = [];\r\n this.itemsData = [];\r\n this.prevViewData = [];\r\n this.shapeModifiers = [];\r\n this.processedElements = [];\r\n this.transformsManager = new ShapeTransformManager();\r\n this.initElement(data, globalData, comp);\r\n}\r\n\r\nextendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement);\r\n\r\nCVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;\r\n\r\nCVShapeElement.prototype.transformHelper = { opacity: 1, _opMdf: false };\r\n\r\nCVShapeElement.prototype.dashResetter = [];\r\n\r\nCVShapeElement.prototype.createContent = function () {\r\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);\r\n};\r\n\r\nCVShapeElement.prototype.createStyleElement = function (data, transforms) {\r\n var styleElem = {\r\n data: data,\r\n type: data.ty,\r\n preTransforms: this.transformsManager.addTransformSequence(transforms),\r\n transforms: [],\r\n elements: [],\r\n closed: data.hd === true,\r\n };\r\n var elementData = {};\r\n if (data.ty === 'fl' || data.ty === 'st') {\r\n elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this);\r\n if (!elementData.c.k) {\r\n styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')';\r\n }\r\n } else if (data.ty === 'gf' || data.ty === 'gs') {\r\n elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this);\r\n elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this);\r\n elementData.h = PropertyFactory.getProp(this, data.h || { k: 0 }, 0, 0.01, this);\r\n elementData.a = PropertyFactory.getProp(this, data.a || { k: 0 }, 0, degToRads, this);\r\n elementData.g = new GradientProperty(this, data.g, this);\r\n }\r\n elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this);\r\n if (data.ty === 'st' || data.ty === 'gs') {\r\n styleElem.lc = lineCapEnum[data.lc || 2];\r\n styleElem.lj = lineJoinEnum[data.lj || 2];\r\n if (data.lj == 1) { // eslint-disable-line eqeqeq\r\n styleElem.ml = data.ml;\r\n }\r\n elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this);\r\n if (!elementData.w.k) {\r\n styleElem.wi = elementData.w.v;\r\n }\r\n if (data.d) {\r\n var d = new DashProperty(this, data.d, 'canvas', this);\r\n elementData.d = d;\r\n if (!elementData.d.k) {\r\n styleElem.da = elementData.d.dashArray;\r\n styleElem.do = elementData.d.dashoffset[0];\r\n }\r\n }\r\n } else {\r\n styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero';\r\n }\r\n this.stylesList.push(styleElem);\r\n elementData.style = styleElem;\r\n return elementData;\r\n};\r\n\r\nCVShapeElement.prototype.createGroupElement = function () {\r\n var elementData = {\r\n it: [],\r\n prevViewData: [],\r\n };\r\n return elementData;\r\n};\r\n\r\nCVShapeElement.prototype.createTransformElement = function (data) {\r\n var elementData = {\r\n transform: {\r\n opacity: 1,\r\n _opMdf: false,\r\n key: this.transformsManager.getNewKey(),\r\n op: PropertyFactory.getProp(this, data.o, 0, 0.01, this),\r\n mProps: TransformPropertyFactory.getTransformProperty(this, data, this),\r\n },\r\n };\r\n return elementData;\r\n};\r\n\r\nCVShapeElement.prototype.createShapeElement = function (data) {\r\n var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager);\r\n\r\n this.shapes.push(elementData);\r\n this.addShapeToModifiers(elementData);\r\n return elementData;\r\n};\r\n\r\nCVShapeElement.prototype.reloadShapes = function () {\r\n this._isFirstFrame = true;\r\n var i;\r\n var len = this.itemsData.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.prevViewData[i] = this.itemsData[i];\r\n }\r\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);\r\n len = this.dynamicProperties.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.dynamicProperties[i].getValue();\r\n }\r\n this.renderModifiers();\r\n this.transformsManager.processSequences(this._isFirstFrame);\r\n};\r\n\r\nCVShapeElement.prototype.addTransformToStyleList = function (transform) {\r\n var i;\r\n var len = this.stylesList.length;\r\n for (i = 0; i < len; i += 1) {\r\n if (!this.stylesList[i].closed) {\r\n this.stylesList[i].transforms.push(transform);\r\n }\r\n }\r\n};\r\n\r\nCVShapeElement.prototype.removeTransformFromStyleList = function () {\r\n var i;\r\n var len = this.stylesList.length;\r\n for (i = 0; i < len; i += 1) {\r\n if (!this.stylesList[i].closed) {\r\n this.stylesList[i].transforms.pop();\r\n }\r\n }\r\n};\r\n\r\nCVShapeElement.prototype.closeStyles = function (styles) {\r\n var i;\r\n var len = styles.length;\r\n for (i = 0; i < len; i += 1) {\r\n styles[i].closed = true;\r\n }\r\n};\r\n\r\nCVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) {\r\n var i;\r\n var len = arr.length - 1;\r\n var j;\r\n var jLen;\r\n var ownStyles = [];\r\n var ownModifiers = [];\r\n var processedPos;\r\n var modifier;\r\n var currentTransform;\r\n var ownTransforms = [].concat(transforms);\r\n for (i = len; i >= 0; i -= 1) {\r\n processedPos = this.searchProcessedElement(arr[i]);\r\n if (!processedPos) {\r\n arr[i]._shouldRender = shouldRender;\r\n } else {\r\n itemsData[i] = prevViewData[processedPos - 1];\r\n }\r\n if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createStyleElement(arr[i], ownTransforms);\r\n } else {\r\n itemsData[i].style.closed = false;\r\n }\r\n\r\n ownStyles.push(itemsData[i].style);\r\n } else if (arr[i].ty === 'gr') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createGroupElement(arr[i]);\r\n } else {\r\n jLen = itemsData[i].it.length;\r\n for (j = 0; j < jLen; j += 1) {\r\n itemsData[i].prevViewData[j] = itemsData[i].it[j];\r\n }\r\n }\r\n this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms);\r\n } else if (arr[i].ty === 'tr') {\r\n if (!processedPos) {\r\n currentTransform = this.createTransformElement(arr[i]);\r\n itemsData[i] = currentTransform;\r\n }\r\n ownTransforms.push(itemsData[i]);\r\n this.addTransformToStyleList(itemsData[i]);\r\n } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createShapeElement(arr[i]);\r\n }\r\n } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb') {\r\n if (!processedPos) {\r\n modifier = ShapeModifiers.getModifier(arr[i].ty);\r\n modifier.init(this, arr[i]);\r\n itemsData[i] = modifier;\r\n this.shapeModifiers.push(modifier);\r\n } else {\r\n modifier = itemsData[i];\r\n modifier.closed = false;\r\n }\r\n ownModifiers.push(modifier);\r\n } else if (arr[i].ty === 'rp') {\r\n if (!processedPos) {\r\n modifier = ShapeModifiers.getModifier(arr[i].ty);\r\n itemsData[i] = modifier;\r\n modifier.init(this, arr, i, itemsData);\r\n this.shapeModifiers.push(modifier);\r\n shouldRender = false;\r\n } else {\r\n modifier = itemsData[i];\r\n modifier.closed = true;\r\n }\r\n ownModifiers.push(modifier);\r\n }\r\n this.addProcessedElement(arr[i], i + 1);\r\n }\r\n this.removeTransformFromStyleList();\r\n this.closeStyles(ownStyles);\r\n len = ownModifiers.length;\r\n for (i = 0; i < len; i += 1) {\r\n ownModifiers[i].closed = true;\r\n }\r\n};\r\n\r\nCVShapeElement.prototype.renderInnerContent = function () {\r\n this.transformHelper.opacity = 1;\r\n this.transformHelper._opMdf = false;\r\n this.renderModifiers();\r\n this.transformsManager.processSequences(this._isFirstFrame);\r\n this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true);\r\n};\r\n\r\nCVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) {\r\n if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {\r\n groupTransform.opacity = parentTransform.opacity;\r\n groupTransform.opacity *= groupTransform.op.v;\r\n groupTransform._opMdf = true;\r\n }\r\n};\r\n\r\nCVShapeElement.prototype.drawLayer = function () {\r\n var i;\r\n var len = this.stylesList.length;\r\n var j;\r\n var jLen;\r\n var k;\r\n var kLen;\r\n var elems;\r\n var nodes;\r\n var renderer = this.globalData.renderer;\r\n var ctx = this.globalData.canvasContext;\r\n var type;\r\n var currentStyle;\r\n for (i = 0; i < len; i += 1) {\r\n currentStyle = this.stylesList[i];\r\n type = currentStyle.type;\r\n\r\n // Skipping style when\r\n // Stroke width equals 0\r\n // style should not be rendered (extra unused repeaters)\r\n // current opacity equals 0\r\n // global opacity equals 0\r\n if (!(((type === 'st' || type === 'gs') && currentStyle.wi === 0) || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) {\r\n renderer.save();\r\n elems = currentStyle.elements;\r\n if (type === 'st' || type === 'gs') {\r\n ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd;\r\n ctx.lineWidth = currentStyle.wi;\r\n ctx.lineCap = currentStyle.lc;\r\n ctx.lineJoin = currentStyle.lj;\r\n ctx.miterLimit = currentStyle.ml || 0;\r\n } else {\r\n ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd;\r\n }\r\n renderer.ctxOpacity(currentStyle.coOp);\r\n if (type !== 'st' && type !== 'gs') {\r\n ctx.beginPath();\r\n }\r\n renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props);\r\n jLen = elems.length;\r\n for (j = 0; j < jLen; j += 1) {\r\n if (type === 'st' || type === 'gs') {\r\n ctx.beginPath();\r\n if (currentStyle.da) {\r\n ctx.setLineDash(currentStyle.da);\r\n ctx.lineDashOffset = currentStyle.do;\r\n }\r\n }\r\n nodes = elems[j].trNodes;\r\n kLen = nodes.length;\r\n\r\n for (k = 0; k < kLen; k += 1) {\r\n if (nodes[k].t === 'm') {\r\n ctx.moveTo(nodes[k].p[0], nodes[k].p[1]);\r\n } else if (nodes[k].t === 'c') {\r\n ctx.bezierCurveTo(nodes[k].pts[0], nodes[k].pts[1], nodes[k].pts[2], nodes[k].pts[3], nodes[k].pts[4], nodes[k].pts[5]);\r\n } else {\r\n ctx.closePath();\r\n }\r\n }\r\n if (type === 'st' || type === 'gs') {\r\n ctx.stroke();\r\n if (currentStyle.da) {\r\n ctx.setLineDash(this.dashResetter);\r\n }\r\n }\r\n }\r\n if (type !== 'st' && type !== 'gs') {\r\n ctx.fill(currentStyle.r);\r\n }\r\n renderer.restore();\r\n }\r\n }\r\n};\r\n\r\nCVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) {\r\n var i;\r\n var len = items.length - 1;\r\n var groupTransform;\r\n groupTransform = parentTransform;\r\n for (i = len; i >= 0; i -= 1) {\r\n if (items[i].ty === 'tr') {\r\n groupTransform = data[i].transform;\r\n this.renderShapeTransform(parentTransform, groupTransform);\r\n } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') {\r\n this.renderPath(items[i], data[i]);\r\n } else if (items[i].ty === 'fl') {\r\n this.renderFill(items[i], data[i], groupTransform);\r\n } else if (items[i].ty === 'st') {\r\n this.renderStroke(items[i], data[i], groupTransform);\r\n } else if (items[i].ty === 'gf' || items[i].ty === 'gs') {\r\n this.renderGradientFill(items[i], data[i], groupTransform);\r\n } else if (items[i].ty === 'gr') {\r\n this.renderShape(groupTransform, items[i].it, data[i].it);\r\n } else if (items[i].ty === 'tm') {\r\n //\r\n }\r\n }\r\n if (isMain) {\r\n this.drawLayer();\r\n }\r\n};\r\n\r\nCVShapeElement.prototype.renderStyledShape = function (styledShape, shape) {\r\n if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) {\r\n var shapeNodes = styledShape.trNodes;\r\n var paths = shape.paths;\r\n var i;\r\n var len;\r\n var j;\r\n var jLen = paths._length;\r\n shapeNodes.length = 0;\r\n var groupTransformMat = styledShape.transforms.finalTransform;\r\n for (j = 0; j < jLen; j += 1) {\r\n var pathNodes = paths.shapes[j];\r\n if (pathNodes && pathNodes.v) {\r\n len = pathNodes._length;\r\n for (i = 1; i < len; i += 1) {\r\n if (i === 1) {\r\n shapeNodes.push({\r\n t: 'm',\r\n p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0),\r\n });\r\n }\r\n shapeNodes.push({\r\n t: 'c',\r\n pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i]),\r\n });\r\n }\r\n if (len === 1) {\r\n shapeNodes.push({\r\n t: 'm',\r\n p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0),\r\n });\r\n }\r\n if (pathNodes.c && len) {\r\n shapeNodes.push({\r\n t: 'c',\r\n pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0]),\r\n });\r\n shapeNodes.push({\r\n t: 'z',\r\n });\r\n }\r\n }\r\n }\r\n styledShape.trNodes = shapeNodes;\r\n }\r\n};\r\n\r\nCVShapeElement.prototype.renderPath = function (pathData, itemData) {\r\n if (pathData.hd !== true && pathData._shouldRender) {\r\n var i;\r\n var len = itemData.styledShapes.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.renderStyledShape(itemData.styledShapes[i], itemData.sh);\r\n }\r\n }\r\n};\r\n\r\nCVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) {\r\n var styleElem = itemData.style;\r\n\r\n if (itemData.c._mdf || this._isFirstFrame) {\r\n styleElem.co = 'rgb('\r\n + bmFloor(itemData.c.v[0]) + ','\r\n + bmFloor(itemData.c.v[1]) + ','\r\n + bmFloor(itemData.c.v[2]) + ')';\r\n }\r\n if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {\r\n styleElem.coOp = itemData.o.v * groupTransform.opacity;\r\n }\r\n};\r\n\r\nCVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) {\r\n var styleElem = itemData.style;\r\n var grd;\r\n if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || (styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf))) {\r\n var ctx = this.globalData.canvasContext;\r\n var pt1 = itemData.s.v;\r\n var pt2 = itemData.e.v;\r\n if (styleData.t === 1) {\r\n grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]);\r\n } else {\r\n var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\r\n var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);\r\n\r\n var percent = itemData.h.v;\r\n if (percent >= 1) {\r\n percent = 0.99;\r\n } else if (percent <= -1) {\r\n percent = -0.99;\r\n }\r\n var dist = rad * percent;\r\n var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];\r\n var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];\r\n grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad);\r\n }\r\n\r\n var i;\r\n var len = styleData.g.p;\r\n var cValues = itemData.g.c;\r\n var opacity = 1;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (itemData.g._hasOpacity && itemData.g._collapsable) {\r\n opacity = itemData.g.o[i * 2 + 1];\r\n }\r\n grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')');\r\n }\r\n styleElem.grd = grd;\r\n }\r\n styleElem.coOp = itemData.o.v * groupTransform.opacity;\r\n};\r\n\r\nCVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) {\r\n var styleElem = itemData.style;\r\n var d = itemData.d;\r\n if (d && (d._mdf || this._isFirstFrame)) {\r\n styleElem.da = d.dashArray;\r\n styleElem.do = d.dashoffset[0];\r\n }\r\n if (itemData.c._mdf || this._isFirstFrame) {\r\n styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';\r\n }\r\n if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {\r\n styleElem.coOp = itemData.o.v * groupTransform.opacity;\r\n }\r\n if (itemData.w._mdf || this._isFirstFrame) {\r\n styleElem.wi = itemData.w.v;\r\n }\r\n};\r\n\r\nCVShapeElement.prototype.destroy = function () {\r\n this.shapesData = null;\r\n this.globalData = null;\r\n this.canvasContext = null;\r\n this.stylesList.length = 0;\r\n this.itemsData.length = 0;\r\n};\r\n\r\n/* global extendPrototype, BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement,\r\nSVGShapeElement, IImageElement */\r\n\r\nfunction CVSolidElement(data, globalData, comp) {\r\n this.initElement(data, globalData, comp);\r\n}\r\nextendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);\r\n\r\nCVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;\r\nCVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;\r\n\r\nCVSolidElement.prototype.renderInnerContent = function () {\r\n var ctx = this.canvasContext;\r\n ctx.fillStyle = this.data.sc;\r\n ctx.fillRect(0, 0, this.data.sw, this.data.sh);\r\n //\r\n};\r\n\r\n/* global extendPrototype, BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement,\r\nRenderableElement, ITextElement, createTag, createSizedArray */\r\n\r\nfunction CVTextElement(data, globalData, comp) {\r\n this.textSpans = [];\r\n this.yOffset = 0;\r\n this.fillColorAnim = false;\r\n this.strokeColorAnim = false;\r\n this.strokeWidthAnim = false;\r\n this.stroke = false;\r\n this.fill = false;\r\n this.justifyOffset = 0;\r\n this.currentRender = null;\r\n this.renderType = 'canvas';\r\n this.values = {\r\n fill: 'rgba(0,0,0,0)',\r\n stroke: 'rgba(0,0,0,0)',\r\n sWidth: 0,\r\n fValue: '',\r\n };\r\n this.initElement(data, globalData, comp);\r\n}\r\nextendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement);\r\n\r\nCVTextElement.prototype.tHelper = createTag('canvas').getContext('2d');\r\n\r\nCVTextElement.prototype.buildNewText = function () {\r\n var documentData = this.textProperty.currentData;\r\n this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);\r\n\r\n var hasFill = false;\r\n if (documentData.fc) {\r\n hasFill = true;\r\n this.values.fill = this.buildColor(documentData.fc);\r\n } else {\r\n this.values.fill = 'rgba(0,0,0,0)';\r\n }\r\n this.fill = hasFill;\r\n var hasStroke = false;\r\n if (documentData.sc) {\r\n hasStroke = true;\r\n this.values.stroke = this.buildColor(documentData.sc);\r\n this.values.sWidth = documentData.sw;\r\n }\r\n var fontData = this.globalData.fontManager.getFontByName(documentData.f);\r\n var i;\r\n var len;\r\n var letters = documentData.l;\r\n var matrixHelper = this.mHelper;\r\n this.stroke = hasStroke;\r\n this.values.fValue = documentData.finalSize + 'px ' + this.globalData.fontManager.getFontByName(documentData.f).fFamily;\r\n len = documentData.finalText.length;\r\n // this.tHelper.font = this.values.fValue;\r\n var charData;\r\n var shapeData;\r\n var k;\r\n var kLen;\r\n var shapes;\r\n var j;\r\n var jLen;\r\n var pathNodes;\r\n var commands;\r\n var pathArr;\r\n var singleShape = this.data.singleShape;\r\n var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;\r\n var xPos = 0;\r\n var yPos = 0;\r\n var firstLine = true;\r\n var cnt = 0;\r\n for (i = 0; i < len; i += 1) {\r\n charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\r\n shapeData = (charData && charData.data) || {};\r\n matrixHelper.reset();\r\n if (singleShape && letters[i].n) {\r\n xPos = -trackingOffset;\r\n yPos += documentData.yOffset;\r\n yPos += firstLine ? 1 : 0;\r\n firstLine = false;\r\n }\r\n\r\n shapes = shapeData.shapes ? shapeData.shapes[0].it : [];\r\n jLen = shapes.length;\r\n matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);\r\n if (singleShape) {\r\n this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);\r\n }\r\n commands = createSizedArray(jLen);\r\n for (j = 0; j < jLen; j += 1) {\r\n kLen = shapes[j].ks.k.i.length;\r\n pathNodes = shapes[j].ks.k;\r\n pathArr = [];\r\n for (k = 1; k < kLen; k += 1) {\r\n if (k === 1) {\r\n pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));\r\n }\r\n pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToY(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToX(pathNodes.v[k][0], pathNodes.v[k][1], 0), matrixHelper.applyToY(pathNodes.v[k][0], pathNodes.v[k][1], 0));\r\n }\r\n pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToY(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));\r\n commands[j] = pathArr;\r\n }\r\n if (singleShape) {\r\n xPos += letters[i].l;\r\n xPos += trackingOffset;\r\n }\r\n if (this.textSpans[cnt]) {\r\n this.textSpans[cnt].elem = commands;\r\n } else {\r\n this.textSpans[cnt] = { elem: commands };\r\n }\r\n cnt += 1;\r\n }\r\n};\r\n\r\nCVTextElement.prototype.renderInnerContent = function () {\r\n var ctx = this.canvasContext;\r\n ctx.font = this.values.fValue;\r\n ctx.lineCap = 'butt';\r\n ctx.lineJoin = 'miter';\r\n ctx.miterLimit = 4;\r\n\r\n if (!this.data.singleShape) {\r\n this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\r\n }\r\n\r\n var i;\r\n var len;\r\n var j;\r\n var jLen;\r\n var k;\r\n var kLen;\r\n var renderedLetters = this.textAnimator.renderedLetters;\r\n\r\n var letters = this.textProperty.currentData.l;\r\n\r\n len = letters.length;\r\n var renderedLetter;\r\n var lastFill = null;\r\n var lastStroke = null;\r\n var lastStrokeW = null;\r\n var commands;\r\n var pathArr;\r\n for (i = 0; i < len; i += 1) {\r\n if (!letters[i].n) {\r\n renderedLetter = renderedLetters[i];\r\n if (renderedLetter) {\r\n this.globalData.renderer.save();\r\n this.globalData.renderer.ctxTransform(renderedLetter.p);\r\n this.globalData.renderer.ctxOpacity(renderedLetter.o);\r\n }\r\n if (this.fill) {\r\n if (renderedLetter && renderedLetter.fc) {\r\n if (lastFill !== renderedLetter.fc) {\r\n lastFill = renderedLetter.fc;\r\n ctx.fillStyle = renderedLetter.fc;\r\n }\r\n } else if (lastFill !== this.values.fill) {\r\n lastFill = this.values.fill;\r\n ctx.fillStyle = this.values.fill;\r\n }\r\n commands = this.textSpans[i].elem;\r\n jLen = commands.length;\r\n this.globalData.canvasContext.beginPath();\r\n for (j = 0; j < jLen; j += 1) {\r\n pathArr = commands[j];\r\n kLen = pathArr.length;\r\n this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);\r\n for (k = 2; k < kLen; k += 6) {\r\n this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);\r\n }\r\n }\r\n this.globalData.canvasContext.closePath();\r\n this.globalData.canvasContext.fill();\r\n /// ctx.fillText(this.textSpans[i].val,0,0);\r\n }\r\n if (this.stroke) {\r\n if (renderedLetter && renderedLetter.sw) {\r\n if (lastStrokeW !== renderedLetter.sw) {\r\n lastStrokeW = renderedLetter.sw;\r\n ctx.lineWidth = renderedLetter.sw;\r\n }\r\n } else if (lastStrokeW !== this.values.sWidth) {\r\n lastStrokeW = this.values.sWidth;\r\n ctx.lineWidth = this.values.sWidth;\r\n }\r\n if (renderedLetter && renderedLetter.sc) {\r\n if (lastStroke !== renderedLetter.sc) {\r\n lastStroke = renderedLetter.sc;\r\n ctx.strokeStyle = renderedLetter.sc;\r\n }\r\n } else if (lastStroke !== this.values.stroke) {\r\n lastStroke = this.values.stroke;\r\n ctx.strokeStyle = this.values.stroke;\r\n }\r\n commands = this.textSpans[i].elem;\r\n jLen = commands.length;\r\n this.globalData.canvasContext.beginPath();\r\n for (j = 0; j < jLen; j += 1) {\r\n pathArr = commands[j];\r\n kLen = pathArr.length;\r\n this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);\r\n for (k = 2; k < kLen; k += 6) {\r\n this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);\r\n }\r\n }\r\n this.globalData.canvasContext.closePath();\r\n this.globalData.canvasContext.stroke();\r\n /// ctx.strokeText(letters[i].val,0,0);\r\n }\r\n if (renderedLetter) {\r\n this.globalData.renderer.restore();\r\n }\r\n }\r\n }\r\n};\r\n\r\nfunction CVEffects() {\r\n\r\n}\r\nCVEffects.prototype.renderFrame = function () {};\r\n\r\n/* global createTag, createNS, styleDiv, CVEffects, MaskElement, SVGBaseElement, HybridRenderer */\r\n\r\nfunction HBaseElement() {}\r\nHBaseElement.prototype = {\r\n checkBlendMode: function () {},\r\n initRendererElement: function () {\r\n this.baseElement = createTag(this.data.tg || 'div');\r\n if (this.data.hasMask) {\r\n this.svgElement = createNS('svg');\r\n this.layerElement = createNS('g');\r\n this.maskedElement = this.layerElement;\r\n this.svgElement.appendChild(this.layerElement);\r\n this.baseElement.appendChild(this.svgElement);\r\n } else {\r\n this.layerElement = this.baseElement;\r\n }\r\n styleDiv(this.baseElement);\r\n },\r\n createContainerElements: function () {\r\n this.renderableEffectsManager = new CVEffects(this);\r\n this.transformedElement = this.baseElement;\r\n this.maskedElement = this.layerElement;\r\n if (this.data.ln) {\r\n this.layerElement.setAttribute('id', this.data.ln);\r\n }\r\n if (this.data.cl) {\r\n this.layerElement.setAttribute('class', this.data.cl);\r\n }\r\n if (this.data.bm !== 0) {\r\n this.setBlendMode();\r\n }\r\n },\r\n renderElement: function () {\r\n var transformedElementStyle = this.transformedElement ? this.transformedElement.style : {};\r\n if (this.finalTransform._matMdf) {\r\n var matrixValue = this.finalTransform.mat.toCSS();\r\n transformedElementStyle.transform = matrixValue;\r\n transformedElementStyle.webkitTransform = matrixValue;\r\n }\r\n if (this.finalTransform._opMdf) {\r\n transformedElementStyle.opacity = this.finalTransform.mProp.o.v;\r\n }\r\n },\r\n renderFrame: function () {\r\n // If it is exported as hidden (data.hd === true) no need to render\r\n // If it is not visible no need to render\r\n if (this.data.hd || this.hidden) {\r\n return;\r\n }\r\n this.renderTransform();\r\n this.renderRenderable();\r\n this.renderElement();\r\n this.renderInnerContent();\r\n if (this._isFirstFrame) {\r\n this._isFirstFrame = false;\r\n }\r\n },\r\n destroy: function () {\r\n this.layerElement = null;\r\n this.transformedElement = null;\r\n if (this.matteElement) {\r\n this.matteElement = null;\r\n }\r\n if (this.maskManager) {\r\n this.maskManager.destroy();\r\n this.maskManager = null;\r\n }\r\n },\r\n createRenderableComponents: function () {\r\n this.maskManager = new MaskElement(this.data, this, this.globalData);\r\n },\r\n addEffects: function () {\r\n },\r\n setMatte: function () {},\r\n};\r\nHBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement;\r\nHBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy;\r\nHBaseElement.prototype.buildElementParenting = HybridRenderer.prototype.buildElementParenting;\r\n\r\n/* global extendPrototype, BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement,\r\nRenderableDOMElement, createNS, createTag */\r\n\r\nfunction HSolidElement(data, globalData, comp) {\r\n this.initElement(data, globalData, comp);\r\n}\r\nextendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], HSolidElement);\r\n\r\nHSolidElement.prototype.createContent = function () {\r\n var rect;\r\n if (this.data.hasMask) {\r\n rect = createNS('rect');\r\n rect.setAttribute('width', this.data.sw);\r\n rect.setAttribute('height', this.data.sh);\r\n rect.setAttribute('fill', this.data.sc);\r\n this.svgElement.setAttribute('width', this.data.sw);\r\n this.svgElement.setAttribute('height', this.data.sh);\r\n } else {\r\n rect = createTag('div');\r\n rect.style.width = this.data.sw + 'px';\r\n rect.style.height = this.data.sh + 'px';\r\n rect.style.backgroundColor = this.data.sc;\r\n }\r\n this.layerElement.appendChild(rect);\r\n};\r\n\r\n/* global createSizedArray, PropertyFactory, extendPrototype, HybridRenderer, ICompElement, HBaseElement */\r\n\r\nfunction HCompElement(data, globalData, comp) {\r\n this.layers = data.layers;\r\n this.supports3d = !data.hasMask;\r\n this.completeLayers = false;\r\n this.pendingElements = [];\r\n this.elements = this.layers ? createSizedArray(this.layers.length) : [];\r\n this.initElement(data, globalData, comp);\r\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };\r\n}\r\n\r\nextendPrototype([HybridRenderer, ICompElement, HBaseElement], HCompElement);\r\nHCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements;\r\n\r\nHCompElement.prototype.createContainerElements = function () {\r\n this._createBaseContainerElements();\r\n // divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)';\r\n if (this.data.hasMask) {\r\n this.svgElement.setAttribute('width', this.data.w);\r\n this.svgElement.setAttribute('height', this.data.h);\r\n this.transformedElement = this.baseElement;\r\n } else {\r\n this.transformedElement = this.layerElement;\r\n }\r\n};\r\n\r\nHCompElement.prototype.addTo3dContainer = function (elem, pos) {\r\n var j = 0;\r\n var nextElement;\r\n while (j < pos) {\r\n if (this.elements[j] && this.elements[j].getBaseElement) {\r\n nextElement = this.elements[j].getBaseElement();\r\n }\r\n j += 1;\r\n }\r\n if (nextElement) {\r\n this.layerElement.insertBefore(elem, nextElement);\r\n } else {\r\n this.layerElement.appendChild(elem);\r\n }\r\n};\r\n\r\n/* global createNS, extendPrototype, BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement,\r\nHierarchyElement, FrameElement, RenderableElement, createNS, bmMin, bmSqrt, bmMin, bmMax, bmPow */\r\n\r\nfunction HShapeElement(data, globalData, comp) {\r\n // List of drawable elements\r\n this.shapes = [];\r\n // Full shape data\r\n this.shapesData = data.shapes;\r\n // List of styles that will be applied to shapes\r\n this.stylesList = [];\r\n // List of modifiers that will be applied to shapes\r\n this.shapeModifiers = [];\r\n // List of items in shape tree\r\n this.itemsData = [];\r\n // List of items in previous shape tree\r\n this.processedElements = [];\r\n // List of animated components\r\n this.animatedContents = [];\r\n this.shapesContainer = createNS('g');\r\n this.initElement(data, globalData, comp);\r\n // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\r\n // List of elements that have been created\r\n this.prevViewData = [];\r\n this.currentBBox = {\r\n x: 999999,\r\n y: -999999,\r\n h: 0,\r\n w: 0,\r\n };\r\n}\r\nextendPrototype([BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement], HShapeElement);\r\nHShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent;\r\n\r\nHShapeElement.prototype.createContent = function () {\r\n var cont;\r\n this.baseElement.style.fontSize = 0;\r\n if (this.data.hasMask) {\r\n this.layerElement.appendChild(this.shapesContainer);\r\n cont = this.svgElement;\r\n } else {\r\n cont = createNS('svg');\r\n var size = this.comp.data ? this.comp.data : this.globalData.compSize;\r\n cont.setAttribute('width', size.w);\r\n cont.setAttribute('height', size.h);\r\n cont.appendChild(this.shapesContainer);\r\n this.layerElement.appendChild(cont);\r\n }\r\n\r\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], true);\r\n this.filterUniqueShapes();\r\n this.shapeCont = cont;\r\n};\r\n\r\nHShapeElement.prototype.getTransformedPoint = function (transformers, point) {\r\n var i;\r\n var len = transformers.length;\r\n for (i = 0; i < len; i += 1) {\r\n point = transformers[i].mProps.v.applyToPointArray(point[0], point[1], 0);\r\n }\r\n return point;\r\n};\r\n\r\nHShapeElement.prototype.calculateShapeBoundingBox = function (item, boundingBox) {\r\n var shape = item.sh.v;\r\n var transformers = item.transformers;\r\n var i;\r\n var len = shape._length;\r\n var vPoint;\r\n var oPoint;\r\n var nextIPoint;\r\n var nextVPoint;\r\n if (len <= 1) {\r\n return;\r\n }\r\n for (i = 0; i < len - 1; i += 1) {\r\n vPoint = this.getTransformedPoint(transformers, shape.v[i]);\r\n oPoint = this.getTransformedPoint(transformers, shape.o[i]);\r\n nextIPoint = this.getTransformedPoint(transformers, shape.i[i + 1]);\r\n nextVPoint = this.getTransformedPoint(transformers, shape.v[i + 1]);\r\n this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);\r\n }\r\n if (shape.c) {\r\n vPoint = this.getTransformedPoint(transformers, shape.v[i]);\r\n oPoint = this.getTransformedPoint(transformers, shape.o[i]);\r\n nextIPoint = this.getTransformedPoint(transformers, shape.i[0]);\r\n nextVPoint = this.getTransformedPoint(transformers, shape.v[0]);\r\n this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);\r\n }\r\n};\r\n\r\nHShapeElement.prototype.checkBounds = function (vPoint, oPoint, nextIPoint, nextVPoint, boundingBox) {\r\n this.getBoundsOfCurve(vPoint, oPoint, nextIPoint, nextVPoint);\r\n var bounds = this.shapeBoundingBox;\r\n boundingBox.x = bmMin(bounds.left, boundingBox.x);\r\n boundingBox.xMax = bmMax(bounds.right, boundingBox.xMax);\r\n boundingBox.y = bmMin(bounds.top, boundingBox.y);\r\n boundingBox.yMax = bmMax(bounds.bottom, boundingBox.yMax);\r\n};\r\n\r\nHShapeElement.prototype.shapeBoundingBox = {\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0,\r\n};\r\n\r\nHShapeElement.prototype.tempBoundingBox = {\r\n x: 0,\r\n xMax: 0,\r\n y: 0,\r\n yMax: 0,\r\n width: 0,\r\n height: 0,\r\n};\r\n\r\nHShapeElement.prototype.getBoundsOfCurve = function (p0, p1, p2, p3) {\r\n var bounds = [[p0[0], p3[0]], [p0[1], p3[1]]];\r\n\r\n for (var a, b, c, t, b2ac, t1, t2, i = 0; i < 2; ++i) { // eslint-disable-line no-plusplus\r\n b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];\r\n a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];\r\n c = 3 * p1[i] - 3 * p0[i];\r\n\r\n b |= 0; // eslint-disable-line no-bitwise\r\n a |= 0; // eslint-disable-line no-bitwise\r\n c |= 0; // eslint-disable-line no-bitwise\r\n\r\n if (a === 0 && b === 0) {\r\n //\r\n } else if (a === 0) {\r\n t = -c / b;\r\n\r\n if (t > 0 && t < 1) {\r\n bounds[i].push(this.calculateF(t, p0, p1, p2, p3, i));\r\n }\r\n } else {\r\n b2ac = b * b - 4 * c * a;\r\n\r\n if (b2ac >= 0) {\r\n t1 = (-b + bmSqrt(b2ac)) / (2 * a);\r\n if (t1 > 0 && t1 < 1) bounds[i].push(this.calculateF(t1, p0, p1, p2, p3, i));\r\n t2 = (-b - bmSqrt(b2ac)) / (2 * a);\r\n if (t2 > 0 && t2 < 1) bounds[i].push(this.calculateF(t2, p0, p1, p2, p3, i));\r\n }\r\n }\r\n }\r\n\r\n this.shapeBoundingBox.left = bmMin.apply(null, bounds[0]);\r\n this.shapeBoundingBox.top = bmMin.apply(null, bounds[1]);\r\n this.shapeBoundingBox.right = bmMax.apply(null, bounds[0]);\r\n this.shapeBoundingBox.bottom = bmMax.apply(null, bounds[1]);\r\n};\r\n\r\nHShapeElement.prototype.calculateF = function (t, p0, p1, p2, p3, i) {\r\n return bmPow(1 - t, 3) * p0[i]\r\n + 3 * bmPow(1 - t, 2) * t * p1[i]\r\n + 3 * (1 - t) * bmPow(t, 2) * p2[i]\r\n + bmPow(t, 3) * p3[i];\r\n};\r\n\r\nHShapeElement.prototype.calculateBoundingBox = function (itemsData, boundingBox) {\r\n var i;\r\n var len = itemsData.length;\r\n for (i = 0; i < len; i += 1) {\r\n if (itemsData[i] && itemsData[i].sh) {\r\n this.calculateShapeBoundingBox(itemsData[i], boundingBox);\r\n } else if (itemsData[i] && itemsData[i].it) {\r\n this.calculateBoundingBox(itemsData[i].it, boundingBox);\r\n }\r\n }\r\n};\r\n\r\nHShapeElement.prototype.currentBoxContains = function (box) {\r\n return this.currentBBox.x <= box.x\r\n && this.currentBBox.y <= box.y\r\n && this.currentBBox.width + this.currentBBox.x >= box.x + box.width\r\n && this.currentBBox.height + this.currentBBox.y >= box.y + box.height;\r\n};\r\n\r\nHShapeElement.prototype.renderInnerContent = function () {\r\n this._renderShapeFrame();\r\n\r\n if (!this.hidden && (this._isFirstFrame || this._mdf)) {\r\n var tempBoundingBox = this.tempBoundingBox;\r\n var max = 999999;\r\n tempBoundingBox.x = max;\r\n tempBoundingBox.xMax = -max;\r\n tempBoundingBox.y = max;\r\n tempBoundingBox.yMax = -max;\r\n this.calculateBoundingBox(this.itemsData, tempBoundingBox);\r\n tempBoundingBox.width = tempBoundingBox.xMax < tempBoundingBox.x ? 0 : tempBoundingBox.xMax - tempBoundingBox.x;\r\n tempBoundingBox.height = tempBoundingBox.yMax < tempBoundingBox.y ? 0 : tempBoundingBox.yMax - tempBoundingBox.y;\r\n // var tempBoundingBox = this.shapeCont.getBBox();\r\n if (this.currentBoxContains(tempBoundingBox)) {\r\n return;\r\n }\r\n var changed = false;\r\n if (this.currentBBox.w !== tempBoundingBox.width) {\r\n this.currentBBox.w = tempBoundingBox.width;\r\n this.shapeCont.setAttribute('width', tempBoundingBox.width);\r\n changed = true;\r\n }\r\n if (this.currentBBox.h !== tempBoundingBox.height) {\r\n this.currentBBox.h = tempBoundingBox.height;\r\n this.shapeCont.setAttribute('height', tempBoundingBox.height);\r\n changed = true;\r\n }\r\n if (changed || this.currentBBox.x !== tempBoundingBox.x || this.currentBBox.y !== tempBoundingBox.y) {\r\n this.currentBBox.w = tempBoundingBox.width;\r\n this.currentBBox.h = tempBoundingBox.height;\r\n this.currentBBox.x = tempBoundingBox.x;\r\n this.currentBBox.y = tempBoundingBox.y;\r\n\r\n this.shapeCont.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);\r\n var shapeStyle = this.shapeCont.style;\r\n var shapeTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';\r\n shapeStyle.transform = shapeTransform;\r\n shapeStyle.webkitTransform = shapeTransform;\r\n }\r\n }\r\n};\r\n\r\n/* global extendPrototype, BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement,\r\nRenderableDOMElement, ITextElement, createSizedArray, createTag, styleDiv, createNS, lineJoinEnum, lineCapEnum */\r\n\r\nfunction HTextElement(data, globalData, comp) {\r\n this.textSpans = [];\r\n this.textPaths = [];\r\n this.currentBBox = {\r\n x: 999999,\r\n y: -999999,\r\n h: 0,\r\n w: 0,\r\n };\r\n this.renderType = 'svg';\r\n this.isMasked = false;\r\n this.initElement(data, globalData, comp);\r\n}\r\nextendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], HTextElement);\r\n\r\nHTextElement.prototype.createContent = function () {\r\n this.isMasked = this.checkMasks();\r\n if (this.isMasked) {\r\n this.renderType = 'svg';\r\n this.compW = this.comp.data.w;\r\n this.compH = this.comp.data.h;\r\n this.svgElement.setAttribute('width', this.compW);\r\n this.svgElement.setAttribute('height', this.compH);\r\n var g = createNS('g');\r\n this.maskedElement.appendChild(g);\r\n this.innerElem = g;\r\n } else {\r\n this.renderType = 'html';\r\n this.innerElem = this.layerElement;\r\n }\r\n\r\n this.checkParenting();\r\n};\r\n\r\nHTextElement.prototype.buildNewText = function () {\r\n var documentData = this.textProperty.currentData;\r\n this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);\r\n var innerElemStyle = this.innerElem.style;\r\n var textColor = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)';\r\n innerElemStyle.fill = textColor;\r\n innerElemStyle.color = textColor;\r\n if (documentData.sc) {\r\n innerElemStyle.stroke = this.buildColor(documentData.sc);\r\n innerElemStyle.strokeWidth = documentData.sw + 'px';\r\n }\r\n var fontData = this.globalData.fontManager.getFontByName(documentData.f);\r\n if (!this.globalData.fontManager.chars) {\r\n innerElemStyle.fontSize = documentData.finalSize + 'px';\r\n innerElemStyle.lineHeight = documentData.finalSize + 'px';\r\n if (fontData.fClass) {\r\n this.innerElem.className = fontData.fClass;\r\n } else {\r\n innerElemStyle.fontFamily = fontData.fFamily;\r\n var fWeight = documentData.fWeight;\r\n var fStyle = documentData.fStyle;\r\n innerElemStyle.fontStyle = fStyle;\r\n innerElemStyle.fontWeight = fWeight;\r\n }\r\n }\r\n var i;\r\n var len;\r\n\r\n var letters = documentData.l;\r\n len = letters.length;\r\n var tSpan;\r\n var tParent;\r\n var tCont;\r\n var matrixHelper = this.mHelper;\r\n var shapes;\r\n var shapeStr = '';\r\n var cnt = 0;\r\n for (i = 0; i < len; i += 1) {\r\n if (this.globalData.fontManager.chars) {\r\n if (!this.textPaths[cnt]) {\r\n tSpan = createNS('path');\r\n tSpan.setAttribute('stroke-linecap', lineCapEnum[1]);\r\n tSpan.setAttribute('stroke-linejoin', lineJoinEnum[2]);\r\n tSpan.setAttribute('stroke-miterlimit', '4');\r\n } else {\r\n tSpan = this.textPaths[cnt];\r\n }\r\n if (!this.isMasked) {\r\n if (this.textSpans[cnt]) {\r\n tParent = this.textSpans[cnt];\r\n tCont = tParent.children[0];\r\n } else {\r\n tParent = createTag('div');\r\n tParent.style.lineHeight = 0;\r\n tCont = createNS('svg');\r\n tCont.appendChild(tSpan);\r\n styleDiv(tParent);\r\n }\r\n }\r\n } else if (!this.isMasked) {\r\n if (this.textSpans[cnt]) {\r\n tParent = this.textSpans[cnt];\r\n tSpan = this.textPaths[cnt];\r\n } else {\r\n tParent = createTag('span');\r\n styleDiv(tParent);\r\n tSpan = createTag('span');\r\n styleDiv(tSpan);\r\n tParent.appendChild(tSpan);\r\n }\r\n } else {\r\n tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text');\r\n }\r\n // tSpan.setAttribute('visibility', 'hidden');\r\n if (this.globalData.fontManager.chars) {\r\n var charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\r\n var shapeData;\r\n if (charData) {\r\n shapeData = charData.data;\r\n } else {\r\n shapeData = null;\r\n }\r\n matrixHelper.reset();\r\n if (shapeData && shapeData.shapes) {\r\n shapes = shapeData.shapes[0].it;\r\n matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);\r\n shapeStr = this.createPathShape(matrixHelper, shapes);\r\n tSpan.setAttribute('d', shapeStr);\r\n }\r\n if (!this.isMasked) {\r\n this.innerElem.appendChild(tParent);\r\n if (shapeData && shapeData.shapes) {\r\n // document.body.appendChild is needed to get exact measure of shape\r\n document.body.appendChild(tCont);\r\n var boundingBox = tCont.getBBox();\r\n tCont.setAttribute('width', boundingBox.width + 2);\r\n tCont.setAttribute('height', boundingBox.height + 2);\r\n tCont.setAttribute('viewBox', (boundingBox.x - 1) + ' ' + (boundingBox.y - 1) + ' ' + (boundingBox.width + 2) + ' ' + (boundingBox.height + 2));\r\n var tContStyle = tCont.style;\r\n var tContTranslation = 'translate(' + (boundingBox.x - 1) + 'px,' + (boundingBox.y - 1) + 'px)';\r\n tContStyle.transform = tContTranslation;\r\n tContStyle.webkitTransform = tContTranslation;\r\n\r\n letters[i].yOffset = boundingBox.y - 1;\r\n } else {\r\n tCont.setAttribute('width', 1);\r\n tCont.setAttribute('height', 1);\r\n }\r\n tParent.appendChild(tCont);\r\n } else {\r\n this.innerElem.appendChild(tSpan);\r\n }\r\n } else {\r\n tSpan.textContent = letters[i].val;\r\n tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\r\n if (!this.isMasked) {\r\n this.innerElem.appendChild(tParent);\r\n //\r\n var tStyle = tSpan.style;\r\n var tSpanTranslation = 'translate3d(0,' + -documentData.finalSize / 1.2 + 'px,0)';\r\n tStyle.transform = tSpanTranslation;\r\n tStyle.webkitTransform = tSpanTranslation;\r\n } else {\r\n this.innerElem.appendChild(tSpan);\r\n }\r\n }\r\n //\r\n if (!this.isMasked) {\r\n this.textSpans[cnt] = tParent;\r\n } else {\r\n this.textSpans[cnt] = tSpan;\r\n }\r\n this.textSpans[cnt].style.display = 'block';\r\n this.textPaths[cnt] = tSpan;\r\n cnt += 1;\r\n }\r\n while (cnt < this.textSpans.length) {\r\n this.textSpans[cnt].style.display = 'none';\r\n cnt += 1;\r\n }\r\n};\r\n\r\nHTextElement.prototype.renderInnerContent = function () {\r\n var svgStyle;\r\n if (this.data.singleShape) {\r\n if (!this._isFirstFrame && !this.lettersChangedFlag) {\r\n return;\r\n } if (this.isMasked && this.finalTransform._matMdf) {\r\n // Todo Benchmark if using this is better than getBBox\r\n this.svgElement.setAttribute('viewBox', -this.finalTransform.mProp.p.v[0] + ' ' + -this.finalTransform.mProp.p.v[1] + ' ' + this.compW + ' ' + this.compH);\r\n svgStyle = this.svgElement.style;\r\n var translation = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)';\r\n svgStyle.transform = translation;\r\n svgStyle.webkitTransform = translation;\r\n }\r\n }\r\n\r\n this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\r\n if (!this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag) {\r\n return;\r\n }\r\n var i;\r\n var len;\r\n var count = 0;\r\n var renderedLetters = this.textAnimator.renderedLetters;\r\n\r\n var letters = this.textProperty.currentData.l;\r\n\r\n len = letters.length;\r\n var renderedLetter;\r\n var textSpan;\r\n var textPath;\r\n for (i = 0; i < len; i += 1) {\r\n if (letters[i].n) {\r\n count += 1;\r\n } else {\r\n textSpan = this.textSpans[i];\r\n textPath = this.textPaths[i];\r\n renderedLetter = renderedLetters[count];\r\n count += 1;\r\n if (renderedLetter._mdf.m) {\r\n if (!this.isMasked) {\r\n textSpan.style.webkitTransform = renderedLetter.m;\r\n textSpan.style.transform = renderedLetter.m;\r\n } else {\r\n textSpan.setAttribute('transform', renderedLetter.m);\r\n }\r\n }\r\n /// /textSpan.setAttribute('opacity',renderedLetter.o);\r\n textSpan.style.opacity = renderedLetter.o;\r\n if (renderedLetter.sw && renderedLetter._mdf.sw) {\r\n textPath.setAttribute('stroke-width', renderedLetter.sw);\r\n }\r\n if (renderedLetter.sc && renderedLetter._mdf.sc) {\r\n textPath.setAttribute('stroke', renderedLetter.sc);\r\n }\r\n if (renderedLetter.fc && renderedLetter._mdf.fc) {\r\n textPath.setAttribute('fill', renderedLetter.fc);\r\n textPath.style.color = renderedLetter.fc;\r\n }\r\n }\r\n }\r\n\r\n if (this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)) {\r\n var boundingBox = this.innerElem.getBBox();\r\n\r\n if (this.currentBBox.w !== boundingBox.width) {\r\n this.currentBBox.w = boundingBox.width;\r\n this.svgElement.setAttribute('width', boundingBox.width);\r\n }\r\n if (this.currentBBox.h !== boundingBox.height) {\r\n this.currentBBox.h = boundingBox.height;\r\n this.svgElement.setAttribute('height', boundingBox.height);\r\n }\r\n\r\n var margin = 1;\r\n if (this.currentBBox.w !== (boundingBox.width + margin * 2) || this.currentBBox.h !== (boundingBox.height + margin * 2) || this.currentBBox.x !== (boundingBox.x - margin) || this.currentBBox.y !== (boundingBox.y - margin)) {\r\n this.currentBBox.w = boundingBox.width + margin * 2;\r\n this.currentBBox.h = boundingBox.height + margin * 2;\r\n this.currentBBox.x = boundingBox.x - margin;\r\n this.currentBBox.y = boundingBox.y - margin;\r\n\r\n this.svgElement.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);\r\n svgStyle = this.svgElement.style;\r\n var svgTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';\r\n svgStyle.transform = svgTransform;\r\n svgStyle.webkitTransform = svgTransform;\r\n }\r\n }\r\n};\r\n\r\n/* global extendPrototype, BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement,\r\nFrameElement, RenderableElement, createNS */\r\n\r\nfunction HImageElement(data, globalData, comp) {\r\n this.assetData = globalData.getAssetData(data.refId);\r\n this.initElement(data, globalData, comp);\r\n}\r\n\r\nextendPrototype([BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement], HImageElement);\r\n\r\nHImageElement.prototype.createContent = function () {\r\n var assetPath = this.globalData.getAssetsPath(this.assetData);\r\n var img = new Image();\r\n\r\n if (this.data.hasMask) {\r\n this.imageElem = createNS('image');\r\n this.imageElem.setAttribute('width', this.assetData.w + 'px');\r\n this.imageElem.setAttribute('height', this.assetData.h + 'px');\r\n this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);\r\n this.layerElement.appendChild(this.imageElem);\r\n this.baseElement.setAttribute('width', this.assetData.w);\r\n this.baseElement.setAttribute('height', this.assetData.h);\r\n } else {\r\n this.layerElement.appendChild(img);\r\n }\r\n img.crossOrigin = 'anonymous';\r\n img.src = assetPath;\r\n if (this.data.ln) {\r\n this.baseElement.setAttribute('id', this.data.ln);\r\n }\r\n};\r\n\r\n/* global PropertyFactory, degToRads, Matrix, extendPrototype, BaseElement, FrameElement, HierarchyElement */\r\n\r\nfunction HCameraElement(data, globalData, comp) {\r\n this.initFrame();\r\n this.initBaseData(data, globalData, comp);\r\n this.initHierarchy();\r\n var getProp = PropertyFactory.getProp;\r\n this.pe = getProp(this, data.pe, 0, 0, this);\r\n if (data.ks.p.s) {\r\n this.px = getProp(this, data.ks.p.x, 1, 0, this);\r\n this.py = getProp(this, data.ks.p.y, 1, 0, this);\r\n this.pz = getProp(this, data.ks.p.z, 1, 0, this);\r\n } else {\r\n this.p = getProp(this, data.ks.p, 1, 0, this);\r\n }\r\n if (data.ks.a) {\r\n this.a = getProp(this, data.ks.a, 1, 0, this);\r\n }\r\n if (data.ks.or.k.length && data.ks.or.k[0].to) {\r\n var i;\r\n var len = data.ks.or.k.length;\r\n for (i = 0; i < len; i += 1) {\r\n data.ks.or.k[i].to = null;\r\n data.ks.or.k[i].ti = null;\r\n }\r\n }\r\n this.or = getProp(this, data.ks.or, 1, degToRads, this);\r\n this.or.sh = true;\r\n this.rx = getProp(this, data.ks.rx, 0, degToRads, this);\r\n this.ry = getProp(this, data.ks.ry, 0, degToRads, this);\r\n this.rz = getProp(this, data.ks.rz, 0, degToRads, this);\r\n this.mat = new Matrix();\r\n this._prevMat = new Matrix();\r\n this._isFirstFrame = true;\r\n\r\n // TODO: find a better way to make the HCamera element to be compatible with the LayerInterface and TransformInterface.\r\n this.finalTransform = {\r\n mProp: this,\r\n };\r\n}\r\nextendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement);\r\n\r\nHCameraElement.prototype.setup = function () {\r\n var i;\r\n var len = this.comp.threeDElements.length;\r\n var comp;\r\n var perspectiveStyle;\r\n var containerStyle;\r\n for (i = 0; i < len; i += 1) {\r\n // [perspectiveElem,container]\r\n comp = this.comp.threeDElements[i];\r\n if (comp.type === '3d') {\r\n perspectiveStyle = comp.perspectiveElem.style;\r\n containerStyle = comp.container.style;\r\n var perspective = this.pe.v + 'px';\r\n var origin = '0px 0px 0px';\r\n var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';\r\n perspectiveStyle.perspective = perspective;\r\n perspectiveStyle.webkitPerspective = perspective;\r\n containerStyle.transformOrigin = origin;\r\n containerStyle.mozTransformOrigin = origin;\r\n containerStyle.webkitTransformOrigin = origin;\r\n perspectiveStyle.transform = matrix;\r\n perspectiveStyle.webkitTransform = matrix;\r\n }\r\n }\r\n};\r\n\r\nHCameraElement.prototype.createElements = function () {\r\n};\r\n\r\nHCameraElement.prototype.hide = function () {\r\n};\r\n\r\nHCameraElement.prototype.renderFrame = function () {\r\n var _mdf = this._isFirstFrame;\r\n var i;\r\n var len;\r\n if (this.hierarchy) {\r\n len = this.hierarchy.length;\r\n for (i = 0; i < len; i += 1) {\r\n _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf;\r\n }\r\n }\r\n if (_mdf || this.pe._mdf || (this.p && this.p._mdf) || (this.px && (this.px._mdf || this.py._mdf || this.pz._mdf)) || this.rx._mdf || this.ry._mdf || this.rz._mdf || this.or._mdf || (this.a && this.a._mdf)) {\r\n this.mat.reset();\r\n\r\n if (this.hierarchy) {\r\n len = this.hierarchy.length - 1;\r\n for (i = len; i >= 0; i -= 1) {\r\n var mTransf = this.hierarchy[i].finalTransform.mProp;\r\n this.mat.translate(-mTransf.p.v[0], -mTransf.p.v[1], mTransf.p.v[2]);\r\n this.mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]);\r\n this.mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v);\r\n this.mat.scale(1 / mTransf.s.v[0], 1 / mTransf.s.v[1], 1 / mTransf.s.v[2]);\r\n this.mat.translate(mTransf.a.v[0], mTransf.a.v[1], mTransf.a.v[2]);\r\n }\r\n }\r\n if (this.p) {\r\n this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]);\r\n } else {\r\n this.mat.translate(-this.px.v, -this.py.v, this.pz.v);\r\n }\r\n if (this.a) {\r\n var diffVector;\r\n if (this.p) {\r\n diffVector = [this.p.v[0] - this.a.v[0], this.p.v[1] - this.a.v[1], this.p.v[2] - this.a.v[2]];\r\n } else {\r\n diffVector = [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]];\r\n }\r\n var mag = Math.sqrt(Math.pow(diffVector[0], 2) + Math.pow(diffVector[1], 2) + Math.pow(diffVector[2], 2));\r\n // var lookDir = getNormalizedPoint(getDiffVector(this.a.v,this.p.v));\r\n var lookDir = [diffVector[0] / mag, diffVector[1] / mag, diffVector[2] / mag];\r\n var lookLengthOnXZ = Math.sqrt(lookDir[2] * lookDir[2] + lookDir[0] * lookDir[0]);\r\n var mRotationX = (Math.atan2(lookDir[1], lookLengthOnXZ));\r\n var mRotationY = (Math.atan2(lookDir[0], -lookDir[2]));\r\n this.mat.rotateY(mRotationY).rotateX(-mRotationX);\r\n }\r\n this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v);\r\n this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]);\r\n this.mat.translate(this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0);\r\n this.mat.translate(0, 0, this.pe.v);\r\n\r\n var hasMatrixChanged = !this._prevMat.equals(this.mat);\r\n if ((hasMatrixChanged || this.pe._mdf) && this.comp.threeDElements) {\r\n len = this.comp.threeDElements.length;\r\n var comp;\r\n var perspectiveStyle;\r\n var containerStyle;\r\n for (i = 0; i < len; i += 1) {\r\n comp = this.comp.threeDElements[i];\r\n if (comp.type === '3d') {\r\n if (hasMatrixChanged) {\r\n var matValue = this.mat.toCSS();\r\n containerStyle = comp.container.style;\r\n containerStyle.transform = matValue;\r\n containerStyle.webkitTransform = matValue;\r\n }\r\n if (this.pe._mdf) {\r\n perspectiveStyle = comp.perspectiveElem.style;\r\n perspectiveStyle.perspective = this.pe.v + 'px';\r\n perspectiveStyle.webkitPerspective = this.pe.v + 'px';\r\n }\r\n }\r\n }\r\n this.mat.clone(this._prevMat);\r\n }\r\n }\r\n this._isFirstFrame = false;\r\n};\r\n\r\nHCameraElement.prototype.prepareFrame = function (num) {\r\n this.prepareProperties(num, true);\r\n};\r\n\r\nHCameraElement.prototype.destroy = function () {\r\n};\r\nHCameraElement.prototype.getBaseElement = function () { return null; };\r\n\r\nfunction HEffects() {\r\n}\r\nHEffects.prototype.renderFrame = function () {};\r\n\r\n/* global createTag, AnimationItem */\r\n/* exported animationManager */\r\n\r\nvar animationManager = (function () {\r\n var moduleOb = {};\r\n var registeredAnimations = [];\r\n var initTime = 0;\r\n var len = 0;\r\n var playingAnimationsNum = 0;\r\n var _stopped = true;\r\n var _isFrozen = false;\r\n\r\n function removeElement(ev) {\r\n var i = 0;\r\n var animItem = ev.target;\r\n while (i < len) {\r\n if (registeredAnimations[i].animation === animItem) {\r\n registeredAnimations.splice(i, 1);\r\n i -= 1;\r\n len -= 1;\r\n if (!animItem.isPaused) {\r\n subtractPlayingCount();\r\n }\r\n }\r\n i += 1;\r\n }\r\n }\r\n\r\n function registerAnimation(element, animationData) {\r\n if (!element) {\r\n return null;\r\n }\r\n var i = 0;\r\n while (i < len) {\r\n if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {\r\n return registeredAnimations[i].animation;\r\n }\r\n i += 1;\r\n }\r\n var animItem = new AnimationItem();\r\n setupAnimation(animItem, element);\r\n animItem.setData(element, animationData);\r\n return animItem;\r\n }\r\n\r\n function getRegisteredAnimations() {\r\n var i;\r\n var lenAnims = registeredAnimations.length;\r\n var animations = [];\r\n for (i = 0; i < lenAnims; i += 1) {\r\n animations.push(registeredAnimations[i].animation);\r\n }\r\n return animations;\r\n }\r\n\r\n function addPlayingCount() {\r\n playingAnimationsNum += 1;\r\n activate();\r\n }\r\n\r\n function subtractPlayingCount() {\r\n playingAnimationsNum -= 1;\r\n }\r\n\r\n function setupAnimation(animItem, element) {\r\n animItem.addEventListener('destroy', removeElement);\r\n animItem.addEventListener('_active', addPlayingCount);\r\n animItem.addEventListener('_idle', subtractPlayingCount);\r\n registeredAnimations.push({ elem: element, animation: animItem });\r\n len += 1;\r\n }\r\n\r\n function loadAnimation(params) {\r\n var animItem = new AnimationItem();\r\n setupAnimation(animItem, null);\r\n animItem.setParams(params);\r\n return animItem;\r\n }\r\n\r\n function setSpeed(val, animation) {\r\n var i;\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.setSpeed(val, animation);\r\n }\r\n }\r\n\r\n function setDirection(val, animation) {\r\n var i;\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.setDirection(val, animation);\r\n }\r\n }\r\n\r\n function play(animation) {\r\n var i;\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.play(animation);\r\n }\r\n }\r\n function resume(nowTime) {\r\n var elapsedTime = nowTime - initTime;\r\n var i;\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.advanceTime(elapsedTime);\r\n }\r\n initTime = nowTime;\r\n if (playingAnimationsNum && !_isFrozen) {\r\n window.requestAnimationFrame(resume);\r\n } else {\r\n _stopped = true;\r\n }\r\n }\r\n\r\n function first(nowTime) {\r\n initTime = nowTime;\r\n window.requestAnimationFrame(resume);\r\n }\r\n\r\n function pause(animation) {\r\n var i;\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.pause(animation);\r\n }\r\n }\r\n\r\n function goToAndStop(value, isFrame, animation) {\r\n var i;\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);\r\n }\r\n }\r\n\r\n function stop(animation) {\r\n var i;\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.stop(animation);\r\n }\r\n }\r\n\r\n function togglePause(animation) {\r\n var i;\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.togglePause(animation);\r\n }\r\n }\r\n\r\n function destroy(animation) {\r\n var i;\r\n for (i = (len - 1); i >= 0; i -= 1) {\r\n registeredAnimations[i].animation.destroy(animation);\r\n }\r\n }\r\n\r\n function searchAnimations(animationData, standalone, renderer) {\r\n var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')),\r\n [].slice.call(document.getElementsByClassName('bodymovin')));\r\n var i;\r\n var lenAnims = animElements.length;\r\n for (i = 0; i < lenAnims; i += 1) {\r\n if (renderer) {\r\n animElements[i].setAttribute('data-bm-type', renderer);\r\n }\r\n registerAnimation(animElements[i], animationData);\r\n }\r\n if (standalone && lenAnims === 0) {\r\n if (!renderer) {\r\n renderer = 'svg';\r\n }\r\n var body = document.getElementsByTagName('body')[0];\r\n body.innerText = '';\r\n var div = createTag('div');\r\n div.style.width = '100%';\r\n div.style.height = '100%';\r\n div.setAttribute('data-bm-type', renderer);\r\n body.appendChild(div);\r\n registerAnimation(div, animationData);\r\n }\r\n }\r\n\r\n function resize() {\r\n var i;\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.resize();\r\n }\r\n }\r\n\r\n function activate() {\r\n if (!_isFrozen && playingAnimationsNum) {\r\n if (_stopped) {\r\n window.requestAnimationFrame(first);\r\n _stopped = false;\r\n }\r\n }\r\n }\r\n\r\n function freeze() {\r\n _isFrozen = true;\r\n }\r\n\r\n function unfreeze() {\r\n _isFrozen = false;\r\n activate();\r\n }\r\n\r\n function setVolume(val, animation) {\r\n var i;\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.setVolume(val, animation);\r\n }\r\n }\r\n\r\n function mute(animation) {\r\n var i;\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.mute(animation);\r\n }\r\n }\r\n\r\n function unmute(animation) {\r\n var i;\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.unmute(animation);\r\n }\r\n }\r\n\r\n moduleOb.registerAnimation = registerAnimation;\r\n moduleOb.loadAnimation = loadAnimation;\r\n moduleOb.setSpeed = setSpeed;\r\n moduleOb.setDirection = setDirection;\r\n moduleOb.play = play;\r\n moduleOb.pause = pause;\r\n moduleOb.stop = stop;\r\n moduleOb.togglePause = togglePause;\r\n moduleOb.searchAnimations = searchAnimations;\r\n moduleOb.resize = resize;\r\n // moduleOb.start = start;\r\n moduleOb.goToAndStop = goToAndStop;\r\n moduleOb.destroy = destroy;\r\n moduleOb.freeze = freeze;\r\n moduleOb.unfreeze = unfreeze;\r\n moduleOb.setVolume = setVolume;\r\n moduleOb.mute = mute;\r\n moduleOb.unmute = unmute;\r\n moduleOb.getRegisteredAnimations = getRegisteredAnimations;\r\n return moduleOb;\r\n}());\r\n\r\n/* global createElementID, subframeEnabled, ProjectInterface, ImagePreloader, audioControllerFactory, extendPrototype, BaseEvent,\r\nCanvasRenderer, SVGRenderer, HybridRenderer, dataManager, expressionsPlugin, BMEnterFrameEvent, BMCompleteLoopEvent,\r\nBMCompleteEvent, BMSegmentStartEvent, BMDestroyEvent, BMEnterFrameEvent, BMCompleteLoopEvent, BMCompleteEvent, BMSegmentStartEvent,\r\nBMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, markerParser */\r\n\r\nvar AnimationItem = function () {\r\n this._cbs = [];\r\n this.name = '';\r\n this.path = '';\r\n this.isLoaded = false;\r\n this.currentFrame = 0;\r\n this.currentRawFrame = 0;\r\n this.firstFrame = 0;\r\n this.totalFrames = 0;\r\n this.frameRate = 0;\r\n this.frameMult = 0;\r\n this.playSpeed = 1;\r\n this.playDirection = 1;\r\n this.playCount = 0;\r\n this.animationData = {};\r\n this.assets = [];\r\n this.isPaused = true;\r\n this.autoplay = false;\r\n this.loop = true;\r\n this.renderer = null;\r\n this.animationID = createElementID();\r\n this.assetsPath = '';\r\n this.timeCompleted = 0;\r\n this.segmentPos = 0;\r\n this.isSubframeEnabled = subframeEnabled;\r\n this.segments = [];\r\n this._idle = true;\r\n this._completedLoop = false;\r\n this.projectInterface = ProjectInterface();\r\n this.imagePreloader = new ImagePreloader();\r\n this.audioController = audioControllerFactory();\r\n this.markers = [];\r\n this.configAnimation = this.configAnimation.bind(this);\r\n this.onSetupError = this.onSetupError.bind(this);\r\n this.onSegmentComplete = this.onSegmentComplete.bind(this);\r\n};\r\n\r\nextendPrototype([BaseEvent], AnimationItem);\r\n\r\nAnimationItem.prototype.setParams = function (params) {\r\n if (params.wrapper || params.container) {\r\n this.wrapper = params.wrapper || params.container;\r\n }\r\n var animType = 'svg';\r\n if (params.animType) {\r\n animType = params.animType;\r\n } else if (params.renderer) {\r\n animType = params.renderer;\r\n }\r\n switch (animType) {\r\n case 'canvas':\r\n this.renderer = new CanvasRenderer(this, params.rendererSettings);\r\n break;\r\n case 'svg':\r\n this.renderer = new SVGRenderer(this, params.rendererSettings);\r\n break;\r\n default:\r\n this.renderer = new HybridRenderer(this, params.rendererSettings);\r\n break;\r\n }\r\n this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);\r\n this.renderer.setProjectInterface(this.projectInterface);\r\n this.animType = animType;\r\n if (params.loop === ''\r\n || params.loop === null\r\n || params.loop === undefined\r\n || params.loop === true) {\r\n this.loop = true;\r\n } else if (params.loop === false) {\r\n this.loop = false;\r\n } else {\r\n this.loop = parseInt(params.loop, 10);\r\n }\r\n this.autoplay = 'autoplay' in params ? params.autoplay : true;\r\n this.name = params.name ? params.name : '';\r\n this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;\r\n this.assetsPath = params.assetsPath;\r\n this.initialSegment = params.initialSegment;\r\n if (params.audioFactory) {\r\n this.audioController.setAudioFactory(params.audioFactory);\r\n }\r\n if (params.animationData) {\r\n this.setupAnimation(params.animationData);\r\n } else if (params.path) {\r\n if (params.path.lastIndexOf('\\\\') !== -1) {\r\n this.path = params.path.substr(0, params.path.lastIndexOf('\\\\') + 1);\r\n } else {\r\n this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);\r\n }\r\n this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);\r\n this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));\r\n dataManager.loadAnimation(\r\n params.path,\r\n this.configAnimation,\r\n this.onSetupError\r\n );\r\n }\r\n};\r\n\r\nAnimationItem.prototype.onSetupError = function () {\r\n this.trigger('data_failed');\r\n};\r\n\r\nAnimationItem.prototype.setupAnimation = function (data) {\r\n dataManager.completeAnimation(\r\n data,\r\n this.configAnimation\r\n );\r\n};\r\n\r\nAnimationItem.prototype.setData = function (wrapper, animationData) {\r\n if (animationData) {\r\n if (typeof animationData !== 'object') {\r\n animationData = JSON.parse(animationData);\r\n }\r\n }\r\n var params = {\r\n wrapper: wrapper,\r\n animationData: animationData,\r\n };\r\n var wrapperAttributes = wrapper.attributes;\r\n\r\n params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-animation-path').value\r\n : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-path').value\r\n : wrapperAttributes.getNamedItem('bm-path')\r\n ? wrapperAttributes.getNamedItem('bm-path').value\r\n : '';\r\n params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-anim-type').value\r\n : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-type').value\r\n : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('bm-type').value\r\n : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-renderer').value\r\n : wrapperAttributes.getNamedItem('bm-renderer')\r\n ? wrapperAttributes.getNamedItem('bm-renderer').value\r\n : 'canvas';\r\n\r\n var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-anim-loop').value\r\n : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-loop').value\r\n : wrapperAttributes.getNamedItem('bm-loop')\r\n ? wrapperAttributes.getNamedItem('bm-loop').value\r\n : '';\r\n if (loop === 'false') {\r\n params.loop = false;\r\n } else if (loop === 'true') {\r\n params.loop = true;\r\n } else if (loop !== '') {\r\n params.loop = parseInt(loop, 10);\r\n }\r\n var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-anim-autoplay').value\r\n : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-autoplay').value\r\n : wrapperAttributes.getNamedItem('bm-autoplay')\r\n ? wrapperAttributes.getNamedItem('bm-autoplay').value\r\n : true;\r\n params.autoplay = autoplay !== 'false';\r\n\r\n params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-name').value\r\n : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-name').value\r\n : wrapperAttributes.getNamedItem('bm-name')\r\n ? wrapperAttributes.getNamedItem('bm-name').value\r\n : '';\r\n var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-anim-prerender').value\r\n : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-prerender').value\r\n : wrapperAttributes.getNamedItem('bm-prerender')\r\n ? wrapperAttributes.getNamedItem('bm-prerender').value\r\n : '';\r\n\r\n if (prerender === 'false') {\r\n params.prerender = false;\r\n }\r\n this.setParams(params);\r\n};\r\n\r\nAnimationItem.prototype.includeLayers = function (data) {\r\n if (data.op > this.animationData.op) {\r\n this.animationData.op = data.op;\r\n this.totalFrames = Math.floor(data.op - this.animationData.ip);\r\n }\r\n var layers = this.animationData.layers;\r\n var i;\r\n var len = layers.length;\r\n var newLayers = data.layers;\r\n var j;\r\n var jLen = newLayers.length;\r\n for (j = 0; j < jLen; j += 1) {\r\n i = 0;\r\n while (i < len) {\r\n if (layers[i].id === newLayers[j].id) {\r\n layers[i] = newLayers[j];\r\n break;\r\n }\r\n i += 1;\r\n }\r\n }\r\n if (data.chars || data.fonts) {\r\n this.renderer.globalData.fontManager.addChars(data.chars);\r\n this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);\r\n }\r\n if (data.assets) {\r\n len = data.assets.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.animationData.assets.push(data.assets[i]);\r\n }\r\n }\r\n this.animationData.__complete = false;\r\n dataManager.completeAnimation(\r\n this.animationData,\r\n this.onSegmentComplete\r\n );\r\n};\r\n\r\nAnimationItem.prototype.onSegmentComplete = function (data) {\r\n this.animationData = data;\r\n if (expressionsPlugin) {\r\n expressionsPlugin.initExpressions(this);\r\n }\r\n this.loadNextSegment();\r\n};\r\n\r\nAnimationItem.prototype.loadNextSegment = function () {\r\n var segments = this.animationData.segments;\r\n if (!segments || segments.length === 0 || !this.autoloadSegments) {\r\n this.trigger('data_ready');\r\n this.timeCompleted = this.totalFrames;\r\n return;\r\n }\r\n var segment = segments.shift();\r\n this.timeCompleted = segment.time * this.frameRate;\r\n var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';\r\n this.segmentPos += 1;\r\n dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {\r\n this.trigger('data_failed');\r\n }.bind(this));\r\n};\r\n\r\nAnimationItem.prototype.loadSegments = function () {\r\n var segments = this.animationData.segments;\r\n if (!segments) {\r\n this.timeCompleted = this.totalFrames;\r\n }\r\n this.loadNextSegment();\r\n};\r\n\r\nAnimationItem.prototype.imagesLoaded = function () {\r\n this.trigger('loaded_images');\r\n this.checkLoaded();\r\n};\r\n\r\nAnimationItem.prototype.preloadImages = function () {\r\n this.imagePreloader.setAssetsPath(this.assetsPath);\r\n this.imagePreloader.setPath(this.path);\r\n this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));\r\n};\r\n\r\nAnimationItem.prototype.configAnimation = function (animData) {\r\n if (!this.renderer) {\r\n return;\r\n }\r\n try {\r\n this.animationData = animData;\r\n if (this.initialSegment) {\r\n this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);\r\n this.firstFrame = Math.round(this.initialSegment[0]);\r\n } else {\r\n this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);\r\n this.firstFrame = Math.round(this.animationData.ip);\r\n }\r\n this.renderer.configAnimation(animData);\r\n if (!animData.assets) {\r\n animData.assets = [];\r\n }\r\n\r\n this.assets = this.animationData.assets;\r\n this.frameRate = this.animationData.fr;\r\n this.frameMult = this.animationData.fr / 1000;\r\n this.renderer.searchExtraCompositions(animData.assets);\r\n this.markers = markerParser(animData.markers || []);\r\n this.trigger('config_ready');\r\n this.preloadImages();\r\n this.loadSegments();\r\n this.updaFrameModifier();\r\n this.waitForFontsLoaded();\r\n if (this.isPaused) {\r\n this.audioController.pause();\r\n }\r\n } catch (error) {\r\n this.triggerConfigError(error);\r\n }\r\n};\r\n\r\nAnimationItem.prototype.waitForFontsLoaded = function () {\r\n if (!this.renderer) {\r\n return;\r\n }\r\n if (this.renderer.globalData.fontManager.isLoaded) {\r\n this.checkLoaded();\r\n } else {\r\n setTimeout(this.waitForFontsLoaded.bind(this), 20);\r\n }\r\n};\r\n\r\nAnimationItem.prototype.checkLoaded = function () {\r\n if (!this.isLoaded\r\n && this.renderer.globalData.fontManager.isLoaded\r\n && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas')\r\n && (this.imagePreloader.loadedFootages())\r\n ) {\r\n this.isLoaded = true;\r\n if (expressionsPlugin) {\r\n expressionsPlugin.initExpressions(this);\r\n }\r\n this.renderer.initItems();\r\n setTimeout(function () {\r\n this.trigger('DOMLoaded');\r\n }.bind(this), 0);\r\n this.gotoFrame();\r\n if (this.autoplay) {\r\n this.play();\r\n }\r\n }\r\n};\r\n\r\nAnimationItem.prototype.resize = function () {\r\n this.renderer.updateContainerSize();\r\n};\r\n\r\nAnimationItem.prototype.setSubframe = function (flag) {\r\n this.isSubframeEnabled = !!flag;\r\n};\r\n\r\nAnimationItem.prototype.gotoFrame = function () {\r\n this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise\r\n\r\n if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {\r\n this.currentFrame = this.timeCompleted;\r\n }\r\n this.trigger('enterFrame');\r\n this.renderFrame();\r\n this.trigger('drawnFrame');\r\n};\r\n\r\nAnimationItem.prototype.renderFrame = function () {\r\n if (this.isLoaded === false || !this.renderer) {\r\n return;\r\n }\r\n try {\r\n this.renderer.renderFrame(this.currentFrame + this.firstFrame);\r\n } catch (error) {\r\n this.triggerRenderFrameError(error);\r\n }\r\n};\r\n\r\nAnimationItem.prototype.play = function (name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n if (this.isPaused === true) {\r\n this.isPaused = false;\r\n this.audioController.resume();\r\n if (this._idle) {\r\n this._idle = false;\r\n this.trigger('_active');\r\n }\r\n }\r\n};\r\n\r\nAnimationItem.prototype.pause = function (name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n if (this.isPaused === false) {\r\n this.isPaused = true;\r\n this._idle = true;\r\n this.trigger('_idle');\r\n this.audioController.pause();\r\n }\r\n};\r\n\r\nAnimationItem.prototype.togglePause = function (name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n if (this.isPaused === true) {\r\n this.play();\r\n } else {\r\n this.pause();\r\n }\r\n};\r\n\r\nAnimationItem.prototype.stop = function (name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n this.pause();\r\n this.playCount = 0;\r\n this._completedLoop = false;\r\n this.setCurrentRawFrameValue(0);\r\n};\r\n\r\nAnimationItem.prototype.getMarkerData = function (markerName) {\r\n var marker;\r\n for (var i = 0; i < this.markers.length; i += 1) {\r\n marker = this.markers[i];\r\n if (marker.payload && marker.payload.name === markerName) {\r\n return marker;\r\n }\r\n }\r\n return null;\r\n};\r\n\r\nAnimationItem.prototype.goToAndStop = function (value, isFrame, name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n var numValue = Number(value);\r\n if (isNaN(numValue)) {\r\n var marker = this.getMarkerData(value);\r\n if (marker) {\r\n this.goToAndStop(marker.time, true);\r\n }\r\n } else if (isFrame) {\r\n this.setCurrentRawFrameValue(value);\r\n } else {\r\n this.setCurrentRawFrameValue(value * this.frameModifier);\r\n }\r\n this.pause();\r\n};\r\n\r\nAnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n var numValue = Number(value);\r\n if (isNaN(numValue)) {\r\n var marker = this.getMarkerData(value);\r\n if (marker) {\r\n if (!marker.duration) {\r\n this.goToAndStop(marker.time, true);\r\n } else {\r\n this.playSegments([marker.time, marker.time + marker.duration], true);\r\n }\r\n }\r\n } else {\r\n this.goToAndStop(numValue, isFrame, name);\r\n }\r\n this.play();\r\n};\r\n\r\nAnimationItem.prototype.advanceTime = function (value) {\r\n if (this.isPaused === true || this.isLoaded === false) {\r\n return;\r\n }\r\n var nextValue = this.currentRawFrame + value * this.frameModifier;\r\n var _isComplete = false;\r\n // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.\r\n // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.\r\n if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {\r\n if (!this.loop || this.playCount === this.loop) {\r\n if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {\r\n _isComplete = true;\r\n nextValue = this.totalFrames - 1;\r\n }\r\n } else if (nextValue >= this.totalFrames) {\r\n this.playCount += 1;\r\n if (!this.checkSegments(nextValue % this.totalFrames)) {\r\n this.setCurrentRawFrameValue(nextValue % this.totalFrames);\r\n this._completedLoop = true;\r\n this.trigger('loopComplete');\r\n }\r\n } else {\r\n this.setCurrentRawFrameValue(nextValue);\r\n }\r\n } else if (nextValue < 0) {\r\n if (!this.checkSegments(nextValue % this.totalFrames)) {\r\n if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) { // eslint-disable-line no-plusplus\r\n this.setCurrentRawFrameValue(this.totalFrames + (nextValue % this.totalFrames));\r\n if (!this._completedLoop) {\r\n this._completedLoop = true;\r\n } else {\r\n this.trigger('loopComplete');\r\n }\r\n } else {\r\n _isComplete = true;\r\n nextValue = 0;\r\n }\r\n }\r\n } else {\r\n this.setCurrentRawFrameValue(nextValue);\r\n }\r\n if (_isComplete) {\r\n this.setCurrentRawFrameValue(nextValue);\r\n this.pause();\r\n this.trigger('complete');\r\n }\r\n};\r\n\r\nAnimationItem.prototype.adjustSegment = function (arr, offset) {\r\n this.playCount = 0;\r\n if (arr[1] < arr[0]) {\r\n if (this.frameModifier > 0) {\r\n if (this.playSpeed < 0) {\r\n this.setSpeed(-this.playSpeed);\r\n } else {\r\n this.setDirection(-1);\r\n }\r\n }\r\n this.totalFrames = arr[0] - arr[1];\r\n this.timeCompleted = this.totalFrames;\r\n this.firstFrame = arr[1];\r\n this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);\r\n } else if (arr[1] > arr[0]) {\r\n if (this.frameModifier < 0) {\r\n if (this.playSpeed < 0) {\r\n this.setSpeed(-this.playSpeed);\r\n } else {\r\n this.setDirection(1);\r\n }\r\n }\r\n this.totalFrames = arr[1] - arr[0];\r\n this.timeCompleted = this.totalFrames;\r\n this.firstFrame = arr[0];\r\n this.setCurrentRawFrameValue(0.001 + offset);\r\n }\r\n this.trigger('segmentStart');\r\n};\r\nAnimationItem.prototype.setSegment = function (init, end) {\r\n var pendingFrame = -1;\r\n if (this.isPaused) {\r\n if (this.currentRawFrame + this.firstFrame < init) {\r\n pendingFrame = init;\r\n } else if (this.currentRawFrame + this.firstFrame > end) {\r\n pendingFrame = end - init;\r\n }\r\n }\r\n\r\n this.firstFrame = init;\r\n this.totalFrames = end - init;\r\n this.timeCompleted = this.totalFrames;\r\n if (pendingFrame !== -1) {\r\n this.goToAndStop(pendingFrame, true);\r\n }\r\n};\r\n\r\nAnimationItem.prototype.playSegments = function (arr, forceFlag) {\r\n if (forceFlag) {\r\n this.segments.length = 0;\r\n }\r\n if (typeof arr[0] === 'object') {\r\n var i;\r\n var len = arr.length;\r\n for (i = 0; i < len; i += 1) {\r\n this.segments.push(arr[i]);\r\n }\r\n } else {\r\n this.segments.push(arr);\r\n }\r\n if (this.segments.length && forceFlag) {\r\n this.adjustSegment(this.segments.shift(), 0);\r\n }\r\n if (this.isPaused) {\r\n this.play();\r\n }\r\n};\r\n\r\nAnimationItem.prototype.resetSegments = function (forceFlag) {\r\n this.segments.length = 0;\r\n this.segments.push([this.animationData.ip, this.animationData.op]);\r\n if (forceFlag) {\r\n this.checkSegments(0);\r\n }\r\n};\r\nAnimationItem.prototype.checkSegments = function (offset) {\r\n if (this.segments.length) {\r\n this.adjustSegment(this.segments.shift(), offset);\r\n return true;\r\n }\r\n return false;\r\n};\r\n\r\nAnimationItem.prototype.destroy = function (name) {\r\n if ((name && this.name !== name) || !this.renderer) {\r\n return;\r\n }\r\n this.renderer.destroy();\r\n this.imagePreloader.destroy();\r\n this.trigger('destroy');\r\n this._cbs = null;\r\n this.onEnterFrame = null;\r\n this.onLoopComplete = null;\r\n this.onComplete = null;\r\n this.onSegmentStart = null;\r\n this.onDestroy = null;\r\n this.renderer = null;\r\n this.renderer = null;\r\n this.imagePreloader = null;\r\n this.projectInterface = null;\r\n};\r\n\r\nAnimationItem.prototype.setCurrentRawFrameValue = function (value) {\r\n this.currentRawFrame = value;\r\n this.gotoFrame();\r\n};\r\n\r\nAnimationItem.prototype.setSpeed = function (val) {\r\n this.playSpeed = val;\r\n this.updaFrameModifier();\r\n};\r\n\r\nAnimationItem.prototype.setDirection = function (val) {\r\n this.playDirection = val < 0 ? -1 : 1;\r\n this.updaFrameModifier();\r\n};\r\n\r\nAnimationItem.prototype.setVolume = function (val, name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n this.audioController.setVolume(val);\r\n};\r\n\r\nAnimationItem.prototype.getVolume = function () {\r\n return this.audioController.getVolume();\r\n};\r\n\r\nAnimationItem.prototype.mute = function (name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n this.audioController.mute();\r\n};\r\n\r\nAnimationItem.prototype.unmute = function (name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n this.audioController.unmute();\r\n};\r\n\r\nAnimationItem.prototype.updaFrameModifier = function () {\r\n this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;\r\n this.audioController.setRate(this.playSpeed * this.playDirection);\r\n};\r\n\r\nAnimationItem.prototype.getPath = function () {\r\n return this.path;\r\n};\r\n\r\nAnimationItem.prototype.getAssetsPath = function (assetData) {\r\n var path = '';\r\n if (assetData.e) {\r\n path = assetData.p;\r\n } else if (this.assetsPath) {\r\n var imagePath = assetData.p;\r\n if (imagePath.indexOf('images/') !== -1) {\r\n imagePath = imagePath.split('/')[1];\r\n }\r\n path = this.assetsPath + imagePath;\r\n } else {\r\n path = this.path;\r\n path += assetData.u ? assetData.u : '';\r\n path += assetData.p;\r\n }\r\n return path;\r\n};\r\n\r\nAnimationItem.prototype.getAssetData = function (id) {\r\n var i = 0;\r\n var len = this.assets.length;\r\n while (i < len) {\r\n if (id === this.assets[i].id) {\r\n return this.assets[i];\r\n }\r\n i += 1;\r\n }\r\n return null;\r\n};\r\n\r\nAnimationItem.prototype.hide = function () {\r\n this.renderer.hide();\r\n};\r\n\r\nAnimationItem.prototype.show = function () {\r\n this.renderer.show();\r\n};\r\n\r\nAnimationItem.prototype.getDuration = function (isFrame) {\r\n return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;\r\n};\r\n\r\nAnimationItem.prototype.trigger = function (name) {\r\n if (this._cbs && this._cbs[name]) {\r\n switch (name) {\r\n case 'enterFrame':\r\n case 'drawnFrame':\r\n this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));\r\n break;\r\n case 'loopComplete':\r\n this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));\r\n break;\r\n case 'complete':\r\n this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));\r\n break;\r\n case 'segmentStart':\r\n this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));\r\n break;\r\n case 'destroy':\r\n this.triggerEvent(name, new BMDestroyEvent(name, this));\r\n break;\r\n default:\r\n this.triggerEvent(name);\r\n }\r\n }\r\n if (name === 'enterFrame' && this.onEnterFrame) {\r\n this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));\r\n }\r\n if (name === 'loopComplete' && this.onLoopComplete) {\r\n this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));\r\n }\r\n if (name === 'complete' && this.onComplete) {\r\n this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));\r\n }\r\n if (name === 'segmentStart' && this.onSegmentStart) {\r\n this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));\r\n }\r\n if (name === 'destroy' && this.onDestroy) {\r\n this.onDestroy.call(this, new BMDestroyEvent(name, this));\r\n }\r\n};\r\n\r\nAnimationItem.prototype.triggerRenderFrameError = function (nativeError) {\r\n var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);\r\n this.triggerEvent('error', error);\r\n\r\n if (this.onError) {\r\n this.onError.call(this, error);\r\n }\r\n};\r\n\r\nAnimationItem.prototype.triggerConfigError = function (nativeError) {\r\n var error = new BMConfigErrorEvent(nativeError, this.currentFrame);\r\n this.triggerEvent('error', error);\r\n\r\n if (this.onError) {\r\n this.onError.call(this, error);\r\n }\r\n};\r\n\r\n/* global CompExpressionInterface, expressionsPlugin: writable */\r\n/* exported expressionsPlugin */\r\n\r\nvar Expressions = (function () {\r\n var ob = {};\r\n ob.initExpressions = initExpressions;\r\n\r\n function initExpressions(animation) {\r\n var stackCount = 0;\r\n var registers = [];\r\n\r\n function pushExpression() {\r\n stackCount += 1;\r\n }\r\n\r\n function popExpression() {\r\n stackCount -= 1;\r\n if (stackCount === 0) {\r\n releaseInstances();\r\n }\r\n }\r\n\r\n function registerExpressionProperty(expression) {\r\n if (registers.indexOf(expression) === -1) {\r\n registers.push(expression);\r\n }\r\n }\r\n\r\n function releaseInstances() {\r\n var i;\r\n var len = registers.length;\r\n for (i = 0; i < len; i += 1) {\r\n registers[i].release();\r\n }\r\n registers.length = 0;\r\n }\r\n\r\n animation.renderer.compInterface = CompExpressionInterface(animation.renderer);\r\n animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);\r\n animation.renderer.globalData.pushExpression = pushExpression;\r\n animation.renderer.globalData.popExpression = popExpression;\r\n animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;\r\n }\r\n return ob;\r\n}());\r\n\r\nexpressionsPlugin = Expressions;\r\n\r\n/* eslint-disable camelcase, no-unused-vars */\r\n/* global BMMath, BezierFactory, createTypedArray, degToRads, shapePool */\r\n\r\nvar ExpressionManager = (function () {\r\n 'use strict';\r\n\r\n var ob = {};\r\n var Math = BMMath;\r\n var window = null;\r\n var document = null;\r\n var XMLHttpRequest = null;\r\n var fetch = null;\r\n var frames = null;\r\n\r\n function $bm_isInstanceOfArray(arr) {\r\n return arr.constructor === Array || arr.constructor === Float32Array;\r\n }\r\n\r\n function isNumerable(tOfV, v) {\r\n return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;\r\n }\r\n\r\n function $bm_neg(a) {\r\n var tOfA = typeof a;\r\n if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) {\r\n return -a;\r\n }\r\n if ($bm_isInstanceOfArray(a)) {\r\n var i;\r\n var lenA = a.length;\r\n var retArr = [];\r\n for (i = 0; i < lenA; i += 1) {\r\n retArr[i] = -a[i];\r\n }\r\n return retArr;\r\n }\r\n if (a.propType) {\r\n return a.v;\r\n }\r\n return -a;\r\n }\r\n\r\n var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;\r\n var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;\r\n var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;\r\n\r\n function sum(a, b) {\r\n var tOfA = typeof a;\r\n var tOfB = typeof b;\r\n if (tOfA === 'string' || tOfB === 'string') {\r\n return a + b;\r\n }\r\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\r\n return a + b;\r\n }\r\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\r\n a = a.slice(0);\r\n a[0] += b;\r\n return a;\r\n }\r\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\r\n b = b.slice(0);\r\n b[0] = a + b[0];\r\n return b;\r\n }\r\n if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {\r\n var i = 0;\r\n var lenA = a.length;\r\n var lenB = b.length;\r\n var retArr = [];\r\n while (i < lenA || i < lenB) {\r\n if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {\r\n retArr[i] = a[i] + b[i];\r\n } else {\r\n retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];\r\n }\r\n i += 1;\r\n }\r\n return retArr;\r\n }\r\n return 0;\r\n }\r\n var add = sum;\r\n\r\n function sub(a, b) {\r\n var tOfA = typeof a;\r\n var tOfB = typeof b;\r\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\r\n if (tOfA === 'string') {\r\n a = parseInt(a, 10);\r\n }\r\n if (tOfB === 'string') {\r\n b = parseInt(b, 10);\r\n }\r\n return a - b;\r\n }\r\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\r\n a = a.slice(0);\r\n a[0] -= b;\r\n return a;\r\n }\r\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\r\n b = b.slice(0);\r\n b[0] = a - b[0];\r\n return b;\r\n }\r\n if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {\r\n var i = 0;\r\n var lenA = a.length;\r\n var lenB = b.length;\r\n var retArr = [];\r\n while (i < lenA || i < lenB) {\r\n if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {\r\n retArr[i] = a[i] - b[i];\r\n } else {\r\n retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];\r\n }\r\n i += 1;\r\n }\r\n return retArr;\r\n }\r\n return 0;\r\n }\r\n\r\n function mul(a, b) {\r\n var tOfA = typeof a;\r\n var tOfB = typeof b;\r\n var arr;\r\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\r\n return a * b;\r\n }\r\n\r\n var i;\r\n var len;\r\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\r\n len = a.length;\r\n arr = createTypedArray('float32', len);\r\n for (i = 0; i < len; i += 1) {\r\n arr[i] = a[i] * b;\r\n }\r\n return arr;\r\n }\r\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\r\n len = b.length;\r\n arr = createTypedArray('float32', len);\r\n for (i = 0; i < len; i += 1) {\r\n arr[i] = a * b[i];\r\n }\r\n return arr;\r\n }\r\n return 0;\r\n }\r\n\r\n function div(a, b) {\r\n var tOfA = typeof a;\r\n var tOfB = typeof b;\r\n var arr;\r\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\r\n return a / b;\r\n }\r\n var i;\r\n var len;\r\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\r\n len = a.length;\r\n arr = createTypedArray('float32', len);\r\n for (i = 0; i < len; i += 1) {\r\n arr[i] = a[i] / b;\r\n }\r\n return arr;\r\n }\r\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\r\n len = b.length;\r\n arr = createTypedArray('float32', len);\r\n for (i = 0; i < len; i += 1) {\r\n arr[i] = a / b[i];\r\n }\r\n return arr;\r\n }\r\n return 0;\r\n }\r\n function mod(a, b) {\r\n if (typeof a === 'string') {\r\n a = parseInt(a, 10);\r\n }\r\n if (typeof b === 'string') {\r\n b = parseInt(b, 10);\r\n }\r\n return a % b;\r\n }\r\n var $bm_sum = sum;\r\n var $bm_sub = sub;\r\n var $bm_mul = mul;\r\n var $bm_div = div;\r\n var $bm_mod = mod;\r\n\r\n function clamp(num, min, max) {\r\n if (min > max) {\r\n var mm = max;\r\n max = min;\r\n min = mm;\r\n }\r\n return Math.min(Math.max(num, min), max);\r\n }\r\n\r\n function radiansToDegrees(val) {\r\n return val / degToRads;\r\n }\r\n var radians_to_degrees = radiansToDegrees;\r\n\r\n function degreesToRadians(val) {\r\n return val * degToRads;\r\n }\r\n var degrees_to_radians = radiansToDegrees;\r\n\r\n var helperLengthArray = [0, 0, 0, 0, 0, 0];\r\n\r\n function length(arr1, arr2) {\r\n if (typeof arr1 === 'number' || arr1 instanceof Number) {\r\n arr2 = arr2 || 0;\r\n return Math.abs(arr1 - arr2);\r\n }\r\n if (!arr2) {\r\n arr2 = helperLengthArray;\r\n }\r\n var i;\r\n var len = Math.min(arr1.length, arr2.length);\r\n var addedLength = 0;\r\n for (i = 0; i < len; i += 1) {\r\n addedLength += Math.pow(arr2[i] - arr1[i], 2);\r\n }\r\n return Math.sqrt(addedLength);\r\n }\r\n\r\n function normalize(vec) {\r\n return div(vec, length(vec));\r\n }\r\n\r\n function rgbToHsl(val) {\r\n var r = val[0]; var g = val[1]; var b = val[2];\r\n var max = Math.max(r, g, b);\r\n var min = Math.min(r, g, b);\r\n var h;\r\n var s;\r\n var l = (max + min) / 2;\r\n\r\n if (max === min) {\r\n h = 0; // achromatic\r\n s = 0; // achromatic\r\n } else {\r\n var d = max - min;\r\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\r\n switch (max) {\r\n case r: h = (g - b) / d + (g < b ? 6 : 0); break;\r\n case g: h = (b - r) / d + 2; break;\r\n case b: h = (r - g) / d + 4; break;\r\n default: break;\r\n }\r\n h /= 6;\r\n }\r\n\r\n return [h, s, l, val[3]];\r\n }\r\n\r\n function hue2rgb(p, q, t) {\r\n if (t < 0) t += 1;\r\n if (t > 1) t -= 1;\r\n if (t < 1 / 6) return p + (q - p) * 6 * t;\r\n if (t < 1 / 2) return q;\r\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\r\n return p;\r\n }\r\n\r\n function hslToRgb(val) {\r\n var h = val[0];\r\n var s = val[1];\r\n var l = val[2];\r\n\r\n var r;\r\n var g;\r\n var b;\r\n\r\n if (s === 0) {\r\n r = l; // achromatic\r\n b = l; // achromatic\r\n g = l; // achromatic\r\n } else {\r\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\r\n var p = 2 * l - q;\r\n r = hue2rgb(p, q, h + 1 / 3);\r\n g = hue2rgb(p, q, h);\r\n b = hue2rgb(p, q, h - 1 / 3);\r\n }\r\n\r\n return [r, g, b, val[3]];\r\n }\r\n\r\n function linear(t, tMin, tMax, value1, value2) {\r\n if (value1 === undefined || value2 === undefined) {\r\n value1 = tMin;\r\n value2 = tMax;\r\n tMin = 0;\r\n tMax = 1;\r\n }\r\n if (tMax < tMin) {\r\n var _tMin = tMax;\r\n tMax = tMin;\r\n tMin = _tMin;\r\n }\r\n if (t <= tMin) {\r\n return value1;\r\n } if (t >= tMax) {\r\n return value2;\r\n }\r\n var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);\r\n if (!value1.length) {\r\n return value1 + (value2 - value1) * perc;\r\n }\r\n var i;\r\n var len = value1.length;\r\n var arr = createTypedArray('float32', len);\r\n for (i = 0; i < len; i += 1) {\r\n arr[i] = value1[i] + (value2[i] - value1[i]) * perc;\r\n }\r\n return arr;\r\n }\r\n function random(min, max) {\r\n if (max === undefined) {\r\n if (min === undefined) {\r\n min = 0;\r\n max = 1;\r\n } else {\r\n max = min;\r\n min = undefined;\r\n }\r\n }\r\n if (max.length) {\r\n var i;\r\n var len = max.length;\r\n if (!min) {\r\n min = createTypedArray('float32', len);\r\n }\r\n var arr = createTypedArray('float32', len);\r\n var rnd = BMMath.random();\r\n for (i = 0; i < len; i += 1) {\r\n arr[i] = min[i] + rnd * (max[i] - min[i]);\r\n }\r\n return arr;\r\n }\r\n if (min === undefined) {\r\n min = 0;\r\n }\r\n var rndm = BMMath.random();\r\n return min + rndm * (max - min);\r\n }\r\n\r\n function createPath(points, inTangents, outTangents, closed) {\r\n var i;\r\n var len = points.length;\r\n var path = shapePool.newElement();\r\n path.setPathData(!!closed, len);\r\n var arrPlaceholder = [0, 0];\r\n var inVertexPoint;\r\n var outVertexPoint;\r\n for (i = 0; i < len; i += 1) {\r\n inVertexPoint = (inTangents && inTangents[i]) ? inTangents[i] : arrPlaceholder;\r\n outVertexPoint = (outTangents && outTangents[i]) ? outTangents[i] : arrPlaceholder;\r\n path.setTripleAt(points[i][0], points[i][1], outVertexPoint[0] + points[i][0], outVertexPoint[1] + points[i][1], inVertexPoint[0] + points[i][0], inVertexPoint[1] + points[i][1], i, true);\r\n }\r\n return path;\r\n }\r\n\r\n function initiateExpression(elem, data, property) {\r\n var val = data.x;\r\n var needsVelocity = /velocity(?![\\w\\d])/.test(val);\r\n var _needsRandom = val.indexOf('random') !== -1;\r\n var elemType = elem.data.ty;\r\n var transform;\r\n var $bm_transform;\r\n var content;\r\n var effect;\r\n var thisProperty = property;\r\n thisProperty.valueAtTime = thisProperty.getValueAtTime;\r\n Object.defineProperty(thisProperty, 'value', {\r\n get: function () {\r\n return thisProperty.v;\r\n },\r\n });\r\n elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;\r\n elem.comp.displayStartTime = 0;\r\n var inPoint = elem.data.ip / elem.comp.globalData.frameRate;\r\n var outPoint = elem.data.op / elem.comp.globalData.frameRate;\r\n var width = elem.data.sw ? elem.data.sw : 0;\r\n var height = elem.data.sh ? elem.data.sh : 0;\r\n var name = elem.data.nm;\r\n var loopIn;\r\n var loop_in;\r\n var loopOut;\r\n var loop_out;\r\n var smooth;\r\n var toWorld;\r\n var fromWorld;\r\n var fromComp;\r\n var toComp;\r\n var fromCompToSurface;\r\n var position;\r\n var rotation;\r\n var anchorPoint;\r\n var scale;\r\n var thisLayer;\r\n var thisComp;\r\n var mask;\r\n var valueAtTime;\r\n var velocityAtTime;\r\n\r\n var scoped_bm_rt;\r\n // val = val.replace(/(\\\\?\"|')((http)(s)?(:\\/))?\\/.*?(\\\\?\"|')/g, \"\\\"\\\"\"); // deter potential network calls\r\n var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval\r\n var numKeys = property.kf ? data.k.length : 0;\r\n\r\n var active = !this.data || this.data.hd !== true;\r\n\r\n var wiggle = function wiggle(freq, amp) {\r\n var iWiggle;\r\n var j;\r\n var lenWiggle = this.pv.length ? this.pv.length : 1;\r\n var addedAmps = createTypedArray('float32', lenWiggle);\r\n freq = 5;\r\n var iterations = Math.floor(time * freq);\r\n iWiggle = 0;\r\n j = 0;\r\n while (iWiggle < iterations) {\r\n // var rnd = BMMath.random();\r\n for (j = 0; j < lenWiggle; j += 1) {\r\n addedAmps[j] += -amp + amp * 2 * BMMath.random();\r\n // addedAmps[j] += -amp + amp*2*rnd;\r\n }\r\n iWiggle += 1;\r\n }\r\n // var rnd2 = BMMath.random();\r\n var periods = time * freq;\r\n var perc = periods - Math.floor(periods);\r\n var arr = createTypedArray('float32', lenWiggle);\r\n if (lenWiggle > 1) {\r\n for (j = 0; j < lenWiggle; j += 1) {\r\n arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc;\r\n // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;\r\n // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);\r\n }\r\n return arr;\r\n }\r\n return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;\r\n }.bind(this);\r\n\r\n if (thisProperty.loopIn) {\r\n loopIn = thisProperty.loopIn.bind(thisProperty);\r\n loop_in = loopIn;\r\n }\r\n\r\n if (thisProperty.loopOut) {\r\n loopOut = thisProperty.loopOut.bind(thisProperty);\r\n loop_out = loopOut;\r\n }\r\n\r\n if (thisProperty.smooth) {\r\n smooth = thisProperty.smooth.bind(thisProperty);\r\n }\r\n\r\n function loopInDuration(type, duration) {\r\n return loopIn(type, duration, true);\r\n }\r\n\r\n function loopOutDuration(type, duration) {\r\n return loopOut(type, duration, true);\r\n }\r\n\r\n if (this.getValueAtTime) {\r\n valueAtTime = this.getValueAtTime.bind(this);\r\n }\r\n\r\n if (this.getVelocityAtTime) {\r\n velocityAtTime = this.getVelocityAtTime.bind(this);\r\n }\r\n\r\n var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);\r\n\r\n function lookAt(elem1, elem2) {\r\n var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];\r\n var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;\r\n var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;\r\n return [yaw, pitch, 0];\r\n }\r\n\r\n function easeOut(t, tMin, tMax, val1, val2) {\r\n return applyEase(easeOutBez, t, tMin, tMax, val1, val2);\r\n }\r\n\r\n function easeIn(t, tMin, tMax, val1, val2) {\r\n return applyEase(easeInBez, t, tMin, tMax, val1, val2);\r\n }\r\n\r\n function ease(t, tMin, tMax, val1, val2) {\r\n return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);\r\n }\r\n\r\n function applyEase(fn, t, tMin, tMax, val1, val2) {\r\n if (val1 === undefined) {\r\n val1 = tMin;\r\n val2 = tMax;\r\n } else {\r\n t = (t - tMin) / (tMax - tMin);\r\n }\r\n if (t > 1) {\r\n t = 1;\r\n } else if (t < 0) {\r\n t = 0;\r\n }\r\n var mult = fn(t);\r\n if ($bm_isInstanceOfArray(val1)) {\r\n var iKey;\r\n var lenKey = val1.length;\r\n var arr = createTypedArray('float32', lenKey);\r\n for (iKey = 0; iKey < lenKey; iKey += 1) {\r\n arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];\r\n }\r\n return arr;\r\n }\r\n return (val2 - val1) * mult + val1;\r\n }\r\n\r\n function nearestKey(time) {\r\n var iKey;\r\n var lenKey = data.k.length;\r\n var index;\r\n var keyTime;\r\n if (!data.k.length || typeof (data.k[0]) === 'number') {\r\n index = 0;\r\n keyTime = 0;\r\n } else {\r\n index = -1;\r\n time *= elem.comp.globalData.frameRate;\r\n if (time < data.k[0].t) {\r\n index = 1;\r\n keyTime = data.k[0].t;\r\n } else {\r\n for (iKey = 0; iKey < lenKey - 1; iKey += 1) {\r\n if (time === data.k[iKey].t) {\r\n index = iKey + 1;\r\n keyTime = data.k[iKey].t;\r\n break;\r\n } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {\r\n if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {\r\n index = iKey + 2;\r\n keyTime = data.k[iKey + 1].t;\r\n } else {\r\n index = iKey + 1;\r\n keyTime = data.k[iKey].t;\r\n }\r\n break;\r\n }\r\n }\r\n if (index === -1) {\r\n index = iKey + 1;\r\n keyTime = data.k[iKey].t;\r\n }\r\n }\r\n }\r\n var obKey = {};\r\n obKey.index = index;\r\n obKey.time = keyTime / elem.comp.globalData.frameRate;\r\n return obKey;\r\n }\r\n\r\n function key(ind) {\r\n var obKey;\r\n var iKey;\r\n var lenKey;\r\n if (!data.k.length || typeof (data.k[0]) === 'number') {\r\n throw new Error('The property has no keyframe at index ' + ind);\r\n }\r\n ind -= 1;\r\n obKey = {\r\n time: data.k[ind].t / elem.comp.globalData.frameRate,\r\n value: [],\r\n };\r\n var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;\r\n\r\n lenKey = arr.length;\r\n for (iKey = 0; iKey < lenKey; iKey += 1) {\r\n obKey[iKey] = arr[iKey];\r\n obKey.value[iKey] = arr[iKey];\r\n }\r\n return obKey;\r\n }\r\n\r\n function framesToTime(fr, fps) {\r\n if (!fps) {\r\n fps = elem.comp.globalData.frameRate;\r\n }\r\n return fr / fps;\r\n }\r\n\r\n function timeToFrames(t, fps) {\r\n if (!t && t !== 0) {\r\n t = time;\r\n }\r\n if (!fps) {\r\n fps = elem.comp.globalData.frameRate;\r\n }\r\n return t * fps;\r\n }\r\n\r\n function seedRandom(seed) {\r\n BMMath.seedrandom(randSeed + seed);\r\n }\r\n\r\n function sourceRectAtTime() {\r\n return elem.sourceRectAtTime();\r\n }\r\n\r\n function substring(init, end) {\r\n if (typeof value === 'string') {\r\n if (end === undefined) {\r\n return value.substring(init);\r\n }\r\n return value.substring(init, end);\r\n }\r\n return '';\r\n }\r\n\r\n function substr(init, end) {\r\n if (typeof value === 'string') {\r\n if (end === undefined) {\r\n return value.substr(init);\r\n }\r\n return value.substr(init, end);\r\n }\r\n return '';\r\n }\r\n\r\n function posterizeTime(framesPerSecond) {\r\n time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;\r\n value = valueAtTime(time);\r\n }\r\n\r\n var time;\r\n var velocity;\r\n var value;\r\n var text;\r\n var textIndex;\r\n var textTotal;\r\n var selectorValue;\r\n var index = elem.data.ind;\r\n var hasParent = !!(elem.hierarchy && elem.hierarchy.length);\r\n var parent;\r\n var randSeed = Math.floor(Math.random() * 1000000);\r\n var globalData = elem.globalData;\r\n function executeExpression(_value) {\r\n // globalData.pushExpression();\r\n value = _value;\r\n if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {\r\n return value;\r\n }\r\n if (this.propType === 'textSelector') {\r\n textIndex = this.textIndex;\r\n textTotal = this.textTotal;\r\n selectorValue = this.selectorValue;\r\n }\r\n if (!thisLayer) {\r\n text = elem.layerInterface.text;\r\n thisLayer = elem.layerInterface;\r\n thisComp = elem.comp.compInterface;\r\n toWorld = thisLayer.toWorld.bind(thisLayer);\r\n fromWorld = thisLayer.fromWorld.bind(thisLayer);\r\n fromComp = thisLayer.fromComp.bind(thisLayer);\r\n toComp = thisLayer.toComp.bind(thisLayer);\r\n mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;\r\n fromCompToSurface = fromComp;\r\n }\r\n if (!transform) {\r\n transform = elem.layerInterface('ADBE Transform Group');\r\n $bm_transform = transform;\r\n if (transform) {\r\n anchorPoint = transform.anchorPoint;\r\n /* position = transform.position;\r\n rotation = transform.rotation;\r\n scale = transform.scale; */\r\n }\r\n }\r\n\r\n if (elemType === 4 && !content) {\r\n content = thisLayer('ADBE Root Vectors Group');\r\n }\r\n if (!effect) {\r\n effect = thisLayer(4);\r\n }\r\n hasParent = !!(elem.hierarchy && elem.hierarchy.length);\r\n if (hasParent && !parent) {\r\n parent = elem.hierarchy[0].layerInterface;\r\n }\r\n time = this.comp.renderedFrame / this.comp.globalData.frameRate;\r\n if (_needsRandom) {\r\n seedRandom(randSeed + time);\r\n }\r\n if (needsVelocity) {\r\n velocity = velocityAtTime(time);\r\n }\r\n expression_function();\r\n this.frameExpressionId = elem.globalData.frameId;\r\n\r\n // TODO: Check if it's possible to return on ShapeInterface the .v value\r\n if (scoped_bm_rt.propType === 'shape') {\r\n scoped_bm_rt = scoped_bm_rt.v;\r\n }\r\n // globalData.popExpression();\r\n return scoped_bm_rt;\r\n }\r\n return executeExpression;\r\n }\r\n\r\n ob.initiateExpression = initiateExpression;\r\n return ob;\r\n}());\r\n\r\n/* global ExpressionManager, createTypedArray */\r\n/* exported expressionHelpers */\r\n\r\nvar expressionHelpers = (function () {\r\n function searchExpressions(elem, data, prop) {\r\n if (data.x) {\r\n prop.k = true;\r\n prop.x = true;\r\n prop.initiateExpression = ExpressionManager.initiateExpression;\r\n prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));\r\n }\r\n }\r\n\r\n function getValueAtTime(frameNum) {\r\n frameNum *= this.elem.globalData.frameRate;\r\n frameNum -= this.offsetTime;\r\n if (frameNum !== this._cachingAtTime.lastFrame) {\r\n this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;\r\n this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);\r\n this._cachingAtTime.lastFrame = frameNum;\r\n }\r\n return this._cachingAtTime.value;\r\n }\r\n\r\n function getSpeedAtTime(frameNum) {\r\n var delta = -0.01;\r\n var v1 = this.getValueAtTime(frameNum);\r\n var v2 = this.getValueAtTime(frameNum + delta);\r\n var speed = 0;\r\n if (v1.length) {\r\n var i;\r\n for (i = 0; i < v1.length; i += 1) {\r\n speed += Math.pow(v2[i] - v1[i], 2);\r\n }\r\n speed = Math.sqrt(speed) * 100;\r\n } else {\r\n speed = 0;\r\n }\r\n return speed;\r\n }\r\n\r\n function getVelocityAtTime(frameNum) {\r\n if (this.vel !== undefined) {\r\n return this.vel;\r\n }\r\n var delta = -0.001;\r\n // frameNum += this.elem.data.st;\r\n var v1 = this.getValueAtTime(frameNum);\r\n var v2 = this.getValueAtTime(frameNum + delta);\r\n var velocity;\r\n if (v1.length) {\r\n velocity = createTypedArray('float32', v1.length);\r\n var i;\r\n for (i = 0; i < v1.length; i += 1) {\r\n // removing frameRate\r\n // if needed, don't add it here\r\n // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);\r\n velocity[i] = (v2[i] - v1[i]) / delta;\r\n }\r\n } else {\r\n velocity = (v2 - v1) / delta;\r\n }\r\n return velocity;\r\n }\r\n\r\n function getStaticValueAtTime() {\r\n return this.pv;\r\n }\r\n\r\n function setGroupProperty(propertyGroup) {\r\n this.propertyGroup = propertyGroup;\r\n }\r\n\r\n return {\r\n searchExpressions: searchExpressions,\r\n getSpeedAtTime: getSpeedAtTime,\r\n getVelocityAtTime: getVelocityAtTime,\r\n getValueAtTime: getValueAtTime,\r\n getStaticValueAtTime: getStaticValueAtTime,\r\n setGroupProperty: setGroupProperty,\r\n };\r\n}());\r\n\r\n/* global createTypedArray, Matrix, TransformPropertyFactory, expressionHelpers, PropertyFactory, expressionHelpers,\r\ninitialDefaultFrame, shapePool, ShapePropertyFactory, bez, extendPrototype, ExpressionManager, createSizedArray */\r\n\r\n(function addPropertyDecorator() {\r\n function loopOut(type, duration, durationFlag) {\r\n if (!this.k || !this.keyframes) {\r\n return this.pv;\r\n }\r\n type = type ? type.toLowerCase() : '';\r\n var currentFrame = this.comp.renderedFrame;\r\n var keyframes = this.keyframes;\r\n var lastKeyFrame = keyframes[keyframes.length - 1].t;\r\n if (currentFrame <= lastKeyFrame) {\r\n return this.pv;\r\n }\r\n var cycleDuration;\r\n var firstKeyFrame;\r\n if (!durationFlag) {\r\n if (!duration || duration > keyframes.length - 1) {\r\n duration = keyframes.length - 1;\r\n }\r\n firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;\r\n cycleDuration = lastKeyFrame - firstKeyFrame;\r\n } else {\r\n if (!duration) {\r\n cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);\r\n } else {\r\n cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);\r\n }\r\n firstKeyFrame = lastKeyFrame - cycleDuration;\r\n }\r\n var i;\r\n var len;\r\n var ret;\r\n if (type === 'pingpong') {\r\n var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);\r\n if (iterations % 2 !== 0) {\r\n return this.getValueAtTime(((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n }\r\n } else if (type === 'offset') {\r\n var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\r\n var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\r\n var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);\r\n if (this.pv.length) {\r\n ret = new Array(initV.length);\r\n len = ret.length;\r\n for (i = 0; i < len; i += 1) {\r\n ret[i] = (endV[i] - initV[i]) * repeats + current[i];\r\n }\r\n return ret;\r\n }\r\n return (endV - initV) * repeats + current;\r\n } else if (type === 'continue') {\r\n var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\r\n var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);\r\n if (this.pv.length) {\r\n ret = new Array(lastValue.length);\r\n len = ret.length;\r\n for (i = 0; i < len; i += 1) {\r\n ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line\r\n }\r\n return ret;\r\n }\r\n return lastValue + (lastValue - nextLastValue) * (((currentFrame - lastKeyFrame)) / 0.001);\r\n }\r\n return this.getValueAtTime((((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n\r\n }\r\n\r\n function loopIn(type, duration, durationFlag) {\r\n if (!this.k) {\r\n return this.pv;\r\n }\r\n type = type ? type.toLowerCase() : '';\r\n var currentFrame = this.comp.renderedFrame;\r\n var keyframes = this.keyframes;\r\n var firstKeyFrame = keyframes[0].t;\r\n if (currentFrame >= firstKeyFrame) {\r\n return this.pv;\r\n }\r\n var cycleDuration;\r\n var lastKeyFrame;\r\n if (!durationFlag) {\r\n if (!duration || duration > keyframes.length - 1) {\r\n duration = keyframes.length - 1;\r\n }\r\n lastKeyFrame = keyframes[duration].t;\r\n cycleDuration = lastKeyFrame - firstKeyFrame;\r\n } else {\r\n if (!duration) {\r\n cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);\r\n } else {\r\n cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);\r\n }\r\n lastKeyFrame = firstKeyFrame + cycleDuration;\r\n }\r\n var i;\r\n var len;\r\n var ret;\r\n if (type === 'pingpong') {\r\n var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);\r\n if (iterations % 2 === 0) {\r\n return this.getValueAtTime((((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n }\r\n } else if (type === 'offset') {\r\n var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\r\n var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\r\n var current = this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration) + firstKeyFrame) / this.comp.globalData.frameRate, 0);\r\n var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;\r\n if (this.pv.length) {\r\n ret = new Array(initV.length);\r\n len = ret.length;\r\n for (i = 0; i < len; i += 1) {\r\n ret[i] = current[i] - (endV[i] - initV[i]) * repeats;\r\n }\r\n return ret;\r\n }\r\n return current - (endV - initV) * repeats;\r\n } else if (type === 'continue') {\r\n var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\r\n var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);\r\n if (this.pv.length) {\r\n ret = new Array(firstValue.length);\r\n len = ret.length;\r\n for (i = 0; i < len; i += 1) {\r\n ret[i] = firstValue[i] + ((firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame)) / 0.001;\r\n }\r\n return ret;\r\n }\r\n return firstValue + ((firstValue - nextFirstValue) * (firstKeyFrame - currentFrame)) / 0.001;\r\n }\r\n return this.getValueAtTime(((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame))) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n\r\n }\r\n\r\n function smooth(width, samples) {\r\n if (!this.k) {\r\n return this.pv;\r\n }\r\n width = (width || 0.4) * 0.5;\r\n samples = Math.floor(samples || 5);\r\n if (samples <= 1) {\r\n return this.pv;\r\n }\r\n var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;\r\n var initFrame = currentTime - width;\r\n var endFrame = currentTime + width;\r\n var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;\r\n var i = 0;\r\n var j = 0;\r\n var value;\r\n if (this.pv.length) {\r\n value = createTypedArray('float32', this.pv.length);\r\n } else {\r\n value = 0;\r\n }\r\n var sampleValue;\r\n while (i < samples) {\r\n sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);\r\n if (this.pv.length) {\r\n for (j = 0; j < this.pv.length; j += 1) {\r\n value[j] += sampleValue[j];\r\n }\r\n } else {\r\n value += sampleValue;\r\n }\r\n i += 1;\r\n }\r\n if (this.pv.length) {\r\n for (j = 0; j < this.pv.length; j += 1) {\r\n value[j] /= samples;\r\n }\r\n } else {\r\n value /= samples;\r\n }\r\n return value;\r\n }\r\n\r\n function getTransformValueAtTime(time) {\r\n if (!this._transformCachingAtTime) {\r\n this._transformCachingAtTime = {\r\n v: new Matrix(),\r\n };\r\n }\r\n /// /\r\n var matrix = this._transformCachingAtTime.v;\r\n matrix.cloneFromProps(this.pre.props);\r\n if (this.appliedTransformations < 1) {\r\n var anchor = this.a.getValueAtTime(time);\r\n matrix.translate(\r\n -anchor[0] * this.a.mult,\r\n -anchor[1] * this.a.mult,\r\n anchor[2] * this.a.mult\r\n );\r\n }\r\n if (this.appliedTransformations < 2) {\r\n var scale = this.s.getValueAtTime(time);\r\n matrix.scale(\r\n scale[0] * this.s.mult,\r\n scale[1] * this.s.mult,\r\n scale[2] * this.s.mult\r\n );\r\n }\r\n if (this.sk && this.appliedTransformations < 3) {\r\n var skew = this.sk.getValueAtTime(time);\r\n var skewAxis = this.sa.getValueAtTime(time);\r\n matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);\r\n }\r\n if (this.r && this.appliedTransformations < 4) {\r\n var rotation = this.r.getValueAtTime(time);\r\n matrix.rotate(-rotation * this.r.mult);\r\n } else if (!this.r && this.appliedTransformations < 4) {\r\n var rotationZ = this.rz.getValueAtTime(time);\r\n var rotationY = this.ry.getValueAtTime(time);\r\n var rotationX = this.rx.getValueAtTime(time);\r\n var orientation = this.or.getValueAtTime(time);\r\n matrix.rotateZ(-rotationZ * this.rz.mult)\r\n .rotateY(rotationY * this.ry.mult)\r\n .rotateX(rotationX * this.rx.mult)\r\n .rotateZ(-orientation[2] * this.or.mult)\r\n .rotateY(orientation[1] * this.or.mult)\r\n .rotateX(orientation[0] * this.or.mult);\r\n }\r\n if (this.data.p && this.data.p.s) {\r\n var positionX = this.px.getValueAtTime(time);\r\n var positionY = this.py.getValueAtTime(time);\r\n if (this.data.p.z) {\r\n var positionZ = this.pz.getValueAtTime(time);\r\n matrix.translate(\r\n positionX * this.px.mult,\r\n positionY * this.py.mult,\r\n -positionZ * this.pz.mult\r\n );\r\n } else {\r\n matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);\r\n }\r\n } else {\r\n var position = this.p.getValueAtTime(time);\r\n matrix.translate(\r\n position[0] * this.p.mult,\r\n position[1] * this.p.mult,\r\n -position[2] * this.p.mult\r\n );\r\n }\r\n return matrix;\r\n /// /\r\n }\r\n\r\n function getTransformStaticValueAtTime() {\r\n return this.v.clone(new Matrix());\r\n }\r\n\r\n var getTransformProperty = TransformPropertyFactory.getTransformProperty;\r\n TransformPropertyFactory.getTransformProperty = function (elem, data, container) {\r\n var prop = getTransformProperty(elem, data, container);\r\n if (prop.dynamicProperties.length) {\r\n prop.getValueAtTime = getTransformValueAtTime.bind(prop);\r\n } else {\r\n prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);\r\n }\r\n prop.setGroupProperty = expressionHelpers.setGroupProperty;\r\n return prop;\r\n };\r\n\r\n var propertyGetProp = PropertyFactory.getProp;\r\n PropertyFactory.getProp = function (elem, data, type, mult, container) {\r\n var prop = propertyGetProp(elem, data, type, mult, container);\r\n // prop.getVelocityAtTime = getVelocityAtTime;\r\n // prop.loopOut = loopOut;\r\n // prop.loopIn = loopIn;\r\n if (prop.kf) {\r\n prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);\r\n } else {\r\n prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);\r\n }\r\n prop.setGroupProperty = expressionHelpers.setGroupProperty;\r\n prop.loopOut = loopOut;\r\n prop.loopIn = loopIn;\r\n prop.smooth = smooth;\r\n prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);\r\n prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);\r\n prop.numKeys = data.a === 1 ? data.k.length : 0;\r\n prop.propertyIndex = data.ix;\r\n var value = 0;\r\n if (type !== 0) {\r\n value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);\r\n }\r\n prop._cachingAtTime = {\r\n lastFrame: initialDefaultFrame,\r\n lastIndex: 0,\r\n value: value,\r\n };\r\n expressionHelpers.searchExpressions(elem, data, prop);\r\n if (prop.k) {\r\n container.addDynamicProperty(prop);\r\n }\r\n\r\n return prop;\r\n };\r\n\r\n function getShapeValueAtTime(frameNum) {\r\n // For now this caching object is created only when needed instead of creating it when the shape is initialized.\r\n if (!this._cachingAtTime) {\r\n this._cachingAtTime = {\r\n shapeValue: shapePool.clone(this.pv),\r\n lastIndex: 0,\r\n lastTime: initialDefaultFrame,\r\n };\r\n }\r\n\r\n frameNum *= this.elem.globalData.frameRate;\r\n frameNum -= this.offsetTime;\r\n if (frameNum !== this._cachingAtTime.lastTime) {\r\n this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;\r\n this._cachingAtTime.lastTime = frameNum;\r\n this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);\r\n }\r\n return this._cachingAtTime.shapeValue;\r\n }\r\n\r\n var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();\r\n var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();\r\n\r\n function ShapeExpressions() {}\r\n ShapeExpressions.prototype = {\r\n vertices: function (prop, time) {\r\n if (this.k) {\r\n this.getValue();\r\n }\r\n var shapePath = this.v;\r\n if (time !== undefined) {\r\n shapePath = this.getValueAtTime(time, 0);\r\n }\r\n var i;\r\n var len = shapePath._length;\r\n var vertices = shapePath[prop];\r\n var points = shapePath.v;\r\n var arr = createSizedArray(len);\r\n for (i = 0; i < len; i += 1) {\r\n if (prop === 'i' || prop === 'o') {\r\n arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];\r\n } else {\r\n arr[i] = [vertices[i][0], vertices[i][1]];\r\n }\r\n }\r\n return arr;\r\n },\r\n points: function (time) {\r\n return this.vertices('v', time);\r\n },\r\n inTangents: function (time) {\r\n return this.vertices('i', time);\r\n },\r\n outTangents: function (time) {\r\n return this.vertices('o', time);\r\n },\r\n isClosed: function () {\r\n return this.v.c;\r\n },\r\n pointOnPath: function (perc, time) {\r\n var shapePath = this.v;\r\n if (time !== undefined) {\r\n shapePath = this.getValueAtTime(time, 0);\r\n }\r\n if (!this._segmentsLength) {\r\n this._segmentsLength = bez.getSegmentsLength(shapePath);\r\n }\r\n\r\n var segmentsLength = this._segmentsLength;\r\n var lengths = segmentsLength.lengths;\r\n var lengthPos = segmentsLength.totalLength * perc;\r\n var i = 0;\r\n var len = lengths.length;\r\n var accumulatedLength = 0;\r\n var pt;\r\n while (i < len) {\r\n if (accumulatedLength + lengths[i].addedLength > lengthPos) {\r\n var initIndex = i;\r\n var endIndex = (shapePath.c && i === len - 1) ? 0 : i + 1;\r\n var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;\r\n pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);\r\n break;\r\n } else {\r\n accumulatedLength += lengths[i].addedLength;\r\n }\r\n i += 1;\r\n }\r\n if (!pt) {\r\n pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];\r\n }\r\n return pt;\r\n },\r\n vectorOnPath: function (perc, time, vectorType) {\r\n // perc doesn't use triple equality because it can be a Number object as well as a primitive.\r\n if (perc == 1) { // eslint-disable-line eqeqeq\r\n perc = this.v.c;\r\n } else if (perc == 0) { // eslint-disable-line eqeqeq\r\n perc = 0.999;\r\n }\r\n var pt1 = this.pointOnPath(perc, time);\r\n var pt2 = this.pointOnPath(perc + 0.001, time);\r\n var xLength = pt2[0] - pt1[0];\r\n var yLength = pt2[1] - pt1[1];\r\n var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));\r\n if (magnitude === 0) {\r\n return [0, 0];\r\n }\r\n var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];\r\n return unitVector;\r\n },\r\n tangentOnPath: function (perc, time) {\r\n return this.vectorOnPath(perc, time, 'tangent');\r\n },\r\n normalOnPath: function (perc, time) {\r\n return this.vectorOnPath(perc, time, 'normal');\r\n },\r\n setGroupProperty: expressionHelpers.setGroupProperty,\r\n getValueAtTime: expressionHelpers.getStaticValueAtTime,\r\n };\r\n extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);\r\n extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);\r\n KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;\r\n KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;\r\n\r\n var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;\r\n ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {\r\n var prop = propertyGetShapeProp(elem, data, type, arr, trims);\r\n prop.propertyIndex = data.ix;\r\n prop.lock = false;\r\n if (type === 3) {\r\n expressionHelpers.searchExpressions(elem, data.pt, prop);\r\n } else if (type === 4) {\r\n expressionHelpers.searchExpressions(elem, data.ks, prop);\r\n }\r\n if (prop.k) {\r\n elem.addDynamicProperty(prop);\r\n }\r\n return prop;\r\n };\r\n}());\r\n\r\n/* global ExpressionManager, TextProperty */\r\n\r\n(function addDecorator() {\r\n function searchExpressions() {\r\n if (this.data.d.x) {\r\n this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);\r\n this.addEffect(this.getExpressionValue.bind(this));\r\n return true;\r\n }\r\n return null;\r\n }\r\n\r\n TextProperty.prototype.getExpressionValue = function (currentValue, text) {\r\n var newValue = this.calculateExpression(text);\r\n if (currentValue.t !== newValue) {\r\n var newData = {};\r\n this.copyData(newData, currentValue);\r\n newData.t = newValue.toString();\r\n newData.__complete = false;\r\n return newData;\r\n }\r\n return currentValue;\r\n };\r\n\r\n TextProperty.prototype.searchProperty = function () {\r\n var isKeyframed = this.searchKeyframes();\r\n var hasExpressions = this.searchExpressions();\r\n this.kf = isKeyframed || hasExpressions;\r\n return this.kf;\r\n };\r\n\r\n TextProperty.prototype.searchExpressions = searchExpressions;\r\n}());\r\n\r\n/* global propertyGroupFactory, PropertyInterface */\r\n/* exported ShapePathInterface */\r\n\r\nvar ShapePathInterface = (\r\n\r\n function () {\r\n return function pathInterfaceFactory(shape, view, propertyGroup) {\r\n var prop = view.sh;\r\n\r\n function interfaceFunction(val) {\r\n if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) {\r\n return interfaceFunction.path;\r\n }\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n prop.setGroupProperty(PropertyInterface('Path', _propertyGroup));\r\n Object.defineProperties(interfaceFunction, {\r\n path: {\r\n get: function () {\r\n if (prop.k) {\r\n prop.getValue();\r\n }\r\n return prop;\r\n },\r\n },\r\n shape: {\r\n get: function () {\r\n if (prop.k) {\r\n prop.getValue();\r\n }\r\n return prop;\r\n },\r\n },\r\n _name: { value: shape.nm },\r\n ix: { value: shape.ix },\r\n propertyIndex: { value: shape.ix },\r\n mn: { value: shape.mn },\r\n propertyGroup: { value: propertyGroup },\r\n });\r\n return interfaceFunction;\r\n };\r\n }()\r\n);\r\n\r\n/* exported propertyGroupFactory */\r\n\r\nvar propertyGroupFactory = (function () {\r\n return function (interfaceFunction, parentPropertyGroup) {\r\n return function (val) {\r\n val = val === undefined ? 1 : val;\r\n if (val <= 0) {\r\n return interfaceFunction;\r\n }\r\n return parentPropertyGroup(val - 1);\r\n };\r\n };\r\n}());\r\n\r\n/* exported PropertyInterface */\r\n\r\nvar PropertyInterface = (function () {\r\n return function (propertyName, propertyGroup) {\r\n var interfaceFunction = {\r\n _name: propertyName,\r\n };\r\n\r\n function _propertyGroup(val) {\r\n val = val === undefined ? 1 : val;\r\n if (val <= 0) {\r\n return interfaceFunction;\r\n }\r\n return propertyGroup(val - 1);\r\n }\r\n\r\n return _propertyGroup;\r\n };\r\n}());\r\n\r\n/* global ExpressionPropertyInterface, PropertyInterface, propertyGroupFactory, ShapePathInterface */\r\n/* exported ShapeExpressionInterface */\r\n\r\nvar ShapeExpressionInterface = (function () {\r\n function iterateElements(shapes, view, propertyGroup) {\r\n var arr = [];\r\n var i;\r\n var len = shapes ? shapes.length : 0;\r\n for (i = 0; i < len; i += 1) {\r\n if (shapes[i].ty === 'gr') {\r\n arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'fl') {\r\n arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'st') {\r\n arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'tm') {\r\n arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'tr') {\r\n // arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));\r\n } else if (shapes[i].ty === 'el') {\r\n arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'sr') {\r\n arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'sh') {\r\n arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'rc') {\r\n arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'rd') {\r\n arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'rp') {\r\n arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'gf') {\r\n arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else {\r\n arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n }\r\n }\r\n return arr;\r\n }\r\n\r\n function contentsInterfaceFactory(shape, view, propertyGroup) {\r\n var interfaces;\r\n var interfaceFunction = function _interfaceFunction(value) {\r\n var i = 0;\r\n var len = interfaces.length;\r\n while (i < len) {\r\n if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {\r\n return interfaces[i];\r\n }\r\n i += 1;\r\n }\r\n if (typeof value === 'number') {\r\n return interfaces[value - 1];\r\n }\r\n return null;\r\n };\r\n\r\n interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);\r\n interfaceFunction.numProperties = interfaces.length;\r\n var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);\r\n interfaceFunction.transform = transformInterface;\r\n interfaceFunction.propertyIndex = shape.cix;\r\n interfaceFunction._name = shape.nm;\r\n\r\n return interfaceFunction;\r\n }\r\n\r\n function groupInterfaceFactory(shape, view, propertyGroup) {\r\n var interfaceFunction = function _interfaceFunction(value) {\r\n switch (value) {\r\n case 'ADBE Vectors Group':\r\n case 'Contents':\r\n case 2:\r\n return interfaceFunction.content;\r\n // Not necessary for now. Keeping them here in case a new case appears\r\n // case 'ADBE Vector Transform Group':\r\n // case 3:\r\n default:\r\n return interfaceFunction.transform;\r\n }\r\n };\r\n interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);\r\n var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);\r\n interfaceFunction.content = content;\r\n interfaceFunction.transform = transformInterface;\r\n Object.defineProperty(interfaceFunction, '_name', {\r\n get: function () {\r\n return shape.nm;\r\n },\r\n });\r\n // interfaceFunction.content = interfaceFunction;\r\n interfaceFunction.numProperties = shape.np;\r\n interfaceFunction.propertyIndex = shape.ix;\r\n interfaceFunction.nm = shape.nm;\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n function fillInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(val) {\r\n if (val === 'Color' || val === 'color') {\r\n return interfaceFunction.color;\r\n } if (val === 'Opacity' || val === 'opacity') {\r\n return interfaceFunction.opacity;\r\n }\r\n return null;\r\n }\r\n Object.defineProperties(interfaceFunction, {\r\n color: {\r\n get: ExpressionPropertyInterface(view.c),\r\n },\r\n opacity: {\r\n get: ExpressionPropertyInterface(view.o),\r\n },\r\n _name: { value: shape.nm },\r\n mn: { value: shape.mn },\r\n });\r\n\r\n view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));\r\n view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));\r\n return interfaceFunction;\r\n }\r\n\r\n function gradientFillInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(val) {\r\n if (val === 'Start Point' || val === 'start point') {\r\n return interfaceFunction.startPoint;\r\n }\r\n if (val === 'End Point' || val === 'end point') {\r\n return interfaceFunction.endPoint;\r\n }\r\n if (val === 'Opacity' || val === 'opacity') {\r\n return interfaceFunction.opacity;\r\n }\r\n return null;\r\n }\r\n Object.defineProperties(interfaceFunction, {\r\n startPoint: {\r\n get: ExpressionPropertyInterface(view.s),\r\n },\r\n endPoint: {\r\n get: ExpressionPropertyInterface(view.e),\r\n },\r\n opacity: {\r\n get: ExpressionPropertyInterface(view.o),\r\n },\r\n type: {\r\n get: function () {\r\n return 'a';\r\n },\r\n },\r\n _name: { value: shape.nm },\r\n mn: { value: shape.mn },\r\n });\r\n\r\n view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));\r\n view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));\r\n view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));\r\n return interfaceFunction;\r\n }\r\n function defaultInterfaceFactory() {\r\n function interfaceFunction() {\r\n return null;\r\n }\r\n return interfaceFunction;\r\n }\r\n\r\n function strokeInterfaceFactory(shape, view, propertyGroup) {\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);\r\n function addPropertyToDashOb(i) {\r\n Object.defineProperty(dashOb, shape.d[i].nm, {\r\n get: ExpressionPropertyInterface(view.d.dataProps[i].p),\r\n });\r\n }\r\n var i;\r\n var len = shape.d ? shape.d.length : 0;\r\n var dashOb = {};\r\n for (i = 0; i < len; i += 1) {\r\n addPropertyToDashOb(i);\r\n view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);\r\n }\r\n\r\n function interfaceFunction(val) {\r\n if (val === 'Color' || val === 'color') {\r\n return interfaceFunction.color;\r\n } if (val === 'Opacity' || val === 'opacity') {\r\n return interfaceFunction.opacity;\r\n } if (val === 'Stroke Width' || val === 'stroke width') {\r\n return interfaceFunction.strokeWidth;\r\n }\r\n return null;\r\n }\r\n Object.defineProperties(interfaceFunction, {\r\n color: {\r\n get: ExpressionPropertyInterface(view.c),\r\n },\r\n opacity: {\r\n get: ExpressionPropertyInterface(view.o),\r\n },\r\n strokeWidth: {\r\n get: ExpressionPropertyInterface(view.w),\r\n },\r\n dash: {\r\n get: function () {\r\n return dashOb;\r\n },\r\n },\r\n _name: { value: shape.nm },\r\n mn: { value: shape.mn },\r\n });\r\n\r\n view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));\r\n view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\r\n view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));\r\n return interfaceFunction;\r\n }\r\n\r\n function trimInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(val) {\r\n if (val === shape.e.ix || val === 'End' || val === 'end') {\r\n return interfaceFunction.end;\r\n }\r\n if (val === shape.s.ix) {\r\n return interfaceFunction.start;\r\n }\r\n if (val === shape.o.ix) {\r\n return interfaceFunction.offset;\r\n }\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n interfaceFunction.propertyIndex = shape.ix;\r\n\r\n view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));\r\n view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));\r\n view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));\r\n interfaceFunction.propertyIndex = shape.ix;\r\n interfaceFunction.propertyGroup = propertyGroup;\r\n\r\n Object.defineProperties(interfaceFunction, {\r\n start: {\r\n get: ExpressionPropertyInterface(view.s),\r\n },\r\n end: {\r\n get: ExpressionPropertyInterface(view.e),\r\n },\r\n offset: {\r\n get: ExpressionPropertyInterface(view.o),\r\n },\r\n _name: { value: shape.nm },\r\n });\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n function transformInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(value) {\r\n if (shape.a.ix === value || value === 'Anchor Point') {\r\n return interfaceFunction.anchorPoint;\r\n }\r\n if (shape.o.ix === value || value === 'Opacity') {\r\n return interfaceFunction.opacity;\r\n }\r\n if (shape.p.ix === value || value === 'Position') {\r\n return interfaceFunction.position;\r\n }\r\n if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {\r\n return interfaceFunction.rotation;\r\n }\r\n if (shape.s.ix === value || value === 'Scale') {\r\n return interfaceFunction.scale;\r\n }\r\n if ((shape.sk && shape.sk.ix === value) || value === 'Skew') {\r\n return interfaceFunction.skew;\r\n }\r\n if ((shape.sa && shape.sa.ix === value) || value === 'Skew Axis') {\r\n return interfaceFunction.skewAxis;\r\n }\r\n return null;\r\n }\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\r\n view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\r\n view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));\r\n view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));\r\n view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\r\n if (view.transform.mProps.sk) {\r\n view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));\r\n view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));\r\n }\r\n view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\r\n Object.defineProperties(interfaceFunction, {\r\n opacity: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.o),\r\n },\r\n position: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.p),\r\n },\r\n anchorPoint: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.a),\r\n },\r\n scale: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.s),\r\n },\r\n rotation: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.r),\r\n },\r\n skew: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.sk),\r\n },\r\n skewAxis: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.sa),\r\n },\r\n _name: { value: shape.nm },\r\n });\r\n interfaceFunction.ty = 'tr';\r\n interfaceFunction.mn = shape.mn;\r\n interfaceFunction.propertyGroup = propertyGroup;\r\n return interfaceFunction;\r\n }\r\n\r\n function ellipseInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(value) {\r\n if (shape.p.ix === value) {\r\n return interfaceFunction.position;\r\n }\r\n if (shape.s.ix === value) {\r\n return interfaceFunction.size;\r\n }\r\n return null;\r\n }\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n interfaceFunction.propertyIndex = shape.ix;\r\n var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\r\n prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));\r\n prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\r\n\r\n Object.defineProperties(interfaceFunction, {\r\n size: {\r\n get: ExpressionPropertyInterface(prop.s),\r\n },\r\n position: {\r\n get: ExpressionPropertyInterface(prop.p),\r\n },\r\n _name: { value: shape.nm },\r\n });\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n function starInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(value) {\r\n if (shape.p.ix === value) {\r\n return interfaceFunction.position;\r\n }\r\n if (shape.r.ix === value) {\r\n return interfaceFunction.rotation;\r\n }\r\n if (shape.pt.ix === value) {\r\n return interfaceFunction.points;\r\n }\r\n if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {\r\n return interfaceFunction.outerRadius;\r\n }\r\n if (shape.os.ix === value) {\r\n return interfaceFunction.outerRoundness;\r\n }\r\n if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {\r\n return interfaceFunction.innerRadius;\r\n }\r\n if (shape.is && shape.is.ix === value) {\r\n return interfaceFunction.innerRoundness;\r\n }\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\r\n interfaceFunction.propertyIndex = shape.ix;\r\n prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));\r\n prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));\r\n prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));\r\n prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\r\n prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\r\n if (shape.ir) {\r\n prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));\r\n prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));\r\n }\r\n\r\n Object.defineProperties(interfaceFunction, {\r\n position: {\r\n get: ExpressionPropertyInterface(prop.p),\r\n },\r\n rotation: {\r\n get: ExpressionPropertyInterface(prop.r),\r\n },\r\n points: {\r\n get: ExpressionPropertyInterface(prop.pt),\r\n },\r\n outerRadius: {\r\n get: ExpressionPropertyInterface(prop.or),\r\n },\r\n outerRoundness: {\r\n get: ExpressionPropertyInterface(prop.os),\r\n },\r\n innerRadius: {\r\n get: ExpressionPropertyInterface(prop.ir),\r\n },\r\n innerRoundness: {\r\n get: ExpressionPropertyInterface(prop.is),\r\n },\r\n _name: { value: shape.nm },\r\n });\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n function rectInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(value) {\r\n if (shape.p.ix === value) {\r\n return interfaceFunction.position;\r\n }\r\n if (shape.r.ix === value) {\r\n return interfaceFunction.roundness;\r\n }\r\n if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {\r\n return interfaceFunction.size;\r\n }\r\n return null;\r\n }\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\r\n interfaceFunction.propertyIndex = shape.ix;\r\n prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\r\n prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));\r\n prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\r\n\r\n Object.defineProperties(interfaceFunction, {\r\n position: {\r\n get: ExpressionPropertyInterface(prop.p),\r\n },\r\n roundness: {\r\n get: ExpressionPropertyInterface(prop.r),\r\n },\r\n size: {\r\n get: ExpressionPropertyInterface(prop.s),\r\n },\r\n _name: { value: shape.nm },\r\n });\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n function roundedInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(value) {\r\n if (shape.r.ix === value || value === 'Round Corners 1') {\r\n return interfaceFunction.radius;\r\n }\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n var prop = view;\r\n interfaceFunction.propertyIndex = shape.ix;\r\n prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));\r\n\r\n Object.defineProperties(interfaceFunction, {\r\n radius: {\r\n get: ExpressionPropertyInterface(prop.rd),\r\n },\r\n _name: { value: shape.nm },\r\n });\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n function repeaterInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(value) {\r\n if (shape.c.ix === value || value === 'Copies') {\r\n return interfaceFunction.copies;\r\n } if (shape.o.ix === value || value === 'Offset') {\r\n return interfaceFunction.offset;\r\n }\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n var prop = view;\r\n interfaceFunction.propertyIndex = shape.ix;\r\n prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));\r\n prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));\r\n Object.defineProperties(interfaceFunction, {\r\n copies: {\r\n get: ExpressionPropertyInterface(prop.c),\r\n },\r\n offset: {\r\n get: ExpressionPropertyInterface(prop.o),\r\n },\r\n _name: { value: shape.nm },\r\n });\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n return function (shapes, view, propertyGroup) {\r\n var interfaces;\r\n function _interfaceFunction(value) {\r\n if (typeof value === 'number') {\r\n value = value === undefined ? 1 : value;\r\n if (value === 0) {\r\n return propertyGroup;\r\n }\r\n return interfaces[value - 1];\r\n }\r\n var i = 0;\r\n var len = interfaces.length;\r\n while (i < len) {\r\n if (interfaces[i]._name === value) {\r\n return interfaces[i];\r\n }\r\n i += 1;\r\n }\r\n return null;\r\n }\r\n function parentGroupWrapper() {\r\n return propertyGroup;\r\n }\r\n _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);\r\n interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);\r\n _interfaceFunction.numProperties = interfaces.length;\r\n _interfaceFunction._name = 'Contents';\r\n return _interfaceFunction;\r\n };\r\n}());\r\n\r\n/* exported TextExpressionInterface */\r\n\r\nvar TextExpressionInterface = (function () {\r\n return function (elem) {\r\n var _prevValue;\r\n var _sourceText;\r\n function _thisLayerFunction(name) {\r\n switch (name) {\r\n case 'ADBE Text Document':\r\n return _thisLayerFunction.sourceText;\r\n default:\r\n return null;\r\n }\r\n }\r\n Object.defineProperty(_thisLayerFunction, 'sourceText', {\r\n get: function () {\r\n elem.textProperty.getValue();\r\n var stringValue = elem.textProperty.currentData.t;\r\n if (stringValue !== _prevValue) {\r\n elem.textProperty.currentData.t = _prevValue;\r\n _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers\r\n // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive\r\n _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers\r\n }\r\n return _sourceText;\r\n },\r\n });\r\n return _thisLayerFunction;\r\n };\r\n}());\r\n\r\n/* global Matrix, MaskManagerInterface, TransformExpressionInterface, getDescriptor */\r\n/* exported LayerExpressionInterface */\r\n\r\nvar LayerExpressionInterface = (function () {\r\n function getMatrix(time) {\r\n var toWorldMat = new Matrix();\r\n if (time !== undefined) {\r\n var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);\r\n propMatrix.clone(toWorldMat);\r\n } else {\r\n var transformMat = this._elem.finalTransform.mProp;\r\n transformMat.applyToMatrix(toWorldMat);\r\n }\r\n return toWorldMat;\r\n }\r\n\r\n function toWorldVec(arr, time) {\r\n var toWorldMat = this.getMatrix(time);\r\n toWorldMat.props[12] = 0;\r\n toWorldMat.props[13] = 0;\r\n toWorldMat.props[14] = 0;\r\n return this.applyPoint(toWorldMat, arr);\r\n }\r\n\r\n function toWorld(arr, time) {\r\n var toWorldMat = this.getMatrix(time);\r\n return this.applyPoint(toWorldMat, arr);\r\n }\r\n\r\n function fromWorldVec(arr, time) {\r\n var toWorldMat = this.getMatrix(time);\r\n toWorldMat.props[12] = 0;\r\n toWorldMat.props[13] = 0;\r\n toWorldMat.props[14] = 0;\r\n return this.invertPoint(toWorldMat, arr);\r\n }\r\n\r\n function fromWorld(arr, time) {\r\n var toWorldMat = this.getMatrix(time);\r\n return this.invertPoint(toWorldMat, arr);\r\n }\r\n\r\n function applyPoint(matrix, arr) {\r\n if (this._elem.hierarchy && this._elem.hierarchy.length) {\r\n var i;\r\n var len = this._elem.hierarchy.length;\r\n for (i = 0; i < len; i += 1) {\r\n this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);\r\n }\r\n }\r\n return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);\r\n }\r\n\r\n function invertPoint(matrix, arr) {\r\n if (this._elem.hierarchy && this._elem.hierarchy.length) {\r\n var i;\r\n var len = this._elem.hierarchy.length;\r\n for (i = 0; i < len; i += 1) {\r\n this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);\r\n }\r\n }\r\n return matrix.inversePoint(arr);\r\n }\r\n\r\n function fromComp(arr) {\r\n var toWorldMat = new Matrix();\r\n toWorldMat.reset();\r\n this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);\r\n if (this._elem.hierarchy && this._elem.hierarchy.length) {\r\n var i;\r\n var len = this._elem.hierarchy.length;\r\n for (i = 0; i < len; i += 1) {\r\n this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);\r\n }\r\n return toWorldMat.inversePoint(arr);\r\n }\r\n return toWorldMat.inversePoint(arr);\r\n }\r\n\r\n function sampleImage() {\r\n return [1, 1, 1, 1];\r\n }\r\n\r\n return function (elem) {\r\n var transformInterface;\r\n\r\n function _registerMaskInterface(maskManager) {\r\n _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);\r\n }\r\n function _registerEffectsInterface(effects) {\r\n _thisLayerFunction.effect = effects;\r\n }\r\n\r\n function _thisLayerFunction(name) {\r\n switch (name) {\r\n case 'ADBE Root Vectors Group':\r\n case 'Contents':\r\n case 2:\r\n return _thisLayerFunction.shapeInterface;\r\n case 1:\r\n case 6:\r\n case 'Transform':\r\n case 'transform':\r\n case 'ADBE Transform Group':\r\n return transformInterface;\r\n case 4:\r\n case 'ADBE Effect Parade':\r\n case 'effects':\r\n case 'Effects':\r\n return _thisLayerFunction.effect;\r\n case 'ADBE Text Properties':\r\n return _thisLayerFunction.textInterface;\r\n default:\r\n return null;\r\n }\r\n }\r\n _thisLayerFunction.getMatrix = getMatrix;\r\n _thisLayerFunction.invertPoint = invertPoint;\r\n _thisLayerFunction.applyPoint = applyPoint;\r\n _thisLayerFunction.toWorld = toWorld;\r\n _thisLayerFunction.toWorldVec = toWorldVec;\r\n _thisLayerFunction.fromWorld = fromWorld;\r\n _thisLayerFunction.fromWorldVec = fromWorldVec;\r\n _thisLayerFunction.toComp = toWorld;\r\n _thisLayerFunction.fromComp = fromComp;\r\n _thisLayerFunction.sampleImage = sampleImage;\r\n _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);\r\n _thisLayerFunction._elem = elem;\r\n transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);\r\n var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');\r\n Object.defineProperties(_thisLayerFunction, {\r\n hasParent: {\r\n get: function () {\r\n return elem.hierarchy.length;\r\n },\r\n },\r\n parent: {\r\n get: function () {\r\n return elem.hierarchy[0].layerInterface;\r\n },\r\n },\r\n rotation: getDescriptor(transformInterface, 'rotation'),\r\n scale: getDescriptor(transformInterface, 'scale'),\r\n position: getDescriptor(transformInterface, 'position'),\r\n opacity: getDescriptor(transformInterface, 'opacity'),\r\n anchorPoint: anchorPointDescriptor,\r\n anchor_point: anchorPointDescriptor,\r\n transform: {\r\n get: function () {\r\n return transformInterface;\r\n },\r\n },\r\n active: {\r\n get: function () {\r\n return elem.isInRange;\r\n },\r\n },\r\n });\r\n\r\n _thisLayerFunction.startTime = elem.data.st;\r\n _thisLayerFunction.index = elem.data.ind;\r\n _thisLayerFunction.source = elem.data.refId;\r\n _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;\r\n _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;\r\n _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;\r\n _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;\r\n _thisLayerFunction._name = elem.data.nm;\r\n\r\n _thisLayerFunction.registerMaskInterface = _registerMaskInterface;\r\n _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;\r\n return _thisLayerFunction;\r\n };\r\n}());\r\n\r\n/* global */\r\n/* exported FootageInterface */\r\n\r\nvar FootageInterface = (function () {\r\n var outlineInterfaceFactory = (function (elem) {\r\n var currentPropertyName = '';\r\n var currentProperty = elem.getFootageData();\r\n function init() {\r\n currentPropertyName = '';\r\n currentProperty = elem.getFootageData();\r\n return searchProperty;\r\n }\r\n function searchProperty(value) {\r\n if (currentProperty[value]) {\r\n currentPropertyName = value;\r\n currentProperty = currentProperty[value];\r\n if (typeof currentProperty === 'object') {\r\n return searchProperty;\r\n }\r\n return currentProperty;\r\n }\r\n var propertyNameIndex = value.indexOf(currentPropertyName);\r\n if (propertyNameIndex !== -1) {\r\n var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);\r\n currentProperty = currentProperty[index];\r\n if (typeof currentProperty === 'object') {\r\n return searchProperty;\r\n }\r\n return currentProperty;\r\n }\r\n return '';\r\n }\r\n return init;\r\n });\r\n\r\n var dataInterfaceFactory = function (elem) {\r\n function interfaceFunction(value) {\r\n if (value === 'Outline') {\r\n return interfaceFunction.outlineInterface();\r\n }\r\n return null;\r\n }\r\n\r\n interfaceFunction._name = 'Outline';\r\n interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);\r\n return interfaceFunction;\r\n };\r\n\r\n return function (elem) {\r\n function _interfaceFunction(value) {\r\n if (value === 'Data') {\r\n return _interfaceFunction.dataInterface;\r\n }\r\n return null;\r\n }\r\n\r\n _interfaceFunction._name = 'Data';\r\n _interfaceFunction.dataInterface = dataInterfaceFactory(elem);\r\n return _interfaceFunction;\r\n };\r\n}());\r\n\r\n/* exported CompExpressionInterface */\r\n\r\nvar CompExpressionInterface = (function () {\r\n return function (comp) {\r\n function _thisLayerFunction(name) {\r\n var i = 0;\r\n var len = comp.layers.length;\r\n while (i < len) {\r\n if (comp.layers[i].nm === name || comp.layers[i].ind === name) {\r\n return comp.elements[i].layerInterface;\r\n }\r\n i += 1;\r\n }\r\n return null;\r\n // return {active:false};\r\n }\r\n Object.defineProperty(_thisLayerFunction, '_name', { value: comp.data.nm });\r\n _thisLayerFunction.layer = _thisLayerFunction;\r\n _thisLayerFunction.pixelAspect = 1;\r\n _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;\r\n _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;\r\n _thisLayerFunction.pixelAspect = 1;\r\n _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;\r\n _thisLayerFunction.displayStartTime = 0;\r\n _thisLayerFunction.numLayers = comp.layers.length;\r\n return _thisLayerFunction;\r\n };\r\n}());\r\n\r\n/* global ExpressionPropertyInterface */\r\n/* exported TransformExpressionInterface */\r\n\r\nvar TransformExpressionInterface = (function () {\r\n return function (transform) {\r\n function _thisFunction(name) {\r\n switch (name) {\r\n case 'scale':\r\n case 'Scale':\r\n case 'ADBE Scale':\r\n case 6:\r\n return _thisFunction.scale;\r\n case 'rotation':\r\n case 'Rotation':\r\n case 'ADBE Rotation':\r\n case 'ADBE Rotate Z':\r\n case 10:\r\n return _thisFunction.rotation;\r\n case 'ADBE Rotate X':\r\n return _thisFunction.xRotation;\r\n case 'ADBE Rotate Y':\r\n return _thisFunction.yRotation;\r\n case 'position':\r\n case 'Position':\r\n case 'ADBE Position':\r\n case 2:\r\n return _thisFunction.position;\r\n case 'ADBE Position_0':\r\n return _thisFunction.xPosition;\r\n case 'ADBE Position_1':\r\n return _thisFunction.yPosition;\r\n case 'ADBE Position_2':\r\n return _thisFunction.zPosition;\r\n case 'anchorPoint':\r\n case 'AnchorPoint':\r\n case 'Anchor Point':\r\n case 'ADBE AnchorPoint':\r\n case 1:\r\n return _thisFunction.anchorPoint;\r\n case 'opacity':\r\n case 'Opacity':\r\n case 11:\r\n return _thisFunction.opacity;\r\n default:\r\n return null;\r\n }\r\n }\r\n Object.defineProperty(_thisFunction, 'rotation', {\r\n get: ExpressionPropertyInterface(transform.r || transform.rz),\r\n });\r\n\r\n Object.defineProperty(_thisFunction, 'zRotation', {\r\n get: ExpressionPropertyInterface(transform.rz || transform.r),\r\n });\r\n\r\n Object.defineProperty(_thisFunction, 'xRotation', {\r\n get: ExpressionPropertyInterface(transform.rx),\r\n });\r\n\r\n Object.defineProperty(_thisFunction, 'yRotation', {\r\n get: ExpressionPropertyInterface(transform.ry),\r\n });\r\n Object.defineProperty(_thisFunction, 'scale', {\r\n get: ExpressionPropertyInterface(transform.s),\r\n });\r\n var _px;\r\n var _py;\r\n var _pz;\r\n var _transformFactory;\r\n if (transform.p) {\r\n _transformFactory = ExpressionPropertyInterface(transform.p);\r\n } else {\r\n _px = ExpressionPropertyInterface(transform.px);\r\n _py = ExpressionPropertyInterface(transform.py);\r\n if (transform.pz) {\r\n _pz = ExpressionPropertyInterface(transform.pz);\r\n }\r\n }\r\n Object.defineProperty(_thisFunction, 'position', {\r\n get: function () {\r\n if (transform.p) {\r\n return _transformFactory();\r\n }\r\n return [\r\n _px(),\r\n _py(),\r\n _pz ? _pz() : 0];\r\n },\r\n });\r\n\r\n Object.defineProperty(_thisFunction, 'xPosition', {\r\n get: ExpressionPropertyInterface(transform.px),\r\n });\r\n\r\n Object.defineProperty(_thisFunction, 'yPosition', {\r\n get: ExpressionPropertyInterface(transform.py),\r\n });\r\n\r\n Object.defineProperty(_thisFunction, 'zPosition', {\r\n get: ExpressionPropertyInterface(transform.pz),\r\n });\r\n\r\n Object.defineProperty(_thisFunction, 'anchorPoint', {\r\n get: ExpressionPropertyInterface(transform.a),\r\n });\r\n\r\n Object.defineProperty(_thisFunction, 'opacity', {\r\n get: ExpressionPropertyInterface(transform.o),\r\n });\r\n\r\n Object.defineProperty(_thisFunction, 'skew', {\r\n get: ExpressionPropertyInterface(transform.sk),\r\n });\r\n\r\n Object.defineProperty(_thisFunction, 'skewAxis', {\r\n get: ExpressionPropertyInterface(transform.sa),\r\n });\r\n\r\n Object.defineProperty(_thisFunction, 'orientation', {\r\n get: ExpressionPropertyInterface(transform.or),\r\n });\r\n\r\n return _thisFunction;\r\n };\r\n}());\r\n\r\n/* exported ProjectInterface */\r\n\r\nvar ProjectInterface = (function () {\r\n function registerComposition(comp) {\r\n this.compositions.push(comp);\r\n }\r\n\r\n return function () {\r\n function _thisProjectFunction(name) {\r\n var i = 0;\r\n var len = this.compositions.length;\r\n while (i < len) {\r\n if (this.compositions[i].data && this.compositions[i].data.nm === name) {\r\n if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {\r\n this.compositions[i].prepareFrame(this.currentFrame);\r\n }\r\n return this.compositions[i].compInterface;\r\n }\r\n i += 1;\r\n }\r\n return null;\r\n }\r\n\r\n _thisProjectFunction.compositions = [];\r\n _thisProjectFunction.currentFrame = 0;\r\n\r\n _thisProjectFunction.registerComposition = registerComposition;\r\n\r\n return _thisProjectFunction;\r\n };\r\n}());\r\n\r\n/* global propertyGroupFactory, ExpressionPropertyInterface, PropertyInterface */\r\n/* exported EffectsExpressionInterface */\r\n\r\nvar EffectsExpressionInterface = (function () {\r\n var ob = {\r\n createEffectsInterface: createEffectsInterface,\r\n };\r\n\r\n function createEffectsInterface(elem, propertyGroup) {\r\n if (elem.effectsManager) {\r\n var effectElements = [];\r\n var effectsData = elem.data.ef;\r\n var i;\r\n var len = elem.effectsManager.effectElements.length;\r\n for (i = 0; i < len; i += 1) {\r\n effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));\r\n }\r\n\r\n var effects = elem.data.ef || [];\r\n var groupInterface = function (name) {\r\n i = 0;\r\n len = effects.length;\r\n while (i < len) {\r\n if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {\r\n return effectElements[i];\r\n }\r\n i += 1;\r\n }\r\n return null;\r\n };\r\n Object.defineProperty(groupInterface, 'numProperties', {\r\n get: function () {\r\n return effects.length;\r\n },\r\n });\r\n return groupInterface;\r\n }\r\n return null;\r\n }\r\n\r\n function createGroupInterface(data, elements, propertyGroup, elem) {\r\n function groupInterface(name) {\r\n var effects = data.ef;\r\n var i = 0;\r\n var len = effects.length;\r\n while (i < len) {\r\n if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {\r\n if (effects[i].ty === 5) {\r\n return effectElements[i];\r\n }\r\n return effectElements[i]();\r\n }\r\n i += 1;\r\n }\r\n throw new Error();\r\n }\r\n var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);\r\n\r\n var effectElements = [];\r\n var i;\r\n var len = data.ef.length;\r\n for (i = 0; i < len; i += 1) {\r\n if (data.ef[i].ty === 5) {\r\n effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));\r\n } else {\r\n effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));\r\n }\r\n }\r\n\r\n if (data.mn === 'ADBE Color Control') {\r\n Object.defineProperty(groupInterface, 'color', {\r\n get: function () {\r\n return effectElements[0]();\r\n },\r\n });\r\n }\r\n Object.defineProperties(groupInterface, {\r\n numProperties: {\r\n get: function () {\r\n return data.np;\r\n },\r\n },\r\n _name: { value: data.nm },\r\n propertyGroup: { value: _propertyGroup },\r\n });\r\n groupInterface.enabled = data.en !== 0;\r\n groupInterface.active = groupInterface.enabled;\r\n return groupInterface;\r\n }\r\n\r\n function createValueInterface(element, type, elem, propertyGroup) {\r\n var expressionProperty = ExpressionPropertyInterface(element.p);\r\n function interfaceFunction() {\r\n if (type === 10) {\r\n return elem.comp.compInterface(element.p.v);\r\n }\r\n return expressionProperty();\r\n }\r\n\r\n if (element.p.setGroupProperty) {\r\n element.p.setGroupProperty(PropertyInterface('', propertyGroup));\r\n }\r\n\r\n return interfaceFunction;\r\n }\r\n\r\n return ob;\r\n}());\r\n\r\n/* global createSizedArray */\r\n/* exported MaskManagerInterface */\r\n\r\nvar MaskManagerInterface = (function () {\r\n function MaskInterface(mask, data) {\r\n this._mask = mask;\r\n this._data = data;\r\n }\r\n Object.defineProperty(MaskInterface.prototype, 'maskPath', {\r\n get: function () {\r\n if (this._mask.prop.k) {\r\n this._mask.prop.getValue();\r\n }\r\n return this._mask.prop;\r\n },\r\n });\r\n Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {\r\n get: function () {\r\n if (this._mask.op.k) {\r\n this._mask.op.getValue();\r\n }\r\n return this._mask.op.v * 100;\r\n },\r\n });\r\n\r\n var MaskManager = function (maskManager) {\r\n var _masksInterfaces = createSizedArray(maskManager.viewData.length);\r\n var i;\r\n var len = maskManager.viewData.length;\r\n for (i = 0; i < len; i += 1) {\r\n _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);\r\n }\r\n\r\n var maskFunction = function (name) {\r\n i = 0;\r\n while (i < len) {\r\n if (maskManager.masksProperties[i].nm === name) {\r\n return _masksInterfaces[i];\r\n }\r\n i += 1;\r\n }\r\n return null;\r\n };\r\n return maskFunction;\r\n };\r\n return MaskManager;\r\n}());\r\n\r\n/* global createTypedArray */\r\n/* exported ExpressionPropertyInterface */\r\n\r\nvar ExpressionPropertyInterface = (function () {\r\n var defaultUnidimensionalValue = { pv: 0, v: 0, mult: 1 };\r\n var defaultMultidimensionalValue = { pv: [0, 0, 0], v: [0, 0, 0], mult: 1 };\r\n\r\n function completeProperty(expressionValue, property, type) {\r\n Object.defineProperty(expressionValue, 'velocity', {\r\n get: function () {\r\n return property.getVelocityAtTime(property.comp.currentFrame);\r\n },\r\n });\r\n expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;\r\n expressionValue.key = function (pos) {\r\n if (!expressionValue.numKeys) {\r\n return 0;\r\n }\r\n var value = '';\r\n if ('s' in property.keyframes[pos - 1]) {\r\n value = property.keyframes[pos - 1].s;\r\n } else if ('e' in property.keyframes[pos - 2]) {\r\n value = property.keyframes[pos - 2].e;\r\n } else {\r\n value = property.keyframes[pos - 2].s;\r\n }\r\n var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers\r\n valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;\r\n valueProp.value = type === 'unidimensional' ? value[0] : value;\r\n return valueProp;\r\n };\r\n expressionValue.valueAtTime = property.getValueAtTime;\r\n expressionValue.speedAtTime = property.getSpeedAtTime;\r\n expressionValue.velocityAtTime = property.getVelocityAtTime;\r\n expressionValue.propertyGroup = property.propertyGroup;\r\n }\r\n\r\n function UnidimensionalPropertyInterface(property) {\r\n if (!property || !('pv' in property)) {\r\n property = defaultUnidimensionalValue;\r\n }\r\n var mult = 1 / property.mult;\r\n var val = property.pv * mult;\r\n var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers\r\n expressionValue.value = val;\r\n completeProperty(expressionValue, property, 'unidimensional');\r\n\r\n return function () {\r\n if (property.k) {\r\n property.getValue();\r\n }\r\n val = property.v * mult;\r\n if (expressionValue.value !== val) {\r\n expressionValue = new Number(val); // eslint-disable-line no-new-wrappers\r\n expressionValue.value = val;\r\n completeProperty(expressionValue, property, 'unidimensional');\r\n }\r\n return expressionValue;\r\n };\r\n }\r\n\r\n function MultidimensionalPropertyInterface(property) {\r\n if (!property || !('pv' in property)) {\r\n property = defaultMultidimensionalValue;\r\n }\r\n var mult = 1 / property.mult;\r\n var len = (property.data && property.data.l) || property.pv.length;\r\n var expressionValue = createTypedArray('float32', len);\r\n var arrValue = createTypedArray('float32', len);\r\n expressionValue.value = arrValue;\r\n completeProperty(expressionValue, property, 'multidimensional');\r\n\r\n return function () {\r\n if (property.k) {\r\n property.getValue();\r\n }\r\n for (var i = 0; i < len; i += 1) {\r\n arrValue[i] = property.v[i] * mult;\r\n expressionValue[i] = arrValue[i];\r\n }\r\n return expressionValue;\r\n };\r\n }\r\n\r\n // TODO: try to avoid using this getter\r\n function defaultGetter() {\r\n return defaultUnidimensionalValue;\r\n }\r\n\r\n return function (property) {\r\n if (!property) {\r\n return defaultGetter;\r\n } if (property.propType === 'unidimensional') {\r\n return UnidimensionalPropertyInterface(property);\r\n }\r\n return MultidimensionalPropertyInterface(property);\r\n };\r\n}());\r\n\r\n/* global expressionHelpers, TextSelectorProp, ExpressionManager */\r\n/* exported TextExpressionSelectorPropFactory */\r\n\r\nvar TextExpressionSelectorPropFactory = (function () { // eslint-disable-line no-unused-vars\r\n function getValueProxy(index, total) {\r\n this.textIndex = index + 1;\r\n this.textTotal = total;\r\n this.v = this.getValue() * this.mult;\r\n return this.v;\r\n }\r\n\r\n return function (elem, data) {\r\n this.pv = 1;\r\n this.comp = elem.comp;\r\n this.elem = elem;\r\n this.mult = 0.01;\r\n this.propType = 'textSelector';\r\n this.textTotal = data.totalChars;\r\n this.selectorValue = 100;\r\n this.lastValue = [1, 1, 1];\r\n this.k = true;\r\n this.x = true;\r\n this.getValue = ExpressionManager.initiateExpression.bind(this)(elem, data, this);\r\n this.getMult = getValueProxy;\r\n this.getVelocityAtTime = expressionHelpers.getVelocityAtTime;\r\n if (this.kf) {\r\n this.getValueAtTime = expressionHelpers.getValueAtTime.bind(this);\r\n } else {\r\n this.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(this);\r\n }\r\n this.setGroupProperty = expressionHelpers.setGroupProperty;\r\n };\r\n}());\r\n\r\nvar propertyGetTextProp = TextSelectorProp.getTextSelectorProp;\r\nTextSelectorProp.getTextSelectorProp = function (elem, data, arr) {\r\n if (data.t === 1) {\r\n return new TextExpressionSelectorPropFactory(elem, data, arr); // eslint-disable-line no-undef\r\n }\r\n return propertyGetTextProp(elem, data, arr);\r\n};\r\n\r\n/* global PropertyFactory */\r\n/* exported SliderEffect, AngleEffect, ColorEffect, PointEffect, LayerIndexEffect, MaskIndexEffect, CheckboxEffect, NoValueEffect */\r\n\r\nfunction SliderEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n}\r\nfunction AngleEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n}\r\nfunction ColorEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);\r\n}\r\nfunction PointEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);\r\n}\r\nfunction LayerIndexEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n}\r\nfunction MaskIndexEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n}\r\nfunction CheckboxEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n}\r\nfunction NoValueEffect() {\r\n this.p = {};\r\n}\r\n\r\n/* global extendPrototype, SliderEffect, AngleEffect, ColorEffect, PointEffect, CheckboxEffect, LayerIndexEffect,\r\nMaskIndexEffect, NoValueEffect, DynamicPropertyContainer */\r\n\r\nfunction EffectsManager(data, element) {\r\n var effects = data.ef || [];\r\n this.effectElements = [];\r\n var i;\r\n var len = effects.length;\r\n var effectItem;\r\n for (i = 0; i < len; i += 1) {\r\n effectItem = new GroupEffect(effects[i], element);\r\n this.effectElements.push(effectItem);\r\n }\r\n}\r\n\r\nfunction GroupEffect(data, element) {\r\n this.init(data, element);\r\n}\r\n\r\nextendPrototype([DynamicPropertyContainer], GroupEffect);\r\n\r\nGroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;\r\n\r\nGroupEffect.prototype.init = function (data, element) {\r\n this.data = data;\r\n this.effectElements = [];\r\n this.initDynamicPropertyContainer(element);\r\n var i;\r\n var len = this.data.ef.length;\r\n var eff;\r\n var effects = this.data.ef;\r\n for (i = 0; i < len; i += 1) {\r\n eff = null;\r\n switch (effects[i].ty) {\r\n case 0:\r\n eff = new SliderEffect(effects[i], element, this);\r\n break;\r\n case 1:\r\n eff = new AngleEffect(effects[i], element, this);\r\n break;\r\n case 2:\r\n eff = new ColorEffect(effects[i], element, this);\r\n break;\r\n case 3:\r\n eff = new PointEffect(effects[i], element, this);\r\n break;\r\n case 4:\r\n case 7:\r\n eff = new CheckboxEffect(effects[i], element, this);\r\n break;\r\n case 10:\r\n eff = new LayerIndexEffect(effects[i], element, this);\r\n break;\r\n case 11:\r\n eff = new MaskIndexEffect(effects[i], element, this);\r\n break;\r\n case 5:\r\n eff = new EffectsManager(effects[i], element, this);\r\n break;\r\n // case 6:\r\n default:\r\n eff = new NoValueEffect(effects[i], element, this);\r\n break;\r\n }\r\n if (eff) {\r\n this.effectElements.push(eff);\r\n }\r\n }\r\n};\r\n\r\n\r\nvar lottie = {};\r\n\r\nfunction setLocationHref(href) {\r\n locationHref = href;\r\n}\r\n\r\nfunction searchAnimations() {\r\n if (standalone === true) {\r\n animationManager.searchAnimations(animationData, standalone, renderer);\r\n } else {\r\n animationManager.searchAnimations();\r\n }\r\n}\r\n\r\nfunction setSubframeRendering(flag) {\r\n subframeEnabled = flag;\r\n}\r\n\r\nfunction setIDPrefix(prefix) {\r\n idPrefix = prefix;\r\n}\r\n\r\nfunction loadAnimation(params) {\r\n if (standalone === true) {\r\n params.animationData = JSON.parse(animationData);\r\n }\r\n return animationManager.loadAnimation(params);\r\n}\r\n\r\nfunction setQuality(value) {\r\n if (typeof value === 'string') {\r\n switch (value) {\r\n case 'high':\r\n defaultCurveSegments = 200;\r\n break;\r\n default:\r\n case 'medium':\r\n defaultCurveSegments = 50;\r\n break;\r\n case 'low':\r\n defaultCurveSegments = 10;\r\n break;\r\n }\r\n } else if (!isNaN(value) && value > 1) {\r\n defaultCurveSegments = value;\r\n }\r\n if (defaultCurveSegments >= 50) {\r\n roundValues(false);\r\n } else {\r\n roundValues(true);\r\n }\r\n}\r\n\r\nfunction inBrowser() {\r\n return typeof navigator !== 'undefined';\r\n}\r\n\r\nfunction installPlugin(type, plugin) {\r\n if (type === 'expressions') {\r\n expressionsPlugin = plugin;\r\n }\r\n}\r\n\r\nfunction getFactory(name) {\r\n switch (name) {\r\n case 'propertyFactory':\r\n return PropertyFactory;\r\n case 'shapePropertyFactory':\r\n return ShapePropertyFactory;\r\n case 'matrix':\r\n return Matrix;\r\n default:\r\n return null;\r\n }\r\n}\r\n\r\nlottie.play = animationManager.play;\r\nlottie.pause = animationManager.pause;\r\nlottie.setLocationHref = setLocationHref;\r\nlottie.togglePause = animationManager.togglePause;\r\nlottie.setSpeed = animationManager.setSpeed;\r\nlottie.setDirection = animationManager.setDirection;\r\nlottie.stop = animationManager.stop;\r\nlottie.searchAnimations = searchAnimations;\r\nlottie.registerAnimation = animationManager.registerAnimation;\r\nlottie.loadAnimation = loadAnimation;\r\nlottie.setSubframeRendering = setSubframeRendering;\r\nlottie.resize = animationManager.resize;\r\n// lottie.start = start;\r\nlottie.goToAndStop = animationManager.goToAndStop;\r\nlottie.destroy = animationManager.destroy;\r\nlottie.setQuality = setQuality;\r\nlottie.inBrowser = inBrowser;\r\nlottie.installPlugin = installPlugin;\r\nlottie.freeze = animationManager.freeze;\r\nlottie.unfreeze = animationManager.unfreeze;\r\nlottie.setVolume = animationManager.setVolume;\r\nlottie.mute = animationManager.mute;\r\nlottie.unmute = animationManager.unmute;\r\nlottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;\r\nlottie.useWebWorker = function (flag) {\r\n _useWebWorker = flag;\r\n};\r\nlottie.setIDPrefix = setIDPrefix;\r\nlottie.__getFactory = getFactory;\r\nlottie.version = '5.8.1';\r\n\r\nfunction checkReady() {\r\n if (document.readyState === 'complete') {\r\n clearInterval(readyStateCheckInterval);\r\n searchAnimations();\r\n }\r\n}\r\n\r\nfunction getQueryVariable(variable) {\r\n var vars = queryString.split('&');\r\n for (var i = 0; i < vars.length; i += 1) {\r\n var pair = vars[i].split('=');\r\n if (decodeURIComponent(pair[0]) == variable) { // eslint-disable-line eqeqeq\r\n return decodeURIComponent(pair[1]);\r\n }\r\n }\r\n return null;\r\n}\r\nvar standalone = '__[STANDALONE]__';\r\nvar animationData = '__[ANIMATIONDATA]__';\r\nvar renderer = '';\r\nvar queryString;\r\nif (standalone) {\r\n var scripts = document.getElementsByTagName('script');\r\n var index = scripts.length - 1;\r\n var myScript = scripts[index] || {\r\n src: '',\r\n };\r\n queryString = myScript.src.replace(/^[^\\?]+\\??/, ''); // eslint-disable-line no-useless-escape\r\n renderer = getQueryVariable('renderer');\r\n}\r\nvar readyStateCheckInterval = setInterval(checkReady, 100);\r\n\nreturn lottie;\n}));","import { Controller } from \"@hotwired/stimulus\"\nimport bodymovin from \"lottie-web\"\nimport Stimulus from \"../../shared/utils/stimulus\"\n\nclass Animations extends Controller {\n static targets = [`stage`]\n static values = { loops: Number }\n\n #animation\n #playCount = 0\n\n connect() {\n const animationName = this.stageTarget.dataset.animationName\n const loopCount =\n this.stageTarget.dataset.animationsLoopsValue === `true`\n ? true\n : parseInt(this.stageTarget.dataset.animationsLoopsValue, 10)\n\n this.#animation = bodymovin.loadAnimation({\n container: this.stageTarget,\n renderer: `svg`,\n loop: false,\n autoplay: true,\n path: `/animations/${animationName}.json`,\n })\n\n if (typeof loopCount === `number`) {\n this.maxPlays = loopCount\n this.playCount = 0\n this.#animation.addEventListener(\n `complete`,\n this.handleComplete.bind(this)\n )\n }\n }\n\n handleComplete() {\n this.playCount += 1\n\n if (this.playCount < this.maxPlays) {\n this.#animation.goToAndPlay(0)\n } else {\n this.#animation.removeEventListener(\n `complete`,\n this.handleComplete.bind(this)\n )\n }\n }\n\n disconnect() {\n this.#animation.destroy()\n }\n}\n\nStimulus.register(`animations`, Animations)\n","import { Controller } from \"@hotwired/stimulus\"\n\nimport Stimulus from \"../../shared/utils/stimulus\"\n\nclass Tracker extends Controller {\n static values = { google: String }\n\n track() {\n if (this.hasGoogleValue && window.gtag)\n window.gtag(`event`, this.googleValue)\n }\n}\n\nStimulus.register(`tracker`, Tracker)\n","/**\n * fitty v2.3.5 - Snugly resizes text to fit its parent container\n * Copyright (c) 2021 Rik Schennink (https://pqina.nl/)\n */\n\nvar e=function(e){if(e){var t=function(e){return[].slice.call(e)},n=0,i=1,r=2,o=3,a=[],l=null,u=\"requestAnimationFrame\"in e?function(){e.cancelAnimationFrame(l),l=e.requestAnimationFrame((function(){return s(a.filter((function(e){return e.dirty&&e.active})))}))}:function(){},c=function(e){return function(){a.forEach((function(t){return t.dirty=e})),u()}},s=function(e){e.filter((function(e){return!e.styleComputed})).forEach((function(e){e.styleComputed=m(e)})),e.filter(y).forEach(v);var t=e.filter(p);t.forEach(d),t.forEach((function(e){v(e),f(e)})),t.forEach(S)},f=function(e){return e.dirty=n},d=function(e){e.availableWidth=e.element.parentNode.clientWidth,e.currentWidth=e.element.scrollWidth,e.previousFontSize=e.currentFontSize,e.currentFontSize=Math.min(Math.max(e.minSize,e.availableWidth/e.currentWidth*e.previousFontSize),e.maxSize),e.whiteSpace=e.multiLine&&e.currentFontSize===e.minSize?\"normal\":\"nowrap\"},p=function(e){return e.dirty!==r||e.dirty===r&&e.element.parentNode.clientWidth!==e.availableWidth},m=function(t){var n=e.getComputedStyle(t.element,null);return t.currentFontSize=parseFloat(n.getPropertyValue(\"font-size\")),t.display=n.getPropertyValue(\"display\"),t.whiteSpace=n.getPropertyValue(\"white-space\"),!0},y=function(e){var t=!1;return!e.preStyleTestCompleted&&(/inline-/.test(e.display)||(t=!0,e.display=\"inline-block\"),\"nowrap\"!==e.whiteSpace&&(t=!0,e.whiteSpace=\"nowrap\"),e.preStyleTestCompleted=!0,t)},v=function(e){e.element.style.whiteSpace=e.whiteSpace,e.element.style.display=e.display,e.element.style.fontSize=e.currentFontSize+\"px\"},S=function(e){e.element.dispatchEvent(new CustomEvent(\"fit\",{detail:{oldValue:e.previousFontSize,newValue:e.currentFontSize,scaleFactor:e.currentFontSize/e.previousFontSize}}))},h=function(e,t){return function(){e.dirty=t,e.active&&u()}},w=function(e){return function(){a=a.filter((function(t){return t.element!==e.element})),e.observeMutations&&e.observer.disconnect(),e.element.style.whiteSpace=e.originalStyle.whiteSpace,e.element.style.display=e.originalStyle.display,e.element.style.fontSize=e.originalStyle.fontSize}},b=function(e){return function(){e.active||(e.active=!0,u())}},z=function(e){return function(){return e.active=!1}},F=function(e){e.observeMutations&&(e.observer=new MutationObserver(h(e,i)),e.observer.observe(e.element,e.observeMutations))},g={minSize:16,maxSize:512,multiLine:!0,observeMutations:\"MutationObserver\"in e&&{subtree:!0,childList:!0,characterData:!0}},W=null,E=function(){e.clearTimeout(W),W=e.setTimeout(c(r),x.observeWindowDelay)},M=[\"resize\",\"orientationchange\"];return Object.defineProperty(x,\"observeWindow\",{set:function(t){var n=\"\".concat(t?\"add\":\"remove\",\"EventListener\");M.forEach((function(t){e[n](t,E)}))}}),x.observeWindow=!0,x.observeWindowDelay=100,x.fitAll=c(o),x}function C(e,t){var n=Object.assign({},g,t),i=e.map((function(e){var t=Object.assign({},n,{element:e,active:!0});return function(e){e.originalStyle={whiteSpace:e.element.style.whiteSpace,display:e.element.style.display,fontSize:e.element.style.fontSize},F(e),e.newbie=!0,e.dirty=!0,a.push(e)}(t),{element:e,fit:h(t,o),unfreeze:b(t),freeze:z(t),unsubscribe:w(t)}}));return u(),i}function x(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return\"string\"==typeof e?C(t(document.querySelectorAll(e)),n):C([e],n)[0]}}(\"undefined\"==typeof window?null:window);export default e;\n","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","import { isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nexport default function getBoundingClientRect(element, includeScale) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n var rect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (isHTMLElement(element) && includeScale) {\n var offsetHeight = element.offsetHeight;\n var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale\n // Fallback to 1 in case both values are `0`\n\n if (offsetWidth > 0) {\n scaleX = round(rect.width) / offsetWidth || 1;\n }\n\n if (offsetHeight > 0) {\n scaleY = round(rect.height) / offsetHeight || 1;\n }\n }\n\n return {\n width: rect.width / scaleX,\n height: rect.height / scaleY,\n top: rect.top / scaleY,\n right: rect.right / scaleX,\n bottom: rect.bottom / scaleY,\n left: rect.left / scaleX,\n x: rect.left / scaleX,\n y: rect.top / scaleY\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n\n var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,\n _ref3$x = _ref3.x,\n x = _ref3$x === void 0 ? 0 : _ref3$x,\n _ref3$y = _ref3.y,\n y = _ref3$y === void 0 ? 0 : _ref3$y;\n\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref4) {\n var state = _ref4.state,\n options = _ref4.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nexport default function getViewportRect(element) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper\n // can be obscured underneath it.\n // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even\n // if it isn't open, so if this isn't available, the popper will be detected\n // to overflow the bottom of the screen too early.\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)\n // In Chrome, it returns a value very close to 0 (+/-) but contains rounding\n // errors due to floating point numbers, so we need to check precision.\n // Safari returns a number <= 0, usually < -1 when pinch-zoomed\n // Feature detection fails in mobile emulation mode in Chrome.\n // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <\n // 0.001\n // Fallback here: \"Not Safari\" userAgent\n\n if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element) {\n var rect = getBoundingClientRect(element);\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body' && (canEscapeClipping ? getComputedStyle(clippingParent).position !== 'static' : true);\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { Controller } from \"@hotwired/stimulus\"\nimport fitty from \"fitty\"\nimport { createPopper } from \"@popperjs/core\"\n\nimport Stimulus from \"../../shared/utils/stimulus\"\n\nconst formatAmount = (amount) =>\n new Intl.NumberFormat(`sv-SE`, {\n currency: `SEK`,\n minimumFractionDigits: 0,\n maximumFractionDigits: 2,\n }).format(amount)\n\nclass Calculator extends Controller {\n static targets = [\n `calculatedDeposit`,\n `calculatedInterest`,\n `capitalInput`,\n `capitalValue`,\n `savingsInput`,\n `savingsValue`,\n `yearsInput`,\n `yearsValue`,\n `yearsUnit`,\n `happyNumber`,\n `interestRate`,\n `accountType`,\n `rateType`,\n `secondaryInputs`,\n `tooltipIcon`,\n `tooltipContent`,\n ]\n\n #popperInstance = null\n static values = {\n inputs: Array,\n rate: Number,\n floatingAccountYears: Array,\n fixedAccountYears: Array,\n floatingAccountCapitalDefault: Number,\n fixedAccountCapitalDefault: Number,\n fixedAccountCapitalMin: Number,\n }\n\n connect() {\n fitty(this.happyNumberTarget, { maxSize: 36, minSize: 8 })\n this.input({ ignoreValueTarget: false })\n }\n\n input = (e) => {\n const capital = parseInt(this.capitalInputTarget.value || 0)\n const savings = parseInt(this.savingsInputTarget.value || 0)\n const isFloating = this.accountTypeTarget.value === `floating`\n const accountYears = isFloating\n ? this.floatingAccountYearsValue\n : this.fixedAccountYearsValue\n const years = accountYears[parseInt(this.yearsInputTarget.value || 0)]\n\n let total = capital\n let interest = 0\n\n if (isFloating) {\n // Calculate monthly interest rate\n const monthlyRate = this.rateValue / 100 / 12\n\n // Loop for each month over the years\n for (let month = 0; month < years * 12; month++) {\n total += savings // add monthly savings at the start of the month\n total *= 1 + monthlyRate // apply monthly interest\n }\n interest = total - (capital + savings * years * 12) // Total interest earned\n } else {\n // Fixed term calculation using simple interest formula\n const months = years * 12\n interest = (((capital * this.rateValue) / 100) * months) / 12 // Calculate total interest earned over the period\n total = capital + interest // Total includes the initial deposit and earned interest\n }\n\n const totalFormatted = formatAmount(total) // Formatting total amount to display\n const interestFormatted = formatAmount(interest) // Formatting only interest\n\n this.calculatedDepositTargets.forEach(\n (t) => (t.innerHTML = totalFormatted) // Displaying total amount\n )\n\n this.calculatedInterestTargets.forEach(\n (t) => (t.innerHTML = interestFormatted) // Displaying interest\n )\n\n if (!e?.ignoreValueTarget) {\n this.updateValueTargets({ isFloating, years })\n }\n }\n\n updateValueTargets = ({ isFloating, years }) => {\n this.inputsValue.forEach((name) => {\n const valueTarget = this[`${name}ValueTarget`]\n const inputTarget = this[`${name}InputTarget`]\n const unitTarget = this[`${name}UnitTarget`]\n\n if (valueTarget && inputTarget) {\n let unit\n let value\n\n if (name === `years`) {\n unit = years < 1 || !isFloating ? `månader` : `år`\n value = unit === `månader` ? years * 12 : years\n } else {\n unit = `år`\n value = inputTarget.value\n }\n\n if (valueTarget instanceof HTMLInputElement) {\n valueTarget.value = formatAmount(inputTarget.value)\n valueTarget.style.width = `${inputTarget.value.length + 2}ch`\n } else {\n valueTarget.innerHTML = new Intl.NumberFormat(\n document.documentElement.lang\n ).format(value)\n unitTarget.innerHTML = unit\n }\n }\n })\n }\n\n updateInterestRate() {\n const selectedOption = this.accountTypeTarget.selectedOptions[0]\n const selectedChoice = this.accountTypeTarget.__CHOICES_OPTIONS.find(\n (choice) => choice.value === selectedOption.value\n )\n const rate = selectedChoice.rate\n const isFloating = selectedOption.value === `floating`\n\n this.interestRateTarget.textContent = `${rate}%`\n this.rateTypeTarget.textContent = isFloating ? `Rörlig ränta` : `Fast ränta`\n this.rateValue = parseFloat(rate)\n\n const savingsInput = this.savingsInputTarget\n const savingsValue = this.savingsValueTarget\n const savingsControl = savingsInput.closest(`.-control`)\n const secondaryInputs = this.secondaryInputsTargets\n const capitalInput = this.capitalInputTarget\n const capitalValueInput = this.capitalValueTarget\n\n const yearsInput = this.yearsInputTarget\n const yearsControl = yearsInput.closest(`.-control`)\n\n if (isFloating) {\n savingsInput.value = 500\n savingsInput.disabled = false\n savingsValue.value = 500\n savingsValue.disabled = false\n savingsControl.classList.remove(`disabled`)\n savingsControl.classList.remove(`without-slider-icon`)\n this.yearsInputTarget.max = 11\n capitalInput.value = this.floatingAccountCapitalDefaultValue\n yearsInput.value = 6\n yearsInput.disabled = false\n yearsControl.classList.remove(`without-slider-icon`)\n } else {\n yearsInput.disabled = true\n yearsControl.classList.add(`without-slider-icon`)\n\n savingsInput.value = 0\n savingsInput.disabled = true\n savingsValue.value = 0\n savingsValue.disabled = true\n savingsControl.classList.add(`disabled`)\n savingsControl.classList.add(`without-slider-icon`)\n this.yearsInputTarget.max = 4\n secondaryInputs.value = false\n yearsInput.value = selectedChoice.index - 1\n capitalInput.value = this.fixedAccountCapitalDefaultValue\n capitalInput.min = this.fixedAccountCapitalMinValue\n capitalValueInput.min = this.fixedAccountCapitalMinValue\n }\n\n this.triggerInputEvent(this.yearsInputTarget)\n this.triggerInputEvent(this.savingsInputTarget)\n this.triggerInputEvent(this.capitalInputTarget)\n this.input()\n }\n\n triggerInputEvent(element) {\n const event = new Event(`input`, { bubbles: true })\n element.dispatchEvent(event)\n }\n\n secondaryInput = (e) => {\n const name = e.target.name.replace(`_secondary`, ``)\n const valueTarget = this[`${name}ValueTarget`]\n const inputTarget = this[`${name}InputTarget`]\n\n if (valueTarget instanceof HTMLInputElement && inputTarget) {\n if (valueTarget.validity.valid) {\n inputTarget.value = valueTarget.value\n\n // eslint-disable-next-line no-irregular-whitespace\n const newValue = valueTarget.value.replaceAll(` `, ``)\n\n const finalValue = isNaN(parseInt(newValue)) ? 0 : parseInt(newValue)\n\n if (\n finalValue >= parseInt(valueTarget.min) &&\n finalValue <= parseInt(valueTarget.max)\n ) {\n // Update the input field with the formatted value\n valueTarget.value = formatAmount(finalValue)\n inputTarget.value = Number(finalValue)\n }\n\n if (finalValue < parseInt(valueTarget.min)) {\n valueTarget.value = formatAmount(valueTarget.min)\n inputTarget.value = Number(valueTarget.min)\n }\n\n if (finalValue > parseInt(valueTarget.max)) {\n valueTarget.value = formatAmount(valueTarget.max)\n inputTarget.value = Number(valueTarget.max)\n }\n\n const manualEvent = new Event(`input`, {\n bubbles: true,\n })\n manualEvent.ignoreValueTarget = true\n inputTarget.dispatchEvent(manualEvent)\n }\n\n valueTarget.style.width = `${(valueTarget.value.length || 1) + 2}ch`\n valueTarget.reportValidity()\n }\n }\n\n showTooltip = () => {\n this.tooltipContentTarget.style.display = `block`\n this.#popperInstance = createPopper(\n this.tooltipIconTarget,\n this.tooltipContentTarget,\n {\n placement: `top`,\n modifiers: [\n {\n name: `offset`,\n options: {\n offset: [0, 8],\n },\n },\n {\n name: `arrow`,\n options: {\n element:\n this.tooltipContentTarget.querySelector(`.tooltip-arrow`),\n },\n },\n ],\n }\n )\n }\n\n hideTooltip = () => {\n this.tooltipContentTarget.style.display = `none`\n if (this.#popperInstance) {\n this.#popperInstance.destroy()\n this.#popperInstance = null\n }\n }\n\n toggleTooltip = () => {\n if (this.tooltipContentTarget.style.display === `none`) {\n this.showTooltip()\n } else {\n this.hideTooltip()\n }\n }\n}\n\nStimulus.register(`calculator`, Calculator)\n","import { Controller } from \"@hotwired/stimulus\"\nimport { toggleClass } from \"@oddcamp/js-utils/src/attribute\"\n\nimport Stimulus from \"../../shared/utils/stimulus\"\n\nclass RatesMatrix extends Controller {\n static targets = [`hideable`, `toggle`]\n\n connect() {\n toggleClass(this.hideableTargets, `--hidden`)\n }\n\n toggleTable() {\n toggleClass(this.hideableTargets, `--hidden`)\n\n if (this.hasToggleTarget)\n this.toggleTarget.innerHTML =\n this.toggleTarget.innerHTML === `Visa mer` ? `Visa mindre` : `Visa mer`\n }\n}\n\nStimulus.register(`rates-matrix`, RatesMatrix)\n","import { Controller } from \"@hotwired/stimulus\"\nimport { toggleClass } from \"@oddcamp/js-utils/src/attribute\"\n\nimport Stimulus from \"../../shared/utils/stimulus\"\n\nclass RatesMatrixNew extends Controller {\n static targets = [`hideable`, `hideableAmount`, `toggle`, `footnote`]\n\n connect() {\n this.hideableTargets.forEach((target) => {\n target.classList.add(`--hidden`)\n })\n\n this.hideableAmountTargets.forEach((target) => {\n target.classList.add(`--hidden`)\n })\n\n this.updateFootnoteVisibility()\n }\n\n toggleTable(event) {\n const button = event.currentTarget\n const targetSection =\n button.closest(`[data-rates-matrix-new-target=\"table-0\"]`) ||\n button.closest(`[data-rates-matrix-new-target^=\"table\"]`)\n const hideableTargets = targetSection.querySelectorAll(\n `[data-rates-matrix-new-target=\"hideable\"]`\n )\n const isHidden = hideableTargets[0].classList.contains(`--hidden`)\n\n hideableTargets.forEach((target) => {\n toggleClass(target, `--hidden`)\n })\n\n const hideableAmountTargets = targetSection.querySelectorAll(\n `[data-rates-matrix-new-target=\"hideableAmount\"]`\n )\n if (!isHidden) {\n hideableAmountTargets.forEach((target) => {\n target.classList.add(`--hidden`)\n })\n\n const amountsButton = targetSection.querySelector(\n `.amounts-plus-icon, .amounts-minus-icon`\n )\n if (amountsButton) {\n const plusIcon = targetSection.querySelector(`.amounts-plus-icon`)\n const minusIcon = targetSection.querySelector(`.amounts-minus-icon`)\n plusIcon.classList.remove(`--hidden`)\n minusIcon.classList.add(`--hidden`)\n }\n }\n\n this.toggleIcons(button, !isHidden)\n this.updateFootnoteVisibility()\n\n const toggleText = button.querySelector(\n `[data-rates-matrix-new-target=\"toggle\"]`\n )\n if (toggleText) {\n toggleText.innerHTML = isHidden ? `Visa mindre` : `Visa mer`\n }\n }\n\n toggleTableAmounts(event) {\n const button = event.currentTarget\n const targetSection =\n button.closest(`[data-rates-matrix-new-target=\"table-0\"]`) ||\n button.closest(`[data-rates-matrix-new-target^=\"table\"]`)\n const hideableAmountTargets = targetSection.querySelectorAll(\n `[data-rates-matrix-new-target=\"hideableAmount\"]`\n )\n\n hideableAmountTargets.forEach((target) => {\n toggleClass(target, `--hidden`)\n })\n\n const isNowVisible =\n !hideableAmountTargets[0].classList.contains(`--hidden`)\n\n this.toggleIcons(button, isNowVisible)\n this.updateFootnoteVisibility()\n }\n\n toggleIcons(button, isNowVisible) {\n const plusIcon = button.querySelector(`.plus-icon`)\n const minusIcon = button.querySelector(`.minus-icon`)\n\n const amountsPlusIcon = button.querySelector(`.amounts-plus-icon`)\n const amountsMinusIcon = button.querySelector(`.amounts-minus-icon`)\n\n if (plusIcon && minusIcon) {\n plusIcon.classList.toggle(`--hidden`, !isNowVisible)\n minusIcon.classList.toggle(`--hidden`, isNowVisible)\n }\n\n if (amountsPlusIcon && amountsMinusIcon) {\n amountsPlusIcon.classList.toggle(`--hidden`, isNowVisible)\n amountsMinusIcon.classList.toggle(`--hidden`, !isNowVisible)\n }\n\n const buttonHint = button.querySelector(`.button-hint`)\n if (buttonHint) {\n buttonHint.classList.toggle(`--hidden`, !isNowVisible)\n buttonHint.classList.toggle(`show-hint`, isNowVisible)\n }\n }\n\n updateFootnoteVisibility() {\n const hasVisibleToggles =\n Array.from(this.hideableTargets).some(\n (target) => !target.classList.contains(`--hidden`)\n ) ||\n Array.from(this.hideableAmountTargets).some(\n (target) => !target.classList.contains(`--hidden`)\n )\n\n if (hasVisibleToggles) {\n this.footnoteTarget.classList.remove(`--hidden`)\n } else {\n this.footnoteTarget.classList.add(`--hidden`)\n }\n }\n}\n\nStimulus.register(`rates-matrix-new`, RatesMatrixNew)\n","import { Controller } from \"@hotwired/stimulus\"\nimport Stimulus from \"../../shared/utils/stimulus\"\n\nclass FaqTable extends Controller {\n static targets = [`hideable`, `toggle`]\n\n connect() {\n this.showInitialItems()\n }\n\n showInitialItems() {\n this.hideableTargets.forEach((target, index) => {\n if (index < 10) {\n target.classList.remove(`--hidden`)\n } else {\n target.classList.add(`--hidden`)\n }\n })\n\n const hasMoreItems = this.hideableTargets.length > 10\n if (!hasMoreItems) {\n this.toggleTarget.classList.add(`--hidden`)\n this.element.querySelector(`.plus-icon`).classList.add(`--hidden`)\n } else {\n this.toggleTarget.innerHTML = `Visa fler rader`\n this.toggleTarget.classList.remove(`--hidden`)\n }\n }\n\n toggleTable() {\n const isHidden = this.hideableTargets[10].classList.contains(`--hidden`)\n\n this.hideableTargets.forEach((target, index) => {\n if (isHidden) {\n target.classList.remove(`--hidden`)\n this.element.querySelector(`.minus-icon`).classList.remove(`--hidden`)\n this.element.querySelector(`.plus-icon`).classList.add(`--hidden`)\n } else {\n if (index >= 10) {\n target.classList.add(`--hidden`)\n this.element.querySelector(`.plus-icon`).classList.remove(`--hidden`)\n this.element.querySelector(`.minus-icon`).classList.add(`--hidden`)\n }\n }\n })\n\n if (this.hasToggleTarget) {\n this.toggleTarget.innerHTML = isHidden ? `Visa mindre` : `Visa fler rader`\n }\n }\n}\n\nStimulus.register(`faq-table`, FaqTable)\n","import { Controller } from \"@hotwired/stimulus\"\nimport { createPopper } from \"@popperjs/core\"\n\nimport Stimulus from \"../../shared/utils/stimulus\"\n\nclass PiggyBankFeature extends Controller {\n static targets = [`cta`, `popper`, `image`]\n #popperInstances = {}\n\n connect() {\n this.popperTarget.classList.add(`--active`)\n\n this.ctaTargets.forEach((cta, i) => {\n this.#popperInstances[cta.dataset.name] = createPopper(\n cta,\n this.popperTargets[i],\n {\n placement: `left`,\n strategy: `fixed`,\n modifiers: [\n {\n name: `flip`,\n options: {\n fallbackPlacements: [`top`, `bottom`],\n },\n },\n {\n name: `offset`,\n options: {\n offset: [20, 20],\n },\n },\n ],\n }\n )\n })\n\n if (this.hasImageTarget) {\n this.imageTarget.addEventListener(`load`, () =>\n this.#popperInstances[this.popperTarget.dataset.name].forceUpdate()\n )\n }\n }\n\n togglePopper = (e) => {\n const { name } = e.target.dataset\n\n this.popperTargets.forEach((item) => {\n // Ignore current clicked\n if (item.dataset.name == name) return\n\n item.classList.remove(`--active`)\n })\n\n this.popperTargets\n .find((p) => p.dataset.name == name)\n .classList.toggle(`--active`)\n\n this.#popperInstances[name].forceUpdate()\n }\n}\n\nStimulus.register(`piggy-bank-feature`, PiggyBankFeature)\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?e(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],e):e((t=t||self).St={})}(this,(function(t){\"use strict\";class e{constructor(t,e){this.state={angle:0,area:[],position:{x:0,y:0},hardAngle:0,hardDrawingAngle:0},this.createdDensity=e,this.nowDrawingDensity=this.createdDensity,this.render=t}setDensity(t){this.createdDensity=t,this.nowDrawingDensity=t}setDrawingDensity(t){this.nowDrawingDensity=t}setPosition(t){this.state.position=t}setAngle(t){this.state.angle=t}setArea(t){this.state.area=t}setHardDrawingAngle(t){this.state.hardDrawingAngle=t}setHardAngle(t){this.state.hardAngle=t,this.state.hardDrawingAngle=t}setOrientation(t){this.orientation=t}getDrawingDensity(){return this.nowDrawingDensity}getDensity(){return this.createdDensity}getHardAngle(){return this.state.hardAngle}}class i extends e{constructor(t,e,i){super(t,i),this.image=null,this.isLoad=!1,this.loadingAngle=0,this.image=new Image,this.image.src=e}draw(t){const e=this.render.getContext(),i=this.render.convertToGlobal(this.state.position),s=this.render.getRect().pageWidth,n=this.render.getRect().height;e.save(),e.translate(i.x,i.y),e.beginPath();for(let t of this.state.area)null!==t&&(t=this.render.convertToGlobal(t),e.lineTo(t.x-i.x,t.y-i.y));e.rotate(this.state.angle),e.clip(),this.isLoad?e.drawImage(this.image,0,0,s,n):this.drawLoader(e,{x:0,y:0},s,n),e.restore()}simpleDraw(t){const e=this.render.getRect(),i=this.render.getContext(),s=e.pageWidth,n=e.height,h=1===t?e.left+e.pageWidth:e.left,r=e.top;this.isLoad?i.drawImage(this.image,h,r,s,n):this.drawLoader(i,{x:h,y:r},s,n)}drawLoader(t,e,i,s){t.beginPath(),t.strokeStyle=\"rgb(200, 200, 200)\",t.fillStyle=\"rgb(255, 255, 255)\",t.lineWidth=1,t.rect(e.x+1,e.y+1,i-1,s-1),t.stroke(),t.fill();const n={x:e.x+i/2,y:e.y+s/2};t.beginPath(),t.lineWidth=10,t.arc(n.x,n.y,20,this.loadingAngle,3*Math.PI/2+this.loadingAngle),t.stroke(),t.closePath(),this.loadingAngle+=.07,this.loadingAngle>=2*Math.PI&&(this.loadingAngle=0)}load(){this.isLoad||(this.image.onload=()=>{this.isLoad=!0})}newTemporaryCopy(){return this}getTemporaryCopy(){return this}hideTemporaryCopy(){}}class s{constructor(t,e){this.pages=[],this.currentPageIndex=0,this.currentSpreadIndex=0,this.landscapeSpread=[],this.portraitSpread=[],this.render=e,this.app=t,this.currentPageIndex=0,this.isShowCover=this.app.getSettings().showCover}destroy(){this.pages=[]}createSpread(){this.landscapeSpread=[],this.portraitSpread=[];for(let t=0;t=0&&t0?this.pages[e-1]:null}getFlippingPage(t){const e=this.currentSpreadIndex;if(\"portrait\"===this.render.getOrientation())return 0===t?this.pages[e].newTemporaryCopy():this.pages[e-1];{const i=0===t?this.getSpread()[e+1]:this.getSpread()[e-1];return 1===i.length||0===t?this.pages[i[0]]:this.pages[i[1]]}}getBottomPage(t){const e=this.currentSpreadIndex;if(\"portrait\"===this.render.getOrientation())return 0===t?this.pages[e+1]:this.pages[e-1];{const i=0===t?this.getSpread()[e+1]:this.getSpread()[e-1];return 1===i.length?this.pages[i[0]]:0===t?this.pages[i[1]]:this.pages[i[0]]}}showNext(){this.currentSpreadIndex0&&(this.currentSpreadIndex--,this.showSpread())}getCurrentPageIndex(){return this.currentPageIndex}show(t=null){if(null===t&&(t=this.currentPageIndex),t<0||t>=this.pages.length)return;const e=this.getSpreadIndexByPage(t);null!==e&&(this.currentSpreadIndex=e,this.showSpread())}getCurrentSpreadIndex(){return this.currentSpreadIndex}setCurrentSpreadIndex(t){if(!(t>=0&&t=t.left&&e.x<=t.width+t.left&&e.y>=t.top&&e.y<=t.top+t.height?e:null}static GetRotatedPoint(t,e,i){return{x:t.x*Math.cos(i)+t.y*Math.sin(i)+e.x,y:t.y*Math.cos(i)-t.x*Math.sin(i)+e.y}}static LimitPointToCircle(t,e,i){if(h.GetDistanceBetweenTwoPoint(t,i)<=e)return i;const s=t.x,n=t.y,r=i.x,o=i.y;let a=Math.sqrt(Math.pow(e,2)*Math.pow(s-r,2)/(Math.pow(s-r,2)+Math.pow(n-o,2)))+s;i.x<0&&(a*=-1);let g=(a-s)*(n-o)/(s-r)+n;return s-r+n===0&&(g=e),{x:a,y:g}}static GetIntersectBetweenTwoSegment(t,e,i){return h.PointInRect(t,h.GetIntersectBeetwenTwoLine(e,i))}static GetIntersectBeetwenTwoLine(t,e){const i=t[0].y-t[1].y,s=e[0].y-e[1].y,n=t[1].x-t[0].x,h=e[1].x-e[0].x,r=t[0].x*t[1].y-t[1].x*t[0].y,o=e[0].x*e[1].y-e[1].x*e[0].y,a=i*o-s*r,g=n*o-h*r,l=-(r*h-o*n)/(i*h-s*n),d=-(i*o-s*r)/(i*h-s*n);if(isFinite(l)&&isFinite(d))return{x:l,y:d};if(Math.abs(a-g)<.1)throw new Error(\"Segment included\");return null}static GetCordsFromTwoPoint(t,e){const i=Math.abs(t.x-e.x),s=Math.abs(t.y-e.y),n=Math.max(i,s),h=[t];function r(t,e,i,s,n){return e>t?t+n*(i/s):e=10&&t.push(this.sideIntersectPoint):\"top\"===this.corner&&t.push({x:this.pageWidth,y:this.pageHeight}),t.push(this.bottomIntersectPoint),t.push(this.topIntersectPoint),t}getAngle(){return 0===this.direction?-this.angle:this.angle}getRect(){return this.rect}getPosition(){return this.position}getActiveCorner(){return 0===this.direction?this.rect.topLeft:this.rect.topRight}getDirection(){return this.direction}getFlippingProgress(){return Math.abs((this.position.x-this.pageWidth)/(2*this.pageWidth)*100)}getCorner(){return this.corner}getBottomPagePosition(){return 1===this.direction?{x:this.pageWidth,y:0}:{x:0,y:0}}getShadowStartPoint(){return\"top\"===this.corner?this.topIntersectPoint:null!==this.sideIntersectPoint?this.sideIntersectPoint:this.topIntersectPoint}getShadowAngle(){const t=h.GetAngleBetweenTwoLine(this.getSegmentToShadowLine(),[{x:0,y:0},{x:this.pageWidth,y:0}]);return 0===this.direction?t:Math.PI-t}calcAngleAndPosition(t){let e=t;if(this.updateAngleAndGeometry(e),e=\"top\"===this.corner?this.checkPositionAtCenterLine(e,{x:0,y:0},{x:0,y:this.pageHeight}):this.checkPositionAtCenterLine(e,{x:0,y:this.pageHeight},{x:0,y:0}),Math.abs(e.x-this.pageWidth)<1&&Math.abs(e.y)<1)throw new Error(\"Point is too small\");return e}updateAngleAndGeometry(t){this.angle=this.calculateAngle(t),this.rect=this.getPageRect(t)}calculateAngle(t){const e=this.pageWidth-t.x+1,i=\"bottom\"===this.corner?this.pageHeight-t.y:t.y;let s=2*Math.acos(e/Math.sqrt(i*i+e*e));i<0&&(s=-s);const n=Math.PI-s;if(!isFinite(s)||n>=0&&n<.003)throw new Error(\"The G point is too small\");return\"bottom\"===this.corner&&(s=-s),s}getPageRect(t){return\"top\"===this.corner?this.getRectFromBasePoint([{x:0,y:0},{x:this.pageWidth,y:0},{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}],t):this.getRectFromBasePoint([{x:0,y:-this.pageHeight},{x:this.pageWidth,y:-this.pageHeight},{x:0,y:0},{x:this.pageWidth,y:0}],t)}getRectFromBasePoint(t,e){return{topLeft:this.getRotatedPoint(t[0],e),topRight:this.getRotatedPoint(t[1],e),bottomLeft:this.getRotatedPoint(t[2],e),bottomRight:this.getRotatedPoint(t[3],e)}}getRotatedPoint(t,e){return{x:t.x*Math.cos(this.angle)+t.y*Math.sin(this.angle)+e.x,y:t.y*Math.cos(this.angle)-t.x*Math.sin(this.angle)+e.y}}calculateIntersectPoint(t){const e={left:-1,top:-1,width:this.pageWidth+2,height:this.pageHeight+2};\"top\"===this.corner?(this.topIntersectPoint=h.GetIntersectBetweenTwoSegment(e,[t,this.rect.topRight],[{x:0,y:0},{x:this.pageWidth,y:0}]),this.sideIntersectPoint=h.GetIntersectBetweenTwoSegment(e,[t,this.rect.bottomLeft],[{x:this.pageWidth,y:0},{x:this.pageWidth,y:this.pageHeight}]),this.bottomIntersectPoint=h.GetIntersectBetweenTwoSegment(e,[this.rect.bottomLeft,this.rect.bottomRight],[{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}])):(this.topIntersectPoint=h.GetIntersectBetweenTwoSegment(e,[this.rect.topLeft,this.rect.topRight],[{x:0,y:0},{x:this.pageWidth,y:0}]),this.sideIntersectPoint=h.GetIntersectBetweenTwoSegment(e,[t,this.rect.topLeft],[{x:this.pageWidth,y:0},{x:this.pageWidth,y:this.pageHeight}]),this.bottomIntersectPoint=h.GetIntersectBetweenTwoSegment(e,[this.rect.bottomLeft,this.rect.bottomRight],[{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}]))}checkPositionAtCenterLine(t,e,i){let s=t;const n=h.LimitPointToCircle(e,this.pageWidth,s);s!==n&&(s=n,this.updateAngleAndGeometry(s));const r=Math.sqrt(Math.pow(this.pageWidth,2)+Math.pow(this.pageHeight,2));let o=this.rect.bottomRight,a=this.rect.topLeft;if(\"bottom\"===this.corner&&(o=this.rect.topRight,a=this.rect.bottomLeft),o.x<=0){const t=h.LimitPointToCircle(i,r,a);t!==s&&(s=t,this.updateAngleAndGeometry(s))}return s}getSegmentToShadowLine(){const t=this.getShadowStartPoint();return[t,t!==this.sideIntersectPoint&&null!==this.sideIntersectPoint?this.sideIntersectPoint:this.bottomIntersectPoint]}}class g{constructor(t,e){this.flippingPage=null,this.bottomPage=null,this.calc=null,this.state=\"read\",this.render=t,this.app=e}fold(t){this.setState(\"user_fold\"),null===this.calc&&this.start(t),this.do(this.render.convertToPage(t))}flip(t){if(this.app.getSettings().disableFlipByClick&&!this.isPointOnCorners(t))return;if(null!==this.calc&&this.render.finishAnimation(),!this.start(t))return;const e=this.getBoundsRect();this.setState(\"flipping\");const i=e.height/10,s=\"bottom\"===this.calc.getCorner()?e.height-i:i,n=\"bottom\"===this.calc.getCorner()?e.height:0;this.calc.calc({x:e.pageWidth-i,y:s}),this.animateFlippingTo({x:e.pageWidth-i,y:s},{x:-e.pageWidth,y:n},!0)}start(t){this.reset();const e=this.render.convertToBook(t),i=this.getBoundsRect(),s=this.getDirectionByPoint(e),n=e.y>=i.height/2?\"bottom\":\"top\";if(!this.checkDirection(s))return!1;try{if(this.flippingPage=this.app.getPageCollection().getFlippingPage(s),this.bottomPage=this.app.getPageCollection().getBottomPage(s),\"landscape\"===this.render.getOrientation())if(1===s){const t=this.app.getPageCollection().nextBy(this.flippingPage);null!==t&&this.flippingPage.getDensity()!==t.getDensity()&&(this.flippingPage.setDrawingDensity(\"hard\"),t.setDrawingDensity(\"hard\"))}else{const t=this.app.getPageCollection().prevBy(this.flippingPage);null!==t&&this.flippingPage.getDensity()!==t.getDensity()&&(this.flippingPage.setDrawingDensity(\"hard\"),t.setDrawingDensity(\"hard\"))}return this.render.setDirection(s),this.calc=new a(s,n,i.pageWidth.toString(10),i.height.toString(10)),!0}catch(t){return!1}}do(t){if(null!==this.calc&&this.calc.calc(t)){const t=this.calc.getFlippingProgress();this.bottomPage.setArea(this.calc.getBottomClipArea()),this.bottomPage.setPosition(this.calc.getBottomPagePosition()),this.bottomPage.setAngle(0),this.bottomPage.setHardAngle(0),this.flippingPage.setArea(this.calc.getFlippingClipArea()),this.flippingPage.setPosition(this.calc.getActiveCorner()),this.flippingPage.setAngle(this.calc.getAngle()),0===this.calc.getDirection()?this.flippingPage.setHardAngle(90*(200-2*t)/100):this.flippingPage.setHardAngle(-90*(200-2*t)/100),this.render.setPageRect(this.calc.getRect()),this.render.setBottomPage(this.bottomPage),this.render.setFlippingPage(this.flippingPage),this.render.setShadowData(this.calc.getShadowStartPoint(),this.calc.getShadowAngle(),t,this.calc.getDirection())}}flipToPage(t,e){const i=this.app.getPageCollection().getCurrentSpreadIndex(),s=this.app.getPageCollection().getSpreadIndexByPage(t);try{s>i&&(this.app.getPageCollection().setCurrentSpreadIndex(s-1),this.flipNext(e)),sthis.do(t));const o=this.getAnimationDuration(n.length);this.render.startAnimation(r,o,()=>{this.calc&&(i&&(1===this.calc.getDirection()?this.app.turnToPrevPage():this.app.turnToNextPage()),s&&(this.render.setBottomPage(null),this.render.setFlippingPage(null),this.render.clearShadow(),this.setState(\"read\"),this.reset()))})}getCalculation(){return this.calc}getState(){return this.state}setState(t){this.state!==t&&(this.app.updateState(t),this.state=t)}getDirectionByPoint(t){const e=this.getBoundsRect();if(\"portrait\"===this.render.getOrientation()){if(t.x-e.pageWidth<=e.width/5)return 1}else if(t.x=1e3?e:t/1e3*e}checkDirection(t){return 0===t?this.app.getCurrentPageIndex()=1}reset(){this.calc=null,this.flippingPage=null,this.bottomPage=null}getBoundsRect(){return this.render.getRect()}checkState(...t){for(const e of t)if(this.state===e)return!0;return!1}isPointOnCorners(t){const e=this.getBoundsRect(),i=e.pageWidth,s=Math.sqrt(Math.pow(i,2)+Math.pow(e.height,2))/5,n=this.render.convertToBook(t);return n.x>0&&n.y>0&&n.xe.width-s)&&(n.ye.height-s)}}class l{constructor(t,e){this.leftPage=null,this.rightPage=null,this.flippingPage=null,this.bottomPage=null,this.direction=null,this.orientation=null,this.shadow=null,this.animation=null,this.pageRect=null,this.boundsRect=null,this.timer=0,this.safari=!1,this.setting=e,this.app=t;const i=new RegExp(\"Version\\\\/[\\\\d\\\\.]+.*Safari/\");this.safari=null!==i.exec(window.navigator.userAgent)}render(t){if(null!==this.animation){const e=Math.round((t-this.animation.startedAt)/this.animation.durationFrame);e{this.render(e),requestAnimationFrame(t)};requestAnimationFrame(t)}startAnimation(t,e,i){this.finishAnimation(),this.animation={frames:t,duration:e,durationFrame:e/t.length,onAnimateEnd:i,startedAt:this.timer}}finishAnimation(){null!==this.animation&&(this.animation.frames[this.animation.frames.length-1](),null!==this.animation.onAnimateEnd&&this.animation.onAnimateEnd()),this.animation=null}update(){this.boundsRect=null;const t=this.calculateBoundsRect();this.orientation!==t&&(this.orientation=t,this.app.updateOrientation(t))}calculateBoundsRect(){let t=\"landscape\";const e=this.getBlockWidth(),i=e/2,s=this.getBlockHeight()/2,n=this.setting.width/this.setting.height;let h=this.setting.width,r=this.setting.height,o=i-h;return\"stretch\"===this.setting.size?(e<2*this.setting.minWidth&&this.app.getSettings().usePortrait&&(t=\"portrait\"),h=\"portrait\"===t?this.getBlockWidth():this.getBlockWidth()/2,h>this.setting.maxWidth&&(h=this.setting.maxWidth),r=h/n,r>this.getBlockHeight()&&(r=this.getBlockHeight(),h=r*n),o=\"portrait\"===t?i-h/2-h:i-h):e<2*h&&this.app.getSettings().usePortrait&&(t=\"portrait\",o=i-h/2-h),this.boundsRect={left:o,top:s-r/2,width:2*h,height:r,pageWidth:h},t}setShadowData(t,e,i,s){if(!this.app.getSettings().drawShadow)return;const n=100*this.getSettings().maxShadowOpacity;this.shadow={pos:t,angle:e,width:3*this.getRect().pageWidth/4*i/100,opacity:(100-i)*n/100/100,direction:s,progress:2*i}}clearShadow(){this.shadow=null}getBlockWidth(){return this.app.getUI().getDistElement().offsetWidth}getBlockHeight(){return this.app.getUI().getDistElement().offsetHeight}getDirection(){return this.direction}getRect(){return null===this.boundsRect&&this.calculateBoundsRect(),this.boundsRect}getSettings(){return this.app.getSettings()}getOrientation(){return this.orientation}setPageRect(t){this.pageRect=t}setDirection(t){this.direction=t}setRightPage(t){null!==t&&t.setOrientation(1),this.rightPage=t}setLeftPage(t){null!==t&&t.setOrientation(0),this.leftPage=t}setBottomPage(t){null!==t&&t.setOrientation(1===this.direction?0:1),this.bottomPage=t}setFlippingPage(t){null!==t&&t.setOrientation(0===this.direction&&\"portrait\"!==this.orientation?0:1),this.flippingPage=t}convertToBook(t){const e=this.getRect();return{x:t.x-e.left,y:t.y-e.top}}isSafari(){return this.safari}convertToPage(t,e){e||(e=this.direction);const i=this.getRect();return{x:0===e?t.x-i.left-i.width/2:i.width/2-t.x+i.left,y:t.y-i.top}}convertToGlobal(t,e){if(e||(e=this.direction),null==t)return null;const i=this.getRect();return{x:0===e?t.x+i.left+i.width/2:i.width/2-t.x+i.left,y:t.y+i.top}}convertRectToGlobal(t,e){return e||(e=this.direction),{topLeft:this.convertToGlobal(t.topLeft,e),topRight:this.convertToGlobal(t.topRight,e),bottomLeft:this.convertToGlobal(t.bottomLeft,e),bottomRight:this.convertToGlobal(t.bottomRight,e)}}}class d extends l{constructor(t,e,i){super(t,e),this.canvas=i,this.ctx=i.getContext(\"2d\")}getContext(){return this.ctx}reload(){}drawFrame(){this.clear(),\"portrait\"!==this.orientation&&null!=this.leftPage&&this.leftPage.simpleDraw(0),null!=this.rightPage&&this.rightPage.simpleDraw(1),null!=this.bottomPage&&this.bottomPage.draw(),this.drawBookShadow(),null!=this.flippingPage&&this.flippingPage.draw(),null!=this.shadow&&(this.drawOuterShadow(),this.drawInnerShadow());const t=this.getRect();\"portrait\"===this.orientation&&(this.ctx.beginPath(),this.ctx.rect(t.left+t.pageWidth,t.top,t.width,t.height),this.ctx.clip())}drawBookShadow(){const t=this.getRect();this.ctx.save(),this.ctx.beginPath();const e=t.width/20;this.ctx.rect(t.left,t.top,t.width,t.height);const i={x:t.left+t.width/2-e/2,y:0};this.ctx.translate(i.x,i.y);const s=this.ctx.createLinearGradient(0,0,e,0);s.addColorStop(0,\"rgba(0, 0, 0, 0)\"),s.addColorStop(.4,\"rgba(0, 0, 0, 0.2)\"),s.addColorStop(.49,\"rgba(0, 0, 0, 0.1)\"),s.addColorStop(.5,\"rgba(0, 0, 0, 0.5)\"),s.addColorStop(.51,\"rgba(0, 0, 0, 0.4)\"),s.addColorStop(1,\"rgba(0, 0, 0, 0)\"),this.ctx.clip(),this.ctx.fillStyle=s,this.ctx.fillRect(0,0,e,2*t.height),this.ctx.restore()}drawOuterShadow(){const t=this.getRect();this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(t.left,t.top,t.width,t.height);const e=this.convertToGlobal({x:this.shadow.pos.x,y:this.shadow.pos.y});this.ctx.translate(e.x,e.y),this.ctx.rotate(Math.PI+this.shadow.angle+Math.PI/2);const i=this.ctx.createLinearGradient(0,0,this.shadow.width,0);0===this.shadow.direction?(this.ctx.translate(0,-100),i.addColorStop(0,\"rgba(0, 0, 0, \"+this.shadow.opacity+\")\"),i.addColorStop(1,\"rgba(0, 0, 0, 0)\")):(this.ctx.translate(-this.shadow.width,-100),i.addColorStop(0,\"rgba(0, 0, 0, 0)\"),i.addColorStop(1,\"rgba(0, 0, 0, \"+this.shadow.opacity+\")\")),this.ctx.clip(),this.ctx.fillStyle=i,this.ctx.fillRect(0,0,this.shadow.width,2*t.height),this.ctx.restore()}drawInnerShadow(){const t=this.getRect();this.ctx.save(),this.ctx.beginPath();const e=this.convertToGlobal({x:this.shadow.pos.x,y:this.shadow.pos.y}),i=this.convertRectToGlobal(this.pageRect);this.ctx.moveTo(i.topLeft.x,i.topLeft.y),this.ctx.lineTo(i.topRight.x,i.topRight.y),this.ctx.lineTo(i.bottomRight.x,i.bottomRight.y),this.ctx.lineTo(i.bottomLeft.x,i.bottomLeft.y),this.ctx.translate(e.x,e.y),this.ctx.rotate(Math.PI+this.shadow.angle+Math.PI/2);const s=3*this.shadow.width/4,n=this.ctx.createLinearGradient(0,0,s,0);0===this.shadow.direction?(this.ctx.translate(-s,-100),n.addColorStop(1,\"rgba(0, 0, 0, \"+this.shadow.opacity+\")\"),n.addColorStop(.9,\"rgba(0, 0, 0, 0.05)\"),n.addColorStop(.7,\"rgba(0, 0, 0, \"+this.shadow.opacity+\")\"),n.addColorStop(0,\"rgba(0, 0, 0, 0)\")):(this.ctx.translate(0,-100),n.addColorStop(0,\"rgba(0, 0, 0, \"+this.shadow.opacity+\")\"),n.addColorStop(.1,\"rgba(0, 0, 0, 0.05)\"),n.addColorStop(.3,\"rgba(0, 0, 0, \"+this.shadow.opacity+\")\"),n.addColorStop(1,\"rgba(0, 0, 0, 0)\")),this.ctx.clip(),this.ctx.fillStyle=n,this.ctx.fillRect(0,0,s,2*t.height),this.ctx.restore()}clear(){this.ctx.fillStyle=\"white\",this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height)}}class p{constructor(t,e,i){this.touchPoint=null,this.swipeTimeout=250,this.onResize=()=>{this.update()},this.onMouseDown=t=>{if(this.checkTarget(t.target)){const e=this.getMousePos(t.clientX,t.clientY);this.app.startUserTouch(e),t.preventDefault()}},this.onTouchStart=t=>{if(this.checkTarget(t.target)&&t.changedTouches.length>0){const e=t.changedTouches[0],i=this.getMousePos(e.clientX,e.clientY);this.touchPoint={point:i,time:Date.now()},setTimeout(()=>{null!==this.touchPoint&&this.app.startUserTouch(i)},this.swipeTimeout),this.app.getSettings().mobileScrollSupport||t.preventDefault()}},this.onMouseUp=t=>{const e=this.getMousePos(t.clientX,t.clientY);this.app.userStop(e)},this.onMouseMove=t=>{const e=this.getMousePos(t.clientX,t.clientY);this.app.userMove(e,!1)},this.onTouchMove=t=>{if(t.changedTouches.length>0){const e=t.changedTouches[0],i=this.getMousePos(e.clientX,e.clientY);this.app.getSettings().mobileScrollSupport?(null!==this.touchPoint&&(Math.abs(this.touchPoint.point.x-i.x)>10||\"read\"!==this.app.getState())&&t.cancelable&&this.app.userMove(i,!0),\"read\"!==this.app.getState()&&t.preventDefault()):this.app.userMove(i,!0)}},this.onTouchEnd=t=>{if(t.changedTouches.length>0){const e=t.changedTouches[0],i=this.getMousePos(e.clientX,e.clientY);let s=!1;if(null!==this.touchPoint){const t=i.x-this.touchPoint.point.x,e=Math.abs(i.y-this.touchPoint.point.y);Math.abs(t)>this.swipeDistance&&e<2*this.swipeDistance&&Date.now()-this.touchPoint.time0?this.app.flipPrev(this.touchPoint.point.y'),this.wrapper=t.querySelector(\".stf__wrapper\"),this.app=e;const s=this.app.getSettings().usePortrait?1:2;t.style.minWidth=i.minWidth*s+\"px\",t.style.minHeight=i.minHeight+\"px\",\"fixed\"===i.size&&(t.style.minWidth=i.width*s+\"px\",t.style.minHeight=i.height+\"px\"),i.autoSize&&(t.style.width=\"100%\",t.style.maxWidth=2*i.maxWidth+\"px\"),t.style.display=\"block\",window.addEventListener(\"resize\",this.onResize,!1),this.swipeDistance=i.swipeDistance}destroy(){this.app.getSettings().useMouseEvents&&this.removeHandlers(),this.distElement.remove(),this.wrapper.remove()}getDistElement(){return this.distElement}getWrapper(){return this.wrapper}setOrientationStyle(t){this.wrapper.classList.remove(\"--portrait\",\"--landscape\"),\"portrait\"===t?(this.app.getSettings().autoSize&&(this.wrapper.style.paddingBottom=this.app.getSettings().height/this.app.getSettings().width*100+\"%\"),this.wrapper.classList.add(\"--portrait\")):(this.app.getSettings().autoSize&&(this.wrapper.style.paddingBottom=this.app.getSettings().height/(2*this.app.getSettings().width)*100+\"%\"),this.wrapper.classList.add(\"--landscape\")),this.update()}removeHandlers(){window.removeEventListener(\"resize\",this.onResize),this.distElement.removeEventListener(\"mousedown\",this.onMouseDown),this.distElement.removeEventListener(\"touchstart\",this.onTouchStart),window.removeEventListener(\"mousemove\",this.onMouseMove),window.removeEventListener(\"touchmove\",this.onTouchMove),window.removeEventListener(\"mouseup\",this.onMouseUp),window.removeEventListener(\"touchend\",this.onTouchEnd)}setHandlers(){window.addEventListener(\"resize\",this.onResize,!1),this.app.getSettings().useMouseEvents&&(this.distElement.addEventListener(\"mousedown\",this.onMouseDown),this.distElement.addEventListener(\"touchstart\",this.onTouchStart),window.addEventListener(\"mousemove\",this.onMouseMove),window.addEventListener(\"touchmove\",this.onTouchMove,{passive:!this.app.getSettings().mobileScrollSupport}),window.addEventListener(\"mouseup\",this.onMouseUp),window.addEventListener(\"touchend\",this.onTouchEnd))}getMousePos(t,e){const i=this.distElement.getBoundingClientRect();return{x:t-i.left,y:e-i.top}}checkTarget(t){return!this.app.getSettings().clickEventForward||![\"a\",\"button\"].includes(t.tagName.toLowerCase())}}class c extends p{constructor(t,e,i,s){super(t,e,i),this.wrapper.insertAdjacentHTML(\"afterbegin\",'
'),this.distElement=t.querySelector(\".stf__block\"),this.items=s;for(const t of s)this.distElement.appendChild(t);this.setHandlers()}clear(){for(const t of this.items)this.parentElement.appendChild(t)}updateItems(t){this.removeHandlers(),this.distElement.innerHTML=\"\";for(const e of t)this.distElement.appendChild(e);this.items=t,this.setHandlers()}update(){this.app.getRender().update()}}class u extends p{constructor(t,e,i){super(t,e,i),this.wrapper.innerHTML='',this.canvas=t.querySelectorAll(\"canvas\")[0],this.distElement=this.canvas,this.resizeCanvas(),this.setHandlers()}resizeCanvas(){const t=getComputedStyle(this.canvas),e=parseInt(t.getPropertyValue(\"width\"),10),i=parseInt(t.getPropertyValue(\"height\"),10);this.canvas.width=e,this.canvas.height=i}getCanvas(){return this.canvas}update(){this.resizeCanvas(),this.app.getRender().update()}}class w extends l{constructor(t,e,i){super(t,e),this.outerShadow=null,this.innerShadow=null,this.hardShadow=null,this.hardInnerShadow=null,this.element=i,this.createShadows()}createShadows(){this.element.insertAdjacentHTML(\"beforeend\",'
\\n
\\n
\\n
'),this.outerShadow=this.element.querySelector(\".stf__outerShadow\"),this.innerShadow=this.element.querySelector(\".stf__innerShadow\"),this.hardShadow=this.element.querySelector(\".stf__hardShadow\"),this.hardInnerShadow=this.element.querySelector(\".stf__hardInnerShadow\")}clearShadow(){super.clearShadow(),this.outerShadow.style.cssText=\"display: none\",this.innerShadow.style.cssText=\"display: none\",this.hardShadow.style.cssText=\"display: none\",this.hardInnerShadow.style.cssText=\"display: none\"}reload(){this.element.querySelector(\".stf__outerShadow\")||this.createShadows()}drawHardInnerShadow(){const t=this.getRect(),e=this.shadow.progress>100?200-this.shadow.progress:this.shadow.progress;let i=(100-e)*(2.5*t.pageWidth)/100+20;i>t.pageWidth&&(i=t.pageWidth);let s=`\\n display: block;\\n z-index: ${(this.getSettings().startZIndex+5).toString(10)};\\n width: ${i}px;\\n height: ${t.height}px;\\n background: linear-gradient(to right,\\n rgba(0, 0, 0, ${this.shadow.opacity*e/100}) 5%,\\n rgba(0, 0, 0, 0) 100%);\\n left: ${t.left+t.width/2}px;\\n transform-origin: 0 0;\\n `;s+=0===this.getDirection()&&this.shadow.progress>100||1===this.getDirection()&&this.shadow.progress<=100?\"transform: translate3d(0, 0, 0);\":\"transform: translate3d(0, 0, 0) rotateY(180deg);\",this.hardInnerShadow.style.cssText=s}drawHardOuterShadow(){const t=this.getRect();let e=(100-(this.shadow.progress>100?200-this.shadow.progress:this.shadow.progress))*(2.5*t.pageWidth)/100+20;e>t.pageWidth&&(e=t.pageWidth);let i=`\\n display: block;\\n z-index: ${(this.getSettings().startZIndex+4).toString(10)};\\n width: ${e}px;\\n height: ${t.height}px;\\n background: linear-gradient(to left, rgba(0, 0, 0, ${this.shadow.opacity}) 5%, rgba(0, 0, 0, 0) 100%);\\n left: ${t.left+t.width/2}px;\\n transform-origin: 0 0;\\n `;i+=0===this.getDirection()&&this.shadow.progress>100||1===this.getDirection()&&this.shadow.progress<=100?\"transform: translate3d(0, 0, 0) rotateY(180deg);\":\"transform: translate3d(0, 0, 0);\",this.hardShadow.style.cssText=i}drawInnerShadow(){const t=this.getRect(),e=3*this.shadow.width/4,i=0===this.getDirection()?e:0,s=0===this.getDirection()?\"to left\":\"to right\",n=this.convertToGlobal(this.shadow.pos),r=this.shadow.angle+3*Math.PI/2,o=[this.pageRect.topLeft,this.pageRect.topRight,this.pageRect.bottomRight,this.pageRect.bottomLeft];let a=\"polygon( \";for(const t of o){let e=1===this.getDirection()?{x:-t.x+this.shadow.pos.x,y:t.y-this.shadow.pos.y}:{x:t.x-this.shadow.pos.x,y:t.y-this.shadow.pos.y};e=h.GetRotatedPoint(e,{x:i,y:100},r),a+=e.x+\"px \"+e.y+\"px, \"}a=a.slice(0,-2),a+=\")\";const g=`\\n display: block;\\n z-index: ${(this.getSettings().startZIndex+10).toString(10)};\\n width: ${e}px;\\n height: ${2*t.height}px;\\n background: linear-gradient(${s},\\n rgba(0, 0, 0, ${this.shadow.opacity}) 5%,\\n rgba(0, 0, 0, 0.05) 15%,\\n rgba(0, 0, 0, ${this.shadow.opacity}) 35%,\\n rgba(0, 0, 0, 0) 100%);\\n transform-origin: ${i}px 100px;\\n transform: translate3d(${n.x-i}px, ${n.y-100}px, 0) rotate(${r}rad);\\n clip-path: ${a};\\n -webkit-clip-path: ${a};\\n `;this.innerShadow.style.cssText=g}drawOuterShadow(){const t=this.getRect(),e=this.convertToGlobal({x:this.shadow.pos.x,y:this.shadow.pos.y}),i=this.shadow.angle+3*Math.PI/2,s=1===this.getDirection()?this.shadow.width:0,n=0===this.getDirection()?\"to right\":\"to left\",r=[{x:0,y:0},{x:t.pageWidth,y:0},{x:t.pageWidth,y:t.height},{x:0,y:t.height}];let o=\"polygon( \";for(const t of r)if(null!==t){let e=1===this.getDirection()?{x:-t.x+this.shadow.pos.x,y:t.y-this.shadow.pos.y}:{x:t.x-this.shadow.pos.x,y:t.y-this.shadow.pos.y};e=h.GetRotatedPoint(e,{x:s,y:100},i),o+=e.x+\"px \"+e.y+\"px, \"}o=o.slice(0,-2),o+=\")\";const a=`\\n display: block;\\n z-index: ${(this.getSettings().startZIndex+10).toString(10)};\\n width: ${this.shadow.width}px;\\n height: ${2*t.height}px;\\n background: linear-gradient(${n}, rgba(0, 0, 0, ${this.shadow.opacity}), rgba(0, 0, 0, 0));\\n transform-origin: ${s}px 100px;\\n transform: translate3d(${e.x-s}px, ${e.y-100}px, 0) rotate(${i}rad);\\n clip-path: ${o};\\n -webkit-clip-path: ${o};\\n `;this.outerShadow.style.cssText=a}drawLeftPage(){\"portrait\"!==this.orientation&&null!==this.leftPage&&(1===this.direction&&null!==this.flippingPage&&\"hard\"===this.flippingPage.getDrawingDensity()?(this.leftPage.getElement().style.zIndex=(this.getSettings().startZIndex+5).toString(10),this.leftPage.setHardDrawingAngle(180+this.flippingPage.getHardAngle()),this.leftPage.draw(this.flippingPage.getDrawingDensity())):this.leftPage.simpleDraw(0))}drawRightPage(){null!==this.rightPage&&(0===this.direction&&null!==this.flippingPage&&\"hard\"===this.flippingPage.getDrawingDensity()?(this.rightPage.getElement().style.zIndex=(this.getSettings().startZIndex+5).toString(10),this.rightPage.setHardDrawingAngle(180+this.flippingPage.getHardAngle()),this.rightPage.draw(this.flippingPage.getDrawingDensity())):this.rightPage.simpleDraw(1))}drawBottomPage(){if(null===this.bottomPage)return;const t=null!=this.flippingPage?this.flippingPage.getDrawingDensity():null;\"portrait\"===this.orientation&&1===this.direction||(this.bottomPage.getElement().style.zIndex=(this.getSettings().startZIndex+3).toString(10),this.bottomPage.draw(t))}drawFrame(){this.clear(),this.drawLeftPage(),this.drawRightPage(),this.drawBottomPage(),null!=this.flippingPage&&(this.flippingPage.getElement().style.zIndex=(this.getSettings().startZIndex+5).toString(10),this.flippingPage.draw()),null!=this.shadow&&null!==this.flippingPage&&(\"soft\"===this.flippingPage.getDrawingDensity()?(this.drawOuterShadow(),this.drawInnerShadow()):(this.drawHardOuterShadow(),this.drawHardInnerShadow()))}clear(){for(const t of this.app.getPageCollection().getPages())t!==this.leftPage&&t!==this.rightPage&&t!==this.flippingPage&&t!==this.bottomPage&&(t.getElement().style.cssText=\"display: none\"),t.getTemporaryCopy()!==this.flippingPage&&t.hideTemporaryCopy()}update(){super.update(),null!==this.rightPage&&this.rightPage.setOrientation(1),null!==this.leftPage&&this.leftPage.setOrientation(0)}}class x{constructor(){this._default={startPage:0,size:\"fixed\",width:0,height:0,minWidth:0,maxWidth:0,minHeight:0,maxHeight:0,drawShadow:!0,flippingTime:1e3,usePortrait:!0,startZIndex:0,autoSize:!0,maxShadowOpacity:1,showCover:!1,mobileScrollSupport:!0,swipeDistance:30,clickEventForward:!0,useMouseEvents:!0,showPageCorners:!0,disableFlipByClick:!1}}getSettings(t){const e=this._default;if(Object.assign(e,t),\"stretch\"!==e.size&&\"fixed\"!==e.size)throw new Error('Invalid size type. Available only \"fixed\" and \"stretch\" value');if(e.width<=0||e.height<=0)throw new Error(\"Invalid width or height\");if(e.flippingTime<=0)throw new Error(\"Invalid flipping time\");return\"stretch\"===e.size?(e.minWidth<=0&&(e.minWidth=100),e.maxWidth{this.ui.update(),this.trigger(\"init\",this,{page:this.setting.startPage,mode:this.render.getOrientation()})},1)}loadFromHTML(t){this.ui=new c(this.block,this,this.setting,t),this.render=new w(this,this.setting,this.ui.getDistElement()),this.flipController=new g(this.render,this),this.pages=new o(this,this.render,this.ui.getDistElement(),t),this.pages.load(),this.render.start(),this.pages.show(this.setting.startPage),setTimeout(()=>{this.ui.update(),this.trigger(\"init\",this,{page:this.setting.startPage,mode:this.render.getOrientation()})},1)}updateFromImages(t){const e=this.pages.getCurrentPageIndex();this.pages.destroy(),this.pages=new n(this,this.render,t),this.pages.load(),this.pages.show(e),this.trigger(\"update\",this,{page:e,mode:this.render.getOrientation()})}updateFromHtml(t){const e=this.pages.getCurrentPageIndex();this.pages.destroy(),this.pages=new o(this,this.render,this.ui.getDistElement(),t),this.pages.load(),this.ui.updateItems(t),this.render.reload(),this.pages.show(e),this.trigger(\"update\",this,{page:e,mode:this.render.getOrientation()})}clear(){this.pages.destroy(),this.ui.clear()}turnToPrevPage(){this.pages.showPrev()}turnToNextPage(){this.pages.showNext()}turnToPage(t){this.pages.show(t)}flipNext(t=\"top\"){this.flipController.flipNext(t)}flipPrev(t=\"top\"){this.flipController.flipPrev(t)}flip(t,e=\"top\"){this.flipController.flipToPage(t,e)}updateState(t){this.trigger(\"changeState\",this,t)}updatePageIndex(t){this.trigger(\"flip\",this,t)}updateOrientation(t){this.ui.setOrientationStyle(t),this.update(),this.trigger(\"changeOrientation\",this,t)}getPageCount(){return this.pages.getPageCount()}getCurrentPageIndex(){return this.pages.getCurrentPageIndex()}getPage(t){return this.pages.getPage(t)}getRender(){return this.render}getFlipController(){return this.flipController}getOrientation(){return this.render.getOrientation()}getBoundsRect(){return this.render.getRect()}getSettings(){return this.setting}getUI(){return this.ui}getState(){return this.flipController.getState()}getPageCollection(){return this.pages}startUserTouch(t){this.mousePosition=t,this.isUserTouch=!0,this.isUserMove=!1}userMove(t,e){this.isUserTouch||e||!this.setting.showPageCorners?this.isUserTouch&&h.GetDistanceBetweenTwoPoint(this.mousePosition,t)>5&&(this.isUserMove=!0,this.flipController.fold(t)):this.flipController.showCorner(t)}userStop(t,e=!1){this.isUserTouch&&(this.isUserTouch=!1,e||(this.isUserMove?this.flipController.stopMove():this.flipController.flip(t)))}},Object.defineProperty(t,\"__esModule\",{value:!0})}));\n","import { Controller } from \"@hotwired/stimulus\"\nimport { PageFlip } from \"page-flip\"\n\nimport Stimulus from \"../../shared/utils/stimulus\"\n\nclass PiggyBook extends Controller {\n static targets = [`pages`, `page`, `navNext`, `navPrev`, `dots`]\n #outerHTML = ``\n #pageFlip = null\n #dots = []\n\n connect() {\n this.#outerHTML = this.element.outerHTML\n\n this.#pageFlip = new PageFlip(this.pagesTarget, {\n width: 520,\n height: 640,\n minWidth: 280,\n size: `stretch`,\n showCover: true,\n })\n\n this.#pageFlip.on(`flip`, this.flipped)\n this.#pageFlip.loadFromHTML(this.pageTargets)\n this.navNextTarget.disabled = false\n this.insertDots()\n this.turnToHashPage()\n window.addEventListener(`popstate`, this.turnToHashPage)\n }\n\n disconnect() {\n this.#pageFlip.destroy()\n this.element.outerHTML = this.#outerHTML\n window.removeEventListener(`popstate`, this.turnToHashPage)\n }\n\n turnToPrevPage = () => {\n this.#pageFlip.flipPrev()\n }\n\n turnToNextPage = () => {\n this.#pageFlip.flipNext()\n }\n\n flipped = (e) => {\n if (!e.data) {\n this.navPrevTarget.disabled = true\n } else if (e.data + 1 == this.#pageFlip.getPageCount()) {\n this.navNextTarget.disabled = true\n } else {\n this.navPrevTarget.disabled = false\n this.navNextTarget.disabled = false\n }\n\n this.selectCurrentDot()\n }\n\n getMethods = (obj) => Object.getOwnPropertyNames(obj)\n\n dotClick = (e) => {\n const num =\n e.target.dataset.index * 2 -\n (e.target.dataset.index * 2 == this.#pageFlip.getPageCount() ? 1 : 0)\n\n this.#pageFlip.flip(num)\n }\n\n insertDots = () => {\n for (let i = 1; i < this.#pageFlip.getPageCount() / 2 + 2; i++) {\n const button = document.createElement(`button`)\n button.innerText = i\n button.title = i\n button.dataset.index = i - 1\n button.addEventListener(`click`, this.dotClick, { passive: true })\n this.dotsTarget.appendChild(button)\n this.#dots.push(button)\n }\n\n this.selectCurrentDot()\n }\n\n selectCurrentDot = () => {\n if (!this.#dots.length) return\n this.#dots.forEach((d) => d.classList.remove(`--active`))\n this.#dots[\n Math.floor((this.#pageFlip.getCurrentPageIndex() + 1) / 2)\n ].classList.add(`--active`)\n }\n\n turnToHashPage = () => {\n const hash = window.location.hash.replace(`#`, ``)\n if (!hash || !this.hasPageTarget) return\n\n const index = this.pageTargets.findIndex((t) => t.id == hash)\n if (index < 0) return\n\n this.#pageFlip.flip(index)\n this.element.scrollIntoView(true)\n }\n}\n\nStimulus.register(`piggy-book`, PiggyBook)\n","/**\n * SSR Window 4.0.2\n * Better handling for window object in SSR environment\n * https://github.com/nolimits4web/ssr-window\n *\n * Copyright 2021, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: December 13, 2021\n */\n/* eslint-disable no-param-reassign */\nfunction isObject(obj) {\n return (obj !== null &&\n typeof obj === 'object' &&\n 'constructor' in obj &&\n obj.constructor === Object);\n}\nfunction extend(target = {}, src = {}) {\n Object.keys(src).forEach((key) => {\n if (typeof target[key] === 'undefined')\n target[key] = src[key];\n else if (isObject(src[key]) &&\n isObject(target[key]) &&\n Object.keys(src[key]).length > 0) {\n extend(target[key], src[key]);\n }\n });\n}\n\nconst ssrDocument = {\n body: {},\n addEventListener() { },\n removeEventListener() { },\n activeElement: {\n blur() { },\n nodeName: '',\n },\n querySelector() {\n return null;\n },\n querySelectorAll() {\n return [];\n },\n getElementById() {\n return null;\n },\n createEvent() {\n return {\n initEvent() { },\n };\n },\n createElement() {\n return {\n children: [],\n childNodes: [],\n style: {},\n setAttribute() { },\n getElementsByTagName() {\n return [];\n },\n };\n },\n createElementNS() {\n return {};\n },\n importNode() {\n return null;\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: '',\n },\n};\nfunction getDocument() {\n const doc = typeof document !== 'undefined' ? document : {};\n extend(doc, ssrDocument);\n return doc;\n}\n\nconst ssrWindow = {\n document: ssrDocument,\n navigator: {\n userAgent: '',\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: '',\n },\n history: {\n replaceState() { },\n pushState() { },\n go() { },\n back() { },\n },\n CustomEvent: function CustomEvent() {\n return this;\n },\n addEventListener() { },\n removeEventListener() { },\n getComputedStyle() {\n return {\n getPropertyValue() {\n return '';\n },\n };\n },\n Image() { },\n Date() { },\n screen: {},\n setTimeout() { },\n clearTimeout() { },\n matchMedia() {\n return {};\n },\n requestAnimationFrame(callback) {\n if (typeof setTimeout === 'undefined') {\n callback();\n return null;\n }\n return setTimeout(callback, 0);\n },\n cancelAnimationFrame(id) {\n if (typeof setTimeout === 'undefined') {\n return;\n }\n clearTimeout(id);\n },\n};\nfunction getWindow() {\n const win = typeof window !== 'undefined' ? window : {};\n extend(win, ssrWindow);\n return win;\n}\n\nexport { extend, getDocument, getWindow, ssrDocument, ssrWindow };\n","/**\n * SSR Window 4.0.0\n * Better handling for window object in SSR environment\n * https://github.com/nolimits4web/ssr-window\n *\n * Copyright 2021, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: August 25, 2021\n */\n/* eslint-disable no-param-reassign */\nfunction isObject(obj) {\n return (obj !== null &&\n typeof obj === 'object' &&\n 'constructor' in obj &&\n obj.constructor === Object);\n}\nfunction extend(target = {}, src = {}) {\n Object.keys(src).forEach((key) => {\n if (typeof target[key] === 'undefined')\n target[key] = src[key];\n else if (isObject(src[key]) &&\n isObject(target[key]) &&\n Object.keys(src[key]).length > 0) {\n extend(target[key], src[key]);\n }\n });\n}\n\nconst ssrDocument = {\n body: {},\n addEventListener() { },\n removeEventListener() { },\n activeElement: {\n blur() { },\n nodeName: '',\n },\n querySelector() {\n return null;\n },\n querySelectorAll() {\n return [];\n },\n getElementById() {\n return null;\n },\n createEvent() {\n return {\n initEvent() { },\n };\n },\n createElement() {\n return {\n children: [],\n childNodes: [],\n style: {},\n setAttribute() { },\n getElementsByTagName() {\n return [];\n },\n };\n },\n createElementNS() {\n return {};\n },\n importNode() {\n return null;\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: '',\n },\n};\nfunction getDocument() {\n const doc = typeof document !== 'undefined' ? document : {};\n extend(doc, ssrDocument);\n return doc;\n}\n\nconst ssrWindow = {\n document: ssrDocument,\n navigator: {\n userAgent: '',\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: '',\n },\n history: {\n replaceState() { },\n pushState() { },\n go() { },\n back() { },\n },\n CustomEvent: function CustomEvent() {\n return this;\n },\n addEventListener() { },\n removeEventListener() { },\n getComputedStyle() {\n return {\n getPropertyValue() {\n return '';\n },\n };\n },\n Image() { },\n Date() { },\n screen: {},\n setTimeout() { },\n clearTimeout() { },\n matchMedia() {\n return {};\n },\n requestAnimationFrame(callback) {\n if (typeof setTimeout === 'undefined') {\n callback();\n return null;\n }\n return setTimeout(callback, 0);\n },\n cancelAnimationFrame(id) {\n if (typeof setTimeout === 'undefined') {\n return;\n }\n clearTimeout(id);\n },\n};\nfunction getWindow() {\n const win = typeof window !== 'undefined' ? window : {};\n extend(win, ssrWindow);\n return win;\n}\n\nexport { extend, getDocument, getWindow, ssrDocument, ssrWindow };\n","/**\n * Dom7 4.0.2\n * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API\n * https://framework7.io/docs/dom7.html\n *\n * Copyright 2021, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: December 13, 2021\n */\nimport { getWindow, getDocument } from 'ssr-window';\n\n/* eslint-disable no-proto */\nfunction makeReactive(obj) {\n const proto = obj.__proto__;\n Object.defineProperty(obj, '__proto__', {\n get() {\n return proto;\n },\n\n set(value) {\n proto.__proto__ = value;\n }\n\n });\n}\n\nclass Dom7 extends Array {\n constructor(items) {\n super(...(items || []));\n makeReactive(this);\n }\n\n}\n\nfunction arrayFlat(arr = []) {\n const res = [];\n arr.forEach(el => {\n if (Array.isArray(el)) {\n res.push(...arrayFlat(el));\n } else {\n res.push(el);\n }\n });\n return res;\n}\nfunction arrayFilter(arr, callback) {\n return Array.prototype.filter.call(arr, callback);\n}\nfunction arrayUnique(arr) {\n const uniqueArray = [];\n\n for (let i = 0; i < arr.length; i += 1) {\n if (uniqueArray.indexOf(arr[i]) === -1) uniqueArray.push(arr[i]);\n }\n\n return uniqueArray;\n}\nfunction toCamelCase(string) {\n return string.toLowerCase().replace(/-(.)/g, (match, group) => group.toUpperCase());\n}\n\n// eslint-disable-next-line\n\nfunction qsa(selector, context) {\n if (typeof selector !== 'string') {\n return [selector];\n }\n\n const a = [];\n const res = context.querySelectorAll(selector);\n\n for (let i = 0; i < res.length; i += 1) {\n a.push(res[i]);\n }\n\n return a;\n}\n\nfunction $(selector, context) {\n const window = getWindow();\n const document = getDocument();\n let arr = [];\n\n if (!context && selector instanceof Dom7) {\n return selector;\n }\n\n if (!selector) {\n return new Dom7(arr);\n }\n\n if (typeof selector === 'string') {\n const html = selector.trim();\n\n if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {\n let toCreate = 'div';\n if (html.indexOf(' c.split(' ')));\n this.forEach(el => {\n el.classList.add(...classNames);\n });\n return this;\n}\n\nfunction removeClass(...classes) {\n const classNames = arrayFlat(classes.map(c => c.split(' ')));\n this.forEach(el => {\n el.classList.remove(...classNames);\n });\n return this;\n}\n\nfunction toggleClass(...classes) {\n const classNames = arrayFlat(classes.map(c => c.split(' ')));\n this.forEach(el => {\n classNames.forEach(className => {\n el.classList.toggle(className);\n });\n });\n}\n\nfunction hasClass(...classes) {\n const classNames = arrayFlat(classes.map(c => c.split(' ')));\n return arrayFilter(this, el => {\n return classNames.filter(className => el.classList.contains(className)).length > 0;\n }).length > 0;\n}\n\nfunction attr(attrs, value) {\n if (arguments.length === 1 && typeof attrs === 'string') {\n // Get attr\n if (this[0]) return this[0].getAttribute(attrs);\n return undefined;\n } // Set attrs\n\n\n for (let i = 0; i < this.length; i += 1) {\n if (arguments.length === 2) {\n // String\n this[i].setAttribute(attrs, value);\n } else {\n // Object\n for (const attrName in attrs) {\n this[i][attrName] = attrs[attrName];\n this[i].setAttribute(attrName, attrs[attrName]);\n }\n }\n }\n\n return this;\n}\n\nfunction removeAttr(attr) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].removeAttribute(attr);\n }\n\n return this;\n}\n\nfunction prop(props, value) {\n if (arguments.length === 1 && typeof props === 'string') {\n // Get prop\n if (this[0]) return this[0][props];\n } else {\n // Set props\n for (let i = 0; i < this.length; i += 1) {\n if (arguments.length === 2) {\n // String\n this[i][props] = value;\n } else {\n // Object\n for (const propName in props) {\n this[i][propName] = props[propName];\n }\n }\n }\n\n return this;\n }\n\n return this;\n}\n\nfunction data(key, value) {\n let el;\n\n if (typeof value === 'undefined') {\n el = this[0];\n if (!el) return undefined; // Get value\n\n if (el.dom7ElementDataStorage && key in el.dom7ElementDataStorage) {\n return el.dom7ElementDataStorage[key];\n }\n\n const dataKey = el.getAttribute(`data-${key}`);\n\n if (dataKey) {\n return dataKey;\n }\n\n return undefined;\n } // Set value\n\n\n for (let i = 0; i < this.length; i += 1) {\n el = this[i];\n if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {};\n el.dom7ElementDataStorage[key] = value;\n }\n\n return this;\n}\n\nfunction removeData(key) {\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (el.dom7ElementDataStorage && el.dom7ElementDataStorage[key]) {\n el.dom7ElementDataStorage[key] = null;\n delete el.dom7ElementDataStorage[key];\n }\n }\n}\n\nfunction dataset() {\n const el = this[0];\n if (!el) return undefined;\n const dataset = {}; // eslint-disable-line\n\n if (el.dataset) {\n for (const dataKey in el.dataset) {\n dataset[dataKey] = el.dataset[dataKey];\n }\n } else {\n for (let i = 0; i < el.attributes.length; i += 1) {\n const attr = el.attributes[i];\n\n if (attr.name.indexOf('data-') >= 0) {\n dataset[toCamelCase(attr.name.split('data-')[1])] = attr.value;\n }\n }\n }\n\n for (const key in dataset) {\n if (dataset[key] === 'false') dataset[key] = false;else if (dataset[key] === 'true') dataset[key] = true;else if (parseFloat(dataset[key]) === dataset[key] * 1) dataset[key] *= 1;\n }\n\n return dataset;\n}\n\nfunction val(value) {\n if (typeof value === 'undefined') {\n // get value\n const el = this[0];\n if (!el) return undefined;\n\n if (el.multiple && el.nodeName.toLowerCase() === 'select') {\n const values = [];\n\n for (let i = 0; i < el.selectedOptions.length; i += 1) {\n values.push(el.selectedOptions[i].value);\n }\n\n return values;\n }\n\n return el.value;\n } // set value\n\n\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (Array.isArray(value) && el.multiple && el.nodeName.toLowerCase() === 'select') {\n for (let j = 0; j < el.options.length; j += 1) {\n el.options[j].selected = value.indexOf(el.options[j].value) >= 0;\n }\n } else {\n el.value = value;\n }\n }\n\n return this;\n}\n\nfunction value(value) {\n return this.val(value);\n}\n\nfunction transform(transform) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].style.transform = transform;\n }\n\n return this;\n}\n\nfunction transition(duration) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].style.transitionDuration = typeof duration !== 'string' ? `${duration}ms` : duration;\n }\n\n return this;\n}\n\nfunction on(...args) {\n let [eventType, targetSelector, listener, capture] = args;\n\n if (typeof args[1] === 'function') {\n [eventType, listener, capture] = args;\n targetSelector = undefined;\n }\n\n if (!capture) capture = false;\n\n function handleLiveEvent(e) {\n const target = e.target;\n if (!target) return;\n const eventData = e.target.dom7EventData || [];\n\n if (eventData.indexOf(e) < 0) {\n eventData.unshift(e);\n }\n\n if ($(target).is(targetSelector)) listener.apply(target, eventData);else {\n const parents = $(target).parents(); // eslint-disable-line\n\n for (let k = 0; k < parents.length; k += 1) {\n if ($(parents[k]).is(targetSelector)) listener.apply(parents[k], eventData);\n }\n }\n }\n\n function handleEvent(e) {\n const eventData = e && e.target ? e.target.dom7EventData || [] : [];\n\n if (eventData.indexOf(e) < 0) {\n eventData.unshift(e);\n }\n\n listener.apply(this, eventData);\n }\n\n const events = eventType.split(' ');\n let j;\n\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (!targetSelector) {\n for (j = 0; j < events.length; j += 1) {\n const event = events[j];\n if (!el.dom7Listeners) el.dom7Listeners = {};\n if (!el.dom7Listeners[event]) el.dom7Listeners[event] = [];\n el.dom7Listeners[event].push({\n listener,\n proxyListener: handleEvent\n });\n el.addEventListener(event, handleEvent, capture);\n }\n } else {\n // Live events\n for (j = 0; j < events.length; j += 1) {\n const event = events[j];\n if (!el.dom7LiveListeners) el.dom7LiveListeners = {};\n if (!el.dom7LiveListeners[event]) el.dom7LiveListeners[event] = [];\n el.dom7LiveListeners[event].push({\n listener,\n proxyListener: handleLiveEvent\n });\n el.addEventListener(event, handleLiveEvent, capture);\n }\n }\n }\n\n return this;\n}\n\nfunction off(...args) {\n let [eventType, targetSelector, listener, capture] = args;\n\n if (typeof args[1] === 'function') {\n [eventType, listener, capture] = args;\n targetSelector = undefined;\n }\n\n if (!capture) capture = false;\n const events = eventType.split(' ');\n\n for (let i = 0; i < events.length; i += 1) {\n const event = events[i];\n\n for (let j = 0; j < this.length; j += 1) {\n const el = this[j];\n let handlers;\n\n if (!targetSelector && el.dom7Listeners) {\n handlers = el.dom7Listeners[event];\n } else if (targetSelector && el.dom7LiveListeners) {\n handlers = el.dom7LiveListeners[event];\n }\n\n if (handlers && handlers.length) {\n for (let k = handlers.length - 1; k >= 0; k -= 1) {\n const handler = handlers[k];\n\n if (listener && handler.listener === listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n } else if (listener && handler.listener && handler.listener.dom7proxy && handler.listener.dom7proxy === listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n } else if (!listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n }\n }\n }\n }\n }\n\n return this;\n}\n\nfunction once(...args) {\n const dom = this;\n let [eventName, targetSelector, listener, capture] = args;\n\n if (typeof args[1] === 'function') {\n [eventName, listener, capture] = args;\n targetSelector = undefined;\n }\n\n function onceHandler(...eventArgs) {\n listener.apply(this, eventArgs);\n dom.off(eventName, targetSelector, onceHandler, capture);\n\n if (onceHandler.dom7proxy) {\n delete onceHandler.dom7proxy;\n }\n }\n\n onceHandler.dom7proxy = listener;\n return dom.on(eventName, targetSelector, onceHandler, capture);\n}\n\nfunction trigger(...args) {\n const window = getWindow();\n const events = args[0].split(' ');\n const eventData = args[1];\n\n for (let i = 0; i < events.length; i += 1) {\n const event = events[i];\n\n for (let j = 0; j < this.length; j += 1) {\n const el = this[j];\n\n if (window.CustomEvent) {\n const evt = new window.CustomEvent(event, {\n detail: eventData,\n bubbles: true,\n cancelable: true\n });\n el.dom7EventData = args.filter((data, dataIndex) => dataIndex > 0);\n el.dispatchEvent(evt);\n el.dom7EventData = [];\n delete el.dom7EventData;\n }\n }\n }\n\n return this;\n}\n\nfunction transitionEnd(callback) {\n const dom = this;\n\n function fireCallBack(e) {\n if (e.target !== this) return;\n callback.call(this, e);\n dom.off('transitionend', fireCallBack);\n }\n\n if (callback) {\n dom.on('transitionend', fireCallBack);\n }\n\n return this;\n}\n\nfunction animationEnd(callback) {\n const dom = this;\n\n function fireCallBack(e) {\n if (e.target !== this) return;\n callback.call(this, e);\n dom.off('animationend', fireCallBack);\n }\n\n if (callback) {\n dom.on('animationend', fireCallBack);\n }\n\n return this;\n}\n\nfunction width() {\n const window = getWindow();\n\n if (this[0] === window) {\n return window.innerWidth;\n }\n\n if (this.length > 0) {\n return parseFloat(this.css('width'));\n }\n\n return null;\n}\n\nfunction outerWidth(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n const styles = this.styles();\n return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left'));\n }\n\n return this[0].offsetWidth;\n }\n\n return null;\n}\n\nfunction height() {\n const window = getWindow();\n\n if (this[0] === window) {\n return window.innerHeight;\n }\n\n if (this.length > 0) {\n return parseFloat(this.css('height'));\n }\n\n return null;\n}\n\nfunction outerHeight(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n const styles = this.styles();\n return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom'));\n }\n\n return this[0].offsetHeight;\n }\n\n return null;\n}\n\nfunction offset() {\n if (this.length > 0) {\n const window = getWindow();\n const document = getDocument();\n const el = this[0];\n const box = el.getBoundingClientRect();\n const body = document.body;\n const clientTop = el.clientTop || body.clientTop || 0;\n const clientLeft = el.clientLeft || body.clientLeft || 0;\n const scrollTop = el === window ? window.scrollY : el.scrollTop;\n const scrollLeft = el === window ? window.scrollX : el.scrollLeft;\n return {\n top: box.top + scrollTop - clientTop,\n left: box.left + scrollLeft - clientLeft\n };\n }\n\n return null;\n}\n\nfunction hide() {\n for (let i = 0; i < this.length; i += 1) {\n this[i].style.display = 'none';\n }\n\n return this;\n}\n\nfunction show() {\n const window = getWindow();\n\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (el.style.display === 'none') {\n el.style.display = '';\n }\n\n if (window.getComputedStyle(el, null).getPropertyValue('display') === 'none') {\n // Still not visible\n el.style.display = 'block';\n }\n }\n\n return this;\n}\n\nfunction styles() {\n const window = getWindow();\n if (this[0]) return window.getComputedStyle(this[0], null);\n return {};\n}\n\nfunction css(props, value) {\n const window = getWindow();\n let i;\n\n if (arguments.length === 1) {\n if (typeof props === 'string') {\n // .css('width')\n if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(props);\n } else {\n // .css({ width: '100px' })\n for (i = 0; i < this.length; i += 1) {\n for (const prop in props) {\n this[i].style[prop] = props[prop];\n }\n }\n\n return this;\n }\n }\n\n if (arguments.length === 2 && typeof props === 'string') {\n // .css('width', '100px')\n for (i = 0; i < this.length; i += 1) {\n this[i].style[props] = value;\n }\n\n return this;\n }\n\n return this;\n}\n\nfunction each(callback) {\n if (!callback) return this;\n this.forEach((el, index) => {\n callback.apply(el, [el, index]);\n });\n return this;\n}\n\nfunction filter(callback) {\n const result = arrayFilter(this, callback);\n return $(result);\n}\n\nfunction html(html) {\n if (typeof html === 'undefined') {\n return this[0] ? this[0].innerHTML : null;\n }\n\n for (let i = 0; i < this.length; i += 1) {\n this[i].innerHTML = html;\n }\n\n return this;\n}\n\nfunction text(text) {\n if (typeof text === 'undefined') {\n return this[0] ? this[0].textContent.trim() : null;\n }\n\n for (let i = 0; i < this.length; i += 1) {\n this[i].textContent = text;\n }\n\n return this;\n}\n\nfunction is(selector) {\n const window = getWindow();\n const document = getDocument();\n const el = this[0];\n let compareWith;\n let i;\n if (!el || typeof selector === 'undefined') return false;\n\n if (typeof selector === 'string') {\n if (el.matches) return el.matches(selector);\n if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector);\n if (el.msMatchesSelector) return el.msMatchesSelector(selector);\n compareWith = $(selector);\n\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) return true;\n }\n\n return false;\n }\n\n if (selector === document) {\n return el === document;\n }\n\n if (selector === window) {\n return el === window;\n }\n\n if (selector.nodeType || selector instanceof Dom7) {\n compareWith = selector.nodeType ? [selector] : selector;\n\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) return true;\n }\n\n return false;\n }\n\n return false;\n}\n\nfunction index() {\n let child = this[0];\n let i;\n\n if (child) {\n i = 0; // eslint-disable-next-line\n\n while ((child = child.previousSibling) !== null) {\n if (child.nodeType === 1) i += 1;\n }\n\n return i;\n }\n\n return undefined;\n}\n\nfunction eq(index) {\n if (typeof index === 'undefined') return this;\n const length = this.length;\n\n if (index > length - 1) {\n return $([]);\n }\n\n if (index < 0) {\n const returnIndex = length + index;\n if (returnIndex < 0) return $([]);\n return $([this[returnIndex]]);\n }\n\n return $([this[index]]);\n}\n\nfunction append(...els) {\n let newChild;\n const document = getDocument();\n\n for (let k = 0; k < els.length; k += 1) {\n newChild = els[k];\n\n for (let i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = newChild;\n\n while (tempDiv.firstChild) {\n this[i].appendChild(tempDiv.firstChild);\n }\n } else if (newChild instanceof Dom7) {\n for (let j = 0; j < newChild.length; j += 1) {\n this[i].appendChild(newChild[j]);\n }\n } else {\n this[i].appendChild(newChild);\n }\n }\n }\n\n return this;\n}\n\nfunction appendTo(parent) {\n $(parent).append(this);\n return this;\n}\n\nfunction prepend(newChild) {\n const document = getDocument();\n let i;\n let j;\n\n for (i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = newChild;\n\n for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) {\n this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]);\n }\n } else if (newChild instanceof Dom7) {\n for (j = 0; j < newChild.length; j += 1) {\n this[i].insertBefore(newChild[j], this[i].childNodes[0]);\n }\n } else {\n this[i].insertBefore(newChild, this[i].childNodes[0]);\n }\n }\n\n return this;\n}\n\nfunction prependTo(parent) {\n $(parent).prepend(this);\n return this;\n}\n\nfunction insertBefore(selector) {\n const before = $(selector);\n\n for (let i = 0; i < this.length; i += 1) {\n if (before.length === 1) {\n before[0].parentNode.insertBefore(this[i], before[0]);\n } else if (before.length > 1) {\n for (let j = 0; j < before.length; j += 1) {\n before[j].parentNode.insertBefore(this[i].cloneNode(true), before[j]);\n }\n }\n }\n}\n\nfunction insertAfter(selector) {\n const after = $(selector);\n\n for (let i = 0; i < this.length; i += 1) {\n if (after.length === 1) {\n after[0].parentNode.insertBefore(this[i], after[0].nextSibling);\n } else if (after.length > 1) {\n for (let j = 0; j < after.length; j += 1) {\n after[j].parentNode.insertBefore(this[i].cloneNode(true), after[j].nextSibling);\n }\n }\n }\n}\n\nfunction next(selector) {\n if (this.length > 0) {\n if (selector) {\n if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) {\n return $([this[0].nextElementSibling]);\n }\n\n return $([]);\n }\n\n if (this[0].nextElementSibling) return $([this[0].nextElementSibling]);\n return $([]);\n }\n\n return $([]);\n}\n\nfunction nextAll(selector) {\n const nextEls = [];\n let el = this[0];\n if (!el) return $([]);\n\n while (el.nextElementSibling) {\n const next = el.nextElementSibling; // eslint-disable-line\n\n if (selector) {\n if ($(next).is(selector)) nextEls.push(next);\n } else nextEls.push(next);\n\n el = next;\n }\n\n return $(nextEls);\n}\n\nfunction prev(selector) {\n if (this.length > 0) {\n const el = this[0];\n\n if (selector) {\n if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) {\n return $([el.previousElementSibling]);\n }\n\n return $([]);\n }\n\n if (el.previousElementSibling) return $([el.previousElementSibling]);\n return $([]);\n }\n\n return $([]);\n}\n\nfunction prevAll(selector) {\n const prevEls = [];\n let el = this[0];\n if (!el) return $([]);\n\n while (el.previousElementSibling) {\n const prev = el.previousElementSibling; // eslint-disable-line\n\n if (selector) {\n if ($(prev).is(selector)) prevEls.push(prev);\n } else prevEls.push(prev);\n\n el = prev;\n }\n\n return $(prevEls);\n}\n\nfunction siblings(selector) {\n return this.nextAll(selector).add(this.prevAll(selector));\n}\n\nfunction parent(selector) {\n const parents = []; // eslint-disable-line\n\n for (let i = 0; i < this.length; i += 1) {\n if (this[i].parentNode !== null) {\n if (selector) {\n if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode);\n } else {\n parents.push(this[i].parentNode);\n }\n }\n }\n\n return $(parents);\n}\n\nfunction parents(selector) {\n const parents = []; // eslint-disable-line\n\n for (let i = 0; i < this.length; i += 1) {\n let parent = this[i].parentNode; // eslint-disable-line\n\n while (parent) {\n if (selector) {\n if ($(parent).is(selector)) parents.push(parent);\n } else {\n parents.push(parent);\n }\n\n parent = parent.parentNode;\n }\n }\n\n return $(parents);\n}\n\nfunction closest(selector) {\n let closest = this; // eslint-disable-line\n\n if (typeof selector === 'undefined') {\n return $([]);\n }\n\n if (!closest.is(selector)) {\n closest = closest.parents(selector).eq(0);\n }\n\n return closest;\n}\n\nfunction find(selector) {\n const foundElements = [];\n\n for (let i = 0; i < this.length; i += 1) {\n const found = this[i].querySelectorAll(selector);\n\n for (let j = 0; j < found.length; j += 1) {\n foundElements.push(found[j]);\n }\n }\n\n return $(foundElements);\n}\n\nfunction children(selector) {\n const children = []; // eslint-disable-line\n\n for (let i = 0; i < this.length; i += 1) {\n const childNodes = this[i].children;\n\n for (let j = 0; j < childNodes.length; j += 1) {\n if (!selector || $(childNodes[j]).is(selector)) {\n children.push(childNodes[j]);\n }\n }\n }\n\n return $(children);\n}\n\nfunction remove() {\n for (let i = 0; i < this.length; i += 1) {\n if (this[i].parentNode) this[i].parentNode.removeChild(this[i]);\n }\n\n return this;\n}\n\nfunction detach() {\n return this.remove();\n}\n\nfunction add(...els) {\n const dom = this;\n let i;\n let j;\n\n for (i = 0; i < els.length; i += 1) {\n const toAdd = $(els[i]);\n\n for (j = 0; j < toAdd.length; j += 1) {\n dom.push(toAdd[j]);\n }\n }\n\n return dom;\n}\n\nfunction empty() {\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (el.nodeType === 1) {\n for (let j = 0; j < el.childNodes.length; j += 1) {\n if (el.childNodes[j].parentNode) {\n el.childNodes[j].parentNode.removeChild(el.childNodes[j]);\n }\n }\n\n el.textContent = '';\n }\n }\n\n return this;\n}\n\n// eslint-disable-next-line\n\nfunction scrollTo(...args) {\n const window = getWindow();\n let [left, top, duration, easing, callback] = args;\n\n if (args.length === 4 && typeof easing === 'function') {\n callback = easing;\n [left, top, duration, callback, easing] = args;\n }\n\n if (typeof easing === 'undefined') easing = 'swing';\n return this.each(function animate() {\n const el = this;\n let currentTop;\n let currentLeft;\n let maxTop;\n let maxLeft;\n let newTop;\n let newLeft;\n let scrollTop; // eslint-disable-line\n\n let scrollLeft; // eslint-disable-line\n\n let animateTop = top > 0 || top === 0;\n let animateLeft = left > 0 || left === 0;\n\n if (typeof easing === 'undefined') {\n easing = 'swing';\n }\n\n if (animateTop) {\n currentTop = el.scrollTop;\n\n if (!duration) {\n el.scrollTop = top;\n }\n }\n\n if (animateLeft) {\n currentLeft = el.scrollLeft;\n\n if (!duration) {\n el.scrollLeft = left;\n }\n }\n\n if (!duration) return;\n\n if (animateTop) {\n maxTop = el.scrollHeight - el.offsetHeight;\n newTop = Math.max(Math.min(top, maxTop), 0);\n }\n\n if (animateLeft) {\n maxLeft = el.scrollWidth - el.offsetWidth;\n newLeft = Math.max(Math.min(left, maxLeft), 0);\n }\n\n let startTime = null;\n if (animateTop && newTop === currentTop) animateTop = false;\n if (animateLeft && newLeft === currentLeft) animateLeft = false;\n\n function render(time = new Date().getTime()) {\n if (startTime === null) {\n startTime = time;\n }\n\n const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n const easeProgress = easing === 'linear' ? progress : 0.5 - Math.cos(progress * Math.PI) / 2;\n let done;\n if (animateTop) scrollTop = currentTop + easeProgress * (newTop - currentTop);\n if (animateLeft) scrollLeft = currentLeft + easeProgress * (newLeft - currentLeft);\n\n if (animateTop && newTop > currentTop && scrollTop >= newTop) {\n el.scrollTop = newTop;\n done = true;\n }\n\n if (animateTop && newTop < currentTop && scrollTop <= newTop) {\n el.scrollTop = newTop;\n done = true;\n }\n\n if (animateLeft && newLeft > currentLeft && scrollLeft >= newLeft) {\n el.scrollLeft = newLeft;\n done = true;\n }\n\n if (animateLeft && newLeft < currentLeft && scrollLeft <= newLeft) {\n el.scrollLeft = newLeft;\n done = true;\n }\n\n if (done) {\n if (callback) callback();\n return;\n }\n\n if (animateTop) el.scrollTop = scrollTop;\n if (animateLeft) el.scrollLeft = scrollLeft;\n window.requestAnimationFrame(render);\n }\n\n window.requestAnimationFrame(render);\n });\n} // scrollTop(top, duration, easing, callback) {\n\n\nfunction scrollTop(...args) {\n let [top, duration, easing, callback] = args;\n\n if (args.length === 3 && typeof easing === 'function') {\n [top, duration, callback, easing] = args;\n }\n\n const dom = this;\n\n if (typeof top === 'undefined') {\n if (dom.length > 0) return dom[0].scrollTop;\n return null;\n }\n\n return dom.scrollTo(undefined, top, duration, easing, callback);\n}\n\nfunction scrollLeft(...args) {\n let [left, duration, easing, callback] = args;\n\n if (args.length === 3 && typeof easing === 'function') {\n [left, duration, callback, easing] = args;\n }\n\n const dom = this;\n\n if (typeof left === 'undefined') {\n if (dom.length > 0) return dom[0].scrollLeft;\n return null;\n }\n\n return dom.scrollTo(left, undefined, duration, easing, callback);\n}\n\n// eslint-disable-next-line\n\nfunction animate(initialProps, initialParams) {\n const window = getWindow();\n const els = this;\n const a = {\n props: Object.assign({}, initialProps),\n params: Object.assign({\n duration: 300,\n easing: 'swing' // or 'linear'\n\n /* Callbacks\n begin(elements)\n complete(elements)\n progress(elements, complete, remaining, start, tweenValue)\n */\n\n }, initialParams),\n elements: els,\n animating: false,\n que: [],\n\n easingProgress(easing, progress) {\n if (easing === 'swing') {\n return 0.5 - Math.cos(progress * Math.PI) / 2;\n }\n\n if (typeof easing === 'function') {\n return easing(progress);\n }\n\n return progress;\n },\n\n stop() {\n if (a.frameId) {\n window.cancelAnimationFrame(a.frameId);\n }\n\n a.animating = false;\n a.elements.each(el => {\n const element = el;\n delete element.dom7AnimateInstance;\n });\n a.que = [];\n },\n\n done(complete) {\n a.animating = false;\n a.elements.each(el => {\n const element = el;\n delete element.dom7AnimateInstance;\n });\n if (complete) complete(els);\n\n if (a.que.length > 0) {\n const que = a.que.shift();\n a.animate(que[0], que[1]);\n }\n },\n\n animate(props, params) {\n if (a.animating) {\n a.que.push([props, params]);\n return a;\n }\n\n const elements = []; // Define & Cache Initials & Units\n\n a.elements.each((el, index) => {\n let initialFullValue;\n let initialValue;\n let unit;\n let finalValue;\n let finalFullValue;\n if (!el.dom7AnimateInstance) a.elements[index].dom7AnimateInstance = a;\n elements[index] = {\n container: el\n };\n Object.keys(props).forEach(prop => {\n initialFullValue = window.getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.');\n initialValue = parseFloat(initialFullValue);\n unit = initialFullValue.replace(initialValue, '');\n finalValue = parseFloat(props[prop]);\n finalFullValue = props[prop] + unit;\n elements[index][prop] = {\n initialFullValue,\n initialValue,\n unit,\n finalValue,\n finalFullValue,\n currentValue: initialValue\n };\n });\n });\n let startTime = null;\n let time;\n let elementsDone = 0;\n let propsDone = 0;\n let done;\n let began = false;\n a.animating = true;\n\n function render() {\n time = new Date().getTime();\n let progress;\n let easeProgress; // let el;\n\n if (!began) {\n began = true;\n if (params.begin) params.begin(els);\n }\n\n if (startTime === null) {\n startTime = time;\n }\n\n if (params.progress) {\n // eslint-disable-next-line\n params.progress(els, Math.max(Math.min((time - startTime) / params.duration, 1), 0), startTime + params.duration - time < 0 ? 0 : startTime + params.duration - time, startTime);\n }\n\n elements.forEach(element => {\n const el = element;\n if (done || el.done) return;\n Object.keys(props).forEach(prop => {\n if (done || el.done) return;\n progress = Math.max(Math.min((time - startTime) / params.duration, 1), 0);\n easeProgress = a.easingProgress(params.easing, progress);\n const {\n initialValue,\n finalValue,\n unit\n } = el[prop];\n el[prop].currentValue = initialValue + easeProgress * (finalValue - initialValue);\n const currentValue = el[prop].currentValue;\n\n if (finalValue > initialValue && currentValue >= finalValue || finalValue < initialValue && currentValue <= finalValue) {\n el.container.style[prop] = finalValue + unit;\n propsDone += 1;\n\n if (propsDone === Object.keys(props).length) {\n el.done = true;\n elementsDone += 1;\n }\n\n if (elementsDone === elements.length) {\n done = true;\n }\n }\n\n if (done) {\n a.done(params.complete);\n return;\n }\n\n el.container.style[prop] = currentValue + unit;\n });\n });\n if (done) return; // Then call\n\n a.frameId = window.requestAnimationFrame(render);\n }\n\n a.frameId = window.requestAnimationFrame(render);\n return a;\n }\n\n };\n\n if (a.elements.length === 0) {\n return els;\n }\n\n let animateInstance;\n\n for (let i = 0; i < a.elements.length; i += 1) {\n if (a.elements[i].dom7AnimateInstance) {\n animateInstance = a.elements[i].dom7AnimateInstance;\n } else a.elements[i].dom7AnimateInstance = a;\n }\n\n if (!animateInstance) {\n animateInstance = a;\n }\n\n if (initialProps === 'stop') {\n animateInstance.stop();\n } else {\n animateInstance.animate(a.props, a.params);\n }\n\n return els;\n}\n\nfunction stop() {\n const els = this;\n\n for (let i = 0; i < els.length; i += 1) {\n if (els[i].dom7AnimateInstance) {\n els[i].dom7AnimateInstance.stop();\n }\n }\n}\n\nconst noTrigger = 'resize scroll'.split(' ');\n\nfunction shortcut(name) {\n function eventHandler(...args) {\n if (typeof args[0] === 'undefined') {\n for (let i = 0; i < this.length; i += 1) {\n if (noTrigger.indexOf(name) < 0) {\n if (name in this[i]) this[i][name]();else {\n $(this[i]).trigger(name);\n }\n }\n }\n\n return this;\n }\n\n return this.on(name, ...args);\n }\n\n return eventHandler;\n}\n\nconst click = shortcut('click');\nconst blur = shortcut('blur');\nconst focus = shortcut('focus');\nconst focusin = shortcut('focusin');\nconst focusout = shortcut('focusout');\nconst keyup = shortcut('keyup');\nconst keydown = shortcut('keydown');\nconst keypress = shortcut('keypress');\nconst submit = shortcut('submit');\nconst change = shortcut('change');\nconst mousedown = shortcut('mousedown');\nconst mousemove = shortcut('mousemove');\nconst mouseup = shortcut('mouseup');\nconst mouseenter = shortcut('mouseenter');\nconst mouseleave = shortcut('mouseleave');\nconst mouseout = shortcut('mouseout');\nconst mouseover = shortcut('mouseover');\nconst touchstart = shortcut('touchstart');\nconst touchend = shortcut('touchend');\nconst touchmove = shortcut('touchmove');\nconst resize = shortcut('resize');\nconst scroll = shortcut('scroll');\n\nexport default $;\nexport { $, add, addClass, animate, animationEnd, append, appendTo, attr, blur, change, children, click, closest, css, data, dataset, detach, each, empty, eq, filter, find, focus, focusin, focusout, hasClass, height, hide, html, index, insertAfter, insertBefore, is, keydown, keypress, keyup, mousedown, mouseenter, mouseleave, mousemove, mouseout, mouseover, mouseup, next, nextAll, off, offset, on, once, outerHeight, outerWidth, parent, parents, prepend, prependTo, prev, prevAll, prop, remove, removeAttr, removeClass, removeData, resize, scroll, scrollLeft, scrollTo, scrollTop, show, siblings, stop, styles, submit, text, toggleClass, touchend, touchmove, touchstart, transform, transition, transitionEnd, trigger, val, value, width };\n","import { $, addClass, removeClass, hasClass, toggleClass, attr, removeAttr, transform, transition, on, off, trigger, transitionEnd, outerWidth, outerHeight, styles, offset, css, each, html, text, is, index, eq, append, prepend, next, nextAll, prev, prevAll, parent, parents, closest, find, children, filter, remove } from 'dom7';\nconst Methods = {\n addClass,\n removeClass,\n hasClass,\n toggleClass,\n attr,\n removeAttr,\n transform,\n transition,\n on,\n off,\n trigger,\n transitionEnd,\n outerWidth,\n outerHeight,\n styles,\n offset,\n css,\n each,\n html,\n text,\n is,\n index,\n eq,\n append,\n prepend,\n next,\n nextAll,\n prev,\n prevAll,\n parent,\n parents,\n closest,\n find,\n children,\n filter,\n remove\n};\nObject.keys(Methods).forEach(methodName => {\n Object.defineProperty($.fn, methodName, {\n value: Methods[methodName],\n writable: true\n });\n});\nexport default $;","import { getWindow } from 'ssr-window';\n\nfunction deleteProps(obj) {\n const object = obj;\n Object.keys(object).forEach(key => {\n try {\n object[key] = null;\n } catch (e) {// no getter for object\n }\n\n try {\n delete object[key];\n } catch (e) {// something got wrong\n }\n });\n}\n\nfunction nextTick(callback, delay = 0) {\n return setTimeout(callback, delay);\n}\n\nfunction now() {\n return Date.now();\n}\n\nfunction getComputedStyle(el) {\n const window = getWindow();\n let style;\n\n if (window.getComputedStyle) {\n style = window.getComputedStyle(el, null);\n }\n\n if (!style && el.currentStyle) {\n style = el.currentStyle;\n }\n\n if (!style) {\n style = el.style;\n }\n\n return style;\n}\n\nfunction getTranslate(el, axis = 'x') {\n const window = getWindow();\n let matrix;\n let curTransform;\n let transformMatrix;\n const curStyle = getComputedStyle(el, null);\n\n if (window.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');\n } // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n\n\n transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n } else {\n transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n\n if (axis === 'x') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41; // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[12]); // Normal Browsers\n else curTransform = parseFloat(matrix[4]);\n }\n\n if (axis === 'y') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42; // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[13]); // Normal Browsers\n else curTransform = parseFloat(matrix[5]);\n }\n\n return curTransform || 0;\n}\n\nfunction isObject(o) {\n return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object';\n}\n\nfunction isNode(node) {\n // eslint-disable-next-line\n if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') {\n return node instanceof HTMLElement;\n }\n\n return node && (node.nodeType === 1 || node.nodeType === 11);\n}\n\nfunction extend(...args) {\n const to = Object(args[0]);\n const noExtend = ['__proto__', 'constructor', 'prototype'];\n\n for (let i = 1; i < args.length; i += 1) {\n const nextSource = args[i];\n\n if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) {\n const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0);\n\n for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {\n const nextKey = keysArray[nextIndex];\n const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n\n if (desc !== undefined && desc.enumerable) {\n if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n to[nextKey] = {};\n\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n }\n\n return to;\n}\n\nfunction setCSSProperty(el, varName, varValue) {\n el.style.setProperty(varName, varValue);\n}\n\nfunction animateCSSModeScroll({\n swiper,\n targetPosition,\n side\n}) {\n const window = getWindow();\n const startPosition = -swiper.translate;\n let startTime = null;\n let time;\n const duration = swiper.params.speed;\n swiper.wrapperEl.style.scrollSnapType = 'none';\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n const dir = targetPosition > startPosition ? 'next' : 'prev';\n\n const isOutOfBound = (current, target) => {\n return dir === 'next' && current >= target || dir === 'prev' && current <= target;\n };\n\n const animate = () => {\n time = new Date().getTime();\n\n if (startTime === null) {\n startTime = time;\n }\n\n const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2;\n let currentPosition = startPosition + easeProgress * (targetPosition - startPosition);\n\n if (isOutOfBound(currentPosition, targetPosition)) {\n currentPosition = targetPosition;\n }\n\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n\n if (isOutOfBound(currentPosition, targetPosition)) {\n swiper.wrapperEl.style.overflow = 'hidden';\n swiper.wrapperEl.style.scrollSnapType = '';\n setTimeout(() => {\n swiper.wrapperEl.style.overflow = '';\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n });\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n return;\n }\n\n swiper.cssModeFrameID = window.requestAnimationFrame(animate);\n };\n\n animate();\n}\n\nexport { animateCSSModeScroll, deleteProps, nextTick, now, getTranslate, isObject, extend, getComputedStyle, setCSSProperty };","import { getWindow, getDocument } from 'ssr-window';\nlet support;\n\nfunction calcSupport() {\n const window = getWindow();\n const document = getDocument();\n return {\n smoothScroll: document.documentElement && 'scrollBehavior' in document.documentElement.style,\n touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch),\n passiveListener: function checkPassiveListener() {\n let supportsPassive = false;\n\n try {\n const opts = Object.defineProperty({}, 'passive', {\n // eslint-disable-next-line\n get() {\n supportsPassive = true;\n }\n\n });\n window.addEventListener('testPassiveListener', null, opts);\n } catch (e) {// No support\n }\n\n return supportsPassive;\n }(),\n gestures: function checkGestures() {\n return 'ongesturestart' in window;\n }()\n };\n}\n\nfunction getSupport() {\n if (!support) {\n support = calcSupport();\n }\n\n return support;\n}\n\nexport { getSupport };","import { getWindow } from 'ssr-window';\nimport { getSupport } from './get-support.js';\nlet deviceCached;\n\nfunction calcDevice({\n userAgent\n} = {}) {\n const support = getSupport();\n const window = getWindow();\n const platform = window.navigator.platform;\n const ua = userAgent || window.navigator.userAgent;\n const device = {\n ios: false,\n android: false\n };\n const screenWidth = window.screen.width;\n const screenHeight = window.screen.height;\n const android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/); // eslint-disable-line\n\n let ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n const ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n const iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n const windows = platform === 'Win32';\n let macos = platform === 'MacIntel'; // iPadOs 13 fix\n\n const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810'];\n\n if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) {\n ipad = ua.match(/(Version)\\/([\\d.]+)/);\n if (!ipad) ipad = [0, 1, '13_0_0'];\n macos = false;\n } // Android\n\n\n if (android && !windows) {\n device.os = 'android';\n device.android = true;\n }\n\n if (ipad || iphone || ipod) {\n device.os = 'ios';\n device.ios = true;\n } // Export object\n\n\n return device;\n}\n\nfunction getDevice(overrides = {}) {\n if (!deviceCached) {\n deviceCached = calcDevice(overrides);\n }\n\n return deviceCached;\n}\n\nexport { getDevice };","import { getWindow } from 'ssr-window';\nlet browser;\n\nfunction calcBrowser() {\n const window = getWindow();\n\n function isSafari() {\n const ua = window.navigator.userAgent.toLowerCase();\n return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0;\n }\n\n return {\n isSafari: isSafari(),\n isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent)\n };\n}\n\nfunction getBrowser() {\n if (!browser) {\n browser = calcBrowser();\n }\n\n return browser;\n}\n\nexport { getBrowser };","import { getWindow } from 'ssr-window';\nexport default function Resize({\n swiper,\n on,\n emit\n}) {\n const window = getWindow();\n let observer = null;\n\n const resizeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('beforeResize');\n emit('resize');\n };\n\n const createObserver = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n observer = new ResizeObserver(entries => {\n const {\n width,\n height\n } = swiper;\n let newWidth = width;\n let newHeight = height;\n entries.forEach(({\n contentBoxSize,\n contentRect,\n target\n }) => {\n if (target && target !== swiper.el) return;\n newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize;\n newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize;\n });\n\n if (newWidth !== width || newHeight !== height) {\n resizeHandler();\n }\n });\n observer.observe(swiper.el);\n };\n\n const removeObserver = () => {\n if (observer && observer.unobserve && swiper.el) {\n observer.unobserve(swiper.el);\n observer = null;\n }\n };\n\n const orientationChangeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('orientationchange');\n };\n\n on('init', () => {\n if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') {\n createObserver();\n return;\n }\n\n window.addEventListener('resize', resizeHandler);\n window.addEventListener('orientationchange', orientationChangeHandler);\n });\n on('destroy', () => {\n removeObserver();\n window.removeEventListener('resize', resizeHandler);\n window.removeEventListener('orientationchange', orientationChangeHandler);\n });\n}","import { getWindow } from 'ssr-window';\nexport default function Observer({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const observers = [];\n const window = getWindow();\n\n const attach = (target, options = {}) => {\n const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;\n const observer = new ObserverFunc(mutations => {\n // The observerUpdate event should only be triggered\n // once despite the number of mutations. Additional\n // triggers are redundant and are very costly\n if (mutations.length === 1) {\n emit('observerUpdate', mutations[0]);\n return;\n }\n\n const observerUpdate = function observerUpdate() {\n emit('observerUpdate', mutations[0]);\n };\n\n if (window.requestAnimationFrame) {\n window.requestAnimationFrame(observerUpdate);\n } else {\n window.setTimeout(observerUpdate, 0);\n }\n });\n observer.observe(target, {\n attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n childList: typeof options.childList === 'undefined' ? true : options.childList,\n characterData: typeof options.characterData === 'undefined' ? true : options.characterData\n });\n observers.push(observer);\n };\n\n const init = () => {\n if (!swiper.params.observer) return;\n\n if (swiper.params.observeParents) {\n const containerParents = swiper.$el.parents();\n\n for (let i = 0; i < containerParents.length; i += 1) {\n attach(containerParents[i]);\n }\n } // Observe container\n\n\n attach(swiper.$el[0], {\n childList: swiper.params.observeSlideChildren\n }); // Observe wrapper\n\n attach(swiper.$wrapperEl[0], {\n attributes: false\n });\n };\n\n const destroy = () => {\n observers.forEach(observer => {\n observer.disconnect();\n });\n observers.splice(0, observers.length);\n };\n\n extendParams({\n observer: false,\n observeParents: false,\n observeSlideChildren: false\n });\n on('init', init);\n on('destroy', destroy);\n}","/* eslint-disable no-underscore-dangle */\nexport default {\n on(events, handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n events.split(' ').forEach(event => {\n if (!self.eventsListeners[event]) self.eventsListeners[event] = [];\n self.eventsListeners[event][method](handler);\n });\n return self;\n },\n\n once(events, handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n\n function onceHandler(...args) {\n self.off(events, onceHandler);\n\n if (onceHandler.__emitterProxy) {\n delete onceHandler.__emitterProxy;\n }\n\n handler.apply(self, args);\n }\n\n onceHandler.__emitterProxy = handler;\n return self.on(events, onceHandler, priority);\n },\n\n onAny(handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n\n if (self.eventsAnyListeners.indexOf(handler) < 0) {\n self.eventsAnyListeners[method](handler);\n }\n\n return self;\n },\n\n offAny(handler) {\n const self = this;\n if (!self.eventsAnyListeners) return self;\n const index = self.eventsAnyListeners.indexOf(handler);\n\n if (index >= 0) {\n self.eventsAnyListeners.splice(index, 1);\n }\n\n return self;\n },\n\n off(events, handler) {\n const self = this;\n if (!self.eventsListeners) return self;\n events.split(' ').forEach(event => {\n if (typeof handler === 'undefined') {\n self.eventsListeners[event] = [];\n } else if (self.eventsListeners[event]) {\n self.eventsListeners[event].forEach((eventHandler, index) => {\n if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) {\n self.eventsListeners[event].splice(index, 1);\n }\n });\n }\n });\n return self;\n },\n\n emit(...args) {\n const self = this;\n if (!self.eventsListeners) return self;\n let events;\n let data;\n let context;\n\n if (typeof args[0] === 'string' || Array.isArray(args[0])) {\n events = args[0];\n data = args.slice(1, args.length);\n context = self;\n } else {\n events = args[0].events;\n data = args[0].data;\n context = args[0].context || self;\n }\n\n data.unshift(context);\n const eventsArray = Array.isArray(events) ? events : events.split(' ');\n eventsArray.forEach(event => {\n if (self.eventsAnyListeners && self.eventsAnyListeners.length) {\n self.eventsAnyListeners.forEach(eventHandler => {\n eventHandler.apply(context, [event, ...data]);\n });\n }\n\n if (self.eventsListeners && self.eventsListeners[event]) {\n self.eventsListeners[event].forEach(eventHandler => {\n eventHandler.apply(context, data);\n });\n }\n });\n return self;\n }\n\n};","export default function updateSize() {\n const swiper = this;\n let width;\n let height;\n const $el = swiper.$el;\n\n if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) {\n width = swiper.params.width;\n } else {\n width = $el[0].clientWidth;\n }\n\n if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) {\n height = swiper.params.height;\n } else {\n height = $el[0].clientHeight;\n }\n\n if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) {\n return;\n } // Subtract paddings\n\n\n width = width - parseInt($el.css('padding-left') || 0, 10) - parseInt($el.css('padding-right') || 0, 10);\n height = height - parseInt($el.css('padding-top') || 0, 10) - parseInt($el.css('padding-bottom') || 0, 10);\n if (Number.isNaN(width)) width = 0;\n if (Number.isNaN(height)) height = 0;\n Object.assign(swiper, {\n width,\n height,\n size: swiper.isHorizontal() ? width : height\n });\n}","import { setCSSProperty } from '../../shared/utils.js';\nexport default function updateSlides() {\n const swiper = this;\n\n function getDirectionLabel(property) {\n if (swiper.isHorizontal()) {\n return property;\n } // prettier-ignore\n\n\n return {\n 'width': 'height',\n 'margin-top': 'margin-left',\n 'margin-bottom ': 'margin-right',\n 'margin-left': 'margin-top',\n 'margin-right': 'margin-bottom',\n 'padding-left': 'padding-top',\n 'padding-right': 'padding-bottom',\n 'marginRight': 'marginBottom'\n }[property];\n }\n\n function getDirectionPropertyValue(node, label) {\n return parseFloat(node.getPropertyValue(getDirectionLabel(label)) || 0);\n }\n\n const params = swiper.params;\n const {\n $wrapperEl,\n size: swiperSize,\n rtlTranslate: rtl,\n wrongRTL\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;\n const slides = $wrapperEl.children(`.${swiper.params.slideClass}`);\n const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;\n let snapGrid = [];\n const slidesGrid = [];\n const slidesSizesGrid = [];\n let offsetBefore = params.slidesOffsetBefore;\n\n if (typeof offsetBefore === 'function') {\n offsetBefore = params.slidesOffsetBefore.call(swiper);\n }\n\n let offsetAfter = params.slidesOffsetAfter;\n\n if (typeof offsetAfter === 'function') {\n offsetAfter = params.slidesOffsetAfter.call(swiper);\n }\n\n const previousSnapGridLength = swiper.snapGrid.length;\n const previousSlidesGridLength = swiper.slidesGrid.length;\n let spaceBetween = params.spaceBetween;\n let slidePosition = -offsetBefore;\n let prevSlideSize = 0;\n let index = 0;\n\n if (typeof swiperSize === 'undefined') {\n return;\n }\n\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize;\n }\n\n swiper.virtualSize = -spaceBetween; // reset margins\n\n if (rtl) slides.css({\n marginLeft: '',\n marginBottom: '',\n marginTop: ''\n });else slides.css({\n marginRight: '',\n marginBottom: '',\n marginTop: ''\n }); // reset cssMode offsets\n\n if (params.centeredSlides && params.cssMode) {\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-before', '');\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-after', '');\n }\n\n const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid;\n\n if (gridEnabled) {\n swiper.grid.initSlides(slidesLength);\n } // Calc slides\n\n\n let slideSize;\n const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => {\n return typeof params.breakpoints[key].slidesPerView !== 'undefined';\n }).length > 0;\n\n for (let i = 0; i < slidesLength; i += 1) {\n slideSize = 0;\n const slide = slides.eq(i);\n\n if (gridEnabled) {\n swiper.grid.updateSlide(i, slide, slidesLength, getDirectionLabel);\n }\n\n if (slide.css('display') === 'none') continue; // eslint-disable-line\n\n if (params.slidesPerView === 'auto') {\n if (shouldResetSlideSize) {\n slides[i].style[getDirectionLabel('width')] = ``;\n }\n\n const slideStyles = getComputedStyle(slide[0]);\n const currentTransform = slide[0].style.transform;\n const currentWebKitTransform = slide[0].style.webkitTransform;\n\n if (currentTransform) {\n slide[0].style.transform = 'none';\n }\n\n if (currentWebKitTransform) {\n slide[0].style.webkitTransform = 'none';\n }\n\n if (params.roundLengths) {\n slideSize = swiper.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true);\n } else {\n // eslint-disable-next-line\n const width = getDirectionPropertyValue(slideStyles, 'width');\n const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left');\n const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right');\n const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left');\n const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right');\n const boxSizing = slideStyles.getPropertyValue('box-sizing');\n\n if (boxSizing && boxSizing === 'border-box') {\n slideSize = width + marginLeft + marginRight;\n } else {\n const {\n clientWidth,\n offsetWidth\n } = slide[0];\n slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth);\n }\n }\n\n if (currentTransform) {\n slide[0].style.transform = currentTransform;\n }\n\n if (currentWebKitTransform) {\n slide[0].style.webkitTransform = currentWebKitTransform;\n }\n\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n } else {\n slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView;\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n\n if (slides[i]) {\n slides[i].style[getDirectionLabel('width')] = `${slideSize}px`;\n }\n }\n\n if (slides[i]) {\n slides[i].swiperSlideSize = slideSize;\n }\n\n slidesSizesGrid.push(slideSize);\n\n if (params.centeredSlides) {\n slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;\n if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n } else {\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n slidePosition = slidePosition + slideSize + spaceBetween;\n }\n\n swiper.virtualSize += slideSize + spaceBetween;\n prevSlideSize = slideSize;\n index += 1;\n }\n\n swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;\n\n if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {\n $wrapperEl.css({\n width: `${swiper.virtualSize + params.spaceBetween}px`\n });\n }\n\n if (params.setWrapperSize) {\n $wrapperEl.css({\n [getDirectionLabel('width')]: `${swiper.virtualSize + params.spaceBetween}px`\n });\n }\n\n if (gridEnabled) {\n swiper.grid.updateWrapperSize(slideSize, snapGrid, getDirectionLabel);\n } // Remove last grid elements depending on width\n\n\n if (!params.centeredSlides) {\n const newSlidesGrid = [];\n\n for (let i = 0; i < snapGrid.length; i += 1) {\n let slidesGridItem = snapGrid[i];\n if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n\n if (snapGrid[i] <= swiper.virtualSize - swiperSize) {\n newSlidesGrid.push(slidesGridItem);\n }\n }\n\n snapGrid = newSlidesGrid;\n\n if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {\n snapGrid.push(swiper.virtualSize - swiperSize);\n }\n }\n\n if (snapGrid.length === 0) snapGrid = [0];\n\n if (params.spaceBetween !== 0) {\n const key = swiper.isHorizontal() && rtl ? 'marginLeft' : getDirectionLabel('marginRight');\n slides.filter((_, slideIndex) => {\n if (!params.cssMode) return true;\n\n if (slideIndex === slides.length - 1) {\n return false;\n }\n\n return true;\n }).css({\n [key]: `${spaceBetween}px`\n });\n }\n\n if (params.centeredSlides && params.centeredSlidesBounds) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);\n });\n allSlidesSize -= params.spaceBetween;\n const maxSnap = allSlidesSize - swiperSize;\n snapGrid = snapGrid.map(snap => {\n if (snap < 0) return -offsetBefore;\n if (snap > maxSnap) return maxSnap + offsetAfter;\n return snap;\n });\n }\n\n if (params.centerInsufficientSlides) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);\n });\n allSlidesSize -= params.spaceBetween;\n\n if (allSlidesSize < swiperSize) {\n const allSlidesOffset = (swiperSize - allSlidesSize) / 2;\n snapGrid.forEach((snap, snapIndex) => {\n snapGrid[snapIndex] = snap - allSlidesOffset;\n });\n slidesGrid.forEach((snap, snapIndex) => {\n slidesGrid[snapIndex] = snap + allSlidesOffset;\n });\n }\n }\n\n Object.assign(swiper, {\n slides,\n snapGrid,\n slidesGrid,\n slidesSizesGrid\n });\n\n if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) {\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`);\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-after', `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`);\n const addToSnapGrid = -swiper.snapGrid[0];\n const addToSlidesGrid = -swiper.slidesGrid[0];\n swiper.snapGrid = swiper.snapGrid.map(v => v + addToSnapGrid);\n swiper.slidesGrid = swiper.slidesGrid.map(v => v + addToSlidesGrid);\n }\n\n if (slidesLength !== previousSlidesLength) {\n swiper.emit('slidesLengthChange');\n }\n\n if (snapGrid.length !== previousSnapGridLength) {\n if (swiper.params.watchOverflow) swiper.checkOverflow();\n swiper.emit('snapGridLengthChange');\n }\n\n if (slidesGrid.length !== previousSlidesGridLength) {\n swiper.emit('slidesGridLengthChange');\n }\n\n if (params.watchSlidesProgress) {\n swiper.updateSlidesOffset();\n }\n}","export default function updateAutoHeight(speed) {\n const swiper = this;\n const activeSlides = [];\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n let newHeight = 0;\n let i;\n\n if (typeof speed === 'number') {\n swiper.setTransition(speed);\n } else if (speed === true) {\n swiper.setTransition(swiper.params.speed);\n }\n\n const getSlideByIndex = index => {\n if (isVirtual) {\n return swiper.slides.filter(el => parseInt(el.getAttribute('data-swiper-slide-index'), 10) === index)[0];\n }\n\n return swiper.slides.eq(index)[0];\n }; // Find slides currently in view\n\n\n if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {\n if (swiper.params.centeredSlides) {\n swiper.visibleSlides.each(slide => {\n activeSlides.push(slide);\n });\n } else {\n for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {\n const index = swiper.activeIndex + i;\n if (index > swiper.slides.length && !isVirtual) break;\n activeSlides.push(getSlideByIndex(index));\n }\n }\n } else {\n activeSlides.push(getSlideByIndex(swiper.activeIndex));\n } // Find new height from highest slide in view\n\n\n for (i = 0; i < activeSlides.length; i += 1) {\n if (typeof activeSlides[i] !== 'undefined') {\n const height = activeSlides[i].offsetHeight;\n newHeight = height > newHeight ? height : newHeight;\n }\n } // Update Height\n\n\n if (newHeight) swiper.$wrapperEl.css('height', `${newHeight}px`);\n}","export default function updateSlidesOffset() {\n const swiper = this;\n const slides = swiper.slides;\n\n for (let i = 0; i < slides.length; i += 1) {\n slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;\n }\n}","import $ from '../../shared/dom.js';\nexport default function updateSlidesProgress(translate = this && this.translate || 0) {\n const swiper = this;\n const params = swiper.params;\n const {\n slides,\n rtlTranslate: rtl,\n snapGrid\n } = swiper;\n if (slides.length === 0) return;\n if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();\n let offsetCenter = -translate;\n if (rtl) offsetCenter = translate; // Visible Slides\n\n slides.removeClass(params.slideVisibleClass);\n swiper.visibleSlidesIndexes = [];\n swiper.visibleSlides = [];\n\n for (let i = 0; i < slides.length; i += 1) {\n const slide = slides[i];\n let slideOffset = slide.swiperSlideOffset;\n\n if (params.cssMode && params.centeredSlides) {\n slideOffset -= slides[0].swiperSlideOffset;\n }\n\n const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween);\n const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween);\n const slideBefore = -(offsetCenter - slideOffset);\n const slideAfter = slideBefore + swiper.slidesSizesGrid[i];\n const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size;\n\n if (isVisible) {\n swiper.visibleSlides.push(slide);\n swiper.visibleSlidesIndexes.push(i);\n slides.eq(i).addClass(params.slideVisibleClass);\n }\n\n slide.progress = rtl ? -slideProgress : slideProgress;\n slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress;\n }\n\n swiper.visibleSlides = $(swiper.visibleSlides);\n}","export default function updateProgress(translate) {\n const swiper = this;\n\n if (typeof translate === 'undefined') {\n const multiplier = swiper.rtlTranslate ? -1 : 1; // eslint-disable-next-line\n\n translate = swiper && swiper.translate && swiper.translate * multiplier || 0;\n }\n\n const params = swiper.params;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n let {\n progress,\n isBeginning,\n isEnd\n } = swiper;\n const wasBeginning = isBeginning;\n const wasEnd = isEnd;\n\n if (translatesDiff === 0) {\n progress = 0;\n isBeginning = true;\n isEnd = true;\n } else {\n progress = (translate - swiper.minTranslate()) / translatesDiff;\n isBeginning = progress <= 0;\n isEnd = progress >= 1;\n }\n\n Object.assign(swiper, {\n progress,\n isBeginning,\n isEnd\n });\n if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate);\n\n if (isBeginning && !wasBeginning) {\n swiper.emit('reachBeginning toEdge');\n }\n\n if (isEnd && !wasEnd) {\n swiper.emit('reachEnd toEdge');\n }\n\n if (wasBeginning && !isBeginning || wasEnd && !isEnd) {\n swiper.emit('fromEdge');\n }\n\n swiper.emit('progress', progress);\n}","export default function updateSlidesClasses() {\n const swiper = this;\n const {\n slides,\n params,\n $wrapperEl,\n activeIndex,\n realIndex\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n slides.removeClass(`${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`);\n let activeSlide;\n\n if (isVirtual) {\n activeSlide = swiper.$wrapperEl.find(`.${params.slideClass}[data-swiper-slide-index=\"${activeIndex}\"]`);\n } else {\n activeSlide = slides.eq(activeIndex);\n } // Active classes\n\n\n activeSlide.addClass(params.slideActiveClass);\n\n if (params.loop) {\n // Duplicate to all looped slides\n if (activeSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${realIndex}\"]`).addClass(params.slideDuplicateActiveClass);\n } else {\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${realIndex}\"]`).addClass(params.slideDuplicateActiveClass);\n }\n } // Next Slide\n\n\n let nextSlide = activeSlide.nextAll(`.${params.slideClass}`).eq(0).addClass(params.slideNextClass);\n\n if (params.loop && nextSlide.length === 0) {\n nextSlide = slides.eq(0);\n nextSlide.addClass(params.slideNextClass);\n } // Prev Slide\n\n\n let prevSlide = activeSlide.prevAll(`.${params.slideClass}`).eq(0).addClass(params.slidePrevClass);\n\n if (params.loop && prevSlide.length === 0) {\n prevSlide = slides.eq(-1);\n prevSlide.addClass(params.slidePrevClass);\n }\n\n if (params.loop) {\n // Duplicate to all looped slides\n if (nextSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${nextSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicateNextClass);\n } else {\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${nextSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicateNextClass);\n }\n\n if (prevSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${prevSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicatePrevClass);\n } else {\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${prevSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicatePrevClass);\n }\n }\n\n swiper.emitSlidesClasses();\n}","export default function updateActiveIndex(newActiveIndex) {\n const swiper = this;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n const {\n slidesGrid,\n snapGrid,\n params,\n activeIndex: previousIndex,\n realIndex: previousRealIndex,\n snapIndex: previousSnapIndex\n } = swiper;\n let activeIndex = newActiveIndex;\n let snapIndex;\n\n if (typeof activeIndex === 'undefined') {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) {\n activeIndex = i;\n } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {\n activeIndex = i + 1;\n }\n } else if (translate >= slidesGrid[i]) {\n activeIndex = i;\n }\n } // Normalize slideIndex\n\n\n if (params.normalizeSlideIndex) {\n if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;\n }\n }\n\n if (snapGrid.indexOf(translate) >= 0) {\n snapIndex = snapGrid.indexOf(translate);\n } else {\n const skip = Math.min(params.slidesPerGroupSkip, activeIndex);\n snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);\n }\n\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n\n if (activeIndex === previousIndex) {\n if (snapIndex !== previousSnapIndex) {\n swiper.snapIndex = snapIndex;\n swiper.emit('snapIndexChange');\n }\n\n return;\n } // Get real index\n\n\n const realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10);\n Object.assign(swiper, {\n snapIndex,\n realIndex,\n previousIndex,\n activeIndex\n });\n swiper.emit('activeIndexChange');\n swiper.emit('snapIndexChange');\n\n if (previousRealIndex !== realIndex) {\n swiper.emit('realIndexChange');\n }\n\n if (swiper.initialized || swiper.params.runCallbacksOnInit) {\n swiper.emit('slideChange');\n }\n}","import $ from '../../shared/dom.js';\nexport default function updateClickedSlide(e) {\n const swiper = this;\n const params = swiper.params;\n const slide = $(e).closest(`.${params.slideClass}`)[0];\n let slideFound = false;\n let slideIndex;\n\n if (slide) {\n for (let i = 0; i < swiper.slides.length; i += 1) {\n if (swiper.slides[i] === slide) {\n slideFound = true;\n slideIndex = i;\n break;\n }\n }\n }\n\n if (slide && slideFound) {\n swiper.clickedSlide = slide;\n\n if (swiper.virtual && swiper.params.virtual.enabled) {\n swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10);\n } else {\n swiper.clickedIndex = slideIndex;\n }\n } else {\n swiper.clickedSlide = undefined;\n swiper.clickedIndex = undefined;\n return;\n }\n\n if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {\n swiper.slideToClickedSlide();\n }\n}","import updateSize from './updateSize.js';\nimport updateSlides from './updateSlides.js';\nimport updateAutoHeight from './updateAutoHeight.js';\nimport updateSlidesOffset from './updateSlidesOffset.js';\nimport updateSlidesProgress from './updateSlidesProgress.js';\nimport updateProgress from './updateProgress.js';\nimport updateSlidesClasses from './updateSlidesClasses.js';\nimport updateActiveIndex from './updateActiveIndex.js';\nimport updateClickedSlide from './updateClickedSlide.js';\nexport default {\n updateSize,\n updateSlides,\n updateAutoHeight,\n updateSlidesOffset,\n updateSlidesProgress,\n updateProgress,\n updateSlidesClasses,\n updateActiveIndex,\n updateClickedSlide\n};","import { getTranslate } from '../../shared/utils.js';\nexport default function getSwiperTranslate(axis = this.isHorizontal() ? 'x' : 'y') {\n const swiper = this;\n const {\n params,\n rtlTranslate: rtl,\n translate,\n $wrapperEl\n } = swiper;\n\n if (params.virtualTranslate) {\n return rtl ? -translate : translate;\n }\n\n if (params.cssMode) {\n return translate;\n }\n\n let currentTranslate = getTranslate($wrapperEl[0], axis);\n if (rtl) currentTranslate = -currentTranslate;\n return currentTranslate || 0;\n}","export default function setTranslate(translate, byController) {\n const swiper = this;\n const {\n rtlTranslate: rtl,\n params,\n $wrapperEl,\n wrapperEl,\n progress\n } = swiper;\n let x = 0;\n let y = 0;\n const z = 0;\n\n if (swiper.isHorizontal()) {\n x = rtl ? -translate : translate;\n } else {\n y = translate;\n }\n\n if (params.roundLengths) {\n x = Math.floor(x);\n y = Math.floor(y);\n }\n\n if (params.cssMode) {\n wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y;\n } else if (!params.virtualTranslate) {\n $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`);\n }\n\n swiper.previousTranslate = swiper.translate;\n swiper.translate = swiper.isHorizontal() ? x : y; // Check if we need to update progress\n\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (translate - swiper.minTranslate()) / translatesDiff;\n }\n\n if (newProgress !== progress) {\n swiper.updateProgress(translate);\n }\n\n swiper.emit('setTranslate', swiper.translate, byController);\n}","export default function minTranslate() {\n return -this.snapGrid[0];\n}","export default function maxTranslate() {\n return -this.snapGrid[this.snapGrid.length - 1];\n}","import { animateCSSModeScroll } from '../../shared/utils.js';\nexport default function translateTo(translate = 0, speed = this.params.speed, runCallbacks = true, translateBounds = true, internal) {\n const swiper = this;\n const {\n params,\n wrapperEl\n } = swiper;\n\n if (swiper.animating && params.preventInteractionOnTransition) {\n return false;\n }\n\n const minTranslate = swiper.minTranslate();\n const maxTranslate = swiper.maxTranslate();\n let newTranslate;\n if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate; // Update progress\n\n swiper.updateProgress(newTranslate);\n\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n\n if (speed === 0) {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: -newTranslate,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: -newTranslate,\n behavior: 'smooth'\n });\n }\n\n return true;\n }\n\n if (speed === 0) {\n swiper.setTransition(0);\n swiper.setTranslate(newTranslate);\n\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionEnd');\n }\n } else {\n swiper.setTransition(speed);\n swiper.setTranslate(newTranslate);\n\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionStart');\n }\n\n if (!swiper.animating) {\n swiper.animating = true;\n\n if (!swiper.onTranslateToWrapperTransitionEnd) {\n swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);\n swiper.onTranslateToWrapperTransitionEnd = null;\n delete swiper.onTranslateToWrapperTransitionEnd;\n\n if (runCallbacks) {\n swiper.emit('transitionEnd');\n }\n };\n }\n\n swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);\n }\n }\n\n return true;\n}","import getTranslate from './getTranslate.js';\nimport setTranslate from './setTranslate.js';\nimport minTranslate from './minTranslate.js';\nimport maxTranslate from './maxTranslate.js';\nimport translateTo from './translateTo.js';\nexport default {\n getTranslate,\n setTranslate,\n minTranslate,\n maxTranslate,\n translateTo\n};","export default function setTransition(duration, byController) {\n const swiper = this;\n\n if (!swiper.params.cssMode) {\n swiper.$wrapperEl.transition(duration);\n }\n\n swiper.emit('setTransition', duration, byController);\n}","export default function transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step\n}) {\n const {\n activeIndex,\n previousIndex\n } = swiper;\n let dir = direction;\n\n if (!dir) {\n if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset';\n }\n\n swiper.emit(`transition${step}`);\n\n if (runCallbacks && activeIndex !== previousIndex) {\n if (dir === 'reset') {\n swiper.emit(`slideResetTransition${step}`);\n return;\n }\n\n swiper.emit(`slideChangeTransition${step}`);\n\n if (dir === 'next') {\n swiper.emit(`slideNextTransition${step}`);\n } else {\n swiper.emit(`slidePrevTransition${step}`);\n }\n }\n}","import transitionEmit from './transitionEmit.js';\nexport default function transitionStart(runCallbacks = true, direction) {\n const swiper = this;\n const {\n params\n } = swiper;\n if (params.cssMode) return;\n\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'Start'\n });\n}","import transitionEmit from './transitionEmit.js';\nexport default function transitionEnd(runCallbacks = true, direction) {\n const swiper = this;\n const {\n params\n } = swiper;\n swiper.animating = false;\n if (params.cssMode) return;\n swiper.setTransition(0);\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'End'\n });\n}","import setTransition from './setTransition.js';\nimport transitionStart from './transitionStart.js';\nimport transitionEnd from './transitionEnd.js';\nexport default {\n setTransition,\n transitionStart,\n transitionEnd\n};","import { animateCSSModeScroll } from '../../shared/utils.js';\nexport default function slideTo(index = 0, speed = this.params.speed, runCallbacks = true, internal, initial) {\n if (typeof index !== 'number' && typeof index !== 'string') {\n throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof index}] given.`);\n }\n\n if (typeof index === 'string') {\n /**\n * The `index` argument converted from `string` to `number`.\n * @type {number}\n */\n const indexAsNumber = parseInt(index, 10);\n /**\n * Determines whether the `index` argument is a valid `number`\n * after being converted from the `string` type.\n * @type {boolean}\n */\n\n const isValidNumber = isFinite(indexAsNumber);\n\n if (!isValidNumber) {\n throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${index}] given.`);\n } // Knowing that the converted `index` is a valid number,\n // we can update the original argument's value.\n\n\n index = indexAsNumber;\n }\n\n const swiper = this;\n let slideIndex = index;\n if (slideIndex < 0) slideIndex = 0;\n const {\n params,\n snapGrid,\n slidesGrid,\n previousIndex,\n activeIndex,\n rtlTranslate: rtl,\n wrapperEl,\n enabled\n } = swiper;\n\n if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial) {\n return false;\n }\n\n const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);\n let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n\n if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {\n swiper.emit('beforeSlideChangeStart');\n }\n\n const translate = -snapGrid[snapIndex]; // Update progress\n\n swiper.updateProgress(translate); // Normalize slideIndex\n\n if (params.normalizeSlideIndex) {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n const normalizedTranslate = -Math.floor(translate * 100);\n const normalizedGrid = Math.floor(slidesGrid[i] * 100);\n const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100);\n\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) {\n slideIndex = i;\n } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) {\n slideIndex = i + 1;\n }\n } else if (normalizedTranslate >= normalizedGrid) {\n slideIndex = i;\n }\n }\n } // Directions locks\n\n\n if (swiper.initialized && slideIndex !== activeIndex) {\n if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {\n return false;\n }\n\n if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {\n if ((activeIndex || 0) !== slideIndex) return false;\n }\n }\n\n let direction;\n if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset'; // Update Index\n\n if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) {\n swiper.updateActiveIndex(slideIndex); // Update Height\n\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n\n swiper.updateSlidesClasses();\n\n if (params.effect !== 'slide') {\n swiper.setTranslate(translate);\n }\n\n if (direction !== 'reset') {\n swiper.transitionStart(runCallbacks, direction);\n swiper.transitionEnd(runCallbacks, direction);\n }\n\n return false;\n }\n\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n const t = rtl ? translate : -translate;\n\n if (speed === 0) {\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n\n if (isVirtual) {\n swiper.wrapperEl.style.scrollSnapType = 'none';\n swiper._immediateVirtual = true;\n }\n\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n\n if (isVirtual) {\n requestAnimationFrame(() => {\n swiper.wrapperEl.style.scrollSnapType = '';\n swiper._swiperImmediateVirtual = false;\n });\n }\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: t,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: t,\n behavior: 'smooth'\n });\n }\n\n return true;\n }\n\n if (speed === 0) {\n swiper.setTransition(0);\n swiper.setTranslate(translate);\n swiper.updateActiveIndex(slideIndex);\n swiper.updateSlidesClasses();\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.transitionStart(runCallbacks, direction);\n swiper.transitionEnd(runCallbacks, direction);\n } else {\n swiper.setTransition(speed);\n swiper.setTranslate(translate);\n swiper.updateActiveIndex(slideIndex);\n swiper.updateSlidesClasses();\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.transitionStart(runCallbacks, direction);\n\n if (!swiper.animating) {\n swiper.animating = true;\n\n if (!swiper.onSlideToWrapperTransitionEnd) {\n swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);\n swiper.onSlideToWrapperTransitionEnd = null;\n delete swiper.onSlideToWrapperTransitionEnd;\n swiper.transitionEnd(runCallbacks, direction);\n };\n }\n\n swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);\n }\n }\n\n return true;\n}","export default function slideToLoop(index = 0, speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n let newIndex = index;\n\n if (swiper.params.loop) {\n newIndex += swiper.loopedSlides;\n }\n\n return swiper.slideTo(newIndex, speed, runCallbacks, internal);\n}","/* eslint no-unused-vars: \"off\" */\nexport default function slideNext(speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n const {\n animating,\n enabled,\n params\n } = swiper;\n if (!enabled) return swiper;\n let perGroup = params.slidesPerGroup;\n\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);\n }\n\n const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup;\n\n if (params.loop) {\n if (animating && params.loopPreventsSlide) return false;\n swiper.loopFix(); // eslint-disable-next-line\n\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n }\n\n return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n}","/* eslint no-unused-vars: \"off\" */\nexport default function slidePrev(speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n const {\n params,\n animating,\n snapGrid,\n slidesGrid,\n rtlTranslate,\n enabled\n } = swiper;\n if (!enabled) return swiper;\n\n if (params.loop) {\n if (animating && params.loopPreventsSlide) return false;\n swiper.loopFix(); // eslint-disable-next-line\n\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n }\n\n const translate = rtlTranslate ? swiper.translate : -swiper.translate;\n\n function normalize(val) {\n if (val < 0) return -Math.floor(Math.abs(val));\n return Math.floor(val);\n }\n\n const normalizedTranslate = normalize(translate);\n const normalizedSnapGrid = snapGrid.map(val => normalize(val));\n let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];\n\n if (typeof prevSnap === 'undefined' && params.cssMode) {\n let prevSnapIndex;\n snapGrid.forEach((snap, snapIndex) => {\n if (normalizedTranslate >= snap) {\n // prevSnap = snap;\n prevSnapIndex = snapIndex;\n }\n });\n\n if (typeof prevSnapIndex !== 'undefined') {\n prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex];\n }\n }\n\n let prevIndex = 0;\n\n if (typeof prevSnap !== 'undefined') {\n prevIndex = slidesGrid.indexOf(prevSnap);\n if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;\n\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1;\n prevIndex = Math.max(prevIndex, 0);\n }\n }\n\n return swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n}","/* eslint no-unused-vars: \"off\" */\nexport default function slideReset(speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);\n}","/* eslint no-unused-vars: \"off\" */\nexport default function slideToClosest(speed = this.params.speed, runCallbacks = true, internal, threshold = 0.5) {\n const swiper = this;\n let index = swiper.activeIndex;\n const skip = Math.min(swiper.params.slidesPerGroupSkip, index);\n const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n\n if (translate >= swiper.snapGrid[snapIndex]) {\n // The current translate is on or after the current snap index, so the choice\n // is between the current index and the one after it.\n const currentSnap = swiper.snapGrid[snapIndex];\n const nextSnap = swiper.snapGrid[snapIndex + 1];\n\n if (translate - currentSnap > (nextSnap - currentSnap) * threshold) {\n index += swiper.params.slidesPerGroup;\n }\n } else {\n // The current translate is before the current snap index, so the choice\n // is between the current index and the one before it.\n const prevSnap = swiper.snapGrid[snapIndex - 1];\n const currentSnap = swiper.snapGrid[snapIndex];\n\n if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) {\n index -= swiper.params.slidesPerGroup;\n }\n }\n\n index = Math.max(index, 0);\n index = Math.min(index, swiper.slidesGrid.length - 1);\n return swiper.slideTo(index, speed, runCallbacks, internal);\n}","import $ from '../../shared/dom.js';\nimport { nextTick } from '../../shared/utils.js';\nexport default function slideToClickedSlide() {\n const swiper = this;\n const {\n params,\n $wrapperEl\n } = swiper;\n const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;\n let slideToIndex = swiper.clickedIndex;\n let realIndex;\n\n if (params.loop) {\n if (swiper.animating) return;\n realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10);\n\n if (params.centeredSlides) {\n if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) {\n swiper.loopFix();\n slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index=\"${realIndex}\"]:not(.${params.slideDuplicateClass})`).eq(0).index();\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else if (slideToIndex > swiper.slides.length - slidesPerView) {\n swiper.loopFix();\n slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index=\"${realIndex}\"]:not(.${params.slideDuplicateClass})`).eq(0).index();\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else {\n swiper.slideTo(slideToIndex);\n }\n}","import slideTo from './slideTo.js';\nimport slideToLoop from './slideToLoop.js';\nimport slideNext from './slideNext.js';\nimport slidePrev from './slidePrev.js';\nimport slideReset from './slideReset.js';\nimport slideToClosest from './slideToClosest.js';\nimport slideToClickedSlide from './slideToClickedSlide.js';\nexport default {\n slideTo,\n slideToLoop,\n slideNext,\n slidePrev,\n slideReset,\n slideToClosest,\n slideToClickedSlide\n};","import { getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function loopCreate() {\n const swiper = this;\n const document = getDocument();\n const {\n params,\n $wrapperEl\n } = swiper; // Remove duplicated slides\n\n const $selector = $wrapperEl.children().length > 0 ? $($wrapperEl.children()[0].parentNode) : $wrapperEl;\n $selector.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();\n let slides = $selector.children(`.${params.slideClass}`);\n\n if (params.loopFillGroupWithBlank) {\n const blankSlidesNum = params.slidesPerGroup - slides.length % params.slidesPerGroup;\n\n if (blankSlidesNum !== params.slidesPerGroup) {\n for (let i = 0; i < blankSlidesNum; i += 1) {\n const blankNode = $(document.createElement('div')).addClass(`${params.slideClass} ${params.slideBlankClass}`);\n $selector.append(blankNode);\n }\n\n slides = $selector.children(`.${params.slideClass}`);\n }\n }\n\n if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length;\n swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10));\n swiper.loopedSlides += params.loopAdditionalSlides;\n\n if (swiper.loopedSlides > slides.length) {\n swiper.loopedSlides = slides.length;\n }\n\n const prependSlides = [];\n const appendSlides = [];\n slides.each((el, index) => {\n const slide = $(el);\n\n if (index < swiper.loopedSlides) {\n appendSlides.push(el);\n }\n\n if (index < slides.length && index >= slides.length - swiper.loopedSlides) {\n prependSlides.push(el);\n }\n\n slide.attr('data-swiper-slide-index', index);\n });\n\n for (let i = 0; i < appendSlides.length; i += 1) {\n $selector.append($(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));\n }\n\n for (let i = prependSlides.length - 1; i >= 0; i -= 1) {\n $selector.prepend($(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));\n }\n}","export default function loopFix() {\n const swiper = this;\n swiper.emit('beforeLoopFix');\n const {\n activeIndex,\n slides,\n loopedSlides,\n allowSlidePrev,\n allowSlideNext,\n snapGrid,\n rtlTranslate: rtl\n } = swiper;\n let newIndex;\n swiper.allowSlidePrev = true;\n swiper.allowSlideNext = true;\n const snapTranslate = -snapGrid[activeIndex];\n const diff = snapTranslate - swiper.getTranslate(); // Fix For Negative Oversliding\n\n if (activeIndex < loopedSlides) {\n newIndex = slides.length - loopedSlides * 3 + activeIndex;\n newIndex += loopedSlides;\n const slideChanged = swiper.slideTo(newIndex, 0, false, true);\n\n if (slideChanged && diff !== 0) {\n swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);\n }\n } else if (activeIndex >= slides.length - loopedSlides) {\n // Fix For Positive Oversliding\n newIndex = -slides.length + activeIndex + loopedSlides;\n newIndex += loopedSlides;\n const slideChanged = swiper.slideTo(newIndex, 0, false, true);\n\n if (slideChanged && diff !== 0) {\n swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);\n }\n }\n\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n swiper.emit('loopFix');\n}","export default function loopDestroy() {\n const swiper = this;\n const {\n $wrapperEl,\n params,\n slides\n } = swiper;\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`).remove();\n slides.removeAttr('data-swiper-slide-index');\n}","import loopCreate from './loopCreate.js';\nimport loopFix from './loopFix.js';\nimport loopDestroy from './loopDestroy.js';\nexport default {\n loopCreate,\n loopFix,\n loopDestroy\n};","export default function setGrabCursor(moving) {\n const swiper = this;\n if (swiper.support.touch || !swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return;\n const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl;\n el.style.cursor = 'move';\n el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';\n el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';\n el.style.cursor = moving ? 'grabbing' : 'grab';\n}","export default function unsetGrabCursor() {\n const swiper = this;\n\n if (swiper.support.touch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) {\n return;\n }\n\n swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = '';\n}","import setGrabCursor from './setGrabCursor.js';\nimport unsetGrabCursor from './unsetGrabCursor.js';\nexport default {\n setGrabCursor,\n unsetGrabCursor\n};","import { getWindow, getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { now } from '../../shared/utils.js'; // Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd\n\nfunction closestElement(selector, base = this) {\n function __closestFrom(el) {\n if (!el || el === getDocument() || el === getWindow()) return null;\n if (el.assignedSlot) el = el.assignedSlot;\n const found = el.closest(selector);\n return found || __closestFrom(el.getRootNode().host);\n }\n\n return __closestFrom(base);\n}\n\nexport default function onTouchStart(event) {\n const swiper = this;\n const document = getDocument();\n const window = getWindow();\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n enabled\n } = swiper;\n if (!enabled) return;\n\n if (swiper.animating && params.preventInteractionOnTransition) {\n return;\n }\n\n if (!swiper.animating && params.cssMode && params.loop) {\n swiper.loopFix();\n }\n\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n let $targetEl = $(e.target);\n\n if (params.touchEventsTarget === 'wrapper') {\n if (!$targetEl.closest(swiper.wrapperEl).length) return;\n }\n\n data.isTouchEvent = e.type === 'touchstart';\n if (!data.isTouchEvent && 'which' in e && e.which === 3) return;\n if (!data.isTouchEvent && 'button' in e && e.button > 0) return;\n if (data.isTouched && data.isMoved) return; // change target el for shadow root component\n\n const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';\n\n if (swipingClassHasValue && e.target && e.target.shadowRoot && event.path && event.path[0]) {\n $targetEl = $(event.path[0]);\n }\n\n const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`;\n const isTargetShadow = !!(e.target && e.target.shadowRoot); // use closestElement for shadow root element to get the actual closest for nested shadow root element\n\n if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, e.target) : $targetEl.closest(noSwipingSelector)[0])) {\n swiper.allowClick = true;\n return;\n }\n\n if (params.swipeHandler) {\n if (!$targetEl.closest(params.swipeHandler)[0]) return;\n }\n\n touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n const startX = touches.currentX;\n const startY = touches.currentY; // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore\n\n const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;\n const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;\n\n if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) {\n if (edgeSwipeDetection === 'prevent') {\n event.preventDefault();\n } else {\n return;\n }\n }\n\n Object.assign(data, {\n isTouched: true,\n isMoved: false,\n allowTouchCallbacks: true,\n isScrolling: undefined,\n startMoving: undefined\n });\n touches.startX = startX;\n touches.startY = startY;\n data.touchStartTime = now();\n swiper.allowClick = true;\n swiper.updateSize();\n swiper.swipeDirection = undefined;\n if (params.threshold > 0) data.allowThresholdMove = false;\n\n if (e.type !== 'touchstart') {\n let preventDefault = true;\n if ($targetEl.is(data.focusableElements)) preventDefault = false;\n\n if (document.activeElement && $(document.activeElement).is(data.focusableElements) && document.activeElement !== $targetEl[0]) {\n document.activeElement.blur();\n }\n\n const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;\n\n if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !$targetEl[0].isContentEditable) {\n e.preventDefault();\n }\n }\n\n swiper.emit('touchStart', e);\n}","import { getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { now } from '../../shared/utils.js';\nexport default function onTouchMove(event) {\n const document = getDocument();\n const swiper = this;\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n enabled\n } = swiper;\n if (!enabled) return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n\n if (!data.isTouched) {\n if (data.startMoving && data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n\n return;\n }\n\n if (data.isTouchEvent && e.type !== 'touchmove') return;\n const targetTouch = e.type === 'touchmove' && e.targetTouches && (e.targetTouches[0] || e.changedTouches[0]);\n const pageX = e.type === 'touchmove' ? targetTouch.pageX : e.pageX;\n const pageY = e.type === 'touchmove' ? targetTouch.pageY : e.pageY;\n\n if (e.preventedByNestedSwiper) {\n touches.startX = pageX;\n touches.startY = pageY;\n return;\n }\n\n if (!swiper.allowTouchMove) {\n // isMoved = true;\n swiper.allowClick = false;\n\n if (data.isTouched) {\n Object.assign(touches, {\n startX: pageX,\n startY: pageY,\n currentX: pageX,\n currentY: pageY\n });\n data.touchStartTime = now();\n }\n\n return;\n }\n\n if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) {\n if (swiper.isVertical()) {\n // Vertical\n if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) {\n data.isTouched = false;\n data.isMoved = false;\n return;\n }\n } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) {\n return;\n }\n }\n\n if (data.isTouchEvent && document.activeElement) {\n if (e.target === document.activeElement && $(e.target).is(data.focusableElements)) {\n data.isMoved = true;\n swiper.allowClick = false;\n return;\n }\n }\n\n if (data.allowTouchCallbacks) {\n swiper.emit('touchMove', e);\n }\n\n if (e.targetTouches && e.targetTouches.length > 1) return;\n touches.currentX = pageX;\n touches.currentY = pageY;\n const diffX = touches.currentX - touches.startX;\n const diffY = touches.currentY - touches.startY;\n if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return;\n\n if (typeof data.isScrolling === 'undefined') {\n let touchAngle;\n\n if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) {\n data.isScrolling = false;\n } else {\n // eslint-disable-next-line\n if (diffX * diffX + diffY * diffY >= 25) {\n touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI;\n data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle;\n }\n }\n }\n\n if (data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n\n if (typeof data.startMoving === 'undefined') {\n if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {\n data.startMoving = true;\n }\n }\n\n if (data.isScrolling) {\n data.isTouched = false;\n return;\n }\n\n if (!data.startMoving) {\n return;\n }\n\n swiper.allowClick = false;\n\n if (!params.cssMode && e.cancelable) {\n e.preventDefault();\n }\n\n if (params.touchMoveStopPropagation && !params.nested) {\n e.stopPropagation();\n }\n\n if (!data.isMoved) {\n if (params.loop && !params.cssMode) {\n swiper.loopFix();\n }\n\n data.startTranslate = swiper.getTranslate();\n swiper.setTransition(0);\n\n if (swiper.animating) {\n swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');\n }\n\n data.allowMomentumBounce = false; // Grab Cursor\n\n if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(true);\n }\n\n swiper.emit('sliderFirstMove', e);\n }\n\n swiper.emit('sliderMove', e);\n data.isMoved = true;\n let diff = swiper.isHorizontal() ? diffX : diffY;\n touches.diff = diff;\n diff *= params.touchRatio;\n if (rtl) diff = -diff;\n swiper.swipeDirection = diff > 0 ? 'prev' : 'next';\n data.currentTranslate = diff + data.startTranslate;\n let disableParentSwiper = true;\n let resistanceRatio = params.resistanceRatio;\n\n if (params.touchReleaseOnEdges) {\n resistanceRatio = 0;\n }\n\n if (diff > 0 && data.currentTranslate > swiper.minTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio;\n } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio;\n }\n\n if (disableParentSwiper) {\n e.preventedByNestedSwiper = true;\n } // Directions locks\n\n\n if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n\n if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n\n if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {\n data.currentTranslate = data.startTranslate;\n } // Threshold\n\n\n if (params.threshold > 0) {\n if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {\n if (!data.allowThresholdMove) {\n data.allowThresholdMove = true;\n touches.startX = touches.currentX;\n touches.startY = touches.currentY;\n data.currentTranslate = data.startTranslate;\n touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;\n return;\n }\n } else {\n data.currentTranslate = data.startTranslate;\n return;\n }\n }\n\n if (!params.followFinger || params.cssMode) return; // Update active index in free mode\n\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) {\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n if (swiper.params.freeMode && params.freeMode.enabled && swiper.freeMode) {\n swiper.freeMode.onTouchMove();\n } // Update progress\n\n\n swiper.updateProgress(data.currentTranslate); // Update translate\n\n swiper.setTranslate(data.currentTranslate);\n}","import { now, nextTick } from '../../shared/utils.js';\nexport default function onTouchEnd(event) {\n const swiper = this;\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n slidesGrid,\n enabled\n } = swiper;\n if (!enabled) return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n\n if (data.allowTouchCallbacks) {\n swiper.emit('touchEnd', e);\n }\n\n data.allowTouchCallbacks = false;\n\n if (!data.isTouched) {\n if (data.isMoved && params.grabCursor) {\n swiper.setGrabCursor(false);\n }\n\n data.isMoved = false;\n data.startMoving = false;\n return;\n } // Return Grab Cursor\n\n\n if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(false);\n } // Time diff\n\n\n const touchEndTime = now();\n const timeDiff = touchEndTime - data.touchStartTime; // Tap, doubleTap, Click\n\n if (swiper.allowClick) {\n const pathTree = e.path || e.composedPath && e.composedPath();\n swiper.updateClickedSlide(pathTree && pathTree[0] || e.target);\n swiper.emit('tap click', e);\n\n if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) {\n swiper.emit('doubleTap doubleClick', e);\n }\n }\n\n data.lastClickTime = now();\n nextTick(() => {\n if (!swiper.destroyed) swiper.allowClick = true;\n });\n\n if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) {\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n let currentPos;\n\n if (params.followFinger) {\n currentPos = rtl ? swiper.translate : -swiper.translate;\n } else {\n currentPos = -data.currentTranslate;\n }\n\n if (params.cssMode) {\n return;\n }\n\n if (swiper.params.freeMode && params.freeMode.enabled) {\n swiper.freeMode.onTouchEnd({\n currentPos\n });\n return;\n } // Find current slide\n\n\n let stopIndex = 0;\n let groupSize = swiper.slidesSizesGrid[0];\n\n for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {\n const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n\n if (typeof slidesGrid[i + increment] !== 'undefined') {\n if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) {\n stopIndex = i;\n groupSize = slidesGrid[i + increment] - slidesGrid[i];\n }\n } else if (currentPos >= slidesGrid[i]) {\n stopIndex = i;\n groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];\n }\n } // Find current slide size\n\n\n const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;\n const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n\n if (timeDiff > params.longSwipesMs) {\n // Long touches\n if (!params.longSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n\n if (swiper.swipeDirection === 'next') {\n if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex);\n }\n\n if (swiper.swipeDirection === 'prev') {\n if (ratio > 1 - params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex);\n }\n } else {\n // Short swipes\n if (!params.shortSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n\n const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);\n\n if (!isNavButtonTarget) {\n if (swiper.swipeDirection === 'next') {\n swiper.slideTo(stopIndex + increment);\n }\n\n if (swiper.swipeDirection === 'prev') {\n swiper.slideTo(stopIndex);\n }\n } else if (e.target === swiper.navigation.nextEl) {\n swiper.slideTo(stopIndex + increment);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n}","export default function onResize() {\n const swiper = this;\n const {\n params,\n el\n } = swiper;\n if (el && el.offsetWidth === 0) return; // Breakpoints\n\n if (params.breakpoints) {\n swiper.setBreakpoint();\n } // Save locks\n\n\n const {\n allowSlideNext,\n allowSlidePrev,\n snapGrid\n } = swiper; // Disable locks on resize\n\n swiper.allowSlideNext = true;\n swiper.allowSlidePrev = true;\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateSlidesClasses();\n\n if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides) {\n swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n swiper.autoplay.run();\n } // Return locks after resize\n\n\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n\n if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n}","export default function onClick(e) {\n const swiper = this;\n if (!swiper.enabled) return;\n\n if (!swiper.allowClick) {\n if (swiper.params.preventClicks) e.preventDefault();\n\n if (swiper.params.preventClicksPropagation && swiper.animating) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n}","export default function onScroll() {\n const swiper = this;\n const {\n wrapperEl,\n rtlTranslate,\n enabled\n } = swiper;\n if (!enabled) return;\n swiper.previousTranslate = swiper.translate;\n\n if (swiper.isHorizontal()) {\n swiper.translate = -wrapperEl.scrollLeft;\n } else {\n swiper.translate = -wrapperEl.scrollTop;\n } // eslint-disable-next-line\n\n\n if (swiper.translate === -0) swiper.translate = 0;\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff;\n }\n\n if (newProgress !== swiper.progress) {\n swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);\n }\n\n swiper.emit('setTranslate', swiper.translate, false);\n}","import { getDocument } from 'ssr-window';\nimport onTouchStart from './onTouchStart.js';\nimport onTouchMove from './onTouchMove.js';\nimport onTouchEnd from './onTouchEnd.js';\nimport onResize from './onResize.js';\nimport onClick from './onClick.js';\nimport onScroll from './onScroll.js';\nlet dummyEventAttached = false;\n\nfunction dummyEventListener() {}\n\nconst events = (swiper, method) => {\n const document = getDocument();\n const {\n params,\n touchEvents,\n el,\n wrapperEl,\n device,\n support\n } = swiper;\n const capture = !!params.nested;\n const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';\n const swiperMethod = method; // Touch Events\n\n if (!support.touch) {\n el[domMethod](touchEvents.start, swiper.onTouchStart, false);\n document[domMethod](touchEvents.move, swiper.onTouchMove, capture);\n document[domMethod](touchEvents.end, swiper.onTouchEnd, false);\n } else {\n const passiveListener = touchEvents.start === 'touchstart' && support.passiveListener && params.passiveListeners ? {\n passive: true,\n capture: false\n } : false;\n el[domMethod](touchEvents.start, swiper.onTouchStart, passiveListener);\n el[domMethod](touchEvents.move, swiper.onTouchMove, support.passiveListener ? {\n passive: false,\n capture\n } : capture);\n el[domMethod](touchEvents.end, swiper.onTouchEnd, passiveListener);\n\n if (touchEvents.cancel) {\n el[domMethod](touchEvents.cancel, swiper.onTouchEnd, passiveListener);\n }\n } // Prevent Links Clicks\n\n\n if (params.preventClicks || params.preventClicksPropagation) {\n el[domMethod]('click', swiper.onClick, true);\n }\n\n if (params.cssMode) {\n wrapperEl[domMethod]('scroll', swiper.onScroll);\n } // Resize handler\n\n\n if (params.updateOnWindowResize) {\n swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true);\n } else {\n swiper[swiperMethod]('observerUpdate', onResize, true);\n }\n};\n\nfunction attachEvents() {\n const swiper = this;\n const document = getDocument();\n const {\n params,\n support\n } = swiper;\n swiper.onTouchStart = onTouchStart.bind(swiper);\n swiper.onTouchMove = onTouchMove.bind(swiper);\n swiper.onTouchEnd = onTouchEnd.bind(swiper);\n\n if (params.cssMode) {\n swiper.onScroll = onScroll.bind(swiper);\n }\n\n swiper.onClick = onClick.bind(swiper);\n\n if (support.touch && !dummyEventAttached) {\n document.addEventListener('touchstart', dummyEventListener);\n dummyEventAttached = true;\n }\n\n events(swiper, 'on');\n}\n\nfunction detachEvents() {\n const swiper = this;\n events(swiper, 'off');\n}\n\nexport default {\n attachEvents,\n detachEvents\n};","import { extend } from '../../shared/utils.js';\n\nconst isGridEnabled = (swiper, params) => {\n return swiper.grid && params.grid && params.grid.rows > 1;\n};\n\nexport default function setBreakpoint() {\n const swiper = this;\n const {\n activeIndex,\n initialized,\n loopedSlides = 0,\n params,\n $el\n } = swiper;\n const breakpoints = params.breakpoints;\n if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return; // Get breakpoint for window width and update parameters\n\n const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el);\n if (!breakpoint || swiper.currentBreakpoint === breakpoint) return;\n const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;\n const breakpointParams = breakpointOnlyParams || swiper.originalParams;\n const wasMultiRow = isGridEnabled(swiper, params);\n const isMultiRow = isGridEnabled(swiper, breakpointParams);\n const wasEnabled = params.enabled;\n\n if (wasMultiRow && !isMultiRow) {\n $el.removeClass(`${params.containerModifierClass}grid ${params.containerModifierClass}grid-column`);\n swiper.emitContainerClasses();\n } else if (!wasMultiRow && isMultiRow) {\n $el.addClass(`${params.containerModifierClass}grid`);\n\n if (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column' || !breakpointParams.grid.fill && params.grid.fill === 'column') {\n $el.addClass(`${params.containerModifierClass}grid-column`);\n }\n\n swiper.emitContainerClasses();\n }\n\n const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;\n const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);\n\n if (directionChanged && initialized) {\n swiper.changeDirection();\n }\n\n extend(swiper.params, breakpointParams);\n const isEnabled = swiper.params.enabled;\n Object.assign(swiper, {\n allowTouchMove: swiper.params.allowTouchMove,\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev\n });\n\n if (wasEnabled && !isEnabled) {\n swiper.disable();\n } else if (!wasEnabled && isEnabled) {\n swiper.enable();\n }\n\n swiper.currentBreakpoint = breakpoint;\n swiper.emit('_beforeBreakpoint', breakpointParams);\n\n if (needsReLoop && initialized) {\n swiper.loopDestroy();\n swiper.loopCreate();\n swiper.updateSlides();\n swiper.slideTo(activeIndex - loopedSlides + swiper.loopedSlides, 0, false);\n }\n\n swiper.emit('breakpoint', breakpointParams);\n}","import { getWindow } from 'ssr-window';\nexport default function getBreakpoint(breakpoints, base = 'window', containerEl) {\n if (!breakpoints || base === 'container' && !containerEl) return undefined;\n let breakpoint = false;\n const window = getWindow();\n const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight;\n const points = Object.keys(breakpoints).map(point => {\n if (typeof point === 'string' && point.indexOf('@') === 0) {\n const minRatio = parseFloat(point.substr(1));\n const value = currentHeight * minRatio;\n return {\n value,\n point\n };\n }\n\n return {\n value: point,\n point\n };\n });\n points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));\n\n for (let i = 0; i < points.length; i += 1) {\n const {\n point,\n value\n } = points[i];\n\n if (base === 'window') {\n if (window.matchMedia(`(min-width: ${value}px)`).matches) {\n breakpoint = point;\n }\n } else if (value <= containerEl.clientWidth) {\n breakpoint = point;\n }\n }\n\n return breakpoint || 'max';\n}","import setBreakpoint from './setBreakpoint.js';\nimport getBreakpoint from './getBreakpoint.js';\nexport default {\n setBreakpoint,\n getBreakpoint\n};","function prepareClasses(entries, prefix) {\n const resultClasses = [];\n entries.forEach(item => {\n if (typeof item === 'object') {\n Object.keys(item).forEach(classNames => {\n if (item[classNames]) {\n resultClasses.push(prefix + classNames);\n }\n });\n } else if (typeof item === 'string') {\n resultClasses.push(prefix + item);\n }\n });\n return resultClasses;\n}\n\nexport default function addClasses() {\n const swiper = this;\n const {\n classNames,\n params,\n rtl,\n $el,\n device,\n support\n } = swiper; // prettier-ignore\n\n const suffixes = prepareClasses(['initialized', params.direction, {\n 'pointer-events': !support.touch\n }, {\n 'free-mode': swiper.params.freeMode && params.freeMode.enabled\n }, {\n 'autoheight': params.autoHeight\n }, {\n 'rtl': rtl\n }, {\n 'grid': params.grid && params.grid.rows > 1\n }, {\n 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column'\n }, {\n 'android': device.android\n }, {\n 'ios': device.ios\n }, {\n 'css-mode': params.cssMode\n }, {\n 'centered': params.cssMode && params.centeredSlides\n }], params.containerModifierClass);\n classNames.push(...suffixes);\n $el.addClass([...classNames].join(' '));\n swiper.emitContainerClasses();\n}","export default function removeClasses() {\n const swiper = this;\n const {\n $el,\n classNames\n } = swiper;\n $el.removeClass(classNames.join(' '));\n swiper.emitContainerClasses();\n}","import addClasses from './addClasses.js';\nimport removeClasses from './removeClasses.js';\nexport default {\n addClasses,\n removeClasses\n};","import { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function loadImage(imageEl, src, srcset, sizes, checkForComplete, callback) {\n const window = getWindow();\n let image;\n\n function onReady() {\n if (callback) callback();\n }\n\n const isPicture = $(imageEl).parent('picture')[0];\n\n if (!isPicture && (!imageEl.complete || !checkForComplete)) {\n if (src) {\n image = new window.Image();\n image.onload = onReady;\n image.onerror = onReady;\n\n if (sizes) {\n image.sizes = sizes;\n }\n\n if (srcset) {\n image.srcset = srcset;\n }\n\n if (src) {\n image.src = src;\n }\n } else {\n onReady();\n }\n } else {\n // image already loaded...\n onReady();\n }\n}","export default function preloadImages() {\n const swiper = this;\n swiper.imagesToLoad = swiper.$el.find('img');\n\n function onReady() {\n if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return;\n if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1;\n\n if (swiper.imagesLoaded === swiper.imagesToLoad.length) {\n if (swiper.params.updateOnImagesReady) swiper.update();\n swiper.emit('imagesReady');\n }\n }\n\n for (let i = 0; i < swiper.imagesToLoad.length; i += 1) {\n const imageEl = swiper.imagesToLoad[i];\n swiper.loadImage(imageEl, imageEl.currentSrc || imageEl.getAttribute('src'), imageEl.srcset || imageEl.getAttribute('srcset'), imageEl.sizes || imageEl.getAttribute('sizes'), true, onReady);\n }\n}","import loadImage from './loadImage.js';\nimport preloadImages from './preloadImages.js';\nexport default {\n loadImage,\n preloadImages\n};","function checkOverflow() {\n const swiper = this;\n const {\n isLocked: wasLocked,\n params\n } = swiper;\n const {\n slidesOffsetBefore\n } = params;\n\n if (slidesOffsetBefore) {\n const lastSlideIndex = swiper.slides.length - 1;\n const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2;\n swiper.isLocked = swiper.size > lastSlideRightEdge;\n } else {\n swiper.isLocked = swiper.snapGrid.length === 1;\n }\n\n if (params.allowSlideNext === true) {\n swiper.allowSlideNext = !swiper.isLocked;\n }\n\n if (params.allowSlidePrev === true) {\n swiper.allowSlidePrev = !swiper.isLocked;\n }\n\n if (wasLocked && wasLocked !== swiper.isLocked) {\n swiper.isEnd = false;\n }\n\n if (wasLocked !== swiper.isLocked) {\n swiper.emit(swiper.isLocked ? 'lock' : 'unlock');\n }\n}\n\nexport default {\n checkOverflow\n};","export default {\n init: true,\n direction: 'horizontal',\n touchEventsTarget: 'wrapper',\n initialSlide: 0,\n speed: 300,\n cssMode: false,\n updateOnWindowResize: true,\n resizeObserver: true,\n nested: false,\n createElements: false,\n enabled: true,\n focusableElements: 'input, select, option, textarea, button, video, label',\n // Overrides\n width: null,\n height: null,\n //\n preventInteractionOnTransition: false,\n // ssr\n userAgent: null,\n url: null,\n // To support iOS's swipe-to-go-back gesture (when being used in-app).\n edgeSwipeDetection: false,\n edgeSwipeThreshold: 20,\n // Autoheight\n autoHeight: false,\n // Set wrapper width\n setWrapperSize: false,\n // Virtual Translate\n virtualTranslate: false,\n // Effects\n effect: 'slide',\n // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'\n // Breakpoints\n breakpoints: undefined,\n breakpointsBase: 'window',\n // Slides grid\n spaceBetween: 0,\n slidesPerView: 1,\n slidesPerGroup: 1,\n slidesPerGroupSkip: 0,\n slidesPerGroupAuto: false,\n centeredSlides: false,\n centeredSlidesBounds: false,\n slidesOffsetBefore: 0,\n // in px\n slidesOffsetAfter: 0,\n // in px\n normalizeSlideIndex: true,\n centerInsufficientSlides: false,\n // Disable swiper and hide navigation when container not overflow\n watchOverflow: true,\n // Round length\n roundLengths: false,\n // Touches\n touchRatio: 1,\n touchAngle: 45,\n simulateTouch: true,\n shortSwipes: true,\n longSwipes: true,\n longSwipesRatio: 0.5,\n longSwipesMs: 300,\n followFinger: true,\n allowTouchMove: true,\n threshold: 0,\n touchMoveStopPropagation: false,\n touchStartPreventDefault: true,\n touchStartForcePreventDefault: false,\n touchReleaseOnEdges: false,\n // Unique Navigation Elements\n uniqueNavElements: true,\n // Resistance\n resistance: true,\n resistanceRatio: 0.85,\n // Progress\n watchSlidesProgress: false,\n // Cursor\n grabCursor: false,\n // Clicks\n preventClicks: true,\n preventClicksPropagation: true,\n slideToClickedSlide: false,\n // Images\n preloadImages: true,\n updateOnImagesReady: true,\n // loop\n loop: false,\n loopAdditionalSlides: 0,\n loopedSlides: null,\n loopFillGroupWithBlank: false,\n loopPreventsSlide: true,\n // Swiping/no swiping\n allowSlidePrev: true,\n allowSlideNext: true,\n swipeHandler: null,\n // '.swipe-handler',\n noSwiping: true,\n noSwipingClass: 'swiper-no-swiping',\n noSwipingSelector: null,\n // Passive Listeners\n passiveListeners: true,\n // NS\n containerModifierClass: 'swiper-',\n // NEW\n slideClass: 'swiper-slide',\n slideBlankClass: 'swiper-slide-invisible-blank',\n slideActiveClass: 'swiper-slide-active',\n slideDuplicateActiveClass: 'swiper-slide-duplicate-active',\n slideVisibleClass: 'swiper-slide-visible',\n slideDuplicateClass: 'swiper-slide-duplicate',\n slideNextClass: 'swiper-slide-next',\n slideDuplicateNextClass: 'swiper-slide-duplicate-next',\n slidePrevClass: 'swiper-slide-prev',\n slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',\n wrapperClass: 'swiper-wrapper',\n // Callbacks\n runCallbacksOnInit: true,\n // Internals\n _emitClasses: false\n};","import { extend } from '../shared/utils.js';\nexport default function moduleExtendParams(params, allModulesParams) {\n return function extendParams(obj = {}) {\n const moduleParamName = Object.keys(obj)[0];\n const moduleParams = obj[moduleParamName];\n\n if (typeof moduleParams !== 'object' || moduleParams === null) {\n extend(allModulesParams, obj);\n return;\n }\n\n if (['navigation', 'pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 && params[moduleParamName] === true) {\n params[moduleParamName] = {\n auto: true\n };\n }\n\n if (!(moduleParamName in params && 'enabled' in moduleParams)) {\n extend(allModulesParams, obj);\n return;\n }\n\n if (params[moduleParamName] === true) {\n params[moduleParamName] = {\n enabled: true\n };\n }\n\n if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) {\n params[moduleParamName].enabled = true;\n }\n\n if (!params[moduleParamName]) params[moduleParamName] = {\n enabled: false\n };\n extend(allModulesParams, obj);\n };\n}","/* eslint no-param-reassign: \"off\" */\nimport { getDocument } from 'ssr-window';\nimport $ from '../shared/dom.js';\nimport { extend, now, deleteProps } from '../shared/utils.js';\nimport { getSupport } from '../shared/get-support.js';\nimport { getDevice } from '../shared/get-device.js';\nimport { getBrowser } from '../shared/get-browser.js';\nimport Resize from './modules/resize/resize.js';\nimport Observer from './modules/observer/observer.js';\nimport eventsEmitter from './events-emitter.js';\nimport update from './update/index.js';\nimport translate from './translate/index.js';\nimport transition from './transition/index.js';\nimport slide from './slide/index.js';\nimport loop from './loop/index.js';\nimport grabCursor from './grab-cursor/index.js';\nimport events from './events/index.js';\nimport breakpoints from './breakpoints/index.js';\nimport classes from './classes/index.js';\nimport images from './images/index.js';\nimport checkOverflow from './check-overflow/index.js';\nimport defaults from './defaults.js';\nimport moduleExtendParams from './moduleExtendParams.js';\nconst prototypes = {\n eventsEmitter,\n update,\n translate,\n transition,\n slide,\n loop,\n grabCursor,\n events,\n breakpoints,\n checkOverflow,\n classes,\n images\n};\nconst extendedDefaults = {};\n\nclass Swiper {\n constructor(...args) {\n let el;\n let params;\n\n if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') {\n params = args[0];\n } else {\n [el, params] = args;\n }\n\n if (!params) params = {};\n params = extend({}, params);\n if (el && !params.el) params.el = el;\n\n if (params.el && $(params.el).length > 1) {\n const swipers = [];\n $(params.el).each(containerEl => {\n const newParams = extend({}, params, {\n el: containerEl\n });\n swipers.push(new Swiper(newParams));\n });\n return swipers;\n } // Swiper Instance\n\n\n const swiper = this;\n swiper.__swiper__ = true;\n swiper.support = getSupport();\n swiper.device = getDevice({\n userAgent: params.userAgent\n });\n swiper.browser = getBrowser();\n swiper.eventsListeners = {};\n swiper.eventsAnyListeners = [];\n swiper.modules = [...swiper.__modules__];\n\n if (params.modules && Array.isArray(params.modules)) {\n swiper.modules.push(...params.modules);\n }\n\n const allModulesParams = {};\n swiper.modules.forEach(mod => {\n mod({\n swiper,\n extendParams: moduleExtendParams(params, allModulesParams),\n on: swiper.on.bind(swiper),\n once: swiper.once.bind(swiper),\n off: swiper.off.bind(swiper),\n emit: swiper.emit.bind(swiper)\n });\n }); // Extend defaults with modules params\n\n const swiperParams = extend({}, defaults, allModulesParams); // Extend defaults with passed params\n\n swiper.params = extend({}, swiperParams, extendedDefaults, params);\n swiper.originalParams = extend({}, swiper.params);\n swiper.passedParams = extend({}, params); // add event listeners\n\n if (swiper.params && swiper.params.on) {\n Object.keys(swiper.params.on).forEach(eventName => {\n swiper.on(eventName, swiper.params.on[eventName]);\n });\n }\n\n if (swiper.params && swiper.params.onAny) {\n swiper.onAny(swiper.params.onAny);\n } // Save Dom lib\n\n\n swiper.$ = $; // Extend Swiper\n\n Object.assign(swiper, {\n enabled: swiper.params.enabled,\n el,\n // Classes\n classNames: [],\n // Slides\n slides: $(),\n slidesGrid: [],\n snapGrid: [],\n slidesSizesGrid: [],\n\n // isDirection\n isHorizontal() {\n return swiper.params.direction === 'horizontal';\n },\n\n isVertical() {\n return swiper.params.direction === 'vertical';\n },\n\n // Indexes\n activeIndex: 0,\n realIndex: 0,\n //\n isBeginning: true,\n isEnd: false,\n // Props\n translate: 0,\n previousTranslate: 0,\n progress: 0,\n velocity: 0,\n animating: false,\n // Locks\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev,\n // Touch Events\n touchEvents: function touchEvents() {\n const touch = ['touchstart', 'touchmove', 'touchend', 'touchcancel'];\n const desktop = ['pointerdown', 'pointermove', 'pointerup'];\n swiper.touchEventsTouch = {\n start: touch[0],\n move: touch[1],\n end: touch[2],\n cancel: touch[3]\n };\n swiper.touchEventsDesktop = {\n start: desktop[0],\n move: desktop[1],\n end: desktop[2]\n };\n return swiper.support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop;\n }(),\n touchEventsData: {\n isTouched: undefined,\n isMoved: undefined,\n allowTouchCallbacks: undefined,\n touchStartTime: undefined,\n isScrolling: undefined,\n currentTranslate: undefined,\n startTranslate: undefined,\n allowThresholdMove: undefined,\n // Form elements to match\n focusableElements: swiper.params.focusableElements,\n // Last click time\n lastClickTime: now(),\n clickTimeout: undefined,\n // Velocities\n velocities: [],\n allowMomentumBounce: undefined,\n isTouchEvent: undefined,\n startMoving: undefined\n },\n // Clicks\n allowClick: true,\n // Touches\n allowTouchMove: swiper.params.allowTouchMove,\n touches: {\n startX: 0,\n startY: 0,\n currentX: 0,\n currentY: 0,\n diff: 0\n },\n // Images\n imagesToLoad: [],\n imagesLoaded: 0\n });\n swiper.emit('_swiper'); // Init\n\n if (swiper.params.init) {\n swiper.init();\n } // Return app instance\n\n\n return swiper;\n }\n\n enable() {\n const swiper = this;\n if (swiper.enabled) return;\n swiper.enabled = true;\n\n if (swiper.params.grabCursor) {\n swiper.setGrabCursor();\n }\n\n swiper.emit('enable');\n }\n\n disable() {\n const swiper = this;\n if (!swiper.enabled) return;\n swiper.enabled = false;\n\n if (swiper.params.grabCursor) {\n swiper.unsetGrabCursor();\n }\n\n swiper.emit('disable');\n }\n\n setProgress(progress, speed) {\n const swiper = this;\n progress = Math.min(Math.max(progress, 0), 1);\n const min = swiper.minTranslate();\n const max = swiper.maxTranslate();\n const current = (max - min) * progress + min;\n swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n emitContainerClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const cls = swiper.el.className.split(' ').filter(className => {\n return className.indexOf('swiper') === 0 || className.indexOf(swiper.params.containerModifierClass) === 0;\n });\n swiper.emit('_containerClasses', cls.join(' '));\n }\n\n getSlideClasses(slideEl) {\n const swiper = this;\n return slideEl.className.split(' ').filter(className => {\n return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0;\n }).join(' ');\n }\n\n emitSlidesClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const updates = [];\n swiper.slides.each(slideEl => {\n const classNames = swiper.getSlideClasses(slideEl);\n updates.push({\n slideEl,\n classNames\n });\n swiper.emit('_slideClass', slideEl, classNames);\n });\n swiper.emit('_slideClasses', updates);\n }\n\n slidesPerViewDynamic(view = 'current', exact = false) {\n const swiper = this;\n const {\n params,\n slides,\n slidesGrid,\n slidesSizesGrid,\n size: swiperSize,\n activeIndex\n } = swiper;\n let spv = 1;\n\n if (params.centeredSlides) {\n let slideSize = slides[activeIndex].swiperSlideSize;\n let breakLoop;\n\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n } else {\n // eslint-disable-next-line\n if (view === 'current') {\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize;\n\n if (slideInView) {\n spv += 1;\n }\n }\n } else {\n // previous\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize;\n\n if (slideInView) {\n spv += 1;\n }\n }\n }\n }\n\n return spv;\n }\n\n update() {\n const swiper = this;\n if (!swiper || swiper.destroyed) return;\n const {\n snapGrid,\n params\n } = swiper; // Breakpoints\n\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n\n function setTranslate() {\n const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;\n const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());\n swiper.setTranslate(newTranslate);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n let translated;\n\n if (swiper.params.freeMode && swiper.params.freeMode.enabled) {\n setTranslate();\n\n if (swiper.params.autoHeight) {\n swiper.updateAutoHeight();\n }\n } else {\n if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {\n translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n translated = swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n\n if (!translated) {\n setTranslate();\n }\n }\n\n if (params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n\n swiper.emit('update');\n }\n\n changeDirection(newDirection, needUpdate = true) {\n const swiper = this;\n const currentDirection = swiper.params.direction;\n\n if (!newDirection) {\n // eslint-disable-next-line\n newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal';\n }\n\n if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') {\n return swiper;\n }\n\n swiper.$el.removeClass(`${swiper.params.containerModifierClass}${currentDirection}`).addClass(`${swiper.params.containerModifierClass}${newDirection}`);\n swiper.emitContainerClasses();\n swiper.params.direction = newDirection;\n swiper.slides.each(slideEl => {\n if (newDirection === 'vertical') {\n slideEl.style.width = '';\n } else {\n slideEl.style.height = '';\n }\n });\n swiper.emit('changeDirection');\n if (needUpdate) swiper.update();\n return swiper;\n }\n\n mount(el) {\n const swiper = this;\n if (swiper.mounted) return true; // Find el\n\n const $el = $(el || swiper.params.el);\n el = $el[0];\n\n if (!el) {\n return false;\n }\n\n el.swiper = swiper;\n\n const getWrapperSelector = () => {\n return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`;\n };\n\n const getWrapper = () => {\n if (el && el.shadowRoot && el.shadowRoot.querySelector) {\n const res = $(el.shadowRoot.querySelector(getWrapperSelector())); // Children needs to return slot items\n\n res.children = options => $el.children(options);\n\n return res;\n }\n\n return $el.children(getWrapperSelector());\n }; // Find Wrapper\n\n\n let $wrapperEl = getWrapper();\n\n if ($wrapperEl.length === 0 && swiper.params.createElements) {\n const document = getDocument();\n const wrapper = document.createElement('div');\n $wrapperEl = $(wrapper);\n wrapper.className = swiper.params.wrapperClass;\n $el.append(wrapper);\n $el.children(`.${swiper.params.slideClass}`).each(slideEl => {\n $wrapperEl.append(slideEl);\n });\n }\n\n Object.assign(swiper, {\n $el,\n el,\n $wrapperEl,\n wrapperEl: $wrapperEl[0],\n mounted: true,\n // RTL\n rtl: el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl',\n rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),\n wrongRTL: $wrapperEl.css('display') === '-webkit-box'\n });\n return true;\n }\n\n init(el) {\n const swiper = this;\n if (swiper.initialized) return swiper;\n const mounted = swiper.mount(el);\n if (mounted === false) return swiper;\n swiper.emit('beforeInit'); // Set breakpoint\n\n if (swiper.params.breakpoints) {\n swiper.setBreakpoint();\n } // Add Classes\n\n\n swiper.addClasses(); // Create loop\n\n if (swiper.params.loop) {\n swiper.loopCreate();\n } // Update size\n\n\n swiper.updateSize(); // Update slides\n\n swiper.updateSlides();\n\n if (swiper.params.watchOverflow) {\n swiper.checkOverflow();\n } // Set Grab Cursor\n\n\n if (swiper.params.grabCursor && swiper.enabled) {\n swiper.setGrabCursor();\n }\n\n if (swiper.params.preloadImages) {\n swiper.preloadImages();\n } // Slide To Initial Slide\n\n\n if (swiper.params.loop) {\n swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit, false, true);\n } else {\n swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true);\n } // Attach events\n\n\n swiper.attachEvents(); // Init Flag\n\n swiper.initialized = true; // Emit\n\n swiper.emit('init');\n swiper.emit('afterInit');\n return swiper;\n }\n\n destroy(deleteInstance = true, cleanStyles = true) {\n const swiper = this;\n const {\n params,\n $el,\n $wrapperEl,\n slides\n } = swiper;\n\n if (typeof swiper.params === 'undefined' || swiper.destroyed) {\n return null;\n }\n\n swiper.emit('beforeDestroy'); // Init Flag\n\n swiper.initialized = false; // Detach events\n\n swiper.detachEvents(); // Destroy loop\n\n if (params.loop) {\n swiper.loopDestroy();\n } // Cleanup styles\n\n\n if (cleanStyles) {\n swiper.removeClasses();\n $el.removeAttr('style');\n $wrapperEl.removeAttr('style');\n\n if (slides && slides.length) {\n slides.removeClass([params.slideVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass].join(' ')).removeAttr('style').removeAttr('data-swiper-slide-index');\n }\n }\n\n swiper.emit('destroy'); // Detach emitter events\n\n Object.keys(swiper.eventsListeners).forEach(eventName => {\n swiper.off(eventName);\n });\n\n if (deleteInstance !== false) {\n swiper.$el[0].swiper = null;\n deleteProps(swiper);\n }\n\n swiper.destroyed = true;\n return null;\n }\n\n static extendDefaults(newDefaults) {\n extend(extendedDefaults, newDefaults);\n }\n\n static get extendedDefaults() {\n return extendedDefaults;\n }\n\n static get defaults() {\n return defaults;\n }\n\n static installModule(mod) {\n if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = [];\n const modules = Swiper.prototype.__modules__;\n\n if (typeof mod === 'function' && modules.indexOf(mod) < 0) {\n modules.push(mod);\n }\n }\n\n static use(module) {\n if (Array.isArray(module)) {\n module.forEach(m => Swiper.installModule(m));\n return Swiper;\n }\n\n Swiper.installModule(module);\n return Swiper;\n }\n\n}\n\nObject.keys(prototypes).forEach(prototypeGroup => {\n Object.keys(prototypes[prototypeGroup]).forEach(protoMethod => {\n Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];\n });\n});\nSwiper.use([Resize, Observer]);\nexport default Swiper;","/* eslint-disable consistent-return */\nimport { getWindow, getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function Keyboard({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const document = getDocument();\n const window = getWindow();\n swiper.keyboard = {\n enabled: false\n };\n extendParams({\n keyboard: {\n enabled: false,\n onlyInViewport: true,\n pageUpDown: true\n }\n });\n\n function handle(event) {\n if (!swiper.enabled) return;\n const {\n rtlTranslate: rtl\n } = swiper;\n let e = event;\n if (e.originalEvent) e = e.originalEvent; // jquery fix\n\n const kc = e.keyCode || e.charCode;\n const pageUpDown = swiper.params.keyboard.pageUpDown;\n const isPageUp = pageUpDown && kc === 33;\n const isPageDown = pageUpDown && kc === 34;\n const isArrowLeft = kc === 37;\n const isArrowRight = kc === 39;\n const isArrowUp = kc === 38;\n const isArrowDown = kc === 40; // Directions locks\n\n if (!swiper.allowSlideNext && (swiper.isHorizontal() && isArrowRight || swiper.isVertical() && isArrowDown || isPageDown)) {\n return false;\n }\n\n if (!swiper.allowSlidePrev && (swiper.isHorizontal() && isArrowLeft || swiper.isVertical() && isArrowUp || isPageUp)) {\n return false;\n }\n\n if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {\n return undefined;\n }\n\n if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) {\n return undefined;\n }\n\n if (swiper.params.keyboard.onlyInViewport && (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)) {\n let inView = false; // Check that swiper should be inside of visible area of window\n\n if (swiper.$el.parents(`.${swiper.params.slideClass}`).length > 0 && swiper.$el.parents(`.${swiper.params.slideActiveClass}`).length === 0) {\n return undefined;\n }\n\n const $el = swiper.$el;\n const swiperWidth = $el[0].clientWidth;\n const swiperHeight = $el[0].clientHeight;\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n const swiperOffset = swiper.$el.offset();\n if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;\n const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiperWidth, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiperHeight], [swiperOffset.left + swiperWidth, swiperOffset.top + swiperHeight]];\n\n for (let i = 0; i < swiperCoord.length; i += 1) {\n const point = swiperCoord[i];\n\n if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) {\n if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line\n\n inView = true;\n }\n }\n\n if (!inView) return undefined;\n }\n\n if (swiper.isHorizontal()) {\n if (isPageUp || isPageDown || isArrowLeft || isArrowRight) {\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n }\n\n if ((isPageDown || isArrowRight) && !rtl || (isPageUp || isArrowLeft) && rtl) swiper.slideNext();\n if ((isPageUp || isArrowLeft) && !rtl || (isPageDown || isArrowRight) && rtl) swiper.slidePrev();\n } else {\n if (isPageUp || isPageDown || isArrowUp || isArrowDown) {\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n }\n\n if (isPageDown || isArrowDown) swiper.slideNext();\n if (isPageUp || isArrowUp) swiper.slidePrev();\n }\n\n emit('keyPress', kc);\n return undefined;\n }\n\n function enable() {\n if (swiper.keyboard.enabled) return;\n $(document).on('keydown', handle);\n swiper.keyboard.enabled = true;\n }\n\n function disable() {\n if (!swiper.keyboard.enabled) return;\n $(document).off('keydown', handle);\n swiper.keyboard.enabled = false;\n }\n\n on('init', () => {\n if (swiper.params.keyboard.enabled) {\n enable();\n }\n });\n on('destroy', () => {\n if (swiper.keyboard.enabled) {\n disable();\n }\n });\n Object.assign(swiper.keyboard, {\n enable,\n disable\n });\n}","import { Controller } from \"@hotwired/stimulus\"\nimport Swiper, { Keyboard } from \"swiper\"\nimport { removeClass } from \"@oddcamp/js-utils/src/attribute\"\n\nimport Stimulus from \"../../shared/utils/stimulus\"\n\nSwiper.use([Keyboard])\n\nclass Gallery extends Controller {\n static targets = [`swiper`, `navPrev`, `navNext`, `dot`]\n #swiper\n\n connect() {\n this.#swiper = new Swiper(this.swiperTarget, {\n keyboard: {\n enabled: true,\n onlyInViewport: false,\n },\n })\n\n this.#swiper.on(`slideChange`, this.slideChange)\n this.slideChange()\n }\n\n slideChange = () => {\n removeClass(this.dotTargets, `--active`)\n this.dotTargets[this.#swiper.activeIndex].classList.add(`--active`)\n\n this.navPrevTarget.disabled = !this.#swiper.activeIndex\n this.navNextTarget.disabled =\n this.#swiper.activeIndex == this.#swiper.slides.length - 1\n }\n\n showPrev = () => {\n this.#swiper.slidePrev()\n }\n\n showNext = () => {\n this.#swiper.slideNext()\n }\n\n showSlide = (e) => {\n this.#swiper.slideTo(e.target.dataset.index)\n }\n}\n\nStimulus.register(`gallery`, Gallery)\n","import { Controller } from \"@hotwired/stimulus\"\nimport { hasClosest } from \"@oddcamp/js-utils/src/selector\"\nimport { toggleClass, removeClass } from \"@oddcamp/js-utils/src/attribute\"\n\nimport Stimulus from \"../../shared/utils/stimulus\"\n\nclass Header extends Controller {\n static targets = [\n `hamburger`,\n `navigation`,\n `navigationItem`,\n `navigationBar`,\n `hamburgerText`,\n ]\n #currentTarget = {}\n\n connect() {\n window.addEventListener(`keyup`, this.winKeyup, { passive: true })\n document.addEventListener(`click`, this.docClick, { passive: true })\n document.addEventListener(`turbo:load`, this.turboLoad)\n }\n\n disconnect() {\n window.removeEventListener(`keyup`, this.winKeyup, { passive: true })\n document.removeEventListener(`click`, this.docClick, { passive: true })\n document.removeEventListener(`turbo:load`, this.turboLoad)\n }\n\n toggleNavigation() {\n toggleClass(\n [this.hamburgerTarget, this.navigationTarget, this.hamburgerTextTarget],\n `--open`\n )\n toggleClass(document.documentElement, `--header-menu-open`)\n }\n\n showSubmenu(e) {\n e.preventDefault()\n\n this.#currentTarget = e.currentTarget\n\n const itemTarget = e.currentTarget.closest(\n `[data-header-target=\"navigationItem\"]`\n )\n const isOpen = itemTarget.classList.contains(`--open`)\n\n this.closeNavigationItems()\n\n if (!isOpen) {\n itemTarget.classList.add(`--open`)\n this.navigationBarTarget.classList.add(`--open`)\n } else {\n this.navigationBarTarget.classList.remove(`--open`)\n }\n\n this.updateHeaderOpenState()\n }\n\n docClick = (e) => {\n if (!hasClosest(e.target, this.#currentTarget)) {\n this.closeNavigationItems()\n }\n }\n\n winKeyup = (e) => {\n if (e.key == `Escape`) this.closeNavigationItems()\n }\n\n closeNavigationItems = () => {\n removeClass(this.navigationItemTargets, `--open`)\n this.updateHeaderOpenState()\n }\n\n updateHeaderOpenState() {\n const anyOpen = this.navigationItemTargets.some((item) =>\n item.classList.contains(`--open`)\n )\n if (!anyOpen) {\n this.navigationBarTarget.classList.remove(`--open`)\n } else {\n this.navigationBarTarget.classList.add(`--open`)\n }\n }\n\n turboLoad = () => {\n document.documentElement.classList.remove(`--header-menu-open`)\n }\n}\n\nStimulus.register(`header`, Header)\n","import { Controller } from \"@hotwired/stimulus\"\nimport { removeClass } from \"@oddcamp/js-utils/src/attribute\"\n\nimport Stimulus from \"../../shared/utils/stimulus\"\n\nclass HeroBanner extends Controller {\n static targets = [`card`, `link`]\n\n connect() {\n if (this.hasCardTarget)\n window.setTimeout(\n () => removeClass(this.cardTarget, `content-grid__card--hidden`),\n 500\n )\n }\n\n link() {\n if (this.hasLinkTarget) window.location.href = this.linkTarget.href\n }\n}\n\nStimulus.register(`hero-banner`, HeroBanner)\n","import { Controller } from \"@hotwired/stimulus\"\n\nimport Stimulus from \"../../shared/utils/stimulus\"\n\nclass ClearingNumberExamplesDropdown extends Controller {\n static targets = [`data`, `entry`]\n\n connect() {\n this.element\n .querySelector(`select`)\n .addEventListener(`change`, this.toggle.bind(this))\n }\n\n toggle(evt) {\n this.dataTarget.classList.toggle(`selected`, evt.target.value)\n\n this.entryTargets.forEach((entry) => {\n entry.classList.toggle(\n `selected`,\n evt.target.value == entry.dataset.clearingNumberExamplesDropdownEntry\n )\n })\n }\n}\n\nStimulus.register(\n `clearing-number-examples-dropdown`,\n ClearingNumberExamplesDropdown\n)\n","import { Controller } from \"@hotwired/stimulus\"\n\nimport Stimulus from \"../../shared/utils/stimulus\"\n\nclass InfoPageContainer extends Controller {\n connect() {\n window.scrollTo({ top: 0, behavior: `instant` })\n window.setTimeout(this.scrollToElement, 500)\n window.addEventListener(`hashchange`, this.scrollToElement, 50)\n }\n\n disconnect() {\n window.removeEventListener(`hashchange`, this.scrollToElement)\n }\n\n scrollToElement = () => {\n const hash = window.location.hash\n if (!hash) return\n\n const element = this.element.querySelector(hash)\n if (!element) return\n\n const elementPosition =\n element.getBoundingClientRect().top + document.documentElement.scrollTop\n const headerOffset = document.querySelector(`.header`).offsetHeight\n const offsetPosition = elementPosition - headerOffset - 40\n\n window.scrollTo({\n top: offsetPosition,\n behavior: `smooth`,\n })\n }\n}\n\nStimulus.register(`info-page-container`, InfoPageContainer)\n","import { Controller } from \"@hotwired/stimulus\"\n\nimport Stimulus from \"../../shared/utils/stimulus\"\n\nclass DisclaimerPageContent extends Controller {\n static targets = [`disclaimer`, `rejection`]\n\n reject() {\n this.disclaimerTarget.classList.add(`hidden`)\n this.rejectionTarget.classList.remove(`hidden`)\n }\n}\n\nStimulus.register(`disclaimer-page-content`, DisclaimerPageContent)\n"],"names":["attributeName","sourceNode","targets","services","debug","targetsSelector","t","docClick","e","targetNode","data","isPlainObject","service","props","__privateAdd","_trackColor","_trackProgressColor","__publicField","__privateGet","value","styles","__privateSet","Cookies","root","factory","propertyNames","len","val","tOfVal","absArr","i","element","type","currentTime","totalTime","frameMultiplier","totalLoops","currentLoop","firstFrame","totalFrames","target","nativeError","_count","h","s","v","r","g","b","q","max","min","d","color","offset","hsv","colorMap","hex","eventName","args","callbacks","callback","createRegularArray","arr","createTypedArrayFactory","prop","container","blendModeEnums","mode","_cos","_sin","_tan","_rnd","reset","rotate","angle","mCos","mSin","rotateX","rotateY","rotateZ","shear","sx","sy","skew","ax","ay","skewFromAxis","scale","sz","setTransform","a","c","f","j","k","l","m","n","o","p","translate","tx","ty","tz","transform","a2","b2","c2","d2","e2","f2","g2","h2","i2","j2","k2","l2","m2","n2","o2","p2","_p","a1","b1","c1","d1","e1","f1","g1","h1","i1","j1","k1","l1","m1","n1","o1","p1","isIdentity","equals","matr","clone","cloneFromProps","applyToPoint","x","y","z","applyToX","applyToY","applyToZ","getInverseMatrix","determinant","inverseMatrix","inversePoint","pt","inversePoints","pts","retPts","applyToTriplePoints","pt1","pt2","pt3","p0","p4","p5","p12","p13","applyToPointArray","applyToPointStringified","toCSS","cssValue","roundMatrixProperty","to2dCSS","_a","_b","_c","_d","_e","_f","pool","math","global","width","chunks","digits","rngname","startdenom","significance","overflow","mask","nodecrypto","seedrandom","seed","options","key","shortseed","mixkey","flatten","tostring","autoseed","arc4","ARC4","prng","is_math_call","state","copy","keylen","me","count","obj","depth","result","typ","stringseed","smear","out","browser","plugins","ob","getBezierEasing","beziers","nm","str","bezEasing","BezierEasing","NEWTON_ITERATIONS","NEWTON_MIN_SLOPE","SUBDIVISION_PRECISION","SUBDIVISION_MAX_ITERATIONS","kSplineTableSize","kSampleStepSize","float32ArraySupported","A","aA1","aA2","B","C","calcBezier","aT","getSlope","binarySubdivide","aX","aA","aB","mX1","mX2","currentX","currentT","newtonRaphsonIterate","aGuessT","currentSlope","points","mY1","mY2","mSampleValues","intervalStart","currentSample","lastSample","dist","guessForT","initialSlope","lastTime","vendors","currTime","timeToCall","id","sources","destination","sourcePrototype","attr","object","prototype","ProxyFunction","pointOnLine2D","x1","y1","x2","y2","x3","y3","det1","pointOnLine3D","z1","z2","z3","dist1","dist2","dist3","diffDist","getBezierLength","pt4","curveSegments","ptCoord","perc","addedLength","ptDistance","point","lastPoint","lengthData","getSegmentsLength","shapeData","segmentsLength","closed","pathV","pathO","pathI","lengths","totalLength","BezierData","length","PointData","partial","buildBezierData","storedData","bezierName","bezierData","getDistancePerc","percents","initPos","lengthPos","lPerc","dir","flag","getPointInSegment","percent","t1","u1","ptX","ptY","bezierSegmentPoints","getNewSegment","startPerc","endPerc","t0","u0","u0u0u0","t0u0u0_3","t0t0u0_3","t0t0t0","u0u0u1","t0u0u1_3","t0t0u1_3","t0t0t1","u0u1u1","t0u1u1_3","t0t1u1_3","t0t1t1","u1u1u1","t1u1u1_3","t1t1u1_3","t1t1t1","_counterId","processes","workerFn","workerInstance","workerProxy","path","_workerSelf","createWorker","fn","blob","url","setupWorker","dataFunctionManager","completeLayers","layers","comps","layerData","jLen","kLen","maskProps","convertPathsToAbsoluteValues","findCompLayers","completeShapes","completeText","checkVersion","minimum","animVersionString","animVersion","checkText","minimumVersion","updateTextLayer","textLayer","documentData","iterateLayers","animationData","checkChars","pathData","paths","checkPathProperties","checkColors","iterateShapes","shapes","checkShapes","completeClosingShapes","completeData","moduleOb","formatResponse","xhr","contentTypeHeader","loadAsset","fullPath","errorCallback","response","err","animation","event","process","createProcess","onComplete","onError","loadAnimation","processId","loadData","completeAnimation","anim","fontData","fWeight","fStyle","styleName","maxWaitingTime","emptyChar","combinedCharacters","surrogateModifiers","zeroWidthJoiner","trimFontOptions","font","familyArray","enabledFamilies","setUpNode","family","parentNode","node","checkLoadedFonts","w","loadedCount","createHelper","def","tHelper","fontProps","tCanvasHelper","addFonts","defs","fontArr","_pendingFonts","shouldLoadFont","loadedSelector","sc","addChars","chars","found","getCharData","char","style","measureText","fontName","size","index","doubleSize","singleSize","getFontByName","name","isModifier","firstCharCode","secondCharCode","sum","isZeroWidthJoiner","isCombinedCharacter","setIsLoaded","Font","fontPrototype","initFrame","mathAbs","interpolateValue","frameNum","caching","offsetTime","newValue","iterationIndex","keyData","nextKeyData","keyframeMetadata","fnc","nextKeyTime","keyTime","endValue","ind","distanceInLine","segmentPerc","outX","outY","inX","inY","keyValue","quatStart","createQuaternion","quatEnd","time","quaternionToEuler","slerp","az","aw","bx","by","bz","bw","omega","cosom","sinom","scale0","scale1","quat","qx","qy","qz","qw","heading","attitude","bank","values","c3","s1","s2","s3","getValueAtCurrentTime","initTime","endTime","renderResult","setVValue","multipliedValue","processEffectsSequence","finalValue","addEffect","effectFunction","ValueProperty","elem","mult","MultiDimensionalProperty","KeyframedValueProperty","KeyframedMultidimensionalProperty","to","ti","arrLen","getProp","defaultVector","applyToMatrix","mat","_mdf","processKeys","forceRender","frameRate","v1","v2","px","py","precalculateMatrix","autoOrient","addDynamicProperty","TransformProperty","getTransformProperty","pos","replace","vX","vY","oX","oY","iX","iY","newPath","vertices","outPoints","inPoints","init","cnt","interpolateShape","previousValue","keyPropS","keyPropE","isHold","vertexValue","kf","interpolateShapeCurrentTime","lastFrame","resetShape","shapesEqual","shape1","shape2","ShapeProperty","KeyframedShapeProperty","EllShapeProperty","cPoint","EllShapePropertyFactory","s0","_cw","_v","StarShapeProperty","StarShapePropertyFactory","numPts","longFlag","longRad","shortRad","longRound","shortRound","longPerimSegment","shortPerimSegment","rad","roundness","perimSegment","currentAng","ox","oy","RectShapeProperty","RectShapePropertyFactory","v0","round","getShapeProp","dataProp","keys","getConstructorFunction","getKeyframedConstructorFunction","modifiers","registerModifier","getModifier","shapeLength","totalModifierLength","segments","shapeSegments","segmentOb","shapeS","shapeE","pathsData","_isFirstFrame","_s","shapePaths","totalShapeLength","localShapeCollection","edges","newShapesData","lastShapeInCollection","lastShape","newPaths","shapePath","newShape","shapeSegment","currentLengthData","segmentCount","segment","segmentLength","clonedPath","currentV","currentI","currentO","closerV","distance","newPosPerc","rd","amount","centerPoint","pathLength","pMatrix","rMatrix","sMatrix","inv","scaleX","scaleY","elemsData","elements","newElements","renderFlag","items","itemsTransform","cont","hasReloaded","copies","group","elems","transformData","offsetModulo","roundOffset","pProps","rProps","sProps","iteration","renderer","cLength","diff","pathNodes","_o","_i","shapeString","AudioController","audioFactory","audio","rateValue","assetPath","proxyImage","canvas","ctx","imageLoaded","footageLoaded","getAssetsPath","assetData","assetsPath","originalPath","imagePath","testImageLoaded","img","intervalId","box","createImageData","createImgData","createFootageData","footageData","loadAssets","assets","cb","setPath","setAssetsPath","getAsset","destroy","loadedImages","loadedFootages","setCacheType","elementHelper","ImagePreloaderFactory","createFilter","createAlphaToLuminanceFilter","filId","skipCoordinates","fil","feColorMatrix","textData","renderType","animatorProps","lettersChangedFlag","alignment","animators","matrixHelper","renderedLettersCount","xPos","yPos","letters","pathInfo","currentLength","currentPoint","pointInd","segmentInd","prevPoint","partialLength","tanAngle","yOff","firstLine","animatorSelector","letterValue","offf","xPathPos","yPathPos","initPathPos","initSegmentInd","initPointInd","currentLine","elemOpacity","sw","fc","letterSw","letterSc","letterFc","letterM","letterP","letterO","animatorJustifyOffset","animatorFirstCharOffset","justifyOffsetMult","lastIndex","isNewLine","animatorOffset","rot","defaultData","textAnimatorAnimatables","updated","_finalValue","currentValue","currentIndex","textKeys","text","charactersArray","charCode","shouldCombine","fontManager","newLineFlag","anchorGrouping","currentSize","currentPos","lineWidths","lineWidth","maxLineWidth","charData","trackingOffset","boxWidth","boxHeight","currentHeight","finalText","lastSpaceIndex","uncollapsedSpaces","currentChar","animatorData","letterData","based","indexes","currentInd","newInd","newData","dData","_canResize","_fontValue","floor","TextSelectorPropFactory","easer","tot","smoothness","threshold","newCharsFlag","divisor","getTextSelectorProp","initialLength","_create","_release","_length","_maxLength","newElement","release","double","create","shape","cloned","newShapeCollection","shapeCollection","parsePayloadLines","payload","lines","line","keysCount","_markers","markers","_marker","markerData","num","layer","newLayers","pInterface","parentName","hierarchy","comp","animData","fontsContainer","animationItem","config","ariaLabel","titleElement","titleId","descElement","descId","maskElement","rect","maskId","nextElement","cProps","trProps","op","actionFlag","popped","containerStyle","origin","elementWidth","elementHeight","elementRel","animationRel","par","fillType","newDOMElement","nextDOMElement","nextLayer","tmpDOMElement","perspectiveElem","center","matrix","threeDContainerData","lastThreeDContainerData","currentContainer","resizerElem","wrapper","svg","cWidth","cHeight","floatingContainer","globalData","properties","currentMasks","layerId","expansor","feMorph","maskType","maskRef","filterID","isFirstFrame","finalMat","viewData","pathString","pathShapeValue","isVisible","transforms","ptNew","component","_prototype","position","level","transformers","mProps","styleOb","pathElement","gradientId","gfill","stops","stop","opacityId","opFill","_identityMatrix","_matrixHelper","createRenderFunction","renderFill","renderGradient","renderGradientStroke","renderStroke","renderPath","renderContentTransform","styleData","itemData","pathStringTransformed","redraw","lLen","lvl","iterations","styleElem","hasOpacity","attr1","attr2","cValues","oValues","ang","sequence","transformsManager","styledShape","effectsInterface","blendModeValue","layerElementParent","gg","masker","maskGroup","maskGrouper","feCTr","feFunc","alphaRect","cp","clipId","cpGroup","shouldBreakProcess","shapeStr","_fontSize","lineNumber","colorData","timeRemapped","volumeValue","textArray","textContents","currentTextContent","usesGlyphs","tSpan","singleShape","tElement","justify","textContent","cachedSpansLength","textBox","renderedLetters","renderedLetter","textSpan","tempShapes","areAnimated","elementData","GradientConstructor","transformProperty","ownTransformers","shapeProperty","itemsData","prevViewData","render","ownStyles","ownModifiers","currentTransform","modifier","processedPos","animatedContent","filter","filterManager","feMerge","feMergeNode","colorBlack","colorWhite","opacity","feGaussianBlur","kBlurrinessToSigma","sigma","dimensions","sigmaX","sigmaY","edgeMode","elemChildren","groupPath","dasharrayValue","lineLength","units","feComponentTransfer","feFuncR","feFuncG","feFuncB","color1","color2","color3","tableR","tableG","tableB","effectElements","inputBlack","inputWhite","gamma","outputBlack","outputWhite","table","colorValue","outputDelta","inputDelta","filterSize","feOffset","feFlood","feComposite","col","filterElem","symbolId","children","nextChild","useElem","symbol","newLength","currentSavedOp","forceRealStack","imgW","imgH","imgRel","canvasRel","widthCrop","heightCrop","hasMasks","shouldRender","ownTransforms","parentTransform","groupTransform","nodes","currentStyle","isMain","shapeNodes","groupTransformMat","grd","hasFill","hasStroke","commands","pathArr","lastFill","lastStroke","lastStrokeW","transformedElementStyle","matrixValue","item","boundingBox","vPoint","oPoint","nextIPoint","nextVPoint","bounds","p3","b2ac","t2","tempBoundingBox","changed","shapeStyle","shapeTransform","innerElemStyle","textColor","tParent","tCont","tContStyle","tContTranslation","tStyle","tSpanTranslation","svgStyle","translation","textPath","margin","svgTransform","perspectiveStyle","perspective","mTransf","diffVector","mag","lookDir","lookLengthOnXZ","mRotationX","mRotationY","hasMatrixChanged","matValue","registeredAnimations","playingAnimationsNum","_stopped","_isFrozen","removeElement","ev","animItem","subtractPlayingCount","registerAnimation","setupAnimation","getRegisteredAnimations","lenAnims","animations","addPlayingCount","activate","params","setSpeed","setDirection","play","resume","nowTime","elapsedTime","first","pause","goToAndStop","isFrame","togglePause","searchAnimations","standalone","animElements","body","div","resize","freeze","unfreeze","setVolume","mute","unmute","animType","wrapperAttributes","loop","autoplay","prerender","segmentPath","error","markerName","marker","numValue","nextValue","_isComplete","end","pendingFrame","forceFlag","initExpressions","stackCount","registers","pushExpression","popExpression","releaseInstances","registerExpressionProperty","expression","wiggle","freq","amp","iWiggle","lenWiggle","addedAmps","periods","_value","searchExpressions","getValueAtTime","getSpeedAtTime","delta","speed","getVelocityAtTime","velocity","getStaticValueAtTime","setGroupProperty","propertyGroup","addPropertyDecorator","loopOut","duration","durationFlag","currentFrame","keyframes","lastKeyFrame","cycleDuration","firstKeyFrame","ret","initV","endV","current","repeats","lastValue","nextLastValue","loopIn","firstValue","nextFirstValue","smooth","samples","endFrame","sampleFrequency","sampleValue","getTransformValueAtTime","anchor","skewAxis","rotation","rotationZ","rotationY","rotationX","orientation","positionX","positionY","positionZ","getTransformStaticValueAtTime","propertyGetProp","getShapeValueAtTime","ShapePropertyConstructorFunction","KeyframedShapePropertyConstructorFunction","ShapeExpressions","accumulatedLength","initIndex","endIndex","vectorType","xLength","yLength","magnitude","unitVector","propertyGetShapeProp","trims","addDecorator","isKeyframed","hasExpressions","view","interfaceFunction","_propertyGroup","parentPropertyGroup","propertyName","iterateElements","groupInterfaceFactory","fillInterfaceFactory","strokeInterfaceFactory","trimInterfaceFactory","ellipseInterfaceFactory","starInterfaceFactory","rectInterfaceFactory","roundedInterfaceFactory","repeaterInterfaceFactory","gradientFillInterfaceFactory","defaultInterfaceFactory","contentsInterfaceFactory","interfaces","transformInterface","transformInterfaceFactory","content","_dashPropertyGroup","dashOb","addPropertyToDashOb","_interfaceFunction","parentGroupWrapper","_prevValue","_sourceText","_thisLayerFunction","stringValue","getMatrix","toWorldMat","propMatrix","transformMat","toWorldVec","toWorld","fromWorldVec","fromWorld","applyPoint","invertPoint","fromComp","sampleImage","_registerMaskInterface","maskManager","_registerEffectsInterface","effects","anchorPointDescriptor","outlineInterfaceFactory","currentPropertyName","currentProperty","searchProperty","propertyNameIndex","dataInterfaceFactory","_thisFunction","_px","_py","_pz","_transformFactory","registerComposition","_thisProjectFunction","createEffectsInterface","effectsData","createGroupInterface","groupInterface","createValueInterface","expressionProperty","MaskInterface","MaskManager","_masksInterfaces","maskFunction","defaultUnidimensionalValue","defaultMultidimensionalValue","completeProperty","expressionValue","property","valueProp","UnidimensionalPropertyInterface","MultidimensionalPropertyInterface","arrValue","defaultGetter","getValueProxy","total","effectItem","eff","href","prefix","plugin","variable","vars","pair","_animation","_playCount","animationName","loopCount","u","S","F","W","E","M","acc","placement","getWindow","ownerDocument","OwnElement","_ref","attributes","effect","_ref2","initialStyles","styleProperties","attribute","includeScale","offsetHeight","offsetWidth","clientRect","height","parent","child","rootNode","next","getComputedStyle","isFirefox","isIE","elementCss","currentNode","css","window","offsetParent","mathMax","mathMin","paddingObject","hashMap","toPaddingObject","padding","_state$modifiersData$","arrowElement","popperOffsets","basePlacement","axis","isVertical","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","axisProp","_options$element","win","dpr","_Object$assign2","popper","popperRect","variation","offsets","gpuAcceleration","adaptive","roundOffsets","isFixed","_ref3","_ref3$x","_ref3$y","hasX","hasY","sideX","sideY","heightProp","widthProp","offsetY","offsetX","commonStyles","_Object$assign","_ref4","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","instance","_options$scroll","scroll","_options$resize","scrollParents","scrollParent","hash","matched","scrollLeft","scrollTop","html","visualViewport","_element$ownerDocumen","winScroll","_getComputedStyle","overflowX","overflowY","list","isBody","updatedList","clippingParent","clippingParents","canEscapeClipping","clipperElement","boundary","rootBoundary","mainClippingParents","firstClippingParent","clippingRect","accRect","reference","commonX","commonY","mainAxis","_options","_options$placement","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","flipVariations","_options$allowedAutoP","allowedAutoPlacements","allPlacements","placements","allowedPlacements","overflows","oppositePlacement","_options$mainAxis","checkMainAxis","_options$altAxis","checkAltAxis","specifiedFallbackPlacements","_options$flipVariatio","preferredPlacement","isBasePlacement","fallbackPlacements","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","mainVariationSide","altVariationSide","checks","check","numberOfChecks","_loop","fittingPlacement","_ret","preventedOffsets","side","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","rects","invertDistance","skidding","_options$offset","_data$state$placement","_options$tether","tether","_options$tetherOffset","tetherOffset","altAxis","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMin","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","documentElement","map","visited","sort","requires","dep","depModifier","orderedModifiers","phase","pending","resolve","merged","existing","_key","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","effectCleanupFns","isDestroyed","setOptionsAction","cleanupModifierEffects","runModifierEffects","_state$elements","_state$orderedModifie","_state$orderedModifie2","_ref3$options","cleanupFn","noopFn","computeStyles","applyStyles","flip","preventOverflow","arrow","hide","_popperInstance","capital","savings","isFloating","years","interest","monthlyRate","month","months","totalFormatted","interestFormatted","valueTarget","inputTarget","unitTarget","unit","manualEvent","fitty","selectedOption","selectedChoice","choice","rate","savingsInput","savingsValue","savingsControl","secondaryInputs","capitalInput","capitalValueInput","yearsInput","yearsControl","toggleClass","button","targetSection","hideableTargets","isHidden","hideableAmountTargets","plusIcon","minusIcon","toggleText","isNowVisible","amountsPlusIcon","amountsMinusIcon","buttonHint","_popperInstances","cta","exports","this","_outerHTML","_pageFlip","_dots","PageFlip","isObject","extend","src","ssrDocument","getDocument","doc","ssrWindow","CustomEvent","proto","res","el","uniqueArray","selector","context","document","toCreate","tempParent","classes","classNames","className","attrs","attrName","transition","eventType","targetSelector","listener","capture","handleLiveEvent","eventData","parents","handleEvent","events","handlers","handler","evt","dataIndex","transitionEnd","dom","fireCallBack","includeMargins","clientTop","clientLeft","compareWith","returnIndex","els","newChild","tempDiv","nextEls","prevEls","prev","closest","foundElements","childNodes","methodName","delay","curTransform","transformMatrix","curStyle","noExtend","nextSource","keysArray","nextIndex","nextKey","desc","varName","varValue","swiper","targetPosition","startPosition","startTime","isOutOfBound","animate","progress","easeProgress","currentPosition","supportsPassive","opts","userAgent","support","platform","ua","device","screenWidth","screenHeight","android","ipad","ipod","iphone","windows","macos","iPadScreens","overrides","isSafari","on","emit","observer","resizeHandler","createObserver","entries","newWidth","newHeight","contentBoxSize","contentRect","removeObserver","orientationChangeHandler","extendParams","observers","attach","ObserverFunc","mutations","observerUpdate","containerParents","priority","self","method","onceHandler","eventHandler","$el","getDirectionLabel","getDirectionPropertyValue","label","$wrapperEl","swiperSize","rtl","wrongRTL","isVirtual","previousSlidesLength","slides","slidesLength","snapGrid","slidesGrid","slidesSizesGrid","offsetBefore","offsetAfter","previousSnapGridLength","previousSlidesGridLength","spaceBetween","slidePosition","prevSlideSize","gridEnabled","slideSize","shouldResetSlideSize","slide","slideStyles","currentWebKitTransform","paddingLeft","paddingRight","marginLeft","marginRight","boxSizing","clientWidth","newSlidesGrid","slidesGridItem","_","slideIndex","allSlidesSize","slideSizeValue","maxSnap","snap","allSlidesOffset","snapIndex","addToSnapGrid","addToSlidesGrid","activeSlides","getSlideByIndex","offsetCenter","slideOffset","slideProgress","originalSlideProgress","slideBefore","slideAfter","multiplier","translatesDiff","isBeginning","isEnd","wasBeginning","wasEnd","activeIndex","realIndex","activeSlide","nextSlide","prevSlide","newActiveIndex","previousIndex","previousRealIndex","previousSnapIndex","skip","slideFound","currentTranslate","byController","wrapperEl","newProgress","runCallbacks","translateBounds","internal","minTranslate","maxTranslate","newTranslate","isH","getTranslate","direction","step","initial","indexAsNumber","enabled","normalizedTranslate","normalizedGrid","normalizedGridNext","newIndex","animating","perGroup","increment","rtlTranslate","normalize","normalizedSnapGrid","prevSnap","prevSnapIndex","prevIndex","currentSnap","nextSnap","slidesPerView","slideToIndex","$selector","blankSlidesNum","blankNode","prependSlides","appendSlides","loopedSlides","allowSlidePrev","allowSlideNext","moving","base","__closestFrom","touches","$targetEl","noSwipingSelector","isTargetShadow","startX","startY","edgeSwipeDetection","edgeSwipeThreshold","preventDefault","shouldPreventDefault","targetTouch","pageX","pageY","diffX","diffY","touchAngle","disableParentSwiper","resistanceRatio","touchEndTime","timeDiff","pathTree","stopIndex","groupSize","ratio","touchEvents","domMethod","swiperMethod","passiveListener","initialized","breakpoints","breakpoint","breakpointParams","wasMultiRow","isMultiRow","wasEnabled","directionChanged","needsReLoop","isEnabled","containerEl","minRatio","resultClasses","suffixes","imageEl","srcset","sizes","checkForComplete","image","onReady","wasLocked","slidesOffsetBefore","lastSlideIndex","lastSlideRightEdge","allModulesParams","moduleParamName","moduleParams","checkOverflow","swipers","newParams","mod","swiperParams","touch","desktop","cls","slideEl","updates","exact","spv","breakLoop","setTranslate","translateValue","translated","newDirection","needUpdate","currentDirection","getWrapperSelector","deleteInstance","cleanStyles","newDefaults","modules","module","prototypeGroup","protoMethod","handle","kc","pageUpDown","isPageUp","isPageDown","isArrowLeft","isArrowRight","isArrowUp","isArrowDown","inView","swiperWidth","swiperHeight","windowWidth","windowHeight","swiperOffset","swiperCoord","enable","disable","_swiper","removeClass","_currentTarget","itemTarget","isOpen","entry","elementPosition","headerOffset","offsetPosition"],"mappings":"iqBAEA,MAAM,SAAW,CAAC,WAAW,EAE7B,SAAS,yBAAyB,CAChC,cAAAA,EAAgB,kBAChB,WAAAC,EAAa,SACb,QAAAC,EAAU,CAAC,IAAK,QAAQ,EACxB,SAAAC,EAAW,SACX,MAAAC,EAAQ,EACV,EAAI,GAAI,CACN,GAAI,CAAC,QAAU,CAAC,SACd,gBACEA,EACA,iEACD,EACM,GAGT,GACE,CAACJ,GACD,EAAEC,IAAe,UAAYA,aAAsB,UACnD,CAACC,GACD,CAACA,EAAQ,QACT,CAACC,GACD,CAACA,EAAS,OAEV,gBACEC,EACA,6EACD,EACM,GAGT,SAASA,EAAO,8BAA8B,EAE9C,MAAMC,EAAkBH,EACrB,IAAKI,GAAM,GAAGA,UAAUN,IAAgB,EACxC,KAAK,GAAG,EAELO,EAAYC,GAAM,CACtB,MAAMC,EAAaD,EAAE,OAAO,QAAQH,CAAe,EACnD,GAAI,CAACI,EAAY,OAEjB,GAAI,CAAC,qBAAqBN,CAAQ,EAAG,CACnC,SACEC,EACA,2DACD,EACD,MACD,CAED,IAAIM,EAAO,KACX,GAAI,CACFA,EAAO,KAAK,MAAMD,EAAW,aAAa,QAAQT,GAAe,CAAC,CACnE,MAAC,CAED,CAED,iBAAiB,CAAE,KAAAU,EAAM,SAAAP,EAAU,MAAAC,CAAK,CAAE,CAC3C,EAED,OAAAH,EAAW,iBAAiB,QAASM,CAA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