unframer 3.2.1 → 3.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/README.md +4 -4
  2. package/dist/cli.d.ts.map +1 -1
  3. package/dist/cli.js +106 -7
  4. package/dist/cli.js.map +1 -1
  5. package/dist/css.d.ts +5 -0
  6. package/dist/css.d.ts.map +1 -1
  7. package/dist/css.js +25 -0
  8. package/dist/css.js.map +1 -1
  9. package/dist/exporter.js +1 -1
  10. package/dist/exporter.js.map +1 -1
  11. package/dist/framer-chunks/chunk-VUHWYTYT.d.ts +15 -0
  12. package/dist/framer-chunks/chunk-VUHWYTYT.d.ts.map +1 -0
  13. package/dist/framer-chunks/chunk-VUHWYTYT.js +111 -0
  14. package/dist/framer-chunks/chunk-VUHWYTYT.js.map +1 -0
  15. package/dist/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.d.ts +634 -0
  16. package/dist/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.d.ts.map +1 -0
  17. package/dist/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.js +8 -0
  18. package/dist/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.js.map +1 -0
  19. package/dist/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.d.ts +115 -0
  20. package/dist/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.d.ts.map +1 -0
  21. package/dist/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.js +8 -0
  22. package/dist/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.js.map +1 -0
  23. package/dist/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.d.ts +781 -0
  24. package/dist/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.d.ts.map +1 -0
  25. package/dist/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.js +8 -0
  26. package/dist/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.js.map +1 -0
  27. package/dist/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.d.ts +18 -0
  28. package/dist/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.d.ts.map +1 -0
  29. package/dist/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.js +8 -0
  30. package/dist/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.js.map +1 -0
  31. package/dist/framer-chunks/google-63PUBKA6-AMAUIPXM.d.ts +1566 -0
  32. package/dist/framer-chunks/google-63PUBKA6-AMAUIPXM.d.ts.map +1 -0
  33. package/dist/framer-chunks/google-63PUBKA6-AMAUIPXM.js +8 -0
  34. package/dist/framer-chunks/google-63PUBKA6-AMAUIPXM.js.map +1 -0
  35. package/dist/framer-chunks/google-7QNFQWAU-FKX5MRKV.d.ts +3588 -0
  36. package/dist/framer-chunks/google-7QNFQWAU-FKX5MRKV.d.ts.map +1 -0
  37. package/dist/framer-chunks/google-7QNFQWAU-FKX5MRKV.js +8 -0
  38. package/dist/framer-chunks/google-7QNFQWAU-FKX5MRKV.js.map +1 -0
  39. package/dist/framer-chunks/google-KTMKGB4J-RA7CAZTC.d.ts +10293 -0
  40. package/dist/framer-chunks/google-KTMKGB4J-RA7CAZTC.d.ts.map +1 -0
  41. package/dist/framer-chunks/google-KTMKGB4J-RA7CAZTC.js +8 -0
  42. package/dist/framer-chunks/google-KTMKGB4J-RA7CAZTC.js.map +1 -0
  43. package/dist/framer.js +1477 -910
  44. package/dist/generated/api-client.d.ts +1 -1
  45. package/dist/generated/api-client.d.ts.map +1 -1
  46. package/dist/index.d.ts +3 -0
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +6 -1
  49. package/dist/index.js.map +1 -1
  50. package/dist/package-manager.d.ts +1 -1
  51. package/dist/package-manager.d.ts.map +1 -1
  52. package/dist/package-manager.js.map +1 -1
  53. package/dist/stackblitz.d.ts +9 -0
  54. package/dist/stackblitz.d.ts.map +1 -0
  55. package/dist/stackblitz.js +182 -0
  56. package/dist/stackblitz.js.map +1 -0
  57. package/dist/version.d.ts +1 -1
  58. package/dist/version.js +1 -1
  59. package/esm/cli.d.ts.map +1 -1
  60. package/esm/cli.js +108 -9
  61. package/esm/cli.js.map +1 -1
  62. package/esm/css.d.ts +5 -0
  63. package/esm/css.d.ts.map +1 -1
  64. package/esm/css.js +24 -0
  65. package/esm/css.js.map +1 -1
  66. package/esm/exporter.js +1 -1
  67. package/esm/exporter.js.map +1 -1
  68. package/esm/framer-chunks/chunk-VUHWYTYT.d.ts +15 -0
  69. package/esm/framer-chunks/chunk-VUHWYTYT.d.ts.map +1 -0
  70. package/esm/framer-chunks/chunk-VUHWYTYT.js +96 -0
  71. package/esm/framer-chunks/chunk-VUHWYTYT.js.map +1 -0
  72. package/esm/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.d.ts +634 -0
  73. package/esm/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.d.ts.map +1 -0
  74. package/esm/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.js +5 -0
  75. package/esm/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.js.map +1 -0
  76. package/esm/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.d.ts +115 -0
  77. package/esm/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.d.ts.map +1 -0
  78. package/esm/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.js +5 -0
  79. package/esm/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.js.map +1 -0
  80. package/esm/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.d.ts +781 -0
  81. package/esm/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.d.ts.map +1 -0
  82. package/esm/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.js +5 -0
  83. package/esm/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.js.map +1 -0
  84. package/esm/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.d.ts +18 -0
  85. package/esm/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.d.ts.map +1 -0
  86. package/esm/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.js +5 -0
  87. package/esm/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.js.map +1 -0
  88. package/esm/framer-chunks/google-63PUBKA6-AMAUIPXM.d.ts +1566 -0
  89. package/esm/framer-chunks/google-63PUBKA6-AMAUIPXM.d.ts.map +1 -0
  90. package/esm/framer-chunks/google-63PUBKA6-AMAUIPXM.js +5 -0
  91. package/esm/framer-chunks/google-63PUBKA6-AMAUIPXM.js.map +1 -0
  92. package/esm/framer-chunks/google-7QNFQWAU-FKX5MRKV.d.ts +3588 -0
  93. package/esm/framer-chunks/google-7QNFQWAU-FKX5MRKV.d.ts.map +1 -0
  94. package/esm/framer-chunks/google-7QNFQWAU-FKX5MRKV.js +5 -0
  95. package/esm/framer-chunks/google-7QNFQWAU-FKX5MRKV.js.map +1 -0
  96. package/esm/framer-chunks/google-KTMKGB4J-RA7CAZTC.d.ts +10293 -0
  97. package/esm/framer-chunks/google-KTMKGB4J-RA7CAZTC.d.ts.map +1 -0
  98. package/esm/framer-chunks/google-KTMKGB4J-RA7CAZTC.js +5 -0
  99. package/esm/framer-chunks/google-KTMKGB4J-RA7CAZTC.js.map +1 -0
  100. package/esm/framer.js +1214 -650
  101. package/esm/index.d.ts +3 -0
  102. package/esm/index.d.ts.map +1 -1
  103. package/esm/index.js +4 -0
  104. package/esm/index.js.map +1 -1
  105. package/esm/package-manager.d.ts +1 -1
  106. package/esm/package-manager.d.ts.map +1 -1
  107. package/esm/package-manager.js.map +1 -1
  108. package/esm/stackblitz.d.ts +9 -0
  109. package/esm/stackblitz.d.ts.map +1 -0
  110. package/esm/stackblitz.js +179 -0
  111. package/esm/stackblitz.js.map +1 -0
  112. package/esm/version.d.ts +1 -1
  113. package/esm/version.js +1 -1
  114. package/package.json +3 -3
  115. package/src/cli.ts +122 -11
  116. package/src/{css.ts → css.tsx} +38 -0
  117. package/src/exporter.ts +8 -8
  118. package/src/framer-chunks/chunk-VUHWYTYT.js +105 -0
  119. package/src/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.js +7 -0
  120. package/src/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.js +7 -0
  121. package/src/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.js +7 -0
  122. package/src/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.js +7 -0
  123. package/src/framer-chunks/google-63PUBKA6-AMAUIPXM.js +7 -0
  124. package/src/framer-chunks/google-7QNFQWAU-FKX5MRKV.js +7 -0
  125. package/src/framer-chunks/google-KTMKGB4J-RA7CAZTC.js +7 -0
  126. package/src/framer.js +1207 -634
  127. package/src/index.ts +6 -0
  128. package/src/package-manager.ts +2 -4
  129. package/src/stackblitz.ts +193 -0
  130. package/src/styles/framer.css +24 -0
  131. package/src/version.ts +1 -1
package/dist/framer.js CHANGED
@@ -36,12 +36,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.CustomCursorHost = exports.cubicBezierAsString = exports.createBox = exports.ConvertColor = exports.ControlType = exports.Container = exports.ConstraintValues = exports.ConstraintMask = exports.ComponentViewportProvider = exports.ComponentContainerContext = exports.complex = exports.combinedCSSRulesForPreview = exports.ColorMixModelType = exports.ColorFormat = exports.color = exports.Color = exports.collectMotionValues = exports.clamp = exports.circOut = exports.circInOut = exports.circIn = exports.cancelSync = exports.cancelMicrotask = exports.cancelFrame = exports.callEach = exports.BoxShadow = exports.BezierAnimator = exports.backOut = exports.backInOut = exports.backIn = exports.BackgroundImage = exports.attrEffect = exports.AsyncMotionValueAnimation = exports.AnyInterpolation = exports.anticipate = exports.animations = exports.animationMapKey = exports.AnimateSharedLayout = exports.AnimatePresence = exports.animateMini = exports.animate = exports.Animatable = exports.AnchorLinkTarget = exports.alpha = exports.addStyleValue = exports.addPointerInfo = exports.addAttrValue = exports.activeAnimations = exports.acceleratedValues = exports.combinedCSSRules = void 0;
40
- exports.framerAppearTransformTemplateToken = exports.framerAppearIdKey = exports.framerAppearEffects = exports.framerAppearAnimationScriptKey = exports.FramerAnimation = exports.frameFromElements = exports.frameFromElement = exports.frameData = exports.frame = exports.Frame = exports.FormSelect = exports.FormPlainTextInput = exports.FormContainer = exports.FormBooleanInput = exports.fontStore = exports.FontSourceNames = exports.FlatTree = exports.findValueType = exports.findDimensionValueType = exports.Fetcher = exports.environment = exports.easingDefinitionToFunction = exports.easeOut = exports.easeInOut = exports.easeIn = exports.Draggable = exports.DragControls = exports.domMin = exports.domMax = exports.DOMKeyframesResolver = exports.domAnimation = exports.DOM = exports.distance = exports.dispatchKeyDownEvent = exports.dimensionValueTypes = exports.DimensionType = exports.devicePresets = exports.DeviceCodeComponent = exports.LayoutGroupContext = exports.DeprecatedLayoutGroupContext = exports.DeprecatedFrameWithEvents = exports.DeprecatedComponentContainer = exports.degrees = exports.defaultValueTypes = exports.defaultDeviceProps = exports.DataObserverContext = exports.DataObserver = exports.DataContext = exports.Data = exports.CycleVariantState = void 0;
41
- exports.millisecondsToSeconds = exports.microtask = exports.maxGeneratorDuration = exports.makeUseVisualState = exports.MainLoop = exports.m = exports.localPackageFallbackIdentifier = exports.loadFont = exports.Link = exports.LinearGradient = exports.Line = exports.LibraryFeaturesProvider = exports.LazyValue = exports.LayoutIdContext = exports.LayoutGroup = exports.Layer = exports.KeyframeResolver = exports.JSAnimation = exports.isZeroValueString = exports.isPrimaryPointer = exports.isNumericalString = exports.isNodeOrChild = exports.isMotionValue = exports.isEasingArray = exports.isDragging = exports.isCSSVariableToken = exports.isCSSVariableName = exports.isBrowser = exports.isBezierDefinition = exports.invisibleValues = exports.invariant = exports.InternalID = exports.Instance = exports.Image = exports.hsla = exports.hex = exports.GroupAnimationWithThen = exports.GroupAnimation = exports.GracefullyDegradingErrorBoundary = exports.getValueAsType = exports.getDefaultValueType = exports.generateLinearEasing = exports.GeneratedComponentContext = exports.GamepadContext = exports.FrameWithMotion = exports.frameSteps = exports.FramerEventSession = exports.FramerEventListener = exports.FramerEvent = exports.framerCSSMarker = void 0;
42
- exports.ResolveLinks = exports.RenderTarget = exports.Rect = exports.readTransformValue = exports.RadialGradient = exports.QueryEngine = exports.QueryCache = exports.px = exports.PropertyStore = exports.PropertyOverrides = exports.propEffect = exports.progressPercentage = exports.progress = exports.PresenceContext = exports.positionalKeys = exports.Polygon = exports.pipe = exports.percent = exports.PathVariablesContext = exports.PathSegment = exports.pathDefaults = exports.ParentSizeState = exports.Page = exports.optimizedAppearDataAttribute = exports.optimizeAppearTransformTemplate = exports.optimizeAppear = exports.ObservableObject = exports.numberValueTypes = exports.number = exports.NotFoundError = exports.noop = exports.nestedLinksCollector = exports.NavigationTransitionType = exports.NavigationConsumer = exports.NavigationCallbackProvider = exports.NavigateTo = exports.NativeAnimationWrapper = exports.NativeAnimationExtended = exports.NativeAnimation = exports.Reorder = exports.MotionValue = exports.MotionGlobalConfig = exports.MotionContext = exports.MotionConfigContext = exports.motion = exports.mixNumber = exports.mixLinearColor = exports.mixComplex = exports.mixColor = exports.mirrorEasing = void 0;
43
- exports.WindowContext = exports.WillChangeMotionValue = exports.warning = exports.vw = exports.visualElementStore = exports.VisualElement = exports.ViewTransitionBuilder = exports.vh = exports.version = exports.VectorGroup = exports.Vector = exports.VariantSelector = exports.ValueInterpolation = exports.useProvidedWindow = exports.useIsomorphicLayoutEffect = exports.useAnimation = exports.transformValueTypes = exports.transformProps = exports.transformPropOrder = exports.time = exports.Text = exports.testValueType = exports.systemFontFamilyName = exports.sync = exports.SwitchLayoutGroupContext = exports.svgEffect = exports.SVG = exports.supportsScrollTimeline = exports.supportsPartialKeyframes = exports.supportsLinearEasing = exports.supportsFlags = exports.supportedWaapiEasing = exports.SubscriptionManager = exports.StyleSheetContext = exports.styleEffect = exports.statsBuffer = exports.Stack = exports.SSRVariants = exports.SpringAnimator = exports.SmartComponentScopedContainer = exports.Size = exports.sharedSVGManager = exports.Shadow = exports.secondsToMilliseconds = exports.Scroll = exports.scale = exports.RichText = exports.rgbUnit = exports.rgba = exports.reverseEasing = void 0;
44
- exports.LocaleInfoContext = exports.FormContext = exports.FetchClientProvider = exports.FramerLink = exports.wrap = exports.withVariantFX = exports.withVariantAppearEffect = exports.withV1StrokeFX = exports.withStyleAppearEffect = exports.withParallaxTransform = exports.withMeasuredSize = exports.withGeneratedLayoutId = exports.withFX = exports.withCSS = void 0;
39
+ exports.cubicBezierAsString = exports.cssCollector = exports.createBox = exports.ConvertColor = exports.ControlType = exports.Container = exports.ConstraintValues = exports.ConstraintMask = exports.ComponentViewportProvider = exports.ComponentContainerContext = exports.complex = exports.combinedCSSRulesForPreview = exports.ColorMixModelType = exports.ColorFormat = exports.color = exports.Color = exports.collectMotionValues = exports.clamp = exports.circOut = exports.circInOut = exports.circIn = exports.cancelSync = exports.cancelMicrotask = exports.cancelFrame = exports.callEach = exports.BoxShadow = exports.BezierAnimator = exports.backOut = exports.backInOut = exports.backIn = exports.BackgroundImage = exports.attrEffect = exports.AsyncMotionValueAnimation = exports.AnyInterpolation = exports.anticipate = exports.animations = exports.animationMapKey = exports.AnimateSharedLayout = exports.AnimatePresence = exports.animateMini = exports.animate = exports.Animatable = exports.AnchorLinkTarget = exports.alpha = exports.addStyleValue = exports.addPointerInfo = exports.addAttrValue = exports.activeAnimations = exports.acceleratedValues = exports.combinedCSSRules = void 0;
40
+ exports.framerAppearIdKey = exports.framerAppearEffects = exports.framerAppearAnimationScriptKey = exports.FramerAnimation = exports.frameFromElements = exports.frameFromElement = exports.frameData = exports.frame = exports.Frame = exports.FormSelect = exports.FormPlainTextInput = exports.FormContainer = exports.FormBooleanInput = exports.fontStore = exports.FontSourceNames = exports.FlatTree = exports.findValueType = exports.findDimensionValueType = exports.Fetcher = exports.environment = exports.easingDefinitionToFunction = exports.easeOut = exports.easeInOut = exports.easeIn = exports.Draggable = exports.DragControls = exports.domMin = exports.domMax = exports.DOMKeyframesResolver = exports.domAnimation = exports.DOM = exports.distance = exports.dispatchKeyDownEvent = exports.dimensionValueTypes = exports.DimensionType = exports.devicePresets = exports.DeviceCodeComponent = exports.LayoutGroupContext = exports.DeprecatedLayoutGroupContext = exports.DeprecatedFrameWithEvents = exports.DeprecatedComponentContainer = exports.degrees = exports.defaultValueTypes = exports.defaultDeviceProps = exports.DataObserverContext = exports.DataObserver = exports.DataContext = exports.Data = exports.CycleVariantState = exports.CustomCursorHost = void 0;
41
+ exports.microtask = exports.maxGeneratorDuration = exports.makeUseVisualState = exports.MainLoop = exports.m = exports.localPackageFallbackIdentifier = exports.loadFont = exports.Link = exports.LinearGradient = exports.Line = exports.LibraryFeaturesProvider = exports.LazyValue = exports.LayoutIdContext = exports.LayoutGroup = exports.Layer = exports.KeyframeResolver = exports.JSAnimation = exports.isZeroValueString = exports.isPrimaryPointer = exports.isNumericalString = exports.isNodeOrChild = exports.isMotionValue = exports.isEasingArray = exports.isDragging = exports.isCSSVariableToken = exports.isCSSVariableName = exports.isBrowser = exports.isBezierDefinition = exports.invisibleValues = exports.invariant = exports.InternalID = exports.Instance = exports.Image = exports.hsla = exports.hex = exports.GroupAnimationWithThen = exports.GroupAnimation = exports.GracefullyDegradingErrorBoundary = exports.getValueAsType = exports.getDefaultValueType = exports.generateLinearEasing = exports.GeneratedComponentContext = exports.GamepadContext = exports.FrameWithMotion = exports.frameSteps = exports.FramerEventSession = exports.FramerEventListener = exports.FramerEvent = exports.framerCSSMarker = exports.framerAppearTransformTemplateToken = void 0;
42
+ exports.RenderTarget = exports.Rect = exports.readTransformValue = exports.RadialGradient = exports.QueryEngine = exports.QueryCache = exports.px = exports.PropertyStore = exports.PropertyOverrides = exports.propEffect = exports.progressPercentage = exports.progress = exports.PresenceContext = exports.positionalKeys = exports.Polygon = exports.pipe = exports.percent = exports.PathVariablesContext = exports.PathSegment = exports.pathDefaults = exports.ParentSizeState = exports.Page = exports.optimizedAppearDataAttribute = exports.optimizeAppearTransformTemplate = exports.optimizeAppear = exports.ObservableObject = exports.numberValueTypes = exports.number = exports.NotFoundError = exports.noop = exports.nestedLinksCollector = exports.NavigationTransitionType = exports.NavigationConsumer = exports.NavigationCallbackProvider = exports.NavigateTo = exports.NativeAnimationWrapper = exports.NativeAnimationExtended = exports.NativeAnimation = exports.Reorder = exports.MotionValue = exports.MotionGlobalConfig = exports.MotionContext = exports.MotionConfigContext = exports.motion = exports.mixNumber = exports.mixLinearColor = exports.mixComplex = exports.mixColor = exports.mirrorEasing = exports.millisecondsToSeconds = void 0;
43
+ exports.WillChangeMotionValue = exports.warning = exports.vw = exports.visualElementStore = exports.VisualElement = exports.ViewTransitionBuilder = exports.vh = exports.version = exports.VectorGroup = exports.Vector = exports.VariantSelector = exports.ValueInterpolation = exports.useProvidedWindow = exports.useIsomorphicLayoutEffect = exports.useAnimation = exports.transformValueTypes = exports.transformProps = exports.transformPropOrder = exports.time = exports.Text = exports.testValueType = exports.systemFontFamilyName = exports.sync = exports.SwitchLayoutGroupContext = exports.svgEffect = exports.SVG = exports.supportsScrollTimeline = exports.supportsPartialKeyframes = exports.supportsLinearEasing = exports.supportsFlags = exports.supportedWaapiEasing = exports.SubscriptionManager = exports.StyleSheetContext = exports.styleEffect = exports.statsBuffer = exports.Stack = exports.SSRVariants = exports.SpringAnimator = exports.SmartComponentScopedContainer = exports.Size = exports.sharedSVGManager = exports.Shadow = exports.secondsToMilliseconds = exports.Scroll = exports.scale = exports.RichText = exports.rgbUnit = exports.rgba = exports.reverseEasing = exports.ResolveLinks = void 0;
44
+ exports.LocaleInfoContext = exports.FormContext = exports.FetchClientProvider = exports.FramerLink = exports.wrap = exports.withVariantFX = exports.withVariantAppearEffect = exports.withV1StrokeFX = exports.withStyleAppearEffect = exports.withParallaxTransform = exports.withMeasuredSize = exports.withGeneratedLayoutId = exports.withFX = exports.withCSS = exports.WindowContext = void 0;
45
45
  exports._injectRuntime = _injectRuntime;
46
46
  exports.addActionControls = addActionControls;
47
47
  exports.addFonts = addFonts;
@@ -193,6 +193,7 @@ exports.recordStats = recordStats;
193
193
  exports.removeHiddenBreakpointLayers = removeHiddenBreakpointLayers;
194
194
  exports.removeHiddenBreakpointLayersV2 = removeHiddenBreakpointLayersV2;
195
195
  exports.removeItem = removeItem;
196
+ exports.ResetOuterLinkContext = ResetOuterLinkContext;
196
197
  exports.resize = resize;
197
198
  exports.resolveElements = resolveElements;
198
199
  exports.resolveLink = resolveLink;
@@ -282,6 +283,7 @@ exports.useOnCurrentTargetChange = useOnCurrentTargetChange;
282
283
  exports.useOnVariantChange = useOnVariantChange;
283
284
  exports.useOverlayState = useOverlayState;
284
285
  exports.usePageEffects = usePageEffects;
286
+ exports.usePageInView = usePageInView;
285
287
  exports.usePrefetch = usePrefetch;
286
288
  exports.usePreloadQuery = usePreloadQuery;
287
289
  exports.usePresence = usePresence;
@@ -325,7 +327,7 @@ exports.withShape = withShape;
325
327
  exports.yieldToMain = yieldToMain;
326
328
  exports.Router = Router;
327
329
  const chunk_A2PMVMFI_js_1 = require("./framer-chunks/chunk-A2PMVMFI.js");
328
- // /:https://app.framerstatic.com/chunk-BLFSVU7M.mjs
330
+ // /:https://app.framerstatic.com/chunk-VDW2YK33.mjs
329
331
  const react_1 = require("react");
330
332
  const react_2 = require("react");
331
333
  const react_3 = require("react");
@@ -698,11 +700,11 @@ function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
698
700
  isProcessing: false,
699
701
  };
700
702
  const flagRunNextFrame = () => runNextFrame = true;
701
- const steps2 = stepsOrder.reduce((acc, key7) => {
703
+ const steps22 = stepsOrder.reduce((acc, key7) => {
702
704
  acc[key7] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key7 : void 0);
703
705
  return acc;
704
706
  }, {});
705
- const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps2;
707
+ const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps22;
706
708
  const processBatch = () => {
707
709
  const timestamp = MotionGlobalConfig.useManualTiming ? state.timestamp : performance.now();
708
710
  runNextFrame = false;
@@ -733,7 +735,7 @@ function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
733
735
  }
734
736
  };
735
737
  const schedule = stepsOrder.reduce((acc, key7) => {
736
- const step2 = steps2[key7];
738
+ const step2 = steps22[key7];
737
739
  acc[key7] = (process2, keepAlive = false, immediate = false) => {
738
740
  if (!runNextFrame)
739
741
  wake();
@@ -743,14 +745,14 @@ function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
743
745
  }, {});
744
746
  const cancel = (process2) => {
745
747
  for (let i = 0; i < stepsOrder.length; i++) {
746
- steps2[stepsOrder[i]].cancel(process2);
748
+ steps22[stepsOrder[i]].cancel(process2);
747
749
  }
748
750
  };
749
751
  return {
750
752
  schedule,
751
753
  cancel,
752
754
  state,
753
- steps: steps2,
755
+ steps: steps22,
754
756
  };
755
757
  }
756
758
  var { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== 'undefined' ? requestAnimationFrame : noop, true);
@@ -923,6 +925,11 @@ var color = {
923
925
  transform: (v) => {
924
926
  return typeof v === 'string' ? v : v.hasOwnProperty('red') ? rgba.transform(v) : hsla.transform(v);
925
927
  },
928
+ getAnimatableNone: (v) => {
929
+ const parsed = color.parse(v);
930
+ parsed.alpha = 0;
931
+ return color.transform(parsed);
932
+ },
926
933
  };
927
934
  exports.color = color;
928
935
  var colorRegex = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
@@ -1001,7 +1008,7 @@ function createTransformer(source) {
1001
1008
  return output;
1002
1009
  };
1003
1010
  }
