@frontify/fondue 13.7.6 → 13.7.8

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 (38) hide show
  1. package/dist/components/Accordion/Accordion.es.js +2 -2
  2. package/dist/components/Accordion/Accordion.es.js.map +1 -1
  3. package/dist/components/Button/Button.es.js +5 -5
  4. package/dist/components/Button/ButtonClasses.es.js +1 -1
  5. package/dist/components/FormControl/FormControl.es.js +2 -2
  6. package/dist/components/FrontifyPattern/FrontifyPattern.es.js +3 -3
  7. package/dist/components/Toast/Toast.es.js +1 -1
  8. package/dist/components/Tree/Tree.es.js +9 -9
  9. package/dist/components/Tree/TreeItem/TreeItemMultiselect.es.js +6 -6
  10. package/dist/components/Tree/helpers/reducer.es.js +3 -3
  11. package/dist/components/Tree/helpers/treeHandleKeyDown.es.js +6 -0
  12. package/dist/components/Tree/helpers/treeHandleKeyDown.es.js.map +1 -1
  13. package/dist/components/Tree/utils/keyboardCoordinates.es.js +4 -0
  14. package/dist/components/Tree/utils/keyboardCoordinates.es.js.map +1 -1
  15. package/dist/index.cjs.js +2 -2
  16. package/dist/index.cjs.js.map +1 -1
  17. package/dist/index.es.js +122 -122
  18. package/dist/index.umd.js +2 -2
  19. package/dist/index.umd.js.map +1 -1
  20. package/dist/node_modules/.pnpm/framer-motion@12.43.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.es.js +7 -7
  21. package/dist/node_modules/.pnpm/framer-motion@12.43.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.es.js.map +1 -1
  22. package/dist/node_modules/.pnpm/framer-motion@12.43.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.es.js +6 -6
  23. package/dist/node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/dist/es/projection/animation/mix-values.es.js +4 -4
  24. package/dist/node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/dist/es/utils/interpolate.es.js +8 -8
  25. package/dist/node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/dist/es/value/types/color/hsla.es.js +3 -3
  26. package/dist/node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/dist/es/value/types/color/rgba.es.js +3 -3
  27. package/dist/packages/charts/fondue-charts.umd.cjs +1 -1
  28. package/dist/packages/charts/style.css +1 -1
  29. package/dist/packages/components/fondue-components.umd.cjs +1 -1
  30. package/dist/packages/components/style.css +1 -1
  31. package/dist/packages/icons/fondue-icons.umd.cjs +1 -1
  32. package/dist/packages/rte/fondue-rte.umd.cjs +1 -1
  33. package/dist/packages/rte/style.css +1 -1
  34. package/dist/packages/tokens/fondue-tokens.umd.cjs +1 -1
  35. package/dist/style.css +1 -1
  36. package/dist/tools/codemod/index.js +1 -165
  37. package/dist/tools/internal/index.js +1 -165
  38. package/package.json +9 -9
@@ -14,10 +14,10 @@ import { addValueToWillChange as L } from "../../../../../../../motion-dom@12.43
14
14
  import { animateMotionValue as $ } from "../../../../../../../motion-dom@12.43.0/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.es.js";
15
15
  import { addDomEvent as q } from "../../../../../../../motion-dom@12.43.0/node_modules/motion-dom/dist/es/events/add-dom-event.es.js";
16
16
  import { setDragLock as G } from "../../../../../../../motion-dom@12.43.0/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.es.js";
17
+ import { resize as V } from "../../../../../../../motion-dom@12.43.0/node_modules/motion-dom/dist/es/resize/index.es.js";
17
18
  import { percent as H } from "../../../../../../../motion-dom@12.43.0/node_modules/motion-dom/dist/es/value/types/numbers/units.es.js";
18
19
  import { calcLength as J } from "../../../../../../../motion-dom@12.43.0/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.es.js";
19
- import { mixNumber as V } from "../../../../../../../motion-dom@12.43.0/node_modules/motion-dom/dist/es/utils/mix/number.es.js";
20
- import { resize as M } from "../../../../../../../motion-dom@12.43.0/node_modules/motion-dom/dist/es/resize/index.es.js";
20
+ import { mixNumber as M } from "../../../../../../../motion-dom@12.43.0/node_modules/motion-dom/dist/es/utils/mix/number.es.js";
21
21
  import { isElementTextInput as Q } from "../../../../../../../motion-dom@12.43.0/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.es.js";
22
22
  const X = /* @__PURE__ */ new WeakMap();
23
23
  class At {
@@ -188,7 +188,7 @@ class At {
188
188
  const { projection: i } = this.visualElement, o = this.getAxisMotionValue(s);
189
189
  if (i && i.layout) {
190
190
  const { min: e, max: a } = i.layout.layoutBox[s], u = o.get() || 0;
191
- o.set(t[s] - V(e, a, 0.5) + u);
191
+ o.set(t[s] - M(e, a, 0.5) + u);
192
192
  }
193
193
  });
194
194
  }
@@ -217,7 +217,7 @@ class At {
217
217
  if (!A(e, t, null))
218
218
  return;
219
219
  const a = this.getAxisMotionValue(e), { min: u, max: c } = this.constraints[e];
220
- a.set(V(u, c, i[e]));
220
+ a.set(M(u, c, i[e]));
221
221
  }), this.visualElement.render();
222
222
  }
223
223
  addListeners() {
@@ -234,12 +234,12 @@ class At {
234
234
  P(c) && c.current && (this.constraints = this.resolveRefConstraints(), n || (n = Y(t, c.current, () => this.scalePositionWithinConstraints())));
235
235
  }, { projection: o } = this.visualElement, e = o.addEventListener("measure", i);
236
236
  o && !o.layout && (o.root && o.root.updateScroll(), o.updateLayout()), C.read(i);
237
- const a = q(window, "resize", () => this.scalePositionWithinConstraints()), u = o.addEventListener("didUpdate", ({ delta: c, hasLayoutChanged: h }) => {
237
+ const a = q(window, "resize", () => this.scalePositionWithinConstraints()), u = o.addEventListener("didUpdate", (({ delta: c, hasLayoutChanged: h }) => {
238
238
  this.isDragging && h && (p((r) => {
239
239
  const l = this.getAxisMotionValue(r);
240
240
  l && (this.originPoint[r] += c[r].translate, l.set(l.get() + c[r].translate));
241
241
  }), this.visualElement.render());
242
- });
242
+ }));
243
243
  return () => {
244
244
  a(), s(), e(), u && u(), n && n();
245
245
  };
@@ -268,7 +268,7 @@ function S(m) {
268
268
  };
269
269
  }
