{ "version": 3, "sources": ["ssg:https://app.framerstatic.com/chunk-4Z6NVKPU.mjs", "ssg:https://ga.jspm.io/npm:react-dom@18.2.0/index.js", "ssg:https://ga.jspm.io/npm:scheduler@0.23.0/index.js", "ssg:https://app.framerstatic.com/framer.ZONHQAMM.mjs"], "sourcesContent": ["import {\n __commonJS,\n __export\n} from \"./chunk-QLPHEVXG.mjs\";\n\n// ../../../node_modules/@emotion/memoize/dist/memoize.browser.cjs.js\nvar require_memoize_browser_cjs = __commonJS({\n \"../../../node_modules/@emotion/memoize/dist/memoize.browser.cjs.js\"(exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n function memoize(fn) {\n var cache = {};\n return function(arg) {\n if (cache[arg] === void 0)\n cache[arg] = fn(arg);\n return cache[arg];\n };\n }\n exports.default = memoize;\n }\n});\n\n// ../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.cjs.js\nvar require_is_prop_valid_browser_cjs = __commonJS({\n \"../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.cjs.js\"(exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n function _interopDefault(ex) {\n return ex && typeof ex === \"object\" && \"default\" in ex ? ex[\"default\"] : ex;\n }\n var memoize = _interopDefault(require_memoize_browser_cjs());\n var 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|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|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)-.*))$/;\n var index = memoize(\n function(prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;\n }\n /* Z+1 */\n );\n exports.default = index;\n }\n});\n\n// ../../../node_modules/framer-motion/dist/es/utils/GlobalConfig.mjs\nvar MotionGlobalConfig = {\n skipAnimations: false,\n useManualTiming: false\n};\n\n// ../../../node_modules/framer-motion/dist/es/utils/noop.mjs\nvar noop = (any) => any;\n\n// ../../../node_modules/framer-motion/dist/es/frameloop/render-step.mjs\nfunction createRenderStep(runNextFrame) {\n let thisFrame = /* @__PURE__ */ new Set();\n let nextFrame = /* @__PURE__ */ new Set();\n let isProcessing = false;\n let flushNextFrame = false;\n const toKeepAlive = /* @__PURE__ */ new WeakSet();\n let latestFrameData = {\n delta: 0,\n timestamp: 0,\n isProcessing: false\n };\n function triggerCallback(callback) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n callback(latestFrameData);\n }\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n if (!queue.has(callback))\n queue.add(callback);\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData2) => {\n latestFrameData = frameData2;\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n [thisFrame, nextFrame] = [nextFrame, thisFrame];\n nextFrame.clear();\n thisFrame.forEach(triggerCallback);\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData2);\n }\n }\n };\n return step;\n}\n\n// ../../../node_modules/framer-motion/dist/es/frameloop/batcher.mjs\nvar stepsOrder = [\n \"read\",\n // Read\n \"resolveKeyframes\",\n // Write/Read/Write/Read\n \"update\",\n // Compute\n \"preRender\",\n // Compute\n \"render\",\n // Write\n \"postRender\"\n // Compute\n];\nvar maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state2 = {\n delta: 0,\n timestamp: 0,\n isProcessing: false\n };\n const flagRunNextFrame = () => runNextFrame = true;\n const steps2 = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(flagRunNextFrame);\n return acc;\n }, {});\n const { read, resolveKeyframes, update, preRender, render, postRender } = steps2;\n const processBatch = () => {\n const timestamp = MotionGlobalConfig.useManualTiming ? state2.timestamp : performance.now();\n runNextFrame = false;\n state2.delta = useDefaultElapsed ? 1e3 / 60 : Math.max(Math.min(timestamp - state2.timestamp, maxElapsed), 1);\n state2.timestamp = timestamp;\n state2.isProcessing = true;\n read.process(state2);\n resolveKeyframes.process(state2);\n update.process(state2);\n preRender.process(state2);\n render.process(state2);\n postRender.process(state2);\n state2.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state2.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps2[key];\n acc[key] = (process2, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process2, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process2) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps2[stepsOrder[i]].cancel(process2);\n }\n };\n return { schedule, cancel, state: state2, steps: steps2 };\n}\n\n// ../../../node_modules/framer-motion/dist/es/frameloop/frame.mjs\nvar { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps } = createRenderBatcher(typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop, true);\n\n// ../../../node_modules/framer-motion/dist/es/easing/cubic-bezier.mjs\nvar calcBezier = (t, a1, a2) => (((1 - 3 * a2 + 3 * a1) * t + (3 * a2 - 6 * a1)) * t + 3 * a1) * t;\nvar subdivisionPrecision = 1e-7;\nvar subdivisionMaxIterations = 12;\nfunction binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {\n let currentX;\n let currentT;\n let i = 0;\n do {\n currentT = lowerBound + (upperBound - lowerBound) / 2;\n currentX = calcBezier(currentT, mX1, mX2) - x;\n if (currentX > 0) {\n upperBound = currentT;\n } else {\n lowerBound = currentT;\n }\n } while (Math.abs(currentX) > subdivisionPrecision && ++i < subdivisionMaxIterations);\n return currentT;\n}\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n if (mX1 === mY1 && mX2 === mY2)\n return noop;\n const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);\n return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\n// ../../../node_modules/framer-motion/dist/es/easing/modifiers/mirror.mjs\nvar mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\n\n// ../../../node_modules/framer-motion/dist/es/easing/modifiers/reverse.mjs\nvar reverseEasing = (easing) => (p) => 1 - easing(1 - p);\n\n// ../../../node_modules/framer-motion/dist/es/easing/back.mjs\nvar backOut = /* @__PURE__ */ cubicBezier(0.33, 1.53, 0.69, 0.99);\nvar backIn = /* @__PURE__ */ reverseEasing(backOut);\nvar backInOut = /* @__PURE__ */ mirrorEasing(backIn);\n\n// ../../../node_modules/framer-motion/dist/es/easing/anticipate.mjs\nvar anticipate = (p) => (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n\n// ../../../node_modules/framer-motion/dist/es/easing/circ.mjs\nvar circIn = (p) => 1 - Math.sin(Math.acos(p));\nvar circOut = reverseEasing(circIn);\nvar circInOut = mirrorEasing(circIn);\n\n// ../../../node_modules/framer-motion/dist/es/utils/errors.mjs\nvar warning = noop;\nvar invariant = noop;\nif (false) {\n warning = (check, message) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(message);\n }\n };\n invariant = (check, message) => {\n if (!check) {\n throw new Error(message);\n }\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/clamp.mjs\nvar clamp = (min, max, v) => {\n if (v > max)\n return max;\n if (v < min)\n return min;\n return v;\n};\n\n// ../../../node_modules/framer-motion/dist/es/value/types/numbers/units.mjs\nvar createUnitType = (unit) => ({\n test: (v) => typeof v === \"string\" && v.endsWith(unit) && v.split(\" \").length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`\n});\nvar degrees = /* @__PURE__ */ createUnitType(\"deg\");\nvar percent = /* @__PURE__ */ createUnitType(\"%\");\nvar px = /* @__PURE__ */ createUnitType(\"px\");\nvar vh = /* @__PURE__ */ createUnitType(\"vh\");\nvar vw = /* @__PURE__ */ createUnitType(\"vw\");\nvar progressPercentage = {\n ...percent,\n parse: (v) => percent.parse(v) / 100,\n transform: (v) => percent.transform(v * 100)\n};\n\n// ../../../node_modules/framer-motion/dist/es/value/types/numbers/index.mjs\nvar number = {\n test: (v) => typeof v === \"number\",\n parse: parseFloat,\n transform: (v) => v\n};\nvar alpha = {\n ...number,\n transform: (v) => clamp(0, 1, v)\n};\nvar scale = {\n ...number,\n default: 1\n};\n\n// ../../../node_modules/framer-motion/dist/es/value/types/utils/sanitize.mjs\nvar sanitize = (v) => Math.round(v * 1e5) / 1e5;\n\n// ../../../node_modules/framer-motion/dist/es/value/types/utils/float-regex.mjs\nvar floatRegex = /-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;\n\n// ../../../node_modules/framer-motion/dist/es/value/types/utils/is-nullish.mjs\nfunction isNullish(v) {\n return v == null;\n}\n\n// ../../../node_modules/framer-motion/dist/es/value/types/utils/single-color-regex.mjs\nvar singleColorRegex = /^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu;\n\n// ../../../node_modules/framer-motion/dist/es/value/types/color/utils.mjs\nvar isColorString = (type, testProp) => (v) => {\n return Boolean(typeof v === \"string\" && singleColorRegex.test(v) && v.startsWith(type) || testProp && !isNullish(v) && Object.prototype.hasOwnProperty.call(v, testProp));\n};\nvar splitColor = (aName, bName, cName) => (v) => {\n if (typeof v !== \"string\")\n return v;\n const [a, b, c, alpha2] = v.match(floatRegex);\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha2 !== void 0 ? parseFloat(alpha2) : 1\n };\n};\n\n// ../../../node_modules/framer-motion/dist/es/value/types/color/rgba.mjs\nvar clampRgbUnit = (v) => clamp(0, 255, v);\nvar rgbUnit = {\n ...number,\n transform: (v) => Math.round(clampRgbUnit(v))\n};\nvar rgba = {\n test: /* @__PURE__ */ isColorString(\"rgb\", \"red\"),\n parse: /* @__PURE__ */ splitColor(\"red\", \"green\", \"blue\"),\n transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => \"rgba(\" + rgbUnit.transform(red) + \", \" + rgbUnit.transform(green) + \", \" + rgbUnit.transform(blue) + \", \" + sanitize(alpha.transform(alpha$1)) + \")\"\n};\n\n// ../../../node_modules/framer-motion/dist/es/value/types/color/hex.mjs\nfunction parseHex(v) {\n let r = \"\";\n let g = \"\";\n let b = \"\";\n let a = \"\";\n if (v.length > 5) {\n r = v.substring(1, 3);\n g = v.substring(3, 5);\n b = v.substring(5, 7);\n a = v.substring(7, 9);\n } else {\n r = v.substring(1, 2);\n g = v.substring(2, 3);\n b = v.substring(3, 4);\n a = v.substring(4, 5);\n r += r;\n g += g;\n b += b;\n a += a;\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}\nvar hex = {\n test: /* @__PURE__ */ isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform\n};\n\n// ../../../node_modules/framer-motion/dist/es/value/types/color/hsla.mjs\nvar hsla = {\n test: /* @__PURE__ */ isColorString(\"hsl\", \"hue\"),\n parse: /* @__PURE__ */ splitColor(\"hue\", \"saturation\", \"lightness\"),\n transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n return \"hsla(\" + Math.round(hue) + \", \" + percent.transform(sanitize(saturation)) + \", \" + percent.transform(sanitize(lightness)) + \", \" + sanitize(alpha.transform(alpha$1)) + \")\";\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/value/types/color/index.mjs\nvar color = {\n test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n 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: (v) => {\n return typeof v === \"string\" ? v : v.hasOwnProperty(\"red\") ? rgba.transform(v) : hsla.transform(v);\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/value/types/utils/color-regex.mjs\nvar colorRegex = /(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;\n\n// ../../../node_modules/framer-motion/dist/es/value/types/complex/index.mjs\nfunction test(v) {\n var _a, _b;\n return isNaN(v) && typeof v === \"string\" && (((_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) || 0) + (((_b = v.match(colorRegex)) === null || _b === void 0 ? void 0 : _b.length) || 0) > 0;\n}\nvar NUMBER_TOKEN = \"number\";\nvar COLOR_TOKEN = \"color\";\nvar VAR_TOKEN = \"var\";\nvar VAR_FUNCTION_TOKEN = \"var(\";\nvar SPLIT_TOKEN = \"${}\";\nvar complexRegex = /var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu;\nfunction analyseComplexValue(value) {\n const originalValue = value.toString();\n const values = [];\n const indexes = {\n color: [],\n number: [],\n var: []\n };\n const types = [];\n let i = 0;\n const tokenised = originalValue.replace(complexRegex, (parsedValue) => {\n if (color.test(parsedValue)) {\n indexes.color.push(i);\n types.push(COLOR_TOKEN);\n values.push(color.parse(parsedValue));\n } else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {\n indexes.var.push(i);\n types.push(VAR_TOKEN);\n values.push(parsedValue);\n } else {\n indexes.number.push(i);\n types.push(NUMBER_TOKEN);\n values.push(parseFloat(parsedValue));\n }\n ++i;\n return SPLIT_TOKEN;\n });\n const split = tokenised.split(SPLIT_TOKEN);\n return { values, split, indexes, types };\n}\nfunction parseComplexValue(v) {\n return analyseComplexValue(v).values;\n}\nfunction createTransformer(source) {\n const { split, types } = analyseComplexValue(source);\n const numSections = split.length;\n return (v) => {\n let output = \"\";\n for (let i = 0; i < numSections; i++) {\n output += split[i];\n if (v[i] !== void 0) {\n const type = types[i];\n if (type === NUMBER_TOKEN) {\n output += sanitize(v[i]);\n } else if (type === COLOR_TOKEN) {\n output += color.transform(v[i]);\n } else {\n output += v[i];\n }\n }\n }\n return output;\n };\n}\nvar convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : v;\nfunction getAnimatableNone(v) {\n const parsed = parseComplexValue(v);\n const transformer = createTransformer(v);\n return transformer(parsed.map(convertNumbersToZero));\n}\nvar complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone\n};\n\n// ../../../node_modules/framer-motion/dist/es/utils/time-conversion.mjs\nvar secondsToMilliseconds = (seconds) => seconds * 1e3;\nvar millisecondsToSeconds = (milliseconds) => milliseconds / 1e3;\n\n// ../../../node_modules/framer-motion/dist/es/animation/generators/spring/find.mjs\nvar safeMin = 1e-3;\nvar minDuration = 0.01;\nvar maxDuration = 10;\nvar minDamping = 0.05;\nvar maxDamping = 1;\nfunction findSpring({ duration = 800, bounce = 0.25, velocity = 0, mass = 1 }) {\n let envelope;\n let derivative;\n warning(duration <= secondsToMilliseconds(maxDuration), \"Spring duration must be 10 seconds or less\");\n let dampingRatio = 1 - bounce;\n dampingRatio = clamp(minDamping, maxDamping, dampingRatio);\n duration = clamp(minDuration, maxDuration, millisecondsToSeconds(duration));\n if (dampingRatio < 1) {\n envelope = (undampedFreq2) => {\n const exponentialDecay = undampedFreq2 * dampingRatio;\n const delta = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq2, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - a / b * c;\n };\n derivative = (undampedFreq2) => {\n const exponentialDecay = undampedFreq2 * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq2, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq2, 2), dampingRatio);\n const factor = -envelope(undampedFreq2) + safeMin > 0 ? -1 : 1;\n return factor * ((d - e) * f) / g;\n };\n } else {\n envelope = (undampedFreq2) => {\n const a = Math.exp(-undampedFreq2 * duration);\n const b = (undampedFreq2 - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq2) => {\n const a = Math.exp(-undampedFreq2 * duration);\n const b = (velocity - undampedFreq2) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = secondsToMilliseconds(duration);\n if (isNaN(undampedFreq)) {\n return {\n stiffness: 100,\n damping: 10,\n duration\n };\n } else {\n const stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration\n };\n }\n}\nvar rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n let result = initialGuess;\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n return result;\n}\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/velocity-per-second.mjs\nfunction velocityPerSecond(velocity, frameDuration) {\n return frameDuration ? velocity * (1e3 / frameDuration) : 0;\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/generators/utils/velocity.mjs\nvar velocitySampleDuration = 5;\nfunction calcGeneratorVelocity(resolveValue, t, current) {\n const prevT = Math.max(t - velocitySampleDuration, 0);\n return velocityPerSecond(current - resolveValue(prevT), t - prevT);\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/generators/spring/index.mjs\nvar durationKeys = [\"duration\", \"bounce\"];\nvar physicsKeys = [\"stiffness\", \"damping\", \"mass\"];\nfunction isSpringType(options, keys2) {\n return keys2.some((key) => options[key] !== void 0);\n}\nfunction getSpringOptions(options) {\n let springOptions = {\n velocity: 0,\n stiffness: 100,\n damping: 10,\n mass: 1,\n isResolvedFromDuration: false,\n ...options\n };\n if (!isSpringType(options, physicsKeys) && isSpringType(options, durationKeys)) {\n const derived = findSpring(options);\n springOptions = {\n ...springOptions,\n ...derived,\n mass: 1\n };\n springOptions.isResolvedFromDuration = true;\n }\n return springOptions;\n}\nfunction spring({ keyframes: keyframes2, restDelta, restSpeed, ...options }) {\n const origin = keyframes2[0];\n const target = keyframes2[keyframes2.length - 1];\n const state2 = { done: false, value: origin };\n const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration } = getSpringOptions({\n ...options,\n velocity: -millisecondsToSeconds(options.velocity || 0)\n });\n const initialVelocity = velocity || 0;\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n const initialDelta = target - origin;\n const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));\n const isGranularScale = Math.abs(initialDelta) < 5;\n restSpeed || (restSpeed = isGranularScale ? 0.01 : 2);\n restDelta || (restDelta = isGranularScale ? 5e-3 : 0.5);\n let resolveSpring;\n if (dampingRatio < 1) {\n const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return target - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq * Math.sin(angularFreq * t) + initialDelta * Math.cos(angularFreq * t));\n };\n } else if (dampingRatio === 1) {\n resolveSpring = (t) => target - Math.exp(-undampedAngularFreq * t) * (initialDelta + (initialVelocity + undampedAngularFreq * initialDelta) * t);\n } else {\n const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return target - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) * Math.sinh(freqForT) + dampedAngularFreq * initialDelta * Math.cosh(freqForT)) / dampedAngularFreq;\n };\n }\n return {\n calculatedDuration: isResolvedFromDuration ? duration || null : null,\n next: (t) => {\n const current = resolveSpring(t);\n if (!isResolvedFromDuration) {\n let currentVelocity = 0;\n if (dampingRatio < 1) {\n currentVelocity = t === 0 ? secondsToMilliseconds(initialVelocity) : calcGeneratorVelocity(resolveSpring, t, current);\n }\n const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;\n const isBelowDisplacementThreshold = Math.abs(target - current) <= restDelta;\n state2.done = isBelowVelocityThreshold && isBelowDisplacementThreshold;\n } else {\n state2.done = t >= duration;\n }\n state2.value = state2.done ? target : current;\n return state2;\n }\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/generators/inertia.mjs\nfunction inertia({ keyframes: keyframes2, velocity = 0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed }) {\n const origin = keyframes2[0];\n const state2 = {\n done: false,\n value: origin\n };\n const isOutOfBounds = (v) => min !== void 0 && v < min || max !== void 0 && v > max;\n const nearestBoundary = (v) => {\n if (min === void 0)\n return max;\n if (max === void 0)\n return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n };\n let amplitude = power * velocity;\n const ideal = origin + amplitude;\n const target = modifyTarget === void 0 ? ideal : modifyTarget(ideal);\n if (target !== ideal)\n amplitude = target - origin;\n const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);\n const calcLatest = (t) => target + calcDelta(t);\n const applyFriction = (t) => {\n const delta = calcDelta(t);\n const latest = calcLatest(t);\n state2.done = Math.abs(delta) <= restDelta;\n state2.value = state2.done ? target : latest;\n };\n let timeReachedBoundary;\n let spring$1;\n const checkCatchBoundary = (t) => {\n if (!isOutOfBounds(state2.value))\n return;\n timeReachedBoundary = t;\n spring$1 = spring({\n keyframes: [state2.value, nearestBoundary(state2.value)],\n velocity: calcGeneratorVelocity(calcLatest, t, state2.value),\n // TODO: This should be passing * 1000\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed\n });\n };\n checkCatchBoundary(0);\n return {\n calculatedDuration: null,\n next: (t) => {\n let hasUpdatedFrame = false;\n if (!spring$1 && timeReachedBoundary === void 0) {\n hasUpdatedFrame = true;\n applyFriction(t);\n checkCatchBoundary(t);\n }\n if (timeReachedBoundary !== void 0 && t >= timeReachedBoundary) {\n return spring$1.next(t - timeReachedBoundary);\n } else {\n !hasUpdatedFrame && applyFriction(t);\n return state2;\n }\n }\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/easing/ease.mjs\nvar easeIn = /* @__PURE__ */ cubicBezier(0.42, 0, 1, 1);\nvar easeOut = /* @__PURE__ */ cubicBezier(0, 0, 0.58, 1);\nvar easeInOut = /* @__PURE__ */ cubicBezier(0.42, 0, 0.58, 1);\n\n// ../../../node_modules/framer-motion/dist/es/utils/pipe.mjs\nvar combineFunctions = (a, b) => (v) => b(a(v));\nvar pipe = (...transformers) => transformers.reduce(combineFunctions);\n\n// ../../../node_modules/framer-motion/dist/es/utils/progress.mjs\nvar progress = (from, to, value) => {\n const toFromDifference = to - from;\n return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;\n};\n\n// ../../../node_modules/framer-motion/dist/es/utils/mix/number.mjs\nvar mixNumber = (from, to, progress2) => {\n return from + (to - from) * progress2;\n};\n\n// ../../../node_modules/framer-motion/dist/es/utils/hsla-to-rgba.mjs\nfunction hueToRgb(p, q, t) {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n}\nfunction hslaToRgba({ hue, saturation, lightness, alpha: alpha2 }) {\n hue /= 360;\n saturation /= 100;\n lightness /= 100;\n let red = 0;\n let green = 0;\n let blue = 0;\n if (!saturation) {\n red = green = blue = lightness;\n } else {\n const q = lightness < 0.5 ? lightness * (1 + saturation) : lightness + saturation - lightness * saturation;\n const p = 2 * lightness - q;\n red = hueToRgb(p, q, hue + 1 / 3);\n green = hueToRgb(p, q, hue);\n blue = hueToRgb(p, q, hue - 1 / 3);\n }\n return {\n red: Math.round(red * 255),\n green: Math.round(green * 255),\n blue: Math.round(blue * 255),\n alpha: alpha2\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/mix/immediate.mjs\nfunction mixImmediate(a, b) {\n return (p) => p > 0 ? b : a;\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/mix/color.mjs\nvar mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n const expo = v * (to * to - fromExpo) + fromExpo;\n return expo < 0 ? 0 : Math.sqrt(expo);\n};\nvar colorTypes = [hex, rgba, hsla];\nvar getColorType = (v) => colorTypes.find((type) => type.test(v));\nfunction asRGBA(color2) {\n const type = getColorType(color2);\n warning(Boolean(type), `'${color2}' is not an animatable color. Use the equivalent color code instead.`);\n if (!Boolean(type))\n return false;\n let model = type.parse(color2);\n if (type === hsla) {\n model = hslaToRgba(model);\n }\n return model;\n}\nvar mixColor = (from, to) => {\n const fromRGBA = asRGBA(from);\n const toRGBA = asRGBA(to);\n if (!fromRGBA || !toRGBA) {\n return mixImmediate(from, to);\n }\n const blended = { ...fromRGBA };\n return (v) => {\n blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);\n blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);\n blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);\n blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);\n return rgba.transform(blended);\n };\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs\nvar checkStringStartsWith = (token) => (key) => typeof key === \"string\" && key.startsWith(token);\nvar isCSSVariableName = /* @__PURE__ */ checkStringStartsWith(\"--\");\nvar startsAsVariableToken = /* @__PURE__ */ checkStringStartsWith(\"var(--\");\nvar isCSSVariableToken = (value) => {\n const startsWithToken = startsAsVariableToken(value);\n if (!startsWithToken)\n return false;\n return singleCssVariableRegex.test(value.split(\"/*\")[0].trim());\n};\nvar singleCssVariableRegex = /var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;\n\n// ../../../node_modules/framer-motion/dist/es/utils/mix/visibility.mjs\nvar invisibleValues = /* @__PURE__ */ new Set([\"none\", \"hidden\"]);\nfunction mixVisibility(origin, target) {\n if (invisibleValues.has(origin)) {\n return (p) => p <= 0 ? origin : target;\n } else {\n return (p) => p >= 1 ? target : origin;\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/mix/complex.mjs\nfunction mixNumber2(a, b) {\n return (p) => mixNumber(a, b, p);\n}\nfunction getMixer(a) {\n if (typeof a === \"number\") {\n return mixNumber2;\n } else if (typeof a === \"string\") {\n return isCSSVariableToken(a) ? mixImmediate : color.test(a) ? mixColor : mixComplex;\n } else if (Array.isArray(a)) {\n return mixArray;\n } else if (typeof a === \"object\") {\n return color.test(a) ? mixColor : mixObject;\n }\n return mixImmediate;\n}\nfunction mixArray(a, b) {\n const output = [...a];\n const numValues = output.length;\n const blendValue = a.map((v, i) => getMixer(v)(v, b[i]));\n return (p) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](p);\n }\n return output;\n };\n}\nfunction mixObject(a, b) {\n const output = { ...a, ...b };\n const blendValue = {};\n for (const key in output) {\n if (a[key] !== void 0 && b[key] !== void 0) {\n blendValue[key] = getMixer(a[key])(a[key], b[key]);\n }\n }\n return (v) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v);\n }\n return output;\n };\n}\nfunction matchOrder(origin, target) {\n var _a;\n const orderedOrigin = [];\n const pointers = { color: 0, var: 0, number: 0 };\n for (let i = 0; i < target.values.length; i++) {\n const type = target.types[i];\n const originIndex = origin.indexes[type][pointers[type]];\n const originValue = (_a = origin.values[originIndex]) !== null && _a !== void 0 ? _a : 0;\n orderedOrigin[i] = originValue;\n pointers[type]++;\n }\n return orderedOrigin;\n}\nvar mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyseComplexValue(origin);\n const targetStats = analyseComplexValue(target);\n const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length && originStats.indexes.color.length === targetStats.indexes.color.length && originStats.indexes.number.length >= targetStats.indexes.number.length;\n if (canInterpolate) {\n if (invisibleValues.has(origin) && !targetStats.values.length || invisibleValues.has(target) && !originStats.values.length) {\n return mixVisibility(origin, target);\n }\n return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template);\n } else {\n warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`);\n return mixImmediate(origin, target);\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/utils/mix/index.mjs\nfunction mix(from, to, p) {\n if (typeof from === \"number\" && typeof to === \"number\" && typeof p === \"number\") {\n return mixNumber(from, to, p);\n }\n const mixer = getMixer(from);\n return mixer(from, to);\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/interpolate.mjs\nfunction createMixers(output, ease2, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || mix;\n const numMixers = output.length - 1;\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1]);\n if (ease2) {\n const easingFunction = Array.isArray(ease2) ? ease2[i] || noop : ease2;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\nfunction interpolate(input, output, { clamp: isClamp = true, ease: ease2, mixer } = {}) {\n const inputLength = input.length;\n invariant(inputLength === output.length, \"Both input and output ranges must be the same length\");\n if (inputLength === 1)\n return () => output[0];\n if (inputLength === 2 && input[0] === input[1])\n return () => output[1];\n if (input[0] > input[inputLength - 1]) {\n input = [...input].reverse();\n output = [...output].reverse();\n }\n const mixers = createMixers(output, ease2, mixer);\n const numMixers = mixers.length;\n const interpolator = (v) => {\n let i = 0;\n if (numMixers > 1) {\n for (; i < input.length - 2; i++) {\n if (v < input[i + 1])\n break;\n }\n }\n const progressInRange = progress(input[i], input[i + 1], v);\n return mixers[i](progressInRange);\n };\n return isClamp ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v)) : interpolator;\n}\n\n// ../../../node_modules/framer-motion/dist/es/easing/utils/is-easing-array.mjs\nvar isEasingArray = (ease2) => {\n return Array.isArray(ease2) && typeof ease2[0] !== \"number\";\n};\n\n// ../../../node_modules/framer-motion/dist/es/easing/utils/is-bezier-definition.mjs\nvar isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === \"number\";\n\n// ../../../node_modules/framer-motion/dist/es/easing/utils/map.mjs\nvar easingLookup = {\n linear: noop,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate\n};\nvar easingDefinitionToFunction = (definition) => {\n if (isBezierDefinition(definition)) {\n invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`);\n const [x1, y1, x2, y2] = definition;\n return cubicBezier(x1, y1, x2, y2);\n } else if (typeof definition === \"string\") {\n invariant(easingLookup[definition] !== void 0, `Invalid easing type '${definition}'`);\n return easingLookup[definition];\n }\n return definition;\n};\n\n// ../../../node_modules/framer-motion/dist/es/utils/offsets/fill.mjs\nfunction fillOffset(offset, remaining) {\n const min = offset[offset.length - 1];\n for (let i = 1; i <= remaining; i++) {\n const offsetProgress = progress(0, remaining, i);\n offset.push(mixNumber(min, 1, offsetProgress));\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/offsets/default.mjs\nfunction defaultOffset(arr) {\n const offset = [0];\n fillOffset(offset, arr.length - 1);\n return offset;\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/offsets/time.mjs\nfunction convertOffsetToTimes(offset, duration) {\n return offset.map((o) => o * duration);\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/generators/keyframes.mjs\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease: ease2 = \"easeInOut\" }) {\n const easingFunctions = isEasingArray(ease2) ? ease2.map(easingDefinitionToFunction) : easingDefinitionToFunction(ease2);\n const state2 = {\n done: false,\n value: keyframeValues[0]\n };\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length ? times : defaultOffset(keyframeValues),\n duration\n );\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions) ? easingFunctions : defaultEasing(keyframeValues, easingFunctions)\n });\n return {\n calculatedDuration: duration,\n next: (t) => {\n state2.value = mapTimeToKeyframe(t);\n state2.done = t >= duration;\n return state2;\n }\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/html/utils/transform.mjs\nvar transformPropOrder = [\n \"transformPerspective\",\n \"x\",\n \"y\",\n \"z\",\n \"translateX\",\n \"translateY\",\n \"translateZ\",\n \"scale\",\n \"scaleX\",\n \"scaleY\",\n \"rotate\",\n \"rotateX\",\n \"rotateY\",\n \"rotateZ\",\n \"skew\",\n \"skewX\",\n \"skewY\"\n];\nvar transformProps = new Set(transformPropOrder);\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs\nvar positionalKeys = /* @__PURE__ */ new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n \"x\",\n \"y\",\n \"translateX\",\n \"translateY\"\n]);\nvar isNumOrPxType = (v) => v === number || v === px;\nvar getPosFromMatrix = (matrix, pos) => parseFloat(matrix.split(\", \")[pos]);\nvar getTranslateFromMatrix = (pos2, pos3) => (_bbox, { transform: transform2 }) => {\n if (transform2 === \"none\" || !transform2)\n return 0;\n const matrix3d = transform2.match(/^matrix3d\\((.+)\\)$/u);\n if (matrix3d) {\n return getPosFromMatrix(matrix3d[1], pos3);\n } else {\n const matrix = transform2.match(/^matrix\\((.+)\\)$/u);\n if (matrix) {\n return getPosFromMatrix(matrix[1], pos2);\n } else {\n return 0;\n }\n }\n};\nvar transformKeys = /* @__PURE__ */ new Set([\"x\", \"y\", \"z\"]);\nvar nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key));\nfunction removeNonTranslationalTransform(visualElement) {\n const removedTransforms = [];\n nonTranslationalTransformKeys.forEach((key) => {\n const value = visualElement.getValue(key);\n if (value !== void 0) {\n removedTransforms.push([key, value.get()]);\n value.set(key.startsWith(\"scale\") ? 1 : 0);\n }\n });\n return removedTransforms;\n}\nvar positionalValues = {\n // Dimensions\n width: ({ x }, { paddingLeft = \"0\", paddingRight = \"0\" }) => x.max - x.min - parseFloat(paddingLeft) - parseFloat(paddingRight),\n height: ({ y }, { paddingTop = \"0\", paddingBottom = \"0\" }) => y.max - y.min - parseFloat(paddingTop) - parseFloat(paddingBottom),\n top: (_bbox, { top }) => parseFloat(top),\n left: (_bbox, { left }) => parseFloat(left),\n bottom: ({ y }, { top }) => parseFloat(top) + (y.max - y.min),\n right: ({ x }, { left }) => parseFloat(left) + (x.max - x.min),\n // Transform\n x: getTranslateFromMatrix(4, 13),\n y: getTranslateFromMatrix(5, 14)\n};\npositionalValues.translateX = positionalValues.x;\npositionalValues.translateY = positionalValues.y;\n\n// ../../../node_modules/framer-motion/dist/es/render/utils/KeyframesResolver.mjs\nvar toResolve = /* @__PURE__ */ new Set();\nvar isScheduled = false;\nvar anyNeedsMeasurement = false;\nfunction measureAllKeyframes() {\n if (anyNeedsMeasurement) {\n const resolversToMeasure = Array.from(toResolve).filter((resolver) => resolver.needsMeasurement);\n const elementsToMeasure = new Set(resolversToMeasure.map((resolver) => resolver.element));\n const transformsToRestore = /* @__PURE__ */ new Map();\n elementsToMeasure.forEach((element) => {\n const removedTransforms = removeNonTranslationalTransform(element);\n if (!removedTransforms.length)\n return;\n transformsToRestore.set(element, removedTransforms);\n element.render();\n });\n resolversToMeasure.forEach((resolver) => resolver.measureInitialState());\n elementsToMeasure.forEach((element) => {\n element.render();\n const restore = transformsToRestore.get(element);\n if (restore) {\n restore.forEach(([key, value]) => {\n var _a;\n (_a = element.getValue(key)) === null || _a === void 0 ? void 0 : _a.set(value);\n });\n }\n });\n resolversToMeasure.forEach((resolver) => resolver.measureEndState());\n resolversToMeasure.forEach((resolver) => {\n if (resolver.suspendedScrollY !== void 0) {\n window.scrollTo(0, resolver.suspendedScrollY);\n }\n });\n }\n anyNeedsMeasurement = false;\n isScheduled = false;\n toResolve.forEach((resolver) => resolver.complete());\n toResolve.clear();\n}\nfunction readAllKeyframes() {\n toResolve.forEach((resolver) => {\n resolver.readKeyframes();\n if (resolver.needsMeasurement) {\n anyNeedsMeasurement = true;\n }\n });\n}\nfunction flushKeyframeResolvers() {\n readAllKeyframes();\n measureAllKeyframes();\n}\nvar KeyframeResolver = class {\n constructor(unresolvedKeyframes, onComplete, name, motionValue2, element, isAsync = false) {\n this.isComplete = false;\n this.isAsync = false;\n this.needsMeasurement = false;\n this.isScheduled = false;\n this.unresolvedKeyframes = [...unresolvedKeyframes];\n this.onComplete = onComplete;\n this.name = name;\n this.motionValue = motionValue2;\n this.element = element;\n this.isAsync = isAsync;\n }\n scheduleResolve() {\n this.isScheduled = true;\n if (this.isAsync) {\n toResolve.add(this);\n if (!isScheduled) {\n isScheduled = true;\n frame.read(readAllKeyframes);\n frame.resolveKeyframes(measureAllKeyframes);\n }\n } else {\n this.readKeyframes();\n this.complete();\n }\n }\n readKeyframes() {\n const { unresolvedKeyframes, name, element, motionValue: motionValue2 } = this;\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (unresolvedKeyframes[i] === null) {\n if (i === 0) {\n const currentValue = motionValue2 === null || motionValue2 === void 0 ? void 0 : motionValue2.get();\n const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (currentValue !== void 0) {\n unresolvedKeyframes[0] = currentValue;\n } else if (element && name) {\n const valueAsRead = element.readValue(name, finalKeyframe);\n if (valueAsRead !== void 0 && valueAsRead !== null) {\n unresolvedKeyframes[0] = valueAsRead;\n }\n }\n if (unresolvedKeyframes[0] === void 0) {\n unresolvedKeyframes[0] = finalKeyframe;\n }\n if (motionValue2 && currentValue === void 0) {\n motionValue2.set(unresolvedKeyframes[0]);\n }\n } else {\n unresolvedKeyframes[i] = unresolvedKeyframes[i - 1];\n }\n }\n }\n }\n setFinalKeyframe() {\n }\n measureInitialState() {\n }\n renderEndStyles() {\n }\n measureEndState() {\n }\n complete() {\n this.isComplete = true;\n this.onComplete(this.unresolvedKeyframes, this.finalKeyframe);\n toResolve.delete(this);\n }\n cancel() {\n if (!this.isComplete) {\n this.isScheduled = false;\n toResolve.delete(this);\n }\n }\n resume() {\n if (!this.isComplete)\n this.scheduleResolve();\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/frameloop/sync-time.mjs\nvar now;\nfunction clearTime() {\n now = void 0;\n}\nvar time = {\n now: () => {\n if (now === void 0) {\n time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming ? frameData.timestamp : performance.now());\n }\n return now;\n },\n set: (newTime) => {\n now = newTime;\n queueMicrotask(clearTime);\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/utils/use-instant-transition-state.mjs\nvar instantAnimationState = {\n current: false\n};\n\n// ../../../node_modules/framer-motion/dist/es/animation/generators/utils/is-generator.mjs\nfunction isGenerator(type) {\n return typeof type === \"function\";\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs\nvar isAnimatable = (value, name) => {\n if (name === \"zIndex\")\n return false;\n if (typeof value === \"number\" || Array.isArray(value))\n return true;\n if (typeof value === \"string\" && // It's animatable if we have a string\n (complex.test(value) || value === \"0\") && // And it contains numbers and/or colors\n !value.startsWith(\"url(\")) {\n return true;\n }\n return false;\n};\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/utils/can-animate.mjs\nfunction hasKeyframesChanged(keyframes2) {\n const current = keyframes2[0];\n if (keyframes2.length === 1)\n return true;\n for (let i = 0; i < keyframes2.length; i++) {\n if (keyframes2[i] !== current)\n return true;\n }\n}\nfunction canAnimate(keyframes2, name, type, velocity) {\n const originKeyframe = keyframes2[0];\n if (originKeyframe === null)\n return false;\n if (name === \"display\" || name === \"visibility\")\n return true;\n const targetKeyframe = keyframes2[keyframes2.length - 1];\n const isOriginAnimatable = isAnimatable(originKeyframe, name);\n const isTargetAnimatable = isAnimatable(targetKeyframe, name);\n warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from \"${originKeyframe}\" to \"${targetKeyframe}\". ${originKeyframe} is not an animatable value - to enable this animation set ${originKeyframe} to a value animatable to ${targetKeyframe} via the \\`style\\` property.`);\n if (!isOriginAnimatable || !isTargetAnimatable) {\n return false;\n }\n return hasKeyframesChanged(keyframes2) || (type === \"spring\" || isGenerator(type)) && velocity;\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs\nvar isNotNull = (value) => value !== null;\nfunction getFinalKeyframe(keyframes2, { repeat, repeatType = \"loop\" }, finalKeyframe) {\n const resolvedKeyframes = keyframes2.filter(isNotNull);\n const index = repeat && repeatType !== \"loop\" && repeat % 2 === 1 ? 0 : resolvedKeyframes.length - 1;\n return !index || finalKeyframe === void 0 ? resolvedKeyframes[index] : finalKeyframe;\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/BaseAnimation.mjs\nvar MAX_RESOLVE_DELAY = 40;\nvar BaseAnimation = class {\n constructor({ autoplay = true, delay: delay2 = 0, type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType = \"loop\", ...options }) {\n this.isStopped = false;\n this.hasAttemptedResolve = false;\n this.createdAt = time.now();\n this.options = {\n autoplay,\n delay: delay2,\n type,\n repeat,\n repeatDelay,\n repeatType,\n ...options\n };\n this.updateFinishedPromise();\n }\n /**\n * This method uses the createdAt and resolvedAt to calculate the\n * animation startTime. *Ideally*, we would use the createdAt time as t=0\n * as the following frame would then be the first frame of the animation in\n * progress, which would feel snappier.\n *\n * However, if there's a delay (main thread work) between the creation of\n * the animation and the first commited frame, we prefer to use resolvedAt\n * to avoid a sudden jump into the animation.\n */\n calcStartTime() {\n if (!this.resolvedAt)\n return this.createdAt;\n return this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY ? this.resolvedAt : this.createdAt;\n }\n /**\n * A getter for resolved data. If keyframes are not yet resolved, accessing\n * this.resolved will synchronously flush all pending keyframe resolvers.\n * This is a deoptimisation, but at its worst still batches read/writes.\n */\n get resolved() {\n if (!this._resolved && !this.hasAttemptedResolve) {\n flushKeyframeResolvers();\n }\n return this._resolved;\n }\n /**\n * A method to be called when the keyframes resolver completes. This method\n * will check if its possible to run the animation and, if not, skip it.\n * Otherwise, it will call initPlayback on the implementing class.\n */\n onKeyframesResolved(keyframes2, finalKeyframe) {\n this.resolvedAt = time.now();\n this.hasAttemptedResolve = true;\n const { name, type, velocity, delay: delay2, onComplete, onUpdate, isGenerator: isGenerator2 } = this.options;\n if (!isGenerator2 && !canAnimate(keyframes2, name, type, velocity)) {\n if (instantAnimationState.current || !delay2) {\n onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(getFinalKeyframe(keyframes2, this.options, finalKeyframe));\n onComplete === null || onComplete === void 0 ? void 0 : onComplete();\n this.resolveFinishedPromise();\n return;\n } else {\n this.options.duration = 0;\n }\n }\n const resolvedAnimation = this.initPlayback(keyframes2, finalKeyframe);\n if (resolvedAnimation === false)\n return;\n this._resolved = {\n keyframes: keyframes2,\n finalKeyframe,\n ...resolvedAnimation\n };\n this.onPostResolved();\n }\n onPostResolved() {\n }\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve, reject) {\n return this.currentFinishedPromise.then(resolve, reject);\n }\n updateFinishedPromise() {\n this.currentFinishedPromise = new Promise((resolve) => {\n this.resolveFinishedPromise = resolve;\n });\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/animation/generators/utils/calc-duration.mjs\nvar maxGeneratorDuration = 2e4;\nfunction calcGeneratorDuration(generator) {\n let duration = 0;\n const timeStep = 50;\n let state2 = generator.next(duration);\n while (!state2.done && duration < maxGeneratorDuration) {\n duration += timeStep;\n state2 = generator.next(duration);\n }\n return duration >= maxGeneratorDuration ? Infinity : duration;\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs\nvar frameloopDriver = (update) => {\n const passTimestamp = ({ timestamp }) => update(timestamp);\n return {\n start: () => frame.update(passTimestamp, true),\n stop: () => cancelFrame(passTimestamp),\n /**\n * If we're processing this frame we can use the\n * framelocked timestamp to keep things in sync.\n */\n now: () => frameData.isProcessing ? frameData.timestamp : time.now()\n };\n};\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs\nvar generators = {\n decay: inertia,\n inertia,\n tween: keyframes,\n keyframes,\n spring\n};\nvar percentToProgress = (percent2) => percent2 / 100;\nvar MainThreadAnimation = class extends BaseAnimation {\n constructor(options) {\n super(options);\n this.holdTime = null;\n this.cancelTime = null;\n this.currentTime = 0;\n this.playbackSpeed = 1;\n this.pendingPlayState = \"running\";\n this.startTime = null;\n this.state = \"idle\";\n this.stop = () => {\n this.resolver.cancel();\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n this.teardown();\n const { onStop } = this.options;\n onStop && onStop();\n };\n const { name, motionValue: motionValue2, element, keyframes: keyframes2 } = this.options;\n const KeyframeResolver$1 = (element === null || element === void 0 ? void 0 : element.KeyframeResolver) || KeyframeResolver;\n const onResolved = (resolvedKeyframes, finalKeyframe) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe);\n this.resolver = new KeyframeResolver$1(keyframes2, onResolved, name, motionValue2, element);\n this.resolver.scheduleResolve();\n }\n initPlayback(keyframes$1) {\n const { type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType, velocity = 0 } = this.options;\n const generatorFactory = isGenerator(type) ? type : generators[type] || keyframes;\n let mapPercentToKeyframes;\n let mirroredGenerator;\n if (generatorFactory !== keyframes && typeof keyframes$1[0] !== \"number\") {\n if (false) {\n invariant(keyframes$1.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`);\n }\n mapPercentToKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory({ ...this.options, keyframes: keyframes$1 });\n if (repeatType === \"mirror\") {\n mirroredGenerator = generatorFactory({\n ...this.options,\n keyframes: [...keyframes$1].reverse(),\n velocity: -velocity\n });\n }\n if (generator.calculatedDuration === null) {\n generator.calculatedDuration = calcGeneratorDuration(generator);\n }\n const { calculatedDuration } = generator;\n const resolvedDuration = calculatedDuration + repeatDelay;\n const totalDuration = resolvedDuration * (repeat + 1) - repeatDelay;\n return {\n generator,\n mirroredGenerator,\n mapPercentToKeyframes,\n calculatedDuration,\n resolvedDuration,\n totalDuration\n };\n }\n onPostResolved() {\n const { autoplay = true } = this.options;\n this.play();\n if (this.pendingPlayState === \"paused\" || !autoplay) {\n this.pause();\n } else {\n this.state = this.pendingPlayState;\n }\n }\n tick(timestamp, sample = false) {\n const { resolved } = this;\n if (!resolved) {\n const { keyframes: keyframes3 } = this.options;\n return { done: true, value: keyframes3[keyframes3.length - 1] };\n }\n const { finalKeyframe, generator, mirroredGenerator, mapPercentToKeyframes, keyframes: keyframes2, calculatedDuration, totalDuration, resolvedDuration } = resolved;\n if (this.startTime === null)\n return generator.next(0);\n const { delay: delay2, repeat, repeatType, repeatDelay, onUpdate } = this.options;\n if (this.speed > 0) {\n this.startTime = Math.min(this.startTime, timestamp);\n } else if (this.speed < 0) {\n this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);\n }\n if (sample) {\n this.currentTime = timestamp;\n } else if (this.holdTime !== null) {\n this.currentTime = this.holdTime;\n } else {\n this.currentTime = Math.round(timestamp - this.startTime) * this.speed;\n }\n const timeWithoutDelay = this.currentTime - delay2 * (this.speed >= 0 ? 1 : -1);\n const isInDelayPhase = this.speed >= 0 ? timeWithoutDelay < 0 : timeWithoutDelay > totalDuration;\n this.currentTime = Math.max(timeWithoutDelay, 0);\n if (this.state === \"finished\" && this.holdTime === null) {\n this.currentTime = totalDuration;\n }\n let elapsed = this.currentTime;\n let frameGenerator = generator;\n if (repeat) {\n const progress2 = Math.min(this.currentTime, totalDuration) / resolvedDuration;\n let currentIteration = Math.floor(progress2);\n let iterationProgress = progress2 % 1;\n if (!iterationProgress && progress2 >= 1) {\n iterationProgress = 1;\n }\n iterationProgress === 1 && currentIteration--;\n currentIteration = Math.min(currentIteration, repeat + 1);\n const isOddIteration = Boolean(currentIteration % 2);\n if (isOddIteration) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress;\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration;\n }\n } else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator;\n }\n }\n elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;\n }\n const state2 = isInDelayPhase ? { done: false, value: keyframes2[0] } : frameGenerator.next(elapsed);\n if (mapPercentToKeyframes) {\n state2.value = mapPercentToKeyframes(state2.value);\n }\n let { done } = state2;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done = this.speed >= 0 ? this.currentTime >= totalDuration : this.currentTime <= 0;\n }\n const isAnimationFinished = this.holdTime === null && (this.state === \"finished\" || this.state === \"running\" && done);\n if (isAnimationFinished && finalKeyframe !== void 0) {\n state2.value = getFinalKeyframe(keyframes2, this.options, finalKeyframe);\n }\n if (onUpdate) {\n onUpdate(state2.value);\n }\n if (isAnimationFinished) {\n this.finish();\n }\n return state2;\n }\n get duration() {\n const { resolved } = this;\n return resolved ? millisecondsToSeconds(resolved.calculatedDuration) : 0;\n }\n get time() {\n return millisecondsToSeconds(this.currentTime);\n }\n set time(newTime) {\n newTime = secondsToMilliseconds(newTime);\n this.currentTime = newTime;\n if (this.holdTime !== null || this.speed === 0) {\n this.holdTime = newTime;\n } else if (this.driver) {\n this.startTime = this.driver.now() - newTime / this.speed;\n }\n }\n get speed() {\n return this.playbackSpeed;\n }\n set speed(newSpeed) {\n const hasChanged = this.playbackSpeed !== newSpeed;\n this.playbackSpeed = newSpeed;\n if (hasChanged) {\n this.time = millisecondsToSeconds(this.currentTime);\n }\n }\n play() {\n if (!this.resolver.isScheduled) {\n this.resolver.resume();\n }\n if (!this._resolved) {\n this.pendingPlayState = \"running\";\n return;\n }\n if (this.isStopped)\n return;\n const { driver = frameloopDriver, onPlay, startTime } = this.options;\n if (!this.driver) {\n this.driver = driver((timestamp) => this.tick(timestamp));\n }\n onPlay && onPlay();\n const now2 = this.driver.now();\n if (this.holdTime !== null) {\n this.startTime = now2 - this.holdTime;\n } else if (!this.startTime) {\n this.startTime = startTime !== null && startTime !== void 0 ? startTime : this.calcStartTime();\n } else if (this.state === \"finished\") {\n this.startTime = now2;\n }\n if (this.state === \"finished\") {\n this.updateFinishedPromise();\n }\n this.cancelTime = this.startTime;\n this.holdTime = null;\n this.state = \"running\";\n this.driver.start();\n }\n pause() {\n var _a;\n if (!this._resolved) {\n this.pendingPlayState = \"paused\";\n return;\n }\n this.state = \"paused\";\n this.holdTime = (_a = this.currentTime) !== null && _a !== void 0 ? _a : 0;\n }\n complete() {\n if (this.state !== \"running\") {\n this.play();\n }\n this.pendingPlayState = this.state = \"finished\";\n this.holdTime = null;\n }\n finish() {\n this.teardown();\n this.state = \"finished\";\n const { onComplete } = this.options;\n onComplete && onComplete();\n }\n cancel() {\n if (this.cancelTime !== null) {\n this.tick(this.cancelTime);\n }\n this.teardown();\n this.updateFinishedPromise();\n }\n teardown() {\n this.state = \"idle\";\n this.stopDriver();\n this.resolveFinishedPromise();\n this.updateFinishedPromise();\n this.startTime = this.cancelTime = null;\n this.resolver.cancel();\n }\n stopDriver() {\n if (!this.driver)\n return;\n this.driver.stop();\n this.driver = void 0;\n }\n sample(time2) {\n this.startTime = 0;\n return this.tick(time2, true);\n }\n};\nfunction animateValue(options) {\n return new MainThreadAnimation(options);\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs\nvar isZeroValueString = (v) => /^0[^.\\s]+$/u.test(v);\n\n// ../../../node_modules/framer-motion/dist/es/animation/utils/is-none.mjs\nfunction isNone(value) {\n if (typeof value === \"number\") {\n return value === 0;\n } else if (value !== null) {\n return value === \"none\" || value === \"0\" || isZeroValueString(value);\n } else {\n return true;\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs\nvar isNumericalString = (v) => /^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(v);\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs\nvar splitCSSVariableRegex = (\n // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words\n /^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u\n);\nfunction parseCSSVariable(current) {\n const match = splitCSSVariableRegex.exec(current);\n if (!match)\n return [,];\n const [, token1, token2, fallback] = match;\n return [`--${token1 !== null && token1 !== void 0 ? token1 : token2}`, fallback];\n}\nvar maxDepth = 4;\nfunction getVariableValue(current, element, depth = 1) {\n invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property \"${current}\". This may indicate a circular fallback dependency.`);\n const [token, fallback] = parseCSSVariable(current);\n if (!token)\n return;\n const resolved = window.getComputedStyle(element).getPropertyValue(token);\n if (resolved) {\n const trimmed = resolved.trim();\n return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;\n }\n return isCSSVariableToken(fallback) ? getVariableValue(fallback, element, depth + 1) : fallback;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs\nvar testValueType = (v) => (type) => type.test(v);\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.mjs\nvar auto = {\n test: (v) => v === \"auto\",\n parse: (v) => v\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs\nvar dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];\nvar findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v));\n\n// ../../../node_modules/framer-motion/dist/es/value/types/complex/filter.mjs\nvar maxDefaults = /* @__PURE__ */ new Set([\"brightness\", \"contrast\", \"saturate\", \"opacity\"]);\nfunction applyDefaultFilter(v) {\n const [name, value] = v.slice(0, -1).split(\"(\");\n if (name === \"drop-shadow\")\n return v;\n const [number2] = value.match(floatRegex) || [];\n if (!number2)\n return v;\n const unit = value.replace(number2, \"\");\n let defaultValue = maxDefaults.has(name) ? 1 : 0;\n if (number2 !== value)\n defaultValue *= 100;\n return name + \"(\" + defaultValue + unit + \")\";\n}\nvar functionRegex = /\\b([a-z-]*)\\(.*?\\)/gu;\nvar filter = {\n ...complex,\n getAnimatableNone: (v) => {\n const functions = v.match(functionRegex);\n return functions ? functions.map(applyDefaultFilter).join(\" \") : v;\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/value-types/number-browser.mjs\nvar browserNumberValueTypes = {\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 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 // Misc\n backgroundPositionX: px,\n backgroundPositionY: px\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/value-types/transform.mjs\nvar transformValueTypes = {\n rotate: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n 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};\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs\nvar int = {\n ...number,\n transform: Math.round\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs\nvar numberValueTypes = {\n ...browserNumberValueTypes,\n ...transformValueTypes,\n zIndex: int,\n size: px,\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs\nvar defaultValueTypes = {\n ...numberValueTypes,\n // Color props\n 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,\n WebkitFilter: filter\n};\nvar getDefaultValueType = (key) => defaultValueTypes[key];\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs\nfunction getAnimatableNone2(key, value) {\n let defaultValueType = getDefaultValueType(key);\n if (defaultValueType !== filter)\n defaultValueType = complex;\n return defaultValueType.getAnimatableNone ? defaultValueType.getAnimatableNone(value) : void 0;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs\nvar invalidTemplates = /* @__PURE__ */ new Set([\"auto\", \"none\", \"0\"]);\nfunction makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) {\n let i = 0;\n let animatableTemplate = void 0;\n while (i < unresolvedKeyframes.length && !animatableTemplate) {\n const keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\" && !invalidTemplates.has(keyframe) && analyseComplexValue(keyframe).values.length) {\n animatableTemplate = unresolvedKeyframes[i];\n }\n i++;\n }\n if (animatableTemplate && name) {\n for (const noneIndex of noneKeyframeIndexes) {\n unresolvedKeyframes[noneIndex] = getAnimatableNone2(name, animatableTemplate);\n }\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs\nvar DOMKeyframesResolver = class extends KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue2, element) {\n super(unresolvedKeyframes, onComplete, name, motionValue2, element, true);\n }\n readKeyframes() {\n const { unresolvedKeyframes, element, name } = this;\n if (!element || !element.current)\n return;\n super.readKeyframes();\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n let keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\") {\n keyframe = keyframe.trim();\n if (isCSSVariableToken(keyframe)) {\n const resolved = getVariableValue(keyframe, element.current);\n if (resolved !== void 0) {\n unresolvedKeyframes[i] = resolved;\n }\n if (i === unresolvedKeyframes.length - 1) {\n this.finalKeyframe = keyframe;\n }\n }\n }\n }\n this.resolveNoneKeyframes();\n if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) {\n return;\n }\n const [origin, target] = unresolvedKeyframes;\n const originType = findDimensionValueType(origin);\n const targetType = findDimensionValueType(target);\n if (originType === targetType)\n return;\n if (isNumOrPxType(originType) && isNumOrPxType(targetType)) {\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n const value = unresolvedKeyframes[i];\n if (typeof value === \"string\") {\n unresolvedKeyframes[i] = parseFloat(value);\n }\n }\n } else {\n this.needsMeasurement = true;\n }\n }\n resolveNoneKeyframes() {\n const { unresolvedKeyframes, name } = this;\n const noneKeyframeIndexes = [];\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (isNone(unresolvedKeyframes[i])) {\n noneKeyframeIndexes.push(i);\n }\n }\n if (noneKeyframeIndexes.length) {\n makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);\n }\n }\n measureInitialState() {\n const { element, unresolvedKeyframes, name } = this;\n if (!element || !element.current)\n return;\n if (name === \"height\") {\n this.suspendedScrollY = window.pageYOffset;\n }\n this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n unresolvedKeyframes[0] = this.measuredOrigin;\n const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (measureKeyframe !== void 0) {\n element.getValue(name, measureKeyframe).jump(measureKeyframe, false);\n }\n }\n measureEndState() {\n var _a;\n const { element, name, unresolvedKeyframes } = this;\n if (!element || !element.current)\n return;\n const value = element.getValue(name);\n value && value.jump(this.measuredOrigin, false);\n const finalKeyframeIndex = unresolvedKeyframes.length - 1;\n const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];\n unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n if (finalKeyframe !== null && this.finalKeyframe === void 0) {\n this.finalKeyframe = finalKeyframe;\n }\n if ((_a = this.removedTransforms) === null || _a === void 0 ? void 0 : _a.length) {\n this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => {\n element.getValue(unsetTransformName).set(unsetTransformValue);\n });\n }\n this.resolveNoneKeyframes();\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/utils/accelerated-values.mjs\nvar acceleratedValues = /* @__PURE__ */ new Set([\n \"opacity\",\n \"clipPath\",\n \"filter\",\n \"transform\"\n // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved\n // or until we implement support for linear() easing.\n // \"background-color\"\n]);\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/waapi/utils/linear.mjs\nvar resolution = 10;\nvar generateLinearEasing = (easing, duration) => {\n let points = \"\";\n const numPoints = Math.max(Math.round(duration / resolution), 2);\n for (let i = 0; i < numPoints; i++) {\n points += easing(progress(0, numPoints - 1, i)) + \", \";\n }\n return `linear(${points.substring(0, points.length - 2)})`;\n};\n\n// ../../../node_modules/framer-motion/dist/es/utils/memo.mjs\nfunction memo(callback) {\n let result;\n return () => {\n if (result === void 0)\n result = callback();\n return result;\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/waapi/utils/supports-flags.mjs\nvar supportsFlags = {\n linearEasing: void 0\n};\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/waapi/utils/memo-supports.mjs\nfunction memoSupports(callback, supportsFlag) {\n const memoized = memo(callback);\n return () => {\n var _a;\n return (_a = supportsFlags[supportsFlag]) !== null && _a !== void 0 ? _a : memoized();\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/waapi/utils/supports-linear-easing.mjs\nvar supportsLinearEasing = /* @__PURE__ */ memoSupports(() => {\n try {\n document.createElement(\"div\").animate({ opacity: 0 }, { easing: \"linear(0, 1)\" });\n } catch (e) {\n return false;\n }\n return true;\n}, \"linearEasing\");\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/waapi/easing.mjs\nfunction isWaapiSupportedEasing(easing) {\n return Boolean(typeof easing === \"function\" && supportsLinearEasing() || !easing || typeof easing === \"string\" && (easing in supportedWaapiEasing || supportsLinearEasing()) || isBezierDefinition(easing) || Array.isArray(easing) && easing.every(isWaapiSupportedEasing));\n}\nvar cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\nvar supportedWaapiEasing = {\n linear: \"linear\",\n ease: \"ease\",\n easeIn: \"ease-in\",\n easeOut: \"ease-out\",\n easeInOut: \"ease-in-out\",\n circIn: /* @__PURE__ */ cubicBezierAsString([0, 0.65, 0.55, 1]),\n circOut: /* @__PURE__ */ cubicBezierAsString([0.55, 0, 1, 0.45]),\n backIn: /* @__PURE__ */ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),\n backOut: /* @__PURE__ */ cubicBezierAsString([0.33, 1.53, 0.69, 0.99])\n};\nfunction mapEasingToNativeEasing(easing, duration) {\n if (!easing) {\n return void 0;\n } else if (typeof easing === \"function\" && supportsLinearEasing()) {\n return generateLinearEasing(easing, duration);\n } else if (isBezierDefinition(easing)) {\n return cubicBezierAsString(easing);\n } else if (Array.isArray(easing)) {\n return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) || supportedWaapiEasing.easeOut);\n } else {\n return supportedWaapiEasing[easing];\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/waapi/index.mjs\nfunction startWaapiAnimation(element, valueName, keyframes2, { delay: delay2 = 0, duration = 300, repeat = 0, repeatType = \"loop\", ease: ease2, times } = {}) {\n const keyframeOptions = { [valueName]: keyframes2 };\n if (times)\n keyframeOptions.offset = times;\n const easing = mapEasingToNativeEasing(ease2, duration);\n if (Array.isArray(easing))\n keyframeOptions.easing = easing;\n return element.animate(keyframeOptions, {\n delay: delay2,\n duration,\n easing: !Array.isArray(easing) ? easing : \"linear\",\n fill: \"both\",\n iterations: repeat + 1,\n direction: repeatType === \"reverse\" ? \"alternate\" : \"normal\"\n });\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/waapi/utils/attach-timeline.mjs\nfunction attachTimeline(animation, timeline) {\n animation.timeline = timeline;\n animation.onfinish = null;\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs\nvar supportsWaapi = /* @__PURE__ */ memo(() => Object.hasOwnProperty.call(Element.prototype, \"animate\"));\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs\nvar sampleDelta = 10;\nvar maxDuration2 = 2e4;\nfunction requiresPregeneratedKeyframes(options) {\n return isGenerator(options.type) || options.type === \"spring\" || !isWaapiSupportedEasing(options.ease);\n}\nfunction pregenerateKeyframes(keyframes2, options) {\n const sampleAnimation = new MainThreadAnimation({\n ...options,\n keyframes: keyframes2,\n repeat: 0,\n delay: 0,\n isGenerator: true\n });\n let state2 = { done: false, value: keyframes2[0] };\n const pregeneratedKeyframes = [];\n let t = 0;\n while (!state2.done && t < maxDuration2) {\n state2 = sampleAnimation.sample(t);\n pregeneratedKeyframes.push(state2.value);\n t += sampleDelta;\n }\n return {\n times: void 0,\n keyframes: pregeneratedKeyframes,\n duration: t - sampleDelta,\n ease: \"linear\"\n };\n}\nvar unsupportedEasingFunctions = {\n anticipate,\n backInOut,\n circInOut\n};\nfunction isUnsupportedEase(key) {\n return key in unsupportedEasingFunctions;\n}\nvar AcceleratedAnimation = class extends BaseAnimation {\n constructor(options) {\n super(options);\n const { name, motionValue: motionValue2, element, keyframes: keyframes2 } = this.options;\n this.resolver = new DOMKeyframesResolver(keyframes2, (resolvedKeyframes, finalKeyframe) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe), name, motionValue2, element);\n this.resolver.scheduleResolve();\n }\n initPlayback(keyframes2, finalKeyframe) {\n var _a;\n let { duration = 300, times, ease: ease2, type, motionValue: motionValue2, name, startTime } = this.options;\n if (!((_a = motionValue2.owner) === null || _a === void 0 ? void 0 : _a.current)) {\n return false;\n }\n if (typeof ease2 === \"string\" && supportsLinearEasing() && isUnsupportedEase(ease2)) {\n ease2 = unsupportedEasingFunctions[ease2];\n }\n if (requiresPregeneratedKeyframes(this.options)) {\n const { onComplete, onUpdate, motionValue: motionValue3, element, ...options } = this.options;\n const pregeneratedAnimation = pregenerateKeyframes(keyframes2, options);\n keyframes2 = pregeneratedAnimation.keyframes;\n if (keyframes2.length === 1) {\n keyframes2[1] = keyframes2[0];\n }\n duration = pregeneratedAnimation.duration;\n times = pregeneratedAnimation.times;\n ease2 = pregeneratedAnimation.ease;\n type = \"keyframes\";\n }\n const animation = startWaapiAnimation(motionValue2.owner.current, name, keyframes2, { ...this.options, duration, times, ease: ease2 });\n animation.startTime = startTime !== null && startTime !== void 0 ? startTime : this.calcStartTime();\n if (this.pendingTimeline) {\n attachTimeline(animation, this.pendingTimeline);\n this.pendingTimeline = void 0;\n } else {\n animation.onfinish = () => {\n const { onComplete } = this.options;\n motionValue2.set(getFinalKeyframe(keyframes2, this.options, finalKeyframe));\n onComplete && onComplete();\n this.cancel();\n this.resolveFinishedPromise();\n };\n }\n return {\n animation,\n duration,\n times,\n type,\n ease: ease2,\n keyframes: keyframes2\n };\n }\n get duration() {\n const { resolved } = this;\n if (!resolved)\n return 0;\n const { duration } = resolved;\n return millisecondsToSeconds(duration);\n }\n get time() {\n const { resolved } = this;\n if (!resolved)\n return 0;\n const { animation } = resolved;\n return millisecondsToSeconds(animation.currentTime || 0);\n }\n set time(newTime) {\n const { resolved } = this;\n if (!resolved)\n return;\n const { animation } = resolved;\n animation.currentTime = secondsToMilliseconds(newTime);\n }\n get speed() {\n const { resolved } = this;\n if (!resolved)\n return 1;\n const { animation } = resolved;\n return animation.playbackRate;\n }\n set speed(newSpeed) {\n const { resolved } = this;\n if (!resolved)\n return;\n const { animation } = resolved;\n animation.playbackRate = newSpeed;\n }\n get state() {\n const { resolved } = this;\n if (!resolved)\n return \"idle\";\n const { animation } = resolved;\n return animation.playState;\n }\n get startTime() {\n const { resolved } = this;\n if (!resolved)\n return null;\n const { animation } = resolved;\n return animation.startTime;\n }\n /**\n * Replace the default DocumentTimeline with another AnimationTimeline.\n * Currently used for scroll animations.\n */\n attachTimeline(timeline) {\n if (!this._resolved) {\n this.pendingTimeline = timeline;\n } else {\n const { resolved } = this;\n if (!resolved)\n return noop;\n const { animation } = resolved;\n attachTimeline(animation, timeline);\n }\n return noop;\n }\n play() {\n if (this.isStopped)\n return;\n const { resolved } = this;\n if (!resolved)\n return;\n const { animation } = resolved;\n if (animation.playState === \"finished\") {\n this.updateFinishedPromise();\n }\n animation.play();\n }\n pause() {\n const { resolved } = this;\n if (!resolved)\n return;\n const { animation } = resolved;\n animation.pause();\n }\n stop() {\n this.resolver.cancel();\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n this.resolveFinishedPromise();\n this.updateFinishedPromise();\n const { resolved } = this;\n if (!resolved)\n return;\n const { animation, keyframes: keyframes2, duration, type, ease: ease2, times } = resolved;\n if (animation.playState === \"idle\" || animation.playState === \"finished\") {\n return;\n }\n if (this.time) {\n const { motionValue: motionValue2, onUpdate, onComplete, element, ...options } = this.options;\n const sampleAnimation = new MainThreadAnimation({\n ...options,\n keyframes: keyframes2,\n duration,\n type,\n ease: ease2,\n times,\n isGenerator: true\n });\n const sampleTime = secondsToMilliseconds(this.time);\n motionValue2.setWithVelocity(sampleAnimation.sample(sampleTime - sampleDelta).value, sampleAnimation.sample(sampleTime).value, sampleDelta);\n }\n const { onStop } = this.options;\n onStop && onStop();\n this.cancel();\n }\n complete() {\n const { resolved } = this;\n if (!resolved)\n return;\n resolved.animation.finish();\n }\n cancel() {\n const { resolved } = this;\n if (!resolved)\n return;\n resolved.animation.cancel();\n }\n static supports(options) {\n const { motionValue: motionValue2, name, repeatDelay, repeatType, damping, type } = options;\n return supportsWaapi() && name && acceleratedValues.has(name) && motionValue2 && motionValue2.owner && motionValue2.owner.current instanceof HTMLElement && /**\n * If we're outputting values to onUpdate then we can't use WAAPI as there's\n * no way to read the value from WAAPI every frame.\n */\n !motionValue2.owner.getProps().onUpdate && !repeatDelay && repeatType !== \"mirror\" && damping !== 0 && type !== \"inertia\";\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/utils/array.mjs\nfunction addUniqueItem(arr, item) {\n if (arr.indexOf(item) === -1)\n arr.push(item);\n}\nfunction removeItem(arr, item) {\n const index = arr.indexOf(item);\n if (index > -1)\n arr.splice(index, 1);\n}\nfunction moveItem([...arr], fromIndex, toIndex) {\n const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;\n if (startIndex >= 0 && startIndex < arr.length) {\n const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;\n const [item] = arr.splice(fromIndex, 1);\n arr.splice(endIndex, 0, item);\n }\n return arr;\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/subscription-manager.mjs\nvar SubscriptionManager = class {\n constructor() {\n this.subscriptions = [];\n }\n add(handler) {\n addUniqueItem(this.subscriptions, handler);\n return () => removeItem(this.subscriptions, handler);\n }\n notify(a, b, c) {\n const numSubscriptions = this.subscriptions.length;\n if (!numSubscriptions)\n return;\n if (numSubscriptions === 1) {\n this.subscriptions[0](a, b, c);\n } else {\n for (let i = 0; i < numSubscriptions; i++) {\n const handler = this.subscriptions[i];\n handler && handler(a, b, c);\n }\n }\n }\n getSize() {\n return this.subscriptions.length;\n }\n clear() {\n this.subscriptions.length = 0;\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/value/index.mjs\nvar MAX_VELOCITY_DELTA = 30;\nvar isFloat = (value) => {\n return !isNaN(parseFloat(value));\n};\nvar collectMotionValues = {\n current: void 0\n};\nvar MotionValue = class {\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 constructor(init, options = {}) {\n this.version = \"11.11.7\";\n this.canTrackVelocity = null;\n this.events = {};\n this.updateAndNotify = (v, render = true) => {\n const currentTime = time.now();\n if (this.updatedAt !== currentTime) {\n this.setPrevFrameValue();\n }\n this.prev = this.current;\n this.setCurrent(v);\n if (this.current !== this.prev && this.events.change) {\n this.events.change.notify(this.current);\n }\n if (render && this.events.renderRequest) {\n this.events.renderRequest.notify(this.current);\n }\n };\n this.hasAnimated = false;\n this.setCurrent(init);\n this.owner = options.owner;\n }\n setCurrent(current) {\n this.current = current;\n this.updatedAt = time.now();\n if (this.canTrackVelocity === null && current !== void 0) {\n this.canTrackVelocity = isFloat(this.current);\n }\n }\n setPrevFrameValue(prevFrameValue = this.current) {\n this.prevFrameValue = prevFrameValue;\n this.prevUpdatedAt = this.updatedAt;\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 * ```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.on(\"change\", updateOpacity)\n * const unsubscribeY = y.on(\"change\", updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return \n * }\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 * @deprecated\n */\n onChange(subscription) {\n if (false) {\n warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`);\n }\n return this.on(\"change\", subscription);\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n const unsubscribe = this.events[eventName].add(callback);\n if (eventName === \"change\") {\n return () => {\n unsubscribe();\n frame.read(() => {\n if (!this.events.change.getSize()) {\n this.stop();\n }\n });\n };\n }\n return unsubscribe;\n }\n clearListeners() {\n for (const eventManagers in this.events) {\n this.events[eventManagers].clear();\n }\n }\n /**\n * Attaches a passive effect to the `MotionValue`.\n *\n * @internal\n */\n attach(passiveEffect, stopPassiveEffect) {\n this.passiveEffect = passiveEffect;\n this.stopPassiveEffect = stopPassiveEffect;\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 set(v, render = true) {\n if (!render || !this.passiveEffect) {\n this.updateAndNotify(v, render);\n } else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n }\n setWithVelocity(prev, current, delta) {\n this.set(current);\n this.prev = void 0;\n this.prevFrameValue = prev;\n this.prevUpdatedAt = this.updatedAt - delta;\n }\n /**\n * Set the state of the `MotionValue`, stopping any active animations,\n * effects, and resets velocity to `0`.\n */\n jump(v, endAnimation = true) {\n this.updateAndNotify(v);\n this.prev = v;\n this.prevUpdatedAt = this.prevFrameValue = void 0;\n endAnimation && this.stop();\n if (this.stopPassiveEffect)\n this.stopPassiveEffect();\n }\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n get() {\n if (collectMotionValues.current) {\n collectMotionValues.current.push(this);\n }\n return this.current;\n }\n /**\n * @public\n */\n getPrevious() {\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 getVelocity() {\n const currentTime = time.now();\n if (!this.canTrackVelocity || this.prevFrameValue === void 0 || currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {\n return 0;\n }\n const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);\n return velocityPerSecond(parseFloat(this.current) - parseFloat(this.prevFrameValue), delta);\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 start(startAnimation) {\n this.stop();\n return new Promise((resolve) => {\n this.hasAnimated = true;\n this.animation = startAnimation(resolve);\n if (this.events.animationStart) {\n this.events.animationStart.notify();\n }\n }).then(() => {\n if (this.events.animationComplete) {\n this.events.animationComplete.notify();\n }\n this.clearAnimation();\n });\n }\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n stop() {\n if (this.animation) {\n this.animation.stop();\n if (this.events.animationCancel) {\n this.events.animationCancel.notify();\n }\n }\n this.clearAnimation();\n }\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n isAnimating() {\n return !!this.animation;\n }\n clearAnimation() {\n delete this.animation;\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 destroy() {\n this.clearListeners();\n this.stop();\n if (this.stopPassiveEffect) {\n this.stopPassiveEffect();\n }\n }\n};\nfunction motionValue(init, options) {\n return new MotionValue(init, options);\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs\nvar camelToDash = (str) => str.replace(/([a-z])([A-Z])/gu, \"$1-$2\").toLowerCase();\n\n// ../../../node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.mjs\nvar optimizedAppearDataId = \"framerAppearId\";\nvar optimizedAppearDataAttribute = \"data-\" + camelToDash(optimizedAppearDataId);\n\n// ../../../node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs\nvar isMotionValue = (value) => Boolean(value && value.getVelocity);\n\n// ../../../node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs\nfunction getValueState(visualElement) {\n const state2 = [{}, {}];\n visualElement === null || visualElement === void 0 ? void 0 : visualElement.values.forEach((value, key) => {\n state2[0][key] = value.get();\n state2[1][key] = value.getVelocity();\n });\n return state2;\n}\nfunction resolveVariantFromProps(props, definition, custom, visualElement) {\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== void 0 ? custom : props.custom, current, velocity);\n }\n if (typeof definition === \"string\") {\n definition = props.variants && props.variants[definition];\n }\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== void 0 ? custom : props.custom, current, velocity);\n }\n return definition;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs\nfunction resolveVariant(visualElement, definition, custom) {\n const props = visualElement.getProps();\n return resolveVariantFromProps(props, definition, custom !== void 0 ? custom : props.custom, visualElement);\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs\nvar underDampedSpring = {\n type: \"spring\",\n stiffness: 500,\n damping: 25,\n restSpeed: 10\n};\nvar criticallyDampedSpring = (target) => ({\n type: \"spring\",\n stiffness: 550,\n damping: target === 0 ? 2 * Math.sqrt(550) : 30,\n restSpeed: 10\n});\nvar keyframesTransition = {\n type: \"keyframes\",\n duration: 0.8\n};\nvar ease = {\n type: \"keyframes\",\n ease: [0.25, 0.1, 0.35, 1],\n duration: 0.3\n};\nvar getDefaultTransition = (valueKey, { keyframes: keyframes2 }) => {\n if (keyframes2.length > 2) {\n return keyframesTransition;\n } else if (transformProps.has(valueKey)) {\n return valueKey.startsWith(\"scale\") ? criticallyDampedSpring(keyframes2[1]) : underDampedSpring;\n }\n return ease;\n};\n\n// ../../../node_modules/framer-motion/dist/es/animation/utils/get-value-transition.mjs\nfunction getValueTransition(transition, key) {\n return transition ? transition[key] || transition[\"default\"] || transition : void 0;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/scroll/supports.mjs\nvar supportsScrollTimeline = memo(() => window.ScrollTimeline !== void 0);\n\n// ../../../node_modules/framer-motion/dist/es/animation/GroupPlaybackControls.mjs\nvar GroupPlaybackControls = class {\n constructor(animations2) {\n this.stop = () => this.runAll(\"stop\");\n this.animations = animations2.filter(Boolean);\n }\n then(onResolve, onReject) {\n return Promise.all(this.animations).then(onResolve).catch(onReject);\n }\n /**\n * TODO: Filter out cancelled or stopped animations before returning\n */\n getAll(propName) {\n return this.animations[0][propName];\n }\n setAll(propName, newValue) {\n for (let i = 0; i < this.animations.length; i++) {\n this.animations[i][propName] = newValue;\n }\n }\n attachTimeline(timeline, fallback) {\n const subscriptions = this.animations.map((animation) => {\n if (supportsScrollTimeline() && animation.attachTimeline) {\n return animation.attachTimeline(timeline);\n } else {\n return fallback(animation);\n }\n });\n return () => {\n subscriptions.forEach((cancel, i) => {\n cancel && cancel();\n this.animations[i].stop();\n });\n };\n }\n get time() {\n return this.getAll(\"time\");\n }\n set time(time2) {\n this.setAll(\"time\", time2);\n }\n get speed() {\n return this.getAll(\"speed\");\n }\n set speed(speed) {\n this.setAll(\"speed\", speed);\n }\n get startTime() {\n return this.getAll(\"startTime\");\n }\n get duration() {\n let max = 0;\n for (let i = 0; i < this.animations.length; i++) {\n max = Math.max(max, this.animations[i].duration);\n }\n return max;\n }\n runAll(methodName) {\n this.animations.forEach((controls) => controls[methodName]());\n }\n play() {\n this.runAll(\"play\");\n }\n pause() {\n this.runAll(\"pause\");\n }\n cancel() {\n this.runAll(\"cancel\");\n }\n complete() {\n this.runAll(\"complete\");\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/animation/utils/is-transition-defined.mjs\nfunction isTransitionDefined({ when, delay: _delay, delayChildren, staggerChildren, staggerDirection, repeat, repeatType, repeatDelay, from, elapsed, ...transition }) {\n return !!Object.keys(transition).length;\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs\nvar animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {\n const valueTransition = getValueTransition(transition, name) || {};\n const delay2 = valueTransition.delay || transition.delay || 0;\n let { elapsed = 0 } = transition;\n elapsed = elapsed - secondsToMilliseconds(delay2);\n let options = {\n keyframes: Array.isArray(target) ? target : [null, target],\n ease: \"easeOut\",\n velocity: value.getVelocity(),\n ...valueTransition,\n delay: -elapsed,\n onUpdate: (v) => {\n value.set(v);\n valueTransition.onUpdate && valueTransition.onUpdate(v);\n },\n onComplete: () => {\n onComplete();\n valueTransition.onComplete && valueTransition.onComplete();\n },\n name,\n motionValue: value,\n element: isHandoff ? void 0 : element\n };\n if (!isTransitionDefined(valueTransition)) {\n options = {\n ...options,\n ...getDefaultTransition(name, options)\n };\n }\n if (options.duration) {\n options.duration = secondsToMilliseconds(options.duration);\n }\n if (options.repeatDelay) {\n options.repeatDelay = secondsToMilliseconds(options.repeatDelay);\n }\n if (options.from !== void 0) {\n options.keyframes[0] = options.from;\n }\n let shouldSkip = false;\n if (options.type === false || options.duration === 0 && !options.repeatDelay) {\n options.duration = 0;\n if (options.delay === 0) {\n shouldSkip = true;\n }\n }\n if (instantAnimationState.current || MotionGlobalConfig.skipAnimations) {\n shouldSkip = true;\n options.duration = 0;\n options.delay = 0;\n }\n if (shouldSkip && !isHandoff && value.get() !== void 0) {\n const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);\n if (finalKeyframe !== void 0) {\n frame.update(() => {\n options.onUpdate(finalKeyframe);\n options.onComplete();\n });\n return new GroupPlaybackControls([]);\n }\n }\n if (!isHandoff && AcceleratedAnimation.supports(options)) {\n return new AcceleratedAnimation(options);\n } else {\n return new MainThreadAnimation(options);\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs\nvar isKeyframesTarget = (v) => {\n return Array.isArray(v);\n};\n\n// ../../../node_modules/framer-motion/dist/es/utils/resolve-value.mjs\nvar isCustomValue = (v) => {\n return Boolean(v && typeof v === \"object\" && v.mix && v.toValue);\n};\nvar resolveFinalValueInKeyframes = (v) => {\n return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/utils/setters.mjs\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}\nfunction setTarget(visualElement, definition) {\n const resolved = resolveVariant(visualElement, definition);\n let { transitionEnd = {}, transition = {}, ...target } = resolved || {};\n target = { ...target, ...transitionEnd };\n for (const key in target) {\n const value = resolveFinalValueInKeyframes(target[key]);\n setMotionValue(visualElement, key, value);\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs\nfunction getOptimisedAppearId(visualElement) {\n return visualElement.props[optimizedAppearDataAttribute];\n}\n\n// ../../../node_modules/framer-motion/dist/es/value/use-will-change/is.mjs\nfunction isWillChangeMotionValue(value) {\n return Boolean(isMotionValue(value) && value.add);\n}\n\n// ../../../node_modules/framer-motion/dist/es/value/use-will-change/get-will-change-name.mjs\nfunction getWillChangeName(name) {\n if (transformProps.has(name)) {\n return \"transform\";\n } else if (acceleratedValues.has(name)) {\n return camelToDash(name);\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/value/use-will-change/add-will-change.mjs\nfunction addValueToWillChange(visualElement, key) {\n var _a;\n if (!visualElement.applyWillChange)\n return;\n const willChange = visualElement.getValue(\"willChange\");\n if (isWillChangeMotionValue(willChange)) {\n return willChange.add(key);\n } else if (!((_a = visualElement.props.style) === null || _a === void 0 ? void 0 : _a.willChange) && getWillChangeName(key)) {\n visualElement.setStaticValue(\"willChange\", \"transform\");\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs\nfunction shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {\n const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n needsAnimating[key] = false;\n return shouldBlock;\n}\nfunction animateTarget(visualElement, targetAndTransition, { delay: delay2 = 0, transitionOverride, type } = {}) {\n var _a;\n let { transition = visualElement.getDefaultTransition(), transitionEnd, ...target } = targetAndTransition;\n if (transitionOverride)\n transition = transitionOverride;\n const animations2 = [];\n const animationTypeState = type && visualElement.animationState && visualElement.animationState.getState()[type];\n for (const key in target) {\n const value = visualElement.getValue(key, (_a = visualElement.latestValues[key]) !== null && _a !== void 0 ? _a : null);\n const valueTarget = target[key];\n if (valueTarget === void 0 || animationTypeState && shouldBlockAnimation(animationTypeState, key)) {\n continue;\n }\n const valueTransition = {\n delay: delay2,\n ...getValueTransition(transition || {}, key)\n };\n let isHandoff = false;\n if (window.MotionHandoffAnimation) {\n const appearId = getOptimisedAppearId(visualElement);\n if (appearId) {\n const startTime = window.MotionHandoffAnimation(appearId, key, frame);\n if (startTime !== null) {\n valueTransition.startTime = startTime;\n isHandoff = true;\n }\n }\n }\n addValueToWillChange(visualElement, key);\n value.start(animateMotionValue(key, value, valueTarget, visualElement.shouldReduceMotion && transformProps.has(key) ? { type: false } : valueTransition, visualElement, isHandoff));\n const animation = value.animation;\n if (animation) {\n animations2.push(animation);\n }\n }\n if (transitionEnd) {\n Promise.all(animations2).then(() => {\n frame.update(() => {\n transitionEnd && setTarget(visualElement, transitionEnd);\n });\n });\n }\n return animations2;\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs\nfunction animateVariant(visualElement, variant, options = {}) {\n var _a;\n const resolved = resolveVariant(visualElement, variant, options.type === \"exit\" ? (_a = visualElement.presenceContext) === null || _a === void 0 ? void 0 : _a.custom : void 0);\n let { transition = visualElement.getDefaultTransition() || {} } = resolved || {};\n if (options.transitionOverride) {\n transition = options.transitionOverride;\n }\n const getAnimation = resolved ? () => Promise.all(animateTarget(visualElement, resolved, options)) : () => Promise.resolve();\n const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size ? (forwardDelay = 0) => {\n const { delayChildren = 0, staggerChildren, staggerDirection } = transition;\n return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options);\n } : () => Promise.resolve();\n const { when } = transition;\n if (when) {\n const [first, last] = when === \"beforeChildren\" ? [getAnimation, getChildAnimations] : [getChildAnimations, getAnimation];\n return first().then(() => last());\n } else {\n return Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n }\n}\nfunction animateChildren(visualElement, variant, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) {\n const animations2 = [];\n const maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;\n const generateStaggerDuration = staggerDirection === 1 ? (i = 0) => i * staggerChildren : (i = 0) => maxStaggerDuration - i * staggerChildren;\n Array.from(visualElement.variantChildren).sort(sortByTreeOrder).forEach((child, i) => {\n child.notify(\"AnimationStart\", variant);\n animations2.push(animateVariant(child, variant, {\n ...options,\n delay: delayChildren + generateStaggerDuration(i)\n }).then(() => child.notify(\"AnimationComplete\", variant)));\n });\n return Promise.all(animations2);\n}\nfunction sortByTreeOrder(a, b) {\n return a.sortNodePosition(b);\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/interfaces/visual-element.mjs\nfunction animateVisualElement(visualElement, definition, options = {}) {\n visualElement.notify(\"AnimationStart\", definition);\n let animation;\n if (Array.isArray(definition)) {\n const animations2 = definition.map((variant) => animateVariant(visualElement, variant, options));\n animation = Promise.all(animations2);\n } else if (typeof definition === \"string\") {\n animation = animateVariant(visualElement, definition, options);\n } else {\n const resolvedDefinition = typeof definition === \"function\" ? resolveVariant(visualElement, definition, options.custom) : definition;\n animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options));\n }\n return animation.then(() => {\n visualElement.notify(\"AnimationComplete\", definition);\n });\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs\nfunction isAnimationControls(v) {\n return v !== null && typeof v === \"object\" && typeof v.start === \"function\";\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/shallow-compare.mjs\nfunction shallowCompare(next, prev) {\n if (!Array.isArray(prev))\n return false;\n const prevLength = prev.length;\n if (prevLength !== next.length)\n return false;\n for (let i = 0; i < prevLength; i++) {\n if (prev[i] !== next[i])\n return false;\n }\n return true;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/utils/is-variant-label.mjs\nfunction isVariantLabel(v) {\n return typeof v === \"string\" || Array.isArray(v);\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/utils/variant-props.mjs\nvar variantPriorityOrder = [\n \"animate\",\n \"whileInView\",\n \"whileFocus\",\n \"whileHover\",\n \"whileTap\",\n \"whileDrag\",\n \"exit\"\n];\nvar variantProps = [\"initial\", ...variantPriorityOrder];\n\n// ../../../node_modules/framer-motion/dist/es/render/utils/get-variant-context.mjs\nvar numVariantProps = variantProps.length;\nfunction getVariantContext(visualElement) {\n if (!visualElement)\n return void 0;\n if (!visualElement.isControllingVariants) {\n const context2 = visualElement.parent ? getVariantContext(visualElement.parent) || {} : {};\n if (visualElement.props.initial !== void 0) {\n context2.initial = visualElement.props.initial;\n }\n return context2;\n }\n const context = {};\n for (let i = 0; i < numVariantProps; i++) {\n const name = variantProps[i];\n const prop = visualElement.props[name];\n if (isVariantLabel(prop) || prop === false) {\n context[name] = prop;\n }\n }\n return context;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/utils/animation-state.mjs\nvar reversePriorityOrder = [...variantPriorityOrder].reverse();\nvar numAnimationTypes = variantPriorityOrder.length;\nfunction animateList(visualElement) {\n return (animations2) => Promise.all(animations2.map(({ animation, options }) => animateVisualElement(visualElement, animation, options)));\n}\nfunction createAnimationState(visualElement) {\n let animate2 = animateList(visualElement);\n let state2 = createState();\n let isInitialRender = true;\n const buildResolvedTypeValues = (type) => (acc, definition) => {\n var _a;\n const resolved = resolveVariant(visualElement, definition, type === \"exit\" ? (_a = visualElement.presenceContext) === null || _a === void 0 ? void 0 : _a.custom : void 0);\n if (resolved) {\n const { transition, transitionEnd, ...target } = resolved;\n acc = { ...acc, ...target, ...transitionEnd };\n }\n return acc;\n };\n function setAnimateFunction(makeAnimator) {\n animate2 = makeAnimator(visualElement);\n }\n function animateChanges(changedActiveType) {\n const { props } = visualElement;\n const context = getVariantContext(visualElement.parent) || {};\n const animations2 = [];\n const removedKeys = /* @__PURE__ */ new Set();\n let encounteredKeys = {};\n let removedVariantIndex = Infinity;\n for (let i = 0; i < numAnimationTypes; i++) {\n const type = reversePriorityOrder[i];\n const typeState = state2[type];\n const prop = props[type] !== void 0 ? props[type] : context[type];\n const propIsVariant = isVariantLabel(prop);\n const activeDelta = type === changedActiveType ? typeState.isActive : null;\n if (activeDelta === false)\n removedVariantIndex = i;\n let isInherited = prop === context[type] && prop !== props[type] && propIsVariant;\n if (isInherited && isInitialRender && visualElement.manuallyAnimateOnMount) {\n isInherited = false;\n }\n typeState.protectedKeys = { ...encounteredKeys };\n if (\n // If it isn't active and hasn't *just* been set as inactive\n !typeState.isActive && activeDelta === null || // If we didn't and don't have any defined prop for this animation type\n !prop && !typeState.prevProp || // Or if the prop doesn't define an animation\n isAnimationControls(prop) || typeof prop === \"boolean\"\n ) {\n continue;\n }\n const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);\n let shouldAnimateType = variantDidChange || // If we're making this variant active, we want to always make it active\n type === changedActiveType && typeState.isActive && !isInherited && propIsVariant || // If we removed a higher-priority variant (i is in reverse order)\n i > removedVariantIndex && propIsVariant;\n let handledRemovedValues = false;\n const definitionList = Array.isArray(prop) ? prop : [prop];\n let resolvedValues = definitionList.reduce(buildResolvedTypeValues(type), {});\n if (activeDelta === false)\n resolvedValues = {};\n const { prevResolvedValues = {} } = typeState;\n const allKeys = {\n ...prevResolvedValues,\n ...resolvedValues\n };\n const markToAnimate = (key) => {\n shouldAnimateType = true;\n if (removedKeys.has(key)) {\n handledRemovedValues = true;\n removedKeys.delete(key);\n }\n typeState.needsAnimating[key] = true;\n const motionValue2 = visualElement.getValue(key);\n if (motionValue2)\n motionValue2.liveStyle = false;\n };\n for (const key in allKeys) {\n const next = resolvedValues[key];\n const prev = prevResolvedValues[key];\n if (encounteredKeys.hasOwnProperty(key))\n continue;\n let valueHasChanged = false;\n if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n valueHasChanged = !shallowCompare(next, prev);\n } else {\n valueHasChanged = next !== prev;\n }\n if (valueHasChanged) {\n if (next !== void 0 && next !== null) {\n markToAnimate(key);\n } else {\n removedKeys.add(key);\n }\n } else if (next !== void 0 && removedKeys.has(key)) {\n markToAnimate(key);\n } else {\n typeState.protectedKeys[key] = true;\n }\n }\n typeState.prevProp = prop;\n typeState.prevResolvedValues = resolvedValues;\n if (typeState.isActive) {\n encounteredKeys = { ...encounteredKeys, ...resolvedValues };\n }\n if (isInitialRender && visualElement.blockInitialAnimation) {\n shouldAnimateType = false;\n }\n const willAnimateViaParent = isInherited && variantDidChange;\n const needsAnimating = !willAnimateViaParent || handledRemovedValues;\n if (shouldAnimateType && needsAnimating) {\n animations2.push(...definitionList.map((animation) => ({\n animation,\n options: { type }\n })));\n }\n }\n if (removedKeys.size) {\n const fallbackAnimation = {};\n removedKeys.forEach((key) => {\n const fallbackTarget = visualElement.getBaseTarget(key);\n const motionValue2 = visualElement.getValue(key);\n if (motionValue2)\n motionValue2.liveStyle = true;\n fallbackAnimation[key] = fallbackTarget !== null && fallbackTarget !== void 0 ? fallbackTarget : null;\n });\n animations2.push({ animation: fallbackAnimation });\n }\n let shouldAnimate = Boolean(animations2.length);\n if (isInitialRender && (props.initial === false || props.initial === props.animate) && !visualElement.manuallyAnimateOnMount) {\n shouldAnimate = false;\n }\n isInitialRender = false;\n return shouldAnimate ? animate2(animations2) : Promise.resolve();\n }\n function setActive(type, isActive) {\n var _a;\n if (state2[type].isActive === isActive)\n return Promise.resolve();\n (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach((child) => {\n var _a2;\n return (_a2 = child.animationState) === null || _a2 === void 0 ? void 0 : _a2.setActive(type, isActive);\n });\n state2[type].isActive = isActive;\n const animations2 = animateChanges(type);\n for (const key in state2) {\n state2[key].protectedKeys = {};\n }\n return animations2;\n }\n return {\n animateChanges,\n setActive,\n setAnimateFunction,\n getState: () => state2,\n reset: () => {\n state2 = createState();\n isInitialRender = true;\n }\n };\n}\nfunction checkVariantsDidChange(prev, next) {\n if (typeof next === \"string\") {\n return next !== prev;\n } else if (Array.isArray(next)) {\n return !shallowCompare(next, prev);\n }\n return false;\n}\nfunction createTypeState(isActive = false) {\n return {\n isActive,\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {}\n };\n}\nfunction createState() {\n return {\n animate: createTypeState(true),\n whileInView: createTypeState(),\n whileHover: createTypeState(),\n whileTap: createTypeState(),\n whileDrag: createTypeState(),\n whileFocus: createTypeState(),\n exit: createTypeState()\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/motion/features/Feature.mjs\nvar Feature = class {\n constructor(node) {\n this.isMounted = false;\n this.node = node;\n }\n update() {\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/motion/features/animation/index.mjs\nvar AnimationFeature = class extends Feature {\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 constructor(node) {\n super(node);\n node.animationState || (node.animationState = createAnimationState(node));\n }\n updateAnimationControlsSubscription() {\n const { animate: animate2 } = this.node.getProps();\n if (isAnimationControls(animate2)) {\n this.unmountControls = animate2.subscribe(this.node);\n }\n }\n /**\n * Subscribe any provided AnimationControls to the component's VisualElement\n */\n mount() {\n this.updateAnimationControlsSubscription();\n }\n update() {\n const { animate: animate2 } = this.node.getProps();\n const { animate: prevAnimate } = this.node.prevProps || {};\n if (animate2 !== prevAnimate) {\n this.updateAnimationControlsSubscription();\n }\n }\n unmount() {\n var _a;\n this.node.animationState.reset();\n (_a = this.unmountControls) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs\nvar id = 0;\nvar ExitAnimationFeature = class extends Feature {\n constructor() {\n super(...arguments);\n this.id = id++;\n }\n update() {\n if (!this.node.presenceContext)\n return;\n const { isPresent: isPresent2, onExitComplete } = this.node.presenceContext;\n const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {};\n if (!this.node.animationState || isPresent2 === prevIsPresent) {\n return;\n }\n const exitAnimation = this.node.animationState.setActive(\"exit\", !isPresent2);\n if (onExitComplete && !isPresent2) {\n exitAnimation.then(() => onExitComplete(this.id));\n }\n }\n mount() {\n const { register } = this.node.presenceContext || {};\n if (register) {\n this.unmount = register(this.id);\n }\n }\n unmount() {\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/motion/features/animations.mjs\nvar animations = {\n animation: {\n Feature: AnimationFeature\n },\n exit: {\n Feature: ExitAnimationFeature\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/events/utils/is-primary-pointer.mjs\nvar isPrimaryPointer = (event) => {\n if (event.pointerType === \"mouse\") {\n return typeof event.button !== \"number\" || event.button <= 0;\n } else {\n return event.isPrimary !== false;\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/events/event-info.mjs\nfunction extractEventInfo(event, pointType = \"page\") {\n return {\n point: {\n x: event[`${pointType}X`],\n y: event[`${pointType}Y`]\n }\n };\n}\nvar addPointerInfo = (handler) => {\n return (event) => isPrimaryPointer(event) && handler(event, extractEventInfo(event));\n};\n\n// ../../../node_modules/framer-motion/dist/es/events/add-dom-event.mjs\nfunction addDomEvent(target, eventName, handler, options = { passive: true }) {\n target.addEventListener(eventName, handler, options);\n return () => target.removeEventListener(eventName, handler);\n}\n\n// ../../../node_modules/framer-motion/dist/es/events/add-pointer-event.mjs\nfunction addPointerEvent(target, eventName, handler, options) {\n return addDomEvent(target, eventName, addPointerInfo(handler), options);\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/distance.mjs\nvar distance = (a, b) => Math.abs(a - b);\nfunction distance2D(a, b) {\n const xDelta = distance(a.x, b.x);\n const yDelta = distance(a.y, b.y);\n return Math.sqrt(xDelta ** 2 + yDelta ** 2);\n}\n\n// ../../../node_modules/framer-motion/dist/es/gestures/drag/utils/lock.mjs\nfunction createLock(name) {\n let lock = null;\n return () => {\n const openLock = () => {\n lock = null;\n };\n if (lock === null) {\n lock = name;\n return openLock;\n }\n return false;\n };\n}\nvar globalHorizontalLock = createLock(\"dragHorizontal\");\nvar globalVerticalLock = createLock(\"dragVertical\");\nfunction getGlobalLock(drag2) {\n let lock = false;\n if (drag2 === \"y\") {\n lock = globalVerticalLock();\n } else if (drag2 === \"x\") {\n lock = globalHorizontalLock();\n } else {\n const openHorizontal = globalHorizontalLock();\n const openVertical = globalVerticalLock();\n if (openHorizontal && openVertical) {\n lock = () => {\n openHorizontal();\n openVertical();\n };\n } else {\n if (openHorizontal)\n openHorizontal();\n if (openVertical)\n openVertical();\n }\n }\n return lock;\n}\nfunction isDragActive() {\n const openGestureLock = getGlobalLock(true);\n if (!openGestureLock)\n return true;\n openGestureLock();\n return false;\n}\n\n// ../../../node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs\nvar SCALE_PRECISION = 1e-4;\nvar SCALE_MIN = 1 - SCALE_PRECISION;\nvar SCALE_MAX = 1 + SCALE_PRECISION;\nvar TRANSLATE_PRECISION = 0.01;\nvar TRANSLATE_MIN = 0 - TRANSLATE_PRECISION;\nvar TRANSLATE_MAX = 0 + TRANSLATE_PRECISION;\nfunction calcLength(axis) {\n return axis.max - axis.min;\n}\nfunction isNear(value, target, maxDistance) {\n return Math.abs(value - target) <= maxDistance;\n}\nfunction calcAxisDelta(delta, source, target, origin = 0.5) {\n delta.origin = origin;\n delta.originPoint = mixNumber(source.min, source.max, delta.origin);\n delta.scale = calcLength(target) / calcLength(source);\n delta.translate = mixNumber(target.min, target.max, delta.origin) - delta.originPoint;\n if (delta.scale >= SCALE_MIN && delta.scale <= SCALE_MAX || isNaN(delta.scale)) {\n delta.scale = 1;\n }\n if (delta.translate >= TRANSLATE_MIN && delta.translate <= TRANSLATE_MAX || isNaN(delta.translate)) {\n delta.translate = 0;\n }\n}\nfunction calcBoxDelta(delta, source, target, origin) {\n calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : void 0);\n calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : void 0);\n}\nfunction calcRelativeAxis(target, relative, parent) {\n target.min = parent.min + relative.min;\n target.max = target.min + calcLength(relative);\n}\nfunction calcRelativeBox(target, relative, parent) {\n calcRelativeAxis(target.x, relative.x, parent.x);\n calcRelativeAxis(target.y, relative.y, parent.y);\n}\nfunction calcRelativeAxisPosition(target, layout2, parent) {\n target.min = layout2.min - parent.min;\n target.max = target.min + calcLength(layout2);\n}\nfunction calcRelativePosition(target, layout2, parent) {\n calcRelativeAxisPosition(target.x, layout2.x, parent.x);\n calcRelativeAxisPosition(target.y, layout2.y, parent.y);\n}\n\n// ../../../node_modules/framer-motion/dist/es/projection/geometry/models.mjs\nvar createAxisDelta = () => ({\n translate: 0,\n scale: 1,\n origin: 0,\n originPoint: 0\n});\nvar createDelta = () => ({\n x: createAxisDelta(),\n y: createAxisDelta()\n});\nvar createAxis = () => ({ min: 0, max: 0 });\nvar createBox = () => ({\n x: createAxis(),\n y: createAxis()\n});\n\n// ../../../node_modules/framer-motion/dist/es/context/PresenceContext.mjs\nimport { createContext } from \"react\";\nvar PresenceContext = createContext(null);\n\n// ../../../node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs\nimport { useContext, useId, useEffect, useCallback } from \"react\";\nfunction usePresence() {\n const context = useContext(PresenceContext);\n if (context === null)\n return [true, null];\n const { isPresent: isPresent2, onExitComplete, register } = context;\n const id4 = useId();\n useEffect(() => register(id4), []);\n const safeToRemove = useCallback(() => onExitComplete && onExitComplete(id4), [id4, onExitComplete]);\n return !isPresent2 && onExitComplete ? [false, safeToRemove] : [true];\n}\nfunction useIsPresent() {\n return isPresent(useContext(PresenceContext));\n}\nfunction isPresent(context) {\n return context === null ? true : context.isPresent;\n}\n\n// ../../../node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs\nimport { createContext as createContext2 } from \"react\";\nvar LayoutGroupContext = createContext2({});\n\n// ../../../node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs\nimport { createContext as createContext3 } from \"react\";\nvar SwitchLayoutGroupContext = createContext3({});\n\n// ../../../node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs\nvar scaleCorrectors = {};\nfunction addScaleCorrector(correctors) {\n Object.assign(scaleCorrectors, correctors);\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs\nvar compareByDepth = (a, b) => a.depth - b.depth;\n\n// ../../../node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs\nvar FlatTree = class {\n constructor() {\n this.children = [];\n this.isDirty = false;\n }\n add(child) {\n addUniqueItem(this.children, child);\n this.isDirty = true;\n }\n remove(child) {\n removeItem(this.children, child);\n this.isDirty = true;\n }\n forEach(callback) {\n this.isDirty && this.children.sort(compareByDepth);\n this.isDirty = false;\n this.children.forEach(callback);\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs\nfunction resolveMotionValue(value) {\n const unwrappedValue = isMotionValue(value) ? value.get() : value;\n return isCustomValue(unwrappedValue) ? unwrappedValue.toValue() : unwrappedValue;\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/delay.mjs\nfunction delay(callback, timeout) {\n const start = time.now();\n const checkElapsed = ({ timestamp }) => {\n const elapsed = timestamp - start;\n if (elapsed >= timeout) {\n cancelFrame(checkElapsed);\n callback(elapsed - timeout);\n }\n };\n frame.read(checkElapsed, true);\n return () => cancelFrame(checkElapsed);\n}\n\n// ../../../node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs\nimport { createContext as createContext4 } from \"react\";\nvar MotionConfigContext = createContext4({\n transformPagePoint: (p) => p,\n isStatic: false,\n reducedMotion: \"never\"\n});\n\n// ../../../node_modules/framer-motion/dist/es/context/MotionContext/index.mjs\nimport { createContext as createContext5 } from \"react\";\nvar MotionContext = createContext5({});\n\n// ../../../node_modules/framer-motion/dist/es/utils/is-browser.mjs\nvar isBrowser = typeof window !== \"undefined\";\n\n// ../../../node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs\nimport { useLayoutEffect, useEffect as useEffect2 } from \"react\";\nvar useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect2;\n\n// ../../../node_modules/framer-motion/dist/es/motion/index.mjs\nimport { jsxs, jsx } from \"react/jsx-runtime\";\nimport { forwardRef, useContext as useContext4 } from \"react\";\n\n// ../../../node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs\nimport { useContext as useContext2, useRef, useInsertionEffect, useEffect as useEffect3 } from \"react\";\n\n// ../../../node_modules/framer-motion/dist/es/context/LazyContext.mjs\nimport { createContext as createContext6 } from \"react\";\nvar LazyContext = createContext6({ strict: false });\n\n// ../../../node_modules/framer-motion/dist/es/frameloop/microtask.mjs\nvar { schedule: microtask, cancel: cancelMicrotask } = createRenderBatcher(queueMicrotask, false);\n\n// ../../../node_modules/framer-motion/dist/es/utils/is-ref-object.mjs\nfunction isRefObject(ref) {\n return ref && typeof ref === \"object\" && Object.prototype.hasOwnProperty.call(ref, \"current\");\n}\n\n// ../../../node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs\nfunction useVisualElement(Component3, visualState, props, createVisualElement, ProjectionNodeConstructor) {\n var _a, _b;\n const { visualElement: parent } = useContext2(MotionContext);\n const lazyContext = useContext2(LazyContext);\n const presenceContext = useContext2(PresenceContext);\n const reducedMotionConfig = useContext2(MotionConfigContext).reducedMotion;\n const visualElementRef = useRef();\n createVisualElement = createVisualElement || lazyContext.renderer;\n if (!visualElementRef.current && createVisualElement) {\n visualElementRef.current = createVisualElement(Component3, {\n visualState,\n parent,\n props,\n presenceContext,\n blockInitialAnimation: presenceContext ? presenceContext.initial === false : false,\n reducedMotionConfig\n });\n }\n const visualElement = visualElementRef.current;\n const initialLayoutGroupConfig = useContext2(SwitchLayoutGroupContext);\n if (visualElement && !visualElement.projection && ProjectionNodeConstructor && (visualElement.type === \"html\" || visualElement.type === \"svg\")) {\n createProjectionNode(visualElementRef.current, props, ProjectionNodeConstructor, initialLayoutGroupConfig);\n }\n useInsertionEffect(() => {\n visualElement && visualElement.update(props, presenceContext);\n });\n const optimisedAppearId = props[optimizedAppearDataAttribute];\n const wantsHandoff = useRef(Boolean(optimisedAppearId) && !((_a = window.MotionHandoffIsComplete) === null || _a === void 0 ? void 0 : _a.call(window, optimisedAppearId)) && ((_b = window.MotionHasOptimisedAnimation) === null || _b === void 0 ? void 0 : _b.call(window, optimisedAppearId)));\n useIsomorphicLayoutEffect(() => {\n if (!visualElement)\n return;\n window.MotionIsMounted = true;\n visualElement.updateFeatures();\n microtask.render(visualElement.render);\n if (wantsHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n });\n useEffect3(() => {\n if (!visualElement)\n return;\n if (!wantsHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n if (wantsHandoff.current) {\n queueMicrotask(() => {\n var _a2;\n (_a2 = window.MotionHandoffMarkAsComplete) === null || _a2 === void 0 ? void 0 : _a2.call(window, optimisedAppearId);\n });\n wantsHandoff.current = false;\n }\n });\n return visualElement;\n}\nfunction createProjectionNode(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) {\n const { layoutId, layout: layout2, drag: drag2, dragConstraints, layoutScroll, layoutRoot } = props;\n visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props[\"data-framer-portal-id\"] ? void 0 : getClosestProjectingNode(visualElement.parent));\n visualElement.projection.setOptions({\n layoutId,\n layout: layout2,\n alwaysMeasureLayout: Boolean(drag2) || dragConstraints && isRefObject(dragConstraints),\n visualElement,\n /**\n * TODO: Update options in an effect. This could be tricky as it'll be too late\n * to update by the time layout animations run.\n * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,\n * ensuring it gets called if there's no potential layout animations.\n *\n */\n animationType: typeof layout2 === \"string\" ? layout2 : \"both\",\n initialPromotionConfig,\n layoutScroll,\n layoutRoot\n });\n}\nfunction getClosestProjectingNode(visualElement) {\n if (!visualElement)\n return void 0;\n return visualElement.options.allowProjection !== false ? visualElement.projection : getClosestProjectingNode(visualElement.parent);\n}\n\n// ../../../node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs\nimport { useCallback as useCallback2 } from \"react\";\nfunction useMotionRef(visualState, visualElement, externalRef) {\n return useCallback2(\n (instance) => {\n instance && visualState.mount && visualState.mount(instance);\n if (visualElement) {\n if (instance) {\n visualElement.mount(instance);\n } else {\n 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}\n\n// ../../../node_modules/framer-motion/dist/es/context/MotionContext/create.mjs\nimport { useContext as useContext3, useMemo } from \"react\";\n\n// ../../../node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs\nfunction isControllingVariants(props) {\n return isAnimationControls(props.animate) || variantProps.some((name) => isVariantLabel(props[name]));\n}\nfunction isVariantNode(props) {\n return Boolean(isControllingVariants(props) || props.variants);\n}\n\n// ../../../node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs\nfunction getCurrentTreeVariants(props, context) {\n if (isControllingVariants(props)) {\n const { initial, animate: animate2 } = props;\n return {\n initial: initial === false || isVariantLabel(initial) ? initial : void 0,\n animate: isVariantLabel(animate2) ? animate2 : void 0\n };\n }\n return props.inherit !== false ? context : {};\n}\n\n// ../../../node_modules/framer-motion/dist/es/context/MotionContext/create.mjs\nfunction useCreateMotionContext(props) {\n const { initial, animate: animate2 } = getCurrentTreeVariants(props, useContext3(MotionContext));\n return useMemo(() => ({ initial, animate: animate2 }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate2)]);\n}\nfunction variantLabelsAsDependency(prop) {\n return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\n\n// ../../../node_modules/framer-motion/dist/es/motion/features/definitions.mjs\nvar featureProps = {\n animation: [\n \"animate\",\n \"variants\",\n \"whileHover\",\n \"whileTap\",\n \"exit\",\n \"whileInView\",\n \"whileFocus\",\n \"whileDrag\"\n ],\n exit: [\"exit\"],\n drag: [\"drag\", \"dragControls\"],\n focus: [\"whileFocus\"],\n hover: [\"whileHover\", \"onHoverStart\", \"onHoverEnd\"],\n tap: [\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"],\n pan: [\"onPan\", \"onPanStart\", \"onPanSessionStart\", \"onPanEnd\"],\n inView: [\"whileInView\", \"onViewportEnter\", \"onViewportLeave\"],\n layout: [\"layout\", \"layoutId\"]\n};\nvar featureDefinitions = {};\nfor (const key in featureProps) {\n featureDefinitions[key] = {\n isEnabled: (props) => featureProps[key].some((name) => !!props[name])\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/motion/features/load-features.mjs\nfunction loadFeatures(features) {\n for (const key in features) {\n featureDefinitions[key] = {\n ...featureDefinitions[key],\n ...features[key]\n };\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/motion/utils/symbol.mjs\nvar motionComponentSymbol = Symbol.for(\"motionComponentSymbol\");\n\n// ../../../node_modules/framer-motion/dist/es/motion/index.mjs\nfunction createRendererMotionComponent({ preloadedFeatures, createVisualElement, useRender, useVisualState: useVisualState2, Component: Component3 }) {\n preloadedFeatures && loadFeatures(preloadedFeatures);\n function MotionComponent(props, externalRef) {\n let MeasureLayout2;\n const configAndProps = {\n ...useContext4(MotionConfigContext),\n ...props,\n layoutId: useLayoutId(props)\n };\n const { isStatic } = configAndProps;\n const context = useCreateMotionContext(props);\n const visualState = useVisualState2(props, isStatic);\n if (!isStatic && isBrowser) {\n useStrictMode(configAndProps, preloadedFeatures);\n const layoutProjection = getProjectionFunctionality(configAndProps);\n MeasureLayout2 = layoutProjection.MeasureLayout;\n context.visualElement = useVisualElement(Component3, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode);\n }\n return jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout2 && context.visualElement ? jsx(MeasureLayout2, { visualElement: context.visualElement, ...configAndProps }) : null, useRender(Component3, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, context.visualElement)] });\n }\n const ForwardRefMotionComponent = forwardRef(MotionComponent);\n ForwardRefMotionComponent[motionComponentSymbol] = Component3;\n return ForwardRefMotionComponent;\n}\nfunction useLayoutId({ layoutId }) {\n const layoutGroupId = useContext4(LayoutGroupContext).id;\n return layoutGroupId && layoutId !== void 0 ? layoutGroupId + \"-\" + layoutId : layoutId;\n}\nfunction useStrictMode(configAndProps, preloadedFeatures) {\n const isStrict = useContext4(LazyContext).strict;\n if (false) {\n const strictMessage = \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\";\n configAndProps.ignoreStrict ? warning(false, strictMessage) : invariant(false, strictMessage);\n }\n}\nfunction getProjectionFunctionality(props) {\n const { drag: drag2, layout: layout2 } = featureDefinitions;\n if (!drag2 && !layout2)\n return {};\n const combined = { ...drag2, ...layout2 };\n return {\n MeasureLayout: (drag2 === null || drag2 === void 0 ? void 0 : drag2.isEnabled(props)) || (layout2 === null || layout2 === void 0 ? void 0 : layout2.isEnabled(props)) ? combined.MeasureLayout : void 0,\n ProjectionNode: combined.ProjectionNode\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs\nimport { useContext as useContext5 } from \"react\";\n\n// ../../../node_modules/framer-motion/dist/es/utils/use-constant.mjs\nimport { useRef as useRef2 } from \"react\";\nfunction useConstant(init) {\n const ref = useRef2(null);\n if (ref.current === null) {\n ref.current = init();\n }\n return ref.current;\n}\n\n// ../../../node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs\nfunction makeState({ applyWillChange = false, scrapeMotionValuesFromProps: scrapeMotionValuesFromProps3, createRenderState, onMount }, props, context, presenceContext, isStatic) {\n const state2 = {\n latestValues: makeLatestValues(props, context, presenceContext, isStatic ? false : applyWillChange, scrapeMotionValuesFromProps3),\n renderState: createRenderState()\n };\n if (onMount) {\n state2.mount = (instance) => onMount(props, instance, state2);\n }\n return state2;\n}\nvar makeUseVisualState = (config) => (props, isStatic) => {\n const context = useContext5(MotionContext);\n const presenceContext = useContext5(PresenceContext);\n const make = () => makeState(config, props, context, presenceContext, isStatic);\n return isStatic ? make() : useConstant(make);\n};\nfunction forEachDefinition(props, definition, callback) {\n const list = Array.isArray(definition) ? definition : [definition];\n for (let i = 0; i < list.length; i++) {\n const resolved = resolveVariantFromProps(props, list[i]);\n if (resolved) {\n const { transitionEnd, transition, ...target } = resolved;\n callback(target, transitionEnd);\n }\n }\n}\nfunction makeLatestValues(props, context, presenceContext, shouldApplyWillChange, scrapeMotionValues) {\n var _a;\n const values = {};\n let applyWillChange = shouldApplyWillChange && ((_a = props.style) === null || _a === void 0 ? void 0 : _a.willChange) === void 0;\n const motionValues = scrapeMotionValues(props, {});\n for (const key in motionValues) {\n values[key] = resolveMotionValue(motionValues[key]);\n }\n let { initial, animate: animate2 } = props;\n const isControllingVariants$1 = isControllingVariants(props);\n const isVariantNode$1 = isVariantNode(props);\n if (context && isVariantNode$1 && !isControllingVariants$1 && props.inherit !== false) {\n if (initial === void 0)\n initial = context.initial;\n if (animate2 === void 0)\n animate2 = context.animate;\n }\n let isInitialAnimationBlocked = presenceContext ? presenceContext.initial === false : false;\n isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false;\n const variantToSet = isInitialAnimationBlocked ? animate2 : initial;\n if (variantToSet && typeof variantToSet !== \"boolean\" && !isAnimationControls(variantToSet)) {\n forEachDefinition(props, variantToSet, (target, transitionEnd) => {\n for (const key in target) {\n let valueTarget = target[key];\n if (Array.isArray(valueTarget)) {\n const index = isInitialAnimationBlocked ? valueTarget.length - 1 : 0;\n valueTarget = valueTarget[index];\n }\n if (valueTarget !== null) {\n values[key] = valueTarget;\n }\n }\n for (const key in transitionEnd) {\n values[key] = transitionEnd[key];\n }\n });\n }\n if (applyWillChange) {\n if (animate2 && initial !== false && !isAnimationControls(animate2)) {\n forEachDefinition(props, animate2, (target) => {\n for (const key in target) {\n const willChangeName = getWillChangeName(key);\n if (willChangeName) {\n values.willChange = \"transform\";\n return;\n }\n }\n });\n }\n }\n return values;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs\nvar getValueAsType = (value, type) => {\n return type && typeof value === \"number\" ? type.transform(value) : value;\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs\nvar translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\"\n};\nvar numTransforms = transformPropOrder.length;\nfunction buildTransform(latestValues, transform2, transformTemplate) {\n let transformString = \"\";\n let transformIsDefault = true;\n for (let i = 0; i < numTransforms; i++) {\n const key = transformPropOrder[i];\n const value = latestValues[key];\n if (value === void 0)\n continue;\n let valueIsDefault = true;\n if (typeof value === \"number\") {\n valueIsDefault = value === (key.startsWith(\"scale\") ? 1 : 0);\n } else {\n valueIsDefault = parseFloat(value) === 0;\n }\n if (!valueIsDefault || transformTemplate) {\n const valueAsType = getValueAsType(value, numberValueTypes[key]);\n if (!valueIsDefault) {\n transformIsDefault = false;\n const transformName = translateAlias[key] || key;\n transformString += `${transformName}(${valueAsType}) `;\n }\n if (transformTemplate) {\n transform2[key] = valueAsType;\n }\n }\n }\n transformString = transformString.trim();\n if (transformTemplate) {\n transformString = transformTemplate(transform2, transformIsDefault ? \"\" : transformString);\n } else if (transformIsDefault) {\n transformString = \"none\";\n }\n return transformString;\n}\n\n// ../../../node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs\nvar validMotionProps = /* @__PURE__ */ new Set([\n \"animate\",\n \"exit\",\n \"variants\",\n \"initial\",\n \"style\",\n \"values\",\n \"variants\",\n \"transition\",\n \"transformTemplate\",\n \"custom\",\n \"inherit\",\n \"onBeforeLayoutMeasure\",\n \"onAnimationStart\",\n \"onAnimationComplete\",\n \"onUpdate\",\n \"onDragStart\",\n \"onDrag\",\n \"onDragEnd\",\n \"onMeasureDragConstraints\",\n \"onDirectionLock\",\n \"onDragTransitionEnd\",\n \"_dragX\",\n \"_dragY\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n \"globalTapTarget\",\n \"ignoreStrict\",\n \"viewport\"\n]);\nfunction isValidMotionProp(key) {\n return key.startsWith(\"while\") || key.startsWith(\"drag\") && key !== \"draggable\" || key.startsWith(\"layout\") || key.startsWith(\"onTap\") || key.startsWith(\"onPan\") || key.startsWith(\"onLayout\") || validMotionProps.has(key);\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs\nvar shouldForward = (key) => !isValidMotionProp(key);\nfunction loadExternalIsValidProp(isValidProp) {\n if (!isValidProp)\n return;\n shouldForward = (key) => key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key);\n}\ntry {\n loadExternalIsValidProp(require_is_prop_valid_browser_cjs().default);\n} catch (_a) {\n}\nfunction filterProps(props, isDom, forwardMotionProps) {\n const filteredProps = {};\n for (const key in props) {\n if (key === \"values\" && typeof props.values === \"object\")\n continue;\n if (shouldForward(key) || forwardMotionProps === true && isValidMotionProp(key) || !isDom && !isValidMotionProp(key) || // If trying to use native HTML drag events, forward drag listeners\n props[\"draggable\"] && key.startsWith(\"onDrag\")) {\n filteredProps[key] = props[key];\n }\n }\n return filteredProps;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/store.mjs\nvar visualElementStore = /* @__PURE__ */ new WeakMap();\n\n// ../../../node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs\nvar prefersReducedMotion = { current: null };\nvar hasReducedMotionListener = { current: false };\n\n// ../../../node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs\nfunction initPrefersReducedMotion() {\n hasReducedMotionListener.current = true;\n if (!isBrowser)\n return;\n if (window.matchMedia) {\n const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\");\n const setReducedMotionPreferences = () => prefersReducedMotion.current = motionMediaQuery.matches;\n motionMediaQuery.addListener(setReducedMotionPreferences);\n setReducedMotionPreferences();\n } else {\n prefersReducedMotion.current = false;\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/utils/motion-values.mjs\nfunction updateMotionValuesFromProps(element, next, prev) {\n for (const key in next) {\n const nextValue = next[key];\n const prevValue = prev[key];\n if (isMotionValue(nextValue)) {\n element.addValue(key, nextValue);\n if (false) {\n warnOnce(nextValue.version === \"11.11.7\", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.11.7 may not work as expected.`);\n }\n } else if (isMotionValue(prevValue)) {\n element.addValue(key, motionValue(nextValue, { owner: element }));\n } else if (prevValue !== nextValue) {\n if (element.hasValue(key)) {\n const existingValue = element.getValue(key);\n if (existingValue.liveStyle === true) {\n existingValue.jump(nextValue);\n } else if (!existingValue.hasAnimated) {\n existingValue.set(nextValue);\n }\n } else {\n const latestValue = element.getStaticValue(key);\n element.addValue(key, motionValue(latestValue !== void 0 ? latestValue : nextValue, { owner: element }));\n }\n }\n }\n for (const key in prev) {\n if (next[key] === void 0)\n element.removeValue(key);\n }\n return next;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs\nvar valueTypes = [...dimensionValueTypes, color, complex];\nvar findValueType = (v) => valueTypes.find(testValueType(v));\n\n// ../../../node_modules/framer-motion/dist/es/render/VisualElement.mjs\nvar propEventHandlers = [\n \"AnimationStart\",\n \"AnimationComplete\",\n \"Update\",\n \"BeforeLayoutMeasure\",\n \"LayoutMeasure\",\n \"LayoutAnimationStart\",\n \"LayoutAnimationComplete\"\n];\nvar VisualElement = class {\n /**\n * This method takes React props and returns found MotionValues. For example, HTML\n * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n *\n * This isn't an abstract method as it needs calling in the constructor, but it is\n * intended to be one.\n */\n scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) {\n return {};\n }\n constructor({ parent, props, presenceContext, reducedMotionConfig, blockInitialAnimation, visualState }, options = {}) {\n this.applyWillChange = false;\n this.current = null;\n this.children = /* @__PURE__ */ new Set();\n this.isVariantNode = false;\n this.isControllingVariants = false;\n this.shouldReduceMotion = null;\n this.values = /* @__PURE__ */ new Map();\n this.KeyframeResolver = KeyframeResolver;\n this.features = {};\n this.valueSubscriptions = /* @__PURE__ */ new Map();\n this.prevMotionValues = {};\n this.events = {};\n this.propEventSubscriptions = {};\n this.notifyUpdate = () => this.notify(\"Update\", this.latestValues);\n this.render = () => {\n if (!this.current)\n return;\n this.triggerBuild();\n this.renderInstance(this.current, this.renderState, this.props.style, this.projection);\n };\n this.renderScheduledAt = 0;\n this.scheduleRender = () => {\n const now2 = time.now();\n if (this.renderScheduledAt < now2) {\n this.renderScheduledAt = now2;\n frame.render(this.render, false, true);\n }\n };\n const { latestValues, renderState } = visualState;\n this.latestValues = latestValues;\n this.baseTarget = { ...latestValues };\n this.initialValues = props.initial ? { ...latestValues } : {};\n this.renderState = renderState;\n this.parent = parent;\n this.props = props;\n this.presenceContext = presenceContext;\n this.depth = parent ? parent.depth + 1 : 0;\n this.reducedMotionConfig = reducedMotionConfig;\n this.options = options;\n this.blockInitialAnimation = Boolean(blockInitialAnimation);\n this.isControllingVariants = isControllingVariants(props);\n this.isVariantNode = isVariantNode(props);\n if (this.isVariantNode) {\n this.variantChildren = /* @__PURE__ */ new Set();\n }\n this.manuallyAnimateOnMount = Boolean(parent && parent.current);\n const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this);\n for (const key in initialMotionValues) {\n const value = initialMotionValues[key];\n if (latestValues[key] !== void 0 && isMotionValue(value)) {\n value.set(latestValues[key], false);\n }\n }\n }\n mount(instance) {\n this.current = instance;\n visualElementStore.set(instance, this);\n if (this.projection && !this.projection.instance) {\n this.projection.mount(instance);\n }\n if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n this.removeFromVariantTree = this.parent.addVariantChild(this);\n }\n this.values.forEach((value, key) => this.bindToMotionValue(key, value));\n if (!hasReducedMotionListener.current) {\n initPrefersReducedMotion();\n }\n this.shouldReduceMotion = this.reducedMotionConfig === \"never\" ? false : this.reducedMotionConfig === \"always\" ? true : prefersReducedMotion.current;\n if (false) {\n warnOnce(this.shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\");\n }\n if (this.parent)\n this.parent.children.add(this);\n this.update(this.props, this.presenceContext);\n }\n unmount() {\n visualElementStore.delete(this.current);\n this.projection && this.projection.unmount();\n cancelFrame(this.notifyUpdate);\n cancelFrame(this.render);\n this.valueSubscriptions.forEach((remove) => remove());\n this.valueSubscriptions.clear();\n this.removeFromVariantTree && this.removeFromVariantTree();\n this.parent && this.parent.children.delete(this);\n for (const key in this.events) {\n this.events[key].clear();\n }\n for (const key in this.features) {\n const feature = this.features[key];\n if (feature) {\n feature.unmount();\n feature.isMounted = false;\n }\n }\n this.current = null;\n }\n bindToMotionValue(key, value) {\n if (this.valueSubscriptions.has(key)) {\n this.valueSubscriptions.get(key)();\n }\n const valueIsTransform = transformProps.has(key);\n const removeOnChange = value.on(\"change\", (latestValue) => {\n this.latestValues[key] = latestValue;\n this.props.onUpdate && frame.preRender(this.notifyUpdate);\n if (valueIsTransform && this.projection) {\n this.projection.isTransformDirty = true;\n }\n });\n const removeOnRenderRequest = value.on(\"renderRequest\", this.scheduleRender);\n let removeSyncCheck;\n if (window.MotionCheckAppearSync) {\n removeSyncCheck = window.MotionCheckAppearSync(this, key, value);\n }\n this.valueSubscriptions.set(key, () => {\n removeOnChange();\n removeOnRenderRequest();\n if (removeSyncCheck)\n removeSyncCheck();\n if (value.owner)\n value.stop();\n });\n }\n sortNodePosition(other) {\n if (!this.current || !this.sortInstanceNodePosition || this.type !== other.type) {\n return 0;\n }\n return this.sortInstanceNodePosition(this.current, other.current);\n }\n updateFeatures() {\n let key = \"animation\";\n for (key in featureDefinitions) {\n const featureDefinition = featureDefinitions[key];\n if (!featureDefinition)\n continue;\n const { isEnabled, Feature: FeatureConstructor } = featureDefinition;\n if (!this.features[key] && FeatureConstructor && isEnabled(this.props)) {\n this.features[key] = new FeatureConstructor(this);\n }\n if (this.features[key]) {\n const feature = this.features[key];\n if (feature.isMounted) {\n feature.update();\n } else {\n feature.mount();\n feature.isMounted = true;\n }\n }\n }\n }\n triggerBuild() {\n this.build(this.renderState, this.latestValues, this.props);\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() {\n return this.current ? this.measureInstanceViewportBox(this.current, this.props) : createBox();\n }\n getStaticValue(key) {\n return this.latestValues[key];\n }\n setStaticValue(key, value) {\n this.latestValues[key] = value;\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 update(props, presenceContext) {\n if (props.transformTemplate || this.props.transformTemplate) {\n this.scheduleRender();\n }\n this.prevProps = this.props;\n this.props = props;\n this.prevPresenceContext = this.presenceContext;\n this.presenceContext = presenceContext;\n for (let i = 0; i < propEventHandlers.length; i++) {\n const key = propEventHandlers[i];\n if (this.propEventSubscriptions[key]) {\n this.propEventSubscriptions[key]();\n delete this.propEventSubscriptions[key];\n }\n const listenerName = \"on\" + key;\n const listener = props[listenerName];\n if (listener) {\n this.propEventSubscriptions[key] = this.on(key, listener);\n }\n }\n this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps, this), this.prevMotionValues);\n if (this.handleChildMotionValue) {\n this.handleChildMotionValue();\n }\n }\n getProps() {\n return this.props;\n }\n /**\n * Returns the variant definition with a given name.\n */\n getVariant(name) {\n return this.props.variants ? this.props.variants[name] : void 0;\n }\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition() {\n return this.props.transition;\n }\n getTransformPagePoint() {\n return this.props.transformPagePoint;\n }\n getClosestVariantNode() {\n return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;\n }\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild(child) {\n const closestVariantNode = this.getClosestVariantNode();\n if (closestVariantNode) {\n closestVariantNode.variantChildren && closestVariantNode.variantChildren.add(child);\n return () => closestVariantNode.variantChildren.delete(child);\n }\n }\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue(key, value) {\n const existingValue = this.values.get(key);\n if (value !== existingValue) {\n if (existingValue)\n this.removeValue(key);\n this.bindToMotionValue(key, value);\n this.values.set(key, value);\n this.latestValues[key] = value.get();\n }\n }\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key) {\n this.values.delete(key);\n const unsubscribe = this.valueSubscriptions.get(key);\n if (unsubscribe) {\n unsubscribe();\n this.valueSubscriptions.delete(key);\n }\n delete this.latestValues[key];\n this.removeValueFromRenderState(key, this.renderState);\n }\n /**\n * Check whether we have a motion value for this key\n */\n hasValue(key) {\n return this.values.has(key);\n }\n getValue(key, defaultValue) {\n if (this.props.values && this.props.values[key]) {\n return this.props.values[key];\n }\n let value = this.values.get(key);\n if (value === void 0 && defaultValue !== void 0) {\n value = motionValue(defaultValue === null ? void 0 : defaultValue, { owner: this });\n this.addValue(key, value);\n }\n return value;\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(key, target) {\n var _a;\n let value = this.latestValues[key] !== void 0 || !this.current ? this.latestValues[key] : (_a = this.getBaseTargetFromProps(this.props, key)) !== null && _a !== void 0 ? _a : this.readValueFromInstance(this.current, key, this.options);\n if (value !== void 0 && value !== null) {\n if (typeof value === \"string\" && (isNumericalString(value) || isZeroValueString(value))) {\n value = parseFloat(value);\n } else if (!findValueType(value) && complex.test(target)) {\n value = getAnimatableNone2(key, target);\n }\n this.setBaseTarget(key, isMotionValue(value) ? value.get() : value);\n }\n return isMotionValue(value) ? value.get() : value;\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(key, value) {\n this.baseTarget[key] = value;\n }\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget(key) {\n var _a;\n const { initial } = this.props;\n let valueFromInitial;\n if (typeof initial === \"string\" || typeof initial === \"object\") {\n const variant = resolveVariantFromProps(this.props, initial, (_a = this.presenceContext) === null || _a === void 0 ? void 0 : _a.custom);\n if (variant) {\n valueFromInitial = variant[key];\n }\n }\n if (initial && valueFromInitial !== void 0) {\n return valueFromInitial;\n }\n const target = this.getBaseTargetFromProps(this.props, key);\n if (target !== void 0 && !isMotionValue(target))\n return target;\n return this.initialValues[key] !== void 0 && valueFromInitial === void 0 ? void 0 : this.baseTarget[key];\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n return this.events[eventName].add(callback);\n }\n notify(eventName, ...args) {\n if (this.events[eventName]) {\n this.events[eventName].notify(...args);\n }\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/components/create-proxy.mjs\nfunction createDOMMotionComponentProxy(componentFactory) {\n if (typeof Proxy === \"undefined\") {\n return componentFactory;\n }\n const componentCache = /* @__PURE__ */ new Map();\n const deprecatedFactoryFunction = (...args) => {\n if (false) {\n warnOnce(false, \"motion() is deprecated. Use motion.create() instead.\");\n }\n return componentFactory(...args);\n };\n return new Proxy(deprecatedFactoryFunction, {\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: (_target, key) => {\n if (key === \"create\")\n return componentFactory;\n if (!componentCache.has(key)) {\n componentCache.set(key, componentFactory(key));\n }\n return componentCache.get(key);\n }\n });\n}\n\n// ../../../node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs\nvar PanSession = class {\n constructor(event, handlers, { transformPagePoint, contextWindow, dragSnapToOrigin = false } = {}) {\n this.startEvent = null;\n this.lastMoveEvent = null;\n this.lastMoveEventInfo = null;\n this.handlers = {};\n this.contextWindow = window;\n this.updatePoint = () => {\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const info2 = getPanInfo(this.lastMoveEventInfo, this.history);\n const isPanStarted = this.startEvent !== null;\n const isDistancePastThreshold = distance2D(info2.offset, { x: 0, y: 0 }) >= 3;\n if (!isPanStarted && !isDistancePastThreshold)\n return;\n const { point: point3 } = info2;\n const { timestamp: timestamp2 } = frameData;\n this.history.push({ ...point3, timestamp: timestamp2 });\n const { onStart, onMove } = this.handlers;\n if (!isPanStarted) {\n onStart && onStart(this.lastMoveEvent, info2);\n this.startEvent = this.lastMoveEvent;\n }\n onMove && onMove(this.lastMoveEvent, info2);\n };\n this.handlePointerMove = (event2, info2) => {\n this.lastMoveEvent = event2;\n this.lastMoveEventInfo = transformPoint(info2, this.transformPagePoint);\n frame.update(this.updatePoint, true);\n };\n this.handlePointerUp = (event2, info2) => {\n this.end();\n const { onEnd, onSessionEnd, resumeAnimation } = this.handlers;\n if (this.dragSnapToOrigin)\n resumeAnimation && resumeAnimation();\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const panInfo = getPanInfo(event2.type === \"pointercancel\" ? this.lastMoveEventInfo : transformPoint(info2, this.transformPagePoint), this.history);\n if (this.startEvent && onEnd) {\n onEnd(event2, panInfo);\n }\n onSessionEnd && onSessionEnd(event2, panInfo);\n };\n if (!isPrimaryPointer(event))\n return;\n this.dragSnapToOrigin = dragSnapToOrigin;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n this.contextWindow = contextWindow || window;\n const info = extractEventInfo(event);\n const initialInfo = transformPoint(info, this.transformPagePoint);\n const { point: point2 } = initialInfo;\n const { timestamp } = frameData;\n this.history = [{ ...point2, timestamp }];\n const { onSessionStart } = handlers;\n onSessionStart && onSessionStart(event, getPanInfo(initialInfo, this.history));\n this.removeListeners = pipe(addPointerEvent(this.contextWindow, \"pointermove\", this.handlePointerMove), addPointerEvent(this.contextWindow, \"pointerup\", this.handlePointerUp), addPointerEvent(this.contextWindow, \"pointercancel\", this.handlePointerUp));\n }\n updateHandlers(handlers) {\n this.handlers = handlers;\n }\n end() {\n this.removeListeners && this.removeListeners();\n cancelFrame(this.updatePoint);\n }\n};\nfunction transformPoint(info, transformPagePoint) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info;\n}\nfunction subtractPoint(a, b) {\n return { x: a.x - b.x, y: a.y - b.y };\n}\nfunction getPanInfo({ point: point2 }, history) {\n return {\n point: point2,\n delta: subtractPoint(point2, lastDevicePoint(history)),\n offset: subtractPoint(point2, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1)\n };\n}\nfunction startDevicePoint(history) {\n return history[0];\n}\nfunction lastDevicePoint(history) {\n return history[history.length - 1];\n}\nfunction getVelocity(history, timeDelta) {\n if (history.length < 2) {\n return { x: 0, y: 0 };\n }\n let i = history.length - 1;\n let timestampedPoint = null;\n const lastPoint = lastDevicePoint(history);\n while (i >= 0) {\n timestampedPoint = history[i];\n if (lastPoint.timestamp - timestampedPoint.timestamp > secondsToMilliseconds(timeDelta)) {\n break;\n }\n i--;\n }\n if (!timestampedPoint) {\n return { x: 0, y: 0 };\n }\n const time2 = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp);\n if (time2 === 0) {\n return { x: 0, y: 0 };\n }\n const currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time2,\n y: (lastPoint.y - timestampedPoint.y) / time2\n };\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0;\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0;\n }\n return currentVelocity;\n}\n\n// ../../../node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs\nfunction applyConstraints(point2, { min, max }, elastic) {\n if (min !== void 0 && point2 < min) {\n point2 = elastic ? mixNumber(min, point2, elastic.min) : Math.max(point2, min);\n } else if (max !== void 0 && point2 > max) {\n point2 = elastic ? mixNumber(max, point2, elastic.max) : Math.min(point2, max);\n }\n return point2;\n}\nfunction calcRelativeAxisConstraints(axis, min, max) {\n return {\n min: min !== void 0 ? axis.min + min : void 0,\n max: max !== void 0 ? axis.max + max - (axis.max - axis.min) : void 0\n };\n}\nfunction calcRelativeConstraints(layoutBox, { top, left, bottom, right }) {\n return {\n x: calcRelativeAxisConstraints(layoutBox.x, left, right),\n y: calcRelativeAxisConstraints(layoutBox.y, top, bottom)\n };\n}\nfunction calcViewportAxisConstraints(layoutAxis, constraintsAxis) {\n let min = constraintsAxis.min - layoutAxis.min;\n let max = constraintsAxis.max - layoutAxis.max;\n if (constraintsAxis.max - constraintsAxis.min < layoutAxis.max - layoutAxis.min) {\n [min, max] = [max, min];\n }\n return { min, max };\n}\nfunction calcViewportConstraints(layoutBox, constraintsBox) {\n return {\n x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),\n y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y)\n };\n}\nfunction calcOrigin(source, target) {\n let origin = 0.5;\n const sourceLength = calcLength(source);\n const targetLength = calcLength(target);\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 return clamp(0, 1, origin);\n}\nfunction rebaseAxisConstraints(layout2, constraints) {\n const relativeConstraints = {};\n if (constraints.min !== void 0) {\n relativeConstraints.min = constraints.min - layout2.min;\n }\n if (constraints.max !== void 0) {\n relativeConstraints.max = constraints.max - layout2.min;\n }\n return relativeConstraints;\n}\nvar defaultElastic = 0.35;\nfunction resolveDragElastic(dragElastic = defaultElastic) {\n if (dragElastic === false) {\n dragElastic = 0;\n } else if (dragElastic === true) {\n dragElastic = defaultElastic;\n }\n return {\n x: resolveAxisElastic(dragElastic, \"left\", \"right\"),\n y: resolveAxisElastic(dragElastic, \"top\", \"bottom\")\n };\n}\nfunction resolveAxisElastic(dragElastic, minLabel, maxLabel) {\n return {\n min: resolvePointElastic(dragElastic, minLabel),\n max: resolvePointElastic(dragElastic, maxLabel)\n };\n}\nfunction resolvePointElastic(dragElastic, label) {\n return typeof dragElastic === \"number\" ? dragElastic : dragElastic[label] || 0;\n}\n\n// ../../../node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs\nfunction eachAxis(callback) {\n return [callback(\"x\"), callback(\"y\")];\n}\n\n// ../../../node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs\nfunction convertBoundingBoxToBox({ top, left, right, bottom }) {\n return {\n x: { min: left, max: right },\n y: { min: top, max: bottom }\n };\n}\nfunction convertBoxToBoundingBox({ x, y }) {\n return { top: y.min, right: x.max, bottom: y.max, left: x.min };\n}\nfunction transformBoxPoints(point2, transformPoint2) {\n if (!transformPoint2)\n return point2;\n const topLeft = transformPoint2({ x: point2.left, y: point2.top });\n const bottomRight = transformPoint2({ x: point2.right, y: point2.bottom });\n return {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs\nfunction isIdentityScale(scale2) {\n return scale2 === void 0 || scale2 === 1;\n}\nfunction hasScale({ scale: scale2, scaleX, scaleY }) {\n return !isIdentityScale(scale2) || !isIdentityScale(scaleX) || !isIdentityScale(scaleY);\n}\nfunction hasTransform(values) {\n return hasScale(values) || has2DTranslate(values) || values.z || values.rotate || values.rotateX || values.rotateY || values.skewX || values.skewY;\n}\nfunction has2DTranslate(values) {\n return is2DTranslate(values.x) || is2DTranslate(values.y);\n}\nfunction is2DTranslate(value) {\n return value && value !== \"0%\";\n}\n\n// ../../../node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs\nfunction scalePoint(point2, scale2, originPoint) {\n const distanceFromOrigin = point2 - originPoint;\n const scaled = scale2 * distanceFromOrigin;\n return originPoint + scaled;\n}\nfunction applyPointDelta(point2, translate, scale2, originPoint, boxScale) {\n if (boxScale !== void 0) {\n point2 = scalePoint(point2, boxScale, originPoint);\n }\n return scalePoint(point2, scale2, originPoint) + translate;\n}\nfunction applyAxisDelta(axis, translate = 0, scale2 = 1, originPoint, boxScale) {\n axis.min = applyPointDelta(axis.min, translate, scale2, originPoint, boxScale);\n axis.max = applyPointDelta(axis.max, translate, scale2, originPoint, boxScale);\n}\nfunction applyBoxDelta(box, { x, y }) {\n applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);\n applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);\n}\nvar TREE_SCALE_SNAP_MIN = 0.999999999999;\nvar TREE_SCALE_SNAP_MAX = 1.0000000000001;\nfunction applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {\n const treeLength = treePath.length;\n if (!treeLength)\n return;\n treeScale.x = treeScale.y = 1;\n let node;\n let delta;\n for (let i = 0; i < treeLength; i++) {\n node = treePath[i];\n delta = node.projectionDelta;\n const { visualElement } = node.options;\n if (visualElement && visualElement.props.style && visualElement.props.style.display === \"contents\") {\n continue;\n }\n if (isSharedTransition && node.options.layoutScroll && node.scroll && node !== node.root) {\n transformBox(box, {\n x: -node.scroll.offset.x,\n y: -node.scroll.offset.y\n });\n }\n if (delta) {\n treeScale.x *= delta.x.scale;\n treeScale.y *= delta.y.scale;\n applyBoxDelta(box, delta);\n }\n if (isSharedTransition && hasTransform(node.latestValues)) {\n transformBox(box, node.latestValues);\n }\n }\n if (treeScale.x < TREE_SCALE_SNAP_MAX && treeScale.x > TREE_SCALE_SNAP_MIN) {\n treeScale.x = 1;\n }\n if (treeScale.y < TREE_SCALE_SNAP_MAX && treeScale.y > TREE_SCALE_SNAP_MIN) {\n treeScale.y = 1;\n }\n}\nfunction translateAxis(axis, distance2) {\n axis.min = axis.min + distance2;\n axis.max = axis.max + distance2;\n}\nfunction transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) {\n const originPoint = mixNumber(axis.min, axis.max, axisOrigin);\n applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale);\n}\nfunction transformBox(box, transform2) {\n transformAxis(box.x, transform2.x, transform2.scaleX, transform2.scale, transform2.originX);\n transformAxis(box.y, transform2.y, transform2.scaleY, transform2.scale, transform2.originY);\n}\n\n// ../../../node_modules/framer-motion/dist/es/projection/utils/measure.mjs\nfunction measureViewportBox(instance, transformPoint2) {\n return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint2));\n}\nfunction measurePageBox(element, rootProjectionNode2, transformPagePoint) {\n const viewportBox = measureViewportBox(element, transformPagePoint);\n const { scroll: scroll2 } = rootProjectionNode2;\n if (scroll2) {\n translateAxis(viewportBox.x, scroll2.offset.x);\n translateAxis(viewportBox.y, scroll2.offset.y);\n }\n return viewportBox;\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/get-context-window.mjs\nvar getContextWindow = ({ current }) => {\n return current ? current.ownerDocument.defaultView : null;\n};\n\n// ../../../node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs\nvar elementDragControls = /* @__PURE__ */ new WeakMap();\nvar VisualElementDragControls = class {\n constructor(visualElement) {\n this.openGlobalLock = null;\n this.isDragging = false;\n this.currentDirection = null;\n this.originPoint = { x: 0, y: 0 };\n this.constraints = false;\n this.hasMutatedConstraints = false;\n this.elastic = createBox();\n this.visualElement = visualElement;\n }\n start(originEvent, { snapToCursor = false } = {}) {\n const { presenceContext } = this.visualElement;\n if (presenceContext && presenceContext.isPresent === false)\n return;\n const onSessionStart = (event) => {\n const { dragSnapToOrigin: dragSnapToOrigin2 } = this.getProps();\n dragSnapToOrigin2 ? this.pauseAnimation() : this.stopAnimation();\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event, \"page\").point);\n }\n };\n const onStart = (event, info) => {\n const { drag: drag2, dragPropagation, onDragStart } = this.getProps();\n if (drag2 && !dragPropagation) {\n if (this.openGlobalLock)\n this.openGlobalLock();\n this.openGlobalLock = getGlobalLock(drag2);\n if (!this.openGlobalLock)\n return;\n }\n this.isDragging = true;\n this.currentDirection = null;\n this.resolveConstraints();\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = true;\n this.visualElement.projection.target = void 0;\n }\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0;\n if (percent.test(current)) {\n const { projection } = this.visualElement;\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis];\n if (measuredAxis) {\n const length = calcLength(measuredAxis);\n current = length * (parseFloat(current) / 100);\n }\n }\n }\n this.originPoint[axis] = current;\n });\n if (onDragStart) {\n frame.postRender(() => onDragStart(event, info));\n }\n addValueToWillChange(this.visualElement, \"transform\");\n const { animationState } = this.visualElement;\n animationState && animationState.setActive(\"whileDrag\", true);\n };\n const onMove = (event, info) => {\n const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag } = this.getProps();\n if (!dragPropagation && !this.openGlobalLock)\n return;\n const { offset } = info;\n if (dragDirectionLock && this.currentDirection === null) {\n this.currentDirection = getCurrentDirection(offset);\n if (this.currentDirection !== null) {\n onDirectionLock && onDirectionLock(this.currentDirection);\n }\n return;\n }\n this.updateAxis(\"x\", info.point, offset);\n this.updateAxis(\"y\", info.point, offset);\n this.visualElement.render();\n onDrag && onDrag(event, info);\n };\n const onSessionEnd = (event, info) => this.stop(event, info);\n const resumeAnimation = () => eachAxis((axis) => {\n var _a;\n return this.getAnimationState(axis) === \"paused\" && ((_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.play());\n });\n const { dragSnapToOrigin } = this.getProps();\n this.panSession = new PanSession(originEvent, {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n resumeAnimation\n }, {\n transformPagePoint: this.visualElement.getTransformPagePoint(),\n dragSnapToOrigin,\n contextWindow: getContextWindow(this.visualElement)\n });\n }\n stop(event, info) {\n const isDragging = this.isDragging;\n this.cancel();\n if (!isDragging)\n return;\n const { velocity } = info;\n this.startAnimation(velocity);\n const { onDragEnd } = this.getProps();\n if (onDragEnd) {\n frame.postRender(() => onDragEnd(event, info));\n }\n }\n cancel() {\n this.isDragging = false;\n const { projection, animationState } = this.visualElement;\n if (projection) {\n projection.isAnimationBlocked = false;\n }\n this.panSession && this.panSession.end();\n this.panSession = void 0;\n const { dragPropagation } = this.getProps();\n if (!dragPropagation && this.openGlobalLock) {\n this.openGlobalLock();\n this.openGlobalLock = null;\n }\n animationState && animationState.setActive(\"whileDrag\", false);\n }\n updateAxis(axis, _point, offset) {\n const { drag: drag2 } = this.getProps();\n if (!offset || !shouldDrag(axis, drag2, this.currentDirection))\n return;\n const axisValue = this.getAxisMotionValue(axis);\n let next = this.originPoint[axis] + offset[axis];\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n }\n resolveConstraints() {\n var _a;\n const { dragConstraints, dragElastic } = this.getProps();\n const layout2 = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(false) : (_a = this.visualElement.projection) === null || _a === void 0 ? void 0 : _a.layout;\n const prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n } else {\n if (dragConstraints && layout2) {\n this.constraints = calcRelativeConstraints(layout2.layoutBox, dragConstraints);\n } else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n if (prevConstraints !== this.constraints && layout2 && this.constraints && !this.hasMutatedConstraints) {\n eachAxis((axis) => {\n if (this.constraints !== false && this.getAxisMotionValue(axis)) {\n this.constraints[axis] = rebaseAxisConstraints(layout2.layoutBox[axis], this.constraints[axis]);\n }\n });\n }\n }\n resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();\n if (!constraints || !isRefObject(constraints))\n return false;\n const 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 const { projection } = this.visualElement;\n if (!projection || !projection.layout)\n return false;\n const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);\n if (onMeasureDragConstraints) {\n const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n }\n startAnimation(velocity) {\n const { drag: drag2, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd } = this.getProps();\n const constraints = this.constraints || {};\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag2, this.currentDirection)) {\n return;\n }\n let transition = constraints && constraints[axis] || {};\n if (dragSnapToOrigin)\n transition = { min: 0, max: 0 };\n const bounceStiffness = dragElastic ? 200 : 1e6;\n const bounceDamping = dragElastic ? 40 : 1e7;\n const inertia2 = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition\n };\n return this.startAxisValueAnimation(axis, inertia2);\n });\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n }\n startAxisValueAnimation(axis, transition) {\n const axisValue = this.getAxisMotionValue(axis);\n addValueToWillChange(this.visualElement, axis);\n return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false));\n }\n stopAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).stop());\n }\n pauseAnimation() {\n eachAxis((axis) => {\n var _a;\n return (_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.pause();\n });\n }\n getAnimationState(axis) {\n var _a;\n return (_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.state;\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 * - Otherwise, we apply the delta to the x/y motion values.\n */\n getAxisMotionValue(axis) {\n const dragKey = `_drag${axis.toUpperCase()}`;\n const props = this.visualElement.getProps();\n const externalMotionValue = props[dragKey];\n return externalMotionValue ? externalMotionValue : this.visualElement.getValue(axis, (props.initial ? props.initial[axis] : void 0) || 0);\n }\n snapToCursor(point2) {\n eachAxis((axis) => {\n const { drag: drag2 } = this.getProps();\n if (!shouldDrag(axis, drag2, this.currentDirection))\n return;\n const { projection } = this.visualElement;\n const axisValue = this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis];\n axisValue.set(point2[axis] - mixNumber(min, max, 0.5));\n }\n });\n }\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n scalePositionWithinConstraints() {\n if (!this.visualElement.current)\n return;\n const { drag: drag2, dragConstraints } = this.getProps();\n const { projection } = this.visualElement;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n this.stopAnimation();\n const boxProgress = { x: 0, y: 0 };\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis);\n if (axisValue && this.constraints !== false) {\n const latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);\n }\n });\n const { transformTemplate } = this.visualElement.getProps();\n this.visualElement.current.style.transform = transformTemplate ? transformTemplate({}, \"\") : \"none\";\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n this.resolveConstraints();\n eachAxis((axis) => {\n if (!shouldDrag(axis, drag2, null))\n return;\n const axisValue = this.getAxisMotionValue(axis);\n const { min, max } = this.constraints[axis];\n axisValue.set(mixNumber(min, max, boxProgress[axis]));\n });\n }\n addListeners() {\n if (!this.visualElement.current)\n return;\n elementDragControls.set(this.visualElement, this);\n const element = this.visualElement.current;\n const stopPointerListener = addPointerEvent(element, \"pointerdown\", (event) => {\n const { drag: drag2, dragListener = true } = this.getProps();\n drag2 && dragListener && this.start(event);\n });\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps();\n if (isRefObject(dragConstraints) && dragConstraints.current) {\n this.constraints = this.resolveRefConstraints();\n }\n };\n const { projection } = this.visualElement;\n const stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n }\n frame.read(measureDragConstraints);\n const stopResizeListener = addDomEvent(window, \"resize\", () => this.scalePositionWithinConstraints());\n const stopLayoutUpdateListener = projection.addEventListener(\"didUpdate\", ({ delta, hasLayoutChanged }) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const motionValue2 = this.getAxisMotionValue(axis);\n if (!motionValue2)\n return;\n this.originPoint[axis] += delta[axis].translate;\n motionValue2.set(motionValue2.get() + delta[axis].translate);\n });\n this.visualElement.render();\n }\n });\n return () => {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n stopLayoutUpdateListener && stopLayoutUpdateListener();\n };\n }\n getProps() {\n const props = this.visualElement.getProps();\n const { drag: drag2 = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true } = props;\n return {\n ...props,\n drag: drag2,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum\n };\n }\n};\nfunction shouldDrag(direction, drag2, currentDirection) {\n return (drag2 === true || drag2 === direction) && (currentDirection === null || currentDirection === direction);\n}\nfunction getCurrentDirection(offset, lockThreshold = 10) {\n let direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n } else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\n\n// ../../../node_modules/framer-motion/dist/es/gestures/drag/index.mjs\nvar DragGesture = class extends Feature {\n constructor(node) {\n super(node);\n this.removeGroupControls = noop;\n this.removeListeners = noop;\n this.controls = new VisualElementDragControls(node);\n }\n mount() {\n const { dragControls } = this.node.getProps();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n this.removeListeners = this.controls.addListeners() || noop;\n }\n unmount() {\n this.removeGroupControls();\n this.removeListeners();\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/gestures/pan/index.mjs\nvar asyncHandler = (handler) => (event, info) => {\n if (handler) {\n frame.postRender(() => handler(event, info));\n }\n};\nvar PanGesture = class extends Feature {\n constructor() {\n super(...arguments);\n this.removePointerDownListener = noop;\n }\n onPointerDown(pointerDownEvent) {\n this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), {\n transformPagePoint: this.node.getTransformPagePoint(),\n contextWindow: getContextWindow(this.node)\n });\n }\n createPanHandlers() {\n const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps();\n return {\n onSessionStart: asyncHandler(onPanSessionStart),\n onStart: asyncHandler(onPanStart),\n onMove: onPan,\n onEnd: (event, info) => {\n delete this.session;\n if (onPanEnd) {\n frame.postRender(() => onPanEnd(event, info));\n }\n }\n };\n }\n mount() {\n this.removePointerDownListener = addPointerEvent(this.node.current, \"pointerdown\", (event) => this.onPointerDown(event));\n }\n update() {\n this.session && this.session.updateHandlers(this.createPanHandlers());\n }\n unmount() {\n this.removePointerDownListener();\n this.session && this.session.end();\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nimport { useContext as useContext6, Component } from \"react\";\n\n// ../../../node_modules/framer-motion/dist/es/projection/node/state.mjs\nvar globalProjectionState = {\n /**\n * Global flag as to whether the tree has animated since the last time\n * we resized the window\n */\n hasAnimatedSinceResize: true,\n /**\n * We set this to true once, on the first update. Any nodes added to the tree beyond that\n * update will be given a `data-projection-id` attribute.\n */\n hasEverUpdated: false\n};\n\n// ../../../node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs\nfunction pixelsToPercent(pixels, axis) {\n if (axis.max === axis.min)\n return 0;\n return pixels / (axis.max - axis.min) * 100;\n}\nvar correctBorderRadius = {\n correct: (latest, node) => {\n if (!node.target)\n return latest;\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest);\n } else {\n return latest;\n }\n }\n const x = pixelsToPercent(latest, node.target.x);\n const y = pixelsToPercent(latest, node.target.y);\n return `${x}% ${y}%`;\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs\nvar correctBoxShadow = {\n correct: (latest, { treeScale, projectionDelta }) => {\n const original = latest;\n const shadow = complex.parse(latest);\n if (shadow.length > 5)\n return original;\n const template = complex.createTransformer(latest);\n const offset = typeof shadow[0] !== \"number\" ? 1 : 0;\n const xScale = projectionDelta.x.scale * treeScale.x;\n const yScale = projectionDelta.y.scale * treeScale.y;\n shadow[0 + offset] /= xScale;\n shadow[1 + offset] /= yScale;\n const averageScale = mixNumber(xScale, yScale, 0.5);\n if (typeof shadow[2 + offset] === \"number\")\n shadow[2 + offset] /= averageScale;\n if (typeof shadow[3 + offset] === \"number\")\n shadow[3 + offset] /= averageScale;\n return template(shadow);\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs\nvar MeasureLayoutWithContext = class extends Component {\n /**\n * This only mounts projection nodes for components that\n * need measuring, we might want to do it for all components\n * in order to incorporate transforms\n */\n componentDidMount() {\n const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props;\n const { projection } = visualElement;\n addScaleCorrector(defaultScaleCorrectors);\n if (projection) {\n if (layoutGroup.group)\n layoutGroup.group.add(projection);\n if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {\n switchLayoutGroup.register(projection);\n }\n projection.root.didUpdate();\n projection.addEventListener(\"animationComplete\", () => {\n this.safeToRemove();\n });\n projection.setOptions({\n ...projection.options,\n onExitComplete: () => this.safeToRemove()\n });\n }\n globalProjectionState.hasEverUpdated = true;\n }\n getSnapshotBeforeUpdate(prevProps) {\n const { layoutDependency, visualElement, drag: drag2, isPresent: isPresent2 } = this.props;\n const projection = visualElement.projection;\n if (!projection)\n return null;\n projection.isPresent = isPresent2;\n if (drag2 || prevProps.layoutDependency !== layoutDependency || layoutDependency === void 0) {\n projection.willUpdate();\n } else {\n this.safeToRemove();\n }\n if (prevProps.isPresent !== isPresent2) {\n if (isPresent2) {\n projection.promote();\n } else if (!projection.relegate()) {\n frame.postRender(() => {\n const stack = projection.getStack();\n if (!stack || !stack.members.length) {\n this.safeToRemove();\n }\n });\n }\n }\n return null;\n }\n componentDidUpdate() {\n const { projection } = this.props.visualElement;\n if (projection) {\n projection.root.didUpdate();\n microtask.postRender(() => {\n if (!projection.currentAnimation && projection.isLead()) {\n this.safeToRemove();\n }\n });\n }\n }\n componentWillUnmount() {\n const { visualElement, layoutGroup, switchLayoutGroup: promoteContext } = this.props;\n const { projection } = visualElement;\n if (projection) {\n projection.scheduleCheckAfterUnmount();\n if (layoutGroup && layoutGroup.group)\n layoutGroup.group.remove(projection);\n if (promoteContext && promoteContext.deregister)\n promoteContext.deregister(projection);\n }\n }\n safeToRemove() {\n const { safeToRemove } = this.props;\n safeToRemove && safeToRemove();\n }\n render() {\n return null;\n }\n};\nfunction MeasureLayout(props) {\n const [isPresent2, safeToRemove] = usePresence();\n const layoutGroup = useContext6(LayoutGroupContext);\n return jsx2(MeasureLayoutWithContext, { ...props, layoutGroup, switchLayoutGroup: useContext6(SwitchLayoutGroupContext), isPresent: isPresent2, safeToRemove });\n}\nvar defaultScaleCorrectors = {\n borderRadius: {\n ...correctBorderRadius,\n applyTo: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\"\n ]\n },\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow\n};\n\n// ../../../node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs\nvar borders = [\"TopLeft\", \"TopRight\", \"BottomLeft\", \"BottomRight\"];\nvar numBorders = borders.length;\nvar asNumber = (value) => typeof value === \"string\" ? parseFloat(value) : value;\nvar isPx = (value) => typeof value === \"number\" || px.test(value);\nfunction mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOnlyMember) {\n if (shouldCrossfadeOpacity) {\n target.opacity = mixNumber(\n 0,\n // TODO Reinstate this if only child\n lead.opacity !== void 0 ? lead.opacity : 1,\n easeCrossfadeIn(progress2)\n );\n target.opacityExit = mixNumber(follow.opacity !== void 0 ? follow.opacity : 1, 0, easeCrossfadeOut(progress2));\n } else if (isOnlyMember) {\n target.opacity = mixNumber(follow.opacity !== void 0 ? follow.opacity : 1, lead.opacity !== void 0 ? lead.opacity : 1, progress2);\n }\n for (let i = 0; i < numBorders; i++) {\n const borderLabel = `border${borders[i]}Radius`;\n let followRadius = getRadius(follow, borderLabel);\n let leadRadius = getRadius(lead, borderLabel);\n if (followRadius === void 0 && leadRadius === void 0)\n continue;\n followRadius || (followRadius = 0);\n leadRadius || (leadRadius = 0);\n const canMix = followRadius === 0 || leadRadius === 0 || isPx(followRadius) === isPx(leadRadius);\n if (canMix) {\n target[borderLabel] = Math.max(mixNumber(asNumber(followRadius), asNumber(leadRadius), progress2), 0);\n if (percent.test(leadRadius) || percent.test(followRadius)) {\n target[borderLabel] += \"%\";\n }\n } else {\n target[borderLabel] = leadRadius;\n }\n }\n if (follow.rotate || lead.rotate) {\n target.rotate = mixNumber(follow.rotate || 0, lead.rotate || 0, progress2);\n }\n}\nfunction getRadius(values, radiusName) {\n return values[radiusName] !== void 0 ? values[radiusName] : values.borderRadius;\n}\nvar easeCrossfadeIn = /* @__PURE__ */ compress(0, 0.5, circOut);\nvar easeCrossfadeOut = /* @__PURE__ */ compress(0.5, 0.95, noop);\nfunction compress(min, max, easing) {\n return (p) => {\n if (p < min)\n return 0;\n if (p > max)\n return 1;\n return easing(progress(min, max, p));\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/projection/geometry/copy.mjs\nfunction copyAxisInto(axis, originAxis) {\n axis.min = originAxis.min;\n axis.max = originAxis.max;\n}\nfunction copyBoxInto(box, originBox) {\n copyAxisInto(box.x, originBox.x);\n copyAxisInto(box.y, originBox.y);\n}\nfunction copyAxisDeltaInto(delta, originDelta) {\n delta.translate = originDelta.translate;\n delta.scale = originDelta.scale;\n delta.originPoint = originDelta.originPoint;\n delta.origin = originDelta.origin;\n}\n\n// ../../../node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs\nfunction removePointDelta(point2, translate, scale2, originPoint, boxScale) {\n point2 -= translate;\n point2 = scalePoint(point2, 1 / scale2, originPoint);\n if (boxScale !== void 0) {\n point2 = scalePoint(point2, 1 / boxScale, originPoint);\n }\n return point2;\n}\nfunction removeAxisDelta(axis, translate = 0, scale2 = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {\n if (percent.test(translate)) {\n translate = parseFloat(translate);\n const relativeProgress = mixNumber(sourceAxis.min, sourceAxis.max, translate / 100);\n translate = relativeProgress - sourceAxis.min;\n }\n if (typeof translate !== \"number\")\n return;\n let originPoint = mixNumber(originAxis.min, originAxis.max, origin);\n if (axis === originAxis)\n originPoint -= translate;\n axis.min = removePointDelta(axis.min, translate, scale2, originPoint, boxScale);\n axis.max = removePointDelta(axis.max, translate, scale2, originPoint, boxScale);\n}\nfunction removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) {\n removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);\n}\nvar xKeys = [\"x\", \"scaleX\", \"originX\"];\nvar yKeys = [\"y\", \"scaleY\", \"originY\"];\nfunction removeBoxTransforms(box, transforms, originBox, sourceBox) {\n removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : void 0, sourceBox ? sourceBox.x : void 0);\n removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : void 0, sourceBox ? sourceBox.y : void 0);\n}\n\n// ../../../node_modules/framer-motion/dist/es/projection/geometry/utils.mjs\nfunction isAxisDeltaZero(delta) {\n return delta.translate === 0 && delta.scale === 1;\n}\nfunction isDeltaZero(delta) {\n return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y);\n}\nfunction axisEquals(a, b) {\n return a.min === b.min && a.max === b.max;\n}\nfunction boxEquals(a, b) {\n return axisEquals(a.x, b.x) && axisEquals(a.y, b.y);\n}\nfunction axisEqualsRounded(a, b) {\n return Math.round(a.min) === Math.round(b.min) && Math.round(a.max) === Math.round(b.max);\n}\nfunction boxEqualsRounded(a, b) {\n return axisEqualsRounded(a.x, b.x) && axisEqualsRounded(a.y, b.y);\n}\nfunction aspectRatio(box) {\n return calcLength(box.x) / calcLength(box.y);\n}\nfunction axisDeltaEquals(a, b) {\n return a.translate === b.translate && a.scale === b.scale && a.originPoint === b.originPoint;\n}\n\n// ../../../node_modules/framer-motion/dist/es/projection/shared/stack.mjs\nvar NodeStack = class {\n constructor() {\n this.members = [];\n }\n add(node) {\n addUniqueItem(this.members, node);\n node.scheduleRender();\n }\n remove(node) {\n removeItem(this.members, node);\n if (node === this.prevLead) {\n this.prevLead = void 0;\n }\n if (node === this.lead) {\n const prevLead = this.members[this.members.length - 1];\n if (prevLead) {\n this.promote(prevLead);\n }\n }\n }\n relegate(node) {\n const indexOfNode = this.members.findIndex((member) => node === member);\n if (indexOfNode === 0)\n return false;\n let prevLead;\n for (let i = indexOfNode; i >= 0; i--) {\n const member = this.members[i];\n if (member.isPresent !== false) {\n prevLead = member;\n break;\n }\n }\n if (prevLead) {\n this.promote(prevLead);\n return true;\n } else {\n return false;\n }\n }\n promote(node, preserveFollowOpacity) {\n const prevLead = this.lead;\n if (node === prevLead)\n return;\n this.prevLead = prevLead;\n this.lead = node;\n node.show();\n if (prevLead) {\n prevLead.instance && prevLead.scheduleRender();\n node.scheduleRender();\n node.resumeFrom = prevLead;\n if (preserveFollowOpacity) {\n node.resumeFrom.preserveOpacity = true;\n }\n if (prevLead.snapshot) {\n node.snapshot = prevLead.snapshot;\n node.snapshot.latestValues = prevLead.animationValues || prevLead.latestValues;\n }\n if (node.root && node.root.isUpdating) {\n node.isLayoutDirty = true;\n }\n const { crossfade } = node.options;\n if (crossfade === false) {\n prevLead.hide();\n }\n }\n }\n exitAnimationComplete() {\n this.members.forEach((node) => {\n const { options, resumingFrom } = node;\n options.onExitComplete && options.onExitComplete();\n if (resumingFrom) {\n resumingFrom.options.onExitComplete && resumingFrom.options.onExitComplete();\n }\n });\n }\n scheduleRender() {\n this.members.forEach((node) => {\n node.instance && node.scheduleRender(false);\n });\n }\n /**\n * Clear any leads that have been removed this render to prevent them from being\n * used in future animations and to prevent memory leaks\n */\n removeLeadSnapshot() {\n if (this.lead && this.lead.snapshot) {\n this.lead.snapshot = void 0;\n }\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/projection/styles/transform.mjs\nfunction buildProjectionTransform(delta, treeScale, latestTransform) {\n let transform2 = \"\";\n const xTranslate = delta.x.translate / treeScale.x;\n const yTranslate = delta.y.translate / treeScale.y;\n const zTranslate = (latestTransform === null || latestTransform === void 0 ? void 0 : latestTransform.z) || 0;\n if (xTranslate || yTranslate || zTranslate) {\n transform2 = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `;\n }\n if (treeScale.x !== 1 || treeScale.y !== 1) {\n transform2 += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;\n }\n if (latestTransform) {\n const { transformPerspective, rotate, rotateX, rotateY, skewX, skewY } = latestTransform;\n if (transformPerspective)\n transform2 = `perspective(${transformPerspective}px) ${transform2}`;\n if (rotate)\n transform2 += `rotate(${rotate}deg) `;\n if (rotateX)\n transform2 += `rotateX(${rotateX}deg) `;\n if (rotateY)\n transform2 += `rotateY(${rotateY}deg) `;\n if (skewX)\n transform2 += `skewX(${skewX}deg) `;\n if (skewY)\n transform2 += `skewY(${skewY}deg) `;\n }\n const elementScaleX = delta.x.scale * treeScale.x;\n const elementScaleY = delta.y.scale * treeScale.y;\n if (elementScaleX !== 1 || elementScaleY !== 1) {\n transform2 += `scale(${elementScaleX}, ${elementScaleY})`;\n }\n return transform2 || \"none\";\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs\nfunction isSVGElement(element) {\n return element instanceof SVGElement && element.tagName !== \"svg\";\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/animate/single-value.mjs\nfunction animateSingleValue(value, keyframes2, options) {\n const motionValue$1 = isMotionValue(value) ? value : motionValue(value);\n motionValue$1.start(animateMotionValue(\"\", motionValue$1, keyframes2, options));\n return motionValue$1.animation;\n}\n\n// ../../../node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs\nvar metrics = {\n type: \"projectionFrame\",\n totalNodes: 0,\n resolvedTargetDeltas: 0,\n recalculatedProjection: 0\n};\nvar isDebug = typeof window !== \"undefined\" && window.MotionDebug !== void 0;\nvar transformAxes = [\"\", \"X\", \"Y\", \"Z\"];\nvar hiddenVisibility = { visibility: \"hidden\" };\nvar animationTarget = 1e3;\nvar id2 = 0;\nfunction resetDistortingTransform(key, visualElement, values, sharedAnimationValues) {\n const { latestValues } = visualElement;\n if (latestValues[key]) {\n values[key] = latestValues[key];\n visualElement.setStaticValue(key, 0);\n if (sharedAnimationValues) {\n sharedAnimationValues[key] = 0;\n }\n }\n}\nfunction cancelTreeOptimisedTransformAnimations(projectionNode) {\n projectionNode.hasCheckedOptimisedAppear = true;\n if (projectionNode.root === projectionNode)\n return;\n const { visualElement } = projectionNode.options;\n if (!visualElement)\n return;\n const appearId = getOptimisedAppearId(visualElement);\n if (window.MotionHasOptimisedAnimation(appearId, \"transform\")) {\n const { layout: layout2, layoutId } = projectionNode.options;\n window.MotionCancelOptimisedAnimation(appearId, \"transform\", frame, !(layout2 || layoutId));\n }\n const { parent } = projectionNode;\n if (parent && !parent.hasCheckedOptimisedAppear) {\n cancelTreeOptimisedTransformAnimations(parent);\n }\n}\nfunction createProjectionNode2({ attachResizeListener, defaultParent, measureScroll, checkIsScrollRoot, resetTransform }) {\n return class ProjectionNode {\n constructor(latestValues = {}, parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent()) {\n this.id = id2++;\n this.animationId = 0;\n this.children = /* @__PURE__ */ new Set();\n this.options = {};\n this.isTreeAnimating = false;\n this.isAnimationBlocked = false;\n this.isLayoutDirty = false;\n this.isProjectionDirty = false;\n this.isSharedProjectionDirty = false;\n this.isTransformDirty = false;\n this.updateManuallyBlocked = false;\n this.updateBlockedByResize = false;\n this.isUpdating = false;\n this.isSVG = false;\n this.needsReset = false;\n this.shouldResetTransform = false;\n this.hasCheckedOptimisedAppear = false;\n this.treeScale = { x: 1, y: 1 };\n this.eventHandlers = /* @__PURE__ */ new Map();\n this.hasTreeAnimated = false;\n this.updateScheduled = false;\n this.scheduleUpdate = () => this.update();\n this.projectionUpdateScheduled = false;\n this.checkUpdateFailed = () => {\n if (this.isUpdating) {\n this.isUpdating = false;\n this.clearAllSnapshots();\n }\n };\n this.updateProjection = () => {\n this.projectionUpdateScheduled = false;\n if (isDebug) {\n metrics.totalNodes = metrics.resolvedTargetDeltas = metrics.recalculatedProjection = 0;\n }\n this.nodes.forEach(propagateDirtyNodes);\n this.nodes.forEach(resolveTargetDelta);\n this.nodes.forEach(calcProjection);\n this.nodes.forEach(cleanDirtyNodes);\n if (isDebug) {\n window.MotionDebug.record(metrics);\n }\n };\n this.resolvedRelativeTargetAt = 0;\n this.hasProjected = false;\n this.isVisible = true;\n this.animationProgress = 0;\n this.sharedNodes = /* @__PURE__ */ new Map();\n this.latestValues = latestValues;\n this.root = parent ? parent.root || parent : this;\n this.path = parent ? [...parent.path, parent] : [];\n this.parent = parent;\n this.depth = parent ? parent.depth + 1 : 0;\n for (let i = 0; i < this.path.length; i++) {\n this.path[i].shouldResetTransform = true;\n }\n if (this.root === this)\n this.nodes = new FlatTree();\n }\n addEventListener(name, handler) {\n if (!this.eventHandlers.has(name)) {\n this.eventHandlers.set(name, new SubscriptionManager());\n }\n return this.eventHandlers.get(name).add(handler);\n }\n notifyListeners(name, ...args) {\n const subscriptionManager = this.eventHandlers.get(name);\n subscriptionManager && subscriptionManager.notify(...args);\n }\n hasListeners(name) {\n return this.eventHandlers.has(name);\n }\n /**\n * Lifecycles\n */\n mount(instance, isLayoutDirty = this.root.hasTreeAnimated) {\n if (this.instance)\n return;\n this.isSVG = isSVGElement(instance);\n this.instance = instance;\n const { layoutId, layout: layout2, visualElement } = this.options;\n if (visualElement && !visualElement.current) {\n visualElement.mount(instance);\n }\n this.root.nodes.add(this);\n this.parent && this.parent.children.add(this);\n if (isLayoutDirty && (layout2 || layoutId)) {\n this.isLayoutDirty = true;\n }\n if (attachResizeListener) {\n let cancelDelay;\n const resizeUnblockUpdate = () => this.root.updateBlockedByResize = false;\n attachResizeListener(instance, () => {\n this.root.updateBlockedByResize = true;\n cancelDelay && cancelDelay();\n cancelDelay = delay(resizeUnblockUpdate, 250);\n if (globalProjectionState.hasAnimatedSinceResize) {\n globalProjectionState.hasAnimatedSinceResize = false;\n this.nodes.forEach(finishAnimation);\n }\n });\n }\n if (layoutId) {\n this.root.registerSharedNode(layoutId, this);\n }\n if (this.options.animate !== false && visualElement && (layoutId || layout2)) {\n this.addEventListener(\"didUpdate\", ({ delta, hasLayoutChanged, hasRelativeTargetChanged, layout: newLayout }) => {\n if (this.isTreeAnimationBlocked()) {\n this.target = void 0;\n this.relativeTarget = void 0;\n return;\n }\n const layoutTransition = this.options.transition || visualElement.getDefaultTransition() || defaultLayoutTransition;\n const { onLayoutAnimationStart, onLayoutAnimationComplete } = visualElement.getProps();\n const targetChanged = !this.targetLayout || !boxEqualsRounded(this.targetLayout, newLayout) || hasRelativeTargetChanged;\n const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeTargetChanged;\n if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || hasOnlyRelativeTargetChanged || hasLayoutChanged && (targetChanged || !this.currentAnimation)) {\n if (this.resumeFrom) {\n this.resumingFrom = this.resumeFrom;\n this.resumingFrom.resumingFrom = void 0;\n }\n this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);\n const animationOptions = {\n ...getValueTransition(layoutTransition, \"layout\"),\n onPlay: onLayoutAnimationStart,\n onComplete: onLayoutAnimationComplete\n };\n if (visualElement.shouldReduceMotion || this.options.layoutRoot) {\n animationOptions.delay = 0;\n animationOptions.type = false;\n }\n this.startAnimation(animationOptions);\n } else {\n if (!hasLayoutChanged) {\n finishAnimation(this);\n }\n if (this.isLead() && this.options.onExitComplete) {\n this.options.onExitComplete();\n }\n }\n this.targetLayout = newLayout;\n });\n }\n }\n unmount() {\n this.options.layoutId && this.willUpdate();\n this.root.nodes.remove(this);\n const stack = this.getStack();\n stack && stack.remove(this);\n this.parent && this.parent.children.delete(this);\n this.instance = void 0;\n cancelFrame(this.updateProjection);\n }\n // only on the root\n blockUpdate() {\n this.updateManuallyBlocked = true;\n }\n unblockUpdate() {\n this.updateManuallyBlocked = false;\n }\n isUpdateBlocked() {\n return this.updateManuallyBlocked || this.updateBlockedByResize;\n }\n isTreeAnimationBlocked() {\n return this.isAnimationBlocked || this.parent && this.parent.isTreeAnimationBlocked() || false;\n }\n // Note: currently only running on root node\n startUpdate() {\n if (this.isUpdateBlocked())\n return;\n this.isUpdating = true;\n this.nodes && this.nodes.forEach(resetSkewAndRotation);\n this.animationId++;\n }\n getTransformTemplate() {\n const { visualElement } = this.options;\n return visualElement && visualElement.getProps().transformTemplate;\n }\n willUpdate(shouldNotifyListeners = true) {\n this.root.hasTreeAnimated = true;\n if (this.root.isUpdateBlocked()) {\n this.options.onExitComplete && this.options.onExitComplete();\n return;\n }\n if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear) {\n cancelTreeOptimisedTransformAnimations(this);\n }\n !this.root.isUpdating && this.root.startUpdate();\n if (this.isLayoutDirty)\n return;\n this.isLayoutDirty = true;\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n node.shouldResetTransform = true;\n node.updateScroll(\"snapshot\");\n if (node.options.layoutRoot) {\n node.willUpdate(false);\n }\n }\n const { layoutId, layout: layout2 } = this.options;\n if (layoutId === void 0 && !layout2)\n return;\n const transformTemplate = this.getTransformTemplate();\n this.prevTransformTemplateValue = transformTemplate ? transformTemplate(this.latestValues, \"\") : void 0;\n this.updateSnapshot();\n shouldNotifyListeners && this.notifyListeners(\"willUpdate\");\n }\n update() {\n this.updateScheduled = false;\n const updateWasBlocked = this.isUpdateBlocked();\n if (updateWasBlocked) {\n this.unblockUpdate();\n this.clearAllSnapshots();\n this.nodes.forEach(clearMeasurements);\n return;\n }\n if (!this.isUpdating) {\n this.nodes.forEach(clearIsLayoutDirty);\n }\n this.isUpdating = false;\n this.nodes.forEach(resetTransformStyle);\n this.nodes.forEach(updateLayout);\n this.nodes.forEach(notifyLayoutUpdate);\n this.clearAllSnapshots();\n const now2 = time.now();\n frameData.delta = clamp(0, 1e3 / 60, now2 - frameData.timestamp);\n frameData.timestamp = now2;\n frameData.isProcessing = true;\n frameSteps.update.process(frameData);\n frameSteps.preRender.process(frameData);\n frameSteps.render.process(frameData);\n frameData.isProcessing = false;\n }\n didUpdate() {\n if (!this.updateScheduled) {\n this.updateScheduled = true;\n microtask.read(this.scheduleUpdate);\n }\n }\n clearAllSnapshots() {\n this.nodes.forEach(clearSnapshot);\n this.sharedNodes.forEach(removeLeadSnapshots);\n }\n scheduleUpdateProjection() {\n if (!this.projectionUpdateScheduled) {\n this.projectionUpdateScheduled = true;\n frame.preRender(this.updateProjection, false, true);\n }\n }\n scheduleCheckAfterUnmount() {\n frame.postRender(() => {\n if (this.isLayoutDirty) {\n this.root.didUpdate();\n } else {\n this.root.checkUpdateFailed();\n }\n });\n }\n /**\n * Update measurements\n */\n updateSnapshot() {\n if (this.snapshot || !this.instance)\n return;\n this.snapshot = this.measure();\n }\n updateLayout() {\n if (!this.instance)\n return;\n this.updateScroll();\n if (!(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty) {\n return;\n }\n if (this.resumeFrom && !this.resumeFrom.instance) {\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n node.updateScroll();\n }\n }\n const prevLayout = this.layout;\n this.layout = this.measure(false);\n this.layoutCorrected = createBox();\n this.isLayoutDirty = false;\n this.projectionDelta = void 0;\n this.notifyListeners(\"measure\", this.layout.layoutBox);\n const { visualElement } = this.options;\n visualElement && visualElement.notify(\"LayoutMeasure\", this.layout.layoutBox, prevLayout ? prevLayout.layoutBox : void 0);\n }\n updateScroll(phase = \"measure\") {\n let needsMeasurement = Boolean(this.options.layoutScroll && this.instance);\n if (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === phase) {\n needsMeasurement = false;\n }\n if (needsMeasurement) {\n const isRoot = checkIsScrollRoot(this.instance);\n this.scroll = {\n animationId: this.root.animationId,\n phase,\n isRoot,\n offset: measureScroll(this.instance),\n wasRoot: this.scroll ? this.scroll.isRoot : isRoot\n };\n }\n }\n resetTransform() {\n if (!resetTransform)\n return;\n const isResetRequested = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout;\n const hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta);\n const transformTemplate = this.getTransformTemplate();\n const transformTemplateValue = transformTemplate ? transformTemplate(this.latestValues, \"\") : void 0;\n const transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue;\n if (isResetRequested && (hasProjection || hasTransform(this.latestValues) || transformTemplateHasChanged)) {\n resetTransform(this.instance, transformTemplateValue);\n this.shouldResetTransform = false;\n this.scheduleRender();\n }\n }\n measure(removeTransform = true) {\n const pageBox = this.measurePageBox();\n let layoutBox = this.removeElementScroll(pageBox);\n if (removeTransform) {\n layoutBox = this.removeTransform(layoutBox);\n }\n roundBox(layoutBox);\n return {\n animationId: this.root.animationId,\n measuredBox: pageBox,\n layoutBox,\n latestValues: {},\n source: this.id\n };\n }\n measurePageBox() {\n var _a;\n const { visualElement } = this.options;\n if (!visualElement)\n return createBox();\n const box = visualElement.measureViewportBox();\n const wasInScrollRoot = ((_a = this.scroll) === null || _a === void 0 ? void 0 : _a.wasRoot) || this.path.some(checkNodeWasScrollRoot);\n if (!wasInScrollRoot) {\n const { scroll: scroll2 } = this.root;\n if (scroll2) {\n translateAxis(box.x, scroll2.offset.x);\n translateAxis(box.y, scroll2.offset.y);\n }\n }\n return box;\n }\n removeElementScroll(box) {\n var _a;\n const boxWithoutScroll = createBox();\n copyBoxInto(boxWithoutScroll, box);\n if ((_a = this.scroll) === null || _a === void 0 ? void 0 : _a.wasRoot) {\n return boxWithoutScroll;\n }\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n const { scroll: scroll2, options } = node;\n if (node !== this.root && scroll2 && options.layoutScroll) {\n if (scroll2.wasRoot) {\n copyBoxInto(boxWithoutScroll, box);\n }\n translateAxis(boxWithoutScroll.x, scroll2.offset.x);\n translateAxis(boxWithoutScroll.y, scroll2.offset.y);\n }\n }\n return boxWithoutScroll;\n }\n applyTransform(box, transformOnly = false) {\n const withTransforms = createBox();\n copyBoxInto(withTransforms, box);\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n if (!transformOnly && node.options.layoutScroll && node.scroll && node !== node.root) {\n transformBox(withTransforms, {\n x: -node.scroll.offset.x,\n y: -node.scroll.offset.y\n });\n }\n if (!hasTransform(node.latestValues))\n continue;\n transformBox(withTransforms, node.latestValues);\n }\n if (hasTransform(this.latestValues)) {\n transformBox(withTransforms, this.latestValues);\n }\n return withTransforms;\n }\n removeTransform(box) {\n const boxWithoutTransform = createBox();\n copyBoxInto(boxWithoutTransform, box);\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n if (!node.instance)\n continue;\n if (!hasTransform(node.latestValues))\n continue;\n hasScale(node.latestValues) && node.updateSnapshot();\n const sourceBox = createBox();\n const nodeBox = node.measurePageBox();\n copyBoxInto(sourceBox, nodeBox);\n removeBoxTransforms(boxWithoutTransform, node.latestValues, node.snapshot ? node.snapshot.layoutBox : void 0, sourceBox);\n }\n if (hasTransform(this.latestValues)) {\n removeBoxTransforms(boxWithoutTransform, this.latestValues);\n }\n return boxWithoutTransform;\n }\n setTargetDelta(delta) {\n this.targetDelta = delta;\n this.root.scheduleUpdateProjection();\n this.isProjectionDirty = true;\n }\n setOptions(options) {\n this.options = {\n ...this.options,\n ...options,\n crossfade: options.crossfade !== void 0 ? options.crossfade : true\n };\n }\n clearMeasurements() {\n this.scroll = void 0;\n this.layout = void 0;\n this.snapshot = void 0;\n this.prevTransformTemplateValue = void 0;\n this.targetDelta = void 0;\n this.target = void 0;\n this.isLayoutDirty = false;\n }\n forceRelativeParentToResolveTarget() {\n if (!this.relativeParent)\n return;\n if (this.relativeParent.resolvedRelativeTargetAt !== frameData.timestamp) {\n this.relativeParent.resolveTargetDelta(true);\n }\n }\n resolveTargetDelta(forceRecalculation = false) {\n var _a;\n const lead = this.getLead();\n this.isProjectionDirty || (this.isProjectionDirty = lead.isProjectionDirty);\n this.isTransformDirty || (this.isTransformDirty = lead.isTransformDirty);\n this.isSharedProjectionDirty || (this.isSharedProjectionDirty = lead.isSharedProjectionDirty);\n const isShared = Boolean(this.resumingFrom) || this !== lead;\n const canSkip = !(forceRecalculation || isShared && this.isSharedProjectionDirty || this.isProjectionDirty || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isProjectionDirty) || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize);\n if (canSkip)\n return;\n const { layout: layout2, layoutId } = this.options;\n if (!this.layout || !(layout2 || layoutId))\n return;\n this.resolvedRelativeTargetAt = frameData.timestamp;\n if (!this.targetDelta && !this.relativeTarget) {\n const relativeParent = this.getClosestProjectingParent();\n if (relativeParent && relativeParent.layout && this.animationProgress !== 1) {\n this.relativeParent = relativeParent;\n this.forceRelativeParentToResolveTarget();\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.layout.layoutBox, relativeParent.layout.layoutBox);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n } else {\n this.relativeParent = this.relativeTarget = void 0;\n }\n }\n if (!this.relativeTarget && !this.targetDelta)\n return;\n if (!this.target) {\n this.target = createBox();\n this.targetWithTransforms = createBox();\n }\n if (this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target) {\n this.forceRelativeParentToResolveTarget();\n calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target);\n } else if (this.targetDelta) {\n if (Boolean(this.resumingFrom)) {\n this.target = this.applyTransform(this.layout.layoutBox);\n } else {\n copyBoxInto(this.target, this.layout.layoutBox);\n }\n applyBoxDelta(this.target, this.targetDelta);\n } else {\n copyBoxInto(this.target, this.layout.layoutBox);\n }\n if (this.attemptToResolveRelativeTarget) {\n this.attemptToResolveRelativeTarget = false;\n const relativeParent = this.getClosestProjectingParent();\n if (relativeParent && Boolean(relativeParent.resumingFrom) === Boolean(this.resumingFrom) && !relativeParent.options.layoutScroll && relativeParent.target && this.animationProgress !== 1) {\n this.relativeParent = relativeParent;\n this.forceRelativeParentToResolveTarget();\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.target, relativeParent.target);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n } else {\n this.relativeParent = this.relativeTarget = void 0;\n }\n }\n if (isDebug) {\n metrics.resolvedTargetDeltas++;\n }\n }\n getClosestProjectingParent() {\n if (!this.parent || hasScale(this.parent.latestValues) || has2DTranslate(this.parent.latestValues)) {\n return void 0;\n }\n if (this.parent.isProjecting()) {\n return this.parent;\n } else {\n return this.parent.getClosestProjectingParent();\n }\n }\n isProjecting() {\n return Boolean((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);\n }\n calcProjection() {\n var _a;\n const lead = this.getLead();\n const isShared = Boolean(this.resumingFrom) || this !== lead;\n let canSkip = true;\n if (this.isProjectionDirty || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isProjectionDirty)) {\n canSkip = false;\n }\n if (isShared && (this.isSharedProjectionDirty || this.isTransformDirty)) {\n canSkip = false;\n }\n if (this.resolvedRelativeTargetAt === frameData.timestamp) {\n canSkip = false;\n }\n if (canSkip)\n return;\n const { layout: layout2, layoutId } = this.options;\n this.isTreeAnimating = Boolean(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation);\n if (!this.isTreeAnimating) {\n this.targetDelta = this.relativeTarget = void 0;\n }\n if (!this.layout || !(layout2 || layoutId))\n return;\n copyBoxInto(this.layoutCorrected, this.layout.layoutBox);\n const prevTreeScaleX = this.treeScale.x;\n const prevTreeScaleY = this.treeScale.y;\n applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, isShared);\n if (lead.layout && !lead.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1)) {\n lead.target = lead.layout.layoutBox;\n lead.targetWithTransforms = createBox();\n }\n const { target } = lead;\n if (!target) {\n if (this.prevProjectionDelta) {\n this.createProjectionDeltas();\n this.scheduleRender();\n }\n return;\n }\n if (!this.projectionDelta || !this.prevProjectionDelta) {\n this.createProjectionDeltas();\n } else {\n copyAxisDeltaInto(this.prevProjectionDelta.x, this.projectionDelta.x);\n copyAxisDeltaInto(this.prevProjectionDelta.y, this.projectionDelta.y);\n }\n calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues);\n if (this.treeScale.x !== prevTreeScaleX || this.treeScale.y !== prevTreeScaleY || !axisDeltaEquals(this.projectionDelta.x, this.prevProjectionDelta.x) || !axisDeltaEquals(this.projectionDelta.y, this.prevProjectionDelta.y)) {\n this.hasProjected = true;\n this.scheduleRender();\n this.notifyListeners(\"projectionUpdate\", target);\n }\n if (isDebug) {\n metrics.recalculatedProjection++;\n }\n }\n hide() {\n this.isVisible = false;\n }\n show() {\n this.isVisible = true;\n }\n scheduleRender(notifyAll2 = true) {\n var _a;\n (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.scheduleRender();\n if (notifyAll2) {\n const stack = this.getStack();\n stack && stack.scheduleRender();\n }\n if (this.resumingFrom && !this.resumingFrom.instance) {\n this.resumingFrom = void 0;\n }\n }\n createProjectionDeltas() {\n this.prevProjectionDelta = createDelta();\n this.projectionDelta = createDelta();\n this.projectionDeltaWithTransform = createDelta();\n }\n setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false) {\n const snapshot = this.snapshot;\n const snapshotLatestValues = snapshot ? snapshot.latestValues : {};\n const mixedValues = { ...this.latestValues };\n const targetDelta = createDelta();\n if (!this.relativeParent || !this.relativeParent.options.layoutRoot) {\n this.relativeTarget = this.relativeTargetOrigin = void 0;\n }\n this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;\n const relativeLayout = createBox();\n const snapshotSource = snapshot ? snapshot.source : void 0;\n const layoutSource = this.layout ? this.layout.source : void 0;\n const isSharedLayoutAnimation = snapshotSource !== layoutSource;\n const stack = this.getStack();\n const isOnlyMember = !stack || stack.members.length <= 1;\n const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation && !isOnlyMember && this.options.crossfade === true && !this.path.some(hasOpacityCrossfade));\n this.animationProgress = 0;\n let prevRelativeTarget;\n this.mixTargetDelta = (latest) => {\n const progress2 = latest / 1e3;\n mixAxisDelta(targetDelta.x, delta.x, progress2);\n mixAxisDelta(targetDelta.y, delta.y, progress2);\n this.setTargetDelta(targetDelta);\n if (this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout) {\n calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox);\n mixBox(this.relativeTarget, this.relativeTargetOrigin, relativeLayout, progress2);\n if (prevRelativeTarget && boxEquals(this.relativeTarget, prevRelativeTarget)) {\n this.isProjectionDirty = false;\n }\n if (!prevRelativeTarget)\n prevRelativeTarget = createBox();\n copyBoxInto(prevRelativeTarget, this.relativeTarget);\n }\n if (isSharedLayoutAnimation) {\n this.animationValues = mixedValues;\n mixValues(mixedValues, snapshotLatestValues, this.latestValues, progress2, shouldCrossfadeOpacity, isOnlyMember);\n }\n this.root.scheduleUpdateProjection();\n this.scheduleRender();\n this.animationProgress = progress2;\n };\n this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);\n }\n startAnimation(options) {\n this.notifyListeners(\"animationStart\");\n this.currentAnimation && this.currentAnimation.stop();\n if (this.resumingFrom && this.resumingFrom.currentAnimation) {\n this.resumingFrom.currentAnimation.stop();\n }\n if (this.pendingAnimation) {\n cancelFrame(this.pendingAnimation);\n this.pendingAnimation = void 0;\n }\n this.pendingAnimation = frame.update(() => {\n globalProjectionState.hasAnimatedSinceResize = true;\n this.currentAnimation = animateSingleValue(0, animationTarget, {\n ...options,\n onUpdate: (latest) => {\n this.mixTargetDelta(latest);\n options.onUpdate && options.onUpdate(latest);\n },\n onComplete: () => {\n options.onComplete && options.onComplete();\n this.completeAnimation();\n }\n });\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = this.currentAnimation;\n }\n this.pendingAnimation = void 0;\n });\n }\n completeAnimation() {\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = void 0;\n this.resumingFrom.preserveOpacity = void 0;\n }\n const stack = this.getStack();\n stack && stack.exitAnimationComplete();\n this.resumingFrom = this.currentAnimation = this.animationValues = void 0;\n this.notifyListeners(\"animationComplete\");\n }\n finishAnimation() {\n if (this.currentAnimation) {\n this.mixTargetDelta && this.mixTargetDelta(animationTarget);\n this.currentAnimation.stop();\n }\n this.completeAnimation();\n }\n applyTransformsToTarget() {\n const lead = this.getLead();\n let { targetWithTransforms, target, layout: layout2, latestValues } = lead;\n if (!targetWithTransforms || !target || !layout2)\n return;\n if (this !== lead && this.layout && layout2 && shouldAnimatePositionOnly(this.options.animationType, this.layout.layoutBox, layout2.layoutBox)) {\n target = this.target || createBox();\n const xLength = calcLength(this.layout.layoutBox.x);\n target.x.min = lead.target.x.min;\n target.x.max = target.x.min + xLength;\n const yLength = calcLength(this.layout.layoutBox.y);\n target.y.min = lead.target.y.min;\n target.y.max = target.y.min + yLength;\n }\n copyBoxInto(targetWithTransforms, target);\n transformBox(targetWithTransforms, latestValues);\n calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues);\n }\n registerSharedNode(layoutId, node) {\n if (!this.sharedNodes.has(layoutId)) {\n this.sharedNodes.set(layoutId, new NodeStack());\n }\n const stack = this.sharedNodes.get(layoutId);\n stack.add(node);\n const config = node.options.initialPromotionConfig;\n node.promote({\n transition: config ? config.transition : void 0,\n preserveFollowOpacity: config && config.shouldPreserveFollowOpacity ? config.shouldPreserveFollowOpacity(node) : void 0\n });\n }\n isLead() {\n const stack = this.getStack();\n return stack ? stack.lead === this : true;\n }\n getLead() {\n var _a;\n const { layoutId } = this.options;\n return layoutId ? ((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.lead) || this : this;\n }\n getPrevLead() {\n var _a;\n const { layoutId } = this.options;\n return layoutId ? (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.prevLead : void 0;\n }\n getStack() {\n const { layoutId } = this.options;\n if (layoutId)\n return this.root.sharedNodes.get(layoutId);\n }\n promote({ needsReset, transition, preserveFollowOpacity } = {}) {\n const stack = this.getStack();\n if (stack)\n stack.promote(this, preserveFollowOpacity);\n if (needsReset) {\n this.projectionDelta = void 0;\n this.needsReset = true;\n }\n if (transition)\n this.setOptions({ transition });\n }\n relegate() {\n const stack = this.getStack();\n if (stack) {\n return stack.relegate(this);\n } else {\n return false;\n }\n }\n resetSkewAndRotation() {\n const { visualElement } = this.options;\n if (!visualElement)\n return;\n let hasDistortingTransform = false;\n const { latestValues } = visualElement;\n if (latestValues.z || latestValues.rotate || latestValues.rotateX || latestValues.rotateY || latestValues.rotateZ || latestValues.skewX || latestValues.skewY) {\n hasDistortingTransform = true;\n }\n if (!hasDistortingTransform)\n return;\n const resetValues = {};\n if (latestValues.z) {\n resetDistortingTransform(\"z\", visualElement, resetValues, this.animationValues);\n }\n for (let i = 0; i < transformAxes.length; i++) {\n resetDistortingTransform(`rotate${transformAxes[i]}`, visualElement, resetValues, this.animationValues);\n resetDistortingTransform(`skew${transformAxes[i]}`, visualElement, resetValues, this.animationValues);\n }\n visualElement.render();\n for (const key in resetValues) {\n visualElement.setStaticValue(key, resetValues[key]);\n if (this.animationValues) {\n this.animationValues[key] = resetValues[key];\n }\n }\n visualElement.scheduleRender();\n }\n getProjectionStyles(styleProp) {\n var _a, _b;\n if (!this.instance || this.isSVG)\n return void 0;\n if (!this.isVisible) {\n return hiddenVisibility;\n }\n const styles = {\n visibility: \"\"\n };\n const transformTemplate = this.getTransformTemplate();\n if (this.needsReset) {\n this.needsReset = false;\n styles.opacity = \"\";\n styles.pointerEvents = resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || \"\";\n styles.transform = transformTemplate ? transformTemplate(this.latestValues, \"\") : \"none\";\n return styles;\n }\n const lead = this.getLead();\n if (!this.projectionDelta || !this.layout || !lead.target) {\n const emptyStyles = {};\n if (this.options.layoutId) {\n emptyStyles.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1;\n emptyStyles.pointerEvents = resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || \"\";\n }\n if (this.hasProjected && !hasTransform(this.latestValues)) {\n emptyStyles.transform = transformTemplate ? transformTemplate({}, \"\") : \"none\";\n this.hasProjected = false;\n }\n return emptyStyles;\n }\n const valuesToRender = lead.animationValues || lead.latestValues;\n this.applyTransformsToTarget();\n styles.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);\n if (transformTemplate) {\n styles.transform = transformTemplate(valuesToRender, styles.transform);\n }\n const { x, y } = this.projectionDelta;\n styles.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`;\n if (lead.animationValues) {\n styles.opacity = lead === this ? (_b = (_a = valuesToRender.opacity) !== null && _a !== void 0 ? _a : this.latestValues.opacity) !== null && _b !== void 0 ? _b : 1 : this.preserveOpacity ? this.latestValues.opacity : valuesToRender.opacityExit;\n } else {\n styles.opacity = lead === this ? valuesToRender.opacity !== void 0 ? valuesToRender.opacity : \"\" : valuesToRender.opacityExit !== void 0 ? valuesToRender.opacityExit : 0;\n }\n for (const key in scaleCorrectors) {\n if (valuesToRender[key] === void 0)\n continue;\n const { correct, applyTo } = scaleCorrectors[key];\n const corrected = styles.transform === \"none\" ? valuesToRender[key] : correct(valuesToRender[key], lead);\n if (applyTo) {\n const num = applyTo.length;\n for (let i = 0; i < num; i++) {\n styles[applyTo[i]] = corrected;\n }\n } else {\n styles[key] = corrected;\n }\n }\n if (this.options.layoutId) {\n styles.pointerEvents = lead === this ? resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || \"\" : \"none\";\n }\n return styles;\n }\n clearSnapshot() {\n this.resumeFrom = this.snapshot = void 0;\n }\n // Only run on root\n resetTree() {\n this.root.nodes.forEach((node) => {\n var _a;\n return (_a = node.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop();\n });\n this.root.nodes.forEach(clearMeasurements);\n this.root.sharedNodes.clear();\n }\n };\n}\nfunction updateLayout(node) {\n node.updateLayout();\n}\nfunction notifyLayoutUpdate(node) {\n var _a;\n const snapshot = ((_a = node.resumeFrom) === null || _a === void 0 ? void 0 : _a.snapshot) || node.snapshot;\n if (node.isLead() && node.layout && snapshot && node.hasListeners(\"didUpdate\")) {\n const { layoutBox: layout2, measuredBox: measuredLayout } = node.layout;\n const { animationType } = node.options;\n const isShared = snapshot.source !== node.layout.source;\n if (animationType === \"size\") {\n eachAxis((axis) => {\n const axisSnapshot = isShared ? snapshot.measuredBox[axis] : snapshot.layoutBox[axis];\n const length = calcLength(axisSnapshot);\n axisSnapshot.min = layout2[axis].min;\n axisSnapshot.max = axisSnapshot.min + length;\n });\n } else if (shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout2)) {\n eachAxis((axis) => {\n const axisSnapshot = isShared ? snapshot.measuredBox[axis] : snapshot.layoutBox[axis];\n const length = calcLength(layout2[axis]);\n axisSnapshot.max = axisSnapshot.min + length;\n if (node.relativeTarget && !node.currentAnimation) {\n node.isProjectionDirty = true;\n node.relativeTarget[axis].max = node.relativeTarget[axis].min + length;\n }\n });\n }\n const layoutDelta = createDelta();\n calcBoxDelta(layoutDelta, layout2, snapshot.layoutBox);\n const visualDelta = createDelta();\n if (isShared) {\n calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measuredBox);\n } else {\n calcBoxDelta(visualDelta, layout2, snapshot.layoutBox);\n }\n const hasLayoutChanged = !isDeltaZero(layoutDelta);\n let hasRelativeTargetChanged = false;\n if (!node.resumeFrom) {\n const relativeParent = node.getClosestProjectingParent();\n if (relativeParent && !relativeParent.resumeFrom) {\n const { snapshot: parentSnapshot, layout: parentLayout } = relativeParent;\n if (parentSnapshot && parentLayout) {\n const relativeSnapshot = createBox();\n calcRelativePosition(relativeSnapshot, snapshot.layoutBox, parentSnapshot.layoutBox);\n const relativeLayout = createBox();\n calcRelativePosition(relativeLayout, layout2, parentLayout.layoutBox);\n if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) {\n hasRelativeTargetChanged = true;\n }\n if (relativeParent.options.layoutRoot) {\n node.relativeTarget = relativeLayout;\n node.relativeTargetOrigin = relativeSnapshot;\n node.relativeParent = relativeParent;\n }\n }\n }\n }\n node.notifyListeners(\"didUpdate\", {\n layout: layout2,\n snapshot,\n delta: visualDelta,\n layoutDelta,\n hasLayoutChanged,\n hasRelativeTargetChanged\n });\n } else if (node.isLead()) {\n const { onExitComplete } = node.options;\n onExitComplete && onExitComplete();\n }\n node.options.transition = void 0;\n}\nfunction propagateDirtyNodes(node) {\n if (isDebug) {\n metrics.totalNodes++;\n }\n if (!node.parent)\n return;\n if (!node.isProjecting()) {\n node.isProjectionDirty = node.parent.isProjectionDirty;\n }\n node.isSharedProjectionDirty || (node.isSharedProjectionDirty = Boolean(node.isProjectionDirty || node.parent.isProjectionDirty || node.parent.isSharedProjectionDirty));\n node.isTransformDirty || (node.isTransformDirty = node.parent.isTransformDirty);\n}\nfunction cleanDirtyNodes(node) {\n node.isProjectionDirty = node.isSharedProjectionDirty = node.isTransformDirty = false;\n}\nfunction clearSnapshot(node) {\n node.clearSnapshot();\n}\nfunction clearMeasurements(node) {\n node.clearMeasurements();\n}\nfunction clearIsLayoutDirty(node) {\n node.isLayoutDirty = false;\n}\nfunction resetTransformStyle(node) {\n const { visualElement } = node.options;\n if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) {\n visualElement.notify(\"BeforeLayoutMeasure\");\n }\n node.resetTransform();\n}\nfunction finishAnimation(node) {\n node.finishAnimation();\n node.targetDelta = node.relativeTarget = node.target = void 0;\n node.isProjectionDirty = true;\n}\nfunction resolveTargetDelta(node) {\n node.resolveTargetDelta();\n}\nfunction calcProjection(node) {\n node.calcProjection();\n}\nfunction resetSkewAndRotation(node) {\n node.resetSkewAndRotation();\n}\nfunction removeLeadSnapshots(stack) {\n stack.removeLeadSnapshot();\n}\nfunction mixAxisDelta(output, delta, p) {\n output.translate = mixNumber(delta.translate, 0, p);\n output.scale = mixNumber(delta.scale, 1, p);\n output.origin = delta.origin;\n output.originPoint = delta.originPoint;\n}\nfunction mixAxis(output, from, to, p) {\n output.min = mixNumber(from.min, to.min, p);\n output.max = mixNumber(from.max, to.max, p);\n}\nfunction mixBox(output, from, to, p) {\n mixAxis(output.x, from.x, to.x, p);\n mixAxis(output.y, from.y, to.y, p);\n}\nfunction hasOpacityCrossfade(node) {\n return node.animationValues && node.animationValues.opacityExit !== void 0;\n}\nvar defaultLayoutTransition = {\n duration: 0.45,\n ease: [0.4, 0, 0.1, 1]\n};\nvar userAgentContains = (string) => typeof navigator !== \"undefined\" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(string);\nvar roundPoint = userAgentContains(\"applewebkit/\") && !userAgentContains(\"chrome/\") ? Math.round : noop;\nfunction roundAxis(axis) {\n axis.min = roundPoint(axis.min);\n axis.max = roundPoint(axis.max);\n}\nfunction roundBox(box) {\n roundAxis(box.x);\n roundAxis(box.y);\n}\nfunction shouldAnimatePositionOnly(animationType, snapshot, layout2) {\n return animationType === \"position\" || animationType === \"preserve-aspect\" && !isNear(aspectRatio(snapshot), aspectRatio(layout2), 0.2);\n}\nfunction checkNodeWasScrollRoot(node) {\n var _a;\n return node !== node.root && ((_a = node.scroll) === null || _a === void 0 ? void 0 : _a.wasRoot);\n}\n\n// ../../../node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs\nvar DocumentProjectionNode = createProjectionNode2({\n attachResizeListener: (ref, notify2) => addDomEvent(ref, \"resize\", notify2),\n measureScroll: () => ({\n x: document.documentElement.scrollLeft || document.body.scrollLeft,\n y: document.documentElement.scrollTop || document.body.scrollTop\n }),\n checkIsScrollRoot: () => true\n});\n\n// ../../../node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs\nvar rootProjectionNode = {\n current: void 0\n};\nvar HTMLProjectionNode = createProjectionNode2({\n measureScroll: (instance) => ({\n x: instance.scrollLeft,\n y: instance.scrollTop\n }),\n defaultParent: () => {\n if (!rootProjectionNode.current) {\n const documentNode = new DocumentProjectionNode({});\n documentNode.mount(window);\n documentNode.setOptions({ layoutScroll: true });\n rootProjectionNode.current = documentNode;\n }\n return rootProjectionNode.current;\n },\n resetTransform: (instance, value) => {\n instance.style.transform = value !== void 0 ? value : \"none\";\n },\n checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === \"fixed\")\n});\n\n// ../../../node_modules/framer-motion/dist/es/motion/features/drag.mjs\nvar drag = {\n pan: {\n Feature: PanGesture\n },\n drag: {\n Feature: DragGesture,\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/gestures/hover.mjs\nfunction addHoverEvent(node, isActive) {\n const eventName = isActive ? \"pointerenter\" : \"pointerleave\";\n const callbackName = isActive ? \"onHoverStart\" : \"onHoverEnd\";\n const handleEvent = (event, info) => {\n if (event.pointerType === \"touch\" || isDragActive())\n return;\n const props = node.getProps();\n if (node.animationState && props.whileHover) {\n node.animationState.setActive(\"whileHover\", isActive);\n }\n const callback = props[callbackName];\n if (callback) {\n frame.postRender(() => callback(event, info));\n }\n };\n return addPointerEvent(node.current, eventName, handleEvent, {\n passive: !node.getProps()[callbackName]\n });\n}\nvar HoverGesture = class extends Feature {\n mount() {\n this.unmount = pipe(addHoverEvent(this.node, true), addHoverEvent(this.node, false));\n }\n unmount() {\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/gestures/focus.mjs\nvar FocusGesture = class extends Feature {\n constructor() {\n super(...arguments);\n this.isActive = false;\n }\n onFocus() {\n let isFocusVisible = false;\n try {\n isFocusVisible = this.node.current.matches(\":focus-visible\");\n } catch (e) {\n isFocusVisible = true;\n }\n if (!isFocusVisible || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", true);\n this.isActive = true;\n }\n onBlur() {\n if (!this.isActive || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", false);\n this.isActive = false;\n }\n mount() {\n this.unmount = pipe(addDomEvent(this.node.current, \"focus\", () => this.onFocus()), addDomEvent(this.node.current, \"blur\", () => this.onBlur()));\n }\n unmount() {\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.mjs\nvar 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\n// ../../../node_modules/framer-motion/dist/es/gestures/press.mjs\nfunction fireSyntheticPointerEvent(name, handler) {\n if (!handler)\n return;\n const syntheticPointerEvent = new PointerEvent(\"pointer\" + name);\n handler(syntheticPointerEvent, extractEventInfo(syntheticPointerEvent));\n}\nvar PressGesture = class extends Feature {\n constructor() {\n super(...arguments);\n this.removeStartListeners = noop;\n this.removeEndListeners = noop;\n this.removeAccessibleListeners = noop;\n this.startPointerPress = (startEvent, startInfo) => {\n if (this.isPressing)\n return;\n this.removeEndListeners();\n const props = this.node.getProps();\n const endPointerPress = (endEvent, endInfo) => {\n if (!this.checkPressEnd())\n return;\n const { onTap, onTapCancel, globalTapTarget } = this.node.getProps();\n const handler = !globalTapTarget && !isNodeOrChild(this.node.current, endEvent.target) ? onTapCancel : onTap;\n if (handler) {\n frame.update(() => handler(endEvent, endInfo));\n }\n };\n const removePointerUpListener = addPointerEvent(window, \"pointerup\", endPointerPress, {\n passive: !(props.onTap || props[\"onPointerUp\"])\n });\n const removePointerCancelListener = addPointerEvent(window, \"pointercancel\", (cancelEvent, cancelInfo) => this.cancelPress(cancelEvent, cancelInfo), {\n passive: !(props.onTapCancel || props[\"onPointerCancel\"])\n });\n this.removeEndListeners = pipe(removePointerUpListener, removePointerCancelListener);\n this.startPress(startEvent, startInfo);\n };\n this.startAccessiblePress = () => {\n const handleKeydown = (keydownEvent) => {\n if (keydownEvent.key !== \"Enter\" || this.isPressing)\n return;\n const handleKeyup = (keyupEvent) => {\n if (keyupEvent.key !== \"Enter\" || !this.checkPressEnd())\n return;\n fireSyntheticPointerEvent(\"up\", (event, info) => {\n const { onTap } = this.node.getProps();\n if (onTap) {\n frame.postRender(() => onTap(event, info));\n }\n });\n };\n this.removeEndListeners();\n this.removeEndListeners = addDomEvent(this.node.current, \"keyup\", handleKeyup);\n fireSyntheticPointerEvent(\"down\", (event, info) => {\n this.startPress(event, info);\n });\n };\n const removeKeydownListener = addDomEvent(this.node.current, \"keydown\", handleKeydown);\n const handleBlur = () => {\n if (!this.isPressing)\n return;\n fireSyntheticPointerEvent(\"cancel\", (cancelEvent, cancelInfo) => this.cancelPress(cancelEvent, cancelInfo));\n };\n const removeBlurListener = addDomEvent(this.node.current, \"blur\", handleBlur);\n this.removeAccessibleListeners = pipe(removeKeydownListener, removeBlurListener);\n };\n }\n startPress(event, info) {\n this.isPressing = true;\n const { onTapStart, whileTap } = this.node.getProps();\n if (whileTap && this.node.animationState) {\n this.node.animationState.setActive(\"whileTap\", true);\n }\n if (onTapStart) {\n frame.postRender(() => onTapStart(event, info));\n }\n }\n checkPressEnd() {\n this.removeEndListeners();\n this.isPressing = false;\n const props = this.node.getProps();\n if (props.whileTap && this.node.animationState) {\n this.node.animationState.setActive(\"whileTap\", false);\n }\n return !isDragActive();\n }\n cancelPress(event, info) {\n if (!this.checkPressEnd())\n return;\n const { onTapCancel } = this.node.getProps();\n if (onTapCancel) {\n frame.postRender(() => onTapCancel(event, info));\n }\n }\n mount() {\n const props = this.node.getProps();\n const removePointerListener = addPointerEvent(props.globalTapTarget ? window : this.node.current, \"pointerdown\", this.startPointerPress, {\n passive: !(props.onTapStart || props[\"onPointerStart\"])\n });\n const removeFocusListener = addDomEvent(this.node.current, \"focus\", this.startAccessiblePress);\n this.removeStartListeners = pipe(removePointerListener, removeFocusListener);\n }\n unmount() {\n this.removeStartListeners();\n this.removeEndListeners();\n this.removeAccessibleListeners();\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs\nvar observerCallbacks = /* @__PURE__ */ new WeakMap();\nvar observers = /* @__PURE__ */ new WeakMap();\nvar fireObserverCallback = (entry) => {\n const callback = observerCallbacks.get(entry.target);\n callback && callback(entry);\n};\nvar fireAllObserverCallbacks = (entries) => {\n entries.forEach(fireObserverCallback);\n};\nfunction initIntersectionObserver({ root, ...options }) {\n const lookupRoot = root || document;\n if (!observers.has(lookupRoot)) {\n observers.set(lookupRoot, {});\n }\n const rootObservers = observers.get(lookupRoot);\n const key = JSON.stringify(options);\n if (!rootObservers[key]) {\n rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options });\n }\n return rootObservers[key];\n}\nfunction observeIntersection(element, options, callback) {\n const rootInteresectionObserver = initIntersectionObserver(options);\n observerCallbacks.set(element, callback);\n rootInteresectionObserver.observe(element);\n return () => {\n observerCallbacks.delete(element);\n rootInteresectionObserver.unobserve(element);\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs\nvar thresholdNames = {\n some: 0,\n all: 1\n};\nvar InViewFeature = class extends Feature {\n constructor() {\n super(...arguments);\n this.hasEnteredView = false;\n this.isInView = false;\n }\n startObserver() {\n this.unmount();\n const { viewport = {} } = this.node.getProps();\n const { root, margin: rootMargin, amount = \"some\", once } = viewport;\n const options = {\n root: root ? root.current : void 0,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholdNames[amount]\n };\n const onIntersectionUpdate = (entry) => {\n const { isIntersecting } = entry;\n if (this.isInView === isIntersecting)\n return;\n this.isInView = isIntersecting;\n if (once && !isIntersecting && this.hasEnteredView) {\n return;\n } else if (isIntersecting) {\n this.hasEnteredView = true;\n }\n if (this.node.animationState) {\n this.node.animationState.setActive(\"whileInView\", isIntersecting);\n }\n const { onViewportEnter, onViewportLeave } = this.node.getProps();\n const callback = isIntersecting ? onViewportEnter : onViewportLeave;\n callback && callback(entry);\n };\n return observeIntersection(this.node.current, options, onIntersectionUpdate);\n }\n mount() {\n this.startObserver();\n }\n update() {\n if (typeof IntersectionObserver === \"undefined\")\n return;\n const { props, prevProps } = this.node;\n const hasOptionsChanged = [\"amount\", \"margin\", \"root\"].some(hasViewportOptionChanged(props, prevProps));\n if (hasOptionsChanged) {\n this.startObserver();\n }\n }\n unmount() {\n }\n};\nfunction hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) {\n return (name) => viewport[name] !== prevViewport[name];\n}\n\n// ../../../node_modules/framer-motion/dist/es/motion/features/gestures.mjs\nvar gestureAnimations = {\n inView: {\n Feature: InViewFeature\n },\n tap: {\n Feature: PressGesture\n },\n focus: {\n Feature: FocusGesture\n },\n hover: {\n Feature: HoverGesture\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/motion/features/layout.mjs\nvar layout = {\n layout: {\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs\nvar lowercaseSVGElements = [\n \"animate\",\n \"circle\",\n \"defs\",\n \"desc\",\n \"ellipse\",\n \"g\",\n \"image\",\n \"line\",\n \"filter\",\n \"marker\",\n \"mask\",\n \"metadata\",\n \"path\",\n \"pattern\",\n \"polygon\",\n \"polyline\",\n \"rect\",\n \"stop\",\n \"switch\",\n \"symbol\",\n \"svg\",\n \"text\",\n \"tspan\",\n \"use\",\n \"view\"\n];\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs\nfunction isSVGComponent(Component3) {\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 Component3 !== \"string\" || /**\n * If it contains a dash, the element is a custom HTML webcomponent.\n */\n Component3.includes(\"-\")\n ) {\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(Component3) > -1 || /**\n * If it contains a capital letter, it's an SVG component\n */\n /[A-Z]/u.test(Component3)\n ) {\n return true;\n }\n return false;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/html/utils/render.mjs\nfunction renderHTML(element, { style, vars }, styleProp, projection) {\n Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp));\n for (const key in vars) {\n element.style.setProperty(key, vars[key]);\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs\nvar camelCaseAttributes = /* @__PURE__ */ new Set([\n \"baseFrequency\",\n \"diffuseConstant\",\n \"kernelMatrix\",\n \"kernelUnitLength\",\n \"keySplines\",\n \"keyTimes\",\n \"limitingConeAngle\",\n \"markerHeight\",\n \"markerWidth\",\n \"numOctaves\",\n \"targetX\",\n \"targetY\",\n \"surfaceScale\",\n \"specularConstant\",\n \"specularExponent\",\n \"stdDeviation\",\n \"tableValues\",\n \"viewBox\",\n \"gradientTransform\",\n \"pathLength\",\n \"startOffset\",\n \"textLength\",\n \"lengthAdjust\"\n]);\n\n// ../../../node_modules/framer-motion/dist/es/render/svg/utils/render.mjs\nfunction renderSVG(element, renderState, _styleProp, projection) {\n renderHTML(element, renderState, void 0, projection);\n for (const key in renderState.attrs) {\n element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs\nfunction isForcedMotionValue(key, { layout: layout2, layoutId }) {\n return transformProps.has(key) || key.startsWith(\"origin\") || (layout2 || layoutId !== void 0) && (!!scaleCorrectors[key] || key === \"opacity\");\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n var _a;\n const { style } = props;\n const newValues = {};\n for (const key in style) {\n if (isMotionValue(style[key]) || prevProps.style && isMotionValue(prevProps.style[key]) || isForcedMotionValue(key, props) || ((_a = visualElement === null || visualElement === void 0 ? void 0 : visualElement.getValue(key)) === null || _a === void 0 ? void 0 : _a.liveStyle) !== void 0) {\n newValues[key] = style[key];\n }\n }\n if (visualElement && style && typeof style.willChange === \"string\") {\n visualElement.applyWillChange = false;\n }\n return newValues;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs\nfunction scrapeMotionValuesFromProps2(props, prevProps, visualElement) {\n const newValues = scrapeMotionValuesFromProps(props, prevProps, visualElement);\n for (const key in props) {\n if (isMotionValue(props[key]) || isMotionValue(prevProps[key])) {\n const targetKey = transformPropOrder.indexOf(key) !== -1 ? \"attr\" + key.charAt(0).toUpperCase() + key.substring(1) : key;\n newValues[targetKey] = props[key];\n }\n }\n return newValues;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs\nvar createHtmlRenderState = () => ({\n style: {},\n transform: {},\n transformOrigin: {},\n vars: {}\n});\n\n// ../../../node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs\nvar createSvgRenderState = () => ({\n ...createHtmlRenderState(),\n attrs: {}\n});\n\n// ../../../node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs\nfunction buildHTMLStyles(state2, latestValues, transformTemplate) {\n const { style, vars, transformOrigin } = state2;\n let hasTransform2 = false;\n let hasTransformOrigin = false;\n for (const key in latestValues) {\n const value = latestValues[key];\n if (transformProps.has(key)) {\n hasTransform2 = true;\n continue;\n } else if (isCSSVariableName(key)) {\n vars[key] = value;\n continue;\n } else {\n const valueAsType = getValueAsType(value, numberValueTypes[key]);\n if (key.startsWith(\"origin\")) {\n hasTransformOrigin = true;\n transformOrigin[key] = valueAsType;\n } else {\n style[key] = valueAsType;\n }\n }\n }\n if (!latestValues.transform) {\n if (hasTransform2 || transformTemplate) {\n style.transform = buildTransform(latestValues, state2.transform, transformTemplate);\n } else if (style.transform) {\n style.transform = \"none\";\n }\n }\n if (hasTransformOrigin) {\n const { originX = \"50%\", originY = \"50%\", originZ = 0 } = transformOrigin;\n style.transformOrigin = `${originX} ${originY} ${originZ}`;\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.mjs\nfunction calcOrigin2(origin, offset, size) {\n return typeof origin === \"string\" ? origin : px.transform(offset + size * origin);\n}\nfunction calcSVGTransformOrigin(dimensions, originX, originY) {\n const pxOriginX = calcOrigin2(originX, dimensions.x, dimensions.width);\n const pxOriginY = calcOrigin2(originY, dimensions.y, dimensions.height);\n return `${pxOriginX} ${pxOriginY}`;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/svg/utils/path.mjs\nvar dashKeys = {\n offset: \"stroke-dashoffset\",\n array: \"stroke-dasharray\"\n};\nvar camelKeys = {\n offset: \"strokeDashoffset\",\n array: \"strokeDasharray\"\n};\nfunction buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) {\n attrs.pathLength = 1;\n const keys2 = useDashCase ? dashKeys : camelKeys;\n attrs[keys2.offset] = px.transform(-offset);\n const pathLength = px.transform(length);\n const pathSpacing = px.transform(spacing);\n attrs[keys2.array] = `${pathLength} ${pathSpacing}`;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs\nfunction buildSVGAttrs(state2, {\n attrX,\n attrY,\n attrScale,\n originX,\n originY,\n pathLength,\n pathSpacing = 1,\n pathOffset = 0,\n // This is object creation, which we try to avoid per-frame.\n ...latest\n}, isSVGTag2, transformTemplate) {\n buildHTMLStyles(state2, latest, transformTemplate);\n if (isSVGTag2) {\n if (state2.style.viewBox) {\n state2.attrs.viewBox = state2.style.viewBox;\n }\n return;\n }\n state2.attrs = state2.style;\n state2.style = {};\n const { attrs, style, dimensions } = state2;\n if (attrs.transform) {\n if (dimensions)\n style.transform = attrs.transform;\n delete attrs.transform;\n }\n if (dimensions && (originX !== void 0 || originY !== void 0 || style.transform)) {\n style.transformOrigin = calcSVGTransformOrigin(dimensions, originX !== void 0 ? originX : 0.5, originY !== void 0 ? originY : 0.5);\n }\n if (attrX !== void 0)\n attrs.x = attrX;\n if (attrY !== void 0)\n attrs.y = attrY;\n if (attrScale !== void 0)\n attrs.scale = attrScale;\n if (pathLength !== void 0) {\n buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs\nvar isSVGTag = (tag) => typeof tag === \"string\" && tag.toLowerCase() === \"svg\";\n\n// ../../../node_modules/framer-motion/dist/es/render/svg/config-motion.mjs\nvar svgMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps2,\n createRenderState: createSvgRenderState,\n onMount: (props, instance, { renderState, latestValues }) => {\n frame.read(() => {\n try {\n renderState.dimensions = typeof instance.getBBox === \"function\" ? instance.getBBox() : instance.getBoundingClientRect();\n } catch (e) {\n renderState.dimensions = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n }\n });\n frame.render(() => {\n buildSVGAttrs(renderState, latestValues, isSVGTag(instance.tagName), props.transformTemplate);\n renderSVG(instance, renderState);\n });\n }\n })\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/html/config-motion.mjs\nvar htmlMotionConfig = {\n useVisualState: makeUseVisualState({\n applyWillChange: true,\n scrapeMotionValuesFromProps,\n createRenderState: createHtmlRenderState\n })\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/use-render.mjs\nimport { Fragment, useMemo as useMemo4, createElement } from \"react\";\n\n// ../../../node_modules/framer-motion/dist/es/render/html/use-props.mjs\nimport { useMemo as useMemo2 } from \"react\";\nfunction copyRawValuesOnly(target, source, props) {\n for (const key in source) {\n if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n target[key] = source[key];\n }\n }\n}\nfunction useInitialMotionValues({ transformTemplate }, visualState) {\n return useMemo2(() => {\n const state2 = createHtmlRenderState();\n buildHTMLStyles(state2, visualState, transformTemplate);\n return Object.assign({}, state2.vars, state2.style);\n }, [visualState]);\n}\nfunction useStyle(props, visualState) {\n const styleProp = props.style || {};\n const style = {};\n copyRawValuesOnly(style, styleProp, props);\n Object.assign(style, useInitialMotionValues(props, visualState));\n return style;\n}\nfunction useHTMLProps(props, visualState) {\n const htmlProps = {};\n const style = useStyle(props, visualState);\n if (props.drag && props.dragListener !== false) {\n htmlProps.draggable = false;\n style.userSelect = style.WebkitUserSelect = style.WebkitTouchCallout = \"none\";\n style.touchAction = props.drag === true ? \"none\" : `pan-${props.drag === \"x\" ? \"y\" : \"x\"}`;\n }\n if (props.tabIndex === void 0 && (props.onTap || props.onTapStart || props.whileTap)) {\n htmlProps.tabIndex = 0;\n }\n htmlProps.style = style;\n return htmlProps;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/svg/use-props.mjs\nimport { useMemo as useMemo3 } from \"react\";\nfunction useSVGProps(props, visualState, _isStatic, Component3) {\n const visualProps = useMemo3(() => {\n const state2 = createSvgRenderState();\n buildSVGAttrs(state2, visualState, isSVGTag(Component3), props.transformTemplate);\n return {\n ...state2.attrs,\n style: { ...state2.style }\n };\n }, [visualState]);\n if (props.style) {\n const rawStyles = {};\n copyRawValuesOnly(rawStyles, props.style, props);\n visualProps.style = { ...rawStyles, ...visualProps.style };\n }\n return visualProps;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/use-render.mjs\nfunction createUseRender(forwardMotionProps = false) {\n const useRender = (Component3, props, ref, { latestValues }, isStatic) => {\n const useVisualProps = isSVGComponent(Component3) ? useSVGProps : useHTMLProps;\n const visualProps = useVisualProps(props, latestValues, isStatic, Component3);\n const filteredProps = filterProps(props, typeof Component3 === \"string\", forwardMotionProps);\n const elementProps = Component3 !== Fragment ? { ...filteredProps, ...visualProps, ref } : {};\n const { children } = props;\n const renderedChildren = useMemo4(() => isMotionValue(children) ? children.get() : children, [children]);\n return createElement(Component3, {\n ...elementProps,\n children: renderedChildren\n });\n };\n return useRender;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/components/create-factory.mjs\nfunction createMotionComponentFactory(preloadedFeatures, createVisualElement) {\n return function createMotionComponent2(Component3, { forwardMotionProps } = { forwardMotionProps: false }) {\n const baseConfig = isSVGComponent(Component3) ? svgMotionConfig : htmlMotionConfig;\n const config = {\n ...baseConfig,\n preloadedFeatures,\n useRender: createUseRender(forwardMotionProps),\n createVisualElement,\n Component: Component3\n };\n return createRendererMotionComponent(config);\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs\nimport { Fragment as Fragment2 } from \"react\";\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs\nvar DOMVisualElement = class extends VisualElement {\n constructor() {\n super(...arguments);\n this.KeyframeResolver = DOMKeyframesResolver;\n }\n sortInstanceNodePosition(a, b) {\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n }\n getBaseTargetFromProps(props, key) {\n return props.style ? props.style[key] : void 0;\n }\n removeValueFromRenderState(key, { vars, style }) {\n delete vars[key];\n delete style[key];\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs\nfunction getComputedStyle2(element) {\n return window.getComputedStyle(element);\n}\nvar HTMLVisualElement = class extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"html\";\n this.applyWillChange = true;\n this.renderInstance = renderHTML;\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n } else {\n const computedStyle = getComputedStyle2(instance);\n const value = (isCSSVariableName(key) ? computedStyle.getPropertyValue(key) : computedStyle[key]) || 0;\n return typeof value === \"string\" ? value.trim() : value;\n }\n }\n measureInstanceViewportBox(instance, { transformPagePoint }) {\n return measureViewportBox(instance, transformPagePoint);\n }\n build(renderState, latestValues, props) {\n buildHTMLStyles(renderState, latestValues, props.transformTemplate);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n handleChildMotionValue() {\n if (this.childSubscription) {\n this.childSubscription();\n delete this.childSubscription;\n }\n const { children } = this.props;\n if (isMotionValue(children)) {\n this.childSubscription = children.on(\"change\", (latest) => {\n if (this.current)\n this.current.textContent = `${latest}`;\n });\n }\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs\nvar SVGVisualElement = class extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"svg\";\n this.isSVGTag = false;\n this.measureInstanceViewportBox = createBox;\n }\n getBaseTargetFromProps(props, key) {\n return props[key];\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n return instance.getAttribute(key);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps2(props, prevProps, visualElement);\n }\n build(renderState, latestValues, props) {\n buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate);\n }\n renderInstance(instance, renderState, styleProp, projection) {\n renderSVG(instance, renderState, styleProp, projection);\n }\n mount(instance) {\n this.isSVGTag = isSVGTag(instance.tagName);\n super.mount(instance);\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs\nvar createDomVisualElement = (Component3, options) => {\n return isSVGComponent(Component3) ? new SVGVisualElement(options) : new HTMLVisualElement(options, {\n allowProjection: Component3 !== Fragment2\n });\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/components/motion/create.mjs\nvar createMotionComponent = /* @__PURE__ */ createMotionComponentFactory({\n ...animations,\n ...gestureAnimations,\n ...drag,\n ...layout\n}, createDomVisualElement);\n\n// ../../../node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs\nvar motion = /* @__PURE__ */ createDOMMotionComponentProxy(createMotionComponent);\n\n// ../../../node_modules/framer-motion/dist/es/render/components/m/create.mjs\nvar createMinimalMotionComponent = /* @__PURE__ */ createMotionComponentFactory();\n\n// ../../../node_modules/framer-motion/dist/es/render/components/m/proxy.mjs\nvar m = /* @__PURE__ */ createDOMMotionComponentProxy(createMinimalMotionComponent);\n\n// ../../../node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs\nimport { jsx as jsx5, Fragment as Fragment3 } from \"react/jsx-runtime\";\nimport { useMemo as useMemo6, useRef as useRef4, useState, useContext as useContext8 } from \"react\";\n\n// ../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs\nimport { jsx as jsx4 } from \"react/jsx-runtime\";\nimport * as React2 from \"react\";\nimport { useId as useId3, useCallback as useCallback3, useMemo as useMemo5 } from \"react\";\n\n// ../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs\nimport { jsx as jsx3 } from \"react/jsx-runtime\";\nimport * as React from \"react\";\nimport { useId as useId2, useRef as useRef3, useContext as useContext7, useInsertionEffect as useInsertionEffect2 } from \"react\";\nvar PopChildMeasure = class extends React.Component {\n getSnapshotBeforeUpdate(prevProps) {\n const element = this.props.childRef.current;\n if (element && prevProps.isPresent && !this.props.isPresent) {\n const size = this.props.sizeRef.current;\n size.height = element.offsetHeight || 0;\n size.width = element.offsetWidth || 0;\n size.top = element.offsetTop;\n size.left = element.offsetLeft;\n }\n return null;\n }\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() {\n }\n render() {\n return this.props.children;\n }\n};\nfunction PopChild({ children, isPresent: isPresent2 }) {\n const id4 = useId2();\n const ref = useRef3(null);\n const size = useRef3({\n width: 0,\n height: 0,\n top: 0,\n left: 0\n });\n const { nonce } = useContext7(MotionConfigContext);\n useInsertionEffect2(() => {\n const { width, height, top, left } = size.current;\n if (isPresent2 || !ref.current || !width || !height)\n return;\n ref.current.dataset.motionPopId = id4;\n const style = document.createElement(\"style\");\n if (nonce)\n style.nonce = nonce;\n document.head.appendChild(style);\n if (style.sheet) {\n style.sheet.insertRule(`\n [data-motion-pop-id=\"${id4}\"] {\n position: absolute !important;\n width: ${width}px !important;\n height: ${height}px !important;\n top: ${top}px !important;\n left: ${left}px !important;\n }\n `);\n }\n return () => {\n document.head.removeChild(style);\n };\n }, [isPresent2]);\n return jsx3(PopChildMeasure, { isPresent: isPresent2, childRef: ref, sizeRef: size, children: React.cloneElement(children, { ref }) });\n}\n\n// ../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs\nvar PresenceChild = ({ children, initial, isPresent: isPresent2, onExitComplete, custom, presenceAffectsLayout, mode }) => {\n const presenceChildren = useConstant(newChildrenMap);\n const id4 = useId3();\n const memoizedOnExitComplete = useCallback3((childId) => {\n presenceChildren.set(childId, true);\n for (const isComplete of presenceChildren.values()) {\n if (!isComplete)\n return;\n }\n onExitComplete && onExitComplete();\n }, [presenceChildren, onExitComplete]);\n const context = useMemo5(\n () => ({\n id: id4,\n initial,\n isPresent: isPresent2,\n custom,\n onExitComplete: memoizedOnExitComplete,\n register: (childId) => {\n presenceChildren.set(childId, false);\n return () => presenceChildren.delete(childId);\n }\n }),\n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n presenceAffectsLayout ? [Math.random(), memoizedOnExitComplete] : [isPresent2, memoizedOnExitComplete]\n );\n useMemo5(() => {\n presenceChildren.forEach((_, key) => presenceChildren.set(key, false));\n }, [isPresent2]);\n React2.useEffect(() => {\n !isPresent2 && !presenceChildren.size && onExitComplete && onExitComplete();\n }, [isPresent2]);\n if (mode === \"popLayout\") {\n children = jsx4(PopChild, { isPresent: isPresent2, children });\n }\n return jsx4(PresenceContext.Provider, { value: context, children });\n};\nfunction newChildrenMap() {\n return /* @__PURE__ */ new Map();\n}\n\n// ../../../node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs\nimport { Children, isValidElement } from \"react\";\nvar getChildKey = (child) => child.key || \"\";\nfunction onlyElements(children) {\n const filtered = [];\n Children.forEach(children, (child) => {\n if (isValidElement(child))\n filtered.push(child);\n });\n return filtered;\n}\n\n// ../../../node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs\nvar AnimatePresence = ({ children, exitBeforeEnter, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = \"sync\" }) => {\n invariant(!exitBeforeEnter, \"Replace exitBeforeEnter with mode='wait'\");\n const presentChildren = useMemo6(() => onlyElements(children), [children]);\n const presentKeys = presentChildren.map(getChildKey);\n const isInitialRender = useRef4(true);\n const pendingPresentChildren = useRef4(presentChildren);\n const exitComplete = useConstant(() => /* @__PURE__ */ new Map());\n const [diffedChildren, setDiffedChildren] = useState(presentChildren);\n const [renderedChildren, setRenderedChildren] = useState(presentChildren);\n useIsomorphicLayoutEffect(() => {\n isInitialRender.current = false;\n pendingPresentChildren.current = presentChildren;\n for (let i = 0; i < renderedChildren.length; i++) {\n const key = getChildKey(renderedChildren[i]);\n if (!presentKeys.includes(key)) {\n if (exitComplete.get(key) !== true) {\n exitComplete.set(key, false);\n }\n } else {\n exitComplete.delete(key);\n }\n }\n }, [renderedChildren, presentKeys.length, presentKeys.join(\"-\")]);\n const exitingChildren = [];\n if (presentChildren !== diffedChildren) {\n let nextChildren = [...presentChildren];\n for (let i = 0; i < renderedChildren.length; i++) {\n const child = renderedChildren[i];\n const key = getChildKey(child);\n if (!presentKeys.includes(key)) {\n nextChildren.splice(i, 0, child);\n exitingChildren.push(child);\n }\n }\n if (mode === \"wait\" && exitingChildren.length) {\n nextChildren = exitingChildren;\n }\n setRenderedChildren(onlyElements(nextChildren));\n setDiffedChildren(presentChildren);\n return;\n }\n if (false) {\n console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.`);\n }\n const { forceRender } = useContext8(LayoutGroupContext);\n return jsx5(Fragment3, { children: renderedChildren.map((child) => {\n const key = getChildKey(child);\n const isPresent2 = presentChildren === renderedChildren || presentKeys.includes(key);\n const onExit = () => {\n if (exitComplete.has(key)) {\n exitComplete.set(key, true);\n } else {\n return;\n }\n let isEveryExitComplete = true;\n exitComplete.forEach((isExitComplete) => {\n if (!isExitComplete)\n isEveryExitComplete = false;\n });\n if (isEveryExitComplete) {\n forceRender === null || forceRender === void 0 ? void 0 : forceRender();\n setRenderedChildren(pendingPresentChildren.current);\n onExitComplete && onExitComplete();\n }\n };\n return jsx5(PresenceChild, { isPresent: isPresent2, initial: !isInitialRender.current || initial ? void 0 : false, custom: isPresent2 ? void 0 : custom, presenceAffectsLayout, mode, onExitComplete: isPresent2 ? void 0 : onExit, children: child }, key);\n }) });\n};\n\n// ../../../node_modules/framer-motion/dist/es/components/MotionConfig/index.mjs\nimport { jsx as jsx6 } from \"react/jsx-runtime\";\nimport { useContext as useContext9, useMemo as useMemo7 } from \"react\";\nfunction MotionConfig({ children, isValidProp, ...config }) {\n isValidProp && loadExternalIsValidProp(isValidProp);\n config = { ...useContext9(MotionConfigContext), ...config };\n config.isStatic = useConstant(() => config.isStatic);\n const context = useMemo7(() => config, [\n JSON.stringify(config.transition),\n config.transformPagePoint,\n config.reducedMotion\n ]);\n return jsx6(MotionConfigContext.Provider, { value: context, children });\n}\n\n// ../../../node_modules/framer-motion/dist/es/components/LazyMotion/index.mjs\nimport { jsx as jsx7 } from \"react/jsx-runtime\";\nimport { useState as useState2, useRef as useRef5, useEffect as useEffect5 } from \"react\";\nfunction LazyMotion({ children, features, strict = false }) {\n const [, setIsLoaded] = useState2(!isLazyBundle(features));\n const loadedRenderer = useRef5(void 0);\n if (!isLazyBundle(features)) {\n const { renderer, ...loadedFeatures } = features;\n loadedRenderer.current = renderer;\n loadFeatures(loadedFeatures);\n }\n useEffect5(() => {\n if (isLazyBundle(features)) {\n features().then(({ renderer, ...loadedFeatures }) => {\n loadFeatures(loadedFeatures);\n loadedRenderer.current = renderer;\n setIsLoaded(true);\n });\n }\n }, []);\n return jsx7(LazyContext.Provider, { value: { renderer: loadedRenderer.current, strict }, children });\n}\nfunction isLazyBundle(features) {\n return typeof features === \"function\";\n}\n\n// ../../../node_modules/framer-motion/dist/es/context/DeprecatedLayoutGroupContext.mjs\nimport { createContext as createContext7 } from \"react\";\nvar DeprecatedLayoutGroupContext = createContext7(null);\n\n// ../../../node_modules/framer-motion/dist/es/utils/use-force-update.mjs\nimport { useState as useState3, useCallback as useCallback4 } from \"react\";\n\n// ../../../node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs\nimport { useRef as useRef6 } from \"react\";\nfunction useIsMounted() {\n const isMounted = useRef6(false);\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n return isMounted;\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/use-force-update.mjs\nfunction useForceUpdate() {\n const isMounted = useIsMounted();\n const [forcedRenderCount, setForcedRenderCount] = useState3(0);\n const forceRender = useCallback4(() => {\n isMounted.current && setForcedRenderCount(forcedRenderCount + 1);\n }, [forcedRenderCount]);\n const deferredForceRender = useCallback4(() => frame.postRender(forceRender), [forceRender]);\n return [deferredForceRender, forcedRenderCount];\n}\n\n// ../../../node_modules/framer-motion/dist/es/components/LayoutGroup/index.mjs\nimport { jsx as jsx8 } from \"react/jsx-runtime\";\nimport { useContext as useContext10, useRef as useRef7, useMemo as useMemo8 } from \"react\";\n\n// ../../../node_modules/framer-motion/dist/es/projection/node/group.mjs\nvar notify = (node) => !node.isLayoutDirty && node.willUpdate(false);\nfunction nodeGroup() {\n const nodes = /* @__PURE__ */ new Set();\n const subscriptions = /* @__PURE__ */ new WeakMap();\n const dirtyAll = () => nodes.forEach(notify);\n return {\n add: (node) => {\n nodes.add(node);\n subscriptions.set(node, node.addEventListener(\"willUpdate\", dirtyAll));\n },\n remove: (node) => {\n nodes.delete(node);\n const unsubscribe = subscriptions.get(node);\n if (unsubscribe) {\n unsubscribe();\n subscriptions.delete(node);\n }\n dirtyAll();\n },\n dirty: dirtyAll\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/components/LayoutGroup/index.mjs\nvar shouldInheritGroup = (inherit) => inherit === true;\nvar shouldInheritId = (inherit) => shouldInheritGroup(inherit === true) || inherit === \"id\";\nvar LayoutGroup = ({ children, id: id4, inherit = true }) => {\n const layoutGroupContext = useContext10(LayoutGroupContext);\n const deprecatedLayoutGroupContext = useContext10(DeprecatedLayoutGroupContext);\n const [forceRender, key] = useForceUpdate();\n const context = useRef7(null);\n const upstreamId = layoutGroupContext.id || deprecatedLayoutGroupContext;\n if (context.current === null) {\n if (shouldInheritId(inherit) && upstreamId) {\n id4 = id4 ? upstreamId + \"-\" + id4 : upstreamId;\n }\n context.current = {\n id: id4,\n group: shouldInheritGroup(inherit) ? layoutGroupContext.group || nodeGroup() : nodeGroup()\n };\n }\n const memoizedContext = useMemo8(() => ({ ...context.current, forceRender }), [key]);\n return jsx8(LayoutGroupContext.Provider, { value: memoizedContext, children });\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/features-min.mjs\nvar domMin = {\n renderer: createDomVisualElement,\n ...animations\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/features-animation.mjs\nvar domAnimation = {\n renderer: createDomVisualElement,\n ...animations,\n ...gestureAnimations\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/features-max.mjs\nvar domMax = {\n ...domAnimation,\n ...drag,\n ...layout\n};\n\n// ../../../node_modules/framer-motion/dist/es/value/use-motion-value.mjs\nimport { useContext as useContext11, useState as useState4, useEffect as useEffect6 } from \"react\";\nfunction useMotionValue(initial) {\n const value = useConstant(() => motionValue(initial));\n const { isStatic } = useContext11(MotionConfigContext);\n if (isStatic) {\n const [, setLatest] = useState4(initial);\n useEffect6(() => value.on(\"change\", setLatest), []);\n }\n return value;\n}\n\n// ../../../node_modules/framer-motion/dist/es/value/use-combine-values.mjs\nfunction useCombineMotionValues(values, combineValues) {\n const value = useMotionValue(combineValues());\n const updateValue = () => value.set(combineValues());\n updateValue();\n useIsomorphicLayoutEffect(() => {\n const scheduleUpdate = () => frame.preRender(updateValue, false, true);\n const subscriptions = values.map((v) => v.on(\"change\", scheduleUpdate));\n return () => {\n subscriptions.forEach((unsubscribe) => unsubscribe());\n cancelFrame(updateValue);\n };\n });\n return value;\n}\n\n// ../../../node_modules/framer-motion/dist/es/value/use-motion-template.mjs\nfunction useMotionTemplate(fragments, ...values) {\n const numFragments = fragments.length;\n function buildValue() {\n let output = ``;\n for (let i = 0; i < numFragments; i++) {\n output += fragments[i];\n const value = values[i];\n if (value) {\n output += isMotionValue(value) ? value.get() : value;\n }\n }\n return output;\n }\n return useCombineMotionValues(values.filter(isMotionValue), buildValue);\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/transform.mjs\nvar isCustomValueType = (v) => {\n return v && typeof v === \"object\" && v.mix;\n};\nvar getMixer2 = (v) => isCustomValueType(v) ? v.mix : void 0;\nfunction transform(...args) {\n const useImmediate = !Array.isArray(args[0]);\n const argOffset = useImmediate ? 0 : -1;\n const inputValue = args[0 + argOffset];\n const inputRange = args[1 + argOffset];\n const outputRange = args[2 + argOffset];\n const options = args[3 + argOffset];\n const interpolator = interpolate(inputRange, outputRange, {\n mixer: getMixer2(outputRange[0]),\n ...options\n });\n return useImmediate ? interpolator(inputValue) : interpolator;\n}\n\n// ../../../node_modules/framer-motion/dist/es/value/use-computed.mjs\nfunction useComputed(compute) {\n collectMotionValues.current = [];\n compute();\n const value = useCombineMotionValues(collectMotionValues.current, compute);\n collectMotionValues.current = void 0;\n return value;\n}\n\n// ../../../node_modules/framer-motion/dist/es/value/use-transform.mjs\nfunction useTransform(input, inputRangeOrTransformer, outputRange, options) {\n if (typeof input === \"function\") {\n return useComputed(input);\n }\n const transformer = typeof inputRangeOrTransformer === \"function\" ? inputRangeOrTransformer : transform(inputRangeOrTransformer, outputRange, options);\n return Array.isArray(input) ? useListTransform(input, transformer) : useListTransform([input], ([latest]) => transformer(latest));\n}\nfunction useListTransform(values, transformer) {\n const latest = useConstant(() => []);\n return useCombineMotionValues(values, () => {\n latest.length = 0;\n const numValues = values.length;\n for (let i = 0; i < numValues; i++) {\n latest[i] = values[i].get();\n }\n return transformer(latest);\n });\n}\n\n// ../../../node_modules/framer-motion/dist/es/value/use-spring.mjs\nimport { useContext as useContext12, useRef as useRef8, useInsertionEffect as useInsertionEffect3 } from \"react\";\nfunction toNumber(v) {\n if (typeof v === \"number\")\n return v;\n return parseFloat(v);\n}\nfunction useSpring(source, config = {}) {\n const { isStatic } = useContext12(MotionConfigContext);\n const activeSpringAnimation = useRef8(null);\n const value = useMotionValue(isMotionValue(source) ? toNumber(source.get()) : source);\n const latestValue = useRef8(value.get());\n const latestSetter = useRef8(() => {\n });\n const startAnimation = () => {\n const animation = activeSpringAnimation.current;\n if (animation && animation.time === 0) {\n animation.sample(frameData.delta);\n }\n stopAnimation2();\n activeSpringAnimation.current = animateValue({\n keyframes: [value.get(), latestValue.current],\n velocity: value.getVelocity(),\n type: \"spring\",\n restDelta: 1e-3,\n restSpeed: 0.01,\n ...config,\n onUpdate: latestSetter.current\n });\n };\n const stopAnimation2 = () => {\n if (activeSpringAnimation.current) {\n activeSpringAnimation.current.stop();\n }\n };\n useInsertionEffect3(() => {\n return value.attach((v, set) => {\n if (isStatic)\n return set(v);\n latestValue.current = v;\n latestSetter.current = set;\n frame.update(startAnimation);\n return value.get();\n }, stopAnimation2);\n }, [JSON.stringify(config)]);\n useIsomorphicLayoutEffect(() => {\n if (isMotionValue(source)) {\n return source.on(\"change\", (v) => value.set(toNumber(v)));\n }\n }, [value]);\n return value;\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/use-motion-value-event.mjs\nimport { useInsertionEffect as useInsertionEffect4 } from \"react\";\nfunction useMotionValueEvent(value, event, callback) {\n useInsertionEffect4(() => value.on(event, callback), [value, event, callback]);\n}\n\n// ../../../node_modules/framer-motion/dist/es/value/use-velocity.mjs\nfunction useVelocity(value) {\n const velocity = useMotionValue(value.getVelocity());\n const updateVelocity = () => {\n const latest = value.getVelocity();\n velocity.set(latest);\n if (latest)\n frame.update(updateVelocity);\n };\n useMotionValueEvent(value, \"change\", () => {\n frame.update(updateVelocity, false, true);\n });\n return velocity;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/utils/resolve-element.mjs\nfunction resolveElements(elements, scope, selectorCache) {\n var _a;\n if (typeof elements === \"string\") {\n let root = document;\n if (scope) {\n invariant(Boolean(scope.current), \"Scope provided, but no element detected.\");\n root = scope.current;\n }\n if (selectorCache) {\n (_a = selectorCache[elements]) !== null && _a !== void 0 ? _a : selectorCache[elements] = root.querySelectorAll(elements);\n elements = selectorCache[elements];\n } else {\n elements = root.querySelectorAll(elements);\n }\n } else if (elements instanceof Element) {\n elements = [elements];\n }\n return Array.from(elements || []);\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/resize/handle-element.mjs\nvar resizeHandlers = /* @__PURE__ */ new WeakMap();\nvar observer;\nfunction getElementSize(target, borderBoxSize) {\n if (borderBoxSize) {\n const { inlineSize, blockSize } = borderBoxSize[0];\n return { width: inlineSize, height: blockSize };\n } else if (target instanceof SVGElement && \"getBBox\" in target) {\n return target.getBBox();\n } else {\n return {\n width: target.offsetWidth,\n height: target.offsetHeight\n };\n }\n}\nfunction notifyTarget({ target, contentRect, borderBoxSize }) {\n var _a;\n (_a = resizeHandlers.get(target)) === null || _a === void 0 ? void 0 : _a.forEach((handler) => {\n handler({\n target,\n contentSize: contentRect,\n get size() {\n return getElementSize(target, borderBoxSize);\n }\n });\n });\n}\nfunction notifyAll(entries) {\n entries.forEach(notifyTarget);\n}\nfunction createResizeObserver() {\n if (typeof ResizeObserver === \"undefined\")\n return;\n observer = new ResizeObserver(notifyAll);\n}\nfunction resizeElement(target, handler) {\n if (!observer)\n createResizeObserver();\n const elements = resolveElements(target);\n elements.forEach((element) => {\n let elementHandlers = resizeHandlers.get(element);\n if (!elementHandlers) {\n elementHandlers = /* @__PURE__ */ new Set();\n resizeHandlers.set(element, elementHandlers);\n }\n elementHandlers.add(handler);\n observer === null || observer === void 0 ? void 0 : observer.observe(element);\n });\n return () => {\n elements.forEach((element) => {\n const elementHandlers = resizeHandlers.get(element);\n elementHandlers === null || elementHandlers === void 0 ? void 0 : elementHandlers.delete(handler);\n if (!(elementHandlers === null || elementHandlers === void 0 ? void 0 : elementHandlers.size)) {\n observer === null || observer === void 0 ? void 0 : observer.unobserve(element);\n }\n });\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/resize/handle-window.mjs\nvar windowCallbacks = /* @__PURE__ */ new Set();\nvar windowResizeHandler;\nfunction createWindowResizeHandler() {\n windowResizeHandler = () => {\n const size = {\n width: window.innerWidth,\n height: window.innerHeight\n };\n const info = {\n target: window,\n size,\n contentSize: size\n };\n windowCallbacks.forEach((callback) => callback(info));\n };\n window.addEventListener(\"resize\", windowResizeHandler);\n}\nfunction resizeWindow(callback) {\n windowCallbacks.add(callback);\n if (!windowResizeHandler)\n createWindowResizeHandler();\n return () => {\n windowCallbacks.delete(callback);\n if (!windowCallbacks.size && windowResizeHandler) {\n windowResizeHandler = void 0;\n }\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/resize/index.mjs\nfunction resize(a, b) {\n return typeof a === \"function\" ? resizeWindow(a) : resizeElement(a, b);\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/scroll/info.mjs\nvar maxElapsed2 = 50;\nvar createAxisInfo = () => ({\n current: 0,\n offset: [],\n progress: 0,\n scrollLength: 0,\n targetOffset: 0,\n targetLength: 0,\n containerLength: 0,\n velocity: 0\n});\nvar createScrollInfo = () => ({\n time: 0,\n x: createAxisInfo(),\n y: createAxisInfo()\n});\nvar keys = {\n x: {\n length: \"Width\",\n position: \"Left\"\n },\n y: {\n length: \"Height\",\n position: \"Top\"\n }\n};\nfunction updateAxisInfo(element, axisName, info, time2) {\n const axis = info[axisName];\n const { length, position } = keys[axisName];\n const prev = axis.current;\n const prevTime = info.time;\n axis.current = element[`scroll${position}`];\n axis.scrollLength = element[`scroll${length}`] - element[`client${length}`];\n axis.offset.length = 0;\n axis.offset[0] = 0;\n axis.offset[1] = axis.scrollLength;\n axis.progress = progress(0, axis.scrollLength, axis.current);\n const elapsed = time2 - prevTime;\n axis.velocity = elapsed > maxElapsed2 ? 0 : velocityPerSecond(axis.current - prev, elapsed);\n}\nfunction updateScrollInfo(element, info, time2) {\n updateAxisInfo(element, \"x\", info, time2);\n updateAxisInfo(element, \"y\", info, time2);\n info.time = time2;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs\nfunction calcInset(element, container) {\n const inset = { x: 0, y: 0 };\n let current = element;\n while (current && current !== container) {\n if (current instanceof HTMLElement) {\n inset.x += current.offsetLeft;\n inset.y += current.offsetTop;\n current = current.offsetParent;\n } else if (current.tagName === \"svg\") {\n const svgBoundingBox = current.getBoundingClientRect();\n current = current.parentElement;\n const parentBoundingBox = current.getBoundingClientRect();\n inset.x += svgBoundingBox.left - parentBoundingBox.left;\n inset.y += svgBoundingBox.top - parentBoundingBox.top;\n } else if (current instanceof SVGGraphicsElement) {\n const { x, y } = current.getBBox();\n inset.x += x;\n inset.y += y;\n let svg = null;\n let parent = current.parentNode;\n while (!svg) {\n if (parent.tagName === \"svg\") {\n svg = parent;\n }\n parent = current.parentNode;\n }\n current = svg;\n } else {\n break;\n }\n }\n return inset;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs\nvar ScrollOffset = {\n Enter: [\n [0, 1],\n [1, 1]\n ],\n Exit: [\n [0, 0],\n [1, 0]\n ],\n Any: [\n [1, 0],\n [0, 1]\n ],\n All: [\n [0, 0],\n [1, 1]\n ]\n};\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs\nvar namedEdges = {\n start: 0,\n center: 0.5,\n end: 1\n};\nfunction resolveEdge(edge, length, inset = 0) {\n let delta = 0;\n if (edge in namedEdges) {\n edge = namedEdges[edge];\n }\n if (typeof edge === \"string\") {\n const asNumber2 = parseFloat(edge);\n if (edge.endsWith(\"px\")) {\n delta = asNumber2;\n } else if (edge.endsWith(\"%\")) {\n edge = asNumber2 / 100;\n } else if (edge.endsWith(\"vw\")) {\n delta = asNumber2 / 100 * document.documentElement.clientWidth;\n } else if (edge.endsWith(\"vh\")) {\n delta = asNumber2 / 100 * document.documentElement.clientHeight;\n } else {\n edge = asNumber2;\n }\n }\n if (typeof edge === \"number\") {\n delta = length * edge;\n }\n return inset + delta;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs\nvar defaultOffset2 = [0, 0];\nfunction resolveOffset(offset, containerLength, targetLength, targetInset) {\n let offsetDefinition = Array.isArray(offset) ? offset : defaultOffset2;\n let targetPoint = 0;\n let containerPoint = 0;\n if (typeof offset === \"number\") {\n offsetDefinition = [offset, offset];\n } else if (typeof offset === \"string\") {\n offset = offset.trim();\n if (offset.includes(\" \")) {\n offsetDefinition = offset.split(\" \");\n } else {\n offsetDefinition = [offset, namedEdges[offset] ? offset : `0`];\n }\n }\n targetPoint = resolveEdge(offsetDefinition[0], targetLength, targetInset);\n containerPoint = resolveEdge(offsetDefinition[1], containerLength);\n return targetPoint - containerPoint;\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs\nvar point = { x: 0, y: 0 };\nfunction getTargetSize(target) {\n return \"getBBox\" in target && target.tagName !== \"svg\" ? target.getBBox() : { width: target.clientWidth, height: target.clientHeight };\n}\nfunction resolveOffsets(container, info, options) {\n const { offset: offsetDefinition = ScrollOffset.All } = options;\n const { target = container, axis = \"y\" } = options;\n const lengthLabel = axis === \"y\" ? \"height\" : \"width\";\n const inset = target !== container ? calcInset(target, container) : point;\n const targetSize = target === container ? { width: container.scrollWidth, height: container.scrollHeight } : getTargetSize(target);\n const containerSize = {\n width: container.clientWidth,\n height: container.clientHeight\n };\n info[axis].offset.length = 0;\n let hasChanged = !info[axis].interpolate;\n const numOffsets = offsetDefinition.length;\n for (let i = 0; i < numOffsets; i++) {\n const offset = resolveOffset(offsetDefinition[i], containerSize[lengthLabel], targetSize[lengthLabel], inset[axis]);\n if (!hasChanged && offset !== info[axis].interpolatorOffsets[i]) {\n hasChanged = true;\n }\n info[axis].offset[i] = offset;\n }\n if (hasChanged) {\n info[axis].interpolate = interpolate(info[axis].offset, defaultOffset(offsetDefinition));\n info[axis].interpolatorOffsets = [...info[axis].offset];\n }\n info[axis].progress = info[axis].interpolate(info[axis].current);\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs\nfunction measure(container, target = container, info) {\n info.x.targetOffset = 0;\n info.y.targetOffset = 0;\n if (target !== container) {\n let node = target;\n while (node && node !== container) {\n info.x.targetOffset += node.offsetLeft;\n info.y.targetOffset += node.offsetTop;\n node = node.offsetParent;\n }\n }\n info.x.targetLength = target === container ? target.scrollWidth : target.clientWidth;\n info.y.targetLength = target === container ? target.scrollHeight : target.clientHeight;\n info.x.containerLength = container.clientWidth;\n info.y.containerLength = container.clientHeight;\n if (false) {\n if (container && target && target !== container) {\n warnOnce(getComputedStyle(container).position !== \"static\", \"Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.\");\n }\n }\n}\nfunction createOnScrollHandler(element, onScroll, info, options = {}) {\n return {\n measure: () => measure(element, options.target, info),\n update: (time2) => {\n updateScrollInfo(element, info, time2);\n if (options.offset || options.target) {\n resolveOffsets(element, info, options);\n }\n },\n notify: () => onScroll(info)\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/scroll/track.mjs\nvar scrollListeners = /* @__PURE__ */ new WeakMap();\nvar resizeListeners = /* @__PURE__ */ new WeakMap();\nvar onScrollHandlers = /* @__PURE__ */ new WeakMap();\nvar getEventTarget = (element) => element === document.documentElement ? window : element;\nfunction scrollInfo(onScroll, { container = document.documentElement, ...options } = {}) {\n let containerHandlers = onScrollHandlers.get(container);\n if (!containerHandlers) {\n containerHandlers = /* @__PURE__ */ new Set();\n onScrollHandlers.set(container, containerHandlers);\n }\n const info = createScrollInfo();\n const containerHandler = createOnScrollHandler(container, onScroll, info, options);\n containerHandlers.add(containerHandler);\n if (!scrollListeners.has(container)) {\n const measureAll = () => {\n for (const handler of containerHandlers)\n handler.measure();\n };\n const updateAll = () => {\n for (const handler of containerHandlers) {\n handler.update(frameData.timestamp);\n }\n };\n const notifyAll2 = () => {\n for (const handler of containerHandlers)\n handler.notify();\n };\n const listener2 = () => {\n frame.read(measureAll, false, true);\n frame.read(updateAll, false, true);\n frame.update(notifyAll2, false, true);\n };\n scrollListeners.set(container, listener2);\n const target = getEventTarget(container);\n window.addEventListener(\"resize\", listener2, { passive: true });\n if (container !== document.documentElement) {\n resizeListeners.set(container, resize(container, listener2));\n }\n target.addEventListener(\"scroll\", listener2, { passive: true });\n }\n const listener = scrollListeners.get(container);\n frame.read(listener, false, true);\n return () => {\n var _a;\n cancelFrame(listener);\n const currentHandlers = onScrollHandlers.get(container);\n if (!currentHandlers)\n return;\n currentHandlers.delete(containerHandler);\n if (currentHandlers.size)\n return;\n const scrollListener = scrollListeners.get(container);\n scrollListeners.delete(container);\n if (scrollListener) {\n getEventTarget(container).removeEventListener(\"scroll\", scrollListener);\n (_a = resizeListeners.get(container)) === null || _a === void 0 ? void 0 : _a();\n window.removeEventListener(\"resize\", scrollListener);\n }\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/scroll/observe.mjs\nfunction observeTimeline(update, timeline) {\n let prevProgress;\n const onFrame = () => {\n const { currentTime } = timeline;\n const percentage = currentTime === null ? 0 : currentTime.value;\n const progress2 = percentage / 100;\n if (prevProgress !== progress2) {\n update(progress2);\n }\n prevProgress = progress2;\n };\n frame.update(onFrame, true);\n return () => cancelFrame(onFrame);\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/scroll/index.mjs\nfunction scrollTimelineFallback({ source, container, axis = \"y\" }) {\n if (source)\n container = source;\n const currentTime = { value: 0 };\n const cancel = scrollInfo((info) => {\n currentTime.value = info[axis].progress * 100;\n }, { container, axis });\n return { currentTime, cancel };\n}\nvar timelineCache = /* @__PURE__ */ new Map();\nfunction getTimeline({ source, container = document.documentElement, axis = \"y\" } = {}) {\n if (source)\n container = source;\n if (!timelineCache.has(container)) {\n timelineCache.set(container, {});\n }\n const elementCache = timelineCache.get(container);\n if (!elementCache[axis]) {\n elementCache[axis] = supportsScrollTimeline() ? new ScrollTimeline({ source: container, axis }) : scrollTimelineFallback({ source: container, axis });\n }\n return elementCache[axis];\n}\nfunction isOnScrollWithInfo(onScroll) {\n return onScroll.length === 2;\n}\nfunction needsElementTracking(options) {\n return options && (options.target || options.offset);\n}\nfunction scrollFunction(onScroll, options) {\n if (isOnScrollWithInfo(onScroll) || needsElementTracking(options)) {\n return scrollInfo((info) => {\n onScroll(info[options.axis].progress, info);\n }, options);\n } else {\n return observeTimeline(onScroll, getTimeline(options));\n }\n}\nfunction scrollAnimation(animation, options) {\n if (needsElementTracking(options)) {\n animation.pause();\n return scrollInfo((info) => {\n animation.time = animation.duration * info[options.axis].progress;\n }, options);\n } else {\n const timeline = getTimeline(options);\n return animation.attachTimeline(timeline, (valueAnimation) => {\n valueAnimation.pause();\n return observeTimeline((progress2) => {\n valueAnimation.time = valueAnimation.duration * progress2;\n }, timeline);\n });\n }\n}\nfunction scroll(onScroll, { axis = \"y\", ...options } = {}) {\n const optionsWithDefaults = { axis, ...options };\n return typeof onScroll === \"function\" ? scrollFunction(onScroll, optionsWithDefaults) : scrollAnimation(onScroll, optionsWithDefaults);\n}\n\n// ../../../node_modules/framer-motion/dist/es/value/use-scroll.mjs\nimport { useEffect as useEffect7 } from \"react\";\nfunction refWarning(name, ref) {\n warning(Boolean(!ref || ref.current), `You have defined a ${name} options but the provided ref is not yet hydrated, probably because it's defined higher up the tree. Try calling useScroll() in the same component as the ref, or setting its \\`layoutEffect: false\\` option.`);\n}\nvar createScrollMotionValues = () => ({\n scrollX: motionValue(0),\n scrollY: motionValue(0),\n scrollXProgress: motionValue(0),\n scrollYProgress: motionValue(0)\n});\nfunction useScroll({ container, target, layoutEffect = true, ...options } = {}) {\n const values = useConstant(createScrollMotionValues);\n const useLifecycleEffect = layoutEffect ? useIsomorphicLayoutEffect : useEffect7;\n useLifecycleEffect(() => {\n refWarning(\"target\", target);\n refWarning(\"container\", container);\n return scroll((_progress, { x, y }) => {\n values.scrollX.set(x.current);\n values.scrollXProgress.set(x.progress);\n values.scrollY.set(y.current);\n values.scrollYProgress.set(y.progress);\n }, {\n ...options,\n container: (container === null || container === void 0 ? void 0 : container.current) || void 0,\n target: (target === null || target === void 0 ? void 0 : target.current) || void 0\n });\n }, [container, target, JSON.stringify(options.offset)]);\n return values;\n}\n\n// ../../../node_modules/framer-motion/dist/es/value/scroll/use-element-scroll.mjs\nfunction useElementScroll(ref) {\n if (false) {\n warnOnce(false, \"useElementScroll is deprecated. Convert to useScroll({ container: ref }).\");\n }\n return useScroll({ container: ref });\n}\n\n// ../../../node_modules/framer-motion/dist/es/value/scroll/use-viewport-scroll.mjs\nfunction useViewportScroll() {\n if (false) {\n warnOnce(false, \"useViewportScroll is deprecated. Convert to useScroll().\");\n }\n return useScroll();\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/use-animation-frame.mjs\nimport { useRef as useRef9, useContext as useContext13, useEffect as useEffect8 } from \"react\";\nfunction useAnimationFrame(callback) {\n const initialTimestamp = useRef9(0);\n const { isStatic } = useContext13(MotionConfigContext);\n useEffect8(() => {\n if (isStatic)\n return;\n const provideTimeSinceStart = ({ timestamp, delta }) => {\n if (!initialTimestamp.current)\n initialTimestamp.current = timestamp;\n callback(timestamp - initialTimestamp.current, delta);\n };\n frame.update(provideTimeSinceStart, true);\n return () => cancelFrame(provideTimeSinceStart);\n }, [callback]);\n}\n\n// ../../../node_modules/framer-motion/dist/es/value/use-time.mjs\nfunction useTime() {\n const time2 = useMotionValue(0);\n useAnimationFrame((t) => time2.set(t));\n return time2;\n}\n\n// ../../../node_modules/framer-motion/dist/es/value/use-will-change/WillChangeMotionValue.mjs\nvar WillChangeMotionValue = class extends MotionValue {\n constructor() {\n super(...arguments);\n this.values = [];\n }\n add(name) {\n const styleName = getWillChangeName(name);\n if (styleName) {\n addUniqueItem(this.values, styleName);\n this.update();\n }\n }\n update() {\n this.set(this.values.length ? this.values.join(\", \") : \"auto\");\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/value/use-will-change/index.mjs\nfunction useWillChange() {\n return useConstant(() => new WillChangeMotionValue(\"auto\"));\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs\nimport { useState as useState5 } from \"react\";\nfunction useReducedMotion() {\n !hasReducedMotionListener.current && initPrefersReducedMotion();\n const [shouldReduceMotion] = useState5(prefersReducedMotion.current);\n if (false) {\n warnOnce(shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\");\n }\n return shouldReduceMotion;\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs\nimport { useContext as useContext14 } from \"react\";\nfunction useReducedMotionConfig() {\n const reducedMotionPreference = useReducedMotion();\n const { reducedMotion } = useContext14(MotionConfigContext);\n if (reducedMotion === \"never\") {\n return false;\n } else if (reducedMotion === \"always\") {\n return true;\n } else {\n return reducedMotionPreference;\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs\nfunction stopAnimation(visualElement) {\n visualElement.values.forEach((value) => value.stop());\n}\nfunction setVariants(visualElement, variantLabels) {\n const reversedLabels = [...variantLabels].reverse();\n reversedLabels.forEach((key) => {\n const variant = visualElement.getVariant(key);\n variant && setTarget(visualElement, variant);\n if (visualElement.variantChildren) {\n visualElement.variantChildren.forEach((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}\nfunction animationControls() {\n let hasMounted = false;\n const subscribers = /* @__PURE__ */ new Set();\n const controls = {\n subscribe(visualElement) {\n subscribers.add(visualElement);\n return () => void subscribers.delete(visualElement);\n },\n start(definition, transitionOverride) {\n invariant(hasMounted, \"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.\");\n const animations2 = [];\n subscribers.forEach((visualElement) => {\n animations2.push(animateVisualElement(visualElement, definition, {\n transitionOverride\n }));\n });\n return Promise.all(animations2);\n },\n set(definition) {\n invariant(hasMounted, \"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.\");\n return subscribers.forEach((visualElement) => {\n setValues(visualElement, definition);\n });\n },\n stop() {\n subscribers.forEach((visualElement) => {\n stopAnimation(visualElement);\n });\n },\n mount() {\n hasMounted = true;\n return () => {\n hasMounted = false;\n controls.stop();\n };\n }\n };\n return controls;\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs\nimport { useEffect as useEffect9 } from \"react\";\nfunction useUnmountEffect(callback) {\n return useEffect9(() => () => callback(), []);\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/wrap.mjs\nvar wrap = (min, max, v) => {\n const rangeSize = max - min;\n return ((v - min) % rangeSize + rangeSize) % rangeSize + min;\n};\n\n// ../../../node_modules/framer-motion/dist/es/easing/utils/create-generator-easing.mjs\nfunction createGeneratorEasing(options, scale2 = 100, createGenerator) {\n const generator = createGenerator({ ...options, keyframes: [0, scale2] });\n const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n return {\n type: \"keyframes\",\n ease: (progress2) => generator.next(duration * progress2).value / scale2,\n duration: millisecondsToSeconds(duration)\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs\nfunction isDOMKeyframes(keyframes2) {\n return typeof keyframes2 === \"object\" && !Array.isArray(keyframes2);\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.mjs\nfunction resolveSubjects(subject, keyframes2, scope, selectorCache) {\n if (typeof subject === \"string\" && isDOMKeyframes(keyframes2)) {\n return resolveElements(subject, scope, selectorCache);\n } else if (subject instanceof NodeList) {\n return Array.from(subject);\n } else if (Array.isArray(subject)) {\n return subject;\n } else {\n return [subject];\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs\nfunction calcNextTime(current, next, prev, labels) {\n var _a;\n if (typeof next === \"number\") {\n return next;\n } else if (next.startsWith(\"-\") || next.startsWith(\"+\")) {\n return Math.max(0, current + parseFloat(next));\n } else if (next === \"<\") {\n return prev;\n } else {\n return (_a = labels.get(next)) !== null && _a !== void 0 ? _a : current;\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/easing/utils/get-easing-for-segment.mjs\nfunction getEasingForSegment(easing, i) {\n return isEasingArray(easing) ? easing[wrap(0, easing.length, i)] : easing;\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/sequence/utils/edit.mjs\nfunction eraseKeyframes(sequence, startTime, endTime) {\n for (let i = 0; i < sequence.length; i++) {\n const keyframe = sequence[i];\n if (keyframe.at > startTime && keyframe.at < endTime) {\n removeItem(sequence, keyframe);\n i--;\n }\n }\n}\nfunction addKeyframes(sequence, keyframes2, easing, offset, startTime, endTime) {\n eraseKeyframes(sequence, startTime, endTime);\n for (let i = 0; i < keyframes2.length; i++) {\n sequence.push({\n value: keyframes2[i],\n at: mixNumber(startTime, endTime, offset[i]),\n easing: getEasingForSegment(easing, i)\n });\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/sequence/utils/sort.mjs\nfunction compareByTime(a, b) {\n if (a.at === b.at) {\n if (a.value === null)\n return 1;\n if (b.value === null)\n return -1;\n return 0;\n } else {\n return a.at - b.at;\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/sequence/create.mjs\nvar defaultSegmentEasing = \"easeInOut\";\nfunction createAnimationsFromSequence(sequence, { defaultTransition = {}, ...sequenceTransition } = {}, scope, generators2) {\n const defaultDuration = defaultTransition.duration || 0.3;\n const animationDefinitions = /* @__PURE__ */ new Map();\n const sequences = /* @__PURE__ */ new Map();\n const elementCache = {};\n const timeLabels = /* @__PURE__ */ new Map();\n let prevTime = 0;\n let currentTime = 0;\n let totalDuration = 0;\n for (let i = 0; i < sequence.length; i++) {\n const segment = sequence[i];\n if (typeof segment === \"string\") {\n timeLabels.set(segment, currentTime);\n continue;\n } else if (!Array.isArray(segment)) {\n timeLabels.set(segment.name, calcNextTime(currentTime, segment.at, prevTime, timeLabels));\n continue;\n }\n let [subject, keyframes2, transition = {}] = segment;\n if (transition.at !== void 0) {\n currentTime = calcNextTime(currentTime, transition.at, prevTime, timeLabels);\n }\n let maxDuration3 = 0;\n const resolveValueSequence = (valueKeyframes, valueTransition, valueSequence, elementIndex = 0, numSubjects = 0) => {\n const valueKeyframesAsList = keyframesAsList(valueKeyframes);\n const { delay: delay2 = 0, times = defaultOffset(valueKeyframesAsList), type = \"keyframes\", ...remainingTransition } = valueTransition;\n let { ease: ease2 = defaultTransition.ease || \"easeOut\", duration } = valueTransition;\n const calculatedDelay = typeof delay2 === \"function\" ? delay2(elementIndex, numSubjects) : delay2;\n const numKeyframes = valueKeyframesAsList.length;\n const createGenerator = isGenerator(type) ? type : generators2 === null || generators2 === void 0 ? void 0 : generators2[type];\n if (numKeyframes <= 2 && createGenerator) {\n let absoluteDelta = 100;\n if (numKeyframes === 2 && isNumberKeyframesArray(valueKeyframesAsList)) {\n const delta = valueKeyframesAsList[1] - valueKeyframesAsList[0];\n absoluteDelta = Math.abs(delta);\n }\n const springTransition = { ...remainingTransition };\n if (duration !== void 0) {\n springTransition.duration = secondsToMilliseconds(duration);\n }\n const springEasing = createGeneratorEasing(springTransition, absoluteDelta, createGenerator);\n ease2 = springEasing.ease;\n duration = springEasing.duration;\n }\n duration !== null && duration !== void 0 ? duration : duration = defaultDuration;\n const startTime = currentTime + calculatedDelay;\n const targetTime = startTime + duration;\n if (times.length === 1 && times[0] === 0) {\n times[1] = 1;\n }\n const remainder = times.length - valueKeyframesAsList.length;\n remainder > 0 && fillOffset(times, remainder);\n valueKeyframesAsList.length === 1 && valueKeyframesAsList.unshift(null);\n addKeyframes(valueSequence, valueKeyframesAsList, ease2, times, startTime, targetTime);\n maxDuration3 = Math.max(calculatedDelay + duration, maxDuration3);\n totalDuration = Math.max(targetTime, totalDuration);\n };\n if (isMotionValue(subject)) {\n const subjectSequence = getSubjectSequence(subject, sequences);\n resolveValueSequence(keyframes2, transition, getValueSequence(\"default\", subjectSequence));\n } else {\n const subjects = resolveSubjects(subject, keyframes2, scope, elementCache);\n const numSubjects = subjects.length;\n for (let subjectIndex = 0; subjectIndex < numSubjects; subjectIndex++) {\n keyframes2 = keyframes2;\n transition = transition;\n const thisSubject = subjects[subjectIndex];\n const subjectSequence = getSubjectSequence(thisSubject, sequences);\n for (const key in keyframes2) {\n resolveValueSequence(keyframes2[key], getValueTransition2(transition, key), getValueSequence(key, subjectSequence), subjectIndex, numSubjects);\n }\n }\n }\n prevTime = currentTime;\n currentTime += maxDuration3;\n }\n sequences.forEach((valueSequences, element) => {\n for (const key in valueSequences) {\n const valueSequence = valueSequences[key];\n valueSequence.sort(compareByTime);\n const keyframes2 = [];\n const valueOffset = [];\n const valueEasing = [];\n for (let i = 0; i < valueSequence.length; i++) {\n const { at, value, easing } = valueSequence[i];\n keyframes2.push(value);\n valueOffset.push(progress(0, totalDuration, at));\n valueEasing.push(easing || \"easeOut\");\n }\n if (valueOffset[0] !== 0) {\n valueOffset.unshift(0);\n keyframes2.unshift(keyframes2[0]);\n valueEasing.unshift(defaultSegmentEasing);\n }\n if (valueOffset[valueOffset.length - 1] !== 1) {\n valueOffset.push(1);\n keyframes2.push(null);\n }\n if (!animationDefinitions.has(element)) {\n animationDefinitions.set(element, {\n keyframes: {},\n transition: {}\n });\n }\n const definition = animationDefinitions.get(element);\n definition.keyframes[key] = keyframes2;\n definition.transition[key] = {\n ...defaultTransition,\n duration: totalDuration,\n ease: valueEasing,\n times: valueOffset,\n ...sequenceTransition\n };\n }\n });\n return animationDefinitions;\n}\nfunction getSubjectSequence(subject, sequences) {\n !sequences.has(subject) && sequences.set(subject, {});\n return sequences.get(subject);\n}\nfunction getValueSequence(name, sequences) {\n if (!sequences[name])\n sequences[name] = [];\n return sequences[name];\n}\nfunction keyframesAsList(keyframes2) {\n return Array.isArray(keyframes2) ? keyframes2 : [keyframes2];\n}\nfunction getValueTransition2(transition, key) {\n return transition && transition[key] ? {\n ...transition,\n ...transition[key]\n } : { ...transition };\n}\nvar isNumber = (keyframe) => typeof keyframe === \"number\";\nvar isNumberKeyframesArray = (keyframes2) => keyframes2.every(isNumber);\n\n// ../../../node_modules/framer-motion/dist/es/render/object/ObjectVisualElement.mjs\nfunction isObjectKey(key, object) {\n return key in object;\n}\nvar ObjectVisualElement = class extends VisualElement {\n constructor() {\n super(...arguments);\n this.type = \"object\";\n }\n readValueFromInstance(instance, key) {\n if (isObjectKey(key, instance)) {\n const value = instance[key];\n if (typeof value === \"string\" || typeof value === \"number\") {\n return value;\n }\n }\n return void 0;\n }\n getBaseTargetFromProps() {\n return void 0;\n }\n removeValueFromRenderState(key, renderState) {\n delete renderState.output[key];\n }\n measureInstanceViewportBox() {\n return createBox();\n }\n build(renderState, latestValues) {\n Object.assign(renderState.output, latestValues);\n }\n renderInstance(instance, { output }) {\n Object.assign(instance, output);\n }\n sortInstanceNodePosition() {\n return 0;\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/animation/utils/create-visual-element.mjs\nfunction createDOMVisualElement(element) {\n const options = {\n presenceContext: null,\n props: {},\n visualState: {\n renderState: {\n transform: {},\n transformOrigin: {},\n style: {},\n vars: {},\n attrs: {}\n },\n latestValues: {}\n }\n };\n const node = isSVGElement(element) ? new SVGVisualElement(options) : new HTMLVisualElement(options);\n node.mount(element);\n visualElementStore.set(element, node);\n}\nfunction createObjectVisualElement(subject) {\n const options = {\n presenceContext: null,\n props: {},\n visualState: {\n renderState: {\n output: {}\n },\n latestValues: {}\n }\n };\n const node = new ObjectVisualElement(options);\n node.mount(subject);\n visualElementStore.set(subject, node);\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/animate/subject.mjs\nfunction isSingleValue(subject, keyframes2) {\n return isMotionValue(subject) || typeof subject === \"number\" || typeof subject === \"string\" && !isDOMKeyframes(keyframes2);\n}\nfunction animateSubject(subject, keyframes2, options, scope) {\n const animations2 = [];\n if (isSingleValue(subject, keyframes2)) {\n animations2.push(animateSingleValue(subject, isDOMKeyframes(keyframes2) ? keyframes2.default || keyframes2 : keyframes2, options ? options.default || options : options));\n } else {\n const subjects = resolveSubjects(subject, keyframes2, scope);\n const numSubjects = subjects.length;\n invariant(Boolean(numSubjects), \"No valid elements provided.\");\n for (let i = 0; i < numSubjects; i++) {\n const thisSubject = subjects[i];\n const createVisualElement = thisSubject instanceof Element ? createDOMVisualElement : createObjectVisualElement;\n if (!visualElementStore.has(thisSubject)) {\n createVisualElement(thisSubject);\n }\n const visualElement = visualElementStore.get(thisSubject);\n const transition = { ...options };\n if (\"delay\" in transition && typeof transition.delay === \"function\") {\n transition.delay = transition.delay(i, numSubjects);\n }\n animations2.push(...animateTarget(visualElement, { ...keyframes2, transition }, {}));\n }\n }\n return animations2;\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/animate/sequence.mjs\nfunction animateSequence(sequence, options, scope) {\n const animations2 = [];\n const animationDefinitions = createAnimationsFromSequence(sequence, options, scope, { spring });\n animationDefinitions.forEach(({ keyframes: keyframes2, transition }, subject) => {\n animations2.push(...animateSubject(subject, keyframes2, transition));\n });\n return animations2;\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/animate/index.mjs\nfunction isSequence(value) {\n return Array.isArray(value) && Array.isArray(value[0]);\n}\nfunction createScopedAnimate(scope) {\n function scopedAnimate(subjectOrSequence, optionsOrKeyframes, options) {\n let animations2 = [];\n if (isSequence(subjectOrSequence)) {\n animations2 = animateSequence(subjectOrSequence, optionsOrKeyframes, scope);\n } else {\n animations2 = animateSubject(subjectOrSequence, optionsOrKeyframes, options, scope);\n }\n const animation = new GroupPlaybackControls(animations2);\n if (scope) {\n scope.animations.push(animation);\n }\n return animation;\n }\n return scopedAnimate;\n}\nvar animate = createScopedAnimate();\n\n// ../../../node_modules/framer-motion/dist/es/animation/hooks/use-animate.mjs\nfunction useAnimate() {\n const scope = useConstant(() => ({\n current: null,\n // Will be hydrated by React\n animations: []\n }));\n const animate2 = useConstant(() => createScopedAnimate(scope));\n useUnmountEffect(() => {\n scope.animations.forEach((animation) => animation.stop());\n });\n return [scope, animate2];\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/waapi/utils/style.mjs\nfunction setCSSVar(element, name, value) {\n element.style.setProperty(`--${name}`, value);\n}\nfunction setStyle(element, name, value) {\n element.style[name] = value;\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs\nvar supportsPartialKeyframes = /* @__PURE__ */ memo(() => {\n try {\n document.createElement(\"div\").animate({ opacity: [1] });\n } catch (e) {\n return false;\n }\n return true;\n});\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs\nvar state = /* @__PURE__ */ new WeakMap();\nfunction hydrateKeyframes(valueName, keyframes2, read) {\n for (let i = 0; i < keyframes2.length; i++) {\n if (keyframes2[i] === null) {\n keyframes2[i] = i === 0 ? read() : keyframes2[i - 1];\n }\n if (typeof keyframes2[i] === \"number\" && browserNumberValueTypes[valueName]) {\n keyframes2[i] = browserNumberValueTypes[valueName].transform(keyframes2[i]);\n }\n }\n if (!supportsPartialKeyframes() && keyframes2.length < 2) {\n keyframes2.unshift(read());\n }\n}\nvar defaultEasing2 = \"easeOut\";\nfunction getElementAnimationState(element) {\n const animationState = state.get(element) || /* @__PURE__ */ new Map();\n state.set(element, animationState);\n return state.get(element);\n}\nvar NativeAnimation = class {\n constructor(element, valueName, valueKeyframes, options) {\n const isCSSVar = valueName.startsWith(\"--\");\n this.setValue = isCSSVar ? setCSSVar : setStyle;\n this.options = options;\n this.updateFinishedPromise();\n invariant(typeof options.type !== \"string\", `animateMini doesn't support \"type\" as a string. Did you mean to import { spring } from \"framer-motion\"?`);\n const existingAnimation = getElementAnimationState(element).get(valueName);\n existingAnimation && existingAnimation.stop();\n const readInitialKeyframe = () => {\n return valueName.startsWith(\"--\") ? element.style.getPropertyValue(valueName) : window.getComputedStyle(element)[valueName];\n };\n if (!Array.isArray(valueKeyframes)) {\n valueKeyframes = [valueKeyframes];\n }\n hydrateKeyframes(valueName, valueKeyframes, readInitialKeyframe);\n if (isGenerator(options.type)) {\n const generatorOptions = createGeneratorEasing(options, 100, options.type);\n options.ease = supportsLinearEasing() ? generatorOptions.ease : defaultEasing2;\n options.duration = secondsToMilliseconds(generatorOptions.duration);\n options.type = \"keyframes\";\n } else {\n options.ease = options.ease || defaultEasing2;\n }\n this.removeAnimation = () => {\n var _a;\n return (_a = state.get(element)) === null || _a === void 0 ? void 0 : _a.delete(valueName);\n };\n const onFinish = () => {\n this.setValue(element, valueName, getFinalKeyframe(valueKeyframes, this.options));\n this.cancel();\n this.resolveFinishedPromise();\n };\n if (!supportsWaapi()) {\n onFinish();\n } else {\n this.animation = startWaapiAnimation(element, valueName, valueKeyframes, options);\n if (options.autoplay === false) {\n this.animation.pause();\n }\n this.animation.onfinish = onFinish;\n if (this.pendingTimeline) {\n attachTimeline(this.animation, this.pendingTimeline);\n }\n getElementAnimationState(element).set(valueName, this);\n }\n }\n get duration() {\n return millisecondsToSeconds(this.options.duration || 300);\n }\n get time() {\n var _a;\n if (this.animation) {\n return millisecondsToSeconds(((_a = this.animation) === null || _a === void 0 ? void 0 : _a.currentTime) || 0);\n }\n return 0;\n }\n set time(newTime) {\n if (this.animation) {\n this.animation.currentTime = secondsToMilliseconds(newTime);\n }\n }\n get speed() {\n return this.animation ? this.animation.playbackRate : 1;\n }\n set speed(newSpeed) {\n if (this.animation) {\n this.animation.playbackRate = newSpeed;\n }\n }\n get state() {\n return this.animation ? this.animation.playState : \"finished\";\n }\n get startTime() {\n return this.animation ? this.animation.startTime : null;\n }\n play() {\n if (this.state === \"finished\") {\n this.updateFinishedPromise();\n }\n this.animation && this.animation.play();\n }\n pause() {\n this.animation && this.animation.pause();\n }\n stop() {\n if (!this.animation || this.state === \"idle\" || this.state === \"finished\") {\n return;\n }\n if (this.animation.commitStyles) {\n this.animation.commitStyles();\n }\n this.cancel();\n }\n complete() {\n this.animation && this.animation.finish();\n }\n cancel() {\n this.removeAnimation();\n try {\n this.animation && this.animation.cancel();\n } catch (e) {\n }\n }\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve, reject) {\n return this.currentFinishedPromise.then(resolve, reject);\n }\n updateFinishedPromise() {\n this.currentFinishedPromise = new Promise((resolve) => {\n this.resolveFinishedPromise = resolve;\n });\n }\n attachTimeline(timeline) {\n if (!this.animation) {\n this.pendingTimeline = timeline;\n } else {\n attachTimeline(this.animation, timeline);\n }\n return noop;\n }\n};\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs\nfunction animateElements(elementOrSelector, keyframes2, options, scope) {\n const elements = resolveElements(elementOrSelector, scope);\n const numElements = elements.length;\n invariant(Boolean(numElements), \"No valid element provided.\");\n const animations2 = [];\n for (let i = 0; i < numElements; i++) {\n const element = elements[i];\n const elementTransition = { ...options };\n if (typeof elementTransition.delay === \"function\") {\n elementTransition.delay = elementTransition.delay(i, numElements);\n }\n for (const valueName in keyframes2) {\n const valueKeyframes = keyframes2[valueName];\n const valueOptions = {\n ...getValueTransition(options, valueName)\n };\n valueOptions.duration = valueOptions.duration ? secondsToMilliseconds(valueOptions.duration) : valueOptions.duration;\n valueOptions.delay = secondsToMilliseconds(valueOptions.delay || 0);\n animations2.push(new NativeAnimation(element, valueName, valueKeyframes, valueOptions));\n }\n }\n return animations2;\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs\nvar createScopedWaapiAnimate = (scope) => {\n function scopedAnimate(elementOrSelector, keyframes2, options) {\n return new GroupPlaybackControls(animateElements(elementOrSelector, keyframes2, options, scope));\n }\n return scopedAnimate;\n};\nvar animateMini = /* @__PURE__ */ createScopedWaapiAnimate();\n\n// ../../../node_modules/framer-motion/dist/es/animation/hooks/use-animate-style.mjs\nfunction useAnimateMini() {\n const scope = useConstant(() => ({\n current: null,\n // Will be hydrated by React\n animations: []\n }));\n const animate2 = useConstant(() => createScopedWaapiAnimate(scope));\n useUnmountEffect(() => {\n scope.animations.forEach((animation) => animation.stop());\n });\n return [scope, animate2];\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs\nfunction useAnimationControls() {\n const controls = useConstant(animationControls);\n useIsomorphicLayoutEffect(controls.mount, []);\n return controls;\n}\nvar useAnimation = useAnimationControls;\n\n// ../../../node_modules/framer-motion/dist/es/utils/use-cycle.mjs\nimport { useRef as useRef10, useState as useState6, useCallback as useCallback5 } from \"react\";\nfunction useCycle(...items) {\n const index = useRef10(0);\n const [item, setItem] = useState6(items[index.current]);\n const runCycle = useCallback5(\n (next) => {\n index.current = typeof next !== \"number\" ? wrap(0, items.length, index.current + 1) : next;\n setItem(items[index.current]);\n },\n // The array will change on each call, but by putting items.length at\n // the front of this array, we guarantee the dependency comparison will match up\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [items.length, ...items]\n );\n return [item, runCycle];\n}\n\n// ../../../node_modules/framer-motion/dist/es/render/dom/viewport/index.mjs\nvar thresholds = {\n some: 0,\n all: 1\n};\nfunction inView(elementOrSelector, onStart, { root, margin: rootMargin, amount = \"some\" } = {}) {\n const elements = resolveElements(elementOrSelector);\n const activeIntersections = /* @__PURE__ */ new WeakMap();\n const onIntersectionChange = (entries) => {\n entries.forEach((entry) => {\n const onEnd = activeIntersections.get(entry.target);\n if (entry.isIntersecting === Boolean(onEnd))\n return;\n if (entry.isIntersecting) {\n const newOnEnd = onStart(entry);\n if (typeof newOnEnd === \"function\") {\n activeIntersections.set(entry.target, newOnEnd);\n } else {\n observer2.unobserve(entry.target);\n }\n } else if (onEnd) {\n onEnd(entry);\n activeIntersections.delete(entry.target);\n }\n });\n };\n const observer2 = new IntersectionObserver(onIntersectionChange, {\n root,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholds[amount]\n });\n elements.forEach((element) => observer2.observe(element));\n return () => observer2.disconnect();\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/use-in-view.mjs\nimport { useState as useState7, useEffect as useEffect10 } from \"react\";\nfunction useInView(ref, { root, margin, amount, once = false } = {}) {\n const [isInView, setInView] = useState7(false);\n useEffect10(() => {\n if (!ref.current || once && isInView)\n return;\n const onEnter = () => {\n setInView(true);\n return once ? void 0 : () => setInView(false);\n };\n const options = {\n root: root && root.current || void 0,\n margin,\n amount\n };\n return inView(ref.current, onEnter, options);\n }, [root, ref, margin, once, amount]);\n return isInView;\n}\n\n// ../../../node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs\nvar DragControls = class {\n constructor() {\n this.componentControls = /* @__PURE__ */ new Set();\n }\n /**\n * Subscribe a component's internal `VisualElementDragControls` to the user-facing API.\n *\n * @internal\n */\n subscribe(controls) {\n this.componentControls.add(controls);\n return () => this.componentControls.delete(controls);\n }\n /**\n * Start a drag gesture on every `motion` component that has this set of drag controls\n * passed into it via the `dragControls` prop.\n *\n * ```jsx\n * dragControls.start(e, {\n * snapToCursor: true\n * })\n * ```\n *\n * @param event - PointerEvent\n * @param options - Options\n *\n * @public\n */\n start(event, options) {\n this.componentControls.forEach((controls) => {\n controls.start(event.nativeEvent || event, options);\n });\n }\n};\nvar createDragControls = () => new DragControls();\nfunction useDragControls() {\n return useConstant(createDragControls);\n}\n\n// ../../../node_modules/framer-motion/dist/es/events/use-dom-event.mjs\nimport { useEffect as useEffect11 } from \"react\";\nfunction useDomEvent(ref, eventName, handler, options) {\n useEffect11(() => {\n const element = ref.current;\n if (handler && element) {\n return addDomEvent(element, eventName, handler, options);\n }\n }, [ref, eventName, handler, options]);\n}\n\n// ../../../node_modules/framer-motion/dist/es/motion/utils/is-motion-component.mjs\nfunction isMotionComponent(component) {\n return component !== null && typeof component === \"object\" && motionComponentSymbol in component;\n}\n\n// ../../../node_modules/framer-motion/dist/es/motion/utils/unwrap-motion-component.mjs\nfunction unwrapMotionComponent(component) {\n if (isMotionComponent(component)) {\n return component[motionComponentSymbol];\n }\n return void 0;\n}\n\n// ../../../node_modules/framer-motion/dist/es/projection/use-instant-layout-transition.mjs\nfunction useInstantLayoutTransition() {\n return startTransition;\n}\nfunction startTransition(callback) {\n if (!rootProjectionNode.current)\n return;\n rootProjectionNode.current.isUpdating = false;\n rootProjectionNode.current.blockUpdate();\n callback && callback();\n}\n\n// ../../../node_modules/framer-motion/dist/es/utils/use-instant-transition.mjs\nimport { useRef as useRef11, useEffect as useEffect12 } from \"react\";\nfunction useInstantTransition() {\n const [forceUpdate, forcedRenderCount] = useForceUpdate();\n const startInstantLayoutTransition = useInstantLayoutTransition();\n const unlockOnFrameRef = useRef11();\n useEffect12(() => {\n frame.postRender(() => frame.postRender(() => {\n if (forcedRenderCount !== unlockOnFrameRef.current)\n return;\n instantAnimationState.current = false;\n }));\n }, [forcedRenderCount]);\n return (callback) => {\n startInstantLayoutTransition(() => {\n instantAnimationState.current = true;\n forceUpdate();\n callback();\n unlockOnFrameRef.current = forcedRenderCount + 1;\n });\n };\n}\nfunction disableInstantTransitions() {\n instantAnimationState.current = false;\n}\n\n// ../../../node_modules/framer-motion/dist/es/projection/use-reset-projection.mjs\nimport { useCallback as useCallback6 } from \"react\";\nfunction useResetProjection() {\n const reset = useCallback6(() => {\n const root = rootProjectionNode.current;\n if (!root)\n return;\n root.resetTree();\n }, []);\n return reset;\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/optimized-appear/store-id.mjs\nvar appearStoreId = (elementId, valueName) => {\n const key = transformProps.has(valueName) ? \"transform\" : valueName;\n return `${elementId}: ${key}`;\n};\n\n// ../../../node_modules/framer-motion/dist/es/animation/optimized-appear/store.mjs\nvar appearAnimationStore = /* @__PURE__ */ new Map();\nvar appearComplete = /* @__PURE__ */ new Map();\n\n// ../../../node_modules/framer-motion/dist/es/animation/optimized-appear/handoff.mjs\nfunction handoffOptimizedAppearAnimation(elementId, valueName, frame2) {\n var _a;\n const storeId = appearStoreId(elementId, valueName);\n const optimisedAnimation = appearAnimationStore.get(storeId);\n if (!optimisedAnimation) {\n return null;\n }\n const { animation, startTime } = optimisedAnimation;\n function cancelAnimation() {\n var _a2;\n (_a2 = window.MotionCancelOptimisedAnimation) === null || _a2 === void 0 ? void 0 : _a2.call(window, elementId, valueName, frame2);\n }\n animation.onfinish = cancelAnimation;\n if (startTime === null || ((_a = window.MotionHandoffIsComplete) === null || _a === void 0 ? void 0 : _a.call(window, elementId))) {\n cancelAnimation();\n return null;\n } else {\n return startTime;\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/optimized-appear/start.mjs\nvar startFrameTime;\nvar readyAnimation;\nvar suspendedAnimations = /* @__PURE__ */ new Set();\nfunction resumeSuspendedAnimations() {\n suspendedAnimations.forEach((data) => {\n data.animation.play();\n data.animation.startTime = data.startTime;\n });\n suspendedAnimations.clear();\n}\nfunction startOptimizedAppearAnimation(element, name, keyframes2, options, onReady) {\n if (window.MotionIsMounted) {\n return;\n }\n const id4 = element.dataset[optimizedAppearDataId];\n if (!id4)\n return;\n window.MotionHandoffAnimation = handoffOptimizedAppearAnimation;\n const storeId = appearStoreId(id4, name);\n if (!readyAnimation) {\n readyAnimation = startWaapiAnimation(\n element,\n name,\n [keyframes2[0], keyframes2[0]],\n /**\n * 10 secs is basically just a super-safe duration to give Chrome\n * long enough to get the animation ready.\n */\n { duration: 1e4, ease: \"linear\" }\n );\n appearAnimationStore.set(storeId, {\n animation: readyAnimation,\n startTime: null\n });\n window.MotionHandoffAnimation = handoffOptimizedAppearAnimation;\n window.MotionHasOptimisedAnimation = (elementId, valueName) => {\n if (!elementId)\n return false;\n if (!valueName) {\n return appearComplete.has(elementId);\n }\n const animationId = appearStoreId(elementId, valueName);\n return Boolean(appearAnimationStore.get(animationId));\n };\n window.MotionHandoffMarkAsComplete = (elementId) => {\n if (appearComplete.has(elementId)) {\n appearComplete.set(elementId, true);\n }\n };\n window.MotionHandoffIsComplete = (elementId) => {\n return appearComplete.get(elementId) === true;\n };\n window.MotionCancelOptimisedAnimation = (elementId, valueName, frame2, canResume) => {\n const animationId = appearStoreId(elementId, valueName);\n const data = appearAnimationStore.get(animationId);\n if (!data)\n return;\n if (frame2 && canResume === void 0) {\n frame2.postRender(() => {\n frame2.postRender(() => {\n data.animation.cancel();\n });\n });\n } else {\n data.animation.cancel();\n }\n if (frame2 && canResume) {\n suspendedAnimations.add(data);\n frame2.render(resumeSuspendedAnimations);\n } else {\n appearAnimationStore.delete(animationId);\n if (!appearAnimationStore.size) {\n window.MotionCancelOptimisedAnimation = void 0;\n }\n }\n };\n window.MotionCheckAppearSync = (visualElement, valueName, value) => {\n var _a, _b;\n const appearId = getOptimisedAppearId(visualElement);\n if (!appearId)\n return;\n const valueIsOptimised = (_a = window.MotionHasOptimisedAnimation) === null || _a === void 0 ? void 0 : _a.call(window, appearId, valueName);\n const externalAnimationValue = (_b = visualElement.props.values) === null || _b === void 0 ? void 0 : _b[valueName];\n if (!valueIsOptimised || !externalAnimationValue)\n return;\n const removeSyncCheck = value.on(\"change\", (latestValue) => {\n var _a2;\n if (externalAnimationValue.get() !== latestValue) {\n (_a2 = window.MotionCancelOptimisedAnimation) === null || _a2 === void 0 ? void 0 : _a2.call(window, appearId, valueName);\n removeSyncCheck();\n }\n });\n return removeSyncCheck;\n };\n }\n const startAnimation = () => {\n readyAnimation.cancel();\n const appearAnimation = startWaapiAnimation(element, name, keyframes2, options);\n if (startFrameTime === void 0) {\n startFrameTime = performance.now();\n }\n appearAnimation.startTime = startFrameTime;\n appearAnimationStore.set(storeId, {\n animation: appearAnimation,\n startTime: startFrameTime\n });\n if (onReady)\n onReady(appearAnimation);\n };\n appearComplete.set(id4, false);\n if (readyAnimation.ready) {\n readyAnimation.ready.then(startAnimation).catch(noop);\n } else {\n startAnimation();\n }\n}\n\n// ../../../node_modules/framer-motion/dist/es/animation/hooks/use-animated-state.mjs\nimport { useState as useState8, useLayoutEffect as useLayoutEffect2 } from \"react\";\nvar createObject = () => ({});\nvar StateVisualElement = class extends VisualElement {\n constructor() {\n super(...arguments);\n this.measureInstanceViewportBox = createBox;\n }\n build() {\n }\n resetTransform() {\n }\n restoreTransform() {\n }\n removeValueFromRenderState() {\n }\n renderInstance() {\n }\n scrapeMotionValuesFromProps() {\n return createObject();\n }\n getBaseTargetFromProps() {\n return void 0;\n }\n readValueFromInstance(_state, key, options) {\n return options.initialState[key] || 0;\n }\n sortInstanceNodePosition() {\n return 0;\n }\n};\nvar useVisualState = makeUseVisualState({\n scrapeMotionValuesFromProps: createObject,\n createRenderState: createObject\n});\nfunction useAnimatedState(initialState) {\n const [animationState, setAnimationState] = useState8(initialState);\n const visualState = useVisualState({}, false);\n const element = useConstant(() => {\n return new StateVisualElement({\n props: {\n onUpdate: (v) => {\n setAnimationState({ ...v });\n }\n },\n visualState,\n presenceContext: null\n }, { initialState });\n });\n useLayoutEffect2(() => {\n element.mount({});\n return () => element.unmount();\n }, [element]);\n const startAnimation = useConstant(() => (animationDefinition) => {\n return animateVisualElement(element, animationDefinition);\n });\n return [animationState, startAnimation];\n}\n\n// ../../../node_modules/framer-motion/dist/es/value/use-inverted-scale.mjs\nimport { useContext as useContext15 } from \"react\";\nvar maxScale = 1e5;\nvar invertScale = (scale2) => scale2 > 1e-3 ? 1 / scale2 : maxScale;\nvar hasWarned = false;\nfunction useInvertedScale(scale2) {\n let parentScaleX = useMotionValue(1);\n let parentScaleY = useMotionValue(1);\n const { visualElement } = useContext15(MotionContext);\n invariant(!!(scale2 || visualElement), \"If no scale values are provided, useInvertedScale must be used within a child of another motion component.\");\n warning(hasWarned, \"useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead.\");\n hasWarned = true;\n if (scale2) {\n parentScaleX = scale2.scaleX || parentScaleX;\n parentScaleY = scale2.scaleY || parentScaleY;\n } else if (visualElement) {\n parentScaleX = visualElement.getValue(\"scaleX\", 1);\n parentScaleY = visualElement.getValue(\"scaleY\", 1);\n }\n const scaleX = useTransform(parentScaleX, invertScale);\n const scaleY = useTransform(parentScaleY, invertScale);\n return { scaleX, scaleY };\n}\n\n// ../../../node_modules/framer-motion/dist/es/components/AnimateSharedLayout.mjs\nimport { jsx as jsx9 } from \"react/jsx-runtime\";\nimport * as React3 from \"react\";\nvar id3 = 0;\nvar AnimateSharedLayout = ({ children }) => {\n React3.useEffect(() => {\n invariant(false, \"AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations\");\n }, []);\n return jsx9(LayoutGroup, { id: useConstant(() => `asl-${id3++}`), children });\n};\n\n// ../../../node_modules/framer-motion/dist/es/components/Reorder/namespace.mjs\nvar namespace_exports = {};\n__export(namespace_exports, {\n Group: () => ReorderGroup,\n Item: () => ReorderItem\n});\n\n// ../../../node_modules/framer-motion/dist/es/components/Reorder/Group.mjs\nimport { jsx as jsx10 } from \"react/jsx-runtime\";\nimport { forwardRef as forwardRef2, useRef as useRef12, useEffect as useEffect14 } from \"react\";\n\n// ../../../node_modules/framer-motion/dist/es/context/ReorderContext.mjs\nimport { createContext as createContext8 } from \"react\";\nvar ReorderContext = createContext8(null);\n\n// ../../../node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.mjs\nfunction checkReorder(order, value, offset, velocity) {\n if (!velocity)\n return order;\n const index = order.findIndex((item2) => item2.value === value);\n if (index === -1)\n return order;\n const nextOffset = velocity > 0 ? 1 : -1;\n const nextItem = order[index + nextOffset];\n if (!nextItem)\n return order;\n const item = order[index];\n const nextLayout = nextItem.layout;\n const nextItemCenter = mixNumber(nextLayout.min, nextLayout.max, 0.5);\n if (nextOffset === 1 && item.layout.max + offset > nextItemCenter || nextOffset === -1 && item.layout.min + offset < nextItemCenter) {\n return moveItem(order, index, index + nextOffset);\n }\n return order;\n}\n\n// ../../../node_modules/framer-motion/dist/es/components/Reorder/Group.mjs\nfunction ReorderGroupComponent({ children, as = \"ul\", axis = \"y\", onReorder, values, ...props }, externalRef) {\n const Component3 = useConstant(() => motion[as]);\n const order = [];\n const isReordering = useRef12(false);\n invariant(Boolean(values), \"Reorder.Group must be provided a values prop\");\n const context = {\n axis,\n registerItem: (value, layout2) => {\n const idx = order.findIndex((entry) => value === entry.value);\n if (idx !== -1) {\n order[idx].layout = layout2[axis];\n } else {\n order.push({ value, layout: layout2[axis] });\n }\n order.sort(compareMin);\n },\n updateOrder: (item, offset, velocity) => {\n if (isReordering.current)\n return;\n const newOrder = checkReorder(order, item, offset, velocity);\n if (order !== newOrder) {\n isReordering.current = true;\n onReorder(newOrder.map(getValue).filter((value) => values.indexOf(value) !== -1));\n }\n }\n };\n useEffect14(() => {\n isReordering.current = false;\n });\n return jsx10(Component3, { ...props, ref: externalRef, ignoreStrict: true, children: jsx10(ReorderContext.Provider, { value: context, children }) });\n}\nvar ReorderGroup = /* @__PURE__ */ forwardRef2(ReorderGroupComponent);\nfunction getValue(item) {\n return item.value;\n}\nfunction compareMin(a, b) {\n return a.layout.min - b.layout.min;\n}\n\n// ../../../node_modules/framer-motion/dist/es/components/Reorder/Item.mjs\nimport { jsx as jsx11 } from \"react/jsx-runtime\";\nimport { forwardRef as forwardRef3, useContext as useContext16 } from \"react\";\nfunction useDefaultMotionValue(value, defaultValue = 0) {\n return isMotionValue(value) ? value : useMotionValue(defaultValue);\n}\nfunction ReorderItemComponent({ children, style = {}, value, as = \"li\", onDrag, layout: layout2 = true, ...props }, externalRef) {\n const Component3 = useConstant(() => motion[as]);\n const context = useContext16(ReorderContext);\n const point2 = {\n x: useDefaultMotionValue(style.x),\n y: useDefaultMotionValue(style.y)\n };\n const zIndex = useTransform([point2.x, point2.y], ([latestX, latestY]) => latestX || latestY ? 1 : \"unset\");\n invariant(Boolean(context), \"Reorder.Item must be a child of Reorder.Group\");\n const { axis, registerItem, updateOrder } = context;\n return jsx11(Component3, { drag: axis, ...props, dragSnapToOrigin: true, style: { ...style, x: point2.x, y: point2.y, zIndex }, layout: layout2, onDrag: (event, gesturePoint) => {\n const { velocity } = gesturePoint;\n velocity[axis] && updateOrder(value, point2[axis].get(), velocity[axis]);\n onDrag && onDrag(event, gesturePoint);\n }, onLayoutMeasure: (measured) => registerItem(value, measured), ref: externalRef, ignoreStrict: true, children });\n}\nvar ReorderItem = /* @__PURE__ */ forwardRef3(ReorderItemComponent);\n\n// ../../../node_modules/framer-motion/dist/es/animation/utils/stagger.mjs\nfunction getOriginIndex(from, total) {\n if (from === \"first\") {\n return 0;\n } else {\n const lastIndex = total - 1;\n return from === \"last\" ? lastIndex : lastIndex / 2;\n }\n}\nfunction stagger(duration = 0.1, { startDelay = 0, from = 0, ease: ease2 } = {}) {\n return (i, total) => {\n const fromIndex = typeof from === \"number\" ? from : getOriginIndex(from, total);\n const distance2 = Math.abs(fromIndex - i);\n let delay2 = duration * distance2;\n if (ease2) {\n const maxDelay = total * duration;\n const easingFunction = easingDefinitionToFunction(ease2);\n delay2 = easingFunction(delay2 / maxDelay) * maxDelay;\n }\n return startDelay + delay2;\n };\n}\n\n// ../../../node_modules/framer-motion/dist/es/frameloop/index-legacy.mjs\nvar sync = frame;\nvar cancelSync = stepsOrder.reduce((acc, key) => {\n acc[key] = (process2) => cancelFrame(process2);\n return acc;\n}, {});\n\n// ../../../node_modules/framer-motion/dist/es/easing/steps.mjs\nfunction steps(numSteps, direction = \"end\") {\n return (progress2) => {\n progress2 = direction === \"end\" ? Math.min(progress2, 0.999) : Math.max(progress2, 1e-3);\n const expanded = progress2 * numSteps;\n const rounded = direction === \"end\" ? Math.floor(expanded) : Math.ceil(expanded);\n return clamp(0, 1, rounded / numSteps);\n };\n}\n\nexport {\n MotionGlobalConfig,\n frame,\n cancelFrame,\n frameData,\n frameSteps,\n cubicBezier,\n mirrorEasing,\n reverseEasing,\n backOut,\n backIn,\n backInOut,\n anticipate,\n circIn,\n circOut,\n circInOut,\n warning,\n invariant,\n clamp,\n px,\n color,\n complex,\n findSpring,\n spring,\n inertia,\n easeIn,\n easeOut,\n easeInOut,\n pipe,\n progress,\n mix,\n interpolate,\n keyframes,\n animateValue,\n AcceleratedAnimation,\n MotionValue,\n motionValue,\n optimizedAppearDataAttribute,\n isMotionValue,\n animateVisualElement,\n animations,\n addPointerInfo,\n addPointerEvent,\n distance,\n distance2D,\n isDragActive,\n calcLength,\n createBox,\n PresenceContext,\n usePresence,\n useIsPresent,\n LayoutGroupContext,\n SwitchLayoutGroupContext,\n addScaleCorrector,\n FlatTree,\n resolveMotionValue,\n delay,\n MotionConfigContext,\n MotionContext,\n isBrowser,\n useIsomorphicLayoutEffect,\n createRendererMotionComponent,\n makeUseVisualState,\n buildTransform,\n isValidMotionProp,\n filterProps,\n visualElementStore,\n VisualElement,\n motion,\n m,\n AnimatePresence,\n MotionConfig,\n LazyMotion,\n DeprecatedLayoutGroupContext,\n useForceUpdate,\n LayoutGroup,\n domMin,\n domAnimation,\n domMax,\n useMotionValue,\n useMotionTemplate,\n transform,\n useTransform,\n useSpring,\n useMotionValueEvent,\n useVelocity,\n scrollInfo,\n scroll,\n useScroll,\n useElementScroll,\n useViewportScroll,\n useAnimationFrame,\n useTime,\n useWillChange,\n useReducedMotion,\n useReducedMotionConfig,\n animationControls,\n useUnmountEffect,\n wrap,\n createScopedAnimate,\n animate,\n useAnimate,\n animateMini,\n useAnimateMini,\n useAnimationControls,\n useAnimation,\n useCycle,\n inView,\n useInView,\n DragControls,\n useDragControls,\n useDomEvent,\n isMotionComponent,\n unwrapMotionComponent,\n useInstantLayoutTransition,\n useInstantTransition,\n disableInstantTransitions,\n useResetProjection,\n startOptimizedAppearAnimation,\n useAnimatedState,\n useInvertedScale,\n AnimateSharedLayout,\n namespace_exports,\n stagger,\n sync,\n cancelSync,\n steps\n};\n//# sourceMappingURL=chunk-4Z6NVKPU.mjs.map\n", "import*as a from\"react\";import*as i from\"scheduler\";var u=\"default\"in a?a.default:a;var o=\"default\"in i?i.default:i;var s={};var w=u,x=o;function p(a){for(var i=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,u=1;ui}return!1}function v(a,i,u,o,s,w,x){this.acceptsBooleans=2===i||3===i||4===i;this.attributeName=o;this.attributeNamespace=s;this.mustUseProperty=u;this.propertyName=a;this.type=i;this.sanitizeURL=w;this.removeEmptyString=x}var M={};\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach((function(a){M[a]=new v(a,0,!1,a,null,!1,!1)}));[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach((function(a){var i=a[0];M[i]=new v(i,1,!1,a[1],null,!1,!1)}));[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach((function(a){M[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)}));[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach((function(a){M[a]=new v(a,2,!1,a,null,!1,!1)}));\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach((function(a){M[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)}));[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach((function(a){M[a]=new v(a,3,!0,a,null,!1,!1)}));[\"capture\",\"download\"].forEach((function(a){M[a]=new v(a,4,!1,a,null,!1,!1)}));[\"cols\",\"rows\",\"size\",\"span\"].forEach((function(a){M[a]=new v(a,6,!1,a,null,!1,!1)}));[\"rowSpan\",\"start\"].forEach((function(a){M[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)}));var F=/[\\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach((function(a){var i=a.replace(F,sa);M[i]=new v(i,1,!1,a,null,!1,!1)}));\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach((function(a){var i=a.replace(F,sa);M[i]=new v(i,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)}));[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach((function(a){var i=a.replace(F,sa);M[i]=new v(i,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)}));[\"tabIndex\",\"crossOrigin\"].forEach((function(a){M[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)}));M.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach((function(a){M[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)}));function ta(a,i,u,o){var s=M.hasOwnProperty(i)?M[i]:null;(null!==s?0!==s.type:o||!(2C||s[x]!==w[C]){var z=\"\\n\"+s[x].replace(\" at new \",\" at \");a.displayName&&z.includes(\"\")&&(z=z.replace(\"\",a.displayName));return z}}while(1<=x&&0<=C);break}}}finally{ce=!1,Error.prepareStackTrace=u}return(a=a?a.displayName||a.name:\"\")?Ma(a):\"\"}function Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return\"\"}}function Qa(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case U:return\"Fragment\";case I:return\"Portal\";case A:return\"Profiler\";case V:return\"StrictMode\";case K:return\"Suspense\";case Y:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case H:return(a.displayName||\"Context\")+\".Consumer\";case B:return(a._context.displayName||\"Context\")+\".Provider\";case $:var i=a.render;a=a.displayName;a||(a=i.displayName||i.name||\"\",a=\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");return a;case Z:return i=a.displayName||null,null!==i?i:Qa(a.type)||\"Memo\";case X:i=a._payload;a=a._init;try{return Qa(a(i))}catch(a){}}return null}function Ra(a){var i=a.type;switch(a.tag){case 24:return\"Cache\";case 9:return(i.displayName||\"Context\")+\".Consumer\";case 10:return(i._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return a=i.render,a=a.displayName||a.name||\"\",i.displayName||(\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return i;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(i);case 8:return i===V?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";case 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"===typeof i)return i.displayName||i.name||null;if(\"string\"===typeof i)return i}return null}function Sa(a){switch(typeof a){case\"boolean\":case\"number\":case\"string\":case\"undefined\":return a;case\"object\":return a;default:return\"\"}}function Ta(a){var i=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===i||\"radio\"===i)}function Ua(a){var i=Ta(a)?\"checked\":\"value\",u=Object.getOwnPropertyDescriptor(a.constructor.prototype,i),o=\"\"+a[i];if(!a.hasOwnProperty(i)&&\"undefined\"!==typeof u&&\"function\"===typeof u.get&&\"function\"===typeof u.set){var s=u.get,w=u.set;Object.defineProperty(a,i,{configurable:!0,get:function(){return s.call(this)},set:function(a){o=\"\"+a;w.call(this,a)}});Object.defineProperty(a,i,{enumerable:u.enumerable});return{getValue:function(){return o},setValue:function(a){o=\"\"+a},stopTracking:function(){a._valueTracker=null;delete a[i]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var i=a._valueTracker;if(!i)return!0;var u=i.getValue();var o=\"\";a&&(o=Ta(a)?a.checked?\"true\":\"false\":a.value);a=o;return a!==u&&(i.setValue(a),!0)}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(i){return a.body}}function Ya(a,i){var u=i.checked;return ie({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=u?u:a._wrapperState.initialChecked})}function Za(a,i){var u=null==i.defaultValue?\"\":i.defaultValue,o=null!=i.checked?i.checked:i.defaultChecked;u=Sa(null!=i.value?i.value:u);a._wrapperState={initialChecked:o,initialValue:u,controlled:\"checkbox\"===i.type||\"radio\"===i.type?null!=i.checked:null!=i.value}}function ab(a,i){i=i.checked;null!=i&&ta(a,\"checked\",i,!1)}function bb(a,i){ab(a,i);var u=Sa(i.value),o=i.type;if(null!=u)\"number\"===o?(0===u&&\"\"===a.value||a.value!=u)&&(a.value=\"\"+u):a.value!==\"\"+u&&(a.value=\"\"+u);else if(\"submit\"===o||\"reset\"===o){a.removeAttribute(\"value\");return}i.hasOwnProperty(\"value\")?cb(a,i.type,u):i.hasOwnProperty(\"defaultValue\")&&cb(a,i.type,Sa(i.defaultValue));null==i.checked&&null!=i.defaultChecked&&(a.defaultChecked=!!i.defaultChecked)}function db(a,i,u){if(i.hasOwnProperty(\"value\")||i.hasOwnProperty(\"defaultValue\")){var o=i.type;if(!(\"submit\"!==o&&\"reset\"!==o||void 0!==i.value&&null!==i.value))return;i=\"\"+a._wrapperState.initialValue;u||i===a.value||(a.value=i);a.defaultValue=i}u=a.name;\"\"!==u&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==u&&(a.name=u)}function cb(a,i,u){\"number\"===i&&Xa(a.ownerDocument)===a||(null==u?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+u&&(a.defaultValue=\"\"+u))}var fe=Array.isArray;function fb(a,i,u,o){a=a.options;if(i){i={};for(var s=0;s\"+i.valueOf().toString()+\"\";for(i=de.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;i.firstChild;)a.appendChild(i.firstChild)}}));function ob(a,i){if(i){var u=a.firstChild;if(u&&u===a.lastChild&&3===u.nodeType){u.nodeValue=i;return}}a.textContent=i}var be={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(be).forEach((function(a){ye.forEach((function(i){i=i+a.charAt(0).toUpperCase()+a.substring(1);be[i]=be[a]}))}));function rb(a,i,u){return null==i||\"boolean\"===typeof i||\"\"===i?\"\":u||\"number\"!==typeof i||0===i||be.hasOwnProperty(a)&&be[a]?(\"\"+i).trim():i+\"px\"}function sb(a,i){a=a.style;for(var u in i)if(i.hasOwnProperty(u)){var o=0===u.indexOf(\"--\"),s=rb(u,i[u],o);\"float\"===u&&(u=\"cssFloat\");o?a.setProperty(u,s):a[u]=s}}var we=ie({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ub(a,i){if(i){if(we[a]&&(null!=i.children||null!=i.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=i.dangerouslySetInnerHTML){if(null!=i.children)throw Error(p(60));if(\"object\"!==typeof i.dangerouslySetInnerHTML||!(\"__html\"in i.dangerouslySetInnerHTML))throw Error(p(61))}if(null!=i.style&&\"object\"!==typeof i.style)throw Error(p(62))}}function vb(a,i){if(-1===a.indexOf(\"-\"))return\"string\"===typeof i.is;switch(a){case\"annotation-xml\":case\"color-profile\":case\"font-face\":case\"font-face-src\":case\"font-face-uri\":case\"font-face-format\":case\"font-face-name\":case\"missing-glyph\":return!1;default:return!0}}var Se=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var xe=null,ze=null,_e=null;function Bb(a){if(a=Cb(a)){if(\"function\"!==typeof xe)throw Error(p(280));var i=a.stateNode;i&&(i=Db(i),xe(a.stateNode,a.type,i))}}function Eb(a){ze?_e?_e.push(a):_e=[a]:ze=a}function Fb(){if(ze){var a=ze,i=_e;_e=ze=null;Bb(a);if(i)for(a=0;a>>=0;return 0===a?32:31-(pn(a)/hn|0)|0}var gn=64,mn=4194304;function tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&a;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&a;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function uc(a,i){var u=a.pendingLanes;if(0===u)return 0;var o=0,s=a.suspendedLanes,w=a.pingedLanes,x=268435455&u;if(0!==x){var C=x&~s;0!==C?o=tc(C):(w&=x,0!==w&&(o=tc(w)))}else x=u&~s,0!==x?o=tc(x):0!==w&&(o=tc(w));if(0===o)return 0;if(0!==i&&i!==o&&0===(i&s)&&(s=o&-o,w=i&-i,s>=w||16===s&&0!==(4194240&w)))return i;0!==(4&o)&&(o|=16&u);i=a.entangledLanes;if(0!==i)for(a=a.entanglements,i&=o;0u;u++)i.push(a);return i}function Ac(a,i,u){a.pendingLanes|=i;536870912!==i&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;i=31-dn(i);a[i]=u}function Bc(a,i){var u=a.pendingLanes&~i;a.pendingLanes=i;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=i;a.mutableReadLanes&=i;a.entangledLanes&=i;i=a.entanglements;var o=a.eventTimes;for(a=a.expirationTimes;0=bt),wt=String.fromCharCode(32),St=!1;function ge(a,i){switch(a){case\"keyup\":return-1!==mt.indexOf(i.keyCode);case\"keydown\":return 229!==i.keyCode;case\"keypress\":case\"mousedown\":case\"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var Et=!1;function je(a,i){switch(a){case\"compositionend\":return he(i);case\"keypress\":if(32!==i.which)return null;St=!0;return wt;case\"textInput\":return a=i.data,a===wt&&St?null:a;default:return null}}function ke(a,i){if(Et)return\"compositionend\"===a||!vt&&ge(a,i)?(a=nd(),On=Rn=Fn=null,Et=!1,a):null;switch(a){case\"paste\":return null;case\"keypress\":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1=i)return{node:u,offset:i-a};a=o}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Je(u)}}function Le(a,i){return!(!a||!i)&&(a===i||(!a||3!==a.nodeType)&&(i&&3===i.nodeType?Le(a,i.parentNode):\"contains\"in a?a.contains(i):!!a.compareDocumentPosition&&!!(16&a.compareDocumentPosition(i))))}function Me(){for(var a=window,i=Xa();i instanceof a.HTMLIFrameElement;){try{var u=\"string\"===typeof i.contentWindow.location.href}catch(a){u=!1}if(!u)break;a=i.contentWindow;i=Xa(a.document)}return i}function Ne(a){var i=a&&a.nodeName&&a.nodeName.toLowerCase();return i&&(\"input\"===i&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===i||\"true\"===a.contentEditable)}function Oe(a){var i=Me(),u=a.focusedElem,o=a.selectionRange;if(i!==u&&u&&u.ownerDocument&&Le(u.ownerDocument.documentElement,u)){if(null!==o&&Ne(u))if(i=o.start,a=o.end,void 0===a&&(a=i),\"selectionStart\"in u)u.selectionStart=i,u.selectionEnd=Math.min(a,u.value.length);else if(a=(i=u.ownerDocument||document)&&i.defaultView||window,a.getSelection){a=a.getSelection();var s=u.textContent.length,w=Math.min(o.start,s);o=void 0===o.end?w:Math.min(o.end,s);!a.extend&&w>o&&(s=o,o=w,w=s);s=Ke(u,w);var x=Ke(u,o);s&&x&&(1!==a.rangeCount||a.anchorNode!==s.node||a.anchorOffset!==s.offset||a.focusNode!==x.node||a.focusOffset!==x.offset)&&(i=i.createRange(),i.setStart(s.node,s.offset),a.removeAllRanges(),w>o?(a.addRange(i),a.extend(x.node,x.offset)):(i.setEnd(x.node,x.offset),a.addRange(i)))}i=[];for(a=u;a=a.parentNode;)1===a.nodeType&&i.push({element:a,left:a.scrollLeft,top:a.scrollTop});\"function\"===typeof u.focus&&u.focus();for(u=0;u=document.documentMode,Dt=null,Mt=null,Ft=null,Rt=!1;function Ue(a,i,u){var o=u.window===u?u.document:9===u.nodeType?u:u.ownerDocument;Rt||null==Dt||Dt!==Xa(o)||(o=Dt,\"selectionStart\"in o&&Ne(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Ft&&Ie(Ft,o)||(Ft=o,o=oe(Mt,\"onSelect\"),0gr||(a.current=hr[gr],hr[gr]=null,gr--)}function G(a,i){gr++;hr[gr]=a.current;a.current=i}var mr={},vr=Uf(mr),br=Uf(!1),yr=mr;function Yf(a,i){var u=a.type.contextTypes;if(!u)return mr;var o=a.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===i)return o.__reactInternalMemoizedMaskedChildContext;var s,w={};for(s in u)w[s]=i[s];o&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=i,a.__reactInternalMemoizedMaskedChildContext=w);return w}function Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(br);E(vr)}function ag(a,i,u){if(vr.current!==mr)throw Error(p(168));G(vr,i);G(br,u)}function bg(a,i,u){var o=a.stateNode;i=i.childContextTypes;if(\"function\"!==typeof o.getChildContext)return u;o=o.getChildContext();for(var s in o)if(!(s in i))throw Error(p(108,Ra(a)||\"Unknown\",s));return ie({},u,o)}function cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||mr;yr=vr.current;G(vr,a);G(br,br.current);return!0}function dg(a,i,u){var o=a.stateNode;if(!o)throw Error(p(169));u?(a=bg(a,i,yr),o.__reactInternalMemoizedMergedChildContext=a,E(br),E(vr),G(vr,a)):E(br);G(br,u)}var kr=null,wr=!1,Sr=!1;function hg(a){null===kr?kr=[a]:kr.push(a)}function ig(a){wr=!0;hg(a)}function jg(){if(!Sr&&null!==kr){Sr=!0;var a=0,i=vn;try{var u=kr;for(vn=1;a>=x;s-=x;jr=1<<32-dn(i)+s|u<z?(N=C,C=null):N=C.sibling;var _=r(i,C,o[z],s);if(null===_){null===C&&(C=N);break}a&&C&&null===_.alternate&&b(i,C);u=f(_,u,z);null===x?w=_:x.sibling=_;x=_;C=N}if(z===o.length)return c(i,C),Mr&&tg(i,z),w;if(null===C){for(;zz?(N=C,C=null):N=C.sibling;var j=r(i,C,_.value,s);if(null===j){null===C&&(C=N);break}a&&C&&null===j.alternate&&b(i,C);u=f(j,u,z);null===x?w=j:x.sibling=j;x=j;C=N}if(_.done)return c(i,C),Mr&&tg(i,z),w;if(null===C){for(;!_.done;z++,_=o.next())_=q(i,_.value,s),null!==_&&(u=f(_,u,z),null===x?w=_:x.sibling=_,x=_);Mr&&tg(i,z);return w}for(C=d(i,C);!_.done;z++,_=o.next())_=y(C,i,z,_.value,s),null!==_&&(a&&null!==_.alternate&&C.delete(null===_.key?z:_.key),u=f(_,u,z),null===x?w=_:x.sibling=_,x=_);a&&C.forEach((function(a){return b(i,a)}));Mr&&tg(i,z);return w}function J(a,i,u,o){\"object\"===typeof u&&null!==u&&u.type===U&&null===u.key&&(u=u.props.children);if(\"object\"===typeof u&&null!==u){switch(u.$$typeof){case O:e:{for(var s=u.key,w=i;null!==w;){if(w.key===s){s=u.type;if(s===U){if(7===w.tag){c(a,w.sibling);i=e(w,u.props.children);i.return=a;a=i;break e}}else if(w.elementType===s||\"object\"===typeof s&&null!==s&&s.$$typeof===X&&uh(s)===w.type){c(a,w.sibling);i=e(w,u.props);i.ref=sh(a,w,u);i.return=a;a=i;break e}c(a,w);break}b(a,w);w=w.sibling}u.type===U?(i=Ah(u.props.children,a.mode,o,u.key),i.return=a,a=i):(o=yh(u.type,u.key,u.props,null,a.mode,o),o.ref=sh(a,i,u),o.return=a,a=o)}return g(a);case I:e:{for(w=u.key;null!==i;){if(i.key===w){if(4===i.tag&&i.stateNode.containerInfo===u.containerInfo&&i.stateNode.implementation===u.implementation){c(a,i.sibling);i=e(i,u.children||[]);i.return=a;a=i;break e}c(a,i);break}b(a,i);i=i.sibling}i=zh(u,a.mode,o);i.return=a;a=i}return g(a);case X:return w=u._init,J(a,i,w(u._payload),o)}if(fe(u))return n(a,i,u,o);if(Ka(u))return t(a,i,u,o);th(a,u)}return\"string\"===typeof u&&\"\"!==u||\"number\"===typeof u?(u=\"\"+u,null!==i&&6===i.tag?(c(a,i.sibling),i=e(i,u),i.return=a,a=i):(c(a,i),i=xh(u,a.mode,o),i.return=a,a=i),g(a)):c(a,i)}return J}var Hr=vh(!0),$r=vh(!1),Kr={},Yr=Uf(Kr),Zr=Uf(Kr),Gr=Uf(Kr);function Hh(a){if(a===Kr)throw Error(p(174));return a}function Ih(a,i){G(Gr,i);G(Zr,a);G(Yr,Kr);a=i.nodeType;switch(a){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:lb(null,\"\");break;default:a=8===a?i.parentNode:i,i=a.namespaceURI||null,a=a.tagName,i=lb(i,a)}E(Yr);G(Yr,i)}function Jh(){E(Yr);E(Zr);E(Gr)}function Kh(a){Hh(Gr.current);var i=Hh(Yr.current);var u=lb(i,a.type);i!==u&&(G(Zr,a),G(Yr,u))}function Lh(a){Zr.current===a&&(E(Yr),E(Zr))}var qr=Uf(0);function Mh(a){for(var i=a;null!==i;){if(13===i.tag){var u=i.memoizedState;if(null!==u&&(u=u.dehydrated,null===u||\"$?\"===u.data||\"$!\"===u.data))return i}else if(19===i.tag&&void 0!==i.memoizedProps.revealOrder){if(0!==(128&i.flags))return i}else if(null!==i.child){i.child.return=i;i=i.child;continue}if(i===a)break;for(;null===i.sibling;){if(null===i.return||i.return===a)return null;i=i.return}i.sibling.return=i.return;i=i.sibling}return null}var Xr=[];function Oh(){for(var a=0;au?u:4;a(!0);var o=tl.transition;tl.transition={};try{a(!1),i()}finally{vn=u,tl.transition=o}}function Fi(){return di().memoizedState}function Gi(a,i,u){var o=lh(a);u={lane:o,action:u,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(i,u);else if(u=Yg(a,i,u,o),null!==u){var s=L();mh(u,a,o,s);Ji(u,i,o)}}function ri(a,i,u){var o=lh(a),s={lane:o,action:u,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(i,s);else{var w=a.alternate;if(0===a.lanes&&(null===w||0===w.lanes)&&(w=i.lastRenderedReducer,null!==w))try{var x=i.lastRenderedState,C=w(x,u);s.hasEagerState=!0;s.eagerState=C;if(Pt(C,x)){var z=i.interleaved;null===z?(s.next=s,Xg(i)):(s.next=z.next,z.next=s);i.interleaved=s;return}}catch(a){}u=Yg(a,i,s,o);null!==u&&(s=L(),mh(u,a,o,s),Ji(u,i,o))}}function Hi(a){var i=a.alternate;return a===ul||null!==i&&i===ul}function Ii(a,i){Sl=wl=!0;var u=a.pending;null===u?i.next=i:(i.next=u.next,u.next=i);a.pending=i}function Ji(a,i,u){if(0!==(4194240&u)){var o=i.lanes;o&=a.pendingLanes;u|=o;i.lanes=u;Cc(a,u)}}var Cl={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},zl={readContext:Vg,useCallback:function(a,i){ci().memoizedState=[a,void 0===i?null:i];return a},useContext:Vg,useEffect:vi,useImperativeHandle:function(a,i,u){u=null!==u&&void 0!==u?u.concat([a]):null;return ti(4194308,4,yi.bind(null,i,a),u)},useLayoutEffect:function(a,i){return ti(4194308,4,a,i)},useInsertionEffect:function(a,i){return ti(4,2,a,i)},useMemo:function(a,i){var u=ci();i=void 0===i?null:i;a=a();u.memoizedState=[a,i];return a},useReducer:function(a,i,u){var o=ci();i=void 0!==u?u(i):i;o.memoizedState=o.baseState=i;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:i};o.queue=a;a=a.dispatch=Gi.bind(null,ul,a);return[o.memoizedState,a]},useRef:function(a){var i=ci();a={current:a};return i.memoizedState=a},useState:qi,useDebugValue:Ai,useDeferredValue:function(a){return ci().memoizedState=a},useTransition:function(){var a=qi(!1),i=a[0];a=Ei.bind(null,a[1]);ci().memoizedState=a;return[i,a]},useMutableSource:function(){},useSyncExternalStore:function(a,i,u){var o=ul,s=ci();if(Mr){if(void 0===u)throw Error(p(407));u=u()}else{u=i();if(null===Gl)throw Error(p(349));0!==(30&ll)||ni(o,i,u)}s.memoizedState=u;var w={value:u,getSnapshot:i};s.queue=w;vi(ki.bind(null,o,w,a),[a]);o.flags|=2048;li(9,mi.bind(null,o,w,u,i),void 0,null);return u},useId:function(){var a=ci(),i=Gl.identifierPrefix;if(Mr){var u=Pr;var o=jr;u=(o&~(1<<32-dn(o)-1)).toString(32)+u;i=\":\"+i+\"R\"+u;u=El++;0<\\/script>\",a=a.removeChild(a.firstChild)):\"string\"===typeof o.is?a=x.createElement(u,{is:o.is}):(a=x.createElement(u),\"select\"===u&&(x=a,o.multiple?x.multiple=!0:o.size&&(x.size=o.size))):a=x.createElementNS(a,u);a[or]=i;a[sr]=o;Ml(a,i,!1,!1);i.stateNode=a;e:{x=vb(u,o);switch(u){case\"dialog\":D(\"cancel\",a);D(\"close\",a);s=o;break;case\"iframe\":case\"object\":case\"embed\":D(\"load\",a);s=o;break;case\"video\":case\"audio\":for(s=0;sma&&(i.flags|=128,o=!0,Ej(w,!1),i.lanes=4194304)}else{if(!o)if(a=Mh(x),null!==a){if(i.flags|=128,o=!0,u=a.updateQueue,null!==u&&(i.updateQueue=u,i.flags|=4),Ej(w,!0),null===w.tail&&\"hidden\"===w.tailMode&&!x.alternate&&!Mr)return S(i),null}else 2*tn()-w.renderingStartTime>ma&&1073741824!==u&&(i.flags|=128,o=!0,Ej(w,!1),i.lanes=4194304);w.isBackwards?(x.sibling=i.child,i.child=x):(u=w.last,null!==u?u.sibling=x:i.child=x,w.last=x)}if(null!==w.tail)return i=w.tail,w.rendering=i,w.tail=i.sibling,w.renderingStartTime=tn(),i.sibling=null,u=qr.current,G(qr,o?1&u|2:1&u),i;S(i);return null;case 22:case 23:return Ij(),o=null!==i.memoizedState,null!==a&&null!==a.memoizedState!==o&&(i.flags|=8192),o&&0!==(1&i.mode)?0!==(1073741824&ea)&&(S(i),6&i.subtreeFlags&&(i.flags|=8192)):S(i),null;case 24:return null;case 25:return null}throw Error(p(156,i.tag))}function Jj(a,i){wg(i);switch(i.tag){case 1:return Zf(i.type)&&$f(),a=i.flags,65536&a?(i.flags=-65537&a|128,i):null;case 3:return Jh(),E(br),E(vr),Oh(),a=i.flags,0!==(65536&a)&&0===(128&a)?(i.flags=-65537&a|128,i):null;case 5:return Lh(i),null;case 13:E(qr);a=i.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===i.alternate)throw Error(p(340));Ig()}a=i.flags;return 65536&a?(i.flags=-65537&a|128,i):null;case 19:return E(qr),null;case 4:return Jh(),null;case 10:return Rg(i.type._context),null;case 22:case 23:return Ij(),null;case 24:return null;default:return null}}var Il=!1,Ul=!1,Vl=\"function\"===typeof WeakSet?WeakSet:Set,Wl=null;function Mj(a,i){var u=a.ref;if(null!==u)if(\"function\"===typeof u)try{u(null)}catch(u){W(a,i,u)}else u.current=null}function Nj(a,i,u){try{u()}catch(u){W(a,i,u)}}var Ql=!1;function Pj(a,i){nr=Dn;a=Me();if(Ne(a)){if(\"selectionStart\"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var o=u.getSelection&&u.getSelection();if(o&&0!==o.rangeCount){u=o.anchorNode;var s=o.anchorOffset,w=o.focusNode;o=o.focusOffset;try{u.nodeType,w.nodeType}catch(a){u=null;break e}var x=0,C=-1,z=-1,N=0,_=0,j=a,P=null;n:for(;;){for(var T;;){j!==u||0!==s&&3!==j.nodeType||(C=x+s);j!==w||0!==o&&3!==j.nodeType||(z=x+o);3===j.nodeType&&(x+=j.nodeValue.length);if(null===(T=j.firstChild))break;P=j;j=T}for(;;){if(j===a)break n;P===u&&++N===s&&(C=x);P===w&&++_===o&&(z=x);if(null!==(T=j.nextSibling))break;j=P;P=j.parentNode}j=T}u=-1===C||-1===z?null:{start:C,end:z}}else u=null}u=u||{start:0,end:0}}else u=null;tr={focusedElem:a,selectionRange:u};Dn=!1;for(Wl=i;null!==Wl;)if(i=Wl,a=i.child,0!==(1028&i.subtreeFlags)&&null!==a)a.return=i,Wl=a;else for(;null!==Wl;){i=Wl;try{var M=i.alternate;if(0!==(1024&i.flags))switch(i.tag){case 0:case 11:case 15:break;case 1:if(null!==M){var F=M.memoizedProps,R=M.memoizedState,O=i.stateNode,I=O.getSnapshotBeforeUpdate(i.elementType===i.type?F:Lg(i.type,F),R);O.__reactInternalSnapshotBeforeUpdate=I}break;case 3:var U=i.stateNode.containerInfo;1===U.nodeType?U.textContent=\"\":9===U.nodeType&&U.documentElement&&U.removeChild(U.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163))}}catch(a){W(i,i.return,a)}a=i.sibling;if(null!==a){a.return=i.return;Wl=a;break}Wl=i.return}M=Ql;Ql=!1;return M}function Qj(a,i,u){var o=i.updateQueue;o=null!==o?o.lastEffect:null;if(null!==o){var s=o=o.next;do{if((s.tag&a)===a){var w=s.destroy;s.destroy=void 0;void 0!==w&&Nj(i,u,w)}s=s.next}while(s!==o)}}function Rj(a,i){i=i.updateQueue;i=null!==i?i.lastEffect:null;if(null!==i){var u=i=i.next;do{if((u.tag&a)===a){var o=u.create;u.destroy=o()}u=u.next}while(u!==i)}}function Sj(a){var i=a.ref;if(null!==i){var u=a.stateNode;switch(a.tag){case 5:a=u;break;default:a=u}\"function\"===typeof i?i(a):i.current=a}}function Tj(a){var i=a.alternate;null!==i&&(a.alternate=null,Tj(i));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(i=a.stateNode,null!==i&&(delete i[or],delete i[sr],delete i[fr],delete i[dr],delete i[pr]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Uj(a){return 5===a.tag||3===a.tag||4===a.tag}function Vj(a){e:for(;;){for(;null===a.sibling;){if(null===a.return||Uj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(2&a.flags)continue e;if(null===a.child||4===a.tag)continue e;a.child.return=a,a=a.child}if(!(2&a.flags))return a.stateNode}}function Wj(a,i,u){var o=a.tag;if(5===o||6===o)a=a.stateNode,i?8===u.nodeType?u.parentNode.insertBefore(a,i):u.insertBefore(a,i):(8===u.nodeType?(i=u.parentNode,i.insertBefore(a,u)):(i=u,i.appendChild(a)),u=u._reactRootContainer,null!==u&&void 0!==u||null!==i.onclick||(i.onclick=Bf));else if(4!==o&&(a=a.child,null!==a))for(Wj(a,i,u),a=a.sibling;null!==a;)Wj(a,i,u),a=a.sibling}function Xj(a,i,u){var o=a.tag;if(5===o||6===o)a=a.stateNode,i?u.insertBefore(a,i):u.appendChild(a);else if(4!==o&&(a=a.child,null!==a))for(Xj(a,i,u),a=a.sibling;null!==a;)Xj(a,i,u),a=a.sibling}var Al=null,Bl=!1;function Zj(a,i,u){for(u=u.child;null!==u;)ak(a,i,u),u=u.sibling}function ak(a,i,u){if(fn&&\"function\"===typeof fn.onCommitFiberUnmount)try{fn.onCommitFiberUnmount(cn,u)}catch(a){}switch(u.tag){case 5:Ul||Mj(u,i);case 6:var o=Al,s=Bl;Al=null;Zj(a,i,u);Al=o;Bl=s;null!==Al&&(Bl?(a=Al,u=u.stateNode,8===a.nodeType?a.parentNode.removeChild(u):a.removeChild(u)):Al.removeChild(u.stateNode));break;case 18:null!==Al&&(Bl?(a=Al,u=u.stateNode,8===a.nodeType?Kf(a.parentNode,u):1===a.nodeType&&Kf(a,u),bd(a)):Kf(Al,u.stateNode));break;case 4:o=Al;s=Bl;Al=u.stateNode.containerInfo;Bl=!0;Zj(a,i,u);Al=o;Bl=s;break;case 0:case 11:case 14:case 15:if(!Ul&&(o=u.updateQueue,null!==o&&(o=o.lastEffect,null!==o))){s=o=o.next;do{var w=s,x=w.destroy;w=w.tag;void 0!==x&&(0!==(2&w)||0!==(4&w))&&Nj(u,i,x);s=s.next}while(s!==o)}Zj(a,i,u);break;case 1:if(!Ul&&(Mj(u,i),o=u.stateNode,\"function\"===typeof o.componentWillUnmount))try{o.props=u.memoizedProps,o.state=u.memoizedState,o.componentWillUnmount()}catch(a){W(u,i,a)}Zj(a,i,u);break;case 21:Zj(a,i,u);break;case 22:1&u.mode?(Ul=(o=Ul)||null!==u.memoizedState,Zj(a,i,u),Ul=o):Zj(a,i,u);break;default:Zj(a,i,u)}}function bk(a){var i=a.updateQueue;if(null!==i){a.updateQueue=null;var u=a.stateNode;null===u&&(u=a.stateNode=new Vl);i.forEach((function(i){var o=ck.bind(null,a,i);u.has(i)||(u.add(i),i.then(o,o))}))}}function dk(a,i){var u=i.deletions;if(null!==u)for(var o=0;os&&(s=x);o&=~w}o=s;o=tn()-o;o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Hl(o/1960))-o;if(10a?16:a;if(null===Ea)var o=!1;else{a=Ea;Ea=null;xa=0;if(0!==(6&Zl))throw Error(p(331));var s=Zl;Zl|=4;for(Wl=a.current;null!==Wl;){var w=Wl,x=w.child;if(0!==(16&Wl.flags)){var C=w.deletions;if(null!==C){for(var z=0;ztn()-ga?Lk(a,0):ua|=u);Ek(a,i)}function Zk(a,i){0===i&&(0===(1&a.mode)?i=1:(i=mn,mn<<=1,0===(130023424&mn)&&(mn=4194304)));var u=L();a=Zg(a,i);null!==a&&(Ac(a,i,u),Ek(a,u))}function vj(a){var i=a.memoizedState,u=0;null!==i&&(u=i.retryLane);Zk(a,u)}function ck(a,i){var u=0;switch(a.tag){case 13:var o=a.stateNode;var s=a.memoizedState;null!==s&&(u=s.retryLane);break;case 19:o=a.stateNode;break;default:throw Error(p(314))}null!==o&&o.delete(i);Zk(a,u)}var _a;_a=function(a,i,u){if(null!==a)if(a.memoizedProps!==i.pendingProps||br.current)Tl=!0;else{if(0===(a.lanes&u)&&0===(128&i.flags))return Tl=!1,zj(a,i,u);Tl=0!==(131072&a.flags)}else Tl=!1,Mr&&0!==(1048576&i.flags)&&ug(i,zr,i.index);i.lanes=0;switch(i.tag){case 2:var o=i.type;jj(a,i);a=i.pendingProps;var s=Yf(i,vr.current);Tg(i,u);s=Xh(null,i,o,a,s,u);var w=bi();i.flags|=1;\"object\"===typeof s&&null!==s&&\"function\"===typeof s.render&&void 0===s.$$typeof?(i.tag=1,i.memoizedState=null,i.updateQueue=null,Zf(o)?(w=!0,cg(i)):w=!1,i.memoizedState=null!==s.state&&void 0!==s.state?s.state:null,ah(i),s.updater=Br,i.stateNode=s,s._reactInternals=i,rh(i,o,a,u),i=kj(null,i,o,!0,w,u)):(i.tag=0,Mr&&w&&vg(i),Yi(null,i,s,u),i=i.child);return i;case 16:o=i.elementType;e:{jj(a,i);a=i.pendingProps;s=o._init;o=s(o._payload);i.type=o;s=i.tag=$k(o);a=Lg(o,a);switch(s){case 0:i=dj(null,i,o,a,u);break e;case 1:i=ij(null,i,o,a,u);break e;case 11:i=Zi(null,i,o,a,u);break e;case 14:i=aj(null,i,o,Lg(o.type,a),u);break e}throw Error(p(306,o,\"\"))}return i;case 0:return o=i.type,s=i.pendingProps,s=i.elementType===o?s:Lg(o,s),dj(a,i,o,s,u);case 1:return o=i.type,s=i.pendingProps,s=i.elementType===o?s:Lg(o,s),ij(a,i,o,s,u);case 3:e:{lj(i);if(null===a)throw Error(p(387));o=i.pendingProps;w=i.memoizedState;s=w.element;bh(a,i);gh(i,o,null,u);var x=i.memoizedState;o=x.element;if(w.isDehydrated){if(w={element:o,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},i.updateQueue.baseState=w,i.memoizedState=w,256&i.flags){s=Ki(Error(p(423)),i);i=mj(a,i,o,u,s);break e}if(o!==s){s=Ki(Error(p(424)),i);i=mj(a,i,o,u,s);break e}for(Dr=Lf(i.stateNode.containerInfo.firstChild),Tr=i,Mr=!0,Fr=null,u=$r(i,null,o,u),i.child=u;u;)u.flags=-3&u.flags|4096,u=u.sibling}else{Ig();if(o===s){i=$i(a,i,u);break e}Yi(a,i,o,u)}i=i.child}return i;case 5:return Kh(i),null===a&&Eg(i),o=i.type,s=i.pendingProps,w=null!==a?a.memoizedProps:null,x=s.children,Ef(o,s)?x=null:null!==w&&Ef(o,w)&&(i.flags|=32),hj(a,i),Yi(a,i,x,u),i.child;case 6:return null===a&&Eg(i),null;case 13:return pj(a,i,u);case 4:return Ih(i,i.stateNode.containerInfo),o=i.pendingProps,null===a?i.child=Hr(i,null,o,u):Yi(a,i,o,u),i.child;case 11:return o=i.type,s=i.pendingProps,s=i.elementType===o?s:Lg(o,s),Zi(a,i,o,s,u);case 7:return Yi(a,i,i.pendingProps,u),i.child;case 8:return Yi(a,i,i.pendingProps.children,u),i.child;case 12:return Yi(a,i,i.pendingProps.children,u),i.child;case 10:e:{o=i.type._context;s=i.pendingProps;w=i.memoizedProps;x=s.value;G(Or,o._currentValue);o._currentValue=x;if(null!==w)if(Pt(w.value,x)){if(w.children===s.children&&!br.current){i=$i(a,i,u);break e}}else for(w=i.child,null!==w&&(w.return=i);null!==w;){var C=w.dependencies;if(null!==C){x=w.child;for(var z=C.firstContext;null!==z;){if(z.context===o){if(1===w.tag){z=ch(-1,u&-u);z.tag=2;var N=w.updateQueue;if(null!==N){N=N.shared;var _=N.pending;null===_?z.next=z:(z.next=_.next,_.next=z);N.pending=z}}w.lanes|=u;z=w.alternate;null!==z&&(z.lanes|=u);Sg(w.return,u,i);C.lanes|=u;break}z=z.next}}else if(10===w.tag)x=w.type===i.type?null:w.child;else if(18===w.tag){x=w.return;if(null===x)throw Error(p(341));x.lanes|=u;C=x.alternate;null!==C&&(C.lanes|=u);Sg(x,u,i);x=w.sibling}else x=w.child;if(null!==x)x.return=w;else for(x=w;null!==x;){if(x===i){x=null;break}w=x.sibling;if(null!==w){w.return=x.return;x=w;break}x=x.return}w=x}Yi(a,i,s.children,u);i=i.child}return i;case 9:return s=i.type,o=i.pendingProps.children,Tg(i,u),s=Vg(s),o=o(s),i.flags|=1,Yi(a,i,o,u),i.child;case 14:return o=i.type,s=Lg(o,i.pendingProps),s=Lg(o.type,s),aj(a,i,o,s,u);case 15:return cj(a,i,i.type,i.pendingProps,u);case 17:return o=i.type,s=i.pendingProps,s=i.elementType===o?s:Lg(o,s),jj(a,i),i.tag=1,Zf(o)?(a=!0,cg(i)):a=!1,Tg(i,u),ph(i,o,s),rh(i,o,s,u),kj(null,i,o,!0,a,u);case 19:return yj(a,i,u);case 22:return ej(a,i,u)}throw Error(p(156,i.tag))};function Gk(a,i){return qe(a,i)}function al(a,i,u,o){this.tag=a;this.key=u;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=i;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=o;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,i,u,o){return new al(a,i,u,o)}function bj(a){a=a.prototype;return!(!a||!a.isReactComponent)}function $k(a){if(\"function\"===typeof a)return bj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===$)return 11;if(a===Z)return 14}return 2}function wh(a,i){var u=a.alternate;null===u?(u=Bg(a.tag,i,a.key,a.mode),u.elementType=a.elementType,u.type=a.type,u.stateNode=a.stateNode,u.alternate=a,a.alternate=u):(u.pendingProps=i,u.type=a.type,u.flags=0,u.subtreeFlags=0,u.deletions=null);u.flags=14680064&a.flags;u.childLanes=a.childLanes;u.lanes=a.lanes;u.child=a.child;u.memoizedProps=a.memoizedProps;u.memoizedState=a.memoizedState;u.updateQueue=a.updateQueue;i=a.dependencies;u.dependencies=null===i?null:{lanes:i.lanes,firstContext:i.firstContext};u.sibling=a.sibling;u.index=a.index;u.ref=a.ref;return u}function yh(a,i,u,o,s,w){var x=2;o=a;if(\"function\"===typeof a)bj(a)&&(x=1);else if(\"string\"===typeof a)x=5;else e:switch(a){case U:return Ah(u.children,s,w,i);case V:x=8;s|=8;break;case A:return a=Bg(12,u,i,2|s),a.elementType=A,a.lanes=w,a;case K:return a=Bg(13,u,i,s),a.elementType=K,a.lanes=w,a;case Y:return a=Bg(19,u,i,s),a.elementType=Y,a.lanes=w,a;case ee:return qj(u,s,w,i);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case B:x=10;break e;case H:x=9;break e;case $:x=11;break e;case Z:x=14;break e;case X:x=16;o=null;break e}throw Error(p(130,null==a?a:typeof a,\"\"))}i=Bg(x,u,i,s);i.elementType=a;i.type=o;i.lanes=w;return i}function Ah(a,i,u,o){a=Bg(7,a,o,i);a.lanes=u;return a}function qj(a,i,u,o){a=Bg(22,a,o,i);a.elementType=ee;a.lanes=u;a.stateNode={isHidden:!1};return a}function xh(a,i,u){a=Bg(6,a,null,i);a.lanes=u;return a}function zh(a,i,u){i=Bg(4,null!==a.children?a.children:[],a.key,i);i.lanes=u;i.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return i}function bl(a,i,u,o,s){this.tag=i;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=o;this.onRecoverableError=s;this.mutableSourceEagerHydrationData=null}function cl(a,i,u,o,s,w,x,C,z){a=new bl(a,i,u,C,z);1===i?(i=1,!0===w&&(i|=8)):i=0;w=Bg(3,null,null,i);a.current=w;w.stateNode=a;w.memoizedState={element:o,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null};ah(w);return a}function dl(a,i,u){var o=3>>1,l=e[a];if(!(0>>1;ag(u,t))og(s,u)?(e[a]=s,e[o]=t,a=o):(e[a]=u,e[i]=t,a=i);else{if(!(og(s,t)))break e;e[a]=s,e[o]=t,a=o}}}return n}function g(e,n){var t=e.sortIndex-n.sortIndex;return 0!==t?t:e.id-n.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var n=performance;e.unstable_now=function(){return n.now()}}else{var t=Date,a=t.now();e.unstable_now=function(){return t.now()-a}}var l=[],r=[],i=1,u=null,o=3,s=!1,c=!1,b=!1,d=\"function\"===typeof setTimeout?setTimeout:null,_=\"function\"===typeof clearTimeout?clearTimeout:null,v=\"undefined\"!==typeof setImmediate?setImmediate:null;\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(e){for(var n=h(r);null!==n;){if(null===n.callback)k(r);else{if(!(n.startTime<=e))break;k(r),n.sortIndex=n.expirationTime,f(l,n)}n=h(r)}}function H(e){b=!1;G(e);if(!c)if(null!==h(l))c=!0,I(J);else{var n=h(r);null!==n&&K(H,n.startTime-e)}}function J(n,t){c=!1;b&&(b=!1,_(m),m=-1);s=!0;var a=o;try{G(t);for(u=h(l);null!==u&&(!(u.expirationTime>t)||n&&!M());){var i=u.callback;if(\"function\"===typeof i){u.callback=null;o=u.priorityLevel;var d=i(u.expirationTime<=t);t=e.unstable_now();\"function\"===typeof d?u.callback=d:u===h(l)&&k(l);G(t)}else k(l);u=h(l)}if(null!==u)var v=!0;else{var p=h(r);null!==p&&K(H,p.startTime-t);v=!1}return v}finally{u=null,o=a,s=!1}}var p=!1,y=null,m=-1,w=5,P=-1;function M(){return!(e.unstable_now()-Pe||125u?(n.sortIndex=a,f(r,n),null===h(l)&&n===h(r)&&(b?(_(m),m=-1):b=!0,K(H,a-u))):(n.sortIndex=o,f(l,n),c||s||(c=!0,I(J)));return n};e.unstable_shouldYield=M;e.unstable_wrapCallback=function(e){var n=o;return function(){var t=o;o=n;try{return e.apply(this,arguments)}finally{o=t}}};const L=e.unstable_now,F=e.unstable_IdlePriority,E=e.unstable_ImmediatePriority,N=e.unstable_LowPriority,j=e.unstable_NormalPriority,q=e.unstable_Profiling,B=e.unstable_UserBlockingPriority,U=e.unstable_cancelCallback,W=e.unstable_continueExecution,Y=e.unstable_forceFrameRate,D=e.unstable_getCurrentPriorityLevel,z=e.unstable_getFirstCallbackNode,A=e.unstable_next,O=e.unstable_pauseExecution,Q=e.unstable_requestPaint,S=e.unstable_runWithPriority,V=e.unstable_scheduleCallback,X=e.unstable_shouldYield,Z=e.unstable_wrapCallback;export{e as default,F as unstable_IdlePriority,E as unstable_ImmediatePriority,N as unstable_LowPriority,j as unstable_NormalPriority,q as unstable_Profiling,B as unstable_UserBlockingPriority,U as unstable_cancelCallback,W as unstable_continueExecution,Y as unstable_forceFrameRate,D as unstable_getCurrentPriorityLevel,z as unstable_getFirstCallbackNode,A as unstable_next,L as unstable_now,O as unstable_pauseExecution,Q as unstable_requestPaint,S as unstable_runWithPriority,V as unstable_scheduleCallback,X as unstable_shouldYield,Z as unstable_wrapCallback};\n\n//# sourceMappingURL=index.js.map", "import {\n AcceleratedAnimation,\n AnimatePresence,\n DeprecatedLayoutGroupContext,\n DragControls,\n FlatTree,\n LayoutGroup,\n LazyMotion,\n MotionConfig,\n MotionConfigContext,\n MotionContext,\n MotionGlobalConfig,\n MotionValue,\n PresenceContext,\n SwitchLayoutGroupContext,\n VisualElement,\n addPointerEvent,\n addPointerInfo,\n addScaleCorrector,\n animate,\n animateMini,\n animateValue,\n animateVisualElement,\n animationControls,\n animations,\n anticipate,\n backIn,\n backInOut,\n backOut,\n buildTransform,\n calcLength,\n cancelFrame,\n cancelSync,\n circIn,\n circInOut,\n circOut,\n clamp,\n color,\n complex,\n createBox,\n createRendererMotionComponent,\n createScopedAnimate,\n cubicBezier,\n delay,\n disableInstantTransitions,\n distance,\n distance2D,\n domAnimation,\n domMax,\n domMin,\n easeIn,\n easeInOut,\n easeOut,\n filterProps,\n findSpring,\n frame,\n frameData,\n frameSteps,\n inView,\n inertia,\n interpolate,\n invariant,\n isBrowser,\n isDragActive,\n isMotionComponent,\n isMotionValue,\n isValidMotionProp,\n keyframes,\n m,\n makeUseVisualState,\n mirrorEasing,\n mix,\n motion,\n motionValue,\n namespace_exports,\n optimizedAppearDataAttribute,\n pipe,\n progress,\n px,\n resolveMotionValue,\n reverseEasing,\n scroll,\n scrollInfo,\n spring,\n stagger,\n startOptimizedAppearAnimation,\n steps,\n sync,\n transform,\n unwrapMotionComponent,\n useAnimate,\n useAnimateMini,\n useAnimatedState,\n useAnimation,\n useAnimationControls,\n useAnimationFrame,\n useCycle,\n useDomEvent,\n useDragControls,\n useElementScroll,\n useForceUpdate,\n useInView,\n useInstantLayoutTransition,\n useInstantTransition,\n useInvertedScale,\n useIsPresent,\n useIsomorphicLayoutEffect,\n useMotionTemplate,\n useMotionValue,\n useMotionValueEvent,\n usePresence,\n useReducedMotion,\n useReducedMotionConfig,\n useResetProjection,\n useScroll,\n useSpring,\n useTime,\n useTransform,\n useUnmountEffect,\n useVelocity,\n useViewportScroll,\n useWillChange,\n visualElementStore,\n warning,\n wrap\n} from \"./chunk-4Z6NVKPU.mjs\";\nimport {\n __commonJS,\n __privateAdd,\n __privateGet,\n __privateMethod,\n __privateSet,\n __publicField,\n __toESM\n} from \"./chunk-QLPHEVXG.mjs\";\n\n// ../../../node_modules/hsluv/dist/hsluv.cjs\nvar require_hsluv = __commonJS({\n \"../../../node_modules/hsluv/dist/hsluv.cjs\"(exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.Hsluv = void 0;\n var Hsluv2 = class {\n constructor() {\n this.hex = \"#000000\";\n this.rgb_r = 0;\n this.rgb_g = 0;\n this.rgb_b = 0;\n this.xyz_x = 0;\n this.xyz_y = 0;\n this.xyz_z = 0;\n this.luv_l = 0;\n this.luv_u = 0;\n this.luv_v = 0;\n this.lch_l = 0;\n this.lch_c = 0;\n this.lch_h = 0;\n this.hsluv_h = 0;\n this.hsluv_s = 0;\n this.hsluv_l = 0;\n this.hpluv_h = 0;\n this.hpluv_p = 0;\n this.hpluv_l = 0;\n this.r0s = 0;\n this.r0i = 0;\n this.r1s = 0;\n this.r1i = 0;\n this.g0s = 0;\n this.g0i = 0;\n this.g1s = 0;\n this.g1i = 0;\n this.b0s = 0;\n this.b0i = 0;\n this.b1s = 0;\n this.b1i = 0;\n }\n static fromLinear(c) {\n if (c <= 31308e-7) {\n return 12.92 * c;\n } else {\n return 1.055 * Math.pow(c, 1 / 2.4) - 0.055;\n }\n }\n static toLinear(c) {\n if (c > 0.04045) {\n return Math.pow((c + 0.055) / 1.055, 2.4);\n } else {\n return c / 12.92;\n }\n }\n static yToL(Y) {\n if (Y <= Hsluv2.epsilon) {\n return Y / Hsluv2.refY * Hsluv2.kappa;\n } else {\n return 116 * Math.pow(Y / Hsluv2.refY, 1 / 3) - 16;\n }\n }\n static lToY(L) {\n if (L <= 8) {\n return Hsluv2.refY * L / Hsluv2.kappa;\n } else {\n return Hsluv2.refY * Math.pow((L + 16) / 116, 3);\n }\n }\n static rgbChannelToHex(chan) {\n const c = Math.round(chan * 255);\n const digit2 = c % 16;\n const digit1 = (c - digit2) / 16 | 0;\n return Hsluv2.hexChars.charAt(digit1) + Hsluv2.hexChars.charAt(digit2);\n }\n static hexToRgbChannel(hex, offset) {\n const digit1 = Hsluv2.hexChars.indexOf(hex.charAt(offset));\n const digit2 = Hsluv2.hexChars.indexOf(hex.charAt(offset + 1));\n const n = digit1 * 16 + digit2;\n return n / 255;\n }\n static distanceFromOriginAngle(slope, intercept, angle) {\n const d = intercept / (Math.sin(angle) - slope * Math.cos(angle));\n if (d < 0) {\n return Infinity;\n } else {\n return d;\n }\n }\n static distanceFromOrigin(slope, intercept) {\n return Math.abs(intercept) / Math.sqrt(Math.pow(slope, 2) + 1);\n }\n static min6(f1, f2, f3, f4, f5, f6) {\n return Math.min(f1, Math.min(f2, Math.min(f3, Math.min(f4, Math.min(f5, f6)))));\n }\n rgbToHex() {\n this.hex = \"#\";\n this.hex += Hsluv2.rgbChannelToHex(this.rgb_r);\n this.hex += Hsluv2.rgbChannelToHex(this.rgb_g);\n this.hex += Hsluv2.rgbChannelToHex(this.rgb_b);\n }\n hexToRgb() {\n this.hex = this.hex.toLowerCase();\n this.rgb_r = Hsluv2.hexToRgbChannel(this.hex, 1);\n this.rgb_g = Hsluv2.hexToRgbChannel(this.hex, 3);\n this.rgb_b = Hsluv2.hexToRgbChannel(this.hex, 5);\n }\n xyzToRgb() {\n this.rgb_r = Hsluv2.fromLinear(Hsluv2.m_r0 * this.xyz_x + Hsluv2.m_r1 * this.xyz_y + Hsluv2.m_r2 * this.xyz_z);\n this.rgb_g = Hsluv2.fromLinear(Hsluv2.m_g0 * this.xyz_x + Hsluv2.m_g1 * this.xyz_y + Hsluv2.m_g2 * this.xyz_z);\n this.rgb_b = Hsluv2.fromLinear(Hsluv2.m_b0 * this.xyz_x + Hsluv2.m_b1 * this.xyz_y + Hsluv2.m_b2 * this.xyz_z);\n }\n rgbToXyz() {\n const lr = Hsluv2.toLinear(this.rgb_r);\n const lg = Hsluv2.toLinear(this.rgb_g);\n const lb = Hsluv2.toLinear(this.rgb_b);\n this.xyz_x = 0.41239079926595 * lr + 0.35758433938387 * lg + 0.18048078840183 * lb;\n this.xyz_y = 0.21263900587151 * lr + 0.71516867876775 * lg + 0.072192315360733 * lb;\n this.xyz_z = 0.019330818715591 * lr + 0.11919477979462 * lg + 0.95053215224966 * lb;\n }\n xyzToLuv() {\n const divider = this.xyz_x + 15 * this.xyz_y + 3 * this.xyz_z;\n let varU = 4 * this.xyz_x;\n let varV = 9 * this.xyz_y;\n if (divider !== 0) {\n varU /= divider;\n varV /= divider;\n } else {\n varU = NaN;\n varV = NaN;\n }\n this.luv_l = Hsluv2.yToL(this.xyz_y);\n if (this.luv_l === 0) {\n this.luv_u = 0;\n this.luv_v = 0;\n } else {\n this.luv_u = 13 * this.luv_l * (varU - Hsluv2.refU);\n this.luv_v = 13 * this.luv_l * (varV - Hsluv2.refV);\n }\n }\n luvToXyz() {\n if (this.luv_l === 0) {\n this.xyz_x = 0;\n this.xyz_y = 0;\n this.xyz_z = 0;\n return;\n }\n const varU = this.luv_u / (13 * this.luv_l) + Hsluv2.refU;\n const varV = this.luv_v / (13 * this.luv_l) + Hsluv2.refV;\n this.xyz_y = Hsluv2.lToY(this.luv_l);\n this.xyz_x = 0 - 9 * this.xyz_y * varU / ((varU - 4) * varV - varU * varV);\n this.xyz_z = (9 * this.xyz_y - 15 * varV * this.xyz_y - varV * this.xyz_x) / (3 * varV);\n }\n luvToLch() {\n this.lch_l = this.luv_l;\n this.lch_c = Math.sqrt(this.luv_u * this.luv_u + this.luv_v * this.luv_v);\n if (this.lch_c < 1e-8) {\n this.lch_h = 0;\n } else {\n const hrad = Math.atan2(this.luv_v, this.luv_u);\n this.lch_h = hrad * 180 / Math.PI;\n if (this.lch_h < 0) {\n this.lch_h = 360 + this.lch_h;\n }\n }\n }\n lchToLuv() {\n const hrad = this.lch_h / 180 * Math.PI;\n this.luv_l = this.lch_l;\n this.luv_u = Math.cos(hrad) * this.lch_c;\n this.luv_v = Math.sin(hrad) * this.lch_c;\n }\n calculateBoundingLines(l) {\n const sub1 = Math.pow(l + 16, 3) / 1560896;\n const sub2 = sub1 > Hsluv2.epsilon ? sub1 : l / Hsluv2.kappa;\n const s1r = sub2 * (284517 * Hsluv2.m_r0 - 94839 * Hsluv2.m_r2);\n const s2r = sub2 * (838422 * Hsluv2.m_r2 + 769860 * Hsluv2.m_r1 + 731718 * Hsluv2.m_r0);\n const s3r = sub2 * (632260 * Hsluv2.m_r2 - 126452 * Hsluv2.m_r1);\n const s1g = sub2 * (284517 * Hsluv2.m_g0 - 94839 * Hsluv2.m_g2);\n const s2g = sub2 * (838422 * Hsluv2.m_g2 + 769860 * Hsluv2.m_g1 + 731718 * Hsluv2.m_g0);\n const s3g = sub2 * (632260 * Hsluv2.m_g2 - 126452 * Hsluv2.m_g1);\n const s1b = sub2 * (284517 * Hsluv2.m_b0 - 94839 * Hsluv2.m_b2);\n const s2b = sub2 * (838422 * Hsluv2.m_b2 + 769860 * Hsluv2.m_b1 + 731718 * Hsluv2.m_b0);\n const s3b = sub2 * (632260 * Hsluv2.m_b2 - 126452 * Hsluv2.m_b1);\n this.r0s = s1r / s3r;\n this.r0i = s2r * l / s3r;\n this.r1s = s1r / (s3r + 126452);\n this.r1i = (s2r - 769860) * l / (s3r + 126452);\n this.g0s = s1g / s3g;\n this.g0i = s2g * l / s3g;\n this.g1s = s1g / (s3g + 126452);\n this.g1i = (s2g - 769860) * l / (s3g + 126452);\n this.b0s = s1b / s3b;\n this.b0i = s2b * l / s3b;\n this.b1s = s1b / (s3b + 126452);\n this.b1i = (s2b - 769860) * l / (s3b + 126452);\n }\n calcMaxChromaHpluv() {\n const r0 = Hsluv2.distanceFromOrigin(this.r0s, this.r0i);\n const r1 = Hsluv2.distanceFromOrigin(this.r1s, this.r1i);\n const g0 = Hsluv2.distanceFromOrigin(this.g0s, this.g0i);\n const g1 = Hsluv2.distanceFromOrigin(this.g1s, this.g1i);\n const b0 = Hsluv2.distanceFromOrigin(this.b0s, this.b0i);\n const b1 = Hsluv2.distanceFromOrigin(this.b1s, this.b1i);\n return Hsluv2.min6(r0, r1, g0, g1, b0, b1);\n }\n calcMaxChromaHsluv(h) {\n const hueRad = h / 360 * Math.PI * 2;\n const r0 = Hsluv2.distanceFromOriginAngle(this.r0s, this.r0i, hueRad);\n const r1 = Hsluv2.distanceFromOriginAngle(this.r1s, this.r1i, hueRad);\n const g0 = Hsluv2.distanceFromOriginAngle(this.g0s, this.g0i, hueRad);\n const g1 = Hsluv2.distanceFromOriginAngle(this.g1s, this.g1i, hueRad);\n const b0 = Hsluv2.distanceFromOriginAngle(this.b0s, this.b0i, hueRad);\n const b1 = Hsluv2.distanceFromOriginAngle(this.b1s, this.b1i, hueRad);\n return Hsluv2.min6(r0, r1, g0, g1, b0, b1);\n }\n hsluvToLch() {\n if (this.hsluv_l > 99.9999999) {\n this.lch_l = 100;\n this.lch_c = 0;\n } else if (this.hsluv_l < 1e-8) {\n this.lch_l = 0;\n this.lch_c = 0;\n } else {\n this.lch_l = this.hsluv_l;\n this.calculateBoundingLines(this.hsluv_l);\n const max = this.calcMaxChromaHsluv(this.hsluv_h);\n this.lch_c = max / 100 * this.hsluv_s;\n }\n this.lch_h = this.hsluv_h;\n }\n lchToHsluv() {\n if (this.lch_l > 99.9999999) {\n this.hsluv_s = 0;\n this.hsluv_l = 100;\n } else if (this.lch_l < 1e-8) {\n this.hsluv_s = 0;\n this.hsluv_l = 0;\n } else {\n this.calculateBoundingLines(this.lch_l);\n const max = this.calcMaxChromaHsluv(this.lch_h);\n this.hsluv_s = this.lch_c / max * 100;\n this.hsluv_l = this.lch_l;\n }\n this.hsluv_h = this.lch_h;\n }\n hpluvToLch() {\n if (this.hpluv_l > 99.9999999) {\n this.lch_l = 100;\n this.lch_c = 0;\n } else if (this.hpluv_l < 1e-8) {\n this.lch_l = 0;\n this.lch_c = 0;\n } else {\n this.lch_l = this.hpluv_l;\n this.calculateBoundingLines(this.hpluv_l);\n const max = this.calcMaxChromaHpluv();\n this.lch_c = max / 100 * this.hpluv_p;\n }\n this.lch_h = this.hpluv_h;\n }\n lchToHpluv() {\n if (this.lch_l > 99.9999999) {\n this.hpluv_p = 0;\n this.hpluv_l = 100;\n } else if (this.lch_l < 1e-8) {\n this.hpluv_p = 0;\n this.hpluv_l = 0;\n } else {\n this.calculateBoundingLines(this.lch_l);\n const max = this.calcMaxChromaHpluv();\n this.hpluv_p = this.lch_c / max * 100;\n this.hpluv_l = this.lch_l;\n }\n this.hpluv_h = this.lch_h;\n }\n hsluvToRgb() {\n this.hsluvToLch();\n this.lchToLuv();\n this.luvToXyz();\n this.xyzToRgb();\n }\n hpluvToRgb() {\n this.hpluvToLch();\n this.lchToLuv();\n this.luvToXyz();\n this.xyzToRgb();\n }\n hsluvToHex() {\n this.hsluvToRgb();\n this.rgbToHex();\n }\n hpluvToHex() {\n this.hpluvToRgb();\n this.rgbToHex();\n }\n rgbToHsluv() {\n this.rgbToXyz();\n this.xyzToLuv();\n this.luvToLch();\n this.lchToHpluv();\n this.lchToHsluv();\n }\n rgbToHpluv() {\n this.rgbToXyz();\n this.xyzToLuv();\n this.luvToLch();\n this.lchToHpluv();\n this.lchToHpluv();\n }\n hexToHsluv() {\n this.hexToRgb();\n this.rgbToHsluv();\n }\n hexToHpluv() {\n this.hexToRgb();\n this.rgbToHpluv();\n }\n };\n exports.Hsluv = Hsluv2;\n Hsluv2.hexChars = \"0123456789abcdef\";\n Hsluv2.refY = 1;\n Hsluv2.refU = 0.19783000664283;\n Hsluv2.refV = 0.46831999493879;\n Hsluv2.kappa = 903.2962962;\n Hsluv2.epsilon = 0.0088564516;\n Hsluv2.m_r0 = 3.240969941904521;\n Hsluv2.m_r1 = -1.537383177570093;\n Hsluv2.m_r2 = -0.498610760293;\n Hsluv2.m_g0 = -0.96924363628087;\n Hsluv2.m_g1 = 1.87596750150772;\n Hsluv2.m_g2 = 0.041555057407175;\n Hsluv2.m_b0 = 0.055630079696993;\n Hsluv2.m_b1 = -0.20397695888897;\n Hsluv2.m_b2 = 1.056971514242878;\n }\n});\n\n// ../../../node_modules/eventemitter3/index.js\nvar require_eventemitter3 = __commonJS({\n \"../../../node_modules/eventemitter3/index.js\"(exports, module) {\n \"use strict\";\n var has = Object.prototype.hasOwnProperty;\n var prefix2 = \"~\";\n function Events() {\n }\n if (Object.create) {\n Events.prototype = /* @__PURE__ */ Object.create(null);\n if (!new Events().__proto__)\n prefix2 = false;\n }\n function EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n }\n function addListener(emitter, event, fn, context, once) {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"The listener must be a function\");\n }\n var listener = new EE(fn, context || emitter, once), evt = prefix2 ? prefix2 + event : event;\n if (!emitter._events[evt])\n emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn)\n emitter._events[evt].push(listener);\n else\n emitter._events[evt] = [emitter._events[evt], listener];\n return emitter;\n }\n function clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0)\n emitter._events = new Events();\n else\n delete emitter._events[evt];\n }\n function EventEmitter2() {\n this._events = new Events();\n this._eventsCount = 0;\n }\n EventEmitter2.prototype.eventNames = function eventNames() {\n var names = [], events, name;\n if (this._eventsCount === 0)\n return names;\n for (name in events = this._events) {\n if (has.call(events, name))\n names.push(prefix2 ? name.slice(1) : name);\n }\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n return names;\n };\n EventEmitter2.prototype.listeners = function listeners(event) {\n var evt = prefix2 ? prefix2 + event : event, handlers = this._events[evt];\n if (!handlers)\n return [];\n if (handlers.fn)\n return [handlers.fn];\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n return ee;\n };\n EventEmitter2.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix2 ? prefix2 + event : event, listeners = this._events[evt];\n if (!listeners)\n return 0;\n if (listeners.fn)\n return 1;\n return listeners.length;\n };\n EventEmitter2.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix2 ? prefix2 + event : event;\n if (!this._events[evt])\n return false;\n var listeners = this._events[evt], len = arguments.length, args, i;\n if (listeners.fn) {\n if (listeners.once)\n this.removeListener(event, listeners.fn, void 0, true);\n switch (len) {\n case 1:\n return listeners.fn.call(listeners.context), true;\n case 2:\n return listeners.fn.call(listeners.context, a1), true;\n case 3:\n return listeners.fn.call(listeners.context, a1, a2), true;\n case 4:\n return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5:\n return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6:\n return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n for (i = 1, args = new Array(len - 1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length, j;\n for (i = 0; i < length; i++) {\n if (listeners[i].once)\n this.removeListener(event, listeners[i].fn, void 0, true);\n switch (len) {\n case 1:\n listeners[i].fn.call(listeners[i].context);\n break;\n case 2:\n listeners[i].fn.call(listeners[i].context, a1);\n break;\n case 3:\n listeners[i].fn.call(listeners[i].context, a1, a2);\n break;\n case 4:\n listeners[i].fn.call(listeners[i].context, a1, a2, a3);\n break;\n default:\n if (!args)\n for (j = 1, args = new Array(len - 1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n return true;\n };\n EventEmitter2.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n };\n EventEmitter2.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n };\n EventEmitter2.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix2 ? prefix2 + event : event;\n if (!this._events[evt])\n return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n var listeners = this._events[evt];\n if (listeners.fn) {\n if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) {\n events.push(listeners[i]);\n }\n }\n if (events.length)\n this._events[evt] = events.length === 1 ? events[0] : events;\n else\n clearEvent(this, evt);\n }\n return this;\n };\n EventEmitter2.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n if (event) {\n evt = prefix2 ? prefix2 + event : event;\n if (this._events[evt])\n clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n return this;\n };\n EventEmitter2.prototype.off = EventEmitter2.prototype.removeListener;\n EventEmitter2.prototype.addListener = EventEmitter2.prototype.on;\n EventEmitter2.prefixed = prefix2;\n EventEmitter2.EventEmitter = EventEmitter2;\n if (\"undefined\" !== typeof module) {\n module.exports = EventEmitter2;\n }\n }\n});\n\n// ../../../node_modules/process/browser.js\nvar require_browser = __commonJS({\n \"../../../node_modules/process/browser.js\"(exports, module) {\n var process5 = module.exports = {};\n var cachedSetTimeout;\n var cachedClearTimeout;\n function defaultSetTimout() {\n throw new Error(\"setTimeout has not been defined\");\n }\n function defaultClearTimeout() {\n throw new Error(\"clearTimeout has not been defined\");\n }\n (function() {\n try {\n if (typeof setTimeout === \"function\") {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === \"function\") {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n })();\n function runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n return setTimeout(fun, 0);\n }\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n return cachedSetTimeout(fun, 0);\n } catch (e) {\n try {\n return cachedSetTimeout.call(null, fun, 0);\n } catch (e2) {\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n }\n function runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n return clearTimeout(marker);\n }\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n return cachedClearTimeout(marker);\n } catch (e) {\n try {\n return cachedClearTimeout.call(null, marker);\n } catch (e2) {\n return cachedClearTimeout.call(this, marker);\n }\n }\n }\n var queue = [];\n var draining = false;\n var currentQueue;\n var queueIndex = -1;\n function cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n }\n function drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n var len = queue.length;\n while (len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n }\n process5.nextTick = function(fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n };\n function Item(fun, array) {\n this.fun = fun;\n this.array = array;\n }\n Item.prototype.run = function() {\n this.fun.apply(null, this.array);\n };\n process5.title = \"browser\";\n process5.browser = true;\n process5.env = {};\n process5.argv = [];\n process5.version = \"\";\n process5.versions = {};\n function noop4() {\n }\n process5.on = noop4;\n process5.addListener = noop4;\n process5.once = noop4;\n process5.off = noop4;\n process5.removeListener = noop4;\n process5.removeAllListeners = noop4;\n process5.emit = noop4;\n process5.prependListener = noop4;\n process5.prependOnceListener = noop4;\n process5.listeners = function(name) {\n return [];\n };\n process5.binding = function(name) {\n throw new Error(\"process.binding is not supported\");\n };\n process5.cwd = function() {\n return \"/\";\n };\n process5.chdir = function(dir) {\n throw new Error(\"process.chdir is not supported\");\n };\n process5.umask = function() {\n return 0;\n };\n }\n});\n\n// ../../../node_modules/@juggle/resize-observer/lib/exports/resize-observer.umd.js\nvar require_resize_observer_umd = __commonJS({\n \"../../../node_modules/@juggle/resize-observer/lib/exports/resize-observer.umd.js\"(exports, module) {\n (function(global, factory) {\n typeof exports === \"object\" && typeof module !== \"undefined\" ? factory(exports) : typeof define === \"function\" && define.amd ? define([\"exports\"], factory) : (global = typeof globalThis !== \"undefined\" ? globalThis : global || self, factory(global.ResizeObserver = {}));\n })(exports, function(exports2) {\n \"use strict\";\n var resizeObservers = [];\n var hasActiveObservations = function() {\n return resizeObservers.some(function(ro) {\n return ro.activeTargets.length > 0;\n });\n };\n var hasSkippedObservations = function() {\n return resizeObservers.some(function(ro) {\n return ro.skippedTargets.length > 0;\n });\n };\n var msg = \"ResizeObserver loop completed with undelivered notifications.\";\n var deliverResizeLoopError = function() {\n var event;\n if (typeof ErrorEvent === \"function\") {\n event = new ErrorEvent(\"error\", {\n message: msg\n });\n } else {\n event = document.createEvent(\"Event\");\n event.initEvent(\"error\", false, false);\n event.message = msg;\n }\n window.dispatchEvent(event);\n };\n var ResizeObserverBoxOptions;\n (function(ResizeObserverBoxOptions2) {\n ResizeObserverBoxOptions2[\"BORDER_BOX\"] = \"border-box\";\n ResizeObserverBoxOptions2[\"CONTENT_BOX\"] = \"content-box\";\n ResizeObserverBoxOptions2[\"DEVICE_PIXEL_CONTENT_BOX\"] = \"device-pixel-content-box\";\n })(ResizeObserverBoxOptions || (ResizeObserverBoxOptions = {}));\n var freeze = function(obj) {\n return Object.freeze(obj);\n };\n var ResizeObserverSize = function() {\n function ResizeObserverSize2(inlineSize, blockSize) {\n this.inlineSize = inlineSize;\n this.blockSize = blockSize;\n freeze(this);\n }\n return ResizeObserverSize2;\n }();\n var DOMRectReadOnly = function() {\n function DOMRectReadOnly2(x, y, width, height) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.top = this.y;\n this.left = this.x;\n this.bottom = this.top + this.height;\n this.right = this.left + this.width;\n return freeze(this);\n }\n DOMRectReadOnly2.prototype.toJSON = function() {\n var _a = this, x = _a.x, y = _a.y, top = _a.top, right = _a.right, bottom = _a.bottom, left = _a.left, width = _a.width, height = _a.height;\n return { x, y, top, right, bottom, left, width, height };\n };\n DOMRectReadOnly2.fromRect = function(rectangle) {\n return new DOMRectReadOnly2(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n };\n return DOMRectReadOnly2;\n }();\n var isSVG = function(target) {\n return target instanceof SVGElement && \"getBBox\" in target;\n };\n var isHidden = function(target) {\n if (isSVG(target)) {\n var _a = target.getBBox(), width = _a.width, height = _a.height;\n return !width && !height;\n }\n var _b = target, offsetWidth = _b.offsetWidth, offsetHeight = _b.offsetHeight;\n return !(offsetWidth || offsetHeight || target.getClientRects().length);\n };\n var isElement = function(obj) {\n var _a, _b;\n if (obj instanceof Element) {\n return true;\n }\n var scope = (_b = (_a = obj) === null || _a === void 0 ? void 0 : _a.ownerDocument) === null || _b === void 0 ? void 0 : _b.defaultView;\n return !!(scope && obj instanceof scope.Element);\n };\n var isReplacedElement = function(target) {\n switch (target.tagName) {\n case \"INPUT\":\n if (target.type !== \"image\") {\n break;\n }\n case \"VIDEO\":\n case \"AUDIO\":\n case \"EMBED\":\n case \"OBJECT\":\n case \"CANVAS\":\n case \"IFRAME\":\n case \"IMG\":\n return true;\n }\n return false;\n };\n var global = typeof window !== \"undefined\" ? window : {};\n var cache2 = /* @__PURE__ */ new WeakMap();\n var scrollRegexp = /auto|scroll/;\n var verticalRegexp = /^tb|vertical/;\n var IE = /msie|trident/i.test(global.navigator && global.navigator.userAgent);\n var parseDimension = function(pixel) {\n return parseFloat(pixel || \"0\");\n };\n var size = function(inlineSize, blockSize, switchSizes) {\n if (inlineSize === void 0) {\n inlineSize = 0;\n }\n if (blockSize === void 0) {\n blockSize = 0;\n }\n if (switchSizes === void 0) {\n switchSizes = false;\n }\n return new ResizeObserverSize((switchSizes ? blockSize : inlineSize) || 0, (switchSizes ? inlineSize : blockSize) || 0);\n };\n var zeroBoxes = freeze({\n devicePixelContentBoxSize: size(),\n borderBoxSize: size(),\n contentBoxSize: size(),\n contentRect: new DOMRectReadOnly(0, 0, 0, 0)\n });\n var calculateBoxSizes = function(target, forceRecalculation) {\n if (forceRecalculation === void 0) {\n forceRecalculation = false;\n }\n if (cache2.has(target) && !forceRecalculation) {\n return cache2.get(target);\n }\n if (isHidden(target)) {\n cache2.set(target, zeroBoxes);\n return zeroBoxes;\n }\n var cs = getComputedStyle(target);\n var svg = isSVG(target) && target.ownerSVGElement && target.getBBox();\n var removePadding = !IE && cs.boxSizing === \"border-box\";\n var switchSizes = verticalRegexp.test(cs.writingMode || \"\");\n var canScrollVertically = !svg && scrollRegexp.test(cs.overflowY || \"\");\n var canScrollHorizontally = !svg && scrollRegexp.test(cs.overflowX || \"\");\n var paddingTop = svg ? 0 : parseDimension(cs.paddingTop);\n var paddingRight = svg ? 0 : parseDimension(cs.paddingRight);\n var paddingBottom = svg ? 0 : parseDimension(cs.paddingBottom);\n var paddingLeft = svg ? 0 : parseDimension(cs.paddingLeft);\n var borderTop = svg ? 0 : parseDimension(cs.borderTopWidth);\n var borderRight = svg ? 0 : parseDimension(cs.borderRightWidth);\n var borderBottom = svg ? 0 : parseDimension(cs.borderBottomWidth);\n var borderLeft = svg ? 0 : parseDimension(cs.borderLeftWidth);\n var horizontalPadding = paddingLeft + paddingRight;\n var verticalPadding = paddingTop + paddingBottom;\n var horizontalBorderArea = borderLeft + borderRight;\n var verticalBorderArea = borderTop + borderBottom;\n var horizontalScrollbarThickness = !canScrollHorizontally ? 0 : target.offsetHeight - verticalBorderArea - target.clientHeight;\n var verticalScrollbarThickness = !canScrollVertically ? 0 : target.offsetWidth - horizontalBorderArea - target.clientWidth;\n var widthReduction = removePadding ? horizontalPadding + horizontalBorderArea : 0;\n var heightReduction = removePadding ? verticalPadding + verticalBorderArea : 0;\n var contentWidth = svg ? svg.width : parseDimension(cs.width) - widthReduction - verticalScrollbarThickness;\n var contentHeight = svg ? svg.height : parseDimension(cs.height) - heightReduction - horizontalScrollbarThickness;\n var borderBoxWidth = contentWidth + horizontalPadding + verticalScrollbarThickness + horizontalBorderArea;\n var borderBoxHeight = contentHeight + verticalPadding + horizontalScrollbarThickness + verticalBorderArea;\n var boxes = freeze({\n devicePixelContentBoxSize: size(Math.round(contentWidth * devicePixelRatio), Math.round(contentHeight * devicePixelRatio), switchSizes),\n borderBoxSize: size(borderBoxWidth, borderBoxHeight, switchSizes),\n contentBoxSize: size(contentWidth, contentHeight, switchSizes),\n contentRect: new DOMRectReadOnly(paddingLeft, paddingTop, contentWidth, contentHeight)\n });\n cache2.set(target, boxes);\n return boxes;\n };\n var calculateBoxSize = function(target, observedBox, forceRecalculation) {\n var _a = calculateBoxSizes(target, forceRecalculation), borderBoxSize = _a.borderBoxSize, contentBoxSize = _a.contentBoxSize, devicePixelContentBoxSize = _a.devicePixelContentBoxSize;\n switch (observedBox) {\n case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:\n return devicePixelContentBoxSize;\n case ResizeObserverBoxOptions.BORDER_BOX:\n return borderBoxSize;\n default:\n return contentBoxSize;\n }\n };\n var ResizeObserverEntry = function() {\n function ResizeObserverEntry2(target) {\n var boxes = calculateBoxSizes(target);\n this.target = target;\n this.contentRect = boxes.contentRect;\n this.borderBoxSize = freeze([boxes.borderBoxSize]);\n this.contentBoxSize = freeze([boxes.contentBoxSize]);\n this.devicePixelContentBoxSize = freeze([boxes.devicePixelContentBoxSize]);\n }\n return ResizeObserverEntry2;\n }();\n var calculateDepthForNode = function(node) {\n if (isHidden(node)) {\n return Infinity;\n }\n var depth = 0;\n var parent = node.parentNode;\n while (parent) {\n depth += 1;\n parent = parent.parentNode;\n }\n return depth;\n };\n var broadcastActiveObservations = function() {\n var shallowestDepth = Infinity;\n var callbacks2 = [];\n resizeObservers.forEach(function processObserver(ro) {\n if (ro.activeTargets.length === 0) {\n return;\n }\n var entries = [];\n ro.activeTargets.forEach(function processTarget(ot) {\n var entry = new ResizeObserverEntry(ot.target);\n var targetDepth = calculateDepthForNode(ot.target);\n entries.push(entry);\n ot.lastReportedSize = calculateBoxSize(ot.target, ot.observedBox);\n if (targetDepth < shallowestDepth) {\n shallowestDepth = targetDepth;\n }\n });\n callbacks2.push(function resizeObserverCallback() {\n ro.callback.call(ro.observer, entries, ro.observer);\n });\n ro.activeTargets.splice(0, ro.activeTargets.length);\n });\n for (var _i = 0, callbacks_1 = callbacks2; _i < callbacks_1.length; _i++) {\n var callback = callbacks_1[_i];\n callback();\n }\n return shallowestDepth;\n };\n var gatherActiveObservationsAtDepth = function(depth) {\n resizeObservers.forEach(function processObserver(ro) {\n ro.activeTargets.splice(0, ro.activeTargets.length);\n ro.skippedTargets.splice(0, ro.skippedTargets.length);\n ro.observationTargets.forEach(function processTarget(ot) {\n if (ot.isActive()) {\n if (calculateDepthForNode(ot.target) > depth) {\n ro.activeTargets.push(ot);\n } else {\n ro.skippedTargets.push(ot);\n }\n }\n });\n });\n };\n var process5 = function() {\n var depth = 0;\n gatherActiveObservationsAtDepth(depth);\n while (hasActiveObservations()) {\n depth = broadcastActiveObservations();\n gatherActiveObservationsAtDepth(depth);\n }\n if (hasSkippedObservations()) {\n deliverResizeLoopError();\n }\n return depth > 0;\n };\n var trigger;\n var callbacks = [];\n var notify = function() {\n return callbacks.splice(0).forEach(function(cb) {\n return cb();\n });\n };\n var queueMicroTask = function(callback) {\n if (!trigger) {\n var toggle_1 = 0;\n var el_1 = document.createTextNode(\"\");\n var config = { characterData: true };\n new MutationObserver(function() {\n return notify();\n }).observe(el_1, config);\n trigger = function() {\n el_1.textContent = \"\" + (toggle_1 ? toggle_1-- : toggle_1++);\n };\n }\n callbacks.push(callback);\n trigger();\n };\n var queueResizeObserver = function(cb) {\n queueMicroTask(function ResizeObserver2() {\n requestAnimationFrame(cb);\n });\n };\n var watching = 0;\n var isWatching = function() {\n return !!watching;\n };\n var CATCH_PERIOD = 250;\n var observerConfig = { attributes: true, characterData: true, childList: true, subtree: true };\n var events = [\n \"resize\",\n \"load\",\n \"transitionend\",\n \"animationend\",\n \"animationstart\",\n \"animationiteration\",\n \"keyup\",\n \"keydown\",\n \"mouseup\",\n \"mousedown\",\n \"mouseover\",\n \"mouseout\",\n \"blur\",\n \"focus\"\n ];\n var time = function(timeout) {\n if (timeout === void 0) {\n timeout = 0;\n }\n return Date.now() + timeout;\n };\n var scheduled = false;\n var Scheduler = function() {\n function Scheduler2() {\n var _this = this;\n this.stopped = true;\n this.listener = function() {\n return _this.schedule();\n };\n }\n Scheduler2.prototype.run = function(timeout) {\n var _this = this;\n if (timeout === void 0) {\n timeout = CATCH_PERIOD;\n }\n if (scheduled) {\n return;\n }\n scheduled = true;\n var until = time(timeout);\n queueResizeObserver(function() {\n var elementsHaveResized = false;\n try {\n elementsHaveResized = process5();\n } finally {\n scheduled = false;\n timeout = until - time();\n if (!isWatching()) {\n return;\n }\n if (elementsHaveResized) {\n _this.run(1e3);\n } else if (timeout > 0) {\n _this.run(timeout);\n } else {\n _this.start();\n }\n }\n });\n };\n Scheduler2.prototype.schedule = function() {\n this.stop();\n this.run();\n };\n Scheduler2.prototype.observe = function() {\n var _this = this;\n var cb = function() {\n return _this.observer && _this.observer.observe(document.body, observerConfig);\n };\n document.body ? cb() : global.addEventListener(\"DOMContentLoaded\", cb);\n };\n Scheduler2.prototype.start = function() {\n var _this = this;\n if (this.stopped) {\n this.stopped = false;\n this.observer = new MutationObserver(this.listener);\n this.observe();\n events.forEach(function(name) {\n return global.addEventListener(name, _this.listener, true);\n });\n }\n };\n Scheduler2.prototype.stop = function() {\n var _this = this;\n if (!this.stopped) {\n this.observer && this.observer.disconnect();\n events.forEach(function(name) {\n return global.removeEventListener(name, _this.listener, true);\n });\n this.stopped = true;\n }\n };\n return Scheduler2;\n }();\n var scheduler2 = new Scheduler();\n var updateCount = function(n) {\n !watching && n > 0 && scheduler2.start();\n watching += n;\n !watching && scheduler2.stop();\n };\n var skipNotifyOnElement = function(target) {\n return !isSVG(target) && !isReplacedElement(target) && getComputedStyle(target).display === \"inline\";\n };\n var ResizeObservation = function() {\n function ResizeObservation2(target, observedBox) {\n this.target = target;\n this.observedBox = observedBox || ResizeObserverBoxOptions.CONTENT_BOX;\n this.lastReportedSize = {\n inlineSize: 0,\n blockSize: 0\n };\n }\n ResizeObservation2.prototype.isActive = function() {\n var size2 = calculateBoxSize(this.target, this.observedBox, true);\n if (skipNotifyOnElement(this.target)) {\n this.lastReportedSize = size2;\n }\n if (this.lastReportedSize.inlineSize !== size2.inlineSize || this.lastReportedSize.blockSize !== size2.blockSize) {\n return true;\n }\n return false;\n };\n return ResizeObservation2;\n }();\n var ResizeObserverDetail = function() {\n function ResizeObserverDetail2(resizeObserver, callback) {\n this.activeTargets = [];\n this.skippedTargets = [];\n this.observationTargets = [];\n this.observer = resizeObserver;\n this.callback = callback;\n }\n return ResizeObserverDetail2;\n }();\n var observerMap = /* @__PURE__ */ new WeakMap();\n var getObservationIndex = function(observationTargets, target) {\n for (var i = 0; i < observationTargets.length; i += 1) {\n if (observationTargets[i].target === target) {\n return i;\n }\n }\n return -1;\n };\n var ResizeObserverController = function() {\n function ResizeObserverController2() {\n }\n ResizeObserverController2.connect = function(resizeObserver, callback) {\n var detail = new ResizeObserverDetail(resizeObserver, callback);\n observerMap.set(resizeObserver, detail);\n };\n ResizeObserverController2.observe = function(resizeObserver, target, options) {\n var detail = observerMap.get(resizeObserver);\n var firstObservation = detail.observationTargets.length === 0;\n if (getObservationIndex(detail.observationTargets, target) < 0) {\n firstObservation && resizeObservers.push(detail);\n detail.observationTargets.push(new ResizeObservation(target, options && options.box));\n updateCount(1);\n scheduler2.schedule();\n }\n };\n ResizeObserverController2.unobserve = function(resizeObserver, target) {\n var detail = observerMap.get(resizeObserver);\n var index = getObservationIndex(detail.observationTargets, target);\n var lastObservation = detail.observationTargets.length === 1;\n if (index >= 0) {\n lastObservation && resizeObservers.splice(resizeObservers.indexOf(detail), 1);\n detail.observationTargets.splice(index, 1);\n updateCount(-1);\n }\n };\n ResizeObserverController2.disconnect = function(resizeObserver) {\n var _this = this;\n var detail = observerMap.get(resizeObserver);\n detail.observationTargets.slice().forEach(function(ot) {\n return _this.unobserve(resizeObserver, ot.target);\n });\n detail.activeTargets.splice(0, detail.activeTargets.length);\n };\n return ResizeObserverController2;\n }();\n var ResizeObserver = function() {\n function ResizeObserver2(callback) {\n if (arguments.length === 0) {\n throw new TypeError(\"Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.\");\n }\n if (typeof callback !== \"function\") {\n throw new TypeError(\"Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.\");\n }\n ResizeObserverController.connect(this, callback);\n }\n ResizeObserver2.prototype.observe = function(target, options) {\n if (arguments.length === 0) {\n throw new TypeError(\"Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.\");\n }\n if (!isElement(target)) {\n throw new TypeError(\"Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element\");\n }\n ResizeObserverController.observe(this, target, options);\n };\n ResizeObserver2.prototype.unobserve = function(target) {\n if (arguments.length === 0) {\n throw new TypeError(\"Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.\");\n }\n if (!isElement(target)) {\n throw new TypeError(\"Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element\");\n }\n ResizeObserverController.unobserve(this, target);\n };\n ResizeObserver2.prototype.disconnect = function() {\n ResizeObserverController.disconnect(this);\n };\n ResizeObserver2.toString = function() {\n return \"function ResizeObserver () { [polyfill code] }\";\n };\n return ResizeObserver2;\n }();\n exports2.ResizeObserver = ResizeObserver;\n exports2.ResizeObserverEntry = ResizeObserverEntry;\n exports2.ResizeObserverSize = ResizeObserverSize;\n Object.defineProperty(exports2, \"__esModule\", { value: true });\n });\n }\n});\n\n// ../../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js\nvar require_react_is_production_min = __commonJS({\n \"../../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js\"(exports) {\n \"use strict\";\n var b = \"function\" === typeof Symbol && Symbol.for;\n var c = b ? Symbol.for(\"react.element\") : 60103;\n var d = b ? Symbol.for(\"react.portal\") : 60106;\n var e = b ? Symbol.for(\"react.fragment\") : 60107;\n var f = b ? Symbol.for(\"react.strict_mode\") : 60108;\n var g = b ? Symbol.for(\"react.profiler\") : 60114;\n var h = b ? Symbol.for(\"react.provider\") : 60109;\n var k = b ? Symbol.for(\"react.context\") : 60110;\n var l = b ? Symbol.for(\"react.async_mode\") : 60111;\n var m2 = b ? Symbol.for(\"react.concurrent_mode\") : 60111;\n var n = b ? Symbol.for(\"react.forward_ref\") : 60112;\n var p = b ? Symbol.for(\"react.suspense\") : 60113;\n var q = b ? Symbol.for(\"react.suspense_list\") : 60120;\n var r = b ? Symbol.for(\"react.memo\") : 60115;\n var t = b ? Symbol.for(\"react.lazy\") : 60116;\n var v = b ? Symbol.for(\"react.block\") : 60121;\n var w = b ? Symbol.for(\"react.fundamental\") : 60117;\n var x = b ? Symbol.for(\"react.responder\") : 60118;\n var y = b ? Symbol.for(\"react.scope\") : 60119;\n function z(a) {\n if (\"object\" === typeof a && null !== a) {\n var u = a.$$typeof;\n switch (u) {\n case c:\n switch (a = a.type, a) {\n case l:\n case m2:\n case e:\n case g:\n case f:\n case p:\n return a;\n default:\n switch (a = a && a.$$typeof, a) {\n case k:\n case n:\n case t:\n case r:\n case h:\n return a;\n default:\n return u;\n }\n }\n case d:\n return u;\n }\n }\n }\n function A(a) {\n return z(a) === m2;\n }\n exports.AsyncMode = l;\n exports.ConcurrentMode = m2;\n exports.ContextConsumer = k;\n exports.ContextProvider = h;\n exports.Element = c;\n exports.ForwardRef = n;\n exports.Fragment = e;\n exports.Lazy = t;\n exports.Memo = r;\n exports.Portal = d;\n exports.Profiler = g;\n exports.StrictMode = f;\n exports.Suspense = p;\n exports.isAsyncMode = function(a) {\n return A(a) || z(a) === l;\n };\n exports.isConcurrentMode = A;\n exports.isContextConsumer = function(a) {\n return z(a) === k;\n };\n exports.isContextProvider = function(a) {\n return z(a) === h;\n };\n exports.isElement = function(a) {\n return \"object\" === typeof a && null !== a && a.$$typeof === c;\n };\n exports.isForwardRef = function(a) {\n return z(a) === n;\n };\n exports.isFragment = function(a) {\n return z(a) === e;\n };\n exports.isLazy = function(a) {\n return z(a) === t;\n };\n exports.isMemo = function(a) {\n return z(a) === r;\n };\n exports.isPortal = function(a) {\n return z(a) === d;\n };\n exports.isProfiler = function(a) {\n return z(a) === g;\n };\n exports.isStrictMode = function(a) {\n return z(a) === f;\n };\n exports.isSuspense = function(a) {\n return z(a) === p;\n };\n exports.isValidElementType = function(a) {\n return \"string\" === typeof a || \"function\" === typeof a || a === e || a === m2 || a === g || a === f || a === p || a === q || \"object\" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);\n };\n exports.typeOf = z;\n }\n});\n\n// ../../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js\nvar require_react_is = __commonJS({\n \"../../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js\"(exports, module) {\n \"use strict\";\n if (true) {\n module.exports = require_react_is_production_min();\n } else {\n module.exports = null;\n }\n }\n});\n\n// ../../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js\nvar require_hoist_non_react_statics_cjs = __commonJS({\n \"../../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js\"(exports, module) {\n \"use strict\";\n var reactIs = require_react_is();\n var REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n };\n var KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n };\n var FORWARD_REF_STATICS = {\n \"$$typeof\": true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n };\n var MEMO_STATICS = {\n \"$$typeof\": true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n };\n var TYPE_STATICS = {};\n TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\n TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n function getStatics(component) {\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n }\n return TYPE_STATICS[component[\"$$typeof\"]] || REACT_STATICS;\n }\n var defineProperty = Object.defineProperty;\n var getOwnPropertyNames = Object.getOwnPropertyNames;\n var getOwnPropertySymbols = Object.getOwnPropertySymbols;\n var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n var getPrototypeOf = Object.getPrototypeOf;\n var objectPrototype = Object.prototype;\n function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== \"string\") {\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n var keys3 = getOwnPropertyNames(sourceComponent);\n if (getOwnPropertySymbols) {\n keys3 = keys3.concat(getOwnPropertySymbols(sourceComponent));\n }\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n for (var i = 0; i < keys3.length; ++i) {\n var key7 = keys3[i];\n if (!KNOWN_STATICS[key7] && !(blacklist && blacklist[key7]) && !(sourceStatics && sourceStatics[key7]) && !(targetStatics && targetStatics[key7])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key7);\n try {\n defineProperty(targetComponent, key7, descriptor);\n } catch (e) {\n }\n }\n }\n }\n return targetComponent;\n }\n module.exports = hoistNonReactStatics;\n }\n});\n\n// ../../../node_modules/fontfaceobserver/fontfaceobserver.standalone.js\nvar require_fontfaceobserver_standalone = __commonJS({\n \"../../../node_modules/fontfaceobserver/fontfaceobserver.standalone.js\"(exports, module) {\n (function() {\n function l(a, b) {\n document.addEventListener ? a.addEventListener(\"scroll\", b, false) : a.attachEvent(\"scroll\", b);\n }\n function m2(a) {\n document.body ? a() : document.addEventListener ? document.addEventListener(\"DOMContentLoaded\", function c() {\n document.removeEventListener(\"DOMContentLoaded\", c);\n a();\n }) : document.attachEvent(\"onreadystatechange\", function k() {\n if (\"interactive\" == document.readyState || \"complete\" == document.readyState)\n document.detachEvent(\"onreadystatechange\", k), a();\n });\n }\n ;\n function t(a) {\n this.a = document.createElement(\"div\");\n this.a.setAttribute(\"aria-hidden\", \"true\");\n this.a.appendChild(document.createTextNode(a));\n this.b = document.createElement(\"span\");\n this.c = document.createElement(\"span\");\n this.h = document.createElement(\"span\");\n this.f = document.createElement(\"span\");\n this.g = -1;\n this.b.style.cssText = \"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";\n this.c.style.cssText = \"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";\n this.f.style.cssText = \"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";\n this.h.style.cssText = \"display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;\";\n this.b.appendChild(this.h);\n this.c.appendChild(this.f);\n this.a.appendChild(this.b);\n this.a.appendChild(this.c);\n }\n function u(a, b) {\n a.a.style.cssText = \"max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:\" + b + \";\";\n }\n function z(a) {\n var b = a.a.offsetWidth, c = b + 100;\n a.f.style.width = c + \"px\";\n a.c.scrollLeft = c;\n a.b.scrollLeft = a.b.scrollWidth + 100;\n return a.g !== b ? (a.g = b, true) : false;\n }\n function A(a, b) {\n function c() {\n var a2 = k;\n z(a2) && a2.a.parentNode && b(a2.g);\n }\n var k = a;\n l(a.b, c);\n l(a.c, c);\n z(a);\n }\n ;\n function B(a, b) {\n var c = b || {};\n this.family = a;\n this.style = c.style || \"normal\";\n this.weight = c.weight || \"normal\";\n this.stretch = c.stretch || \"normal\";\n }\n var C = null, D = null, E = null, F = null;\n function G() {\n if (null === D)\n if (J() && /Apple/.test(window.navigator.vendor)) {\n var a = /AppleWebKit\\/([0-9]+)(?:\\.([0-9]+))(?:\\.([0-9]+))/.exec(window.navigator.userAgent);\n D = !!a && 603 > parseInt(a[1], 10);\n } else\n D = false;\n return D;\n }\n function J() {\n null === F && (F = !!document.fonts);\n return F;\n }\n function K() {\n if (null === E) {\n var a = document.createElement(\"div\");\n try {\n a.style.font = \"condensed 100px sans-serif\";\n } catch (b) {\n }\n E = \"\" !== a.style.font;\n }\n return E;\n }\n function L(a, b) {\n return [a.style, a.weight, K() ? a.stretch : \"\", \"100px\", b].join(\" \");\n }\n B.prototype.load = function(a, b) {\n var c = this, k = a || \"BESbswy\", r = 0, n = b || 3e3, H = (/* @__PURE__ */ new Date()).getTime();\n return new Promise(function(a2, b2) {\n if (J() && !G()) {\n var M = new Promise(function(a3, b3) {\n function e() {\n (/* @__PURE__ */ new Date()).getTime() - H >= n ? b3(Error(\"\" + n + \"ms timeout exceeded\")) : document.fonts.load(L(c, '\"' + c.family + '\"'), k).then(function(c2) {\n 1 <= c2.length ? a3() : setTimeout(e, 25);\n }, b3);\n }\n e();\n }), N = new Promise(function(a3, c2) {\n r = setTimeout(function() {\n c2(Error(\"\" + n + \"ms timeout exceeded\"));\n }, n);\n });\n Promise.race([N, M]).then(\n function() {\n clearTimeout(r);\n a2(c);\n },\n b2\n );\n } else\n m2(function() {\n function v() {\n var b3;\n if (b3 = -1 != f && -1 != g || -1 != f && -1 != h || -1 != g && -1 != h)\n (b3 = f != g && f != h && g != h) || (null === C && (b3 = /AppleWebKit\\/([0-9]+)(?:\\.([0-9]+))/.exec(window.navigator.userAgent), C = !!b3 && (536 > parseInt(b3[1], 10) || 536 === parseInt(b3[1], 10) && 11 >= parseInt(b3[2], 10))), b3 = C && (f == w && g == w && h == w || f == x && g == x && h == x || f == y && g == y && h == y)), b3 = !b3;\n b3 && (d.parentNode && d.parentNode.removeChild(d), clearTimeout(r), a2(c));\n }\n function I() {\n if ((/* @__PURE__ */ new Date()).getTime() - H >= n)\n d.parentNode && d.parentNode.removeChild(d), b2(Error(\"\" + n + \"ms timeout exceeded\"));\n else {\n var a3 = document.hidden;\n if (true === a3 || void 0 === a3)\n f = e.a.offsetWidth, g = p.a.offsetWidth, h = q.a.offsetWidth, v();\n r = setTimeout(I, 50);\n }\n }\n var e = new t(k), p = new t(k), q = new t(k), f = -1, g = -1, h = -1, w = -1, x = -1, y = -1, d = document.createElement(\"div\");\n d.dir = \"ltr\";\n u(e, L(c, \"sans-serif\"));\n u(p, L(c, \"serif\"));\n u(q, L(c, \"monospace\"));\n d.appendChild(e.a);\n d.appendChild(p.a);\n d.appendChild(q.a);\n document.body.appendChild(d);\n w = e.a.offsetWidth;\n x = p.a.offsetWidth;\n y = q.a.offsetWidth;\n I();\n A(e, function(a3) {\n f = a3;\n v();\n });\n u(\n e,\n L(c, '\"' + c.family + '\",sans-serif')\n );\n A(p, function(a3) {\n g = a3;\n v();\n });\n u(p, L(c, '\"' + c.family + '\",serif'));\n A(q, function(a3) {\n h = a3;\n v();\n });\n u(q, L(c, '\"' + c.family + '\",monospace'));\n });\n });\n };\n \"object\" === typeof module ? module.exports = B : (window.FontFaceObserver = B, window.FontFaceObserver.prototype.load = B.prototype.load);\n })();\n }\n});\n\n// ../../router/build/ErrorBoundary.js\nimport { Component } from \"react\";\n\n// ../../router/build/renderPage.js\nimport React from \"react\";\nfunction renderPage(Page4, defaultPageStyle) {\n const style = { style: defaultPageStyle };\n return React.isValidElement(Page4) ? React.cloneElement(Page4, style) : React.createElement(Page4, style);\n}\n\n// ../../router/build/ErrorBoundary.js\nvar NotFoundError = class extends Error {\n};\nvar ErrorBoundaryCaughtError = class extends Error {\n};\nvar ErrorBoundary = class extends Component {\n constructor(props) {\n super(props);\n this.state = { error: void 0, forceUpdateKey: props.forceUpdateKey };\n }\n static getDerivedStateFromError(error) {\n return { error };\n }\n /** Resets the error when forceUpdateKey gets bumped. */\n static getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.forceUpdateKey !== prevState.forceUpdateKey) {\n const newState = {\n forceUpdateKey: nextProps.forceUpdateKey\n };\n if (prevState.error) {\n newState.error = void 0;\n }\n return newState;\n }\n return null;\n }\n render() {\n if (this.state.error === void 0) {\n return this.props.children;\n }\n if (!(this.state.error instanceof NotFoundError)) {\n const error = new ErrorBoundaryCaughtError();\n error.cause = this.state.error;\n throw error;\n }\n const { notFoundPage, defaultPageStyle } = this.props;\n if (!notFoundPage) {\n throw this.state.error;\n }\n return renderPage(notFoundPage, defaultPageStyle);\n }\n};\n\n// ../../router/build/Router.js\nimport { jsx as _jsx5, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Fragment, startTransition, useCallback as useCallback4, useLayoutEffect as useLayoutEffect4, useMemo, useRef as useRef5 } from \"react\";\n\n// ../../router/build/pathVariables.js\nvar pathVariablesRegExpRaw = \":([a-z]\\\\w*)\";\nvar pathVariablesRegExp = /* @__PURE__ */ new RegExp(pathVariablesRegExpRaw, \"gi\");\n\n// ../../router/build/fillPathVariables.js\nfunction fillPathVariables(path, variables) {\n return path.replace(pathVariablesRegExp, (match, name) => {\n const value = variables[name];\n if (typeof value !== \"string\" || value.length === 0)\n return match;\n return encodeURIComponent(value);\n });\n}\n\n// ../../router/build/history.js\nimport { useCallback as useCallback3, useEffect as useEffect2, useLayoutEffect as useLayoutEffect2, useRef as useRef3 } from \"react\";\n\n// ../../router/build/computeRelativePath.js\nfunction computeRelativePath(from, to) {\n if (!from.startsWith(\"/\") || !to.startsWith(\"/\")) {\n throw new Error(\"from/to paths are expected to be absolute\");\n }\n const [fromDir] = getDirAndFile(from);\n const [toDir, toFile] = getDirAndFile(to);\n let relativePath = relative(fromDir, toDir);\n if (relativePath === \"\")\n relativePath = \".\";\n if (!relativePath.startsWith(\".\") && !relativePath.startsWith(\"/\")) {\n relativePath = \"./\" + relativePath;\n }\n return relativePath + \"/\" + toFile;\n}\nfunction getDirAndFile(path) {\n const index = path.lastIndexOf(\"/\");\n return [path.substring(0, index + 1), path.substring(index + 1)];\n}\nvar CHAR_DOT = 46;\nvar CHAR_FORWARD_SLASH = 47;\nvar StringPrototypeCharCodeAt = (str, index) => str.charCodeAt(index);\nvar StringPrototypeLastIndexOf = (str, searchString) => str.lastIndexOf(searchString);\nvar StringPrototypeSlice = (str, start, end) => str.slice(start, end);\nfunction relative(from, to) {\n if (from === to)\n return \"\";\n from = \"/\" + normalizeString(from);\n to = \"/\" + normalizeString(to);\n if (from === to)\n return \"\";\n const fromStart = 1;\n const fromEnd = from.length;\n const fromLen = fromEnd - fromStart;\n const toStart = 1;\n const toLen = to.length - toStart;\n const length = fromLen < toLen ? fromLen : toLen;\n let lastCommonSep = -1;\n let i = 0;\n for (; i < length; i++) {\n const fromCode = StringPrototypeCharCodeAt(from, fromStart + i);\n if (fromCode !== StringPrototypeCharCodeAt(to, toStart + i))\n break;\n else if (fromCode === CHAR_FORWARD_SLASH)\n lastCommonSep = i;\n }\n if (i === length) {\n if (toLen > length) {\n if (StringPrototypeCharCodeAt(to, toStart + i) === CHAR_FORWARD_SLASH) {\n return StringPrototypeSlice(to, toStart + i + 1);\n }\n if (i === 0) {\n return StringPrototypeSlice(to, toStart + i);\n }\n } else if (fromLen > length) {\n if (StringPrototypeCharCodeAt(from, fromStart + i) === CHAR_FORWARD_SLASH) {\n lastCommonSep = i;\n } else if (i === 0) {\n lastCommonSep = 0;\n }\n }\n }\n let out = \"\";\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || StringPrototypeCharCodeAt(from, i) === CHAR_FORWARD_SLASH) {\n out += out.length === 0 ? \"..\" : \"/..\";\n }\n }\n return `${out}${StringPrototypeSlice(to, toStart + lastCommonSep)}`;\n}\nvar allowAboveRoot = false;\nvar separator = \"/\";\nvar isPathSeparator = (code) => code === CHAR_FORWARD_SLASH;\nfunction normalizeString(path) {\n let res = \"\";\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let code = 0;\n for (let i = 0; i <= path.length; ++i) {\n if (i < path.length)\n code = StringPrototypeCharCodeAt(path, i);\n else if (isPathSeparator(code))\n break;\n else\n code = CHAR_FORWARD_SLASH;\n if (isPathSeparator(code)) {\n if (lastSlash === i - 1 || dots === 1) {\n } else if (dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || StringPrototypeCharCodeAt(res, res.length - 1) !== CHAR_DOT || StringPrototypeCharCodeAt(res, res.length - 2) !== CHAR_DOT) {\n if (res.length > 2) {\n const lastSlashIndex = StringPrototypeLastIndexOf(res, separator);\n if (lastSlashIndex === -1) {\n res = \"\";\n lastSegmentLength = 0;\n } else {\n res = StringPrototypeSlice(res, 0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - StringPrototypeLastIndexOf(res, separator);\n }\n lastSlash = i;\n dots = 0;\n continue;\n } else if (res.length !== 0) {\n res = \"\";\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n res += res.length > 0 ? `${separator}..` : \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0)\n res += `${separator}${StringPrototypeSlice(path, lastSlash + 1, i)}`;\n else\n res = StringPrototypeSlice(path, lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === CHAR_DOT && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\n// ../../router/build/forwardQueryParams.js\nfunction forwardCurrentQueryParams(href) {\n const queryParamsString = typeof window !== \"undefined\" ? window.location.search : \"\";\n if (!queryParamsString) {\n return href;\n }\n return forwardQueryParams(queryParamsString, href);\n}\nfunction forwardQueryParams(queryParamsString, href) {\n const startOfHash = href.indexOf(\"#\");\n const hrefWithoutHash = startOfHash === -1 ? href : href.substring(0, startOfHash);\n const hash2 = startOfHash === -1 ? \"\" : href.substring(startOfHash);\n const startOfSearch = hrefWithoutHash.indexOf(\"?\");\n if (startOfSearch === -1) {\n return hrefWithoutHash + queryParamsString + hash2;\n }\n const currentSearchParams = new URLSearchParams(queryParamsString);\n const newSearchString = hrefWithoutHash.substring(startOfSearch + 1);\n const newSearchParams = new URLSearchParams(newSearchString);\n for (const [key7, value] of currentSearchParams) {\n if (!newSearchParams.has(key7)) {\n newSearchParams.append(key7, value);\n }\n }\n return hrefWithoutHash.substring(0, startOfSearch + 1) + newSearchParams.toString() + hash2;\n}\n\n// ../../router/build/utils.js\nimport React2, { useLayoutEffect } from \"react\";\nfunction isObject(value) {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction isString(value) {\n return typeof value === \"string\";\n}\nvar preloadKey = \"preload\";\nfunction isLazyComponentType(componentType) {\n return typeof componentType === \"object\" && componentType !== null && !React2.isValidElement(componentType) && preloadKey in componentType;\n}\nfunction lazy(factory) {\n const LazyComponent = React2.lazy(factory);\n let factoryPromise;\n let LoadedComponent;\n const Component15 = React2.forwardRef(function LazyWithPreload(props, ref) {\n return React2.createElement(LoadedComponent !== null && LoadedComponent !== void 0 ? LoadedComponent : LazyComponent, ref ? { ref, ...props } : props);\n });\n Component15.preload = () => {\n if (!factoryPromise) {\n factoryPromise = factory().then((module) => {\n LoadedComponent = module.default;\n return LoadedComponent;\n });\n }\n return factoryPromise;\n };\n return Component15;\n}\nfunction getRouteElementId(route, hash2) {\n if (hash2 && route) {\n if (route.elements && hash2 in route.elements) {\n return route.elements[hash2];\n } else {\n return hash2;\n }\n }\n return void 0;\n}\nfunction isBot(userAgent) {\n return /bot|-google|google-|yandex|ia_archiver/iu.test(userAgent);\n}\nfunction yieldToMain(options) {\n if (\"scheduler\" in window) {\n if (\"yield\" in scheduler)\n return scheduler.yield(options);\n if (\"postTask\" in scheduler)\n return scheduler.postTask(() => {\n }, options);\n }\n if ((options === null || options === void 0 ? void 0 : options.priority) === \"user-blocking\") {\n return Promise.resolve();\n }\n return new Promise((resolve) => {\n setTimeout(resolve);\n });\n}\nasync function yieldBefore(fn, options) {\n await yieldToMain(options);\n return fn();\n}\nfunction interactionResponse(options) {\n return new Promise((resolve) => {\n setTimeout(resolve, 100);\n requestAnimationFrame(() => {\n void yieldBefore(resolve, options);\n });\n });\n}\nfunction useAfterPaintEffect(effectFn, deps, opts, useEffectFn = useLayoutEffect) {\n useEffectFn(() => {\n const runAfterPaint = async (fn) => {\n await interactionResponse(opts);\n return fn();\n };\n const runPromise = runAfterPaint(effectFn);\n return () => {\n void (async () => {\n const cleanup = await runPromise;\n if (!cleanup)\n return;\n void runAfterPaint(cleanup);\n })();\n };\n }, deps);\n}\nvar noop = () => {\n};\nvar EMPTY_ARRAY = [];\n\n// ../../router/build/getLocalizedNavigationPath.js\nasync function replacePathVariables(path, currentLocale, nextLocale, defaultLocale, collectionId, pathVariables, collectionUtils) {\n var _a, _b, _c;\n let resultPath = path;\n let isMissingInLocale = false;\n const resultPathVariables = { ...pathVariables };\n const matches = Array.from(resultPath.matchAll(pathVariablesRegExp));\n const replacements = await Promise.all(matches.map(async (match) => {\n var _a2;\n const pathVariableWithDelimiter = match === null || match === void 0 ? void 0 : match[0];\n const pathVariableValue = match === null || match === void 0 ? void 0 : match[1];\n if (!pathVariableWithDelimiter || !pathVariableValue) {\n throw new Error(\"Failed to replace path variables: unexpected regex match group\");\n }\n const currentSlug = pathVariables[pathVariableValue];\n if (!currentSlug || !isString(currentSlug)) {\n throw new Error(`No slug found for path variable ${pathVariableValue}`);\n }\n const utils = await ((_a2 = collectionUtils === null || collectionUtils === void 0 ? void 0 : collectionUtils[collectionId]) === null || _a2 === void 0 ? void 0 : _a2.call(collectionUtils));\n if (!utils || !currentLocale) {\n return currentSlug;\n }\n const recordId = await utils.getRecordIdBySlug(currentSlug, currentLocale);\n if (!recordId)\n return currentSlug;\n const nextSlug = await utils.getSlugByRecordId(recordId, nextLocale);\n if (!nextSlug) {\n isMissingInLocale = true;\n const defaultLocaleSlug = await utils.getSlugByRecordId(recordId, defaultLocale);\n if (defaultLocaleSlug) {\n resultPathVariables[pathVariableValue] = defaultLocaleSlug;\n }\n return defaultLocaleSlug !== null && defaultLocaleSlug !== void 0 ? defaultLocaleSlug : currentSlug;\n }\n resultPathVariables[pathVariableValue] = nextSlug;\n return nextSlug;\n }));\n let lastIndex = 0;\n let replacedPath = \"\";\n let hasMatch = false;\n for (let i = 0; i < matches.length; i++) {\n const match = matches[i];\n const replacement = replacements[i];\n if (!match || !replacement)\n continue;\n replacedPath += resultPath.substring(lastIndex, match.index);\n lastIndex = ((_a = match.index) !== null && _a !== void 0 ? _a : 0) + ((_c = (_b = match[0]) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0);\n replacedPath += replacements[i];\n hasMatch = true;\n }\n if (hasMatch) {\n resultPath = replacedPath;\n }\n return {\n path: resultPath,\n pathVariables: resultPathVariables,\n isMissingInLocale\n };\n}\nasync function getLocalizedNavigationPath({ currentLocale, nextLocale, defaultLocale, route, pathVariables, collectionUtils, preserveQueryParams }) {\n const { path } = route;\n let result = {\n path,\n pathVariables,\n isMissingInLocale: false\n };\n if (!path)\n return result;\n if (pathVariables && route.collectionId) {\n try {\n const pathReplacement = await replacePathVariables(path, currentLocale, nextLocale, defaultLocale, route.collectionId, pathVariables, collectionUtils);\n result = pathReplacement;\n } catch {\n }\n }\n if (nextLocale.slug) {\n result.path = \"/\" + nextLocale.slug + result.path;\n }\n if (preserveQueryParams && result.path) {\n result.path = forwardCurrentQueryParams(result.path);\n }\n return result;\n}\n\n// ../../router/build/pageEffects/useViewTransition.js\nimport { useCallback, useEffect, useRef } from \"react\";\n\n// ../../router/build/pageEffects/getPageEffect.js\nfunction getPageEffectForRoute(currentRouteId, nextRouteId, { global, routes }) {\n var _a;\n return ((_a = routes[currentRouteId]) === null || _a === void 0 ? void 0 : _a[nextRouteId]) || global;\n}\n\n// ../../router/build/pageEffects/PageEffectsContext.js\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React3 from \"react\";\nvar defaultSitePageEffects = { global: void 0, routes: {} };\nvar PageEffectsContext = /* @__PURE__ */ React3.createContext(defaultSitePageEffects);\nfunction PageEffectsProvider({ children, value }) {\n return _jsx(PageEffectsContext.Provider, { value, children });\n}\nfunction usePageEffects() {\n return React3.useContext(PageEffectsContext);\n}\n\n// ../../router/build/pageEffects/cssGeneration/linearEasing.js\nvar step = 10;\nvar maxDuration = 1e4;\nfunction createLinearEasing(generator) {\n let time = step;\n let state = generator.next(0);\n const keyframes2 = [state.value];\n while (!state.done && time < maxDuration) {\n state = generator.next(time);\n keyframes2.push(state.value);\n time += step;\n }\n if (keyframes2.length === 1)\n keyframes2.push(state.value);\n return {\n easing: `linear(${keyframes2.join(\",\")})`,\n duration: time - step\n };\n}\n\n// ../../router/build/pageEffects/cssGeneration/masks.js\nvar cssVariable = (name) => `--view-transition-${name}`;\nfunction parseUnit(value) {\n return [parseFloat(value), value.endsWith(\"px\") ? \"px\" : \"%\"];\n}\nfunction calcMaskPosition(mask) {\n const { innerWidth, innerHeight } = window;\n const [x, xUnit] = parseUnit(mask.x);\n const [y, yUnit] = parseUnit(mask.y);\n return {\n x: xUnit === \"px\" ? x : innerWidth * (x / 100),\n y: yUnit === \"px\" ? y : innerHeight * (y / 100)\n };\n}\nvar conic = {\n makeKeyframe: (mask, progress2, page) => {\n let percentage = 0;\n if (page === \"exit\" && mask.angularDirection === \"clockwise\" && progress2 === \"start\" || page === \"exit\" && mask.angularDirection === \"counter-clockwise\" && progress2 === \"end\" || page === \"enter\" && mask.angularDirection === \"counter-clockwise\" && progress2 === \"start\" || page === \"enter\" && mask.angularDirection === \"clockwise\" && progress2 === \"end\") {\n percentage = mask.sweepAngle / 360 * 100;\n }\n return `${cssVariable(\"conic-offset\")}: ${percentage}%;`;\n },\n makeStyles: (mask, page) => {\n const offsetToken = `var(${cssVariable(\"conic-offset\")})`;\n const isTransparentToBlack = page === \"exit\" && mask.angularDirection === \"clockwise\" || page === \"enter\" && mask.angularDirection === \"counter-clockwise\";\n const firstColor = isTransparentToBlack ? \"transparent\" : \"black\";\n const secondColor = isTransparentToBlack ? \"black\" : \"transparent\";\n let gradient = `conic-gradient(from `;\n gradient += `${mask.angle}deg at ${mask.x} ${mask.y}, `;\n gradient += `${firstColor} 0%, ${firstColor} ${offsetToken}, `;\n gradient += `${secondColor} ${offsetToken}, ${secondColor} 100%)`;\n return `mask-image: ${gradient}; -webkit-mask-image: ${gradient};`;\n },\n makePropertyRules: () => `\n @property ${cssVariable(\"conic-offset\")} {\n syntax: '';\n initial-value: 0%;\n inherits: false;\n }\n `\n};\nvar circle = {\n makeKeyframe: (mask, progress2) => {\n const { x, y } = calcMaskPosition(mask);\n if (progress2 === \"start\") {\n return `clip-path: circle(0 at ${x}px ${y}px);`;\n } else {\n const endRadius = Math.hypot(Math.max(x, window.innerWidth - x), Math.max(y, window.innerHeight - y));\n return `clip-path: circle(${endRadius}px at ${x}px ${y}px);`;\n }\n }\n};\nvar inset = {\n makeKeyframe: (mask, progress2) => {\n const { x, y } = calcMaskPosition(mask);\n const bottom = window.innerHeight - y;\n const right = window.innerWidth - x;\n return progress2 === \"start\" ? `clip-path: inset(${y}px ${right}px ${bottom}px ${x}px round ${mask.round}px);` : `clip-path: inset(0 round 0);`;\n }\n};\nvar blinds = {\n makeKeyframe: (mask, progress2, page) => {\n const [, unit] = parseUnit(mask.width);\n let width = `0${unit}`;\n if (progress2 === \"start\" && page === \"exit\" || progress2 === \"end\" && page === \"enter\") {\n width = mask.width;\n }\n return `${cssVariable(\"blinds-width\")}: ${width};`;\n },\n makeStyles: (mask, page) => {\n const widthToken = `var(${cssVariable(\"blinds-width\")})`;\n const firstColor = page === \"exit\" ? \"transparent\" : \"black\";\n const secondColor = page === \"exit\" ? \"black\" : \"transparent\";\n let gradient = `repeating-linear-gradient(`;\n gradient += mask.angle + 90 + \"deg, \";\n gradient += `${firstColor} 0px, ${firstColor} ${widthToken}, `;\n gradient += `${secondColor} ${widthToken}, ${secondColor} ${mask.width})`;\n return `mask-image: ${gradient}; -webkit-mask-image: ${gradient};`;\n },\n makePropertyRules: () => {\n return `\n @property ${cssVariable(\"blinds-width\")} {\n syntax: '';\n initial-value: 0px;\n inherits: false;\n }\n `;\n }\n};\nvar wipe = {\n makeKeyframe: (_mask, progress2, page) => {\n const offset = progress2 === \"start\" && page === \"exit\" || progress2 === \"end\" && page === \"enter\" ? 1 : 0;\n return `${cssVariable(\"wipe-offset\")}: ${offset};`;\n },\n makeStyles: (mask, page) => {\n const offsetToken = `var(${cssVariable(\"wipe-offset\")})`;\n const firstColor = page === \"exit\" ? \"transparent\" : \"black\";\n const secondColor = page === \"exit\" ? \"black\" : \"transparent\";\n let gradient = `linear-gradient(`;\n gradient += mask.angle + 90 + \"deg, \";\n gradient += `${firstColor} calc(calc(0% - ${mask.width}) + calc(calc(100% + ${mask.width}) * ${offsetToken})), `;\n gradient += `${secondColor} calc(calc(100% + ${mask.width}) * ${offsetToken}))`;\n return `mask-image: ${gradient}; -webkit-mask-image: ${gradient};`;\n },\n makePropertyRules: () => {\n return `\n @property ${cssVariable(\"wipe-offset\")} {\n syntax: '';\n initial-value: 0;\n inherits: false;\n }\n `;\n }\n};\nvar maskGenerators = { circle, conic, inset, blinds, wipe };\n\n// ../../router/build/pageEffects/cssGeneration/page.js\nvar restState = {\n opacity: 1,\n x: \"0px\",\n y: \"0px\",\n scale: 1,\n rotate: 0,\n rotateX: 0,\n rotateY: 0,\n mask: void 0\n};\nfunction valuesToCSSKeyframes(values, progress2, page, maskGenerator) {\n var _a;\n let keyframes2 = `\n opacity: ${values.opacity};\n transform: translate(${values.x}, ${values.y}) scale(${values.scale}) rotateX(${values.rotateX}deg) rotateY(${values.rotateY}deg) rotateZ(${values.rotate}deg);\n `;\n if (values.mask) {\n keyframes2 += ((_a = maskGenerator === null || maskGenerator === void 0 ? void 0 : maskGenerator.makeKeyframe) === null || _a === void 0 ? void 0 : _a.call(maskGenerator, values.mask, progress2, page)) || \"\";\n }\n return keyframes2;\n}\nfunction getMaskGenerator(type) {\n return type ? maskGenerators[type] : void 0;\n}\nfunction createPageTransitionRules(page, { transition, ...values }) {\n var _a;\n const name = \"view-transition-\" + page;\n const settings = { duration: \"0s\", easing: \"linear\" };\n if (transition.type === \"tween\") {\n settings.duration = transition.duration + \"s\";\n settings.easing = `cubic-bezier(${transition.ease.join(\",\")})`;\n } else if (isSpringTransition(transition)) {\n const { easing, duration } = createLinearEasing(spring({\n keyframes: [0, 1],\n ...getSpringOptions(transition),\n restDelta: 1e-3,\n restSpeed: 1e-4\n }));\n settings.duration = duration + \"ms\";\n settings.easing = easing;\n }\n const maskGenerator = getMaskGenerator((_a = values === null || values === void 0 ? void 0 : values.mask) === null || _a === void 0 ? void 0 : _a.type);\n let startKeyframes = valuesToCSSKeyframes(values, \"start\", page, maskGenerator);\n let endKeyframes = valuesToCSSKeyframes({ ...restState, mask: values.mask }, \"end\", page, maskGenerator);\n if (page === \"exit\") {\n ;\n [startKeyframes, endKeyframes] = [endKeyframes, startKeyframes];\n }\n return `\n ${values.mask && (maskGenerator === null || maskGenerator === void 0 ? void 0 : maskGenerator.makePropertyRules) ? maskGenerator.makePropertyRules(values.mask) : \"\"}\n\n @keyframes ${name} {\n 0% {\n ${startKeyframes}\n }\n\n 100% {\n ${endKeyframes}\n }\n }\n\n ::view-transition-${page === \"enter\" ? \"new\" : \"old\"}(root) {\n animation-name: ${name};\n animation-duration: ${settings.duration};\n animation-delay: ${transition.delay}s;\n animation-timing-function: ${settings.easing};\n animation-fill-mode: both;\n ${values.mask && (maskGenerator === null || maskGenerator === void 0 ? void 0 : maskGenerator.makeStyles) ? maskGenerator.makeStyles(values.mask, page) : \"\"}\n }\n `;\n}\nfunction isSpringTransition(transition) {\n return transition.type === \"spring\";\n}\nfunction getSpringOptions(transition) {\n if (transition.durationBasedSpring) {\n return {\n duration: transition.duration,\n bounce: transition.bounce\n };\n }\n return {\n stiffness: transition.stiffness,\n damping: transition.damping,\n mass: transition.mass\n };\n}\n\n// ../../router/build/pageEffects/cssGeneration/index.js\nvar VIEW_TRANSITION_STYLES_ID = \"view-transition-styles\";\nvar defaultPageTransition = {\n x: \"0px\",\n y: \"0px\",\n scale: 1,\n opacity: 1,\n rotate3d: false,\n rotate: 0,\n rotateX: 0,\n rotateY: 0,\n mask: void 0,\n transition: {\n type: \"tween\",\n delay: 0,\n duration: 0.2,\n ease: [0.27, 0, 0.51, 1],\n stiffness: 400,\n damping: 30,\n mass: 1\n }\n};\nfunction createViewTransitionStylesheet({ exit = defaultPageTransition, enter }) {\n const styleElement = document.createElement(\"style\");\n styleElement.id = VIEW_TRANSITION_STYLES_ID;\n let styleContent = `\n @media (prefers-reduced-motion) {\n ::view-transition-group(*),\n ::view-transition-old(*),\n ::view-transition-new(*) {\n animation: none !important;\n }\n }\n `;\n const disableMixPlusLighter = exit.mask || enter.mask || exit.opacity || enter.opacity || exit.transition.delay || enter.transition.delay;\n if (disableMixPlusLighter) {\n styleContent += `\n ::view-transition-old(*),\n ::view-transition-new(*) {\n mix-blend-mode: normal;\n }\n `;\n }\n styleContent += `\n ::view-transition-old(*),\n ::view-transition-new(*) {\n backface-visibility: hidden;\n }\n `;\n styleContent += createPageTransitionRules(\"exit\", exit);\n styleContent += createPageTransitionRules(\"enter\", enter);\n styleElement.textContent = styleContent;\n document.head.appendChild(styleElement);\n}\nvar _requestIdleCallback = /* @__PURE__ */ (() => {\n return typeof window !== \"undefined\" ? window.requestIdleCallback || window.setTimeout : setTimeout;\n})();\nfunction removeViewTransitionStylesheet() {\n _requestIdleCallback(() => {\n frame.render(() => {\n performance.mark(\"framer-vt-remove\");\n const element = document.getElementById(VIEW_TRANSITION_STYLES_ID);\n if (element) {\n document.head.removeChild(element);\n }\n });\n });\n}\n\n// ../../router/build/pageEffects/viewTransition.js\nvar noop2 = () => {\n};\nfunction supportsViewTransitions() {\n return Boolean(document.startViewTransition);\n}\nfunction addVTStylesheetAfterInRender(effect) {\n return new Promise((resolve) => {\n frame.render(() => {\n performance.mark(\"framer-vt-style\");\n createViewTransitionStylesheet(effect);\n resolve();\n });\n });\n}\nasync function startViewTransition(updateView, effect, signal) {\n if (!supportsViewTransitions()) {\n void updateView();\n return;\n }\n await addVTStylesheetAfterInRender(effect);\n if (signal === null || signal === void 0 ? void 0 : signal.aborted)\n return;\n performance.mark(\"framer-vt\");\n const transition = document.startViewTransition(async () => {\n performance.mark(\"framer-vt-freeze\");\n if (signal === null || signal === void 0 ? void 0 : signal.aborted)\n return;\n else\n signal === null || signal === void 0 ? void 0 : signal.addEventListener(\"abort\", () => transition.skipTransition());\n await updateView();\n });\n transition.updateCallbackDone.then(() => {\n performance.mark(\"framer-vt-unfreeze\");\n }).catch(noop2);\n Promise.all([transition.ready, transition.finished]).then(() => {\n performance.mark(\"framer-vt-finished\");\n removeViewTransitionStylesheet();\n }).catch(noop2);\n return transition;\n}\n\n// ../../router/build/pageEffects/useViewTransition.js\nfunction useViewTransition() {\n const sitePageEffects = usePageEffects();\n const resolveHasPainted = useRef(void 0);\n useEffect(() => {\n if (resolveHasPainted.current) {\n resolveHasPainted.current();\n resolveHasPainted.current = void 0;\n }\n });\n return useCallback((currentRouteId, nextRouteId, update, yieldBeforeFreezePeriod, signal) => {\n const pageEffect = getPageEffectForRoute(currentRouteId, nextRouteId, sitePageEffects);\n if (pageEffect) {\n const hasPainted = new Promise((resolve) => {\n resolveHasPainted.current = resolve;\n });\n const asyncUpdate = async () => {\n update();\n await hasPainted;\n };\n const yieldBeforeViewTransition = async () => {\n await interactionResponse({ priority: \"user-blocking\", signal }).catch(noop);\n return startViewTransition(asyncUpdate, pageEffect, signal);\n };\n if (yieldBeforeFreezePeriod)\n return yieldBeforeViewTransition();\n return startViewTransition(asyncUpdate, pageEffect);\n } else {\n return update();\n }\n }, [sitePageEffects]);\n}\n\n// ../../router/build/useMonitorNextPaintAfterRender.js\nimport { useCallback as useCallback2, useRef as useRef2 } from \"react\";\nfunction useMonitorNextPaintAfterRender(label) {\n const startLabel = `${label}-start`;\n const endLabel = `${label}-end`;\n const resolveHasPainted = useRef2(void 0);\n useAfterPaintEffect(\n () => {\n if (resolveHasPainted.current) {\n resolveHasPainted.current();\n resolveHasPainted.current = void 0;\n }\n },\n void 0,\n // user-blocking ensures we get the correct timings here. Other priorites might delay this effect a little bit.\n { priority: \"user-blocking\" }\n );\n return useCallback2(() => {\n const hasPainted = new Promise((resolve) => {\n resolveHasPainted.current = resolve;\n });\n performance.mark(startLabel);\n return hasPainted.finally(() => {\n performance.mark(endLabel);\n performance.measure(label, startLabel, endLabel);\n }).catch((e) => {\n console.error(e);\n });\n }, [label, startLabel, endLabel]);\n}\n\n// ../../router/build/history.js\nasync function pushRouteState(routeId, route, { currentRoutePath, currentPathVariables, hash: hash2, pathVariables, localeId, preserveQueryParams }, enableAsyncURLUpdate = false, isNavigationTransition = false) {\n const { path } = route;\n if (!path)\n return;\n try {\n const newPath = getPathForRoute(route, {\n currentRoutePath,\n currentPathVariables,\n hash: hash2,\n pathVariables,\n preserveQueryParams\n });\n const urlUpdatePromise = pushHistoryState({ routeId, hash: hash2, pathVariables, localeId }, newPath, enableAsyncURLUpdate, isNavigationTransition);\n if (!enableAsyncURLUpdate)\n await urlUpdatePromise;\n } catch {\n }\n}\nfunction isHistoryState(data2) {\n const routeIdKey = \"routeId\";\n return isObject(data2) && isString(data2[routeIdKey]);\n}\nfunction replaceHistoryState(data2, url, ignoreReplaceStateWrapper = false) {\n performance.mark(\"framer-history-replace\");\n const replaceState = ignoreReplaceStateWrapper ? window.history.__proto__.replaceState : window.history.replaceState;\n replaceState.call(window.history, data2, \"\", url);\n}\nvar maybeHasPopstateBug = true;\nvar isImpactedPopstateBugChromiumVersion = /* @__PURE__ */ (() => {\n if (typeof navigator === \"undefined\")\n return false;\n const userAgent = navigator.userAgent;\n const chromePos = userAgent.indexOf(\"Chrome/\");\n const chromiumVersion = +userAgent.slice(chromePos + 7, userAgent.indexOf(\".\", chromePos));\n return chromiumVersion > 101 && chromiumVersion < 128;\n})();\nasync function pushHistoryState(data2, url, awaitPaintBeforeUpdate = false, isNavigationTransition = false) {\n if (awaitPaintBeforeUpdate)\n await interactionResponse({ priority: \"user-blocking\" });\n performance.mark(\"framer-history-push\");\n if (!isNavigationTransition) {\n window.history.pushState(data2, \"\", url);\n return;\n }\n let popstateCalled = false, popstateListener;\n if (maybeHasPopstateBug) {\n popstateListener = () => {\n var _a;\n popstateCalled = true;\n if (isImpactedPopstateBugChromiumVersion)\n return;\n const msg = \"Popstate called after intercept(). Please report this to the Framer team.\";\n console.error(msg);\n (_a = window.__framer_events) === null || _a === void 0 ? void 0 : _a.push([\n \"published_site_load_recoverable_error\",\n {\n message: msg,\n userAgent: navigator.userAgent\n }\n ]);\n };\n window.addEventListener(\"popstate\", popstateListener, { once: true });\n }\n if (isImpactedPopstateBugChromiumVersion && maybeHasPopstateBug) {\n window.history.__proto__.pushState.call(window.history, data2, \"\", url);\n } else {\n window.history.pushState(data2, \"\", url);\n }\n if (maybeHasPopstateBug) {\n queueMicrotask(() => {\n if (popstateCalled)\n return;\n maybeHasPopstateBug = false;\n window.removeEventListener(\"popstate\", popstateListener);\n return;\n });\n }\n}\nfunction useReplaceInitialState({ disabled, routeId, initialPathVariables, initialLocaleId }) {\n useLayoutEffect2(() => {\n if (disabled)\n return;\n performance.mark(\"framer-history-set-initial-state\");\n replaceHistoryState({ routeId, pathVariables: initialPathVariables, localeId: initialLocaleId }, void 0, true);\n }, []);\n}\nfunction usePopStateHandler(currentRouteId, setCurrentRouteId) {\n const startViewTransition2 = useViewTransition();\n const monitorNextPaintAfterRender = useMonitorNextPaintAfterRender(\"framer-route-change-popstate\");\n const viewTransitionReady = useRef3(void 0);\n const popStateHandler = useCallback3(async ({ state }) => {\n var _a, _b, _c, _d, _e, _f;\n if (((_a = window.navigation) === null || _a === void 0 ? void 0 : _a.transition) && ((_c = (_b = window.navigation) === null || _b === void 0 ? void 0 : _b.transition) === null || _c === void 0 ? void 0 : _c.navigationType) !== \"traverse\")\n return;\n if (!isObject(state))\n return;\n const { routeId, hash: hash2, pathVariables, localeId } = state;\n if (!isString(routeId))\n return;\n void monitorNextPaintAfterRender();\n const changeRoute = () => {\n setCurrentRouteId(routeId, isString(localeId) ? localeId : void 0, isString(hash2) ? hash2 : void 0, isObject(pathVariables) ? pathVariables : void 0, false, true);\n };\n const transition = await startViewTransition2(currentRouteId.current, routeId, changeRoute, false);\n if (transition) {\n void transition.updateCallbackDone.then((_d = viewTransitionReady.current) === null || _d === void 0 ? void 0 : _d.resolve).catch((_e = viewTransitionReady.current) === null || _e === void 0 ? void 0 : _e.reject);\n } else {\n (_f = viewTransitionReady.current) === null || _f === void 0 ? void 0 : _f.resolve();\n }\n }, [currentRouteId, monitorNextPaintAfterRender, setCurrentRouteId, startViewTransition2]);\n const traversalHandler = useCallback3((event) => {\n if (event.navigationType !== \"traverse\")\n return;\n event.intercept({\n async handler() {\n await new Promise((resolve, reject) => {\n viewTransitionReady.current = { resolve, reject };\n });\n },\n scroll: \"after-transition\"\n });\n }, []);\n useEffect2(() => {\n var _a;\n window.addEventListener(\"popstate\", popStateHandler);\n (_a = window.navigation) === null || _a === void 0 ? void 0 : _a.addEventListener(\"navigate\", traversalHandler);\n return () => {\n var _a2;\n window.removeEventListener(\"popstate\", popStateHandler);\n (_a2 = window.navigation) === null || _a2 === void 0 ? void 0 : _a2.removeEventListener(\"navigate\", traversalHandler);\n };\n }, [popStateHandler, traversalHandler]);\n}\nfunction getHashForRoute(hash2, route, hashVariables) {\n const resolvedHash = getRouteElementId(route, hash2);\n if (!resolvedHash)\n return void 0;\n const variables = Object.assign({}, route === null || route === void 0 ? void 0 : route.elements, hashVariables);\n return resolvedHash.replace(pathVariablesRegExp, (m2, p1) => {\n var _a;\n return String((_a = variables[p1]) !== null && _a !== void 0 ? _a : m2);\n });\n}\nfunction getPathForRoute(route, { currentRoutePath, currentPathVariables, hash: hash2, pathVariables, hashVariables, relative: relative2 = true, preserveQueryParams }) {\n var _a;\n let currentPath = currentRoutePath !== null && currentRoutePath !== void 0 ? currentRoutePath : \"/\";\n if (currentPathVariables) {\n currentPath = currentPath.replace(pathVariablesRegExp, (m2, p1) => String(currentPathVariables[p1] || m2));\n }\n const targetPath = (_a = route === null || route === void 0 ? void 0 : route.path) !== null && _a !== void 0 ? _a : \"/\";\n let path = targetPath;\n if (pathVariables) {\n path = path.replace(pathVariablesRegExp, (m2, p1) => String(pathVariables[p1] || m2));\n }\n const resolvedHash = getHashForRoute(hash2, route, hashVariables);\n const isSamePageHashNavigation = currentPath === path && resolvedHash;\n if (relative2) {\n path = computeRelativePath(currentPath, path);\n }\n if (preserveQueryParams || isSamePageHashNavigation) {\n path = forwardCurrentQueryParams(path);\n }\n if (resolvedHash) {\n path = `${path}#${resolvedHash}`;\n }\n return path;\n}\nasync function handleRedirectForMissingSlugs(route, pathVariables, nextLocale) {\n if (!route.path)\n return false;\n if (!pathVariables)\n return false;\n const prefix2 = nextLocale.slug ? `/${nextLocale.slug}` : \"\";\n const nextLocaleWithDefaultSlugPath = `${prefix2}${fillPathVariables(route.path, pathVariables)}`;\n const response = await fetch(nextLocaleWithDefaultSlugPath, {\n method: \"HEAD\",\n redirect: \"manual\"\n });\n const isRedirect = response.type === \"opaqueredirect\";\n if (isRedirect) {\n window.location.href = window.location.origin + nextLocaleWithDefaultSlugPath;\n return true;\n }\n return false;\n}\nasync function switchLocale(options) {\n const result = await getLocalizedNavigationPath(options);\n if (!result)\n return;\n try {\n localStorage.setItem(\"preferredLocale\", options.nextLocale.code);\n } catch {\n }\n try {\n if (!isString(result.path)) {\n throw new Error(\"Expected result.path to be a string\");\n }\n if (result.isMissingInLocale) {\n const hasRedirect = await handleRedirectForMissingSlugs(options.route, result.pathVariables, options.nextLocale);\n if (hasRedirect)\n return;\n }\n } catch {\n }\n return result;\n}\nfunction pushLoadMoreHistory(hash2, paginationInfo) {\n try {\n const currentHistoryState = window.history.state;\n if (!isHistoryState(currentHistoryState))\n return;\n const isInitialLoad = (currentHistoryState === null || currentHistoryState === void 0 ? void 0 : currentHistoryState.paginationInfo) === void 0 || currentHistoryState.paginationInfo[hash2] === void 0;\n const newPaginationInfo = { ...currentHistoryState.paginationInfo, [hash2]: paginationInfo };\n replaceHistoryState({ ...currentHistoryState, paginationInfo: newPaginationInfo }, void 0, isInitialLoad);\n } catch {\n }\n}\nfunction useNativeLoadingSpinner() {\n const navigationPromise = useRef3(Promise.resolve());\n const navigationController = useRef3();\n const navigateListener = useCallback3((navigateEvent) => {\n if (navigateEvent.navigationType === \"traverse\")\n return;\n const controller = navigationController.current;\n controller === null || controller === void 0 ? void 0 : controller.signal.addEventListener(\"abort\", () => {\n controller.abort(\"user aborted\");\n });\n navigateEvent.intercept({\n handler: () => navigationPromise.current\n });\n }, []);\n return useCallback3((promise, updateURL, controller) => {\n if (!window.navigation) {\n void updateURL();\n return;\n }\n navigationPromise.current = promise;\n navigationController.current = controller;\n window.navigation.addEventListener(\"navigate\", navigateListener);\n void updateURL(true);\n promise.catch(noop).finally(() => {\n window.navigation.removeEventListener(\"navigate\", navigateListener);\n });\n }, [navigateListener]);\n}\n\n// ../../router/build/hydration/hydrationTimings.js\nimport { useEffect as useEffect3, useInsertionEffect, useLayoutEffect as useLayoutEffect3 } from \"react\";\nfunction measureSafe(name, start, end) {\n try {\n performance.measure(name, start, end);\n } catch (e) {\n console.warn(`Could not measure ${name}`, e);\n }\n}\nvar shouldMark = false;\nfunction markHydrationStart() {\n shouldMark = true;\n performance.mark(\"framer-hydration-start\");\n}\nvar routerHydrationInsertionEffectStartHasRun = false;\nvar routerHydrationLayoutEffectStartHasRun = false;\nvar routerHydrationEffectStartHasRun = false;\nfunction useMarkRouterEffects() {\n const hydrationMarkPrefix = \"framer-hydration-router\";\n useInsertionEffect(() => {\n if (routerHydrationInsertionEffectStartHasRun || !shouldMark)\n return;\n routerHydrationInsertionEffectStartHasRun = true;\n performance.mark(`${hydrationMarkPrefix}-insertion-effect`);\n }, []);\n useLayoutEffect3(() => {\n if (routerHydrationLayoutEffectStartHasRun || !shouldMark)\n return;\n routerHydrationLayoutEffectStartHasRun = true;\n performance.mark(`${hydrationMarkPrefix}-layout-effect`);\n }, []);\n useEffect3(() => {\n if (routerHydrationEffectStartHasRun || !shouldMark)\n return;\n routerHydrationEffectStartHasRun = true;\n performance.mark(`${hydrationMarkPrefix}-effect`);\n }, []);\n}\nvar hydrationInsertionEffectStartHasRun = false;\nvar hydrationLayoutEffectStartHasRun = false;\nvar hydrationEffectStartHasRun = false;\nvar wasInBackground = false;\nfunction useMarkSuspenseEffectsStart() {\n const hydrationMarkPrefix = \"framer-hydration-\";\n const hydrationLayoutEffectsEnd = `${hydrationMarkPrefix}layout-effects-end`;\n const hydrationEffectsEnd = `${hydrationMarkPrefix}effects-end`;\n const hydrationBrowserRenderStart = `${hydrationMarkPrefix}browser-render-start`;\n const hydrationRenderEnd = `${hydrationMarkPrefix}render-end`;\n useInsertionEffect(() => {\n if (hydrationInsertionEffectStartHasRun || !shouldMark)\n return;\n hydrationInsertionEffectStartHasRun = true;\n performance.mark(hydrationRenderEnd);\n measureSafe(`${hydrationMarkPrefix}render`, `${hydrationMarkPrefix}start`, hydrationRenderEnd);\n performance.mark(`${hydrationMarkPrefix}insertion-effects-start`);\n }, []);\n useLayoutEffect3(() => {\n if (hydrationLayoutEffectStartHasRun || !shouldMark)\n return;\n hydrationLayoutEffectStartHasRun = true;\n performance.mark(`${hydrationMarkPrefix}layout-effects-start`);\n if (document.visibilityState !== \"visible\") {\n wasInBackground = true;\n return;\n }\n requestAnimationFrame(() => {\n var _a, _b, _c;\n performance.mark(hydrationBrowserRenderStart);\n measureSafe(`${hydrationMarkPrefix}uho`, (_b = (_a = performance.getEntriesByName(hydrationEffectsEnd)[0]) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : (_c = performance.getEntriesByName(hydrationLayoutEffectsEnd)[0]) === null || _c === void 0 ? void 0 : _c.name, hydrationBrowserRenderStart);\n });\n }, []);\n useEffect3(() => {\n var _a;\n if (hydrationEffectStartHasRun || !shouldMark)\n return;\n hydrationEffectStartHasRun = true;\n const hydrationEffectsStart = `${hydrationMarkPrefix}effects-start`;\n performance.mark(hydrationEffectsStart);\n const hasPaintStarted = (_a = performance.getEntriesByName(hydrationBrowserRenderStart)[0]) === null || _a === void 0 ? void 0 : _a.name;\n if (!hasPaintStarted) {\n measureSafe(`${hydrationMarkPrefix}commit`, hydrationLayoutEffectsEnd, hydrationEffectsStart);\n performance.mark(`${hydrationMarkPrefix}effects-sync`);\n }\n }, []);\n return null;\n}\nvar hydrationInsertionEffectHasRun = false;\nvar hydrationLayoutEffectHasRun = false;\nvar hydrationEffectHasRun = false;\nfunction useMarkSuspenseEffectEnd() {\n const hydrationMarkPrefix = \"framer-hydration-\";\n const hydrationLayoutEffectsEnd = `${hydrationMarkPrefix}layout-effects-end`;\n const hydrationEffectsEnd = `${hydrationMarkPrefix}effects-end`;\n const hydrationBrowserRenderStart = `${hydrationMarkPrefix}browser-render-start`;\n const hydrationStart = `${hydrationMarkPrefix}start`;\n const hydrationInsertionEffectsEnd = `${hydrationMarkPrefix}insertion-effects-end`;\n const hydrationFP = `${hydrationMarkPrefix}first-paint`;\n const hydrationAnimationFrameEnd = `${hydrationMarkPrefix}browser-raf-end`;\n useInsertionEffect(() => {\n if (hydrationInsertionEffectHasRun || !shouldMark)\n return;\n hydrationInsertionEffectHasRun = true;\n performance.mark(hydrationInsertionEffectsEnd);\n measureSafe(`${hydrationMarkPrefix}insertion-effects`, `${hydrationMarkPrefix}insertion-effects-start`, hydrationInsertionEffectsEnd);\n }, []);\n useLayoutEffect3(() => {\n if (hydrationLayoutEffectHasRun || !shouldMark)\n return;\n hydrationLayoutEffectHasRun = true;\n performance.mark(hydrationLayoutEffectsEnd);\n measureSafe(`${hydrationMarkPrefix}layout-effects`, `${hydrationMarkPrefix}layout-effects-start`, hydrationLayoutEffectsEnd);\n if (wasInBackground || document.visibilityState !== \"visible\")\n return;\n requestAnimationFrame(() => {\n performance.mark(hydrationAnimationFrameEnd);\n measureSafe(`${hydrationMarkPrefix}raf`, hydrationBrowserRenderStart, hydrationAnimationFrameEnd);\n void yieldBefore(() => {\n performance.mark(hydrationFP);\n measureSafe(`${hydrationMarkPrefix}time-to-first-paint`, hydrationStart, hydrationFP);\n measureSafe(`${hydrationMarkPrefix}browser-render`, hydrationAnimationFrameEnd, hydrationFP);\n });\n });\n }, []);\n useEffect3(() => {\n var _a, _b, _c;\n if (hydrationEffectHasRun || !shouldMark)\n return;\n hydrationEffectHasRun = true;\n performance.mark(hydrationEffectsEnd);\n measureSafe(`${hydrationMarkPrefix}effects`, (_b = (_a = performance.getEntriesByName(hydrationFP)[0]) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : (_c = performance.getEntriesByName(`${hydrationMarkPrefix}effects-start`)[0]) === null || _c === void 0 ? void 0 : _c.name, hydrationEffectsEnd);\n }, []);\n return null;\n}\nfunction MarkSuspenseEffectsStart() {\n useMarkSuspenseEffectsStart();\n return null;\n}\nfunction MarkSuspenseEffectsEnd() {\n useMarkSuspenseEffectEnd();\n return null;\n}\nvar MarkSuspenseEffects = { Start: MarkSuspenseEffectsStart, End: MarkSuspenseEffectsEnd };\n\n// ../../router/build/hydration/reactHydrationINPOptimizer.js\nimport { useEffect as useEffect4 } from \"react\";\nvar eventsToStop = [\n \"mousedown\",\n \"mouseup\",\n \"touchcancel\",\n \"touchend\",\n \"touchstart\",\n \"auxclick\",\n \"dblclick\",\n \"pointercancel\",\n \"pointerdown\",\n \"pointerup\",\n \"dragend\",\n \"dragstart\",\n \"drop\",\n \"compositionend\",\n \"compositionstart\",\n \"keydown\",\n \"keypress\",\n \"keyup\",\n \"input\",\n \"textInput\",\n // Intentionally camelCase\n \"copy\",\n \"cut\",\n \"paste\",\n \"click\",\n \"change\",\n \"contextmenu\",\n \"reset\"\n];\nvar stopFn = (event) => {\n var _a, _b;\n if (!((_b = (_a = event.target) === null || _a === void 0 ? void 0 : _a.closest) === null || _b === void 0 ? void 0 : _b.call(_a, \"#main\")))\n return;\n event.stopPropagation();\n performance.mark(\"framer-react-event-handling-prevented\");\n};\nvar shouldTurnOnEventHandling = false;\nfunction turnOffReactEventHandling() {\n if (!eventsToStop)\n return;\n shouldTurnOnEventHandling = true;\n performance.mark(\"framer-react-event-handling-start\");\n const options = { capture: true };\n eventsToStop.forEach((event) => document.body.addEventListener(event, stopFn, options));\n}\nfunction TurnOnReactEventHandling() {\n useEffect4(() => {\n if (!shouldTurnOnEventHandling || !eventsToStop)\n return;\n const options = { capture: true };\n eventsToStop.forEach((event) => document.body.removeEventListener(event, stopFn, options));\n eventsToStop = void 0;\n performance.mark(\"framer-react-event-handling-end\");\n }, []);\n return null;\n}\n\n// ../../router/build/hydration/SetGlobalHydrationState.js\nimport { useEffect as useEffect5, useRef as useRef4 } from \"react\";\nvar hydrationRunning = false;\nfunction setInitialHydrationState() {\n hydrationRunning = true;\n}\nfunction setHydrationDone() {\n hydrationRunning = false;\n}\nfunction useIsHydrationOrSSR() {\n const isHydrationOrSSR = useRef4(typeof window === \"undefined\" || hydrationRunning);\n useEffect5(() => {\n isHydrationOrSSR.current = false;\n }, []);\n return isHydrationOrSSR;\n}\n\n// ../../router/build/isSamePage.js\nfunction isSamePage(a, b) {\n if (a.routeId !== b.routeId)\n return false;\n if (a.pathVariables === b.pathVariables)\n return true;\n const aPathVariables = a.pathVariables || {};\n const bPathVariables = b.pathVariables || {};\n return aPathVariables.length === bPathVariables.length && Object.keys(aPathVariables).every((key7) => aPathVariables[key7] === bPathVariables[key7]);\n}\n\n// ../../router/build/RouterContext.js\nimport { jsx as _jsx2 } from \"react/jsx-runtime\";\nimport React5 from \"react\";\n\n// ../../router/build/useGetRouteCallback.js\nimport React4 from \"react\";\nfunction useGetRouteCallback(routes) {\n return React4.useCallback((routeId) => routes[routeId], [routes]);\n}\n\n// ../../router/build/RouterContext.js\nvar RouterContext = /* @__PURE__ */ (() => React5.createContext({}))();\nfunction RouterAPIProvider({ api, children }) {\n return _jsx2(RouterContext.Provider, { value: api, children });\n}\nfunction useRouter() {\n return React5.useContext(RouterContext);\n}\nfunction RoutesProvider({ routes, children }) {\n const getRoute = useGetRouteCallback(routes);\n return _jsx2(RouterContext.Provider, { value: { getRoute }, children });\n}\n\n// ../../router/build/SuspenseThatPreservesDom.js\nimport { jsx as _jsx4 } from \"react/jsx-runtime\";\nimport { Suspense as Suspense2 } from \"react\";\n\n// ../../router/build/SuspenseErrorBoundary.js\nimport { jsx as _jsx3 } from \"react/jsx-runtime\";\nimport { Component as Component2, Suspense } from \"react\";\nvar SuspenseErrorBoundary = class extends Component2 {\n constructor() {\n super(...arguments);\n this.state = { error: void 0 };\n }\n static getDerivedStateFromError(error) {\n if (!(error instanceof ErrorBoundaryCaughtError)) {\n console.error(\"Derived error in SuspenseErrorBoundary\", error);\n }\n return { error };\n }\n componentDidCatch(error, errorInfo) {\n var _a;\n if (error instanceof ErrorBoundaryCaughtError) {\n return;\n }\n const componentStack = errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.componentStack;\n console.error(\"Caught error in SuspenseErrorBoundary\", error, componentStack);\n if (typeof window !== \"undefined\") {\n const stack = error instanceof Error && typeof error.stack === \"string\" ? error.stack : null;\n (_a = window.__framer_events) === null || _a === void 0 ? void 0 : _a.push([\n \"published_site_load_recoverable_error\",\n {\n message: String(error),\n stack,\n // only log componentStack if we don't have a stack\n componentStack: stack ? void 0 : componentStack\n }\n ]);\n }\n }\n render() {\n if (this.state.error === void 0)\n return this.props.children;\n if (this.state.error instanceof ErrorBoundaryCaughtError) {\n throw this.state.error.cause;\n }\n window.__framer_STPD_OPT_OUT__ = true;\n return _jsx3(Suspense, { children: this.props.fallbackChildren });\n }\n};\n\n// ../../router/build/SuspenseThatPreservesDom.js\nvar suspendPromise = /* @__PURE__ */ (() => typeof window !== \"undefined\" ? new Promise(() => {\n}) : null)();\nfunction Suspend() {\n if (typeof window === \"undefined\" || window.__framer_STPD_OPT_OUT__)\n return null;\n throw suspendPromise;\n}\nfunction SuspenseThatPreservesDom({ children }) {\n return _jsx4(SuspenseErrorBoundary, { fallbackChildren: children, children: _jsx4(Suspense2, { fallback: _jsx4(Suspend, {}), children }) });\n}\n\n// ../../router/build/types.js\nvar defaultLocaleId = \"default\";\n\n// ../../router/build/useForceUpdate.js\nimport React6 from \"react\";\nfunction useForceUpdate2() {\n const [_, setForcedRenderCount] = React6.useState(0);\n return [_, React6.useCallback(() => setForcedRenderCount((v) => v + 1), [])];\n}\n\n// ../../router/build/useLocale.js\nimport React7 from \"react\";\nvar noopAsync = async () => {\n};\nvar defaultLocaleInfo = {\n activeLocale: null,\n locales: [],\n setLocale: noopAsync\n};\nvar LocaleInfoContext = /* @__PURE__ */ React7.createContext(defaultLocaleInfo);\nfunction useLocaleInfo() {\n return React7.useContext(LocaleInfoContext);\n}\nfunction useLocalizationInfo() {\n const { activeLocale, locales, setLocale } = useLocaleInfo();\n return {\n activeLocalization: activeLocale,\n localizations: locales,\n setLocalization: setLocale\n };\n}\nfunction useLocaleCode() {\n var _a, _b;\n return (_b = (_a = useLocaleInfo().activeLocale) === null || _a === void 0 ? void 0 : _a.code) !== null && _b !== void 0 ? _b : \"en-US\";\n}\nfunction useLocale() {\n return useLocaleCode();\n}\n\n// ../../router/build/Router.js\nfunction updateScrollPosition(hash2, smoothScroll, isHistoryTransition) {\n const element = hash2 && document.getElementById(hash2);\n if (element) {\n scrollElementIntoView(element, smoothScroll);\n return;\n }\n if (isHistoryTransition)\n return;\n window.scrollTo(0, 0);\n}\nfunction useScheduleRenderSideEffects(dep) {\n const actions = useRef5([]);\n useLayoutEffect4(() => {\n var _a;\n if (!((_a = actions.current) === null || _a === void 0 ? void 0 : _a.length))\n return;\n actions.current.forEach((action) => action());\n actions.current = [];\n }, [dep]);\n return useCallback4((cb) => {\n actions.current.push(cb);\n }, []);\n}\nfunction useNavigationTransition(enableAsyncURLUpdates) {\n const startNativeSpinner = useNativeLoadingSpinner();\n const monitorNextPaintAfterRender = useMonitorNextPaintAfterRender(\"framer-route-change\");\n const navigationController = useRef5(void 0);\n return useCallback4(async (transitionFn, updateURL, isAbortable = true) => {\n var _a;\n setHydrationDone();\n if (!enableAsyncURLUpdates) {\n await (updateURL === null || updateURL === void 0 ? void 0 : updateURL());\n transitionFn();\n void monitorNextPaintAfterRender();\n return new Promise((resolve) => {\n resolve();\n });\n }\n (_a = navigationController.current) === null || _a === void 0 ? void 0 : _a.abort();\n const controller = isAbortable ? new AbortController() : void 0;\n navigationController.current = controller;\n const signal = controller === null || controller === void 0 ? void 0 : controller.signal;\n const nextRender = monitorNextPaintAfterRender();\n if (!updateURL) {\n navigationController.current = void 0;\n transitionFn(signal);\n return nextRender;\n }\n transitionFn(signal);\n await interactionResponse({ priority: \"user-visible\", signal }).catch(noop);\n await interactionResponse({ priority: \"user-visible\", signal }).catch(noop);\n let resolveNavigationPromise;\n const navigationPromise = new Promise((resolve, reject) => {\n resolveNavigationPromise = resolve;\n if (signal === null || signal === void 0 ? void 0 : signal.aborted)\n reject();\n else\n signal === null || signal === void 0 ? void 0 : signal.addEventListener(\"abort\", reject);\n });\n startNativeSpinner(navigationPromise, updateURL, controller);\n return nextRender.then(() => {\n resolveNavigationPromise();\n });\n }, [enableAsyncURLUpdates, monitorNextPaintAfterRender, startNativeSpinner]);\n}\nfunction Router({ defaultPageStyle, disableHistory, initialPathVariables, initialRoute, notFoundPage, collectionUtils, routes, initialLocaleId, locales = EMPTY_ARRAY, preserveQueryParams = false, enableAsyncURLUpdates = false, LayoutTemplate }) {\n useMarkRouterEffects();\n useReplaceInitialState({\n disabled: disableHistory,\n routeId: initialRoute,\n initialPathVariables,\n initialLocaleId\n });\n const startViewTransition2 = useViewTransition();\n const [dep, forceUpdate] = useForceUpdate2();\n const scheduleSideEffect = useScheduleRenderSideEffects(dep);\n const startNavigation = useNavigationTransition(enableAsyncURLUpdates);\n const currentRouteRef = useRef5(initialRoute);\n const currentPathVariablesRef = useRef5(initialPathVariables);\n const currentLocaleIdRef = useRef5(initialLocaleId);\n const currentLocaleId = currentLocaleIdRef.current;\n const activeLocale = useMemo(() => {\n var _a;\n return (_a = locales.find(({ id }) => {\n if (!currentLocaleId)\n return id === defaultLocaleId;\n return id === currentLocaleId;\n })) !== null && _a !== void 0 ? _a : null;\n }, [currentLocaleId, locales]);\n const localeInfo = useMemo(() => {\n return {\n activeLocale,\n locales,\n setLocale: async (localeOrLocaleId) => {\n let localeId;\n if (isString(localeOrLocaleId)) {\n localeId = localeOrLocaleId;\n } else if (isObject(localeOrLocaleId)) {\n localeId = localeOrLocaleId.id;\n }\n const defaultLocale = locales.find(({ id }) => id === defaultLocaleId);\n const nextLocale = locales.find(({ id }) => id === localeId);\n if (!nextLocale)\n return;\n const currentRouteId2 = currentRouteRef.current;\n const currentRoute = routes[currentRouteId2];\n if (!currentRoute)\n return;\n try {\n const localeResult = await switchLocale({\n currentLocale: activeLocale,\n nextLocale,\n route: currentRoute,\n routeId: currentRouteId2,\n defaultLocale,\n pathVariables: currentPathVariablesRef.current,\n collectionUtils,\n preserveQueryParams\n });\n if (!localeResult)\n return;\n const currentPathVariables2 = currentPathVariablesRef.current;\n const currentStatePaginationInfo = isHistoryState(window.history.state) ? window.history.state.paginationInfo : void 0;\n const currentPath = localeResult.path;\n currentPathVariablesRef.current = localeResult.pathVariables;\n currentLocaleIdRef.current = nextLocale.id;\n const updateURL = async (ignorePushStateWrapper = false) => {\n if (!currentPath)\n return;\n return pushHistoryState(\n {\n routeId: currentRouteId2,\n pathVariables: currentPathVariables2,\n localeId: nextLocale.id,\n paginationInfo: currentStatePaginationInfo\n },\n currentPath,\n // we yield in startNavigation before updating the URL, so yielding again is not needed.\n false,\n ignorePushStateWrapper\n );\n };\n void startNavigation(() => {\n void startViewTransition2(\n currentRouteId2,\n currentRouteId2,\n () => startTransition(forceUpdate),\n enableAsyncURLUpdates\n // no signal here, because we update the refs above immediately\n );\n }, updateURL, false);\n } catch {\n }\n }\n };\n }, [\n activeLocale,\n collectionUtils,\n enableAsyncURLUpdates,\n forceUpdate,\n locales,\n preserveQueryParams,\n routes,\n startNavigation,\n startViewTransition2\n ]);\n const setCurrentRouteId = useCallback4((routeId, localeId, hash2, pathVariables, smoothScroll = false, isHistoryTransition = false, updateURL) => {\n const currentRouteId2 = currentRouteRef.current;\n currentRouteRef.current = routeId;\n currentPathVariablesRef.current = pathVariables;\n currentLocaleIdRef.current = localeId;\n scheduleSideEffect(() => {\n updateScrollPosition(hash2, smoothScroll, isHistoryTransition);\n });\n if (isHistoryTransition) {\n startTransition(forceUpdate);\n return;\n }\n void startNavigation((signal) => {\n void startViewTransition2(currentRouteId2, routeId, () => startTransition(forceUpdate), enableAsyncURLUpdates, signal);\n }, updateURL);\n }, [enableAsyncURLUpdates, forceUpdate, scheduleSideEffect, startNavigation, startViewTransition2]);\n usePopStateHandler(currentRouteRef, setCurrentRouteId);\n const navigate = useCallback4(async (routeId, hash2, pathVariables, smoothScroll) => {\n var _a, _b;\n const newRoute = routes[routeId];\n if (pathVariables) {\n const inUse = /* @__PURE__ */ new Set();\n const path = (_a = newRoute === null || newRoute === void 0 ? void 0 : newRoute.path) !== null && _a !== void 0 ? _a : \"/\";\n for (const match of path.matchAll(pathVariablesRegExp)) {\n const usedVariable = match[1];\n if (usedVariable === void 0) {\n throw new Error(\"A matching path variable should not be undefined\");\n }\n inUse.add(usedVariable);\n }\n pathVariables = Object.fromEntries(Object.entries(pathVariables).filter(([key7]) => inUse.has(key7)));\n }\n const routeElementId = getRouteElementId(newRoute, hash2);\n const currentPathVariables2 = currentPathVariablesRef.current;\n const currentRouteLocaleId = currentLocaleIdRef.current;\n if (isSamePage({\n routeId: currentRouteRef.current,\n pathVariables: currentPathVariables2\n }, { routeId, pathVariables })) {\n updateScrollPosition(routeElementId, smoothScroll, false);\n const route = routes[routeId];\n if (((_b = window.history.state) === null || _b === void 0 ? void 0 : _b.hash) === hash2 || disableHistory || !route)\n return;\n const updateURLPromise = pushRouteState(\n routeId,\n route,\n {\n currentRoutePath: route.path,\n currentPathVariables: currentPathVariables2,\n pathVariables,\n hash: hash2,\n localeId: currentRouteLocaleId,\n preserveQueryParams\n },\n // we want to yield as this is called synchronusly from an user interaction.\n enableAsyncURLUpdates\n );\n if (!enableAsyncURLUpdates)\n return await updateURLPromise;\n return;\n }\n if (!newRoute)\n return;\n const currentRoute = routes[currentRouteRef.current];\n const updateURL = async (ignorePushStateWrapper = false) => pushRouteState(\n routeId,\n newRoute,\n {\n currentRoutePath: currentRoute === null || currentRoute === void 0 ? void 0 : currentRoute.path,\n currentPathVariables: currentPathVariables2,\n hash: hash2,\n pathVariables,\n localeId: currentRouteLocaleId,\n preserveQueryParams\n },\n // we yield in startNavigation before updating the URL, so yielding again is not needed.\n false,\n ignorePushStateWrapper\n );\n setCurrentRouteId(routeId, currentRouteLocaleId, routeElementId, pathVariables, smoothScroll, false, disableHistory ? void 0 : updateURL);\n }, [routes, setCurrentRouteId, disableHistory, preserveQueryParams, enableAsyncURLUpdates]);\n const getRoute = useGetRouteCallback(routes);\n const currentRouteId = currentRouteRef.current;\n const currentPathVariables = currentPathVariablesRef.current;\n const api = useMemo(() => ({\n navigate,\n getRoute,\n currentRouteId,\n currentPathVariables,\n routes,\n collectionUtils,\n preserveQueryParams\n }), [navigate, getRoute, currentRouteId, currentPathVariables, routes, collectionUtils, preserveQueryParams]);\n const current = routes[currentRouteRef.current];\n if (!current) {\n throw new Error(`Router cannot find route for ${currentRouteRef.current}`);\n }\n const pageExistsInCurrentLocale = !activeLocale || !current.includedLocales || current.includedLocales.includes(activeLocale.id);\n const pathWithFilledVariables = current.path && currentPathVariables ? fillPathVariables(current.path, currentPathVariables) : current.path;\n const remountKey = String(currentLocaleId) + pathWithFilledVariables;\n return _jsx5(RouterAPIProvider, { api, children: _jsx5(LocaleInfoContext.Provider, { value: localeInfo, children: _jsxs(SuspenseThatPreservesDom, { children: [_jsx5(ErrorBoundary, { notFoundPage, defaultPageStyle, forceUpdateKey: dep, children: _jsx5(WithLayoutTemplate, { LayoutTemplate, routeId: currentRouteId, children: _jsxs(Fragment, { children: [_jsx5(MarkSuspenseEffects.Start, {}), pageExistsInCurrentLocale ? renderPage(current.page, LayoutTemplate ? { ...defaultPageStyle, display: \"content\" } : defaultPageStyle) : (\n // LAYOUT_TEMPLATE @TODO: display: content for not found page?\n notFoundPage && renderPage(notFoundPage, defaultPageStyle)\n )] }, remountKey) }) }), _jsx5(TurnOnReactEventHandling, {}), _jsx5(MarkSuspenseEffects.End, {})] }) }) });\n}\nfunction WithLayoutTemplate({ LayoutTemplate, routeId, children }) {\n if (!LayoutTemplate)\n return children;\n return _jsx5(LayoutTemplate, { routeId, children });\n}\nfunction scrollElementIntoView(element, smoothScroll) {\n const scrollIntoViewOptions = smoothScroll ? { behavior: \"smooth\", block: \"start\", inline: \"nearest\" } : void 0;\n element.scrollIntoView(scrollIntoViewOptions);\n}\n\n// ../../router/build/inferInitialRouteFromPath.js\nvar memoPathRoutes;\nvar memoPaths;\nvar lastRoutes;\nfunction getRouteInfoMemo(routes) {\n if (lastRoutes !== routes) {\n memoPathRoutes = {};\n for (const [routeId, { path }] of Object.entries(routes)) {\n if (path)\n memoPathRoutes[path] = { path, depth: pathDepth(path), routeId };\n }\n memoPaths = Object.values(memoPathRoutes);\n memoPaths.sort(({ depth: depth1 }, { depth: depth2 }) => depth2 - depth1);\n lastRoutes = routes;\n }\n return [memoPathRoutes, memoPaths];\n}\nfunction inferInitialRouteFromPath(routes, decodedLocationPath, fallback = true, locales = []) {\n const [pathRoutes, paths] = getRouteInfoMemo(routes);\n let activeLocale;\n let localeId;\n let locationPath = decodedLocationPath;\n if (locales.length > 0) {\n const firstPathSegment = locationPath.split(\"/\").find(Boolean);\n if (firstPathSegment) {\n activeLocale = locales.find(({ slug }) => slug === firstPathSegment);\n if (activeLocale) {\n localeId = activeLocale.id;\n locationPath = locationPath.substring(activeLocale.slug.length + 1);\n }\n }\n if (!localeId) {\n const defaultLocale = locales.find(({ slug }) => slug === \"\");\n if (defaultLocale) {\n localeId = defaultLocale.id;\n }\n }\n }\n const exactMatch = pathRoutes[locationPath];\n if (exactMatch) {\n const match = matchPath(locationPath, exactMatch.path);\n if (match.isMatch)\n return { routeId: exactMatch.routeId, localeId, pathVariables: match.pathVariables };\n }\n for (const { path, routeId } of paths) {\n const match = matchPath(locationPath, path);\n if (match.isMatch)\n return { routeId, localeId, pathVariables: match.pathVariables };\n }\n if (!fallback)\n throw new Error(\"No exact match found for path\");\n const rootPath = pathRoutes[\"/\"];\n if (rootPath)\n return { routeId: rootPath.routeId, localeId };\n const firstRoute = Object.keys(routes)[0];\n if (!firstRoute)\n throw new Error(\"Router should not have undefined routes\");\n return { routeId: firstRoute, localeId };\n}\nfunction pathDepth(path) {\n const pathWithTrimmedSlashes = path.replace(/^\\/|\\/$/gu, \"\");\n if (pathWithTrimmedSlashes === \"\")\n return 0;\n return pathWithTrimmedSlashes.split(\"/\").length;\n}\nfunction matchPath(path, routePath) {\n const pathVariablesKeys = [];\n const safeRoutePath = escapeStringRegExp(routePath);\n const routePathRegExpString = safeRoutePath.replace(pathVariablesRegExp, (_, name) => {\n pathVariablesKeys.push(name);\n return \"([^/]+)\";\n });\n const routePathRegExp = new RegExp(routePathRegExpString + \"$\");\n const matches = path.match(routePathRegExp);\n if (!matches)\n return { isMatch: false };\n if (matches.length === 1)\n return { isMatch: true };\n const pathVariables = {};\n const pathVariablesValues = matches.slice(1);\n for (let i = 0; i < pathVariablesKeys.length; ++i) {\n const key7 = pathVariablesKeys[i];\n if (key7 === void 0)\n continue;\n const value = pathVariablesValues[i];\n const existingValue = pathVariables[key7];\n if (existingValue) {\n if (existingValue !== value) {\n return { isMatch: false };\n } else {\n continue;\n }\n }\n if (value === void 0) {\n throw new Error(\"Path variable values cannot be undefined\");\n }\n pathVariables[key7] = value;\n }\n return { isMatch: true, pathVariables };\n}\nfunction escapeStringRegExp(string) {\n return string.replace(/[|\\\\{}()[\\]^$+*?.]/gu, \"\\\\$&\").replace(/-/gu, \"\\\\x2d\");\n}\n\n// ../../router/build/isRoute.js\nvar key = \"page\";\nfunction isRoute(route) {\n return isObject(route) && key in route && route.page !== void 0;\n}\n\n// ../../router/build/useCurrentRoute.js\nimport { jsx as _jsx6 } from \"react/jsx-runtime\";\nimport React8, { useContext } from \"react\";\nvar CurrentRouteContext = /* @__PURE__ */ (() => React8.createContext(void 0))();\nfunction useCurrentRoute() {\n var _a;\n const router = useRouter();\n const override = useContext(CurrentRouteContext);\n const id = override !== null && override !== void 0 ? override : router.currentRouteId;\n if (!id)\n return void 0;\n const route = (_a = router.getRoute) === null || _a === void 0 ? void 0 : _a.call(router, id);\n if (!route)\n return void 0;\n return {\n ...route,\n id,\n pathVariables: override ? void 0 : router.currentPathVariables\n };\n}\nfunction useCurrentRouteId() {\n var _a;\n return (_a = useCurrentRoute()) === null || _a === void 0 ? void 0 : _a.id;\n}\n\n// ../../router/build/useCurrentPathVariables.js\nfunction useCurrentPathVariables() {\n var _a;\n return (_a = useCurrentRoute()) === null || _a === void 0 ? void 0 : _a.pathVariables;\n}\n\n// ../../router/build/useRoute.js\nfunction useRoute(routeId) {\n var _a;\n const routerAPI = useRouter();\n if (!routeId)\n return void 0;\n return (_a = routerAPI.getRoute) === null || _a === void 0 ? void 0 : _a.call(routerAPI, routeId);\n}\n\n// ../../router/build/useRouteAnchor.js\nimport React9 from \"react\";\n\n// ../../router/build/useRoutePreloader.js\nimport { useEffect as useEffect6 } from \"react\";\nvar shouldPreloadBasedOnUA = /* @__PURE__ */ (() => typeof window !== \"undefined\" && !isBot(navigator.userAgent))();\nfunction useRoutePreloader(routeIds, enabled = true) {\n const { getRoute } = useRouter();\n useEffect6(() => {\n if (!getRoute || !enabled || !shouldPreloadBasedOnUA)\n return;\n for (const routeId of routeIds) {\n void preloadRoute(getRoute(routeId));\n }\n }, [routeIds, getRoute, enabled]);\n}\nasync function preloadRoute(route) {\n if (!shouldPreloadBasedOnUA || !route)\n return;\n const component = route.page;\n if (!component || !isLazyComponentType(component))\n return;\n await yieldToMain();\n try {\n await component.preload();\n } catch (e) {\n if (false)\n console.warn(\"Preload failed\", route, e);\n }\n}\n\n// ../../router/build/useRouteAnchor.js\nfunction useRouteAnchor(routeId, { elementId, hash: linkHash } = {}) {\n const { navigate, currentPathVariables, preserveQueryParams } = useRouter();\n const route = useRoute(routeId);\n const currentRouteId = useCurrentRouteId();\n const currentRoute = useRoute(currentRouteId !== null && currentRouteId !== void 0 ? currentRouteId : \"\");\n useRoutePreloader([routeId], true);\n const hash2 = linkHash !== null && linkHash !== void 0 ? linkHash : elementId;\n const href = React9.useMemo(() => getPathForRoute(route, {\n currentRoutePath: currentRoute === null || currentRoute === void 0 ? void 0 : currentRoute.path,\n currentPathVariables,\n hash: hash2,\n preserveQueryParams\n }), [currentRoute, currentPathVariables, hash2, preserveQueryParams, route]);\n const navigateToRoute = React9.useCallback(() => navigate === null || navigate === void 0 ? void 0 : navigate(routeId, hash2), [hash2, navigate, routeId]);\n const onClick = React9.useCallback((event) => {\n event.preventDefault();\n navigateToRoute();\n }, [navigateToRoute]);\n return { onClick, href };\n}\n\n// ../../router/build/useRouteElementId.js\nimport React10 from \"react\";\nfunction useRouteElementId(id, targetRouteId) {\n var _a;\n const currentRoute = useCurrentRoute();\n const route = (_a = useRoute(targetRouteId)) !== null && _a !== void 0 ? _a : currentRoute;\n return React10.useMemo(() => {\n if (!route)\n return id;\n return getRouteElementId(route, id);\n }, [id, route]);\n}\n\n// ../../router/build/useRouteHandler.js\nimport React11 from \"react\";\nfunction useRouteHandler(routeId, preload = false, elementId) {\n const { navigate } = useRouter();\n useRoutePreloader([routeId], preload);\n const handler = React11.useCallback(() => navigate === null || navigate === void 0 ? void 0 : navigate(routeId, elementId), [navigate, elementId, routeId]);\n return handler;\n}\n\n// ../../library/src/utils/warnOnce.ts\nvar warningMessages = /* @__PURE__ */ new Set();\nfunction warnOnce(keyMessage, ...rest) {\n if (warningMessages.has(keyMessage))\n return;\n warningMessages.add(keyMessage);\n console.warn(keyMessage, ...rest);\n}\n\n// ../../library/src/utils/deprecation.ts\nfunction deprecationWarning(removedItem, removalVersion, replacement) {\n const replacementText = replacement ? `, use ${replacement} instead` : \"\";\n const warningText = `Deprecation warning: ${removedItem} will be removed in version ${removalVersion}${replacementText}.`;\n warnOnce(warningText);\n}\n\n// ../../library/src/animation/Animatable/Observers.ts\nvar Observers = class {\n constructor() {\n __publicField(this, \"observers\", /* @__PURE__ */ new Set());\n __publicField(this, \"transactions\", {});\n }\n add(observer) {\n this.observers.add(observer);\n let isCalled = false;\n return () => {\n if (isCalled) {\n return;\n }\n isCalled = true;\n this.remove(observer);\n };\n }\n remove(observer) {\n this.observers.delete(observer);\n }\n notify(change, transaction) {\n if (transaction) {\n const accumulatedChange = this.transactions[transaction] || change;\n accumulatedChange.value = change.value;\n this.transactions[transaction] = accumulatedChange;\n } else {\n this.callObservers(change);\n }\n }\n finishTransaction(transaction) {\n const accumulatedChange = this.transactions[transaction];\n delete this.transactions[transaction];\n return this.callObservers(accumulatedChange, transaction);\n }\n callObservers(change, transaction) {\n const finishObservers = [];\n new Set(this.observers).forEach((observer) => {\n if (typeof observer === \"function\") {\n observer(change, transaction);\n } else {\n observer.update(change, transaction);\n finishObservers.push(observer.finish);\n }\n });\n return finishObservers;\n }\n};\n\n// ../../library/src/animation/Animatable/Animatable.ts\nvar Animatable = /* @__PURE__ */ (() => {\n function Animatable2(value) {\n deprecationWarning(\"Animatable()\", \"2.0.0\", \"the new animation API (https://www.framer.com/api/animation/)\");\n return isAnimatable(value) ? value : new AnimatableValue(value);\n }\n Animatable2.transaction = (update) => {\n const transactionId = Math.random();\n const updatedValues = /* @__PURE__ */ new Set();\n const updater = (animatable, value) => {\n animatable.set(value, transactionId);\n updatedValues.add(animatable);\n };\n update(updater, transactionId);\n const finishObservers = [];\n updatedValues.forEach((value) => {\n finishObservers.push(...value.finishTransaction(transactionId));\n });\n finishObservers.forEach((finish) => {\n finish(transactionId);\n });\n };\n Animatable2.getNumber = (value, defaultValue = 0) => {\n return Animatable2.get(value, defaultValue);\n };\n Animatable2.get = (value, defaultValue) => {\n if (value === void 0 || value === null) {\n return defaultValue;\n }\n if (isAnimatable(value)) {\n return value.get();\n }\n return value;\n };\n Animatable2.objectToValues = (object) => {\n if (!object) {\n return object;\n }\n const result = {};\n for (const key7 in object) {\n const value = object[key7];\n if (isAnimatable(value)) {\n result[key7] = value.get();\n } else {\n result[key7] = value;\n }\n }\n return result;\n };\n return Animatable2;\n})();\nvar onUpdateKey = \"onUpdate\";\nvar finishTransactionKey = \"finishTransaction\";\nfunction isAnimatable(value) {\n return value !== null && typeof value === \"object\" && onUpdateKey in value && value[onUpdateKey] instanceof Function && finishTransactionKey in value && value[finishTransactionKey] instanceof Function;\n}\nfunction animatableInterpolation(value, currentInterpolation) {\n return {\n interpolate(from, to) {\n const fromValue = from.get();\n const toValue = to.get();\n const result = Animatable(fromValue);\n return (progress2) => {\n const v = currentInterpolation.interpolate(fromValue, toValue)(progress2);\n result.set(v);\n return result;\n };\n },\n difference(from, to) {\n const v = from.get();\n return currentInterpolation.difference(v, to.get());\n }\n };\n}\nvar AnimatableValue = class {\n constructor(value) {\n this.value = value;\n __publicField(this, \"observers\", new Observers());\n }\n static interpolationFor(value, currentInterpolation) {\n if (isAnimatable(value)) {\n return animatableInterpolation(value, currentInterpolation);\n }\n }\n get() {\n return this.value;\n }\n set(value, transaction) {\n const oldValue = this.value;\n if (isAnimatable(value)) {\n value = value.get();\n }\n this.value = value;\n const change = {\n value,\n oldValue\n };\n this.observers.notify(change, transaction);\n }\n finishTransaction(transaction) {\n return this.observers.finishTransaction(transaction);\n }\n onUpdate(handler) {\n return this.observers.add(handler);\n }\n};\n\n// ../../library/src/render/utils/roundedNumber.ts\nfunction roundedNumber(value, decimals) {\n const d = Math.round(Math.abs(decimals));\n const multiplier = 10 ** d;\n return Math.round(value * multiplier) / multiplier;\n}\nfunction roundedNumberString(value, decimals) {\n const result = value.toFixed(decimals);\n return decimals === 0 ? result : `${+result}`;\n}\nfunction roundWithOffset(value, offset) {\n if (offset === 0) {\n return Math.round(value);\n }\n offset -= offset | 0;\n if (offset < 0) {\n offset = 1 - offset;\n }\n return Math.round(value - offset) + offset;\n}\n\n// ../../library/src/render/types/Point.ts\nfunction Point(x, y) {\n return { x, y };\n}\n((Point2) => {\n Point2.add = (...args) => {\n return args.reduce(\n (previousValue, currentValue) => {\n return { x: previousValue.x + currentValue.x, y: previousValue.y + currentValue.y };\n },\n { x: 0, y: 0 }\n );\n };\n Point2.subtract = (a, b) => {\n return { x: a.x - b.x, y: a.y - b.y };\n };\n Point2.multiply = (a, b) => {\n return { x: a.x * b, y: a.y * b };\n };\n Point2.divide = (a, b) => {\n return { x: a.x / b, y: a.y / b };\n };\n Point2.absolute = (point) => {\n return {\n x: Math.abs(point.x),\n y: Math.abs(point.y)\n };\n };\n Point2.reverse = (point) => {\n return {\n x: point.x * -1,\n y: point.y * -1\n };\n };\n Point2.pixelAligned = (point, offset = { x: 0, y: 0 }) => {\n return {\n x: roundWithOffset(point.x, offset.x),\n y: roundWithOffset(point.y, offset.y)\n };\n };\n Point2.distance = (a, b) => {\n const deltaX = Math.abs(a.x - b.x);\n const deltaY = Math.abs(a.y - b.y);\n return Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n };\n Point2.angle = (a, b) => {\n return Math.atan2(b.y - a.y, b.x - a.x) * 180 / Math.PI - 90;\n };\n Point2.angleFromX = (a, b) => {\n return Math.atan2(b.y - a.y, b.x - a.x) * 180 / Math.PI;\n };\n Point2.isEqual = (a, b) => {\n return a.x === b.x && a.y === b.y;\n };\n Point2.rotationNormalizer = () => {\n let lastValue;\n return (value) => {\n if (typeof lastValue !== \"number\") {\n lastValue = value;\n }\n const diff = lastValue - value;\n const maxDiff = Math.abs(diff) + 180;\n const nTimes = Math.floor(maxDiff / 360);\n if (diff < 180) {\n value -= nTimes * 360;\n }\n if (diff > 180) {\n value += nTimes * 360;\n }\n lastValue = value;\n return value;\n };\n };\n function center(a, b) {\n return {\n x: (a.x + b.x) / 2,\n y: (a.y + b.y) / 2\n };\n }\n Point2.center = center;\n function centroid(points) {\n let sumX = 0;\n let sumY = 0;\n points.forEach((point) => {\n sumX += point.x;\n sumY += point.y;\n });\n const centroidX = sumX / points.length;\n const centroidY = sumY / points.length;\n return { x: centroidX, y: centroidY };\n }\n Point2.centroid = centroid;\n function sortClockwise(points) {\n const centerPoint = Point2.centroid(points);\n const angles = /* @__PURE__ */ new Map();\n for (let i = 0; i < points.length; i++) {\n const point = points[i];\n angles.set(point, Math.atan2(point.x - centerPoint.x, point.y - centerPoint.y));\n }\n return points.sort((a, b) => angles.get(a) - angles.get(b));\n }\n Point2.sortClockwise = sortClockwise;\n})(Point || (Point = {}));\n\n// ../../library/src/animation/Animators/BezierAnimator.ts\nvar BezierDefaults = {\n curve: \"ease\" /* Ease */,\n duration: 1\n};\nfunction controlPointsForCurve(curve) {\n switch (curve) {\n case \"linear\" /* Linear */:\n return [0, 0, 1, 1];\n case \"ease\" /* Ease */:\n return [0.25, 0.1, 0.25, 1];\n case \"ease-in\" /* EaseIn */:\n return [0.42, 0, 1, 1];\n case \"ease-out\" /* EaseOut */:\n return [0, 0, 0.58, 1];\n case \"ease-in-out\" /* EaseInOut */:\n return [0.42, 0, 0.58, 1];\n }\n}\nvar BezierAnimator = class {\n constructor(options, interpolation) {\n this.interpolation = interpolation;\n __publicField(this, \"unitBezier\");\n __publicField(this, \"options\");\n __publicField(this, \"current\");\n __publicField(this, \"destination\");\n __publicField(this, \"interpolator\");\n __publicField(this, \"progress\", 0);\n __publicField(this, \"next\", (delta) => {\n const { duration } = this.options;\n this.progress += delta / duration;\n const value = this.unitBezier.solve(this.progress, this.solveEpsilon(duration));\n this.current = this.interpolator(value);\n return this.current;\n });\n this.options = { ...BezierDefaults, ...options };\n let controlPoints;\n if (typeof this.options.curve === \"string\") {\n controlPoints = controlPointsForCurve(this.options.curve);\n } else {\n controlPoints = this.options.curve;\n }\n const [p1x, p1y, p2x, p2y] = controlPoints;\n this.unitBezier = new UnitBezier(Point(p1x, p1y), Point(p2x, p2y));\n }\n setFrom(value) {\n this.current = value;\n this.updateInterpolator();\n }\n setTo(value) {\n this.destination = value;\n this.updateInterpolator();\n }\n isReady() {\n return this.interpolator !== void 0;\n }\n updateInterpolator() {\n if (this.current === void 0 || this.destination === void 0) {\n return;\n }\n this.interpolator = this.interpolation.interpolate(this.current, this.destination);\n }\n isFinished() {\n return this.progress >= 1;\n }\n solveEpsilon(duration) {\n return 1 / (200 * duration);\n }\n};\nvar UnitBezier = class {\n constructor(point1, point2) {\n __publicField(this, \"a\");\n __publicField(this, \"b\");\n __publicField(this, \"c\");\n this.c = Point.multiply(point1, 3);\n this.b = Point.subtract(Point.multiply(Point.subtract(point2, point1), 3), this.c);\n this.a = Point.subtract(Point.subtract(Point(1, 1), this.c), this.b);\n }\n solve(x, epsilon2) {\n return this.sampleY(this.solveForT(x, epsilon2));\n }\n sampleX(t) {\n return ((this.a.x * t + this.b.x) * t + this.c.x) * t;\n }\n sampleY(t) {\n return ((this.a.y * t + this.b.y) * t + this.c.y) * t;\n }\n sampleDerivativeX(t) {\n return (3 * this.a.x * t + 2 * this.b.x) * t + this.c.x;\n }\n solveForT(x, epsilon2) {\n let t0, t1, t2, x2, d2, i;\n t2 = x;\n for (i = 0; i < 8; ++i) {\n x2 = this.sampleX(t2) - x;\n if (Math.abs(x2) < epsilon2)\n return t2;\n d2 = this.sampleDerivativeX(t2);\n if (Math.abs(d2) < epsilon2)\n break;\n t2 = t2 - x2 / d2;\n }\n t0 = 0;\n t1 = 1;\n t2 = x;\n if (t2 < t0)\n return t0;\n if (t2 > t1)\n return t1;\n while (t0 < t1) {\n x2 = this.sampleX(t2);\n if (Math.abs(x2 - x) < epsilon2)\n return t2;\n if (x > x2)\n t0 = t2;\n else\n t1 = t2;\n t2 = (t1 - t0) * 0.5 + t0;\n }\n return t2;\n }\n};\n\n// ../../library/src/animation/Animators/Integrator.ts\nvar Integrator = class {\n constructor(accelerationFunction) {\n __publicField(this, \"accelerationForState\");\n this.accelerationForState = accelerationFunction;\n }\n integrateState(state, dt) {\n const a = this.evaluateState(state);\n const b = this.evaluateStateWithDerivative(state, dt * 0.5, a);\n const c = this.evaluateStateWithDerivative(state, dt * 0.5, b);\n const d = this.evaluateStateWithDerivative(state, dt, c);\n const dxdt = 1 / 6 * (a.dx + 2 * (b.dx + c.dx) + d.dx);\n const dvdt = 1 / 6 * (a.dv + 2 * (b.dv + c.dv) + d.dv);\n state.x = state.x + dxdt * dt;\n state.v = state.v + dvdt * dt;\n return state;\n }\n evaluateState(initialState2) {\n const dv = this.accelerationForState(initialState2);\n return { dx: initialState2.v, dv };\n }\n evaluateStateWithDerivative(initialState2, dt, derivative) {\n const state = {\n x: initialState2.x + derivative.dx * dt,\n v: initialState2.v + derivative.dv * dt\n };\n const output = {\n dx: state.v,\n dv: this.accelerationForState(state)\n };\n return output;\n }\n};\n\n// ../../library/src/animation/Animators/FrictionAnimator.ts\nvar FrictionAnimator = class {\n constructor(options) {\n __publicField(this, \"options\");\n __publicField(this, \"state\");\n __publicField(this, \"integrator\");\n this.options = {\n velocity: 0,\n friction: 2,\n tolerance: 1 / 10\n };\n Object.assign(this.options, options);\n this.state = {\n x: 0,\n v: this.options.velocity\n };\n this.integrator = new Integrator((state) => -(this.options.friction * state.v));\n }\n setFrom(value) {\n this.state.x = value;\n }\n setTo(value) {\n }\n setVelocity(velocity) {\n this.state.v = velocity;\n }\n getState() {\n return this.state;\n }\n isReady() {\n return true;\n }\n next(delta) {\n this.state = this.integrator.integrateState(this.state, delta);\n return this.state.x;\n }\n isFinished() {\n return Math.abs(this.state.v) < this.options.tolerance;\n }\n};\n\n// ../../library/src/interpolation/Interpolation.ts\nfunction isInterpolatable(value) {\n return typeof value === \"function\" && value.interpolationFor && typeof value.interpolationFor === \"function\";\n}\nvar Interpolation = {\n /**\n * @param from -\n * @param to -\n * @internal\n */\n handleUndefined: (from, to) => {\n if (from === void 0) {\n from = to;\n }\n if (to === void 0) {\n to = from;\n }\n return [from, to];\n }\n};\n\n// ../../library/src/interpolation/NumberInterpolation.ts\nvar NumberInterpolation = {\n interpolate(from, to) {\n ;\n [from, to] = Interpolation.handleUndefined(from, to);\n const a1 = +from;\n const b1 = to - a1;\n return (progress2) => {\n const value = a1 + b1 * progress2;\n return value;\n };\n },\n difference(from, to) {\n return to - from;\n }\n};\n\n// ../../library/src/animation/Animators/SpringCurveValueConverter.ts\nvar epsilon = 1e-3;\nvar minDuration = 0.01;\nvar maxDuration2 = 10;\nvar minDamping = /* @__PURE__ */ (() => Number.MIN_VALUE)();\nvar maxDamping = 1;\nfunction approximateRoot(func, derivative, initialGuess, times = 12) {\n let result = initialGuess;\n for (let i = 1, end = times, asc = 1 <= end; asc ? i < end : i > end; asc ? i++ : i--) {\n result = result - func(result) / derivative(result);\n }\n return result;\n}\nfunction angularFrequency(undampedFrequency, dampingRatio) {\n return undampedFrequency * Math.sqrt(1 - Math.pow(dampingRatio, 2));\n}\nvar SpringCurveValueConverter = {\n computeDampingRatio: (tension, friction, mass = 1) => {\n return friction / (2 * Math.sqrt(mass * tension));\n },\n // Tries to compute the duration of a spring,\n // but can't for certain velocities and if dampingRatio >= 1\n // In those cases it will return null\n computeDuration: (tension, friction, velocity = 0, mass = 1) => {\n let duration;\n const dampingRatio = SpringCurveValueConverter.computeDampingRatio(tension, friction);\n const undampedFrequency = Math.sqrt(tension / mass);\n if (dampingRatio < 1) {\n const a = Math.sqrt(1 - Math.pow(dampingRatio, 2));\n const b = velocity / (a * undampedFrequency);\n const c = dampingRatio / a;\n const d = -((b - c) / epsilon);\n if (d <= 0) {\n return null;\n }\n duration = Math.log(d) / (dampingRatio * undampedFrequency);\n } else {\n return null;\n }\n return duration;\n },\n computeDerivedCurveOptions: (dampingRatio, duration, velocity = 0, mass = 1) => {\n let derivative, envelope;\n dampingRatio = Math.max(Math.min(dampingRatio, maxDamping), minDamping);\n duration = Math.max(Math.min(duration, maxDuration2), minDuration);\n if (dampingRatio < 1) {\n envelope = function(envelopeUndampedFrequency) {\n const exponentialDecay = envelopeUndampedFrequency * dampingRatio;\n const currentDisplacement = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = angularFrequency(envelopeUndampedFrequency, dampingRatio);\n const c = Math.exp(-currentDisplacement);\n return epsilon - a / b * c;\n };\n derivative = function(derivativeUndampedFrequency) {\n const exponentialDecay = derivativeUndampedFrequency * dampingRatio;\n const currentDisplacement = exponentialDecay * duration;\n const d = currentDisplacement * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(derivativeUndampedFrequency, 2) * duration;\n const f = Math.exp(-currentDisplacement);\n const g = angularFrequency(Math.pow(derivativeUndampedFrequency, 2), dampingRatio);\n const factor = -envelope(derivativeUndampedFrequency) + epsilon > 0 ? -1 : 1;\n return factor * ((d - e) * f) / g;\n };\n } else {\n envelope = function(envelopeUndampedFrequency) {\n const a = Math.exp(-envelopeUndampedFrequency * duration);\n const b = (envelopeUndampedFrequency - velocity) * duration + 1;\n return -epsilon + a * b;\n };\n derivative = function(derivativeUndampedFrequency) {\n const a = Math.exp(-derivativeUndampedFrequency * duration);\n const b = (velocity - derivativeUndampedFrequency) * Math.pow(duration, 2);\n return a * b;\n };\n }\n const result = {\n tension: 100,\n friction: 10,\n velocity\n };\n const initialGuess = 5 / duration;\n const undampedFrequency = approximateRoot(envelope, derivative, initialGuess);\n if (!isNaN(undampedFrequency)) {\n result.tension = Math.pow(undampedFrequency, 2) * mass;\n result.friction = dampingRatio * 2 * Math.sqrt(mass * result.tension);\n }\n return result;\n }\n};\n\n// ../../library/src/animation/Animators/SpringAnimator.ts\nvar SpringTensionFrictionDefaults = /* @__PURE__ */ (() => ({\n tension: 500,\n friction: 10,\n tolerance: 1 / 1e4,\n velocity: 0\n}))();\nvar SpringDampingDurationDefaults = {\n dampingRatio: 1,\n duration: 1,\n velocity: 0,\n mass: 1\n};\nfunction isDampingDurationSpringOptions(options) {\n if (!options) {\n return false;\n }\n return typeof options.dampingRatio === \"number\" || typeof options.duration === \"number\" || typeof options.mass === \"number\";\n}\nvar SpringAnimator = class {\n constructor(options, interpolation) {\n this.interpolation = interpolation;\n __publicField(this, \"options\");\n __publicField(this, \"current\");\n __publicField(this, \"destination\");\n __publicField(this, \"difference\");\n __publicField(this, \"state\");\n __publicField(this, \"integrator\");\n __publicField(this, \"interpolator\");\n let _opt;\n if (isDampingDurationSpringOptions(options)) {\n const toPass = { ...SpringDampingDurationDefaults, ...options };\n _opt = SpringCurveValueConverter.computeDerivedCurveOptions(\n toPass.dampingRatio,\n toPass.duration,\n toPass.velocity,\n toPass.mass\n );\n } else {\n _opt = options;\n }\n this.options = { ...SpringTensionFrictionDefaults, ..._opt };\n this.state = {\n x: 0,\n v: this.options.velocity\n };\n this.integrator = new Integrator((state) => -this.options.tension * state.x - this.options.friction * state.v);\n }\n isReady() {\n return this.interpolator !== void 0 && this.difference !== void 0;\n }\n next(delta) {\n this.state = this.integrator.integrateState(this.state, delta);\n const value = this.interpolator(this.progress());\n return value;\n }\n isFinished() {\n const positionNearZero = Math.abs(this.state.x) < this.options.tolerance;\n const velocityNearZero = Math.abs(this.state.v) < this.options.tolerance;\n return positionNearZero && velocityNearZero;\n }\n setFrom(value) {\n this.current = value;\n this.updateInterpolator();\n }\n setVelocity(velocity) {\n this.state.v = velocity;\n }\n progress() {\n return 1 - this.state.x / this.difference;\n }\n // The spring always settles to 0, so we create an interpolation to the destination\n // And calculate the progress based on the current state and the span of the interpolation\n // This lets us integrate over state.x, even though Value is generic\n setTo(value) {\n this.destination = value;\n this.difference = this.interpolation.difference(this.destination, this.current);\n this.state.x = this.difference;\n this.updateInterpolator();\n }\n /** @internal */\n getState() {\n return this.state;\n }\n updateInterpolator() {\n if (this.current === void 0 || this.destination === void 0) {\n return;\n }\n this.interpolator = this.interpolation.interpolate(this.current, this.destination);\n }\n};\n\n// ../../library/src/animation/Animators/InertialScrollAnimator.ts\nvar Defaults = {\n velocity: 0,\n min: 0,\n max: 0,\n momentum: {\n friction: 2,\n tolerance: 10\n },\n bounce: {\n tension: 500,\n friction: 10,\n tolerance: 1\n }\n};\nvar InertialScrollAnimator = class {\n constructor(options) {\n __publicField(this, \"options\");\n __publicField(this, \"current\");\n __publicField(this, \"frictionAnimator\");\n __publicField(this, \"springAnimator\");\n __publicField(this, \"useSpring\");\n this.options = Object.assign({ ...Defaults }, options);\n this.frictionAnimator = new FrictionAnimator({\n friction: this.options.momentum.friction,\n tolerance: this.options.momentum.tolerance,\n velocity: this.options.velocity\n });\n this.springAnimator = new SpringAnimator(\n {\n tension: this.options.bounce.tension,\n friction: this.options.bounce.friction,\n tolerance: this.options.bounce.tolerance,\n velocity: this.options.velocity\n },\n NumberInterpolation\n );\n this.useSpring = false;\n }\n isReady() {\n return true;\n }\n next(delta) {\n this.current = this.currentAnimator.next(delta);\n if (!this.useSpring) {\n this.tryTransitionToSpring();\n }\n return this.current;\n }\n get currentAnimator() {\n if (this.useSpring) {\n return this.springAnimator;\n }\n return this.frictionAnimator;\n }\n isFinished() {\n return this.currentAnimator.isFinished();\n }\n get state() {\n return this.currentAnimator.getState();\n }\n setFrom(value) {\n this.setState({ x: value, v: this.state.v });\n }\n setState(state) {\n this.frictionAnimator.setFrom(state.x);\n this.frictionAnimator.setVelocity(state.v);\n if (this.isValidState()) {\n return this.tryTransitionToSpring();\n } else {\n let bound = 0;\n if (this.state.x <= this.options.min) {\n bound = this.options.min;\n }\n if (this.state.x >= this.options.max) {\n bound = this.options.max;\n }\n return this.transitionToSpring(bound);\n }\n }\n setTo(destination) {\n this.frictionAnimator.setTo(destination);\n this.springAnimator.setTo(destination);\n }\n setLimits(min, max) {\n this.options.min = min;\n this.options.max = max;\n }\n // If the position is outside the min and max bounds, and traveling\n // further away, then transition from friction to spring animation\n tryTransitionToSpring() {\n const belowMinWithVelocity = this.state.x < this.options.min && this.state.v <= 0;\n const aboveMaxWithVelocity = this.state.x > this.options.max && this.state.v >= 0;\n if (belowMinWithVelocity || aboveMaxWithVelocity) {\n let bound;\n if (belowMinWithVelocity) {\n bound = this.options.min;\n } else {\n bound = this.options.max;\n }\n this.transitionToSpring(bound);\n } else {\n this.useSpring = false;\n }\n }\n transitionToSpring(bound) {\n this.springAnimator.setFrom(this.state.x);\n this.springAnimator.setVelocity(this.state.v);\n this.springAnimator.setTo(bound);\n this.useSpring = true;\n }\n // If the position is outside the min and max bounds, but traveling\n // back towards the bounds, check if the velocity is sufficient to\n // carry the position back within bounds. If it is, let friction do the\n // work. If not, the state is invalid, so use the spring.\n isValidState() {\n const belowMinTravelingBack = this.state.x < this.options.min && this.state.v > 0;\n const aboveMaxTravelingBack = this.state.x > this.options.max && this.state.v < 0;\n if (belowMinTravelingBack || aboveMaxTravelingBack) {\n let bound;\n if (belowMinTravelingBack) {\n bound = this.options.min;\n } else {\n bound = this.options.max;\n }\n const friction = this.frictionAnimator.options.friction;\n const solution = 1 - friction * (bound - this.state.x) / this.state.v;\n return solution > 0;\n }\n return true;\n }\n // The math behind _isValidState:\n //\n // 1. Integrate the friction animator's acceleration to find velocity\n //\n // a = - k * v\n // dv/dt = - k * v\n // Int(dv/v) = - k * Int(dt)\n // ln v = - k * t + C\n //\n // => Solve for C at t = 0\n //\n // ln v(0) = - k * 0 + C\n // ln v(0) = C\n //\n // => Plug C back into v(t)\n //\n // ln v = - k * t + ln v(0)\n // e^(ln v) = e^(- k * t) + e^(ln v(0))\n // v = v(0) * e^(- k * t)\n //\n // 2. Integrate velocity to find position\n //\n // Int(v) = v(0) * Int(e^(- k * t))\n // x = - v(0) * e^(-k * t) / k + C\n //\n // => Solve for C at t = 0\n //\n // x(0) = - v(0) * e^(-k * 0) / k + C\n // x(0) = - v(0) / k + C\n // x(0) + v(0) / k = C\n //\n // => Plug C back into x(t)\n //\n // x = - v(0) * e^(-k * t) / k + x(0) + v(0) / k\n //\n // 3. Check if a (real) solution exists for t for position x\n //\n // x = - v(0) * e^(-k * t) / k + x(0) + v(0) / k\n // x - x(0) = - v(0) * e^(-k * t) / k + v(0) / k\n // k * (x - x(0)) = - v(0) * e^(-k * t) + v(0)\n // k * (x - x(0)) - v(0) = - v(0) * e^(-k * t)\n // (k * (x - x(0)) - v(0)) / - v(0) = e^(-k * t)\n // 1 - (k * (x - x(0)) / v(0) = e^(-k * t)\n // ln(1 - (k * (x - x(0)) / v(0)) = -k * t\n //\n // Therefore, a real solution exists if 1 - (k * (x - x(0)) / v(0) > 0\n};\n\n// ../../library/src/render/types/Color/CSSNames.ts\nvar cssNames = {\n aliceblue: \"f0f8ff\",\n antiquewhite: \"faebd7\",\n aqua: \"0ff\",\n aquamarine: \"7fffd4\",\n azure: \"f0ffff\",\n beige: \"f5f5dc\",\n bisque: \"ffe4c4\",\n black: \"000\",\n blanchedalmond: \"ffebcd\",\n blue: \"00f\",\n blueviolet: \"8a2be2\",\n brown: \"a52a2a\",\n burlywood: \"deb887\",\n burntsienna: \"ea7e5d\",\n cadetblue: \"5f9ea0\",\n chartreuse: \"7fff00\",\n chocolate: \"d2691e\",\n coral: \"ff7f50\",\n cornflowerblue: \"6495ed\",\n cornsilk: \"fff8dc\",\n crimson: \"dc143c\",\n cyan: \"0ff\",\n darkblue: \"00008b\",\n darkcyan: \"008b8b\",\n darkgoldenrod: \"b8860b\",\n darkgray: \"a9a9a9\",\n darkgreen: \"006400\",\n darkgrey: \"a9a9a9\",\n darkkhaki: \"bdb76b\",\n darkmagenta: \"8b008b\",\n darkolivegreen: \"556b2f\",\n darkorange: \"ff8c00\",\n darkorchid: \"9932cc\",\n darkred: \"8b0000\",\n darksalmon: \"e9967a\",\n darkseagreen: \"8fbc8f\",\n darkslateblue: \"483d8b\",\n darkslategray: \"2f4f4f\",\n darkslategrey: \"2f4f4f\",\n darkturquoise: \"00ced1\",\n darkviolet: \"9400d3\",\n deeppink: \"ff1493\",\n deepskyblue: \"00bfff\",\n dimgray: \"696969\",\n dimgrey: \"696969\",\n dodgerblue: \"1e90ff\",\n firebrick: \"b22222\",\n floralwhite: \"fffaf0\",\n forestgreen: \"228b22\",\n fuchsia: \"f0f\",\n gainsboro: \"dcdcdc\",\n ghostwhite: \"f8f8ff\",\n gold: \"ffd700\",\n goldenrod: \"daa520\",\n gray: \"808080\",\n green: \"008000\",\n greenyellow: \"adff2f\",\n grey: \"808080\",\n honeydew: \"f0fff0\",\n hotpink: \"ff69b4\",\n indianred: \"cd5c5c\",\n indigo: \"4b0082\",\n ivory: \"fffff0\",\n khaki: \"f0e68c\",\n lavender: \"e6e6fa\",\n lavenderblush: \"fff0f5\",\n lawngreen: \"7cfc00\",\n lemonchiffon: \"fffacd\",\n lightblue: \"add8e6\",\n lightcoral: \"f08080\",\n lightcyan: \"e0ffff\",\n lightgoldenrodyellow: \"fafad2\",\n lightgray: \"d3d3d3\",\n lightgreen: \"90ee90\",\n lightgrey: \"d3d3d3\",\n lightpink: \"ffb6c1\",\n lightsalmon: \"ffa07a\",\n lightseagreen: \"20b2aa\",\n lightskyblue: \"87cefa\",\n lightslategray: \"789\",\n lightslategrey: \"789\",\n lightsteelblue: \"b0c4de\",\n lightyellow: \"ffffe0\",\n lime: \"0f0\",\n limegreen: \"32cd32\",\n linen: \"faf0e6\",\n magenta: \"f0f\",\n maroon: \"800000\",\n mediumaquamarine: \"66cdaa\",\n mediumblue: \"0000cd\",\n mediumorchid: \"ba55d3\",\n mediumpurple: \"9370db\",\n mediumseagreen: \"3cb371\",\n mediumslateblue: \"7b68ee\",\n mediumspringgreen: \"00fa9a\",\n mediumturquoise: \"48d1cc\",\n mediumvioletred: \"c71585\",\n midnightblue: \"191970\",\n mintcream: \"f5fffa\",\n mistyrose: \"ffe4e1\",\n moccasin: \"ffe4b5\",\n navajowhite: \"ffdead\",\n navy: \"000080\",\n oldlace: \"fdf5e6\",\n olive: \"808000\",\n olivedrab: \"6b8e23\",\n orange: \"ffa500\",\n orangered: \"ff4500\",\n orchid: \"da70d6\",\n palegoldenrod: \"eee8aa\",\n palegreen: \"98fb98\",\n paleturquoise: \"afeeee\",\n palevioletred: \"db7093\",\n papayawhip: \"ffefd5\",\n peachpuff: \"ffdab9\",\n peru: \"cd853f\",\n pink: \"ffc0cb\",\n plum: \"dda0dd\",\n powderblue: \"b0e0e6\",\n purple: \"800080\",\n rebeccapurple: \"663399\",\n red: \"f00\",\n rosybrown: \"bc8f8f\",\n royalblue: \"4169e1\",\n saddlebrown: \"8b4513\",\n salmon: \"fa8072\",\n sandybrown: \"f4a460\",\n seagreen: \"2e8b57\",\n seashell: \"fff5ee\",\n sienna: \"a0522d\",\n silver: \"c0c0c0\",\n skyblue: \"87ceeb\",\n slateblue: \"6a5acd\",\n slategray: \"708090\",\n slategrey: \"708090\",\n snow: \"fffafa\",\n springgreen: \"00ff7f\",\n steelblue: \"4682b4\",\n tan: \"d2b48c\",\n teal: \"008080\",\n thistle: \"d8bfd8\",\n tomato: \"ff6347\",\n turquoise: \"40e0d0\",\n violet: \"ee82ee\",\n wheat: \"f5deb3\",\n white: \"fff\",\n whitesmoke: \"f5f5f5\",\n yellow: \"ff0\",\n yellowgreen: \"9acd32\"\n};\n\n// ../../library/src/render/types/Color/types.ts\nvar ColorFormat = /* @__PURE__ */ ((ColorFormat2) => {\n ColorFormat2[\"RGB\"] = \"rgb\";\n ColorFormat2[\"HSL\"] = \"hsl\";\n ColorFormat2[\"HSV\"] = \"hsv\";\n ColorFormat2[\"HEX\"] = \"hex\";\n ColorFormat2[\"NAME\"] = \"name\";\n return ColorFormat2;\n})(ColorFormat || {});\nvar ColorMixModelType = /* @__PURE__ */ ((ColorMixModelType2) => {\n ColorMixModelType2[\"RGB\"] = \"rgb\";\n ColorMixModelType2[\"RGBA\"] = \"rgba\";\n ColorMixModelType2[\"HSL\"] = \"hsl\";\n ColorMixModelType2[\"HSLA\"] = \"hsla\";\n ColorMixModelType2[\"HUSL\"] = \"husl\";\n return ColorMixModelType2;\n})(ColorMixModelType || {});\n\n// ../../library/src/render/types/Color/Utils.ts\nfunction modulate(value, rangeA, rangeB, limit = false) {\n const [fromLow, fromHigh] = rangeA;\n const [toLow, toHigh] = rangeB;\n const fromDelta = fromHigh - fromLow;\n if (fromDelta === 0)\n return (toHigh + toLow) / 2;\n const toDelta = toHigh - toLow;\n if (toDelta === 0)\n return toLow;\n const result = toLow + (value - fromLow) / fromDelta * toDelta;\n if (limit === true) {\n if (toLow < toHigh) {\n if (result < toLow) {\n return toLow;\n }\n if (result > toHigh) {\n return toHigh;\n }\n } else {\n if (result > toLow) {\n return toLow;\n }\n if (result < toHigh) {\n return toHigh;\n }\n }\n }\n return result;\n}\nfunction isNumeric(value) {\n return !isNaN(value) && isFinite(value);\n}\nfunction percentToFraction(val) {\n const digits = numberFromString(val);\n if (digits !== void 0) {\n if (val.includes(\"%\")) {\n return digits / 100;\n }\n return digits;\n }\n return 0;\n}\nfunction numberFromString(input) {\n const match = /\\d?\\.?\\d+/u.exec(input);\n return match ? Number(match[0]) : void 0;\n}\n\n// ../../library/src/render/types/Color/converters.ts\nvar Hsluv = /* @__PURE__ */ (() => require_hsluv().Hsluv)();\nvar hsluvConverter = /* @__PURE__ */ new Hsluv();\nfunction rgbToHsluv(r, g, b) {\n hsluvConverter.rgb_r = r / 255;\n hsluvConverter.rgb_g = g / 255;\n hsluvConverter.rgb_b = b / 255;\n hsluvConverter.rgbToHsluv();\n return {\n h: hsluvConverter.hsluv_h,\n s: hsluvConverter.hsluv_s,\n l: hsluvConverter.hsluv_l\n };\n}\nfunction rgbaFromHusl(h, s, l, a = 1) {\n hsluvConverter.hsluv_h = h;\n hsluvConverter.hsluv_s = s;\n hsluvConverter.hsluv_l = l;\n hsluvConverter.hsluvToRgb();\n return {\n r: hsluvConverter.rgb_r * 255,\n g: hsluvConverter.rgb_g * 255,\n b: hsluvConverter.rgb_b * 255,\n a\n };\n}\nfunction hsvToStr(h, s, v, a) {\n const _h = Math.round(h);\n const _s = Math.round(s * 100);\n const _v = Math.round(v * 100);\n return a === void 0 || a === 1 ? \"hsv(\" + _h + \", \" + _s + \"%, \" + _v + \"%)\" : \"hsva(\" + _h + \", \" + _s + \"%, \" + _v + \"%, \" + a + \")\";\n}\nfunction rgbToRgb(r, g, b) {\n return {\n r: isNumeric(r) ? bound01(r, 255) * 255 : 0,\n g: isNumeric(g) ? bound01(g, 255) * 255 : 0,\n b: isNumeric(b) ? bound01(b, 255) * 255 : 0\n };\n}\nfunction rgbToHex(r, g, b, allow3Char) {\n const hex = [\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16))\n ];\n if (allow3Char && hex[0].charAt(0) === hex[0].charAt(1) && hex[1].charAt(0) === hex[1].charAt(1) && hex[2].charAt(0) === hex[2].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join(\"\");\n}\nfunction rgbToHsl(r, g, b) {\n let l;\n let s;\n const _r = bound01(r, 255);\n const _g = bound01(g, 255);\n const _b = bound01(b, 255);\n const max = Math.max(_r, _g, _b);\n const min = Math.min(_r, _g, _b);\n let h = s = l = (max + min) / 2;\n if (max === min) {\n h = s = 0;\n } else {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case _r:\n h = (_g - _b) / d + (_g < _b ? 6 : 0);\n break;\n case _g:\n h = (_b - _r) / d + 2;\n break;\n case _b:\n h = (_r - _g) / d + 4;\n break;\n }\n h /= 6;\n }\n return { h: h * 360, s, l };\n}\nfunction hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * 6 * t;\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\nfunction hslToRgb(h, s, l) {\n let r;\n let g;\n let b;\n h = bound01(h, 360);\n s = bound01(s * 100, 100);\n l = bound01(l * 100, 100);\n if (s === 0) {\n r = g = b = l;\n } else {\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\nfunction rgbToHsv(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const d = max - min;\n let h;\n const s = max === 0 ? 0 : d / max;\n const v = max;\n if (max === min) {\n h = 0;\n } else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n return { h, s, v };\n}\nfunction hsvToRgb(h, s, v) {\n h = bound01(h, 360) * 6;\n s = bound01(s * 100, 100);\n v = bound01(v * 100, 100);\n const i = Math.floor(h);\n const f = h - i;\n const p = v * (1 - s);\n const q = v * (1 - f * s);\n const t = v * (1 - (1 - f) * s);\n const mod = i % 6;\n const r = [v, q, p, p, t, v][mod];\n const g = [t, v, v, q, p, p][mod];\n const b = [p, p, t, v, v, q][mod];\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\nfunction bound01(n, max) {\n let _max;\n let _n;\n if (typeof max === \"string\")\n _max = parseFloat(max);\n else\n _max = max;\n if (typeof n === \"string\") {\n if (isOnePointZero(n)) {\n n = \"100%\";\n }\n const processPercent = isPercentage(n);\n _n = Math.min(_max, Math.max(0, parseFloat(n)));\n if (processPercent) {\n _n = Math.floor(_n * _max) / 100;\n }\n } else {\n _n = n;\n }\n if (Math.abs(_n - _max) < 1e-6) {\n return 1;\n }\n return _n % _max / _max;\n}\nfunction isOnePointZero(n) {\n return typeof n === \"string\" && n.includes(\".\") && parseFloat(n) === 1;\n}\nfunction isPercentage(n) {\n return typeof n === \"string\" && n.includes(\"%\");\n}\nfunction pad2(char) {\n if (char.length === 1) {\n return \"0\" + char;\n } else {\n return \"\" + char;\n }\n}\nvar matchers = /* @__PURE__ */ (() => {\n const cssInteger = \"[-\\\\+]?\\\\d+%?\";\n const cssNumber = \"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\";\n const cssUnit = \"(?:\" + cssNumber + \")|(?:\" + cssInteger + \")\";\n const permissiveMatch3 = \"[\\\\s|\\\\(]+(\" + cssUnit + \")[,|\\\\s]+(\" + cssUnit + \")[,|\\\\s]+(\" + cssUnit + \")\\\\s*\\\\)?\";\n const permissiveMatch4 = \"[\\\\s|\\\\(]+(\" + cssUnit + \")[,|\\\\s]+(\" + cssUnit + \")[,|\\\\s]+(\" + cssUnit + \")[,|\\\\s]+(\" + cssUnit + \")\\\\s*\\\\)?\";\n return {\n rgb: new RegExp(\"rgb\" + permissiveMatch3),\n rgba: new RegExp(\"rgba\" + permissiveMatch4),\n hsl: new RegExp(\"hsl\" + permissiveMatch3),\n hsla: new RegExp(\"hsla\" + permissiveMatch4),\n hsv: new RegExp(\"hsv\" + permissiveMatch3),\n hsva: new RegExp(\"hsva\" + permissiveMatch4),\n hex3: /^([\\da-f])([\\da-f])([\\da-f])$/iu,\n hex6: /^([\\da-f]{2})([\\da-f]{2})([\\da-f]{2})$/iu,\n hex4: /^#?([\\da-f])([\\da-f])([\\da-f])([\\da-f])$/iu,\n hex8: /^#?([\\da-f]{2})([\\da-f]{2})([\\da-f]{2})([\\da-f]{2})$/iu\n };\n})();\nfunction stringToObject(inputColor) {\n if (inputColor.includes(\"gradient(\"))\n return false;\n if (inputColor.includes(\"var(\"))\n return false;\n const trimLeft = /^[\\s,#]+/u;\n let color2 = inputColor.replace(trimLeft, \"\").trimEnd().toLowerCase();\n const namedColor = cssNames[color2];\n if (namedColor) {\n color2 = namedColor;\n }\n if (color2 === \"transparent\") {\n return {\n r: 0,\n g: 0,\n b: 0,\n a: 0,\n format: \"name\" /* NAME */\n };\n }\n let match;\n if (match = matchers.rgb.exec(color2)) {\n return {\n r: parseInt(match[1] ?? \"\"),\n g: parseInt(match[2] ?? \"\"),\n b: parseInt(match[3] ?? \"\"),\n a: 1,\n format: \"rgb\" /* RGB */\n };\n }\n if (match = matchers.rgba.exec(color2)) {\n return {\n r: parseInt(match[1] ?? \"\"),\n g: parseInt(match[2] ?? \"\"),\n b: parseInt(match[3] ?? \"\"),\n a: parseFloat(match[4] ?? \"\"),\n format: \"rgb\" /* RGB */\n };\n }\n if (match = matchers.hsl.exec(color2)) {\n return {\n h: parseInt(match[1] ?? \"\"),\n s: percentToFraction(match[2] ?? \"\"),\n l: percentToFraction(match[3] ?? \"\"),\n a: 1,\n format: \"hsl\" /* HSL */\n };\n }\n if (match = matchers.hsla.exec(color2)) {\n return {\n h: parseInt(match[1] ?? \"\"),\n s: percentToFraction(match[2] ?? \"\"),\n l: percentToFraction(match[3] ?? \"\"),\n a: parseFloat(match[4] ?? \"\"),\n format: \"hsl\" /* HSL */\n };\n }\n if (match = matchers.hsv.exec(color2)) {\n return {\n h: parseInt(match[1] ?? \"\"),\n s: percentToFraction(match[2] ?? \"\"),\n v: percentToFraction(match[3] ?? \"\"),\n a: 1,\n format: \"hsv\" /* HSV */\n };\n }\n if (match = matchers.hsva.exec(color2)) {\n return {\n h: parseInt(match[1] ?? \"\"),\n s: percentToFraction(match[2] ?? \"\"),\n v: percentToFraction(match[3] ?? \"\"),\n a: parseFloat(match[4] ?? \"\"),\n format: \"hsv\" /* HSV */\n };\n }\n if (match = matchers.hex8.exec(color2)) {\n return {\n r: parseIntFromHex(match[1] ?? \"\"),\n g: parseIntFromHex(match[2] ?? \"\"),\n b: parseIntFromHex(match[3] ?? \"\"),\n a: convertHexToDecimal(match[4] ?? \"\"),\n format: namedColor ? \"name\" /* NAME */ : \"hex\" /* HEX */\n };\n }\n if (match = matchers.hex6.exec(color2)) {\n return {\n r: parseIntFromHex(match[1] ?? \"\"),\n g: parseIntFromHex(match[2] ?? \"\"),\n b: parseIntFromHex(match[3] ?? \"\"),\n a: 1,\n format: namedColor ? \"name\" /* NAME */ : \"hex\" /* HEX */\n };\n }\n if (match = matchers.hex4.exec(color2)) {\n return {\n r: parseIntFromHex(`${match[1]}${match[1]}`),\n g: parseIntFromHex(`${match[2]}${match[2]}`),\n b: parseIntFromHex(`${match[3]}${match[3]}`),\n a: convertHexToDecimal(match[4] + \"\" + match[4]),\n format: namedColor ? \"name\" /* NAME */ : \"hex\" /* HEX */\n };\n }\n if (match = matchers.hex3.exec(color2)) {\n return {\n r: parseIntFromHex(`${match[1]}${match[1]}`),\n g: parseIntFromHex(`${match[2]}${match[2]}`),\n b: parseIntFromHex(`${match[3]}${match[3]}`),\n a: 1,\n format: namedColor ? \"name\" /* NAME */ : \"hex\" /* HEX */\n };\n } else {\n return false;\n }\n}\nfunction parseIntFromHex(hex) {\n return parseInt(hex, 16);\n}\nfunction convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}\n\n// ../../library/src/render/types/Color/Color.ts\nvar cache = /* @__PURE__ */ new Map();\nvar Color = /* @__PURE__ */ (() => {\n function Color2(color2, r, g, b) {\n if (typeof color2 === \"string\") {\n let c = cache.get(color2);\n if (c)\n return c;\n c = createColor(color2);\n if (c === void 0)\n return { ...Color2(\"black\"), isValid: false };\n cache.set(color2, c);\n return c;\n }\n const created = createColor(color2, r, g, b);\n return created !== void 0 ? created : { ...Color2(\"black\"), isValid: false };\n }\n function createColor(color2, r, g, b) {\n if (color2 === \"\")\n return void 0;\n const colorData = getCompleteColorStrategy(color2, r, g, b);\n if (colorData) {\n const newColor = {\n r: colorData.r,\n g: colorData.g,\n b: colorData.b,\n a: colorData.a,\n h: colorData.h,\n s: colorData.s,\n l: colorData.l,\n initialValue: typeof color2 === \"string\" && colorData.format !== \"hsv\" /* HSV */ ? color2 : void 0,\n roundA: Math.round(100 * colorData.a) / 100,\n format: colorData.format,\n mix: Color2.mix,\n toValue: () => Color2.toRgbString(newColor)\n };\n return newColor;\n } else {\n return void 0;\n }\n }\n const ColorMixModel = {\n isRGB(colorModel) {\n return colorModel === \"rgb\" /* RGB */ || colorModel === \"rgba\" /* RGBA */;\n },\n isHSL(colorModel) {\n return colorModel === \"hsl\" /* HSL */ || colorModel === \"hsla\" /* HSLA */;\n }\n };\n Color2.inspect = (color2, initialValue) => {\n if (color2.format === \"hsl\" /* HSL */) {\n return `<${color2.constructor.name} h:${color2.h} s:${color2.s} l:${color2.l} a:${color2.a}>`;\n } else if (color2.format === \"hex\" /* HEX */ || color2.format === \"name\" /* NAME */) {\n return `<${color2.constructor.name} \"${initialValue}\">`;\n } else {\n return `<${color2.constructor.name} r:${color2.r} g:${color2.g} b:${color2.b} a:${color2.a}>`;\n }\n };\n Color2.isColor = (color2) => {\n if (typeof color2 === \"string\") {\n return Color2.isColorString(color2);\n } else {\n return Color2.isColorObject(color2);\n }\n };\n Color2.isColorString = (colorString) => {\n if (typeof colorString === \"string\") {\n return stringToObject(colorString) !== false;\n }\n return false;\n };\n Color2.isColorObject = (color2) => {\n return color2 && typeof color2 !== \"string\" && typeof color2.r === \"number\" && typeof color2.g === \"number\" && typeof color2.b === \"number\" && typeof color2.h === \"number\" && typeof color2.s === \"number\" && typeof color2.l === \"number\" && typeof color2.a === \"number\" && typeof color2.roundA === \"number\" && typeof color2.format === \"string\";\n };\n Color2.toString = (color2) => {\n return Color2.toRgbString(color2);\n };\n Color2.toHex = (color2, allow3Char = false) => {\n return rgbToHex(color2.r, color2.g, color2.b, allow3Char);\n };\n Color2.toHexString = (color2, allow3Char = false) => {\n return `#${Color2.toHex(color2, allow3Char)}`;\n };\n Color2.toRgbString = (color2) => {\n return color2.a === 1 ? \"rgb(\" + Math.round(color2.r) + \", \" + Math.round(color2.g) + \", \" + Math.round(color2.b) + \")\" : \"rgba(\" + Math.round(color2.r) + \", \" + Math.round(color2.g) + \", \" + Math.round(color2.b) + \", \" + color2.roundA + \")\";\n };\n Color2.toHusl = (color2) => {\n return {\n ...rgbToHsluv(color2.r, color2.g, color2.b),\n a: color2.roundA\n };\n };\n Color2.toHslString = (color2) => {\n const hsl = Color2.toHsl(color2);\n const h = Math.round(hsl.h);\n const s = Math.round(hsl.s * 100);\n const l = Math.round(hsl.l * 100);\n return color2.a === 1 ? \"hsl(\" + h + \", \" + s + \"%, \" + l + \"%)\" : \"hsla(\" + h + \", \" + s + \"%, \" + l + \"%, \" + color2.roundA + \")\";\n };\n Color2.toHsv = (color2) => {\n const hsv = rgbToHsv(color2.r, color2.g, color2.b);\n return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: color2.a };\n };\n Color2.toHsvString = (color2) => {\n const hsv = rgbToHsv(color2.r, color2.g, color2.b);\n const h = Math.round(hsv.h * 360);\n const s = Math.round(hsv.s * 100);\n const v = Math.round(hsv.v * 100);\n return color2.a === 1 ? \"hsv(\" + h + \", \" + s + \"%, \" + v + \"%)\" : \"hsva(\" + h + \", \" + s + \"%, \" + v + \"%, \" + color2.roundA + \")\";\n };\n Color2.toName = (color2) => {\n if (color2.a === 0) {\n return \"transparent\";\n }\n if (color2.a < 1) {\n return false;\n }\n const hex = rgbToHex(color2.r, color2.g, color2.b, true);\n for (const key7 of Object.keys(cssNames)) {\n const value = cssNames[key7];\n if (value === hex) {\n return key7;\n }\n }\n return false;\n };\n Color2.toHsl = (color2) => {\n return {\n h: Math.round(color2.h),\n s: color2.s,\n l: color2.l,\n a: color2.a\n };\n };\n Color2.toRgb = (color2) => {\n return {\n r: Math.round(color2.r),\n g: Math.round(color2.g),\n b: Math.round(color2.b),\n a: color2.a\n };\n };\n Color2.brighten = (color2, amount = 10) => {\n const rgb = Color2.toRgb(color2);\n rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));\n rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));\n rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));\n return Color2(rgb);\n };\n Color2.lighten = (color2, amount = 10) => {\n const hsl = Color2.toHsl(color2);\n hsl.l += amount / 100;\n hsl.l = Math.min(1, Math.max(0, hsl.l));\n return Color2(hsl);\n };\n Color2.darken = (color2, amount = 10) => {\n const hsl = Color2.toHsl(color2);\n hsl.l -= amount / 100;\n hsl.l = Math.min(1, Math.max(0, hsl.l));\n return Color2(hsl);\n };\n Color2.saturate = (color2, amount = 10) => {\n const hsl = Color2.toHsl(color2);\n hsl.s += amount / 100;\n hsl.s = Math.min(1, Math.max(0, hsl.s));\n return Color2(hsl);\n };\n Color2.desaturate = (color2, amount = 10) => {\n const hsl = Color2.toHsl(color2);\n hsl.s -= amount / 100;\n hsl.s = Math.min(1, Math.max(0, hsl.s));\n return Color2(hsl);\n };\n Color2.grayscale = (color2) => {\n return Color2.desaturate(color2, 100);\n };\n Color2.hueRotate = (color2, angle) => {\n const hsl = Color2.toHsl(color2);\n hsl.h += angle;\n hsl.h = hsl.h > 360 ? hsl.h - 360 : hsl.h;\n return Color2(hsl);\n };\n Color2.alpha = (color2, a = 1) => {\n return Color2({\n r: color2.r,\n g: color2.g,\n b: color2.b,\n a\n });\n };\n Color2.transparent = (color2) => {\n return Color2.alpha(color2, 0);\n };\n Color2.multiplyAlpha = (color2, alphaValue = 1) => {\n return Color2({\n r: color2.r,\n g: color2.g,\n b: color2.b,\n a: color2.a * alphaValue\n });\n };\n Color2.interpolate = (colorA, colorB, model = \"rgb\" /* RGB */) => {\n if (!Color2.isColorObject(colorA) || !Color2.isColorObject(colorB)) {\n throw new TypeError(\"Both arguments for Color.interpolate must be Color objects\");\n }\n return (progress2) => {\n const color2 = Color2.mixAsColor(colorA, colorB, progress2, false, model);\n return color2;\n };\n };\n Color2.mix = (from, toColor, { model = \"rgb\" /* RGB */ } = {}) => {\n const fromColor = typeof from === \"string\" ? Color2(from) : from;\n const mixer = Color2.interpolate(fromColor, toColor, model);\n return (p) => Color2.toRgbString(mixer(p));\n };\n Color2.mixAsColor = (colorA, colorB, fraction2 = 0.5, limit = false, model = \"rgb\" /* RGB */) => {\n let result = null;\n if (ColorMixModel.isRGB(model)) {\n result = Color2({\n r: modulate(fraction2, [0, 1], [colorA.r, colorB.r], limit),\n g: modulate(fraction2, [0, 1], [colorA.g, colorB.g], limit),\n b: modulate(fraction2, [0, 1], [colorA.b, colorB.b], limit),\n a: modulate(fraction2, [0, 1], [colorA.a, colorB.a], limit)\n });\n } else {\n let hslA, hslB;\n if (ColorMixModel.isHSL(model)) {\n hslA = Color2.toHsl(colorA);\n hslB = Color2.toHsl(colorB);\n } else {\n hslA = Color2.toHusl(colorA);\n hslB = Color2.toHusl(colorB);\n }\n if (hslA.s === 0) {\n hslA.h = hslB.h;\n } else if (hslB.s === 0) {\n hslB.h = hslA.h;\n }\n const fromH = hslA.h;\n const toH = hslB.h;\n let deltaH = toH - fromH;\n if (deltaH > 180) {\n deltaH = toH - 360 - fromH;\n } else if (deltaH < -180) {\n deltaH = toH + 360 - fromH;\n }\n const tween = {\n h: modulate(fraction2, [0, 1], [fromH, fromH + deltaH], limit),\n s: modulate(fraction2, [0, 1], [hslA.s, hslB.s], limit),\n l: modulate(fraction2, [0, 1], [hslA.l, hslB.l], limit),\n a: modulate(fraction2, [0, 1], [colorA.a, colorB.a], limit)\n };\n if (ColorMixModel.isHSL(model)) {\n result = Color2(tween);\n } else {\n result = Color2(rgbaFromHusl(tween.h, tween.s, tween.l, tween.a));\n }\n }\n return result;\n };\n Color2.random = (alphaValue = 1) => {\n function gen() {\n return Math.floor(Math.random() * 255);\n }\n return Color2(\"rgba(\" + gen() + \", \" + gen() + \", \" + gen() + \", \" + alphaValue + \")\");\n };\n Color2.grey = (amount = 0.5, alphaValue = 1) => {\n amount = Math.floor(amount * 255);\n return Color2(\"rgba(\" + amount + \", \" + amount + \", \" + amount + \", \" + alphaValue + \")\");\n };\n Color2.gray = Color2.grey;\n Color2.rgbToHsl = (r, g, b) => {\n return rgbToHsl(r, g, b);\n };\n Color2.isValidColorProperty = (name, value) => {\n const isColorKey = name.toLowerCase().slice(-5) === \"color\" || name === \"fill\" || name === \"stroke\";\n if (isColorKey && typeof value === \"string\" && Color2.isColorString(value)) {\n return true;\n }\n return false;\n };\n Color2.difference = (colorA, colorB) => {\n const _r = (colorA.r + colorB.r) / 2;\n const deltaR = colorA.r - colorB.r;\n const deltaG = colorA.g - colorB.g;\n const deltaB = colorA.b - colorB.b;\n const deltaR2 = Math.pow(deltaR, 2);\n const deltaG2 = Math.pow(deltaG, 2);\n const deltaB2 = Math.pow(deltaB, 2);\n return Math.sqrt(2 * deltaR2 + 4 * deltaG2 + 3 * deltaB2 + _r * (deltaR2 - deltaB2) / 256);\n };\n Color2.equal = (colorA, colorB, tolerance = 0.1) => {\n if (Math.abs(colorA.r - colorB.r) >= tolerance) {\n return false;\n }\n if (Math.abs(colorA.g - colorB.g) >= tolerance) {\n return false;\n }\n if (Math.abs(colorA.b - colorB.b) >= tolerance) {\n return false;\n }\n if (Math.abs(colorA.a - colorB.a) * 256 >= tolerance) {\n return false;\n }\n return true;\n };\n const channelToDecimal = interpolate([0, 255], [0, 1]);\n function convertChannelToLinearRgb(channel) {\n channel = channelToDecimal(channel);\n const abs = Math.abs(channel);\n if (abs < 0.04045)\n return channel / 12.92;\n return (Math.sign(channel) || 1) * Math.pow((abs + 0.055) / 1.055, 2.4);\n }\n Color2.luminance = (color2) => {\n const { r, g, b } = Color2.toRgb(color2);\n return 0.2126 * convertChannelToLinearRgb(r) + 0.7152 * convertChannelToLinearRgb(g) + 0.0722 * convertChannelToLinearRgb(b);\n };\n Color2.contrast = (a, b) => {\n const l1 = Color2.luminance(a);\n const l2 = Color2.luminance(b);\n return (Math.max(l1, l2) + 0.05) / (Math.min(l1, l2) + 0.05);\n };\n return Color2;\n})();\nfunction getCompleteColorStrategy(colorOrR, g, b, a = 1) {\n let completeColor;\n if (typeof colorOrR === \"number\" && !Number.isNaN(colorOrR) && typeof g === \"number\" && !Number.isNaN(g) && typeof b === \"number\" && !Number.isNaN(b)) {\n const _r = colorOrR;\n const _g = g;\n const _b = b;\n const _a = a;\n completeColor = getCompleteColorFromRGB({ r: _r, g: _g, b: _b, a: _a });\n } else if (typeof colorOrR === \"string\") {\n completeColor = getCompleteColorFromString(colorOrR);\n } else if (typeof colorOrR === \"object\") {\n if (colorOrR.hasOwnProperty(\"r\") && colorOrR.hasOwnProperty(\"g\") && colorOrR.hasOwnProperty(\"b\")) {\n completeColor = getCompleteColorFromRGB(colorOrR);\n } else {\n completeColor = getCompleteColorFromHSL(colorOrR);\n }\n }\n return completeColor;\n}\nfunction getCompleteColorFromString(color2) {\n const result = stringToObject(color2);\n if (result) {\n if (result.format === \"hsl\" /* HSL */) {\n return getCompleteColorFromHSL(result);\n } else if (result.format === \"hsv\" /* HSV */) {\n return getCompleteColorFromHSV(result);\n } else {\n return getCompleteColorFromRGB(result);\n }\n }\n}\nfunction getCompleteColorFromHSV(color2) {\n const rgb = hsvToRgb(color2.h, color2.s, color2.v);\n const hsl = rgbToHsl(rgb.r, rgb.g, rgb.b);\n return {\n ...hsl,\n ...rgb,\n format: \"rgb\" /* RGB */,\n a: color2.a !== void 0 ? correctAlpha(color2.a) : 1\n };\n}\nfunction getCompleteColorFromRGB(color2) {\n const rgb = rgbToRgb(color2.r, color2.g, color2.b);\n const hsl = rgbToHsl(rgb.r, rgb.g, rgb.b);\n return {\n ...hsl,\n ...rgb,\n format: \"rgb\" /* RGB */,\n a: color2.a !== void 0 ? correctAlpha(color2.a) : 1\n };\n}\nfunction getCompleteColorFromHSL(color2) {\n let h;\n let s;\n let l;\n let rgb = { r: 0, g: 0, b: 0 };\n let hsl = { h: 0, s: 0, l: 0 };\n h = isNumeric(color2.h) ? color2.h : 0;\n h = (h + 360) % 360;\n s = isNumeric(color2.s) ? color2.s : 1;\n if (typeof color2.s === \"string\") {\n s = numberFromString(color2.s);\n }\n l = isNumeric(color2.l) ? color2.l : 0.5;\n if (typeof color2.l === \"string\") {\n l = numberFromString(color2.l);\n }\n rgb = hslToRgb(h, s, l);\n hsl = {\n h,\n s,\n l\n };\n return {\n ...rgb,\n ...hsl,\n a: color2.a === void 0 ? 1 : color2.a,\n format: \"hsl\" /* HSL */\n };\n}\nfunction correctAlpha(alphaValue) {\n alphaValue = parseFloat(alphaValue);\n if (alphaValue < 0) {\n alphaValue = 0;\n }\n if (isNaN(alphaValue) || alphaValue > 1) {\n alphaValue = 1;\n }\n return alphaValue;\n}\n\n// ../../library/src/interpolation/ColorInterpolation.ts\nvar ColorInterpolation = (type = \"husl\" /* HUSL */) => {\n return {\n interpolate(from, to) {\n ;\n [from, to] = Interpolation.handleUndefined(from, to);\n return Color.interpolate(Color(from), Color(to), type);\n },\n difference(from, to) {\n return Color.difference(Color(from), Color(to));\n }\n };\n};\n\n// ../../library/src/interpolation/NoInterpolation.ts\nvar NoInterpolation = {\n interpolate(from, to) {\n ;\n [from, to] = Interpolation.handleUndefined(from, to);\n return (progress2) => {\n return progress2 < 0.5 ? from : to;\n };\n },\n difference(from, to) {\n return from === to ? 0 : 1;\n }\n};\n\n// ../../library/src/interpolation/ObjectInterpolation.ts\nvar ObjectInterpolation = (valueInterpolation) => {\n return {\n interpolate(from, to) {\n ;\n [from, to] = Interpolation.handleUndefined(from, to);\n const result = Object.assign({}, from);\n const interpolations = {};\n const keys3 = /* @__PURE__ */ new Set();\n for (const key7 in from) {\n interpolations[key7] = valueInterpolation.interpolate(from[key7], to[key7]);\n keys3.add(key7);\n }\n for (const key7 in to) {\n if (!keys3.has(key7)) {\n interpolations[key7] = valueInterpolation.interpolate(from[key7], to[key7]);\n keys3.add(key7);\n }\n }\n return (progress2) => {\n for (const key7 in interpolations) {\n result[key7] = interpolations[key7](progress2);\n }\n return result;\n };\n },\n difference(from, to) {\n let sum = 0;\n for (const key7 in from) {\n const difference = valueInterpolation.difference(from[key7], to[key7]);\n sum += Math.pow(difference, 2);\n }\n return Math.sqrt(sum);\n }\n };\n};\n\n// ../../library/src/interpolation/ValueInterpolation.ts\nvar DefaultInterpolationOptions = {\n colorModel: \"husl\" /* HUSL */\n};\nvar ValueInterpolation = class {\n /**\n * @internal\n */\n constructor(options = DefaultInterpolationOptions) {\n __publicField(this, \"options\");\n /**\n * @internal\n */\n __publicField(this, \"interpolate\", (from, to) => {\n ;\n [from, to] = Interpolation.handleUndefined(from, to);\n return this.interPolationForValue(from).interpolate(from, to);\n });\n /**\n * @internal\n */\n __publicField(this, \"difference\", (from, to) => {\n const interpolation = this.interPolationForValue(from);\n return interpolation.difference(from, to);\n });\n this.options = { ...DefaultInterpolationOptions, ...options };\n }\n /**\n * @internal\n */\n interPolationForValue(value) {\n const type = typeof value;\n if (type === \"number\") {\n return NumberInterpolation;\n } else if (type === \"boolean\" || type === \"function\") {\n return NoInterpolation;\n } else if (Color.isColor(value)) {\n return ColorInterpolation(this.options.colorModel);\n } else if (type === \"object\") {\n if (value === null) {\n return NoInterpolation;\n }\n const constructor = value.constructor;\n if (constructor && isInterpolatable(constructor)) {\n const interpolation = constructor.interpolationFor(value, this);\n if (interpolation && interpolation !== this && interpolation.constructor !== ValueInterpolation) {\n return interpolation;\n }\n }\n return ObjectInterpolation(this);\n }\n console.warn(`No interpolation defined for ${value}`);\n return NoInterpolation;\n }\n};\nvar AnyInterpolation = /* @__PURE__ */ new ValueInterpolation();\n\n// ../../library/src/render/utils/isMotionValue.ts\nvar isMotionValue2 = (v) => v instanceof MotionValue;\n\n// ../../library/src/animation/Animators/PrecalculatedAnimator.ts\nvar Defaults2 = /* @__PURE__ */ (() => ({\n delta: 1 / 60,\n maxValues: 1e4\n}))();\nvar PrecalculatedAnimator = class {\n constructor(options) {\n __publicField(this, \"animator\");\n __publicField(this, \"values\");\n __publicField(this, \"currentTime\", 0);\n __publicField(this, \"totalTime\");\n __publicField(this, \"options\");\n this.options = { ...Defaults2, ...options };\n this.animator = options.animator;\n }\n preCalculate() {\n if (!this.animator.isReady()) {\n return;\n }\n const { delta } = this.options;\n this.values = [];\n while (!this.animator.isFinished() && this.values.length < this.options.maxValues) {\n let value = this.animator.next(this.options.delta);\n if (typeof value === \"object\" && value) {\n const object = value;\n const copy = { ...object };\n value = copy;\n }\n this.values.push(value);\n }\n this.totalTime = this.values.length * delta;\n }\n indexForTime(time) {\n return Math.max(\n 0,\n Math.min(this.values.length - 1, Math.round(this.values.length * (time / this.totalTime)) - 1)\n );\n }\n valueForTime(time) {\n const index = this.indexForTime(time);\n const value = this.values[index];\n return value;\n }\n setFrom(value) {\n this.animator.setFrom(value);\n this.preCalculate();\n }\n setTo(end) {\n this.animator.setTo(end);\n this.preCalculate();\n }\n isReady() {\n return this.values !== void 0 && this.values.length > 0 && this.totalTime > 0;\n }\n next(delta) {\n this.currentTime += delta;\n return this.valueForTime(this.currentTime);\n }\n isFinished() {\n return this.totalTime === 0 || this.currentTime >= this.totalTime;\n }\n get endValue() {\n this.preCalculate();\n const value = this.valueForTime(this.totalTime);\n return this.values.length > 0 ? value : this.animator.next(0);\n }\n};\n\n// ../../library/src/core/EventEmitter.ts\nvar EventEmitter3 = /* @__PURE__ */ (() => require_eventemitter3().EventEmitter)();\nvar EventEmitter = class {\n constructor() {\n __publicField(this, \"_emitter\", new EventEmitter3());\n }\n eventNames() {\n return this._emitter.eventNames();\n }\n eventListeners() {\n const listeners = {};\n for (const eventName of this._emitter.eventNames()) {\n listeners[eventName] = this._emitter.listeners(eventName);\n }\n return listeners;\n }\n on(eventName, fn) {\n this.addEventListener(eventName, fn, false, false, this);\n }\n off(eventName, fn) {\n this.removeEventListeners(eventName, fn);\n }\n once(eventName, fn) {\n this.addEventListener(eventName, fn, true, false, this);\n }\n unique(eventName, fn) {\n this.addEventListener(eventName, fn, false, true, this);\n }\n addEventListener(eventName, fn, once, unique, context) {\n if (unique) {\n for (const name of this._emitter.eventNames()) {\n if (fn === this._emitter.listeners(name)) {\n return;\n }\n }\n }\n if (once === true) {\n this._emitter.once(eventName, fn, context);\n } else {\n this._emitter.addListener(eventName, fn, context);\n }\n }\n removeEventListeners(eventName, fn) {\n if (eventName) {\n this._emitter.removeListener(eventName, fn);\n } else {\n this.removeAllEventListeners();\n }\n }\n removeAllEventListeners() {\n this._emitter.removeAllListeners();\n }\n countEventListeners(eventName, handler) {\n if (eventName) {\n return this._emitter.listeners(eventName).length;\n } else {\n let count = 0;\n for (const name of this._emitter.eventNames()) {\n count += this._emitter.listeners(name).length;\n }\n return count;\n }\n }\n emit(eventName, ...args) {\n this._emitter.emit(eventName, ...args);\n }\n};\n\n// ../../library/src/utils/safeWindow.ts\nvar mockWindow = {\n addEventListener: () => {\n },\n removeEventListener: () => {\n },\n dispatchEvent: () => false,\n ResizeObserver: void 0,\n onpointerdown: false,\n onpointermove: false,\n onpointerup: false,\n ontouchstart: false,\n ontouchmove: false,\n ontouchend: false,\n onmousedown: false,\n onmousemove: false,\n onmouseup: false,\n devicePixelRatio: 1,\n scrollX: 0,\n scrollY: 0,\n location: {\n href: \"\"\n },\n document: {\n cookie: \"\"\n },\n setTimeout: () => 0,\n clearTimeout: () => {\n },\n setInterval: () => 0,\n clearInterval: () => {\n },\n requestAnimationFrame: () => 0,\n cancelAnimationFrame: () => {\n },\n requestIdleCallback: () => 0,\n getSelection: () => null,\n matchMedia: (query) => {\n return {\n matches: false,\n media: query,\n onchange: () => {\n },\n addEventListener: () => {\n },\n removeEventListener: () => {\n },\n addListener: () => {\n },\n removeListener: () => {\n },\n dispatchEvent: () => false\n };\n },\n innerHeight: 0,\n innerWidth: 0,\n SVGSVGElement: {},\n open: function(_url, _target, _features) {\n }\n};\nvar safeWindow = typeof window === \"undefined\" ? mockWindow : window;\n\n// ../../library/src/core/Time.ts\nvar _raf = (f) => {\n setTimeout(f, 1 / 60);\n};\nvar __raf = /* @__PURE__ */ (() => safeWindow[\"requestAnimationFrame\"] || _raf)();\nvar raf = (f) => __raf(f);\n\n// ../../library/src/core/Loop.ts\nvar LoopTimeStep = /* @__PURE__ */ (() => 1 / 60)();\nvar Loop = class extends EventEmitter {\n /**\n * @internal\n */\n constructor(start = false) {\n super();\n __publicField(this, \"_started\", false);\n __publicField(this, \"_frame\", 0);\n __publicField(this, \"_frameTasks\", []);\n /**\n * @internal\n */\n __publicField(this, \"tick\", () => {\n if (!this._started)\n return;\n raf(this.tick);\n this.emit(\"update\", this._frame, LoopTimeStep);\n this.emit(\"render\", this._frame, LoopTimeStep);\n this._processFrameTasks();\n this._frame++;\n });\n if (start) {\n this.start();\n }\n }\n /**\n * To add a task to be done at the end of a frame.\n * Tasks added from a task will be ignored. These will run after loop events have been processed.\n * @internal\n */\n addFrameTask(task) {\n this._frameTasks.push(task);\n }\n _processFrameTasks() {\n var _a;\n const postEventTasks = this._frameTasks;\n const length = postEventTasks.length;\n if (length === 0)\n return;\n for (let i = 0; i < length; i++) {\n (_a = postEventTasks[i]) == null ? void 0 : _a.call(postEventTasks);\n }\n postEventTasks.length = 0;\n }\n /**\n * @internal\n */\n static set TimeStep(value) {\n LoopTimeStep = value;\n }\n /**\n * @internal\n */\n static get TimeStep() {\n return LoopTimeStep;\n }\n /**\n * @internal\n */\n start() {\n if (this._started)\n return this;\n this._frame = 0;\n this._started = true;\n raf(this.tick);\n return this;\n }\n /**\n * @internal\n * @deprecated Don\u2019t use `stop` as you could be stopping the MainLoop for others.\n */\n stop() {\n this._started = false;\n return this;\n }\n /**\n * @internal\n */\n get frame() {\n return this._frame;\n }\n /**\n * @internal\n */\n get time() {\n return this._frame * LoopTimeStep;\n }\n};\nvar MainLoop = /* @__PURE__ */ new Loop();\n\n// ../../library/src/render/types/RenderEnvironment.ts\nvar RenderEnvironment = {\n target: \"PREVIEW\" /* preview */,\n zoom: 1\n};\nfunction executeInRenderEnvironment(customEnvironment, task) {\n const previousEnvironment = Object.assign({}, RenderEnvironment);\n Object.assign(RenderEnvironment, customEnvironment);\n const result = task();\n Object.assign(RenderEnvironment, previousEnvironment);\n return result;\n}\nfunction setGlobalRenderEnvironment(environment2) {\n Object.assign(RenderEnvironment, environment2);\n}\nfunction useRenderEnvironment(target, zoom) {\n let willChangeElements = false;\n if (RenderEnvironment.target !== target) {\n RenderEnvironment.target = target;\n willChangeElements = true;\n }\n if (RenderEnvironment.zoom !== zoom) {\n RenderEnvironment.zoom = zoom;\n }\n return { willChangeElements };\n}\nvar RenderTarget = {\n /**\n * The component is to be rendered for the Framer canvas.\n *\n * @remarks\n * ```jsx\n * function App() {\n * if (RenderTarget.current() === RenderTarget.canvas) {\n * return \n * }\n * return \n * }\n * ```\n */\n canvas: \"CANVAS\" /* canvas */,\n /**\n * The component is to be rendered for export.\n *\n * @remarks\n * ```jsx\n * function App() {\n * if (RenderTarget.current() === RenderTarget.export) {\n * return \n * }\n * return \n * }\n * ```\n */\n export: \"EXPORT\" /* export */,\n /**\n * The component is to be rendered as a preview thumbnail, for example in the\n * component panel.\n *\n * @remarks\n * ```jsx\n * function App() {\n * if (RenderTarget.current() === RenderTarget.thumbnail) {\n * return \n * }\n * return \n * }\n * ```\n */\n thumbnail: \"THUMBNAIL\" /* thumbnail */,\n /**\n * The component is being rendered in the preview window.\n *\n * @remarks\n * ```jsx\n * function App() {\n * React.useEffect(() => {\n * if (RenderTarget.current() === RenderTarget.preview) {\n * // Do something in preview.\n * }\n * })\n * return \n * }\n * ```\n */\n preview: \"PREVIEW\" /* preview */,\n /**\n * Returns the current `RenderTarget` allowing components to apply\n * different behaviors depending on the environment.\n *\n * @remarks\n * ```jsx\n * function App() {\n * if (RenderTarget.current() === RenderTarget.thumbnail) {\n * return \n * }\n * return ...\n * }\n * ```\n */\n current: () => RenderEnvironment.target,\n /**\n * Returns true if the current `RenderTarget` has performance restrictions.\n * Use this to avoid doing heavy work in these contexts because they may\n * bail on the rendering if the component takes too long.\n *\n * @remarks\n * ```jsx\n * function App() {\n * if (RenderTarget.hasRestrictions()) {\n * return \n * }\n * return \n * }\n * ```\n */\n hasRestrictions: () => {\n const target = RenderEnvironment.target;\n if (target === \"CANVAS\" /* canvas */)\n return true;\n if (target === \"EXPORT\" /* export */)\n return true;\n return false;\n }\n};\n\n// ../../library/src/animation/Drivers/AnimationDriver.ts\nvar AnimationDriver = class {\n constructor(animator, updateCallback, finishedCallback) {\n this.animator = animator;\n this.updateCallback = updateCallback;\n this.finishedCallback = finishedCallback;\n __publicField(this, \"update\", (frame2, elapsed) => {\n if (this.animator.isFinished()) {\n this.finish();\n } else {\n const value = this.animator.next(elapsed);\n this.updateCallback(value);\n }\n });\n if (!this.animator.isReady()) {\n console.warn(\"AnimationDriver initialized with animator that isn't ready\");\n }\n }\n finish() {\n if (this.finishedCallback) {\n this.finishedCallback(this.animator.isFinished());\n }\n }\n isFinished() {\n return this.animator.isFinished();\n }\n};\n\n// ../../library/src/animation/Drivers/MainLoopDriver.ts\nvar MainLoopAnimationDriver = class extends AnimationDriver {\n play() {\n if (RenderEnvironment.target !== RenderTarget.preview) {\n this.finishedCallback && this.finishedCallback(false);\n return;\n }\n MainLoop.on(\"update\", this.update);\n }\n cancel() {\n MainLoop.off(\"update\", this.update);\n }\n finish() {\n MainLoop.off(\"update\", this.update);\n super.finish();\n }\n};\n\n// ../../library/src/animation/FramerAnimation.ts\nvar DefaultDeprecatedAnimationOptions = {\n precalculate: false,\n colorModel: \"husl\" /* HUSL */\n};\nvar FramerAnimation = class {\n /**\n * @internal\n */\n constructor(target, from, to, animatorClass, options, driverClass = MainLoopAnimationDriver) {\n /**\n * @internal\n */\n __publicField(this, \"driver\");\n /**\n * @internal\n */\n __publicField(this, \"playStateSource\", \"idle\");\n /**\n * @internal\n */\n __publicField(this, \"onfinish\");\n /**\n * @internal\n */\n __publicField(this, \"oncancel\");\n /**\n * @internal\n */\n __publicField(this, \"readyPromise\", Promise.resolve());\n /**\n * @internal\n */\n __publicField(this, \"readyResolve\");\n /**\n * @internal\n */\n __publicField(this, \"finishedPromise\");\n /**\n * @internal\n */\n __publicField(this, \"finishedResolve\");\n /**\n * @internal\n */\n __publicField(this, \"finishedReject\");\n this.resetFinishedPromise();\n const deprecatedAnimationOptions = { ...DefaultDeprecatedAnimationOptions };\n const animatorOptions = {};\n if (options) {\n Object.assign(deprecatedAnimationOptions, options);\n Object.assign(animatorOptions, options);\n }\n let interpolation;\n if (deprecatedAnimationOptions.customInterpolation) {\n interpolation = deprecatedAnimationOptions.customInterpolation;\n } else {\n interpolation = new ValueInterpolation(options);\n }\n let animator;\n if (!animatorClass) {\n animator = new BezierAnimator({}, interpolation);\n } else {\n animator = new animatorClass(animatorOptions, interpolation);\n }\n if (deprecatedAnimationOptions.precalculate) {\n animator = new PrecalculatedAnimator({ animator });\n }\n animator.setFrom(from);\n animator.setTo(to);\n const updateCallback = (value) => {\n FramerAnimation.driverCallbackHandler(target, value);\n };\n const finishedCallback = (isFinished) => {\n if (isFinished) {\n FramerAnimation.driverCallbackHandler(target, to);\n if (this.playStateSource === \"running\") {\n this.playStateValue = \"finished\";\n }\n }\n };\n this.driver = new driverClass(animator, updateCallback, finishedCallback);\n }\n /**\n * @internal\n */\n static driverCallbackHandler(target, value) {\n if (isAnimatable(target) || isMotionValue2(target)) {\n target.set(value);\n } else {\n const targetObject = target;\n Animatable.transaction((update) => {\n for (const key7 in targetObject) {\n const targetValue = targetObject[key7];\n if (isAnimatable(targetValue)) {\n update(targetValue, value[key7]);\n } else {\n targetObject[key7] = value[key7];\n }\n }\n });\n }\n }\n /**\n * @internal\n */\n get playStateValue() {\n return this.playStateSource;\n }\n /**\n * @internal\n */\n set playStateValue(value) {\n if (value !== this.playStateSource) {\n const oldValue = value;\n this.playStateSource = value;\n switch (value) {\n case \"idle\":\n if (oldValue === \"running\") {\n this.oncancel && this.oncancel();\n }\n this.readyResolve && this.readyResolve();\n this.resetReadyPromise();\n break;\n case \"finished\":\n if (oldValue === \"idle\") {\n console.warn(\"Bad state transition\");\n break;\n }\n this.onfinish && this.onfinish();\n this.finishedResolve && this.finishedResolve();\n break;\n case \"running\":\n this.resetReadyPromise();\n break;\n }\n if (oldValue === \"finished\") {\n this.resetFinishedPromise();\n }\n if (value === \"finished\") {\n this.playStateValue = \"idle\";\n }\n }\n }\n /**\n * @internal\n */\n get playState() {\n return this.playStateValue;\n }\n /**\n * @internal\n */\n resetReadyPromise() {\n this.readyResolve = null;\n this.readyPromise = new Promise((resolve, reject) => {\n this.readyResolve = resolve;\n });\n }\n /**\n * Wait for the animation to be ready to play.\n * @remarks\n * ```jsx\n * const animation = animate.ease(value, 100)\n * animation.ready().then(() => {\n * // Animation is ready\n * })\n \n * // async/await syntax\n * const animation = animate.ease(value, 100)\n * await animation.ready()\n * // Animation is ready\n * ```\n * @returns Promise that is resolved when the animation is ready to play\n * @public\n */\n get ready() {\n return this.readyPromise;\n }\n /**\n * @internal\n */\n resetFinishedPromise() {\n this.finishedResolve = null;\n this.finishedReject = null;\n this.finishedPromise = new Promise((resolve, reject) => {\n this.finishedResolve = resolve;\n this.finishedReject = reject;\n });\n this.finishedPromise.catch((reason) => {\n });\n }\n /**\n * Wait for the animation to be finished.\n * @remarks\n * ```jsx\n * // async/await syntax\n * const animation = animate.ease(value, 100)\n * await animation.finished()\n * // Animation is finished\n *\n *\n * const animation = animate.ease(value, 100)\n * animation.ready().then(() => {\n * // Animation is finished\n * })\n * ```\n * @returns Promise that is resolved when the animation is ready to play\n * @public\n */\n get finished() {\n return this.finishedPromise;\n }\n /**\n * @internal\n */\n play() {\n this.playStateValue = \"running\";\n this.driver.play();\n }\n /**\n * Cancels the animation if it is still running.\n * @remarks\n * ```jsx\n * const animation = animate.ease(value, 100, {duration: 3})\n * setTimeout(() => animation.cancel(), 500)\n * ```\n * @public\n */\n cancel() {\n if (this.playStateValue !== \"running\") {\n return;\n }\n this.driver.cancel();\n if (this.playState !== \"idle\") {\n const reason = \"AbortError\";\n this.finishedReject && this.finishedReject(reason);\n }\n this.playStateValue = \"idle\";\n }\n /**\n * @internal\n */\n finish() {\n if (this.playStateSource === \"running\") {\n this.playStateValue = \"finished\";\n this.driver.finish();\n }\n }\n /**\n * @internal\n */\n isFinished() {\n return this.playStateValue === \"finished\";\n }\n};\n\n// ../../library/src/animation/Motion/autoValueHandlers.ts\nvar correctBorderScale = (axis) => ({\n correct: (latest, { delta, treeScale }) => {\n if (typeof latest === \"string\")\n latest = parseFloat(latest);\n if (latest === 0)\n return \"0px\";\n let corrected = latest;\n if (delta && treeScale) {\n corrected = Math.round(latest / delta[axis].scale / treeScale[axis]);\n corrected = Math.max(corrected, 1);\n }\n return corrected + \"px\";\n }\n});\n\n// ../../library/src/animation/Motion/MotionSetup.tsx\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\naddScaleCorrector({\n borderTopWidth: correctBorderScale(\"y\"),\n borderLeftWidth: correctBorderScale(\"x\"),\n borderRightWidth: correctBorderScale(\"x\"),\n borderBottomWidth: correctBorderScale(\"y\")\n});\nfunction MotionSetup({ children }) {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n}\n\n// ../../library/src/animation/Motion/startAnimation.ts\nfunction startAnimation(_key, value, target, transition = {}) {\n warnOnce(\n `\"startAnimation\" is unsupported. Use \"animate\" instead: https://www.framer.com/api/motion/utilities/#animate`\n );\n return new Promise((resolve) => {\n animate(value, target, {\n ...transition,\n onComplete: () => resolve()\n });\n });\n}\n\n// ../../library/src/animation/animate.ts\nfunction deprecatedAnimate(from, to, animator, options) {\n deprecationWarning(\"animate()\", \"2.0.0\", \"the new animation API (https://www.framer.com/api/animation/)\");\n const target = from;\n let fromValue;\n if (isAnimatable(from) || isMotionValue2(from)) {\n fromValue = from.get();\n } else {\n fromValue = Animatable.objectToValues(from);\n }\n const animation = new FramerAnimation(target, fromValue, to, animator, options);\n animation.play();\n return animation;\n}\nvar animate2 = /* @__PURE__ */ (() => {\n function animate3(from, to, animatorOrTransition, options) {\n return isAnimatable(from) ? deprecatedAnimate(from, to, animatorOrTransition, options) : animate(from, to, animatorOrTransition);\n }\n animate3.spring = (from, to, options) => {\n return animate3(from, to, SpringAnimator, options);\n };\n animate3.bezier = (from, to, options) => {\n return animate3(from, to, BezierAnimator, options);\n };\n animate3.linear = (from, to, options) => {\n return animate3.bezier(from, to, { ...options, curve: \"linear\" /* Linear */ });\n };\n animate3.ease = (from, to, options) => {\n return animate3.bezier(from, to, { ...options, curve: \"ease\" /* Ease */ });\n };\n animate3.easeIn = (from, to, options) => {\n return animate3.bezier(from, to, { ...options, curve: \"ease-in\" /* EaseIn */ });\n };\n animate3.easeOut = (from, to, options) => {\n return animate3.bezier(from, to, { ...options, curve: \"ease-out\" /* EaseOut */ });\n };\n animate3.easeInOut = (from, to, options) => {\n return animate3.bezier(from, to, { ...options, curve: \"ease-in-out\" /* EaseInOut */ });\n };\n return animate3;\n})();\n\n// ../../library/src/components/AnimateLayout/LayoutIdContext.tsx\nimport React12, { useCallback as useCallback5, useContext as useContext2, useMemo as useMemo2, useRef as useRef6 } from \"react\";\n\n// ../../library/src/utils/assert.ts\nfunction assert(condition, ...msg) {\n var _a, _b;\n if (condition)\n return;\n const e = Error(\"Assertion Error\" + (msg.length > 0 ? \": \" + msg.join(\" \") : \"\"));\n if (e.stack) {\n try {\n const lines = e.stack.split(\"\\n\");\n if ((_a = lines[1]) == null ? void 0 : _a.includes(\"assert\")) {\n lines.splice(1, 1);\n e.stack = lines.join(\"\\n\");\n } else if ((_b = lines[0]) == null ? void 0 : _b.includes(\"assert\")) {\n lines.splice(0, 1);\n e.stack = lines.join(\"\\n\");\n }\n } catch {\n }\n }\n throw e;\n}\nfunction assertNever(x, error) {\n throw error || new Error(x ? `Unexpected value: ${x}` : \"Application entered invalid state\");\n}\n\n// ../../library/src/components/AnimateLayout/LayoutIdContext.tsx\nimport { Fragment as Fragment3, jsx as jsx2 } from \"react/jsx-runtime\";\nvar LayoutIdContext = /* @__PURE__ */ React12.createContext({\n getLayoutId: (args) => null,\n persistLayoutIdCache: () => {\n },\n top: false,\n enabled: true\n});\nfunction LayoutIdProvider({ children }) {\n const context = useContext2(LayoutIdContext);\n if (context.top)\n return /* @__PURE__ */ jsx2(Fragment3, { children });\n const cache2 = useRef6({\n // When we provide a layoutId for a node based on it's first\n // duplicatedFrom id, we save it's layoutId mapped to it's actual id.\n // Future screen's nodes will check this cache first, to see if they've\n // previously been assigned a layoutId, or if any of there other\n // duplicatedFrom ids matched a node that was previously assigned a\n // layoutId.\n byId: {},\n byName: {},\n // When we navigate from screens that were duplicated from a future\n // screen, to that future screen, we want to do a reverse lookup on the\n // last duplicatedFrom id, rather than the id. We need to keep them\n // separate so they don't overlap.\n byLastId: {},\n byPossibleId: {},\n byLastName: {},\n byLayoutId: {},\n // When we don't have a cached layoutId for all duplicatedFrom ids, we\n // need to increment and save it so that we don't create clashing\n // layoutIds. We also need to reset name counts between screens, so we\n // record those separately.\n count: {\n byId: {},\n byName: {}\n }\n });\n const screen = useRef6({\n byId: {},\n byName: {},\n byLastId: {},\n byPossibleId: {},\n byLastName: {},\n byLayoutId: {}\n });\n const usedIds = useRef6(/* @__PURE__ */ new Set()).current;\n const getLayoutId = useCallback5(({ id, name, duplicatedFrom }) => {\n if (!id)\n return null;\n const cacheKey = name ? \"byName\" : \"byId\";\n const previousId = cache2.current[cacheKey][id];\n if (previousId)\n return previousId;\n const nodeIdentifier = name || id;\n if (!duplicatedFrom && !usedIds.has(nodeIdentifier) && (!cache2.current.byLayoutId[nodeIdentifier] || cache2.current.byLayoutId[nodeIdentifier] === nodeIdentifier)) {\n if (cache2.current.count[cacheKey][nodeIdentifier] === void 0) {\n cache2.current.count[cacheKey][nodeIdentifier] = 0;\n cache2.current.byLayoutId[nodeIdentifier] = nodeIdentifier;\n screen.current[cacheKey][id] = nodeIdentifier;\n }\n usedIds.add(nodeIdentifier);\n return nodeIdentifier;\n }\n let possibleMatch = void 0;\n if (duplicatedFrom == null ? void 0 : duplicatedFrom.length) {\n for (let index = duplicatedFrom.length - 1; index >= 0; index--) {\n const duplicatedId = duplicatedFrom[index];\n assert(!!duplicatedId, `duplicatedId must be defined`);\n const match = cache2.current[cacheKey][duplicatedId];\n const byLastIdMatch = cache2.current.byLastId[duplicatedId];\n if (byLastIdMatch && !possibleMatch) {\n const matchedLayoutId = cache2.current.byLayoutId[byLastIdMatch];\n const shouldUseNamedLastIdMatch = !matchedLayoutId || matchedLayoutId === name;\n if (byLastIdMatch && !usedIds.has(byLastIdMatch) && (name ? shouldUseNamedLastIdMatch : true)) {\n possibleMatch = [byLastIdMatch, duplicatedId];\n }\n }\n const previousLayoutId = match ? cache2.current.byLayoutId[match] : void 0;\n const shouldUseNamedMatch = !previousLayoutId || previousLayoutId === name;\n if (match && !usedIds.has(match) && (name ? shouldUseNamedMatch : true)) {\n screen.current[cacheKey][id] = match;\n screen.current.byLastId[duplicatedId] = match;\n usedIds.add(match);\n return match;\n }\n }\n }\n const last = cache2.current.byLastId[id];\n if (last && !usedIds.has(last)) {\n usedIds.add(last);\n screen.current.byId[id] = last;\n return last;\n }\n if (possibleMatch) {\n const [match, duplicatedId] = possibleMatch;\n screen.current[cacheKey][id] = match;\n screen.current.byLastId[duplicatedId] = match;\n usedIds.add(match);\n return match;\n }\n const possible = cache2.current.byPossibleId[id];\n if (possible && !usedIds.has(possible)) {\n usedIds.add(possible);\n screen.current.byId[id] = possible;\n return possible;\n }\n const rootDuplicatedId = duplicatedFrom == null ? void 0 : duplicatedFrom[0];\n const identifier = name || rootDuplicatedId || id;\n const value = (cache2.current.count[cacheKey][identifier] ?? -1) + 1;\n const { layoutId, value: nextValue } = nextLayoutId(identifier, value, usedIds);\n cache2.current.count[cacheKey][identifier] = nextValue;\n screen.current[cacheKey][id] = layoutId;\n if (duplicatedFrom == null ? void 0 : duplicatedFrom.length) {\n if (!name) {\n const lastId = duplicatedFrom[duplicatedFrom.length - 1];\n if (lastId) {\n screen.current.byLastId[lastId] = layoutId;\n }\n if (duplicatedFrom.length > 1) {\n for (let index = 0; index < duplicatedFrom.length - 1; index++) {\n const possibleId = duplicatedFrom[index];\n if (possibleId === void 0)\n continue;\n if (!screen.current.byPossibleId[possibleId]) {\n screen.current.byPossibleId[possibleId] = layoutId;\n }\n }\n }\n }\n }\n screen.current.byLayoutId[layoutId] = nodeIdentifier;\n usedIds.add(layoutId);\n return layoutId;\n }, []);\n const persistLayoutIdCache = useCallback5(() => {\n cache2.current = {\n byId: {\n ...cache2.current.byId,\n ...screen.current.byId\n },\n byLastId: {\n ...cache2.current.byLastId,\n ...screen.current.byLastId\n },\n byPossibleId: {\n ...cache2.current.byPossibleId,\n ...screen.current.byPossibleId\n },\n byName: {\n ...cache2.current.byName,\n ...screen.current.byName\n },\n byLastName: { ...cache2.current.byLastName, ...screen.current.byLastName },\n byLayoutId: { ...cache2.current.byLayoutId, ...screen.current.byLayoutId },\n // Unlike the count.byId, we need to reset the count.byName because\n // named layers might not have duplicatedFrom ids (e.g. imported\n // from Figma). When we can use duplicatedFrom ids to check if an id\n // was assigned on a previous screen, we don't increment the count,\n // which means that the count only increments for new items, and\n // only increments on a new screen if the node is new. Since named\n // layers need to always match in some way between screens, we reset\n // the count so that the second named layer on a second screen is\n // always name-1 if it doesn't have any duplicatedFrom ids.\n count: {\n ...cache2.current.count,\n byName: {}\n }\n };\n screen.current = {\n byId: {},\n byName: {},\n byLastId: {},\n byPossibleId: {},\n byLastName: {},\n byLayoutId: {}\n };\n usedIds.clear();\n }, []);\n const contextValue = useRef6({\n getLayoutId,\n persistLayoutIdCache,\n top: true,\n enabled: true\n }).current;\n return /* @__PURE__ */ jsx2(LayoutIdContext.Provider, { value: contextValue, children });\n}\nfunction nextLayoutId(identifier, initialValue, usedIds) {\n let value = initialValue;\n let layoutId = value ? `${identifier}-${value}` : identifier;\n while (usedIds.has(layoutId)) {\n value++;\n layoutId = `${identifier}-${value}`;\n }\n return { layoutId, value };\n}\nfunction AutomaticLayoutIds({ enabled = true, ...props }) {\n const context = useContext2(LayoutIdContext);\n const contextValue = useMemo2(() => {\n return {\n ...context,\n enabled\n };\n }, [enabled]);\n return /* @__PURE__ */ jsx2(LayoutIdContext.Provider, { ...props, value: contextValue });\n}\n\n// ../../library/src/components/Device/Device.tsx\nimport React13, { Component as Component3 } from \"react\";\n\n// ../../library/src/components/utils/useConstant.ts\nimport { useRef as useRef7 } from \"react\";\nfunction useConstant(init) {\n const ref = useRef7(null);\n if (ref.current === null) {\n ref.current = init();\n }\n return ref.current;\n}\n\n// ../../library/src/components/Device/ErrorPlaceholder.tsx\nimport { jsx as jsx3, jsxs } from \"react/jsx-runtime\";\nvar baseStyle = {\n background: void 0,\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"center\",\n alignItems: \"center\",\n lineHeight: \"1.4em\",\n textOverflow: \"ellipsis\",\n overflow: \"hidden\",\n minHeight: 0,\n width: \"100%\",\n height: \"100%\"\n};\nvar errorStyle = /* @__PURE__ */ (() => ({\n ...baseStyle,\n border: \"1px solid rgba(149, 149, 149, 0.15)\",\n borderRadius: 6,\n fontSize: \"12px\",\n backgroundColor: \"rgba(149, 149, 149, 0.1)\",\n color: \"#a5a5a5\"\n}))();\nvar textStyle = {\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n textOverflow: \"ellipsis\",\n maxWidth: \"100%\",\n flexShrink: 0,\n padding: `0 10px`\n};\nvar titleStyle = /* @__PURE__ */ (() => ({\n ...textStyle,\n // TODO: Use Fresco tokens for this.\n fontWeight: 500\n}))();\nvar messageStyle = /* @__PURE__ */ (() => ({\n ...textStyle,\n whiteSpace: \"pre\",\n maxHeight: \"calc(50% - calc(20px * var(--framerInternalCanvas-canvasPlaceholderContentScaleFactor, 1)))\",\n WebkitMaskImage: \"linear-gradient(to bottom, black 80%, transparent 100%)\"\n}))();\nfunction ErrorPlaceholder(props) {\n const { error, file } = props;\n const title = file ? `Error in ${stripSlash(file)}` : \"Error\";\n const message = error instanceof Error ? error.message : \"\" + error;\n return /* @__PURE__ */ jsxs(\"div\", { style: errorStyle, children: [\n /* @__PURE__ */ jsx3(\"div\", { className: \"text\", style: titleStyle, children: title }),\n message && /* @__PURE__ */ jsx3(\"div\", { className: \"text\", style: messageStyle, children: message })\n ] });\n}\nfunction stripSlash(title) {\n if (title.startsWith(\"./\")) {\n return title.replace(\"./\", \"\");\n }\n return title;\n}\n\n// ../../library/src/components/Device/Device.tsx\nimport { jsx as jsx4, jsxs as jsxs2 } from \"react/jsx-runtime\";\nfunction getScaleData(deviceOptions, containerSize) {\n const { componentWidth, componentHeight } = getComponentSize(deviceOptions);\n const scaleX = containerSize.width / componentWidth;\n const scaleY = containerSize.height / componentHeight;\n const scale = Math.min(scaleX, scaleY, 1);\n let screenScalePixelFix = 1;\n if (scale < 1) {\n const actualScreenWidth = deviceOptions.screenWidth * scale;\n const desiredScreenWidth = actualScreenWidth + 1;\n const screenScaleX = desiredScreenWidth / actualScreenWidth;\n const actualScreenHeight = deviceOptions.screenHeight * scale;\n const desiredScreenHeight = actualScreenHeight + 1;\n const screenScaleY = desiredScreenHeight / actualScreenHeight;\n const screenScale = Math.max(screenScaleX, screenScaleY);\n screenScalePixelFix = screenScale;\n }\n return {\n scale,\n screenScalePixelFix,\n scaledComponentWidth: componentWidth * scale,\n scaledComponentHeight: componentHeight * scale,\n scaledDeviceWidth: deviceOptions.deviceWidth * scale,\n scaledDeviceHeight: deviceOptions.deviceHeight * scale\n };\n}\nfunction getColorsFromTheme(theme, type) {\n if (type === \"none\")\n return {};\n if (!theme)\n return {};\n const isDarkTheme = theme === \"dark\";\n return {\n shadowColor: isDarkTheme ? \"rgba(0, 0, 0, 0.55)\" : \"rgba(0, 0, 0, 0.15)\",\n bezelColor: isDarkTheme ? \"#222\" : \"#fff\",\n bezelShadeColor: isDarkTheme ? \"#000\" : \"rgba(0, 0, 0, 0.2)\",\n screenColor: isDarkTheme ? \"#333\" : \"#eee\"\n };\n}\nvar ErrorBoundary2 = class extends Component3 {\n constructor() {\n super(...arguments);\n __publicField(this, \"state\", {});\n }\n componentDidCatch(error, info) {\n var _a;\n let stack = (_a = info.componentStack) == null ? void 0 : _a.split(\"\\n\").filter((line) => line.length !== 0);\n let currentIndex = 0;\n if (stack) {\n for (const line of stack) {\n if (line.startsWith(` in ${this.constructor.name}`)) {\n break;\n }\n currentIndex++;\n }\n stack = stack.slice(0, currentIndex);\n }\n this.setState({\n lastError: {\n error,\n componentStack: stack\n }\n });\n }\n componentDidUpdate(_, prevState) {\n if (this.state.lastError === void 0)\n return;\n if (prevState.lastError === this.state.lastError)\n this.setState({ lastError: void 0 });\n }\n render() {\n if (this.state.lastError) {\n return /* @__PURE__ */ jsx4(ErrorPlaceholder, { error: this.state.lastError.error.message, file: \"Prototype\" });\n }\n return this.props.children;\n }\n};\nfunction Device({\n canResize = false,\n children,\n ResizeObserver = safeWindow.ResizeObserver,\n ...options\n}) {\n var _a, _b;\n const optionsRef = React13.useRef(void 0);\n if (optionsRef.current === void 0)\n optionsRef.current = options;\n const deviceAppearance = (_a = options.deviceOptions) == null ? void 0 : _a.appearance.type;\n const scaleDataRef = React13.useRef();\n const containerRef = React13.useRef(null);\n const deviceRef = React13.useRef(null);\n const screenRef = React13.useRef(null);\n const updateImperativeScale = ({ scale, screenScalePixelFix }) => {\n if (!scaleDataRef.current || !deviceRef.current || !screenRef.current)\n return;\n deviceRef.current.style.transform = `scale(${scale})`;\n screenRef.current.style.transform = `scale(${screenScalePixelFix})`;\n };\n if (scaleDataRef.current === void 0 && options.deviceOptions && options.scaleTo && options.scaleTo !== \"dynamic\") {\n const scale = scaleDataRef.current = getScaleData(options.deviceOptions, options.scaleTo);\n updateImperativeScale(scale);\n }\n const invertScale = React13.useCallback(\n (point) => {\n if (!scaleDataRef.current)\n return point;\n const { scale = 1 } = scaleDataRef.current;\n return { x: point.x / scale, y: point.y / scale };\n },\n [scaleDataRef]\n );\n const updateScale = React13.useCallback(() => {\n const { deviceOptions, scaleTo, onScaleChange } = optionsRef.current ?? {};\n if (!deviceOptions || !scaleTo || scaleTo !== \"dynamic\" || !containerRef.current)\n return;\n if (containerRef.current.offsetWidth === 0 || containerRef.current.offsetHeight === 0)\n return;\n const scaleData = scaleDataRef.current = getScaleData(deviceOptions, {\n width: containerRef.current.offsetWidth,\n height: containerRef.current.offsetHeight\n });\n onScaleChange == null ? void 0 : onScaleChange(scaleData);\n updateImperativeScale(scaleData);\n }, []);\n const observer = useConstant(() => {\n if (!ResizeObserver) {\n return;\n }\n return new ResizeObserver(() => updateScale());\n });\n React13.useLayoutEffect(() => {\n optionsRef.current = {\n deviceOptions: options.deviceOptions,\n onScaleChange: options.onScaleChange,\n overrideTheme: options.overrideTheme,\n scaleTo: options.scaleTo\n };\n }, [options.deviceOptions, options.onScaleChange, options.overrideTheme, options.scaleTo]);\n React13.useLayoutEffect(() => {\n updateScale();\n }, [updateScale]);\n React13.useEffect(() => {\n if (!observer || !containerRef.current)\n return;\n observer.observe(containerRef.current);\n return () => observer.disconnect();\n }, [observer]);\n const { containerStyle, handStyle, deviceStyle, deviceImageStyle, screenStyle } = getDeviceStyle(options);\n const resizeStyles = canResize ? {\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n height: \"100%\"\n } : {};\n const screenBackground = ((_b = options.deviceOptions) == null ? void 0 : _b.transparentBackground) ? \"transparent\" : \"white\";\n return /* @__PURE__ */ jsx4(\"div\", { style: { ...containerStyle, ...resizeStyles }, ref: containerRef, children: /* @__PURE__ */ jsxs2(\"div\", { style: { ...deviceStyle }, ref: deviceRef, children: [\n handStyle && /* @__PURE__ */ jsx4(\"div\", { style: handStyle }),\n deviceAppearance === \"external-clay\" && deviceImageStyle && /* @__PURE__ */ jsx4(\"div\", { style: deviceImageStyle }),\n /* @__PURE__ */ jsx4(\n \"div\",\n {\n style: {\n ...screenStyle,\n pointerEvents: void 0,\n backgroundColor: children ? screenBackground : screenStyle.backgroundColor\n },\n ref: screenRef,\n children: /* @__PURE__ */ jsx4(MotionConfig, { transformPagePoint: invertScale, children: /* @__PURE__ */ jsx4(ErrorBoundary2, { children }) })\n }\n ),\n deviceAppearance === \"realistic\" && deviceImageStyle && /* @__PURE__ */ jsx4(\"div\", { style: deviceImageStyle })\n ] }) });\n}\nvar DEVICE_PADDING = 45;\nvar HAND_IMG_WIDTH = 2400;\nvar HAND_IMG_HEIGHT = 3740;\nvar HAND_IMG_GAP_WIDTH = 859;\nvar HAND_IMG_GAP_LEFT = 772;\nvar HAND_IMG_GAP_BOTTOM = /* @__PURE__ */ (() => 992 - 5)();\nvar noDeviceSize = { componentWidth: 500, componentHeight: 500 };\nfunction getComponentSize(options) {\n if (!options)\n return noDeviceSize;\n const { deviceWidth, deviceHeight, noPadding } = options;\n const padding = noPadding ? 0 : DEVICE_PADDING * 2;\n return {\n componentWidth: deviceWidth + padding,\n componentHeight: deviceHeight + padding\n };\n}\nfunction getDeviceStyle({ scaleTo, deviceOptions, overrideTheme } = {}) {\n const noDeviceStyle = { containerStyle: {}, deviceStyle: {}, screenStyle: {} };\n if (!deviceOptions)\n return noDeviceStyle;\n const { componentWidth, componentHeight } = getComponentSize(deviceOptions);\n const overriddenColors = getColorsFromTheme(overrideTheme, deviceOptions.appearance.type);\n const {\n deviceWidth,\n deviceHeight,\n appearance,\n screenWidth,\n screenHeight,\n screenMaxHeight,\n screenOffsetTop,\n screenOffsetLeft,\n screenRadius,\n screenMaskImage,\n screenColor,\n shadow,\n background,\n hand\n } = deviceOptions;\n const boxShadows = [];\n if (appearance.type === \"clay\" && shadow) {\n boxShadows.push(shadow);\n }\n let bezelStyle = void 0;\n if (appearance.type === \"clay\") {\n bezelStyle = {\n borderRadius: appearance.bezelRadius,\n backgroundColor: overriddenColors.bezelColor || appearance.bezelColor\n };\n if (overriddenColors.bezelShadeColor || appearance.bezelShadeColor) {\n boxShadows.push(`inset 0 0 15px ${overriddenColors.bezelShadeColor || appearance.bezelShadeColor}`);\n }\n }\n const handOffsetLeft = (hand == null ? void 0 : hand.offsetLeft) ?? 0;\n const handOffsetRight = (hand == null ? void 0 : hand.offsetRight) ?? 0;\n const handOffsetBottom = (hand == null ? void 0 : hand.offsetBottom) ?? 0;\n const handScale = (deviceWidth - handOffsetLeft - handOffsetRight) / HAND_IMG_GAP_WIDTH;\n return {\n containerStyle: {\n width: scaleTo ? \"100%\" : componentWidth,\n height: scaleTo ? \"100%\" : componentHeight,\n flex: \"1 1 0\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n background\n },\n handStyle: hand && {\n width: HAND_IMG_WIDTH * handScale,\n height: HAND_IMG_HEIGHT * handScale,\n position: \"absolute\",\n pointerEvents: \"none\",\n backgroundImage: `url(\"${hand.imageUrl}\")`,\n backgroundSize: \"contain\",\n backgroundRepeat: \"no-repeat\",\n left: -HAND_IMG_GAP_LEFT * handScale + handOffsetLeft,\n bottom: -HAND_IMG_GAP_BOTTOM * handScale + handOffsetBottom\n },\n deviceStyle: {\n width: deviceWidth,\n height: deviceHeight,\n flexShrink: 0,\n position: \"absolute\",\n boxShadow: boxShadows.join(\",\"),\n ...bezelStyle\n },\n deviceImageStyle: appearance.type === \"realistic\" || appearance.type === \"external-clay\" ? {\n width: appearance.imageWidth,\n height: appearance.imageHeight,\n position: \"absolute\",\n pointerEvents: \"none\",\n overflow: \"hidden\",\n backgroundImage: `url(\"${appearance.imageUrl}\")`,\n backgroundPosition: \"top left\",\n backgroundRepeat: \"no-repeat\",\n backgroundSize: `${appearance.imageWidth}px ${appearance.imageHeight}px`,\n // Rotate 90 degrees counter-clockwise around (0,0), then move the\n // result down into the viewport (rightmost transform is applied first).\n transformOrigin: \"top left\",\n transform: appearance.rotateImage ? `translateY(${appearance.imageWidth}px) rotate(-90deg)` : void 0\n } : void 0,\n screenStyle: {\n width: screenWidth,\n height: screenHeight,\n maxHeight: screenMaxHeight,\n position: \"absolute\",\n top: screenOffsetTop,\n left: screenOffsetLeft,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n borderRadius: screenRadius,\n backgroundColor: overriddenColors.screenColor || screenColor,\n ...screenMaskImage && {\n maskImage: screenMaskImage,\n WebkitMaskImage: screenMaskImage,\n maskSize: \"contain\",\n WebkitMaskSize: \"contain\"\n }\n }\n };\n}\n\n// ../../library/src/components/Device/DeviceCodeComponent.tsx\nimport React16 from \"react\";\n\n// ../../library/src/render/types/NewConstraints.tsx\nimport React14 from \"react\";\n\n// ../../library/src/render/utils/isFiniteNumber.ts\nfunction isFiniteNumber(value) {\n return typeof value === \"number\" && isFinite(value);\n}\nfunction finiteNumber(value) {\n return isFiniteNumber(value) ? value : void 0;\n}\n\n// ../../library/src/utils/type-guards.ts\nfunction isEmpty(obj) {\n return !obj || !Object.keys(obj).length && obj.constructor === Object;\n}\nfunction isReactElement(test) {\n return typeof test !== \"string\" && typeof test !== \"number\";\n}\nfunction isReactChild(test) {\n return test !== null && typeof test !== \"undefined\" && typeof test !== \"boolean\" && !isEmpty(test);\n}\n\n// ../../library/src/render/utils/degreesToRadians.ts\nfunction degreesToRadians(degrees) {\n return degrees * (Math.PI / 180);\n}\n\n// ../../library/src/render/types/Line.ts\nvar Line = /* @__PURE__ */ (() => {\n function Line2(a, b) {\n return { a, b };\n }\n Line2.offset = (line, offset) => {\n const angle = Point.angleFromX(line.a, line.b);\n const rad = degreesToRadians(angle);\n const x = offset * Math.sin(rad);\n const y = offset * Math.cos(rad);\n return Line2(\n { x: line.a.x + x, y: line.a.y - y },\n {\n x: line.b.x + x,\n y: line.b.y - y\n }\n );\n };\n Line2.intersection = (lineA, lineB, segments) => {\n const x1 = lineA.a.x;\n const y1 = lineA.a.y;\n const x2 = lineA.b.x;\n const y2 = lineA.b.y;\n const x3 = lineB.a.x;\n const y3 = lineB.a.y;\n const x4 = lineB.b.x;\n const y4 = lineB.b.y;\n const a1 = (x4 - x3) * (y3 - y1) - (y4 - y3) * (x3 - x1);\n const b1 = (x4 - x3) * (y2 - y1) - (y4 - y3) * (x2 - x1);\n const c1 = (x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1);\n if (a1 === 0 && b1 === 0)\n return null;\n if (b1 === 0)\n return null;\n const alpha = a1 / b1;\n const beta = c1 / b1;\n if (segments && (alpha < 0 || alpha > 1 || beta < 0 || beta > 1))\n return null;\n return {\n x: x1 + alpha * (x2 - x1),\n y: y1 + alpha * (y2 - y1)\n };\n };\n Line2.intersectionAngle = (lineA, lineB) => {\n const deltaAX = lineA.b.x - lineA.a.x;\n const deltaAY = lineA.b.y - lineA.a.y;\n const deltaBX = lineB.b.x - lineB.a.x;\n const deltaBY = lineB.b.y - lineB.a.y;\n const angle = Math.atan2(deltaAX * deltaBY - deltaAY * deltaBX, deltaAX * deltaBX + deltaAY * deltaBY);\n return angle * (180 / Math.PI);\n };\n Line2.isOrthogonal = (line) => {\n return line.a.x === line.b.x || line.a.y === line.b.y;\n };\n Line2.perpendicular = (line, pointOnLine) => {\n const deltaX = line.a.x - line.b.x;\n const deltaY = line.a.y - line.b.y;\n const pointB = Point(pointOnLine.x - deltaY, pointOnLine.y + deltaX);\n return Line2(pointB, pointOnLine);\n };\n Line2.projectPoint = (line, point) => {\n const perp = Line2.perpendicular(line, point);\n return Line2.intersection(line, perp);\n };\n Line2.pointAtPercentDistance = (line, distance2) => {\n const hypotenuse = Line2.distance(line);\n const r = distance2 * hypotenuse / hypotenuse;\n return {\n x: r * line.b.x + (1 - r) * line.a.x,\n y: r * line.b.y + (1 - r) * line.a.y\n };\n };\n Line2.distance = (line) => {\n return Point.distance(line.a, line.b);\n };\n return Line2;\n})();\n\n// ../../library/src/render/types/Rect.ts\nvar Rect = {\n /**\n *\n * @param rect -\n * @param other -\n * @returns if the input rectangles are equal in size and position\n * @public\n */\n equals: function(rect, other) {\n if (rect === other)\n return true;\n if (!rect || !other)\n return false;\n return rect.x === other.x && rect.y === other.y && rect.width === other.width && rect.height === other.height;\n },\n /** @internal */\n atOrigin: (size) => {\n return { ...size, x: 0, y: 0 };\n },\n /** @internal */\n fromTwoPoints: (a, b) => {\n return {\n x: Math.min(a.x, b.x),\n y: Math.min(a.y, b.y),\n width: Math.abs(a.x - b.x),\n height: Math.abs(a.y - b.y)\n };\n },\n /** @internal */\n fromRect: (rect) => {\n return {\n x: rect.left,\n y: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n },\n /** @internal */\n multiply: (rect, n) => {\n return {\n x: rect.x * n,\n y: rect.y * n,\n width: rect.width * n,\n height: rect.height * n\n };\n },\n /** @internal */\n divide: (rect, n) => {\n return Rect.multiply(rect, 1 / n);\n },\n /** @internal */\n offset: (rect, delta) => {\n const xOffset = typeof delta.x === \"number\" ? delta.x : 0;\n const yOffset = typeof delta.y === \"number\" ? delta.y : 0;\n return {\n ...rect,\n x: rect.x + xOffset,\n y: rect.y + yOffset\n };\n },\n /** @internal */\n inflate: (rect, value) => {\n if (value === 0)\n return rect;\n const doubleValue = 2 * value;\n return {\n x: rect.x - value,\n y: rect.y - value,\n width: rect.width + doubleValue,\n height: rect.height + doubleValue\n };\n },\n /** @internal */\n pixelAligned: (rect) => {\n const x = Math.round(rect.x);\n const y = Math.round(rect.y);\n const rectMaxX = Math.round(rect.x + rect.width);\n const rectMaxY = Math.round(rect.y + rect.height);\n const width = Math.max(rectMaxX - x, 0);\n const height = Math.max(rectMaxY - y, 0);\n return { x, y, width, height };\n },\n /** @internal */\n halfPixelAligned: (rect) => {\n const x = Math.round(rect.x * 2) / 2;\n const y = Math.round(rect.y * 2) / 2;\n const rectMaxX = Math.round((rect.x + rect.width) * 2) / 2;\n const rectMaxY = Math.round((rect.y + rect.height) * 2) / 2;\n const width = Math.max(rectMaxX - x, 1);\n const height = Math.max(rectMaxY - y, 1);\n return { x, y, width, height };\n },\n /** @internal */\n round: (rect, decimals = 0) => {\n const x = roundedNumber(rect.x, decimals);\n const y = roundedNumber(rect.y, decimals);\n const width = roundedNumber(rect.width, decimals);\n const height = roundedNumber(rect.height, decimals);\n return { x, y, width, height };\n },\n /** @internal */\n roundToOutside: (rect) => {\n const x = Math.floor(rect.x);\n const y = Math.floor(rect.y);\n const rectMaxX = Math.ceil(rect.x + rect.width);\n const rectMaxY = Math.ceil(rect.y + rect.height);\n const width = Math.max(rectMaxX - x, 0);\n const height = Math.max(rectMaxY - y, 0);\n return { x, y, width, height };\n },\n /**\n * @param rect -\n * @internal\n */\n minX: (rect) => {\n return rect.x;\n },\n /**\n * @param rect -\n * @internal\n */\n maxX: (rect) => {\n return rect.x + rect.width;\n },\n /**\n * @param rect -\n * @internal\n */\n minY: (rect) => {\n return rect.y;\n },\n /**\n * @param rect -\n * @internal\n */\n maxY: (rect) => {\n return rect.y + rect.height;\n },\n /** @internal */\n positions: (rect) => {\n return {\n minX: rect.x,\n midX: rect.x + rect.width / 2,\n maxX: Rect.maxX(rect),\n minY: rect.y,\n midY: rect.y + rect.height / 2,\n maxY: Rect.maxY(rect)\n };\n },\n /**\n *\n * @param rect -\n * @internal\n */\n center: (rect) => {\n return {\n x: rect.x + rect.width / 2,\n y: rect.y + rect.height / 2\n };\n },\n /** @internal */\n boundingRectFromPoints: (ps) => {\n let minX = Infinity;\n let maxX = -Infinity;\n let minY = Infinity;\n let maxY = -Infinity;\n for (let i = 0; i < ps.length; i++) {\n const point = ps[i];\n minX = Math.min(minX, point.x);\n maxX = Math.max(maxX, point.x);\n minY = Math.min(minY, point.y);\n maxY = Math.max(maxY, point.y);\n }\n return { x: minX, y: minY, width: maxX - minX, height: maxY - minY };\n },\n /**\n * Returns the precise box defined by the given points, starting from the top-left point. This produces the same\n * Rect as Rect.boundingRectFromPoints *only* when the rect described by the points is not rotated.\n *\n * @internal\n */\n fromPoints: (ps) => {\n const [tl, tr, _, bl] = ps;\n const { x, y } = tl;\n const width = Point.distance(tl, tr);\n const height = Point.distance(tl, bl);\n return { x, y, width, height };\n },\n /**\n * Returns a rect containing all input rects\n * @param rect - a list of rectangles\n * @returns A rectangle that fits exactly around the input rects\n * @internal\n */\n merge: (...rect) => {\n const min = {\n x: Math.min(...rect.map(Rect.minX)),\n y: Math.min(...rect.map(Rect.minY))\n };\n const max = {\n x: Math.max(...rect.map(Rect.maxX)),\n y: Math.max(...rect.map(Rect.maxY))\n };\n return Rect.fromTwoPoints(min, max);\n },\n /** @internal */\n intersection: (rect1, rect2) => {\n const x = Math.max(rect1.x, rect2.x);\n const x2 = Math.min(rect1.x + rect1.width, rect2.x + rect2.width);\n const y = Math.max(rect1.y, rect2.y);\n const y2 = Math.min(rect1.y + rect1.height, rect2.y + rect2.height);\n return { x, y, width: x2 - x, height: y2 - y };\n },\n /**\n * Returns all the corner points for a rect\n * @param rect -\n * @internal\n */\n points: (rect) => {\n return [\n { x: Rect.minX(rect), y: Rect.minY(rect) },\n { x: Rect.minX(rect), y: Rect.maxY(rect) },\n { x: Rect.maxX(rect), y: Rect.minY(rect) },\n { x: Rect.maxX(rect), y: Rect.maxY(rect) }\n ];\n },\n /**\n * Returns all the corner points for a rect at the origin.\n * @internal\n */\n pointsAtOrigin: (rect) => {\n return [\n { x: 0, y: 0 },\n { x: rect.width, y: 0 },\n { x: rect.width, y: rect.height },\n { x: 0, y: rect.height }\n ];\n },\n /** Takes a rect and transforms it by a matrix, resulting in the bounding rectangle of the\n * rotated and/or translated original.\n * @param rect - rectangle to transform\n * @param matrix - matrix to transform by\n * @returns The bounding rectangle of the rotated and/or translated rect.\n */\n transform: (rect, matrix) => {\n const { x: x1, y: y1 } = matrix.transformPoint({ x: rect.x, y: rect.y });\n const { x: x2, y: y2 } = matrix.transformPoint({ x: rect.x + rect.width, y: rect.y });\n const { x: x3, y: y3 } = matrix.transformPoint({ x: rect.x + rect.width, y: rect.y + rect.height });\n const { x: x4, y: y4 } = matrix.transformPoint({ x: rect.x, y: rect.y + rect.height });\n const x = Math.min(x1, x2, x3, x4);\n const width = Math.max(x1, x2, x3, x4) - x;\n const y = Math.min(y1, y2, y3, y4);\n const height = Math.max(y1, y2, y3, y4) - y;\n return { x, y, width, height };\n },\n /**\n * Checks if a rectangle contains a point\n * @param rect - The rectangle to check\n * @param point - The point to check\n * @returns true if the provided rectangle contains the provided point\n * @internal\n */\n containsPoint: (rect, point) => {\n if (point.x < Rect.minX(rect)) {\n return false;\n }\n if (point.x > Rect.maxX(rect)) {\n return false;\n }\n if (point.y < Rect.minY(rect)) {\n return false;\n }\n if (point.y > Rect.maxY(rect)) {\n return false;\n }\n if (isNaN(rect.x)) {\n return false;\n }\n if (isNaN(rect.y)) {\n return false;\n }\n return true;\n },\n /**\n * Returns wether a rect contains another rect entirely\n * @param rectA -\n * @param rectB -\n * @returns true if rectA contains rectB\n */\n containsRect: (rectA, rectB) => {\n for (const point of Rect.points(rectB)) {\n if (!Rect.containsPoint(rectA, point)) {\n return false;\n }\n }\n return true;\n },\n /** @internal */\n toCSS: (rect) => {\n return {\n display: \"block\",\n transform: `translate(${rect.x}px, ${rect.y}px)`,\n width: `${rect.width}px`,\n height: `${rect.height}px`\n };\n },\n /** @internal */\n inset: (rect, n) => {\n return {\n x: rect.x + n,\n y: rect.y + n,\n width: Math.max(0, rect.width - 2 * n),\n height: Math.max(0, rect.height - 2 * n)\n };\n },\n /** @internal */\n intersects: (rectA, rectB) => {\n return !(rectB.x >= Rect.maxX(rectA) || Rect.maxX(rectB) <= rectA.x || rectB.y >= Rect.maxY(rectA) || Rect.maxY(rectB) <= rectA.y);\n },\n /** @internal */\n overlapHorizontally: (rectA, rectB) => {\n const aMax = Rect.maxX(rectA);\n const bMax = Rect.maxX(rectB);\n return aMax > rectB.x && bMax > rectA.x;\n },\n /** @internal */\n overlapVertically: (rectA, rectB) => {\n const aMax = Rect.maxY(rectA);\n const bMax = Rect.maxY(rectB);\n return aMax > rectB.y && bMax > rectA.y;\n },\n /** @internal */\n doesNotIntersect: (rect, rects) => {\n return rects.find((comparingRect) => {\n return Rect.intersects(comparingRect, rect);\n }) === void 0;\n },\n /**\n *\n * @param rectA -\n * @param rectB -\n * @returns if the input rectangles are equal in size and position\n * @public\n * @deprecated: please use Rect.equals instead\n */\n isEqual: (rectA, rectB) => {\n return Rect.equals(rectA, rectB);\n },\n // @TODO: duplicate of points()\n /**\n * @returns [tl, tr, br, bl]\n * @internal\n */\n cornerPoints: (rect) => {\n const rectMinX = rect.x;\n const rectMaxX = rect.x + rect.width;\n const rectMinY = rect.y;\n const rectMaxY = rect.y + rect.height;\n const corner1 = { x: rectMinX, y: rectMinY };\n const corner2 = { x: rectMaxX, y: rectMinY };\n const corner3 = { x: rectMaxX, y: rectMaxY };\n const corner4 = { x: rectMinX, y: rectMaxY };\n return [corner1, corner2, corner3, corner4];\n },\n /** @internal */\n midPoints: (rect) => {\n const rectMinX = rect.x;\n const rectMidX = rect.x + rect.width / 2;\n const rectMaxX = rect.x + rect.width;\n const rectMinY = rect.y;\n const rectMidY = rect.y + rect.height / 2;\n const rectMaxY = rect.y + rect.height;\n const top = { x: rectMidX, y: rectMinY };\n const right = { x: rectMaxX, y: rectMidY };\n const bottom = { x: rectMidX, y: rectMaxY };\n const left = { x: rectMinX, y: rectMidY };\n return [top, right, bottom, left];\n },\n /** @internal */\n pointDistance: (rect, point) => {\n let x = 0;\n let y = 0;\n if (point.x < rect.x) {\n x = rect.x - point.x;\n } else if (point.x > Rect.maxX(rect)) {\n x = point.x - Rect.maxX(rect);\n }\n if (point.y < rect.y) {\n y = rect.y - point.y;\n } else if (point.y > Rect.maxY(rect)) {\n y = point.y - Rect.maxY(rect);\n }\n return Point.distance({ x, y }, { x: 0, y: 0 });\n },\n /** @internal */\n fromAny: (rect, defaults = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n }) => {\n return {\n x: rect.x || defaults.x,\n y: rect.y || defaults.y,\n width: rect.width || defaults.width,\n height: rect.height || defaults.height\n };\n },\n delta: (a, b) => {\n const pointA = { x: Rect.minX(a), y: Rect.minY(a) };\n const pointB = { x: Rect.minX(b), y: Rect.minY(b) };\n return {\n x: pointA.x - pointB.x,\n y: pointA.y - pointB.y\n };\n },\n /** @internal */\n withMinSize: (rect, minSize) => {\n const { width: minWidth, height: minHeight } = minSize;\n const diffX = rect.width - minWidth;\n const diffY = rect.height - minHeight;\n return {\n width: Math.max(rect.width, minWidth),\n height: Math.max(rect.height, minHeight),\n x: rect.width < minWidth ? rect.x + diffX / 2 : rect.x,\n y: rect.height < minHeight ? rect.y + diffY / 2 : rect.y\n };\n },\n /**\n * Return false if any point is not inside or on the provided rect.\n * @internal\n */\n anyPointsOutsideRect: (rect, ps) => {\n const rectMinX = Rect.minX(rect);\n const rectMinY = Rect.minY(rect);\n const rectMaxX = Rect.maxX(rect);\n const rectMaxY = Rect.maxY(rect);\n for (const point of ps) {\n if (point.x < rectMinX || point.x > rectMaxX) {\n return true;\n }\n if (point.y < rectMinY || point.y > rectMaxY) {\n return true;\n }\n }\n return false;\n },\n /** @internal */\n edges: (rect) => {\n const [tl, tr, br, bl] = Rect.cornerPoints(rect);\n return [Line(tl, tr), Line(tr, br), Line(br, bl), Line(bl, tl)];\n },\n /**\n * Return a new rect projected into a new position based on the anchor rect and the given direction/alignment.\n * @internal\n */\n rebaseRectOnto: (rect, anchorRect, direction, alignment) => {\n const rebasedRect = { ...rect };\n switch (direction) {\n case \"bottom\":\n case \"top\":\n switch (alignment) {\n case \"start\":\n rebasedRect.x = anchorRect.x;\n break;\n case \"center\":\n rebasedRect.x = anchorRect.x + anchorRect.width / 2 - rect.width / 2;\n break;\n case \"end\":\n rebasedRect.x = anchorRect.x + anchorRect.width - rect.width;\n break;\n default:\n assertNever(alignment);\n }\n break;\n case \"left\":\n rebasedRect.x = anchorRect.x - rect.width;\n break;\n case \"right\":\n rebasedRect.x = anchorRect.x + anchorRect.width;\n break;\n default:\n assertNever(direction);\n }\n switch (direction) {\n case \"left\":\n case \"right\":\n switch (alignment) {\n case \"start\":\n rebasedRect.y = anchorRect.y;\n break;\n case \"center\":\n rebasedRect.y = anchorRect.y + anchorRect.height / 2 - rect.height / 2;\n break;\n case \"end\":\n rebasedRect.y = anchorRect.y + anchorRect.height - rect.height;\n break;\n default:\n assertNever(alignment);\n }\n break;\n case \"top\":\n rebasedRect.y = anchorRect.y - rect.height;\n break;\n case \"bottom\":\n rebasedRect.y = anchorRect.y + anchorRect.height;\n break;\n default:\n assertNever(direction);\n }\n return rebasedRect;\n }\n};\n\n// ../../library/src/render/types/Constraints.ts\nvar constraintDefaults = {\n left: null,\n right: null,\n top: null,\n bottom: null,\n centerX: \"50%\",\n centerY: \"50%\",\n aspectRatio: null,\n parentSize: null,\n width: 100,\n height: 100\n};\nvar DimensionType = /* @__PURE__ */ ((DimensionType2) => {\n DimensionType2[DimensionType2[\"FixedNumber\"] = 0] = \"FixedNumber\";\n DimensionType2[DimensionType2[\"Percentage\"] = 1] = \"Percentage\";\n DimensionType2[DimensionType2[\"Auto\"] = 2] = \"Auto\";\n DimensionType2[DimensionType2[\"FractionOfFreeSpace\"] = 3] = \"FractionOfFreeSpace\";\n DimensionType2[DimensionType2[\"Viewport\"] = 4] = \"Viewport\";\n return DimensionType2;\n})(DimensionType || {});\nfunction isConstraintSupportingChild(child) {\n if (!isReactChild(child) || !isReactElement(child)) {\n return false;\n }\n return true;\n}\nvar ConstraintMask = {\n // Modifies the constraint mask to remove invalid (mutually exclusive) options and returns the original.\n // TODO: this removes major inconsistencies but probably needs to be merged with ConstraintSolver.\n quickfix: (constraints) => {\n if (constraints.widthType === 2 /* Auto */ || constraints.heightType === 2 /* Auto */) {\n constraints.aspectRatio = null;\n }\n if (isFiniteNumber(constraints.aspectRatio)) {\n if (constraints.left && constraints.right) {\n constraints.widthType = 0 /* FixedNumber */;\n }\n if (constraints.top && constraints.bottom) {\n constraints.heightType = 0 /* FixedNumber */;\n }\n if (constraints.left && constraints.right && constraints.top && constraints.bottom) {\n constraints.bottom = false;\n }\n if (constraints.widthType !== 0 /* FixedNumber */ && constraints.heightType !== 0 /* FixedNumber */) {\n constraints.heightType = 0 /* FixedNumber */;\n }\n }\n if (constraints.left && constraints.right) {\n if (constraints.fixedSize || constraints.widthType === 2 /* Auto */ || isFiniteNumber(constraints.maxWidth)) {\n constraints.right = false;\n }\n constraints.widthType = 0 /* FixedNumber */;\n }\n if (constraints.top && constraints.bottom) {\n if (constraints.fixedSize || constraints.heightType === 2 /* Auto */ || isFiniteNumber(constraints.maxHeight)) {\n constraints.bottom = false;\n }\n constraints.heightType = 0 /* FixedNumber */;\n }\n return constraints;\n }\n};\nfunction valueToDimensionType(value) {\n if (typeof value === \"string\") {\n const trimmedValue = value.trim();\n if (trimmedValue === \"auto\")\n return 2 /* Auto */;\n if (trimmedValue.endsWith(\"fr\"))\n return 3 /* FractionOfFreeSpace */;\n if (trimmedValue.endsWith(\"%\"))\n return 1 /* Percentage */;\n if (trimmedValue.endsWith(\"vw\") || trimmedValue.endsWith(\"vh\"))\n return 4 /* Viewport */;\n }\n return 0 /* FixedNumber */;\n}\nvar ConstraintValues = {\n // Returns concrete current values given some ConstraintProperties.\n fromProperties: (props) => {\n const { left, right, top, bottom, width, height, centerX, centerY, aspectRatio, autoSize } = props;\n const constraints = ConstraintMask.quickfix({\n left: isFiniteNumber(left) || isAnimatable(left),\n right: isFiniteNumber(right) || isAnimatable(right),\n top: isFiniteNumber(top) || isAnimatable(top),\n bottom: isFiniteNumber(bottom) || isAnimatable(bottom),\n widthType: valueToDimensionType(width),\n heightType: valueToDimensionType(height),\n aspectRatio: aspectRatio || null,\n fixedSize: autoSize === true\n });\n let widthValue = null;\n let heightValue = null;\n let widthType = 0 /* FixedNumber */;\n let heightType = 0 /* FixedNumber */;\n if (constraints.widthType !== 0 /* FixedNumber */ && typeof width === \"string\") {\n const parsedWidth = parseFloat(width);\n if (width.endsWith(\"fr\")) {\n widthType = 3 /* FractionOfFreeSpace */;\n widthValue = parsedWidth;\n } else if (width === \"auto\") {\n widthType = 2 /* Auto */;\n } else {\n widthType = 1 /* Percentage */;\n widthValue = parsedWidth / 100;\n }\n } else if (width !== void 0 && typeof width !== \"string\") {\n widthValue = Animatable.getNumber(width);\n }\n if (constraints.heightType !== 0 /* FixedNumber */ && typeof height === \"string\") {\n const parsedHeight = parseFloat(height);\n if (height.endsWith(\"fr\")) {\n heightType = 3 /* FractionOfFreeSpace */;\n heightValue = parsedHeight;\n } else if (height === \"auto\") {\n heightType = 2 /* Auto */;\n } else {\n heightType = 1 /* Percentage */;\n heightValue = parseFloat(height) / 100;\n }\n } else if (height !== void 0 && typeof height !== \"string\") {\n heightValue = Animatable.getNumber(height);\n }\n let centerAnchorX = 0.5;\n let centerAnchorY = 0.5;\n if (centerX) {\n centerAnchorX = parseFloat(centerX) / 100;\n }\n if (centerY) {\n centerAnchorY = parseFloat(centerY) / 100;\n }\n return {\n left: constraints.left ? Animatable.getNumber(left) : null,\n right: constraints.right ? Animatable.getNumber(right) : null,\n top: constraints.top ? Animatable.getNumber(top) : null,\n bottom: constraints.bottom ? Animatable.getNumber(bottom) : null,\n widthType,\n heightType,\n width: widthValue,\n height: heightValue,\n aspectRatio: constraints.aspectRatio || null,\n centerAnchorX,\n centerAnchorY\n };\n },\n toSize: (values, parentSizeInfo, autoSize, freeSpace) => {\n let width = null;\n let height = null;\n const parentWidth = (parentSizeInfo == null ? void 0 : parentSizeInfo.sizing) ? Animatable.getNumber(parentSizeInfo == null ? void 0 : parentSizeInfo.sizing.width) : null;\n const parentHeight = (parentSizeInfo == null ? void 0 : parentSizeInfo.sizing) ? Animatable.getNumber(parentSizeInfo == null ? void 0 : parentSizeInfo.sizing.height) : null;\n const hOpposingPinsOffset = pinnedOffset(values.left, values.right);\n if (parentWidth && isFiniteNumber(hOpposingPinsOffset)) {\n width = parentWidth - hOpposingPinsOffset;\n } else if (autoSize && values.widthType === 2 /* Auto */) {\n width = autoSize.width;\n } else if (isFiniteNumber(values.width)) {\n switch (values.widthType) {\n case 0 /* FixedNumber */:\n width = values.width;\n break;\n case 3 /* FractionOfFreeSpace */:\n width = freeSpace ? freeSpace.freeSpaceInParent.width / freeSpace.freeSpaceUnitDivisor.width * values.width : null;\n break;\n case 1 /* Percentage */:\n case 4 /* Viewport */:\n if (parentWidth) {\n width = parentWidth * values.width;\n }\n break;\n case 2 /* Auto */:\n break;\n default:\n assertNever(values.widthType);\n }\n }\n const vOpposingPinsOffset = pinnedOffset(values.top, values.bottom);\n if (parentHeight && isFiniteNumber(vOpposingPinsOffset)) {\n height = parentHeight - vOpposingPinsOffset;\n } else if (autoSize && values.heightType === 2 /* Auto */) {\n height = autoSize.height;\n } else if (isFiniteNumber(values.height)) {\n switch (values.heightType) {\n case 0 /* FixedNumber */:\n height = values.height;\n break;\n case 3 /* FractionOfFreeSpace */:\n height = freeSpace ? freeSpace.freeSpaceInParent.height / freeSpace.freeSpaceUnitDivisor.height * values.height : null;\n break;\n case 1 /* Percentage */:\n case 4 /* Viewport */:\n if (parentHeight) {\n height = parentHeight * values.height;\n }\n break;\n case 2 /* Auto */:\n break;\n default:\n assertNever(values.heightType);\n }\n }\n return sizeAfterApplyingConstraintsAndAspectRatio(\n width,\n height,\n values,\n {\n height: parentHeight ?? 0,\n width: parentWidth ?? 0\n },\n parentSizeInfo == null ? void 0 : parentSizeInfo.viewport\n );\n },\n // Returns a parent-relative rect given concrete ConstraintValues.\n toRect: (values, parentSizeInfo = null, autoSize = null, pixelAlign = false, freeSpace = null) => {\n let x = values.left || 0;\n let y = values.top || 0;\n const { width, height } = ConstraintValues.toSize(values, parentSizeInfo, autoSize, freeSpace);\n const parentSizeForPositioning = (parentSizeInfo == null ? void 0 : parentSizeInfo.positioning) ?? null;\n const positioningParentWidth = parentSizeForPositioning ? Animatable.getNumber(parentSizeForPositioning.width) : null;\n const positioningParentHeight = parentSizeForPositioning ? Animatable.getNumber(parentSizeForPositioning.height) : null;\n if (values.left !== null) {\n x = values.left;\n } else if (positioningParentWidth && values.right !== null) {\n x = positioningParentWidth - values.right - width;\n } else if (positioningParentWidth) {\n x = values.centerAnchorX * positioningParentWidth - width / 2;\n }\n if (values.top !== null) {\n y = values.top;\n } else if (positioningParentHeight && values.bottom !== null) {\n y = positioningParentHeight - values.bottom - height;\n } else if (positioningParentHeight) {\n y = values.centerAnchorY * positioningParentHeight - height / 2;\n }\n const f = { x, y, width, height };\n if (pixelAlign) {\n return Rect.pixelAligned(f);\n }\n return f;\n }\n};\nvar defaultWidth = 200;\nvar defaultHeight = 200;\nfunction getConstraintValue(constraint, value, parentSize, viewport) {\n if (typeof value === \"string\") {\n if (value.endsWith(\"%\") && parentSize) {\n switch (constraint) {\n case \"maxWidth\":\n case \"minWidth\":\n return parseFloat(value) / 100 * parentSize.width;\n case \"maxHeight\":\n case \"minHeight\":\n return parseFloat(value) / 100 * parentSize.height;\n default:\n break;\n }\n }\n if (value.endsWith(\"vh\")) {\n if (!viewport)\n return constraintValueForUncalculatedViewport(constraint);\n switch (constraint) {\n case \"maxWidth\":\n case \"minWidth\":\n return parseFloat(value) / 100 * viewport.width;\n case \"maxHeight\":\n case \"minHeight\":\n return parseFloat(value) / 100 * viewport.height;\n default:\n break;\n }\n }\n return parseFloat(value);\n }\n return value;\n}\nfunction constraintValueForUncalculatedViewport(constraint) {\n switch (constraint) {\n case \"minWidth\":\n case \"minHeight\":\n return Number.NEGATIVE_INFINITY;\n case \"maxWidth\":\n case \"maxHeight\":\n return Number.POSITIVE_INFINITY;\n default:\n assertNever(constraint, \"unknown constraint key\");\n }\n}\nfunction constrainHeight(height, values, parentSize, viewport) {\n if (values.minHeight) {\n height = Math.max(getConstraintValue(\"minHeight\", values.minHeight, parentSize, viewport), height);\n }\n if (values.maxHeight) {\n height = Math.min(getConstraintValue(\"maxHeight\", values.maxHeight, parentSize, viewport), height);\n }\n return height;\n}\nfunction constrainWidth(width, values, parentSize, viewport) {\n if (values.minWidth) {\n width = Math.max(getConstraintValue(\"minWidth\", values.minWidth, parentSize, viewport), width);\n }\n if (values.maxWidth) {\n width = Math.min(getConstraintValue(\"maxWidth\", values.maxWidth, parentSize, viewport), width);\n }\n return width;\n}\nfunction sizeAfterApplyingConstraintsAndAspectRatio(width, height, values, parentSize, viewport) {\n let w = constrainWidth(isFiniteNumber(width) ? width : defaultWidth, values, parentSize, viewport);\n let h = constrainHeight(isFiniteNumber(height) ? height : defaultHeight, values, parentSize, viewport);\n if (isFiniteNumber(values.aspectRatio) && values.aspectRatio > 0) {\n if (isFiniteNumber(values.left) && isFiniteNumber(values.right)) {\n h = w / values.aspectRatio;\n } else if (isFiniteNumber(values.top) && isFiniteNumber(values.bottom)) {\n w = h * values.aspectRatio;\n } else if (values.widthType !== 0 /* FixedNumber */) {\n h = w / values.aspectRatio;\n } else {\n w = h * values.aspectRatio;\n }\n }\n return {\n width: w,\n height: h\n };\n}\nfunction pinnedOffset(start, end) {\n if (!isFiniteNumber(start) || !isFiniteNumber(end))\n return null;\n return start + end;\n}\n\n// ../../library/src/render/types/NewConstraints.tsx\nimport { Fragment as Fragment4, jsx as jsx5 } from \"react/jsx-runtime\";\nfunction containsInvalidStringValues(props) {\n if (typeof props.right === \"string\")\n return true;\n if (typeof props.bottom === \"string\")\n return true;\n if (typeof props.left === \"string\" && (!props.center || props.center === \"y\")) {\n return true;\n }\n if (typeof props.top === \"string\" && (!props.center || props.center === \"x\")) {\n return true;\n }\n return false;\n}\nfunction constraintsEnabled(props) {\n if (!props._constraints)\n return false;\n if (containsInvalidStringValues(props))\n return false;\n return props._constraints.enabled;\n}\nfunction sizeFromFiniteNumberProps(props) {\n const { size } = props;\n let { width, height } = props;\n if (isFiniteNumber(size)) {\n if (width === void 0) {\n width = size;\n }\n if (height === void 0) {\n height = size;\n }\n }\n if (isFiniteNumber(width) && isFiniteNumber(height)) {\n return {\n width,\n height\n };\n }\n return null;\n}\nfunction rectFromFiniteNumberProps(props) {\n const size = sizeFromFiniteNumberProps(props);\n if (size === null) {\n return null;\n }\n const { left, top } = props;\n if (isFiniteNumber(left) && isFiniteNumber(top)) {\n return {\n x: left,\n y: top,\n ...size\n };\n }\n return null;\n}\nfunction calculateRect(props, parentSize, pixelAlign = true) {\n if (props.positionFixed || props.positionAbsolute)\n return null;\n const parentSizeDisabled = parentSize === 1 /* Disabled */ || parentSize === 2 /* DisabledForCurrentLevel */;\n if (!constraintsEnabled(props) || parentSizeDisabled) {\n return rectFromFiniteNumberProps(props);\n }\n const constraintValues = getConstraintValues(props);\n const enabledParentSize = deprecatedParentSize(parentSize);\n const parentSizeInfo = enabledParentSize ? { sizing: enabledParentSize, positioning: enabledParentSize, viewport: null } : null;\n return ConstraintValues.toRect(constraintValues, parentSizeInfo, null, pixelAlign, null);\n}\nfunction getConstraintValues(props) {\n const { left, right, top, bottom, center, _constraints, size } = props;\n let { width, height } = props;\n if (width === void 0) {\n width = size;\n }\n if (height === void 0) {\n height = size;\n }\n const { aspectRatio, autoSize } = _constraints;\n const constraintMask = ConstraintMask.quickfix({\n left: isFiniteNumber(left),\n right: isFiniteNumber(right),\n top: isFiniteNumber(top),\n bottom: isFiniteNumber(bottom),\n widthType: valueToDimensionType(width),\n heightType: valueToDimensionType(height),\n aspectRatio: aspectRatio || null,\n fixedSize: autoSize === true\n });\n let widthValue = null;\n let heightValue = null;\n let widthType = 0 /* FixedNumber */;\n let heightType = 0 /* FixedNumber */;\n if (constraintMask.widthType !== 0 /* FixedNumber */ && typeof width === \"string\") {\n const parsedWidth = parseFloat(width);\n if (width.endsWith(\"fr\")) {\n widthType = 3 /* FractionOfFreeSpace */;\n widthValue = parsedWidth;\n } else if (width === \"auto\") {\n widthType = 2 /* Auto */;\n } else {\n widthType = 1 /* Percentage */;\n widthValue = parsedWidth / 100;\n }\n } else if (width !== void 0 && typeof width !== \"string\") {\n widthValue = width;\n }\n if (constraintMask.heightType !== 0 /* FixedNumber */ && typeof height === \"string\") {\n const parsedHeight = parseFloat(height);\n if (height.endsWith(\"fr\")) {\n heightType = 3 /* FractionOfFreeSpace */;\n heightValue = parsedHeight;\n } else if (height === \"auto\") {\n heightType = 2 /* Auto */;\n } else {\n heightType = 1 /* Percentage */;\n heightValue = parseFloat(height) / 100;\n }\n } else if (height !== void 0 && typeof height !== \"string\") {\n heightValue = height;\n }\n let centerAnchorX = 0.5;\n let centerAnchorY = 0.5;\n if (center === true || center === \"x\") {\n constraintMask.left = false;\n if (typeof left === \"string\") {\n centerAnchorX = parseFloat(left) / 100;\n }\n }\n if (center === true || center === \"y\") {\n constraintMask.top = false;\n if (typeof top === \"string\") {\n centerAnchorY = parseFloat(top) / 100;\n }\n }\n return {\n // Because we check isFiniteNumber when creating the masks,\n // We know that left, right, top and bottom are numbers if the mask is true for the corresponding value\n // We need to cast this because typescript does not understand that\n left: constraintMask.left ? left : null,\n right: constraintMask.right ? right : null,\n top: constraintMask.top ? top : null,\n bottom: constraintMask.bottom ? bottom : null,\n widthType,\n heightType,\n width: widthValue,\n height: heightValue,\n aspectRatio: constraintMask.aspectRatio || null,\n centerAnchorX,\n centerAnchorY,\n minHeight: props.minHeight,\n maxHeight: props.maxHeight,\n minWidth: props.minWidth,\n maxWidth: props.maxWidth\n };\n}\nvar ParentSizeState = /* @__PURE__ */ ((ParentSizeState2) => {\n ParentSizeState2[ParentSizeState2[\"Unknown\"] = 0] = \"Unknown\";\n ParentSizeState2[ParentSizeState2[\"Disabled\"] = 1] = \"Disabled\";\n ParentSizeState2[ParentSizeState2[\"DisabledForCurrentLevel\"] = 2] = \"DisabledForCurrentLevel\";\n return ParentSizeState2;\n})(ParentSizeState || {});\nvar ConstraintsContext = /* @__PURE__ */ React14.createContext({\n parentSize: 0 /* Unknown */\n});\nfunction deprecatedParentSize(parentSize) {\n if (parentSize === 0 /* Unknown */ || parentSize === 1 /* Disabled */ || parentSize === 2 /* DisabledForCurrentLevel */) {\n return null;\n }\n return parentSize;\n}\nfunction useParentSize() {\n return React14.useContext(ConstraintsContext).parentSize;\n}\nfunction isSize(o) {\n return typeof o === \"object\";\n}\nvar ProvideParentSize = (props) => {\n const currentParentSize = useParentSize();\n const { parentSize, children } = props;\n const value = React14.useMemo(\n () => ({ parentSize }),\n // We are generating the memoKeys in runtime and react doesn't like it,\n // but it should be safe to ignore.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [getParentWidth(parentSize), getParentHeight(parentSize)]\n );\n if (currentParentSize === 1 /* Disabled */) {\n return children ? /* @__PURE__ */ jsx5(Fragment4, { children }) : null;\n }\n return /* @__PURE__ */ jsx5(ConstraintsContext.Provider, { value, children });\n};\nfunction getParentWidth(parentSize) {\n return isSize(parentSize) ? parentSize.width : parentSize;\n}\nfunction getParentHeight(parentSize) {\n return isSize(parentSize) ? parentSize.height : parentSize;\n}\nfunction useProvideParentSize(node, parentSize) {\n return /* @__PURE__ */ jsx5(ProvideParentSize, { parentSize, children: node });\n}\nfunction useConstraints(props) {\n const parentSize = useParentSize();\n const calculatedRect = calculateRect(props, parentSize, true);\n return calculatedRect;\n}\nfunction isAutoSized({\n width,\n height\n}) {\n return width === \"auto\" || width === \"min-content\" || height === \"auto\" || height === \"min-content\";\n}\n\n// ../../library/src/render/types/PropertyControls.ts\nvar ControlType = /* @__PURE__ */ ((ControlType2) => {\n ControlType2[\"Boolean\"] = \"boolean\";\n ControlType2[\"Number\"] = \"number\";\n ControlType2[\"String\"] = \"string\";\n ControlType2[\"RichText\"] = \"richtext\";\n ControlType2[\"FusedNumber\"] = \"fusednumber\";\n ControlType2[\"Enum\"] = \"enum\";\n ControlType2[\"SegmentedEnum\"] = \"segmentedenum\";\n ControlType2[\"Color\"] = \"color\";\n ControlType2[\"Image\"] = \"image\";\n ControlType2[\"ResponsiveImage\"] = \"responsiveimage\";\n ControlType2[\"File\"] = \"file\";\n ControlType2[\"ComponentInstance\"] = \"componentinstance\";\n ControlType2[\"Array\"] = \"array\";\n ControlType2[\"EventHandler\"] = \"eventhandler\";\n ControlType2[\"Transition\"] = \"transition\";\n ControlType2[\"BoxShadow\"] = \"boxshadow\";\n ControlType2[\"Link\"] = \"link\";\n ControlType2[\"Date\"] = \"date\";\n ControlType2[\"Object\"] = \"object\";\n ControlType2[\"Font\"] = \"font\";\n ControlType2[\"PageScope\"] = \"pagescope\";\n ControlType2[\"ScrollSectionRef\"] = \"scrollsectionref\";\n ControlType2[\"CustomCursor\"] = \"customcursor\";\n ControlType2[\"Border\"] = \"border\";\n ControlType2[\"Cursor\"] = \"cursor\";\n ControlType2[\"Padding\"] = \"padding\";\n ControlType2[\"BorderRadius\"] = \"borderradius\";\n ControlType2[\"CollectionReference\"] = \"collectionreference\";\n ControlType2[\"MultiCollectionReference\"] = \"multicollectionreference\";\n return ControlType2;\n})(ControlType || {});\n\n// ../../library/src/modules/isFlexboxGapSupported.ts\nvar isFlexboxGapSupportedCached;\nfunction isFlexboxGapSupported() {\n if (isFlexboxGapSupportedCached !== void 0) {\n return isFlexboxGapSupportedCached;\n }\n const flex = document.createElement(\"div\");\n Object.assign(flex.style, {\n position: \"absolute\",\n // avoid layout shift\n display: \"flex\",\n flexDirection: \"column\",\n rowGap: \"1px\"\n });\n flex.appendChild(document.createElement(\"div\"));\n flex.appendChild(document.createElement(\"div\"));\n document.body.appendChild(flex);\n const isSupported = flex.scrollHeight === 1;\n if (flex.parentNode) {\n flex.parentNode.removeChild(flex);\n }\n isFlexboxGapSupportedCached = isSupported;\n return isSupported;\n}\n\n// ../../library/src/modules/workaroundFlexboxGapNotSupported.ts\nvar flexboxGapNotSupportedClass = \"flexbox-gap-not-supported\";\nvar initialized = false;\nfunction installFlexboxGapWorkaroundIfNeeded() {\n if (initialized)\n return;\n initialized = true;\n if (isFlexboxGapSupported())\n return;\n document.body.classList.add(flexboxGapNotSupportedClass);\n}\n\n// ../../library/src/render/utils/injectDeprecatedRichTextRules.ts\nvar richTextStylesRule = `\n[data-framer-component-type=\"DeprecatedRichText\"] p,\n[data-framer-component-type=\"DeprecatedRichText\"] div,\n[data-framer-component-type=\"DeprecatedRichText\"] h1,\n[data-framer-component-type=\"DeprecatedRichText\"] h2,\n[data-framer-component-type=\"DeprecatedRichText\"] h3,\n[data-framer-component-type=\"DeprecatedRichText\"] h4,\n[data-framer-component-type=\"DeprecatedRichText\"] h5,\n[data-framer-component-type=\"DeprecatedRichText\"] h6,\n[data-framer-component-type=\"DeprecatedRichText\"] li,\n[data-framer-component-type=\"DeprecatedRichText\"] ol,\n[data-framer-component-type=\"DeprecatedRichText\"] ul,\n[data-framer-component-type=\"DeprecatedRichText\"] span:not([data-text-fill]) {\n font-family: var(--framer-font-family, Inter, Inter Placeholder, sans-serif);\n font-style: var(--framer-font-style, normal);\n font-weight: var(--framer-font-weight, 400);\n color: var(--framer-text-color, #000);\n font-size: var(--framer-font-size, 16px);\n letter-spacing: var(--framer-letter-spacing, 0);\n text-transform: var(--framer-text-transform, none);\n text-decoration: var(--framer-text-decoration, none);\n line-height: var(--framer-line-height, 1.2em);\n text-align: var(--framer-text-alignment, start);\n}\n`;\nvar richTextParagraphSpacingStylesRule = `\n[data-framer-component-type=\"DeprecatedRichText\"] p:not(:first-child),\n[data-framer-component-type=\"DeprecatedRichText\"] div:not(:first-child),\n[data-framer-component-type=\"DeprecatedRichText\"] h1:not(:first-child),\n[data-framer-component-type=\"DeprecatedRichText\"] h2:not(:first-child),\n[data-framer-component-type=\"DeprecatedRichText\"] h3:not(:first-child),\n[data-framer-component-type=\"DeprecatedRichText\"] h4:not(:first-child),\n[data-framer-component-type=\"DeprecatedRichText\"] h5:not(:first-child),\n[data-framer-component-type=\"DeprecatedRichText\"] h6:not(:first-child),\n[data-framer-component-type=\"DeprecatedRichText\"] ol:not(:first-child),\n[data-framer-component-type=\"DeprecatedRichText\"] ul:not(:first-child),\n[data-framer-component-type=\"DeprecatedRichText\"] .framer-image:not(:first-child) {\n margin-top: var(--framer-paragraph-spacing, 0);\n}\n`;\nvar richTextBackgroundMaskStylesRule = `\n[data-framer-component-type=\"DeprecatedRichText\"] span[data-text-fill] {\n display: inline-block;\n background-clip: text;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n`;\nvar richTextLinkStylesRule = `\n[data-framer-component-type=\"DeprecatedRichText\"] a,\n[data-framer-component-type=\"DeprecatedRichText\"] a span:not([data-text-fill]) {\n font-family: var(--framer-link-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif));\n font-style: var(--framer-link-font-style, var(--framer-font-style, normal));\n font-weight: var(--framer-link-font-weight, var(--framer-font-weight, 400));\n color: var(--framer-link-text-color, var(--framer-text-color, #000));\n font-size: var(--framer-link-font-size, var(--framer-font-size, 16px));\n text-transform: var(--framer-link-text-transform, var(--framer-text-transform, none));\n text-decoration: var(--framer-link-text-decoration, var(--framer-text-decoration, none));\n}\n`;\nvar richTextLinkHoverStylesRule = `\n[data-framer-component-type=\"DeprecatedRichText\"] a:hover,\n[data-framer-component-type=\"DeprecatedRichText\"] a:hover span:not([data-text-fill]) {\n font-family: var(--framer-link-hover-font-family, var(--framer-link-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif)));\n font-style: var(--framer-link-hover-font-style, var(--framer-link-font-style, var(--framer-font-style, normal)));\n font-weight: var(--framer-link-hover-font-weight, var(--framer-link-font-weight, var(--framer-font-weight, 400)));\n color: var(--framer-link-hover-text-color, var(--framer-link-text-color, var(--framer-text-color, #000)));\n font-size: var(--framer-link-hover-font-size, var(--framer-link-font-size, var(--framer-font-size, 16px)));\n text-transform: var(--framer-link-hover-text-transform, var(--framer-link-text-transform, var(--framer-text-transform, none)));\n text-decoration: var(--framer-link-hover-text-decoration, var(--framer-link-text-decoration, var(--framer-text-decoration, none)));\n}\n`;\nvar richTextLinkCurrentStylesRule = `\n[data-framer-component-type=\"DeprecatedRichText\"] a[data-framer-page-link-current],\n[data-framer-component-type=\"DeprecatedRichText\"] a[data-framer-page-link-current] span:not([data-text-fill]):not([data-nested-link]) {\n font-family: var(--framer-link-current-font-family, var(--framer-link-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif)));\n font-style: var(--framer-link-current-font-style, var(--framer-link-font-style, var(--framer-font-style, normal)));\n font-weight: var(--framer-link-current-font-weight, var(--framer-link-font-weight, var(--framer-font-weight, 400)));\n color: var(--framer-link-current-text-color, var(--framer-link-text-color, var(--framer-text-color, #000)));\n font-size: var(--framer-link-current-font-size, var(--framer-link-font-size, var(--framer-font-size, 16px)));\n text-transform: var(--framer-link-current-text-transform, var(--framer-link-text-transform, var(--framer-text-transform, none)));\n text-decoration: var(--framer-link-current-text-decoration, var(--framer-link-text-decoration, var(--framer-text-decoration, none)));\n}\n`;\nvar richTextLinkCurrentHoverStylesRule = `\n[data-framer-component-type=\"DeprecatedRichText\"] a[data-framer-page-link-current]:hover,\n[data-framer-component-type=\"DeprecatedRichText\"] a[data-framer-page-link-current]:hover span:not([data-text-fill]):not([data-nested-link]) {\n font-family: var(--framer-link-hover-font-family, var(--framer-link-current-font-family, var(--framer-link-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif))));\n font-style: var(--framer-link-hover-font-style, var(--framer-link-current-font-style, var(--framer-link-font-style, var(--framer-font-style, normal))));\n font-weight: var(--framer-link-hover-font-weight, var(--framer-link-current-font-weight, var(--framer-link-font-weight, var(--framer-font-weight, 400))));\n color: var(--framer-link-hover-text-color, var(--framer-link-current-text-color, var(--framer-link-text-color, var(--framer-text-color, #000))));\n font-size: var(--framer-link-hover-font-size, var(--framer-link-current-font-size, var(--framer-link-font-size, var(--framer-font-size, 16px))));\n text-transform: var(--framer-link-hover-text-transform, var(--framer-link-current-text-transform, var(--framer-link-text-transform, var(--framer-text-transform, none))));\n text-decoration: var(--framer-link-hover-text-decoration, var(--framer-link-current-text-decoration, var(--framer-link-text-decoration, var(--framer-text-decoration, none))));\n}\n`;\nvar richTextBoldStylesRule = `\n[data-framer-component-type=\"DeprecatedRichText\"] strong {\n font-weight: bolder;\n}\n`;\nvar richTextItalicStylesRule = `\n[data-framer-component-type=\"DeprecatedRichText\"] em {\n font-style: italic;\n}\n`;\nvar richTextImageRule = `\n[data-framer-component-type=\"DeprecatedRichText\"] .framer-image {\n display: block;\n max-width: 100%;\n height: auto;\n}\n`;\nvar richTextBlockElementResetRule = `\n[data-framer-component-type=\"DeprecatedRichText\"] p,\n[data-framer-component-type=\"DeprecatedRichText\"] div,\n[data-framer-component-type=\"DeprecatedRichText\"] h1,\n[data-framer-component-type=\"DeprecatedRichText\"] h2,\n[data-framer-component-type=\"DeprecatedRichText\"] h3,\n[data-framer-component-type=\"DeprecatedRichText\"] h4,\n[data-framer-component-type=\"DeprecatedRichText\"] h5,\n[data-framer-component-type=\"DeprecatedRichText\"] h6 {\n margin: 0;\n padding: 0;\n}\n`;\nvar richTextStylesPresetResetRule = `\n[data-framer-component-type=\"DeprecatedRichText\"] .text-styles-preset-reset {\n --framer-font-family: Inter, Inter Placeholder, sans-serif;\n --framer-font-style: normal;\n --framer-font-weight: 500;\n --framer-text-color: #000;\n --framer-font-size: 16px;\n --framer-letter-spacing: 0;\n --framer-text-transform: none;\n --framer-text-decoration: none;\n --framer-line-height: 1.2em;\n --framer-text-alignment: start;\n --framer-font-open-type-features: normal;\n --font-variation-settings: normal;\n}\n`;\nvar richTextStylesList = `\n[data-framer-component-type=\"DeprecatedRichText\"] ul,\n[data-framer-component-type=\"DeprecatedRichText\"] ol {\n display: table;\n width: 100%;\n padding-left: 0;\n margin: 0;\n}\n`;\nvar richTextStylesListItem = `\n[data-framer-component-type=\"DeprecatedRichText\"] li {\n display: table-row;\n counter-increment: list-item;\n list-style: none;\n}\n`;\nvar richTextStylesNumberedListMarker = `\n[data-framer-component-type=\"DeprecatedRichText\"] ol > li::before {\n display: table-cell;\n width: 2.25ch;\n box-sizing: border-box;\n padding-right: 0.75ch;\n content: counter(list-item) \".\";\n white-space: nowrap;\n}\n`;\nvar richTextStylesBulletedListMarker = `\n[data-framer-component-type=\"DeprecatedRichText\"] ul > li::before {\n display: table-cell;\n width: 2.25ch;\n box-sizing: border-box;\n padding-right: 0.75ch;\n content: \"\\u2022\";\n}\n`;\nvar deprecatedRichTextCSSRules = [\n `[data-framer-component-type=\"DeprecatedRichText\"] { cursor: inherit; }`,\n richTextStylesPresetResetRule,\n richTextBlockElementResetRule,\n richTextStylesRule,\n richTextParagraphSpacingStylesRule,\n richTextBackgroundMaskStylesRule,\n richTextLinkStylesRule,\n richTextLinkHoverStylesRule,\n richTextLinkCurrentStylesRule,\n richTextLinkCurrentHoverStylesRule,\n richTextBoldStylesRule,\n richTextItalicStylesRule,\n richTextImageRule,\n richTextStylesList,\n richTextStylesListItem,\n richTextStylesNumberedListMarker,\n richTextStylesBulletedListMarker\n];\n\n// ../../library/src/render/utils/injectRichTextRules.ts\nvar richTextCSSRules = [\n /* css */\n `\n p.framer-text,\n div.framer-text,\n h1.framer-text,\n h2.framer-text,\n h3.framer-text,\n h4.framer-text,\n h5.framer-text,\n h6.framer-text,\n ol.framer-text,\n ul.framer-text {\n margin: 0;\n padding: 0;\n }\n `,\n /* css */\n `\n p.framer-text,\n div.framer-text,\n h1.framer-text,\n h2.framer-text,\n h3.framer-text,\n h4.framer-text,\n h5.framer-text,\n h6.framer-text,\n li.framer-text,\n ol.framer-text,\n ul.framer-text,\n span.framer-text:not([data-text-fill]) {\n font-family: var(--framer-blockquote-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif));\n font-style: var(--framer-blockquote-font-style, var(--framer-font-style, normal));\n font-weight: var(--framer-blockquote-font-weight, var(--framer-font-weight, 400));\n color: var(--framer-blockquote-text-color, var(--framer-text-color, #000));\n font-size: calc(var(--framer-blockquote-font-size, var(--framer-font-size, 16px)) * var(--framer-font-size-scale, 1));\n letter-spacing: var(--framer-blockquote-letter-spacing, var(--framer-letter-spacing, 0));\n text-transform: var(--framer-blockquote-text-transform, var(--framer-text-transform, none));\n text-decoration: var(--framer-blockquote-text-decoration, var(--framer-text-decoration, none));\n line-height: var(--framer-blockquote-line-height, var(--framer-line-height, 1.2em));\n text-align: var(--framer-blockquote-text-alignment, var(--framer-text-alignment, start));\n -webkit-text-stroke-width: var(--framer-text-stroke-width, initial);\n -webkit-text-stroke-color: var(--framer-text-stroke-color, initial);\n -moz-font-feature-settings: var(--framer-font-open-type-features, initial);\n -webkit-font-feature-settings: var(--framer-font-open-type-features, initial);\n font-feature-settings: var(--framer-font-open-type-features, initial);\n font-variation-settings: var(--framer-font-variation-axes, normal);\n text-wrap: var(--framer-text-wrap-override, var(--framer-text-wrap));\n }\n `,\n /* css */\n `\n .framer-fit-text .framer-text {\n white-space: nowrap;\n white-space-collapse: preserve;\n }\n `,\n /* css */\n `\n strong.framer-text {\n font-family: var(--framer-blockquote-font-family-bold, var(--framer-font-family-bold));\n font-style: var(--framer-blockquote-font-style-bold, var(--framer-font-style-bold));\n font-weight: var(--framer-blockquote-font-weight-bold, var(--framer-font-weight-bold, bolder));\n font-variation-settings: var(--framer-blockquote-font-variation-axes-bold, var(--framer-font-variation-axes-bold));\n }\n `,\n /* css */\n `\n em.framer-text {\n font-family: var(--framer-blockquote-font-family-italic, var(--framer-font-family-italic));\n font-style: var(--framer-blockquote-font-style-italic, var(--framer-font-style-italic, italic));\n font-weight: var(--framer-blockquote-font-weight-italic, var(--framer-font-weight-italic));\n font-variation-settings: var(--framer-blockquote-font-variation-axes-italic, var(--framer-font-variation-axes-italic));\n }\n `,\n /* css */\n `\n em.framer-text > strong.framer-text {\n font-family: var(--framer-blockquote-font-family-bold-italic, var(--framer-font-family-bold-italic));\n font-style: var(--framer-blockquote-font-style-bold-italic, var(--framer-font-style-bold-italic, italic));\n font-weight: var(--framer-blockquote-font-weight-bold-italic, var(--framer-font-weight-bold-italic, bolder));\n font-variation-settings: var(--framer-blockquote-font-variation-axes-bold-italic, var(--framer-font-variation-axes-bold-italic));\n }\n `,\n /* css */\n `\n p.framer-text:not(:first-child),\n div.framer-text:not(:first-child),\n h1.framer-text:not(:first-child),\n h2.framer-text:not(:first-child),\n h3.framer-text:not(:first-child),\n h4.framer-text:not(:first-child),\n h5.framer-text:not(:first-child),\n h6.framer-text:not(:first-child),\n ol.framer-text:not(:first-child),\n ul.framer-text:not(:first-child),\n blockquote.framer-text:not(:first-child),\n .framer-image.framer-text:not(:first-child) {\n margin-top: var(--framer-blockquote-paragraph-spacing, var(--framer-paragraph-spacing, 0));\n }\n `,\n // The first child of a list item is a paragraph. If the second child is a\n // nested list we don't want it to have paragraph spacing.\n /* css */\n `\n li.framer-text > ul.framer-text:nth-child(2),\n li.framer-text > ol.framer-text:nth-child(2) {\n margin-top: 0;\n }\n `,\n // background-clip: text clips to the physical dimensions of text as appose\n // to the rendered dimensions. normal text will bleed out side these\n // constraints but since this is just a clipping mask over the area the text\n // takes up we have cases where the text will get clipped. That is why we\n // need to expand the area that the gradient applies to to allow users to\n // use low line-heights. This will result in gradients not aligning\n // perfectly to the edges of the text. but this is a acceptable trade off at\n // this point. For now we increase the area of the clipping mask on the\n // bottom (for descenders) and the right for italic or wide fonts.\n /* css */\n `\n .framer-text[data-text-fill] {\n display: inline-block;\n background-clip: text;\n -webkit-background-clip: text;\n /* make this a transparent color if you want to visualise the clipping */\n -webkit-text-fill-color: transparent;\n padding: max(0em, calc(calc(1.3em - var(--framer-blockquote-line-height, var(--framer-line-height, 1.3em))) / 2));\n margin: min(0em, calc(calc(1.3em - var(--framer-blockquote-line-height, var(--framer-line-height, 1.3em))) / -2));\n }\n `,\n /* css */\n `\n code.framer-text,\n code.framer-text span.framer-text:not([data-text-fill]) {\n font-family: var(--framer-code-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif));\n font-style: var(--framer-blockquote-font-style, var(--framer-code-font-style, var(--framer-font-style, normal)));\n font-weight: var(--framer-blockquote-font-weight, var(--framer-code-font-weight, var(--framer-font-weight, 400)));\n color: var(--framer-blockquote-text-color, var(--framer-code-text-color, var(--framer-text-color, #000)));\n font-size: calc(var(--framer-blockquote-font-size, var(--framer-font-size, 16px)) * var(--framer-font-size-scale, 1));\n letter-spacing: var(--framer-blockquote-letter-spacing, var(--framer-letter-spacing, 0));\n line-height: var(--framer-blockquote-line-height, var(--framer-line-height, 1.2em));\n }\n `,\n /* css */\n `\n blockquote.framer-text {\n margin-block-start: initial;\n margin-block-end: initial;\n margin-inline-start: initial;\n margin-inline-end: initial;\n unicode-bidi: initial;\n }\n `,\n /* css */\n `\n a.framer-text,\n a.framer-text span.framer-text:not([data-text-fill]),\n span.framer-text[data-nested-link],\n span.framer-text[data-nested-link] span.framer-text:not([data-text-fill]) {\n font-family: var(--framer-blockquote-font-family, var(--framer-link-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif)));\n font-style: var(--framer-blockquote-font-style, var(--framer-link-font-style, var(--framer-font-style, normal)));\n font-weight: var(--framer-blockquote-font-weight, var(--framer-link-font-weight, var(--framer-font-weight, 400)));\n color: var(--framer-blockquote-text-color, var(--framer-link-text-color, var(--framer-text-color, #000)));\n font-size: calc(var(--framer-blockquote-font-size, var(--framer-font-size, 16px)) * var(--framer-font-size-scale, 1));\n text-transform: var(--framer-blockquote-text-transform, var(--framer-link-text-transform, var(--framer-text-transform, none)));\n text-decoration: var(--framer-blockquote-text-decoration, var(--framer-link-text-decoration, var(--framer-text-decoration, none)));\n /* Cursor inherit to overwrite the user agent stylesheet on rich text links. */\n cursor: var(--framer-custom-cursors, pointer);\n }\n `,\n /* css */\n `\n code.framer-text a.framer-text,\n code.framer-text a.framer-text span.framer-text:not([data-text-fill]),\n code.framer-text span.framer-text[data-nested-link],\n code.framer-text span.framer-text[data-nested-link] span.framer-text:not([data-text-fill]) {\n font-family: var(--framer-code-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif));\n font-style: var(--framer-blockquote-font-style, var(--framer-code-font-style, var(--framer-font-style, normal)));\n font-weight: var(--framer-blockquote-font-weight, var(--framer-code-font-weight, var(--framer-font-weight, 400)));\n color: var(--framer-blockquote-text-color, var(--framer-link-text-color, var(--framer-code-text-color, var(--framer-text-color, #000))));\n font-size: calc(var(--framer-blockquote-font-size, var(--framer-font-size, 16px)) * var(--framer-font-size-scale, 1));\n }\n `,\n /* css */\n `\n a.framer-text:hover,\n a.framer-text:hover span.framer-text:not([data-text-fill]),\n span.framer-text[data-nested-link]:hover,\n span.framer-text[data-nested-link]:hover span.framer-text:not([data-text-fill]) {\n font-family: var(--framer-link-hover-font-family, var(--framer-blockquote-font-family, var(--framer-link-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif))));\n font-style: var(--framer-link-hover-font-style, var(--framer-blockquote-font-style, var(--framer-link-font-style, var(--framer-font-style, normal))));\n font-weight: var(--framer-link-hover-font-weight, var(--framer-blockquote-font-weight, var(--framer-link-font-weight, var(--framer-font-weight, 400))));\n color: var(--framer-link-hover-text-color, var(--framer-blockquote-text-color, var(--framer-link-text-color, var(--framer-text-color, #000))));\n font-size: calc(var(--framer-link-hover-font-size, var(--framer-blockquote-font-size, var(--framer-font-size, 16px))) * var(--framer-font-size-scale, 1));\n text-transform: var(--framer-link-hover-text-transform, var(--framer-blockquote-text-transform, var(--framer-link-text-transform, var(--framer-text-transform, none))));\n text-decoration: var(--framer-link-hover-text-decoration, var(--framer-blockquote-text-decoration, var(--framer-link-text-decoration, var(--framer-text-decoration, none))));\n }\n `,\n /* css */\n `\n code.framer-text a.framer-text:hover,\n code.framer-text a.framer-text:hover span.framer-text:not([data-text-fill]),\n code.framer-text span.framer-text[data-nested-link]:hover,\n code.framer-text span.framer-text[data-nested-link]:hover span.framer-text:not([data-text-fill]) {\n font-family: var(var(--framer-code-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif)));\n font-style: var(--framer-blockquote-font-style, var(--framer-code-font-style, var(--framer-font-style, normal)));\n font-weight: var(--framer-blockquote-font-weight, var(--framer-code-font-weight, var(--framer-font-weight, 400)));\n color: var(--framer-link-hover-text-color, var(--framer-blockquote-text-color, var(--framer-link-text-color, var(--framer-code-text-color, var(--framer-text-color, #000)))));\n font-size: calc(var(--framer-link-hover-font-size, var(--framer-blockquote-font-size, var(--framer-link-font-size, var(--framer-font-size, 16px)))) * var(--framer-font-size-scale, 1));\n }\n `,\n /* css */\n `\n a.framer-text[data-framer-page-link-current],\n a.framer-text[data-framer-page-link-current] span.framer-text:not([data-text-fill]),\n span.framer-text[data-framer-page-link-current],\n span.framer-text[data-framer-page-link-current] span.framer-text:not([data-text-fill]) {\n font-family: var(--framer-link-current-font-family, var(--framer-link-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif)));\n font-style: var(--framer-link-current-font-style, var(--framer-link-font-style, var(--framer-font-style, normal)));\n font-weight: var(--framer-link-current-font-weight, var(--framer-link-font-weight, var(--framer-font-weight, 400)));\n color: var(--framer-link-current-text-color, var(--framer-link-text-color, var(--framer-text-color, #000)));\n font-size: calc(var(--framer-link-current-font-size, var(--framer-link-font-size, var(--framer-font-size, 16px))) * var(--framer-font-size-scale, 1));\n text-transform: var(--framer-link-current-text-transform, var(--framer-link-text-transform, var(--framer-text-transform, none)));\n text-decoration: var(--framer-link-current-text-decoration, var(--framer-link-text-decoration, var(--framer-text-decoration, none)));\n }\n `,\n /* css */\n `\n code.framer-text a.framer-text[data-framer-page-link-current],\n code.framer-text a.framer-text[data-framer-page-link-current] span.framer-text:not([data-text-fill]),\n code.framer-text span.framer-text[data-framer-page-link-current],\n code.framer-text span.framer-text[data-framer-page-link-current] span.framer-text:not([data-text-fill]) {\n font-family: var(--framer-code-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif));\n font-style: var(--framer-code-font-style, var(--framer-font-style, normal));\n font-weight: var(--framer-code-font-weight, var(--framer-font-weight, 400));\n color: var(--framer-link-current-text-color, var(--framer-link-text-color, var(--framer-code-text-color, var(--framer-text-color, #000))));\n font-size: calc(var(--framer-link-current-font-size, var(--framer-link-font-size, var(--framer-font-size, 16px))) * var(--framer-font-size-scale, 1));\n }\n `,\n /* css */\n `\n a.framer-text[data-framer-page-link-current]:hover,\n a.framer-text[data-framer-page-link-current]:hover span.framer-text:not([data-text-fill]),\n span.framer-text[data-framer-page-link-current]:hover,\n span.framer-text[data-framer-page-link-current]:hover span.framer-text:not([data-text-fill]) {\n font-family: var(--framer-link-hover-font-family, var(--framer-link-current-font-family, var(--framer-link-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif))));\n font-style: var(--framer-link-hover-font-style, var(--framer-link-current-font-style, var(--framer-link-font-style, var(--framer-font-style, normal))));\n font-weight: var(--framer-link-hover-font-weight, var(--framer-link-current-font-weight, var(--framer-link-font-weight, var(--framer-font-weight, 400))));\n color: var(--framer-link-hover-text-color, var(--framer-link-current-text-color, var(--framer-link-text-color, var(--framer-text-color, #000))));\n font-size: calc(var(--framer-link-hover-font-size, var(--framer-link-current-font-size, var(--framer-link-font-size, var(--framer-font-size, 16px)))) * var(--framer-font-size-scale, 1));\n text-transform: var(--framer-link-hover-text-transform, var(--framer-link-current-text-transform, var(--framer-link-text-transform, var(--framer-text-transform, none))));\n text-decoration: var(--framer-link-hover-text-decoration, var(--framer-link-current-text-decoration, var(--framer-link-text-decoration, var(--framer-text-decoration, none))));\n }\n `,\n /* css */\n `\n code.framer-text a.framer-text[data-framer-page-link-current]:hover,\n code.framer-text a.framer-text[data-framer-page-link-current]:hover span.framer-text:not([data-text-fill]),\n code.framer-text span.framer-text[data-framer-page-link-current]:hover,\n code.framer-text span.framer-text[data-framer-page-link-current]:hover span.framer-text:not([data-text-fill]) {\n font-family: var(--framer-code-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif));\n font-style: var(--framer-code-font-style, var(--framer-font-style, normal));\n font-weight: var(--framer-code-font-weight, var(--framer-font-weight, 400));\n color: var(--framer-link-hover-text-color, var(--framer-link-current-text-color, var(--framer-link-text-color, var(--framer-code-text-color, var(--framer-text-color, #000)))));\n font-size: calc(var(--framer-link-hover-font-size, var(--framer-link-current-font-size, var(--framer-link-font-size, var(--framer-font-size, 16px)))) * var(--framer-font-size-scale, 1));\n }\n `,\n /* css */\n `\n .framer-image.framer-text {\n display: block;\n max-width: 100%;\n height: auto;\n }\n `,\n /* css */\n `\n .text-styles-preset-reset.framer-text {\n --framer-font-family: Inter, Inter Placeholder, sans-serif;\n --framer-font-style: normal;\n --framer-font-weight: 500;\n --framer-text-color: #000;\n --framer-font-size: 16px;\n --framer-letter-spacing: 0;\n --framer-text-transform: none;\n --framer-text-decoration: none;\n --framer-line-height: 1.2em;\n --framer-text-alignment: start;\n --framer-font-open-type-features: normal;\n }\n `,\n /* css */\n `\n ol.framer-text {\n --list-style-type: decimal;\n }\n `,\n /* css */\n `\n ul.framer-text,\n ol.framer-text {\n display: table;\n width: 100%;\n }\n `,\n /* css */\n `\n li.framer-text {\n display: table-row;\n counter-increment: list-item;\n list-style: none;\n }\n `,\n /* css */\n `\n ol.framer-text > li.framer-text::before {\n display: table-cell;\n width: 2.25ch;\n box-sizing: border-box;\n padding-inline-end: 0.75ch;\n content: counter(list-item, var(--list-style-type)) \".\";\n white-space: nowrap;\n }\n `,\n /* css */\n `\n ul.framer-text > li.framer-text::before {\n display: table-cell;\n width: 2.25ch;\n box-sizing: border-box;\n padding-inline-end: 0.75ch;\n content: \"\\u2022\";\n }\n `,\n /* css */\n `\n .framer-text-module[style*=\"aspect-ratio\"] > :first-child {\n width: 100%;\n }\n `,\n /* css */\n `\n @supports not (aspect-ratio: 1) {\n .framer-text-module[style*=\"aspect-ratio\"] {\n position: relative;\n }\n }\n `,\n /* css */\n `\n @supports not (aspect-ratio: 1) {\n .framer-text-module[style*=\"aspect-ratio\"]::before {\n content: \"\";\n display: block;\n padding-bottom: calc(100% / calc(var(--aspect-ratio)));\n }\n }\n `,\n /* css */\n `\n @supports not (aspect-ratio: 1) {\n .framer-text-module[style*=\"aspect-ratio\"] > :first-child {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n }\n }\n `\n];\n\n// ../../library/src/render/utils/setDocumentStyles.ts\nvar defaultCache = /* @__PURE__ */ new Set();\nvar defaultSheet;\nfunction injectCSSRule(cssRule, sheet, cache2 = defaultCache) {\n if (!cssRule || cache2.has(cssRule) || typeof document === \"undefined\")\n return;\n cache2.add(cssRule);\n if (!sheet) {\n if (!defaultSheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.setAttribute(\"type\", \"text/css\");\n styleElement.setAttribute(\"data-framer-css\", \"true\");\n if (!document.head) {\n console.warn(\"not injecting CSS: the document is missing a element\");\n return;\n }\n document.head.appendChild(styleElement);\n if (styleElement.sheet) {\n defaultSheet = styleElement.sheet;\n } else {\n console.warn(\"not injecting CSS: injected