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,KAAM,CACJ,KAAM,QAER,QAAS,CACP,KAAM,QACN,SAAS,GAEX,gBAAiB,CACf,KAAM,QACN,SAAS,IAGb,QAAS,CACP,KAAA,CAAM,GACJ,MAAM,EAAQ,GAAc,IAAI,GAC3B,IACL,GAAmB,GACnB,EAAM,UAAU,QAAQ,GAC9B,EAEI,IAAA,CAAK,EAAS,GACZ,MAAM,EAAQ,GAAc,IAAI,GAChC,IAAK,EAAO,OAAO,IACnB,EAAM,UAAU,QAAQ,GACxB,GAAmB,GACnB,GAAc,IAAI,EAAS,GAC3B,EAAQ,iBAAiB,iBAAkB,EACjD,GAIE,KAAA,CAAM,GACJ,IAAI,QACF,GACE,EACJ,MAAM,EAAQ,CACZ,WAEF,EAAQ,GAAY,GACpB,GAAe,KACb,EAAM,aAAU,CAAS,GAE/B,EAEE,MAAA,GACE,OAAO,EAAE,EAAY,CACnB,KAAM,KAAK,KACX,QAAS,KAAK,MACd,QAAS,KAAK,KACd,KAAK,EACL,KAAM,KAAK,gBAAkB,cAAW,GACvC,KAAK,OAAO,QACnB,W","file":"/npm/@motionone/vue@10.16.4/dist/motion-vue.esm.js/+esm","sourceRoot":"","sourcesContent":["/**\n * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0.\n * Original file: /npm/@motionone/vue@10.16.4/dist/motion-vue.esm.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import { defineComponent, ref, inject, provide, onMounted, onUpdated, h, onBeforeUpdate, Transition } from 'vue';\n\nfunction addUniqueItem(array, item) {\n  array.indexOf(item) === -1 && array.push(item);\n}\n\nfunction removeItem(arr, item) {\n  const index = arr.indexOf(item);\n  index > -1 && arr.splice(index, 1);\n}\n\nconst clamp = (min, max, v) => Math.min(Math.max(v, min), max);\n\nconst defaults = {\n  duration: 0.3,\n  delay: 0,\n  endDelay: 0,\n  repeat: 0,\n  easing: \"ease\"\n};\n\nconst isNumber = value => typeof value === \"number\";\n\nconst isEasingList = easing => Array.isArray(easing) && !isNumber(easing[0]);\n\nconst wrap = (min, max, v) => {\n  const rangeSize = max - min;\n  return ((v - min) % rangeSize + rangeSize) % rangeSize + min;\n};\n\nfunction getEasingForSegment(easing, i) {\n  return isEasingList(easing) ? easing[wrap(0, easing.length, i)] : easing;\n}\n\nconst mix = (min, max, progress) => -progress * min + progress * max + min;\n\nconst noop = () => {};\n\nconst noopReturn = v => v;\n\nconst progress = (min, max, value) => max - min === 0 ? 1 : (value - min) / (max - min);\n\nfunction fillOffset(offset, remaining) {\n  const min = offset[offset.length - 1];\n\n  for (let i = 1; i <= remaining; i++) {\n    const offsetProgress = progress(0, remaining, i);\n    offset.push(mix(min, 1, offsetProgress));\n  }\n}\n\nfunction defaultOffset(length) {\n  const offset = [0];\n  fillOffset(offset, length - 1);\n  return offset;\n}\n\nfunction interpolate(output) {\n  let input = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultOffset(output.length);\n  let easing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noopReturn;\n  const length = output.length;\n  /**\n   * If the input length is lower than the output we\n   * fill the input to match. This currently assumes the input\n   * is an animation progress value so is a good candidate for\n   * moving outside the function.\n   */\n\n  const remainder = length - input.length;\n  remainder > 0 && fillOffset(input, remainder);\n  return t => {\n    let i = 0;\n\n    for (; i < length - 2; i++) {\n      if (t < input[i + 1]) break;\n    }\n\n    let progressInRange = clamp(0, 1, progress(input[i], input[i + 1], t));\n    const segmentEasing = getEasingForSegment(easing, i);\n    progressInRange = segmentEasing(progressInRange);\n    return mix(output[i], output[i + 1], progressInRange);\n  };\n}\n\nconst isCubicBezier = easing => Array.isArray(easing) && isNumber(easing[0]);\n\nconst isEasingGenerator = easing => typeof easing === \"object\" && Boolean(easing.createAnimation);\n\nconst isFunction = value => typeof value === \"function\";\n\nconst isString = value => typeof value === \"string\";\n\nconst time = {\n  ms: seconds => seconds * 1000,\n  s: milliseconds => milliseconds / 1000\n};\n\n/*\n  Bezier function generator\n\n  This has been modified from Gaëtan Renaudeau's BezierEasing\n  https://github.com/gre/bezier-easing/blob/master/src/index.js\n  https://github.com/gre/bezier-easing/blob/master/LICENSE\n  \n  I've removed the newtonRaphsonIterate algo because in benchmarking it\n  wasn't noticiably faster than binarySubdivision, indeed removing it\n  usually improved times, depending on the curve.\n\n  I also removed the lookup table, as for the added bundle size and loop we're\n  only cutting ~4 or so subdivision iterations. I bumped the max iterations up\n  to 12 to compensate and this still tended to be faster for no perceivable\n  loss in accuracy.\n\n  Usage\n    const easeOut = cubicBezier(.17,.67,.83,.67);\n    const x = easeOut(0.5); // returns 0.627...\n*/\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\n\nconst calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) * t;\n\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 12;\n\nfunction binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {\n  let currentX;\n  let currentT;\n  let i = 0;\n\n  do {\n    currentT = lowerBound + (upperBound - lowerBound) / 2.0;\n    currentX = calcBezier(currentT, mX1, mX2) - x;\n\n    if (currentX > 0.0) {\n      upperBound = currentT;\n    } else {\n      lowerBound = currentT;\n    }\n  } while (Math.abs(currentX) > subdivisionPrecision && ++i < subdivisionMaxIterations);\n\n  return currentT;\n}\n\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n  // If this is a linear gradient, return linear easing\n  if (mX1 === mY1 && mX2 === mY2) return noopReturn;\n\n  const getTForX = aX => binarySubdivide(aX, 0, 1, mX1, mX2); // If animation is at start/end, return t without easing\n\n\n  return t => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nconst steps = function (steps) {\n  let direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"end\";\n  return progress => {\n    progress = direction === \"end\" ? Math.min(progress, 0.999) : Math.max(progress, 0.001);\n    const expanded = progress * steps;\n    const rounded = direction === \"end\" ? Math.floor(expanded) : Math.ceil(expanded);\n    return clamp(0, 1, rounded / steps);\n  };\n};\n\nconst namedEasings = {\n  ease: cubicBezier(0.25, 0.1, 0.25, 1.0),\n  \"ease-in\": cubicBezier(0.42, 0.0, 1.0, 1.0),\n  \"ease-in-out\": cubicBezier(0.42, 0.0, 0.58, 1.0),\n  \"ease-out\": cubicBezier(0.0, 0.0, 0.58, 1.0)\n};\nconst functionArgsRegex = /\\((.*?)\\)/;\n\nfunction getEasingFunction(definition) {\n  // If already an easing function, return\n  if (isFunction(definition)) return definition; // If an easing curve definition, return bezier function\n\n  if (isCubicBezier(definition)) return cubicBezier(...definition); // If we have a predefined easing function, return\n\n  if (namedEasings[definition]) return namedEasings[definition]; // If this is a steps function, attempt to create easing curve\n\n  if (definition.startsWith(\"steps\")) {\n    const args = functionArgsRegex.exec(definition);\n\n    if (args) {\n      const argsArray = args[1].split(\",\");\n      return steps(parseFloat(argsArray[0]), argsArray[1].trim());\n    }\n  }\n\n  return noopReturn;\n}\n\nclass Animation {\n  constructor(output) {\n    let keyframes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0, 1];\n    let {\n      easing,\n      duration: initialDuration = defaults.duration,\n      delay = defaults.delay,\n      endDelay = defaults.endDelay,\n      repeat = defaults.repeat,\n      offset,\n      direction = \"normal\"\n    } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    this.startTime = null;\n    this.rate = 1;\n    this.t = 0;\n    this.cancelTimestamp = null;\n    this.easing = noopReturn;\n    this.duration = 0;\n    this.totalDuration = 0;\n    this.repeat = 0;\n    this.playState = \"idle\";\n    this.finished = new Promise((resolve, reject) => {\n      this.resolve = resolve;\n      this.reject = reject;\n    });\n    easing = easing || defaults.easing;\n\n    if (isEasingGenerator(easing)) {\n      const custom = easing.createAnimation(keyframes);\n      easing = custom.easing;\n      keyframes = custom.keyframes || keyframes;\n      initialDuration = custom.duration || initialDuration;\n    }\n\n    this.repeat = repeat;\n    this.easing = isEasingList(easing) ? noopReturn : getEasingFunction(easing);\n    this.updateDuration(initialDuration);\n    const interpolate$1 = interpolate(keyframes, offset, isEasingList(easing) ? easing.map(getEasingFunction) : noopReturn);\n\n    this.tick = timestamp => {\n      var _a; // TODO: Temporary fix for OptionsResolver typing\n\n\n      delay = delay;\n      let t = 0;\n\n      if (this.pauseTime !== undefined) {\n        t = this.pauseTime;\n      } else {\n        t = (timestamp - this.startTime) * this.rate;\n      }\n\n      this.t = t; // Convert to seconds\n\n      t /= 1000; // Rebase on delay\n\n      t = Math.max(t - delay, 0);\n      /**\n       * If this animation has finished, set the current time\n       * to the total duration.\n       */\n\n      if (this.playState === \"finished\" && this.pauseTime === undefined) {\n        t = this.totalDuration;\n      }\n      /**\n       * Get the current progress (0-1) of the animation. If t is >\n       * than duration we'll get values like 2.5 (midway through the\n       * third iteration)\n       */\n\n\n      const progress = t / this.duration; // TODO progress += iterationStart\n\n      /**\n       * Get the current iteration (0 indexed). For instance the floor of\n       * 2.5 is 2.\n       */\n\n      let currentIteration = Math.floor(progress);\n      /**\n       * Get the current progress of the iteration by taking the remainder\n       * so 2.5 is 0.5 through iteration 2\n       */\n\n      let iterationProgress = progress % 1.0;\n\n      if (!iterationProgress && progress >= 1) {\n        iterationProgress = 1;\n      }\n      /**\n       * If iteration progress is 1 we count that as the end\n       * of the previous iteration.\n       */\n\n\n      iterationProgress === 1 && currentIteration--;\n      /**\n       * Reverse progress if we're not running in \"normal\" direction\n       */\n\n      const iterationIsOdd = currentIteration % 2;\n\n      if (direction === \"reverse\" || direction === \"alternate\" && iterationIsOdd || direction === \"alternate-reverse\" && !iterationIsOdd) {\n        iterationProgress = 1 - iterationProgress;\n      }\n\n      const p = t >= this.totalDuration ? 1 : Math.min(iterationProgress, 1);\n      const latest = interpolate$1(this.easing(p));\n      output(latest);\n      const isAnimationFinished = this.pauseTime === undefined && (this.playState === \"finished\" || t >= this.totalDuration + endDelay);\n\n      if (isAnimationFinished) {\n        this.playState = \"finished\";\n        (_a = this.resolve) === null || _a === void 0 ? void 0 : _a.call(this, latest);\n      } else if (this.playState !== \"idle\") {\n        this.frameRequestId = requestAnimationFrame(this.tick);\n      }\n    };\n\n    this.play();\n  }\n\n  play() {\n    const now = performance.now();\n    this.playState = \"running\";\n\n    if (this.pauseTime !== undefined) {\n      this.startTime = now - this.pauseTime;\n    } else if (!this.startTime) {\n      this.startTime = now;\n    }\n\n    this.cancelTimestamp = this.startTime;\n    this.pauseTime = undefined;\n    this.frameRequestId = requestAnimationFrame(this.tick);\n  }\n\n  pause() {\n    this.playState = \"paused\";\n    this.pauseTime = this.t;\n  }\n\n  finish() {\n    this.playState = \"finished\";\n    this.tick(0);\n  }\n\n  stop() {\n    var _a;\n\n    this.playState = \"idle\";\n\n    if (this.frameRequestId !== undefined) {\n      cancelAnimationFrame(this.frameRequestId);\n    }\n\n    (_a = this.reject) === null || _a === void 0 ? void 0 : _a.call(this, false);\n  }\n\n  cancel() {\n    this.stop();\n    this.tick(this.cancelTimestamp);\n  }\n\n  reverse() {\n    this.rate *= -1;\n  }\n\n  commitStyles() {}\n\n  updateDuration(duration) {\n    this.duration = duration;\n    this.totalDuration = duration * (this.repeat + 1);\n  }\n\n  get currentTime() {\n    return this.t;\n  }\n\n  set currentTime(t) {\n    if (this.pauseTime !== undefined || this.rate === 0) {\n      this.pauseTime = t;\n    } else {\n      this.startTime = performance.now() - t / this.rate;\n    }\n  }\n\n  get playbackRate() {\n    return this.rate;\n  }\n\n  set playbackRate(rate) {\n    this.rate = rate;\n  }\n\n}\n\n/**\n * The MotionValue tracks the state of a single animatable\n * value. Currently, updatedAt and current are unused. The\n * long term idea is to use this to minimise the number\n * of DOM reads, and to abstract the DOM interactions here.\n */\nclass MotionValue {\n  setAnimation(animation) {\n    this.animation = animation;\n    animation === null || animation === void 0 ? void 0 : animation.finished.then(() => this.clearAnimation()).catch(() => {});\n  }\n\n  clearAnimation() {\n    this.animation = this.generator = undefined;\n  }\n\n}\n\nconst data = new WeakMap();\n\nfunction getAnimationData(element) {\n  if (!data.has(element)) {\n    data.set(element, {\n      transforms: [],\n      values: new Map()\n    });\n  }\n\n  return data.get(element);\n}\n\nfunction getMotionValue(motionValues, name) {\n  if (!motionValues.has(name)) {\n    motionValues.set(name, new MotionValue());\n  }\n\n  return motionValues.get(name);\n}\n\n/**\n * A list of all transformable axes. We'll use this list to generated a version\n * of each axes for each transform.\n */\n\nconst axes = [\"\", \"X\", \"Y\", \"Z\"];\n/**\n * An ordered array of each transformable value. By default, transform values\n * will be sorted to this order.\n */\n\nconst order = [\"translate\", \"scale\", \"rotate\", \"skew\"];\nconst transformAlias = {\n  x: \"translateX\",\n  y: \"translateY\",\n  z: \"translateZ\"\n};\nconst rotation = {\n  syntax: \"<angle>\",\n  initialValue: \"0deg\",\n  toDefaultUnit: v => v + \"deg\"\n};\nconst baseTransformProperties = {\n  translate: {\n    syntax: \"<length-percentage>\",\n    initialValue: \"0px\",\n    toDefaultUnit: v => v + \"px\"\n  },\n  rotate: rotation,\n  scale: {\n    syntax: \"<number>\",\n    initialValue: 1,\n    toDefaultUnit: noopReturn\n  },\n  skew: rotation\n};\nconst transformDefinitions = new Map();\n\nconst asTransformCssVar = name => `--motion-${name}`;\n/**\n * Generate a list of every possible transform key\n */\n\n\nconst transforms = [\"x\", \"y\", \"z\"];\norder.forEach(name => {\n  axes.forEach(axis => {\n    transforms.push(name + axis);\n    transformDefinitions.set(asTransformCssVar(name + axis), baseTransformProperties[name]);\n  });\n});\n/**\n * A function to use with Array.sort to sort transform keys by their default order.\n */\n\nconst compareTransformOrder = (a, b) => transforms.indexOf(a) - transforms.indexOf(b);\n/**\n * Provide a quick way to check if a string is the name of a transform\n */\n\n\nconst transformLookup = new Set(transforms);\n\nconst isTransform = name => transformLookup.has(name);\n\nconst addTransformToElement = (element, name) => {\n  // Map x to translateX etc\n  if (transformAlias[name]) name = transformAlias[name];\n  const {\n    transforms\n  } = getAnimationData(element);\n  addUniqueItem(transforms, name);\n  /**\n   * TODO: An optimisation here could be to cache the transform in element data\n   * and only update if this has changed.\n   */\n\n  element.style.transform = buildTransformTemplate(transforms);\n};\n\nconst buildTransformTemplate = transforms => transforms.sort(compareTransformOrder).reduce(transformListToString, \"\").trim();\n\nconst transformListToString = (template, name) => `${template} ${name}(var(${asTransformCssVar(name)}))`;\n\nconst isCssVar = name => name.startsWith(\"--\");\n\nconst registeredProperties = new Set();\n\nfunction registerCssVariable(name) {\n  if (registeredProperties.has(name)) return;\n  registeredProperties.add(name);\n\n  try {\n    const {\n      syntax,\n      initialValue\n    } = transformDefinitions.has(name) ? transformDefinitions.get(name) : {};\n    CSS.registerProperty({\n      name,\n      inherits: false,\n      syntax,\n      initialValue\n    });\n  } catch (e) {}\n}\n\nconst testAnimation = (keyframes, options) => document.createElement(\"div\").animate(keyframes, options);\n\nconst featureTests = {\n  cssRegisterProperty: () => typeof CSS !== \"undefined\" && Object.hasOwnProperty.call(CSS, \"registerProperty\"),\n  waapi: () => Object.hasOwnProperty.call(Element.prototype, \"animate\"),\n  partialKeyframes: () => {\n    try {\n      testAnimation({\n        opacity: [1]\n      });\n    } catch (e) {\n      return false;\n    }\n\n    return true;\n  },\n  finished: () => Boolean(testAnimation({\n    opacity: [0, 1]\n  }, {\n    duration: 0.001\n  }).finished),\n  linearEasing: () => {\n    try {\n      testAnimation({\n        opacity: 0\n      }, {\n        easing: \"linear(0, 1)\"\n      });\n    } catch (e) {\n      return false;\n    }\n\n    return true;\n  }\n};\nconst results = {};\nconst supports = {};\n\nfor (const key in featureTests) {\n  supports[key] = () => {\n    if (results[key] === undefined) results[key] = featureTests[key]();\n    return results[key];\n  };\n}\n\nconst resolution = 0.015;\n\nconst generateLinearEasingPoints = (easing, duration) => {\n  let points = \"\";\n  const numPoints = Math.round(duration / resolution);\n\n  for (let i = 0; i < numPoints; i++) {\n    points += easing(progress(0, numPoints - 1, i)) + \", \";\n  }\n\n  return points.substring(0, points.length - 2);\n};\n\nconst convertEasing = (easing, duration) => {\n  if (isFunction(easing)) {\n    return supports.linearEasing() ? `linear(${generateLinearEasingPoints(easing, duration)})` : defaults.easing;\n  } else {\n    return isCubicBezier(easing) ? cubicBezierAsString(easing) : easing;\n  }\n};\n\nconst cubicBezierAsString = _ref => {\n  let [a, b, c, d] = _ref;\n  return `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\n};\n\nfunction hydrateKeyframes(keyframes, readInitialValue) {\n  for (let i = 0; i < keyframes.length; i++) {\n    if (keyframes[i] === null) {\n      keyframes[i] = i ? keyframes[i - 1] : readInitialValue();\n    }\n  }\n\n  return keyframes;\n}\n\nconst keyframesList = keyframes => Array.isArray(keyframes) ? keyframes : [keyframes];\n\nfunction getStyleName(key) {\n  if (transformAlias[key]) key = transformAlias[key];\n  return isTransform(key) ? asTransformCssVar(key) : key;\n}\n\nconst style = {\n  get: (element, name) => {\n    name = getStyleName(name);\n    let value = isCssVar(name) ? element.style.getPropertyValue(name) : getComputedStyle(element)[name];\n\n    if (!value && value !== 0) {\n      const definition = transformDefinitions.get(name);\n      if (definition) value = definition.initialValue;\n    }\n\n    return value;\n  },\n  set: (element, name, value) => {\n    name = getStyleName(name);\n\n    if (isCssVar(name)) {\n      element.style.setProperty(name, value);\n    } else {\n      element.style[name] = value;\n    }\n  }\n};\n\nfunction stopAnimation(animation) {\n  let needsCommit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n  if (!animation || animation.playState === \"finished\") return; // Suppress error thrown by WAAPI\n\n  try {\n    if (animation.stop) {\n      animation.stop();\n    } else {\n      needsCommit && animation.commitStyles();\n      animation.cancel();\n    }\n  } catch (e) {}\n}\n\nfunction getUnitConverter(keyframes, definition) {\n  var _a;\n\n  let toUnit = (definition === null || definition === void 0 ? void 0 : definition.toDefaultUnit) || noopReturn;\n  const finalKeyframe = keyframes[keyframes.length - 1];\n\n  if (isString(finalKeyframe)) {\n    const unit = ((_a = finalKeyframe.match(/(-?[\\d.]+)([a-z%]*)/)) === null || _a === void 0 ? void 0 : _a[2]) || \"\";\n    if (unit) toUnit = value => value + unit;\n  }\n\n  return toUnit;\n}\n\nfunction getDevToolsRecord() {\n  return window.__MOTION_DEV_TOOLS_RECORD;\n}\n\nfunction animateStyle(element, key, keyframesDefinition) {\n  let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n  let AnimationPolyfill = arguments.length > 4 ? arguments[4] : undefined;\n  const record = getDevToolsRecord();\n  const isRecording = options.record !== false && record;\n  let animation;\n  let {\n    duration = defaults.duration,\n    delay = defaults.delay,\n    endDelay = defaults.endDelay,\n    repeat = defaults.repeat,\n    easing = defaults.easing,\n    persist = false,\n    direction,\n    offset,\n    allowWebkitAcceleration = false\n  } = options;\n  const data = getAnimationData(element);\n  const valueIsTransform = isTransform(key);\n  let canAnimateNatively = supports.waapi();\n  /**\n   * If this is an individual transform, we need to map its\n   * key to a CSS variable and update the element's transform style\n   */\n\n  valueIsTransform && addTransformToElement(element, key);\n  const name = getStyleName(key);\n  const motionValue = getMotionValue(data.values, name);\n  /**\n   * Get definition of value, this will be used to convert numerical\n   * keyframes into the default value type.\n   */\n\n  const definition = transformDefinitions.get(name);\n  /**\n   * Stop the current animation, if any. Because this will trigger\n   * commitStyles (DOM writes) and we might later trigger DOM reads,\n   * this is fired now and we return a factory function to create\n   * the actual animation that can get called in batch,\n   */\n\n  stopAnimation(motionValue.animation, !(isEasingGenerator(easing) && motionValue.generator) && options.record !== false);\n  /**\n   * Batchable factory function containing all DOM reads.\n   */\n\n  return () => {\n    const readInitialValue = () => {\n      var _a, _b;\n\n      return (_b = (_a = style.get(element, name)) !== null && _a !== void 0 ? _a : definition === null || definition === void 0 ? void 0 : definition.initialValue) !== null && _b !== void 0 ? _b : 0;\n    };\n    /**\n     * Replace null values with the previous keyframe value, or read\n     * it from the DOM if it's the first keyframe.\n     */\n\n\n    let keyframes = hydrateKeyframes(keyframesList(keyframesDefinition), readInitialValue);\n    /**\n     * Detect unit type of keyframes.\n     */\n\n    const toUnit = getUnitConverter(keyframes, definition);\n\n    if (isEasingGenerator(easing)) {\n      const custom = easing.createAnimation(keyframes, key !== \"opacity\", readInitialValue, name, motionValue);\n      easing = custom.easing;\n      keyframes = custom.keyframes || keyframes;\n      duration = custom.duration || duration;\n    }\n    /**\n     * If this is a CSS variable we need to register it with the browser\n     * before it can be animated natively. We also set it with setProperty\n     * rather than directly onto the element.style object.\n     */\n\n\n    if (isCssVar(name)) {\n      if (supports.cssRegisterProperty()) {\n        registerCssVariable(name);\n      } else {\n        canAnimateNatively = false;\n      }\n    }\n    /**\n     * If we've been passed a custom easing function, and this browser\n     * does **not** support linear() easing, and the value is a transform\n     * (and thus a pure number) we can still support the custom easing\n     * by falling back to the animation polyfill.\n     */\n\n\n    if (valueIsTransform && !supports.linearEasing() && (isFunction(easing) || isEasingList(easing) && easing.some(isFunction))) {\n      canAnimateNatively = false;\n    }\n    /**\n     * If we can animate this value with WAAPI, do so.\n     */\n\n\n    if (canAnimateNatively) {\n      /**\n       * Convert numbers to default value types. Currently this only supports\n       * transforms but it could also support other value types.\n       */\n      if (definition) {\n        keyframes = keyframes.map(value => isNumber(value) ? definition.toDefaultUnit(value) : value);\n      }\n      /**\n       * If this browser doesn't support partial/implicit keyframes we need to\n       * explicitly provide one.\n       */\n\n\n      if (keyframes.length === 1 && (!supports.partialKeyframes() || isRecording)) {\n        keyframes.unshift(readInitialValue());\n      }\n\n      const animationOptions = {\n        delay: time.ms(delay),\n        duration: time.ms(duration),\n        endDelay: time.ms(endDelay),\n        easing: !isEasingList(easing) ? convertEasing(easing, duration) : undefined,\n        direction,\n        iterations: repeat + 1,\n        fill: \"both\"\n      };\n      animation = element.animate({\n        [name]: keyframes,\n        offset,\n        easing: isEasingList(easing) ? easing.map(thisEasing => convertEasing(thisEasing, duration)) : undefined\n      }, animationOptions);\n      /**\n       * Polyfill finished Promise in browsers that don't support it\n       */\n\n      if (!animation.finished) {\n        animation.finished = new Promise((resolve, reject) => {\n          animation.onfinish = resolve;\n          animation.oncancel = reject;\n        });\n      }\n\n      const target = keyframes[keyframes.length - 1];\n      animation.finished.then(() => {\n        if (persist) return; // Apply styles to target\n\n        style.set(element, name, target); // Ensure fill modes don't persist\n\n        animation.cancel();\n      }).catch(noop);\n      /**\n       * This forces Webkit to run animations on the main thread by exploiting\n       * this condition:\n       * https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp?rev=281238#L1099\n       *\n       * This fixes Webkit's timing bugs, like accelerated animations falling\n       * out of sync with main thread animations and massive delays in starting\n       * accelerated animations in WKWebView.\n       */\n\n      if (!allowWebkitAcceleration) animation.playbackRate = 1.000001;\n      /**\n       * If we can't animate the value natively then we can fallback to the numbers-only\n       * polyfill for transforms.\n       */\n    } else if (AnimationPolyfill && valueIsTransform) {\n      /**\n       * If any keyframe is a string (because we measured it from the DOM), we need to convert\n       * it into a number before passing to the Animation polyfill.\n       */\n      keyframes = keyframes.map(value => typeof value === \"string\" ? parseFloat(value) : value);\n      /**\n       * If we only have a single keyframe, we need to create an initial keyframe by reading\n       * the current value from the DOM.\n       */\n\n      if (keyframes.length === 1) {\n        keyframes.unshift(parseFloat(readInitialValue()));\n      }\n\n      animation = new AnimationPolyfill(latest => {\n        style.set(element, name, toUnit ? toUnit(latest) : latest);\n      }, keyframes, Object.assign(Object.assign({}, options), {\n        duration,\n        easing\n      }));\n    } else {\n      const target = keyframes[keyframes.length - 1];\n      style.set(element, name, definition && isNumber(target) ? definition.toDefaultUnit(target) : target);\n    }\n\n    if (isRecording) {\n      record(element, key, keyframes, {\n        duration,\n        delay: delay,\n        easing,\n        repeat,\n        offset\n      }, \"motion-one\");\n    }\n\n    motionValue.setAnimation(animation);\n    return animation;\n  };\n}\n\nconst getOptions = (options, key) =>\n/**\n * TODO: Make test for this\n * Always return a new object otherwise delay is overwritten by results of stagger\n * and this results in no stagger\n */\noptions[key] ? Object.assign(Object.assign({}, options), options[key]) : Object.assign({}, options);\n\nfunction resolveElements(elements, selectorCache) {\n  var _a;\n\n  if (typeof elements === \"string\") {\n    if (selectorCache) {\n      (_a = selectorCache[elements]) !== null && _a !== void 0 ? _a : selectorCache[elements] = document.querySelectorAll(elements);\n      elements = selectorCache[elements];\n    } else {\n      elements = document.querySelectorAll(elements);\n    }\n  } else if (elements instanceof Element) {\n    elements = [elements];\n  }\n  /**\n   * Return an empty array\n   */\n\n\n  return Array.from(elements || []);\n}\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\nfunction __rest(s, e) {\n  var t = {};\n\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n}\n\nconst thresholds = {\n  any: 0,\n  all: 1\n};\n\nfunction inView$1(elementOrSelector, onStart) {\n  let {\n    root,\n    margin: rootMargin,\n    amount = \"any\"\n  } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n  /**\n   * If this browser doesn't support IntersectionObserver, return a dummy stop function.\n   * Default triggering of onStart is tricky - it could be used for starting/stopping\n   * videos, lazy loading content etc. We could provide an option to enable a fallback, or\n   * provide a fallback callback option.\n   */\n  if (typeof IntersectionObserver === \"undefined\") {\n    return () => {};\n  }\n\n  const elements = resolveElements(elementOrSelector);\n  const activeIntersections = new WeakMap();\n\n  const onIntersectionChange = entries => {\n    entries.forEach(entry => {\n      const onEnd = activeIntersections.get(entry.target);\n      /**\n       * If there's no change to the intersection, we don't need to\n       * do anything here.\n       */\n\n      if (entry.isIntersecting === Boolean(onEnd)) return;\n\n      if (entry.isIntersecting) {\n        const newOnEnd = onStart(entry);\n\n        if (isFunction(newOnEnd)) {\n          activeIntersections.set(entry.target, newOnEnd);\n        } else {\n          observer.unobserve(entry.target);\n        }\n      } else if (onEnd) {\n        onEnd(entry);\n        activeIntersections.delete(entry.target);\n      }\n    });\n  };\n\n  const observer = new IntersectionObserver(onIntersectionChange, {\n    root,\n    rootMargin,\n    threshold: typeof amount === \"number\" ? amount : thresholds[amount]\n  });\n  elements.forEach(element => observer.observe(element));\n  return () => observer.disconnect();\n}\n\nfunction hasChanged(a, b) {\n  if (typeof a !== typeof b) return true;\n  if (Array.isArray(a) && Array.isArray(b)) return !shallowCompare(a, b);\n  return a !== b;\n}\n\nfunction shallowCompare(next, prev) {\n  const prevLength = prev.length;\n  if (prevLength !== next.length) return false;\n\n  for (let i = 0; i < prevLength; i++) {\n    if (prev[i] !== next[i]) return false;\n  }\n\n  return true;\n}\n\nfunction isVariant(definition) {\n  return typeof definition === \"object\";\n}\n\nfunction resolveVariant(definition, variants) {\n  if (isVariant(definition)) {\n    return definition;\n  } else if (definition && variants) {\n    return variants[definition];\n  }\n}\n\nlet scheduled = undefined;\n\nfunction processScheduledAnimations() {\n  if (!scheduled) return;\n  const generators = scheduled.sort(compareByDepth).map(fireAnimateUpdates);\n  generators.forEach(fireNext);\n  generators.forEach(fireNext);\n  scheduled = undefined;\n}\n\nfunction scheduleAnimation(state) {\n  if (!scheduled) {\n    scheduled = [state];\n    requestAnimationFrame(processScheduledAnimations);\n  } else {\n    addUniqueItem(scheduled, state);\n  }\n}\n\nfunction unscheduleAnimation(state) {\n  scheduled && removeItem(scheduled, state);\n}\n\nconst compareByDepth = (a, b) => a.getDepth() - b.getDepth();\n\nconst fireAnimateUpdates = state => state.animateUpdates();\n\nconst fireNext = iterator => iterator.next();\n\nconst motionEvent = (name, target) => new CustomEvent(name, {\n  detail: {\n    target\n  }\n});\n\nfunction dispatchPointerEvent(element, name, event) {\n  element.dispatchEvent(new CustomEvent(name, {\n    detail: {\n      originalEvent: event\n    }\n  }));\n}\n\nfunction dispatchViewEvent(element, name, entry) {\n  element.dispatchEvent(new CustomEvent(name, {\n    detail: {\n      originalEntry: entry\n    }\n  }));\n}\n\nconst inView = {\n  isActive: options => Boolean(options.inView),\n  subscribe: (element, _ref, _ref2) => {\n    let {\n      enable,\n      disable\n    } = _ref;\n    let {\n      inViewOptions = {}\n    } = _ref2;\n\n    const {\n      once\n    } = inViewOptions,\n          viewOptions = __rest(inViewOptions, [\"once\"]);\n\n    return inView$1(element, enterEntry => {\n      enable();\n      dispatchViewEvent(element, \"viewenter\", enterEntry);\n\n      if (!once) {\n        return leaveEntry => {\n          disable();\n          dispatchViewEvent(element, \"viewleave\", leaveEntry);\n        };\n      }\n    }, viewOptions);\n  }\n};\n\nconst mouseEvent = (element, name, action) => event => {\n  if (event.pointerType && event.pointerType !== \"mouse\") return;\n  action();\n  dispatchPointerEvent(element, name, event);\n};\n\nconst hover = {\n  isActive: options => Boolean(options.hover),\n  subscribe: (element, _ref) => {\n    let {\n      enable,\n      disable\n    } = _ref;\n    const onEnter = mouseEvent(element, \"hoverstart\", enable);\n    const onLeave = mouseEvent(element, \"hoverend\", disable);\n    element.addEventListener(\"pointerenter\", onEnter);\n    element.addEventListener(\"pointerleave\", onLeave);\n    return () => {\n      element.removeEventListener(\"pointerenter\", onEnter);\n      element.removeEventListener(\"pointerleave\", onLeave);\n    };\n  }\n};\n\nconst press = {\n  isActive: options => Boolean(options.press),\n  subscribe: (element, _ref) => {\n    let {\n      enable,\n      disable\n    } = _ref;\n\n    const onPointerUp = event => {\n      disable();\n      dispatchPointerEvent(element, \"pressend\", event);\n      window.removeEventListener(\"pointerup\", onPointerUp);\n    };\n\n    const onPointerDown = event => {\n      enable();\n      dispatchPointerEvent(element, \"pressstart\", event);\n      window.addEventListener(\"pointerup\", onPointerUp);\n    };\n\n    element.addEventListener(\"pointerdown\", onPointerDown);\n    return () => {\n      element.removeEventListener(\"pointerdown\", onPointerDown);\n      window.removeEventListener(\"pointerup\", onPointerUp);\n    };\n  }\n};\n\nconst gestures = {\n  inView,\n  hover,\n  press\n};\n/**\n * A list of state types, in priority order. If a value is defined in\n * a righter-most type, it will override any definition in a lefter-most.\n */\n\nconst stateTypes = [\"initial\", \"animate\", ...Object.keys(gestures), \"exit\"];\n/**\n * A global store of all generated motion states. This can be used to lookup\n * a motion state for a given Element.\n */\n\nconst mountedStates = new WeakMap();\n\nfunction createMotionState() {\n  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  let parent = arguments.length > 1 ? arguments[1] : undefined;\n\n  /**\n   * The element represented by the motion state. This is an empty reference\n   * when we create the state to support SSR and allow for later mounting\n   * in view libraries.\n   *\n   * @ts-ignore\n   */\n  let element;\n  /**\n   * Calculate a depth that we can use to order motion states by tree depth.\n   */\n\n  let depth = parent ? parent.getDepth() + 1 : 0;\n  /**\n   * Track which states are currently active.\n   */\n\n  const activeStates = {\n    initial: true,\n    animate: true\n  };\n  /**\n   * A map of functions that, when called, will remove event listeners for\n   * a given gesture.\n   */\n\n  const gestureSubscriptions = {};\n  /**\n   * Initialise a context to share through motion states. This\n   * will be populated by variant names (if any).\n   */\n\n  const context = {};\n\n  for (const name of stateTypes) {\n    context[name] = typeof options[name] === \"string\" ? options[name] : parent === null || parent === void 0 ? void 0 : parent.getContext()[name];\n  }\n  /**\n   * If initial is set to false we use the animate prop as the initial\n   * animation state.\n   */\n\n\n  const initialVariantSource = options.initial === false ? \"animate\" : \"initial\";\n  /**\n   * Destructure an initial target out from the resolved initial variant.\n   */\n\n  let _a = resolveVariant(options[initialVariantSource] || context[initialVariantSource], options.variants) || {},\n      target = __rest(_a, [\"transition\"]);\n  /**\n   * The base target is a cached map of values that we'll use to animate\n   * back to if a value is removed from all active state types. This\n   * is usually the initial value as read from the DOM, for instance if\n   * it hasn't been defined in initial.\n   */\n\n\n  const baseTarget = Object.assign({}, target);\n  /**\n   * A generator that will be processed by the global animation scheduler.\n   * This yields when it switches from reading the DOM to writing to it\n   * to prevent layout thrashing.\n   */\n\n  function* animateUpdates() {\n    var _a, _b;\n\n    const prevTarget = target;\n    target = {};\n    const animationOptions = {};\n\n    for (const name of stateTypes) {\n      if (!activeStates[name]) continue;\n      const variant = resolveVariant(options[name]);\n      if (!variant) continue;\n\n      for (const key in variant) {\n        if (key === \"transition\") continue;\n        target[key] = variant[key];\n        animationOptions[key] = getOptions((_b = (_a = variant.transition) !== null && _a !== void 0 ? _a : options.transition) !== null && _b !== void 0 ? _b : {}, key);\n      }\n    }\n\n    const allTargetKeys = new Set([...Object.keys(target), ...Object.keys(prevTarget)]);\n    const animationFactories = [];\n    allTargetKeys.forEach(key => {\n      var _a;\n\n      if (target[key] === undefined) {\n        target[key] = baseTarget[key];\n      }\n\n      if (hasChanged(prevTarget[key], target[key])) {\n        (_a = baseTarget[key]) !== null && _a !== void 0 ? _a : baseTarget[key] = style.get(element, key);\n        animationFactories.push(animateStyle(element, key, target[key], animationOptions[key], Animation));\n      }\n    }); // Wait for all animation states to read from the DOM\n\n    yield;\n    const animations = animationFactories.map(factory => factory()).filter(Boolean);\n    if (!animations.length) return;\n    const animationTarget = target;\n    element.dispatchEvent(motionEvent(\"motionstart\", animationTarget));\n    Promise.all(animations.map(animation => animation.finished)).then(() => {\n      element.dispatchEvent(motionEvent(\"motioncomplete\", animationTarget));\n    }).catch(noop);\n  }\n\n  const setGesture = (name, isActive) => () => {\n    activeStates[name] = isActive;\n    scheduleAnimation(state);\n  };\n\n  const updateGestureSubscriptions = () => {\n    for (const name in gestures) {\n      const isGestureActive = gestures[name].isActive(options);\n      const remove = gestureSubscriptions[name];\n\n      if (isGestureActive && !remove) {\n        gestureSubscriptions[name] = gestures[name].subscribe(element, {\n          enable: setGesture(name, true),\n          disable: setGesture(name, false)\n        }, options);\n      } else if (!isGestureActive && remove) {\n        remove();\n        delete gestureSubscriptions[name];\n      }\n    }\n  };\n\n  const state = {\n    update: newOptions => {\n      if (!element) return;\n      options = newOptions;\n      updateGestureSubscriptions();\n      scheduleAnimation(state);\n    },\n    setActive: (name, isActive) => {\n      if (!element) return;\n      activeStates[name] = isActive;\n      scheduleAnimation(state);\n    },\n    animateUpdates,\n    getDepth: () => depth,\n    getTarget: () => target,\n    getOptions: () => options,\n    getContext: () => context,\n    mount: newElement => {\n      element = newElement;\n      mountedStates.set(element, state);\n      updateGestureSubscriptions();\n      return () => {\n        mountedStates.delete(element);\n        unscheduleAnimation(state);\n\n        for (const key in gestureSubscriptions) {\n          gestureSubscriptions[key]();\n        }\n      };\n    },\n    isMounted: () => Boolean(element)\n  };\n  return state;\n}\n\nfunction createStyles(keyframes) {\n  const initialKeyframes = {};\n  const transformKeys = [];\n\n  for (let key in keyframes) {\n    const value = keyframes[key];\n\n    if (isTransform(key)) {\n      if (transformAlias[key]) key = transformAlias[key];\n      transformKeys.push(key);\n      key = asTransformCssVar(key);\n    }\n\n    let initialKeyframe = Array.isArray(value) ? value[0] : value;\n    /**\n     * If this is a number and we have a default value type, convert the number\n     * to this type.\n     */\n\n    const definition = transformDefinitions.get(key);\n\n    if (definition) {\n      initialKeyframe = isNumber(value) ? definition.toDefaultUnit(value) : value;\n    }\n\n    initialKeyframes[key] = initialKeyframe;\n  }\n\n  if (transformKeys.length) {\n    initialKeyframes.transform = buildTransformTemplate(transformKeys);\n  }\n\n  return initialKeyframes;\n}\n\nconst contextId = \"motion-state\";\nconst presenceId = \"motion-presence\";\n\nconst objectType = () => ({\n  type: Object\n});\n\nconst Motion = defineComponent({\n  name: \"Motion\",\n  inheritAttrs: true,\n  props: {\n    tag: {\n      type: String,\n      default: \"div\"\n    },\n    initial: {\n      type: [Object, Boolean]\n    },\n    animate: objectType(),\n    inView: objectType(),\n    hover: objectType(),\n    press: objectType(),\n    exit: objectType(),\n    inViewOptions: objectType(),\n    transition: objectType(),\n    style: objectType()\n  },\n\n  setup(props) {\n    const root = ref(null);\n    const parentState = inject(contextId, undefined);\n    const presenceState = inject(presenceId, undefined);\n    const state = createMotionState(Object.assign(Object.assign({}, props), {\n      initial: (presenceState === null || presenceState === void 0 ? void 0 : presenceState.initial) === false ? presenceState.initial : props.initial === true ? undefined : props.initial\n    }), parentState);\n    provide(contextId, state);\n    onMounted(() => {\n      const unmount = state.mount(root.value);\n      state.update(Object.assign(Object.assign({}, props), {\n        initial: props.initial === true ? undefined : props.initial\n      }));\n      return unmount;\n    });\n    let manuallyAppliedMotionStyles = false;\n    onUpdated(() => {\n      /**\r\n       * Vue reapplies all styles every render, rather than diffing and\r\n       * only reapplying the ones that change. This means that initially\r\n       * calculated motion styles also get reapplied every render, leading\r\n       * to incorrect animation origins.\r\n       *\r\n       * To prevent this, once an element is mounted we hand over these\r\n       * styles to Motion. This will currently still lead to a jump if interrupting\r\n       * transforms in browsers where the number polyfill is used.\r\n       */\n      if (!manuallyAppliedMotionStyles && root.value) {\n        manuallyAppliedMotionStyles = true;\n        const styles = createStyles(state.getTarget());\n\n        for (const key in styles) {\n          style.set(root.value, key, styles[key]);\n        }\n      }\n\n      state.update(Object.assign(Object.assign({}, props), {\n        initial: props.initial === true ? undefined : props.initial\n      }));\n    });\n    return {\n      state,\n      root,\n      initialStyles: createStyles(state.getTarget())\n    };\n  },\n\n  render() {\n    var _a, _b;\n\n    return h(this.tag, {\n      ref: \"root\",\n      style: this.state.isMounted() ? this.style : Object.assign(Object.assign({}, this.style), this.initialStyles)\n    }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a));\n  }\n\n});\n\nconst doneCallbacks = new WeakMap();\n\nfunction removeDoneCallback(element) {\n  const prevDoneCallback = doneCallbacks.get(element);\n  prevDoneCallback && element.removeEventListener(\"motioncomplete\", prevDoneCallback);\n  doneCallbacks.delete(element);\n}\n\nconst Presence = defineComponent({\n  name: \"Presence\",\n  props: {\n    name: {\n      type: String\n    },\n    initial: {\n      type: Boolean,\n      default: true\n    },\n    exitBeforeEnter: {\n      type: Boolean,\n      default: false\n    }\n  },\n  methods: {\n    enter(element) {\n      const state = mountedStates.get(element);\n      if (!state) return;\n      removeDoneCallback(element);\n      state.setActive(\"exit\", false);\n    },\n\n    exit(element, done) {\n      const state = mountedStates.get(element);\n      if (!state) return done();\n      state.setActive(\"exit\", true);\n      removeDoneCallback(element);\n      doneCallbacks.set(element, done);\n      element.addEventListener(\"motioncomplete\", done);\n    }\n\n  },\n\n  setup(_ref) {\n    let {\n      initial\n    } = _ref;\n    const state = {\n      initial\n    };\n    provide(presenceId, state);\n    onBeforeUpdate(() => {\n      state.initial = undefined;\n    });\n  },\n\n  render() {\n    return h(Transition, {\n      name: this.name,\n      onEnter: this.enter,\n      onLeave: this.exit,\n      css: false,\n      mode: this.exitBeforeEnter ? \"out-in\" : undefined\n    }, this.$slots.default);\n  }\n\n});\n\nexport { Motion, Presence };\n"]}