1004
- var convertNumbersToZero = (v) => typeof v === 'number' ? 0 : v;
1011
+ var convertNumbersToZero = (v) => typeof v === 'number' ? 0 : color.test(v) ? color.getAnimatableNone(v) : v;
1005
1012
  function getAnimatableNone(v) {
1006
1013
  const parsed = parseComplexValue(v);
1007
1014
  const transformer = createTransformer(v);
@@ -1198,7 +1205,7 @@ var generateLinearEasing = (easing, duration, resolution = 10) => {
1198
1205
  let points = '';
1199
1206
  const numPoints = Math.max(Math.round(duration / resolution), 2);
1200
1207
  for (let i = 0; i < numPoints; i++) {
1201
- points += easing(i / (numPoints - 1)) + ', ';
1208
+ points += Math.round(easing(i / (numPoints - 1)) * 1e4) / 1e4 + ', ';
1202
1209
  }
1203
1210
  return `linear(${points.substring(0, points.length - 2)})`;
1204
1211
  };
@@ -4327,7 +4334,7 @@ function addToQueue(builder) {
4327
4334
  }
4328
4335
  var ViewTransitionBuilder = class {
4329
4336
  constructor(update, options = {}) {
4330
- this.currentTarget = 'root';
4337
+ this.currentSubject = 'root';
4331
4338
  this.targets = /* @__PURE__ */ new Map();
4332
4339
  this.notifyReady = noop;
4333
4340
  this.readyPromise = new Promise((resolve) => {
@@ -4340,8 +4347,8 @@ var ViewTransitionBuilder = class {
4340
4347
  };
4341
4348
  addToQueue(this);
4342
4349
  }
4343
- get(selector) {
4344
- this.currentTarget = selector;
4350
+ get(subject) {
4351
+ this.currentSubject = subject;
4345
4352
  return this;
4346
4353
  }
4347
4354
  layout(keyframes2, options) {
@@ -4374,11 +4381,11 @@ var ViewTransitionBuilder = class {
4374
4381
  return this;
4375
4382
  }
4376
4383
  updateTarget(target, keyframes2, options = {}) {
4377
- const { currentTarget, targets, } = this;
4378
- if (!targets.has(currentTarget)) {
4379
- targets.set(currentTarget, {});
4384
+ const { currentSubject, targets, } = this;
4385
+ if (!targets.has(currentSubject)) {
4386
+ targets.set(currentSubject, {});
4380
4387
  }
4381
- const targetData = targets.get(currentTarget);
4388
+ const targetData = targets.get(currentSubject);
4382
4389
  targetData[target] = {
4383
4390
  keyframes: keyframes2,
4384
4391
  options,
@@ -4455,7 +4462,7 @@ var PopChildMeasure = class extends React2.Component {
4455
4462
  return this.props.children;
4456
4463
  }
4457
4464
  };
4458
- function PopChild({ children, isPresent: isPresent2, anchorX, }) {
4465
+ function PopChild({ children, isPresent: isPresent2, anchorX, root, }) {
4459
4466
  const id4 = (0, react_3.useId)();
4460
4467
  const ref = (0, react_4.useRef)(null);
4461
4468
  const size = (0, react_4.useRef)({
@@ -4475,7 +4482,8 @@ function PopChild({ children, isPresent: isPresent2, anchorX, }) {
4475
4482
  const style2 = document.createElement('style');
4476
4483
  if (nonce)
4477
4484
  style2.nonce = nonce;
4478
- document.head.appendChild(style2);
4485
+ const parent = root ?? document.head;
4486
+ parent.appendChild(style2);
4479
4487
  if (style2.sheet) {
4480
4488
  style2.sheet.insertRule(`
4481
4489
  [data-motion-pop-id="${id4}"] {
@@ -4488,8 +4496,9 @@ function PopChild({ children, isPresent: isPresent2, anchorX, }) {
4488
4496
  `);
4489
4497
  }
4490
4498
  return () => {
4491
- if (document.head.contains(style2)) {
4492
- document.head.removeChild(style2);
4499
+ parent.removeChild(style2);
4500
+ if (parent.contains(style2)) {
4501
+ parent.removeChild(style2);
4493
4502
  }
4494
4503
  };
4495
4504
  }, [isPresent2,]);
@@ -4502,7 +4511,7 @@ function PopChild({ children, isPresent: isPresent2, anchorX, }) {
4502
4511
  }),
4503
4512
  });
4504
4513
  }
4505
- var PresenceChild = ({ children, initial, isPresent: isPresent2, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, }) => {
4514
+ var PresenceChild = ({ children, initial, isPresent: isPresent2, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, root, }) => {
4506
4515
  const presenceChildren = useConstant(newChildrenMap);
4507
4516
  const id4 = (0, react_3.useId)();
4508
4517
  let isReusedContext = true;
@@ -4542,6 +4551,7 @@ var PresenceChild = ({ children, initial, isPresent: isPresent2, onExitComplete,
4542
4551
  children = (0, jsx_runtime_1.jsx)(PopChild, {
4543
4552
  isPresent: isPresent2,
4544
4553
  anchorX,
4554
+ root,
4545
4555
  children,
4546
4556
  });
4547
4557
  }
@@ -4562,7 +4572,7 @@ function onlyElements(children) {
4562
4572
  });
4563
4573
  return filtered;
4564
4574
  }
4565
- var AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = 'sync', propagate = false, anchorX = 'left', }) => {
4575
+ var AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = 'sync', propagate = false, anchorX = 'left', root, }) => {
4566
4576
  const [isParentPresent, safeToRemove,] = usePresence(propagate);
4567
4577
  const presentChildren = (0, react_4.useMemo)(() => onlyElements(children), [children,]);
4568
4578
  const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey);
@@ -4637,6 +4647,7 @@ var AnimatePresence = ({ children, custom, initial = true, onExitComplete, prese
4637
4647
  custom,
4638
4648
  presenceAffectsLayout,
4639
4649
  mode,
4650
+ root,
4640
4651
  onExitComplete: isPresent2 ? void 0 : onExit,
4641
4652
  anchorX,
4642
4653
  children: child,
@@ -4810,7 +4821,7 @@ function isValidMotionProp(key7) {
4810
4821
  }
4811
4822
  var shouldForward = (key7) => !isValidMotionProp(key7);
4812
4823
  function loadExternalIsValidProp(isValidProp) {
4813
- if (!isValidProp)
4824
+ if (typeof isValidProp !== 'function')
4814
4825
  return;
4815
4826
  shouldForward = (key7) => key7.startsWith('on') ? !isValidMotionProp(key7) : isValidProp(key7);
4816
4827
  }
@@ -7894,6 +7905,7 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
7894
7905
  constructor(latestValues = {}, parent = defaultParent == null ? void 0 : defaultParent()) {
7895
7906
  this.id = id2++;
7896
7907
  this.animationId = 0;
7908
+ this.animationCommitId = 0;
7897
7909
  this.children = /* @__PURE__ */ new Set();
7898
7910
  this.options = {};
7899
7911
  this.isTreeAnimating = false;
@@ -8113,9 +8125,14 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
8113
8125
  this.nodes.forEach(clearMeasurements);
8114
8126
  return;
8115
8127
  }
8128
+ if (this.animationId <= this.animationCommitId) {
8129
+ this.nodes.forEach(clearIsLayoutDirty);
8130
+ return;
8131
+ }
8116
8132
  if (!this.isUpdating) {
8117
8133
  this.nodes.forEach(clearIsLayoutDirty);
8118
8134
  }
8135
+ this.animationCommitId = this.animationId;
8119
8136
  this.isUpdating = false;
8120
8137
  this.nodes.forEach(resetTransformStyle);
8121
8138
  this.nodes.forEach(updateLayout);
@@ -9997,6 +10014,9 @@ function calcNextTime(current2, next2, prev, labels) {
9997
10014
  else if (next2 === '<') {
9998
10015
  return prev;
9999
10016
  }
10017
+ else if (next2.startsWith('<')) {
10018
+ return Math.max(0, prev + parseFloat(next2.slice(1)));
10019
+ }
10000
10020
  else {
10001
10021
  return labels.get(next2) ?? current2;
10002
10022
  }
@@ -10069,7 +10089,7 @@ function createAnimationsFromSequence(sequence2, { defaultTransition = {}, ...se
10069
10089
  let { ease: ease2 = defaultTransition.ease || 'easeOut', duration, } = valueTransition;
10070
10090
  const calculatedDelay = typeof delay2 === 'function' ? delay2(elementIndex, numSubjects) : delay2;
10071
10091
  const numKeyframes = valueKeyframesAsList.length;
10072
- const createGenerator = isGenerator(type) ? type : generators == null ? void 0 : generators[type];
10092
+ const createGenerator = isGenerator(type) ? type : generators == null ? void 0 : generators[type || 'keyframes'];
10073
10093
  if (numKeyframes <= 2 && createGenerator) {
10074
10094
  let absoluteDelta = 100;
10075
10095
  if (numKeyframes === 2 && isNumberKeyframesArray(valueKeyframesAsList)) {
@@ -10328,6 +10348,9 @@ function createScopedAnimate(scope) {
10328
10348
  const animation = new GroupAnimationWithThen(animations2);
10329
10349
  if (scope) {
10330
10350
  scope.animations.push(animation);
10351
+ animation.finished.then(() => {
10352
+ removeItem(scope.animations, animation);
10353
+ });
10331
10354
  }
10332
10355
  return animation;
10333
10356
  }
@@ -10343,6 +10366,7 @@ function useAnimate() {
10343
10366
  const animate22 = useConstant(() => createScopedAnimate(scope));
10344
10367
  useUnmountEffect(() => {
10345
10368
  scope.animations.forEach((animation) => animation.stop());
10369
+ scope.animations.length = 0;
10346
10370
  });
10347
10371
  return [scope, animate22,];
10348
10372
  }
@@ -10603,6 +10627,20 @@ function useInstantTransition() {
10603
10627
  function disableInstantTransitions() {
10604
10628
  MotionGlobalConfig.instantAnimations = false;
10605
10629
  }
10630
+ function usePageInView() {
10631
+ const [isInView, setIsInView,] = (0, react_4.useState)(true);
10632
+ (0, react_2.useEffect)(() => {
10633
+ const handleVisibilityChange = () => setIsInView(!document.hidden);
10634
+ if (document.hidden) {
10635
+ handleVisibilityChange();
10636
+ }
10637
+ document.addEventListener('visibilitychange', handleVisibilityChange);
10638
+ return () => {
10639
+ document.removeEventListener('visibilitychange', handleVisibilityChange);
10640
+ };
10641
+ }, []);
10642
+ return isInView;
10643
+ }
10606
10644
  var appearAnimationStore = /* @__PURE__ */ new Map();
10607
10645
  var appearComplete = /* @__PURE__ */ new Map();
10608
10646
  var appearStoreId = (elementId, valueName) => {
@@ -10959,15 +10997,16 @@ function stagger(duration = 0.1, { startDelay = 0, from = 0, ease: ease2, } = {}
10959
10997
  return startDelay + delay2;
10960
10998
  };
10961
10999
  }
10962
- // /:https://app.framerstatic.com/framer.ZNMFLOLI.mjs
10963
- const react_10 = require("react");
10964
- const react_11 = __importDefault(require("react"));
11000
+ // /:https://app.framerstatic.com/framer.L7DRXRFF.mjs
11001
+ const react_10 = __importDefault(require("react"));
11002
+ const react_11 = require("react");
10965
11003
  const react_12 = require("react");
10966
11004
  const react_13 = require("react");
10967
- const react_14 = require("react");
10968
11005
  const react_dom_1 = __importDefault(require("react-dom"));
11006
+ const react_14 = require("react");
10969
11007
  const react_15 = require("react");
10970
11008
  const react_16 = require("react");
11009
+ const react_dom_2 = require("react-dom");
10971
11010
  const react_17 = require("react");
10972
11011
  var __unframerNavigator2 = typeof window !== 'undefined' ? navigator : void 0;
10973
11012
  var require_hsluv = (0, chunk_A2PMVMFI_js_1.__commonJS)({
@@ -11903,37 +11942,47 @@ var preloadKey = 'preload';
11903
11942
  function isLazyComponentType(componentType) {
11904
11943
  return typeof componentType === 'object' && componentType !== null && !(0, react_6.isValidElement)(componentType) && preloadKey in componentType;
11905
11944
  }
11906
- function lazy(factory) {
11907
- const LazyComponent = (0, react_10.lazy)(factory);
11945
+ function lazy(factory, moduleName = 'default') {
11908
11946
  let factoryPromise;
11909
11947
  let LoadedComponent;
11910
11948
  let hasRendered = false;
11911
- const Component17 = (0, react_7.forwardRef)(function LazyWithPreload(props, ref) {
11912
- (0, react_2.useEffect)(() => {
11913
- hasRendered = true;
11914
- }, []);
11915
- const Comp = LoadedComponent ?? LazyComponent;
11916
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Comp, {
11917
- ref,
11918
- ...props,
11919
- });
11920
- });
11921
- Component17.preload = () => {
11949
+ let error;
11950
+ const load = () => {
11922
11951
  if (!factoryPromise) {
11923
11952
  factoryPromise = factory().then((module) => {
11924
- LoadedComponent = module.default;
11953
+ if (!(moduleName in module))
11954
+ throw new Error(`Module does not contain export '${moduleName}'`);
11955
+ LoadedComponent = module[moduleName];
11925
11956
  return LoadedComponent;
11957
+ }).catch((err) => {
11958
+ error = err;
11926
11959
  });
11927
11960
  }
11928
11961
  return factoryPromise;
11929
11962
  };
11930
- Component17.getStatus = () => {
11963
+ const Component18 = (0, react_7.forwardRef)(function LazyWithPreload(props, ref) {
11964
+ (0, react_2.useEffect)(() => {
11965
+ hasRendered = true;
11966
+ }, []);
11967
+ if (error) {
11968
+ throw error;
11969
+ }
11970
+ if (!LoadedComponent) {
11971
+ throw load();
11972
+ }
11973
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(LoadedComponent, {
11974
+ ref,
11975
+ ...props,
11976
+ });
11977
+ });
11978
+ Component18.preload = load;
11979
+ Component18.getStatus = () => {
11931
11980
  return {
11932
11981
  hasLoaded: LoadedComponent !== void 0,
11933
11982
  hasRendered,
11934
11983
  };
11935
11984
  };
11936
- return Component17;
11985
+ return Component18;
11937
11986
  }
11938
11987
  var objectKeys = Object.keys;
11939
11988
  function hasProp(o, prop) {
@@ -12113,9 +12162,9 @@ function isEqual(a, b, deep = true) {
12113
12162
  }
12114
12163
  }
12115
12164
  function useGetRouteCallback(routes) {
12116
- return react_11.default.useCallback((routeId) => routes[routeId], [routes,]);
12165
+ return react_10.default.useCallback((routeId) => routes[routeId], [routes,]);
12117
12166
  }
12118
- var RouterContext = /* @__PURE__ */ (() => react_11.default.createContext({}))();
12167
+ var RouterContext = /* @__PURE__ */ (() => react_10.default.createContext({}))();
12119
12168
  function RouterAPIProvider({ api, children, }) {
12120
12169
  return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(RouterContext.Provider, {
12121
12170
  value: api,
@@ -12123,7 +12172,7 @@ function RouterAPIProvider({ api, children, }) {
12123
12172
  });
12124
12173
  }
12125
12174
  function useRouter() {
12126
- return react_11.default.useContext(RouterContext);
12175
+ return react_10.default.useContext(RouterContext);
12127
12176
  }
12128
12177
  function RoutesProvider({ routes, children, }) {
12129
12178
  const getRoute = useGetRouteCallback(routes);
@@ -12135,7 +12184,7 @@ function RoutesProvider({ routes, children, }) {
12135
12184
  children,
12136
12185
  });
12137
12186
  }
12138
- var CurrentRouteContext = /* @__PURE__ */ (() => react_11.default.createContext({}))();
12187
+ var CurrentRouteContext = /* @__PURE__ */ (() => react_10.default.createContext({}))();
12139
12188
  function useCurrentRoute() {
12140
12189
  var _a;
12141
12190
  const router = useRouter();
@@ -12165,7 +12214,7 @@ function useCurrentRouteId() {
12165
12214
  }
12166
12215
  function useOnRouteChange(cb) {
12167
12216
  const currentRoute = useCurrentRoute();
12168
- const lastRoute = react_11.default.useRef(currentRoute);
12217
+ const lastRoute = react_10.default.useRef(currentRoute);
12169
12218
  if (isEqual(lastRoute.current, currentRoute) || !currentRoute)
12170
12219
  return;
12171
12220
  lastRoute.current = currentRoute;
@@ -12216,7 +12265,7 @@ function monitorINPRelatedInputs(signal) {
12216
12265
  function useRouteElementId(id3, targetRouteId) {
12217
12266
  const currentRoute = useCurrentRoute();
12218
12267
  const route = useRoute(targetRouteId) ?? currentRoute;
12219
- return react_11.default.useMemo(() => {
12268
+ return react_10.default.useMemo(() => {
12220
12269
  if (!route)
12221
12270
  return id3;
12222
12271
  return getRouteElementId(route, id3);
@@ -12428,7 +12477,7 @@ async function preloadRoute(route) {
12428
12477
  function useRouteHandler(routeId, preload = false, elementId) {
12429
12478
  const { navigate, } = useRouter();
12430
12479
  useRoutePreloader([routeId,], preload);
12431
- const handler = react_11.default.useCallback(() => navigate == null ? void 0 : navigate(routeId, elementId), [navigate, elementId, routeId,]);
12480
+ const handler = react_10.default.useCallback(() => navigate == null ? void 0 : navigate(routeId, elementId), [navigate, elementId, routeId,]);
12432
12481
  return handler;
12433
12482
  }
12434
12483
  var pageviewEventVersion = 2;
@@ -12627,23 +12676,28 @@ function forwardCurrentQueryParams(href) {
12627
12676
  }
12628
12677
  return forwardQueryParams(queryParamsString, href);
12629
12678
  }
12679
+ var FRAMER_VARIANT_KEY = 'framer_variant';
12630
12680
  function forwardQueryParams(queryParamsString, href) {
12631
12681
  const startOfHash = href.indexOf('#');
12632
12682
  const hrefWithoutHash = startOfHash === -1 ? href : href.substring(0, startOfHash);
12633
12683
  const hash2 = startOfHash === -1 ? '' : href.substring(startOfHash);
12634
12684
  const startOfSearch = hrefWithoutHash.indexOf('?');
12635
- if (startOfSearch === -1) {
12636
- return hrefWithoutHash + queryParamsString + hash2;
12637
- }
12685
+ const baseUrl = startOfSearch === -1 ? hrefWithoutHash : hrefWithoutHash.substring(0, startOfSearch);
12686
+ const searchString = startOfSearch === -1 ? '' : hrefWithoutHash.substring(startOfSearch);
12687
+ const newSearchParams = new URLSearchParams(searchString);
12638
12688
  const currentSearchParams = new URLSearchParams(queryParamsString);
12639
- const newSearchString = hrefWithoutHash.substring(startOfSearch + 1);
12640
- const newSearchParams = new URLSearchParams(newSearchString);
12641
12689
  for (const [key7, value,] of currentSearchParams) {
12642
- if (!newSearchParams.has(key7)) {
12643
- newSearchParams.append(key7, value);
12644
- }
12690
+ if (newSearchParams.has(key7))
12691
+ continue;
12692
+ if (key7 === FRAMER_VARIANT_KEY)
12693
+ continue;
12694
+ newSearchParams.append(key7, value);
12695
+ }
12696
+ const newSearchString = newSearchParams.toString();
12697
+ if (newSearchString === '') {
12698
+ return hrefWithoutHash + hash2;
12645
12699
  }
12646
- return hrefWithoutHash.substring(0, startOfSearch + 1) + newSearchParams.toString() + hash2;
12700
+ return baseUrl + '?' + newSearchString + hash2;
12647
12701
  }
12648
12702
  async function replacePathVariables(path, currentLocale, nextLocale, defaultLocale, collectionId, pathVariables, collectionUtils) {
12649
12703
  var _a;
@@ -12748,7 +12802,7 @@ var defaultSitePageEffects = {
12748
12802
  global: void 0,
12749
12803
  routes: {},
12750
12804
  };
12751
- var PageEffectsContext = /* @__PURE__ */ react_11.default.createContext(defaultSitePageEffects);
12805
+ var PageEffectsContext = /* @__PURE__ */ react_10.default.createContext(defaultSitePageEffects);
12752
12806
  function PageEffectsProvider({ children, value, }) {
12753
12807
  return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(PageEffectsContext.Provider, {
12754
12808
  value,
@@ -12756,7 +12810,7 @@ function PageEffectsProvider({ children, value, }) {
12756
12810
  });
12757
12811
  }
12758
12812
  function usePageEffects() {
12759
- return react_11.default.useContext(PageEffectsContext);
12813
+ return react_10.default.useContext(PageEffectsContext);
12760
12814
  }
12761
12815
  function getPageEffectForRoute(currentRouteId, nextRouteId, { global, routes, }) {
12762
12816
  var _a;
@@ -13508,7 +13562,7 @@ var trimSlugRegExp = /^-+|-+$/gu;
13508
13562
  function slugify(value) {
13509
13563
  return value.toLowerCase().replace(nonSlugCharactersRegExp, '-').replace(trimSlugRegExp, '');
13510
13564
  }
13511
- var NodeIdContext = /* @__PURE__ */ react_11.default.createContext(null);
13565
+ var NodeIdContext = /* @__PURE__ */ react_10.default.createContext(null);
13512
13566
  function useTracking() {
13513
13567
  const router = useRouter();
13514
13568
  const nodeId = (0, react_3.useContext)(NodeIdContext);
@@ -13542,15 +13596,15 @@ function useRouteAnchor(routeId, { elementId, hash: linkHash, } = {}) {
13542
13596
  const currentRoute = useRoute(currentRouteId ?? '');
13543
13597
  useRoutePreloader([routeId,], true);
13544
13598
  const hash2 = linkHash ?? elementId;
13545
- const href = react_11.default.useMemo(() => getPathForRoute(route, {
13599
+ const href = react_10.default.useMemo(() => getPathForRoute(route, {
13546
13600
  currentRoutePath: currentRoute == null ? void 0 : currentRoute.path,
13547
13601
  currentPathVariables,
13548
13602
  hash: hash2,
13549
13603
  preserveQueryParams,
13550
13604
  siteCanonicalURL,
13551
13605
  }), [currentRoute, currentPathVariables, hash2, preserveQueryParams, route, siteCanonicalURL,]);
13552
- const navigateToRoute = react_11.default.useCallback(() => navigate == null ? void 0 : navigate(routeId, hash2), [hash2, navigate, routeId,]);
13553
- const onClick = react_11.default.useCallback((event) => {
13606
+ const navigateToRoute = react_10.default.useCallback(() => navigate == null ? void 0 : navigate(routeId, hash2), [hash2, navigate, routeId,]);
13607
+ const onClick = react_10.default.useCallback((event) => {
13554
13608
  event.preventDefault();
13555
13609
  navigateToRoute();
13556
13610
  }, [navigateToRoute,]);
@@ -13625,22 +13679,22 @@ var defaultLocaleInfo = {
13625
13679
  locales: [],
13626
13680
  setLocale: noopAsync,
13627
13681
  };
13628
- var LocaleInfoContext = /* @__PURE__ */ react_11.default.createContext(defaultLocaleInfo);
13682
+ var LocaleInfoContext = /* @__PURE__ */ react_10.default.createContext(defaultLocaleInfo);
13629
13683
  exports.LocaleInfoContext = LocaleInfoContext;
13630
13684
  function useLocaleInfo() {
13631
- return react_11.default.useContext(LocaleInfoContext);
13685
+ return react_10.default.useContext(LocaleInfoContext);
13632
13686
  }
13633
13687
  function useLocalesForCurrentRoute() {
13634
13688
  const { currentRouteId, routes, collectionUtils, currentPathVariables, } = useRouter();
13635
13689
  const { activeLocale, locales, } = useLocaleInfo();
13636
- const [localesForCurrentRoute, setLocalesForCurrentRoute,] = react_11.default.useState(() => activeLocale ? [activeLocale,] : []);
13690
+ const [localesForCurrentRoute, setLocalesForCurrentRoute,] = react_10.default.useState(() => activeLocale ? [activeLocale,] : []);
13637
13691
  const currentRoute = currentRouteId ? routes == null ? void 0 : routes[currentRouteId] : void 0;
13638
- react_11.default.useEffect(() => {
13692
+ react_10.default.useEffect(() => {
13639
13693
  let active = true;
13640
13694
  getLocalesForCurrentRoute(activeLocale, locales, currentRoute, currentPathVariables, collectionUtils).then((localesSubset) => {
13641
13695
  if (!active)
13642
13696
  return;
13643
- react_11.default.startTransition(() => {
13697
+ react_10.default.startTransition(() => {
13644
13698
  if (localesSubset) {
13645
13699
  setLocalesForCurrentRoute(localesSubset);
13646
13700
  }
@@ -13994,7 +14048,7 @@ function renderPage(Page4, defaultPageStyle) {
13994
14048
  style: defaultPageStyle,
13995
14049
  'data-framer-root': '',
13996
14050
  };
13997
- return react_11.default.isValidElement(Page4) ? react_11.default.cloneElement(Page4, props) : /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Page4, {
14051
+ return react_10.default.isValidElement(Page4) ? react_10.default.cloneElement(Page4, props) : /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Page4, {
13998
14052
  ...props,
13999
14053
  });
14000
14054
  }
@@ -17488,7 +17542,7 @@ var animate2 = /* @__PURE__ */ (() => {
17488
17542
  return animate3;
17489
17543
  })();
17490
17544
  exports.animate = animate2;
17491
- var LayoutIdContext = /* @__PURE__ */ react_11.default.createContext({
17545
+ var LayoutIdContext = /* @__PURE__ */ react_10.default.createContext({
17492
17546
  getLayoutId: (args) => null,
17493
17547
  persistLayoutIdCache: () => { },
17494
17548
  top: false,
@@ -17869,15 +17923,15 @@ var ErrorBoundary = class extends react_9.Component {
17869
17923
  };
17870
17924
  function Device({ canResize = false, children, ResizeObserver: ResizeObserver2 = safeWindow.ResizeObserver, ...options }) {
17871
17925
  var _a, _b;
17872
- const optionsRef = react_11.default.useRef(void 0);
17926
+ const optionsRef = react_10.default.useRef(void 0);
17873
17927
  if (optionsRef.current === void 0)
17874
17928
  optionsRef.current = options;
17875
17929
  const deviceAppearance = (_a = options.deviceOptions) == null ? void 0 : _a.appearance.type;
17876
- const scaleDataRef = react_11.default.useRef();
17877
- const containerRef = react_11.default.useRef(null);
17878
- const deviceRef = react_11.default.useRef(null);
17879
- const screenRef = react_11.default.useRef(null);
17880
- const updateImperativeScale = react_11.default.useCallback(({ scale: scale2, screenScalePixelFix, }) => {
17930
+ const scaleDataRef = react_10.default.useRef();
17931
+ const containerRef = react_10.default.useRef(null);
17932
+ const deviceRef = react_10.default.useRef(null);
17933
+ const screenRef = react_10.default.useRef(null);
17934
+ const updateImperativeScale = react_10.default.useCallback(({ scale: scale2, screenScalePixelFix, }) => {
17881
17935
  if (!scaleDataRef.current || !deviceRef.current || !screenRef.current)
17882
17936
  return;
17883
17937
  deviceRef.current.style.transform = `scale(${scale2})`;
@@ -17887,7 +17941,7 @@ function Device({ canResize = false, children, ResizeObserver: ResizeObserver2 =
17887
17941
  const scale2 = scaleDataRef.current = getScaleData(options.deviceOptions, options.scaleTo);
17888
17942
  updateImperativeScale(scale2);
17889
17943
  }
17890
- const invertScale2 = react_11.default.useCallback((point2) => {
17944
+ const invertScale2 = react_10.default.useCallback((point2) => {
17891
17945
  if (!scaleDataRef.current)
17892
17946
  return point2;
17893
17947
  const { scale: scale2 = 1, } = scaleDataRef.current;
@@ -17896,7 +17950,7 @@ function Device({ canResize = false, children, ResizeObserver: ResizeObserver2 =
17896
17950
  y: point2.y / scale2,
17897
17951
  };
17898
17952
  }, []);
17899
- const updateScale = react_11.default.useCallback(() => {
17953
+ const updateScale = react_10.default.useCallback(() => {
17900
17954
  const { deviceOptions, scaleTo, } = optionsRef.current ?? {};
17901
17955
  if (!deviceOptions || !scaleTo || scaleTo !== 'dynamic' || !containerRef.current)
17902
17956
  return;
@@ -17914,17 +17968,17 @@ function Device({ canResize = false, children, ResizeObserver: ResizeObserver2 =
17914
17968
  }
17915
17969
  return new ResizeObserver2(() => updateScale());
17916
17970
  });
17917
- react_11.default.useLayoutEffect(() => {
17971
+ react_10.default.useLayoutEffect(() => {
17918
17972
  optionsRef.current = {
17919
17973
  deviceOptions: options.deviceOptions,
17920
17974
  overrideTheme: options.overrideTheme,
17921
17975
  scaleTo: options.scaleTo,
17922
17976
  };
17923
17977
  }, [options.deviceOptions, options.overrideTheme, options.scaleTo,]);
17924
- react_11.default.useLayoutEffect(() => {
17978
+ react_10.default.useLayoutEffect(() => {
17925
17979
  updateScale();
17926
17980
  }, [updateScale,]);
17927
- react_11.default.useEffect(() => {
17981
+ react_10.default.useEffect(() => {
17928
17982
  if (!observer2 || !containerRef.current)
17929
17983
  return;
17930
17984
  observer2.observe(containerRef.current);
@@ -19342,7 +19396,7 @@ var ParentSizeState = /* @__PURE__ */ ((ParentSizeState2) => {
19342
19396
  return ParentSizeState2;
19343
19397
  })(ParentSizeState || {});
19344
19398
  exports.ParentSizeState = ParentSizeState;
19345
- var ConstraintsContext = /* @__PURE__ */ react_11.default.createContext({
19399
+ var ConstraintsContext = /* @__PURE__ */ react_10.default.createContext({
19346
19400
  parentSize: 0,
19347
19401
  /* Unknown */
19348
19402
  });
@@ -19353,7 +19407,7 @@ function deprecatedParentSize(parentSize) {
19353
19407
  return parentSize;
19354
19408
  }
19355
19409
  function useParentSize() {
19356
- return react_11.default.useContext(ConstraintsContext).parentSize;
19410
+ return react_10.default.useContext(ConstraintsContext).parentSize;
19357
19411
  }
19358
19412
  function isSize(o) {
19359
19413
  return typeof o === 'object';
@@ -19361,7 +19415,7 @@ function isSize(o) {
19361
19415
  var ProvideParentSize = (props) => {
19362
19416
  const currentParentSize = useParentSize();
19363
19417
  const { parentSize, children, } = props;
19364
- const value = react_11.default.useMemo(() => ({
19418
+ const value = react_10.default.useMemo(() => ({
19365
19419
  parentSize,
19366
19420
  }), [getParentWidth(parentSize), getParentHeight(parentSize),]);
19367
19421
  if (currentParentSize === 1) {
@@ -19806,8 +19860,8 @@ function isInvalid(validity) {
19806
19860
  return false;
19807
19861
  }
19808
19862
  function useCustomValidity(onValid, onInvalid, onChange, onBlur, onFocus) {
19809
- const isValidRef = react_11.default.useRef(null);
19810
- const handleInvalid = react_11.default.useCallback((e) => {
19863
+ const isValidRef = react_10.default.useRef(null);
19864
+ const handleInvalid = react_10.default.useCallback((e) => {
19811
19865
  if (!onInvalid)
19812
19866
  return;
19813
19867
  if (isValidRef.current === false)
@@ -19817,7 +19871,7 @@ function useCustomValidity(onValid, onInvalid, onChange, onBlur, onFocus) {
19817
19871
  e.currentTarget.reportValidity();
19818
19872
  onInvalid(e);
19819
19873
  }, [onInvalid,]);
19820
- const handleChange = react_11.default.useCallback((e) => {
19874
+ const handleChange = react_10.default.useCallback((e) => {
19821
19875
  onChange == null ? void 0 : onChange(e);
19822
19876
  if (!onInvalid && !onValid)
19823
19877
  return;
@@ -19829,7 +19883,7 @@ function useCustomValidity(onValid, onInvalid, onChange, onBlur, onFocus) {
19829
19883
  onValid == null ? void 0 : onValid();
19830
19884
  }
19831
19885
  }, [onInvalid, onValid, onChange,]);
19832
- const handleBlur = react_11.default.useCallback((e) => {
19886
+ const handleBlur = react_10.default.useCallback((e) => {
19833
19887
  if (!onInvalid) {
19834
19888
  onBlur == null ? void 0 : onBlur(e);
19835
19889
  return;
@@ -19843,7 +19897,7 @@ function useCustomValidity(onValid, onInvalid, onChange, onBlur, onFocus) {
19843
19897
  }
19844
19898
  onBlur == null ? void 0 : onBlur(e);
19845
19899
  }, [handleInvalid, onBlur, onInvalid,]);
19846
- return react_11.default.useMemo(() => {
19900
+ return react_10.default.useMemo(() => {
19847
19901
  return {
19848
19902
  onInvalid: handleInvalid,
19849
19903
  onChange: handleChange,
@@ -19875,8 +19929,38 @@ var inputIconCSSDeclaration = {
19875
19929
  function createRGBVariableFallbacks(variables, fallback) {
19876
19930
  return css2.variable(...variables.flatMap((variable) => [`${variable}-rgb`, variable,]), fallback);
19877
19931
  }
19932
+ var defaultRichTextContainerStyle = {
19933
+ display: 'flex',
19934
+ flexDirection: 'column',
19935
+ justifyContent: 'flex-start',
19936
+ };
19937
+ var defaultTextFillStyle = {
19938
+ display: 'inline-block',
19939
+ };
19940
+ var defaultImageStyle = {
19941
+ display: 'block',
19942
+ };
19878
19943
  var richTextCSSRules = /* @__PURE__ */ (() => [
19944
+ /**
19945
+ * RichTextContainer styles can get overridden by other static or inline styles collected in
19946
+ * style collectors, as well as styles defined directly in the @link{RichText.tsx} component.
19947
+ *
19948
+ * NOTE: `display: flex` can get overridden with `display: -webkit-box` in
19949
+ * @link{collectTextTruncation.ts} if the text is truncated. In this case, the flex-specific
19950
+ * properties are not supported, e.g. `justify-content`. This is ok because truncated text has
19951
+ * auto height and doesn't support vertical alignment. In any case, keep this in mind when
19952
+ * using other flex-specific properties.
19953
+ */
19879
19954
  /* css */
19955
+ `
19956
+ [data-framer-component-type="RichTextContainer"] {
19957
+ display: ${defaultRichTextContainerStyle.display};
19958
+ flex-direction: ${defaultRichTextContainerStyle.flexDirection};
19959
+ justify-content: ${defaultRichTextContainerStyle.justifyContent};
19960
+ outline: none;
19961
+ flex-shrink: 0;
19962
+ }
19963
+ `, /* css */
19880
19964
  `
19881
19965
  p.framer-text,
19882
19966
  div.framer-text,
@@ -20041,7 +20125,7 @@ var richTextCSSRules = /* @__PURE__ */ (() => [
20041
20125
  /* css */
20042
20126
  `
20043
20127
  .framer-text[data-text-fill] {
20044
- display: inline-block;
20128
+ display: ${defaultTextFillStyle.display};
20045
20129
  background-clip: text;
20046
20130
  -webkit-background-clip: text;
20047
20131
  /* make this a transparent color if you want to visualise the clipping */
@@ -20383,7 +20467,7 @@ var richTextCSSRules = /* @__PURE__ */ (() => [
20383
20467
  `, /* css */
20384
20468
  `
20385
20469
  .framer-image.framer-text {
20386
- display: block;
20470
+ display: ${defaultImageStyle.display};
20387
20471
  max-width: 100%;
20388
20472
  height: auto;
20389
20473
  }
@@ -20541,6 +20625,40 @@ var richTextCSSRules = /* @__PURE__ */ (() => [
20541
20625
  }
20542
20626
  `,
20543
20627
  ])();
20628
+ var textTruncationDisplayInlineVariableForSafari16 = '--text-truncation-display-inline-for-safari-16';
20629
+ var textTruncationDisplayNoneVariableForSafari16 = '--text-truncation-display-none-for-safari-16';
20630
+ var textTruncationLineBreakVariableForSafari16 = '--text-truncation-line-break-for-safari-16';
20631
+ var blockLikeElementSelectors = [
20632
+ 'div.framer-text',
20633
+ 'p.framer-text',
20634
+ 'h1.framer-text',
20635
+ 'h2.framer-text',
20636
+ 'h3.framer-text',
20637
+ 'h4.framer-text',
20638
+ 'h5.framer-text',
20639
+ 'h6.framer-text',
20640
+ 'ol.framer-text',
20641
+ 'ul.framer-text',
20642
+ 'li.framer-text',
20643
+ 'blockquote.framer-text',
20644
+ '.framer-text.framer-image',
20645
+ ];
20646
+ var anySafariVersion = '(background: -webkit-named-image(i))';
20647
+ var safari17OrGreater = '(contain-intrinsic-size: inherit)';
20648
+ var safari16TextTruncationFix = /* @__PURE__ */ (() => [`@supports ${anySafariVersion} and (not ${safari17OrGreater}) {
20649
+ /* Render block-like elements inline when text is truncated, otherwise default to user agent (revert) */
20650
+ ${blockLikeElementSelectors.join(', ')} { display: var(${textTruncationDisplayInlineVariableForSafari16}, revert) }
20651
+
20652
+ /* Add a line break after each block-like element that we render inline, to resemble the block-like behavior */
20653
+ ${blockLikeElementSelectors.map((selector) => `${selector}::after`).join(', ')} { content: var(${textTruncationLineBreakVariableForSafari16}); white-space: pre; }
20654
+
20655
+ /* Don't render modules (e.g. videos, code-blocks), or tables when text is truncated, because often these can't be truncated and their children might be block elements */
20656
+ .framer-text.framer-text-module,
20657
+ .framer-text.framer-table-wrapper { display: var(${textTruncationDisplayNoneVariableForSafari16}, revert) }
20658
+
20659
+ /* Render text-fill elements inline when text is truncated, otherwise default to their default value (e.g. inline-block) */
20660
+ p.framer-text[data-text-fill] { display: var(${textTruncationDisplayInlineVariableForSafari16}, ${defaultTextFillStyle.display}) }
20661
+ }`,])();
20544
20662
  var defaultCache = /* @__PURE__ */ new Set();
20545
20663
  var defaultSheet;
20546
20664
  function injectCSSRule(cssRule, sheet, cache2 = defaultCache) {
@@ -20818,6 +20936,7 @@ var pageContentWrapperWrapperCSSRules = [
20818
20936
  `[data-framer-component-type="PageContentWrapper"] > *, [data-framer-component-type="PageContentWrapper"] > [data-framer-component-type] { position: relative; }`,
20819
20937
  ];
20820
20938
  var presenceCSS = [`[data-is-present="false"], [data-is-present="false"] * { pointer-events: none !important; }`,];
20939
+ var lightboxCSS = [`.framer-lightbox-container { opacity: 1 !important; pointer-events: auto !important; }`,];
20821
20940
  var cursorCSS = [
20822
20941
  `[data-framer-cursor="pointer"] { cursor: pointer; }`,
20823
20942
  `[data-framer-cursor="grab"] { cursor: grab; }`,
@@ -20850,12 +20969,12 @@ var hideScrollbars = [
20850
20969
  ];
20851
20970
  var willChangeOverrideCSSVariable = '--framer-will-change-override';
20852
20971
  var willChangeEffectOverrideCSSVariable = '--framer-will-change-effect-override';
20853
- var anySafariVersion = '(background: -webkit-named-image(i))';
20972
+ var anySafariVersion2 = '(background: -webkit-named-image(i))';
20854
20973
  var safari16OrGreater = '(grid-template-rows: subgrid)';
20855
20974
  var willChangeTransformRules = (isPreview) => isPreview
20856
20975
  ? [
20857
20976
  `body { ${willChangeOverrideCSSVariable}: none; }`,
20858
- `@supports ${anySafariVersion} and (not ${safari16OrGreater}) { body { ${willChangeOverrideCSSVariable}: transform; } }`,
20977
+ `@supports ${anySafariVersion2} and (not ${safari16OrGreater}) { body { ${willChangeOverrideCSSVariable}: transform; } }`,
20859
20978
  ]
20860
20979
  : [`body { ${willChangeOverrideCSSVariable}: none; ${willChangeEffectOverrideCSSVariable}: none; }`,];
20861
20980
  var frameCSSRules = (isPreview) => {
@@ -20885,6 +21004,8 @@ var combineCSSRules = (isPreview) => [
20885
21004
  ...resetCSS,
20886
21005
  ...hideScrollbars,
20887
21006
  ...overflowClipFallbackCSSRules,
21007
+ ...lightboxCSS,
21008
+ ...safari16TextTruncationFix,
20888
21009
  ];
20889
21010
  exports.combinedCSSRules = combineCSSRules(false);
20890
21011
  var combinedCSSRulesForPreview = /* @__PURE__ */ combineCSSRules(true);
@@ -22397,7 +22518,7 @@ function applyMetaTag(name, props) {
22397
22518
  }
22398
22519
  }
22399
22520
  function usePrototypingMetaTags() {
22400
- react_11.default.useEffect(() => {
22521
+ react_10.default.useEffect(() => {
22401
22522
  applyMetaTag('mobile-web-app-capable', {
22402
22523
  content: 'yes',
22403
22524
  });
@@ -22417,7 +22538,7 @@ var DeviceCodeComponentInner = ({ children, ...props }) => {
22417
22538
  const deviceOptions = convertPropsToDeviceOptions(props, {
22418
22539
  forceOldClay: true,
22419
22540
  });
22420
- react_11.default.useInsertionEffect(() => {
22541
+ react_10.default.useInsertionEffect(() => {
22421
22542
  injectComponentCSSRules();
22422
22543
  }, []);
22423
22544
  if (!deviceOptions) {
@@ -22435,8 +22556,8 @@ var DeviceCodeComponentInner = ({ children, ...props }) => {
22435
22556
  });
22436
22557
  }
22437
22558
  const child = Array.isArray(children) ? children[0] : children;
22438
- const resizedChild = child && react_11.default.isValidElement(child)
22439
- ? react_11.default.cloneElement(child, {
22559
+ const resizedChild = child && react_10.default.isValidElement(child)
22560
+ ? react_10.default.cloneElement(child, {
22440
22561
  width: deviceOptions.screenWidth,
22441
22562
  height: deviceOptions.screenHeight,
22442
22563
  })
@@ -22653,12 +22774,12 @@ function _injectRuntime(injectedRuntime) {
22653
22774
  Object.assign(implementation, injectedRuntime);
22654
22775
  isRuntimeInjected = true;
22655
22776
  }
22656
- var LibraryFeaturesContext = /* @__PURE__ */ react_11.default.createContext(void 0);
22777
+ var LibraryFeaturesContext = /* @__PURE__ */ react_10.default.createContext(void 0);
22657
22778
  LibraryFeaturesContext.displayName = 'LibraryFeaturesContext';
22658
22779
  var LibraryFeaturesProvider = /* @__PURE__ */ (() => LibraryFeaturesContext.Provider)();
22659
22780
  exports.LibraryFeaturesProvider = LibraryFeaturesProvider;
22660
22781
  var useLibraryFeatures = () => {
22661
- const context = react_11.default.useContext(LibraryFeaturesContext);
22782
+ const context = react_10.default.useContext(LibraryFeaturesContext);
22662
22783
  return context ?? {};
22663
22784
  };
22664
22785
  var wrapperStyle = {
@@ -22704,16 +22825,35 @@ function getImageStyle(image) {
22704
22825
  objectFit: cssObjectFit(image.fit),
22705
22826
  };
22706
22827
  }
22707
- function StaticImage({ image, containerSize, nodeId, alt, draggable, syncDecoding, }) {
22828
+ function useDecodingAttribute(avoidAsyncDecoding) {
22829
+ const currentDecoding = react_10.default.useRef(avoidAsyncDecoding ? 'auto' : 'async');
22830
+ const switchDecodingToAuto = (0, react_3.useCallback)((node) => {
22831
+ currentDecoding.current = 'auto';
22832
+ node.decoding = 'auto';
22833
+ }, []);
22834
+ const onImageLoad = (0, react_3.useCallback)((event) => {
22835
+ switchDecodingToAuto(event.currentTarget);
22836
+ }, [switchDecodingToAuto,]);
22837
+ const onImageMount = (0, react_3.useCallback)((node) => {
22838
+ if (node == null ? void 0 : node.complete)
22839
+ switchDecodingToAuto(node);
22840
+ }, [switchDecodingToAuto,]);
22841
+ return {
22842
+ decoding: currentDecoding.current,
22843
+ onImageLoad,
22844
+ onImageMount,
22845
+ };
22846
+ }
22847
+ function StaticImage({ image, containerSize, nodeId, alt, draggable, avoidAsyncDecoding, }) {
22708
22848
  const source = runtime.useImageSource(image, containerSize, nodeId);
22709
22849
  const imageStyle = getImageStyle(image);
22710
- const imageRef = react_11.default.useRef(null);
22850
+ const { decoding, onImageLoad, onImageMount, } = useDecodingAttribute(avoidAsyncDecoding);
22711
22851
  return (
22712
22852
  // eslint-disable-next-line framer-studio/require-async-decoding -- we conditionally apply it
22713
22853
  /* @__PURE__ */
22714
22854
  (0, jsx_runtime_1.jsx)('img', {
22715
- ref: imageRef,
22716
- decoding: syncDecoding ? 'sync' : 'async',
22855
+ ref: onImageMount,
22856
+ decoding,
22717
22857
  fetchPriority: image.fetchPriority,
22718
22858
  loading: image.loading,
22719
22859
  width: image.pixelWidth,
@@ -22721,16 +22861,17 @@ function StaticImage({ image, containerSize, nodeId, alt, draggable, syncDecodin
22721
22861
  sizes: image.sizes,
22722
22862
  srcSet: image.srcSet,
22723
22863
  src: source,
22864
+ onLoad: onImageLoad,
22724
22865
  alt: alt ?? image.alt ?? '',
22725
22866
  style: imageStyle,
22726
22867
  draggable,
22727
22868
  }));
22728
22869
  }
22729
22870
  function CanvasImage({ image, containerSize, nodeId, }) {
22730
- const wrapperRef = react_11.default.useRef(null);
22871
+ const wrapperRef = react_10.default.useRef(null);
22731
22872
  const imageElement = runtime.useImageElement(image, containerSize, nodeId);
22732
22873
  const imageStyle = getImageStyle(image);
22733
- react_11.default.useLayoutEffect(() => {
22874
+ react_10.default.useLayoutEffect(() => {
22734
22875
  const wrapper = wrapperRef.current;
22735
22876
  if (wrapper === null)
22736
22877
  return;
@@ -22749,9 +22890,9 @@ function CanvasImage({ image, containerSize, nodeId, }) {
22749
22890
  });
22750
22891
  }
22751
22892
  function OptimizedCanvasImage({ nodeId, image, containerSize, }) {
22752
- const wrapperRef = react_11.default.useRef(null);
22893
+ const wrapperRef = react_10.default.useRef(null);
22753
22894
  const source = runtime.useImageSource(image, containerSize, nodeId);
22754
- react_11.default.useLayoutEffect(() => {
22895
+ react_10.default.useLayoutEffect(() => {
22755
22896
  const wrapper = wrapperRef.current;
22756
22897
  if (wrapper === null)
22757
22898
  return;
@@ -22798,7 +22939,7 @@ function BackgroundImageComponent({ layoutId, image, ...props }) {
22798
22939
  else if (RenderTarget.current() !== RenderTarget.canvas) {
22799
22940
  imageNode = /* @__PURE__ */ (0, jsx_runtime_1.jsx)(StaticImage, {
22800
22941
  image,
22801
- syncDecoding: RenderTarget.current() === RenderTarget.export,
22942
+ avoidAsyncDecoding: RenderTarget.current() === RenderTarget.export,
22802
22943
  ...props,
22803
22944
  });
22804
22945
  }
@@ -22947,24 +23088,10 @@ function getIntrinsicSizeForBackgroundImage(background) {
22947
23088
  height: background.pixelHeight,
22948
23089
  };
22949
23090
  }
22950
- return parseImageSizeFromSrc(background.src);
22951
- }
22952
- function parseImageSizeFromSrc(src) {
22953
- if (!src)
22954
- return void 0;
22955
- let url;
22956
- try {
22957
- url = new URL(src);
22958
- }
22959
- catch {
22960
- return void 0;
22961
- }
22962
- const width = url.searchParams.get('width');
22963
- const height = url.searchParams.get('height');
22964
- if (width && height) {
23091
+ if (background.src === void 0) {
22965
23092
  return {
22966
- width: parseInt(width),
22967
- height: parseInt(height),
23093
+ width: 1,
23094
+ height: 1,
22968
23095
  };
22969
23096
  }
22970
23097
  return void 0;
@@ -23157,10 +23284,10 @@ function processOverrideForwarding(props, children) {
23157
23284
  children,
23158
23285
  };
23159
23286
  }
23160
- children = react_11.default.Children.map(children, (child) => {
23161
- if (!react_11.default.isValidElement(child))
23287
+ children = react_10.default.Children.map(children, (child) => {
23288
+ if (!react_10.default.isValidElement(child))
23162
23289
  return child;
23163
- return react_11.default.cloneElement(child, {
23290
+ return react_10.default.cloneElement(child, {
23164
23291
  _forwardedOverrides,
23165
23292
  });
23166
23293
  });
@@ -23207,11 +23334,11 @@ function useLayoutId2(props, { specificLayoutId, postfix, } = {}) {
23207
23334
  }, [enabled,]);
23208
23335
  }
23209
23336
  var useIsomorphicLayoutEffect2 = typeof document !== 'undefined' ? react_2.useLayoutEffect : react_2.useEffect;
23210
- var ComponentContainerContext = /* @__PURE__ */ react_11.default.createContext(false);
23337
+ var ComponentContainerContext = /* @__PURE__ */ react_10.default.createContext(false);
23211
23338
  exports.ComponentContainerContext = ComponentContainerContext;
23212
23339
  function useForceUpdate2() {
23213
- const [_, setForcedRenderCount,] = react_11.default.useState(0);
23214
- return react_11.default.useCallback(() => setForcedRenderCount((v) => v + 1), []);
23340
+ const [_, setForcedRenderCount,] = react_10.default.useState(0);
23341
+ return react_10.default.useCallback(() => setForcedRenderCount((v) => v + 1), []);
23215
23342
  }
23216
23343
  var DEFAULT_SIZE = 200;
23217
23344
  var SharedObserver = class {
@@ -23251,7 +23378,7 @@ function useRerenderOnResize(ref) {
23251
23378
  }
23252
23379
  function useMeasuredSize(ref) {
23253
23380
  const forceUpdate = useForceUpdate2();
23254
- const size = react_11.default.useRef(null);
23381
+ const size = react_10.default.useRef(null);
23255
23382
  function updateSize(newSize) {
23256
23383
  if (newSize.width === 0 && newSize.height === 0)
23257
23384
  return;
@@ -23281,8 +23408,8 @@ function useMeasuredSize(ref) {
23281
23408
  return size.current;
23282
23409
  }
23283
23410
  var SIZE_COMPATIBILITY_WRAPPER_ATTRIBUTE = 'data-framer-size-compatibility-wrapper';
23284
- var withMeasuredSize = (Component17) => (props) => {
23285
- const ref = react_11.default.useRef(null);
23411
+ var withMeasuredSize = (Component18) => (props) => {
23412
+ const ref = react_10.default.useRef(null);
23286
23413
  const size = useMeasuredSize(ref);
23287
23414
  const dataProps = {
23288
23415
  [SIZE_COMPATIBILITY_WRAPPER_ATTRIBUTE]: true,
@@ -23298,7 +23425,7 @@ var withMeasuredSize = (Component17) => (props) => {
23298
23425
  },
23299
23426
  ref,
23300
23427
  ...dataProps,
23301
- children: shouldRender && /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
23428
+ children: shouldRender && /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
23302
23429
  ...props,
23303
23430
  width: (size == null ? void 0 : size.width) ?? fallbackWidth,
23304
23431
  height: (size == null ? void 0 : size.height) ?? fallbackHeight,
@@ -23888,7 +24015,7 @@ var defaultFrameRect = {
23888
24015
  height: 200,
23889
24016
  };
23890
24017
  function useStyleAndRect(props) {
23891
- react_11.default.useInsertionEffect(() => {
24018
+ react_10.default.useInsertionEffect(() => {
23892
24019
  injectComponentCSSRules();
23893
24020
  }, []);
23894
24021
  const inCodeComponent = (0, react_3.useContext)(ComponentContainerContext);
@@ -23908,7 +24035,7 @@ function useStyleAndRect(props) {
23908
24035
  if (shouldDisablePointerEvents && safeToEditPointerEvents) {
23909
24036
  defaultStyle.pointerEvents = 'none';
23910
24037
  }
23911
- const addTextCentering = react_11.default.Children.count(props.children) > 0 && react_11.default.Children.toArray(props.children).every((child) => {
24038
+ const addTextCentering = react_10.default.Children.count(props.children) > 0 && react_10.default.Children.toArray(props.children).every((child) => {
23912
24039
  return typeof child === 'string' || typeof child === 'number';
23913
24040
  });
23914
24041
  const centerTextStyle = addTextCentering && {
@@ -24136,7 +24263,7 @@ function resolveParentSize(props, unwrappedProps, rect, inCodeComponent) {
24136
24263
  }
24137
24264
  function EmptyState({ title = '', description = 'Click and drag the connector to any frame on the canvas \u2192', children, size, hide, insideUserCodeComponent = false, position = 'absolute', }) {
24138
24265
  const { target, } = RenderEnvironment;
24139
- const childCount = react_11.default.Children.count(children);
24266
+ const childCount = react_10.default.Children.count(children);
24140
24267
  if (insideUserCodeComponent && childCount === 0) {
24141
24268
  return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(FrameWithMotion, {
24142
24269
  ...size,
@@ -24219,7 +24346,7 @@ function Description({ children, }) {
24219
24346
  });
24220
24347
  }
24221
24348
  var TREE_ROOT_ID = '__LAYOUT_TREE_ROOT';
24222
- var SharedLayoutContext = /* @__PURE__ */ react_11.default.createContext({
24349
+ var SharedLayoutContext = /* @__PURE__ */ react_10.default.createContext({
24223
24350
  schedulePromoteTree: () => { },
24224
24351
  scheduleProjectionDidUpdate: () => { },
24225
24352
  initLead: () => { },
@@ -24497,14 +24624,14 @@ function _useSharedIntersectionObserver(ref, callback, options) {
24497
24624
  }
24498
24625
  var useSharedIntersectionObserver = typeof IntersectionObserver === 'undefined' ? noop2 : _useSharedIntersectionObserver;
24499
24626
  var thresholds2 = /* @__PURE__ */ new Array(100).fill(void 0).map((_, i) => i * 0.01);
24500
- var ViewportContext = /* @__PURE__ */ react_11.default.createContext(null);
24627
+ var ViewportContext = /* @__PURE__ */ react_10.default.createContext(null);
24501
24628
  function useAppearEffect(ref, appearCallback, options) {
24502
- const internalState = react_11.default.useRef({
24629
+ const internalState = react_10.default.useRef({
24503
24630
  isInView: false,
24504
24631
  hasAnimatedOnce: false,
24505
24632
  });
24506
24633
  const { enabled, animateOnce, threshold, rootMargin = `0px 0px 0px 0px`, } = options;
24507
- const callback = react_11.default.useCallback((entry) => {
24634
+ const callback = react_10.default.useCallback((entry) => {
24508
24635
  const { isInView, hasAnimatedOnce, } = internalState.current;
24509
24636
  const isIntersecting = isIntersectingWithThreshold(entry, (threshold == null ? void 0 : threshold.y) ?? 0);
24510
24637
  if (isIntersecting && !isInView) {
@@ -24613,13 +24740,13 @@ var LayoutTree = class extends react_9.Component {
24613
24740
  }
24614
24741
  };
24615
24742
  var SharedLayoutTree = (props) => {
24616
- const sharedLayoutContext = react_11.default.useContext(SharedLayoutContext);
24743
+ const sharedLayoutContext = react_10.default.useContext(SharedLayoutContext);
24617
24744
  return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(LayoutTree, {
24618
24745
  ...props,
24619
24746
  sharedLayoutContext,
24620
24747
  });
24621
24748
  };
24622
- var NavigationContainerContext = /* @__PURE__ */ react_11.default.createContext(true);
24749
+ var NavigationContainerContext = /* @__PURE__ */ react_10.default.createContext(true);
24623
24750
  function useIsInCurrentNavigationTarget() {
24624
24751
  const isInCurrentNavigationTarget = (0, react_3.useContext)(NavigationContainerContext);
24625
24752
  return isInCurrentNavigationTarget;
@@ -24683,7 +24810,7 @@ function useOnCurrentTargetChange(callback, deps = []) {
24683
24810
  return () => deregister(callback);
24684
24811
  }, [register, deregister, ...deps,]);
24685
24812
  }
24686
- var NavigationContainer = /* @__PURE__ */ react_11.default.memo(function NavigationContainer2({ isLayeredContainer, isCurrent, isPrevious, isOverlayed = false, visible, transitionProps, children, backdropColor, onTapBackdrop, backfaceVisible, exitBackfaceVisible, animation, exitAnimation, instant, initialProps, exitProps, position = {
24813
+ var NavigationContainer = /* @__PURE__ */ react_10.default.memo(function NavigationContainer2({ isLayeredContainer, isCurrent, isPrevious, isOverlayed = false, visible, transitionProps, children, backdropColor, onTapBackdrop, backfaceVisible, exitBackfaceVisible, animation, exitAnimation, instant, initialProps, exitProps, position = {
24687
24814
  top: 0,
24688
24815
  right: 0,
24689
24816
  bottom: 0,
@@ -25493,10 +25620,10 @@ function sequence(direction, transition, animation) {
25493
25620
  }
25494
25621
  var NavigationConsumer = /* @__PURE__ */ (() => NavigationContext.Consumer)();
25495
25622
  exports.NavigationConsumer = NavigationConsumer;
25496
- var NavigationCallbackContext = /* @__PURE__ */ react_11.default.createContext(void 0);
25623
+ var NavigationCallbackContext = /* @__PURE__ */ react_10.default.createContext(void 0);
25497
25624
  var NavigationCallbackProvider = /* @__PURE__ */ (() => NavigationCallbackContext.Provider)();
25498
25625
  exports.NavigationCallbackProvider = NavigationCallbackProvider;
25499
- var IsInitialNavigationContext = /* @__PURE__ */ react_11.default.createContext(void 0);
25626
+ var IsInitialNavigationContext = /* @__PURE__ */ react_10.default.createContext(void 0);
25500
25627
  var Navigation = /* @__PURE__ */ (() => {
25501
25628
  var _lastEventTimeStamp, _a, _Navigation_instances, getStackState_fn, isSameEventTransition_fn, _navigationAction, transition_fn;
25502
25629
  return _a = class extends react_9.Component {
@@ -25942,7 +26069,7 @@ function containerIsVisible(containerIndex, stackState) {
25942
26069
  return false;
25943
26070
  }
25944
26071
  function containerContent(item) {
25945
- const content = react_11.default.Children.map(item.component, (child) => {
26072
+ const content = react_10.default.Children.map(item.component, (child) => {
25946
26073
  var _a;
25947
26074
  if (!isReactChild(child) || !isReactElement(child) || !child.props) {
25948
26075
  return child;
@@ -25968,7 +26095,7 @@ function containerContent(item) {
25968
26095
  if (canStretchStyle)
25969
26096
  props.style.height = '100%';
25970
26097
  }
25971
- return react_11.default.cloneElement(child, props);
26098
+ return react_10.default.cloneElement(child, props);
25972
26099
  });
25973
26100
  return content;
25974
26101
  }
@@ -25979,7 +26106,7 @@ function backdropTapAction(transition, goBackAction) {
25979
26106
  function NavigationWrapper(props) {
25980
26107
  const resetProjection = useResetProjection();
25981
26108
  const skipLayoutAnimation = useInstantLayoutTransition();
25982
- react_11.default.useInsertionEffect(() => {
26109
+ react_10.default.useInsertionEffect(() => {
25983
26110
  injectComponentCSSRules();
25984
26111
  }, []);
25985
26112
  return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Navigation, {
@@ -26007,7 +26134,7 @@ var NavigationTransitionType = /* @__PURE__ */ ((NavigationTransitionType2) => {
26007
26134
  })(NavigationTransitionType || {});
26008
26135
  exports.NavigationTransitionType = NavigationTransitionType;
26009
26136
  function WithNavigator(BaseComponent, navigationTransition, navigationTransitionDirection, NavigationTarget, navigationTransitionOptions) {
26010
- const InternalWithNavigator = class extends react_11.default.Component {
26137
+ const InternalWithNavigator = class extends react_10.default.Component {
26011
26138
  render() {
26012
26139
  return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(NavigationContext.Consumer, {
26013
26140
  children: (navigation) => {
@@ -26227,11 +26354,11 @@ var clamp2 = (value, a, b) => {
26227
26354
  }
26228
26355
  return value;
26229
26356
  };
26230
- var DraggingContext = /* @__PURE__ */ react_11.default.createContext({
26357
+ var DraggingContext = /* @__PURE__ */ react_10.default.createContext({
26231
26358
  dragging: false,
26232
26359
  });
26233
- function WithDragging(Component17) {
26234
- const _WithDraggingHOC = class _WithDraggingHOC2 extends react_11.default.Component {
26360
+ function WithDragging(Component18) {
26361
+ const _WithDraggingHOC = class _WithDraggingHOC2 extends react_10.default.Component {
26235
26362
  constructor(props, defaultProps) {
26236
26363
  super(props, defaultProps);
26237
26364
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'state', {
@@ -26800,7 +26927,7 @@ function WithDragging(Component17) {
26800
26927
  value: {
26801
26928
  dragging: this.state.isDragging,
26802
26929
  },
26803
- children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
26930
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
26804
26931
  ...originalProps,
26805
26932
  }),
26806
26933
  });
@@ -26837,10 +26964,10 @@ function WithDragging(Component17) {
26837
26964
  constraints: {},
26838
26965
  mouseWheel: false,
26839
26966
  });
26840
- (0, chunk_A2PMVMFI_js_1.__publicField)(_WithDraggingHOC, 'defaultProps', Object.assign({}, Component17.defaultProps, _WithDraggingHOC.draggingDefaultProps));
26967
+ (0, chunk_A2PMVMFI_js_1.__publicField)(_WithDraggingHOC, 'defaultProps', Object.assign({}, Component18.defaultProps, _WithDraggingHOC.draggingDefaultProps));
26841
26968
  let WithDraggingHOC = _WithDraggingHOC;
26842
26969
  const withDragging = WithDraggingHOC;
26843
- (0, import_hoist_non_react_statics2.default)(withDragging, Component17);
26970
+ (0, import_hoist_non_react_statics2.default)(withDragging, Component18);
26844
26971
  return withDragging;
26845
26972
  }
26846
26973
  var hoverProps = {
@@ -26862,13 +26989,13 @@ var eventHandlerMapping = {
26862
26989
  var tapEventKeys = /* @__PURE__ */ new Set(['tapstart', 'tap', 'tapend',]);
26863
26990
  function WithEvents(BaseComponent) {
26864
26991
  var _a;
26865
- const withEvents = (_a = class extends react_11.default.Component {
26992
+ const withEvents = (_a = class extends react_10.default.Component {
26866
26993
  constructor() {
26867
26994
  super(...arguments);
26868
26995
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'shouldCancelTap', false);
26869
26996
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'activeEventListeners', /* @__PURE__ */ new Map());
26870
26997
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'hasFramerEventListener', false);
26871
- (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'component', react_11.default.createRef());
26998
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'component', react_10.default.createRef());
26872
26999
  }
26873
27000
  get element() {
26874
27001
  return this.component.current && this.component.current.element;
@@ -27944,16 +28071,16 @@ var DeprecatedFrame = /* @__PURE__ */ (() => {
27944
28071
  }
27945
28072
  layoutChildren() {
27946
28073
  const _forwardedOverrides = this.props._forwardedOverrides;
27947
- let children = react_11.default.Children.map(this.props.children, (child) => {
28074
+ let children = react_10.default.Children.map(this.props.children, (child) => {
27948
28075
  if (isConstraintSupportingChild(child)) {
27949
- return react_11.default.cloneElement(child, {
28076
+ return react_10.default.cloneElement(child, {
27950
28077
  parentSize: this.state.size,
27951
28078
  _forwardedOverrides,
27952
28079
  // biome-ignore lint/suspicious/noExplicitAny: deprecated code
27953
28080
  });
27954
28081
  }
27955
28082
  else if (_forwardedOverrides && child) {
27956
- return react_11.default.cloneElement(child, {
28083
+ return react_10.default.cloneElement(child, {
27957
28084
  _forwardedOverrides,
27958
28085
  });
27959
28086
  }
@@ -28089,7 +28216,7 @@ var Draggable = /* @__PURE__ */ WithDragging(DeprecatedFrameWithEvents);
28089
28216
  exports.Draggable = Draggable;
28090
28217
  function useInfiniteScroll({ ref: observerRef, loadMore, rootMargin = '0px', paginationInfo, }) {
28091
28218
  const isVisibleRef = (0, react_4.useRef)(false);
28092
- const callback = react_11.default.useCallback((entry) => {
28219
+ const callback = react_10.default.useCallback((entry) => {
28093
28220
  if (!entry.isIntersecting) {
28094
28221
  isVisibleRef.current = false;
28095
28222
  return;
@@ -28112,8 +28239,8 @@ function useInfiniteScroll({ ref: observerRef, loadMore, rootMargin = '0px', pag
28112
28239
  enabled: paginationInfo.currentPage < paginationInfo.totalPages,
28113
28240
  });
28114
28241
  }
28115
- function withInfiniteScroll(Component17) {
28116
- return react_11.default.forwardRef(({ __paginationInfo, __loadMore, ...props }, ref) => {
28242
+ function withInfiniteScroll(Component18) {
28243
+ return react_10.default.forwardRef(({ __paginationInfo, __loadMore, ...props }, ref) => {
28117
28244
  const infiniteScrollRef = useObserverRef(ref);
28118
28245
  useInfiniteScroll({
28119
28246
  rootMargin: '500px',
@@ -28121,7 +28248,7 @@ function withInfiniteScroll(Component17) {
28121
28248
  ref: infiniteScrollRef,
28122
28249
  paginationInfo: __paginationInfo,
28123
28250
  });
28124
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
28251
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
28125
28252
  ...props,
28126
28253
  ref: infiniteScrollRef,
28127
28254
  });
@@ -28246,10 +28373,10 @@ function makePaddingString({ top, left, bottom, right, }) {
28246
28373
  return `${top}px ${right}px ${bottom}px ${left}px`;
28247
28374
  }
28248
28375
  var Stack = /* @__PURE__ */ (() => {
28249
- const StackInner = react_11.default.forwardRef(function StackInner2(stackProps, forwardedRef) {
28376
+ const StackInner = react_10.default.forwardRef(function StackInner2(stackProps, forwardedRef) {
28250
28377
  const { as = 'div', direction = 'vertical', distribution = 'start', alignment = 'center', gap = 10, wrap: wrap2 = false, useFlexboxGap: externalUseFlexboxGap = true, children, style: styleProp, className: className2, willChangeTransform, __fromCodeComponentNode, parentSize, __contentWrapperStyle, ...containerProps } = stackProps;
28251
28378
  const useFlexboxGap = externalUseFlexboxGap || wrap2;
28252
- const stackRef = react_11.default.useRef(null);
28379
+ const stackRef = react_10.default.useRef(null);
28253
28380
  const flexDirection = toFlexDirection(direction);
28254
28381
  const isReverse = isReverseDirection(flexDirection);
28255
28382
  const justifyContent = toJustifyOrAlignment(distribution);
@@ -28389,7 +28516,7 @@ function fraction(dimension) {
28389
28516
  return isFiniteNumber(value) ? value : 0;
28390
28517
  }
28391
28518
  function handleFraction(children, direction, widthType, heightType) {
28392
- return react_11.default.Children.map(children, (child) => {
28519
+ return react_10.default.Children.map(children, (child) => {
28393
28520
  if (!isReactChild(child) || !isReactElement(child))
28394
28521
  return;
28395
28522
  const isVertical = direction === 'vertical';
@@ -28448,7 +28575,7 @@ function handleFraction(children, direction, widthType, heightType) {
28448
28575
  ...propsStyle,
28449
28576
  ...style2,
28450
28577
  };
28451
- return react_11.default.cloneElement(child, {
28578
+ return react_10.default.cloneElement(child, {
28452
28579
  width: newWidth,
28453
28580
  height: newHeight,
28454
28581
  style: nextStyle,
@@ -28583,7 +28710,7 @@ function PageContainer({ children, effect, dragEnabled, direction, contentHeight
28583
28710
  }, effect ? Object.keys(effect).join('') : ''),
28584
28711
  });
28585
28712
  }
28586
- var Page = /* @__PURE__ */ react_11.default.forwardRef(function Page2(props, forwardedRef) {
28713
+ var Page = /* @__PURE__ */ react_10.default.forwardRef(function Page2(props, forwardedRef) {
28587
28714
  var _a;
28588
28715
  const { direction = 'horizontal', contentWidth = 'stretch', contentHeight = 'stretch', alignment = 'start', currentPage = 0, animateCurrentPageUpdate = true, gap: gapValue = 10, padding: _padding = 0, momentum = false, dragEnabled = true, defaultEffect: _defaultEffect = 'none', background = 'transparent', overflow = 'hidden', __fromCodeComponentNode, effect: _effect, children, contentOffsetX, contentOffsetY, onChangePage, onScrollStart, onScroll, onDragStart, onDrag, onDragEnd, directionLock, onScrollEnd, onDirectionLock: _onDirectionLock, onUpdate: _onUpdate, wheelEnabled = false, layoutId: specificLayoutId, ...rest } = props;
28589
28716
  const layoutId = useLayoutId2(props, {
@@ -28594,7 +28721,7 @@ var Page = /* @__PURE__ */ react_11.default.forwardRef(function Page2(props, for
28594
28721
  ...rest,
28595
28722
  background,
28596
28723
  };
28597
- const hasMountedRef = react_11.default.useRef(false);
28724
+ const hasMountedRef = react_10.default.useRef(false);
28598
28725
  const hasFixedSize = RenderTarget.hasRestrictions() && props.__fromCodeComponentNode && isFiniteNumber(containerProps.width) &&
28599
28726
  isFiniteNumber(containerProps.height);
28600
28727
  if (!hasFixedSize && __fromCodeComponentNode && !containerProps.__fromCanvasComponent) {
@@ -28604,7 +28731,7 @@ var Page = /* @__PURE__ */ react_11.default.forwardRef(function Page2(props, for
28604
28731
  enabled: true,
28605
28732
  };
28606
28733
  }
28607
- const { initial, prev, } = react_11.default.useRef({
28734
+ const { initial, prev, } = react_10.default.useRef({
28608
28735
  initial: {
28609
28736
  x: 0,
28610
28737
  y: 0,
@@ -28620,36 +28747,36 @@ var Page = /* @__PURE__ */ react_11.default.forwardRef(function Page2(props, for
28620
28747
  warnOnce2(`The 'gap' property of Page component can not be negative, but is ${gapValue}.`);
28621
28748
  gap = 0;
28622
28749
  }
28623
- react_11.default.useInsertionEffect(() => {
28750
+ react_10.default.useInsertionEffect(() => {
28624
28751
  injectComponentCSSRules();
28625
28752
  }, []);
28626
- const pageCount = react_11.default.Children.count(children);
28627
- const maxOffsetRef = react_11.default.useRef(0);
28628
- const constraints = react_11.default.useRef({
28753
+ const pageCount = react_10.default.Children.count(children);
28754
+ const maxOffsetRef = react_10.default.useRef(0);
28755
+ const constraints = react_10.default.useRef({
28629
28756
  top: 0,
28630
28757
  left: 0,
28631
28758
  right: 0,
28632
28759
  bottom: 0,
28633
28760
  });
28634
- const fallbackContainerRef = react_11.default.useRef(null);
28761
+ const fallbackContainerRef = react_10.default.useRef(null);
28635
28762
  const containerRef = forwardedRef || fallbackContainerRef;
28636
- const scrollableRef = react_11.default.useRef(null);
28637
- const pageEffectValuesRef = react_11.default.useRef([]);
28638
- const pageRectsRef = react_11.default.useRef([]);
28763
+ const scrollableRef = react_10.default.useRef(null);
28764
+ const pageEffectValuesRef = react_10.default.useRef([]);
28765
+ const pageRectsRef = react_10.default.useRef([]);
28639
28766
  const internalX = useMotionValue(isMotionValue2(contentOffsetX) ? 0 : contentOffsetX ?? 0);
28640
28767
  const internalY = useMotionValue(isMotionValue2(contentOffsetY) ? 0 : contentOffsetY ?? 0);
28641
- const contentOffsetRef = react_11.default.useRef({
28768
+ const contentOffsetRef = react_10.default.useRef({
28642
28769
  x: isMotionValue2(contentOffsetX) ? contentOffsetX : internalX,
28643
28770
  y: isMotionValue2(contentOffsetY) ? contentOffsetY : internalY,
28644
28771
  });
28645
- const currentContentPageRef = react_11.default.useRef(currentPage);
28646
- const propsBoundedCurrentPageRef = react_11.default.useRef(currentPage);
28647
- const latestPropsRef = react_11.default.useRef(props);
28772
+ const currentContentPageRef = react_10.default.useRef(currentPage);
28773
+ const propsBoundedCurrentPageRef = react_10.default.useRef(currentPage);
28774
+ const latestPropsRef = react_10.default.useRef(props);
28648
28775
  latestPropsRef.current = props;
28649
- const lastDirectionRef = react_11.default.useRef(props.direction);
28776
+ const lastDirectionRef = react_10.default.useRef(props.direction);
28650
28777
  const snapToPage = useSnapToPage(currentContentPageRef, contentOffsetRef, isHorizontal);
28651
- const [_, setForceUpdateCount,] = react_11.default.useState(0);
28652
- const containerSizeRef = react_11.default.useRef({
28778
+ const [_, setForceUpdateCount,] = react_10.default.useState(0);
28779
+ const containerSizeRef = react_10.default.useRef({
28653
28780
  width: 200,
28654
28781
  height: 200,
28655
28782
  });
@@ -28657,11 +28784,11 @@ var Page = /* @__PURE__ */ react_11.default.forwardRef(function Page2(props, for
28657
28784
  containerSizeRef.current.width = containerProps.width;
28658
28785
  containerSizeRef.current.height = containerProps.height;
28659
28786
  }
28660
- const updateOnResize = react_11.default.useCallback(() => {
28787
+ const updateOnResize = react_10.default.useCallback(() => {
28661
28788
  if (!hasFixedSize)
28662
- (0, react_12.startTransition)(() => setForceUpdateCount((v) => v + 1));
28789
+ (0, react_11.startTransition)(() => setForceUpdateCount((v) => v + 1));
28663
28790
  }, [hasFixedSize,]);
28664
- react_11.default.useEffect(() => {
28791
+ react_10.default.useEffect(() => {
28665
28792
  if (RenderTarget.current() !== RenderTarget.preview)
28666
28793
  return;
28667
28794
  globalThis.addEventListener('resize', updateOnResize);
@@ -28738,7 +28865,7 @@ var Page = /* @__PURE__ */ react_11.default.forwardRef(function Page2(props, for
28738
28865
  updateAndSnapToPage(currentContentPageRef.current, true);
28739
28866
  });
28740
28867
  }, []);
28741
- react_11.default.useEffect(() => {
28868
+ react_10.default.useEffect(() => {
28742
28869
  if (currentPage !== currentContentPageRef.current)
28743
28870
  updateAndSnapToPage(currentPage);
28744
28871
  }, [currentPage,]);
@@ -28836,7 +28963,7 @@ var Page = /* @__PURE__ */ react_11.default.forwardRef(function Page2(props, for
28836
28963
  });
28837
28964
  };
28838
28965
  pageEffectValuesRef.current = [];
28839
- const childComponents = react_11.default.Children.map(children, (child, index) => {
28966
+ const childComponents = react_10.default.Children.map(children, (child, index) => {
28840
28967
  if (!isReactChild(child) || !isReactElement(child)) {
28841
28968
  return child;
28842
28969
  }
@@ -28888,7 +29015,7 @@ var Page = /* @__PURE__ */ react_11.default.forwardRef(function Page2(props, for
28888
29015
  onDrag: onDragHandler,
28889
29016
  onDragEnd: onDragEndHandler,
28890
29017
  layoutId: layoutId ? `${layoutId}-${index}` : void 0,
28891
- children: react_11.default.cloneElement(child, update),
29018
+ children: react_10.default.cloneElement(child, update),
28892
29019
  }, index);
28893
29020
  });
28894
29021
  useWheelScroll(scrollableRef, {
@@ -29844,7 +29971,7 @@ function convertScrollDirectionToDrag(scrollDirection) {
29844
29971
  }
29845
29972
  var useUpdateChildSize = ({ dragDirection, children, fromCanvasComponent, }) => {
29846
29973
  return (0, react_4.useMemo)(() => {
29847
- return react_11.default.Children.map(children, (child) => {
29974
+ return react_10.default.Children.map(children, (child) => {
29848
29975
  if (child === null || typeof child !== 'object' || typeof child.type === 'string') {
29849
29976
  return child;
29850
29977
  }
@@ -29864,14 +29991,14 @@ var useUpdateChildSize = ({ dragDirection, children, fromCanvasComponent, }) =>
29864
29991
  style: Object.assign({}, child.props.style, updatedSize),
29865
29992
  }
29866
29993
  : updatedSize;
29867
- return react_11.default.cloneElement(child, update);
29994
+ return react_10.default.cloneElement(child, update);
29868
29995
  });
29869
29996
  }, [dragDirection, children, fromCanvasComponent,]);
29870
29997
  };
29871
29998
  var numberFromOptionalMotionValue = (value) => {
29872
29999
  return typeof value === 'number' ? value : value.get();
29873
30000
  };
29874
- var EmulatedScroll = /* @__PURE__ */ react_11.default.forwardRef(function EmulatedScroll2(props, forwardedRef) {
30001
+ var EmulatedScroll = /* @__PURE__ */ react_10.default.forwardRef(function EmulatedScroll2(props, forwardedRef) {
29875
30002
  const { direction = 'vertical', directionLock = false, dragEnabled = true, dragElastic, dragMomentum, dragTransition, wheelEnabled = true, contentOffsetX = 0, contentOffsetY = 0, contentWidth, contentHeight, onScrollStart, onScroll, onScrollEnd, onDragStart, onDrag, onDragEnd, onUpdate, onDirectionLock, style: style2, children, scrollAnimate, resetOffset, overdragEnabled = true, layoutId: specificLayoutId, native: _native, ...containerProps } = props;
29876
30003
  const layoutId = useLayoutId2(props, {
29877
30004
  specificLayoutId,
@@ -29959,7 +30086,7 @@ var EmulatedScroll = /* @__PURE__ */ react_11.default.forwardRef(function Emulat
29959
30086
  return;
29960
30087
  measureAndUpdateScrollOffset();
29961
30088
  }, []);
29962
- react_11.default.useEffect(() => {
30089
+ react_10.default.useEffect(() => {
29963
30090
  if (shouldResetScroll(isInTarget))
29964
30091
  measureAndUpdateScrollOffset();
29965
30092
  if (isInTarget === false)
@@ -30074,7 +30201,7 @@ var EmulatedScroll = /* @__PURE__ */ react_11.default.forwardRef(function Emulat
30074
30201
  setScrollY(currentY);
30075
30202
  return y.on('change', setScrollY);
30076
30203
  }, [y, overdragY, scheduleUpdateScrollListeners, overdragEnabled,]);
30077
- const nativeOnScroll = react_11.default.useCallback(() => {
30204
+ const nativeOnScroll = react_10.default.useCallback(() => {
30078
30205
  const element = containerRef.current;
30079
30206
  if (!(element instanceof HTMLDivElement))
30080
30207
  return;
@@ -30085,7 +30212,7 @@ var EmulatedScroll = /* @__PURE__ */ react_11.default.forwardRef(function Emulat
30085
30212
  if (yDelta > 1)
30086
30213
  y.set(-element.scrollTop);
30087
30214
  }, [x, y,]);
30088
- const isEmpty2 = react_11.default.Children.count(children) === 0;
30215
+ const isEmpty2 = react_10.default.Children.count(children) === 0;
30089
30216
  const width = direction !== 'vertical' && !isEmpty2 ? 'auto' : '100%';
30090
30217
  const height = direction !== 'horizontal' && !isEmpty2 ? 'auto' : '100%';
30091
30218
  const size = !containerProps.__fromCanvasComponent
@@ -30319,7 +30446,7 @@ function useEmulateTouchScroll(ref, direction, enabled) {
30319
30446
  return emptyObject;
30320
30447
  if (RenderTarget.current() !== RenderTarget.preview)
30321
30448
  return emptyObject;
30322
- const scrollAnimationControlsRef = react_11.default.useRef(null);
30449
+ const scrollAnimationControlsRef = react_10.default.useRef(null);
30323
30450
  (0, react_2.useEffect)(() => {
30324
30451
  if (!ref.current)
30325
30452
  return;
@@ -30472,7 +30599,7 @@ function useEmulateTouchScroll(ref, direction, enabled) {
30472
30599
  (_a = scrollAnimationControlsRef.current) == null ? void 0 : _a.stop();
30473
30600
  };
30474
30601
  }, [ref, direction, enabled,]);
30475
- return react_11.default.useMemo(() => {
30602
+ return react_10.default.useMemo(() => {
30476
30603
  return {
30477
30604
  cancelEmulatedTouchScrollAnimation: () => {
30478
30605
  var _a;
@@ -30527,7 +30654,7 @@ function useUpdateScrollOffset(ref, side, offset, cancelEmulatedTouchScrollAnima
30527
30654
  }
30528
30655
  }, [offset,]);
30529
30656
  }
30530
- var NativeScroll = /* @__PURE__ */ react_11.default.forwardRef(function NativeScroll2(props, forwardedRef) {
30657
+ var NativeScroll = /* @__PURE__ */ react_10.default.forwardRef(function NativeScroll2(props, forwardedRef) {
30531
30658
  const { direction = 'vertical', scrollBarVisible = false, dragEnabled = true, contentOffsetX = 0, contentOffsetY = 0, contentWidth: _contentWidth, contentHeight: _contentHeight, children, resetOffset, onScroll, className: className2,
30532
30659
  // Not (yet) supported
30533
30660
  directionLock: _directionLock = false, wheelEnabled: _wheelEnabled = true, scrollAnimate: _scrollAnimate, dragTransition: _dragTransition, dragMomentum: _dragMomentum, dragElastic: _dragElastic, overdragEnabled: _overdragEnabled = true, onScrollStart: _onScrollStart, onScrollEnd: _onScrollEnd, onDragStart: _onDragStart, onDrag: _onDrag, onDragEnd: _onDragEnd, onUpdate: _onUpdate, onDirectionLock: _onDirectionLock, layoutId: specificLayoutId, native: _native,
@@ -30537,14 +30664,14 @@ var NativeScroll = /* @__PURE__ */ react_11.default.forwardRef(function NativeSc
30537
30664
  specificLayoutId,
30538
30665
  postfix: 'scroll',
30539
30666
  });
30540
- const fallbackRef = react_11.default.useRef(null);
30667
+ const fallbackRef = react_10.default.useRef(null);
30541
30668
  const ref = forwardedRef || fallbackRef;
30542
30669
  const { cancelEmulatedTouchScrollAnimation, } = useEmulateTouchScroll(ref, direction, dragEnabled);
30543
30670
  (0, react_5.useInsertionEffect)(() => {
30544
30671
  injectComponentCSSRules();
30545
30672
  }, []);
30546
30673
  const isInTarget = useIsInCurrentNavigationTarget();
30547
- const previousIsInTargetRef = react_11.default.useRef(isInTarget);
30674
+ const previousIsInTargetRef = react_10.default.useRef(isInTarget);
30548
30675
  const updateScrollOffsetHandler = () => {
30549
30676
  if (!resetOffset)
30550
30677
  return;
@@ -30601,7 +30728,7 @@ var NativeScroll = /* @__PURE__ */ react_11.default.forwardRef(function NativeSc
30601
30728
  });
30602
30729
  });
30603
30730
  var Scroll = /* @__PURE__ */ (() => {
30604
- const ScrollInner = react_11.default.forwardRef(function ScrollInner2(props, forwardedRef) {
30731
+ const ScrollInner = react_10.default.forwardRef(function ScrollInner2(props, forwardedRef) {
30605
30732
  if (props.native) {
30606
30733
  return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(NativeScroll, {
30607
30734
  ref: forwardedRef,
@@ -30793,12 +30920,12 @@ function createData(defaultState2, actions) {
30793
30920
  var initialState = {
30794
30921
  update: 0,
30795
30922
  };
30796
- var DataObserverContext = /* @__PURE__ */ react_11.default.createContext({
30923
+ var DataObserverContext = /* @__PURE__ */ react_10.default.createContext({
30797
30924
  update: NaN,
30798
30925
  });
30799
30926
  exports.DataObserverContext = DataObserverContext;
30800
30927
  function useObserveData() {
30801
- const context = react_11.default.useContext(DataObserverContext);
30928
+ const context = react_10.default.useContext(DataObserverContext);
30802
30929
  return !Number.isNaN(context.update);
30803
30930
  }
30804
30931
  var DataObserver = class extends react_9.Component {
@@ -30870,20 +30997,20 @@ function convertColorProps(props) {
30870
30997
  }
30871
30998
  return props;
30872
30999
  }
30873
- function WithOverride(Component17, override) {
31000
+ function WithOverride(Component18, override) {
30874
31001
  const useOverride = typeof override === 'function' ? (props) => override(convertColorProps(props)) : () => convertColorProps(override);
30875
31002
  const ComponentWithOverride = function (props) {
30876
31003
  (0, react_3.useContext)(DataObserverContext);
30877
31004
  const overrideProps = useOverride(props);
30878
31005
  const { style: style2, ...rest } = props;
30879
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
31006
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
30880
31007
  ...rest,
30881
31008
  ...overrideProps,
30882
31009
  _initialStyle: style2,
30883
31010
  });
30884
31011
  };
30885
- (0, import_hoist_non_react_statics4.default)(ComponentWithOverride, Component17);
30886
- ComponentWithOverride['displayName'] = `WithOverride(${Component17.displayName || Component17.name})`;
31012
+ (0, import_hoist_non_react_statics4.default)(ComponentWithOverride, Component18);
31013
+ ComponentWithOverride['displayName'] = `WithOverride(${Component18.displayName || Component18.name})`;
30887
31014
  return ComponentWithOverride;
30888
31015
  }
30889
31016
  var prefix = '__framer__';
@@ -30907,7 +31034,7 @@ function stripPrefixFromPrefixedKey(key7) {
30907
31034
  }
30908
31035
  return void 0;
30909
31036
  }
30910
- var GeneratedComponentContext = /* @__PURE__ */ react_11.default.createContext(void 0);
31037
+ var GeneratedComponentContext = /* @__PURE__ */ react_10.default.createContext(void 0);
30911
31038
  exports.GeneratedComponentContext = GeneratedComponentContext;
30912
31039
  function cloneChildrenWithProps(children, props, asNode) {
30913
31040
  const cloned = React2.Children.map(children, (child) => {
@@ -31008,7 +31135,7 @@ function createRefFunction(state) {
31008
31135
  setRef(prevForwardedRef, value);
31009
31136
  };
31010
31137
  }
31011
- var StyleSheetContext = /* @__PURE__ */ react_11.default.createContext(void 0);
31138
+ var StyleSheetContext = /* @__PURE__ */ react_10.default.createContext(void 0);
31012
31139
  exports.StyleSheetContext = StyleSheetContext;
31013
31140
  var framerPostSSRCSSSelector = 'style[data-framer-css-ssr-minified]';
31014
31141
  var componentsWithServerRenderedStyles = /* @__PURE__ */ (() => {
@@ -31024,30 +31151,14 @@ var componentsWithServerRenderedStyles = /* @__PURE__ */ (() => {
31024
31151
  })();
31025
31152
  var framerCSSMarker = 'data-framer-css-ssr';
31026
31153
  exports.framerCSSMarker = framerCSSMarker;
31027
- var withCSS = (Component17, escapedCSS, componentSerializationId) => react_11.default.forwardRef((props, ref) => {
31028
- const { sheet, cache: cache2, } = react_11.default.useContext(StyleSheetContext) ?? {};
31154
+ var withCSS = (Component18, escapedCSS, componentSerializationId) => react_10.default.forwardRef((props, ref) => {
31155
+ const { sheet, cache: cache2, } = react_10.default.useContext(StyleSheetContext) ?? {};
31029
31156
  const id3 = componentSerializationId;
31030
31157
  if (!isBrowser2()) {
31031
31158
  if (isFunction(escapedCSS))
31032
31159
  escapedCSS = escapedCSS(RenderTarget.current());
31033
31160
  const concatenatedCSS = Array.isArray(escapedCSS) ? escapedCSS.join('\n') : escapedCSS;
31034
- return /* @__PURE__ */ (0, jsx_runtime_2.jsxs)(jsx_runtime_1.Fragment, {
31035
- children: [
31036
- /* @__PURE__ */ (0, jsx_runtime_1.jsx)('style', {
31037
- ...{
31038
- [framerCSSMarker]: true,
31039
- },
31040
- 'data-framer-component': id3,
31041
- dangerouslySetInnerHTML: {
31042
- __html: concatenatedCSS,
31043
- },
31044
- }),
31045
- /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
31046
- ...props,
31047
- ref,
31048
- }),
31049
- ],
31050
- });
31161
+ cssCollector.add(concatenatedCSS, id3);
31051
31162
  }
31052
31163
  (0, react_5.useInsertionEffect)(() => {
31053
31164
  if (id3 && componentsWithServerRenderedStyles.has(id3))
@@ -31059,18 +31170,41 @@ var withCSS = (Component17, escapedCSS, componentSerializationId) => react_11.de
31059
31170
  : escapedCSS.split('\n');
31060
31171
  css22.forEach((rule) => rule && injectCSSRule(rule, sheet, cache2));
31061
31172
  }, []);
31062
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
31173
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
31063
31174
  ...props,
31064
31175
  ref,
31065
31176
  });
31066
31177
  });
31067
31178
  exports.withCSS = withCSS;
31068
- var SSRParentVariantsContext = /* @__PURE__ */ react_11.default.createContext(void 0);
31179
+ var CSSCollector = class {
31180
+ constructor() {
31181
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'styles', /* @__PURE__ */ new Set());
31182
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'componentIds', /* @__PURE__ */ new Set());
31183
+ }
31184
+ add(css22, componentId) {
31185
+ this.styles.add(css22);
31186
+ if (componentId)
31187
+ this.componentIds.add(componentId);
31188
+ }
31189
+ getStyles() {
31190
+ return this.styles;
31191
+ }
31192
+ getComponentIds() {
31193
+ return this.componentIds;
31194
+ }
31195
+ clear() {
31196
+ this.styles.clear();
31197
+ this.componentIds.clear();
31198
+ }
31199
+ };
31200
+ var cssCollector = /* @__PURE__ */ new CSSCollector();
31201
+ exports.cssCollector = cssCollector;
31202
+ var SSRParentVariantsContext = /* @__PURE__ */ react_10.default.createContext(void 0);
31069
31203
  var SSRVariantClassName = 'ssr-variant';
31070
31204
  function renderBranchedChildrenFromPropertyOverrides(overrides, children, props, variantClassNames, primaryVariantId, parentVariants, cloneChildren, activeVariantId) {
31071
- const childrenArray = react_11.default.Children.toArray(children);
31205
+ const childrenArray = react_10.default.Children.toArray(children);
31072
31206
  const child = childrenArray[0];
31073
- if (childrenArray.length !== 1 || !react_11.default.isValidElement(child)) {
31207
+ if (childrenArray.length !== 1 || !react_10.default.isValidElement(child)) {
31074
31208
  console.warn('PropertyOverrides: expected exactly one React element for a child', children);
31075
31209
  return cloneChildren(children, props);
31076
31210
  }
@@ -31140,7 +31274,7 @@ function renderBranchedChildrenFromPropertyOverrides(overrides, children, props,
31140
31274
  assert(!activeVariantId || renderedBranches.length === 1, 'Must render exactly one branch when activeVariantId is given');
31141
31275
  return renderedBranches;
31142
31276
  }
31143
- var SSRVariants = /* @__PURE__ */ react_11.default.forwardRef(function SSRVariants2({ id: _nodeId, children, ...props }, ref) {
31277
+ var SSRVariants = /* @__PURE__ */ react_10.default.forwardRef(function SSRVariants2({ id: _nodeId, children, ...props }, ref) {
31144
31278
  const cloneWithRefs = useCloneChildrenWithPropsAndRef(ref);
31145
31279
  if (isBrowser2()) {
31146
31280
  return cloneWithRefs(children, props);
@@ -31185,10 +31319,10 @@ function propsForBreakpoint(variant, props, overrides) {
31185
31319
  var noopSubscribe = () => () => { };
31186
31320
  var returnTrue = () => true;
31187
31321
  var returnFalse = () => false;
31188
- var PropertyOverridesWithoutCSS = /* @__PURE__ */ react_11.default.forwardRef(function PropertyOverrides(props, ref) {
31322
+ var PropertyOverridesWithoutCSS = /* @__PURE__ */ react_10.default.forwardRef(function PropertyOverrides(props, ref) {
31189
31323
  const cloneWithRefs = useCloneChildrenWithPropsAndRef(ref);
31190
- const ancestorCtx = react_11.default.useContext(SSRParentVariantsContext);
31191
- const isHydrationOrSSR = react_11.default.useSyncExternalStore(noopSubscribe, returnFalse, returnTrue);
31324
+ const ancestorCtx = react_10.default.useContext(SSRParentVariantsContext);
31325
+ const isHydrationOrSSR = react_10.default.useSyncExternalStore(noopSubscribe, returnFalse, returnTrue);
31192
31326
  const action = useConstant2(() => {
31193
31327
  if (isHydrationOrSSR) {
31194
31328
  if (isBrowser2()) {
@@ -31202,7 +31336,7 @@ var PropertyOverridesWithoutCSS = /* @__PURE__ */ react_11.default.forwardRef(fu
31202
31336
  return 0;
31203
31337
  }
31204
31338
  });
31205
- const generatedComponentContext = react_11.default.useContext(GeneratedComponentContext);
31339
+ const generatedComponentContext = react_10.default.useContext(GeneratedComponentContext);
31206
31340
  return useMemoOne(() => {
31207
31341
  const { breakpoint, overrides, children, ...restProps } = props;
31208
31342
  if (!generatedComponentContext) {
@@ -31315,11 +31449,11 @@ var AnimationCollector = class {
31315
31449
  _variantHashes = /* @__PURE__ */ new WeakMap();
31316
31450
  var framerAppearEffects = /* @__PURE__ */ new AnimationCollector();
31317
31451
  exports.framerAppearEffects = framerAppearEffects;
31318
- function withOptimizedAppearEffect(Component17) {
31319
- return react_11.default.forwardRef(({ optimized, ...props }, ref) => {
31452
+ function withOptimizedAppearEffect(Component18) {
31453
+ return react_10.default.forwardRef(({ optimized, ...props }, ref) => {
31320
31454
  var _a;
31321
- const generatedComponentContext = react_11.default.useContext(GeneratedComponentContext);
31322
- const variants = (_a = react_11.default.useContext(SSRParentVariantsContext)) == null ? void 0 : _a.variants;
31455
+ const generatedComponentContext = react_10.default.useContext(GeneratedComponentContext);
31456
+ const variants = (_a = react_10.default.useContext(SSRParentVariantsContext)) == null ? void 0 : _a.variants;
31323
31457
  const id3 = props[framerAppearIdKey];
31324
31458
  if (id3 && !isBrowser2()) {
31325
31459
  framerAppearEffects.setAll(id3, variants,
@@ -31331,7 +31465,7 @@ function withOptimizedAppearEffect(Component17) {
31331
31465
  optimized ? props : null, generatedComponentContext);
31332
31466
  }
31333
31467
  const disabledProps = getDisabledFXPropsInStaticRenderer(props);
31334
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
31468
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
31335
31469
  ref,
31336
31470
  ...props,
31337
31471
  ...disabledProps,
@@ -31427,7 +31561,7 @@ function useFXValues(values, enabled) {
31427
31561
  const effect = useConstant2(() => ({
31428
31562
  values: makeFXValues(enabled ? values : void 0),
31429
31563
  }));
31430
- react_11.default.useEffect(() => {
31564
+ react_10.default.useEffect(() => {
31431
31565
  if (enabled)
31432
31566
  return;
31433
31567
  for (const key7 of effectValuesKeys) {
@@ -31504,7 +31638,7 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
31504
31638
  if (shouldRunRef.current)
31505
31639
  return;
31506
31640
  shouldRunRef.current = true;
31507
- (0, react_12.startTransition)(() => setIsRunning(true));
31641
+ (0, react_11.startTransition)(() => setIsRunning(true));
31508
31642
  void animateLoop();
31509
31643
  }, [animateLoop,]);
31510
31644
  const stop = (0, react_3.useCallback)((overrideRunRef = true) => {
@@ -31517,7 +31651,7 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
31517
31651
  mirrorStateRef.current = false;
31518
31652
  if (overrideRunRef) {
31519
31653
  shouldRunRef.current = false;
31520
- (0, react_12.startTransition)(() => setIsRunning(false));
31654
+ (0, react_11.startTransition)(() => setIsRunning(false));
31521
31655
  }
31522
31656
  }, []);
31523
31657
  const hasLoop = loopEffectEnabled && loop;
@@ -31590,9 +31724,9 @@ function parallaxTransform(scrollY, originalPosition, speed, offset, adjustPosit
31590
31724
  var parallaxOptionsKeys = /* @__PURE__ */ new Set(['speed', 'adjustPosition', 'offset', 'parallaxTransformEnabled',]);
31591
31725
  function useParallax(options, ref, visibilityStyle) {
31592
31726
  const { speed = 100, offset = 0, adjustPosition = false, parallaxTransformEnabled, } = options;
31593
- const originalPosition = react_11.default.useRef(null);
31727
+ const originalPosition = react_10.default.useRef(null);
31594
31728
  const shouldReduceMotion = useReducedMotionConfig();
31595
- const transform2 = react_11.default.useCallback((yValue) => {
31729
+ const transform2 = react_10.default.useCallback((yValue) => {
31596
31730
  if (originalPosition.current === null)
31597
31731
  return 0;
31598
31732
  if (speed === 100)
@@ -31636,8 +31770,11 @@ function useParallax(options, ref, visibilityStyle) {
31636
31770
  : effectDisabledStyle,
31637
31771
  };
31638
31772
  }
31773
+ function isTargetAndTransition(value) {
31774
+ return typeof value === 'object' && value !== null;
31775
+ }
31639
31776
  function getTransition(value) {
31640
- if (isString(value) || !isObject2(value))
31777
+ if (!isTargetAndTransition(value))
31641
31778
  return void 0;
31642
31779
  return value == null ? void 0 : value.transition;
31643
31780
  }
@@ -31649,7 +31786,9 @@ function runEffectAnimation(target, effect, shouldReduceMotion, ref, appearId, i
31649
31786
  return resolve();
31650
31787
  const motionValue2 = effect.values[key7];
31651
31788
  motionValue2.stop();
31652
- let value = !isObject2(target) ? defaultFXValues[key7] : (target == null ? void 0 : target[key7]) ?? defaultFXValues[key7];
31789
+ let value = !isTargetAndTransition(target)
31790
+ ? defaultFXValues[key7]
31791
+ : (target == null ? void 0 : target[key7]) ?? defaultFXValues[key7];
31653
31792
  if (isMotionValue(value))
31654
31793
  value = value.get();
31655
31794
  if (!isNumber2(value))
@@ -31820,7 +31959,7 @@ function useScrollDirectionChange(scrollDirection, cb, options = {}) {
31820
31959
  const { direction, target, } = scrollDirection ?? {};
31821
31960
  const { repeat = true, enabled = true, } = options;
31822
31961
  const currentRouteKey = useCurrentRouteKey();
31823
- react_11.default.useEffect(() => {
31962
+ react_10.default.useEffect(() => {
31824
31963
  if (!direction || !enabled)
31825
31964
  return;
31826
31965
  const _ = currentRouteKey;
@@ -31918,7 +32057,7 @@ function makeStyle(defaults) {
31918
32057
  };
31919
32058
  }
31920
32059
  function useAnimationVariants({ opacity, targetOpacity, perspective: transformPerspective, enter, exit, animate: animateVariant2, ...defaultStyles }) {
31921
- return react_11.default.useMemo(() => ({
32060
+ return react_10.default.useMemo(() => ({
31922
32061
  initial: enter ?? makeStyle({
31923
32062
  ...defaultStyles,
31924
32063
  opacity: opacity ?? targetOpacity ?? 1,
@@ -31936,14 +32075,14 @@ function useStyleAppearEffect(options, ref) {
31936
32075
  const variants = useAnimationVariants(options);
31937
32076
  const enabled = options.styleAppearEffectEnabled;
31938
32077
  const effect = useFXValues(enabled ? variants.initial : variants.animate, enabled);
31939
- const playState = react_11.default.useRef({
32078
+ const playState = react_10.default.useRef({
31940
32079
  isPlaying: false,
31941
32080
  scheduledAppearState: void 0,
31942
32081
  lastAppearState: !options.styleAppearEffectEnabled,
31943
32082
  });
31944
32083
  const currentRouteKey = useCurrentRouteKey();
31945
- const animation = react_11.default.useRef();
31946
- const runAnimation = react_11.default.useCallback(async ({ transition, ...target }, fromInitial) => {
32084
+ const animation = react_10.default.useRef();
32085
+ const runAnimation = react_10.default.useCallback(async ({ transition, ...target }, fromInitial) => {
31947
32086
  const transitionWithFallback = transition ?? variants.animate.transition ?? options.transition;
31948
32087
  await animation.current;
31949
32088
  const visualElement = visualElementStore.get(ref.current);
@@ -31995,7 +32134,7 @@ function useStyleAppearEffect(options, ref) {
31995
32134
  },
31996
32135
  });
31997
32136
  const animateWithScrollInfo = options.targets && enabled && !options.scrollDirection;
31998
- react_11.default.useEffect(() => {
32137
+ react_10.default.useEffect(() => {
31999
32138
  if (!animateWithScrollInfo)
32000
32139
  return;
32001
32140
  const playedState = {
@@ -32075,8 +32214,8 @@ var defaultRanges2 = () => ({
32075
32214
  transformPerspective: [],
32076
32215
  });
32077
32216
  function useAttachOptionalSpring(values, spring2) {
32078
- const springs = react_11.default.useRef({});
32079
- react_11.default.useEffect(() => {
32217
+ const springs = react_10.default.useRef({});
32218
+ react_10.default.useEffect(() => {
32080
32219
  if (spring2 === void 0)
32081
32220
  return;
32082
32221
  for (const key7 of objectKeys(values)) {
@@ -32191,7 +32330,7 @@ function useStyleTransform({ transformTrigger, styleTransformEffectEnabled, tran
32191
32330
  effect.values[key7].set((values == null ? void 0 : values[key7]) ?? defaultFXValues[key7]);
32192
32331
  }
32193
32332
  });
32194
- return react_11.default.useMemo(() => {
32333
+ return react_10.default.useMemo(() => {
32195
32334
  return {
32196
32335
  values: effect.values,
32197
32336
  style: styleTransformEffectEnabled ? effectEnabledStyle : effectDisabledStyle,
@@ -32267,10 +32406,10 @@ function addMotionValueStyle(style2, values) {
32267
32406
  function isVariantOrVariantList2(value) {
32268
32407
  return isString(value) || Array.isArray(value);
32269
32408
  }
32270
- var withFX = (Component17) => react_11.default.forwardRef((props, forwardedRef) => {
32409
+ var withFX = (Component18) => react_10.default.forwardRef((props, forwardedRef) => {
32271
32410
  var _a;
32272
32411
  if (props.__withFX) {
32273
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
32412
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
32274
32413
  ...props,
32275
32414
  animate: void 0,
32276
32415
  initial: void 0,
@@ -32280,7 +32419,7 @@ var withFX = (Component17) => react_11.default.forwardRef((props, forwardedRef)
32280
32419
  }
32281
32420
  const disabledProps = getDisabledFXPropsInStaticRenderer(props);
32282
32421
  if (disabledProps) {
32283
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
32422
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
32284
32423
  ...props,
32285
32424
  ...disabledProps,
32286
32425
  ref: forwardedRef,
@@ -32293,7 +32432,7 @@ var withFX = (Component17) => react_11.default.forwardRef((props, forwardedRef)
32293
32432
  const { values: transformValues2, style: scrollStyle, } = useStyleTransform(styleTransform, observerRef);
32294
32433
  const { values: appearEffectValues, style: scrollAppearStyle, } = useStyleAppearEffect(styleAppear, observerRef);
32295
32434
  const { values: loopValues, style: loopStyle, } = useLoop(loop, observerRef);
32296
- const fxValues = react_11.default.useMemo(() => {
32435
+ const fxValues = react_10.default.useMemo(() => {
32297
32436
  const layerOpacity = new MotionValue(targetOpacityValue ?? 1);
32298
32437
  return {
32299
32438
  scale: [appearEffectValues.scale, loopValues.scale, presenceEffectValues.scale, transformValues2.scale,],
@@ -32348,7 +32487,7 @@ var withFX = (Component17) => react_11.default.forwardRef((props, forwardedRef)
32348
32487
  exit,
32349
32488
  }
32350
32489
  : {};
32351
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
32490
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
32352
32491
  ...forwardedProps,
32353
32492
  ...motionGestures,
32354
32493
  __withFX: true,
@@ -32386,12 +32525,12 @@ function ComponentPresetsConsumer({ componentIdentifier, children, }) {
32386
32525
  const presetProps = componentPresets[componentIdentifier] ?? {};
32387
32526
  return children(presetProps);
32388
32527
  }
32389
- var ComponentViewportContext = /* @__PURE__ */ react_11.default.createContext({});
32528
+ var ComponentViewportContext = /* @__PURE__ */ react_10.default.createContext({});
32390
32529
  function useComponentViewport() {
32391
- return react_11.default.useContext(ComponentViewportContext);
32530
+ return react_10.default.useContext(ComponentViewportContext);
32392
32531
  }
32393
- var ComponentViewportProvider = /* @__PURE__ */ react_11.default.forwardRef(function ComponentViewportProvider2({ width, height, y, children, ...rest }, ref) {
32394
- const componentViewport = react_11.default.useMemo(() => {
32532
+ var ComponentViewportProvider = /* @__PURE__ */ react_10.default.forwardRef(function ComponentViewportProvider2({ width, height, y, children, ...rest }, ref) {
32533
+ const componentViewport = react_10.default.useMemo(() => {
32395
32534
  return {
32396
32535
  width,
32397
32536
  height,
@@ -32405,9 +32544,9 @@ var ComponentViewportProvider = /* @__PURE__ */ react_11.default.forwardRef(func
32405
32544
  });
32406
32545
  });
32407
32546
  exports.ComponentViewportProvider = ComponentViewportProvider;
32408
- var withGeneratedLayoutId = (Component17) => react_11.default.forwardRef((props, ref) => {
32547
+ var withGeneratedLayoutId = (Component18) => react_10.default.forwardRef((props, ref) => {
32409
32548
  const layoutId = useLayoutId2(props);
32410
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
32549
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
32411
32550
  layoutId,
32412
32551
  ...props,
32413
32552
  layoutIdKey: void 0,
@@ -32438,7 +32577,7 @@ var SynchronousSuspenseErrorBoundary = class extends react_9.Component {
32438
32577
  if (!isSuspense426Error(error))
32439
32578
  return;
32440
32579
  const componentStack = errorInfo == null ? void 0 : errorInfo.componentStack;
32441
- console.error('Caught an error in SynchronousSuspenseErrorBoundary:\n\n', error, '\n\nComponent stack:\n', componentStack, '\n\nThis error indicates a state update wasn\u2019t wrapped with startTransition. Some of the UI might flash as a result. If you are the author of this website, check recently added custom code, and if the issue persists, report it to the Framer team via https://www.framer.com/contact/.');
32580
+ console.error('Caught an error in SynchronousSuspenseErrorBoundary:\n\n', error, '\n\nComponent stack:\n', componentStack, '\n\nThis error indicates a state update wasn\u2019t wrapped with `startTransition`. Some of the UI might flash as a result. If you are the author of this website, update external components and check recently added custom code or code overrides. In case the issue persists, report it to the Framer team via https://www.framer.com/contact/.');
32442
32581
  const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : void 0;
32443
32582
  sendTrackingEvent('published_site_load_recoverable_error', {
32444
32583
  message: String(error),
@@ -32484,7 +32623,7 @@ function SuspenseThatPreservesDom({ children, }) {
32484
32623
  children,
32485
32624
  });
32486
32625
  }
32487
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(react_13.Suspense, {
32626
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(react_12.Suspense, {
32488
32627
  fallback: suspend,
32489
32628
  children,
32490
32629
  });
@@ -32560,7 +32699,7 @@ function ServerSideErrorBoundary({ children, fallback = nullFallback, }) {
32560
32699
  ? // On the server, Suspense fallback is activated by errors. So we use the actual Suspense,
32561
32700
  // and render the actual error fallback if Suspense activates.
32562
32701
  /* @__PURE__ */
32563
- (0, jsx_runtime_1.jsx)(react_13.Suspense, {
32702
+ (0, jsx_runtime_1.jsx)(react_12.Suspense, {
32564
32703
  fallback,
32565
32704
  children,
32566
32705
  })
@@ -32597,13 +32736,13 @@ var DeprecatedContainerErrorBoundary = class extends react_9.Component {
32597
32736
  return hasError ? null : children;
32598
32737
  }
32599
32738
  };
32600
- var ExternalComponentContext = /* @__PURE__ */ (() => react_11.default.createContext(void 0))();
32739
+ var ExternalComponentContext = /* @__PURE__ */ (() => react_10.default.createContext(void 0))();
32601
32740
  function useNearestExternalComponent() {
32602
- return react_11.default.useContext(ExternalComponentContext);
32741
+ return react_10.default.useContext(ExternalComponentContext);
32603
32742
  }
32604
32743
  function useFurthestExternalComponent() {
32605
32744
  const nearestExternalComponent = useNearestExternalComponent();
32606
- const furthestExternalComponent = react_11.default.useMemo(() => {
32745
+ const furthestExternalComponent = react_10.default.useMemo(() => {
32607
32746
  if (!nearestExternalComponent)
32608
32747
  return void 0;
32609
32748
  let item = nearestExternalComponent;
@@ -32616,7 +32755,7 @@ function useFurthestExternalComponent() {
32616
32755
  }
32617
32756
  function IsExternalComponent({ children, scopeId, nodeId, }) {
32618
32757
  const parent = useNearestExternalComponent();
32619
- const newValue = react_11.default.useMemo(() => ({
32758
+ const newValue = react_10.default.useMemo(() => ({
32620
32759
  level: ((parent == null ? void 0 : parent.level) ?? 0) + 1,
32621
32760
  scopeId,
32622
32761
  nodeId,
@@ -32696,12 +32835,12 @@ function useMaybeWrapComponentWithCodeBoundary(children, scopeId, nodeId, isAuth
32696
32835
  }
32697
32836
  return children;
32698
32837
  }
32699
- var ContainerInner = /* @__PURE__ */ react_11.default.forwardRef(({ children, layoutId, as, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot, ...props }, ref) => {
32838
+ var ContainerInner = /* @__PURE__ */ react_10.default.forwardRef(({ children, layoutId, as, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot, ...props }, ref) => {
32700
32839
  const outerLayoutId = useConstant2(() => layoutId ? `${layoutId}-container` : void 0);
32701
32840
  const MotionComponent = htmlElementAsMotionComponent(as);
32702
- const clonedChildren = react_11.default.Children.map(children, (child) => {
32703
- return react_11.default.isValidElement(child)
32704
- ? react_11.default.cloneElement(child, {
32841
+ const clonedChildren = react_10.default.Children.map(children, (child) => {
32842
+ return react_10.default.isValidElement(child)
32843
+ ? react_10.default.cloneElement(child, {
32705
32844
  layoutId,
32706
32845
  })
32707
32846
  : child;
@@ -32729,7 +32868,7 @@ var ContainerInner = /* @__PURE__ */ react_11.default.forwardRef(({ children, la
32729
32868
  });
32730
32869
  var Container = /* @__PURE__ */ withGeneratedLayoutId(ContainerInner);
32731
32870
  exports.Container = Container;
32732
- var SmartComponentScopedContainer = /* @__PURE__ */ react_11.default.forwardRef((props, ref) => {
32871
+ var SmartComponentScopedContainer = /* @__PURE__ */ react_10.default.forwardRef((props, ref) => {
32733
32872
  const { as, children,
32734
32873
  // Code boundary-specific props
32735
32874
  scopeId, nodeId, isAuthoredByUser, rendersWithMotion, isModuleExternal, inComponentSlot,
@@ -32738,10 +32877,10 @@ var SmartComponentScopedContainer = /* @__PURE__ */ react_11.default.forwardRef(
32738
32877
  const childrenWithCodeBoundary = useMaybeWrapComponentWithCodeBoundary(children, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot);
32739
32878
  const tagName = props.as ?? 'div';
32740
32879
  if (props.rendersWithMotion) {
32741
- const Component17 = htmlElementAsMotionComponent(tagName);
32880
+ const Component18 = htmlElementAsMotionComponent(tagName);
32742
32881
  return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(NodeIdContext.Provider, {
32743
32882
  value: nodeId ?? null,
32744
- children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
32883
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
32745
32884
  ...otherProps,
32746
32885
  ref,
32747
32886
  style: props.style,
@@ -32750,11 +32889,11 @@ var SmartComponentScopedContainer = /* @__PURE__ */ react_11.default.forwardRef(
32750
32889
  });
32751
32890
  }
32752
32891
  else {
32753
- const Component17 = tagName;
32892
+ const Component18 = tagName;
32754
32893
  const { layoutId, layoutDependency, ...plainHTMLRenderableProps } = otherProps;
32755
32894
  return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(NodeIdContext.Provider, {
32756
32895
  value: nodeId ?? null,
32757
- children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
32896
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
32758
32897
  ...plainHTMLRenderableProps,
32759
32898
  ref,
32760
32899
  style: props.style,
@@ -32781,7 +32920,7 @@ function getActiveDefinitions(map2, previousDefinitions, newDefinitions) {
32781
32920
  }
32782
32921
  return allCursors;
32783
32922
  }
32784
- var CustomCursorContextProvider = /* @__PURE__ */ (0, react_14.memo)(function CustomCursorList({ children, }) {
32923
+ var CustomCursorContextProvider = /* @__PURE__ */ (0, react_13.memo)(function CustomCursorList({ children, }) {
32785
32924
  const value = useConstant2(() => {
32786
32925
  const events = /* @__PURE__ */ new Set();
32787
32926
  let allCursors = {};
@@ -32882,7 +33021,7 @@ function isEmptyObject(object) {
32882
33021
  return false;
32883
33022
  return true;
32884
33023
  }
32885
- var CustomCursorComponent = /* @__PURE__ */ (0, react_14.memo)(function CustomCursorComponent2() {
33024
+ var CustomCursorComponent = /* @__PURE__ */ (0, react_13.memo)(function CustomCursorComponent2() {
32886
33025
  const { onRegisterCursors, } = (0, react_3.useContext)(CustomCursorContext);
32887
33026
  const [hasHoverCapability, setHasHoverCapability,] = (0, react_4.useState)(false);
32888
33027
  const pointerX = useMotionValue(0);
@@ -32898,7 +33037,7 @@ var CustomCursorComponent = /* @__PURE__ */ (0, react_14.memo)(function CustomCu
32898
33037
  const noHoverMQ = safeWindow.matchMedia('(any-hover: none)');
32899
33038
  function updateRender(e) {
32900
33039
  if (e.matches) {
32901
- (0, react_12.startTransition)(() => setHasHoverCapability(false));
33040
+ (0, react_11.startTransition)(() => setHasHoverCapability(false));
32902
33041
  }
32903
33042
  else {
32904
33043
  setHasHoverCapability(true);
@@ -33031,7 +33170,7 @@ var CustomCursorComponent = /* @__PURE__ */ (0, react_14.memo)(function CustomCu
33031
33170
  ]);
33032
33171
  if (!hasHoverCapability || !cursor || !Cursor)
33033
33172
  return null;
33034
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(react_13.Suspense, {
33173
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(react_12.Suspense, {
33035
33174
  children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Cursor, {
33036
33175
  transformTemplate: transformTemplate2,
33037
33176
  style: {
@@ -33055,6 +33194,341 @@ function useCustomCursors(webPageCursors) {
33055
33194
  return registerCursors(cursors, id3);
33056
33195
  }, [registerCursors, id3,]);
33057
33196
  }
33197
+ var linkKey = 'webPageId';
33198
+ function isLinkToWebPage(link) {
33199
+ return Boolean(link && typeof link === 'object' && linkKey in link);
33200
+ }
33201
+ function linkInfoKey(link) {
33202
+ var _a, _b;
33203
+ return `${link.scopeId}:${link.nodeId}:${(_a = link.furthestExternalComponent) == null ? void 0 : _a.scopeId}:${(_b = link.furthestExternalComponent) == null ? void 0 : _b.nodeId}`;
33204
+ }
33205
+ var NestedLinksCollector = class {
33206
+ constructor() {
33207
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'collectedLinks', /* @__PURE__ */ new Map());
33208
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'nestingInfo', /* @__PURE__ */ new Map());
33209
+ }
33210
+ clear() {
33211
+ this.collectedLinks.clear();
33212
+ this.nestingInfo.clear();
33213
+ }
33214
+ /**
33215
+ * Returns a Map of outer links to their inner links.
33216
+ *
33217
+ * NOTE: This function is called in the SSG renderer sandbox (<root>/src/ssg/src/ssg-sandbox-renderer/sandbox/worker/renderer.ts)
33218
+ */
33219
+ getLinks() {
33220
+ const result = /* @__PURE__ */ new Map();
33221
+ for (const [outerLinkKey, innerLinkKeys,] of this.nestingInfo) {
33222
+ const outerLinkInfo = this.collectedLinks.get(outerLinkKey);
33223
+ assert(outerLinkInfo, `Outer link not found: ${outerLinkKey}`);
33224
+ const links = Array.from(innerLinkKeys).map((innerLinkKey) => {
33225
+ const innerLinkInfo = this.collectedLinks.get(innerLinkKey);
33226
+ assert(innerLinkInfo, `Inner link not found: ${innerLinkKey}`);
33227
+ return innerLinkInfo;
33228
+ });
33229
+ result.set(outerLinkInfo, links);
33230
+ }
33231
+ return result;
33232
+ }
33233
+ collectNestedLink(outerLink, innerLink) {
33234
+ if (isWindow && !isTest() || !outerLink.nodeId || !innerLink.nodeId) {
33235
+ return;
33236
+ }
33237
+ this.collectedLinks.set(linkInfoKey(outerLink), outerLink);
33238
+ this.collectedLinks.set(linkInfoKey(innerLink), innerLink);
33239
+ const outerLinkNestingInfo = this.nestingInfo.get(linkInfoKey(outerLink)) ?? /* @__PURE__ */ new Set();
33240
+ outerLinkNestingInfo.add(linkInfoKey(innerLink));
33241
+ this.nestingInfo.set(linkInfoKey(outerLink), outerLinkNestingInfo);
33242
+ }
33243
+ };
33244
+ var nestedLinksCollector = /* @__PURE__ */ new NestedLinksCollector();
33245
+ exports.nestedLinksCollector = nestedLinksCollector;
33246
+ function useIsOnFramerCanvas() {
33247
+ return RenderTarget.current() === RenderTarget.canvas;
33248
+ }
33249
+ function isInternalURL(href) {
33250
+ if (href === void 0)
33251
+ return false;
33252
+ if (href.startsWith('#') || href.startsWith('/') || href.startsWith('.'))
33253
+ return true;
33254
+ return false;
33255
+ }
33256
+ function isValidURL(href, isInternal) {
33257
+ try {
33258
+ const url = new URL(href);
33259
+ return Boolean(url.protocol);
33260
+ }
33261
+ catch { }
33262
+ return isInternal;
33263
+ }
33264
+ function getRouteFromPageLink(pageLink, router, currentRoute) {
33265
+ var _a;
33266
+ if (isString(pageLink)) {
33267
+ const isInternal = isInternalURL(pageLink);
33268
+ if (!router.routes || !router.getRoute || !currentRoute || !isInternal) {
33269
+ return;
33270
+ }
33271
+ const [pathnameWithQueryParams,] = pageLink.split('#', 2);
33272
+ if (pathnameWithQueryParams === void 0)
33273
+ return;
33274
+ const [pathname,] = pathnameWithQueryParams.split('?', 2);
33275
+ if (pathname === void 0)
33276
+ return;
33277
+ const { routeId, } = inferInitialRouteFromPath(router.routes, pathname);
33278
+ return router.getRoute(routeId);
33279
+ }
33280
+ const { webPageId, } = pageLink;
33281
+ return (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId);
33282
+ }
33283
+ var elementKey = 'element';
33284
+ var collectionKey = 'collection';
33285
+ var collectionItemIdKey = 'collectionItemId';
33286
+ var pathVariablesKey = 'pathVariables';
33287
+ var mediaType = 'framer/page-link,';
33288
+ function isFramerPageLink(value) {
33289
+ return isString(value) && value.startsWith(`data:${mediaType}`);
33290
+ }
33291
+ function createFramerPageLink(targetId = null, options = {}) {
33292
+ const target = targetId ? targetId : 'none';
33293
+ const link = new URL(`data:${mediaType}${target}`);
33294
+ if (options.element) {
33295
+ link.searchParams.append(elementKey, options.element);
33296
+ }
33297
+ if (options.collectionItem) {
33298
+ link.searchParams.append(collectionKey, options.collectionItem.collection);
33299
+ link.searchParams.append(collectionItemIdKey, options.collectionItem.collectionItemId);
33300
+ link.searchParams.append(pathVariablesKey, new URLSearchParams(options.collectionItem.pathVariables).toString());
33301
+ }
33302
+ return link.href;
33303
+ }
33304
+ function parseFramerPageLink(link) {
33305
+ if (!isFramerPageLink(link))
33306
+ return;
33307
+ try {
33308
+ const url = new URL(link);
33309
+ const target = url.pathname.substring(mediaType.length);
33310
+ const searchParams = url.searchParams;
33311
+ const element = searchParams.has(elementKey) ? searchParams.get(elementKey) : void 0;
33312
+ let collectionItem;
33313
+ const collection = searchParams.get(collectionKey);
33314
+ const collectionItemId = searchParams.get(collectionItemIdKey);
33315
+ const pathVariablesValue = searchParams.get(pathVariablesKey);
33316
+ if (collection && collectionItemId && pathVariablesValue) {
33317
+ const pathVariables = Object.fromEntries(new URLSearchParams(pathVariablesValue).entries());
33318
+ collectionItem = {
33319
+ collection,
33320
+ collectionItemId,
33321
+ pathVariables,
33322
+ };
33323
+ }
33324
+ return {
33325
+ target: target === 'none' ? null : target,
33326
+ /**
33327
+ * For historical reason we used to set "element=none" into the
33328
+ * datalink, we no longer do that today, but we still keep this code
33329
+ * so we could parse legacy links correctly.
33330
+ */
33331
+ element: element === 'none' ? void 0 : element,
33332
+ collectionItem,
33333
+ };
33334
+ }
33335
+ catch {
33336
+ return;
33337
+ }
33338
+ }
33339
+ function shouldOpenLinkInNewTab(link) {
33340
+ return !isFramerPageLink(link);
33341
+ }
33342
+ function navigateFromAttributes(navigate, element, implicitPathVariables) {
33343
+ var _a;
33344
+ let routeId = element.getAttribute('data-framer-page-link-target');
33345
+ let elementId;
33346
+ let pathVariables;
33347
+ if (routeId) {
33348
+ elementId = element.getAttribute('data-framer-page-link-element') ?? void 0;
33349
+ const pathVariablesRaw = element.getAttribute('data-framer-page-link-path-variables');
33350
+ if (pathVariablesRaw) {
33351
+ pathVariables = Object.fromEntries(new URLSearchParams(pathVariablesRaw).entries());
33352
+ }
33353
+ }
33354
+ else {
33355
+ const href = element.getAttribute('href');
33356
+ if (!href)
33357
+ return false;
33358
+ const link = parseFramerPageLink(href);
33359
+ if (!link || !link.target)
33360
+ return false;
33361
+ routeId = link.target;
33362
+ elementId = link.element ?? void 0;
33363
+ pathVariables = (_a = link.collectionItem) == null ? void 0 : _a.pathVariables;
33364
+ }
33365
+ const smoothScroll = elementId ? element.dataset.framerSmoothScroll !== void 0 : void 0;
33366
+ navigate(routeId, elementId, Object.assign({}, implicitPathVariables, pathVariables), smoothScroll);
33367
+ return true;
33368
+ }
33369
+ function linkFromFramerPageLink(link) {
33370
+ if (!isFramerPageLink(link))
33371
+ return link;
33372
+ const parsed = parseFramerPageLink(link);
33373
+ if (!parsed)
33374
+ return void 0;
33375
+ const { target, element, collectionItem, } = parsed;
33376
+ if (!target)
33377
+ return void 0;
33378
+ return {
33379
+ webPageId: target,
33380
+ hash: element ?? void 0,
33381
+ pathVariables: createVariablesFromPageLinkCollectionItem(collectionItem),
33382
+ };
33383
+ }
33384
+ function createVariablesFromPageLinkCollectionItem(collectionItem) {
33385
+ if (!collectionItem)
33386
+ return void 0;
33387
+ const variables = {};
33388
+ for (const pathVariablesKey2 in collectionItem.pathVariables) {
33389
+ const value = collectionItem.pathVariables[pathVariablesKey2];
33390
+ if (value)
33391
+ variables[pathVariablesKey2] = value;
33392
+ }
33393
+ return variables;
33394
+ }
33395
+ var OuterLinkContext = /* @__PURE__ */ (0, react_1.createContext)(void 0);
33396
+ function ResetOuterLinkContext({ children, }) {
33397
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(OuterLinkContext.Provider, {
33398
+ value: void 0,
33399
+ children,
33400
+ });
33401
+ }
33402
+ function useReplaceNestedLinks(children, scopeId, nodeId, href, propsAddedByLink, observerRef) {
33403
+ const outerLink = (0, react_3.useContext)(OuterLinkContext);
33404
+ const furthestExternalComponent = useFurthestExternalComponent();
33405
+ const innerLink = (0, react_4.useMemo)(() => ({
33406
+ scopeId,
33407
+ nodeId,
33408
+ furthestExternalComponent,
33409
+ }), [scopeId, nodeId, furthestExternalComponent,]);
33410
+ const router = useRouter();
33411
+ const currentRoute = useCurrentRoute();
33412
+ const route = (0, react_4.useMemo)(() => {
33413
+ const pageLink = isLinkToWebPage(href) ? href : linkFromFramerPageLink(href);
33414
+ if (!pageLink)
33415
+ return;
33416
+ return getRouteFromPageLink(pageLink, router, currentRoute);
33417
+ }, [currentRoute, href, router,]);
33418
+ const isOnFramerCanvas = useIsOnFramerCanvas();
33419
+ const shouldReplaceLink = Boolean(!isOnFramerCanvas && (outerLink == null ? void 0 : outerLink.nodeId) && innerLink.nodeId);
33420
+ const onClick = (0, react_3.useCallback)((event) => {
33421
+ var _a;
33422
+ if (!propsAddedByLink.href)
33423
+ return;
33424
+ event.preventDefault();
33425
+ event.stopPropagation();
33426
+ const isAppleDevice = /Mac|iPod|iPhone|iPad/u.test(__unframerNavigator2.userAgent);
33427
+ if (isAppleDevice ? event.metaKey : event.ctrlKey) {
33428
+ openExternalLink(propsAddedByLink.href, '', '_blank');
33429
+ return;
33430
+ }
33431
+ if (route) {
33432
+ (_a = propsAddedByLink.navigate) == null ? void 0 : _a.call(propsAddedByLink);
33433
+ }
33434
+ else {
33435
+ openExternalLink(propsAddedByLink.href, propsAddedByLink.rel, propsAddedByLink.target);
33436
+ }
33437
+ }, [propsAddedByLink, route,]);
33438
+ const onAuxClick = (0, react_3.useCallback)((event) => {
33439
+ if (!propsAddedByLink.href)
33440
+ return;
33441
+ event.preventDefault();
33442
+ event.stopPropagation();
33443
+ openExternalLink(propsAddedByLink.href, '', '_blank');
33444
+ }, [propsAddedByLink,]);
33445
+ const onKeyDown = (0, react_3.useCallback)((event) => {
33446
+ var _a;
33447
+ if (!propsAddedByLink.href)
33448
+ return;
33449
+ if (event.key !== 'Enter')
33450
+ return;
33451
+ event.preventDefault();
33452
+ event.stopPropagation();
33453
+ if (route) {
33454
+ (_a = propsAddedByLink.navigate) == null ? void 0 : _a.call(propsAddedByLink);
33455
+ }
33456
+ else {
33457
+ openExternalLink(propsAddedByLink.href, propsAddedByLink.rel, propsAddedByLink.target);
33458
+ }
33459
+ }, [propsAddedByLink, route,]);
33460
+ useRefEffect(observerRef, (node) => {
33461
+ if (node === null)
33462
+ return;
33463
+ if (!shouldReplaceLink)
33464
+ return;
33465
+ node.dataset.hydrated = 'true';
33466
+ }, [shouldReplaceLink,]);
33467
+ let replacedChildren = children;
33468
+ if (shouldReplaceLink) {
33469
+ react_6.Children.forEach(children, (child) => {
33470
+ if (!isChildReplaceable(child))
33471
+ return;
33472
+ assert(linkInfoIsCollectable(outerLink), 'outerLink must have nodeId defined at this point; this was verified with `shouldReplaceLink` above');
33473
+ assert(linkInfoIsCollectable(innerLink), 'innerLink must have nodeId defined at this point; this was verified with `shouldReplaceLink` above');
33474
+ nestedLinksCollector.collectNestedLink(outerLink, innerLink);
33475
+ });
33476
+ replacedChildren = react_6.Children.map(children, (child) => {
33477
+ if (!isChildReplaceable(child))
33478
+ return child;
33479
+ const tag = maybeReplaceAnchorWithSpan(child.type);
33480
+ const { children: childChildren, ...childProps } = child.props;
33481
+ const props = {
33482
+ ...childProps,
33483
+ // This attribute is used in `ssg/src/ssg-sandbox-renderer/worker/nestedLinks.ts` to handle the nested links clicks
33484
+ 'data-nested-link': true,
33485
+ role: 'link',
33486
+ tabIndex: 0,
33487
+ onClick,
33488
+ onAuxClick,
33489
+ onKeyDown,
33490
+ as: childProps.as && maybeReplaceAnchorWithSpan(childProps.as),
33491
+ };
33492
+ const ref = 'ref' in child ? child.ref : void 0;
33493
+ return (0, react_8.createElement)(tag, // We need to pass the ref here again, otherwise it will be lost
33494
+ {
33495
+ ...props,
33496
+ ref,
33497
+ }, childChildren);
33498
+ });
33499
+ }
33500
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(OuterLinkContext.Provider, {
33501
+ value: innerLink,
33502
+ children: replacedChildren,
33503
+ });
33504
+ }
33505
+ function linkInfoIsCollectable(linkInfo) {
33506
+ return !isUndefined(linkInfo == null ? void 0 : linkInfo.nodeId);
33507
+ }
33508
+ function isChildReplaceable(child) {
33509
+ return (0, react_6.isValidElement)(child) &&
33510
+ (maybeReplaceAnchorWithSpan(child.type) !== child.type || maybeReplaceAnchorWithSpan(child.props.as) !== child.props.as);
33511
+ }
33512
+ function openExternalLink(href, rel, target) {
33513
+ const link = document.createElement('a');
33514
+ link.href = href;
33515
+ if (rel) {
33516
+ link.rel = rel;
33517
+ }
33518
+ if (target) {
33519
+ link.target = target;
33520
+ }
33521
+ document.body.appendChild(link);
33522
+ link.click();
33523
+ link.remove();
33524
+ }
33525
+ function maybeReplaceAnchorWithSpan(component) {
33526
+ if (component === 'a')
33527
+ return 'span';
33528
+ if (isMotionComponent(component) && unwrapMotionComponent(component) === 'a')
33529
+ return motion.span;
33530
+ return component;
33531
+ }
33058
33532
  var Polygon = {
33059
33533
  /**
33060
33534
  * Determine if the vertices are ordered clockwise or counter-clockwise. This works for simple
@@ -33451,15 +33925,15 @@ function domWriteUpdatePosition(floatingPositionRef, position, rect, scrollX, sc
33451
33925
  });
33452
33926
  }
33453
33927
  var FloatingStackingContext = /* @__PURE__ */ (() => {
33454
- const Context2 = react_11.default.createContext(/* @__PURE__ */ new Set());
33928
+ const Context2 = react_10.default.createContext(/* @__PURE__ */ new Set());
33455
33929
  Context2.displayName = 'FloatingStackingContext';
33456
33930
  return Context2;
33457
33931
  })();
33458
33932
  function useDismissFloatingLayer(anchorRef, floatingPositionRef, safeAreaRef, { safeArea, onDismiss, }) {
33459
33933
  const descendantStackingContext = useConstant2(() => /* @__PURE__ */ new Set());
33460
- const ancestorStackingContext = react_11.default.useContext(FloatingStackingContext);
33934
+ const ancestorStackingContext = react_10.default.useContext(FloatingStackingContext);
33461
33935
  const [isPresent2, safeToRemove,] = usePresence();
33462
- react_11.default.useEffect(() => {
33936
+ react_10.default.useEffect(() => {
33463
33937
  if (isPresent2) {
33464
33938
  if (!floatingPositionRef.current)
33465
33939
  return;
@@ -33474,7 +33948,7 @@ function useDismissFloatingLayer(anchorRef, floatingPositionRef, safeAreaRef, {
33474
33948
  safeToRemove();
33475
33949
  }
33476
33950
  }, [isPresent2, safeToRemove, floatingPositionRef, ancestorStackingContext,]);
33477
- react_11.default.useEffect(() => {
33951
+ react_10.default.useEffect(() => {
33478
33952
  if (!safeArea) {
33479
33953
  const handleEscape = (e) => {
33480
33954
  if (e.key !== 'Escape')
@@ -33536,7 +34010,7 @@ function childrenWithOrigin(child, { x, y, }) {
33536
34010
  originX: x,
33537
34011
  originY: y,
33538
34012
  };
33539
- return react_11.default.cloneElement(child, {
34013
+ return react_10.default.cloneElement(child, {
33540
34014
  style: style2,
33541
34015
  });
33542
34016
  }
@@ -33554,30 +34028,42 @@ function getPortalContainer(deprecatedSelector, inComponent) {
33554
34028
  return document.body;
33555
34029
  }
33556
34030
  function Floating({ alignment, placement, safeArea, offsetX, offsetY, anchorRef, className: className2, children, portalSelector, zIndex, collisionDetection = false, collisionDetectionPadding, onDismiss, ...rest }) {
33557
- const floatingPositionRef = react_11.default.useRef(null);
33558
- const safeAreaRef = react_11.default.useRef(null);
33559
- const contentRef = react_11.default.useRef(null);
34031
+ const floatingPositionRef = react_10.default.useRef(null);
34032
+ const safeAreaRef = react_10.default.useRef(null);
34033
+ const contentRef = react_10.default.useRef(null);
33560
34034
  const [origin, updateOrigin,] = useDynamicMotionOrigin(placement, alignment);
33561
- react_11.default.useLayoutEffect(() => {
34035
+ react_10.default.useLayoutEffect(() => {
33562
34036
  if (!refHasValue(anchorRef) || !contentRef.current || !placement || !alignment)
33563
34037
  return;
33564
34038
  const offset = {
33565
34039
  x: offsetX ?? 0,
33566
34040
  y: offsetY ?? 0,
33567
34041
  };
33568
- let getSafePlacementRect;
33569
- let position;
33570
34042
  let cleanup;
33571
34043
  let cleanupHasRun = false;
33572
34044
  let initialUpdateHasRun = false;
33573
34045
  let anchorRect;
33574
- let elementRect;
33575
34046
  let safePlacement;
33576
34047
  let calculatedRect;
33577
34048
  let latestEvent;
33578
34049
  let updateSafeArea;
33579
34050
  let scrollX = 0;
33580
34051
  let scrollY = 0;
34052
+ const ancestorInfo = domReadGetAncestorInfo(anchorRef);
34053
+ const position = ancestorInfo.position;
34054
+ const elementRect = contentRef.current.getBoundingClientRect();
34055
+ const getSafePlacementRect = makeGetSafePlacementFloatingPositionRect({
34056
+ placement,
34057
+ alignment,
34058
+ offset,
34059
+ collisionDetectionSize: collisionDetection
34060
+ ? {
34061
+ width: safeWindow.innerWidth,
34062
+ height: safeWindow.innerHeight,
34063
+ }
34064
+ : void 0,
34065
+ collisionDetectionPadding,
34066
+ });
33581
34067
  const onRender = () => {
33582
34068
  if (cleanupHasRun)
33583
34069
  return;
@@ -33617,31 +34103,12 @@ function Floating({ alignment, placement, safeArea, offsetX, offsetY, anchorRef,
33617
34103
  safePlacement = safePlacementAndRect[0];
33618
34104
  calculatedRect = safePlacementAndRect[1];
33619
34105
  };
33620
- frame.read(() => {
33621
- if (cleanupHasRun || !contentRef.current)
33622
- return;
33623
- const ancestorInfo = domReadGetAncestorInfo(anchorRef);
33624
- position = ancestorInfo.position;
33625
- elementRect = contentRef.current.getBoundingClientRect();
33626
- getSafePlacementRect = makeGetSafePlacementFloatingPositionRect({
33627
- placement,
33628
- alignment,
33629
- offset,
33630
- collisionDetectionSize: collisionDetection
33631
- ? {
33632
- width: safeWindow.innerWidth,
33633
- height: safeWindow.innerHeight,
33634
- }
33635
- : void 0,
33636
- collisionDetectionPadding,
33637
- });
33638
- domReadUpdateSafePlacementAndRect();
33639
- frame.update(onUpdate);
33640
- frame.render(initialRender);
33641
- if (!ancestorInfo.scrolls)
33642
- return;
34106
+ domReadUpdateSafePlacementAndRect();
34107
+ onUpdate();
34108
+ initialRender();
34109
+ if (ancestorInfo.scrolls) {
33643
34110
  cleanup = domReadStartAnimationFrameLoop(domReadUpdateSafePlacementAndRect);
33644
- });
34111
+ }
33645
34112
  if (!safeArea) {
33646
34113
  return () => {
33647
34114
  cleanup == null ? void 0 : cleanup();
@@ -33707,17 +34174,19 @@ function Floating({ alignment, placement, safeArea, offsetX, offsetY, anchorRef,
33707
34174
  }),
33708
34175
  /* @__PURE__ */ (0, jsx_runtime_1.jsx)(FloatingStackingContext.Provider, {
33709
34176
  value: descendantContext,
33710
- children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)('div', {
33711
- ref: contentRef,
33712
- children: childrenWithOrigin(children, origin),
34177
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(ResetOuterLinkContext, {
34178
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)('div', {
34179
+ ref: contentRef,
34180
+ children: childrenWithOrigin(children, origin),
34181
+ }),
33713
34182
  }),
33714
34183
  }),
33715
34184
  ],
33716
34185
  }), getPortalContainer(portalSelector, inComponent));
33717
34186
  }
33718
- var Instance = /* @__PURE__ */ react_11.default.forwardRef(function Instance2({ Component: Component17, ...props }, ref) {
33719
- return Component17
33720
- ? /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
34187
+ var Instance = /* @__PURE__ */ react_10.default.forwardRef(function Instance2({ Component: Component18, ...props }, ref) {
34188
+ return Component18
34189
+ ? /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
33721
34190
  ...props,
33722
34191
  ref,
33723
34192
  })
@@ -33871,20 +34340,16 @@ function ChildrenCanSuspend({ children, }) {
33871
34340
  children,
33872
34341
  });
33873
34342
  }
33874
- function withChildrenCanSuspend(Component17) {
34343
+ function withChildrenCanSuspend(Component18) {
33875
34344
  return (0, react_7.forwardRef)(function withChildrenCanSuspendInner(props, ref) {
33876
34345
  return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(ChildrenCanSuspend, {
33877
- children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
34346
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
33878
34347
  ...props,
33879
34348
  ref,
33880
34349
  }),
33881
34350
  });
33882
34351
  });
33883
34352
  }
33884
- var linkKey = 'webPageId';
33885
- function isLinkToWebPage(link) {
33886
- return Boolean(link && typeof link === 'object' && linkKey in link);
33887
- }
33888
34353
  var PRELOAD_AFTER_MS = 500;
33889
34354
  var OBSERVER_THRESHOLD = 0.9;
33890
34355
  var LOW_MEMORY_THRESHOLD = 1.7;
@@ -34070,21 +34535,6 @@ function resolveSlugsWithSuspense(unresolvedPathSlugs, unresolvedHashSlugs, coll
34070
34535
  }
34071
34536
  return result;
34072
34537
  }
34073
- function isInternalURL(href) {
34074
- if (href === void 0)
34075
- return false;
34076
- if (href.startsWith('#') || href.startsWith('/') || href.startsWith('.'))
34077
- return true;
34078
- return false;
34079
- }
34080
- function isValidURL(href, isInternal) {
34081
- try {
34082
- const url = new URL(href);
34083
- return Boolean(url.protocol);
34084
- }
34085
- catch { }
34086
- return isInternal;
34087
- }
34088
34538
  async function findMatchingRouteAttributesForWebPageLink(router, currentRoute, pageLink, activeLocale, implicitPathVariables) {
34089
34539
  const { webPageId, hash: hash2, pathVariables, hashVariables, unresolvedHashSlugs, unresolvedPathSlugs, } = pageLink;
34090
34540
  const resolvedSlugs = await resolveSlugs(unresolvedPathSlugs, unresolvedHashSlugs, router.collectionUtils, activeLocale);
@@ -34156,137 +34606,6 @@ function getRouteAttributes(router, currentRoute, routeId, hash2, implicitPathVa
34156
34606
  pathVariables: combinedPathVariables,
34157
34607
  };
34158
34608
  }
34159
- function getRouteFromPageLink(pageLink, router, currentRoute) {
34160
- var _a;
34161
- if (isString(pageLink)) {
34162
- const isInternal = isInternalURL(pageLink);
34163
- if (!router.routes || !router.getRoute || !currentRoute || !isInternal) {
34164
- return;
34165
- }
34166
- const [pathnameWithQueryParams,] = pageLink.split('#', 2);
34167
- if (pathnameWithQueryParams === void 0)
34168
- return;
34169
- const [pathname,] = pathnameWithQueryParams.split('?', 2);
34170
- if (pathname === void 0)
34171
- return;
34172
- const { routeId, } = inferInitialRouteFromPath(router.routes, pathname);
34173
- return router.getRoute(routeId);
34174
- }
34175
- const { webPageId, } = pageLink;
34176
- return (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId);
34177
- }
34178
- var elementKey = 'element';
34179
- var collectionKey = 'collection';
34180
- var collectionItemIdKey = 'collectionItemId';
34181
- var pathVariablesKey = 'pathVariables';
34182
- var mediaType = 'framer/page-link,';
34183
- function isFramerPageLink(value) {
34184
- return isString(value) && value.startsWith(`data:${mediaType}`);
34185
- }
34186
- function createFramerPageLink(targetId = null, options = {}) {
34187
- const target = targetId ? targetId : 'none';
34188
- const link = new URL(`data:${mediaType}${target}`);
34189
- if (options.element) {
34190
- link.searchParams.append(elementKey, options.element);
34191
- }
34192
- if (options.collectionItem) {
34193
- link.searchParams.append(collectionKey, options.collectionItem.collection);
34194
- link.searchParams.append(collectionItemIdKey, options.collectionItem.collectionItemId);
34195
- link.searchParams.append(pathVariablesKey, new URLSearchParams(options.collectionItem.pathVariables).toString());
34196
- }
34197
- return link.href;
34198
- }
34199
- function parseFramerPageLink(link) {
34200
- if (!isFramerPageLink(link))
34201
- return;
34202
- try {
34203
- const url = new URL(link);
34204
- const target = url.pathname.substring(mediaType.length);
34205
- const searchParams = url.searchParams;
34206
- const element = searchParams.has(elementKey) ? searchParams.get(elementKey) : void 0;
34207
- let collectionItem;
34208
- const collection = searchParams.get(collectionKey);
34209
- const collectionItemId = searchParams.get(collectionItemIdKey);
34210
- const pathVariablesValue = searchParams.get(pathVariablesKey);
34211
- if (collection && collectionItemId && pathVariablesValue) {
34212
- const pathVariables = Object.fromEntries(new URLSearchParams(pathVariablesValue).entries());
34213
- collectionItem = {
34214
- collection,
34215
- collectionItemId,
34216
- pathVariables,
34217
- };
34218
- }
34219
- return {
34220
- target: target === 'none' ? null : target,
34221
- /**
34222
- * For historical reason we used to set "element=none" into the
34223
- * datalink, we no longer do that today, but we still keep this code
34224
- * so we could parse legacy links correctly.
34225
- */
34226
- element: element === 'none' ? void 0 : element,
34227
- collectionItem,
34228
- };
34229
- }
34230
- catch {
34231
- return;
34232
- }
34233
- }
34234
- function shouldOpenLinkInNewTab(link) {
34235
- return !isFramerPageLink(link);
34236
- }
34237
- function navigateFromAttributes(navigate, element, implicitPathVariables) {
34238
- var _a;
34239
- let routeId = element.getAttribute('data-framer-page-link-target');
34240
- let elementId;
34241
- let pathVariables;
34242
- if (routeId) {
34243
- elementId = element.getAttribute('data-framer-page-link-element') ?? void 0;
34244
- const pathVariablesRaw = element.getAttribute('data-framer-page-link-path-variables');
34245
- if (pathVariablesRaw) {
34246
- pathVariables = Object.fromEntries(new URLSearchParams(pathVariablesRaw).entries());
34247
- }
34248
- }
34249
- else {
34250
- const href = element.getAttribute('href');
34251
- if (!href)
34252
- return false;
34253
- const link = parseFramerPageLink(href);
34254
- if (!link || !link.target)
34255
- return false;
34256
- routeId = link.target;
34257
- elementId = link.element ?? void 0;
34258
- pathVariables = (_a = link.collectionItem) == null ? void 0 : _a.pathVariables;
34259
- }
34260
- const smoothScroll = elementId ? element.dataset.framerSmoothScroll !== void 0 : void 0;
34261
- navigate(routeId, elementId, Object.assign({}, implicitPathVariables, pathVariables), smoothScroll);
34262
- return true;
34263
- }
34264
- function linkFromFramerPageLink(link) {
34265
- if (!isFramerPageLink(link))
34266
- return link;
34267
- const parsed = parseFramerPageLink(link);
34268
- if (!parsed)
34269
- return void 0;
34270
- const { target, element, collectionItem, } = parsed;
34271
- if (!target)
34272
- return void 0;
34273
- return {
34274
- webPageId: target,
34275
- hash: element ?? void 0,
34276
- pathVariables: createVariablesFromPageLinkCollectionItem(collectionItem),
34277
- };
34278
- }
34279
- function createVariablesFromPageLinkCollectionItem(collectionItem) {
34280
- if (!collectionItem)
34281
- return void 0;
34282
- const variables = {};
34283
- for (const pathVariablesKey2 in collectionItem.pathVariables) {
34284
- const value = collectionItem.pathVariables[pathVariablesKey2];
34285
- if (value)
34286
- variables[pathVariablesKey2] = value;
34287
- }
34288
- return variables;
34289
- }
34290
34609
  var pathVariablesRegExp2 = /:([a-z]\w*)/gi;
34291
34610
  var PathVariablesContext = /* @__PURE__ */ (0, react_1.createContext)(void 0);
34292
34611
  exports.PathVariablesContext = PathVariablesContext;
@@ -34361,186 +34680,6 @@ function combineRels(rel, otherRel) {
34361
34680
  return `${rel} ${otherRel}`;
34362
34681
  return void 0;
34363
34682
  }
34364
- function linkInfoKey(link) {
34365
- var _a, _b;
34366
- return `${link.scopeId}:${link.nodeId}:${(_a = link.furthestExternalComponent) == null ? void 0 : _a.scopeId}:${(_b = link.furthestExternalComponent) == null ? void 0 : _b.nodeId}`;
34367
- }
34368
- var NestedLinksCollector = class {
34369
- constructor() {
34370
- (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'collectedLinks', /* @__PURE__ */ new Map());
34371
- (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'nestingInfo', /* @__PURE__ */ new Map());
34372
- }
34373
- clear() {
34374
- this.collectedLinks.clear();
34375
- this.nestingInfo.clear();
34376
- }
34377
- /**
34378
- * Returns a Map of outer links to their inner links.
34379
- *
34380
- * NOTE: This function is called in the SSG renderer sandbox (<root>/src/ssg/src/ssg-sandbox-renderer/sandbox/worker/renderer.ts)
34381
- */
34382
- getLinks() {
34383
- const result = /* @__PURE__ */ new Map();
34384
- for (const [outerLinkKey, innerLinkKeys,] of this.nestingInfo) {
34385
- const outerLinkInfo = this.collectedLinks.get(outerLinkKey);
34386
- assert(outerLinkInfo, `Outer link not found: ${outerLinkKey}`);
34387
- const links = Array.from(innerLinkKeys).map((innerLinkKey) => {
34388
- const innerLinkInfo = this.collectedLinks.get(innerLinkKey);
34389
- assert(innerLinkInfo, `Inner link not found: ${innerLinkKey}`);
34390
- return innerLinkInfo;
34391
- });
34392
- result.set(outerLinkInfo, links);
34393
- }
34394
- return result;
34395
- }
34396
- collectNestedLink(outerLink, innerLink) {
34397
- if (isWindow && !isTest() || !outerLink.nodeId || !innerLink.nodeId) {
34398
- return;
34399
- }
34400
- this.collectedLinks.set(linkInfoKey(outerLink), outerLink);
34401
- this.collectedLinks.set(linkInfoKey(innerLink), innerLink);
34402
- const outerLinkNestingInfo = this.nestingInfo.get(linkInfoKey(outerLink)) ?? /* @__PURE__ */ new Set();
34403
- outerLinkNestingInfo.add(linkInfoKey(innerLink));
34404
- this.nestingInfo.set(linkInfoKey(outerLink), outerLinkNestingInfo);
34405
- }
34406
- };
34407
- var nestedLinksCollector = /* @__PURE__ */ new NestedLinksCollector();
34408
- exports.nestedLinksCollector = nestedLinksCollector;
34409
- function useIsOnFramerCanvas() {
34410
- return RenderTarget.current() === RenderTarget.canvas;
34411
- }
34412
- var OuterLinkContext = /* @__PURE__ */ (0, react_1.createContext)(void 0);
34413
- function useReplaceNestedLinks(children, scopeId, nodeId, href, propsAddedByLink, observerRef) {
34414
- const outerLink = (0, react_3.useContext)(OuterLinkContext);
34415
- const furthestExternalComponent = useFurthestExternalComponent();
34416
- const innerLink = (0, react_4.useMemo)(() => ({
34417
- scopeId,
34418
- nodeId,
34419
- furthestExternalComponent,
34420
- }), [scopeId, nodeId, furthestExternalComponent,]);
34421
- const router = useRouter();
34422
- const currentRoute = useCurrentRoute();
34423
- const route = (0, react_4.useMemo)(() => {
34424
- const pageLink = isLinkToWebPage(href) ? href : linkFromFramerPageLink(href);
34425
- if (!pageLink)
34426
- return;
34427
- return getRouteFromPageLink(pageLink, router, currentRoute);
34428
- }, [currentRoute, href, router,]);
34429
- const { replaceNestedLinks, } = useLibraryFeatures();
34430
- const isOnFramerCanvas = useIsOnFramerCanvas();
34431
- const shouldReplaceLink = Boolean(replaceNestedLinks && !isOnFramerCanvas && (outerLink == null ? void 0 : outerLink.nodeId) && innerLink.nodeId);
34432
- const onClick = (0, react_3.useCallback)((event) => {
34433
- var _a;
34434
- if (!propsAddedByLink.href)
34435
- return;
34436
- event.preventDefault();
34437
- event.stopPropagation();
34438
- const isAppleDevice = /Mac|iPod|iPhone|iPad/u.test(__unframerNavigator2.userAgent);
34439
- if (isAppleDevice ? event.metaKey : event.ctrlKey) {
34440
- openExternalLink(propsAddedByLink.href, '', '_blank');
34441
- return;
34442
- }
34443
- if (route) {
34444
- (_a = propsAddedByLink.navigate) == null ? void 0 : _a.call(propsAddedByLink);
34445
- }
34446
- else {
34447
- openExternalLink(propsAddedByLink.href, propsAddedByLink.rel, propsAddedByLink.target);
34448
- }
34449
- }, [propsAddedByLink, route,]);
34450
- const onAuxClick = (0, react_3.useCallback)((event) => {
34451
- if (!propsAddedByLink.href)
34452
- return;
34453
- event.preventDefault();
34454
- event.stopPropagation();
34455
- openExternalLink(propsAddedByLink.href, '', '_blank');
34456
- }, [propsAddedByLink,]);
34457
- const onKeyDown = (0, react_3.useCallback)((event) => {
34458
- var _a;
34459
- if (!propsAddedByLink.href)
34460
- return;
34461
- if (event.key !== 'Enter')
34462
- return;
34463
- event.preventDefault();
34464
- event.stopPropagation();
34465
- if (route) {
34466
- (_a = propsAddedByLink.navigate) == null ? void 0 : _a.call(propsAddedByLink);
34467
- }
34468
- else {
34469
- openExternalLink(propsAddedByLink.href, propsAddedByLink.rel, propsAddedByLink.target);
34470
- }
34471
- }, [propsAddedByLink, route,]);
34472
- useRefEffect(observerRef, (node) => {
34473
- if (node === null)
34474
- return;
34475
- if (!shouldReplaceLink)
34476
- return;
34477
- node.dataset.hydrated = 'true';
34478
- }, [shouldReplaceLink,]);
34479
- let replacedChildren = children;
34480
- if (shouldReplaceLink) {
34481
- react_6.Children.forEach(children, (child) => {
34482
- if (!isChildReplaceable(child))
34483
- return;
34484
- assert(linkInfoIsCollectable(outerLink), 'outerLink must have nodeId defined at this point; this was verified with `shouldReplaceLink` above');
34485
- assert(linkInfoIsCollectable(innerLink), 'innerLink must have nodeId defined at this point; this was verified with `shouldReplaceLink` above');
34486
- nestedLinksCollector.collectNestedLink(outerLink, innerLink);
34487
- });
34488
- replacedChildren = react_6.Children.map(children, (child) => {
34489
- if (!isChildReplaceable(child))
34490
- return child;
34491
- const tag = maybeReplaceAnchorWithSpan(child.type);
34492
- const { children: childChildren, ...childProps } = child.props;
34493
- const props = {
34494
- ...childProps,
34495
- // This attribute is used in `ssg/src/ssg-sandbox-renderer/worker/nestedLinks.ts` to handle the nested links clicks
34496
- 'data-nested-link': true,
34497
- role: 'link',
34498
- tabIndex: 0,
34499
- onClick,
34500
- onAuxClick,
34501
- onKeyDown,
34502
- as: childProps.as && maybeReplaceAnchorWithSpan(childProps.as),
34503
- };
34504
- const ref = 'ref' in child ? child.ref : void 0;
34505
- return (0, react_8.createElement)(tag, // We need to pass the ref here again, otherwise it will be lost
34506
- {
34507
- ...props,
34508
- ref,
34509
- }, childChildren);
34510
- });
34511
- }
34512
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(OuterLinkContext.Provider, {
34513
- value: innerLink,
34514
- children: replacedChildren,
34515
- });
34516
- }
34517
- function linkInfoIsCollectable(linkInfo) {
34518
- return !isUndefined(linkInfo == null ? void 0 : linkInfo.nodeId);
34519
- }
34520
- function isChildReplaceable(child) {
34521
- return (0, react_6.isValidElement)(child) &&
34522
- (maybeReplaceAnchorWithSpan(child.type) !== child.type || maybeReplaceAnchorWithSpan(child.props.as) !== child.props.as);
34523
- }
34524
- function openExternalLink(href, rel, target) {
34525
- const link = document.createElement('a');
34526
- link.href = href;
34527
- if (rel) {
34528
- link.rel = rel;
34529
- }
34530
- if (target) {
34531
- link.target = target;
34532
- }
34533
- document.body.appendChild(link);
34534
- link.click();
34535
- link.remove();
34536
- }
34537
- function maybeReplaceAnchorWithSpan(component) {
34538
- if (component === 'a')
34539
- return 'span';
34540
- if (isMotionComponent(component) && unwrapMotionComponent(component) === 'a')
34541
- return motion.span;
34542
- return component;
34543
- }
34544
34683
  function useTrackLinkClick({ nodeId, clickTrackingId, router, href, activeLocale, }) {
34545
34684
  return (0, react_3.useCallback)(async (hrefAttribute) => {
34546
34685
  var _a, _b, _c, _d, _e;
@@ -34827,24 +34966,6 @@ function resolvePageScope(pageLink, router) {
34827
34966
  siteCanonicalURL: void 0,
34828
34967
  });
34829
34968
  }
34830
- var IgnoreErrors = class extends react_9.Component {
34831
- constructor() {
34832
- super(...arguments);
34833
- (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'state', {
34834
- error: void 0,
34835
- });
34836
- }
34837
- static getDerivedStateFromError(error) {
34838
- return {
34839
- error,
34840
- };
34841
- }
34842
- render() {
34843
- if (this.state.error)
34844
- return null;
34845
- return this.props.children;
34846
- }
34847
- };
34848
34969
  var salt = 'framer';
34849
34970
  var difficulty = 3;
34850
34971
  var tokenLength = 30;
@@ -35017,18 +35138,18 @@ function openExternalLinkInCurrentTab(link, formRef) {
35017
35138
  linkElement.click();
35018
35139
  linkElement.remove();
35019
35140
  }
35020
- var FormContext = react_11.default.createContext(void 0);
35141
+ var FormContext = react_10.default.createContext(void 0);
35021
35142
  exports.FormContext = FormContext;
35022
- var FormContainer = /* @__PURE__ */ react_11.default.forwardRef(function FormContainer2({ action, children, redirectUrl, onSuccess, onError, onLoading, submitTrackingId, nodeId, ...props }, forwardedRef) {
35023
- const fallbackRef = react_11.default.useRef(null);
35143
+ var FormContainer = /* @__PURE__ */ react_10.default.forwardRef(function FormContainer2({ action, children, redirectUrl, onSuccess, onError, onLoading, submitTrackingId, nodeId, ...props }, forwardedRef) {
35144
+ const fallbackRef = react_10.default.useRef(null);
35024
35145
  const ref = forwardedRef ?? fallbackRef;
35025
35146
  const router = useRouter();
35026
35147
  const currentRoute = useCurrentRoute();
35027
35148
  const implicitPathVariables = useImplicitPathVariables();
35028
- const [state, dispatch,] = react_11.default.useReducer(formReducer, incompleteState);
35149
+ const [state, dispatch,] = react_10.default.useReducer(formReducer, incompleteState);
35029
35150
  const { activeLocale, } = useLocaleInfo();
35030
35151
  const projectHash = (0, react_3.useContext)(FormContext);
35031
- const callbacks = react_11.default.useRef({
35152
+ const callbacks = react_10.default.useRef({
35032
35153
  onSuccess,
35033
35154
  onError,
35034
35155
  onLoading,
@@ -35038,6 +35159,7 @@ var FormContainer = /* @__PURE__ */ react_11.default.forwardRef(function FormCon
35038
35159
  onError,
35039
35160
  onLoading,
35040
35161
  };
35162
+ const submissionInProgressRef = react_10.default.useRef(false);
35041
35163
  async function redirectTo(link) {
35042
35164
  var _a, _b;
35043
35165
  if (isString(link)) {
@@ -35058,16 +35180,17 @@ var FormContainer = /* @__PURE__ */ react_11.default.forwardRef(function FormCon
35058
35180
  const handleSubmit = async (event) => {
35059
35181
  var _a, _b, _c, _d, _e, _f;
35060
35182
  event.preventDefault();
35061
- if (!action || !projectHash)
35183
+ if (!action || !projectHash || submissionInProgressRef.current)
35062
35184
  return;
35063
- dispatch({
35064
- type: 'submit',
35065
- });
35185
+ submissionInProgressRef.current = true;
35066
35186
  const data2 = new FormData(event.currentTarget);
35067
35187
  await yieldToMain({
35068
- priority: 'user-blocking',
35188
+ priority: 'user-visible',
35069
35189
  continueAfter: 'paint',
35070
35190
  });
35191
+ (0, react_11.startTransition)(() => dispatch({
35192
+ type: 'submit',
35193
+ }));
35071
35194
  addUTMTagsToFormData(data2, safeWindow.document);
35072
35195
  for (const [key7, value,] of data2) {
35073
35196
  if (value instanceof File)
@@ -35082,7 +35205,7 @@ var FormContainer = /* @__PURE__ */ react_11.default.forwardRef(function FormCon
35082
35205
  activeLocale,
35083
35206
  });
35084
35207
  await submitForm(action, data2, projectHash);
35085
- (0, react_12.startTransition)(() => dispatch({
35208
+ (0, react_11.startTransition)(() => dispatch({
35086
35209
  type: 'success',
35087
35210
  }));
35088
35211
  (_d = (_c = callbacks.current).onSuccess) == null ? void 0 : _d.call(_c);
@@ -35091,12 +35214,13 @@ var FormContainer = /* @__PURE__ */ react_11.default.forwardRef(function FormCon
35091
35214
  }
35092
35215
  }
35093
35216
  catch (error) {
35094
- (0, react_12.startTransition)(() => dispatch({
35217
+ (0, react_11.startTransition)(() => dispatch({
35095
35218
  type: 'error',
35096
35219
  }));
35097
35220
  (_f = (_e = callbacks.current).onError) == null ? void 0 : _f.call(_e);
35098
35221
  console.error(error);
35099
35222
  }
35223
+ submissionInProgressRef.current = false;
35100
35224
  };
35101
35225
  const handleKeyDown = (event) => {
35102
35226
  const { target: input, currentTarget: form, key: key7, } = event;
@@ -35114,7 +35238,7 @@ var FormContainer = /* @__PURE__ */ react_11.default.forwardRef(function FormCon
35114
35238
  priority: 'background',
35115
35239
  continueAfter: 'paint',
35116
35240
  });
35117
- (0, react_12.startTransition)(() => dispatch({
35241
+ (0, react_11.startTransition)(() => dispatch({
35118
35242
  type: anyEmptyRequiredFields(target) ? 'incomplete' : 'complete',
35119
35243
  }));
35120
35244
  };
@@ -35174,6 +35298,61 @@ function responseHasError(response) {
35174
35298
  return typeof response === 'object' && response !== null && 'error' in response && isObject2(response.error) &&
35175
35299
  'message' in response.error && typeof response.error.message === 'string';
35176
35300
  }
35301
+ var FORCE_SHOW_EDITORBAR_LOCALSTORAGE_KEY = '__framer_force_showing_editorbar_since';
35302
+ var IgnoreErrors = class extends react_9.Component {
35303
+ constructor() {
35304
+ super(...arguments);
35305
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'state', {
35306
+ error: void 0,
35307
+ });
35308
+ }
35309
+ static getDerivedStateFromError(error) {
35310
+ return {
35311
+ error,
35312
+ };
35313
+ }
35314
+ render() {
35315
+ if (this.state.error)
35316
+ return null;
35317
+ return this.props.children;
35318
+ }
35319
+ };
35320
+ var isPrioritized = () => {
35321
+ try {
35322
+ return !!localStorage[FORCE_SHOW_EDITORBAR_LOCALSTORAGE_KEY];
35323
+ }
35324
+ catch (e) {
35325
+ return false;
35326
+ }
35327
+ };
35328
+ var isntPrioritized = () => !isPrioritized();
35329
+ var getServerSnapshot = () => false;
35330
+ var noOpSubscribe = () => () => { };
35331
+ function EditorBarLauncher({ EditorBar, fast = false, }) {
35332
+ const libraryFeatures = useLibraryFeatures();
35333
+ const framerSiteId = (0, react_3.useContext)(FormContext);
35334
+ const enabled = (0, react_14.useSyncExternalStore)(noOpSubscribe, fast ? isPrioritized : isntPrioritized, getServerSnapshot);
35335
+ const editorBarFeatures = (0, react_4.useMemo)(() => {
35336
+ const features = {};
35337
+ let key7;
35338
+ for (key7 in libraryFeatures) {
35339
+ if (libraryFeatures.hasOwnProperty(key7) && key7.startsWith('editorBar')) {
35340
+ features[key7] = libraryFeatures[key7];
35341
+ }
35342
+ }
35343
+ return features;
35344
+ }, [libraryFeatures,]);
35345
+ if (!EditorBar || !framerSiteId || !enabled)
35346
+ return null;
35347
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(IgnoreErrors, {
35348
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(react_12.Suspense, {
35349
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(EditorBar, {
35350
+ framerSiteId,
35351
+ features: editorBarFeatures,
35352
+ }),
35353
+ }),
35354
+ });
35355
+ }
35177
35356
  function isSamePage(a, b) {
35178
35357
  if (a.routeId !== b.routeId)
35179
35358
  return false;
@@ -35270,8 +35449,8 @@ var useSendPageView = (currentRoute, currentRouteId, currentPathnameWithHash, cu
35270
35449
  };
35271
35450
  var defaultLocaleId = 'default';
35272
35451
  function useForceUpdate3() {
35273
- const [_, setForcedRenderCount,] = react_11.default.useState(0);
35274
- return [_, react_11.default.useCallback(() => setForcedRenderCount((v) => v + 1), []),];
35452
+ const [_, setForcedRenderCount,] = react_10.default.useState(0);
35453
+ return [_, react_10.default.useCallback(() => setForcedRenderCount((v) => v + 1), []),];
35275
35454
  }
35276
35455
  function updateScrollPosition(hash2, smoothScroll, isHistoryTransition) {
35277
35456
  const element = hash2 && document.getElementById(hash2);
@@ -35347,7 +35526,7 @@ function useNavigationTransition() {
35347
35526
  announceNavigation();
35348
35527
  }, [startNativeSpinner,]);
35349
35528
  }
35350
- function Router({ defaultPageStyle, disableHistory, initialPathVariables, initialRoute, notFoundPage, collectionUtils, routes, initialLocaleId, locales = EMPTY_ARRAY, preserveQueryParams = false, LayoutTemplate, editorBar, siteCanonicalURL, }) {
35529
+ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initialRoute, notFoundPage, collectionUtils, routes, initialLocaleId, locales = EMPTY_ARRAY, preserveQueryParams = false, LayoutTemplate, EditorBar, siteCanonicalURL, }) {
35351
35530
  useMarkRouterEffects();
35352
35531
  useReplaceInitialState({
35353
35532
  disabled: disableHistory,
@@ -35363,7 +35542,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
35363
35542
  const { synchronousNavigationOnDesktop, } = useLibraryFeatures();
35364
35543
  const transitionFn = (0, react_4.useMemo)(() => {
35365
35544
  if (!synchronousNavigationOnDesktop || !isDesktop()) {
35366
- return react_12.startTransition;
35545
+ return react_11.startTransition;
35367
35546
  }
35368
35547
  return (fn) => fn();
35369
35548
  }, [synchronousNavigationOnDesktop,]);
@@ -35605,38 +35784,46 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
35605
35784
  }));
35606
35785
  return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(RouterAPIProvider, {
35607
35786
  api,
35608
- children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(LocaleInfoContext.Provider, {
35787
+ children: /* @__PURE__ */ (0, jsx_runtime_2.jsxs)(LocaleInfoContext.Provider, {
35609
35788
  value: localeInfo,
35610
- children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(SynchronousSuspenseErrorBoundary, {
35611
- children: /* @__PURE__ */ (0, jsx_runtime_2.jsxs)(SuspenseThatPreservesDom, {
35612
- children: [
35613
- /* @__PURE__ */ (0, jsx_runtime_2.jsxs)(NotFoundErrorBoundary, {
35614
- notFoundPage,
35615
- defaultPageStyle,
35616
- forceUpdateKey: dep,
35617
- children: [
35618
- /* @__PURE__ */ (0, jsx_runtime_1.jsx)(MarkSuspenseEffects.Start, {}),
35619
- /* @__PURE__ */ (0, jsx_runtime_1.jsx)(WithLayoutTemplate, {
35620
- LayoutTemplate,
35621
- routeId: (currentRoute == null ? void 0 : currentRoute.abTestingVariantId) ?? currentRouteId,
35622
- style: defaultPageStyle,
35623
- children: (inLayoutTemplate) => {
35624
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {
35625
- children: pageExistsInCurrentLocale
35626
- ? renderPage(currentRoute.page, inLayoutTemplate ? templatePageStyle : defaultPageStyle)
35627
- : // LAYOUT_TEMPLATE @TODO: display: content for not found page?
35628
- notFoundPage && renderPage(notFoundPage, defaultPageStyle),
35629
- }, remountKey);
35630
- },
35631
- }),
35632
- ],
35633
- }),
35634
- editorBar,
35635
- /* @__PURE__ */ (0, jsx_runtime_1.jsx)(TurnOnReactEventHandling, {}),
35636
- /* @__PURE__ */ (0, jsx_runtime_1.jsx)(MarkSuspenseEffects.End, {}),
35637
- ],
35789
+ children: [
35790
+ EditorBar && /* @__PURE__ */ (0, jsx_runtime_1.jsx)(EditorBarLauncher, {
35791
+ EditorBar,
35792
+ fast: true,
35638
35793
  }),
35639
- }),
35794
+ /* @__PURE__ */ (0, jsx_runtime_1.jsx)(SynchronousSuspenseErrorBoundary, {
35795
+ children: /* @__PURE__ */ (0, jsx_runtime_2.jsxs)(SuspenseThatPreservesDom, {
35796
+ children: [
35797
+ /* @__PURE__ */ (0, jsx_runtime_2.jsxs)(NotFoundErrorBoundary, {
35798
+ notFoundPage,
35799
+ defaultPageStyle,
35800
+ forceUpdateKey: dep,
35801
+ children: [
35802
+ /* @__PURE__ */ (0, jsx_runtime_1.jsx)(MarkSuspenseEffects.Start, {}),
35803
+ /* @__PURE__ */ (0, jsx_runtime_1.jsx)(WithLayoutTemplate, {
35804
+ LayoutTemplate,
35805
+ routeId: (currentRoute == null ? void 0 : currentRoute.abTestingVariantId) ?? currentRouteId,
35806
+ style: defaultPageStyle,
35807
+ children: (inLayoutTemplate) => {
35808
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {
35809
+ children: pageExistsInCurrentLocale
35810
+ ? renderPage(currentRoute.page, inLayoutTemplate ? templatePageStyle : defaultPageStyle)
35811
+ : // LAYOUT_TEMPLATE @TODO: display: content for not found page?
35812
+ notFoundPage && renderPage(notFoundPage, defaultPageStyle),
35813
+ }, remountKey);
35814
+ },
35815
+ }),
35816
+ ],
35817
+ }),
35818
+ EditorBar && /* @__PURE__ */ (0, jsx_runtime_1.jsx)(EditorBarLauncher, {
35819
+ EditorBar,
35820
+ }),
35821
+ /* @__PURE__ */ (0, jsx_runtime_1.jsx)(TurnOnReactEventHandling, {}),
35822
+ /* @__PURE__ */ (0, jsx_runtime_1.jsx)(MarkSuspenseEffects.End, {}),
35823
+ ],
35824
+ }),
35825
+ }),
35826
+ ],
35640
35827
  }),
35641
35828
  });
35642
35829
  }
@@ -35735,20 +35922,12 @@ function resolveFetchDataValue(result, request) {
35735
35922
  }
35736
35923
  return resolvedValue;
35737
35924
  }
35925
+ var minimumCacheDurationMs = 5e3;
35738
35926
  function isCacheExpired(insertionTimestamp, cacheDuration) {
35739
35927
  if (RenderTarget.current() === RenderTarget.canvas) {
35740
35928
  return false;
35741
35929
  }
35742
- const cacheDurationMs = cacheDuration === 0
35743
- ? // When the cache is set to 0 seconds we set use a 500ms cache delay
35744
- // to avoid triggering refetching when a variant switches from
35745
- // preloading to rendering the component (and
35746
- // resubscribing to the fetch client). When another component
35747
- // relying on the same endpoint (eg another page) is mounted again
35748
- // and the cache time is set to 0, the the data will be fetched
35749
- // again.
35750
- 500
35751
- : cacheDuration * 1e3;
35930
+ const cacheDurationMs = Math.max(cacheDuration * 1e3, minimumCacheDurationMs);
35752
35931
  const currentTimestamp = Date.now();
35753
35932
  const expirationTimestamp = insertionTimestamp + cacheDurationMs;
35754
35933
  return currentTimestamp >= expirationTimestamp;
@@ -36164,7 +36343,7 @@ function usePrefetch() {
36164
36343
  }
36165
36344
  MotionGlobalConfig.WillChange = WillChangeMotionValue;
36166
36345
  function PageRoot({ RootComponent, isWebsite, routeId, framerSiteId, pathVariables, routes, collectionUtils, notFoundPage, isReducedMotion = false, includeDataObserver = false, localeId, locales, preserveQueryParams, EditorBar, defaultPageStyle, disableHistory, LayoutTemplate, siteCanonicalURL, }) {
36167
- react_11.default.useEffect(() => {
36346
+ react_10.default.useEffect(() => {
36168
36347
  if (isWebsite)
36169
36348
  return;
36170
36349
  MainLoop.start();
@@ -36189,9 +36368,7 @@ function PageRoot({ RootComponent, isWebsite, routeId, framerSiteId, pathVariabl
36189
36368
  width: 'auto',
36190
36369
  },
36191
36370
  preserveQueryParams,
36192
- editorBar: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(EditorBarLauncher, {
36193
- EditorBar,
36194
- }),
36371
+ EditorBar,
36195
36372
  disableHistory,
36196
36373
  LayoutTemplate,
36197
36374
  siteCanonicalURL,
@@ -36202,12 +36379,12 @@ function PageRoot({ RootComponent, isWebsite, routeId, framerSiteId, pathVariabl
36202
36379
  });
36203
36380
  }
36204
36381
  else {
36205
- const Wrapper = includeDataObserver ? DataObserver : react_11.default.Fragment;
36382
+ const Wrapper = includeDataObserver ? DataObserver : react_10.default.Fragment;
36206
36383
  return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Wrapper, {
36207
36384
  children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(RoutesProvider, {
36208
36385
  routes,
36209
36386
  children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(NavigationWrapper, {
36210
- children: react_11.default.isValidElement(RootComponent) ? RootComponent : react_11.default.createElement(
36387
+ children: react_10.default.isValidElement(RootComponent) ? RootComponent : react_10.default.createElement(
36211
36388
  // @ts-expect-error to figure out how to type this properly, as tests are using different
36212
36389
  // $$typeof symbol and isValidElement fails
36213
36390
  RootComponent, {
@@ -36218,36 +36395,6 @@ function PageRoot({ RootComponent, isWebsite, routeId, framerSiteId, pathVariabl
36218
36395
  });
36219
36396
  }
36220
36397
  }
36221
- function EditorBarLauncher({ EditorBar, }) {
36222
- const libraryFeatures = useLibraryFeatures();
36223
- const [mounted, setMounted,] = (0, react_4.useState)(false);
36224
- const framerSiteId = (0, react_3.useContext)(FormContext);
36225
- const editorBarFeatures = (0, react_4.useMemo)(() => {
36226
- const features = {};
36227
- let key7;
36228
- for (key7 in libraryFeatures) {
36229
- if (libraryFeatures.hasOwnProperty(key7) && key7.startsWith('editorBar')) {
36230
- features[key7] = libraryFeatures[key7];
36231
- }
36232
- }
36233
- return features;
36234
- }, [libraryFeatures,]);
36235
- (0, react_2.useEffect)(() => {
36236
- (0, react_12.startTransition)(() => {
36237
- setMounted(true);
36238
- });
36239
- }, []);
36240
- if (!EditorBar || !framerSiteId || !mounted)
36241
- return null;
36242
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(IgnoreErrors, {
36243
- children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(react_13.Suspense, {
36244
- children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(EditorBar, {
36245
- framerSiteId,
36246
- features: editorBarFeatures,
36247
- }),
36248
- }),
36249
- });
36250
- }
36251
36398
  var ResolveLinks = /* @__PURE__ */ withChildrenCanSuspend(/* @__PURE__ */ (0, react_7.forwardRef)(function ResolveLinksInner({ links, children, ...rest }, ref) {
36252
36399
  const router = useRouter();
36253
36400
  const { activeLocale, } = useLocaleInfo();
@@ -40863,7 +41010,7 @@ function useActiveTargetCallback() {
40863
41010
  }).current;
40864
41011
  }
40865
41012
  function useAddVariantProps(baseVariant, gestureVariant, variantProps2) {
40866
- return react_11.default.useCallback((id3) => {
41013
+ return react_10.default.useCallback((id3) => {
40867
41014
  var _a, _b, _c;
40868
41015
  if (!variantProps2)
40869
41016
  return {};
@@ -40925,7 +41072,7 @@ function useHydratedBreakpointVariants(initial, mediaQueries, hydratedWithInitia
40925
41072
  if (variant !== baseVariant.current || variant !== basePropsVariant.current) {
40926
41073
  let updateStateAndRerender2 = function () {
40927
41074
  baseVariant.current = basePropsVariant.current = variant;
40928
- (0, react_12.startTransition)(() => {
41075
+ (0, react_11.startTransition)(() => {
40929
41076
  forceUpdate();
40930
41077
  });
40931
41078
  };
@@ -41051,7 +41198,7 @@ function useDataRecord(collection, variables) {
41051
41198
  }
41052
41199
  function useDynamicRefs() {
41053
41200
  const map2 = useConstant2(() => /* @__PURE__ */ new Map());
41054
- return react_11.default.useCallback((key7) => {
41201
+ return react_10.default.useCallback((key7) => {
41055
41202
  const existing = map2.get(key7);
41056
41203
  if (existing)
41057
41204
  return existing;
@@ -41072,7 +41219,7 @@ function useSiteRefs() {
41072
41219
  siteCanonicalURL: void 0,
41073
41220
  });
41074
41221
  }, [route,]);
41075
- return react_11.default.useCallback((key7) => {
41222
+ return react_10.default.useCallback((key7) => {
41076
41223
  if (!key7)
41077
41224
  return;
41078
41225
  const computedKey = `${path}-${key7}`;
@@ -41166,7 +41313,7 @@ function createGamepadPoller() {
41166
41313
  };
41167
41314
  }
41168
41315
  var gamepadPoller = /* @__PURE__ */ createGamepadPoller();
41169
- var GamepadContext = /* @__PURE__ */ react_11.default.createContext(gamepadPoller);
41316
+ var GamepadContext = /* @__PURE__ */ react_10.default.createContext(gamepadPoller);
41170
41317
  exports.GamepadContext = GamepadContext;
41171
41318
  function getGamepadInputs() {
41172
41319
  let firstConnectedGamepad = null;
@@ -41216,16 +41363,16 @@ function isButtonPressed(button) {
41216
41363
  return button.pressed === true || button.value > 0;
41217
41364
  }
41218
41365
  function useGamepad(input, callback, { mapping, on, } = {}) {
41219
- const context = react_11.default.useContext(GamepadContext);
41366
+ const context = react_10.default.useContext(GamepadContext);
41220
41367
  const settings = useConstant2(() => ({
41221
41368
  mapping: mapping ?? 'standard',
41222
41369
  on: on ?? 'keydown',
41223
41370
  }));
41224
- const stateRef = react_11.default.useRef({
41371
+ const stateRef = react_10.default.useRef({
41225
41372
  pressed: false,
41226
41373
  handler: callback,
41227
41374
  });
41228
- const cb = react_11.default.useCallback((gamepad) => {
41375
+ const cb = react_10.default.useCallback((gamepad) => {
41229
41376
  const { pressed, handler, } = stateRef.current;
41230
41377
  if (gamepad.inputs.includes(input) && settings.mapping === gamepad.mapping) {
41231
41378
  settings.on === 'keydown' && handler();
@@ -41246,10 +41393,10 @@ function useGamepad(input, callback, { mapping, on, } = {}) {
41246
41393
  }
41247
41394
  return () => context.unregister(cb);
41248
41395
  }, []);
41249
- react_11.default.useEffect(() => {
41396
+ react_10.default.useEffect(() => {
41250
41397
  return () => context.unregister(cb);
41251
41398
  }, [cb, context,]);
41252
- react_11.default.useEffect(() => {
41399
+ react_10.default.useEffect(() => {
41253
41400
  stateRef.current.handler = callback;
41254
41401
  }, [callback,]);
41255
41402
  }
@@ -41275,13 +41422,13 @@ function createShortcutDefinition(shortcut) {
41275
41422
  };
41276
41423
  }
41277
41424
  function useHotkey(shortcut, callback) {
41278
- const inTarget = react_11.default.useRef(true);
41425
+ const inTarget = react_10.default.useRef(true);
41279
41426
  const shortcutDefinition = useConstant2(() => createShortcutDefinition(shortcut));
41280
41427
  useOnCurrentTargetChange((isCurrentTarget, isOverlayed) => {
41281
41428
  inTarget.current = isCurrentTarget && !isOverlayed;
41282
41429
  return () => inTarget.current = false;
41283
41430
  });
41284
- const eventHandler = react_11.default.useCallback((event) => {
41431
+ const eventHandler = react_10.default.useCallback((event) => {
41285
41432
  if (!shortcutDefinition)
41286
41433
  return;
41287
41434
  if (!inTarget.current)
@@ -41291,7 +41438,7 @@ function useHotkey(shortcut, callback) {
41291
41438
  event.preventDefault();
41292
41439
  callback();
41293
41440
  }, [shortcutDefinition, callback,]);
41294
- react_11.default.useEffect(() => {
41441
+ react_10.default.useEffect(() => {
41295
41442
  document.addEventListener('keydown', eventHandler);
41296
41443
  return () => document.removeEventListener('keydown', eventHandler);
41297
41444
  }, [eventHandler,]);
@@ -41319,8 +41466,8 @@ function useOnVariantChange(variant, callbackMap) {
41319
41466
  const isRenderingStaticContent = isStaticRenderer();
41320
41467
  if (isRenderingStaticContent)
41321
41468
  return;
41322
- const isActiveScreenRef = react_11.default.useRef(true);
41323
- const callbackMapRef = react_11.default.useRef(callbackMap);
41469
+ const isActiveScreenRef = react_10.default.useRef(true);
41470
+ const callbackMapRef = react_10.default.useRef(callbackMap);
41324
41471
  useOnCurrentTargetChange((isCurrent, isOverlayed) => {
41325
41472
  const isActiveScreen = isCurrent && !isOverlayed;
41326
41473
  if (!isActiveScreenRef.current && isActiveScreen) {
@@ -41330,7 +41477,7 @@ function useOnVariantChange(variant, callbackMap) {
41330
41477
  }
41331
41478
  isActiveScreenRef.current = isActiveScreen;
41332
41479
  }, []);
41333
- react_11.default.useEffect(() => {
41480
+ react_10.default.useEffect(() => {
41334
41481
  if (isActiveScreenRef.current) {
41335
41482
  const callback = callbackForVariant(callbackMapRef.current, variant);
41336
41483
  if (callback)
@@ -41357,16 +41504,16 @@ function setOverflow(blockDocumentScrolling, show) {
41357
41504
  });
41358
41505
  }
41359
41506
  function useOverlayState({ blockDocumentScrolling = true, } = {}) {
41360
- const [showOverlay, setShowOverlay,] = react_11.default.useState(false);
41361
- const callback = react_11.default.useCallback(async (show) => {
41507
+ const [showOverlay, setShowOverlay,] = react_10.default.useState(false);
41508
+ const callback = react_10.default.useCallback(async (show) => {
41362
41509
  await yieldToMain({
41363
41510
  priority: 'user-blocking',
41364
41511
  continueAfter: 'paint',
41365
41512
  });
41366
- (0, react_12.startTransition)(() => setShowOverlay(show));
41513
+ (0, react_11.startTransition)(() => setShowOverlay(show));
41367
41514
  setOverflow(blockDocumentScrolling, show);
41368
41515
  }, [blockDocumentScrolling,]);
41369
- react_11.default.useEffect(() => () => {
41516
+ react_10.default.useEffect(() => () => {
41370
41517
  void yieldToMain({
41371
41518
  priority: 'user-blocking',
41372
41519
  continueAfter: 'paint',
@@ -41386,11 +41533,11 @@ async function componentForRoute(route) {
41386
41533
  const { page: routeComponent, } = route;
41387
41534
  if (!routeComponent)
41388
41535
  return;
41389
- if (react_11.default.isValidElement(routeComponent))
41536
+ if (react_10.default.isValidElement(routeComponent))
41390
41537
  return routeComponent;
41391
41538
  if (withPreload(routeComponent))
41392
41539
  await routeComponent.preload();
41393
- return react_11.default.createElement(routeComponent, {
41540
+ return react_10.default.createElement(routeComponent, {
41394
41541
  key: route.path,
41395
41542
  });
41396
41543
  }
@@ -41402,7 +41549,7 @@ function usePrototypeNavigate({ preload, } = {}) {
41402
41549
  const navigation = useNavigation();
41403
41550
  const { getRoute, } = useRouter();
41404
41551
  const onCanvas = useIsOnFramerCanvas();
41405
- react_11.default.useEffect(() => {
41552
+ react_10.default.useEffect(() => {
41406
41553
  if (!navigation || onCanvas)
41407
41554
  return;
41408
41555
  preload == null ? void 0 : preload.forEach((componentOrRoute) => {
@@ -41429,51 +41576,51 @@ function usePrototypeNavigate({ preload, } = {}) {
41429
41576
  navigation.goBack();
41430
41577
  return false;
41431
41578
  }
41432
- const Component17 = typeof target === 'string'
41579
+ const Component18 = typeof target === 'string'
41433
41580
  ? await componentForRoute(getRoute == null ? void 0 : getRoute(target)).catch(() => { })
41434
- : react_11.default.isValidElement(target)
41581
+ : react_10.default.isValidElement(target)
41435
41582
  ? target
41436
41583
  : null;
41437
- if (!Component17)
41584
+ if (!Component18)
41438
41585
  return;
41439
41586
  const { appearsFrom, backdropColor, animation, } = options;
41440
41587
  const transitionType = options.transition || 'instant';
41441
41588
  switch (transitionType) {
41442
41589
  case 'instant':
41443
- navigation.instant(Component17);
41590
+ navigation.instant(Component18);
41444
41591
  break;
41445
41592
  case 'fade':
41446
- navigation.fade(Component17, {
41593
+ navigation.fade(Component18, {
41447
41594
  animation,
41448
41595
  });
41449
41596
  break;
41450
41597
  case 'push':
41451
- navigation.push(Component17, {
41598
+ navigation.push(Component18, {
41452
41599
  appearsFrom,
41453
41600
  animation,
41454
41601
  });
41455
41602
  break;
41456
41603
  case 'flip':
41457
- navigation.flip(Component17, {
41604
+ navigation.flip(Component18, {
41458
41605
  appearsFrom,
41459
41606
  animation,
41460
41607
  });
41461
41608
  break;
41462
41609
  case 'magicMotion':
41463
- navigation.magicMotion(Component17, {
41610
+ navigation.magicMotion(Component18, {
41464
41611
  animation,
41465
41612
  });
41466
41613
  break;
41467
41614
  // Overlay stack navigation doesn't support updating the browser's
41468
41615
  // path.
41469
41616
  case 'modal':
41470
- navigation.modal(Component17, {
41617
+ navigation.modal(Component18, {
41471
41618
  backdropColor,
41472
41619
  animation,
41473
41620
  });
41474
41621
  break;
41475
41622
  case 'overlay':
41476
- navigation.overlay(Component17, {
41623
+ navigation.overlay(Component18, {
41477
41624
  appearsFrom,
41478
41625
  backdropColor,
41479
41626
  animation,
@@ -41593,7 +41740,7 @@ function useLoadMorePagination(totalSize, pageSize, hash2, paginateWithSuspended
41593
41740
  });
41594
41741
  };
41595
41742
  if (!paginateWithSuspendedLoadingState)
41596
- return renderNextPage(react_12.startTransition);
41743
+ return renderNextPage(react_11.startTransition);
41597
41744
  return renderNextPage(startLoadingTransition);
41598
41745
  }, [totalPages, paginateWithSuspendedLoadingState,]);
41599
41746
  return {
@@ -41859,10 +42006,10 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
41859
42006
  }
41860
42007
  const { isHovered: isHovered2, isPressed: isPressed2, isHoveredHasUpdated, isPressedHasUpdated, } = internalState.current;
41861
42008
  if (isHovered2 || isHoveredHasUpdated || isPressed2 || isPressedHasUpdated) {
41862
- (0, react_12.startTransition)(forceUpdate);
42009
+ (0, react_11.startTransition)(forceUpdate);
41863
42010
  return;
41864
42011
  }
41865
- runUpdateIfVisible(() => (0, react_12.startTransition)(forceUpdate), pauseOffscreenFeatureOn && checkViewport);
42012
+ runUpdateIfVisible(() => (0, react_11.startTransition)(forceUpdate), pauseOffscreenFeatureOn && checkViewport);
41866
42013
  }, [resolveNextVariant, forceUpdate, runUpdateIfVisible, pauseOffscreenFeatureOn, yieldOnTapFeatureOn,]);
41867
42014
  const setGestureState = (0, react_3.useCallback)(({ isHovered: isHovered2, isPressed: isPressed2, isError: isError2, }) => {
41868
42015
  const isPressedHasUpdated = isPressed2 !== internalState.current.isPressed;
@@ -41888,7 +42035,7 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
41888
42035
  const clearLoadingGesture = (0, react_3.useCallback)(() => {
41889
42036
  const { baseVariant: baseVariant2, } = internalState.current;
41890
42037
  internalState.current.loadedBaseVariant[baseVariant2] = true;
41891
- runUpdateIfVisible(() => (0, react_12.startTransition)(forceUpdate), true);
42038
+ runUpdateIfVisible(() => (0, react_11.startTransition)(forceUpdate), true);
41892
42039
  }, [forceUpdate, runUpdateIfVisible,]);
41893
42040
  if (variant !== internalState.current.lastVariant) {
41894
42041
  const [nextBase, nextGesture,] = resolveNextVariant(variant);
@@ -41968,11 +42115,11 @@ function safeCSSValue(value) {
41968
42115
  return 'none';
41969
42116
  return value;
41970
42117
  }
41971
- function withCodeBoundaryForOverrides(Component17, { scopeId, nodeId, override, inComponentSlot, }) {
42118
+ function withCodeBoundaryForOverrides(Component18, { scopeId, nodeId, override, inComponentSlot, }) {
41972
42119
  if (!shouldEnableCodeBoundaries()) {
41973
- return override(Component17);
42120
+ return override(Component18);
41974
42121
  }
41975
- const appliedOverride = tryToApplyOverride(Component17, override);
42122
+ const appliedOverride = tryToApplyOverride(Component18, override);
41976
42123
  let hasErrorBeenLogged = false;
41977
42124
  function CodeBoundaryForOverrides(props, ref) {
41978
42125
  const nearestExternalComponent = useNearestExternalComponent();
@@ -41983,7 +42130,7 @@ function withCodeBoundaryForOverrides(Component17, { scopeId, nodeId, override,
41983
42130
  value: nodeId,
41984
42131
  children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(CodeComponentBoundary, {
41985
42132
  getErrorMessage: getErrorMessageForOverride.bind(null, scopeId, nodeId),
41986
- fallback: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
42133
+ fallback: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
41987
42134
  ...props,
41988
42135
  ref,
41989
42136
  }),
@@ -42001,7 +42148,7 @@ function withCodeBoundaryForOverrides(Component17, { scopeId, nodeId, override,
42001
42148
  collectErrorToAnalytics(appliedOverride.error);
42002
42149
  hasErrorBeenLogged = true;
42003
42150
  }
42004
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
42151
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
42005
42152
  ...props,
42006
42153
  ref,
42007
42154
  });
@@ -42022,11 +42169,11 @@ function withCodeBoundaryForOverrides(Component17, { scopeId, nodeId, override,
42022
42169
  }
42023
42170
  }
42024
42171
  }
42025
- return react_11.default.forwardRef(CodeBoundaryForOverrides);
42172
+ return react_10.default.forwardRef(CodeBoundaryForOverrides);
42026
42173
  }
42027
- function tryToApplyOverride(Component17, override) {
42174
+ function tryToApplyOverride(Component18, override) {
42028
42175
  try {
42029
- const ComponentWithOverrides = override(Component17);
42176
+ const ComponentWithOverrides = override(Component18);
42030
42177
  return {
42031
42178
  status: 'success',
42032
42179
  Component: ComponentWithOverrides,
@@ -42047,7 +42194,7 @@ function singleFrame() {
42047
42194
  frame.postRender(() => resolve());
42048
42195
  });
42049
42196
  }
42050
- var withV1StrokeFX = (Component17) => (0, react_7.forwardRef)((props, forwardedRef) => {
42197
+ var withV1StrokeFX = (Component18) => (0, react_7.forwardRef)((props, forwardedRef) => {
42051
42198
  const { strokeEffectLength, strokeEffectGap, strokeEffectOffset, strokeEffectLoop, strokeEffectTotalLength, strokeEffectLoopType, pathLengthTransition, ...restProps } = props;
42052
42199
  const isCanvas = isStaticRenderer();
42053
42200
  const offset = useMotionValue(0);
@@ -42091,7 +42238,7 @@ var withV1StrokeFX = (Component17) => (0, react_7.forwardRef)((props, forwardedR
42091
42238
  strokeDashoffset: value,
42092
42239
  }
42093
42240
  : void 0;
42094
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
42241
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
42095
42242
  ...restProps,
42096
42243
  ...effect,
42097
42244
  ref: forwardedRef,
@@ -42110,14 +42257,14 @@ function extractMappingFromInfo(info) {
42110
42257
  return void 0;
42111
42258
  }
42112
42259
  }
42113
- function withMappedReactProps(Component17, info) {
42260
+ function withMappedReactProps(Component18, info) {
42114
42261
  return (rawProps) => {
42115
42262
  const props = {};
42116
42263
  const mapping = extractMappingFromInfo(info);
42117
42264
  for (const key7 in rawProps) {
42118
42265
  asRecord(props)[(mapping == null ? void 0 : mapping[key7]) ?? key7] = rawProps[key7];
42119
42266
  }
42120
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
42267
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
42121
42268
  ...props,
42122
42269
  });
42123
42270
  };
@@ -42160,17 +42307,17 @@ function createInputOutputRanges2(transformTargets, threshold, exitTarget) {
42160
42307
  outputRange: [-1, -1, ...outputRange,],
42161
42308
  };
42162
42309
  }
42163
- var withVariantAppearEffect = (Component17) => react_11.default.forwardRef((props, forwardedRef) => {
42310
+ var withVariantAppearEffect = (Component18) => react_10.default.forwardRef((props, forwardedRef) => {
42164
42311
  if (RenderTarget.current() === RenderTarget.canvas) {
42165
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
42312
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
42166
42313
  ...props,
42167
42314
  ref: forwardedRef,
42168
42315
  });
42169
42316
  }
42170
42317
  const [options, rest,] = extractPrefixedProps(props, keys2);
42171
42318
  const { visibleVariantId, obscuredVariantId, animateOnce, threshold, variantAppearEffectEnabled, targets, exitTarget, scrollDirection, } = options;
42172
- const [activeVariant, setVariant,] = react_11.default.useState(obscuredVariantId);
42173
- const animateState = react_11.default.useRef(false);
42319
+ const [activeVariant, setVariant,] = react_10.default.useState(obscuredVariantId);
42320
+ const animateState = react_10.default.useRef(false);
42174
42321
  const observerRef = useObserverRef(forwardedRef);
42175
42322
  useAppearEffect(observerRef, (appears) => {
42176
42323
  if (options.targets)
@@ -42182,7 +42329,7 @@ var withVariantAppearEffect = (Component17) => react_11.default.forwardRef((prop
42182
42329
  if (animateState.current === appears)
42183
42330
  return;
42184
42331
  animateState.current = appears;
42185
- react_11.default.startTransition(() => {
42332
+ react_10.default.startTransition(() => {
42186
42333
  setVariant(appears ? visibleVariantId : obscuredVariantId);
42187
42334
  });
42188
42335
  }, {
@@ -42192,7 +42339,7 @@ var withVariantAppearEffect = (Component17) => react_11.default.forwardRef((prop
42192
42339
  y: threshold,
42193
42340
  },
42194
42341
  });
42195
- react_11.default.useEffect(() => {
42342
+ react_10.default.useEffect(() => {
42196
42343
  if (scrollDirection)
42197
42344
  return;
42198
42345
  if (!targets)
@@ -42214,12 +42361,12 @@ var withVariantAppearEffect = (Component17) => react_11.default.forwardRef((prop
42214
42361
  if (variant === currentVariant)
42215
42362
  return;
42216
42363
  currentVariant = variant;
42217
- react_11.default.startTransition(() => {
42364
+ react_10.default.startTransition(() => {
42218
42365
  setVariant(variant);
42219
42366
  });
42220
42367
  });
42221
42368
  }, [animateOnce, threshold, targets, props.variant, scrollDirection, exitTarget,]);
42222
- useScrollDirectionChange(scrollDirection, (variant) => react_11.default.startTransition(() => setVariant(variant)), {
42369
+ useScrollDirectionChange(scrollDirection, (variant) => react_10.default.startTransition(() => setVariant(variant)), {
42223
42370
  enabled: variantAppearEffectEnabled,
42224
42371
  repeat: !animateOnce,
42225
42372
  });
@@ -42228,30 +42375,30 @@ var withVariantAppearEffect = (Component17) => react_11.default.forwardRef((prop
42228
42375
  return;
42229
42376
  const useObscuredVariant = !options.targets && !options.scrollDirection;
42230
42377
  const target = useObscuredVariant ? options.obscuredVariantId : void 0;
42231
- (0, react_12.startTransition)(() => setVariant(target));
42378
+ (0, react_11.startTransition)(() => setVariant(target));
42232
42379
  });
42233
42380
  if (!('variantAppearEffectEnabled' in options) || variantAppearEffectEnabled === true) {
42234
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
42381
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
42235
42382
  ...rest,
42236
42383
  variant: activeVariant ?? props.variant,
42237
42384
  ref: observerRef,
42238
42385
  });
42239
42386
  }
42240
42387
  else {
42241
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
42388
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
42242
42389
  ...rest,
42243
42390
  });
42244
42391
  }
42245
42392
  });
42246
42393
  exports.withVariantAppearEffect = withVariantAppearEffect;
42247
- var withVariantFX = (Component17) => react_11.default.forwardRef(({ initial, animate: animate3, exit, ...props }, forwardedRef) => {
42394
+ var withVariantFX = (Component18) => react_10.default.forwardRef(({ initial, animate: animate3, exit, ...props }, forwardedRef) => {
42248
42395
  const observerRef = useObserverRef(forwardedRef);
42249
42396
  const effect = usePresenceAnimation({
42250
42397
  initial,
42251
42398
  animate: animate3,
42252
42399
  exit,
42253
42400
  }, observerRef, true);
42254
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
42401
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
42255
42402
  ...props,
42256
42403
  style: {
42257
42404
  ...(props == null ? void 0 : props.style),
@@ -42261,9 +42408,9 @@ var withVariantFX = (Component17) => react_11.default.forwardRef(({ initial, ani
42261
42408
  });
42262
42409
  });
42263
42410
  exports.withVariantFX = withVariantFX;
42264
- var WindowContext = /* @__PURE__ */ react_11.default.createContext(void 0);
42411
+ var WindowContext = /* @__PURE__ */ react_10.default.createContext(void 0);
42265
42412
  exports.WindowContext = WindowContext;
42266
- var useProvidedWindow = () => react_11.default.useContext(WindowContext);
42413
+ var useProvidedWindow = () => react_10.default.useContext(WindowContext);
42267
42414
  exports.useProvidedWindow = useProvidedWindow;
42268
42415
  function isDesignDefinition(d) {
42269
42416
  return d.type === 'master';
@@ -43007,6 +43154,27 @@ function createVariantName(weight, style2) {
43007
43154
  }
43008
43155
  return `${fontWeightNames[weight]}`;
43009
43156
  }
43157
+ var MapWithHash = class extends Map {
43158
+ constructor() {
43159
+ super(...arguments);
43160
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, '_hash', 0);
43161
+ }
43162
+ get hash() {
43163
+ return this._hash;
43164
+ }
43165
+ set(key7, value) {
43166
+ this._hash++;
43167
+ return super.set(key7, value);
43168
+ }
43169
+ delete(key7) {
43170
+ this._hash++;
43171
+ return super.delete(key7);
43172
+ }
43173
+ clear() {
43174
+ this._hash++;
43175
+ return super.clear();
43176
+ }
43177
+ };
43010
43178
  function isVariableFont(font) {
43011
43179
  return Boolean(font.variationAxes);
43012
43180
  }
@@ -43566,8 +43734,10 @@ var Mixed = Symbol('Mixed');
43566
43734
  var DEPENDENCIES_MODULE_NAME = 'dependencies';
43567
43735
  var DEPENDENCIES_MODULE_TYPE = 'config';
43568
43736
  var DEPENDENCIES_MODULE_TYPE_SLASH_NAME = `${DEPENDENCIES_MODULE_TYPE}/${DEPENDENCIES_MODULE_NAME}`;
43569
- var IMPORT_MAP_FILE_ID = `${DEPENDENCIES_MODULE_TYPE_SLASH_NAME}/importMap.json`;
43570
- var DEPENDENCIES_FILE_ID = `${DEPENDENCIES_MODULE_TYPE_SLASH_NAME}/dependencies.json`;
43737
+ var IMPORT_MAP_FILE_NAME = 'importMap.json';
43738
+ var DEPENDENCIES_FILE_NAME = 'dependencies.json';
43739
+ var IMPORT_MAP_FILE_ID = `${DEPENDENCIES_MODULE_TYPE_SLASH_NAME}/${IMPORT_MAP_FILE_NAME}`;
43740
+ var DEPENDENCIES_FILE_ID = `${DEPENDENCIES_MODULE_TYPE_SLASH_NAME}/${DEPENDENCIES_FILE_NAME}`;
43571
43741
  var USE_FREEZE = false;
43572
43742
  var List;
43573
43743
  ((List2) => {
@@ -45019,7 +45189,7 @@ function isValidVariationAxes(data2) {
45019
45189
  var FontStore = class {
45020
45190
  constructor() {
45021
45191
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'enabled', false);
45022
- (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'bySelector', /* @__PURE__ */ new Map());
45192
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'bySelector', new MapWithHash());
45023
45193
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'loadedSelectors', /* @__PURE__ */ new Set());
45024
45194
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'getGoogleFontsListPromise');
45025
45195
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'getFontshareFontsListPromise');
@@ -45033,20 +45203,29 @@ var FontStore = class {
45033
45203
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'builtIn');
45034
45204
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'framer');
45035
45205
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'custom');
45206
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'bySelectorValuesCache');
45036
45207
  this.local = new LocalFontSource();
45037
45208
  this.google = new GoogleFontSource();
45038
45209
  this.fontshare = new FontshareSource();
45039
45210
  this.framer = new FramerFontSource();
45040
45211
  this.custom = new CustomFontSource();
45041
45212
  this.builtIn = new BuiltInFontSource();
45042
- this.bySelector = /* @__PURE__ */ new Map();
45043
45213
  this.importLocalFonts();
45044
45214
  }
45215
+ get hash() {
45216
+ return this.bySelector.hash;
45217
+ }
45045
45218
  addFont(font) {
45046
45219
  this.bySelector.set(font.selector, font);
45047
45220
  }
45048
45221
  getAvailableFonts() {
45049
- return Array.from(this.bySelector.values());
45222
+ if (!this.bySelectorValuesCache || this.bySelectorValuesCache.hash !== this.bySelector.hash) {
45223
+ this.bySelectorValuesCache = {
45224
+ result: Array.from(this.bySelector.values()),
45225
+ hash: this.bySelector.hash,
45226
+ };
45227
+ }
45228
+ return this.bySelectorValuesCache.result;
45050
45229
  }
45051
45230
  importLocalFonts() {
45052
45231
  for (const font of this.local.importFonts()) {
@@ -45418,7 +45597,7 @@ var DeprecatedComponentContainer = /* @__PURE__ */ (() => {
45418
45597
  const { left, right, top, bottom, center, centerX, centerY, aspectRatio: aspectRatio2, parentSize, width, height, rotation, opacity: _opacity, visible, _constraints, _initialStyle, name, positionSticky, positionStickyTop, positionStickyRight, positionStickyBottom, positionStickyLeft,
45419
45598
  // Remove the children and the componentIdentifier from the props passed into the component
45420
45599
  componentIdentifier: originalComponentIdentifier, children: originalChildren, style: style2, duplicatedFrom, widthType, heightType, ...childProps } = frameProps;
45421
- children = react_11.default.Children.map(originalChildren, (child) => {
45600
+ children = react_10.default.Children.map(originalChildren, (child) => {
45422
45601
  if (!isReactChild(child) || !isReactElement(child)) {
45423
45602
  return child;
45424
45603
  }
@@ -45428,11 +45607,11 @@ var DeprecatedComponentContainer = /* @__PURE__ */ (() => {
45428
45607
  id: this.props.__layoutId,
45429
45608
  children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(AutomaticLayoutIds, {
45430
45609
  enabled: false,
45431
- children: react_11.default.cloneElement(child, childProps),
45610
+ children: react_10.default.cloneElement(child, childProps),
45432
45611
  }),
45433
45612
  });
45434
45613
  }
45435
- return react_11.default.cloneElement(child, childProps);
45614
+ return react_10.default.cloneElement(child, childProps);
45436
45615
  });
45437
45616
  frameProps = {
45438
45617
  style: style2,
@@ -45538,7 +45717,7 @@ var PlainTextInput = /* @__PURE__ */ (0, react_7.forwardRef)(function FormPlainT
45538
45717
  });
45539
45718
  const newValue = e.target.value;
45540
45719
  onChange == null ? void 0 : onChange(e);
45541
- (0, react_12.startTransition)(() => setHasValue(!!newValue));
45720
+ (0, react_11.startTransition)(() => setHasValue(!!newValue));
45542
45721
  }, [onChange,]);
45543
45722
  const eventHandlers = useCustomValidity(onValid, onInvalid, handleChange, onBlur, onFocus);
45544
45723
  if (type === 'hidden') {
@@ -45691,7 +45870,7 @@ var styles = /* @__PURE__ */ (() => [
45691
45870
  var FormPlainTextInput2 = /* @__PURE__ */ withCSS(PlainTextInput, styles, 'framer-lib-form-plain-text-input');
45692
45871
  exports.FormPlainTextInput = FormPlainTextInput2;
45693
45872
  var className = 'framer-form-boolean-input';
45694
- var BooleanInput = /* @__PURE__ */ react_11.default.forwardRef(function FormPlainTextInput3(props, ref) {
45873
+ var BooleanInput = /* @__PURE__ */ react_10.default.forwardRef(function FormPlainTextInput3(props, ref) {
45695
45874
  const { inputName, type = 'checkbox', defaultChecked, onValid, ...rest } = props;
45696
45875
  const isCanvas = useIsOnFramerCanvas();
45697
45876
  const attributes = isCanvas
@@ -45816,7 +45995,7 @@ var styles2 = /* @__PURE__ */ (() => [
45816
45995
  ])();
45817
45996
  var FormBooleanInput = /* @__PURE__ */ withCSS(BooleanInput, styles2, 'framer-lib-form-boolean-input');
45818
45997
  exports.FormBooleanInput = FormBooleanInput;
45819
- var Select = /* @__PURE__ */ react_11.default.forwardRef(function Select2(props, measureRef) {
45998
+ var Select = /* @__PURE__ */ react_10.default.forwardRef(function Select2(props, measureRef) {
45820
45999
  const { autoFocus, className: className2, inputName, required, hidden, defaultValue, selectOptions, style: style2, onValid, onChange, onBlur, onInvalid, onFocus, ...rest } = props;
45821
46000
  const eventHandlers = useCustomValidity(onValid, onInvalid, onChange, onBlur, onFocus);
45822
46001
  const key7 = Array.isArray(defaultValue) ? defaultValue[0] : defaultValue;
@@ -45927,14 +46106,376 @@ var styles3 = /* @__PURE__ */ (() => [
45927
46106
  ])();
45928
46107
  var FormSelect = /* @__PURE__ */ withCSS(Select, styles3, 'framer-lib-form-select');
45929
46108
  exports.FormSelect = FormSelect;
45930
- var Image2 = /* @__PURE__ */ react_11.default.forwardRef(function Image3(props, ref) {
46109
+ function useEscToClose(isOpen, close) {
46110
+ (0, react_2.useEffect)(() => {
46111
+ function handleKeyDown(e) {
46112
+ if (e.key === 'Escape' && isOpen) {
46113
+ e.preventDefault();
46114
+ e.stopPropagation();
46115
+ close();
46116
+ }
46117
+ }
46118
+ window.addEventListener('keyup', handleKeyDown);
46119
+ return () => window.removeEventListener('keyup', handleKeyDown);
46120
+ }, [isOpen, close,]);
46121
+ }
46122
+ var steps2 = [512, 1024, 2048, 4096,];
46123
+ function calculateImageWidth(aspectRatio2, maxWidth, totalHorizontalPadding, totalVerticalPadding) {
46124
+ const availableHeight = window.innerHeight - totalVerticalPadding;
46125
+ const availableWidth = Math.min(window.innerWidth - totalHorizontalPadding, maxWidth);
46126
+ const maxWidthBasedOnHeight = availableHeight / aspectRatio2;
46127
+ return Math.min(availableWidth, maxWidthBasedOnHeight);
46128
+ }
46129
+ function optimisticallyDecodeImage(image, { width, height, }) {
46130
+ if (!image.src || !image.srcSet)
46131
+ return;
46132
+ const i = new window.Image();
46133
+ i.src = image.src;
46134
+ i.srcset = image.srcSet;
46135
+ i.width = width;
46136
+ i.height = height;
46137
+ return i.decode();
46138
+ }
46139
+ function getPortalContainer2() {
46140
+ return document.getElementById(templateOverlayContainerId) ?? document.getElementById(overlayContainerId) ?? document.body;
46141
+ }
46142
+ function getSidePadding(value, padding) {
46143
+ if (isNumber2(value))
46144
+ return value;
46145
+ return padding ?? 0;
46146
+ }
46147
+ function getTotalVerticalPadding(lightbox) {
46148
+ return getSidePadding(lightbox == null ? void 0 : lightbox.paddingTop, lightbox == null ? void 0 : lightbox.padding) +
46149
+ getSidePadding(lightbox == null ? void 0 : lightbox.paddingBottom, lightbox == null ? void 0 : lightbox.padding);
46150
+ }
46151
+ function getTotalHorizontalPadding(lightbox) {
46152
+ return getSidePadding(lightbox == null ? void 0 : lightbox.paddingLeft, lightbox == null ? void 0 : lightbox.padding) +
46153
+ getSidePadding(lightbox == null ? void 0 : lightbox.paddingRight, lightbox == null ? void 0 : lightbox.padding);
46154
+ }
46155
+ function useStableCallback(callback) {
46156
+ const latest = (0, react_4.useRef)(callback);
46157
+ latest.current = callback;
46158
+ return (0, react_3.useCallback)((...args) => latest.current(...args), []);
46159
+ }
46160
+ function createImageWithSrcSet(lightbox, background) {
46161
+ if (!lightbox || !background || !background.src)
46162
+ return background;
46163
+ const base = new URL(background.src);
46164
+ base.searchParams.delete('scale-down-to');
46165
+ base.searchParams.delete('lossless');
46166
+ return {
46167
+ ...background,
46168
+ sizes: `min(100vw, ${lightbox.maxWidth - getTotalHorizontalPadding(lightbox)}px)`,
46169
+ // Use all steps since the lightbox can scale up and down with the viewport.
46170
+ srcSet: steps2.map((size) => {
46171
+ const src = new URL(base);
46172
+ src.searchParams.set('scale-down-to', size.toString());
46173
+ return `${src.toString()} ${size}w`;
46174
+ }).join(', '),
46175
+ };
46176
+ }
46177
+ var distortionTransforms = /* @__PURE__ */ (() => ({
46178
+ x: void 0,
46179
+ y: void 0,
46180
+ z: 0,
46181
+ translateX: void 0,
46182
+ translateY: void 0,
46183
+ translateZ: 0,
46184
+ rotate: void 0,
46185
+ rotateX: 0,
46186
+ rotateY: 0,
46187
+ rotateZ: void 0,
46188
+ scale: 1,
46189
+ scaleX: 1,
46190
+ scaleY: 1,
46191
+ scaleZ: 1,
46192
+ skew: 0,
46193
+ skewX: 0,
46194
+ skewY: 0,
46195
+ originX: void 0,
46196
+ originY: void 0,
46197
+ originZ: void 0,
46198
+ perspective: 0,
46199
+ transformPerspective: 0,
46200
+ }))();
46201
+ function isDistortionTransform(values) {
46202
+ if (!values)
46203
+ return false;
46204
+ for (const k in values) {
46205
+ if (!(k in distortionTransforms))
46206
+ continue;
46207
+ const identityValue = distortionTransforms[k];
46208
+ const value = values[k];
46209
+ if (!isNumber2(identityValue) || !isNumber2(value))
46210
+ continue;
46211
+ if (identityValue === value)
46212
+ continue;
46213
+ return true;
46214
+ }
46215
+ return false;
46216
+ }
46217
+ function isDistorted(ref) {
46218
+ var _a, _b;
46219
+ const element = visualElementStore.get(ref.current);
46220
+ if (!element)
46221
+ return false;
46222
+ if (isDistortionTransform((_a = element.projection) == null ? void 0 : _a.latestValues))
46223
+ return true;
46224
+ const path = (_b = element.projection) == null ? void 0 : _b.path;
46225
+ if (!path || path.length === 0)
46226
+ return false;
46227
+ for (const p of path) {
46228
+ if (isDistortionTransform(p.latestValues))
46229
+ return true;
46230
+ }
46231
+ return false;
46232
+ }
46233
+ var enterExitBackdropAnimation = {
46234
+ opacity: 0,
46235
+ };
46236
+ var targetBackdropAnimation = {
46237
+ opacity: 1,
46238
+ };
46239
+ function withLightboxEffect(Component18) {
46240
+ return (0, react_7.forwardRef)(function LightboxEffect({ lightbox, lightboxClassName, onClick, ...props }, forwardedRef) {
46241
+ const config = (0, react_3.useContext)(MotionConfigContext);
46242
+ const fallbackRef = (0, react_4.useRef)(null);
46243
+ const ref = forwardedRef ?? fallbackRef;
46244
+ const decodePromiseRef = (0, react_4.useRef)();
46245
+ const image = (0, react_4.useMemo)(() => createImageWithSrcSet(lightbox, props.background), [lightbox, props.background,]);
46246
+ const [open, setOpen,] = (0, react_4.useState)(false);
46247
+ const [openOverrides, setOpenOverrides,] = (0, react_4.useState)();
46248
+ const onOpen = (0, react_3.useCallback)(() => {
46249
+ if (!lightbox)
46250
+ return;
46251
+ if (open) {
46252
+ (0, react_11.startTransition)(() => {
46253
+ setOpen(true);
46254
+ });
46255
+ return;
46256
+ }
46257
+ frame.read(() => {
46258
+ if (!ref.current)
46259
+ return;
46260
+ const style22 = getComputedStyle(ref.current);
46261
+ const hasBorder = ref.current.getAttribute('data-border') === 'true';
46262
+ const borderStyle2 = hasBorder ? getComputedStyle(ref.current, '::after') : void 0;
46263
+ const width = ref.current.offsetWidth ?? 1;
46264
+ const height = ref.current.offsetHeight ?? 1;
46265
+ const transition2 = isDistorted(ref)
46266
+ ? {
46267
+ duration: 0,
46268
+ }
46269
+ : lightbox.transition;
46270
+ (0, react_11.startTransition)(() => {
46271
+ setOpenOverrides({
46272
+ borderRadius: style22.borderRadius,
46273
+ aspectRatio: width / (height || 1),
46274
+ borderTop: borderStyle2 == null ? void 0 : borderStyle2.borderTopWidth,
46275
+ borderRight: borderStyle2 == null ? void 0 : borderStyle2.borderRightWidth,
46276
+ borderBottom: borderStyle2 == null ? void 0 : borderStyle2.borderBottomWidth,
46277
+ borderLeft: borderStyle2 == null ? void 0 : borderStyle2.borderLeftWidth,
46278
+ borderStyle: borderStyle2 == null ? void 0 : borderStyle2.borderStyle,
46279
+ borderColor: borderStyle2 == null ? void 0 : borderStyle2.borderColor,
46280
+ transition: transition2,
46281
+ imageRendering: style22.imageRendering,
46282
+ filter: style22.filter,
46283
+ });
46284
+ setOpen(true);
46285
+ });
46286
+ });
46287
+ }, [lightbox, open, ref,]);
46288
+ const aspectRatio2 = (openOverrides == null ? void 0 : openOverrides.aspectRatio) ?? 1;
46289
+ const decode = useStableCallback(() => {
46290
+ var _a;
46291
+ if (!lightbox || !image || !image.src)
46292
+ return;
46293
+ const srcDecodePromise = (_a = decodePromiseRef.current) == null ? void 0 : _a[image.src];
46294
+ if (srcDecodePromise)
46295
+ return srcDecodePromise;
46296
+ const width = calculateImageWidth(aspectRatio2, lightbox.maxWidth, getTotalHorizontalPadding(lightbox), getTotalVerticalPadding(lightbox));
46297
+ const promise = optimisticallyDecodeImage(image, {
46298
+ width,
46299
+ height: width * aspectRatio2,
46300
+ });
46301
+ decodePromiseRef.current = {
46302
+ [image.src]: promise,
46303
+ };
46304
+ return promise;
46305
+ });
46306
+ const handleClick = (0, react_3.useCallback)(async (e) => {
46307
+ onClick == null ? void 0 : onClick(e);
46308
+ if (open || !lightbox || !image)
46309
+ return;
46310
+ await decode();
46311
+ onOpen();
46312
+ }, [onClick, onOpen, open, image, lightbox, decode,]);
46313
+ const onClose = (0, react_3.useCallback)((e) => {
46314
+ e == null ? void 0 : e.stopPropagation();
46315
+ (0, react_11.startTransition)(() => {
46316
+ setOpen(false);
46317
+ });
46318
+ }, []);
46319
+ useEscToClose(open, onClose);
46320
+ (0, react_2.useEffect)(() => {
46321
+ if (!lightbox)
46322
+ return;
46323
+ let timer;
46324
+ function enter() {
46325
+ timer = setTimeout(() => {
46326
+ void decode();
46327
+ }, 50);
46328
+ }
46329
+ function clear() {
46330
+ clearTimeout(timer);
46331
+ }
46332
+ const currentRef = ref.current;
46333
+ currentRef == null ? void 0 : currentRef.addEventListener('mouseenter', enter);
46334
+ currentRef == null ? void 0 : currentRef.addEventListener('mouseleave', clear);
46335
+ currentRef == null ? void 0 : currentRef.addEventListener('pointerdown', decode);
46336
+ return () => {
46337
+ clear();
46338
+ currentRef == null ? void 0 : currentRef.removeEventListener('mouseenter', enter);
46339
+ currentRef == null ? void 0 : currentRef.removeEventListener('mouseleave', clear);
46340
+ currentRef == null ? void 0 : currentRef.removeEventListener('pointerdown', decode);
46341
+ };
46342
+ }, [decode, ref, lightbox,]);
46343
+ const fallbackLayoutId = (0, react_3.useId)();
46344
+ const transition = (openOverrides == null ? void 0 : openOverrides.transition) ?? props.transition ?? config.transition;
46345
+ const borderRadius2 = openOverrides == null ? void 0 : openOverrides.borderRadius;
46346
+ const imageRendering = openOverrides == null ? void 0 : openOverrides.imageRendering;
46347
+ const filter2 = openOverrides == null ? void 0 : openOverrides.filter;
46348
+ const borderTop = openOverrides == null ? void 0 : openOverrides.borderTop;
46349
+ const borderRight = openOverrides == null ? void 0 : openOverrides.borderRight;
46350
+ const borderBottom = openOverrides == null ? void 0 : openOverrides.borderBottom;
46351
+ const borderLeft = openOverrides == null ? void 0 : openOverrides.borderLeft;
46352
+ const borderStyle = openOverrides == null ? void 0 : openOverrides.borderStyle;
46353
+ const borderColor = openOverrides == null ? void 0 : openOverrides.borderColor;
46354
+ const hasAnyBorder = Boolean(borderTop || borderRight || borderBottom || borderLeft || borderStyle || borderColor);
46355
+ const border = hasAnyBorder
46356
+ ? {
46357
+ '--border-top-width': borderTop,
46358
+ '--border-right-width': borderRight,
46359
+ '--border-bottom-width': borderBottom,
46360
+ '--border-left-width': borderLeft,
46361
+ '--border-style': borderStyle,
46362
+ '--border-color': borderColor,
46363
+ }
46364
+ : void 0;
46365
+ const portalProps = {
46366
+ [portalIdAttribute]: props.id,
46367
+ };
46368
+ const paddingTop = getSidePadding(lightbox == null ? void 0 : lightbox.paddingTop, lightbox == null ? void 0 : lightbox.padding);
46369
+ const paddingBottom = getSidePadding(lightbox == null ? void 0 : lightbox.paddingBottom, lightbox == null ? void 0 : lightbox.padding);
46370
+ const paddingLeft = getSidePadding(lightbox == null ? void 0 : lightbox.paddingLeft, lightbox == null ? void 0 : lightbox.padding);
46371
+ const paddingRight = getSidePadding(lightbox == null ? void 0 : lightbox.paddingRight, lightbox == null ? void 0 : lightbox.padding);
46372
+ const style2 = (openOverrides == null ? void 0 : openOverrides.borderRadius)
46373
+ ? {
46374
+ ...props.style,
46375
+ borderRadius: openOverrides.borderRadius,
46376
+ }
46377
+ : props.style;
46378
+ const layoutDependency = open ? props.layoutDependency ? `${props.layoutDependency}-open` : 'open' : props.layoutDependency;
46379
+ return /* @__PURE__ */ (0, jsx_runtime_2.jsxs)(jsx_runtime_1.Fragment, {
46380
+ children: [
46381
+ /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
46382
+ ...props,
46383
+ style: style2,
46384
+ onClick: handleClick,
46385
+ layoutId: props.layoutId ?? (lightbox ? fallbackLayoutId : void 0),
46386
+ ref,
46387
+ layoutDependency,
46388
+ transition,
46389
+ }),
46390
+ /* @__PURE__ */ (0, jsx_runtime_1.jsx)(AnimatePresence, {
46391
+ children: open && lightbox && image && /* @__PURE__ */ (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {
46392
+ children: (0, react_dom_2.createPortal)(
46393
+ /* @__PURE__ */ (0, jsx_runtime_2.jsxs)(jsx_runtime_1.Fragment, {
46394
+ children: [
46395
+ /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.div, {
46396
+ ...portalProps,
46397
+ className: lightboxClassName,
46398
+ onClick: onClose,
46399
+ style: {
46400
+ position: 'fixed',
46401
+ inset: 0,
46402
+ zIndex: lightbox.zIndex,
46403
+ backgroundColor: lightbox.backdrop ?? 'transparent',
46404
+ },
46405
+ transition,
46406
+ initial: enterExitBackdropAnimation,
46407
+ animate: targetBackdropAnimation,
46408
+ exit: enterExitBackdropAnimation,
46409
+ onTransitionEnd: () => {
46410
+ (0, react_11.startTransition)(() => {
46411
+ setOpenOverrides(void 0);
46412
+ });
46413
+ },
46414
+ }),
46415
+ /* @__PURE__ */ (0, jsx_runtime_1.jsx)('div', {
46416
+ ...portalProps,
46417
+ className: lightboxClassName,
46418
+ style: {
46419
+ alignItems: 'center',
46420
+ display: 'flex',
46421
+ inset: `${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`,
46422
+ justifyContent: 'center',
46423
+ pointerEvents: 'none',
46424
+ position: 'fixed',
46425
+ zIndex: lightbox.zIndex,
46426
+ },
46427
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)('div', {
46428
+ style: {
46429
+ alignItems: 'center',
46430
+ aspectRatio: aspectRatio2,
46431
+ display: 'flex',
46432
+ justifyContent: 'center',
46433
+ maxHeight: '100%',
46434
+ position: 'relative',
46435
+ width: '100%',
46436
+ maxWidth: lightbox.maxWidth,
46437
+ },
46438
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.div, {
46439
+ layoutId: props.layoutId ?? fallbackLayoutId,
46440
+ transition,
46441
+ onClick: onOpen,
46442
+ className: 'framer-lightbox-container',
46443
+ 'data-border': hasAnyBorder,
46444
+ style: {
46445
+ aspectRatio: aspectRatio2,
46446
+ borderRadius: borderRadius2,
46447
+ bottom: 0,
46448
+ position: 'absolute',
46449
+ top: 0,
46450
+ userSelect: 'none',
46451
+ imageRendering,
46452
+ filter: filter2,
46453
+ ...border,
46454
+ },
46455
+ children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(BackgroundImageComponent, {
46456
+ image,
46457
+ alt: image.alt,
46458
+ draggable: props.draggable,
46459
+ }),
46460
+ }),
46461
+ }),
46462
+ }),
46463
+ ],
46464
+ }), getPortalContainer2()),
46465
+ }, 'backdrop'),
46466
+ }),
46467
+ ],
46468
+ });
46469
+ });
46470
+ }
46471
+ var Component16 = /* @__PURE__ */ react_10.default.forwardRef(function Image2(props, ref) {
45931
46472
  const { background, children, alt, draggable, fitImageDimension, style: styleFromProps, ...rest } = props;
45932
46473
  const style2 = {
45933
46474
  ...styleFromProps,
45934
46475
  };
45935
46476
  const intrinsicSize = (0, react_4.useMemo)(() => getIntrinsicSizeForBackgroundImage(background), [background,]);
45936
46477
  const [fallbackIntrinsicSize, setFallbackIntrinsicSize,] = (0, react_4.useState)();
45937
- react_11.default.useLayoutEffect(() => {
46478
+ react_10.default.useLayoutEffect(() => {
45938
46479
  if (!(background == null ? void 0 : background.src))
45939
46480
  return;
45940
46481
  if (!fitImageDimension)
@@ -45975,7 +46516,8 @@ var Image2 = /* @__PURE__ */ react_11.default.forwardRef(function Image3(props,
45975
46516
  ],
45976
46517
  });
45977
46518
  });
45978
- exports.Image = Image2;
46519
+ var Image3 = /* @__PURE__ */ withLightboxEffect(Component16);
46520
+ exports.Image = Image3;
45979
46521
  var frameFromElement = (element) => {
45980
46522
  const frame2 = Rect.fromRect(element.getBoundingClientRect());
45981
46523
  frame2.x = frame2.x + safeWindow.scrollX;
@@ -46322,7 +46864,7 @@ var defaultValues2 = {
46322
46864
  function isEffectKey(key7) {
46323
46865
  return key7 in defaultValues2;
46324
46866
  }
46325
- function createKeyframes(effect) {
46867
+ function createKeyframes(effect, shouldReduceMotion) {
46326
46868
  const out = {};
46327
46869
  for (const key7 in effect) {
46328
46870
  if (!isEffectKey(key7))
@@ -46331,6 +46873,8 @@ function createKeyframes(effect) {
46331
46873
  const defaultValue = defaultValues2[key7];
46332
46874
  if (isUndefined(effectValue) || isUndefined(defaultValue))
46333
46875
  continue;
46876
+ if (shouldReduceMotion && key7 !== 'opacity')
46877
+ continue;
46334
46878
  out[key7] = [effectValue, defaultValue,];
46335
46879
  }
46336
46880
  return out;
@@ -46338,7 +46882,16 @@ function createKeyframes(effect) {
46338
46882
  var emojiSplitRe = /* @__PURE__ */ (() => {
46339
46883
  return new RegExp('\\p{Regional_Indicator}{2}|\\p{Emoji}\\p{Emoji_Modifier}?\\p{Variation_Selector}?(?:\\u{200d}\\p{Emoji}\\p{Emoji_Modifier}?\\p{Variation_Selector}?)*|.', 'gu');
46340
46884
  })();
46341
- function tokenizeText(text, tokenization = 'character', elements, style2) {
46885
+ function tokenizeText(text, tokenization = 'character', elements, shouldReduceMotion, style2) {
46886
+ if (shouldReduceMotion) {
46887
+ const ref = newOverrideableRef();
46888
+ elements.add(ref);
46889
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)('span', {
46890
+ ref,
46891
+ style: style2,
46892
+ children: text,
46893
+ });
46894
+ }
46342
46895
  switch (tokenization) {
46343
46896
  case 'character':
46344
46897
  // When we want to animate "lines" that aren't split by newlines, but
@@ -46431,7 +46984,7 @@ function transformString(effect) {
46431
46984
  transforms.push(`skewY(${effect.skewY}deg)`);
46432
46985
  return transforms.join(' ');
46433
46986
  }
46434
- function getInitialEffectStyle(canPlay, canAnimate2, effect) {
46987
+ function getInitialEffectStyle(canPlay, canAnimate2, effect, shouldReduceMotion) {
46435
46988
  if (!effect || !effect.effect)
46436
46989
  return void 0;
46437
46990
  const type = effect.type;
@@ -46443,8 +46996,8 @@ function getInitialEffectStyle(canPlay, canAnimate2, effect) {
46443
46996
  return void 0;
46444
46997
  return {
46445
46998
  opacity: effect.effect.opacity,
46446
- filter: effect.effect.filter,
46447
- transform: transformString(effect.effect),
46999
+ filter: shouldReduceMotion ? void 0 : effect.effect.filter,
47000
+ transform: shouldReduceMotion ? void 0 : transformString(effect.effect),
46448
47001
  };
46449
47002
  case 'line':
46450
47003
  case 'word':
@@ -46458,8 +47011,8 @@ function getInitialEffectStyle(canPlay, canAnimate2, effect) {
46458
47011
  return {
46459
47012
  display: 'inline-block',
46460
47013
  opacity: effect.effect.opacity,
46461
- filter: effect.effect.filter,
46462
- transform: transformString(effect.effect),
47014
+ filter: shouldReduceMotion ? void 0 : effect.effect.filter,
47015
+ transform: shouldReduceMotion ? void 0 : transformString(effect.effect),
46463
47016
  };
46464
47017
  }
46465
47018
  default:
@@ -46470,6 +47023,7 @@ function useTextEffect(config, ref, preview) {
46470
47023
  const elements = useConstant2(() => /* @__PURE__ */ new Set());
46471
47024
  const isRenderingStaticContent = isStaticRenderer();
46472
47025
  const canPlay = preview || !isRenderingStaticContent;
47026
+ const shouldReduceMotion = useReducedMotionConfig();
46473
47027
  const state = React2.useRef({
46474
47028
  hasMounted: false,
46475
47029
  hasAnimatedOnce: false,
@@ -46503,7 +47057,7 @@ function useTextEffect(config, ref, preview) {
46503
47057
  const cleanupRef = {
46504
47058
  current: void 0,
46505
47059
  };
46506
- void runAppearEffect(tokenization2, effect.effect, elements, transition, startDelay, repeat, () => {
47060
+ void runAppearEffect(tokenization2, effect.effect, elements, transition, startDelay, repeat, shouldReduceMotion, () => {
46507
47061
  Object.assign(state.current, {
46508
47062
  isAnimating: false,
46509
47063
  });
@@ -46554,9 +47108,9 @@ function useTextEffect(config, ref, preview) {
46554
47108
  if (!effectEnabled)
46555
47109
  return void 0;
46556
47110
  const { hasMounted, hasAnimatedOnce, effect, } = state.current;
46557
- const effectStyle = getInitialEffectStyle(canPlay, preview || mayAnimate(hasMounted, hasAnimatedOnce, effect), state.current.effect);
47111
+ const effectStyle = getInitialEffectStyle(canPlay, preview || mayAnimate(hasMounted, hasAnimatedOnce, effect), state.current.effect, shouldReduceMotion);
46558
47112
  return {
46559
- text: (text) => tokenizeText(text, tokenization, elements, effectStyle),
47113
+ text: (text) => tokenizeText(text, tokenization, elements, shouldReduceMotion, effectStyle),
46560
47114
  props: (style2) => {
46561
47115
  if ((effect == null ? void 0 : effect.tokenization) !== 'element')
46562
47116
  return void 0;
@@ -46580,7 +47134,7 @@ function useTextEffect(config, ref, preview) {
46580
47134
  switch (type) {
46581
47135
  case 'appear': {
46582
47136
  const { transition, startDelay, } = effect;
46583
- void runAppearEffect(tokenization, effect.effect, elements, transition, startDelay);
47137
+ void runAppearEffect(tokenization, effect.effect, elements, transition, startDelay, false, shouldReduceMotion);
46584
47138
  break;
46585
47139
  }
46586
47140
  default:
@@ -46600,8 +47154,8 @@ function mayAnimate(hasMounted, hasAnimatedOnce, effect) {
46600
47154
  hasAnimatedOnce && !(effect == null ? void 0 : effect.repeat) &&
46601
47155
  ((effect == null ? void 0 : effect.trigger) === 'onInView' || (effect == null ? void 0 : effect.trigger) === 'onScrollTarget'));
46602
47156
  }
46603
- async function runAppearEffect(tokenization = 'character', effect, elements, transition, startDelay = 0, repeat = false, callback, cleanupRef) {
46604
- const enter = createKeyframes(effect);
47157
+ async function runAppearEffect(tokenization = 'character', effect, elements, transition, startDelay = 0, repeat = false, shouldReduceMotion, callback, cleanupRef) {
47158
+ const enter = createKeyframes(effect, shouldReduceMotion);
46605
47159
  const controller = new AbortController();
46606
47160
  if (cleanupRef)
46607
47161
  cleanupRef.current = () => controller.abort();
@@ -46621,13 +47175,20 @@ async function runAppearEffect(tokenization = 'character', effect, elements, tra
46621
47175
  }).then(() => callback == null ? void 0 : callback());
46622
47176
  if (!repeat || !cleanupRef)
46623
47177
  return;
46624
- cleanupRef.current = () => void animate(list, effect, {
46625
- ...transition,
46626
- restDelta: 1e-3,
46627
- delay: stagger((transition == null ? void 0 : transition.delay) ?? 0, {
46628
- startDelay,
46629
- }),
46630
- });
47178
+ cleanupRef.current = () => {
47179
+ const actualEffect = shouldReduceMotion
47180
+ ? {
47181
+ opacity: effect.opacity,
47182
+ }
47183
+ : effect;
47184
+ void animate(list, actualEffect, {
47185
+ ...transition,
47186
+ restDelta: 1e-3,
47187
+ delay: stagger((transition == null ? void 0 : transition.delay) ?? 0, {
47188
+ startDelay,
47189
+ }),
47190
+ });
47191
+ };
46631
47192
  return;
46632
47193
  }
46633
47194
  case 'line': {
@@ -46664,8 +47225,13 @@ async function runAppearEffect(tokenization = 'character', effect, elements, tra
46664
47225
  cleanupRef.current = () => {
46665
47226
  if (list.length === 0)
46666
47227
  return;
47228
+ const actualEffect = shouldReduceMotion
47229
+ ? {
47230
+ opacity: effect.opacity,
47231
+ }
47232
+ : effect;
46667
47233
  list.forEach((group, i) => {
46668
- void animate(group, effect, {
47234
+ void animate(group, actualEffect, {
46669
47235
  ...transition,
46670
47236
  restDelta: 1e-3,
46671
47237
  delay: startDelay + i * ((transition == null ? void 0 : transition.delay) ?? 0),
@@ -46770,13 +47336,12 @@ var RichTextContainer = /* @__PURE__ */ (0, react_7.forwardRef)(function RichTex
46770
47336
  return null;
46771
47337
  const isHidden = isEditable && environment2() === RenderTarget.canvas;
46772
47338
  const containerStyle = {
46773
- outline: 'none',
46774
- display: 'flex',
46775
- flexDirection: 'column',
46776
- justifyContent: convertVerticalAlignment(verticalAlignment),
46777
47339
  opacity: isHidden ? 0 : opacity,
46778
- flexShrink: 0,
46779
47340
  };
47341
+ const justifyContent = convertVerticalAlignment(verticalAlignment);
47342
+ if (justifyContent !== defaultRichTextContainerStyle.justifyContent) {
47343
+ containerStyle.justifyContent = justifyContent;
47344
+ }
46780
47345
  const positionStyle = {};
46781
47346
  const restrictedRenderTarget = RenderTarget.hasRestrictions();
46782
47347
  const frame2 = calculateRect(props, parentSize || 0, false);
@@ -46822,11 +47387,11 @@ var RichTextContainer = /* @__PURE__ */ (0, react_7.forwardRef)(function RichTex
46822
47387
  if (layoutId) {
46823
47388
  rest.layout = 'preserve-aspect';
46824
47389
  }
46825
- const Component17 = htmlElementAsMotionComponent(props.as);
47390
+ const Component18 = htmlElementAsMotionComponent(props.as);
46826
47391
  const dataFramerName = rest['data-framer-name'] ?? name;
46827
47392
  if (isString(props.viewBox)) {
46828
47393
  if (props.as !== void 0) {
46829
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
47394
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
46830
47395
  ...rest,
46831
47396
  ref: containerRef,
46832
47397
  style: containerStyle,
@@ -46860,7 +47425,7 @@ var RichTextContainer = /* @__PURE__ */ (0, react_7.forwardRef)(function RichTex
46860
47425
  });
46861
47426
  }
46862
47427
  }
46863
- return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
47428
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
46864
47429
  ...rest,
46865
47430
  ref: containerRef,
46866
47431
  style: containerStyle,
@@ -47449,7 +48014,7 @@ function getSVGSize(svg) {
47449
48014
  var SVG = /* @__PURE__ */ (0, react_7.forwardRef)(function SVG2(props, forwardedRef) {
47450
48015
  const parentSize = useParentSize();
47451
48016
  const layoutId = useLayoutId2(props);
47452
- const layoutRef = react_11.default.useRef(null);
48017
+ const layoutRef = react_10.default.useRef(null);
47453
48018
  const ref = forwardedRef ?? layoutRef;
47454
48019
  const providedWindow = useProvidedWindow();
47455
48020
  useMeasureLayout(props, layoutRef);
@@ -47507,7 +48072,7 @@ function sizeSVG(container, props) {
47507
48072
  svg.setAttribute('height', '100%');
47508
48073
  }
47509
48074
  function SVGStyleSheet() {
47510
- react_11.default.useInsertionEffect(() => {
48075
+ react_10.default.useInsertionEffect(() => {
47511
48076
  injectComponentCSSRules();
47512
48077
  }, []);
47513
48078
  return null;
@@ -47517,7 +48082,7 @@ var SVGComponent = /* @__PURE__ */ (() => {
47517
48082
  return _a = class extends Layer {
47518
48083
  constructor() {
47519
48084
  super(...arguments);
47520
- (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'container', react_11.default.createRef());
48085
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'container', react_10.default.createRef());
47521
48086
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'svgElement', null);
47522
48087
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'setSVGElement', (element) => {
47523
48088
  this.svgElement = element;
@@ -47813,8 +48378,8 @@ var SVGComponent = /* @__PURE__ */ (() => {
47813
48378
  })();
47814
48379
  function useFontLoadStatus(fontSelectors = [], timeout = 5e3) {
47815
48380
  const missingFontSelectors = fontSelectors.filter((s) => !fontStore.isSelectorLoaded(s));
47816
- const [fontLoadStatus, setFontLoadStatus,] = react_11.default.useState(missingFontSelectors.length ? 'loading' : 'done');
47817
- react_11.default.useEffect(() => {
48381
+ const [fontLoadStatus, setFontLoadStatus,] = react_10.default.useState(missingFontSelectors.length ? 'loading' : 'done');
48382
+ react_10.default.useEffect(() => {
47818
48383
  if (!missingFontSelectors.length)
47819
48384
  return;
47820
48385
  setFontLoadStatus('loading');
@@ -47829,12 +48394,12 @@ function useFontLoadStatus(fontSelectors = [], timeout = 5e3) {
47829
48394
  return fontLoadStatus;
47830
48395
  }
47831
48396
  function TextStyleSheet() {
47832
- react_11.default.useInsertionEffect(() => {
48397
+ react_10.default.useInsertionEffect(() => {
47833
48398
  injectComponentCSSRules();
47834
48399
  }, []);
47835
48400
  return null;
47836
48401
  }
47837
- var Text2 = /* @__PURE__ */ react_11.default.forwardRef(function Text3(props, forwardedRef) {
48402
+ var Text2 = /* @__PURE__ */ react_10.default.forwardRef(function Text3(props, forwardedRef) {
47838
48403
  const parentSize = useParentSize();
47839
48404
  const layoutId = useLayoutId2(props);
47840
48405
  const fallbackLayoutRef = (0, react_4.useRef)(null);
@@ -47862,7 +48427,7 @@ var Text2 = /* @__PURE__ */ react_11.default.forwardRef(function Text3(props, fo
47862
48427
  });
47863
48428
  }, [fonts,]);
47864
48429
  const implicitPathVariables = useImplicitPathVariables();
47865
- const interceptPageLinks = react_11.default.useCallback((event) => {
48430
+ const interceptPageLinks = react_10.default.useCallback((event) => {
47866
48431
  const anchorElement = findAnchorElement(event.target, layoutRef.current);
47867
48432
  if (event.metaKey || !navigate || !anchorElement)
47868
48433
  return;
@@ -47878,7 +48443,7 @@ var Text2 = /* @__PURE__ */ react_11.default.forwardRef(function Text3(props, fo
47878
48443
  ref.addEventListener('click', interceptPageLinks);
47879
48444
  return () => ref.removeEventListener('click', interceptPageLinks);
47880
48445
  }, [interceptPageLinks,]);
47881
- const rawHTML = react_11.default.useMemo(() => {
48446
+ const rawHTML = react_10.default.useMemo(() => {
47882
48447
  if (!props.rawHTML || onCanvas || !getRoute || !currentRoute)
47883
48448
  return props.rawHTML;
47884
48449
  return replaceFramerPageLinks(props.rawHTML, getRoute, currentRoute, implicitPathVariables);
@@ -48471,8 +49036,8 @@ function getRadialGradientTransform(heightFactor, widthFactor, centerAnchorX, ce
48471
49036
  }
48472
49037
  var SVGRoot = (props) => {
48473
49038
  const { id: id3, children, left, width, height, top, style: style2, _needsMeasure, } = props;
48474
- const inCodeComponent = react_11.default.useContext(ComponentContainerContext);
48475
- const ref = react_11.default.useRef(null);
49039
+ const inCodeComponent = react_10.default.useContext(ComponentContainerContext);
49040
+ const ref = react_10.default.useRef(null);
48476
49041
  useMeasureLayout({
48477
49042
  id: id3,
48478
49043
  // SVGRoot won't be rendered if the node is invisible.
@@ -49199,10 +49764,13 @@ function initialRouteComponent(component) {
49199
49764
  function useInitialRouteComponent(routes, homeNodeId) {
49200
49765
  var _a;
49201
49766
  const InitialRouteComponent = (_a = routes[homeNodeId]) == null ? void 0 : _a.page;
49202
- const [RouteComponent, setRouteComponent,] = (0, react_4.useState)(initialRouteComponent(InitialRouteComponent));
49767
+ const [RouteComponent, setRouteComponent,] = (0, react_4.useState)(() => initialRouteComponent(InitialRouteComponent));
49203
49768
  (0, react_2.useEffect)(() => {
49204
49769
  if (withPreload(InitialRouteComponent)) {
49205
- void InitialRouteComponent.preload().then(setRouteComponent);
49770
+ void (async () => {
49771
+ await InitialRouteComponent.preload();
49772
+ setRouteComponent(InitialRouteComponent);
49773
+ })();
49206
49774
  }
49207
49775
  }, []);
49208
49776
  return RouteComponent;
@@ -49239,7 +49807,7 @@ var package_default = {
49239
49807
  '@types/dom-navigation': '^1.0.5',
49240
49808
  '@types/fontfaceobserver': '2.1',
49241
49809
  '@types/google.fonts': '1.0',
49242
- '@types/node': '22.17',
49810
+ '@types/node': '22.18',
49243
49811
  '@types/react': '18.2',
49244
49812
  '@types/react-dom': '18.2',
49245
49813
  '@types/yargs': '^17.0.33',
@@ -49253,7 +49821,6 @@ var package_default = {
49253
49821
  'jest-diff': '^29.3.1',
49254
49822
  'jest-environment-jsdom': '^29.3.1',
49255
49823
  'jest-environment-jsdom-global': '^4.0.0',
49256
- 'jest-junit': '^15.0.0',
49257
49824
  react: '^18.2.0',
49258
49825
  'react-dom': '^18.2.0',
49259
49826
  semver: '^7.7.1',
@@ -49261,7 +49828,7 @@ var package_default = {
49261
49828
  yargs: '^17.7.2',
49262
49829
  },
49263
49830
  peerDependencies: {
49264
- 'framer-motion': '>=12.14.0',
49831
+ 'framer-motion': '12.20.2',
49265
49832
  react: '^18.2.0',
49266
49833
  'react-dom': '^18.2.0',
49267
49834
  },