270
270
  function Y(m, t, s) {
271
- const n = M(m, S(s)), i = M(t, S(s));
271
+ const n = V(m, S(s)), i = V(t, S(s));
272
272
  return () => {
273
273
  n(), i();
274
274
  };
@@ -1 +1 @@
1
- {"version":3,"file":"VisualElementDragControls.es.js","sources":["../../../../../../../../../../../../node_modules/.pnpm/framer-motion@12.43.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs"],"sourcesContent":["import { createBox, frame, eachAxis, measurePageBox, convertBoxToBoundingBox, convertBoundingBoxToBox, addValueToWillChange, animateMotionValue, mixNumber, addDomEvent, setDragLock, percent, calcLength, resize, isElementTextInput } from 'motion-dom';\nimport { invariant } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { PanSession } from '../pan/PanSession.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, rebaseAxisConstraints, calcViewportConstraints, calcOrigin, defaultElastic } from './utils/constraints.mjs';\n\nconst elementDragControls = new WeakMap();\nclass VisualElementDragControls {\n constructor(visualElement) {\n this.openDragLock = null;\n this.isDragging = false;\n this.currentDirection = null;\n this.originPoint = { x: 0, y: 0 };\n /**\n * The permitted boundaries of travel, in pixels.\n */\n this.constraints = false;\n this.hasMutatedConstraints = false;\n /**\n * The per-axis resolved elastic values.\n */\n this.elastic = createBox();\n /**\n * The latest pointer event. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n this.latestPointerEvent = null;\n /**\n * The latest pan info. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n this.latestPanInfo = null;\n this.visualElement = visualElement;\n }\n start(originEvent, { snapToCursor = false, distanceThreshold } = {}) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement;\n if (presenceContext && presenceContext.isPresent === false)\n return;\n const onSessionStart = (event) => {\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event).point);\n }\n this.stopAnimation();\n };\n const onStart = (event, info) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps();\n if (drag && !dragPropagation) {\n if (this.openDragLock)\n this.openDragLock();\n this.openDragLock = setDragLock(drag);\n // If we don 't have the lock, don't start dragging\n if (!this.openDragLock)\n return;\n }\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n this.isDragging = true;\n this.currentDirection = null;\n this.resolveConstraints();\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = true;\n this.visualElement.projection.target = undefined;\n }\n /**\n * Record gesture origin and pointer offset\n */\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0;\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n const { projection } = this.visualElement;\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis];\n if (measuredAxis) {\n const length = calcLength(measuredAxis);\n current = length * (parseFloat(current) / 100);\n }\n }\n }\n this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n if (onDragStart) {\n frame.update(() => onDragStart(event, info), false, true);\n }\n addValueToWillChange(this.visualElement, \"transform\");\n const { animationState } = this.visualElement;\n animationState && animationState.setActive(\"whileDrag\", true);\n };\n const onMove = (event, info) => {\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !this.openDragLock)\n return;\n const { offset } = info;\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && this.currentDirection === null) {\n this.currentDirection = getCurrentDirection(offset);\n // If we've successfully set a direction, notify listener\n if (this.currentDirection !== null) {\n onDirectionLock && onDirectionLock(this.currentDirection);\n }\n return;\n }\n // Update each point with the latest position\n this.updateAxis(\"x\", info.point, offset);\n this.updateAxis(\"y\", info.point, offset);\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n this.visualElement.render();\n /**\n * This must fire after the render call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n if (onDrag) {\n frame.update(() => onDrag(event, info), false, true);\n }\n };\n const onSessionEnd = (event, info) => {\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n this.stop(event, info);\n this.latestPointerEvent = null;\n this.latestPanInfo = null;\n };\n const resumeAnimation = () => {\n const { dragSnapToOrigin: snap } = this.getProps();\n if (snap || this.constraints) {\n this.startAnimation({ x: 0, y: 0 });\n }\n };\n const { dragSnapToOrigin } = this.getProps();\n this.panSession = new PanSession(originEvent, {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n resumeAnimation,\n }, {\n transformPagePoint: this.visualElement.getTransformPagePoint(),\n dragSnapToOrigin,\n distanceThreshold,\n contextWindow: getContextWindow(this.visualElement),\n element: this.visualElement.current,\n });\n }\n /**\n * @internal\n */\n stop(event, panInfo) {\n const finalEvent = event || this.latestPointerEvent;\n const finalPanInfo = panInfo || this.latestPanInfo;\n const isDragging = this.isDragging;\n this.cancel();\n if (!isDragging || !finalPanInfo || !finalEvent)\n return;\n const { velocity } = finalPanInfo;\n this.startAnimation(velocity);\n const { onDragEnd } = this.getProps();\n if (onDragEnd) {\n frame.postRender(() => onDragEnd(finalEvent, finalPanInfo));\n }\n }\n /**\n * @internal\n */\n cancel() {\n this.isDragging = false;\n const { projection, animationState } = this.visualElement;\n if (projection) {\n projection.isAnimationBlocked = false;\n }\n this.endPanSession();\n const { dragPropagation } = this.getProps();\n if (!dragPropagation && this.openDragLock) {\n this.openDragLock();\n this.openDragLock = null;\n }\n animationState && animationState.setActive(\"whileDrag\", false);\n }\n /**\n * Clean up the pan session without modifying other drag state.\n * This is used during unmount to ensure event listeners are removed\n * without affecting projection animations or drag locks.\n * @internal\n */\n endPanSession() {\n this.panSession && this.panSession.end();\n this.panSession = undefined;\n }\n updateAxis(axis, _point, offset) {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n const axisValue = this.getAxisMotionValue(axis);\n let next = this.originPoint[axis] + offset[axis];\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n }\n resolveConstraints() {\n const { dragConstraints, dragElastic } = this.getProps();\n const layout = this.visualElement.projection &&\n !this.visualElement.projection.layout\n ? this.visualElement.projection.measure(false)\n : this.visualElement.projection?.layout;\n const prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n }\n else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints);\n }\n else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative. This only applies to relative (non-ref)\n * constraints, as ref-based constraints from calcViewportConstraints are already in the\n * correct coordinate space for the motion value transform offset.\n */\n if (prevConstraints !== this.constraints &&\n !isRefObject(dragConstraints) &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints) {\n eachAxis((axis) => {\n if (this.constraints !== false &&\n this.getAxisMotionValue(axis)) {\n this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);\n }\n });\n }\n }\n resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();\n if (!constraints || !isRefObject(constraints))\n return false;\n const constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\", \"drag-constraints-ref\");\n const { projection } = this.visualElement;\n // TODO\n if (!projection || !projection.layout)\n return false;\n /**\n * Refresh the root scroll offset so the constraint's viewport box\n * translates to correct page coordinates. The scroll captured at\n * drag mount can be stale if the document was scrolled afterwards —\n * e.g. via the browser restoring scroll on refresh, or an ancestor\n * layout effect running after this element's mount (#2829).\n *\n * Clear the cached scroll first so `updateScroll` bypasses its\n * per-animationId cache and re-reads the live value.\n */\n if (projection.root) {\n projection.root.scroll = undefined;\n projection.root.updateScroll();\n }\n const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n }\n startAnimation(velocity) {\n const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();\n const constraints = this.constraints || {};\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag, this.currentDirection)) {\n return;\n }\n let transition = (constraints && constraints[axis]) || {};\n if (dragSnapToOrigin === true ||\n dragSnapToOrigin === axis)\n transition = { min: 0, max: 0 };\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n const bounceStiffness = dragElastic ? 200 : 1000000;\n const bounceDamping = dragElastic ? 40 : 10000000;\n const inertia = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition,\n };\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return this.startAxisValueAnimation(axis, inertia);\n });\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n }\n startAxisValueAnimation(axis, transition) {\n const axisValue = this.getAxisMotionValue(axis);\n addValueToWillChange(this.visualElement, axis);\n return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false));\n }\n stopAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).stop());\n }\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n getAxisMotionValue(axis) {\n const dragKey = `_drag${axis.toUpperCase()}`;\n const props = this.visualElement.getProps();\n const externalMotionValue = props[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, this.visualElement.latestValues[axis] ?? 0);\n }\n snapToCursor(point) {\n eachAxis((axis) => {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, this.currentDirection))\n return;\n const { projection } = this.visualElement;\n const axisValue = this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis];\n /**\n * The layout measurement includes the current transform value,\n * so we need to add it back to get the correct snap position.\n * This fixes an issue where elements with initial coordinates\n * would snap to the wrong position on the first drag.\n */\n const current = axisValue.get() || 0;\n axisValue.set(point[axis] - mixNumber(min, max, 0.5) + current);\n }\n });\n }\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n scalePositionWithinConstraints() {\n if (!this.visualElement.current)\n return;\n const { drag, dragConstraints } = this.getProps();\n const { projection } = this.visualElement;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation();\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n const boxProgress = { x: 0, y: 0 };\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis);\n if (axisValue && this.constraints !== false) {\n const latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);\n }\n });\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n const { transformTemplate } = this.visualElement.getProps();\n this.visualElement.current.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n /**\n * Reset constraints so resolveConstraints() will recalculate them\n * with the freshly measured layout rather than returning the cached value.\n */\n this.constraints = false;\n this.resolveConstraints();\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis((axis) => {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n const axisValue = this.getAxisMotionValue(axis);\n const { min, max } = this.constraints[axis];\n axisValue.set(mixNumber(min, max, boxProgress[axis]));\n });\n /**\n * Flush the updated transform to the DOM synchronously to prevent\n * a visual flash at the element's CSS layout position (0,0) when\n * the transform was stripped for measurement.\n */\n this.visualElement.render();\n }\n addListeners() {\n if (!this.visualElement.current)\n return;\n elementDragControls.set(this.visualElement, this);\n const element = this.visualElement.current;\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n const stopPointerListener = addPointerEvent(element, \"pointerdown\", (event) => {\n const { drag, dragListener = true } = this.getProps();\n const target = event.target;\n /**\n * Only block drag if clicking on a text input child element\n * (input, textarea, select, contenteditable) where users might\n * want to select text or interact with the control.\n *\n * Buttons and links don't block drag since they don't have\n * click-and-move actions of their own.\n */\n const isClickingTextInputChild = target !== element && isElementTextInput(target);\n if (drag && dragListener && !isClickingTextInputChild) {\n this.start(event);\n }\n });\n /**\n * If using ref-based constraints, observe both the draggable element\n * and the constraint container for size changes via ResizeObserver.\n * Setup is deferred because dragConstraints.current is null when\n * addListeners first runs (React hasn't committed the ref yet).\n */\n let stopResizeObservers;\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps();\n if (isRefObject(dragConstraints) && dragConstraints.current) {\n this.constraints = this.resolveRefConstraints();\n if (!stopResizeObservers) {\n stopResizeObservers = startResizeObservers(element, dragConstraints.current, () => this.scalePositionWithinConstraints());\n }\n }\n };\n const { projection } = this.visualElement;\n const stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n }\n frame.read(measureDragConstraints);\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n const stopResizeListener = addDomEvent(window, \"resize\", () => this.scalePositionWithinConstraints());\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n const stopLayoutUpdateListener = projection.addEventListener(\"didUpdate\", (({ delta, hasLayoutChanged }) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const motionValue = this.getAxisMotionValue(axis);\n if (!motionValue)\n return;\n this.originPoint[axis] += delta[axis].translate;\n motionValue.set(motionValue.get() + delta[axis].translate);\n });\n this.visualElement.render();\n }\n }));\n return () => {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n stopLayoutUpdateListener && stopLayoutUpdateListener();\n stopResizeObservers && stopResizeObservers();\n };\n }\n getProps() {\n const props = this.visualElement.getProps();\n const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;\n return {\n ...props,\n drag,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum,\n };\n }\n}\nfunction skipFirstCall(callback) {\n let isFirst = true;\n return () => {\n if (isFirst) {\n isFirst = false;\n return;\n }\n callback();\n };\n}\nfunction startResizeObservers(element, constraintsElement, onResize) {\n const stopElement = resize(element, skipFirstCall(onResize));\n const stopContainer = resize(constraintsElement, skipFirstCall(onResize));\n return () => {\n stopElement();\n stopContainer();\n };\n}\nfunction shouldDrag(direction, drag, currentDirection) {\n return ((drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold = 10) {\n let direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n }\n else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };\n//# sourceMappingURL=VisualElementDragControls.mjs.map\n"],"names":["elementDragControls","VisualElementDragControls","visualElement","createBox","originEvent","snapToCursor","distanceThreshold","presenceContext","onSessionStart","event","extractEventInfo","onStart","info","drag","dragPropagation","onDragStart","setDragLock","eachAxis","axis","current","percent","projection","measuredAxis","calcLength","frame","addValueToWillChange","animationState","onMove","dragDirectionLock","onDirectionLock","onDrag","offset","getCurrentDirection","onSessionEnd","resumeAnimation","snap","dragSnapToOrigin","PanSession","getContextWindow","panInfo","finalEvent","finalPanInfo","isDragging","velocity","onDragEnd","_point","shouldDrag","axisValue","next","applyConstraints","dragConstraints","dragElastic","layout","_a","prevConstraints","isRefObject","calcRelativeConstraints","resolveDragElastic","rebaseAxisConstraints","constraints","onMeasureDragConstraints","constraintsElement","invariant","constraintsBox","measurePageBox","measuredConstraints","calcViewportConstraints","userConstraints","convertBoxToBoundingBox","convertBoundingBoxToBox","dragMomentum","dragTransition","onDragTransitionEnd","momentumAnimations","transition","bounceStiffness","bounceDamping","inertia","animateMotionValue","dragKey","externalMotionValue","point","min","max","mixNumber","boxProgress","latest","calcOrigin","transformTemplate","element","stopPointerListener","addPointerEvent","dragListener","target","isClickingTextInputChild","isElementTextInput","stopResizeObservers","measureDragConstraints","startResizeObservers","stopMeasureLayoutListener","stopResizeListener","addDomEvent","stopLayoutUpdateListener","delta","hasLayoutChanged","motionValue","props","defaultElastic","skipFirstCall","callback","isFirst","onResize","stopElement","resize","stopContainer","direction","currentDirection","lockThreshold"],"mappings":";;;;;;;;;;;;;;;;;;;;;AASK,MAACA,IAAsB,oBAAI,QAAO;AACvC,MAAMC,GAA0B;AAAA,EAC5B,YAAYC,GAAe;AACvB,SAAK,eAAe,MACpB,KAAK,aAAa,IAClB,KAAK,mBAAmB,MACxB,KAAK,cAAc,EAAE,GAAG,GAAG,GAAG,EAAC,GAI/B,KAAK,cAAc,IACnB,KAAK,wBAAwB,IAI7B,KAAK,UAAUC,EAAS,GAIxB,KAAK,qBAAqB,MAI1B,KAAK,gBAAgB,MACrB,KAAK,gBAAgBD;AAAA,EACzB;AAAA,EACA,MAAME,GAAa,EAAE,cAAAC,IAAe,IAAO,mBAAAC,EAAiB,IAAK,IAAI;AAIjE,UAAM,EAAE,iBAAAC,MAAoB,KAAK;AACjC,QAAIA,KAAmBA,EAAgB,cAAc;AACjD;AACJ,UAAMC,IAAiB,CAACC,MAAU;AAC9B,MAAIJ,KACA,KAAK,aAAaK,EAAiBD,CAAK,EAAE,KAAK,GAEnD,KAAK,cAAa;AAAA,IACtB,GACME,IAAU,CAACF,GAAOG,MAAS;AAE7B,YAAM,EAAE,MAAAC,GAAM,iBAAAC,GAAiB,aAAAC,EAAW,IAAK,KAAK,SAAQ;AAC5D,UAAIF,KAAQ,CAACC,MACL,KAAK,gBACL,KAAK,aAAY,GACrB,KAAK,eAAeE,EAAYH,CAAI,GAEhC,CAAC,KAAK;AACN;AAER,WAAK,qBAAqBJ,GAC1B,KAAK,gBAAgBG,GACrB,KAAK,aAAa,IAClB,KAAK,mBAAmB,MACxB,KAAK,mBAAkB,GACnB,KAAK,cAAc,eACnB,K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CAAQ,CAAC,GACrDG,IAAgBD,EAAOpD,GAAoB+C,EAAcG,CAAQ,CAAC;AACxE,SAAO,MAAM;AACT,IAAAC,EAAW,GACXE,EAAa;AAAA,EACjB;AACJ;AACA,SAASpE,EAAWqE,GAAWtG,GAAMuG,GAAkB;AACnD,UAASvG,MAAS,MAAQA,MAASsG,OAC9BC,MAAqB,QAAQA,MAAqBD;AAC3D;AAQA,SAASnF,EAAoBD,GAAQsF,IAAgB,IAAI;AACrD,MAAIF,IAAY;AAChB,SAAI,KAAK,IAAIpF,EAAO,CAAC,IAAIsF,IACrBF,IAAY,MAEP,KAAK,IAAIpF,EAAO,CAAC,IAAIsF,MAC1BF,IAAY,MAETA;AACX;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"VisualElementDragControls.es.js","sources":["../../../../../../../../../../../../node_modules/.pnpm/framer-motion@12.43.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs"],"sourcesContent":["import { createBox, frame, eachAxis, measurePageBox, convertBoxToBoundingBox, convertBoundingBoxToBox, addValueToWillChange, animateMotionValue, mixNumber, addDomEvent, setDragLock, percent, calcLength, resize, isElementTextInput } from 'motion-dom';\nimport { invariant } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { PanSession } from '../pan/PanSession.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, rebaseAxisConstraints, calcViewportConstraints, calcOrigin, defaultElastic } from './utils/constraints.mjs';\n\nconst elementDragControls = new WeakMap();\nclass VisualElementDragControls {\n constructor(visualElement) {\n this.openDragLock = null;\n this.isDragging = false;\n this.currentDirection = null;\n this.originPoint = { x: 0, y: 0 };\n /**\n * The permitted boundaries of travel, in pixels.\n */\n this.constraints = false;\n this.hasMutatedConstraints = false;\n /**\n * The per-axis resolved elastic values.\n */\n this.elastic = createBox();\n /**\n * The latest pointer event. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n this.latestPointerEvent = null;\n /**\n * The latest pan info. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n this.latestPanInfo = null;\n this.visualElement = visualElement;\n }\n start(originEvent, { snapToCursor = false, distanceThreshold } = {}) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement;\n if (presenceContext && presenceContext.isPresent === false)\n return;\n const onSessionStart = (event) => {\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event).point);\n }\n this.stopAnimation();\n };\n const onStart = (event, info) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps();\n if (drag && !dragPropagation) {\n if (this.openDragLock)\n this.openDragLock();\n this.openDragLock = setDragLock(drag);\n // If we don 't have the lock, don't start dragging\n if (!this.openDragLock)\n return;\n }\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n this.isDragging = true;\n this.currentDirection = null;\n this.resolveConstraints();\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = true;\n this.visualElement.projection.target = undefined;\n }\n /**\n * Record gesture origin and pointer offset\n */\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0;\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n const { projection } = this.visualElement;\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis];\n if (measuredAxis) {\n const length = calcLength(measuredAxis);\n current = length * (parseFloat(current) / 100);\n }\n }\n }\n this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n if (onDragStart) {\n frame.update(() => onDragStart(event, info), false, true);\n }\n addValueToWillChange(this.visualElement, \"transform\");\n const { animationState } = this.visualElement;\n animationState && animationState.setActive(\"whileDrag\", true);\n };\n const onMove = (event, info) => {\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !this.openDragLock)\n return;\n const { offset } = info;\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && this.currentDirection === null) {\n this.currentDirection = getCurrentDirection(offset);\n // If we've successfully set a direction, notify listener\n if (this.currentDirection !== null) {\n onDirectionLock && onDirectionLock(this.currentDirection);\n }\n return;\n }\n // Update each point with the latest position\n this.updateAxis(\"x\", info.point, offset);\n this.updateAxis(\"y\", info.point, offset);\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n this.visualElement.render();\n /**\n * This must fire after the render call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n if (onDrag) {\n frame.update(() => onDrag(event, info), false, true);\n }\n };\n const onSessionEnd = (event, info) => {\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n this.stop(event, info);\n this.latestPointerEvent = null;\n this.latestPanInfo = null;\n };\n const resumeAnimation = () => {\n const { dragSnapToOrigin: snap } = this.getProps();\n if (snap || this.constraints) {\n this.startAnimation({ x: 0, y: 0 });\n }\n };\n const { dragSnapToOrigin } = this.getProps();\n this.panSession = new PanSession(originEvent, {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n resumeAnimation,\n }, {\n transformPagePoint: this.visualElement.getTransformPagePoint(),\n dragSnapToOrigin,\n distanceThreshold,\n contextWindow: getContextWindow(this.visualElement),\n element: this.visualElement.current,\n });\n }\n /**\n * @internal\n */\n stop(event, panInfo) {\n const finalEvent = event || this.latestPointerEvent;\n const finalPanInfo = panInfo || this.latestPanInfo;\n const isDragging = this.isDragging;\n this.cancel();\n if (!isDragging || !finalPanInfo || !finalEvent)\n return;\n const { velocity } = finalPanInfo;\n this.startAnimation(velocity);\n const { onDragEnd } = this.getProps();\n if (onDragEnd) {\n frame.postRender(() => onDragEnd(finalEvent, finalPanInfo));\n }\n }\n /**\n * @internal\n */\n cancel() {\n this.isDragging = false;\n const { projection, animationState } = this.visualElement;\n if (projection) {\n projection.isAnimationBlocked = false;\n }\n this.endPanSession();\n const { dragPropagation } = this.getProps();\n if (!dragPropagation && this.openDragLock) {\n this.openDragLock();\n this.openDragLock = null;\n }\n animationState && animationState.setActive(\"whileDrag\", false);\n }\n /**\n * Clean up the pan session without modifying other drag state.\n * This is used during unmount to ensure event listeners are removed\n * without affecting projection animations or drag locks.\n * @internal\n */\n endPanSession() {\n this.panSession && this.panSession.end();\n this.panSession = undefined;\n }\n updateAxis(axis, _point, offset) {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n const axisValue = this.getAxisMotionValue(axis);\n let next = this.originPoint[axis] + offset[axis];\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n }\n resolveConstraints() {\n const { dragConstraints, dragElastic } = this.getProps();\n const layout = this.visualElement.projection &&\n !this.visualElement.projection.layout\n ? this.visualElement.projection.measure(false)\n : this.visualElement.projection?.layout;\n const prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n }\n else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints);\n }\n else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative. This only applies to relative (non-ref)\n * constraints, as ref-based constraints from calcViewportConstraints are already in the\n * correct coordinate space for the motion value transform offset.\n */\n if (prevConstraints !== this.constraints &&\n !isRefObject(dragConstraints) &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints) {\n eachAxis((axis) => {\n if (this.constraints !== false &&\n this.getAxisMotionValue(axis)) {\n this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);\n }\n });\n }\n }\n resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();\n if (!constraints || !isRefObject(constraints))\n return false;\n const constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\", \"drag-constraints-ref\");\n const { projection } = this.visualElement;\n // TODO\n if (!projection || !projection.layout)\n return false;\n /**\n * Refresh the root scroll offset so the constraint's viewport box\n * translates to correct page coordinates. The scroll captured at\n * drag mount can be stale if the document was scrolled afterwards —\n * e.g. via the browser restoring scroll on refresh, or an ancestor\n * layout effect running after this element's mount (#2829).\n *\n * Clear the cached scroll first so `updateScroll` bypasses its\n * per-animationId cache and re-reads the live value.\n */\n if (projection.root) {\n projection.root.scroll = undefined;\n projection.root.updateScroll();\n }\n const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n }\n startAnimation(velocity) {\n const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();\n const constraints = this.constraints || {};\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag, this.currentDirection)) {\n return;\n }\n let transition = (constraints && constraints[axis]) || {};\n if (dragSnapToOrigin === true ||\n dragSnapToOrigin === axis)\n transition = { min: 0, max: 0 };\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n const bounceStiffness = dragElastic ? 200 : 1000000;\n const bounceDamping = dragElastic ? 40 : 10000000;\n const inertia = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition,\n };\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return this.startAxisValueAnimation(axis, inertia);\n });\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n }\n startAxisValueAnimation(axis, transition) {\n const axisValue = this.getAxisMotionValue(axis);\n addValueToWillChange(this.visualElement, axis);\n return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false));\n }\n stopAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).stop());\n }\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n getAxisMotionValue(axis) {\n const dragKey = `_drag${axis.toUpperCase()}`;\n const props = this.visualElement.getProps();\n const externalMotionValue = props[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, this.visualElement.latestValues[axis] ?? 0);\n }\n snapToCursor(point) {\n eachAxis((axis) => {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, this.currentDirection))\n return;\n const { projection } = this.visualElement;\n const axisValue = this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis];\n /**\n * The layout measurement includes the current transform value,\n * so we need to add it back to get the correct snap position.\n * This fixes an issue where elements with initial coordinates\n * would snap to the wrong position on the first drag.\n */\n const current = axisValue.get() || 0;\n axisValue.set(point[axis] - mixNumber(min, max, 0.5) + current);\n }\n });\n }\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n scalePositionWithinConstraints() {\n if (!this.visualElement.current)\n return;\n const { drag, dragConstraints } = this.getProps();\n const { projection } = this.visualElement;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation();\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n const boxProgress = { x: 0, y: 0 };\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis);\n if (axisValue && this.constraints !== false) {\n const latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);\n }\n });\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n const { transformTemplate } = this.visualElement.getProps();\n this.visualElement.current.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n /**\n * Reset constraints so resolveConstraints() will recalculate them\n * with the freshly measured layout rather than returning the cached value.\n */\n this.constraints = false;\n this.resolveConstraints();\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis((axis) => {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n const axisValue = this.getAxisMotionValue(axis);\n const { min, max } = this.constraints[axis];\n axisValue.set(mixNumber(min, max, boxProgress[axis]));\n });\n /**\n * Flush the updated transform to the DOM synchronously to prevent\n * a visual flash at the element's CSS layout position (0,0) when\n * the transform was stripped for measurement.\n */\n this.visualElement.render();\n }\n addListeners() {\n if (!this.visualElement.current)\n return;\n elementDragControls.set(this.visualElement, this);\n const element = this.visualElement.current;\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n const stopPointerListener = addPointerEvent(element, \"pointerdown\", (event) => {\n const { drag, dragListener = true } = this.getProps();\n const target = event.target;\n /**\n * Only block drag if clicking on a text input child element\n * (input, textarea, select, contenteditable) where users might\n * want to select text or interact with the control.\n *\n * Buttons and links don't block drag since they don't have\n * click-and-move actions of their own.\n */\n const isClickingTextInputChild = target !== element && isElementTextInput(target);\n if (drag && dragListener && !isClickingTextInputChild) {\n this.start(event);\n }\n });\n /**\n * If using ref-based constraints, observe both the draggable element\n * and the constraint container for size changes via ResizeObserver.\n * Setup is deferred because dragConstraints.current is null when\n * addListeners first runs (React hasn't committed the ref yet).\n */\n let stopResizeObservers;\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps();\n if (isRefObject(dragConstraints) && dragConstraints.current) {\n this.constraints = this.resolveRefConstraints();\n if (!stopResizeObservers) {\n stopResizeObservers = startResizeObservers(element, dragConstraints.current, () => this.scalePositionWithinConstraints());\n }\n }\n };\n const { projection } = this.visualElement;\n const stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n }\n frame.read(measureDragConstraints);\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n const stopResizeListener = addDomEvent(window, \"resize\", () => this.scalePositionWithinConstraints());\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n const stopLayoutUpdateListener = projection.addEventListener(\"didUpdate\", (({ delta, hasLayoutChanged }) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const motionValue = this.getAxisMotionValue(axis);\n if (!motionValue)\n return;\n this.originPoint[axis] += delta[axis].translate;\n motionValue.set(motionValue.get() + delta[axis].translate);\n });\n this.visualElement.render();\n }\n }));\n return () => {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n stopLayoutUpdateListener && stopLayoutUpdateListener();\n stopResizeObservers && stopResizeObservers();\n };\n }\n getProps() {\n const props = this.visualElement.getProps();\n const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;\n return {\n ...props,\n drag,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum,\n };\n }\n}\nfunction skipFirstCall(callback) {\n let isFirst = true;\n return () => {\n if (isFirst) {\n isFirst = false;\n return;\n }\n callback();\n };\n}\nfunction startResizeObservers(element, constraintsElement, onResize) {\n const stopElement = resize(element, skipFirstCall(onResize));\n const stopContainer = resize(constraintsElement, skipFirstCall(onResize));\n return () => {\n stopElement();\n stopContainer();\n };\n}\nfunction shouldDrag(direction, drag, currentDirection) {\n return ((drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold = 10) {\n let direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n }\n else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };\n//# sourceMappingURL=VisualElementDragControls.mjs.map\n"],"names":["elementDragControls","VisualElementDragControls","visualElement","createBox","originEvent","snapToCursor","distanceThreshold","presenceContext","onSessionStart","event","extractEventInfo","onStart","info","drag","dragPropagation","onDragStart","setDragLock","eachAxis","axis","current","percent","projection","measuredAxis","calcLength","frame","addValueToWillChange","animationState","onMove","dragDirectionLock","onDirectionLock","onDrag","offset","getCurrentDirection","onSessionEnd","resumeAnimation","snap","dragSnapToOrigin","PanSession","getContextWindow","panInfo","finalEvent","finalPanInfo","isDragging","velocity","onDragEnd","_point","shouldDrag","axisValue","next","applyConstraints","dragConstraints","dragElastic","layout","_a","prevConstraints","isRefObject","calcRelativeConstraints","resolveDragElastic","rebaseAxisConstraints","constraints","onMeasureDragConstraints","constraintsElement","invariant","constraintsBox","measurePageBox","measuredConstraints","calcViewportConstraints","userConstraints","convertBoxToBoundingBox","convertBoundingBoxToBox","dragMomentum","dragTransition","onDragTransitionEnd","momentumAnimations","transition","bounceStiffness","bounceDamping","inertia","animateMotionValue","dragKey","externalMotionValue","point","min","max","mixNumber","boxProgress","latest","calcOrigin","transformTemplate","element","stopPointerListener","addPointerEvent","dragListener","target","isClickingTextInputChild","isElementTextInput","stopResizeObservers","measureDragConstraints","startResizeObservers","stopMeasureLayoutListener","stopResizeListener","addDomEvent","stopLayoutUpdateListener","delta","hasLayoutChanged","motionValue","props","defaultElastic","skipFirstCall","callback","isFirst","onResize","stopElement","resize","stopContainer","direction","currentDirection","lockThreshold"],"mappings":";;;;;;;;;;;;;;;;;;;;;AASK,MAACA,IAAsB,oBAAI,QAAO;AACvC,MAAMC,GAA0B;AAAA,EAC5B,YAAYC,GAAe;AACvB,SAAK,eAAe,MACpB,KAAK,aAAa,IAClB,KAAK,mBAAmB,MACxB,KAAK,cAAc,EAAE,GAAG,GAAG,GAAG,EAAC,GAI/B,KAAK,cAAc,IACnB,KAAK,wBAAwB,IAI7B,KAAK,UAAUC,EAAS,GAIxB,KAAK,qBAAqB,MAI1B,KAAK,gBAAgB,MACrB,KAAK,gBAAgBD;AAAA,EACzB;AAAA,EACA,MAAME,GAAa,EAAE,cAAAC,IAAe,IAAO,mBAAAC,EAAiB,IAAK,IAAI;AAIjE,UAAM,EAAE,iBAAAC,MAAoB,KAAK;AACjC,QAAIA,KAAmBA,EAAgB,cAAc;AACjD;AACJ,UAAMC,IAAiB,CAACC,MAAU;AAC9B,MAAIJ,KACA,KAAK,aAAaK,EAAiBD,CAAK,EAAE,KAAK,GAEnD,KAAK,cAAa;AAAA,IACtB,GACME,IAAU,CAACF,GAAOG,MAAS;AAE7B,YAAM,EAAE,MAAAC,GAAM,iBAAAC,GAAiB,aAAAC,EAAW,IAAK,KAAK,SAAQ;AAC5D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,SAASsC,EAAcC,GAAU;AAC7B,MAAIC,IAAU;AACd,SAAO,MAAM;AACT,QAAIA,GAAS;AACT,MAAAA,IAAU;AACV;AAAA,IACJ;AACA,IAAAD,EAAQ;AAAA,EACZ;AACJ;AACA,SAASX,EAAqBT,GAAS5B,GAAoBkD,GAAU;AACjE,QAAMC,IAAcC,EAAOxB,GAASmB,EAAcG,CAAQ,CAAC,GACrDG,IAAgBD,EAAOpD,GAAoB+C,EAAcG,CAAQ,CAAC;AACxE,SAAO,MAAM;AACT,IAAAC,EAAW,GACXE,EAAa;AAAA,EACjB;AACJ;AACA,SAASpE,EAAWqE,GAAWtG,GAAMuG,GAAkB;AACnD,UAASvG,MAAS,MAAQA,MAASsG,OAC9BC,MAAqB,QAAQA,MAAqBD;AAC3D;AAQA,SAASnF,EAAoBD,GAAQsF,IAAgB,IAAI;AACrD,MAAIF,IAAY;AAChB,SAAI,KAAK,IAAIpF,EAAO,CAAC,IAAIsF,IACrBF,IAAY,MAEP,KAAK,IAAIpF,EAAO,CAAC,IAAIsF,MAC1BF,IAAY,MAETA;AACX;","x_google_ignoreList":[0]}
@@ -3,9 +3,9 @@ import { useContext as u, Component as l } from "react";
3
3
  import { usePresence as c } from "../../../components/AnimatePresence/use-presence.es.js";
4
4
  import { LayoutGroupContext as f } from "../../../context/LayoutGroupContext.es.js";
5
5
  import { SwitchLayoutGroupContext as d } from "../../../context/SwitchLayoutGroupContext.es.js";
6
- import { globalProjectionState as h } from "../../../../../../../../motion-dom@12.43.0/node_modules/motion-dom/dist/es/projection/node/state.es.js";
7
- import { frame as y } from "../../../../../../../../motion-dom@12.43.0/node_modules/motion-dom/dist/es/frameloop/frame.es.js";
8
- import { microtask as g } from "../../../../../../../../motion-dom@12.43.0/node_modules/motion-dom/dist/es/frameloop/microtask.es.js";
6
+ import { frame as h } from "../../../../../../../../motion-dom@12.43.0/node_modules/motion-dom/dist/es/frameloop/frame.es.js";
7
+ import { microtask as y } from "../../../../../../../../motion-dom@12.43.0/node_modules/motion-dom/dist/es/frameloop/microtask.es.js";
8
+ import { globalProjectionState as g } from "../../../../../../../../motion-dom@12.43.0/node_modules/motion-dom/dist/es/projection/node/state.es.js";
9
9
  let i = !1;
10
10
  class v extends l {
11
11
  /**
@@ -21,21 +21,21 @@ class v extends l {
21
21
  ...n.options,
22
22
  layoutDependency: this.props.layoutDependency,
23
23
  onExitComplete: () => this.safeToRemove()
24
- })), h.hasEverUpdated = !0;
24
+ })), g.hasEverUpdated = !0;
25
25
  }
26
26
  getSnapshotBeforeUpdate(t) {
27
27
  const { layoutDependency: o, visualElement: e, drag: s, isPresent: n } = this.props, { projection: r } = e;
28
28
  return r && (r.isPresent = n, t.layoutDependency !== o && r.setOptions({
29
29
  ...r.options,
30
30
  layoutDependency: o
31
- }), i = !0, s || t.layoutDependency !== o || o === void 0 || t.isPresent !== n ? r.willUpdate() : this.safeToRemove(), t.isPresent !== n && (n ? r.promote() : r.relegate() || y.postRender(() => {
31
+ }), i = !0, s || t.layoutDependency !== o || o === void 0 || t.isPresent !== n ? r.willUpdate() : this.safeToRemove(), t.isPresent !== n && (n ? r.promote() : r.relegate() || h.postRender(() => {
32
32
  const p = r.getStack();
33
33
  (!p || !p.members.length) && this.safeToRemove();
34
34
  }))), null;
35
35
  }
36
36
  componentDidUpdate() {
37
37
  const { visualElement: t, layoutAnchor: o } = this.props, { projection: e } = t;
38
- e && (e.options.layoutAnchor = o, e.root.didUpdate(), g.postRender(() => {
38
+ e && (e.options.layoutAnchor = o, e.root.didUpdate(), y.postRender(() => {
39
39
  !e.currentAnimation && e.isLead() && this.safeToRemove();
40
40
  }));
41
41
  }
@@ -1,9 +1,9 @@
1
1
  import { mixNumber as s } from "../../utils/mix/number.es.js";
2
- import { px as R, percent as u } from "../../value/types/numbers/units.es.js";
2
+ import { percent as u, px as R } from "../../value/types/numbers/units.es.js";
3
3
  import { cornerRadiusProps as d } from "../../utils/border-radius.es.js";
4
4
  import { progress as M } from "../../../../../../../motion-utils@12.39.0/node_modules/motion-utils/dist/es/progress.es.js";
5
- import { noop as h } from "../../../../../../../motion-utils@12.39.0/node_modules/motion-utils/dist/es/noop.es.js";
6
- import { circOut as C } from "../../../../../../../motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/circ.es.js";
5
+ import { circOut as h } from "../../../../../../../motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/circ.es.js";
6
+ import { noop as C } from "../../../../../../../motion-utils@12.39.0/node_modules/motion-utils/dist/es/noop.es.js";
7
7
  const O = d.length, m = (t) => typeof t == "string" ? parseFloat(t) : t, p = (t) => typeof t == "number" || R.test(t);
8
8
  function k(t, o, r, i, x, b) {
9
9
  x ? (t.opacity = s(0, r.opacity ?? 1, P(i)), t.opacityExit = s(o.opacity ?? 1, 0, B(i))) : b && (t.opacity = s(o.opacity ?? 1, r.opacity ?? 1, i));
@@ -19,7 +19,7 @@ function k(t, o, r, i, x, b) {
19
19
  function a(t, o) {
20
20
  return t[o] !== void 0 ? t[o] : t.borderRadius;
21
21
  }
22
- const P = /* @__PURE__ */ y(0, 0.5, C), B = /* @__PURE__ */ y(0.5, 0.95, h);
22
+ const P = /* @__PURE__ */ y(0, 0.5, h), B = /* @__PURE__ */ y(0.5, 0.95, C);
23
23
  function y(t, o, r) {
24
24
  return (i) => i < t ? 0 : i > o ? 1 : r(M(t, o, i));
25
25
  }
@@ -1,17 +1,17 @@
1
1
  import { mix as h } from "./mix/index.es.js";
2
2
  import { invariant as x } from "../../../../../../motion-utils@12.39.0/node_modules/motion-utils/dist/es/errors.es.js";
3
3
  import { clamp as M } from "../../../../../../motion-utils@12.39.0/node_modules/motion-utils/dist/es/clamp.es.js";
4
- import { MotionGlobalConfig as b } from "../../../../../../motion-utils@12.39.0/node_modules/motion-utils/dist/es/global-config.es.js";
5
- import { noop as y } from "../../../../../../motion-utils@12.39.0/node_modules/motion-utils/dist/es/noop.es.js";
6
- import { pipe as A } from "../../../../../../motion-utils@12.39.0/node_modules/motion-utils/dist/es/pipe.es.js";
7
- import { progress as F } from "../../../../../../motion-utils@12.39.0/node_modules/motion-utils/dist/es/progress.es.js";
4
+ import { noop as b } from "../../../../../../motion-utils@12.39.0/node_modules/motion-utils/dist/es/noop.es.js";
5
+ import { pipe as y } from "../../../../../../motion-utils@12.39.0/node_modules/motion-utils/dist/es/pipe.es.js";
6
+ import { progress as A } from "../../../../../../motion-utils@12.39.0/node_modules/motion-utils/dist/es/progress.es.js";
7
+ import { MotionGlobalConfig as F } from "../../../../../../motion-utils@12.39.0/node_modules/motion-utils/dist/es/global-config.es.js";
8
8
  function R(r, e, f) {
9
- const t = [], a = f || b.mix || h, n = r.length - 1;
9
+ const t = [], a = f || F.mix || h, n = r.length - 1;
10
10
  for (let o = 0; o < n; o++) {
11
11
  let i = a(r[o], r[o + 1]);
12
12
  if (e) {
13
- const c = Array.isArray(e) ? e[o] || y : e;
14
- i = A(c, i);
13
+ const c = Array.isArray(e) ? e[o] || b : e;
14
+ i = y(c, i);
15
15
  }
16
16
  t.push(i);
17
17
  }
@@ -32,7 +32,7 @@ function I(r, e, { clamp: f = !0, ease: t, mixer: a } = {}) {
32
32
  if (c > 1)
33
33
  for (; m < r.length - 2 && !(s < r[m + 1]); m++)
34
34
  ;
35
- const g = F(r[m], r[m + 1], s);
35
+ const g = A(r[m], r[m + 1], s);
36
36
  return i[m](g);
37
37
  };
38
38
  return f ? (s) => l(M(r[0], r[n - 1], s)) : l;
@@ -1,10 +1,10 @@
1
1
  import { alpha as n } from "../numbers/index.es.js";
2
2
  import { percent as t } from "../numbers/units.es.js";
3
3
  import { sanitize as r } from "../utils/sanitize.es.js";
4
- import { isColorString as i, splitColor as e } from "./utils.es.js";
4
+ import { splitColor as i, isColorString as e } from "./utils.es.js";
5
5
  const u = {
6
- test: /* @__PURE__ */ i("hsl", "hue"),
7
- parse: /* @__PURE__ */ e("hue", "saturation", "lightness"),
6
+ test: /* @__PURE__ */ e("hsl", "hue"),
7
+ parse: /* @__PURE__ */ i("hue", "saturation", "lightness"),
8
8
  transform: ({ hue: o, saturation: s, lightness: a, alpha: m = 1 }) => "hsla(" + Math.round(o) + ", " + t.transform(r(s)) + ", " + t.transform(r(a)) + ", " + r(n.transform(m)) + ")"
9
9
  };
10
10
  export {
@@ -1,13 +1,13 @@
1
1
  import { number as n, alpha as s } from "../numbers/index.es.js";
2
2
  import { sanitize as i } from "../utils/sanitize.es.js";
3
- import { isColorString as p, splitColor as e } from "./utils.es.js";
3
+ import { splitColor as p, isColorString as e } from "./utils.es.js";
4
4
  import { clamp as f } from "../../../../../../../../motion-utils@12.39.0/node_modules/motion-utils/dist/es/clamp.es.js";
5
5
  const l = (r) => f(0, 255, r), o = {
6
6
  ...n,
7
7
  transform: (r) => Math.round(l(r))
8
8
  }, h = {
9
- test: /* @__PURE__ */ p("rgb", "red"),
10
- parse: /* @__PURE__ */ e("red", "green", "blue"),
9
+ test: /* @__PURE__ */ e("rgb", "red"),
10
+ parse: /* @__PURE__ */ p("red", "green", "blue"),
11
11
  transform: ({ red: r, green: t, blue: a, alpha: m = 1 }) => "rgba(" + o.transform(r) + ", " + o.transform(t) + ", " + o.transform(a) + ", " + i(s.transform(m)) + ")"
12
12
  };
13
13
  export {
@@ -1 +1 @@
1
- (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("@frontify/fondue-charts")):typeof define=="function"&&define.amd?define(["exports","@frontify/fondue-charts"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.FondueCharts={},e.fondueCharts))})(this,function(e,t){"use strict";Object.keys(t).forEach(n=>{n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:()=>t[n]})}),Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("@frontify/fondue-charts")):typeof define=="function"&&define.amd?define(["exports","@frontify/fondue-charts"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.FondueCharts={},e.fondueCharts))})(this,(function(e,t){"use strict";Object.keys(t).forEach(n=>{n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:()=>t[n]})}),Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
@@ -1 +1 @@
1
- :root{--fc-base-color: var(--color-surface-default);--fc-primary-base-color: var(--color-charts-primary-default);--fc-secondary-base-color: var(--color-charts-secondary-default);--fc-tertiary-base-color: var(--color-charts-tertiary-default);--fc-backfilled-base-color: var(--color-container-secondary-on-secondary-container);--fc-negative-base-color: var(--color-error-default);--fc-primary-hover-color: var(--color-charts-primary-hover);--fc-secondary-hover-color: var(--color-charts-secondary-hover);--fc-tertiary-hover-color: var(--color-charts-tertiary-hover);--fc-primary-weak-color: var(--color-charts-primary-subtle);--fc-secondary-weak-color: var(--color-charts-secondary-subtle);--fc-tertiary-weak-color: var(--color-charts-tertiary-subtle);--fc-backfilled-weak-color: rgba(250, 250, 250, .3);--fc-negative-weak-color: rgba(254, 142, 163, .1);--fc-tick-stroke-color: var(--color-line-strong);--fc-axis-x-color: var(--color-line-strong);--fc-axis-y-color: "transparent";--fc-grid-stroke-color: var(--color-line-mid);--fc-tooltip-crosshair-stroke-color: var(--color-line-mid);--fc-tooltip-crosshair-stroke-color-weak: rgba(8, 8, 8, .05);--fc-font-family: var(--typography-font-family-primary);--fc-font-color-default: var(--color-primary-default);--fc-font-color-weak: var(--color-secondary-default)}.visx-tooltip-glyph svg{width:6px;height:6px}.bar-chart-cursor-pointer svg rect{cursor:pointer}._label_1cnpe_3{font-family:var(--typography-font-family-primary);font-size:var(--typography-font-size-x-small);font-weight:var(--typography-font-weight-bold)}._root_1fixl_4{display:flex;flex-wrap:wrap;gap:var(--spacing-large);align-self:flex-start}._item_1fixl_11{display:flex}._label_1fixl_15{font-family:var(--typography-font-family-primary);font-size:var(--typography-font-size-small);font-weight:var(--typography-font-weight-regular);color:var(--color-primary-default)}._colorBox_1fixl_22{align-self:center;margin-right:var(--spacing-x-small);display:inline-block}._shape-line_1fixl_28{width:3rem;height:2px;border-radius:0}._shape-rectangle_1fixl_34{width:3rem;height:.75rem;border-radius:0}._shape-circle_1fixl_40{width:.75rem;height:.75rem;border-radius:9999px}._shape-square_1fixl_46{width:.75rem;height:.75rem;border-radius:1px}._root_12zit_4{background-color:var(--color-primary-default);color:var(--color-primary-on-primary);padding:var(--spacing-small);border-radius:var(--border-radius-medium);border:1px solid var(--color-primary-default);max-width:16.25rem;word-break:break-all}._imageWrapper_12zit_14{margin:-.25rem}._image_12zit_14{height:7rem;-o-object-fit:cover;object-fit:cover;margin-bottom:1.25rem;width:100%}._body_12zit_25{padding-bottom:0}._body_12zit_25._withTitle_12zit_28{padding-bottom:var(--spacing-small)}._title_12zit_32{font-family:var(--typography-font-family-primary);font-size:var(--typography-font-size-small);font-weight:var(--typography-font-weight-bold);color:var(--color-primary-on-primary)}._type_12zit_39{font-family:var(--typography-font-family-primary);font-size:var(--typography-font-size-small);font-weight:var(--typography-font-weight-regular);color:var(--color-primary-on-primary);padding-bottom:var(--spacing-x-small)}._description_12zit_47{font-family:var(--typography-font-family-primary);font-size:var(--typography-font-size-x-small);font-weight:var(--typography-font-weight-regular);color:var(--color-primary-on-primary)}._descriptionLine_12zit_54{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._item_12zit_60{font-family:var(--typography-font-family-primary);font-size:var(--typography-font-size-small);font-weight:var(--typography-font-weight-regular);color:var(--color-primary-on-primary)}._itemDot_12zit_67{display:inline-block;width:.5rem;height:.5rem;border-radius:9999px;margin-right:var(--spacing-xx-small)}._itemValue_12zit_75{font-family:var(--typography-font-family-primary);font-size:var(--typography-font-size-small);font-weight:var(--typography-font-weight-bold)}._root_gqg3e_2{display:flex;flex-direction:column;gap:var(--spacing-large)}._root_1cl5u_4{margin-block:.5rem 1.25rem}._titleRow_1cl5u_8{display:flex;align-items:center}._title_1cl5u_8{font-family:var(--typography-font-family-primary);font-size:var(--typography-font-size-large);font-weight:var(--typography-font-weight-medium);margin-right:.375rem;color:var(--color-primary-default)}._descriptionWrapper_1cl5u_21{margin-top:.875rem}._description_1cl5u_21{font-family:var(--typography-font-family-primary);font-size:var(--typography-font-size-small);font-weight:var(--typography-font-weight-regular);color:var(--color-secondary-default)}._root_gqg3e_2,._stack_98ryw_3{display:flex;flex-direction:column;gap:var(--spacing-large)}._bar_98ryw_9{overflow:hidden;border-radius:.375rem;width:100%;position:relative;display:flex;height:.75rem;background-color:var(--color-container-secondary-hover)}._root_15uzz_2{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;gap:var(--spacing-x-large)}@media (min-width: 768px){._root_15uzz_2{gap:var(--spacing-large)}}._root_15uzz_2 path[tabindex]:focus:not(:focus-visible){outline:none}._root_ryw0h_2{width:100%;height:100%;display:flex;flex-direction:column;gap:var(--spacing-large);-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:none}._chartWrapper_ryw0h_12{width:100%;height:100%}
1
+ :root{--fc-base-color: var(--color-surface-default);--fc-primary-base-color: var(--color-charts-primary-default);--fc-secondary-base-color: var(--color-charts-secondary-default);--fc-tertiary-base-color: var(--color-charts-tertiary-default);--fc-backfilled-base-color: var(--color-container-secondary-on-secondary-container);--fc-negative-base-color: var(--color-error-default);--fc-primary-hover-color: var(--color-charts-primary-hover);--fc-secondary-hover-color: var(--color-charts-secondary-hover);--fc-tertiary-hover-color: var(--color-charts-tertiary-hover);--fc-primary-weak-color: var(--color-charts-primary-subtle);--fc-secondary-weak-color: var(--color-charts-secondary-subtle);--fc-tertiary-weak-color: var(--color-charts-tertiary-subtle);--fc-backfilled-weak-color: rgba(250, 250, 250, .3);--fc-negative-weak-color: rgba(254, 142, 163, .1);--fc-tick-stroke-color: var(--color-line-strong);--fc-axis-x-color: var(--color-line-strong);--fc-axis-y-color: "transparent";--fc-grid-stroke-color: var(--color-line-mid);--fc-tooltip-crosshair-stroke-color: var(--color-line-mid);--fc-tooltip-crosshair-stroke-color-weak: rgba(8, 8, 8, .05);--fc-font-family: var(--typography-font-family-primary);--fc-font-color-default: var(--color-primary-default);--fc-font-color-weak: var(--color-secondary-default)}.visx-tooltip-glyph svg{width:6px;height:6px}.bar-chart-cursor-pointer svg rect{cursor:pointer}._label_1cnpe_3{font-family:var(--typography-font-family-primary);font-size:var(--typography-font-size-x-small);font-weight:var(--typography-font-weight-bold)}._root_1fixl_4{display:flex;flex-wrap:wrap;gap:var(--spacing-large);align-self:flex-start}._item_1fixl_11{display:flex}._label_1fixl_15{font-family:var(--typography-font-family-primary);font-size:var(--typography-font-size-small);font-weight:var(--typography-font-weight-regular);color:var(--color-primary-default)}._colorBox_1fixl_22{align-self:center;margin-right:var(--spacing-x-small);display:inline-block}._shape-line_1fixl_28{width:3rem;height:2px;border-radius:0}._shape-rectangle_1fixl_34{width:3rem;height:.75rem;border-radius:0}._shape-circle_1fixl_40{width:.75rem;height:.75rem;border-radius:9999px}._shape-square_1fixl_46{width:.75rem;height:.75rem;border-radius:1px}._root_12zit_4{background-color:var(--color-primary-default);color:var(--color-primary-on-primary);padding:var(--spacing-small);border-radius:var(--border-radius-medium);border:1px solid var(--color-primary-default);max-width:16.25rem;word-break:break-all}._imageWrapper_12zit_14{margin:-.25rem}._image_12zit_14{height:7rem;-o-object-fit:cover;object-fit:cover;margin-bottom:1.25rem;width:100%}._body_12zit_25{padding-bottom:0}._body_12zit_25._withTitle_12zit_28{padding-bottom:var(--spacing-small)}._title_12zit_32{font-family:var(--typography-font-family-primary);font-size:var(--typography-font-size-small);font-weight:var(--typography-font-weight-bold);color:var(--color-primary-on-primary)}._type_12zit_39{font-family:var(--typography-font-family-primary);font-size:var(--typography-font-size-small);font-weight:var(--typography-font-weight-regular);color:var(--color-primary-on-primary);padding-bottom:var(--spacing-x-small)}._description_12zit_47{font-family:var(--typography-font-family-primary);font-size:var(--typography-font-size-x-small);font-weight:var(--typography-font-weight-regular);color:var(--color-primary-on-primary)}._descriptionLine_12zit_54{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._item_12zit_60{font-family:var(--typography-font-family-primary);font-size:var(--typography-font-size-small);font-weight:var(--typography-font-weight-regular);color:var(--color-primary-on-primary)}._itemDot_12zit_67{display:inline-block;width:.5rem;height:.5rem;border-radius:9999px;margin-right:var(--spacing-xx-small)}._itemValue_12zit_75{font-family:var(--typography-font-family-primary);font-size:var(--typography-font-size-small);font-weight:var(--typography-font-weight-bold)}._root_gqg3e_2{display:flex;flex-direction:column;gap:var(--spacing-large)}._root_1cl5u_4{margin-block:.5rem 1.25rem}._titleRow_1cl5u_8{display:flex;align-items:center}._title_1cl5u_8{font-family:var(--typography-font-family-primary);font-size:var(--typography-font-size-large);font-weight:var(--typography-font-weight-medium);margin-right:.375rem;color:var(--color-primary-default)}._descriptionWrapper_1cl5u_21{margin-top:.875rem}._description_1cl5u_21{font-family:var(--typography-font-family-primary);font-size:var(--typography-font-size-small);font-weight:var(--typography-font-weight-regular);color:var(--color-secondary-default)}._root_gqg3e_2,._stack_98ryw_3{display:flex;flex-direction:column;gap:var(--spacing-large)}._bar_98ryw_9{overflow:hidden;border-radius:.375rem;width:100%;position:relative;display:flex;height:.75rem;background-color:var(--color-container-secondary-hover)}._root_15uzz_2{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;gap:var(--spacing-x-large)}@media(min-width:768px){._root_15uzz_2{gap:var(--spacing-large)}}._root_15uzz_2 path[tabindex]:focus:not(:focus-visible){outline:none}._root_ryw0h_2{width:100%;height:100%;display:flex;flex-direction:column;gap:var(--spacing-large);-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:none}._chartWrapper_ryw0h_12{width:100%;height:100%}
@@ -1 +1 @@
1
- (function(e,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("@frontify/fondue-components")):typeof define=="function"&&define.amd?define(["exports","@frontify/fondue-components"],n):(e=typeof globalThis<"u"?globalThis:e||self,n(e.FondueComponents={},e.fondueComponents))})(this,function(e,n){"use strict";Object.keys(n).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:()=>n[t]})}),Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
1
+ (function(e,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("@frontify/fondue-components")):typeof define=="function"&&define.amd?define(["exports","@frontify/fondue-components"],n):(e=typeof globalThis<"u"?globalThis:e||self,n(e.FondueComponents={},e.fondueComponents))})(this,(function(e,n){"use strict";Object.keys(n).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:()=>n[t]})}),Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));