-
Notifications
You must be signed in to change notification settings - Fork 0
/
5f1adee5006828fcc91e7a331cc1c93295d3c7a8-8af24ea4d40bd158b87c.js.map
1 lines (1 loc) · 471 KB
/
5f1adee5006828fcc91e7a331cc1c93295d3c7a8-8af24ea4d40bd158b87c.js.map
1
{"version":3,"file":"5f1adee5006828fcc91e7a331cc1c93295d3c7a8-8af24ea4d40bd158b87c.js","mappings":"mJAQA,ICPIA,EAAkB,45HAWtB,EDZA,SAAiBC,GACf,IAAIC,EAAQ,GACZ,OAAO,SAAUC,GAEf,YADmBC,IAAfF,EAAMC,KAAoBD,EAAMC,GAAOF,EAAGE,IACvCD,EAAMC,ICDL,EAAQ,SAAUE,GAC5B,OAAOL,EAAgBM,KAAKD,IAAgC,MAAvBA,EAAKE,WAAW,IAE3B,MAAvBF,EAAKE,WAAW,IAEhBF,EAAKE,WAAW,GAAK,O,6ECRtBC,EAAmB,SAA0BC,GAC/C,MAAO,CACLC,UAAW,SAAmBC,GAC5B,OAAOF,EAAUG,MAAK,SAAUC,GAC9B,QAASF,EAAME,SAMnBC,EAAqB,CACvBC,cAAeP,EAAiB,CAAC,SAAU,WAAY,OAAQ,0BAC/DQ,UAAWR,EAAiB,CAAC,UAAW,OAAQ,WAAY,aAAc,WAAY,aAAc,cACpGS,KAAMT,EAAiB,CAAC,SACxBU,KAAMV,EAAiB,CAAC,OAAQ,iBAChCW,MAAOX,EAAiB,CAAC,eACzBY,MAAOZ,EAAiB,CAAC,aAAc,eAAgB,eACvDa,IAAKb,EAAiB,CAAC,WAAY,QAAS,aAAc,gBAC1Dc,IAAKd,EAAiB,CAAC,QAAS,aAAc,oBAAqB,aACnEe,gBAAiBf,EAAiB,CAAC,SAAU,cClB/C,IAAIgB,GAAc,IAAAC,eAAc,CAC9BC,QAAQ,ICINC,EAAeC,OAAOC,KAAKf,GAC3BgB,EAAcH,EAAaI,OCF/B,IAAIC,GAAsB,IAAAP,eAAc,CACtCQ,mBAAoB,SAA4BC,GAC9C,OAAOA,GA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,UAC7C,sBAAI40C,UAAW,CAACH,GAAYK,GAAAA,IAAYnwC,KAAK,MAC3C,sBAAIiwC,UAAWH,IACb,qBAAGM,KAAK,QAAQH,UAAWH,IAA3B,SAIF,sBAAIG,UAAWH,IACb,qBAAGM,KAAK,YAAYH,UAAWH,IAA/B,UAIF,sBAAIG,UAAWH,IACb,qBAAGM,KAAK,cAAcH,UAAWH,IAAjC,eAIF,sBAAIG,UAAWH,IACb,qBAAGM,KAAK,UAAUH,UAAWH,IAA7B,WAIF,sBAAIG,UAAWH,IACb,qBAAGM,KAAK,cAAcH,UAAWH,IAAjC,gBA4BX,EAnHGT,CAAsBgB,EAAAA,WEc5B,GA1Be,SAAC,GAAwB,IAAtBpW,EAAqB,EAArBA,SAAU0N,EAAW,EAAXA,KAC1B,OACE,gCACE,gBAAC,GAAD,MACA,gBAACoH,GAAOuB,KAAR,CACEzxC,IAAK8oC,EACLzqC,QAAS,CAAE2L,QAAS,GACpB1J,QAAS,CAAE0J,QAAS,GACpBlP,KAAM,CAAEkP,QAAS,GACjBmI,WAAY,CACVxN,KAAM,SACNkU,KAAM,IACNgB,UAAW,GACXnB,SAAU,IAGZ,4BAAO0iB,O,sMCpBR,IAAIkW,EAAa,oCAEbI,EAAgB,uCAChBC,EAAc,qCACdC,EAAgB,wCAChBC,EAAqB,6CACrBC,EAAa,oCACbC,EAAW,mC,qBCRP,SAASC,EAAuBC,GAC7C,QAAa,IAATA,EACF,MAAM,IAAIC,eAAe,6DAG3B,OAAOD,E","sources":["webpack://victor-cortes/./node_modules/@emotion/memoize/dist/memoize.browser.esm.js","webpack://victor-cortes/./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/motion/features/definitions.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/context/LazyContext.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/motion/features/use-features.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/context/MotionConfigContext.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/context/MotionContext/index.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/context/LayoutGroupContext.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/utils/is-browser.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/utils/is-ref-object.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/utils/variants.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/context/MotionContext/create.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/context/MotionContext/utils.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/motion/index.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/motion-proxy.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/projection/scale-correction.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/html/utils/transform.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/value/utils/is-motion-value.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/html/utils/build-transform.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.js","webpack://victor-cortes/./node_modules/style-value-types/node_modules/tslib/tslib.es6.js","webpack://victor-cortes/./node_modules/style-value-types/dist/es/utils.js","webpack://victor-cortes/./node_modules/style-value-types/dist/es/numbers/units.js","webpack://victor-cortes/./node_modules/style-value-types/dist/es/numbers/index.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/value-types/type-int.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/value-types/number.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/html/utils/build-styles.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/html/use-props.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/motion/utils/valid-prop.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/svg/utils/path.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/svg/use-props.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/use-render.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/html/utils/render.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/svg/utils/render.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/utils/resolve-value.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/svg/config-motion.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/html/config-motion.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/utils/types.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/events/use-dom-event.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/gestures/utils/event-type.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/events/event-info.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/events/use-pointer-event.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/events/utils.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/gestures/drag/utils/lock.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/gestures/use-hover-gesture.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/utils/pipe.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/motion/utils/make-renderless-component.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/motion/features/gestures.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/gestures/use-tap-gesture.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/gestures/use-focus-gesture.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/utils/shallow-compare.js","webpack://victor-cortes/./node_modules/popmotion/node_modules/tslib/tslib.es6.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/utils/clamp.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/animations/utils/find-spring.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/animations/generators/spring.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/utils/progress.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/utils/mix.js","webpack://victor-cortes/./node_modules/style-value-types/dist/es/color/utils.js","webpack://victor-cortes/./node_modules/style-value-types/dist/es/color/rgba.js","webpack://victor-cortes/./node_modules/style-value-types/dist/es/color/hex.js","webpack://victor-cortes/./node_modules/style-value-types/dist/es/color/hsla.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/utils/mix-color.js","webpack://victor-cortes/./node_modules/style-value-types/dist/es/color/index.js","webpack://victor-cortes/./node_modules/style-value-types/dist/es/complex/index.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/utils/inc.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/utils/mix-complex.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/utils/interpolate.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/easing/utils.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/easing/index.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/animations/generators/keyframes.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/animations/utils/detect-animation-from-options.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/animations/generators/decay.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/animations/utils/elapsed.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/animations/index.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/utils/velocity-per-second.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/utils/time-conversion.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/easing/cubic-bezier.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/animation/utils/easing.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/animation/utils/is-animatable.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/animation/utils/default-transitions.js","webpack://victor-cortes/./node_modules/style-value-types/dist/es/complex/filter.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/value-types/defaults.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/animation/utils/transitions.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/animations/inertia.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/utils/array.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/utils/subscription-manager.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/value/index.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/value-types/test.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/value-types/find.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/utils/setters.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/utils/animation.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/utils/animation-state.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/motion/features/animations.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/utils/is-point.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/utils/is-point-3d.js","webpack://victor-cortes/./node_modules/popmotion/dist/es/utils/distance.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/gestures/PanSession.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/utils/each-axis.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/projection/measure.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/utils/geometry/delta-calc.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/motion/features/layout/utils.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/utils/is-draggable.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/utils/geometry/delta-apply.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/projection/convert-to-relative.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/motion/features/drag.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/gestures/use-pan-gesture.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/gestures/drag/use-drag.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/projection/default-scale-correctors.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/motion/features/layout/Animate.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/motion/features/layout/Measure.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/motion/features/layout/index.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/utils/state.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/html/utils/build-projection-transform.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/utils/lifecycles.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/utils/projection.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/utils/flat-tree.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/index.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/utils/motion-values.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/projection/relative-set.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/utils/parse-dom-variant.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/html/visual-element.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/utils/is-numerical-string.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/svg/visual-element.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/create-visual-element.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/motion.js","webpack://victor-cortes/./node_modules/framer-motion/dist/es/render/dom/utils/create-config.js","webpack://victor-cortes/./src/components/navigation/navigation.module.css","webpack://victor-cortes/./src/components/navigation/navigation.tsx","webpack://victor-cortes/./src/components/navigation/hamburgers.module.css","webpack://victor-cortes/./src/components/layout.js","webpack://victor-cortes/./src/components/global.module.css","webpack://victor-cortes/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"],"sourcesContent":["function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;","import memoize from '@emotion/memoize';\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\nexport default index;","var createDefinition = function createDefinition(propNames) {\n return {\n isEnabled: function isEnabled(props) {\n return propNames.some(function (name) {\n return !!props[name];\n });\n }\n };\n};\n\nvar featureDefinitions = {\n measureLayout: createDefinition([\"layout\", \"layoutId\", \"drag\", \"_layoutResetTransform\"]),\n animation: createDefinition([\"animate\", \"exit\", \"variants\", \"whileHover\", \"whileTap\", \"whileFocus\", \"whileDrag\"]),\n exit: createDefinition([\"exit\"]),\n drag: createDefinition([\"drag\", \"dragControls\"]),\n focus: createDefinition([\"whileFocus\"]),\n hover: createDefinition([\"whileHover\", \"onHoverStart\", \"onHoverEnd\"]),\n tap: createDefinition([\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"]),\n pan: createDefinition([\"onPan\", \"onPanStart\", \"onPanSessionStart\", \"onPanEnd\"]),\n layoutAnimation: createDefinition([\"layout\", \"layoutId\"])\n};\n\nfunction loadFeatures(features) {\n for (var key in features) {\n var Component = features[key];\n if (Component !== null) featureDefinitions[key].Component = Component;\n }\n}\n\nexport { featureDefinitions, loadFeatures };","import { createContext } from 'react';\nvar LazyContext = createContext({\n strict: false\n});\nexport { LazyContext };","import { __assign } from 'tslib';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { featureDefinitions } from './definitions.js';\nimport { invariant } from 'hey-listen';\nimport { LazyContext } from '../../context/LazyContext.js';\nvar featureNames = Object.keys(featureDefinitions);\nvar numFeatures = featureNames.length;\n/**\n * Load features via renderless components based on the provided MotionProps.\n */\n\nfunction useFeatures(props, visualElement, preloadedFeatures) {\n var features = [];\n var lazyContext = useContext(LazyContext);\n if (!visualElement) return null;\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n\n if (process.env.NODE_ENV !== \"production\" && preloadedFeatures && lazyContext.strict) {\n invariant(false, \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\");\n }\n\n for (var i = 0; i < numFeatures; i++) {\n var name_1 = featureNames[i];\n var _a = featureDefinitions[name_1],\n isEnabled = _a.isEnabled,\n Component = _a.Component;\n /**\n * It might be possible in the future to use this moment to\n * dynamically request functionality. In initial tests this\n * was producing a lot of duplication amongst bundles.\n */\n\n if (isEnabled(props) && Component) {\n features.push(React.createElement(Component, __assign({\n key: name_1\n }, props, {\n visualElement: visualElement\n })));\n }\n }\n\n return features;\n}\n\nexport { useFeatures };","import { createContext } from 'react';\n/**\n * @public\n */\n\nvar MotionConfigContext = createContext({\n transformPagePoint: function transformPagePoint(p) {\n return p;\n },\n isStatic: false\n});\nexport { MotionConfigContext };","import { useContext, createContext } from 'react';\nvar MotionContext = createContext({});\n\nfunction useVisualElementContext() {\n return useContext(MotionContext).visualElement;\n}\n\nexport { MotionContext, useVisualElementContext };","import { useContext, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.js';\nimport { useConstant } from '../../utils/use-constant.js';\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n * const [isPresent, safeToRemove] = usePresence()\n *\n * useEffect(() => {\n * !isPresent && setTimeout(safeToRemove, 1000)\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed the tree, but\n * `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\n\nfunction usePresence() {\n var context = useContext(PresenceContext);\n if (context === null) return [true, null];\n var isPresent = context.isPresent,\n onExitComplete = context.onExitComplete,\n register = context.register; // It's safe to call the following hooks conditionally (after an early return) because the context will always\n // either be null or non-null for the lifespan of the component.\n // Replace with useOpaqueId when released in React\n\n var id = useUniqueId();\n useEffect(function () {\n return register(id);\n }, []);\n\n var safeToRemove = function safeToRemove() {\n return onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete(id);\n };\n\n return !isPresent && onExitComplete ? [false, safeToRemove] : [true];\n}\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n * const isPresent = useIsPresent()\n *\n * useEffect(() => {\n * !isPresent && console.log(\"I've been removed!\")\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * @public\n */\n\n\nfunction useIsPresent() {\n return isPresent(useContext(PresenceContext));\n}\n\nfunction isPresent(context) {\n return context === null ? true : context.isPresent;\n}\n\nvar counter = 0;\n\nvar incrementId = function incrementId() {\n return counter++;\n};\n\nvar useUniqueId = function useUniqueId() {\n return useConstant(incrementId);\n};\n\nexport { isPresent, useIsPresent, usePresence };","import { createContext } from 'react';\n/**\n * @internal\n */\n\nvar LayoutGroupContext = createContext(null);\nexport { LayoutGroupContext };","var isBrowser = typeof window !== \"undefined\";\nexport { isBrowser };","import { useLayoutEffect, useEffect } from 'react';\nimport { isBrowser } from './is-browser.js';\nvar useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;\nexport { useIsomorphicLayoutEffect };","import { __assign } from 'tslib';\nimport { useContext, useRef, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.js';\nimport { isPresent } from '../../components/AnimatePresence/use-presence.js';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.js';\nimport { useVisualElementContext } from '../../context/MotionContext/index.js';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.js';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.js';\nimport { LazyContext } from '../../context/LazyContext.js';\n\nfunction useLayoutId(_a) {\n var layoutId = _a.layoutId;\n var layoutGroupId = useContext(LayoutGroupContext);\n return layoutGroupId && layoutId !== undefined ? layoutGroupId + \"-\" + layoutId : layoutId;\n}\n\nfunction useVisualElement(Component, visualState, props, createVisualElement) {\n var config = useContext(MotionConfigContext);\n var lazyContext = useContext(LazyContext);\n var parent = useVisualElementContext();\n var presenceContext = useContext(PresenceContext);\n var layoutId = useLayoutId(props);\n var visualElementRef = useRef(undefined);\n /**\n * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n */\n\n if (!createVisualElement) createVisualElement = lazyContext.renderer;\n\n if (!visualElementRef.current && createVisualElement) {\n visualElementRef.current = createVisualElement(Component, {\n visualState: visualState,\n parent: parent,\n props: __assign(__assign({}, props), {\n layoutId: layoutId\n }),\n presenceId: presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.id,\n blockInitialAnimation: (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false\n });\n }\n\n var visualElement = visualElementRef.current;\n useIsomorphicLayoutEffect(function () {\n if (!visualElement) return;\n visualElement.setProps(__assign(__assign(__assign({}, config), props), {\n layoutId: layoutId\n }));\n visualElement.isPresent = isPresent(presenceContext);\n visualElement.isPresenceRoot = !parent || parent.presenceId !== (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.id);\n /**\n * Fire a render to ensure the latest state is reflected on-screen.\n */\n\n visualElement.syncRender();\n });\n useEffect(function () {\n var _a;\n\n if (!visualElement) return;\n /**\n * In a future refactor we can replace the features-as-components and\n * have this loop through them all firing \"effect\" listeners\n */\n\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.animateChanges();\n });\n useIsomorphicLayoutEffect(function () {\n return function () {\n return visualElement === null || visualElement === void 0 ? void 0 : visualElement.notifyUnmount();\n };\n }, []);\n return visualElement;\n}\n\nexport { useVisualElement };","function isRefObject(ref) {\n return typeof ref === \"object\" && Object.prototype.hasOwnProperty.call(ref, \"current\");\n}\n\nexport { isRefObject };","/**\n * Decides if the supplied variable is an array of variant labels\n */\nfunction isVariantLabels(v) {\n return Array.isArray(v);\n}\n/**\n * Decides if the supplied variable is variant label\n */\n\n\nfunction isVariantLabel(v) {\n return typeof v === \"string\" || isVariantLabels(v);\n}\n/**\n * Creates an object containing the latest state of every MotionValue on a VisualElement\n */\n\n\nfunction getCurrent(visualElement) {\n var current = {};\n visualElement.forEachValue(function (value, key) {\n return current[key] = value.get();\n });\n return current;\n}\n/**\n * Creates an object containing the latest velocity of every MotionValue on a VisualElement\n */\n\n\nfunction getVelocity(visualElement) {\n var velocity = {};\n visualElement.forEachValue(function (value, key) {\n return velocity[key] = value.getVelocity();\n });\n return velocity;\n}\n\nfunction resolveVariantFromProps(props, definition, custom, currentValues, currentVelocity) {\n var _a;\n\n if (currentValues === void 0) {\n currentValues = {};\n }\n\n if (currentVelocity === void 0) {\n currentVelocity = {};\n }\n\n if (typeof definition === \"string\") {\n definition = (_a = props.variants) === null || _a === void 0 ? void 0 : _a[definition];\n }\n\n return typeof definition === \"function\" ? definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity) : definition;\n}\n\nfunction resolveVariant(visualElement, definition, custom) {\n var props = visualElement.getProps();\n return resolveVariantFromProps(props, definition, custom !== null && custom !== void 0 ? custom : props.custom, getCurrent(visualElement), getVelocity(visualElement));\n}\n\nfunction checkIfControllingVariants(props) {\n var _a;\n\n return typeof ((_a = props.animate) === null || _a === void 0 ? void 0 : _a.start) === \"function\" || isVariantLabel(props.initial) || isVariantLabel(props.animate) || isVariantLabel(props.whileHover) || isVariantLabel(props.whileDrag) || isVariantLabel(props.whileTap) || isVariantLabel(props.whileFocus) || isVariantLabel(props.exit);\n}\n\nfunction checkIfVariantNode(props) {\n return Boolean(checkIfControllingVariants(props) || props.variants);\n}\n\nexport { checkIfControllingVariants, checkIfVariantNode, isVariantLabel, isVariantLabels, resolveVariant, resolveVariantFromProps };","import { useMemo, useContext } from 'react';\nimport { MotionContext } from './index.js';\nimport { getCurrentTreeVariants } from './utils.js';\n\nfunction useCreateMotionContext(props, isStatic) {\n var _a = getCurrentTreeVariants(props, useContext(MotionContext)),\n initial = _a.initial,\n animate = _a.animate;\n\n return useMemo(function () {\n return {\n initial: initial,\n animate: animate\n };\n },\n /**\n * Only break memoisation in static mode\n */\n isStatic ? [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)] : []);\n}\n\nfunction variantLabelsAsDependency(prop) {\n return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\n\nexport { useCreateMotionContext };","import { checkIfControllingVariants, isVariantLabel } from '../../render/utils/variants.js';\n\nfunction getCurrentTreeVariants(props, context) {\n if (checkIfControllingVariants(props)) {\n var initial = props.initial,\n animate = props.animate;\n return {\n initial: initial === false || isVariantLabel(initial) ? initial : undefined,\n animate: isVariantLabel(animate) ? animate : undefined\n };\n }\n\n return props.inherit !== false ? context : {};\n}\n\nexport { getCurrentTreeVariants };","import * as React from 'react';\nimport { forwardRef, useContext } from 'react';\nimport { useFeatures } from './features/use-features.js';\nimport { MotionConfigContext } from '../context/MotionConfigContext.js';\nimport { MotionContext } from '../context/MotionContext/index.js';\nimport { useVisualElement } from './utils/use-visual-element.js';\nimport { useMotionRef } from './utils/use-motion-ref.js';\nimport { useCreateMotionContext } from '../context/MotionContext/create.js';\nimport { loadFeatures } from './features/definitions.js';\nimport { isBrowser } from '../utils/is-browser.js';\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n *\n * @internal\n */\n\nfunction createMotionComponent(_a) {\n var preloadedFeatures = _a.preloadedFeatures,\n createVisualElement = _a.createVisualElement,\n useRender = _a.useRender,\n useVisualState = _a.useVisualState,\n Component = _a.Component;\n preloadedFeatures && loadFeatures(preloadedFeatures);\n\n function MotionComponent(props, externalRef) {\n /**\n * If we're rendering in a static environment, we only visually update the component\n * as a result of a React-rerender rather than interactions or animations. This\n * means we don't need to load additional memory structures like VisualElement,\n * or any gesture/animation features.\n */\n var isStatic = useContext(MotionConfigContext).isStatic;\n var features = null;\n /**\n * Create the tree context. This is memoized and will only trigger renders\n * when the current tree variant changes in static mode.\n */\n\n var context = useCreateMotionContext(props, isStatic);\n /**\n *\n */\n\n var visualState = useVisualState(props, isStatic);\n\n if (!isStatic && isBrowser) {\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(Component, visualState, props, createVisualElement);\n /**\n * Load Motion gesture and animation features. These are rendered as renderless\n * components so each feature can optionally make use of React lifecycle methods.\n *\n * TODO: The intention is to move these away from a React-centric to a\n * VisualElement-centric lifecycle scheme.\n */\n\n features = useFeatures(props, context.visualElement, preloadedFeatures);\n }\n /**\n * The mount order and hierarchy is specific to ensure our element ref\n * is hydrated by the time features fire their effects.\n */\n\n\n return React.createElement(React.Fragment, null, React.createElement(MotionContext.Provider, {\n value: context\n }, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic)), features);\n }\n\n return forwardRef(MotionComponent);\n}\n\nexport { createMotionComponent };","import { useCallback } from 'react';\nimport { isRefObject } from '../../utils/is-ref-object.js';\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\n\nfunction useMotionRef(visualState, visualElement, externalRef) {\n return useCallback(function (instance) {\n var _a;\n\n instance && ((_a = visualState.mount) === null || _a === void 0 ? void 0 : _a.call(visualState, instance));\n\n if (visualElement) {\n instance ? visualElement.mount(instance) : visualElement.unmount();\n }\n\n if (externalRef) {\n if (typeof externalRef === \"function\") {\n externalRef(instance);\n } else if (isRefObject(externalRef)) {\n externalRef.current = instance;\n }\n }\n },\n /**\n * Only pass a new ref callback to React if we've received a visual element\n * factory. Otherwise we'll be mounting/remounting every time externalRef\n * or other dependencies change.\n */\n [visualElement]);\n}\n\nexport { useMotionRef };","import { createMotionComponent } from '../../motion/index.js';\n/**\n * Convert any React component into a `motion` component. The provided component\n * **must** use `React.forwardRef` to the underlying DOM component you want to animate.\n *\n * ```jsx\n * const Component = React.forwardRef((props, ref) => {\n * return <div ref={ref} />\n * })\n *\n * const MotionComponent = motion(Component)\n * ```\n *\n * @public\n */\n\nfunction createMotionProxy(createConfig) {\n function custom(Component, customMotionComponentConfig) {\n if (customMotionComponentConfig === void 0) {\n customMotionComponentConfig = {};\n }\n\n return createMotionComponent(createConfig(Component, customMotionComponentConfig));\n }\n /**\n * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.\n * Rather than generating them anew every render.\n */\n\n\n var componentCache = new Map();\n return new Proxy(custom, {\n /**\n * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.\n * The prop name is passed through as `key` and we can use that to generate a `motion`\n * DOM component with that name.\n */\n get: function get(_target, key) {\n /**\n * If this element doesn't exist in the component cache, create it and cache.\n */\n if (!componentCache.has(key)) {\n componentCache.set(key, custom(key));\n }\n\n return componentCache.get(key);\n }\n });\n}\n\nexport { createMotionProxy };","/**\n * We keep these listed seperately as we use the lowercase tag names as part\n * of the runtime bundle to detect SVG components\n */\nvar lowercaseSVGElements = [\"animate\", \"circle\", \"defs\", \"desc\", \"ellipse\", \"g\", \"image\", \"line\", \"filter\", \"marker\", \"mask\", \"metadata\", \"path\", \"pattern\", \"polygon\", \"polyline\", \"rect\", \"stop\", \"svg\", \"switch\", \"symbol\", \"text\", \"tspan\", \"use\", \"view\"];\nexport { lowercaseSVGElements };","import { lowercaseSVGElements } from '../../svg/lowercase-elements.js';\n\nfunction isSVGComponent(Component) {\n if (\n /**\n * If it's not a string, it's a custom React component. Currently we only support\n * HTML custom React components.\n */\n typeof Component !== \"string\" ||\n /**\n * If it contains a dash, the element is a custom HTML webcomponent.\n */\n Component.includes(\"-\")) {\n return false;\n } else if (\n /**\n * If it's in our list of lowercase SVG tags, it's an SVG component\n */\n lowercaseSVGElements.indexOf(Component) > -1 ||\n /**\n * If it contains a capital letter, it's an SVG component\n */\n /[A-Z]/.test(Component)) {\n return true;\n }\n\n return false;\n}\n\nexport { isSVGComponent };","var valueScaleCorrection = {};\n/**\n * @internal\n */\n\nfunction addScaleCorrection(correctors) {\n for (var key in correctors) {\n valueScaleCorrection[key] = correctors[key];\n }\n}\n\nexport { addScaleCorrection, valueScaleCorrection };","/**\n * A list of all transformable axes. We'll use this list to generated a version\n * of each axes for each transform.\n */\nvar transformAxes = [\"\", \"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\nvar order = [\"translate\", \"scale\", \"rotate\", \"skew\"];\n/**\n * Generate a list of every possible transform key.\n */\n\nvar transformProps = [\"transformPerspective\", \"x\", \"y\", \"z\"];\norder.forEach(function (operationKey) {\n return transformAxes.forEach(function (axesKey) {\n return transformProps.push(operationKey + axesKey);\n });\n});\n/**\n * A function to use with Array.sort to sort transform keys by their default order.\n */\n\nfunction sortTransformProps(a, b) {\n return transformProps.indexOf(a) - transformProps.indexOf(b);\n}\n/**\n * A quick lookup for transform props.\n */\n\n\nvar transformPropSet = new Set(transformProps);\n\nfunction isTransformProp(key) {\n return transformPropSet.has(key);\n}\n/**\n * A quick lookup for transform origin props\n */\n\n\nvar transformOriginProps = new Set([\"originX\", \"originY\", \"originZ\"]);\n\nfunction isTransformOriginProp(key) {\n return transformOriginProps.has(key);\n}\n\nexport { isTransformOriginProp, isTransformProp, sortTransformProps, transformAxes, transformProps };","import { valueScaleCorrection } from '../../render/dom/projection/scale-correction.js';\nimport { isTransformProp, isTransformOriginProp } from '../../render/html/utils/transform.js';\n\nfunction isForcedMotionValue(key, _a) {\n var layout = _a.layout,\n layoutId = _a.layoutId;\n return isTransformProp(key) || isTransformOriginProp(key) || (layout || layoutId !== undefined) && (!!valueScaleCorrection[key] || key === \"opacity\");\n}\n\nexport { isForcedMotionValue };","var isMotionValue = function isMotionValue(value) {\n return value !== null && typeof value === \"object\" && value.getVelocity;\n};\n\nexport { isMotionValue };","import { sortTransformProps } from './transform.js';\nvar translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\"\n};\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\n\nfunction buildTransform(_a, _b, transformIsDefault, transformTemplate) {\n var transform = _a.transform,\n transformKeys = _a.transformKeys;\n var _c = _b.enableHardwareAcceleration,\n enableHardwareAcceleration = _c === void 0 ? true : _c,\n _d = _b.allowTransformNone,\n allowTransformNone = _d === void 0 ? true : _d; // The transform string we're going to build into.\n\n var transformString = \"\"; // Transform keys into their default order - this will determine the output order.\n\n transformKeys.sort(sortTransformProps); // Track whether the defined transform has a defined z so we don't add a\n // second to enable hardware acceleration\n\n var transformHasZ = false; // Loop over each transform and build them into transformString\n\n var numTransformKeys = transformKeys.length;\n\n for (var i = 0; i < numTransformKeys; i++) {\n var key = transformKeys[i];\n transformString += (translateAlias[key] || key) + \"(\" + transform[key] + \") \";\n if (key === \"z\") transformHasZ = true;\n }\n\n if (!transformHasZ && enableHardwareAcceleration) {\n transformString += \"translateZ(0)\";\n } else {\n transformString = transformString.trim();\n } // If we have a custom `transform` template, pass our transform values and\n // generated transformString to that before returning\n\n\n if (transformTemplate) {\n transformString = transformTemplate(transform, transformIsDefault ? \"\" : transformString);\n } else if (allowTransformNone && transformIsDefault) {\n transformString = \"none\";\n }\n\n return transformString;\n}\n/**\n * Build a transformOrigin style. Uses the same defaults as the browser for\n * undefined origins.\n */\n\n\nfunction buildTransformOrigin(_a) {\n var _b = _a.originX,\n originX = _b === void 0 ? \"50%\" : _b,\n _c = _a.originY,\n originY = _c === void 0 ? \"50%\" : _c,\n _d = _a.originZ,\n originZ = _d === void 0 ? 0 : _d;\n return originX + \" \" + originY + \" \" + originZ;\n}\n\nexport { buildTransform, buildTransformOrigin };","/**\n * Returns true if the provided key is a CSS variable\n */\nfunction isCSSVariable(key) {\n return key.startsWith(\"--\");\n}\n\nexport { isCSSVariable };","/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nvar getValueAsType = function getValueAsType(value, type) {\n return type && typeof value === \"number\" ? type.transform(value) : value;\n};\n\nexport { getValueAsType };","/*! *****************************************************************************\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***************************************************************************** */\n\n/* global Reflect, Promise */\nvar _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nvar _assign = function __assign() {\n _assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return _assign.apply(this, arguments);\n};\n\nexport { _assign as __assign };\nexport function __rest(s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\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}\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {\n if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n }\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nexport function __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nexport function __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n\n while (_) {\n try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n\n case 7:\n op = _.ops.pop();\n\n _.trys.pop();\n\n continue;\n\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n\n if (t && _.label < t[2]) {\n _.label = t[2];\n\n _.ops.push(op);\n\n break;\n }\n\n if (t[2]) _.ops.pop();\n\n _.trys.pop();\n\n continue;\n }\n\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n }\n\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nexport var __createBinding = Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n};\nexport function __exportStar(m, o) {\n for (var p in m) {\n if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n }\n}\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function next() {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {\n ar.push(r.value);\n }\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n\n return ar;\n}\n/** @deprecated */\n\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) {\n ar = ar.concat(__read(arguments[i]));\n }\n\n return ar;\n}\n/** @deprecated */\n\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) {\n s += arguments[i].length;\n }\n\n for (var r = Array(s), k = 0, i = 0; i < il; i++) {\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {\n r[k] = a[j];\n }\n }\n\n return r;\n}\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\n });\n };\n }\n\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n\n function step(r) {\n r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n\n function fulfill(value) {\n resume(\"next\", value);\n }\n\n function reject(value) {\n resume(\"throw\", value);\n }\n\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function () {\n return this;\n }, i;\n\n function verb(n, f) {\n i[n] = o[n] ? function (v) {\n return (p = !p) ? {\n value: __await(o[n](v)),\n done: n === \"return\"\n } : f ? f(v) : v;\n } : f;\n }\n}\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i);\n\n function verb(n) {\n i[n] = o[n] && function (v) {\n return new Promise(function (resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function (v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n\n return cooked;\n}\n;\n\nvar __setModuleDefault = Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n}\nexport function __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;\n}","var clamp = function clamp(min, max) {\n return function (v) {\n return Math.max(Math.min(v, max), min);\n };\n};\n\nvar sanitize = function sanitize(v) {\n return v % 1 ? Number(v.toFixed(5)) : v;\n};\n\nvar floatRegex = /(-)?([\\d]*\\.?[\\d])+/g;\nvar colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2,3}\\s*\\/*\\s*[\\d\\.]+%?\\))/gi;\nvar singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2,3}\\s*\\/*\\s*[\\d\\.]+%?\\))$/i;\n\nfunction isString(v) {\n return typeof v === 'string';\n}\n\nexport { clamp, colorRegex, floatRegex, isString, sanitize, singleColorRegex };","import { __assign } from 'tslib';\nimport { isString } from '../utils.js';\n\nvar createUnitType = function createUnitType(unit) {\n return {\n test: function test(v) {\n return isString(v) && v.endsWith(unit) && v.split(' ').length === 1;\n },\n parse: parseFloat,\n transform: function transform(v) {\n return \"\" + v + unit;\n }\n };\n};\n\nvar degrees = createUnitType('deg');\nvar percent = createUnitType('%');\nvar px = createUnitType('px');\nvar vh = createUnitType('vh');\nvar vw = createUnitType('vw');\n\nvar progressPercentage = __assign(__assign({}, percent), {\n parse: function parse(v) {\n return percent.parse(v) / 100;\n },\n transform: function transform(v) {\n return percent.transform(v * 100);\n }\n});\n\nexport { degrees, percent, progressPercentage, px, vh, vw };","import { __assign } from 'tslib';\nimport { clamp } from '../utils.js';\nvar number = {\n test: function test(v) {\n return typeof v === 'number';\n },\n parse: parseFloat,\n transform: function transform(v) {\n return v;\n }\n};\n\nvar alpha = __assign(__assign({}, number), {\n transform: clamp(0, 1)\n});\n\nvar scale = __assign(__assign({}, number), {\n default: 1\n});\n\nexport { alpha, number, scale };","import { __assign } from 'tslib';\nimport { number } from 'style-value-types';\n\nvar int = __assign(__assign({}, number), {\n transform: Math.round\n});\n\nexport { int };","import { px, degrees, scale, alpha, progressPercentage } from 'style-value-types';\nimport { int } from './type-int.js';\nvar numberValueTypes = {\n // Border props\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n radius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n // Positioning props\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n size: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n // Transform props\n rotate: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale: scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n transformPerspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n // Misc\n zIndex: int,\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int\n};\nexport { numberValueTypes };","import { valueScaleCorrection } from '../../dom/projection/scale-correction.js';\nimport { buildTransform, buildTransformOrigin } from './build-transform.js';\nimport { isCSSVariable } from '../../dom/utils/is-css-variable.js';\nimport { isTransformProp, isTransformOriginProp } from './transform.js';\nimport { getValueAsType } from '../../dom/value-types/get-as-type.js';\nimport { numberValueTypes } from '../../dom/value-types/number.js';\n\nfunction buildHTMLStyles(state, latestValues, projection, layoutState, options, transformTemplate, buildProjectionTransform, buildProjectionTransformOrigin) {\n var _a;\n\n var style = state.style,\n vars = state.vars,\n transform = state.transform,\n transformKeys = state.transformKeys,\n transformOrigin = state.transformOrigin; // Empty the transformKeys array. As we're throwing out refs to its items\n // this might not be as cheap as suspected. Maybe using the array as a buffer\n // with a manual incrementation would be better.\n\n transformKeys.length = 0; // Track whether we encounter any transform or transformOrigin values.\n\n var hasTransform = false;\n var hasTransformOrigin = false; // Does the calculated transform essentially equal \"none\"?\n\n var transformIsNone = true;\n /**\n * Loop over all our latest animated values and decide whether to handle them\n * as a style or CSS variable.\n *\n * Transforms and transform origins are kept seperately for further processing.\n */\n\n for (var key in latestValues) {\n var value = latestValues[key];\n /**\n * If this is a CSS variable we don't do any further processing.\n */\n\n if (isCSSVariable(key)) {\n vars[key] = value;\n continue;\n } // Convert the value to its default value type, ie 0 -> \"0px\"\n\n\n var valueType = numberValueTypes[key];\n var valueAsType = getValueAsType(value, valueType);\n\n if (isTransformProp(key)) {\n // If this is a transform, flag to enable further transform processing\n hasTransform = true;\n transform[key] = valueAsType;\n transformKeys.push(key); // If we already know we have a non-default transform, early return\n\n if (!transformIsNone) continue; // Otherwise check to see if this is a default transform\n\n if (value !== ((_a = valueType.default) !== null && _a !== void 0 ? _a : 0)) transformIsNone = false;\n } else if (isTransformOriginProp(key)) {\n transformOrigin[key] = valueAsType; // If this is a transform origin, flag and enable further transform-origin processing\n\n hasTransformOrigin = true;\n } else {\n /**\n * If layout projection is on, and we need to perform scale correction for this\n * value type, perform it.\n */\n if ((projection === null || projection === void 0 ? void 0 : projection.isHydrated) && (layoutState === null || layoutState === void 0 ? void 0 : layoutState.isHydrated) && valueScaleCorrection[key]) {\n var correctedValue = valueScaleCorrection[key].process(value, layoutState, projection);\n /**\n * Scale-correctable values can define a number of other values to break\n * down into. For instance borderRadius needs applying to borderBottomLeftRadius etc\n */\n\n var applyTo = valueScaleCorrection[key].applyTo;\n\n if (applyTo) {\n var num = applyTo.length;\n\n for (var i = 0; i < num; i++) {\n style[applyTo[i]] = correctedValue;\n }\n } else {\n style[key] = correctedValue;\n }\n } else {\n style[key] = valueAsType;\n }\n }\n }\n\n if (layoutState && projection && buildProjectionTransform && buildProjectionTransformOrigin) {\n style.transform = buildProjectionTransform(layoutState.deltaFinal, layoutState.treeScale, hasTransform ? transform : undefined);\n\n if (transformTemplate) {\n style.transform = transformTemplate(transform, style.transform);\n }\n\n style.transformOrigin = buildProjectionTransformOrigin(layoutState);\n } else {\n if (hasTransform) {\n style.transform = buildTransform(state, options, transformIsNone, transformTemplate);\n }\n\n if (hasTransformOrigin) {\n style.transformOrigin = buildTransformOrigin(transformOrigin);\n }\n }\n}\n\nexport { buildHTMLStyles };","var createHtmlRenderState = function createHtmlRenderState() {\n return {\n style: {},\n transform: {},\n transformKeys: [],\n transformOrigin: {},\n vars: {}\n };\n};\n\nexport { createHtmlRenderState };","import { __assign } from 'tslib';\nimport { useMemo } from 'react';\nimport { isForcedMotionValue } from '../../motion/utils/is-forced-motion-value.js';\nimport { isMotionValue } from '../../value/utils/is-motion-value.js';\nimport { buildHTMLStyles } from './utils/build-styles.js';\nimport { createHtmlRenderState } from './utils/create-render-state.js';\n\nfunction copyRawValuesOnly(target, source, props) {\n for (var key in source) {\n if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n target[key] = source[key];\n }\n }\n}\n\nfunction useInitialMotionValues(_a, visualState, isStatic) {\n var transformTemplate = _a.transformTemplate;\n return useMemo(function () {\n var state = createHtmlRenderState();\n buildHTMLStyles(state, visualState, undefined, undefined, {\n enableHardwareAcceleration: !isStatic\n }, transformTemplate);\n var vars = state.vars,\n style = state.style;\n return __assign(__assign({}, vars), style);\n }, [visualState]);\n}\n\nfunction useStyle(props, visualState, isStatic) {\n var styleProp = props.style || {};\n var style = {};\n /**\n * Copy non-Motion Values straight into style\n */\n\n copyRawValuesOnly(style, styleProp, props);\n Object.assign(style, useInitialMotionValues(props, visualState, isStatic));\n\n if (props.transformValues) {\n style = props.transformValues(style);\n }\n\n return style;\n}\n\nfunction useHTMLProps(props, visualState, isStatic) {\n // The `any` isn't ideal but it is the type of createElement props argument\n var htmlProps = {};\n var style = useStyle(props, visualState, isStatic);\n\n if (Boolean(props.drag)) {\n // Disable the ghost element when a user drags\n htmlProps.draggable = false; // Disable text selection\n\n style.userSelect = style.WebkitUserSelect = style.WebkitTouchCallout = \"none\"; // Disable scrolling on the draggable direction\n\n style.touchAction = props.drag === true ? \"none\" : \"pan-\" + (props.drag === \"x\" ? \"y\" : \"x\");\n }\n\n htmlProps.style = style;\n return htmlProps;\n}\n\nexport { copyRawValuesOnly, useHTMLProps, useStyle };","/**\n * A list of all valid MotionProps.\n *\n * @internalremarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nvar validMotionProps = new Set([\"initial\", \"animate\", \"exit\", \"style\", \"variants\", \"transition\", \"transformTemplate\", \"transformValues\", \"custom\", \"inherit\", \"layout\", \"layoutId\", \"_layoutResetTransform\", \"onLayoutAnimationComplete\", \"onViewportBoxUpdate\", \"onLayoutMeasure\", \"onBeforeLayoutMeasure\", \"onAnimationStart\", \"onAnimationComplete\", \"onUpdate\", \"onDragStart\", \"onDrag\", \"onDragEnd\", \"onMeasureDragConstraints\", \"onDirectionLock\", \"onDragTransitionEnd\", \"drag\", \"dragControls\", \"dragListener\", \"dragConstraints\", \"dragDirectionLock\", \"_dragX\", \"_dragY\", \"dragElastic\", \"dragMomentum\", \"dragPropagation\", \"dragTransition\", \"whileDrag\", \"onPan\", \"onPanStart\", \"onPanEnd\", \"onPanSessionStart\", \"onTap\", \"onTapStart\", \"onTapCancel\", \"onHoverStart\", \"onHoverEnd\", \"whileFocus\", \"whileTap\", \"whileHover\"]);\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\n\nfunction isValidMotionProp(key) {\n return validMotionProps.has(key);\n}\n\nexport { isValidMotionProp };","import { isValidMotionProp } from '../../../motion/utils/valid-prop.js';\n\nvar shouldForward = function shouldForward(key) {\n return !isValidMotionProp(key);\n};\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\n\n\ntry {\n var emotionIsPropValid_1 = require(\"@emotion/is-prop-valid\").default;\n\n shouldForward = function shouldForward(key) {\n // Handle events explicitly as Emotion validates them all as true\n if (key.startsWith(\"on\")) {\n return !isValidMotionProp(key);\n } else {\n return emotionIsPropValid_1(key);\n }\n };\n} catch (_a) {// We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\n\nfunction filterProps(props, isDom, forwardMotionProps) {\n var filteredProps = {};\n\n for (var key in props) {\n if (shouldForward(key) || forwardMotionProps === true && isValidMotionProp(key) || !isDom && !isValidMotionProp(key)) {\n filteredProps[key] = props[key];\n }\n }\n\n return filteredProps;\n}\n\nexport { filterProps };","import { px } from 'style-value-types';\n\nfunction calcOrigin(origin, offset, size) {\n return typeof origin === \"string\" ? origin : px.transform(offset + size * origin);\n}\n/**\n * The SVG transform origin defaults are different to CSS and is less intuitive,\n * so we use the measured dimensions of the SVG to reconcile these.\n */\n\n\nfunction calcSVGTransformOrigin(dimensions, originX, originY) {\n var pxOriginX = calcOrigin(originX, dimensions.x, dimensions.width);\n var pxOriginY = calcOrigin(originY, dimensions.y, dimensions.height);\n return pxOriginX + \" \" + pxOriginY;\n}\n\nexport { calcSVGTransformOrigin };","import { px } from 'style-value-types'; // Convert a progress 0-1 to a pixels value based on the provided length\n\nvar progressToPixels = function progressToPixels(progress, length) {\n return px.transform(progress * length);\n};\n\nvar dashKeys = {\n offset: \"stroke-dashoffset\",\n array: \"stroke-dasharray\"\n};\nvar camelKeys = {\n offset: \"strokeDashoffset\",\n array: \"strokeDasharray\"\n};\n/**\n * Build SVG path properties. Uses the path's measured length to convert\n * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset\n * and stroke-dasharray attributes.\n *\n * This function is mutative to reduce per-frame GC.\n */\n\nfunction buildSVGPath(attrs, totalLength, length, spacing, offset, useDashCase) {\n if (spacing === void 0) {\n spacing = 1;\n }\n\n if (offset === void 0) {\n offset = 0;\n }\n\n if (useDashCase === void 0) {\n useDashCase = true;\n } // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n\n\n var keys = useDashCase ? dashKeys : camelKeys; // Build the dash offset\n\n attrs[keys.offset] = progressToPixels(-offset, totalLength); // Build the dash array\n\n var pathLength = progressToPixels(length, totalLength);\n var pathSpacing = progressToPixels(spacing, totalLength);\n attrs[keys.array] = pathLength + \" \" + pathSpacing;\n}\n\nexport { buildSVGPath };","import { __rest } from 'tslib';\nimport { buildHTMLStyles } from '../../html/utils/build-styles.js';\nimport { calcSVGTransformOrigin } from './transform-origin.js';\nimport { buildSVGPath } from './path.js';\n/**\n * Build SVG visual attrbutes, like cx and style.transform\n */\n\nfunction buildSVGAttrs(state, _a, projection, layoutState, options, transformTemplate, buildProjectionTransform, buildProjectionTransformOrigin) {\n var attrX = _a.attrX,\n attrY = _a.attrY,\n originX = _a.originX,\n originY = _a.originY,\n pathLength = _a.pathLength,\n _b = _a.pathSpacing,\n pathSpacing = _b === void 0 ? 1 : _b,\n _c = _a.pathOffset,\n pathOffset = _c === void 0 ? 0 : _c,\n // This is object creation, which we try to avoid per-frame.\n latest = __rest(_a, [\"attrX\", \"attrY\", \"originX\", \"originY\", \"pathLength\", \"pathSpacing\", \"pathOffset\"]);\n\n buildHTMLStyles(state, latest, projection, layoutState, options, transformTemplate, buildProjectionTransform, buildProjectionTransformOrigin);\n state.attrs = state.style;\n state.style = {};\n var attrs = state.attrs,\n style = state.style,\n dimensions = state.dimensions,\n totalPathLength = state.totalPathLength;\n /**\n * However, we apply transforms as CSS transforms. So if we detect a transform we take it from attrs\n * and copy it into style.\n */\n\n if (attrs.transform) {\n if (dimensions) style.transform = attrs.transform;\n delete attrs.transform;\n } // Parse transformOrigin\n\n\n if (dimensions && (originX !== undefined || originY !== undefined || style.transform)) {\n style.transformOrigin = calcSVGTransformOrigin(dimensions, originX !== undefined ? originX : 0.5, originY !== undefined ? originY : 0.5);\n } // Treat x/y not as shortcuts but as actual attributes\n\n\n if (attrX !== undefined) attrs.x = attrX;\n if (attrY !== undefined) attrs.y = attrY; // Build SVG path if one has been measured\n\n if (totalPathLength !== undefined && pathLength !== undefined) {\n buildSVGPath(attrs, totalPathLength, pathLength, pathSpacing, pathOffset, false);\n }\n}\n\nexport { buildSVGAttrs };","import { __assign } from 'tslib';\nimport { createHtmlRenderState } from '../../html/utils/create-render-state.js';\n\nvar createSvgRenderState = function createSvgRenderState() {\n return __assign(__assign({}, createHtmlRenderState()), {\n attrs: {}\n });\n};\n\nexport { createSvgRenderState };","import { __assign } from 'tslib';\nimport { useMemo } from 'react';\nimport { copyRawValuesOnly } from '../html/use-props.js';\nimport { buildSVGAttrs } from './utils/build-attrs.js';\nimport { createSvgRenderState } from './utils/create-render-state.js';\n\nfunction useSVGProps(props, visualState) {\n var visualProps = useMemo(function () {\n var state = createSvgRenderState();\n buildSVGAttrs(state, visualState, undefined, undefined, {\n enableHardwareAcceleration: false\n }, props.transformTemplate);\n return __assign(__assign({}, state.attrs), {\n style: __assign({}, state.style)\n });\n }, [visualState]);\n\n if (props.style) {\n var rawStyles = {};\n copyRawValuesOnly(rawStyles, props.style, props);\n visualProps.style = __assign(__assign({}, rawStyles), visualProps.style);\n }\n\n return visualProps;\n}\n\nexport { useSVGProps };","import { __assign } from 'tslib';\nimport { createElement } from 'react';\nimport { useHTMLProps } from '../html/use-props.js';\nimport { filterProps } from './utils/filter-props.js';\nimport { isSVGComponent } from './utils/is-svg-component.js';\nimport { useSVGProps } from '../svg/use-props.js';\n\nfunction createUseRender(forwardMotionProps) {\n if (forwardMotionProps === void 0) {\n forwardMotionProps = false;\n }\n\n var useRender = function useRender(Component, props, ref, _a, isStatic) {\n var latestValues = _a.latestValues;\n var useVisualProps = isSVGComponent(Component) ? useSVGProps : useHTMLProps;\n var visualProps = useVisualProps(props, latestValues, isStatic);\n var filteredProps = filterProps(props, typeof Component === \"string\", forwardMotionProps);\n\n var elementProps = __assign(__assign(__assign({}, filteredProps), visualProps), {\n ref: ref\n });\n\n return createElement(Component, elementProps);\n };\n\n return useRender;\n}\n\nexport { createUseRender };","var CAMEL_CASE_PATTERN = /([a-z])([A-Z])/g;\nvar REPLACE_TEMPLATE = \"$1-$2\";\n/**\n * Convert camelCase to dash-case properties.\n */\n\nvar camelToDash = function camelToDash(str) {\n return str.replace(CAMEL_CASE_PATTERN, REPLACE_TEMPLATE).toLowerCase();\n};\n\nexport { camelToDash };","function renderHTML(element, _a) {\n var style = _a.style,\n vars = _a.vars; // Directly assign style into the Element's style prop. In tests Object.assign is the\n // fastest way to assign styles.\n\n Object.assign(element.style, style); // Loop over any CSS variables and assign those.\n\n for (var key in vars) {\n element.style.setProperty(key, vars[key]);\n }\n}\n\nexport { renderHTML };","/**\n * A set of attribute names that are always read/written as camel case.\n */\nvar camelCaseAttributes = new Set([\"baseFrequency\", \"diffuseConstant\", \"kernelMatrix\", \"kernelUnitLength\", \"keySplines\", \"keyTimes\", \"limitingConeAngle\", \"markerHeight\", \"markerWidth\", \"numOctaves\", \"targetX\", \"targetY\", \"surfaceScale\", \"specularConstant\", \"specularExponent\", \"stdDeviation\", \"tableValues\", \"viewBox\", \"gradientTransform\"]);\nexport { camelCaseAttributes };","import { camelToDash } from '../../dom/utils/camel-to-dash.js';\nimport { renderHTML } from '../../html/utils/render.js';\nimport { camelCaseAttributes } from './camel-case-attrs.js';\n\nfunction renderSVG(element, renderState) {\n renderHTML(element, renderState);\n\n for (var key in renderState.attrs) {\n element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);\n }\n}\n\nexport { renderSVG };","import { isForcedMotionValue } from '../../../motion/utils/is-forced-motion-value.js';\nimport { isMotionValue } from '../../../value/utils/is-motion-value.js';\n\nfunction scrapeMotionValuesFromProps(props) {\n var style = props.style;\n var newValues = {};\n\n for (var key in style) {\n if (isMotionValue(style[key]) || isForcedMotionValue(key, props)) {\n newValues[key] = style[key];\n }\n }\n\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };","import { isMotionValue } from '../../../value/utils/is-motion-value.js';\nimport { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.js';\n\nfunction scrapeMotionValuesFromProps(props) {\n var newValues = scrapeMotionValuesFromProps$1(props);\n\n for (var key in props) {\n if (isMotionValue(props[key])) {\n var targetKey = key === \"x\" || key === \"y\" ? \"attr\" + key.toUpperCase() : key;\n newValues[targetKey] = props[key];\n }\n }\n\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };","function isAnimationControls(v) {\n return typeof v === \"object\" && typeof v.start === \"function\";\n}\n\nexport { isAnimationControls };","var isKeyframesTarget = function isKeyframesTarget(v) {\n return Array.isArray(v);\n};\n\nexport { isKeyframesTarget };","import { isCustomValue } from '../../utils/resolve-value.js';\nimport { isMotionValue } from './is-motion-value.js';\n/**\n * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself\n *\n * TODO: Remove and move to library\n *\n * @internal\n */\n\nfunction resolveMotionValue(value) {\n var unwrappedValue = isMotionValue(value) ? value.get() : value;\n return isCustomValue(unwrappedValue) ? unwrappedValue.toValue() : unwrappedValue;\n}\n\nexport { resolveMotionValue };","import { isKeyframesTarget } from '../animation/utils/is-keyframes-target.js';\n\nvar isCustomValue = function isCustomValue(v) {\n return Boolean(v && typeof v === \"object\" && v.mix && v.toValue);\n};\n\nvar resolveFinalValueInKeyframes = function resolveFinalValueInKeyframes(v) {\n // TODO maybe throw if v.length - 1 is placeholder token?\n return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;\n};\n\nexport { isCustomValue, resolveFinalValueInKeyframes };","import { __rest } from 'tslib';\nimport { useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.js';\nimport { PresenceContext } from '../../context/PresenceContext.js';\nimport { checkIfControllingVariants, checkIfVariantNode, resolveVariantFromProps } from '../../render/utils/variants.js';\nimport { useConstant } from '../../utils/use-constant.js';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.js';\nimport { MotionContext } from '../../context/MotionContext/index.js';\n\nfunction makeState(_a, props, context, presenceContext) {\n var scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps,\n createRenderState = _a.createRenderState,\n onMount = _a.onMount;\n var state = {\n latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),\n renderState: createRenderState()\n };\n\n if (onMount) {\n state.mount = function (instance) {\n return onMount(props, instance, state);\n };\n }\n\n return state;\n}\n\nvar makeUseVisualState = function makeUseVisualState(config) {\n return function (props, isStatic) {\n var context = useContext(MotionContext);\n var presenceContext = useContext(PresenceContext);\n return isStatic ? makeState(config, props, context, presenceContext) : useConstant(function () {\n return makeState(config, props, context, presenceContext);\n });\n };\n};\n\nfunction makeLatestValues(props, context, presenceContext, scrapeMotionValues) {\n var values = {};\n var blockInitialAnimation = (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false;\n var motionValues = scrapeMotionValues(props);\n\n for (var key in motionValues) {\n values[key] = resolveMotionValue(motionValues[key]);\n }\n\n var initial = props.initial,\n animate = props.animate;\n var isControllingVariants = checkIfControllingVariants(props);\n var isVariantNode = checkIfVariantNode(props);\n\n if (context && isVariantNode && !isControllingVariants && props.inherit !== false) {\n initial !== null && initial !== void 0 ? initial : initial = context.initial;\n animate !== null && animate !== void 0 ? animate : animate = context.animate;\n }\n\n var variantToSet = blockInitialAnimation || initial === false ? animate : initial;\n\n if (variantToSet && typeof variantToSet !== \"boolean\" && !isAnimationControls(variantToSet)) {\n var list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];\n list.forEach(function (definition) {\n var resolved = resolveVariantFromProps(props, definition);\n if (!resolved) return;\n var transitionEnd = resolved.transitionEnd;\n resolved.transition;\n\n var target = __rest(resolved, [\"transitionEnd\", \"transition\"]);\n\n for (var key in target) {\n values[key] = target[key];\n }\n\n for (var key in transitionEnd) {\n values[key] = transitionEnd[key];\n }\n });\n }\n\n return values;\n}\n\nexport { makeUseVisualState };","import { renderSVG } from './utils/render.js';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.js';\nimport { makeUseVisualState } from '../../motion/utils/use-visual-state.js';\nimport { createSvgRenderState } from './utils/create-render-state.js';\nimport { buildSVGAttrs } from './utils/build-attrs.js';\nvar svgMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n createRenderState: createSvgRenderState,\n onMount: function onMount(props, instance, _a) {\n var renderState = _a.renderState,\n latestValues = _a.latestValues;\n\n try {\n renderState.dimensions = typeof instance.getBBox === \"function\" ? instance.getBBox() : instance.getBoundingClientRect();\n } catch (e) {\n // Most likely trying to measure an unrendered element under Firefox\n renderState.dimensions = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n }\n\n if (isPath(instance)) {\n renderState.totalPathLength = instance.getTotalLength();\n }\n\n buildSVGAttrs(renderState, latestValues, undefined, undefined, {\n enableHardwareAcceleration: false\n }, props.transformTemplate); // TODO: Replace with direct assignment\n\n renderSVG(instance, renderState);\n }\n })\n};\n\nfunction isPath(element) {\n return element.tagName === \"path\";\n}\n\nexport { svgMotionConfig };","import { makeUseVisualState } from '../../motion/utils/use-visual-state.js';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.js';\nimport { createHtmlRenderState } from './utils/create-render-state.js';\nvar htmlMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n createRenderState: createHtmlRenderState\n })\n};\nexport { htmlMotionConfig };","var AnimationType;\n\n(function (AnimationType) {\n AnimationType[\"Animate\"] = \"animate\";\n AnimationType[\"Hover\"] = \"whileHover\";\n AnimationType[\"Tap\"] = \"whileTap\";\n AnimationType[\"Drag\"] = \"whileDrag\";\n AnimationType[\"Focus\"] = \"whileFocus\";\n AnimationType[\"Exit\"] = \"exit\";\n})(AnimationType || (AnimationType = {}));\n\nexport { AnimationType };","import { useEffect } from 'react';\n\nfunction addDomEvent(target, eventName, handler, options) {\n target.addEventListener(eventName, handler, options);\n return function () {\n return target.removeEventListener(eventName, handler, options);\n };\n}\n/**\n * Attaches an event listener directly to the provided DOM element.\n *\n * Bypassing React's event system can be desirable, for instance when attaching non-passive\n * event handlers.\n *\n * ```jsx\n * const ref = useRef(null)\n *\n * useDomEvent(ref, 'wheel', onWheel, { passive: false })\n *\n * return <div ref={ref} />\n * ```\n *\n * @param ref - React.RefObject that's been provided to the element you want to bind the listener to.\n * @param eventName - Name of the event you want listen for.\n * @param handler - Function to fire when receiving the event.\n * @param options - Options to pass to `Event.addEventListener`.\n *\n * @public\n */\n\n\nfunction useDomEvent(ref, eventName, handler, options) {\n useEffect(function () {\n var element = ref.current;\n\n if (handler && element) {\n return addDomEvent(element, eventName, handler, options);\n }\n }, [ref, eventName, handler, options]);\n}\n\nexport { addDomEvent, useDomEvent };","function isMouseEvent(event) {\n // PointerEvent inherits from MouseEvent so we can't use a straight instanceof check.\n if (typeof PointerEvent !== \"undefined\" && event instanceof PointerEvent) {\n return !!(event.pointerType === \"mouse\");\n }\n\n return event instanceof MouseEvent;\n}\n\nfunction isTouchEvent(event) {\n var hasTouches = !!event.touches;\n return hasTouches;\n}\n\nexport { isMouseEvent, isTouchEvent };","import { isTouchEvent } from '../gestures/utils/event-type.js';\n/**\n * Filters out events not attached to the primary pointer (currently left mouse button)\n * @param eventHandler\n */\n\nfunction filterPrimaryPointer(eventHandler) {\n return function (event) {\n var isMouseEvent = event instanceof MouseEvent;\n var isPrimaryPointer = !isMouseEvent || isMouseEvent && event.button === 0;\n\n if (isPrimaryPointer) {\n eventHandler(event);\n }\n };\n}\n\nvar defaultPagePoint = {\n pageX: 0,\n pageY: 0\n};\n\nfunction pointFromTouch(e, pointType) {\n if (pointType === void 0) {\n pointType = \"page\";\n }\n\n var primaryTouch = e.touches[0] || e.changedTouches[0];\n var point = primaryTouch || defaultPagePoint;\n return {\n x: point[pointType + \"X\"],\n y: point[pointType + \"Y\"]\n };\n}\n\nfunction pointFromMouse(point, pointType) {\n if (pointType === void 0) {\n pointType = \"page\";\n }\n\n return {\n x: point[pointType + \"X\"],\n y: point[pointType + \"Y\"]\n };\n}\n\nfunction extractEventInfo(event, pointType) {\n if (pointType === void 0) {\n pointType = \"page\";\n }\n\n return {\n point: isTouchEvent(event) ? pointFromTouch(event, pointType) : pointFromMouse(event, pointType)\n };\n}\n\nfunction getViewportPointFromEvent(event) {\n return extractEventInfo(event, \"client\");\n}\n\nvar wrapHandler = function wrapHandler(handler, shouldFilterPrimaryPointer) {\n if (shouldFilterPrimaryPointer === void 0) {\n shouldFilterPrimaryPointer = false;\n }\n\n var listener = function listener(event) {\n return handler(event, extractEventInfo(event));\n };\n\n return shouldFilterPrimaryPointer ? filterPrimaryPointer(listener) : listener;\n};\n\nexport { extractEventInfo, getViewportPointFromEvent, wrapHandler };","import { useDomEvent, addDomEvent } from './use-dom-event.js';\nimport { wrapHandler } from './event-info.js';\nimport { supportsPointerEvents, supportsTouchEvents, supportsMouseEvents } from './utils.js';\nvar mouseEventNames = {\n pointerdown: \"mousedown\",\n pointermove: \"mousemove\",\n pointerup: \"mouseup\",\n pointercancel: \"mousecancel\",\n pointerover: \"mouseover\",\n pointerout: \"mouseout\",\n pointerenter: \"mouseenter\",\n pointerleave: \"mouseleave\"\n};\nvar touchEventNames = {\n pointerdown: \"touchstart\",\n pointermove: \"touchmove\",\n pointerup: \"touchend\",\n pointercancel: \"touchcancel\"\n};\n\nfunction getPointerEventName(name) {\n if (supportsPointerEvents()) {\n return name;\n } else if (supportsTouchEvents()) {\n return touchEventNames[name];\n } else if (supportsMouseEvents()) {\n return mouseEventNames[name];\n }\n\n return name;\n}\n\nfunction addPointerEvent(target, eventName, handler, options) {\n return addDomEvent(target, getPointerEventName(eventName), wrapHandler(handler, eventName === \"pointerdown\"), options);\n}\n\nfunction usePointerEvent(ref, eventName, handler, options) {\n return useDomEvent(ref, getPointerEventName(eventName), handler && wrapHandler(handler, eventName === \"pointerdown\"), options);\n}\n\nexport { addPointerEvent, usePointerEvent };","import { isBrowser } from '../utils/is-browser.js'; // We check for event support via functions in case they've been mocked by a testing suite.\n\nvar supportsPointerEvents = function supportsPointerEvents() {\n return isBrowser && window.onpointerdown === null;\n};\n\nvar supportsTouchEvents = function supportsTouchEvents() {\n return isBrowser && window.ontouchstart === null;\n};\n\nvar supportsMouseEvents = function supportsMouseEvents() {\n return isBrowser && window.onmousedown === null;\n};\n\nexport { supportsMouseEvents, supportsPointerEvents, supportsTouchEvents };","function createLock(name) {\n var lock = null;\n return function () {\n var openLock = function openLock() {\n lock = null;\n };\n\n if (lock === null) {\n lock = name;\n return openLock;\n }\n\n return false;\n };\n}\n\nvar globalHorizontalLock = createLock(\"dragHorizontal\");\nvar globalVerticalLock = createLock(\"dragVertical\");\n\nfunction getGlobalLock(drag) {\n var lock = false;\n\n if (drag === \"y\") {\n lock = globalVerticalLock();\n } else if (drag === \"x\") {\n lock = globalHorizontalLock();\n } else {\n var openHorizontal_1 = globalHorizontalLock();\n var openVertical_1 = globalVerticalLock();\n\n if (openHorizontal_1 && openVertical_1) {\n lock = function lock() {\n openHorizontal_1();\n openVertical_1();\n };\n } else {\n // Release the locks because we don't use them\n if (openHorizontal_1) openHorizontal_1();\n if (openVertical_1) openVertical_1();\n }\n }\n\n return lock;\n}\n\nfunction isDragActive() {\n // Check the gesture lock - if we get it, it means no drag gesture is active\n // and we can safely fire the tap gesture.\n var openGestureLock = getGlobalLock(true);\n if (!openGestureLock) return true;\n openGestureLock();\n return false;\n}\n\nexport { createLock, getGlobalLock, isDragActive };","import { isMouseEvent } from './utils/event-type.js';\nimport { AnimationType } from '../render/utils/types.js';\nimport { usePointerEvent } from '../events/use-pointer-event.js';\nimport { isDragActive } from './drag/utils/lock.js';\n\nfunction createHoverEvent(visualElement, isActive, callback) {\n return function (event, info) {\n var _a;\n\n if (!isMouseEvent(event) || isDragActive()) return;\n callback === null || callback === void 0 ? void 0 : callback(event, info);\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Hover, isActive);\n };\n}\n\nfunction useHoverGesture(_a) {\n var onHoverStart = _a.onHoverStart,\n onHoverEnd = _a.onHoverEnd,\n whileHover = _a.whileHover,\n visualElement = _a.visualElement;\n usePointerEvent(visualElement, \"pointerenter\", onHoverStart || whileHover ? createHoverEvent(visualElement, true, onHoverStart) : undefined);\n usePointerEvent(visualElement, \"pointerleave\", onHoverEnd || whileHover ? createHoverEvent(visualElement, false, onHoverEnd) : undefined);\n}\n\nexport { useHoverGesture };","/**\n * Recursively traverse up the tree to check whether the provided child node\n * is the parent or a descendant of it.\n *\n * @param parent - Element to find\n * @param child - Element to test against parent\n */\nvar isNodeOrChild = function isNodeOrChild(parent, child) {\n if (!child) {\n return false;\n } else if (parent === child) {\n return true;\n } else {\n return isNodeOrChild(parent, child.parentElement);\n }\n};\n\nexport { isNodeOrChild };","var combineFunctions = function combineFunctions(a, b) {\n return function (v) {\n return b(a(v));\n };\n};\n\nvar pipe = function pipe() {\n var transformers = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n transformers[_i] = arguments[_i];\n }\n\n return transformers.reduce(combineFunctions);\n};\n\nexport { pipe };","var makeRenderlessComponent = function makeRenderlessComponent(hook) {\n return function (props) {\n hook(props);\n return null;\n };\n};\n\nexport { makeRenderlessComponent };","import { useFocusGesture } from '../../gestures/use-focus-gesture.js';\nimport { useHoverGesture } from '../../gestures/use-hover-gesture.js';\nimport { useTapGesture } from '../../gestures/use-tap-gesture.js';\nimport { makeRenderlessComponent } from '../utils/make-renderless-component.js';\nvar gestureAnimations = {\n tap: makeRenderlessComponent(useTapGesture),\n focus: makeRenderlessComponent(useFocusGesture),\n hover: makeRenderlessComponent(useHoverGesture)\n};\nexport { gestureAnimations };","import { useRef } from 'react';\nimport { isNodeOrChild } from './utils/is-node-or-child.js';\nimport { usePointerEvent, addPointerEvent } from '../events/use-pointer-event.js';\nimport { useUnmountEffect } from '../utils/use-unmount-effect.js';\nimport { pipe } from 'popmotion';\nimport { AnimationType } from '../render/utils/types.js';\nimport { isDragActive } from './drag/utils/lock.js';\n/**\n * @param handlers -\n * @internal\n */\n\nfunction useTapGesture(_a) {\n var onTap = _a.onTap,\n onTapStart = _a.onTapStart,\n onTapCancel = _a.onTapCancel,\n whileTap = _a.whileTap,\n visualElement = _a.visualElement;\n var hasPressListeners = onTap || onTapStart || onTapCancel || whileTap;\n var isPressing = useRef(false);\n var cancelPointerEndListeners = useRef(null);\n\n function removePointerEndListener() {\n var _a;\n\n (_a = cancelPointerEndListeners.current) === null || _a === void 0 ? void 0 : _a.call(cancelPointerEndListeners);\n cancelPointerEndListeners.current = null;\n }\n\n function checkPointerEnd() {\n var _a;\n\n removePointerEndListener();\n isPressing.current = false;\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Tap, false);\n return !isDragActive();\n }\n\n function onPointerUp(event, info) {\n if (!checkPointerEnd()) return;\n /**\n * We only count this as a tap gesture if the event.target is the same\n * as, or a child of, this component's element\n */\n\n !isNodeOrChild(visualElement.getInstance(), event.target) ? onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info) : onTap === null || onTap === void 0 ? void 0 : onTap(event, info);\n }\n\n function onPointerCancel(event, info) {\n if (!checkPointerEnd()) return;\n onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info);\n }\n\n function onPointerDown(event, info) {\n var _a;\n\n removePointerEndListener();\n if (isPressing.current) return;\n isPressing.current = true;\n cancelPointerEndListeners.current = pipe(addPointerEvent(window, \"pointerup\", onPointerUp), addPointerEvent(window, \"pointercancel\", onPointerCancel));\n onTapStart === null || onTapStart === void 0 ? void 0 : onTapStart(event, info);\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Tap, true);\n }\n\n usePointerEvent(visualElement, \"pointerdown\", hasPressListeners ? onPointerDown : undefined);\n useUnmountEffect(removePointerEndListener);\n}\n\nexport { useTapGesture };","import { AnimationType } from '../render/utils/types.js';\nimport { useDomEvent } from '../events/use-dom-event.js';\n/**\n *\n * @param props\n * @param ref\n * @internal\n */\n\nfunction useFocusGesture(_a) {\n var whileFocus = _a.whileFocus,\n visualElement = _a.visualElement;\n\n var onFocus = function onFocus() {\n var _a;\n\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Focus, true);\n };\n\n var onBlur = function onBlur() {\n var _a;\n\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Focus, false);\n };\n\n useDomEvent(visualElement, \"focus\", whileFocus ? onFocus : undefined);\n useDomEvent(visualElement, \"blur\", whileFocus ? onBlur : undefined);\n}\n\nexport { useFocusGesture };","function shallowCompare(next, prev) {\n if (!Array.isArray(prev)) return false;\n var prevLength = prev.length;\n if (prevLength !== next.length) return false;\n\n for (var i = 0; i < prevLength; i++) {\n if (prev[i] !== next[i]) return false;\n }\n\n return true;\n}\n\nexport { shallowCompare };","/*! *****************************************************************************\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***************************************************************************** */\n\n/* global Reflect, Promise */\nvar _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nvar _assign = function __assign() {\n _assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return _assign.apply(this, arguments);\n};\n\nexport { _assign as __assign };\nexport function __rest(s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\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}\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {\n if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n }\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nexport function __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nexport function __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n\n while (_) {\n try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n\n case 7:\n op = _.ops.pop();\n\n _.trys.pop();\n\n continue;\n\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n\n if (t && _.label < t[2]) {\n _.label = t[2];\n\n _.ops.push(op);\n\n break;\n }\n\n if (t[2]) _.ops.pop();\n\n _.trys.pop();\n\n continue;\n }\n\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n }\n\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nexport var __createBinding = Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n};\nexport function __exportStar(m, o) {\n for (var p in m) {\n if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n }\n}\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function next() {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {\n ar.push(r.value);\n }\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n\n return ar;\n}\n/** @deprecated */\n\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) {\n ar = ar.concat(__read(arguments[i]));\n }\n\n return ar;\n}\n/** @deprecated */\n\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) {\n s += arguments[i].length;\n }\n\n for (var r = Array(s), k = 0, i = 0; i < il; i++) {\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {\n r[k] = a[j];\n }\n }\n\n return r;\n}\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\n });\n };\n }\n\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n\n function step(r) {\n r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n\n function fulfill(value) {\n resume(\"next\", value);\n }\n\n function reject(value) {\n resume(\"throw\", value);\n }\n\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function () {\n return this;\n }, i;\n\n function verb(n, f) {\n i[n] = o[n] ? function (v) {\n return (p = !p) ? {\n value: __await(o[n](v)),\n done: n === \"return\"\n } : f ? f(v) : v;\n } : f;\n }\n}\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i);\n\n function verb(n) {\n i[n] = o[n] && function (v) {\n return new Promise(function (resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function (v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n\n return cooked;\n}\n;\n\nvar __setModuleDefault = Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n}\nexport function __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;\n}","var clamp = function clamp(min, max, v) {\n return Math.min(Math.max(v, min), max);\n};\n\nexport { clamp };","import { warning } from 'hey-listen';\nimport { clamp } from '../../utils/clamp.js';\nvar safeMin = 0.001;\nvar minDuration = 0.01;\nvar maxDuration = 10.0;\nvar minDamping = 0.05;\nvar maxDamping = 1;\n\nfunction findSpring(_a) {\n var _b = _a.duration,\n duration = _b === void 0 ? 800 : _b,\n _c = _a.bounce,\n bounce = _c === void 0 ? 0.25 : _c,\n _d = _a.velocity,\n velocity = _d === void 0 ? 0 : _d,\n _e = _a.mass,\n mass = _e === void 0 ? 1 : _e;\n var envelope;\n var derivative;\n warning(duration <= maxDuration * 1000, \"Spring duration must be 10 seconds or less\");\n var dampingRatio = 1 - bounce;\n dampingRatio = clamp(minDamping, maxDamping, dampingRatio);\n duration = clamp(minDuration, maxDuration, duration / 1000);\n\n if (dampingRatio < 1) {\n envelope = function envelope(undampedFreq) {\n var exponentialDecay = undampedFreq * dampingRatio;\n var delta = exponentialDecay * duration;\n var a = exponentialDecay - velocity;\n var b = calcAngularFreq(undampedFreq, dampingRatio);\n var c = Math.exp(-delta);\n return safeMin - a / b * c;\n };\n\n derivative = function derivative(undampedFreq) {\n var exponentialDecay = undampedFreq * dampingRatio;\n var delta = exponentialDecay * duration;\n var d = delta * velocity + velocity;\n var e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n var f = Math.exp(-delta);\n var g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n var factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return factor * ((d - e) * f) / g;\n };\n } else {\n envelope = function envelope(undampedFreq) {\n var a = Math.exp(-undampedFreq * duration);\n var b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n\n derivative = function derivative(undampedFreq) {\n var a = Math.exp(-undampedFreq * duration);\n var b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n\n var initialGuess = 5 / duration;\n var undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = duration * 1000;\n\n if (isNaN(undampedFreq)) {\n return {\n stiffness: 100,\n damping: 10,\n duration: duration\n };\n } else {\n var stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness: stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration: duration\n };\n }\n}\n\nvar rootIterations = 12;\n\nfunction approximateRoot(envelope, derivative, initialGuess) {\n var result = initialGuess;\n\n for (var i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n\n return result;\n}\n\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\n\nexport { calcAngularFreq, findSpring, maxDamping, maxDuration, minDamping, minDuration };","import { __rest, __assign } from 'tslib';\nimport { findSpring, calcAngularFreq } from '../utils/find-spring.js';\nvar durationKeys = [\"duration\", \"bounce\"];\nvar physicsKeys = [\"stiffness\", \"damping\", \"mass\"];\n\nfunction isSpringType(options, keys) {\n return keys.some(function (key) {\n return options[key] !== undefined;\n });\n}\n\nfunction getSpringOptions(options) {\n var springOptions = __assign({\n velocity: 0.0,\n stiffness: 100,\n damping: 10,\n mass: 1.0,\n isResolvedFromDuration: false\n }, options);\n\n if (!isSpringType(options, physicsKeys) && isSpringType(options, durationKeys)) {\n var derived = findSpring(options);\n springOptions = __assign(__assign(__assign({}, springOptions), derived), {\n velocity: 0.0,\n mass: 1.0\n });\n springOptions.isResolvedFromDuration = true;\n }\n\n return springOptions;\n}\n\nfunction spring(_a) {\n var _b = _a.from,\n from = _b === void 0 ? 0.0 : _b,\n _c = _a.to,\n to = _c === void 0 ? 1.0 : _c,\n _d = _a.restSpeed,\n restSpeed = _d === void 0 ? 2 : _d,\n restDelta = _a.restDelta,\n options = __rest(_a, [\"from\", \"to\", \"restSpeed\", \"restDelta\"]);\n\n var state = {\n done: false,\n value: from\n };\n\n var _e = getSpringOptions(options),\n stiffness = _e.stiffness,\n damping = _e.damping,\n mass = _e.mass,\n velocity = _e.velocity,\n duration = _e.duration,\n isResolvedFromDuration = _e.isResolvedFromDuration;\n\n var resolveSpring = zero;\n var resolveVelocity = zero;\n\n function createSpring() {\n var initialVelocity = velocity ? -(velocity / 1000) : 0.0;\n var initialDelta = to - from;\n var dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n var undampedAngularFreq = Math.sqrt(stiffness / mass) / 1000;\n restDelta !== null && restDelta !== void 0 ? restDelta : restDelta = Math.abs(to - from) <= 1 ? 0.01 : 0.4;\n\n if (dampingRatio < 1) {\n var angularFreq_1 = calcAngularFreq(undampedAngularFreq, dampingRatio);\n\n resolveSpring = function resolveSpring(t) {\n var envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return to - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq_1 * Math.sin(angularFreq_1 * t) + initialDelta * Math.cos(angularFreq_1 * t));\n };\n\n resolveVelocity = function resolveVelocity(t) {\n var envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return dampingRatio * undampedAngularFreq * envelope * (Math.sin(angularFreq_1 * t) * (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq_1 + initialDelta * Math.cos(angularFreq_1 * t)) - envelope * (Math.cos(angularFreq_1 * t) * (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) - angularFreq_1 * initialDelta * Math.sin(angularFreq_1 * t));\n };\n } else if (dampingRatio === 1) {\n resolveSpring = function resolveSpring(t) {\n return to - Math.exp(-undampedAngularFreq * t) * (initialDelta + (initialVelocity + undampedAngularFreq * initialDelta) * t);\n };\n } else {\n var dampedAngularFreq_1 = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n\n resolveSpring = function resolveSpring(t) {\n var envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n var freqForT = Math.min(dampedAngularFreq_1 * t, 300);\n return to - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) * Math.sinh(freqForT) + dampedAngularFreq_1 * initialDelta * Math.cosh(freqForT)) / dampedAngularFreq_1;\n };\n }\n }\n\n createSpring();\n return {\n next: function next(t) {\n var current = resolveSpring(t);\n\n if (!isResolvedFromDuration) {\n var currentVelocity = resolveVelocity(t) * 1000;\n var isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;\n var isBelowDisplacementThreshold = Math.abs(to - current) <= restDelta;\n state.done = isBelowVelocityThreshold && isBelowDisplacementThreshold;\n } else {\n state.done = t >= duration;\n }\n\n state.value = state.done ? to : current;\n return state;\n },\n flipTarget: function flipTarget() {\n var _a;\n\n velocity = -velocity;\n _a = [to, from], from = _a[0], to = _a[1];\n createSpring();\n }\n };\n}\n\nspring.needsInterpolation = function (a, b) {\n return typeof a === \"string\" || typeof b === \"string\";\n};\n\nvar zero = function zero(_t) {\n return 0;\n};\n\nexport { spring };","var progress = function progress(from, to, value) {\n var toFromDifference = to - from;\n return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;\n};\n\nexport { progress };","var mix = function mix(from, to, progress) {\n return -progress * from + progress * to + from;\n};\n\nexport { mix };","import { isString, singleColorRegex, floatRegex } from '../utils.js';\n\nvar isColorString = function isColorString(type, testProp) {\n return function (v) {\n return Boolean(isString(v) && singleColorRegex.test(v) && v.startsWith(type) || testProp && Object.prototype.hasOwnProperty.call(v, testProp));\n };\n};\n\nvar splitColor = function splitColor(aName, bName, cName) {\n return function (v) {\n var _a;\n\n if (!isString(v)) return v;\n\n var _b = v.match(floatRegex),\n a = _b[0],\n b = _b[1],\n c = _b[2],\n alpha = _b[3];\n\n return _a = {}, _a[aName] = parseFloat(a), _a[bName] = parseFloat(b), _a[cName] = parseFloat(c), _a.alpha = alpha !== undefined ? parseFloat(alpha) : 1, _a;\n };\n};\n\nexport { isColorString, splitColor };","import { __assign } from 'tslib';\nimport { number, alpha } from '../numbers/index.js';\nimport { sanitize, clamp } from '../utils.js';\nimport { isColorString, splitColor } from './utils.js';\nvar clampRgbUnit = clamp(0, 255);\n\nvar rgbUnit = __assign(__assign({}, number), {\n transform: function transform(v) {\n return Math.round(clampRgbUnit(v));\n }\n});\n\nvar rgba = {\n test: isColorString('rgb', 'red'),\n parse: splitColor('red', 'green', 'blue'),\n transform: function transform(_a) {\n var red = _a.red,\n green = _a.green,\n blue = _a.blue,\n _b = _a.alpha,\n alpha$1 = _b === void 0 ? 1 : _b;\n return 'rgba(' + rgbUnit.transform(red) + ', ' + rgbUnit.transform(green) + ', ' + rgbUnit.transform(blue) + ', ' + sanitize(alpha.transform(alpha$1)) + ')';\n }\n};\nexport { rgbUnit, rgba };","import { rgba } from './rgba.js';\nimport { isColorString } from './utils.js';\n\nfunction parseHex(v) {\n var r = '';\n var g = '';\n var b = '';\n var a = '';\n\n if (v.length > 5) {\n r = v.substr(1, 2);\n g = v.substr(3, 2);\n b = v.substr(5, 2);\n a = v.substr(7, 2);\n } else {\n r = v.substr(1, 1);\n g = v.substr(2, 1);\n b = v.substr(3, 1);\n a = v.substr(4, 1);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1\n };\n}\n\nvar hex = {\n test: isColorString('#'),\n parse: parseHex,\n transform: rgba.transform\n};\nexport { hex };","import { alpha } from '../numbers/index.js';\nimport { percent } from '../numbers/units.js';\nimport { sanitize } from '../utils.js';\nimport { isColorString, splitColor } from './utils.js';\nvar hsla = {\n test: isColorString('hsl', 'hue'),\n parse: splitColor('hue', 'saturation', 'lightness'),\n transform: function transform(_a) {\n var hue = _a.hue,\n saturation = _a.saturation,\n lightness = _a.lightness,\n _b = _a.alpha,\n alpha$1 = _b === void 0 ? 1 : _b;\n return 'hsla(' + Math.round(hue) + ', ' + percent.transform(sanitize(saturation)) + ', ' + percent.transform(sanitize(lightness)) + ', ' + sanitize(alpha.transform(alpha$1)) + ')';\n }\n};\nexport { hsla };","import { __assign } from 'tslib';\nimport { mix } from './mix.js';\nimport { hex, rgba, hsla } from 'style-value-types';\nimport { invariant } from 'hey-listen';\n\nvar mixLinearColor = function mixLinearColor(from, to, v) {\n var fromExpo = from * from;\n var toExpo = to * to;\n return Math.sqrt(Math.max(0, v * (toExpo - fromExpo) + fromExpo));\n};\n\nvar colorTypes = [hex, rgba, hsla];\n\nvar getColorType = function getColorType(v) {\n return colorTypes.find(function (type) {\n return type.test(v);\n });\n};\n\nvar notAnimatable = function notAnimatable(color) {\n return \"'\" + color + \"' is not an animatable color. Use the equivalent color code instead.\";\n};\n\nvar mixColor = function mixColor(from, to) {\n var fromColorType = getColorType(from);\n var toColorType = getColorType(to);\n invariant(!!fromColorType, notAnimatable(from));\n invariant(!!toColorType, notAnimatable(to));\n invariant(fromColorType.transform === toColorType.transform, \"Both colors must be hex/RGBA, OR both must be HSLA.\");\n var fromColor = fromColorType.parse(from);\n var toColor = toColorType.parse(to);\n\n var blended = __assign({}, fromColor);\n\n var mixFunc = fromColorType === hsla ? mix : mixLinearColor;\n return function (v) {\n for (var key in blended) {\n if (key !== \"alpha\") {\n blended[key] = mixFunc(fromColor[key], toColor[key], v);\n }\n }\n\n blended.alpha = mix(fromColor.alpha, toColor.alpha, v);\n return fromColorType.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };","import { isString } from '../utils.js';\nimport { hex } from './hex.js';\nimport { hsla } from './hsla.js';\nimport { rgba } from './rgba.js';\nvar color = {\n test: function test(v) {\n return rgba.test(v) || hex.test(v) || hsla.test(v);\n },\n parse: function parse(v) {\n if (rgba.test(v)) {\n return rgba.parse(v);\n } else if (hsla.test(v)) {\n return hsla.parse(v);\n } else {\n return hex.parse(v);\n }\n },\n transform: function transform(v) {\n return isString(v) ? v : v.hasOwnProperty('red') ? rgba.transform(v) : hsla.transform(v);\n }\n};\nexport { color };","import { color } from '../color/index.js';\nimport { number } from '../numbers/index.js';\nimport { isString, floatRegex, colorRegex, sanitize } from '../utils.js';\nvar colorToken = '${c}';\nvar numberToken = '${n}';\n\nfunction test(v) {\n var _a, _b, _c, _d;\n\n return isNaN(v) && isString(v) && ((_b = (_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) + ((_d = (_c = v.match(colorRegex)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0;\n}\n\nfunction analyse(v) {\n var values = [];\n var numColors = 0;\n var colors = v.match(colorRegex);\n\n if (colors) {\n numColors = colors.length;\n v = v.replace(colorRegex, colorToken);\n values.push.apply(values, colors.map(color.parse));\n }\n\n var numbers = v.match(floatRegex);\n\n if (numbers) {\n v = v.replace(floatRegex, numberToken);\n values.push.apply(values, numbers.map(number.parse));\n }\n\n return {\n values: values,\n numColors: numColors,\n tokenised: v\n };\n}\n\nfunction parse(v) {\n return analyse(v).values;\n}\n\nfunction createTransformer(v) {\n var _a = analyse(v),\n values = _a.values,\n numColors = _a.numColors,\n tokenised = _a.tokenised;\n\n var numValues = values.length;\n return function (v) {\n var output = tokenised;\n\n for (var i = 0; i < numValues; i++) {\n output = output.replace(i < numColors ? colorToken : numberToken, i < numColors ? color.transform(v[i]) : sanitize(v[i]));\n }\n\n return output;\n };\n}\n\nvar convertNumbersToZero = function convertNumbersToZero(v) {\n return typeof v === 'number' ? 0 : v;\n};\n\nfunction getAnimatableNone(v) {\n var parsed = parse(v);\n var transformer = createTransformer(v);\n return transformer(parsed.map(convertNumbersToZero));\n}\n\nvar complex = {\n test: test,\n parse: parse,\n createTransformer: createTransformer,\n getAnimatableNone: getAnimatableNone\n};\nexport { complex };","var zeroPoint = {\n x: 0,\n y: 0,\n z: 0\n};\n\nvar isNum = function isNum(v) {\n return typeof v === 'number';\n};\n\nexport { isNum, zeroPoint };","import { __spreadArray, __assign } from 'tslib';\nimport { complex, color } from 'style-value-types';\nimport { mix } from './mix.js';\nimport { mixColor } from './mix-color.js';\nimport { isNum } from './inc.js';\nimport { pipe } from './pipe.js';\nimport { invariant } from 'hey-listen';\n\nfunction getMixer(origin, target) {\n if (isNum(origin)) {\n return function (v) {\n return mix(origin, target, v);\n };\n } else if (color.test(origin)) {\n return mixColor(origin, target);\n } else {\n return mixComplex(origin, target);\n }\n}\n\nvar mixArray = function mixArray(from, to) {\n var output = __spreadArray([], from);\n\n var numValues = output.length;\n var blendValue = from.map(function (fromThis, i) {\n return getMixer(fromThis, to[i]);\n });\n return function (v) {\n for (var i = 0; i < numValues; i++) {\n output[i] = blendValue[i](v);\n }\n\n return output;\n };\n};\n\nvar mixObject = function mixObject(origin, target) {\n var output = __assign(__assign({}, origin), target);\n\n var blendValue = {};\n\n for (var key in output) {\n if (origin[key] !== undefined && target[key] !== undefined) {\n blendValue[key] = getMixer(origin[key], target[key]);\n }\n }\n\n return function (v) {\n for (var key in blendValue) {\n output[key] = blendValue[key](v);\n }\n\n return output;\n };\n};\n\nfunction analyse(value) {\n var parsed = complex.parse(value);\n var numValues = parsed.length;\n var numNumbers = 0;\n var numRGB = 0;\n var numHSL = 0;\n\n for (var i = 0; i < numValues; i++) {\n if (numNumbers || typeof parsed[i] === \"number\") {\n numNumbers++;\n } else {\n if (parsed[i].hue !== undefined) {\n numHSL++;\n } else {\n numRGB++;\n }\n }\n }\n\n return {\n parsed: parsed,\n numNumbers: numNumbers,\n numRGB: numRGB,\n numHSL: numHSL\n };\n}\n\nvar mixComplex = function mixComplex(origin, target) {\n var template = complex.createTransformer(target);\n var originStats = analyse(origin);\n var targetStats = analyse(target);\n invariant(originStats.numHSL === targetStats.numHSL && originStats.numRGB === targetStats.numRGB && originStats.numNumbers >= targetStats.numNumbers, \"Complex values '\" + origin + \"' and '\" + target + \"' too different to mix. Ensure all colors are of the same type.\");\n return pipe(mixArray(originStats.parsed, targetStats.parsed), template);\n};\n\nexport { mixArray, mixComplex, mixObject };","import { progress } from './progress.js';\nimport { mix } from './mix.js';\nimport { mixColor } from './mix-color.js';\nimport { mixComplex, mixArray, mixObject } from './mix-complex.js';\nimport { color } from 'style-value-types';\nimport { clamp } from './clamp.js';\nimport { pipe } from './pipe.js';\nimport { invariant } from 'hey-listen';\n\nvar mixNumber = function mixNumber(from, to) {\n return function (p) {\n return mix(from, to, p);\n };\n};\n\nfunction detectMixerFactory(v) {\n if (typeof v === 'number') {\n return mixNumber;\n } else if (typeof v === 'string') {\n if (color.test(v)) {\n return mixColor;\n } else {\n return mixComplex;\n }\n } else if (Array.isArray(v)) {\n return mixArray;\n } else if (typeof v === 'object') {\n return mixObject;\n }\n}\n\nfunction createMixers(output, ease, customMixer) {\n var mixers = [];\n var mixerFactory = customMixer || detectMixerFactory(output[0]);\n var numMixers = output.length - 1;\n\n for (var i = 0; i < numMixers; i++) {\n var mixer = mixerFactory(output[i], output[i + 1]);\n\n if (ease) {\n var easingFunction = Array.isArray(ease) ? ease[i] : ease;\n mixer = pipe(easingFunction, mixer);\n }\n\n mixers.push(mixer);\n }\n\n return mixers;\n}\n\nfunction fastInterpolate(_a, _b) {\n var from = _a[0],\n to = _a[1];\n var mixer = _b[0];\n return function (v) {\n return mixer(progress(from, to, v));\n };\n}\n\nfunction slowInterpolate(input, mixers) {\n var inputLength = input.length;\n var lastInputIndex = inputLength - 1;\n return function (v) {\n var mixerIndex = 0;\n var foundMixerIndex = false;\n\n if (v <= input[0]) {\n foundMixerIndex = true;\n } else if (v >= input[lastInputIndex]) {\n mixerIndex = lastInputIndex - 1;\n foundMixerIndex = true;\n }\n\n if (!foundMixerIndex) {\n var i = 1;\n\n for (; i < inputLength; i++) {\n if (input[i] > v || i === lastInputIndex) {\n break;\n }\n }\n\n mixerIndex = i - 1;\n }\n\n var progressInRange = progress(input[mixerIndex], input[mixerIndex + 1], v);\n return mixers[mixerIndex](progressInRange);\n };\n}\n\nfunction interpolate(input, output, _a) {\n var _b = _a === void 0 ? {} : _a,\n _c = _b.clamp,\n isClamp = _c === void 0 ? true : _c,\n ease = _b.ease,\n mixer = _b.mixer;\n\n var inputLength = input.length;\n invariant(inputLength === output.length, 'Both input and output ranges must be the same length');\n invariant(!ease || !Array.isArray(ease) || ease.length === inputLength - 1, 'Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values.');\n\n if (input[0] > input[inputLength - 1]) {\n input = [].concat(input);\n output = [].concat(output);\n input.reverse();\n output.reverse();\n }\n\n var mixers = createMixers(output, ease, mixer);\n var interpolator = inputLength === 2 ? fastInterpolate(input, mixers) : slowInterpolate(input, mixers);\n return isClamp ? function (v) {\n return interpolator(clamp(input[0], input[inputLength - 1], v));\n } : interpolator;\n}\n\nexport { interpolate };","var reverseEasing = function reverseEasing(easing) {\n return function (p) {\n return 1 - easing(1 - p);\n };\n};\n\nvar mirrorEasing = function mirrorEasing(easing) {\n return function (p) {\n return p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\n };\n};\n\nvar createExpoIn = function createExpoIn(power) {\n return function (p) {\n return Math.pow(p, power);\n };\n};\n\nvar createBackIn = function createBackIn(power) {\n return function (p) {\n return p * p * ((power + 1) * p - power);\n };\n};\n\nvar createAnticipate = function createAnticipate(power) {\n var backEasing = createBackIn(power);\n return function (p) {\n return (p *= 2) < 1 ? 0.5 * backEasing(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n };\n};\n\nexport { createAnticipate, createBackIn, createExpoIn, mirrorEasing, reverseEasing };","import { createExpoIn, reverseEasing, mirrorEasing, createBackIn, createAnticipate } from './utils.js';\nvar DEFAULT_OVERSHOOT_STRENGTH = 1.525;\nvar BOUNCE_FIRST_THRESHOLD = 4.0 / 11.0;\nvar BOUNCE_SECOND_THRESHOLD = 8.0 / 11.0;\nvar BOUNCE_THIRD_THRESHOLD = 9.0 / 10.0;\n\nvar linear = function linear(p) {\n return p;\n};\n\nvar easeIn = createExpoIn(2);\nvar easeOut = reverseEasing(easeIn);\nvar easeInOut = mirrorEasing(easeIn);\n\nvar circIn = function circIn(p) {\n return 1 - Math.sin(Math.acos(p));\n};\n\nvar circOut = reverseEasing(circIn);\nvar circInOut = mirrorEasing(circOut);\nvar backIn = createBackIn(DEFAULT_OVERSHOOT_STRENGTH);\nvar backOut = reverseEasing(backIn);\nvar backInOut = mirrorEasing(backIn);\nvar anticipate = createAnticipate(DEFAULT_OVERSHOOT_STRENGTH);\nvar ca = 4356.0 / 361.0;\nvar cb = 35442.0 / 1805.0;\nvar cc = 16061.0 / 1805.0;\n\nvar bounceOut = function bounceOut(p) {\n if (p === 1 || p === 0) return p;\n var p2 = p * p;\n return p < BOUNCE_FIRST_THRESHOLD ? 7.5625 * p2 : p < BOUNCE_SECOND_THRESHOLD ? 9.075 * p2 - 9.9 * p + 3.4 : p < BOUNCE_THIRD_THRESHOLD ? ca * p2 - cb * p + cc : 10.8 * p * p - 20.52 * p + 10.72;\n};\n\nvar bounceIn = reverseEasing(bounceOut);\n\nvar bounceInOut = function bounceInOut(p) {\n return p < 0.5 ? 0.5 * (1.0 - bounceOut(1.0 - p * 2.0)) : 0.5 * bounceOut(p * 2.0 - 1.0) + 0.5;\n};\n\nexport { anticipate, backIn, backInOut, backOut, bounceIn, bounceInOut, bounceOut, circIn, circInOut, circOut, easeIn, easeInOut, easeOut, linear };","import { interpolate } from '../../utils/interpolate.js';\nimport { easeInOut } from '../../easing/index.js';\n\nfunction defaultEasing(values, easing) {\n return values.map(function () {\n return easing || easeInOut;\n }).splice(0, values.length - 1);\n}\n\nfunction defaultOffset(values) {\n var numValues = values.length;\n return values.map(function (_value, i) {\n return i !== 0 ? i / (numValues - 1) : 0;\n });\n}\n\nfunction convertOffsetToTimes(offset, duration) {\n return offset.map(function (o) {\n return o * duration;\n });\n}\n\nfunction keyframes(_a) {\n var _b = _a.from,\n from = _b === void 0 ? 0 : _b,\n _c = _a.to,\n to = _c === void 0 ? 1 : _c,\n ease = _a.ease,\n offset = _a.offset,\n _d = _a.duration,\n duration = _d === void 0 ? 300 : _d;\n var state = {\n done: false,\n value: from\n };\n var values = Array.isArray(to) ? to : [from, to];\n var times = convertOffsetToTimes(offset && offset.length === values.length ? offset : defaultOffset(values), duration);\n\n function createInterpolator() {\n return interpolate(times, values, {\n ease: Array.isArray(ease) ? ease : defaultEasing(values, ease)\n });\n }\n\n var interpolator = createInterpolator();\n return {\n next: function next(t) {\n state.value = interpolator(t);\n state.done = t >= duration;\n return state;\n },\n flipTarget: function flipTarget() {\n values.reverse();\n interpolator = createInterpolator();\n }\n };\n}\n\nexport { convertOffsetToTimes, defaultEasing, defaultOffset, keyframes };","import { spring } from '../generators/spring.js';\nimport { keyframes } from '../generators/keyframes.js';\nimport { decay } from '../generators/decay.js';\nvar types = {\n keyframes: keyframes,\n spring: spring,\n decay: decay\n};\n\nfunction detectAnimationFromOptions(config) {\n if (Array.isArray(config.to)) {\n return keyframes;\n } else if (types[config.type]) {\n return types[config.type];\n }\n\n var keys = new Set(Object.keys(config));\n\n if (keys.has(\"ease\") || keys.has(\"duration\") && !keys.has(\"dampingRatio\")) {\n return keyframes;\n } else if (keys.has(\"dampingRatio\") || keys.has(\"stiffness\") || keys.has(\"mass\") || keys.has(\"damping\") || keys.has(\"restSpeed\") || keys.has(\"restDelta\")) {\n return spring;\n }\n\n return keyframes;\n}\n\nexport { detectAnimationFromOptions };","function decay(_a) {\n var _b = _a.velocity,\n velocity = _b === void 0 ? 0 : _b,\n _c = _a.from,\n from = _c === void 0 ? 0 : _c,\n _d = _a.power,\n power = _d === void 0 ? 0.8 : _d,\n _e = _a.timeConstant,\n timeConstant = _e === void 0 ? 350 : _e,\n _f = _a.restDelta,\n restDelta = _f === void 0 ? 0.5 : _f,\n modifyTarget = _a.modifyTarget;\n var state = {\n done: false,\n value: from\n };\n var amplitude = power * velocity;\n var ideal = from + amplitude;\n var target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n if (target !== ideal) amplitude = target - from;\n return {\n next: function next(t) {\n var delta = -amplitude * Math.exp(-t / timeConstant);\n state.done = !(delta > restDelta || delta < -restDelta);\n state.value = state.done ? target : target + delta;\n return state;\n },\n flipTarget: function flipTarget() {}\n };\n}\n\nexport { decay };","function loopElapsed(elapsed, duration, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n\n return elapsed - duration - delay;\n}\n\nfunction reverseElapsed(elapsed, duration, delay, isForwardPlayback) {\n if (delay === void 0) {\n delay = 0;\n }\n\n if (isForwardPlayback === void 0) {\n isForwardPlayback = true;\n }\n\n return isForwardPlayback ? loopElapsed(duration + -elapsed, duration, delay) : duration - (elapsed - duration) + delay;\n}\n\nfunction hasRepeatDelayElapsed(elapsed, duration, delay, isForwardPlayback) {\n return isForwardPlayback ? elapsed >= duration + delay : elapsed <= -delay;\n}\n\nexport { hasRepeatDelayElapsed, loopElapsed, reverseElapsed };","import { __rest, __assign } from 'tslib';\nimport { detectAnimationFromOptions } from './utils/detect-animation-from-options.js';\nimport sync, { cancelSync } from 'framesync';\nimport { interpolate } from '../utils/interpolate.js';\nimport { hasRepeatDelayElapsed, reverseElapsed, loopElapsed } from './utils/elapsed.js';\n\nvar framesync = function framesync(update) {\n var passTimestamp = function passTimestamp(_a) {\n var delta = _a.delta;\n return update(delta);\n };\n\n return {\n start: function start() {\n return sync.update(passTimestamp, true);\n },\n stop: function stop() {\n return cancelSync.update(passTimestamp);\n }\n };\n};\n\nfunction animate(_a) {\n var _b, _c;\n\n var from = _a.from,\n _d = _a.autoplay,\n autoplay = _d === void 0 ? true : _d,\n _e = _a.driver,\n driver = _e === void 0 ? framesync : _e,\n _f = _a.elapsed,\n elapsed = _f === void 0 ? 0 : _f,\n _g = _a.repeat,\n repeatMax = _g === void 0 ? 0 : _g,\n _h = _a.repeatType,\n repeatType = _h === void 0 ? \"loop\" : _h,\n _j = _a.repeatDelay,\n repeatDelay = _j === void 0 ? 0 : _j,\n onPlay = _a.onPlay,\n onStop = _a.onStop,\n onComplete = _a.onComplete,\n onRepeat = _a.onRepeat,\n onUpdate = _a.onUpdate,\n options = __rest(_a, [\"from\", \"autoplay\", \"driver\", \"elapsed\", \"repeat\", \"repeatType\", \"repeatDelay\", \"onPlay\", \"onStop\", \"onComplete\", \"onRepeat\", \"onUpdate\"]);\n\n var to = options.to;\n var driverControls;\n var repeatCount = 0;\n var computedDuration = options.duration;\n var latest;\n var isComplete = false;\n var isForwardPlayback = true;\n var interpolateFromNumber;\n var animator = detectAnimationFromOptions(options);\n\n if ((_c = (_b = animator).needsInterpolation) === null || _c === void 0 ? void 0 : _c.call(_b, from, to)) {\n interpolateFromNumber = interpolate([0, 100], [from, to], {\n clamp: false\n });\n from = 0;\n to = 100;\n }\n\n var animation = animator(__assign(__assign({}, options), {\n from: from,\n to: to\n }));\n\n function repeat() {\n repeatCount++;\n\n if (repeatType === \"reverse\") {\n isForwardPlayback = repeatCount % 2 === 0;\n elapsed = reverseElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback);\n } else {\n elapsed = loopElapsed(elapsed, computedDuration, repeatDelay);\n if (repeatType === \"mirror\") animation.flipTarget();\n }\n\n isComplete = false;\n onRepeat && onRepeat();\n }\n\n function complete() {\n driverControls.stop();\n onComplete && onComplete();\n }\n\n function update(delta) {\n if (!isForwardPlayback) delta = -delta;\n elapsed += delta;\n\n if (!isComplete) {\n var state = animation.next(Math.max(0, elapsed));\n latest = state.value;\n if (interpolateFromNumber) latest = interpolateFromNumber(latest);\n isComplete = isForwardPlayback ? state.done : elapsed <= 0;\n }\n\n onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(latest);\n\n if (isComplete) {\n if (repeatCount === 0) computedDuration !== null && computedDuration !== void 0 ? computedDuration : computedDuration = elapsed;\n\n if (repeatCount < repeatMax) {\n hasRepeatDelayElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback) && repeat();\n } else {\n complete();\n }\n }\n }\n\n function play() {\n onPlay === null || onPlay === void 0 ? void 0 : onPlay();\n driverControls = driver(update);\n driverControls.start();\n }\n\n autoplay && play();\n return {\n stop: function stop() {\n onStop === null || onStop === void 0 ? void 0 : onStop();\n driverControls.stop();\n }\n };\n}\n\nexport { animate };","function velocityPerSecond(velocity, frameDuration) {\n return frameDuration ? velocity * (1000 / frameDuration) : 0;\n}\n\nexport { velocityPerSecond };","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\nvar secondsToMilliseconds = function secondsToMilliseconds(seconds) {\n return seconds * 1000;\n};\n\nexport { secondsToMilliseconds };","import { linear } from './index.js';\n\nvar a = function a(a1, a2) {\n return 1.0 - 3.0 * a2 + 3.0 * a1;\n};\n\nvar b = function b(a1, a2) {\n return 3.0 * a2 - 6.0 * a1;\n};\n\nvar c = function c(a1) {\n return 3.0 * a1;\n};\n\nvar calcBezier = function calcBezier(t, a1, a2) {\n return ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n};\n\nvar getSlope = function getSlope(t, a1, a2) {\n return 3.0 * a(a1, a2) * t * t + 2.0 * b(a1, a2) * t + c(a1);\n};\n\nvar subdivisionPrecision = 0.0000001;\nvar subdivisionMaxIterations = 10;\n\nfunction binarySubdivide(aX, aA, aB, mX1, mX2) {\n var currentX;\n var currentT;\n var i = 0;\n\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n\n if (currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while (Math.abs(currentX) > subdivisionPrecision && ++i < subdivisionMaxIterations);\n\n return currentT;\n}\n\nvar newtonIterations = 8;\nvar newtonMinSlope = 0.001;\n\nfunction newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for (var i = 0; i < newtonIterations; ++i) {\n var currentSlope = getSlope(aGuessT, mX1, mX2);\n\n if (currentSlope === 0.0) {\n return aGuessT;\n }\n\n var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n\n return aGuessT;\n}\n\nvar kSplineTableSize = 11;\nvar kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n if (mX1 === mY1 && mX2 === mY2) return linear;\n var sampleValues = new Float32Array(kSplineTableSize);\n\n for (var i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n\n function getTForX(aX) {\n var intervalStart = 0.0;\n var currentSample = 1;\n var lastSample = kSplineTableSize - 1;\n\n for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n\n --currentSample;\n var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n var guessForT = intervalStart + dist * kSampleStepSize;\n var initialSlope = getSlope(guessForT, mX1, mX2);\n\n if (initialSlope >= newtonMinSlope) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if (initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n }\n\n return function (t) {\n return t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n };\n}\n\nexport { cubicBezier };","import { __read } from 'tslib';\nimport { invariant } from 'hey-listen';\nimport { cubicBezier, linear, easeIn, easeInOut, easeOut, circIn, circInOut, circOut, backIn, backInOut, backOut, anticipate, bounceIn, bounceInOut, bounceOut } from 'popmotion';\nvar easingLookup = {\n linear: linear,\n easeIn: easeIn,\n easeInOut: easeInOut,\n easeOut: easeOut,\n circIn: circIn,\n circInOut: circInOut,\n circOut: circOut,\n backIn: backIn,\n backInOut: backInOut,\n backOut: backOut,\n anticipate: anticipate,\n bounceIn: bounceIn,\n bounceInOut: bounceInOut,\n bounceOut: bounceOut\n};\n\nvar easingDefinitionToFunction = function easingDefinitionToFunction(definition) {\n if (Array.isArray(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(definition.length === 4, \"Cubic bezier arrays must contain four numerical values.\");\n\n var _a = __read(definition, 4),\n x1 = _a[0],\n y1 = _a[1],\n x2 = _a[2],\n y2 = _a[3];\n\n return cubicBezier(x1, y1, x2, y2);\n } else if (typeof definition === \"string\") {\n // Else lookup from table\n invariant(easingLookup[definition] !== undefined, \"Invalid easing type '\" + definition + \"'\");\n return easingLookup[definition];\n }\n\n return definition;\n};\n\nvar isEasingArray = function isEasingArray(ease) {\n return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { easingDefinitionToFunction, isEasingArray };","import { complex } from 'style-value-types';\n/**\n * Check if a value is animatable. Examples:\n *\n * ✅: 100, \"100px\", \"#fff\"\n * ❌: \"block\", \"url(2.jpg)\"\n * @param value\n *\n * @internal\n */\n\nvar isAnimatable = function isAnimatable(key, value) {\n // If the list of keys tat might be non-animatable grows, replace with Set\n if (key === \"zIndex\") return false; // If it's a number or a keyframes array, we can animate it. We might at some point\n // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,\n // but for now lets leave it like this for performance reasons\n\n if (typeof value === \"number\" || Array.isArray(value)) return true;\n\n if (typeof value === \"string\" && // It's animatable if we have a string\n complex.test(value) && // And it contains numbers and/or colors\n !value.startsWith(\"url(\") // Unless it starts with \"url(\"\n ) {\n return true;\n }\n\n return false;\n};\n\nexport { isAnimatable };","import { __assign } from 'tslib';\nimport { isKeyframesTarget } from './is-keyframes-target.js';\n\nvar underDampedSpring = function underDampedSpring() {\n return {\n type: \"spring\",\n stiffness: 500,\n damping: 25,\n restDelta: 0.5,\n restSpeed: 10\n };\n};\n\nvar criticallyDampedSpring = function criticallyDampedSpring(to) {\n return {\n type: \"spring\",\n stiffness: 550,\n damping: to === 0 ? 2 * Math.sqrt(550) : 30,\n restDelta: 0.01,\n restSpeed: 10\n };\n};\n\nvar linearTween = function linearTween() {\n return {\n type: \"keyframes\",\n ease: \"linear\",\n duration: 0.3\n };\n};\n\nvar keyframes = function keyframes(values) {\n return {\n type: \"keyframes\",\n duration: 0.8,\n values: values\n };\n};\n\nvar defaultTransitions = {\n x: underDampedSpring,\n y: underDampedSpring,\n z: underDampedSpring,\n rotate: underDampedSpring,\n rotateX: underDampedSpring,\n rotateY: underDampedSpring,\n rotateZ: underDampedSpring,\n scaleX: criticallyDampedSpring,\n scaleY: criticallyDampedSpring,\n scale: criticallyDampedSpring,\n opacity: linearTween,\n backgroundColor: linearTween,\n color: linearTween,\n default: criticallyDampedSpring\n};\n\nvar getDefaultTransition = function getDefaultTransition(valueKey, to) {\n var transitionFactory;\n\n if (isKeyframesTarget(to)) {\n transitionFactory = keyframes;\n } else {\n transitionFactory = defaultTransitions[valueKey] || defaultTransitions.default;\n }\n\n return __assign({\n to: to\n }, transitionFactory(to));\n};\n\nexport { criticallyDampedSpring, getDefaultTransition, linearTween, underDampedSpring };","import { __assign } from 'tslib';\nimport { complex } from './index.js';\nimport { floatRegex } from '../utils.js';\nvar maxDefaults = new Set(['brightness', 'contrast', 'saturate', 'opacity']);\n\nfunction applyDefaultFilter(v) {\n var _a = v.slice(0, -1).split('('),\n name = _a[0],\n value = _a[1];\n\n if (name === 'drop-shadow') return v;\n var number = (value.match(floatRegex) || [])[0];\n if (!number) return v;\n var unit = value.replace(number, '');\n var defaultValue = maxDefaults.has(name) ? 1 : 0;\n if (number !== value) defaultValue *= 100;\n return name + '(' + defaultValue + unit + ')';\n}\n\nvar functionRegex = /([a-z-]*)\\(.*?\\)/g;\n\nvar filter = __assign(__assign({}, complex), {\n getAnimatableNone: function getAnimatableNone(v) {\n var functions = v.match(functionRegex);\n return functions ? functions.map(applyDefaultFilter).join(' ') : v;\n }\n});\n\nexport { filter };","import { __assign } from 'tslib';\nimport { color, filter } from 'style-value-types';\nimport { numberValueTypes } from './number.js';\n/**\n * A map of default value types for common values\n */\n\nvar defaultValueTypes = __assign(__assign({}, numberValueTypes), {\n // Color props\n color: color,\n backgroundColor: color,\n outlineColor: color,\n fill: color,\n stroke: color,\n // Border props\n borderColor: color,\n borderTopColor: color,\n borderRightColor: color,\n borderBottomColor: color,\n borderLeftColor: color,\n filter: filter,\n WebkitFilter: filter\n});\n/**\n * Gets the default ValueType for the provided value key\n */\n\n\nvar getDefaultValueType = function getDefaultValueType(key) {\n return defaultValueTypes[key];\n};\n\nexport { defaultValueTypes, getDefaultValueType };","import { filter, complex } from 'style-value-types';\nimport { getDefaultValueType } from './defaults.js';\n\nfunction getAnimatableNone(key, value) {\n var _a;\n\n var defaultValueType = getDefaultValueType(key);\n if (defaultValueType !== filter) defaultValueType = complex; // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n\n return (_a = defaultValueType.getAnimatableNone) === null || _a === void 0 ? void 0 : _a.call(defaultValueType, value);\n}\n\nexport { getAnimatableNone };","import { __assign, __rest, __spreadArray, __read } from 'tslib';\nimport { inertia, animate } from 'popmotion';\nimport { secondsToMilliseconds } from '../../utils/time-conversion.js';\nimport { isEasingArray, easingDefinitionToFunction } from './easing.js';\nimport { isAnimatable } from './is-animatable.js';\nimport { getDefaultTransition } from './default-transitions.js';\nimport { warning } from 'hey-listen';\nimport { getAnimatableNone } from '../../render/dom/value-types/animatable-none.js';\n/**\n * Decide whether a transition is defined on a given Transition.\n * This filters out orchestration options and returns true\n * if any options are left.\n */\n\nfunction isTransitionDefined(_a) {\n _a.when;\n _a.delay;\n _a.delayChildren;\n _a.staggerChildren;\n _a.staggerDirection;\n _a.repeat;\n _a.repeatType;\n _a.repeatDelay;\n _a.from;\n\n var transition = __rest(_a, [\"when\", \"delay\", \"delayChildren\", \"staggerChildren\", \"staggerDirection\", \"repeat\", \"repeatType\", \"repeatDelay\", \"from\"]);\n\n return !!Object.keys(transition).length;\n}\n\nvar legacyRepeatWarning = false;\n/**\n * Convert Framer Motion's Transition type into Popmotion-compatible options.\n */\n\nfunction convertTransitionToAnimationOptions(_a) {\n var ease = _a.ease,\n times = _a.times,\n yoyo = _a.yoyo,\n flip = _a.flip,\n loop = _a.loop,\n transition = __rest(_a, [\"ease\", \"times\", \"yoyo\", \"flip\", \"loop\"]);\n\n var options = __assign({}, transition);\n\n if (times) options[\"offset\"] = times;\n /**\n * Convert any existing durations from seconds to milliseconds\n */\n\n if (transition.duration) options[\"duration\"] = secondsToMilliseconds(transition.duration);\n if (transition.repeatDelay) options.repeatDelay = secondsToMilliseconds(transition.repeatDelay);\n /**\n * Map easing names to Popmotion's easing functions\n */\n\n if (ease) {\n options[\"ease\"] = isEasingArray(ease) ? ease.map(easingDefinitionToFunction) : easingDefinitionToFunction(ease);\n }\n /**\n * Support legacy transition API\n */\n\n\n if (transition.type === \"tween\") options.type = \"keyframes\";\n /**\n * TODO: These options are officially removed from the API.\n */\n\n if (yoyo || loop || flip) {\n warning(!legacyRepeatWarning, \"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options.\");\n legacyRepeatWarning = true;\n\n if (yoyo) {\n options.repeatType = \"reverse\";\n } else if (loop) {\n options.repeatType = \"loop\";\n } else if (flip) {\n options.repeatType = \"mirror\";\n }\n\n options.repeat = loop || yoyo || flip || transition.repeat;\n }\n /**\n * TODO: Popmotion 9 has the ability to automatically detect whether to use\n * a keyframes or spring animation, but does so by detecting velocity and other spring options.\n * It'd be good to introduce a similar thing here.\n */\n\n\n if (transition.type !== \"spring\") options.type = \"keyframes\";\n return options;\n}\n/**\n * Get the delay for a value by checking Transition with decreasing specificity.\n */\n\n\nfunction getDelayFromTransition(transition, key) {\n var _a;\n\n var valueTransition = getValueTransition(transition, key) || {};\n return (_a = valueTransition.delay) !== null && _a !== void 0 ? _a : 0;\n}\n\nfunction hydrateKeyframes(options) {\n if (Array.isArray(options.to) && options.to[0] === null) {\n options.to = __spreadArray([], __read(options.to));\n options.to[0] = options.from;\n }\n\n return options;\n}\n\nfunction getPopmotionAnimationOptions(transition, options, key) {\n var _a;\n\n if (Array.isArray(options.to)) {\n (_a = transition.duration) !== null && _a !== void 0 ? _a : transition.duration = 0.8;\n }\n\n hydrateKeyframes(options);\n /**\n * Get a default transition if none is determined to be defined.\n */\n\n if (!isTransitionDefined(transition)) {\n transition = __assign(__assign({}, transition), getDefaultTransition(key, options.to));\n }\n\n return __assign(__assign({}, options), convertTransitionToAnimationOptions(transition));\n}\n/**\n *\n */\n\n\nfunction getAnimation(key, value, target, transition, onComplete) {\n var _a;\n\n var valueTransition = getValueTransition(transition, key);\n var origin = (_a = valueTransition.from) !== null && _a !== void 0 ? _a : value.get();\n var isTargetAnimatable = isAnimatable(key, target);\n\n if (origin === \"none\" && isTargetAnimatable && typeof target === \"string\") {\n /**\n * If we're trying to animate from \"none\", try and get an animatable version\n * of the target. This could be improved to work both ways.\n */\n origin = getAnimatableNone(key, target);\n } else if (isZero(origin) && typeof target === \"string\") {\n origin = getZeroUnit(target);\n } else if (!Array.isArray(target) && isZero(target) && typeof origin === \"string\") {\n target = getZeroUnit(origin);\n }\n\n var isOriginAnimatable = isAnimatable(key, origin);\n warning(isOriginAnimatable === isTargetAnimatable, \"You are trying to animate \" + key + \" from \\\"\" + origin + \"\\\" to \\\"\" + target + \"\\\". \" + origin + \" is not an animatable value - to enable this animation set \" + origin + \" to a value animatable to \" + target + \" via the `style` property.\");\n\n function start() {\n var options = {\n from: origin,\n to: target,\n velocity: value.getVelocity(),\n onComplete: onComplete,\n onUpdate: function onUpdate(v) {\n return value.set(v);\n }\n };\n return valueTransition.type === \"inertia\" || valueTransition.type === \"decay\" ? inertia(__assign(__assign({}, options), valueTransition)) : animate(__assign(__assign({}, getPopmotionAnimationOptions(valueTransition, options, key)), {\n onUpdate: function onUpdate(v) {\n var _a;\n\n options.onUpdate(v);\n (_a = valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, v);\n },\n onComplete: function onComplete() {\n var _a;\n\n options.onComplete();\n (_a = valueTransition.onComplete) === null || _a === void 0 ? void 0 : _a.call(valueTransition);\n }\n }));\n }\n\n function set() {\n var _a;\n\n value.set(target);\n onComplete();\n (_a = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onComplete) === null || _a === void 0 ? void 0 : _a.call(valueTransition);\n return {\n stop: function stop() {}\n };\n }\n\n return !isOriginAnimatable || !isTargetAnimatable || valueTransition.type === false ? set : start;\n}\n\nfunction isZero(value) {\n return value === 0 || typeof value === \"string\" && parseFloat(value) === 0 && value.indexOf(\" \") === -1;\n}\n\nfunction getZeroUnit(potentialUnitType) {\n return typeof potentialUnitType === \"number\" ? 0 : getAnimatableNone(\"\", potentialUnitType);\n}\n\nfunction getValueTransition(transition, key) {\n return transition[key] || transition[\"default\"] || transition;\n}\n/**\n * Start animation on a MotionValue. This function is an interface between\n * Framer Motion and Popmotion\n *\n * @internal\n */\n\n\nfunction startAnimation(key, value, target, transition) {\n if (transition === void 0) {\n transition = {};\n }\n\n return value.start(function (onComplete) {\n var delayTimer;\n var controls;\n var animation = getAnimation(key, value, target, transition, onComplete);\n var delay = getDelayFromTransition(transition, key);\n\n var start = function start() {\n return controls = animation();\n };\n\n if (delay) {\n delayTimer = setTimeout(start, secondsToMilliseconds(delay));\n } else {\n start();\n }\n\n return function () {\n clearTimeout(delayTimer);\n controls === null || controls === void 0 ? void 0 : controls.stop();\n };\n });\n}\n\nexport { convertTransitionToAnimationOptions, getDelayFromTransition, getPopmotionAnimationOptions, getValueTransition, getZeroUnit, hydrateKeyframes, isTransitionDefined, isZero, startAnimation };","import { __assign } from 'tslib';\nimport { animate } from './index.js';\nimport { velocityPerSecond } from '../utils/velocity-per-second.js';\nimport { getFrameData } from 'framesync';\n\nfunction inertia(_a) {\n var _b = _a.from,\n from = _b === void 0 ? 0 : _b,\n _c = _a.velocity,\n velocity = _c === void 0 ? 0 : _c,\n min = _a.min,\n max = _a.max,\n _d = _a.power,\n power = _d === void 0 ? 0.8 : _d,\n _e = _a.timeConstant,\n timeConstant = _e === void 0 ? 750 : _e,\n _f = _a.bounceStiffness,\n bounceStiffness = _f === void 0 ? 500 : _f,\n _g = _a.bounceDamping,\n bounceDamping = _g === void 0 ? 10 : _g,\n _h = _a.restDelta,\n restDelta = _h === void 0 ? 1 : _h,\n modifyTarget = _a.modifyTarget,\n driver = _a.driver,\n _onUpdate = _a.onUpdate,\n onComplete = _a.onComplete;\n var currentAnimation;\n\n function isOutOfBounds(v) {\n return min !== undefined && v < min || max !== undefined && v > max;\n }\n\n function boundaryNearest(v) {\n if (min === undefined) return max;\n if (max === undefined) return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n }\n\n function startAnimation(options) {\n currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop();\n currentAnimation = animate(__assign(__assign({}, options), {\n driver: driver,\n onUpdate: function onUpdate(v) {\n var _a;\n\n _onUpdate === null || _onUpdate === void 0 ? void 0 : _onUpdate(v);\n (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, v);\n },\n onComplete: onComplete\n }));\n }\n\n function startSpring(options) {\n startAnimation(__assign({\n type: \"spring\",\n stiffness: bounceStiffness,\n damping: bounceDamping,\n restDelta: restDelta\n }, options));\n }\n\n if (isOutOfBounds(from)) {\n startSpring({\n from: from,\n velocity: velocity,\n to: boundaryNearest(from)\n });\n } else {\n var target = power * velocity + from;\n if (typeof modifyTarget !== \"undefined\") target = modifyTarget(target);\n var boundary_1 = boundaryNearest(target);\n var heading_1 = boundary_1 === min ? -1 : 1;\n var prev_1;\n var current_1;\n\n var checkBoundary = function checkBoundary(v) {\n prev_1 = current_1;\n current_1 = v;\n velocity = velocityPerSecond(v - prev_1, getFrameData().delta);\n\n if (heading_1 === 1 && v > boundary_1 || heading_1 === -1 && v < boundary_1) {\n startSpring({\n from: v,\n to: boundary_1,\n velocity: velocity\n });\n }\n };\n\n startAnimation({\n type: \"decay\",\n from: from,\n velocity: velocity,\n timeConstant: timeConstant,\n power: power,\n restDelta: restDelta,\n modifyTarget: modifyTarget,\n onUpdate: isOutOfBounds(target) ? checkBoundary : undefined\n });\n }\n\n return {\n stop: function stop() {\n return currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop();\n }\n };\n}\n\nexport { inertia };","function addUniqueItem(arr, item) {\n arr.indexOf(item) === -1 && arr.push(item);\n}\n\nfunction removeItem(arr, item) {\n var index = arr.indexOf(item);\n index > -1 && arr.splice(index, 1);\n}\n\nexport { addUniqueItem, removeItem };","import { addUniqueItem, removeItem } from './array.js';\n\nvar SubscriptionManager = function () {\n function SubscriptionManager() {\n this.subscriptions = [];\n }\n\n SubscriptionManager.prototype.add = function (handler) {\n var _this = this;\n\n addUniqueItem(this.subscriptions, handler);\n return function () {\n return removeItem(_this.subscriptions, handler);\n };\n };\n\n SubscriptionManager.prototype.notify = function (a, b, c) {\n var numSubscriptions = this.subscriptions.length;\n if (!numSubscriptions) return;\n\n if (numSubscriptions === 1) {\n /**\n * If there's only a single handler we can just call it without invoking a loop.\n */\n this.subscriptions[0](a, b, c);\n } else {\n for (var i = 0; i < numSubscriptions; i++) {\n /**\n * Check whether the handler exists before firing as it's possible\n * the subscriptions were modified during this loop running.\n */\n var handler = this.subscriptions[i];\n handler && handler(a, b, c);\n }\n }\n };\n\n SubscriptionManager.prototype.getSize = function () {\n return this.subscriptions.length;\n };\n\n SubscriptionManager.prototype.clear = function () {\n this.subscriptions.length = 0;\n };\n\n return SubscriptionManager;\n}();\n\nexport { SubscriptionManager };","import sync, { getFrameData } from 'framesync';\nimport { velocityPerSecond } from 'popmotion';\nimport { SubscriptionManager } from '../utils/subscription-manager.js';\n\nvar isFloat = function isFloat(value) {\n return !isNaN(parseFloat(value));\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\n\n\nvar MotionValue = function () {\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n *\n * @internal\n */\n function MotionValue(init) {\n var _this = this;\n /**\n * Duration, in milliseconds, since last updating frame.\n *\n * @internal\n */\n\n\n this.timeDelta = 0;\n /**\n * Timestamp of the last time this `MotionValue` was updated.\n *\n * @internal\n */\n\n this.lastUpdated = 0;\n /**\n * Functions to notify when the `MotionValue` updates.\n *\n * @internal\n */\n\n this.updateSubscribers = new SubscriptionManager();\n /**\n * Functions to notify when the velocity updates.\n *\n * @internal\n */\n\n this.velocityUpdateSubscribers = new SubscriptionManager();\n /**\n * Functions to notify when the `MotionValue` updates and `render` is set to `true`.\n *\n * @internal\n */\n\n this.renderSubscribers = new SubscriptionManager();\n /**\n * Tracks whether this value can output a velocity. Currently this is only true\n * if the value is numerical, but we might be able to widen the scope here and support\n * other value types.\n *\n * @internal\n */\n\n this.canTrackVelocity = false;\n\n this.updateAndNotify = function (v, render) {\n if (render === void 0) {\n render = true;\n }\n\n _this.prev = _this.current;\n _this.current = v; // Update timestamp\n\n var _a = getFrameData(),\n delta = _a.delta,\n timestamp = _a.timestamp;\n\n if (_this.lastUpdated !== timestamp) {\n _this.timeDelta = delta;\n _this.lastUpdated = timestamp;\n sync.postRender(_this.scheduleVelocityCheck);\n } // Update update subscribers\n\n\n if (_this.prev !== _this.current) {\n _this.updateSubscribers.notify(_this.current);\n } // Update velocity subscribers\n\n\n if (_this.velocityUpdateSubscribers.getSize()) {\n _this.velocityUpdateSubscribers.notify(_this.getVelocity());\n } // Update render subscribers\n\n\n if (render) {\n _this.renderSubscribers.notify(_this.current);\n }\n };\n /**\n * Schedule a velocity check for the next frame.\n *\n * This is an instanced and bound function to prevent generating a new\n * function once per frame.\n *\n * @internal\n */\n\n\n this.scheduleVelocityCheck = function () {\n return sync.postRender(_this.velocityCheck);\n };\n /**\n * Updates `prev` with `current` if the value hasn't been updated this frame.\n * This ensures velocity calculations return `0`.\n *\n * This is an instanced and bound function to prevent generating a new\n * function once per frame.\n *\n * @internal\n */\n\n\n this.velocityCheck = function (_a) {\n var timestamp = _a.timestamp;\n\n if (timestamp !== _this.lastUpdated) {\n _this.prev = _this.current;\n\n _this.velocityUpdateSubscribers.notify(_this.getVelocity());\n }\n };\n\n this.hasAnimated = false;\n this.prev = this.current = init;\n this.canTrackVelocity = isFloat(this.current);\n }\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * @library\n *\n * ```jsx\n * function MyComponent() {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.onChange(updateOpacity)\n * const unsubscribeY = y.onChange(updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return <Frame x={x} />\n * }\n * ```\n *\n * @motion\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.onChange(updateOpacity)\n * const unsubscribeY = y.onChange(updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return <motion.div style={{ x }} />\n * }\n * ```\n *\n * @internalremarks\n *\n * We could look into a `useOnChange` hook if the above lifecycle management proves confusing.\n *\n * ```jsx\n * useOnChange(x, () => {})\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @public\n */\n\n\n MotionValue.prototype.onChange = function (subscription) {\n return this.updateSubscribers.add(subscription);\n };\n\n MotionValue.prototype.clearListeners = function () {\n this.updateSubscribers.clear();\n };\n /**\n * Adds a function that will be notified when the `MotionValue` requests a render.\n *\n * @param subscriber - A function that's provided the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @internal\n */\n\n\n MotionValue.prototype.onRenderRequest = function (subscription) {\n // Render immediately\n subscription(this.get());\n return this.renderSubscribers.add(subscription);\n };\n /**\n * Attaches a passive effect to the `MotionValue`.\n *\n * @internal\n */\n\n\n MotionValue.prototype.attach = function (passiveEffect) {\n this.passiveEffect = passiveEffect;\n };\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n\n\n MotionValue.prototype.set = function (v, render) {\n if (render === void 0) {\n render = true;\n }\n\n if (!render || !this.passiveEffect) {\n this.updateAndNotify(v, render);\n } else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n };\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n\n\n MotionValue.prototype.get = function () {\n return this.current;\n };\n /**\n * @public\n */\n\n\n MotionValue.prototype.getPrevious = function () {\n return this.prev;\n };\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n\n\n MotionValue.prototype.getVelocity = function () {\n // This could be isFloat(this.prev) && isFloat(this.current), but that would be wasteful\n return this.canTrackVelocity ? // These casts could be avoided if parseFloat would be typed better\n velocityPerSecond(parseFloat(this.current) - parseFloat(this.prev), this.timeDelta) : 0;\n };\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n *\n * ```jsx\n * value.start()\n * ```\n *\n * @param animation - A function that starts the provided animation\n *\n * @internal\n */\n\n\n MotionValue.prototype.start = function (animation) {\n var _this = this;\n\n this.stop();\n return new Promise(function (resolve) {\n _this.hasAnimated = true;\n _this.stopAnimation = animation(resolve);\n }).then(function () {\n return _this.clearAnimation();\n });\n };\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n\n\n MotionValue.prototype.stop = function () {\n if (this.stopAnimation) this.stopAnimation();\n this.clearAnimation();\n };\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n\n\n MotionValue.prototype.isAnimating = function () {\n return !!this.stopAnimation;\n };\n\n MotionValue.prototype.clearAnimation = function () {\n this.stopAnimation = null;\n };\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n\n\n MotionValue.prototype.destroy = function () {\n this.updateSubscribers.clear();\n this.renderSubscribers.clear();\n this.stop();\n };\n\n return MotionValue;\n}();\n/**\n * @internal\n */\n\n\nfunction motionValue(init) {\n return new MotionValue(init);\n}\n\nexport { MotionValue, motionValue };","/**\n * Tests a provided value against a ValueType\n */\nvar testValueType = function testValueType(v) {\n return function (type) {\n return type.test(v);\n };\n};\n\nexport { testValueType };","import { number, px, percent, degrees, vw, vh } from 'style-value-types';\nimport { testValueType } from './test.js';\nimport { auto } from './type-auto.js';\n/**\n * A list of value types commonly used for dimensions\n */\n\nvar dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\n\nvar findDimensionValueType = function findDimensionValueType(v) {\n return dimensionValueTypes.find(testValueType(v));\n};\n\nexport { dimensionValueTypes, findDimensionValueType };","/**\n * ValueType for \"auto\"\n */\nvar auto = {\n test: function test(v) {\n return v === \"auto\";\n },\n parse: function parse(v) {\n return v;\n }\n};\nexport { auto };","import { __spreadArray, __read } from 'tslib';\nimport { color, complex } from 'style-value-types';\nimport { dimensionValueTypes } from './dimensions.js';\nimport { testValueType } from './test.js';\n/**\n * A list of all ValueTypes\n */\n\nvar valueTypes = __spreadArray(__spreadArray([], __read(dimensionValueTypes)), [color, complex]);\n/**\n * Tests a value against the list of ValueTypes\n */\n\n\nvar findValueType = function findValueType(v) {\n return valueTypes.find(testValueType(v));\n};\n\nexport { findValueType };","import { __rest, __assign, __spreadArray, __read } from 'tslib';\nimport { complex } from 'style-value-types';\nimport { isNumericalString } from '../../utils/is-numerical-string.js';\nimport { resolveFinalValueInKeyframes } from '../../utils/resolve-value.js';\nimport { motionValue } from '../../value/index.js';\nimport { getAnimatableNone } from '../dom/value-types/animatable-none.js';\nimport { findValueType } from '../dom/value-types/find.js';\nimport { resolveVariant } from './variants.js';\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\n\nfunction setMotionValue(visualElement, key, value) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key).set(value);\n } else {\n visualElement.addValue(key, motionValue(value));\n }\n}\n\nfunction setTarget(visualElement, definition) {\n var resolved = resolveVariant(visualElement, definition);\n\n var _a = resolved ? visualElement.makeTargetAnimatable(resolved, false) : {},\n _b = _a.transitionEnd,\n transitionEnd = _b === void 0 ? {} : _b;\n\n _a.transition;\n\n var target = __rest(_a, [\"transitionEnd\", \"transition\"]);\n\n target = __assign(__assign({}, target), transitionEnd);\n\n for (var key in target) {\n var value = resolveFinalValueInKeyframes(target[key]);\n setMotionValue(visualElement, key, value);\n }\n}\n\nfunction setVariants(visualElement, variantLabels) {\n var reversedLabels = __spreadArray([], __read(variantLabels)).reverse();\n\n reversedLabels.forEach(function (key) {\n var _a;\n\n var variant = visualElement.getVariant(key);\n variant && setTarget(visualElement, variant);\n (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n setVariants(child, variantLabels);\n });\n });\n}\n\nfunction setValues(visualElement, definition) {\n if (Array.isArray(definition)) {\n return setVariants(visualElement, definition);\n } else if (typeof definition === \"string\") {\n return setVariants(visualElement, [definition]);\n } else {\n setTarget(visualElement, definition);\n }\n}\n\nfunction checkTargetForNewValues(visualElement, target, origin) {\n var _a, _b, _c;\n\n var _d;\n\n var newValueKeys = Object.keys(target).filter(function (key) {\n return !visualElement.hasValue(key);\n });\n var numNewValues = newValueKeys.length;\n if (!numNewValues) return;\n\n for (var i = 0; i < numNewValues; i++) {\n var key = newValueKeys[i];\n var targetValue = target[key];\n var value = null;\n /**\n * If the target is a series of keyframes, we can use the first value\n * in the array. If this first value is null, we'll still need to read from the DOM.\n */\n\n if (Array.isArray(targetValue)) {\n value = targetValue[0];\n }\n /**\n * If the target isn't keyframes, or the first keyframe was null, we need to\n * first check if an origin value was explicitly defined in the transition as \"from\",\n * if not read the value from the DOM. As an absolute fallback, take the defined target value.\n */\n\n\n if (value === null) {\n value = (_b = (_a = origin[key]) !== null && _a !== void 0 ? _a : visualElement.readValue(key)) !== null && _b !== void 0 ? _b : target[key];\n }\n /**\n * If value is still undefined or null, ignore it. Preferably this would throw,\n * but this was causing issues in Framer.\n */\n\n\n if (value === undefined || value === null) continue;\n\n if (typeof value === \"string\" && isNumericalString(value)) {\n // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n value = parseFloat(value);\n } else if (!findValueType(value) && complex.test(targetValue)) {\n value = getAnimatableNone(key, targetValue);\n }\n\n visualElement.addValue(key, motionValue(value));\n (_c = (_d = origin)[key]) !== null && _c !== void 0 ? _c : _d[key] = value;\n visualElement.setBaseTarget(key, value);\n }\n}\n\nfunction getOriginFromTransition(key, transition) {\n if (!transition) return;\n var valueTransition = transition[key] || transition[\"default\"] || transition;\n return valueTransition.from;\n}\n\nfunction getOrigin(target, transition, visualElement) {\n var _a, _b;\n\n var origin = {};\n\n for (var key in target) {\n origin[key] = (_a = getOriginFromTransition(key, transition)) !== null && _a !== void 0 ? _a : (_b = visualElement.getValue(key)) === null || _b === void 0 ? void 0 : _b.get();\n }\n\n return origin;\n}\n\nexport { checkTargetForNewValues, getOrigin, getOriginFromTransition, setTarget, setValues };","import { __read, __rest, __assign } from 'tslib';\nimport { startAnimation } from '../../animation/utils/transitions.js';\nimport { setTarget } from './setters.js';\nimport { resolveVariant } from './variants.js';\n/**\n * @internal\n */\n\nfunction animateVisualElement(visualElement, definition, options) {\n if (options === void 0) {\n options = {};\n }\n\n visualElement.notifyAnimationStart();\n var animation;\n\n if (Array.isArray(definition)) {\n var animations = definition.map(function (variant) {\n return animateVariant(visualElement, variant, options);\n });\n animation = Promise.all(animations);\n } else if (typeof definition === \"string\") {\n animation = animateVariant(visualElement, definition, options);\n } else {\n var resolvedDefinition = typeof definition === \"function\" ? resolveVariant(visualElement, definition, options.custom) : definition;\n animation = animateTarget(visualElement, resolvedDefinition, options);\n }\n\n return animation.then(function () {\n return visualElement.notifyAnimationComplete(definition);\n });\n}\n\nfunction animateVariant(visualElement, variant, options) {\n var _a;\n\n if (options === void 0) {\n options = {};\n }\n\n var resolved = resolveVariant(visualElement, variant, options.custom);\n var _b = (resolved || {}).transition,\n transition = _b === void 0 ? visualElement.getDefaultTransition() || {} : _b;\n\n if (options.transitionOverride) {\n transition = options.transitionOverride;\n }\n /**\n * If we have a variant, create a callback that runs it as an animation.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n\n\n var getAnimation = resolved ? function () {\n return animateTarget(visualElement, resolved, options);\n } : function () {\n return Promise.resolve();\n };\n /**\n * If we have children, create a callback that runs all their animations.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n\n var getChildAnimations = ((_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.size) ? function (forwardDelay) {\n if (forwardDelay === void 0) {\n forwardDelay = 0;\n }\n\n var _a = transition.delayChildren,\n delayChildren = _a === void 0 ? 0 : _a,\n staggerChildren = transition.staggerChildren,\n staggerDirection = transition.staggerDirection;\n return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options);\n } : function () {\n return Promise.resolve();\n };\n /**\n * If the transition explicitly defines a \"when\" option, we need to resolve either\n * this animation or all children animations before playing the other.\n */\n\n var when = transition.when;\n\n if (when) {\n var _c = __read(when === \"beforeChildren\" ? [getAnimation, getChildAnimations] : [getChildAnimations, getAnimation], 2),\n first = _c[0],\n last = _c[1];\n\n return first().then(last);\n } else {\n return Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n }\n}\n/**\n * @internal\n */\n\n\nfunction animateTarget(visualElement, definition, _a) {\n var _b;\n\n var _c = _a === void 0 ? {} : _a,\n _d = _c.delay,\n delay = _d === void 0 ? 0 : _d,\n transitionOverride = _c.transitionOverride,\n type = _c.type;\n\n var _e = visualElement.makeTargetAnimatable(definition),\n _f = _e.transition,\n transition = _f === void 0 ? visualElement.getDefaultTransition() : _f,\n transitionEnd = _e.transitionEnd,\n target = __rest(_e, [\"transition\", \"transitionEnd\"]);\n\n if (transitionOverride) transition = transitionOverride;\n var animations = [];\n var animationTypeState = type && ((_b = visualElement.animationState) === null || _b === void 0 ? void 0 : _b.getState()[type]);\n\n for (var key in target) {\n var value = visualElement.getValue(key);\n var valueTarget = target[key];\n\n if (!value || valueTarget === undefined || animationTypeState && shouldBlockAnimation(animationTypeState, key)) {\n continue;\n }\n\n var animation = startAnimation(key, value, valueTarget, __assign({\n delay: delay\n }, transition));\n animations.push(animation);\n }\n\n return Promise.all(animations).then(function () {\n transitionEnd && setTarget(visualElement, transitionEnd);\n });\n}\n\nfunction animateChildren(visualElement, variant, delayChildren, staggerChildren, staggerDirection, options) {\n if (delayChildren === void 0) {\n delayChildren = 0;\n }\n\n if (staggerChildren === void 0) {\n staggerChildren = 0;\n }\n\n if (staggerDirection === void 0) {\n staggerDirection = 1;\n }\n\n var animations = [];\n var maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;\n var generateStaggerDuration = staggerDirection === 1 ? function (i) {\n if (i === void 0) {\n i = 0;\n }\n\n return i * staggerChildren;\n } : function (i) {\n if (i === void 0) {\n i = 0;\n }\n\n return maxStaggerDuration - i * staggerChildren;\n };\n Array.from(visualElement.variantChildren).sort(sortByTreeOrder).forEach(function (child, i) {\n animations.push(animateVariant(child, variant, __assign(__assign({}, options), {\n delay: delayChildren + generateStaggerDuration(i)\n })).then(function () {\n return child.notifyAnimationComplete(variant);\n }));\n });\n return Promise.all(animations);\n}\n\nfunction stopAnimation(visualElement) {\n visualElement.forEachValue(function (value) {\n return value.stop();\n });\n}\n\nfunction sortByTreeOrder(a, b) {\n return a.sortNodePosition(b);\n}\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\n\n\nfunction shouldBlockAnimation(_a, key) {\n var protectedKeys = _a.protectedKeys,\n needsAnimating = _a.needsAnimating;\n var shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n needsAnimating[key] = false;\n return shouldBlock;\n}\n\nexport { animateVisualElement, sortByTreeOrder, stopAnimation };","import { __spreadArray, __read, __assign, __rest } from 'tslib';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.js';\nimport { isKeyframesTarget } from '../../animation/utils/is-keyframes-target.js';\nimport { shallowCompare } from '../../utils/shallow-compare.js';\nimport { animateVisualElement } from './animation.js';\nimport { AnimationType } from './types.js';\nimport { isVariantLabels, resolveVariant, isVariantLabel } from './variants.js';\nvar variantPriorityOrder = [AnimationType.Animate, AnimationType.Hover, AnimationType.Tap, AnimationType.Drag, AnimationType.Focus, AnimationType.Exit];\n\nvar reversePriorityOrder = __spreadArray([], __read(variantPriorityOrder)).reverse();\n\nvar numAnimationTypes = variantPriorityOrder.length;\n\nfunction animateList(visualElement) {\n return function (animations) {\n return Promise.all(animations.map(function (_a) {\n var animation = _a.animation,\n options = _a.options;\n return animateVisualElement(visualElement, animation, options);\n }));\n };\n}\n\nfunction createAnimationState(visualElement) {\n var animate = animateList(visualElement);\n var state = createState();\n var allAnimatedKeys = {};\n var isInitialRender = true;\n /**\n * This function will be used to reduce the animation definitions for\n * each active animation type into an object of resolved values for it.\n */\n\n var buildResolvedTypeValues = function buildResolvedTypeValues(acc, definition) {\n var resolved = resolveVariant(visualElement, definition);\n\n if (resolved) {\n resolved.transition;\n\n var transitionEnd = resolved.transitionEnd,\n target = __rest(resolved, [\"transition\", \"transitionEnd\"]);\n\n acc = __assign(__assign(__assign({}, acc), target), transitionEnd);\n }\n\n return acc;\n };\n\n function isAnimated(key) {\n return allAnimatedKeys[key] !== undefined;\n }\n /**\n * This just allows us to inject mocked animation functions\n * @internal\n */\n\n\n function setAnimateFunction(makeAnimator) {\n animate = makeAnimator(visualElement);\n }\n /**\n * When we receive new props, we need to:\n * 1. Create a list of protected keys for each type. This is a directory of\n * value keys that are currently being \"handled\" by types of a higher priority\n * so that whenever an animation is played of a given type, these values are\n * protected from being animated.\n * 2. Determine if an animation type needs animating.\n * 3. Determine if any values have been removed from a type and figure out\n * what to animate those to.\n */\n\n\n function animateChanges(options, changedActiveType) {\n var _a;\n\n var props = visualElement.getProps();\n var context = visualElement.getVariantContext(true) || {};\n /**\n * A list of animations that we'll build into as we iterate through the animation\n * types. This will get executed at the end of the function.\n */\n\n var animations = [];\n /**\n * Keep track of which values have been removed. Then, as we hit lower priority\n * animation types, we can check if they contain removed values and animate to that.\n */\n\n var removedKeys = new Set();\n /**\n * A dictionary of all encountered keys. This is an object to let us build into and\n * copy it without iteration. Each time we hit an animation type we set its protected\n * keys - the keys its not allowed to animate - to the latest version of this object.\n */\n\n var encounteredKeys = {};\n /**\n * If a variant has been removed at a given index, and this component is controlling\n * variant animations, we want to ensure lower-priority variants are forced to animate.\n */\n\n var removedVariantIndex = Infinity;\n\n var _loop_1 = function _loop_1(i) {\n var type = reversePriorityOrder[i];\n var typeState = state[type];\n var prop = (_a = props[type]) !== null && _a !== void 0 ? _a : context[type];\n var propIsVariant = isVariantLabel(prop);\n /**\n * If this type has *just* changed isActive status, set activeDelta\n * to that status. Otherwise set to null.\n */\n\n var activeDelta = type === changedActiveType ? typeState.isActive : null;\n if (activeDelta === false) removedVariantIndex = i;\n /**\n * If this prop is an inherited variant, rather than been set directly on the\n * component itself, we want to make sure we allow the parent to trigger animations.\n *\n * TODO: Can probably change this to a !isControllingVariants check\n */\n\n var isInherited = prop === context[type] && prop !== props[type] && propIsVariant;\n /**\n *\n */\n\n if (isInherited && isInitialRender && visualElement.manuallyAnimateOnMount) {\n isInherited = false;\n }\n /**\n * Set all encountered keys so far as the protected keys for this type. This will\n * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n */\n\n\n typeState.protectedKeys = __assign({}, encounteredKeys); // Check if we can skip analysing this prop early\n\n if ( // If it isn't active and hasn't *just* been set as inactive\n !typeState.isActive && activeDelta === null || !prop && !typeState.prevProp || // Or if the prop doesn't define an animation\n isAnimationControls(prop) || typeof prop === \"boolean\") {\n return \"continue\";\n }\n /**\n * As we go look through the values defined on this type, if we detect\n * a changed value or a value that was removed in a higher priority, we set\n * this to true and add this prop to the animation list.\n */\n\n\n var shouldAnimateType = variantsHaveChanged(typeState.prevProp, prop) || type === changedActiveType && typeState.isActive && !isInherited && propIsVariant || i > removedVariantIndex && propIsVariant;\n /**\n * As animations can be set as variant lists, variants or target objects, we\n * coerce everything to an array if it isn't one already\n */\n\n var definitionList = Array.isArray(prop) ? prop : [prop];\n /**\n * Build an object of all the resolved values. We'll use this in the subsequent\n * animateChanges calls to determine whether a value has changed.\n */\n\n var resolvedValues = definitionList.reduce(buildResolvedTypeValues, {});\n if (activeDelta === false) resolvedValues = {};\n /**\n * Now we need to loop through all the keys in the prev prop and this prop,\n * and decide:\n * 1. If the value has changed, and needs animating\n * 2. If it has been removed, and needs adding to the removedKeys set\n * 3. If it has been removed in a higher priority type and needs animating\n * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n * needs adding to the type's protectedKeys list.\n */\n\n var _b = typeState.prevResolvedValues,\n prevResolvedValues = _b === void 0 ? {} : _b;\n\n var allKeys = __assign(__assign({}, prevResolvedValues), resolvedValues);\n\n var markToAnimate = function markToAnimate(key) {\n shouldAnimateType = true;\n removedKeys.delete(key);\n typeState.needsAnimating[key] = true;\n };\n\n for (var key in allKeys) {\n var next = resolvedValues[key];\n var prev = prevResolvedValues[key]; // If we've already handled this we can just skip ahead\n\n if (encounteredKeys.hasOwnProperty(key)) continue;\n /**\n * If the value has changed, we probably want to animate it.\n */\n\n if (next !== prev) {\n /**\n * If both values are keyframes, we need to shallow compare them to\n * detect whether any value has changed. If it has, we animate it.\n */\n if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n if (!shallowCompare(next, prev)) {\n markToAnimate(key);\n } else {\n /**\n * If it hasn't changed, we want to ensure it doesn't animate by\n * adding it to the list of protected keys.\n */\n typeState.protectedKeys[key] = true;\n }\n } else if (next !== undefined) {\n // If next is defined and doesn't equal prev, it needs animating\n markToAnimate(key);\n } else {\n // If it's undefined, it's been removed.\n removedKeys.add(key);\n }\n } else if (next !== undefined && removedKeys.has(key)) {\n /**\n * If next hasn't changed and it isn't undefined, we want to check if it's\n * been removed by a higher priority\n */\n markToAnimate(key);\n } else {\n /**\n * If it hasn't changed, we add it to the list of protected values\n * to ensure it doesn't get animated.\n */\n typeState.protectedKeys[key] = true;\n }\n }\n /**\n * Update the typeState so next time animateChanges is called we can compare the\n * latest prop and resolvedValues to these.\n */\n\n\n typeState.prevProp = prop;\n typeState.prevResolvedValues = resolvedValues;\n /**\n *\n */\n\n if (typeState.isActive) {\n encounteredKeys = __assign(__assign({}, encounteredKeys), resolvedValues);\n }\n\n if (isInitialRender && visualElement.blockInitialAnimation) {\n shouldAnimateType = false;\n }\n /**\n * If this is an inherited prop we want to hard-block animations\n * TODO: Test as this should probably still handle animations triggered\n * by removed values?\n */\n\n\n if (shouldAnimateType && !isInherited) {\n animations.push.apply(animations, __spreadArray([], __read(definitionList.map(function (animation) {\n return {\n animation: animation,\n options: __assign({\n type: type\n }, options)\n };\n }))));\n }\n };\n /**\n * Iterate through all animation types in reverse priority order. For each, we want to\n * detect which values it's handling and whether or not they've changed (and therefore\n * need to be animated). If any values have been removed, we want to detect those in\n * lower priority props and flag for animation.\n */\n\n\n for (var i = 0; i < numAnimationTypes; i++) {\n _loop_1(i);\n }\n\n allAnimatedKeys = __assign({}, encounteredKeys);\n /**\n * If there are some removed value that haven't been dealt with,\n * we need to create a new animation that falls back either to the value\n * defined in the style prop, or the last read value.\n */\n\n if (removedKeys.size) {\n var fallbackAnimation_1 = {};\n removedKeys.forEach(function (key) {\n var fallbackTarget = visualElement.getBaseTarget(key);\n\n if (fallbackTarget !== undefined) {\n fallbackAnimation_1[key] = fallbackTarget;\n }\n });\n animations.push({\n animation: fallbackAnimation_1\n });\n }\n\n var shouldAnimate = Boolean(animations.length);\n\n if (isInitialRender && props.initial === false && !visualElement.manuallyAnimateOnMount) {\n shouldAnimate = false;\n }\n\n isInitialRender = false;\n return shouldAnimate ? animate(animations) : Promise.resolve();\n }\n /**\n * Change whether a certain animation type is active.\n */\n\n\n function setActive(type, isActive, options) {\n var _a; // If the active state hasn't changed, we can safely do nothing here\n\n\n if (state[type].isActive === isActive) return Promise.resolve(); // Propagate active change to children\n\n (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n var _a;\n\n return (_a = child.animationState) === null || _a === void 0 ? void 0 : _a.setActive(type, isActive);\n });\n state[type].isActive = isActive;\n return animateChanges(options, type);\n }\n\n return {\n isAnimated: isAnimated,\n animateChanges: animateChanges,\n setActive: setActive,\n setAnimateFunction: setAnimateFunction,\n getState: function getState() {\n return state;\n }\n };\n}\n\nfunction variantsHaveChanged(prev, next) {\n if (typeof next === \"string\") {\n return next !== prev;\n } else if (isVariantLabels(next)) {\n return !shallowCompare(next, prev);\n }\n\n return false;\n}\n\nfunction createTypeState(isActive) {\n if (isActive === void 0) {\n isActive = false;\n }\n\n return {\n isActive: isActive,\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {}\n };\n}\n\nfunction createState() {\n var _a;\n\n return _a = {}, _a[AnimationType.Animate] = createTypeState(true), _a[AnimationType.Hover] = createTypeState(), _a[AnimationType.Tap] = createTypeState(), _a[AnimationType.Drag] = createTypeState(), _a[AnimationType.Focus] = createTypeState(), _a[AnimationType.Exit] = createTypeState(), _a;\n}\n\nexport { createAnimationState, variantPriorityOrder, variantsHaveChanged };","import { __read } from 'tslib';\nimport { useEffect, useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.js';\nimport { usePresence } from '../../components/AnimatePresence/use-presence.js';\nimport { PresenceContext } from '../../context/PresenceContext.js';\nimport { createAnimationState } from '../../render/utils/animation-state.js';\nimport { AnimationType } from '../../render/utils/types.js';\nimport { makeRenderlessComponent } from '../utils/make-renderless-component.js';\nvar animations = {\n animation: makeRenderlessComponent(function (_a) {\n var visualElement = _a.visualElement,\n animate = _a.animate;\n /**\n * We dynamically generate the AnimationState manager as it contains a reference\n * to the underlying animation library. We only want to load that if we load this,\n * so people can optionally code split it out using the `m` component.\n */\n\n visualElement.animationState || (visualElement.animationState = createAnimationState(visualElement));\n /**\n * Subscribe any provided AnimationControls to the component's VisualElement\n */\n\n if (isAnimationControls(animate)) {\n useEffect(function () {\n return animate.subscribe(visualElement);\n }, [animate]);\n }\n }),\n exit: makeRenderlessComponent(function (props) {\n var custom = props.custom,\n visualElement = props.visualElement;\n\n var _a = __read(usePresence(), 2),\n isPresent = _a[0],\n onExitComplete = _a[1];\n\n var presenceContext = useContext(PresenceContext);\n useEffect(function () {\n var _a, _b;\n\n var animation = (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Exit, !isPresent, {\n custom: (_b = presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.custom) !== null && _b !== void 0 ? _b : custom\n });\n !isPresent && (animation === null || animation === void 0 ? void 0 : animation.then(onExitComplete));\n }, [isPresent]);\n })\n};\nexport { animations };","var isPoint = function isPoint(point) {\n return point.hasOwnProperty('x') && point.hasOwnProperty('y');\n};\n\nexport { isPoint };","import { isPoint } from './is-point.js';\n\nvar isPoint3D = function isPoint3D(point) {\n return isPoint(point) && point.hasOwnProperty('z');\n};\n\nexport { isPoint3D };","import { isPoint } from './is-point.js';\nimport { isPoint3D } from './is-point-3d.js';\nimport { isNum } from './inc.js';\n\nvar distance1D = function distance1D(a, b) {\n return Math.abs(a - b);\n};\n\nfunction distance(a, b) {\n if (isNum(a) && isNum(b)) {\n return distance1D(a, b);\n } else if (isPoint(a) && isPoint(b)) {\n var xDelta = distance1D(a.x, b.x);\n var yDelta = distance1D(a.y, b.y);\n var zDelta = isPoint3D(a) && isPoint3D(b) ? distance1D(a.z, b.z) : 0;\n return Math.sqrt(Math.pow(xDelta, 2) + Math.pow(yDelta, 2) + Math.pow(zDelta, 2));\n }\n}\n\nexport { distance };","import { __assign } from 'tslib';\nimport { isMouseEvent, isTouchEvent } from './utils/event-type.js';\nimport { extractEventInfo } from '../events/event-info.js';\nimport sync, { getFrameData, cancelSync } from 'framesync';\nimport { secondsToMilliseconds } from '../utils/time-conversion.js';\nimport { addPointerEvent } from '../events/use-pointer-event.js';\nimport { distance, pipe } from 'popmotion';\n/**\n * @internal\n */\n\nvar PanSession = function () {\n function PanSession(event, handlers, _a) {\n var _this = this;\n\n var _b = _a === void 0 ? {} : _a,\n transformPagePoint = _b.transformPagePoint;\n /**\n * @internal\n */\n\n\n this.startEvent = null;\n /**\n * @internal\n */\n\n this.lastMoveEvent = null;\n /**\n * @internal\n */\n\n this.lastMoveEventInfo = null;\n /**\n * @internal\n */\n\n this.handlers = {};\n\n this.updatePoint = function () {\n if (!(_this.lastMoveEvent && _this.lastMoveEventInfo)) return;\n var info = getPanInfo(_this.lastMoveEventInfo, _this.history);\n var isPanStarted = _this.startEvent !== null; // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursoe.\n\n var isDistancePastThreshold = distance(info.offset, {\n x: 0,\n y: 0\n }) >= 3;\n if (!isPanStarted && !isDistancePastThreshold) return;\n var point = info.point;\n var timestamp = getFrameData().timestamp;\n\n _this.history.push(__assign(__assign({}, point), {\n timestamp: timestamp\n }));\n\n var _a = _this.handlers,\n onStart = _a.onStart,\n onMove = _a.onMove;\n\n if (!isPanStarted) {\n onStart && onStart(_this.lastMoveEvent, info);\n _this.startEvent = _this.lastMoveEvent;\n }\n\n onMove && onMove(_this.lastMoveEvent, info);\n };\n\n this.handlePointerMove = function (event, info) {\n _this.lastMoveEvent = event;\n _this.lastMoveEventInfo = transformPoint(info, _this.transformPagePoint); // Because Safari doesn't trigger mouseup events when it's above a `<select>`\n\n if (isMouseEvent(event) && event.buttons === 0) {\n _this.handlePointerUp(event, info);\n\n return;\n } // Throttle mouse move event to once per frame\n\n\n sync.update(_this.updatePoint, true);\n };\n\n this.handlePointerUp = function (event, info) {\n _this.end();\n\n var _a = _this.handlers,\n onEnd = _a.onEnd,\n onSessionEnd = _a.onSessionEnd;\n var panInfo = getPanInfo(transformPoint(info, _this.transformPagePoint), _this.history);\n\n if (_this.startEvent && onEnd) {\n onEnd(event, panInfo);\n }\n\n onSessionEnd && onSessionEnd(event, panInfo);\n }; // If we have more than one touch, don't start detecting this gesture\n\n\n if (isTouchEvent(event) && event.touches.length > 1) return;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n var info = extractEventInfo(event);\n var initialInfo = transformPoint(info, this.transformPagePoint);\n var point = initialInfo.point;\n var timestamp = getFrameData().timestamp;\n this.history = [__assign(__assign({}, point), {\n timestamp: timestamp\n })];\n var onSessionStart = handlers.onSessionStart;\n onSessionStart && onSessionStart(event, getPanInfo(initialInfo, this.history));\n this.removeListeners = pipe(addPointerEvent(window, \"pointermove\", this.handlePointerMove), addPointerEvent(window, \"pointerup\", this.handlePointerUp), addPointerEvent(window, \"pointercancel\", this.handlePointerUp));\n }\n\n PanSession.prototype.updateHandlers = function (handlers) {\n this.handlers = handlers;\n };\n\n PanSession.prototype.end = function () {\n this.removeListeners && this.removeListeners();\n cancelSync.update(this.updatePoint);\n };\n\n return PanSession;\n}();\n\nfunction transformPoint(info, transformPagePoint) {\n return transformPagePoint ? {\n point: transformPagePoint(info.point)\n } : info;\n}\n\nfunction subtractPoint(a, b) {\n return {\n x: a.x - b.x,\n y: a.y - b.y\n };\n}\n\nfunction getPanInfo(_a, history) {\n var point = _a.point;\n return {\n point: point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1)\n };\n}\n\nfunction startDevicePoint(history) {\n return history[0];\n}\n\nfunction lastDevicePoint(history) {\n return history[history.length - 1];\n}\n\nfunction getVelocity(history, timeDelta) {\n if (history.length < 2) {\n return {\n x: 0,\n y: 0\n };\n }\n\n var i = history.length - 1;\n var timestampedPoint = null;\n var lastPoint = lastDevicePoint(history);\n\n while (i >= 0) {\n timestampedPoint = history[i];\n\n if (lastPoint.timestamp - timestampedPoint.timestamp > secondsToMilliseconds(timeDelta)) {\n break;\n }\n\n i--;\n }\n\n if (!timestampedPoint) {\n return {\n x: 0,\n y: 0\n };\n }\n\n var time = (lastPoint.timestamp - timestampedPoint.timestamp) / 1000;\n\n if (time === 0) {\n return {\n x: 0,\n y: 0\n };\n }\n\n var currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time\n };\n\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0;\n }\n\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0;\n }\n\n return currentVelocity;\n}\n\nexport { PanSession };","// Call a handler once for each axis\nfunction eachAxis(handler) {\n return [handler(\"x\"), handler(\"y\")];\n}\n\nexport { eachAxis };","import { __read } from 'tslib';\nimport { mix } from 'popmotion';\n/**\n * Apply constraints to a point. These constraints are both physical along an\n * axis, and an elastic factor that determines how much to constrain the point\n * by if it does lie outside the defined parameters.\n */\n\nfunction applyConstraints(point, _a, elastic) {\n var min = _a.min,\n max = _a.max;\n\n if (min !== undefined && point < min) {\n // If we have a min point defined, and this is outside of that, constrain\n point = elastic ? mix(min, point, elastic.min) : Math.max(point, min);\n } else if (max !== undefined && point > max) {\n // If we have a max point defined, and this is outside of that, constrain\n point = elastic ? mix(max, point, elastic.max) : Math.min(point, max);\n }\n\n return point;\n}\n/**\n * Calculates a min projection point based on a pointer, pointer progress\n * within the drag target, and constraints.\n *\n * For instance if an element was 100px width, we were dragging from 0.25\n * along this axis, the pointer is at 200px, and there were no constraints,\n * we would calculate a min projection point of 175px.\n */\n\n\nfunction calcConstrainedMinPoint(point, length, progress, constraints, elastic) {\n // Calculate a min point for this axis and apply it to the current pointer\n var min = point - length * progress;\n return constraints ? applyConstraints(min, constraints, elastic) : min;\n}\n/**\n * Calculate constraints in terms of the viewport when defined relatively to the\n * measured axis. This is measured from the nearest edge, so a max constraint of 200\n * on an axis with a max value of 300 would return a constraint of 500 - axis length\n */\n\n\nfunction calcRelativeAxisConstraints(axis, min, max) {\n return {\n min: min !== undefined ? axis.min + min : undefined,\n max: max !== undefined ? axis.max + max - (axis.max - axis.min) : undefined\n };\n}\n/**\n * Calculate constraints in terms of the viewport when\n * defined relatively to the measured bounding box.\n */\n\n\nfunction calcRelativeConstraints(layoutBox, _a) {\n var top = _a.top,\n left = _a.left,\n bottom = _a.bottom,\n right = _a.right;\n return {\n x: calcRelativeAxisConstraints(layoutBox.x, left, right),\n y: calcRelativeAxisConstraints(layoutBox.y, top, bottom)\n };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative axis\n */\n\n\nfunction calcViewportAxisConstraints(layoutAxis, constraintsAxis) {\n var _a;\n\n var min = constraintsAxis.min - layoutAxis.min;\n var max = constraintsAxis.max - layoutAxis.max; // If the constraints axis is actually smaller than the layout axis then we can\n // flip the constraints\n\n if (constraintsAxis.max - constraintsAxis.min < layoutAxis.max - layoutAxis.min) {\n _a = __read([max, min], 2), min = _a[0], max = _a[1];\n }\n\n return {\n min: layoutAxis.min + min,\n max: layoutAxis.min + max\n };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative box\n */\n\n\nfunction calcViewportConstraints(layoutBox, constraintsBox) {\n return {\n x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),\n y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y)\n };\n}\n/**\n * Calculate the an axis position based on two axes and a progress value.\n */\n\n\nfunction calcPositionFromProgress(axis, constraints, progress) {\n var axisLength = axis.max - axis.min;\n var min = mix(constraints.min, constraints.max - axisLength, progress);\n return {\n min: min,\n max: min + axisLength\n };\n}\n/**\n * Rebase the calculated viewport constraints relative to the layout.min point.\n */\n\n\nfunction rebaseAxisConstraints(layout, constraints) {\n var relativeConstraints = {};\n\n if (constraints.min !== undefined) {\n relativeConstraints.min = constraints.min - layout.min;\n }\n\n if (constraints.max !== undefined) {\n relativeConstraints.max = constraints.max - layout.min;\n }\n\n return relativeConstraints;\n}\n\nvar defaultElastic = 0.35;\n/**\n * Accepts a dragElastic prop and returns resolved elastic values for each axis.\n */\n\nfunction resolveDragElastic(dragElastic) {\n if (dragElastic === false) {\n dragElastic = 0;\n } else if (dragElastic === true) {\n dragElastic = defaultElastic;\n }\n\n return {\n x: resolveAxisElastic(dragElastic, \"left\", \"right\"),\n y: resolveAxisElastic(dragElastic, \"top\", \"bottom\")\n };\n}\n\nfunction resolveAxisElastic(dragElastic, minLabel, maxLabel) {\n return {\n min: resolvePointElastic(dragElastic, minLabel),\n max: resolvePointElastic(dragElastic, maxLabel)\n };\n}\n\nfunction resolvePointElastic(dragElastic, label) {\n var _a;\n\n return typeof dragElastic === \"number\" ? dragElastic : (_a = dragElastic[label]) !== null && _a !== void 0 ? _a : 0;\n}\n\nexport { applyConstraints, calcConstrainedMinPoint, calcPositionFromProgress, calcRelativeAxisConstraints, calcRelativeConstraints, calcViewportAxisConstraints, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, resolveAxisElastic, resolveDragElastic, resolvePointElastic };","import { convertBoundingBoxToAxisBox, transformBoundingBox } from '../../../utils/geometry/index.js';\n/**\n * Measure and return the element bounding box.\n *\n * We convert the box into an AxisBox2D to make it easier to work with each axis\n * individually and programmatically.\n *\n * This function optionally accepts a transformPagePoint function which allows us to compensate\n * for, for instance, measuring the element within a scaled plane like a Framer devivce preview component.\n */\n\nfunction getBoundingBox(element, transformPagePoint) {\n var box = element.getBoundingClientRect();\n return convertBoundingBoxToAxisBox(transformBoundingBox(box, transformPagePoint));\n}\n\nexport { getBoundingBox };","import { mix, distance, clamp, progress } from 'popmotion';\n\nvar clampProgress = function clampProgress(v) {\n return clamp(0, 1, v);\n};\n/**\n * Returns true if the provided value is within maxDistance of the provided target\n */\n\n\nfunction isNear(value, target, maxDistance) {\n if (target === void 0) {\n target = 0;\n }\n\n if (maxDistance === void 0) {\n maxDistance = 0.01;\n }\n\n return distance(value, target) < maxDistance;\n}\n\nfunction calcLength(axis) {\n return axis.max - axis.min;\n}\n/**\n * Calculate a transform origin relative to the source axis, between 0-1, that results\n * in an asthetically pleasing scale/transform needed to project from source to target.\n */\n\n\nfunction calcOrigin(source, target) {\n var origin = 0.5;\n var sourceLength = calcLength(source);\n var targetLength = calcLength(target);\n\n if (targetLength > sourceLength) {\n origin = progress(target.min, target.max - sourceLength, source.min);\n } else if (sourceLength > targetLength) {\n origin = progress(source.min, source.max - targetLength, target.min);\n }\n\n return clampProgress(origin);\n}\n/**\n * Update the AxisDelta with a transform that projects source into target.\n *\n * The transform `origin` is optional. If not provided, it'll be automatically\n * calculated based on the relative positions of the two bounding boxes.\n */\n\n\nfunction updateAxisDelta(delta, source, target, origin) {\n if (origin === void 0) {\n origin = 0.5;\n }\n\n delta.origin = origin;\n delta.originPoint = mix(source.min, source.max, delta.origin);\n delta.scale = calcLength(target) / calcLength(source);\n if (isNear(delta.scale, 1, 0.0001)) delta.scale = 1;\n delta.translate = mix(target.min, target.max, delta.origin) - delta.originPoint;\n if (isNear(delta.translate)) delta.translate = 0;\n}\n/**\n * Update the BoxDelta with a transform that projects the source into the target.\n *\n * The transform `origin` is optional. If not provided, it'll be automatically\n * calculated based on the relative positions of the two bounding boxes.\n */\n\n\nfunction updateBoxDelta(delta, source, target, origin) {\n updateAxisDelta(delta.x, source.x, target.x, defaultOrigin(origin.originX));\n updateAxisDelta(delta.y, source.y, target.y, defaultOrigin(origin.originY));\n}\n/**\n * Currently this only accepts numerical origins, measured as 0-1, but could\n * accept pixel values by comparing to the target axis.\n */\n\n\nfunction defaultOrigin(origin) {\n return typeof origin === \"number\" ? origin : 0.5;\n}\n\nfunction calcRelativeAxis(target, relative, parent) {\n target.min = parent.min + relative.min;\n target.max = target.min + calcLength(relative);\n}\n\nfunction calcRelativeBox(projection, parentProjection) {\n calcRelativeAxis(projection.target.x, projection.relativeTarget.x, parentProjection.target.x);\n calcRelativeAxis(projection.target.y, projection.relativeTarget.y, parentProjection.target.y);\n}\n\nexport { calcOrigin, calcRelativeAxis, calcRelativeBox, isNear, updateAxisDelta, updateBoxDelta };","import { mix } from 'popmotion';\n\nfunction tweenAxis(target, prev, next, p) {\n target.min = mix(prev.min, next.min, p);\n target.max = mix(prev.max, next.max, p);\n}\n\nfunction calcRelativeOffsetAxis(parent, child) {\n return {\n min: child.min - parent.min,\n max: child.max - parent.min\n };\n}\n\nfunction calcRelativeOffset(parent, child) {\n return {\n x: calcRelativeOffsetAxis(parent.x, child.x),\n y: calcRelativeOffsetAxis(parent.y, child.y)\n };\n}\n\nfunction checkIfParentHasChanged(prev, next) {\n var prevId = prev.getLayoutId();\n var nextId = next.getLayoutId();\n return prevId !== nextId || nextId === undefined && prev !== next;\n}\n\nexport { calcRelativeOffset, calcRelativeOffsetAxis, checkIfParentHasChanged, tweenAxis };","function isDraggable(visualElement) {\n var _a = visualElement.getProps(),\n drag = _a.drag,\n _dragX = _a._dragX;\n\n return drag && !_dragX;\n}\n\nexport { isDraggable };","import { __read } from 'tslib';\nimport { mix } from 'popmotion';\nimport { isDraggable } from '../../render/utils/is-draggable.js';\n/**\n * Reset an axis to the provided origin box.\n *\n * This is a mutative operation.\n */\n\nfunction resetAxis(axis, originAxis) {\n axis.min = originAxis.min;\n axis.max = originAxis.max;\n}\n/**\n * Reset a box to the provided origin box.\n *\n * This is a mutative operation.\n */\n\n\nfunction resetBox(box, originBox) {\n resetAxis(box.x, originBox.x);\n resetAxis(box.y, originBox.y);\n}\n/**\n * Scales a point based on a factor and an originPoint\n */\n\n\nfunction scalePoint(point, scale, originPoint) {\n var distanceFromOrigin = point - originPoint;\n var scaled = scale * distanceFromOrigin;\n return originPoint + scaled;\n}\n/**\n * Applies a translate/scale delta to a point\n */\n\n\nfunction applyPointDelta(point, translate, scale, originPoint, boxScale) {\n if (boxScale !== undefined) {\n point = scalePoint(point, boxScale, originPoint);\n }\n\n return scalePoint(point, scale, originPoint) + translate;\n}\n/**\n * Applies a translate/scale delta to an axis\n */\n\n\nfunction applyAxisDelta(axis, translate, scale, originPoint, boxScale) {\n if (translate === void 0) {\n translate = 0;\n }\n\n if (scale === void 0) {\n scale = 1;\n }\n\n axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Applies a translate/scale delta to a box\n */\n\n\nfunction applyBoxDelta(box, _a) {\n var x = _a.x,\n y = _a.y;\n applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);\n applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);\n}\n/**\n * Apply a transform to an axis from the latest resolved motion values.\n * This function basically acts as a bridge between a flat motion value map\n * and applyAxisDelta\n */\n\n\nfunction applyAxisTransforms(final, axis, transforms, _a) {\n var _b = __read(_a, 3),\n key = _b[0],\n scaleKey = _b[1],\n originKey = _b[2]; // Copy the current axis to the final axis before mutation\n\n\n final.min = axis.min;\n final.max = axis.max;\n var axisOrigin = transforms[originKey] !== undefined ? transforms[originKey] : 0.5;\n var originPoint = mix(axis.min, axis.max, axisOrigin); // Apply the axis delta to the final axis\n\n applyAxisDelta(final, transforms[key], transforms[scaleKey], originPoint, transforms.scale);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\n\n\nvar xKeys = [\"x\", \"scaleX\", \"originX\"];\nvar yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\n\nfunction applyBoxTransforms(finalBox, box, transforms) {\n applyAxisTransforms(finalBox.x, box.x, transforms, xKeys);\n applyAxisTransforms(finalBox.y, box.y, transforms, yKeys);\n}\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\n\n\nfunction removePointDelta(point, translate, scale, originPoint, boxScale) {\n point -= translate;\n point = scalePoint(point, 1 / scale, originPoint);\n\n if (boxScale !== undefined) {\n point = scalePoint(point, 1 / boxScale, originPoint);\n }\n\n return point;\n}\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\n\n\nfunction removeAxisDelta(axis, translate, scale, origin, boxScale) {\n if (translate === void 0) {\n translate = 0;\n }\n\n if (scale === void 0) {\n scale = 1;\n }\n\n if (origin === void 0) {\n origin = 0.5;\n }\n\n var originPoint = mix(axis.min, axis.max, origin) - translate;\n axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\n\n\nfunction removeAxisTransforms(axis, transforms, _a) {\n var _b = __read(_a, 3),\n key = _b[0],\n scaleKey = _b[1],\n originKey = _b[2];\n\n removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale);\n}\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\n\n\nfunction removeBoxTransforms(box, transforms) {\n removeAxisTransforms(box.x, transforms, xKeys);\n removeAxisTransforms(box.y, transforms, yKeys);\n}\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\n\n\nfunction applyTreeDeltas(box, treeScale, treePath) {\n var treeLength = treePath.length;\n if (!treeLength) return; // Reset the treeScale\n\n treeScale.x = treeScale.y = 1;\n var node;\n var delta;\n\n for (var i = 0; i < treeLength; i++) {\n node = treePath[i];\n delta = node.getLayoutState().delta; // Incoporate each ancestor's scale into a culmulative treeScale for this component\n\n treeScale.x *= delta.x.scale;\n treeScale.y *= delta.y.scale; // Apply each ancestor's calculated delta into this component's recorded layout box\n\n applyBoxDelta(box, delta); // If this is a draggable ancestor, also incorporate the node's transform to the layout box\n\n if (isDraggable(node)) {\n applyBoxTransforms(box, box, node.getLatestValues());\n }\n }\n}\n\nexport { applyAxisDelta, applyAxisTransforms, applyBoxDelta, applyBoxTransforms, applyPointDelta, applyTreeDeltas, removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta, resetAxis, resetBox, scalePoint };","import { __rest, __assign, __spreadArray, __read } from 'tslib';\nimport { invariant } from 'hey-listen';\nimport { PanSession } from '../PanSession.js';\nimport { getGlobalLock } from './utils/lock.js';\nimport { isRefObject } from '../../utils/is-ref-object.js';\nimport { addPointerEvent } from '../../events/use-pointer-event.js';\nimport { addDomEvent } from '../../events/use-dom-event.js';\nimport { getViewportPointFromEvent } from '../../events/event-info.js';\nimport { axisBox, convertAxisBoxToBoundingBox, convertBoundingBoxToAxisBox } from '../../utils/geometry/index.js';\nimport { eachAxis } from '../../utils/each-axis.js';\nimport { calcRelativeConstraints, resolveDragElastic, rebaseAxisConstraints, calcViewportConstraints, applyConstraints, calcConstrainedMinPoint, calcPositionFromProgress, defaultElastic } from './utils/constraints.js';\nimport { getBoundingBox } from '../../render/dom/projection/measure.js';\nimport { calcOrigin } from '../../utils/geometry/delta-calc.js';\nimport { startAnimation } from '../../animation/utils/transitions.js';\nimport { AnimationType } from '../../render/utils/types.js';\nimport { collectProjectingAncestors, updateLayoutMeasurement, collectProjectingChildren } from '../../render/dom/projection/utils.js';\nimport { progress } from 'popmotion';\nimport { convertToRelativeProjection } from '../../render/dom/projection/convert-to-relative.js';\nimport { calcRelativeOffset } from '../../motion/features/layout/utils.js';\nimport { flushLayout, batchLayout } from '../../render/dom/utils/batch-layout.js';\nimport { flushSync } from 'framesync';\nvar elementDragControls = new WeakMap();\n/**\n *\n */\n\nvar lastPointerEvent;\n\nvar VisualElementDragControls = function () {\n function VisualElementDragControls(_a) {\n var visualElement = _a.visualElement;\n /**\n * Track whether we're currently dragging.\n *\n * @internal\n */\n\n this.isDragging = false;\n /**\n * The current direction of drag, or `null` if both.\n *\n * @internal\n */\n\n this.currentDirection = null;\n /**\n * The permitted boundaries of travel, in pixels.\n *\n * @internal\n */\n\n this.constraints = false;\n /**\n * The per-axis resolved elastic values.\n *\n * @internal\n */\n\n this.elastic = axisBox();\n /**\n * A reference to the host component's latest props.\n *\n * @internal\n */\n\n this.props = {};\n /**\n * @internal\n */\n\n this.hasMutatedConstraints = false;\n /**\n * Track the initial position of the cursor relative to the dragging element\n * when dragging starts as a value of 0-1 on each axis. We then use this to calculate\n * an ideal bounding box for the VisualElement renderer to project into every frame.\n *\n * @internal\n */\n\n this.cursorProgress = {\n x: 0.5,\n y: 0.5\n }; // When updating _dragX, or _dragY instead of the VisualElement,\n // persist their values between drag gestures.\n\n this.originPoint = {}; // This is a reference to the global drag gesture lock, ensuring only one component\n // can \"capture\" the drag of one or both axes.\n // TODO: Look into moving this into pansession?\n\n this.openGlobalLock = null;\n /**\n * @internal\n */\n\n this.panSession = null;\n this.visualElement = visualElement;\n this.visualElement.enableLayoutProjection();\n elementDragControls.set(visualElement, this);\n }\n /**\n * Instantiate a PanSession for the drag gesture\n *\n * @public\n */\n\n\n VisualElementDragControls.prototype.start = function (originEvent, _a) {\n var _this = this;\n\n var _b = _a === void 0 ? {} : _a,\n _c = _b.snapToCursor,\n snapToCursor = _c === void 0 ? false : _c,\n cursorProgress = _b.cursorProgress;\n\n var onSessionStart = function onSessionStart(event) {\n var _a; // Stop any animations on both axis values immediately. This allows the user to throw and catch\n // the component.\n\n\n _this.stopMotion();\n /**\n * Save the initial point. We'll use this to calculate the pointer's position rather\n * than the one we receive when the gesture actually starts. By then, the pointer will\n * have already moved, and the perception will be of the pointer \"slipping\" across the element\n */\n\n\n var initialPoint = getViewportPointFromEvent(event).point;\n (_a = _this.cancelLayout) === null || _a === void 0 ? void 0 : _a.call(_this);\n _this.cancelLayout = batchLayout(function (read, write) {\n var ancestors = collectProjectingAncestors(_this.visualElement);\n var children = collectProjectingChildren(_this.visualElement);\n\n var tree = __spreadArray(__spreadArray([], __read(ancestors)), __read(children));\n\n var hasManuallySetCursorOrigin = false;\n /**\n * Apply a simple lock to the projection target. This ensures no animations\n * can run on the projection box while this lock is active.\n */\n\n _this.isLayoutDrag() && _this.visualElement.lockProjectionTarget();\n write(function () {\n tree.forEach(function (element) {\n return element.resetTransform();\n });\n });\n read(function () {\n updateLayoutMeasurement(_this.visualElement);\n children.forEach(updateLayoutMeasurement);\n });\n write(function () {\n tree.forEach(function (element) {\n return element.restoreTransform();\n });\n\n if (snapToCursor) {\n hasManuallySetCursorOrigin = _this.snapToCursor(initialPoint);\n }\n });\n read(function () {\n var isRelativeDrag = Boolean(_this.getAxisMotionValue(\"x\") && !_this.isExternalDrag());\n\n if (!isRelativeDrag) {\n _this.visualElement.rebaseProjectionTarget(true, _this.visualElement.measureViewportBox(false));\n }\n\n _this.visualElement.scheduleUpdateLayoutProjection();\n /**\n * When dragging starts, we want to find where the cursor is relative to the bounding box\n * of the element. Every frame, we calculate a new bounding box using this relative position\n * and let the visualElement renderer figure out how to reproject the element into this bounding\n * box.\n *\n * By doing it this way, rather than applying an x/y transform directly to the element,\n * we can ensure the component always visually sticks to the cursor as we'd expect, even\n * if the DOM element itself changes layout as a result of React updates the user might\n * make based on the drag position.\n */\n\n\n var projection = _this.visualElement.projection;\n eachAxis(function (axis) {\n if (!hasManuallySetCursorOrigin) {\n var _a = projection.target[axis],\n min = _a.min,\n max = _a.max;\n _this.cursorProgress[axis] = cursorProgress ? cursorProgress[axis] : progress(min, max, initialPoint[axis]);\n }\n /**\n * If we have external drag MotionValues, record their origin point. On pointermove\n * we'll apply the pan gesture offset directly to this value.\n */\n\n\n var axisValue = _this.getAxisMotionValue(axis);\n\n if (axisValue) {\n _this.originPoint[axis] = axisValue.get();\n }\n });\n });\n write(function () {\n flushSync.update();\n flushSync.preRender();\n flushSync.render();\n flushSync.postRender();\n });\n read(function () {\n return _this.resolveDragConstraints();\n });\n });\n };\n\n var onStart = function onStart(event, info) {\n var _a, _b, _c; // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n\n\n var _d = _this.props,\n drag = _d.drag,\n dragPropagation = _d.dragPropagation;\n\n if (drag && !dragPropagation) {\n if (_this.openGlobalLock) _this.openGlobalLock();\n _this.openGlobalLock = getGlobalLock(drag); // If we don 't have the lock, don't start dragging\n\n if (!_this.openGlobalLock) return;\n }\n\n flushLayout(); // Set current drag status\n\n _this.isDragging = true;\n _this.currentDirection = null; // Fire onDragStart event\n\n (_b = (_a = _this.props).onDragStart) === null || _b === void 0 ? void 0 : _b.call(_a, event, info);\n (_c = _this.visualElement.animationState) === null || _c === void 0 ? void 0 : _c.setActive(AnimationType.Drag, true);\n };\n\n var onMove = function onMove(event, info) {\n var _a, _b, _c, _d;\n\n var _e = _this.props,\n dragPropagation = _e.dragPropagation,\n dragDirectionLock = _e.dragDirectionLock; // If we didn't successfully receive the gesture lock, early return.\n\n if (!dragPropagation && !_this.openGlobalLock) return;\n var offset = info.offset; // Attempt to detect drag direction if directionLock is true\n\n if (dragDirectionLock && _this.currentDirection === null) {\n _this.currentDirection = getCurrentDirection(offset); // If we've successfully set a direction, notify listener\n\n if (_this.currentDirection !== null) {\n (_b = (_a = _this.props).onDirectionLock) === null || _b === void 0 ? void 0 : _b.call(_a, _this.currentDirection);\n }\n\n return;\n } // Update each point with the latest position\n\n\n _this.updateAxis(\"x\", info.point, offset);\n\n _this.updateAxis(\"y\", info.point, offset); // Fire onDrag event\n\n\n (_d = (_c = _this.props).onDrag) === null || _d === void 0 ? void 0 : _d.call(_c, event, info); // Update the last pointer event\n\n lastPointerEvent = event;\n };\n\n var onSessionEnd = function onSessionEnd(event, info) {\n return _this.stop(event, info);\n };\n\n var transformPagePoint = this.props.transformPagePoint;\n this.panSession = new PanSession(originEvent, {\n onSessionStart: onSessionStart,\n onStart: onStart,\n onMove: onMove,\n onSessionEnd: onSessionEnd\n }, {\n transformPagePoint: transformPagePoint\n });\n };\n\n VisualElementDragControls.prototype.resolveDragConstraints = function () {\n var _this = this;\n\n var _a = this.props,\n dragConstraints = _a.dragConstraints,\n dragElastic = _a.dragElastic;\n var layout = this.visualElement.getLayoutState().layoutCorrected;\n\n if (dragConstraints) {\n this.constraints = isRefObject(dragConstraints) ? this.resolveRefConstraints(layout, dragConstraints) : calcRelativeConstraints(layout, dragConstraints);\n } else {\n this.constraints = false;\n }\n\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative.\n */\n\n if (this.constraints && !this.hasMutatedConstraints) {\n eachAxis(function (axis) {\n if (_this.getAxisMotionValue(axis)) {\n _this.constraints[axis] = rebaseAxisConstraints(layout[axis], _this.constraints[axis]);\n }\n });\n }\n };\n\n VisualElementDragControls.prototype.resolveRefConstraints = function (layoutBox, constraints) {\n var _a = this.props,\n onMeasureDragConstraints = _a.onMeasureDragConstraints,\n transformPagePoint = _a.transformPagePoint;\n var constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\");\n this.constraintsBox = getBoundingBox(constraintsElement, transformPagePoint);\n var measuredConstraints = calcViewportConstraints(layoutBox, this.constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n\n if (onMeasureDragConstraints) {\n var userConstraints = onMeasureDragConstraints(convertAxisBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToAxisBox(userConstraints);\n }\n }\n\n return measuredConstraints;\n };\n\n VisualElementDragControls.prototype.cancelDrag = function () {\n var _a, _b;\n\n this.visualElement.unlockProjectionTarget();\n (_a = this.cancelLayout) === null || _a === void 0 ? void 0 : _a.call(this);\n this.isDragging = false;\n this.panSession && this.panSession.end();\n this.panSession = null;\n\n if (!this.props.dragPropagation && this.openGlobalLock) {\n this.openGlobalLock();\n this.openGlobalLock = null;\n }\n\n (_b = this.visualElement.animationState) === null || _b === void 0 ? void 0 : _b.setActive(AnimationType.Drag, false);\n };\n\n VisualElementDragControls.prototype.stop = function (event, info) {\n var _a, _b, _c;\n\n (_a = this.panSession) === null || _a === void 0 ? void 0 : _a.end();\n this.panSession = null;\n var isDragging = this.isDragging;\n this.cancelDrag();\n if (!isDragging) return;\n var velocity = info.velocity;\n this.animateDragEnd(velocity);\n (_c = (_b = this.props).onDragEnd) === null || _c === void 0 ? void 0 : _c.call(_b, event, info);\n };\n\n VisualElementDragControls.prototype.snapToCursor = function (point) {\n var _this = this;\n\n return eachAxis(function (axis) {\n var drag = _this.props.drag; // If we're not dragging this axis, do an early return.\n\n if (!shouldDrag(axis, drag, _this.currentDirection)) return;\n\n var axisValue = _this.getAxisMotionValue(axis);\n\n if (axisValue) {\n var box = _this.visualElement.getLayoutState().layout;\n\n var length_1 = box[axis].max - box[axis].min;\n var center = box[axis].min + length_1 / 2;\n var offset = point[axis] - center;\n _this.originPoint[axis] = point[axis];\n axisValue.set(offset);\n } else {\n _this.cursorProgress[axis] = 0.5;\n return true;\n }\n }).includes(true);\n };\n /**\n * Update the specified axis with the latest pointer information.\n */\n\n\n VisualElementDragControls.prototype.updateAxis = function (axis, point, offset) {\n var drag = this.props.drag; // If we're not dragging this axis, do an early return.\n\n if (!shouldDrag(axis, drag, this.currentDirection)) return;\n return this.getAxisMotionValue(axis) ? this.updateAxisMotionValue(axis, offset) : this.updateVisualElementAxis(axis, point);\n };\n\n VisualElementDragControls.prototype.updateAxisMotionValue = function (axis, offset) {\n var axisValue = this.getAxisMotionValue(axis);\n if (!offset || !axisValue) return;\n var nextValue = this.originPoint[axis] + offset[axis];\n var update = this.constraints ? applyConstraints(nextValue, this.constraints[axis], this.elastic[axis]) : nextValue;\n axisValue.set(update);\n };\n\n VisualElementDragControls.prototype.updateVisualElementAxis = function (axis, point) {\n var _a; // Get the actual layout bounding box of the element\n\n\n var axisLayout = this.visualElement.getLayoutState().layout[axis]; // Calculate its current length. In the future we might want to lerp this to animate\n // between lengths if the layout changes as we change the DOM\n\n var axisLength = axisLayout.max - axisLayout.min; // Get the initial progress that the pointer sat on this axis on gesture start.\n\n var axisProgress = this.cursorProgress[axis]; // Calculate a new min point based on the latest pointer position, constraints and elastic\n\n var min = calcConstrainedMinPoint(point[axis], axisLength, axisProgress, (_a = this.constraints) === null || _a === void 0 ? void 0 : _a[axis], this.elastic[axis]); // Update the axis viewport target with this new min and the length\n\n this.visualElement.setProjectionTargetAxis(axis, min, min + axisLength);\n };\n\n VisualElementDragControls.prototype.setProps = function (_a) {\n var _b = _a.drag,\n drag = _b === void 0 ? false : _b,\n _c = _a.dragDirectionLock,\n dragDirectionLock = _c === void 0 ? false : _c,\n _d = _a.dragPropagation,\n dragPropagation = _d === void 0 ? false : _d,\n _e = _a.dragConstraints,\n dragConstraints = _e === void 0 ? false : _e,\n _f = _a.dragElastic,\n dragElastic = _f === void 0 ? defaultElastic : _f,\n _g = _a.dragMomentum,\n dragMomentum = _g === void 0 ? true : _g,\n remainingProps = __rest(_a, [\"drag\", \"dragDirectionLock\", \"dragPropagation\", \"dragConstraints\", \"dragElastic\", \"dragMomentum\"]);\n\n this.props = __assign({\n drag: drag,\n dragDirectionLock: dragDirectionLock,\n dragPropagation: dragPropagation,\n dragConstraints: dragConstraints,\n dragElastic: dragElastic,\n dragMomentum: dragMomentum\n }, remainingProps);\n };\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - If the component will perform layout animations, we output the gesture to the component's\n * visual bounding box\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n\n\n VisualElementDragControls.prototype.getAxisMotionValue = function (axis) {\n var _a = this.props,\n layout = _a.layout,\n layoutId = _a.layoutId;\n var dragKey = \"_drag\" + axis.toUpperCase();\n\n if (this.props[dragKey]) {\n return this.props[dragKey];\n } else if (!layout && layoutId === undefined) {\n return this.visualElement.getValue(axis, 0);\n }\n };\n\n VisualElementDragControls.prototype.isLayoutDrag = function () {\n return !this.getAxisMotionValue(\"x\");\n };\n\n VisualElementDragControls.prototype.isExternalDrag = function () {\n var _a = this.props,\n _dragX = _a._dragX,\n _dragY = _a._dragY;\n return _dragX || _dragY;\n };\n\n VisualElementDragControls.prototype.animateDragEnd = function (velocity) {\n var _this = this;\n\n var _a = this.props,\n drag = _a.drag,\n dragMomentum = _a.dragMomentum,\n dragElastic = _a.dragElastic,\n dragTransition = _a.dragTransition;\n /**\n * Everything beyond the drag gesture should be performed with\n * relative projection so children stay in sync with their parent element.\n */\n\n var isRelative = convertToRelativeProjection(this.visualElement, this.isLayoutDrag() && !this.isExternalDrag());\n /**\n * If we had previously resolved constraints relative to the viewport,\n * we need to also convert those to a relative coordinate space for the animation\n */\n\n var constraints = this.constraints || {};\n\n if (isRelative && Object.keys(constraints).length && this.isLayoutDrag()) {\n var projectionParent = this.visualElement.getProjectionParent();\n\n if (projectionParent) {\n var relativeConstraints_1 = calcRelativeOffset(projectionParent.projection.targetFinal, constraints);\n eachAxis(function (axis) {\n var _a = relativeConstraints_1[axis],\n min = _a.min,\n max = _a.max;\n constraints[axis] = {\n min: isNaN(min) ? undefined : min,\n max: isNaN(max) ? undefined : max\n };\n });\n }\n }\n\n var momentumAnimations = eachAxis(function (axis) {\n var _a;\n\n if (!shouldDrag(axis, drag, _this.currentDirection)) {\n return;\n }\n\n var transition = (_a = constraints === null || constraints === void 0 ? void 0 : constraints[axis]) !== null && _a !== void 0 ? _a : {};\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n\n var bounceStiffness = dragElastic ? 200 : 1000000;\n var bounceDamping = dragElastic ? 40 : 10000000;\n\n var inertia = __assign(__assign({\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness: bounceStiffness,\n bounceDamping: bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10\n }, dragTransition), transition); // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n\n\n return _this.getAxisMotionValue(axis) ? _this.startAxisValueAnimation(axis, inertia) : _this.visualElement.startLayoutAnimation(axis, inertia, isRelative);\n }); // Run all animations and then resolve the new drag constraints.\n\n return Promise.all(momentumAnimations).then(function () {\n var _a, _b;\n\n (_b = (_a = _this.props).onDragTransitionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);\n });\n };\n\n VisualElementDragControls.prototype.stopMotion = function () {\n var _this = this;\n\n eachAxis(function (axis) {\n var axisValue = _this.getAxisMotionValue(axis);\n\n axisValue ? axisValue.stop() : _this.visualElement.stopLayoutAnimation();\n });\n };\n\n VisualElementDragControls.prototype.startAxisValueAnimation = function (axis, transition) {\n var axisValue = this.getAxisMotionValue(axis);\n if (!axisValue) return;\n var currentValue = axisValue.get();\n axisValue.set(currentValue);\n axisValue.set(currentValue); // Set twice to hard-reset velocity\n\n return startAnimation(axis, axisValue, 0, transition);\n };\n\n VisualElementDragControls.prototype.scalePoint = function () {\n var _this = this;\n\n var _a = this.props,\n drag = _a.drag,\n dragConstraints = _a.dragConstraints;\n if (!isRefObject(dragConstraints) || !this.constraintsBox) return; // Stop any current animations as there can be some visual glitching if we resize mid animation\n\n this.stopMotion(); // Record the relative progress of the targetBox relative to the constraintsBox\n\n var boxProgress = {\n x: 0,\n y: 0\n };\n eachAxis(function (axis) {\n boxProgress[axis] = calcOrigin(_this.visualElement.projection.target[axis], _this.constraintsBox[axis]);\n });\n /**\n * For each axis, calculate the current progress of the layout axis within the constraints.\n * Then, using the latest layout and constraints measurements, reposition the new layout axis\n * proportionally within the constraints.\n */\n\n this.updateConstraints(function () {\n eachAxis(function (axis) {\n if (!shouldDrag(axis, drag, null)) return; // Calculate the position of the targetBox relative to the constraintsBox using the\n // previously calculated progress\n\n var _a = calcPositionFromProgress(_this.visualElement.projection.target[axis], _this.constraintsBox[axis], boxProgress[axis]),\n min = _a.min,\n max = _a.max;\n\n _this.visualElement.setProjectionTargetAxis(axis, min, max);\n });\n });\n /**\n * If any other draggable components are queuing the same tasks synchronously\n * this will wait until they've all been scheduled before flushing.\n */\n\n setTimeout(flushLayout, 1);\n };\n\n VisualElementDragControls.prototype.updateConstraints = function (onReady) {\n var _this = this;\n\n this.cancelLayout = batchLayout(function (read, write) {\n var ancestors = collectProjectingAncestors(_this.visualElement);\n write(function () {\n return ancestors.forEach(function (element) {\n return element.resetTransform();\n });\n });\n read(function () {\n return updateLayoutMeasurement(_this.visualElement);\n });\n write(function () {\n return ancestors.forEach(function (element) {\n return element.restoreTransform();\n });\n });\n read(function () {\n _this.resolveDragConstraints();\n });\n if (onReady) write(onReady);\n });\n };\n\n VisualElementDragControls.prototype.mount = function (visualElement) {\n var _this = this;\n\n var element = visualElement.getInstance();\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n\n var stopPointerListener = addPointerEvent(element, \"pointerdown\", function (event) {\n var _a = _this.props,\n drag = _a.drag,\n _b = _a.dragListener,\n dragListener = _b === void 0 ? true : _b;\n drag && dragListener && _this.start(event);\n });\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n\n var stopResizeListener = addDomEvent(window, \"resize\", function () {\n _this.scalePoint();\n });\n /**\n * Ensure drag constraints are resolved correctly relative to the dragging element\n * whenever its layout changes.\n */\n\n var stopLayoutUpdateListener = visualElement.onLayoutUpdate(function () {\n if (_this.isDragging) {\n _this.resolveDragConstraints();\n }\n });\n /**\n * If the previous component with this same layoutId was dragging at the time\n * it was unmounted, we want to continue the same gesture on this component.\n */\n\n var prevDragCursor = visualElement.prevDragCursor;\n\n if (prevDragCursor) {\n this.start(lastPointerEvent, {\n cursorProgress: prevDragCursor\n });\n }\n /**\n * Return a function that will teardown the drag gesture\n */\n\n\n return function () {\n stopPointerListener === null || stopPointerListener === void 0 ? void 0 : stopPointerListener();\n stopResizeListener === null || stopResizeListener === void 0 ? void 0 : stopResizeListener();\n stopLayoutUpdateListener === null || stopLayoutUpdateListener === void 0 ? void 0 : stopLayoutUpdateListener();\n\n _this.cancelDrag();\n };\n };\n\n return VisualElementDragControls;\n}();\n\nfunction shouldDrag(direction, drag, currentDirection) {\n return (drag === true || drag === direction) && (currentDirection === null || currentDirection === direction);\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\n\n\nfunction getCurrentDirection(offset, lockThreshold) {\n if (lockThreshold === void 0) {\n lockThreshold = 10;\n }\n\n var direction = null;\n\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n } else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n\n return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };","import { calcRelativeOffset } from '../../../motion/features/layout/utils.js';\nimport { eachAxis } from '../../../utils/each-axis.js';\nimport { removeBoxTransforms } from '../../../utils/geometry/delta-apply.js';\n/**\n * Returns a boolean stating whether or not we converted the projection\n * to relative projection.\n */\n\nfunction convertToRelativeProjection(visualElement, isLayoutDrag) {\n if (isLayoutDrag === void 0) {\n isLayoutDrag = true;\n }\n\n var projectionParent = visualElement.getProjectionParent();\n if (!projectionParent) return false;\n var offset;\n\n if (isLayoutDrag) {\n offset = calcRelativeOffset(projectionParent.projection.target, visualElement.projection.target);\n removeBoxTransforms(offset, projectionParent.getLatestValues());\n } else {\n offset = calcRelativeOffset(projectionParent.getLayoutState().layout, visualElement.getLayoutState().layout);\n }\n\n eachAxis(function (axis) {\n return visualElement.setProjectionTargetAxis(axis, offset[axis].min, offset[axis].max, true);\n });\n return true;\n}\n\nexport { convertToRelativeProjection };","import { useDrag } from '../../gestures/drag/use-drag.js';\nimport { usePanGesture } from '../../gestures/use-pan-gesture.js';\nimport { makeRenderlessComponent } from '../utils/make-renderless-component.js';\nvar drag = {\n pan: makeRenderlessComponent(usePanGesture),\n drag: makeRenderlessComponent(useDrag)\n};\nexport { drag };","import { useRef, useContext, useEffect } from 'react';\nimport { MotionConfigContext } from '../context/MotionConfigContext.js';\nimport { useUnmountEffect } from '../utils/use-unmount-effect.js';\nimport { usePointerEvent } from '../events/use-pointer-event.js';\nimport { PanSession } from './PanSession.js';\n/**\n *\n * @param handlers -\n * @param ref -\n *\n * @internalremarks\n * Currently this sets new pan gesture functions every render. The memo route has been explored\n * in the past but ultimately we're still creating new functions every render. An optimisation\n * to explore is creating the pan gestures and loading them into a `ref`.\n *\n * @internal\n */\n\nfunction usePanGesture(_a) {\n var onPan = _a.onPan,\n onPanStart = _a.onPanStart,\n onPanEnd = _a.onPanEnd,\n onPanSessionStart = _a.onPanSessionStart,\n visualElement = _a.visualElement;\n var hasPanEvents = onPan || onPanStart || onPanEnd || onPanSessionStart;\n var panSession = useRef(null);\n var transformPagePoint = useContext(MotionConfigContext).transformPagePoint;\n var handlers = {\n onSessionStart: onPanSessionStart,\n onStart: onPanStart,\n onMove: onPan,\n onEnd: function onEnd(event, info) {\n panSession.current = null;\n onPanEnd && onPanEnd(event, info);\n }\n };\n useEffect(function () {\n if (panSession.current !== null) {\n panSession.current.updateHandlers(handlers);\n }\n });\n\n function onPointerDown(event) {\n panSession.current = new PanSession(event, handlers, {\n transformPagePoint: transformPagePoint\n });\n }\n\n usePointerEvent(visualElement, \"pointerdown\", hasPanEvents && onPointerDown);\n useUnmountEffect(function () {\n return panSession.current && panSession.current.end();\n });\n}\n\nexport { usePanGesture };","import { __assign } from 'tslib';\nimport { useContext, useEffect } from 'react';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.js';\nimport { VisualElementDragControls } from './VisualElementDragControls.js';\nimport { useConstant } from '../../utils/use-constant.js';\n/**\n * A hook that allows an element to be dragged.\n *\n * @internal\n */\n\nfunction useDrag(props) {\n var groupDragControls = props.dragControls,\n visualElement = props.visualElement;\n var transformPagePoint = useContext(MotionConfigContext).transformPagePoint;\n var dragControls = useConstant(function () {\n return new VisualElementDragControls({\n visualElement: visualElement\n });\n });\n dragControls.setProps(__assign(__assign({}, props), {\n transformPagePoint: transformPagePoint\n })); // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n\n useEffect(function () {\n return groupDragControls && groupDragControls.subscribe(dragControls);\n }, [dragControls]); // Mount the drag controls with the visualElement\n\n useEffect(function () {\n return dragControls.mount(visualElement);\n }, []);\n}\n\nexport { useDrag };","import { __rest, __assign, __read } from 'tslib';\nimport { invariant } from 'hey-listen';\n\nfunction isCSSVariable(value) {\n return typeof value === \"string\" && value.startsWith(\"var(--\");\n}\n/**\n * Parse Framer's special CSS variable format into a CSS token and a fallback.\n *\n * ```\n * `var(--foo, #fff)` => [`--foo`, '#fff']\n * ```\n *\n * @param current\n */\n\n\nvar cssVariableRegex = /var\\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\\)/;\n\nfunction parseCSSVariable(current) {\n var match = cssVariableRegex.exec(current);\n if (!match) return [,];\n\n var _a = __read(match, 3),\n token = _a[1],\n fallback = _a[2];\n\n return [token, fallback];\n}\n\nvar maxDepth = 4;\n\nfunction getVariableValue(current, element, depth) {\n if (depth === void 0) {\n depth = 1;\n }\n\n invariant(depth <= maxDepth, \"Max CSS variable fallback depth detected in property \\\"\" + current + \"\\\". This may indicate a circular fallback dependency.\");\n\n var _a = __read(parseCSSVariable(current), 2),\n token = _a[0],\n fallback = _a[1]; // No CSS variable detected\n\n\n if (!token) return; // Attempt to read this CSS variable off the element\n\n var resolved = window.getComputedStyle(element).getPropertyValue(token);\n\n if (resolved) {\n return resolved.trim();\n } else if (isCSSVariable(fallback)) {\n // The fallback might itself be a CSS variable, in which case we attempt to resolve it too.\n return getVariableValue(fallback, element, depth + 1);\n } else {\n return fallback;\n }\n}\n/**\n * Resolve CSS variables from\n *\n * @internal\n */\n\n\nfunction resolveCSSVariables(visualElement, _a, transitionEnd) {\n var _b;\n\n var target = __rest(_a, []);\n\n var element = visualElement.getInstance();\n if (!(element instanceof HTMLElement)) return {\n target: target,\n transitionEnd: transitionEnd\n }; // If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`\n // only if they change but I think this reads clearer and this isn't a performance-critical path.\n\n if (transitionEnd) {\n transitionEnd = __assign({}, transitionEnd);\n } // Go through existing `MotionValue`s and ensure any existing CSS variables are resolved\n\n\n visualElement.forEachValue(function (value) {\n var current = value.get();\n if (!isCSSVariable(current)) return;\n var resolved = getVariableValue(current, element);\n if (resolved) value.set(resolved);\n }); // Cycle through every target property and resolve CSS variables. Currently\n // we only read single-var properties like `var(--foo)`, not `calc(var(--foo) + 20px)`\n\n for (var key in target) {\n var current = target[key];\n if (!isCSSVariable(current)) continue;\n var resolved = getVariableValue(current, element);\n if (!resolved) continue; // Clone target if it hasn't already been\n\n target[key] = resolved; // If the user hasn't already set this key on `transitionEnd`, set it to the unresolved\n // CSS variable. This will ensure that after the animation the component will reflect\n // changes in the value of the CSS variable.\n\n if (transitionEnd) (_b = transitionEnd[key]) !== null && _b !== void 0 ? _b : transitionEnd[key] = current;\n }\n\n return {\n target: target,\n transitionEnd: transitionEnd\n };\n}\n\nexport { cssVariableRegex, parseCSSVariable, resolveCSSVariables };","import { __assign } from 'tslib';\nimport { complex, px } from 'style-value-types';\nimport { mix } from 'popmotion';\nimport { cssVariableRegex } from '../utils/css-variables-conversion.js';\n\nfunction pixelsToPercent(pixels, axis) {\n return pixels / (axis.max - axis.min) * 100;\n}\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\n\n\nfunction correctBorderRadius(latest, _layoutState, _a) {\n var target = _a.target;\n /**\n * If latest is a string, if it's a percentage we can return immediately as it's\n * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n */\n\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest);\n } else {\n return latest;\n }\n }\n /**\n * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n * pixel value as a percentage of each axis\n */\n\n\n var x = pixelsToPercent(latest, target.x);\n var y = pixelsToPercent(latest, target.y);\n return x + \"% \" + y + \"%\";\n}\n\nvar varToken = \"_$css\";\n\nfunction correctBoxShadow(latest, _a) {\n var delta = _a.delta,\n treeScale = _a.treeScale;\n var original = latest;\n /**\n * We need to first strip and store CSS variables from the string.\n */\n\n var containsCSSVariables = latest.includes(\"var(\");\n var cssVariables = [];\n\n if (containsCSSVariables) {\n latest = latest.replace(cssVariableRegex, function (match) {\n cssVariables.push(match);\n return varToken;\n });\n }\n\n var shadow = complex.parse(latest); // TODO: Doesn't support multiple shadows\n\n if (shadow.length > 5) return original;\n var template = complex.createTransformer(latest);\n var offset = typeof shadow[0] !== \"number\" ? 1 : 0; // Calculate the overall context scale\n\n var xScale = delta.x.scale * treeScale.x;\n var yScale = delta.y.scale * treeScale.y;\n shadow[0 + offset] /= xScale;\n shadow[1 + offset] /= yScale;\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n\n var averageScale = mix(xScale, yScale, 0.5); // Blur\n\n if (typeof shadow[2 + offset] === \"number\") shadow[2 + offset] /= averageScale; // Spread\n\n if (typeof shadow[3 + offset] === \"number\") shadow[3 + offset] /= averageScale;\n var output = template(shadow);\n\n if (containsCSSVariables) {\n var i_1 = 0;\n output = output.replace(varToken, function () {\n var cssVariable = cssVariables[i_1];\n i_1++;\n return cssVariable;\n });\n }\n\n return output;\n}\n\nvar borderCorrectionDefinition = {\n process: correctBorderRadius\n};\nvar defaultScaleCorrectors = {\n borderRadius: __assign(__assign({}, borderCorrectionDefinition), {\n applyTo: [\"borderTopLeftRadius\", \"borderTopRightRadius\", \"borderBottomLeftRadius\", \"borderBottomRightRadius\"]\n }),\n borderTopLeftRadius: borderCorrectionDefinition,\n borderTopRightRadius: borderCorrectionDefinition,\n borderBottomLeftRadius: borderCorrectionDefinition,\n borderBottomRightRadius: borderCorrectionDefinition,\n boxShadow: {\n process: correctBoxShadow\n }\n};\nexport { correctBorderRadius, correctBoxShadow, defaultScaleCorrectors, pixelsToPercent };","import { __extends, __rest, __assign, __read } from 'tslib';\nimport * as React from 'react';\nimport { eachAxis } from '../../../utils/each-axis.js';\nimport { startAnimation, getValueTransition } from '../../../animation/utils/transitions.js';\nimport { checkIfParentHasChanged, calcRelativeOffset, tweenAxis } from './utils.js';\nimport { VisibilityAction } from '../../../components/AnimateSharedLayout/types.js';\nimport { usePresence } from '../../../components/AnimatePresence/use-presence.js';\nimport { axisBox } from '../../../utils/geometry/index.js';\nimport { addScaleCorrection } from '../../../render/dom/projection/scale-correction.js';\nimport { defaultScaleCorrectors } from '../../../render/dom/projection/default-scale-correctors.js';\nvar progressTarget = 1000;\n\nvar Animate = function (_super) {\n __extends(Animate, _super);\n\n function Animate() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * A mutable object that tracks the target viewport box\n * for the current animation frame.\n */\n\n\n _this.frameTarget = axisBox();\n /**\n * The current animation target, we use this to check whether to start\n * a new animation or continue the existing one.\n */\n\n _this.currentAnimationTarget = axisBox();\n /**\n * Track whether we're animating this axis.\n */\n\n _this.isAnimating = {\n x: false,\n y: false\n };\n _this.stopAxisAnimation = {\n x: undefined,\n y: undefined\n };\n _this.isAnimatingTree = false;\n\n _this.animate = function (target, origin, _a) {\n if (_a === void 0) {\n _a = {};\n }\n\n var originBox = _a.originBox,\n targetBox = _a.targetBox,\n visibilityAction = _a.visibilityAction,\n shouldStackAnimate = _a.shouldStackAnimate,\n onComplete = _a.onComplete,\n prevParent = _a.prevParent,\n config = __rest(_a, [\"originBox\", \"targetBox\", \"visibilityAction\", \"shouldStackAnimate\", \"onComplete\", \"prevParent\"]);\n\n var _b = _this.props,\n visualElement = _b.visualElement,\n layout = _b.layout;\n /**\n * Early return if we've been instructed not to animate this render.\n */\n\n if (shouldStackAnimate === false) {\n _this.isAnimatingTree = false;\n return _this.safeToRemove();\n }\n /**\n * Prioritise tree animations\n */\n\n\n if (_this.isAnimatingTree && shouldStackAnimate !== true) {\n return;\n } else if (shouldStackAnimate) {\n _this.isAnimatingTree = true;\n }\n /**\n * Allow the measured origin (prev bounding box) and target (actual layout) to be\n * overridden by the provided config.\n */\n\n\n origin = originBox || origin;\n target = targetBox || target;\n /**\n * If this element has a projecting parent, there's an opportunity to animate\n * it relatively to that parent rather than relatively to the viewport. This\n * allows us to add orchestrated animations.\n */\n\n var isRelative = false;\n var projectionParent = visualElement.getProjectionParent();\n\n if (projectionParent) {\n var prevParentViewportBox = projectionParent.prevViewportBox;\n var parentLayout = projectionParent.getLayoutState().layout;\n /**\n * If we're being provided a previous parent VisualElement by AnimateSharedLayout\n */\n\n if (prevParent) {\n /**\n * If we've been provided an explicit target box it means we're animating back\n * to this previous parent. So we can make a relative box by comparing to the previous\n * parent's layout\n */\n if (targetBox) {\n parentLayout = prevParent.getLayoutState().layout;\n }\n /**\n * Likewise if we've been provided an explicit origin box it means we're\n * animating out from a different element. So we should figure out where that was\n * on screen relative to the new parent element.\n */\n\n\n if (originBox && !checkIfParentHasChanged(prevParent, projectionParent) && prevParent.prevViewportBox) {\n prevParentViewportBox = prevParent.prevViewportBox;\n }\n }\n\n if (prevParentViewportBox && isProvidedCorrectDataForRelativeSharedLayout(prevParent, originBox, targetBox)) {\n isRelative = true;\n origin = calcRelativeOffset(prevParentViewportBox, origin);\n target = calcRelativeOffset(parentLayout, target);\n }\n }\n\n var boxHasMoved = hasMoved(origin, target);\n var animations = eachAxis(function (axis) {\n var _a, _b;\n /**\n * If layout is set to \"position\", we can resize the origin box based on the target\n * box and only animate its position.\n */\n\n\n if (layout === \"position\") {\n var targetLength = target[axis].max - target[axis].min;\n origin[axis].max = origin[axis].min + targetLength;\n }\n\n if (visualElement.projection.isTargetLocked) {\n return;\n } else if (visibilityAction !== undefined) {\n visualElement.setVisibility(visibilityAction === VisibilityAction.Show);\n } else if (boxHasMoved) {\n // If the box has moved, animate between it's current visual state and its\n // final state\n return _this.animateAxis(axis, target[axis], origin[axis], __assign(__assign({}, config), {\n isRelative: isRelative\n }));\n } else {\n (_b = (_a = _this.stopAxisAnimation)[axis]) === null || _b === void 0 ? void 0 : _b.call(_a); // If the box has remained in the same place, immediately set the axis target\n // to the final desired state\n\n return visualElement.setProjectionTargetAxis(axis, target[axis].min, target[axis].max, isRelative);\n }\n }); // Force a render to ensure there's no flash of uncorrected bounding box.\n\n visualElement.syncRender();\n /**\n * If this visualElement isn't present (ie it's been removed from the tree by the user but\n * kept in by the tree by AnimatePresence) then call safeToRemove when all axis animations\n * have successfully finished.\n */\n\n return Promise.all(animations).then(function () {\n _this.isAnimatingTree = false;\n onComplete && onComplete();\n visualElement.notifyLayoutAnimationComplete();\n });\n };\n\n return _this;\n }\n\n Animate.prototype.componentDidMount = function () {\n var _this = this;\n\n var visualElement = this.props.visualElement;\n visualElement.animateMotionValue = startAnimation;\n visualElement.enableLayoutProjection();\n this.unsubLayoutReady = visualElement.onLayoutUpdate(this.animate);\n\n visualElement.layoutSafeToRemove = function () {\n return _this.safeToRemove();\n };\n\n addScaleCorrection(defaultScaleCorrectors);\n };\n\n Animate.prototype.componentWillUnmount = function () {\n var _this = this;\n\n this.unsubLayoutReady();\n eachAxis(function (axis) {\n var _a, _b;\n\n return (_b = (_a = _this.stopAxisAnimation)[axis]) === null || _b === void 0 ? void 0 : _b.call(_a);\n });\n };\n /**\n * TODO: This manually performs animations on the visualElement's layout progress\n * values. It'd be preferable to amend the startLayoutAxisAnimation\n * API to accept more custom animations like this.\n */\n\n\n Animate.prototype.animateAxis = function (axis, target, origin, _a) {\n var _this = this;\n\n var _b, _c;\n\n var _d = _a === void 0 ? {} : _a,\n transition = _d.transition,\n isRelative = _d.isRelative;\n /**\n * If we're not animating to a new target, don't run this animation\n */\n\n\n if (this.isAnimating[axis] && axisIsEqual(target, this.currentAnimationTarget[axis])) {\n return;\n }\n\n (_c = (_b = this.stopAxisAnimation)[axis]) === null || _c === void 0 ? void 0 : _c.call(_b);\n this.isAnimating[axis] = true;\n var visualElement = this.props.visualElement;\n var frameTarget = this.frameTarget[axis];\n var layoutProgress = visualElement.getProjectionAnimationProgress()[axis];\n /**\n * Set layout progress back to 0. We set it twice to hard-reset any velocity that might\n * be re-incoporated into a subsequent spring animation.\n */\n\n layoutProgress.clearListeners();\n layoutProgress.set(0);\n layoutProgress.set(0);\n /**\n * Create an animation function to run once per frame. This will tween the visual bounding box from\n * origin to target using the latest progress value.\n */\n\n var frame = function frame() {\n // Convert the latest layoutProgress, which is a value from 0-1000, into a 0-1 progress\n var p = layoutProgress.get() / progressTarget; // Tween the axis and update the visualElement with the latest values\n\n tweenAxis(frameTarget, origin, target, p);\n visualElement.setProjectionTargetAxis(axis, frameTarget.min, frameTarget.max, isRelative);\n }; // Synchronously run a frame to ensure there's no flash of the uncorrected bounding box.\n\n\n frame(); // Create a function to stop animation on this specific axis\n\n var unsubscribeProgress = layoutProgress.onChange(frame);\n\n this.stopAxisAnimation[axis] = function () {\n _this.isAnimating[axis] = false;\n layoutProgress.stop();\n unsubscribeProgress();\n };\n\n this.currentAnimationTarget[axis] = target;\n var layoutTransition = transition || visualElement.getDefaultTransition() || defaultLayoutTransition; // Start the animation on this axis\n\n var animation = startAnimation(axis === \"x\" ? \"layoutX\" : \"layoutY\", layoutProgress, progressTarget, layoutTransition && getValueTransition(layoutTransition, \"layout\")).then(this.stopAxisAnimation[axis]);\n return animation;\n };\n\n Animate.prototype.safeToRemove = function () {\n var _a, _b;\n\n (_b = (_a = this.props).safeToRemove) === null || _b === void 0 ? void 0 : _b.call(_a);\n };\n\n Animate.prototype.render = function () {\n return null;\n };\n\n return Animate;\n}(React.Component);\n\nfunction AnimateLayoutContextProvider(props) {\n var _a = __read(usePresence(), 2),\n safeToRemove = _a[1];\n\n return React.createElement(Animate, __assign({}, props, {\n safeToRemove: safeToRemove\n }));\n}\n\nfunction hasMoved(a, b) {\n return !isZeroBox(a) && !isZeroBox(b) && (!axisIsEqual(a.x, b.x) || !axisIsEqual(a.y, b.y));\n}\n\nvar zeroAxis = {\n min: 0,\n max: 0\n};\n\nfunction isZeroBox(a) {\n return axisIsEqual(a.x, zeroAxis) && axisIsEqual(a.y, zeroAxis);\n}\n\nfunction axisIsEqual(a, b) {\n return a.min === b.min && a.max === b.max;\n}\n\nvar defaultLayoutTransition = {\n duration: 0.45,\n ease: [0.4, 0, 0.1, 1]\n};\n\nfunction isProvidedCorrectDataForRelativeSharedLayout(prevParent, originBox, targetBox) {\n return prevParent || !prevParent && !(originBox || targetBox);\n}\n\nexport { AnimateLayoutContextProvider };","import { __extends, __assign } from 'tslib';\nimport React__default, { useContext } from 'react';\nimport { isSharedLayout, SharedLayoutContext, FramerTreeLayoutContext } from '../../../context/SharedLayoutContext.js';\nimport { snapshotViewportBox } from '../../../render/dom/projection/utils.js';\n/**\n * This component is responsible for scheduling the measuring of the motion component\n */\n\nvar Measure = function (_super) {\n __extends(Measure, _super);\n\n function Measure() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * If this is a child of a SyncContext, register the VisualElement with it on mount.\n */\n\n\n Measure.prototype.componentDidMount = function () {\n var _a = this.props,\n syncLayout = _a.syncLayout,\n framerSyncLayout = _a.framerSyncLayout,\n visualElement = _a.visualElement;\n isSharedLayout(syncLayout) && syncLayout.register(visualElement);\n isSharedLayout(framerSyncLayout) && framerSyncLayout.register(visualElement);\n visualElement.onUnmount(function () {\n if (isSharedLayout(syncLayout)) {\n syncLayout.remove(visualElement);\n }\n\n if (isSharedLayout(framerSyncLayout)) {\n framerSyncLayout.remove(visualElement);\n }\n });\n };\n /**\n * If this is a child of a SyncContext, notify it that it needs to re-render. It will then\n * handle the snapshotting.\n *\n * If it is stand-alone component, add it to the batcher.\n */\n\n\n Measure.prototype.getSnapshotBeforeUpdate = function () {\n var _a = this.props,\n syncLayout = _a.syncLayout,\n visualElement = _a.visualElement;\n\n if (isSharedLayout(syncLayout)) {\n syncLayout.syncUpdate();\n } else {\n snapshotViewportBox(visualElement);\n syncLayout.add(visualElement);\n }\n\n return null;\n };\n\n Measure.prototype.componentDidUpdate = function () {\n var syncLayout = this.props.syncLayout;\n if (!isSharedLayout(syncLayout)) syncLayout.flush();\n };\n\n Measure.prototype.render = function () {\n return null;\n };\n\n return Measure;\n}(React__default.Component);\n\nfunction MeasureContextProvider(props) {\n var syncLayout = useContext(SharedLayoutContext);\n var framerSyncLayout = useContext(FramerTreeLayoutContext);\n return React__default.createElement(Measure, __assign({}, props, {\n syncLayout: syncLayout,\n framerSyncLayout: framerSyncLayout\n }));\n}\n\nexport { MeasureContextProvider };","import { AnimateLayoutContextProvider } from './Animate.js';\nimport { MeasureContextProvider } from './Measure.js';\nvar layoutAnimations = {\n measureLayout: MeasureContextProvider,\n layoutAnimation: AnimateLayoutContextProvider\n};\nexport { layoutAnimations };","import { axisBox, delta } from '../../utils/geometry/index.js';\n\nvar createProjectionState = function createProjectionState() {\n return {\n isEnabled: false,\n isHydrated: false,\n isTargetLocked: false,\n target: axisBox(),\n targetFinal: axisBox()\n };\n};\n\nfunction createLayoutState() {\n return {\n isHydrated: false,\n layout: axisBox(),\n layoutCorrected: axisBox(),\n treeScale: {\n x: 1,\n y: 1\n },\n delta: delta(),\n deltaFinal: delta(),\n deltaTransform: \"\"\n };\n}\n\nvar zeroLayout = createLayoutState();\nexport { createLayoutState, createProjectionState, zeroLayout };","import { zeroLayout } from '../../utils/state.js';\n/**\n * Build a transform style that takes a calculated delta between the element's current\n * space on screen and projects it into the desired space.\n */\n\nfunction buildLayoutProjectionTransform(_a, treeScale, latestTransform) {\n var x = _a.x,\n y = _a.y;\n /**\n * The translations we use to calculate are always relative to the viewport coordinate space.\n * But when we apply scales, we also scale the coordinate space of an element and its children.\n * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need\n * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.\n */\n\n var xTranslate = x.translate / treeScale.x;\n var yTranslate = y.translate / treeScale.y;\n var transform = \"translate3d(\" + xTranslate + \"px, \" + yTranslate + \"px, 0) \";\n\n if (latestTransform) {\n var rotate = latestTransform.rotate,\n rotateX = latestTransform.rotateX,\n rotateY = latestTransform.rotateY;\n if (rotate) transform += \"rotate(\" + rotate + \") \";\n if (rotateX) transform += \"rotateX(\" + rotateX + \") \";\n if (rotateY) transform += \"rotateY(\" + rotateY + \") \";\n }\n\n transform += \"scale(\" + x.scale + \", \" + y.scale + \")\";\n return !latestTransform && transform === identityProjection ? \"\" : transform;\n}\n/**\n * Take the calculated delta origin and apply it as a transform string.\n */\n\n\nfunction buildLayoutProjectionTransformOrigin(_a) {\n var deltaFinal = _a.deltaFinal;\n return deltaFinal.x.origin * 100 + \"% \" + deltaFinal.y.origin * 100 + \"% 0\";\n}\n\nvar identityProjection = buildLayoutProjectionTransform(zeroLayout.delta, zeroLayout.treeScale, {\n x: 1,\n y: 1\n});\nexport { buildLayoutProjectionTransform, buildLayoutProjectionTransformOrigin, identityProjection };","import { __spreadArray, __read } from 'tslib';\nimport { SubscriptionManager } from '../../utils/subscription-manager.js';\nvar names = [\"LayoutMeasure\", \"BeforeLayoutMeasure\", \"LayoutUpdate\", \"ViewportBoxUpdate\", \"Update\", \"Render\", \"AnimationComplete\", \"LayoutAnimationComplete\", \"AnimationStart\", \"SetAxisTarget\", \"Unmount\"];\n\nfunction createLifecycles() {\n var managers = names.map(function () {\n return new SubscriptionManager();\n });\n var propSubscriptions = {};\n var lifecycles = {\n clearAllListeners: function clearAllListeners() {\n return managers.forEach(function (manager) {\n return manager.clear();\n });\n },\n updatePropListeners: function updatePropListeners(props) {\n return names.forEach(function (name) {\n var _a;\n\n (_a = propSubscriptions[name]) === null || _a === void 0 ? void 0 : _a.call(propSubscriptions);\n var on = \"on\" + name;\n var propListener = props[on];\n\n if (propListener) {\n propSubscriptions[name] = lifecycles[on](propListener);\n }\n });\n }\n };\n managers.forEach(function (manager, i) {\n lifecycles[\"on\" + names[i]] = function (handler) {\n return manager.add(handler);\n };\n\n lifecycles[\"notify\" + names[i]] = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n return manager.notify.apply(manager, __spreadArray([], __read(args)));\n };\n });\n return lifecycles;\n}\n\nexport { createLifecycles };","import { resetBox, applyTreeDeltas } from '../../utils/geometry/delta-apply.js';\nimport { updateBoxDelta } from '../../utils/geometry/delta-calc.js';\n\nfunction updateLayoutDeltas(_a, _b, treePath, transformOrigin) {\n var delta = _a.delta,\n layout = _a.layout,\n layoutCorrected = _a.layoutCorrected,\n treeScale = _a.treeScale;\n var target = _b.target;\n /**\n * Reset the corrected box with the latest values from box, as we're then going\n * to perform mutative operations on it.\n */\n\n resetBox(layoutCorrected, layout);\n /**\n * Apply all the parent deltas to this box to produce the corrected box. This\n * is the layout box, as it will appear on screen as a result of the transforms of its parents.\n */\n\n applyTreeDeltas(layoutCorrected, treeScale, treePath);\n /**\n * Update the delta between the corrected box and the target box before user-set transforms were applied.\n * This will allow us to calculate the corrected borderRadius and boxShadow to compensate\n * for our layout reprojection, but still allow them to be scaled correctly by the user.\n * It might be that to simplify this we may want to accept that user-set scale is also corrected\n * and we wouldn't have to keep and calc both deltas, OR we could support a user setting\n * to allow people to choose whether these styles are corrected based on just the\n * layout reprojection or the final bounding box.\n */\n\n updateBoxDelta(delta, layoutCorrected, target, transformOrigin);\n}\n\nexport { updateLayoutDeltas };","import { addUniqueItem, removeItem } from '../../utils/array.js';\nimport { compareByDepth } from './compare-by-depth.js';\n\nvar FlatTree = function () {\n function FlatTree() {\n this.children = [];\n this.isDirty = false;\n }\n\n FlatTree.prototype.add = function (child) {\n addUniqueItem(this.children, child);\n this.isDirty = true;\n };\n\n FlatTree.prototype.remove = function (child) {\n removeItem(this.children, child);\n this.isDirty = true;\n };\n\n FlatTree.prototype.forEach = function (callback) {\n this.isDirty && this.children.sort(compareByDepth);\n this.isDirty = false;\n this.children.forEach(callback);\n };\n\n return FlatTree;\n}();\n\nexport { FlatTree };","import { __assign, __spreadArray, __read } from 'tslib';\nimport sync, { cancelSync } from 'framesync';\nimport { pipe } from 'popmotion';\nimport { Presence } from '../components/AnimateSharedLayout/types.js';\nimport { eachAxis } from '../utils/each-axis.js';\nimport { axisBox } from '../utils/geometry/index.js';\nimport { removeBoxTransforms, applyBoxTransforms } from '../utils/geometry/delta-apply.js';\nimport { calcRelativeBox, updateBoxDelta } from '../utils/geometry/delta-calc.js';\nimport { motionValue } from '../value/index.js';\nimport { isMotionValue } from '../value/utils/is-motion-value.js';\nimport { buildLayoutProjectionTransform } from './html/utils/build-projection-transform.js';\nimport { variantPriorityOrder } from './utils/animation-state.js';\nimport { createLifecycles } from './utils/lifecycles.js';\nimport { updateMotionValuesFromProps } from './utils/motion-values.js';\nimport { updateLayoutDeltas } from './utils/projection.js';\nimport { createLayoutState, createProjectionState } from './utils/state.js';\nimport { FlatTree } from './utils/flat-tree.js';\nimport { checkIfControllingVariants, checkIfVariantNode, isVariantLabel } from './utils/variants.js';\nimport { setCurrentViewportBox } from './dom/projection/relative-set.js';\nimport { isDraggable } from './utils/is-draggable.js';\n\nvar visualElement = function visualElement(_a) {\n var _b = _a.treeType,\n treeType = _b === void 0 ? \"\" : _b,\n build = _a.build,\n _getBaseTarget = _a.getBaseTarget,\n _makeTargetAnimatable = _a.makeTargetAnimatable,\n _measureViewportBox = _a.measureViewportBox,\n renderInstance = _a.render,\n readValueFromInstance = _a.readValueFromInstance,\n _resetTransform = _a.resetTransform,\n _restoreTransform = _a.restoreTransform,\n removeValueFromRenderState = _a.removeValueFromRenderState,\n _sortNodePosition = _a.sortNodePosition,\n scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps;\n return function (_a, options) {\n var parent = _a.parent,\n props = _a.props,\n presenceId = _a.presenceId,\n blockInitialAnimation = _a.blockInitialAnimation,\n visualState = _a.visualState;\n\n if (options === void 0) {\n options = {};\n }\n\n var latestValues = visualState.latestValues,\n renderState = visualState.renderState;\n /**\n * The instance of the render-specific node that will be hydrated by the\n * exposed React ref. So for example, this visual element can host a\n * HTMLElement, plain object, or Three.js object. The functions provided\n * in VisualElementConfig allow us to interface with this instance.\n */\n\n var instance;\n /**\n * Manages the subscriptions for a visual element's lifecycle, for instance\n * onRender and onViewportBoxUpdate.\n */\n\n var lifecycles = createLifecycles();\n /**\n *\n */\n\n var projection = createProjectionState();\n /**\n * A reference to the nearest projecting parent. This is either\n * undefined if we haven't looked for the nearest projecting parent,\n * false if there is no parent performing layout projection, or a reference\n * to the projecting parent.\n */\n\n var projectionParent;\n /**\n * This is a reference to the visual state of the \"lead\" visual element.\n * Usually, this will be this visual element. But if it shares a layoutId\n * with other visual elements, only one of them will be designated lead by\n * AnimateSharedLayout. All the other visual elements will take on the visual\n * appearance of the lead while they crossfade to it.\n */\n\n var leadProjection = projection;\n var leadLatestValues = latestValues;\n var unsubscribeFromLeadVisualElement;\n /**\n * The latest layout measurements and calculated projections. This\n * is seperate from the target projection data in visualState as\n * many visual elements might point to the same piece of visualState as\n * a target, whereas they might each have different layouts and thus\n * projection calculations needed to project into the same viewport box.\n */\n\n var layoutState = createLayoutState();\n /**\n *\n */\n\n var crossfader;\n /**\n * Keep track of whether the viewport box has been updated since the\n * last time the layout projection was re-calculated.\n */\n\n var hasViewportBoxUpdated = false;\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n\n var values = new Map();\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n\n var valueSubscriptions = new Map();\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n\n var prevMotionValues = {};\n /**\n * x/y motion values that track the progress of initiated layout\n * animations.\n *\n * TODO: Target for removal\n */\n\n var projectionTargetProgress;\n /**\n * When values are removed from all animation props we need to search\n * for a fallback value to animate to. These values are tracked in baseTarget.\n */\n\n var baseTarget = __assign({}, latestValues); // Internal methods ========================\n\n /**\n * On mount, this will be hydrated with a callback to disconnect\n * this visual element from its parent on unmount.\n */\n\n\n var removeFromVariantTree;\n /**\n *\n */\n\n function render() {\n if (!instance) return;\n\n if (element.isProjectionReady()) {\n /**\n * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.\n * This is the final box that we will then project into by calculating a transform delta and\n * applying it to the corrected box.\n */\n applyBoxTransforms(leadProjection.targetFinal, leadProjection.target, leadLatestValues);\n /**\n * Update the delta between the corrected box and the final target box, after\n * user-set transforms are applied to it. This will be used by the renderer to\n * create a transform style that will reproject the element from its actual layout\n * into the desired bounding box.\n */\n\n updateBoxDelta(layoutState.deltaFinal, layoutState.layoutCorrected, leadProjection.targetFinal, latestValues);\n }\n\n triggerBuild();\n renderInstance(instance, renderState);\n }\n\n function triggerBuild() {\n var valuesToRender = latestValues;\n\n if (crossfader && crossfader.isActive()) {\n var crossfadedValues = crossfader.getCrossfadeState(element);\n if (crossfadedValues) valuesToRender = crossfadedValues;\n }\n\n build(element, renderState, valuesToRender, leadProjection, layoutState, options, props);\n }\n\n function update() {\n lifecycles.notifyUpdate(latestValues);\n }\n\n function updateLayoutProjection() {\n if (!element.isProjectionReady()) return;\n var delta = layoutState.delta,\n treeScale = layoutState.treeScale;\n var prevTreeScaleX = treeScale.x;\n var prevTreeScaleY = treeScale.y;\n var prevDeltaTransform = layoutState.deltaTransform;\n updateLayoutDeltas(layoutState, leadProjection, element.path, latestValues);\n hasViewportBoxUpdated && element.notifyViewportBoxUpdate(leadProjection.target, delta);\n hasViewportBoxUpdated = false;\n var deltaTransform = buildLayoutProjectionTransform(delta, treeScale);\n\n if (deltaTransform !== prevDeltaTransform || // Also compare calculated treeScale, for values that rely on this only for scale correction\n prevTreeScaleX !== treeScale.x || prevTreeScaleY !== treeScale.y) {\n element.scheduleRender();\n }\n\n layoutState.deltaTransform = deltaTransform;\n }\n\n function _updateTreeLayoutProjection() {\n element.layoutTree.forEach(fireUpdateLayoutProjection);\n }\n /**\n *\n */\n\n\n function bindToMotionValue(key, value) {\n var removeOnChange = value.onChange(function (latestValue) {\n latestValues[key] = latestValue;\n props.onUpdate && sync.update(update, false, true);\n });\n var removeOnRenderRequest = value.onRenderRequest(element.scheduleRender);\n valueSubscriptions.set(key, function () {\n removeOnChange();\n removeOnRenderRequest();\n });\n }\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't neccessarily a breaking change,\n * more a reflection of the test.\n */\n\n\n var initialMotionValues = scrapeMotionValuesFromProps(props);\n\n for (var key in initialMotionValues) {\n var value = initialMotionValues[key];\n\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key], false);\n }\n }\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n\n\n var isControllingVariants = checkIfControllingVariants(props);\n var isVariantNode = checkIfVariantNode(props);\n\n var element = __assign(__assign({\n treeType: treeType,\n\n /**\n * This is a mirror of the internal instance prop, which keeps\n * VisualElement type-compatible with React's RefObject.\n */\n current: null,\n\n /**\n * The depth of this visual element within the visual element tree.\n */\n depth: parent ? parent.depth + 1 : 0,\n parent: parent,\n children: new Set(),\n\n /**\n * An ancestor path back to the root visual element. This is used\n * by layout projection to quickly recurse back up the tree.\n */\n path: parent ? __spreadArray(__spreadArray([], __read(parent.path)), [parent]) : [],\n layoutTree: parent ? parent.layoutTree : new FlatTree(),\n\n /**\n *\n */\n presenceId: presenceId,\n projection: projection,\n\n /**\n * If this component is part of the variant tree, it should track\n * any children that are also part of the tree. This is essentially\n * a shadow tree to simplify logic around how to stagger over children.\n */\n variantChildren: isVariantNode ? new Set() : undefined,\n\n /**\n * Whether this instance is visible. This can be changed imperatively\n * by AnimateSharedLayout, is analogous to CSS's visibility in that\n * hidden elements should take up layout, and needs enacting by the configured\n * render function.\n */\n isVisible: undefined,\n\n /**\n * Normally, if a component is controlled by a parent's variants, it can\n * rely on that ancestor to trigger animations further down the tree.\n * However, if a component is created after its parent is mounted, the parent\n * won't trigger that mount animation so the child needs to.\n *\n * TODO: This might be better replaced with a method isParentMounted\n */\n manuallyAnimateOnMount: Boolean(parent === null || parent === void 0 ? void 0 : parent.isMounted()),\n\n /**\n * This can be set by AnimatePresence to force components that mount\n * at the same time as it to mount as if they have initial={false} set.\n */\n blockInitialAnimation: blockInitialAnimation,\n\n /**\n * Determine whether this component has mounted yet. This is mostly used\n * by variant children to determine whether they need to trigger their\n * own animations on mount.\n */\n isMounted: function isMounted() {\n return Boolean(instance);\n },\n mount: function mount(newInstance) {\n instance = element.current = newInstance;\n element.pointTo(element);\n\n if (isVariantNode && parent && !isControllingVariants) {\n removeFromVariantTree = parent === null || parent === void 0 ? void 0 : parent.addVariantChild(element);\n }\n\n parent === null || parent === void 0 ? void 0 : parent.children.add(element);\n },\n\n /**\n *\n */\n unmount: function unmount() {\n cancelSync.update(update);\n cancelSync.render(render);\n cancelSync.preRender(element.updateLayoutProjection);\n valueSubscriptions.forEach(function (remove) {\n return remove();\n });\n element.stopLayoutAnimation();\n element.layoutTree.remove(element);\n removeFromVariantTree === null || removeFromVariantTree === void 0 ? void 0 : removeFromVariantTree();\n parent === null || parent === void 0 ? void 0 : parent.children.delete(element);\n unsubscribeFromLeadVisualElement === null || unsubscribeFromLeadVisualElement === void 0 ? void 0 : unsubscribeFromLeadVisualElement();\n lifecycles.clearAllListeners();\n },\n\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild: function addVariantChild(child) {\n var _a;\n\n var closestVariantNode = element.getClosestVariantNode();\n\n if (closestVariantNode) {\n (_a = closestVariantNode.variantChildren) === null || _a === void 0 ? void 0 : _a.add(child);\n return function () {\n return closestVariantNode.variantChildren.delete(child);\n };\n }\n },\n sortNodePosition: function sortNodePosition(other) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (!_sortNodePosition || treeType !== other.treeType) return 0;\n return _sortNodePosition(element.getInstance(), other.getInstance());\n },\n\n /**\n * Returns the closest variant node in the tree starting from\n * this visual element.\n */\n getClosestVariantNode: function getClosestVariantNode() {\n return isVariantNode ? element : parent === null || parent === void 0 ? void 0 : parent.getClosestVariantNode();\n },\n\n /**\n * A method that schedules an update to layout projections throughout\n * the tree. We inherit from the parent so there's only ever one\n * job scheduled on the next frame - that of the root visual element.\n */\n scheduleUpdateLayoutProjection: parent ? parent.scheduleUpdateLayoutProjection : function () {\n return sync.preRender(element.updateTreeLayoutProjection, false, true);\n },\n\n /**\n * Expose the latest layoutId prop.\n */\n getLayoutId: function getLayoutId() {\n return props.layoutId;\n },\n\n /**\n * Returns the current instance.\n */\n getInstance: function getInstance() {\n return instance;\n },\n\n /**\n * Get/set the latest static values.\n */\n getStaticValue: function getStaticValue(key) {\n return latestValues[key];\n },\n setStaticValue: function setStaticValue(key, value) {\n return latestValues[key] = value;\n },\n\n /**\n * Returns the latest motion value state. Currently only used to take\n * a snapshot of the visual element - perhaps this can return the whole\n * visual state\n */\n getLatestValues: function getLatestValues() {\n return latestValues;\n },\n\n /**\n * Set the visiblity of the visual element. If it's changed, schedule\n * a render to reflect these changes.\n */\n setVisibility: function setVisibility(visibility) {\n if (element.isVisible === visibility) return;\n element.isVisible = visibility;\n element.scheduleRender();\n },\n\n /**\n * Make a target animatable by Popmotion. For instance, if we're\n * trying to animate width from 100px to 100vw we need to measure 100vw\n * in pixels to determine what we really need to animate to. This is also\n * pluggable to support Framer's custom value types like Color,\n * and CSS variables.\n */\n makeTargetAnimatable: function makeTargetAnimatable(target, canMutate) {\n if (canMutate === void 0) {\n canMutate = true;\n }\n\n return _makeTargetAnimatable(element, target, props, canMutate);\n },\n // Motion values ========================\n\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue: function addValue(key, value) {\n // Remove existing value if it exists\n if (element.hasValue(key)) element.removeValue(key);\n values.set(key, value);\n latestValues[key] = value.get();\n bindToMotionValue(key, value);\n },\n\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue: function removeValue(key) {\n var _a;\n\n values.delete(key);\n (_a = valueSubscriptions.get(key)) === null || _a === void 0 ? void 0 : _a();\n valueSubscriptions.delete(key);\n delete latestValues[key];\n removeValueFromRenderState(key, renderState);\n },\n\n /**\n * Check whether we have a motion value for this key\n */\n hasValue: function hasValue(key) {\n return values.has(key);\n },\n\n /**\n * Get a motion value for this key. If called with a default\n * value, we'll create one if none exists.\n */\n getValue: function getValue(key, defaultValue) {\n var value = values.get(key);\n\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue);\n element.addValue(key, value);\n }\n\n return value;\n },\n\n /**\n * Iterate over our motion values.\n */\n forEachValue: function forEachValue(callback) {\n return values.forEach(callback);\n },\n\n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue: function readValue(key) {\n var _a;\n\n return (_a = latestValues[key]) !== null && _a !== void 0 ? _a : readValueFromInstance(instance, key, options);\n },\n\n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget: function setBaseTarget(key, value) {\n baseTarget[key] = value;\n },\n\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget: function getBaseTarget(key) {\n if (_getBaseTarget) {\n var target = _getBaseTarget(props, key);\n\n if (target !== undefined && !isMotionValue(target)) return target;\n }\n\n return baseTarget[key];\n }\n }, lifecycles), {\n /**\n * Build the renderer state based on the latest visual state.\n */\n build: function build() {\n triggerBuild();\n return renderState;\n },\n\n /**\n * Schedule a render on the next animation frame.\n */\n scheduleRender: function scheduleRender() {\n sync.render(render, false, true);\n },\n\n /**\n * Synchronously fire render. It's prefered that we batch renders but\n * in many circumstances, like layout measurement, we need to run this\n * synchronously. However in those instances other measures should be taken\n * to batch reads/writes.\n */\n syncRender: render,\n\n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n setProps: function setProps(newProps) {\n props = newProps;\n lifecycles.updatePropListeners(newProps);\n prevMotionValues = updateMotionValuesFromProps(element, scrapeMotionValuesFromProps(props), prevMotionValues);\n },\n getProps: function getProps() {\n return props;\n },\n // Variants ==============================\n\n /**\n * Returns the variant definition with a given name.\n */\n getVariant: function getVariant(name) {\n var _a;\n\n return (_a = props.variants) === null || _a === void 0 ? void 0 : _a[name];\n },\n\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition: function getDefaultTransition() {\n return props.transition;\n },\n\n /**\n * Used by child variant nodes to get the closest ancestor variant props.\n */\n getVariantContext: function getVariantContext(startAtParent) {\n if (startAtParent === void 0) {\n startAtParent = false;\n }\n\n if (startAtParent) return parent === null || parent === void 0 ? void 0 : parent.getVariantContext();\n\n if (!isControllingVariants) {\n var context_1 = (parent === null || parent === void 0 ? void 0 : parent.getVariantContext()) || {};\n\n if (props.initial !== undefined) {\n context_1.initial = props.initial;\n }\n\n return context_1;\n }\n\n var context = {};\n\n for (var i = 0; i < numVariantProps; i++) {\n var name_1 = variantProps[i];\n var prop = props[name_1];\n\n if (isVariantLabel(prop) || prop === false) {\n context[name_1] = prop;\n }\n }\n\n return context;\n },\n // Layout projection ==============================\n\n /**\n * Enable layout projection for this visual element. Won't actually\n * occur until we also have hydrated layout measurements.\n */\n enableLayoutProjection: function enableLayoutProjection() {\n projection.isEnabled = true;\n element.layoutTree.add(element);\n },\n\n /**\n * Lock the projection target, for instance when dragging, so\n * nothing else can try and animate it.\n */\n lockProjectionTarget: function lockProjectionTarget() {\n projection.isTargetLocked = true;\n },\n unlockProjectionTarget: function unlockProjectionTarget() {\n element.stopLayoutAnimation();\n projection.isTargetLocked = false;\n },\n getLayoutState: function getLayoutState() {\n return layoutState;\n },\n setCrossfader: function setCrossfader(newCrossfader) {\n crossfader = newCrossfader;\n },\n isProjectionReady: function isProjectionReady() {\n return projection.isEnabled && projection.isHydrated && layoutState.isHydrated;\n },\n\n /**\n * Start a layout animation on a given axis.\n */\n startLayoutAnimation: function startLayoutAnimation(axis, transition, isRelative) {\n if (isRelative === void 0) {\n isRelative = false;\n }\n\n var progress = element.getProjectionAnimationProgress()[axis];\n\n var _a = isRelative ? projection.relativeTarget[axis] : projection.target[axis],\n min = _a.min,\n max = _a.max;\n\n var length = max - min;\n progress.clearListeners();\n progress.set(min);\n progress.set(min); // Set twice to hard-reset velocity\n\n progress.onChange(function (v) {\n element.setProjectionTargetAxis(axis, v, v + length, isRelative);\n });\n return element.animateMotionValue(axis, progress, 0, transition);\n },\n\n /**\n * Stop layout animations.\n */\n stopLayoutAnimation: function stopLayoutAnimation() {\n eachAxis(function (axis) {\n return element.getProjectionAnimationProgress()[axis].stop();\n });\n },\n\n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox: function measureViewportBox(withTransform) {\n if (withTransform === void 0) {\n withTransform = true;\n }\n\n var viewportBox = _measureViewportBox(instance, options);\n\n if (!withTransform) removeBoxTransforms(viewportBox, latestValues);\n return viewportBox;\n },\n\n /**\n * Get the motion values tracking the layout animations on each\n * axis. Lazy init if not already created.\n */\n getProjectionAnimationProgress: function getProjectionAnimationProgress() {\n projectionTargetProgress || (projectionTargetProgress = {\n x: motionValue(0),\n y: motionValue(0)\n });\n return projectionTargetProgress;\n },\n\n /**\n * Update the projection of a single axis. Schedule an update to\n * the tree layout projection.\n */\n setProjectionTargetAxis: function setProjectionTargetAxis(axis, min, max, isRelative) {\n if (isRelative === void 0) {\n isRelative = false;\n }\n\n var target;\n\n if (isRelative) {\n if (!projection.relativeTarget) {\n projection.relativeTarget = axisBox();\n }\n\n target = projection.relativeTarget[axis];\n } else {\n projection.relativeTarget = undefined;\n target = projection.target[axis];\n }\n\n projection.isHydrated = true;\n target.min = min;\n target.max = max; // Flag that we want to fire the onViewportBoxUpdate event handler\n\n hasViewportBoxUpdated = true;\n lifecycles.notifySetAxisTarget();\n },\n\n /**\n * Rebase the projection target on top of the provided viewport box\n * or the measured layout. This ensures that non-animating elements\n * don't fall out of sync differences in measurements vs projections\n * after a page scroll or other relayout.\n */\n rebaseProjectionTarget: function rebaseProjectionTarget(force, box) {\n if (box === void 0) {\n box = layoutState.layout;\n }\n\n var _a = element.getProjectionAnimationProgress(),\n x = _a.x,\n y = _a.y;\n\n var shouldRebase = !projection.relativeTarget && !projection.isTargetLocked && !x.isAnimating() && !y.isAnimating();\n\n if (force || shouldRebase) {\n eachAxis(function (axis) {\n var _a = box[axis],\n min = _a.min,\n max = _a.max;\n element.setProjectionTargetAxis(axis, min, max);\n });\n }\n },\n\n /**\n * Notify the visual element that its layout is up-to-date.\n * Currently Animate.tsx uses this to check whether a layout animation\n * needs to be performed.\n */\n notifyLayoutReady: function notifyLayoutReady(config) {\n setCurrentViewportBox(element);\n element.notifyLayoutUpdate(layoutState.layout, element.prevViewportBox || layoutState.layout, config);\n },\n\n /**\n * Temporarily reset the transform of the instance.\n */\n resetTransform: function resetTransform() {\n return _resetTransform(element, instance, props);\n },\n restoreTransform: function restoreTransform() {\n return _restoreTransform(instance, renderState);\n },\n updateLayoutProjection: updateLayoutProjection,\n updateTreeLayoutProjection: function updateTreeLayoutProjection() {\n element.layoutTree.forEach(fireResolveRelativeTargetBox);\n /**\n * Schedule the projection updates at the end of the current preRender\n * step. This will ensure that all layout trees will first resolve\n * relative projection boxes into viewport boxes, and *then*\n * update projections.\n */\n\n sync.preRender(_updateTreeLayoutProjection, false, true); // sync.postRender(() => element.scheduleUpdateLayoutProjection())\n },\n getProjectionParent: function getProjectionParent() {\n if (projectionParent === undefined) {\n var foundParent = false; // Search backwards through the tree path\n\n for (var i = element.path.length - 1; i >= 0; i--) {\n var ancestor = element.path[i];\n\n if (ancestor.projection.isEnabled) {\n foundParent = ancestor;\n break;\n }\n }\n\n projectionParent = foundParent;\n }\n\n return projectionParent;\n },\n resolveRelativeTargetBox: function resolveRelativeTargetBox() {\n var relativeParent = element.getProjectionParent();\n if (!projection.relativeTarget || !relativeParent) return;\n calcRelativeBox(projection, relativeParent.projection);\n\n if (isDraggable(relativeParent)) {\n var target = projection.target;\n applyBoxTransforms(target, target, relativeParent.getLatestValues());\n }\n },\n shouldResetTransform: function shouldResetTransform() {\n return Boolean(props._layoutResetTransform);\n },\n\n /**\n *\n */\n pointTo: function pointTo(newLead) {\n leadProjection = newLead.projection;\n leadLatestValues = newLead.getLatestValues();\n /**\n * Subscribe to lead component's layout animations\n */\n\n unsubscribeFromLeadVisualElement === null || unsubscribeFromLeadVisualElement === void 0 ? void 0 : unsubscribeFromLeadVisualElement();\n unsubscribeFromLeadVisualElement = pipe(newLead.onSetAxisTarget(element.scheduleUpdateLayoutProjection), newLead.onLayoutAnimationComplete(function () {\n var _a;\n\n if (element.isPresent) {\n element.presence = Presence.Present;\n } else {\n (_a = element.layoutSafeToRemove) === null || _a === void 0 ? void 0 : _a.call(element);\n }\n }));\n },\n // TODO: Clean this up\n isPresent: true,\n presence: Presence.Entering\n });\n\n return element;\n };\n};\n\nfunction fireResolveRelativeTargetBox(child) {\n child.resolveRelativeTargetBox();\n}\n\nfunction fireUpdateLayoutProjection(child) {\n child.updateLayoutProjection();\n}\n\nvar variantProps = __spreadArray([\"initial\"], __read(variantPriorityOrder));\n\nvar numVariantProps = variantProps.length;\nexport { visualElement };","import { motionValue } from '../../value/index.js';\nimport { isMotionValue } from '../../value/utils/is-motion-value.js';\n\nfunction updateMotionValuesFromProps(element, next, prev) {\n var _a;\n\n for (var key in next) {\n var nextValue = next[key];\n var prevValue = prev[key];\n\n if (isMotionValue(nextValue)) {\n /**\n * If this is a motion value found in props or style, we want to add it\n * to our visual element's motion value map.\n */\n element.addValue(key, nextValue);\n } else if (isMotionValue(prevValue)) {\n /**\n * If we're swapping to a new motion value, create a new motion value\n * from that\n */\n element.addValue(key, motionValue(nextValue));\n } else if (prevValue !== nextValue) {\n /**\n * If this is a flat value that has changed, update the motion value\n * or create one if it doesn't exist. We only want to do this if we're\n * not handling the value with our animation state.\n */\n if (element.hasValue(key)) {\n var existingValue = element.getValue(key); // TODO: Only update values that aren't being animated or even looked at\n\n !existingValue.hasAnimated && existingValue.set(nextValue);\n } else {\n element.addValue(key, motionValue((_a = element.getStaticValue(key)) !== null && _a !== void 0 ? _a : nextValue));\n }\n }\n } // Handle removed values\n\n\n for (var key in prev) {\n if (next[key] === undefined) element.removeValue(key);\n }\n\n return next;\n}\n\nexport { updateMotionValuesFromProps };","import { calcRelativeOffset } from '../../../motion/features/layout/utils.js';\nimport { eachAxis } from '../../../utils/each-axis.js';\n\nfunction setCurrentViewportBox(visualElement) {\n var projectionParent = visualElement.getProjectionParent();\n\n if (!projectionParent) {\n visualElement.rebaseProjectionTarget();\n return;\n }\n\n var relativeOffset = calcRelativeOffset(projectionParent.getLayoutState().layout, visualElement.getLayoutState().layout);\n eachAxis(function (axis) {\n visualElement.setProjectionTargetAxis(axis, relativeOffset[axis].min, relativeOffset[axis].max, true);\n });\n}\n\nexport { setCurrentViewportBox };","import { __assign, __read } from 'tslib';\nimport { number, px } from 'style-value-types';\nimport { isKeyframesTarget } from '../../../animation/utils/is-keyframes-target.js';\nimport { invariant } from 'hey-listen';\nimport { transformProps } from '../../html/utils/transform.js';\nimport { findDimensionValueType } from '../value-types/dimensions.js';\nvar positionalKeys = new Set([\"width\", \"height\", \"top\", \"left\", \"right\", \"bottom\", \"x\", \"y\"]);\n\nvar isPositionalKey = function isPositionalKey(key) {\n return positionalKeys.has(key);\n};\n\nvar hasPositionalKey = function hasPositionalKey(target) {\n return Object.keys(target).some(isPositionalKey);\n};\n\nvar setAndResetVelocity = function setAndResetVelocity(value, to) {\n // Looks odd but setting it twice doesn't render, it'll just\n // set both prev and current to the latest value\n value.set(to, false);\n value.set(to);\n};\n\nvar isNumOrPxType = function isNumOrPxType(v) {\n return v === number || v === px;\n};\n\nvar BoundingBoxDimension;\n\n(function (BoundingBoxDimension) {\n BoundingBoxDimension[\"width\"] = \"width\";\n BoundingBoxDimension[\"height\"] = \"height\";\n BoundingBoxDimension[\"left\"] = \"left\";\n BoundingBoxDimension[\"right\"] = \"right\";\n BoundingBoxDimension[\"top\"] = \"top\";\n BoundingBoxDimension[\"bottom\"] = \"bottom\";\n})(BoundingBoxDimension || (BoundingBoxDimension = {}));\n\nvar getPosFromMatrix = function getPosFromMatrix(matrix, pos) {\n return parseFloat(matrix.split(\", \")[pos]);\n};\n\nvar getTranslateFromMatrix = function getTranslateFromMatrix(pos2, pos3) {\n return function (_bbox, _a) {\n var transform = _a.transform;\n if (transform === \"none\" || !transform) return 0;\n var matrix3d = transform.match(/^matrix3d\\((.+)\\)$/);\n\n if (matrix3d) {\n return getPosFromMatrix(matrix3d[1], pos3);\n } else {\n var matrix = transform.match(/^matrix\\((.+)\\)$/);\n\n if (matrix) {\n return getPosFromMatrix(matrix[1], pos2);\n } else {\n return 0;\n }\n }\n };\n};\n\nvar transformKeys = new Set([\"x\", \"y\", \"z\"]);\nvar nonTranslationalTransformKeys = transformProps.filter(function (key) {\n return !transformKeys.has(key);\n});\n\nfunction removeNonTranslationalTransform(visualElement) {\n var removedTransforms = [];\n nonTranslationalTransformKeys.forEach(function (key) {\n var value = visualElement.getValue(key);\n\n if (value !== undefined) {\n removedTransforms.push([key, value.get()]);\n value.set(key.startsWith(\"scale\") ? 1 : 0);\n }\n }); // Apply changes to element before measurement\n\n if (removedTransforms.length) visualElement.syncRender();\n return removedTransforms;\n}\n\nvar positionalValues = {\n // Dimensions\n width: function width(_a) {\n var x = _a.x;\n return x.max - x.min;\n },\n height: function height(_a) {\n var y = _a.y;\n return y.max - y.min;\n },\n top: function top(_bbox, _a) {\n var top = _a.top;\n return parseFloat(top);\n },\n left: function left(_bbox, _a) {\n var left = _a.left;\n return parseFloat(left);\n },\n bottom: function bottom(_a, _b) {\n var y = _a.y;\n var top = _b.top;\n return parseFloat(top) + (y.max - y.min);\n },\n right: function right(_a, _b) {\n var x = _a.x;\n var left = _b.left;\n return parseFloat(left) + (x.max - x.min);\n },\n // Transform\n x: getTranslateFromMatrix(4, 13),\n y: getTranslateFromMatrix(5, 14)\n};\n\nvar convertChangedValueTypes = function convertChangedValueTypes(target, visualElement, changedKeys) {\n var originBbox = visualElement.measureViewportBox();\n var element = visualElement.getInstance();\n var elementComputedStyle = getComputedStyle(element);\n var display = elementComputedStyle.display,\n top = elementComputedStyle.top,\n left = elementComputedStyle.left,\n bottom = elementComputedStyle.bottom,\n right = elementComputedStyle.right,\n transform = elementComputedStyle.transform;\n var originComputedStyle = {\n top: top,\n left: left,\n bottom: bottom,\n right: right,\n transform: transform\n }; // If the element is currently set to display: \"none\", make it visible before\n // measuring the target bounding box\n\n if (display === \"none\") {\n visualElement.setStaticValue(\"display\", target.display || \"block\");\n } // Apply the latest values (as set in checkAndConvertChangedValueTypes)\n\n\n visualElement.syncRender();\n var targetBbox = visualElement.measureViewportBox();\n changedKeys.forEach(function (key) {\n // Restore styles to their **calculated computed style**, not their actual\n // originally set style. This allows us to animate between equivalent pixel units.\n var value = visualElement.getValue(key);\n setAndResetVelocity(value, positionalValues[key](originBbox, originComputedStyle));\n target[key] = positionalValues[key](targetBbox, elementComputedStyle);\n });\n return target;\n};\n\nvar checkAndConvertChangedValueTypes = function checkAndConvertChangedValueTypes(visualElement, target, origin, transitionEnd) {\n if (origin === void 0) {\n origin = {};\n }\n\n if (transitionEnd === void 0) {\n transitionEnd = {};\n }\n\n target = __assign({}, target);\n transitionEnd = __assign({}, transitionEnd);\n var targetPositionalKeys = Object.keys(target).filter(isPositionalKey); // We want to remove any transform values that could affect the element's bounding box before\n // it's measured. We'll reapply these later.\n\n var removedTransformValues = [];\n var hasAttemptedToRemoveTransformValues = false;\n var changedValueTypeKeys = [];\n targetPositionalKeys.forEach(function (key) {\n var value = visualElement.getValue(key);\n if (!visualElement.hasValue(key)) return;\n var from = origin[key];\n var to = target[key];\n var fromType = findDimensionValueType(from);\n var toType; // TODO: The current implementation of this basically throws an error\n // if you try and do value conversion via keyframes. There's probably\n // a way of doing this but the performance implications would need greater scrutiny,\n // as it'd be doing multiple resize-remeasure operations.\n\n if (isKeyframesTarget(to)) {\n var numKeyframes = to.length;\n\n for (var i = to[0] === null ? 1 : 0; i < numKeyframes; i++) {\n if (!toType) {\n toType = findDimensionValueType(to[i]);\n invariant(toType === fromType || isNumOrPxType(fromType) && isNumOrPxType(toType), \"Keyframes must be of the same dimension as the current value\");\n } else {\n invariant(findDimensionValueType(to[i]) === toType, \"All keyframes must be of the same type\");\n }\n }\n } else {\n toType = findDimensionValueType(to);\n }\n\n if (fromType !== toType) {\n // If they're both just number or px, convert them both to numbers rather than\n // relying on resize/remeasure to convert (which is wasteful in this situation)\n if (isNumOrPxType(fromType) && isNumOrPxType(toType)) {\n var current = value.get();\n\n if (typeof current === \"string\") {\n value.set(parseFloat(current));\n }\n\n if (typeof to === \"string\") {\n target[key] = parseFloat(to);\n } else if (Array.isArray(to) && toType === px) {\n target[key] = to.map(parseFloat);\n }\n } else if ((fromType === null || fromType === void 0 ? void 0 : fromType.transform) && (toType === null || toType === void 0 ? void 0 : toType.transform) && (from === 0 || to === 0)) {\n // If one or the other value is 0, it's safe to coerce it to the\n // type of the other without measurement\n if (from === 0) {\n value.set(toType.transform(from));\n } else {\n target[key] = fromType.transform(to);\n }\n } else {\n // If we're going to do value conversion via DOM measurements, we first\n // need to remove non-positional transform values that could affect the bbox measurements.\n if (!hasAttemptedToRemoveTransformValues) {\n removedTransformValues = removeNonTranslationalTransform(visualElement);\n hasAttemptedToRemoveTransformValues = true;\n }\n\n changedValueTypeKeys.push(key);\n transitionEnd[key] = transitionEnd[key] !== undefined ? transitionEnd[key] : target[key];\n setAndResetVelocity(value, to);\n }\n }\n });\n\n if (changedValueTypeKeys.length) {\n var convertedTarget = convertChangedValueTypes(target, visualElement, changedValueTypeKeys); // If we removed transform values, reapply them before the next render\n\n if (removedTransformValues.length) {\n removedTransformValues.forEach(function (_a) {\n var _b = __read(_a, 2),\n key = _b[0],\n value = _b[1];\n\n visualElement.getValue(key).set(value);\n });\n } // Reapply original values\n\n\n visualElement.syncRender();\n return {\n target: convertedTarget,\n transitionEnd: transitionEnd\n };\n } else {\n return {\n target: target,\n transitionEnd: transitionEnd\n };\n }\n};\n/**\n * Convert value types for x/y/width/height/top/left/bottom/right\n *\n * Allows animation between `'auto'` -> `'100%'` or `0` -> `'calc(50% - 10vw)'`\n *\n * @internal\n */\n\n\nfunction unitConversion(visualElement, target, origin, transitionEnd) {\n return hasPositionalKey(target) ? checkAndConvertChangedValueTypes(visualElement, target, origin, transitionEnd) : {\n target: target,\n transitionEnd: transitionEnd\n };\n}\n\nexport { BoundingBoxDimension, unitConversion };","import { resolveCSSVariables } from './css-variables-conversion.js';\nimport { unitConversion } from './unit-conversion.js';\n/**\n * Parse a DOM variant to make it animatable. This involves resolving CSS variables\n * and ensuring animations like \"20%\" => \"calc(50vw)\" are performed in pixels.\n */\n\nvar parseDomVariant = function parseDomVariant(visualElement, target, origin, transitionEnd) {\n var resolved = resolveCSSVariables(visualElement, target, transitionEnd);\n target = resolved.target;\n transitionEnd = resolved.transitionEnd;\n return unitConversion(visualElement, target, origin, transitionEnd);\n};\n\nexport { parseDomVariant };","import { __rest, __assign } from 'tslib';\nimport { visualElement } from '../index.js';\nimport { getOrigin, checkTargetForNewValues } from '../utils/setters.js';\nimport { getBoundingBox } from '../dom/projection/measure.js';\nimport { buildHTMLStyles } from './utils/build-styles.js';\nimport { isCSSVariable } from '../dom/utils/is-css-variable.js';\nimport { parseDomVariant } from '../dom/utils/parse-dom-variant.js';\nimport { isTransformProp } from './utils/transform.js';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.js';\nimport { renderHTML } from './utils/render.js';\nimport { getDefaultValueType } from '../dom/value-types/defaults.js';\nimport { buildLayoutProjectionTransformOrigin, buildLayoutProjectionTransform } from './utils/build-projection-transform.js';\n\nfunction getComputedStyle(element) {\n return window.getComputedStyle(element);\n}\n\nvar htmlConfig = {\n treeType: \"dom\",\n readValueFromInstance: function readValueFromInstance(domElement, key) {\n if (isTransformProp(key)) {\n var defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n } else {\n var computedStyle = getComputedStyle(domElement);\n return (isCSSVariable(key) ? computedStyle.getPropertyValue(key) : computedStyle[key]) || 0;\n }\n },\n sortNodePosition: function sortNodePosition(a, b) {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b preceeds a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n },\n getBaseTarget: function getBaseTarget(props, key) {\n var _a;\n\n return (_a = props.style) === null || _a === void 0 ? void 0 : _a[key];\n },\n measureViewportBox: function measureViewportBox(element, _a) {\n var transformPagePoint = _a.transformPagePoint;\n return getBoundingBox(element, transformPagePoint);\n },\n\n /**\n * Reset the transform on the current Element. This is called as part\n * of a batched process across the entire layout tree. To remove this write\n * cycle it'd be interesting to see if it's possible to \"undo\" all the current\n * layout transforms up the tree in the same way this.getBoundingBoxWithoutTransforms\n * works\n */\n resetTransform: function resetTransform(element, domElement, props) {\n var transformTemplate = props.transformTemplate;\n domElement.style.transform = transformTemplate ? transformTemplate({}, \"\") : \"none\"; // Ensure that whatever happens next, we restore our transform on the next frame\n\n element.scheduleRender();\n },\n restoreTransform: function restoreTransform(instance, mutableState) {\n instance.style.transform = mutableState.style.transform;\n },\n removeValueFromRenderState: function removeValueFromRenderState(key, _a) {\n var vars = _a.vars,\n style = _a.style;\n delete vars[key];\n delete style[key];\n },\n\n /**\n * Ensure that HTML and Framer-specific value types like `px`->`%` and `Color`\n * can be animated by Motion.\n */\n makeTargetAnimatable: function makeTargetAnimatable(element, _a, _b, isMounted) {\n var transformValues = _b.transformValues;\n\n if (isMounted === void 0) {\n isMounted = true;\n }\n\n var transition = _a.transition,\n transitionEnd = _a.transitionEnd,\n target = __rest(_a, [\"transition\", \"transitionEnd\"]);\n\n var origin = getOrigin(target, transition || {}, element);\n /**\n * If Framer has provided a function to convert `Color` etc value types, convert them\n */\n\n if (transformValues) {\n if (transitionEnd) transitionEnd = transformValues(transitionEnd);\n if (target) target = transformValues(target);\n if (origin) origin = transformValues(origin);\n }\n\n if (isMounted) {\n checkTargetForNewValues(element, target, origin);\n var parsed = parseDomVariant(element, target, origin, transitionEnd);\n transitionEnd = parsed.transitionEnd;\n target = parsed.target;\n }\n\n return __assign({\n transition: transition,\n transitionEnd: transitionEnd\n }, target);\n },\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n build: function build(element, renderState, latestValues, projection, layoutState, options, props) {\n if (element.isVisible !== undefined) {\n renderState.style.visibility = element.isVisible ? \"visible\" : \"hidden\";\n }\n\n var isProjectionTranform = projection.isEnabled && layoutState.isHydrated;\n buildHTMLStyles(renderState, latestValues, projection, layoutState, options, props.transformTemplate, isProjectionTranform ? buildLayoutProjectionTransform : undefined, isProjectionTranform ? buildLayoutProjectionTransformOrigin : undefined);\n },\n render: renderHTML\n};\nvar htmlVisualElement = visualElement(htmlConfig);\nexport { getComputedStyle, htmlConfig, htmlVisualElement };","/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nvar isNumericalString = function isNumericalString(v) {\n return /^\\-?\\d*\\.?\\d+$/.test(v);\n};\n\nexport { isNumericalString };","import { __assign } from 'tslib';\nimport { visualElement } from '../index.js';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.js';\nimport { htmlConfig } from '../html/visual-element.js';\nimport { buildSVGAttrs } from './utils/build-attrs.js';\nimport { camelToDash } from '../dom/utils/camel-to-dash.js';\nimport { camelCaseAttributes } from './utils/camel-case-attrs.js';\nimport { isTransformProp } from '../html/utils/transform.js';\nimport { renderSVG } from './utils/render.js';\nimport { getDefaultValueType } from '../dom/value-types/defaults.js';\nimport { buildLayoutProjectionTransformOrigin, buildLayoutProjectionTransform } from '../html/utils/build-projection-transform.js';\nvar svgVisualElement = visualElement(__assign(__assign({}, htmlConfig), {\n getBaseTarget: function getBaseTarget(props, key) {\n return props[key];\n },\n readValueFromInstance: function readValueFromInstance(domElement, key) {\n var _a;\n\n if (isTransformProp(key)) {\n return ((_a = getDefaultValueType(key)) === null || _a === void 0 ? void 0 : _a.default) || 0;\n }\n\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n return domElement.getAttribute(key);\n },\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n build: function build(_element, renderState, latestValues, projection, layoutState, options, props) {\n var isProjectionTranform = projection.isEnabled && layoutState.isHydrated;\n buildSVGAttrs(renderState, latestValues, projection, layoutState, options, props.transformTemplate, isProjectionTranform ? buildLayoutProjectionTransform : undefined, isProjectionTranform ? buildLayoutProjectionTransformOrigin : undefined);\n },\n render: renderSVG\n}));\nexport { svgVisualElement };","import { htmlVisualElement } from '../html/visual-element.js';\nimport { svgVisualElement } from '../svg/visual-element.js';\nimport { isSVGComponent } from './utils/is-svg-component.js';\n\nvar createDomVisualElement = function createDomVisualElement(Component, options) {\n return isSVGComponent(Component) ? svgVisualElement(options, {\n enableHardwareAcceleration: false\n }) : htmlVisualElement(options, {\n enableHardwareAcceleration: true\n });\n};\n\nexport { createDomVisualElement };","import { __assign } from 'tslib';\nimport { createMotionComponent } from '../../motion/index.js';\nimport { createMotionProxy } from './motion-proxy.js';\nimport { createDomMotionConfig } from './utils/create-config.js';\nimport { gestureAnimations } from '../../motion/features/gestures.js';\nimport { animations } from '../../motion/features/animations.js';\nimport { drag } from '../../motion/features/drag.js';\nimport { layoutAnimations } from '../../motion/features/layout/index.js';\nimport { createDomVisualElement } from './create-visual-element.js';\n\nvar featureBundle = __assign(__assign(__assign(__assign({}, animations), gestureAnimations), drag), layoutAnimations);\n/**\n * HTML & SVG components, optimised for use with gestures and animation. These can be used as\n * drop-in replacements for any HTML & SVG component, all CSS & SVG properties are supported.\n *\n * @public\n */\n\n\nvar motion = /*@__PURE__*/createMotionProxy(function (Component, config) {\n return createDomMotionConfig(Component, config, featureBundle, createDomVisualElement);\n});\n/**\n * Create a DOM `motion` component with the provided string. This is primarily intended\n * as a full alternative to `motion` for consumers who have to support environments that don't\n * support `Proxy`.\n *\n * ```javascript\n * import { createDomMotionComponent } from \"framer-motion\"\n *\n * const motion = {\n * div: createDomMotionComponent('div')\n * }\n * ```\n *\n * @public\n */\n\nfunction createDomMotionComponent(key) {\n return createMotionComponent(createDomMotionConfig(key, {\n forwardMotionProps: false\n }, featureBundle, createDomVisualElement));\n}\n\nexport { createDomMotionComponent, motion };","import { __assign } from 'tslib';\nimport { isSVGComponent } from './is-svg-component.js';\nimport { createUseRender } from '../use-render.js';\nimport { svgMotionConfig } from '../../svg/config-motion.js';\nimport { htmlMotionConfig } from '../../html/config-motion.js';\n\nfunction createDomMotionConfig(Component, _a, preloadedFeatures, createVisualElement) {\n var _b = _a.forwardMotionProps,\n forwardMotionProps = _b === void 0 ? false : _b;\n var baseConfig = isSVGComponent(Component) ? svgMotionConfig : htmlMotionConfig;\n return __assign(__assign({}, baseConfig), {\n preloadedFeatures: preloadedFeatures,\n useRender: createUseRender(forwardMotionProps),\n createVisualElement: createVisualElement,\n Component: Component\n });\n}\n\nexport { createDomMotionConfig };","// extracted by mini-css-extract-plugin\nexport var redBackground = \"navigation-module--red-background--3WcOq\";\nexport var headerStyle = \"navigation-module--header-style--xaOYe\";\nexport var drawer = \"navigation-module--drawer--38X2p\";\nexport var activeDrawer = \"navigation-module--active-drawer--2tIJP\";\nexport var burger = \"navigation-module--burger--dIU3B\";\nexport var activeBurger = \"navigation-module--active-burger--1hfuU\";\nexport var list = \"navigation-module--list--FGeMO\";\nexport var listContainer = \"navigation-module--list-container--3S1oC\";\nexport var listLink = \"navigation-module--list-link--3c-xS\";\nexport var animation = \"navigation-module--animation--1nloa\";\nexport var burgerContainer = \"navigation-module--burger-container--1i6z7\";","import { Link } from \"gatsby\";\nimport React from \"react\";\nimport * as Style from \"./navigation.module.css\";\nimport {\n hamburger,\n hamburgerBox,\n hamburgerInner,\n hamburgerArrowR,\n isActive,\n} from \"./hamburgers.module.css\";\nimport { fontFamily } from \"../global.module.css\";\n\ntype MyState = {\n isActive: boolean;\n isMobile: boolean;\n};\n\nclass NavigationBar extends React.Component<any, MyState> {\n constructor(props) {\n super(props);\n this.toggleActive = this.toggleActive.bind(this);\n this.state = {\n isActive: false,\n isMobile: document.documentElement.clientWidth < 768,\n };\n }\n\n toggleActive() {\n let state = !this.state.isActive;\n this.setState({\n isActive: state,\n });\n }\n\n render() {\n let isMobile = document.documentElement.clientWidth < 768;\n if (this.state.isMobile != isMobile) {\n this.setState({\n isMobile: isMobile,\n });\n }\n\n let burgerStyleArray = [\n hamburger,\n hamburgerArrowR,\n Style.burger,\n Style.animation,\n ];\n\n let drawerStyleArray = [Style.drawer, Style.animation];\n\n if (this.state.isMobile === false) {\n drawerStyleArray.push(Style.activeDrawer);\n } else {\n if (this.state.isActive === true) {\n burgerStyleArray.push(isActive);\n burgerStyleArray.push(Style.activeBurger);\n drawerStyleArray.push(Style.activeDrawer);\n }\n }\n\n let hamburgerButton = (\n <div className={Style.burgerContainer}>\n <button\n className={burgerStyleArray.join(\" \")}\n type=\"button\"\n onClick={this.toggleActive}\n >\n <span className={hamburgerBox} style={{ color: \"#696969\" }}>\n <span\n className={hamburgerInner}\n style={{ color: \"#696969\" }}\n ></span>\n </span>\n </button>\n </div>\n );\n\n return (\n <>\n {this.state.isMobile === true ? hamburgerButton : null}\n <nav className={drawerStyleArray.join(\" \")} id=\"drawer\">\n <ul className={[Style.list, fontFamily].join(\" \")}>\n <li className={Style.listContainer}>\n <a href=\"#hero\" className={Style.listLink}>\n Home\n </a>\n </li>\n <li className={Style.listContainer}>\n <a href=\"#about-me\" className={Style.listLink}>\n About\n </a>\n </li>\n <li className={Style.listContainer}>\n <a href=\"#experience\" className={Style.listLink}>\n Experience\n </a>\n </li>\n <li className={Style.listContainer}>\n <a href=\"#skills\" className={Style.listLink}>\n Skills\n </a>\n </li>\n <li className={Style.listContainer}>\n <a href=\"#contact-me\" className={Style.listLink}>\n Contact\n </a>\n </li>\n {/* <li>\n <Link to=\"/about\" className={Style.listLink}>\n About\n </Link>\n </li>\n <li>\n <Link to=\"/skills\" className={Style.listLink}>\n Skills\n </Link>\n </li>\n <li>\n <Link to=\"/experience\" className={Style.listLink}>\n Experience\n </Link>\n </li>\n <li>\n <Link to=\"/contact\" className={Style.listLink}>\n Contact\n </Link>\n </li> */}\n </ul>\n </nav>\n </>\n );\n }\n}\n\nexport default NavigationBar;\n","// extracted by mini-css-extract-plugin\nexport var hamburger = \"hamburgers-module--hamburger--17DS6\";\nexport var isActive = \"hamburgers-module--is-active--3tHT-\";\nexport var hamburgerInner = \"hamburgers-module--hamburger-inner--2z-pi\";\nexport var hamburgerBox = \"hamburgers-module--hamburger-box--ql1oy\";\nexport var hamburger3dx = \"hamburgers-module--hamburger--3dx--h0tK2\";\nexport var hamburger3dxR = \"hamburgers-module--hamburger--3dx-r--2-PA2\";\nexport var hamburger3dy = \"hamburgers-module--hamburger--3dy--2UNIR\";\nexport var hamburger3dyR = \"hamburgers-module--hamburger--3dy-r--2ZaGw\";\nexport var hamburger3dxy = \"hamburgers-module--hamburger--3dxy--23Lr_\";\nexport var hamburger3dxyR = \"hamburgers-module--hamburger--3dxy-r--3kQXO\";\nexport var hamburgerArrow = \"hamburgers-module--hamburger--arrow--1ijZV\";\nexport var hamburgerArrowR = \"hamburgers-module--hamburger--arrow-r--112Dv\";\nexport var hamburgerArrowalt = \"hamburgers-module--hamburger--arrowalt--1Ouyp\";\nexport var hamburgerArrowaltR = \"hamburgers-module--hamburger--arrowalt-r--3sokh\";\nexport var hamburgerArrowturn = \"hamburgers-module--hamburger--arrowturn--2IFKt\";\nexport var hamburgerArrowturnR = \"hamburgers-module--hamburger--arrowturn-r--22svD\";\nexport var hamburgerBoring = \"hamburgers-module--hamburger--boring--2jDGl\";\nexport var hamburgerCollapse = \"hamburgers-module--hamburger--collapse--25z_D\";\nexport var hamburgerCollapseR = \"hamburgers-module--hamburger--collapse-r--7PZiZ\";\nexport var hamburgerElastic = \"hamburgers-module--hamburger--elastic--1XKNI\";\nexport var hamburgerElasticR = \"hamburgers-module--hamburger--elastic-r--nSSIi\";\nexport var hamburgerEmphatic = \"hamburgers-module--hamburger--emphatic--1b0m4\";\nexport var hamburgerEmphaticR = \"hamburgers-module--hamburger--emphatic-r--2SxeR\";\nexport var hamburgerMinus = \"hamburgers-module--hamburger--minus--1Gm3-\";\nexport var hamburgerSlider = \"hamburgers-module--hamburger--slider--1jxB4\";\nexport var hamburgerSliderR = \"hamburgers-module--hamburger--slider-r--2eUq_\";\nexport var hamburgerSpin = \"hamburgers-module--hamburger--spin--1eGLM\";\nexport var hamburgerSpinR = \"hamburgers-module--hamburger--spin-r--3Npae\";\nexport var hamburgerSpring = \"hamburgers-module--hamburger--spring--qHRyR\";\nexport var hamburgerSpringR = \"hamburgers-module--hamburger--spring-r--26ABG\";\nexport var hamburgerStand = \"hamburgers-module--hamburger--stand--3_aBX\";\nexport var hamburgerStandR = \"hamburgers-module--hamburger--stand-r--3EL_A\";\nexport var hamburgerSqueeze = \"hamburgers-module--hamburger--squeeze--2iE3K\";\nexport var hamburgerVortex = \"hamburgers-module--hamburger--vortex--xWjGK\";\nexport var hamburgerVortexR = \"hamburgers-module--hamburger--vortex-r--24i5U\";","import * as React from \"react\";\nimport { motion } from \"framer-motion\";\nimport NavigationBar from \"./navigation/navigation\";\nimport PropTypes from \"prop-types\";\n\nconst Layout = ({ children, path }) => {\n return (\n <>\n <NavigationBar />\n <motion.main\n key={path}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{\n type: \"spring\",\n mass: 0.35,\n stiffness: 75,\n duration: 1,\n }}\n >\n <main>{children}</main>\n </motion.main>\n </>\n );\n};\n\nLayout.propTypes = {\n children: PropTypes.node.isRequired,\n};\n\nexport default Layout;\n","// extracted by mini-css-extract-plugin\nexport var fontFamily = \"global-module--font-family--3M2eM\";\nexport var imgResponsive = \"global-module--img-responsive--1oNP7\";\nexport var sectionHeader = \"global-module--section-header--1WPrk\";\nexport var pageSection = \"global-module--page-section--wM6L3\";\nexport var pageSection3d = \"global-module--page-section-3d--CWGe7\";\nexport var pageSectionContact = \"global-module--page-section-contact--2dxoM\";\nexport var fakeButton = \"global-module--fake-button--2nhr8\";\nexport var heroText = \"global-module--hero-text--2ypPu\";","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}"],"names":["reactPropsRegex","fn","cache","arg","undefined","prop","test","charCodeAt","createDefinition","propNames","isEnabled","props","some","name","featureDefinitions","measureLayout","animation","exit","drag","focus","hover","tap","pan","layoutAnimation","LazyContext","createContext","strict","featureNames","Object","keys","numFeatures","length","MotionConfigContext","transformPagePoint","p","isStatic","MotionContext","usePresence","context","useContext","isPresent","onExitComplete","register","id","useUniqueId","useEffect","counter","incrementId","LayoutGroupContext","isBrowser","window","useIsomorphicLayoutEffect","useLayoutEffect","useVisualElement","Component","visualState","createVisualElement","config","lazyContext","parent","visualElement","presenceContext","layoutId","_a","layoutGroupId","useLayoutId","visualElementRef","useRef","renderer","current","presenceId","blockInitialAnimation","initial","setProps","isPresenceRoot","syncRender","animationState","animateChanges","notifyUnmount","isRefObject","ref","prototype","hasOwnProperty","call","isVariantLabels","v","Array","isArray","isVariantLabel","resolveVariantFromProps","definition","custom","currentValues","currentVelocity","variants","resolveVariant","getProps","forEachValue","value","key","get","getCurrent","velocity","getVelocity","checkIfControllingVariants","animate","start","whileHover","whileDrag","whileTap","whileFocus","checkIfVariantNode","Boolean","useCreateMotionContext","inherit","getCurrentTreeVariants","useMemo","variantLabelsAsDependency","join","preloadedFeatures","useRender","useVisualState","features","loadFeatures","forwardRef","externalRef","i","name_1","push","useFeatures","Provider","useCallback","instance","mount","unmount","useMotionRef","createMotionProxy","createConfig","customMotionComponentConfig","componentCache","Map","Proxy","_target","has","set","lowercaseSVGElements","isSVGComponent","includes","indexOf","valueScaleCorrection","transformAxes","transformProps","sortTransformProps","a","b","forEach","operationKey","axesKey","transformPropSet","Set","isTransformProp","transformOriginProps","isTransformOriginProp","isForcedMotionValue","layout","isMotionValue","translateAlias","x","y","z","transformPerspective","isCSSVariable","startsWith","getValueAsType","type","transform","_assign","assign","t","s","n","arguments","apply","this","create","clamp","min","max","Math","sanitize","Number","toFixed","floatRegex","colorRegex","singleColorRegex","isString","createUnitType","unit","endsWith","split","parse","parseFloat","degrees","percent","px","vh","vw","progressPercentage","number","alpha","scale","default","round","numberValueTypes","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","size","top","right","bottom","left","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","rotate","rotateX","rotateY","rotateZ","scaleX","scaleY","scaleZ","skew","skewX","skewY","distance","translateX","translateY","translateZ","perspective","opacity","originX","originY","originZ","zIndex","fillOpacity","strokeOpacity","numOctaves","buildHTMLStyles","state","latestValues","projection","layoutState","options","transformTemplate","buildProjectionTransform","buildProjectionTransformOrigin","style","vars","transformKeys","transformOrigin","hasTransform","hasTransformOrigin","transformIsNone","valueType","valueAsType","isHydrated","correctedValue","process","applyTo","num","deltaFinal","treeScale","_b","transformIsDefault","_c","enableHardwareAcceleration","_d","allowTransformNone","transformString","sort","transformHasZ","numTransformKeys","trim","buildTransform","buildTransformOrigin","createHtmlRenderState","copyRawValuesOnly","target","source","useStyle","useInitialMotionValues","transformValues","useHTMLProps","htmlProps","draggable","userSelect","WebkitUserSelect","WebkitTouchCallout","touchAction","validMotionProps","isValidMotionProp","shouldForward","emotionIsPropValid_1","calcOrigin","origin","offset","progressToPixels","progress","dashKeys","array","camelKeys","buildSVGAttrs","attrX","attrY","pathLength","pathSpacing","pathOffset","attrs","dimensions","totalPathLength","calcSVGTransformOrigin","totalLength","spacing","useDashCase","buildSVGPath","createSvgRenderState","useSVGProps","visualProps","rawStyles","createUseRender","forwardMotionProps","filteredProps","isDom","filterProps","elementProps","createElement","CAMEL_CASE_PATTERN","camelToDash","str","replace","toLowerCase","renderHTML","element","setProperty","camelCaseAttributes","renderSVG","renderState","setAttribute","scrapeMotionValuesFromProps","newValues","toUpperCase","isAnimationControls","isKeyframesTarget","resolveMotionValue","unwrappedValue","mix","toValue","makeState","createRenderState","onMount","makeLatestValues","makeUseVisualState","scrapeMotionValues","values","motionValues","isControllingVariants","isVariantNode","variantToSet","resolved","transitionEnd","transition","svgMotionConfig","getBBox","getBoundingClientRect","e","tagName","getTotalLength","AnimationType","htmlMotionConfig","addDomEvent","eventName","handler","addEventListener","removeEventListener","useDomEvent","isMouseEvent","event","PointerEvent","pointerType","MouseEvent","isTouchEvent","touches","defaultPagePoint","pageX","pageY","pointFromTouch","pointType","point","changedTouches","pointFromMouse","extractEventInfo","wrapHandler","shouldFilterPrimaryPointer","eventHandler","listener","button","mouseEventNames","pointerdown","pointermove","pointerup","pointercancel","pointerover","pointerout","pointerenter","pointerleave","touchEventNames","getPointerEventName","onpointerdown","ontouchstart","onmousedown","addPointerEvent","usePointerEvent","createLock","lock","globalHorizontalLock","globalVerticalLock","getGlobalLock","openHorizontal_1","openVertical_1","isDragActive","openGestureLock","createHoverEvent","isActive","callback","info","setActive","Hover","isNodeOrChild","child","parentElement","combineFunctions","pipe","transformers","_i","reduce","makeRenderlessComponent","hook","gestureAnimations","onTap","onTapStart","onTapCancel","hasPressListeners","isPressing","cancelPointerEndListeners","removePointerEndListener","checkPointerEnd","Tap","onPointerUp","getInstance","onPointerCancel","Focus","onHoverStart","onHoverEnd","shallowCompare","next","prev","prevLength","getOwnPropertySymbols","propertyIsEnumerable","safeMin","findSpring","envelope","derivative","duration","bounce","_e","mass","dampingRatio","undampedFreq","exponentialDecay","delta","calcAngularFreq","c","exp","d","pow","f","g","initialGuess","result","approximateRoot","isNaN","stiffness","damping","sqrt","durationKeys","physicsKeys","isSpringType","spring","from","to","restSpeed","restDelta","done","springOptions","isResolvedFromDuration","derived","getSpringOptions","resolveSpring","zero","resolveVelocity","createSpring","initialVelocity","initialDelta","undampedAngularFreq","abs","angularFreq_1","sin","cos","dampedAngularFreq_1","freqForT","sinh","cosh","isBelowVelocityThreshold","isBelowDisplacementThreshold","flipTarget","needsInterpolation","_t","toFromDifference","isColorString","testProp","splitColor","aName","bName","cName","match","clampRgbUnit","rgbUnit","rgba","red","green","blue","alpha$1","hex","r","substr","parseInt","hsla","hue","saturation","lightness","mixLinearColor","fromExpo","toExpo","colorTypes","getColorType","find","notAnimatable","color","mixColor","fromColorType","toColorType","fromColor","toColor","blended","mixFunc","colorToken","numberToken","analyse","numColors","colors","map","numbers","tokenised","createTransformer","numValues","output","convertNumbersToZero","complex","getAnimatableNone","parsed","transformer","isNum","getMixer","mixComplex","mixArray","pack","ar","l","slice","concat","blendValue","fromThis","mixObject","numNumbers","numRGB","numHSL","template","originStats","targetStats","mixNumber","createMixers","ease","customMixer","mixers","mixerFactory","numMixers","mixer","easingFunction","interpolate","input","isClamp","inputLength","reverse","interpolator","fastInterpolate","lastInputIndex","mixerIndex","foundMixerIndex","progressInRange","slowInterpolate","power","reverseEasing","easing","mirrorEasing","createBackIn","linear","easeIn","easeOut","easeInOut","circIn","acos","circOut","circInOut","backIn","backOut","backInOut","anticipate","backEasing","createAnticipate","bounceOut","p2","bounceIn","defaultEasing","splice","keyframes","times","o","convertOffsetToTimes","_value","defaultOffset","createInterpolator","types","decay","timeConstant","_f","modifyTarget","amplitude","ideal","loopElapsed","elapsed","delay","framesync","update","passTimestamp","stop","driverControls","latest","interpolateFromNumber","autoplay","driver","_g","repeat","repeatMax","_h","repeatType","_j","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate","repeatCount","computedDuration","isComplete","isForwardPlayback","animator","detectAnimationFromOptions","reverseElapsed","hasRepeatDelayElapsed","velocityPerSecond","frameDuration","secondsToMilliseconds","seconds","a1","a2","calcBezier","getSlope","kSampleStepSize","cubicBezier","mX1","mY1","mX2","mY2","sampleValues","Float32Array","getTForX","aX","intervalStart","currentSample","kSplineTableSize","guessForT","initialSlope","aGuessT","currentSlope","newtonRaphsonIterate","aA","aB","currentX","currentT","binarySubdivide","easingLookup","bounceInOut","easingDefinitionToFunction","isAnimatable","underDampedSpring","criticallyDampedSpring","linearTween","defaultTransitions","backgroundColor","maxDefaults","applyDefaultFilter","defaultValue","functionRegex","filter","functions","defaultValueTypes","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","WebkitFilter","getDefaultValueType","defaultValueType","convertTransitionToAnimationOptions","yoyo","flip","loop","isEasingArray","getPopmotionAnimationOptions","valueKey","transitionFactory","hydrateKeyframes","when","delayChildren","staggerChildren","staggerDirection","isTransitionDefined","getAnimation","valueTransition","getValueTransition","isTargetAnimatable","isZero","getZeroUnit","isOriginAnimatable","currentAnimation","bounceStiffness","bounceDamping","_onUpdate","isOutOfBounds","boundaryNearest","startAnimation","startSpring","prev_1","current_1","boundary_1","heading_1","inertia","potentialUnitType","delayTimer","controls","getDelayFromTransition","setTimeout","clearTimeout","addUniqueItem","arr","item","removeItem","index","SubscriptionManager","subscriptions","add","_this","notify","numSubscriptions","getSize","clear","MotionValue","init","timeDelta","lastUpdated","updateSubscribers","velocityUpdateSubscribers","renderSubscribers","canTrackVelocity","updateAndNotify","render","timestamp","scheduleVelocityCheck","velocityCheck","hasAnimated","onChange","subscription","clearListeners","onRenderRequest","attach","passiveEffect","getPrevious","Promise","resolve","stopAnimation","then","clearAnimation","isAnimating","destroy","motionValue","testValueType","dimensionValueTypes","findDimensionValueType","valueTypes","findValueType","setMotionValue","hasValue","getValue","addValue","setTarget","makeTargetAnimatable","getOriginFromTransition","animateVariant","variant","getDefaultTransition","transitionOverride","animateTarget","getChildAnimations","variantChildren","forwardDelay","animations","maxStaggerDuration","generateStaggerDuration","sortByTreeOrder","notifyAnimationComplete","all","animateChildren","first","last","animationTypeState","getState","valueTarget","shouldBlockAnimation","sortNodePosition","protectedKeys","needsAnimating","shouldBlock","variantPriorityOrder","Animate","Drag","Exit","reversePriorityOrder","numAnimationTypes","animateList","notifyAnimationStart","resolvedDefinition","animateVisualElement","createAnimationState","createTypeState","allAnimatedKeys","isInitialRender","buildResolvedTypeValues","acc","changedActiveType","getVariantContext","removedKeys","encounteredKeys","removedVariantIndex","Infinity","_loop_1","typeState","propIsVariant","activeDelta","isInherited","manuallyAnimateOnMount","prevProp","shouldAnimateType","variantsHaveChanged","definitionList","resolvedValues","prevResolvedValues","allKeys","markToAnimate","delete","fallbackAnimation_1","fallbackTarget","getBaseTarget","shouldAnimate","isAnimated","setAnimateFunction","makeAnimator","subscribe","isPoint","isPoint3D","distance1D","xDelta","yDelta","zDelta","PanSession","handlers","startEvent","lastMoveEvent","lastMoveEventInfo","updatePoint","getPanInfo","history","isPanStarted","isDistancePastThreshold","onStart","onMove","handlePointerMove","transformPoint","buttons","handlePointerUp","end","onEnd","onSessionEnd","panInfo","initialInfo","onSessionStart","removeListeners","updateHandlers","subtractPoint","lastDevicePoint","startDevicePoint","timestampedPoint","lastPoint","time","eachAxis","applyConstraints","elastic","calcRelativeAxisConstraints","axis","calcViewportAxisConstraints","layoutAxis","constraintsAxis","resolveAxisElastic","dragElastic","minLabel","maxLabel","resolvePointElastic","label","getBoundingBox","box","isNear","maxDistance","calcLength","sourceLength","targetLength","updateAxisDelta","originPoint","translate","updateBoxDelta","defaultOrigin","calcRelativeAxis","relative","calcRelativeOffsetAxis","calcRelativeOffset","checkIfParentHasChanged","prevId","getLayoutId","nextId","isDraggable","_dragX","resetAxis","originAxis","scalePoint","applyPointDelta","boxScale","applyAxisDelta","applyBoxDelta","applyAxisTransforms","final","transforms","scaleKey","originKey","axisOrigin","xKeys","yKeys","applyBoxTransforms","finalBox","removePointDelta","removeAxisTransforms","removeAxisDelta","removeBoxTransforms","lastPointerEvent","elementDragControls","WeakMap","VisualElementDragControls","isDragging","currentDirection","constraints","hasMutatedConstraints","cursorProgress","openGlobalLock","panSession","enableLayoutProjection","originEvent","snapToCursor","stopMotion","initialPoint","getViewportPointFromEvent","cancelLayout","read","write","ancestors","children","tree","hasManuallySetCursorOrigin","isLayoutDrag","lockProjectionTarget","resetTransform","restoreTransform","getAxisMotionValue","isExternalDrag","rebaseProjectionTarget","measureViewportBox","scheduleUpdateLayoutProjection","axisValue","resolveDragConstraints","dragPropagation","onDragStart","dragDirectionLock","lockThreshold","direction","getCurrentDirection","onDirectionLock","updateAxis","onDrag","dragConstraints","getLayoutState","layoutCorrected","resolveRefConstraints","layoutBox","calcRelativeConstraints","resolveDragElastic","relativeConstraints","rebaseAxisConstraints","onMeasureDragConstraints","constraintsElement","constraintsBox","measuredConstraints","calcViewportConstraints","userConstraints","cancelDrag","unlockProjectionTarget","animateDragEnd","onDragEnd","shouldDrag","length_1","center","updateAxisMotionValue","updateVisualElementAxis","nextValue","axisLayout","axisLength","axisProgress","calcConstrainedMinPoint","setProjectionTargetAxis","dragMomentum","remainingProps","dragKey","_dragY","dragTransition","isRelative","projectionParent","getProjectionParent","getLatestValues","convertToRelativeProjection","relativeConstraints_1","targetFinal","momentumAnimations","startAxisValueAnimation","startLayoutAnimation","onDragTransitionEnd","stopLayoutAnimation","currentValue","boxProgress","updateConstraints","calcPositionFromProgress","onReady","stopPointerListener","dragListener","stopResizeListener","stopLayoutUpdateListener","onLayoutUpdate","prevDragCursor","onPan","onPanStart","onPanEnd","onPanSessionStart","hasPanEvents","groupDragControls","dragControls","cssVariableRegex","getVariableValue","depth","exec","parseCSSVariable","token","fallback","getComputedStyle","getPropertyValue","pixelsToPercent","pixels","varToken","borderCorrectionDefinition","_layoutState","defaultScaleCorrectors","boxShadow","original","containsCSSVariables","cssVariables","shadow","xScale","yScale","averageScale","i_1","cssVariable","_super","frameTarget","currentAnimationTarget","stopAxisAnimation","isAnimatingTree","originBox","targetBox","visibilityAction","shouldStackAnimate","prevParent","safeToRemove","prevParentViewportBox","prevViewportBox","parentLayout","isProvidedCorrectDataForRelativeSharedLayout","boxHasMoved","hasMoved","isTargetLocked","animateAxis","setVisibility","notifyLayoutAnimationComplete","componentDidMount","animateMotionValue","unsubLayoutReady","layoutSafeToRemove","correctors","addScaleCorrection","componentWillUnmount","axisIsEqual","layoutProgress","getProjectionAnimationProgress","frame","tweenAxis","unsubscribeProgress","layoutTransition","defaultLayoutTransition","isZeroBox","zeroAxis","Measure","syncLayout","framerSyncLayout","onUnmount","remove","getSnapshotBeforeUpdate","syncUpdate","componentDidUpdate","flush","layoutAnimations","SharedLayoutContext","createLayoutState","deltaTransform","zeroLayout","buildLayoutProjectionTransform","latestTransform","identityProjection","buildLayoutProjectionTransformOrigin","names","updateLayoutDeltas","treePath","treeLength","node","applyTreeDeltas","FlatTree","isDirty","treeType","build","_getBaseTarget","_makeTargetAnimatable","_measureViewportBox","renderInstance","readValueFromInstance","_resetTransform","_restoreTransform","removeValueFromRenderState","_sortNodePosition","unsubscribeFromLeadVisualElement","crossfader","projectionTargetProgress","removeFromVariantTree","lifecycles","managers","propSubscriptions","clearAllListeners","manager","updatePropListeners","on","propListener","args","createLifecycles","leadProjection","leadLatestValues","hasViewportBoxUpdated","valueSubscriptions","prevMotionValues","baseTarget","isProjectionReady","triggerBuild","valuesToRender","crossfadedValues","getCrossfadeState","notifyUpdate","_updateTreeLayoutProjection","layoutTree","fireUpdateLayoutProjection","initialMotionValues","path","isVisible","isMounted","newInstance","pointTo","addVariantChild","updateLayoutProjection","closestVariantNode","getClosestVariantNode","other","updateTreeLayoutProjection","getStaticValue","setStaticValue","visibility","scheduleRender","canMutate","removeValue","removeOnChange","latestValue","removeOnRenderRequest","bindToMotionValue","readValue","setBaseTarget","newProps","prevValue","existingValue","updateMotionValuesFromProps","getVariant","startAtParent","context_1","numVariantProps","variantProps","setCrossfader","newCrossfader","relativeTarget","withTransform","viewportBox","notifySetAxisTarget","force","shouldRebase","notifyLayoutReady","relativeOffset","setCurrentViewportBox","notifyLayoutUpdate","prevTreeScaleX","prevTreeScaleY","prevDeltaTransform","notifyViewportBoxUpdate","fireResolveRelativeTargetBox","foundParent","ancestor","resolveRelativeTargetBox","relativeParent","parentProjection","calcRelativeBox","shouldResetTransform","_layoutResetTransform","newLead","onSetAxisTarget","onLayoutAnimationComplete","presence","BoundingBoxDimension","positionalKeys","isPositionalKey","setAndResetVelocity","isNumOrPxType","getPosFromMatrix","matrix","pos","getTranslateFromMatrix","pos2","pos3","_bbox","matrix3d","nonTranslationalTransformKeys","positionalValues","checkAndConvertChangedValueTypes","targetPositionalKeys","removedTransformValues","hasAttemptedToRemoveTransformValues","changedValueTypeKeys","toType","fromType","numKeyframes","removedTransforms","removeNonTranslationalTransform","convertedTarget","changedKeys","originBbox","elementComputedStyle","display","originComputedStyle","targetBbox","convertChangedValueTypes","unitConversion","hasPositionalKey","parseDomVariant","HTMLElement","resolveCSSVariables","htmlConfig","domElement","defaultType","computedStyle","compareDocumentPosition","mutableState","getOrigin","newValueKeys","numNewValues","targetValue","checkTargetForNewValues","isProjectionTranform","htmlVisualElement","svgVisualElement","getAttribute","_element","featureBundle","motion","baseConfig","activeDrawer","list","listContainer","listLink","NavigationBar","toggleActive","bind","isMobile","document","documentElement","clientWidth","setState","burgerStyleArray","Style","drawerStyleArray","hamburgerButton","className","onClick","fontFamily","href","React","main","sectionHeader","pageSection","pageSection3d","pageSectionContact","fakeButton","heroText","_assertThisInitialized","self","ReferenceError"],"sourceRoot":""}