1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="55850356-9edd-e176-a977-3f98cb8cb913")}catch(e){}}(); 2(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, 3343084, 101534, 4((__turbopack_context__) => { 5"use strict"; 6 7// MERGED MODULE: [project]/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs [app-client] (ecmascript) 8; 9/** 10 * Custom positioning reference element. 11 * @see https://floating-ui.com/docs/virtual-elements 12 */ const sides = [ 13 'top', 14 'right', 15 'bottom', 16 'left' 17]; 18const alignments = [ 19 'start', 20 'end' 21]; 22const placements = /*#__PURE__*/ sides.reduce((acc, side)=>acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []); 23const min = Math.min; 24const max = Math.max; 25const round = Math.round; 26const floor = Math.floor; 27const createCoords = (v)=>({ 28 x: v, 29 y: v 30 }); 31const oppositeSideMap = { 32 left: 'right', 33 right: 'left', 34 bottom: 'top', 35 top: 'bottom' 36}; 37function clamp(start, value, end) { 38 return max(start, min(value, end)); 39} 40function evaluate(value, param) { 41 return typeof value === 'function' ? value(param) : value; 42} 43function getSide(placement) { 44 return placement.split('-')[0]; 45} 46function getAlignment(placement) { 47 return placement.split('-')[1]; 48} 49function getOppositeAxis(axis) { 50 return axis === 'x' ? 'y' : 'x'; 51} 52function getAxisLength(axis) { 53 return axis === 'y' ? 'height' : 'width'; 54} 55function getSideAxis(placement) { 56 const firstChar = placement[0]; 57 return firstChar === 't' || firstChar === 'b' ? 'y' : 'x'; 58} 59function getAlignmentAxis(placement) { 60 return getOppositeAxis(getSideAxis(placement)); 61} 62function getAlignmentSides(placement, rects, rtl) { 63 if (rtl === void 0) { 64 rtl = false; 65 } 66 const alignment = getAlignment(placement); 67 const alignmentAxis = getAlignmentAxis(placement); 68 const length = getAxisLength(alignmentAxis); 69 let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top'; 70 if (rects.reference[length] > rects.floating[length]) { 71 mainAlignmentSide = getOppositePlacement(mainAlignmentSide); 72 } 73 return [ 74 mainAlignmentSide, 75 getOppositePlacement(mainAlignmentSide) 76 ]; 77} 78function getExpandedPlacements(placement) { 79 const oppositePlacement = getOppositePlacement(placement); 80 return [ 81 getOppositeAlignmentPlacement(placement), 82 oppositePlacement, 83 getOppositeAlignmentPlacement(oppositePlacement) 84 ]; 85} 86function getOppositeAlignmentPlacement(placement) { 87 return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start'); 88} 89const lrPlacement = [ 90 'left', 91 'right' 92]; 93const rlPlacement = [ 94 'right', 95 'left' 96]; 97const tbPlacement = [ 98 'top', 99 'bottom' 100]; 101const btPlacement = [ 102 'bottom', 103 'top' 104]; 105function getSideList(side, isStart, rtl) { 106 switch(side){ 107 case 'top': 108 case 'bottom': 109 if (rtl) return isStart ? rlPlacement : lrPlacement; 110 return isStart ? lrPlacement : rlPlacement; 111 case 'left': 112 case 'right': 113 return isStart ? tbPlacement : btPlacement; 114 default: 115 return []; 116 } 117} 118function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) { 119 const alignment = getAlignment(placement); 120 let list = getSideList(getSide(placement), direction === 'start', rtl); 121 if (alignment) { 122 list = list.map((side)=>side + "-" + alignment); 123 if (flipAlignment) { 124 list = list.concat(list.map(getOppositeAlignmentPlacement)); 125 } 126 } 127 return list; 128} 129function getOppositePlacement(placement) { 130 const side = getSide(placement); 131 return oppositeSideMap[side] + placement.slice(side.length); 132}
133function expandPaddingObject(padding) { 134 var _padding$top, _padding$right, _padding$bottom, _padding$left; 135 return { 136 top: (_padding$top = padding.top) != null ? _padding$top : 0, 137 right: (_padding$right = padding.right) != null ? _padding$right : 0, 138 bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0, 139 left: (_padding$left = padding.left) != null ? _padding$left : 0 140 }; 141} 142function getPaddingObject(padding) { 143 return typeof padding !== 'number' ? expandPaddingObject(padding) : { 144 top: padding, 145 right: padding, 146 bottom: padding, 147 left: padding 148 }; 149} 150function rectToClientRect(rect) { 151 const { x, y, width, height } = rect; 152 return { 153 width, 154 height, 155 top: y, 156 left: x, 157 right: x + width, 158 bottom: y + height, 159 x, 160 y 161 }; 162} 163; 164__turbopack_context__.s([ 165 "clamp", 166 0, 167 clamp, 168 "createCoords", 169 0, 170 createCoords, 171 "evaluate", 172 0, 173 evaluate, 174 "floor", 175 0, 176 floor, 177 "getAlignment", 178 0, 179 getAlignment, 180 "getAlignmentAxis", 181 0, 182 getAlignmentAxis, 183 "getAlignmentSides", 184 0, 185 getAlignmentSides, 186 "getAxisLength", 187 0, 188 getAxisLength, 189 "getExpandedPlacements", 190 0, 191 getExpandedPlacements, 192 "getOppositeAlignmentPlacement", 193 0, 194 getOppositeAlignmentPlacement, 195 "getOppositeAxis", 196 0, 197 getOppositeAxis, 198 "getOppositeAxisPlacements", 199 0, 200 getOppositeAxisPlacements, 201 "getOppositePlacement", 202 0, 203 getOppositePlacement, 204 "getPaddingObject", 205 0, 206 getPaddingObject, 207 "getSide", 208 0, 209 getSide, 210 "getSideAxis", 211 0, 212 getSideAxis, 213 "max", 214 0, 215 max, 216 "min", 217 0, 218 min, 219 "placements", 220 0, 221 placements, 222 "rectToClientRect", 223 0, 224 rectToClientRect, 225 "round", 226 0, 227 round, 228 "sides", 229 0, 230 sides 231], 343084); 232// MERGED MODULE: [project]/node_modules/@floating-ui/core/dist/floating-ui.core.mjs [app-client] (ecmascript) <locals> 233; 234; 235; 236function computeCoordsFromPlacement(_ref, placement, rtl) { 237 let { reference, floating } = _ref; 238 const sideAxis = getSideAxis(placement); 239 const alignmentAxis = getAlignmentAxis(placement); 240 const alignLength = getAxisLength(alignmentAxis); 241 const side = getSide(placement); 242 const isVertical = sideAxis === 'y'; 243 const commonX = reference.x + reference.width / 2 - floating.width / 2; 244 const commonY = reference.y + reference.height / 2 - floating.height / 2; 245 const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2; 246 let coords; 247 switch(side){ 248 case 'top': 249 coords = { 250 x: commonX, 251 y: reference.y - floating.height 252 }; 253 break; 254 case 'bottom': 255 coords = { 256 x: commonX, 257 y: reference.y + reference.height 258 }; 259 break; 260 case 'right': 261 coords = { 262 x: reference.x + reference.width, 263 y: commonY 264 }; 265 break; 266 case 'left': 267 coords = { 268 x: reference.x - floating.width, 269 y: commonY 270 }; 271 break; 272 default: 273 coords = { 274 x: reference.x, 275 y: reference.y 276 }; 277 } 278 const alignment = getAlignment(placement); 279 if (alignment) { 280 coords[alignmentAxis] += commonAlign * (alignment === 'end' ? 1 : -1) * (rtl && isVertical ? -1 : 1); 281 } 282 return coords; 283} 284/** 285 * Resolves with an object of overflow side offsets that determine how much the 286 * element is overflowing a given clipping boundary on each side. 287 * - positive = overflowing the boundary by that number of pixels 288 * - negative = how many pixels left before it will overflow 289 * - 0 = lies flush with the boundary 290 * @see https://floating-ui.com/docs/detectOverflow 291 */ async function detectOverflow(state, options) { 292 var _await$platform$isEle; 293 if (options === void 0) { 294 options = {}; 295 } 296 const { x, y, platform, rects, elements, strategy } = state; 297 const { boundary = 'clippingAncestors', rootBoundary = 'viewport', elementContext = 'floating', altBoundary = false, padding = 0 } = evaluate(options, state);
vendor: 5,063 bytes, lines 298-420
298 const paddingObject = getPaddingObject(padding); 299 const altContext = elementContext === 'floating' ? 'reference' : 'floating'; 300 const element = elements[altBoundary ? altContext : elementContext]; 301 const clippingClientRect = rectToClientRect(await platform.getClippingRect({ 302 element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating)), 303 boundary, 304 rootBoundary, 305 strategy 306 })); 307 const rect = elementContext === 'floating' ? { 308 x, 309 y, 310 width: rects.floating.width, 311 height: rects.floating.height 312 } : rects.reference; 313 const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating)); 314 const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) && await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || { 315 x: 1, 316 y: 1 317 }; 318 const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({ 319 elements, 320 rect, 321 offsetParent, 322 strategy 323 }) : rect); 324 return { 325 top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y, 326 bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y, 327 left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x, 328 right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x 329 }; 330} 331// Maximum number of resets that can occur before bailing to avoid infinite reset loops. 332const MAX_RESET_COUNT = 50; 333/** 334 * Computes the `x` and `y` coordinates that will place the floating element 335 * next to a given reference element. 336 * 337 * This export does not have any `platform` interface logic. You will need to 338 * write one for the platform you are using Floating UI with. 339 */ const computePosition = async (reference, floating, config)=>{ 340 const { placement = 'bottom', strategy = 'absolute', middleware = [], platform } = config; 341 const platformWithDetectOverflow = platform.detectOverflow ? platform : { 342 ...platform, 343 detectOverflow 344 }; 345 const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating)); 346 let rects = await platform.getElementRects({ 347 reference, 348 floating, 349 strategy 350 }); 351 let { x, y } = computeCoordsFromPlacement(rects, placement, rtl); 352 let statefulPlacement = placement; 353 let resetCount = 0; 354 const middlewareData = {}; 355 for(let i = 0; i < middleware.length; i++){ 356 const currentMiddleware = middleware[i]; 357 if (!currentMiddleware) { 358 continue; 359 } 360 const { name, fn } = currentMiddleware; 361 const { x: nextX, y: nextY, data, reset } = await fn({ 362 x, 363 y, 364 initialPlacement: placement, 365 placement: statefulPlacement, 366 strategy, 367 middlewareData, 368 rects, 369 platform: platformWithDetectOverflow, 370 elements: { 371 reference, 372 floating 373 } 374 }); 375 x = nextX != null ? nextX : x; 376 y = nextY != null ? nextY : y; 377 middlewareData[name] = { 378 ...middlewareData[name], 379 ...data 380 }; 381 if (reset && resetCount < MAX_RESET_COUNT) { 382 resetCount++; 383 if (typeof reset === 'object') { 384 if (reset.placement) { 385 statefulPlacement = reset.placement; 386 } 387 if (reset.rects) { 388 rects = reset.rects === true ? await platform.getElementRects({ 389 reference, 390 floating, 391 strategy 392 }) : reset.rects; 393 } 394 ({ x, y } = computeCoordsFromPlacement(rects, statefulPlacement, rtl)); 395 } 396 i = -1; 397 } 398 } 399 return { 400 x, 401 y, 402 placement: statefulPlacement, 403 strategy, 404 middlewareData 405 }; 406}; 407/** 408 * Provides data to position an inner element of the floating element so that it 409 * appears centered to the reference element. 410 * @see https://floating-ui.com/docs/arrow 411 */ const arrow = (options)=>({ 412 name: 'arrow', 413 options, 414 async fn (state) { 415 const { x, y, placement, rects, platform, elements, middlewareData } = state; 416 // Since `element` is required, we don't Partial<> the type. 417 const { element, padding = 0 } = evaluate(options, state) || {}; 418 if (element == null) { 419 return {}; 420 }
421 const paddingObject = getPaddingObject(padding); 422 const coords = { 423 x, 424 y 425 }; 426 const axis = getAlignmentAxis(placement); 427 const length = getAxisLength(axis); 428 const arrowDimensions = await platform.getDimensions(element); 429 const isYAxis = axis === 'y'; 430 const minProp = isYAxis ? 'top' : 'left'; 431 const maxProp = isYAxis ? 'bottom' : 'right'; 432 const clientProp = isYAxis ? 'clientHeight' : 'clientWidth'; 433 const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length]; 434 const startDiff = coords[axis] - rects.reference[axis]; 435 const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element)); 436 let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0; 437 // DOM platform can return `window` as the `offsetParent`. 438 if (!clientSize || !await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent))) { 439 clientSize = elements.floating[clientProp] || rects.floating[length]; 440 } 441 const centerToReference = endDiff / 2 - startDiff / 2; 442 // If the padding is large enough that it causes the arrow to no longer be 443 // centered, modify the padding so that it is centered. 444 const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1; 445 const minPadding = min(paddingObject[minProp], largestPossiblePadding); 446 const maxPadding = min(paddingObject[maxProp], largestPossiblePadding); 447 // Make sure the arrow doesn't overflow the floating element if the center 448 // point is outside the floating element's bounds. 449 const max1 = clientSize - arrowDimensions[length] - maxPadding; 450 const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference; 451 const offset = clamp(minPadding, center, max1); 452 // If the reference is small enough that the arrow's padding causes it to 453 // to point to nothing for an aligned placement, adjust the offset of the 454 // floating element itself. To ensure `shift()` continues to take action, 455 // a single reset is performed when this is true. 456 const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < minPadding ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0; 457 const alignmentOffset = shouldAddOffset ? center < minPadding ? center - minPadding : center - max1 : 0; 458 return { 459 [axis]: coords[axis] + alignmentOffset, 460 data: { 461 [axis]: offset, 462 centerOffset: center - offset - alignmentOffset, 463 ...shouldAddOffset && { 464 alignmentOffset 465 } 466 }, 467 reset: shouldAddOffset 468 }; 469 } 470 }); 471function getPlacementList(alignment, autoAlignment, allowedPlacements) { 472 const allowedPlacementsSortedByAlignment = alignment ? [ 473 ...allowedPlacements.filter((placement)=>getAlignment(placement) === alignment), 474 ...allowedPlacements.filter((placement)=>getAlignment(placement) !== alignment) 475 ] : allowedPlacements.filter((placement)=>getSide(placement) === placement); 476 return allowedPlacementsSortedByAlignment.filter((placement)=>{ 477 if (alignment) { 478 return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false); 479 } 480 return true; 481 }); 482} 483/** 484 * Optimizes the visibility of the floating element by choosing the placement 485 * that has the most space available automatically, without needing to specify a 486 * preferred placement. Alternative to `flip`. 487 * @see https://floating-ui.com/docs/autoPlacement 488 */ const autoPlacement = function(options) { 489 if (options === void 0) { 490 options = {}; 491 } 492 return { 493 name: 'autoPlacement', 494 options, 495 async fn (state) { 496 var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE; 497 const { rects, middlewareData, placement, platform, elements } = state; 498 const { crossAxis = false, alignment, allowedPlacements = placements, autoAlignment = true, ...detectOverflowOptions } = evaluate(options, state); 499 const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements; 500 const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0; 501 const currentPlacement = placements$1[currentIndex]; 502 if (currentPlacement == null) { 503 return {}; 504 } 505 // Make `computeCoords` start from the right place. 506 if (placement !== currentPlacement) { 507 return { 508 reset: { 509 placement: placements$1[0] 510 } 511 }; 512 } 513 const overflow = await platform.detectOverflow(state, detectOverflowOptions); 514 const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))); 515 const currentOverflows = [ 516 overflow[getSide(currentPlacement)], 517 overflow[alignmentSides[0]], 518 overflow[alignmentSides[1]] 519 ]; 520 const allOverflows = [ 521 ...((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || [], 522 { 523 placement: currentPlacement, 524 overflows: currentOverflows 525 } 526 ]; 527 const nextPlacement = placements$1[currentIndex + 1]; 528 // There are more placements to check. 529 if (nextPlacement) { 530 return { 531 data: { 532 index: currentIndex + 1, 533 overflows: allOverflows 534 }, 535 reset: { 536 placement: nextPlacement 537 } 538 }; 539 } 540 const placementsSortedByMostSpace = allOverflows.map((d)=>{ 541 const alignment = getAlignment(d.placement); 542 return [ 543 d.placement, 544 alignment && crossAxis ? // Check along the mainAxis and main crossAxis side. 545 d.overflows.slice(0, 2).reduce((acc, v)=>acc + v, 0) : // Check only the mainAxis. 546 d.overflows[0], 547 d.overflows 548 ]; 549 }).sort((a, b)=>a[1] - b[1]); 550 const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter((d)=>d[2].slice(0, // Aligned placements should not check their opposite crossAxis 551 // side. 552 getAlignment(d[0]) ? 2 : 3).every((v)=>v <= 0)); 553 const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0]; 554 if (resetPlacement !== placement) { 555 return { 556 data: { 557 index: currentIndex + 1, 558 overflows: allOverflows 559 }, 560 reset: { 561 placement: resetPlacement 562 } 563 }; 564 } 565 return {}; 566 } 567 }; 568}; 569/** 570 * Optimizes the visibility of the floating element by flipping the `placement` 571 * in order to keep it in view when the preferred placement(s) will overflow the 572 * clipping boundary. Alternative to `autoPlacement`. 573 * @see https://floating-ui.com/docs/flip 574 */ const flip = function(options) { 575 if (options === void 0) { 576 options = {}; 577 } 578 return { 579 name: 'flip', 580 options, 581 async fn (state) { 582 var _middlewareData$arrow, _middlewareData$flip; 583 const { placement, middlewareData, rects, initialPlacement, platform, elements } = state; 584 const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true, fallbackPlacements: specifiedFallbackPlacements, fallbackStrategy = 'bestFit', fallbackAxisSideDirection = '
584none', flipAlignment = true, ...detectOverflowOptions } = evaluate(options, state); 585 // If a reset by the arrow was caused due to an alignment offset being 586 // added, we should skip any logic now since `flip()` has already done its 587 // work. 588 // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643 589 if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { 590 return {}; 591 } 592 const side = getSide(placement); 593 const initialSideAxis = getSideAxis(initialPlacement); 594 const isBasePlacement = getSide(initialPlacement) === initialPlacement; 595 const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)); 596 const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [ 597 getOppositePlacement(initialPlacement) 598 ] : getExpandedPlacements(initialPlacement)); 599 const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none'; 600 if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) { 601 fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl)); 602 } 603 const placements1 = [ 604 initialPlacement, 605 ...fallbackPlacements 606 ]; 607 const overflow = await platform.detectOverflow(state, detectOverflowOptions); 608 const overflows = []; 609 let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || []; 610 if (checkMainAxis) { 611 overflows.push(overflow[side]); 612 } 613 if (checkCrossAxis) { 614 const sides1 = getAlignmentSides(placement, rects, rtl); 615 overflows.push(overflow[sides1[0]], overflow[sides1[1]]); 616 } 617 overflowsData = [ 618 ...overflowsData, 619 { 620 placement, 621 overflows 622 } 623 ]; 624 // One or more sides is overflowing. 625 if (!overflows.every((side)=>side <= 0)) { 626 var _middlewareData$flip2, _overflowsData$filter; 627 const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1; 628 const nextPlacement = placements1[nextIndex]; 629 if (nextPlacement) { 630 const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false; 631 if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis 632 // overflows the main axis. 633 overflowsData.every((d)=>getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) { 634 // Try next placement and re-run the lifecycle. 635 return { 636 data: { 637 index: nextIndex, 638 overflows: overflowsData 639 }, 640 reset: { 641 placement: nextPlacement 642 } 643 }; 644 } 645 } 646 // First, find the candidates that fit on the mainAxis side of overflow, 647 // then find the placement that fits the best on the main crossAxis side. 648 let resetPlacement = (_overflowsData$filter = overflowsData.filter((d)=>d.overflows[0] <= 0).sort((a, b)=>a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement; 649 // Otherwise fallback. 650 if (!resetPlacement) { 651 switch(fallbackStrategy){ 652 case 'bestFit': 653 { 654 var _overflowsData$filter2; 655 const placement = (_overflowsData$filter2 = overflowsData.filter((d)=>{ 656 if (hasFallbackAxisSideDirection) { 657 const currentSideAxis = getSideAxis(d.placement); 658 return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal 659 // reading directions favoring greater width. 660 currentSideAxis === 'y'; 661 } 662 return true; 663 }).map((d)=>[ 664 d.placement, 665 d.overflows.filter((overflow)=>overflow > 0).reduce((acc, overflow)=>acc + overflow, 0) 666 ]).sort((a, b)=>a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0]; 667 if (placement) { 668 resetPlacement = placement; 669 } 670 break; 671 } 672 case 'initialPlacement': 673 resetPlacement = initialPlacement; 674 break; 675 } 676 } 677 if (placement !== resetPlacement) { 678 return { 679 reset: { 680 placement: resetPlacement 681 } 682 }; 683 } 684 } 685 return {}; 686 } 687 }; 688}; 689function getSideOffsets(overflow, rect) { 690 return { 691 top: overflow.top - rect.height, 692 right: overflow.right - rect.width, 693 bottom: overflow.bottom - rect.height, 694 left: overflow.left - rect.width 695 }; 696} 697function isAnySideFullyClipped(overflow) { 698 return sides.some((side)=>overflow[side] >= 0); 699} 700/** 701 * Provides data to hide the floating element in applicable situations, such as 702 * when it is not in the same clipping context as the reference element. 703 * @see https://floating-ui.com/docs/hide 704 */ const hide = function(options) { 705 if (options === void 0) { 706 options = {}; 707 } 708 return { 709 name: 'hide', 710 options, 711 async fn (state) { 712 const { rects, platform } = state; 713 const { strategy = 'referenceHidden', ...detectOverflowOptions } = evaluate(options, state); 714 switch(strategy){ 715 case 'referenceHidden': 716 { 717 const overflow = await platform.detectOverflow(state, { 718 ...detectOverflowOptions, 719 elementContext: 'reference' 720 }); 721 const offsets = getSideOffsets(overflow, rects.reference); 722 return { 723 data: { 724 referenceHiddenOffsets: offsets, 725 referenceHidden: isAnySideFullyClipped(offsets) 726 } 727 }; 728 } 729 case 'escaped': 730 { 731 const overflow = await platform.detectOverflow(state, { 732 ...detectOverflowOptions, 733 altBoundary: true 734 }); 735 const offsets = getSideOffsets(overflow, rects.floating); 736 return { 737 data: { 738 escapedOffsets: offsets, 739 escaped: isAnySideFullyClipped(offsets) 740 } 741 }; 742 } 743 default: 744 { 745 return {}; 746 } 747 } 748 } 749 }; 750};
vendor: 10,011 bytes, lines 751-989
751function getBoundingRect(rects) { 752 const minX = min(...rects.map((rect)=>rect.left)); 753 const minY = min(...rects.map((rect)=>rect.top)); 754 const maxX = max(...rects.map((rect)=>rect.right)); 755 const maxY = max(...rects.map((rect)=>rect.bottom)); 756 return { 757 x: minX, 758 y: minY, 759 width: maxX - minX, 760 height: maxY - minY 761 }; 762} 763function getRectsByLine(rects) { 764 const sortedRects = rects.slice().sort((a, b)=>a.y - b.y); 765 const groups = []; 766 let prevRect = null; 767 for(let i = 0; i < sortedRects.length; i++){ 768 const rect = sortedRects[i]; 769 if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) { 770 groups.push([ 771 rect 772 ]); 773 } else { 774 groups[groups.length - 1].push(rect); 775 } 776 prevRect = rect; 777 } 778 return groups.map((rect)=>rectToClientRect(getBoundingRect(rect))); 779} 780/** 781 * Provides improved positioning for inline reference elements that can span 782 * over multiple lines, such as hyperlinks or range selections. 783 * @see https://floating-ui.com/docs/inline 784 */ const inline = function(options) { 785 if (options === void 0) { 786 options = {}; 787 } 788 return { 789 name: 'inline', 790 options, 791 async fn (state) { 792 const { placement, elements, rects, platform, strategy } = state; 793 // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a 794 // ClientRect's bounds, despite the event listener being triggered. A 795 // padding of 2 seems to handle this issue. 796 const { padding = 2, x, y } = evaluate(options, state); 797 const nativeClientRects = Array.from(await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference)) || []); 798 // No rects (e.g. a hidden or detached reference, or a collapsed range) â 799 // keep the existing reference rect rather than resetting to an invalid 800 // one with non-finite values. 801 if (!nativeClientRects.length) { 802 return {}; 803 } 804 const clientRects = getRectsByLine(nativeClientRects); 805 const fallback = rectToClientRect(getBoundingRect(nativeClientRects)); 806 const paddingObject = getPaddingObject(padding); 807 function getBoundingClientRect() { 808 // There are two rects and they are disjoined. 809 if (clientRects.length === 2 && (clientRects[0].left > clientRects[1].right || clientRects[1].left > clientRects[0].right) && x != null && y != null) { 810 // Find the first rect in which the point is fully inside. 811 return clientRects.find((rect)=>x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback; 812 } 813 // There are 2 or more connected rects. 814 if (clientRects.length >= 2) { 815 if (getSideAxis(placement) === 'y') { 816 const firstRect = clientRects[0]; 817 const lastRect = clientRects[clientRects.length - 1]; 818 const isTop = getSide(placement) === 'top'; 819 const top = firstRect.top; 820 const bottom = lastRect.bottom; 821 const left = isTop ? firstRect.left : lastRect.left; 822 const right = isTop ? firstRect.right : lastRect.right; 823 return rectToClientRect({ 824 x: left, 825 y: top, 826 width: right - left, 827 height: bottom - top 828 }); 829 } 830 const isLeftSide = getSide(placement) === 'left'; 831 const maxRight = max(...clientRects.map((rect)=>rect.right)); 832 const minLeft = min(...clientRects.map((rect)=>rect.left)); 833 const measureRects = clientRects.filter((rect)=>isLeftSide ? rect.left === minLeft : rect.right === maxRight); 834 const top = measureRects[0].top; 835 const bottom = measureRects[measureRects.length - 1].bottom; 836 return rectToClientRect({ 837 x: minLeft, 838 y: top, 839 width: maxRight - minLeft, 840 height: bottom - top 841 }); 842 } 843 return fallback; 844 } 845 const resetRects = await platform.getElementRects({ 846 reference: { 847 getBoundingClientRect 848 }, 849 floating: elements.floating, 850 strategy 851 }); 852 if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) { 853 return { 854 reset: { 855 rects: resetRects 856 } 857 }; 858 } 859 return {}; 860 } 861 }; 862}; 863const originSides = /*#__PURE__*/ new Set([ 864 'left', 865 'top' 866]); 867// For type backwards-compatibility, the `OffsetOptions` type was also 868// Derivable. 869async function convertValueToCoords(state, options) { 870 const { placement, platform, elements } = state; 871 const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)); 872 const side = getSide(placement); 873 const alignment = getAlignment(placement); 874 const isVertical = getSideAxis(placement) === 'y'; 875 const mainAxisMulti = originSides.has(side) ? -1 : 1; 876 const crossAxisMulti = rtl && isVertical ? -1 : 1; 877 const rawValue = evaluate(options, state); 878 // eslint-disable-next-line prefer-const 879 let { mainAxis, crossAxis, alignmentAxis } = typeof rawValue === 'number' ? { 880 mainAxis: rawValue, 881 crossAxis: 0, 882 alignmentAxis: null 883 } : { 884 mainAxis: rawValue.mainAxis || 0, 885 crossAxis: rawValue.crossAxis || 0, 886 alignmentAxis: rawValue.alignmentAxis 887 }; 888 if (alignment && typeof alignmentAxis === 'number') { 889 crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis; 890 } 891 return isVertical ? { 892 x: crossAxis * crossAxisMulti, 893 y: mainAxis * mainAxisMulti 894 } : { 895 x: mainAxis * mainAxisMulti, 896 y: crossAxis * crossAxisMulti 897 }; 898} 899/** 900 * Modifies the placement by translating the floating element along the 901 * specified axes. 902 * A number (shorthand for `mainAxis` or distance), or an axes configuration 903 * object may be passed. 904 * @see https://floating-ui.com/docs/offset 905 */ const offset = function(options) { 906 if (options === void 0) { 907 options = 0; 908 } 909 return { 910 name: 'offset', 911 options, 912 async fn (state) { 913 var _middlewareData$offse, _middlewareData$arrow; 914 const { x, y, placement, middlewareData } = state; 915 const diffCoords = await convertValueToCoords(state, options); 916 // If the placement is the same and the arrow caused an alignment offset 917 // then we don't need to change the positioning coordinates. 918 if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { 919 return {}; 920 } 921 return { 922 x: x + diffCoords.x, 923 y: y + diffCoords.y, 924 data: { 925 ...diffCoords, 926 placement 927 } 928 }; 929 } 930 }; 931}; 932/** 933 * Optimizes the visibility of the floating element by shifting it in order to 934 * keep it in view when it will overflow the clipping boundary. 935 * @see https://floating-ui.com/docs/shift 936 */ const shift = function(options) { 937 if (options === void 0) { 938 options = {}; 939 } 940 return { 941 name: 'shift', 942 options, 943 async fn (state) { 944 const { x, y, placement, platform } = state; 945 const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter = { 946 fn: (_ref)=>{ 947 let { x, y } = _ref; 948 return { 949 x, 950 y 951 }; 952 } 953 }, ...detectOverflowOptions } = evaluate(options, state); 954 const coords = { 955 x, 956 y 957 }; 958 const overflow = await platform.detectOverflow(state, detectOverflowOptions); 959 const crossAxis = getSideAxis(placement); 960 const mainAxis = getOppositeAxis(crossAxis); 961 let mainAxisCoord = coords[mainAxis]; 962 let crossAxisCoord = coords[crossAxis]; 963 const clampCoord = (axis, coord)=>clamp(coord + overflow[axis === 'y' ? 'top' : 'left'], coord, coord - overflow[axis === 'y' ? 'bottom' : 'right']); 964 if (checkMainAxis) { 965 mainAxisCoord = clampCoord(mainAxis, mainAxisCoord); 966 } 967 if (checkCrossAxis) { 968 crossAxisCoord = clampCoord(crossAxis, crossAxisCoord); 969 } 970 const limitedCoords = limiter.fn({ 971 ...state, 972 [mainAxis]: mainAxisCoord, 973 [crossAxis]: crossAxisCoord 974 }); 975 return { 976 ...limitedCoords, 977 data: { 978 x: limitedCoords.x - x, 979 y: limitedCoords.y - y, 980 enabled: { 981 [mainAxis]: checkMainAxis, 982 [crossAxis]: checkCrossAxis 983 } 984 } 985 }; 986 } 987 }; 988}; 989/**
990 * Built-in `limiter` that will stop `shift()` at a certain point. 991 */ const limitShift = function(options) { 992 if (options === void 0) { 993 options = {}; 994 } 995 return { 996 options, 997 fn (state) { 998 var _rawOffset$mainAxis, _rawOffset$crossAxis; 999 const { x, y, placement, rects, middlewareData } = state; 1000 const { offset = 0, mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true } = evaluate(options, state); 1001 const coords = { 1002 x, 1003 y 1004 }; 1005 const crossAxis = getSideAxis(placement); 1006 const mainAxis = getOppositeAxis(crossAxis); 1007 let mainAxisCoord = coords[mainAxis]; 1008 let crossAxisCoord = coords[crossAxis]; 1009 const rawOffset = evaluate(offset, state); 1010 const computedOffset = typeof rawOffset === 'number' ? { 1011 mainAxis: rawOffset, 1012 crossAxis: 0 1013 } : { 1014 mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0, 1015 crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0 1016 }; 1017 if (checkMainAxis) { 1018 const len = mainAxis === 'y' ? 'height' : 'width'; 1019 const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis; 1020 const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis; 1021 if (mainAxisCoord < limitMin) { 1022 mainAxisCoord = limitMin; 1023 } else if (mainAxisCoord > limitMax) { 1024 mainAxisCoord = limitMax; 1025 } 1026 } 1027 if (checkCrossAxis) { 1028 var _middlewareData$offse, _middlewareData$offse2; 1029 const len = mainAxis === 'y' ? 'width' : 'height'; 1030 const isOriginSide = originSides.has(getSide(placement)); 1031 const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis); 1032 const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0); 1033 if (crossAxisCoord < limitMin) { 1034 crossAxisCoord = limitMin; 1035 } else if (crossAxisCoord > limitMax) { 1036 crossAxisCoord = limitMax; 1037 } 1038 } 1039 return { 1040 [mainAxis]: mainAxisCoord, 1041 [crossAxis]: crossAxisCoord 1042 }; 1043 } 1044 }; 1045}; 1046// Method syntax keeps callback parameters bivariant, but expressing the 1047// explicit `| undefined` required by `exactOptionalPropertyTypes` needs 1048// property syntax, which is contravariant under `strictFunctionTypes`. 1049// Extracting the function from a method position restores that bivariance so 1050// consumers can still assign callbacks with narrower parameter types. 1051/** 1052 * Provides data that allows you to change the size of the floating element â 1053 * for instance, prevent it from overflowing the clipping boundary or match the 1054 * width of the reference element. 1055 * @see https://floating-ui.com/docs/size 1056 */ const size = function(options) { 1057 if (options === void 0) { 1058 options = {}; 1059 } 1060 return { 1061 name: 'size', 1062 options, 1063 async fn (state) { 1064 const { placement, rects, platform, elements } = state; 1065 const { apply = ()=>{}, ...detectOverflowOptions } = evaluate(options, state); 1066 const overflow = await platform.detectOverflow(state, detectOverflowOptions); 1067 const side = getSide(placement); 1068 const alignment = getAlignment(placement); 1069 const isYAxis = getSideAxis(placement) === 'y'; 1070 const { width, height } = rects.floating; 1071 let heightSide; 1072 let widthSide; 1073 if (side === 'top' || side === 'bottom') { 1074 heightSide = side; 1075 widthSide = alignment === (await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)) ? 'start' : 'end') ? 'left' : 'right'; 1076 } else { 1077 widthSide = side; 1078 heightSide = alignment === 'end' ? 'top' : 'bottom'; 1079 } 1080 const maximumClippingHeight = height - overflow.top - overflow.bottom; 1081 const maximumClippingWidth = width - overflow.left - overflow.right; 1082 const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight); 1083 const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth); 1084 const shiftData = state.middlewareData.shift; 1085 const noShift = !shiftData; 1086 let availableHeight = overflowAvailableHeight; 1087 let availableWidth = overflowAvailableWidth; 1088 if (shiftData != null && shiftData.enabled.x) { 1089 availableWidth = maximumClippingWidth; 1090 } 1091 if (shiftData != null && shiftData.enabled.y) { 1092 availableHeight = maximumClippingHeight; 1093 } 1094 if (noShift && !alignment) { 1095 if (isYAxis) { 1096 availableWidth = width - 2 * max(overflow.left, overflow.right); 1097 } else { 1098 availableHeight = height - 2 * max(overflow.top, overflow.bottom); 1099 } 1100 } 1101 await apply({ 1102 ...state, 1103 availableWidth, 1104 availableHeight 1105 }); 1106 const nextDimensions = await platform.getDimensions(elements.floating); 1107 if (width !== nextDimensions.width || height !== nextDimensions.height) { 1108 return { 1109 reset: { 1110 rects: true 1111 } 1112 }; 1113 } 1114 return {}; 1115 } 1116 }; 1117}; 1118; 1119__turbopack_context__.s([ 1120 "arrow", 1121 0, 1122 arrow, 1123 "autoPlacement", 1124 0, 1125 autoPlacement, 1126 "computePosition", 1127 0, 1128 computePosition, 1129 "detectOverflow", 1130 0, 1131 detectOverflow, 1132 "flip", 1133 0, 1134 flip, 1135 "hide", 1136 0, 1137 hide, 1138 "inline", 1139 0, 1140 inline, 1141 "limitShift", 1142 0, 1143 limitShift, 1144 "offset", 1145 0, 1146 offset, 1147 "shift", 1148 0, 1149 shift, 1150 "size", 1151 0, 1152 size 1153], 101534); 1154}), 1155229315, ((__turbopack_context__) => { 1156"use strict"; 1157 1158function hasWindow() { 1159 return typeof window !== 'undefined'; 1160} 1161function getNodeName(node) { 1162 if (isNode(node)) { 1163 return (node.nodeName || '').toLowerCase(); 1164 } 1165 // Mocked nodes in testing environments may not be instances of Node. By 1166 // returning `#document` an infinite loop won't occur. 1167 // https://github.com/floating-ui/floating-ui/issues/2317 1168 return '#document'; 1169} 1170function getWindow(node) { 1171 var _node$ownerDocument; 1172 return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window; 1173} 1174function getDocumentElement(node) { 1175 var _ref; 1176 return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement; 1177} 1178function isNode(value) { 1179 if (!hasWindow()) { 1180 return false;
vendor: 4,185 bytes, lines 1181-1298
1181 } 1182 return value instanceof Node || value instanceof getWindow(value).Node; 1183} 1184function isElement(value) { 1185 if (!hasWindow()) { 1186 return false; 1187 } 1188 return value instanceof Element || value instanceof getWindow(value).Element; 1189} 1190function isHTMLElement(value) { 1191 if (!hasWindow()) { 1192 return false; 1193 } 1194 return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement; 1195} 1196function isShadowRoot(value) { 1197 if (!hasWindow() || typeof ShadowRoot === 'undefined') { 1198 return false; 1199 } 1200 return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot; 1201} 1202function isOverflowElement(element) { 1203 const { overflow, overflowX, overflowY, display } = getComputedStyle(element); 1204 return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents'; 1205} 1206function isTableElement(element) { 1207 return /^(table|td|th)$/.test(getNodeName(element)); 1208} 1209function isTopLayer(element) { 1210 try { 1211 if (element.matches(':popover-open')) { 1212 return true; 1213 } 1214 } catch (_e) { 1215 // no-op 1216 } 1217 try { 1218 return element.matches(':modal'); 1219 } catch (_e) { 1220 return false; 1221 } 1222} 1223const willChangeRe = /transform|translate|scale|rotate|perspective|filter/; 1224const containRe = /paint|layout|strict|content/; 1225const isNotNone = (value)=>!!value && value !== 'none'; 1226let isWebKitValue; 1227function isContainingBlock(elementOrCss) { 1228 const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss; 1229 // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block 1230 // https://drafts.csswg.org/css-transforms-2/#individual-transforms 1231 return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || ''); 1232} 1233function getContainingBlock(element) { 1234 let currentNode = getParentNode(element); 1235 while(isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)){ 1236 if (isContainingBlock(currentNode)) { 1237 return currentNode; 1238 } else if (isTopLayer(currentNode)) { 1239 return null; 1240 } 1241 currentNode = getParentNode(currentNode); 1242 } 1243 return null; 1244} 1245function isWebKit() { 1246 if (isWebKitValue == null) { 1247 isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none'); 1248 } 1249 return isWebKitValue; 1250} 1251function isLastTraversableNode(node) { 1252 return /^(html|body|#document)$/.test(getNodeName(node)); 1253} 1254function getComputedStyle(element) { 1255 return getWindow(element).getComputedStyle(element); 1256} 1257function getNodeScroll(element) { 1258 if (isElement(element)) { 1259 return { 1260 scrollLeft: element.scrollLeft, 1261 scrollTop: element.scrollTop 1262 }; 1263 } 1264 return { 1265 scrollLeft: element.scrollX, 1266 scrollTop: element.scrollY 1267 }; 1268} 1269function getParentNode(node) { 1270 if (getNodeName(node) === 'html') { 1271 return node; 1272 } 1273 const result = // Step into the shadow DOM of the parent of a slotted node. 1274 node.assignedSlot || // DOM Element detected. 1275 node.parentNode || // ShadowRoot detected. 1276 isShadowRoot(node) && node.host || // Fallback. 1277 getDocumentElement(node); 1278 return isShadowRoot(result) ? result.host : result; 1279} 1280function getNearestOverflowAncestor(node) { 1281 const parentNode = getParentNode(node); 1282 if (isLastTraversableNode(parentNode)) { 1283 return (node.ownerDocument || node).body; 1284 } 1285 if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) { 1286 return parentNode; 1287 } 1288 return getNearestOverflowAncestor(parentNode); 1289} 1290function getOverflowAncestors(node, list, traverseIframes) { 1291 var _node$ownerDocument2; 1292 if (list === void 0) { 1293 list = []; 1294 } 1295 if (traverseIframes === void 0) { 1296 traverseIframes = true; 1297 } 1298 const scrollableAncestor = getNearestOverflowAncestor(node);
1299 const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body); 1300 const win = getWindow(scrollableAncestor); 1301 if (isBody) { 1302 const frameElement = getFrameElement(win); 1303 return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []); 1304 } else { 1305 return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes)); 1306 } 1307} 1308function getFrameElement(win) { 1309 return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null; 1310} 1311; 1312__turbopack_context__.s([ 1313 "getComputedStyle", 1314 0, 1315 getComputedStyle, 1316 "getContainingBlock", 1317 0, 1318 getContainingBlock, 1319 "getDocumentElement", 1320 0, 1321 getDocumentElement, 1322 "getFrameElement", 1323 0, 1324 getFrameElement, 1325 "getNodeName", 1326 0, 1327 getNodeName, 1328 "getNodeScroll", 1329 0, 1330 getNodeScroll, 1331 "getOverflowAncestors", 1332 0, 1333 getOverflowAncestors, 1334 "getParentNode", 1335 0, 1336 getParentNode, 1337 "getWindow", 1338 0, 1339 getWindow, 1340 "isContainingBlock", 1341 0, 1342 isContainingBlock, 1343 "isElement", 1344 0, 1345 isElement, 1346 "isHTMLElement", 1347 0, 1348 isHTMLElement, 1349 "isLastTraversableNode", 1350 0, 1351 isLastTraversableNode, 1352 "isNode", 1353 0, 1354 isNode, 1355 "isOverflowElement", 1356 0, 1357 isOverflowElement, 1358 "isShadowRoot", 1359 0, 1360 isShadowRoot, 1361 "isTableElement", 1362 0, 1363 isTableElement, 1364 "isTopLayer", 1365 0, 1366 isTopLayer, 1367 "isWebKit", 1368 0, 1369 isWebKit 1370]); 1371}), 1372258950, 953760, 1373((__turbopack_context__) => { 1374"use strict"; 1375 1376// MERGED MODULE: [project]/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs [app-client] (ecmascript) <locals> 1377; 1378// MERGED MODULE: [project]/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs [app-client] (ecmascript) <locals> 1379; 1380var __TURBOPACK__imported__module__343084__ = __turbopack_context__.i(343084); 1381var __TURBOPACK__imported__module__101534__ = __turbopack_context__.i(101534); 1382var __TURBOPACK__imported__module__229315__ = __turbopack_context__.i(229315); 1383; 1384; 1385; 1386; 1387function getCssDimensions(element) { 1388 const css = (0, __TURBOPACK__imported__module__229315__["getComputedStyle"])(element); 1389 // In testing environments, the `width` and `height` properties are empty 1390 // strings for SVG elements, returning NaN. Fallback to `0` in this case. 1391 let width = parseFloat(css.width) || 0; 1392 let height = parseFloat(css.height) || 0; 1393 const hasOffset = (0, __TURBOPACK__imported__module__229315__["isHTMLElement"])(element); 1394 const offsetWidth = hasOffset ? element.offsetWidth : width; 1395 const offsetHeight = hasOffset ? element.offsetHeight : height; 1396 const shouldFallback = (0, __TURBOPACK__imported__module__343084__["round"])(width) !== offsetWidth || (0, __TURBOPACK__imported__module__343084__["round"])(height) !== offsetHeight; 1397 if (shouldFallback) { 1398 width = offsetWidth; 1399 height = offsetHeight; 1400 } 1401 return { 1402 width, 1403 height, 1404 $: shouldFallback 1405 }; 1406} 1407function unwrapElement(element) { 1408 return !(0, __TURBOPACK__imported__module__229315__["isElement"])(element) ? element.contextElement : element; 1409} 1410function getScale(element) { 1411 const domElement = unwrapElement(element); 1412 if (!(0, __TURBOPACK__imported__module__229315__["isHTMLElement"])(domElement)) { 1413 return (0, __TURBOPACK__imported__module__343084__["createCoords"])(1); 1414 } 1415 const rect = domElement.getBoundingClientRect(); 1416 const { width, height, $ } = getCssDimensions(domElement); 1417 let x = ($ ? (0, __TURBOPACK__imported__module__343084__["round"])(rect.width) : rect.width) / width; 1418 let y = ($ ? (0, __TURBOPACK__imported__module__343084__["round"])(rect.height) : rect.height) / height; 1419 // 0, NaN, or Infinity should always fallback to 1. 1420 if (!x || !Number.isFinite(x)) { 1421 x = 1; 1422 } 1423 if (!y || !Number.isFinite(y)) { 1424 y = 1; 1425 } 1426 return { 1427 x, 1428 y 1429 }; 1430} 1431const noOffsets = /*#__PURE__*/ (0, __TURBOPACK__imported__module__343084__["createCoords"])(0); 1432function getVisualOffsets(element) { 1433 const win = (0, __TURBOPACK__imported__module__229315__["getWindow"])(element); 1434 if (!(0, __TURBOPACK__imported__module__229315__["isWebKit"])() || !win.visualVie
1434wport) { 1435 return noOffsets; 1436 } 1437 return { 1438 x: win.visualViewport.offsetLeft, 1439 y: win.visualViewport.offsetTop 1440 }; 1441} 1442function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) { 1443 if (isFixed === void 0) { 1444 isFixed = false; 1445 } 1446 return !!floatingOffsetParent && isFixed && floatingOffsetParent === (0, __TURBOPACK__imported__module__229315__["getWindow"])(element); 1447} 1448function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) { 1449 if (includeScale === void 0) { 1450 includeScale = false; 1451 } 1452 if (isFixedStrategy === void 0) { 1453 isFixedStrategy = false; 1454 } 1455 const clientRect = element.getBoundingClientRect(); 1456 const domElement = unwrapElement(element); 1457 let scale = (0, __TURBOPACK__imported__module__343084__["createCoords"])(1); 1458 if (includeScale) { 1459 if (offsetParent) { 1460 if ((0, __TURBOPACK__imported__module__229315__["isElement"])(offsetParent)) { 1461 scale = getScale(offsetParent); 1462 } 1463 } else { 1464 scale = getScale(element); 1465 } 1466 } 1467 const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : (0, __TURBOPACK__imported__module__343084__["createCoords"])(0); 1468 let x = (clientRect.left + visualOffsets.x) / scale.x; 1469 let y = (clientRect.top + visualOffsets.y) / scale.y; 1470 let width = clientRect.width / scale.x; 1471 let height = clientRect.height / scale.y; 1472 if (domElement && offsetParent) { 1473 const win = (0, __TURBOPACK__imported__module__229315__["getWindow"])(domElement); 1474 const offsetWin = (0, __TURBOPACK__imported__module__229315__["isElement"])(offsetParent) ? (0, __TURBOPACK__imported__module__229315__["getWindow"])(offsetParent) : offsetParent; 1475 let currentWin = win; 1476 let currentIFrame = (0, __TURBOPACK__imported__module__229315__["getFrameElement"])(currentWin); 1477 while(currentIFrame && offsetWin !== currentWin){ 1478 const iframeScale = getScale(currentIFrame); 1479 const iframeRect = currentIFrame.getBoundingClientRect(); 1480 const css = (0, __TURBOPACK__imported__module__229315__["getComputedStyle"])(currentIFrame); 1481 const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x; 1482 const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y; 1483 x *= iframeScale.x; 1484 y *= iframeScale.y; 1485 width *= iframeScale.x; 1486 height *= iframeScale.y; 1487 x += left; 1488 y += top; 1489 currentWin = (0, __TURBOPACK__imported__module__229315__["getWindow"])(currentIFrame); 1490 currentIFrame = (0, __TURBOPACK__imported__module__229315__["getFrameElement"])(currentWin); 1491 } 1492 } 1493 return (0, __TURBOPACK__imported__module__343084__["rectToClientRect"])({ 1494 width, 1495 height, 1496 x, 1497 y 1498 }); 1499} 1500// If <html> has a CSS width greater than the viewport, then this will be 1501// incorrect for RTL. 1502function getWindowScrollBarX(element, rect) { 1503 const leftScroll = (0, __TURBOPACK__imported__module__229315__["getNodeScroll"])(element).scrollLeft; 1504 if (!rect) { 1505 return getBoundingClientRect((0, __TURBOPACK__imported__module__229315__["getDocumentElement"])(element)).left + leftScroll; 1506 } 1507 return rect.left + leftScroll; 1508} 1509function getHTMLOffset(documentElement, scroll) { 1510 const htmlRect = documentElement.getBoundingClientRect(); 1511 const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect); 1512 const y = htmlRect.top + scroll.scrollTop; 1513 return { 1514 x, 1515 y 1516 }; 1517} 1518function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) { 1519 let { elements, rect, offsetParent, strategy } = _ref; 1520 const isFixed = strategy === 'fixed'; 1521 const documentElement = (0, __TURBOPACK__imported__module__229315__["getDocumentElement"])(offsetParent); 1522 const topLayer = elements ? (0, __TURBOPACK__imported__module__229315__["isTopLayer"])(elements.floating) : false;
1523 if (offsetParent === documentElement || topLayer && isFixed) { 1524 return rect; 1525 } 1526 let scroll = { 1527 scrollLeft: 0, 1528 scrollTop: 0 1529 }; 1530 let scale = (0, __TURBOPACK__imported__module__343084__["createCoords"])(1); 1531 const offsets = (0, __TURBOPACK__imported__module__343084__["createCoords"])(0); 1532 const isOffsetParentAnElement = (0, __TURBOPACK__imported__module__229315__["isHTMLElement"])(offsetParent); 1533 if (isOffsetParentAnElement || !isFixed) { 1534 if ((0, __TURBOPACK__imported__module__229315__["getNodeName"])(offsetParent) !== 'body' || (0, __TURBOPACK__imported__module__229315__["isOverflowElement"])(documentElement)) { 1535 scroll = (0, __TURBOPACK__imported__module__229315__["getNodeScroll"])(offsetParent); 1536 } 1537 if (isOffsetParentAnElement) { 1538 const offsetRect = getBoundingClientRect(offsetParent); 1539 scale = getScale(offsetParent); 1540 offsets.x = offsetRect.x + offsetParent.clientLeft; 1541 offsets.y = offsetRect.y + offsetParent.clientTop; 1542 } 1543 } 1544 const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : (0, __TURBOPACK__imported__module__343084__["createCoords"])(0); 1545 return { 1546 width: rect.width * scale.x, 1547 height: rect.height * scale.y, 1548 x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x, 1549 y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y 1550 }; 1551} 1552function getClientRects(element) { 1553 return element.getClientRects ? Array.from(element.getClientRects()) : []; 1554} 1555// Gets the entire size of the scrollable document area, even extending outside 1556// of the `<html>` and `<body>` rect bounds if horizontally scrollable. 1557function getDocumentRect(html) { 1558 const scroll = (0, __TURBOPACK__imported__module__229315__["getNodeScroll"])(html); 1559 const body = html.ownerDocument.body; 1560 const width = (0, __TURBOPACK__imported__module__343084__["max"])(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth); 1561 const height = (0, __TURBOPACK__imported__module__343084__["max"])(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight); 1562 let x = -scroll.scrollLeft + getWindowScrollBarX(html); 1563 const y = -scroll.scrollTop; 1564 if ((0, __TURBOPACK__imported__module__229315__["getComputedStyle"])(body).direction === 'rtl') { 1565 x += (0, __TURBOPACK__imported__module__343084__["max"])(html.clientWidth, body.clientWidth) - width; 1566 } 1567 return { 1568 width, 1569 height, 1570 x, 1571 y 1572 }; 1573} 1574// Safety check: ensure the scrollbar space is reasonable in case this 1575// calculation is affected by unusual styles. 1576// Most scrollbars leave 15-18px of space. 1577const SCROLLBAR_MAX = 25; 1578function getViewportRect(element, strategy, rootBoundary) { 1579 if (rootBoundary === void 0) { 1580 rootBoundary = 'viewport'; 1581 } 1582 const isLayoutViewport = rootBoundary === 'layoutViewport'; 1583 const win = (0, __TURBOPACK__imported__module__229315__["getWindow"])(element); 1584 const html = (0, __TURBOPACK__imported__module__229315__["getDocumentElement"])(element); 1585 const visualViewport = win.visualViewport; 1586 let width = html.clientWidth; 1587 let height = html.clientHeight; 1588 let x = 0; 1589 let y = 0; 1590 if (visualViewport) { 1591 // Client coordinates are relative to the layout viewport, except in 1592 // WebKit with an `absolute` strategy, where they are relative to the 1593 // visual viewport. 1594 const layoutRelativeClientCoords = !(0, __TURBOPACK__imported__module__229315__["isWebKit"])() || strategy === 'fixed'; 1595 if (isLayoutViewport) { 1596 if (!layoutRelativeClientCoords) { 1597 x = -visualViewport.offsetLeft; 1598 y = -visualViewport.offsetTop; 1599 } 1600 } else { 1601 width = visualViewport.width;
1602 height = visualViewport.height; 1603 if (layoutRelativeClientCoords) { 1604 x = visualViewport.offsetLeft; 1605 y = visualViewport.offsetTop; 1606 } 1607 } 1608 } 1609 const windowScrollbarX = getWindowScrollBarX(html); 1610 // `scrollbar-gutter: stable` on the <html> reserves gutter space that shrinks 1611 // the visual width but isn't reflected in `html.clientWidth`, so subtract it. 1612 // Only the inline-end (right) gutter can hold the scrollbar; `both-edges` also 1613 // reserves an empty inline-start gutter that clips nothing, so exclude just 1614 // the one scrollbar-side gutter â halve the measured (two-gutter) total. A 1615 // left-side scrollbar (`windowScrollbarX > 0`) is already handled by 1616 // `getHTMLOffset`/`visualViewport.width`; skip it here. 1617 if (windowScrollbarX <= 0) { 1618 const doc = html.ownerDocument; 1619 const body = doc.body; 1620 const bodyStyles = getComputedStyle(body); 1621 const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0; 1622 const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline); 1623 const gutter = getComputedStyle(html).scrollbarGutter === 'stable both-edges' ? reservedWidth / 2 : reservedWidth; 1624 if (gutter <= SCROLLBAR_MAX) { 1625 width -= gutter; 1626 } 1627 } 1628 return { 1629 width, 1630 height, 1631 x, 1632 y 1633 }; 1634} 1635// Returns the inner client rect, subtracting scrollbars if present. 1636function getInnerBoundingClientRect(element, strategy) { 1637 const clientRect = getBoundingClientRect(element, true, strategy === 'fixed'); 1638 const top = clientRect.top + element.clientTop; 1639 const left = clientRect.left + element.clientLeft; 1640 const scale = getScale(element); 1641 const width = element.clientWidth * scale.x; 1642 const height = element.clientHeight * scale.y; 1643 const x = left * scale.x; 1644 const y = top * scale.y; 1645 return { 1646 width, 1647 height, 1648 x, 1649 y 1650 }; 1651} 1652function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) { 1653 let rect; 1654 if (clippingAncestor === 'viewport' || clippingAncestor === 'layoutViewport') { 1655 rect = getViewportRect(element, strategy, clippingAncestor); 1656 } else if (clippingAncestor === 'document') { 1657 rect = getDocumentRect((0, __TURBOPACK__imported__module__229315__["getDocumentElement"])(element)); 1658 } else if ((0, __TURBOPACK__imported__module__229315__["isElement"])(clippingAncestor)) { 1659 rect = getInnerBoundingClientRect(clippingAncestor, strategy); 1660 } else { 1661 const visualOffsets = getVisualOffsets(element); 1662 rect = { 1663 x: clippingAncestor.x - visualOffsets.x, 1664 y: clippingAncestor.y - visualOffsets.y, 1665 width: clippingAncestor.width, 1666 height: clippingAncestor.height 1667 }; 1668 } 1669 return (0, __TURBOPACK__imported__module__343084__["rectToClientRect"])(rect); 1670} 1671// A "clipping ancestor" is an `overflow` element with the characteristic of 1672// clipping (or hiding) child elements. This returns all clipping ancestors 1673// of the given element up the tree. 1674function getClippingElementAncestors(element, cache) { 1675 const cachedResult = cache.get(element); 1676 if (cachedResult) { 1677 return cachedResult; 1678 } 1679 let result = (0, __TURBOPACK__imported__module__229315__["getOverflowAncestors"])(element, [], false).filter((el)=>(0, __TURBOPACK__imported__module__229315__["isElement"])(el) && (0, __TURBOPACK__imported__module__229315__["getNodeName"])(el) !== 'body'); 1680 let lastKeptComputedStyle = null; 1681 const elementIsFixed = (0, __TURBOPACK__imported__module__229315__["getComputedStyle"])(element).position === 'fixed'; 1682 let currentNode = elementIsFixed ? (0, __TURBOPACK__imported__module__229315__["getParentNode"])(element) : element; 1683 // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block 1684 while((0, __TURBOPACK__imported__module__229315__["isElement"])(currentNode) && !(0, __TURBOPACK__imported__module__229315__["isLastTraversableNode"])(currentNode)){ 1685 const computedStyle = (0, __TURBOPACK__imported__module__229315__["getComputedStyle"])(currentNode); 1686 const currentNodeIsContaining = (0, __TURBOPACK__imported__module__229315__["isContainingBlock"])(currentNode); 1687 // Position of the containing block chain below the current node. A fixed 1688 // element whose containing block hasn't been found yet is a fixed chain. 1689 const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? 'fixed' : ''; 1690 // A non-containing ancestor does not clip the element when the chain 1691 // below it escapes it: a fixed chain escapes all ancestors up to the 1692 // next containing block, an absolute chain escapes static ancestors. 1693 const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === 'fixed' || lastPosition === 'absolute' && computedStyle.position === 'static'); 1694 if (shouldDropCurrentNode) { 1695 // Drop non-containing blocks. 1696 result = result.filter((ancestor)=>ancestor !== currentNode); 1697 } else { 1698 // The kept node carries the chain position for the next iteration. 1699 lastKeptComputedStyle = computedStyle; 1700 } 1701 currentNode = (0, __TURBOPACK__imported__module__229315__["getParentNode"])(currentNode); 1702 } 1703 cache.set(element, result); 1704 return result; 1705} 1706// Gets the maximum area that the element is visible in due to any number of 1707// clipping ancestors.
1708function getClippingRect(_ref) { 1709 let { element, boundary, rootBoundary, strategy } = _ref; 1710 const elementClippingAncestors = boundary === 'clippingAncestors' ? (0, __TURBOPACK__imported__module__229315__["isTopLayer"])(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary); 1711 const clippingAncestors = [ 1712 ...elementClippingAncestors, 1713 rootBoundary 1714 ]; 1715 const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy); 1716 let top = firstRect.top; 1717 let right = firstRect.right; 1718 let bottom = firstRect.bottom; 1719 let left = firstRect.left; 1720 for(let i = 1; i < clippingAncestors.length; i++){ 1721 const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy); 1722 top = (0, __TURBOPACK__imported__module__343084__["max"])(rect.top, top); 1723 right = (0, __TURBOPACK__imported__module__343084__["min"])(rect.right, right); 1724 bottom = (0, __TURBOPACK__imported__module__343084__["min"])(rect.bottom, bottom); 1725 left = (0, __TURBOPACK__imported__module__343084__["max"])(rect.left, left); 1726 } 1727 return { 1728 width: right - left, 1729 height: bottom - top, 1730 x: left, 1731 y: top 1732 }; 1733} 1734function getDimensions(element) { 1735 const { width, height } = getCssDimensions(element); 1736 return { 1737 width, 1738 height 1739 }; 1740} 1741function getRectRelativeToOffsetParent(element, offsetParent, strategy) { 1742 const isOffsetParentAnElement = (0, __TURBOPACK__imported__module__229315__["isHTMLElement"])(offsetParent); 1743 const documentElement = (0, __TURBOPACK__imported__module__229315__["getDocumentElement"])(offsetParent); 1744 const isFixed = strategy === 'fixed'; 1745 const rect = getBoundingClientRect(element, true, isFixed, offsetParent); 1746 let scroll = { 1747 scrollLeft: 0, 1748 scrollTop: 0 1749 }; 1750 const offsets = (0, __TURBOPACK__imported__module__343084__["createCoords"])(0); 1751 if (isOffsetParentAnElement || !isFixed) { 1752 if ((0, __TURBOPACK__imported__module__229315__["getNodeName"])(offsetParent) !== 'body' || (0, __TURBOPACK__imported__module__229315__["isOverflowElement"])(documentElement)) { 1753 scroll = (0, __TURBOPACK__imported__module__229315__["getNodeScroll"])(offsetParent); 1754 } 1755 if (isOffsetParentAnElement) { 1756 const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent); 1757 offsets.x = offsetRect.x + offsetParent.clientLeft; 1758 offsets.y = offsetRect.y + offsetParent.clientTop; 1759 } 1760 } 1761 // If the <body> scrollbar appears on the left (e.g. RTL systems). Use 1762 // Firefox with layout.scrollbar.side = 3 in about:config to test this. 1763 if (!isOffsetParentAnElement && documentElement) { 1764 offsets.x = getWindowScrollBarX(documentElement); 1765 } 1766 const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : (0, __TURBOPACK__imported__module__343084__["createCoords"])(0); 1767 const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x; 1768 const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y; 1769 return { 1770 x, 1771 y, 1772 width: rect.width, 1773 height: rect.height 1774 }; 1775} 1776function isStaticPositioned(element) { 1777 return (0, __TURBOPACK__imported__module__229315__["getComputedStyle"])(element).position === 'static'; 1778} 1779function getTrueOffsetParent(element, polyfill) { 1780 if (!(0, __TURBOPACK__imported__module__229315__["isHTMLElement"])(element) || (0, __TURBOPACK__imported__module__229315__["getComputedStyle"])(element).position === 'fixed') { 1781 return null; 1782 } 1783 if (polyfill) { 1784 return polyfill(element); 1785 } 1786 let rawOffsetParent = element.offsetParent; 1787 // Firefox returns the <html> element as the offsetParent if it's non-static, 1788 // while Chrome and Safari return the <body> element. The <body> element must 1789 // be used to perform the correct calculations even if the <html> element is 1790 // non-static. 1791 if ((0, __TURBOPACK__imported__module__229315__["getDocumentElement"])(element) === rawOffsetParent) { 1792 rawOffsetParent = rawOffsetParent.ownerDocument.body; 1793 } 1794 return rawOffsetParent; 1795} 1796// Gets the closest ancestor positioned element. Handles some edge cases, 1797// such as table ancestors and cross browser bugs. 1798function getOffsetParent(element, polyfill) { 1799 const win = (0, __TURBOPACK__imported__module__229315__["getWindow"])(element); 1800 if ((0, __TURBOPACK__imported__module__229315__["isTopLayer"])(element)) { 1801 return win; 1802 } 1803 if (!(0, __TURBOPACK__imported__module__229315__["isHTMLElement"])(element)) { 1804 let svgOffsetParent = (0, __TURBOPACK__imported__module__229315__["getParentNode"])(element); 1805 while(svgOffsetParent && !(0, __TURBOPACK__imported__module__229315__["isLastTraversableNode"])(svgOffsetParent)){ 1806 if ((0, __TURBOPACK__imported__module__229315__["isElement"])(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) { 1807 return svgOffsetParent; 1808 } 1809 svgOffsetParent = (0, __TURBOPACK__imported__module__229315__["getParentNode"])(svgOffsetParent); 1810 } 1811 return win; 1812 } 1813 let offsetParent = getTrueOffsetParent(element, polyfill); 1814 while(offsetParent && (0, __TURBOPACK__imported__module__229315__["isTableElement"])(offsetParent) && isStaticPositioned(offsetParent)){ 1815 offsetParent = getTrueOffsetParent(offsetParent, polyfill); 1816 } 1817 if (offsetParent && (0, __TURBOPACK__imported__module__229315__["isLastTraversableNode"])(offsetParent) && isStaticPositioned(offsetParent) && !(0, __TURBOPACK__imported__module__229315__["isContainingBlock"])(offsetParent)) { 1818 return win; 1819 } 1820 return offsetParent || (0, __TURBOPACK__imported__module__229315__["getContainingBlock"])(element) || win; 1821} 1822const getElementRects = async function(data) { 1823 const getOffsetParentFn = this.getOffsetParent || getOffsetParent; 1824 const getDimensionsFn = this.getDimensions; 1825 const floatingDimensions = await getDimensionsFn(data.floating); 1826 return { 1827 reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy), 1828 floating: { 1829 x: 0, 1830 y: 0, 1831 width: floatingDimensions.width, 1832 height: floatingDimensions.height 1833 } 1834 }; 1835}; 1836function isRTL(element) { 1837 return (0, __TURBOPACK__imported__module__229315__["getComputedStyle"])(element).direction === 'rtl'; 1838} 1839const platform = { 1840 convertOffsetParentRelativeRectToViewportRelativeRect, 1841 getDocumentElement: __TURBOPACK__imported__module__229315__["getDocumentElement"], 1842 getClippingRect, 1843 getOffsetParent, 1844 getElementRects, 1845 getClientRects, 1846 getDimensions, 1847 getScale, 1848 isElement: __TURBOPACK__imported__module__229315__["isElement"], 1849 isRTL 1850}; 1851function rectsAreEqual(a, b) { 1852 return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height; 1853} 1854// https://samthor.au/2021/observing-dom/ 1855function observeMove(element, onMove, ancestorResize) { 1856 let io = null; 1857 let timeoutId; 1858 const root = (0, __TURBOPACK__imported__module__229315__["getDocumentElement"])(element); 1859 function cleanup() { 1860 var _io; 1861 clearTimeout(timeoutId); 1862 (_io = io) == null || _io.disconnect(); 1863 io = null; 1864 } 1865 function refresh(skip, threshold) { 1866 if (skip === void 0) { 1867 skip = false;
1868 } 1869 if (threshold === void 0) { 1870 threshold = 1; 1871 } 1872 cleanup(); 1873 const elementRectForRootMargin = element.getBoundingClientRect(); 1874 const { left, top, width, height } = elementRectForRootMargin; 1875 if (!skip) { 1876 onMove(); 1877 } 1878 if (!width || !height) { 1879 return; 1880 } 1881 const insetTop = (0, __TURBOPACK__imported__module__343084__["floor"])(top); 1882 const insetRight = (0, __TURBOPACK__imported__module__343084__["floor"])(root.clientWidth - (left + width)); 1883 const insetBottom = (0, __TURBOPACK__imported__module__343084__["floor"])(root.clientHeight - (top + height)); 1884 const insetLeft = (0, __TURBOPACK__imported__module__343084__["floor"])(left); 1885 const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px"; 1886 const options = { 1887 rootMargin, 1888 threshold: (0, __TURBOPACK__imported__module__343084__["max"])(0, (0, __TURBOPACK__imported__module__343084__["min"])(1, threshold)) || 1 1889 }; 1890 let isFirstUpdate = true; 1891 function handleObserve(entries) { 1892 const ratio = entries[0].intersectionRatio; 1893 // The entry is a snapshot, so the reference may have moved since the 1894 // intersection was computed (under performance constraints, or between 1895 // consecutive frames of a multi-frame layout shift). The reported ratio 1896 // and the observed area are stale in that case and cannot be trusted to 1897 // detect subsequent movement, so refresh regardless of the ratio. 1898 if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) { 1899 return refresh(); 1900 } 1901 if (ratio !== threshold) { 1902 if (!isFirstUpdate) { 1903 return refresh(); 1904 } 1905 if (!ratio) { 1906 // If the reference is clipped in place, the ratio is 0. Throttle 1907 // the refresh to prevent an infinite loop of updates. 1908 timeoutId = setTimeout(()=>{ 1909 refresh(false, 1e-7); 1910 }, 1000); 1911 } else { 1912 refresh(false, ratio); 1913 } 1914 } 1915 isFirstUpdate = false; 1916 } 1917 // Older browsers don't support a `document` as the root and will throw an 1918 // error. 1919 try { 1920 io = new IntersectionObserver(handleObserve, { 1921 ...options, 1922 // Handle <iframe>s 1923 root: root.ownerDocument 1924 }); 1925 } catch (_e) { 1926 io = new IntersectionObserver(handleObserve, options); 1927 } 1928 io.observe(element); 1929 } 1930 const win = (0, __TURBOPACK__imported__module__229315__["getWindow"])(element); 1931 // The window is a resize ancestor, so when `ancestorResize` is enabled its 1932 // listener already runs the update on resize. Here we only need to rebuild 1933 // the `IntersectionObserver` for the new root size, skipping a redundant 1934 // update. When `ancestorResize` is disabled, this becomes the sole update. 1935 const handleResize = ()=>refresh(ancestorResize); 1936 win.addEventListener('resize', handleResize); 1937 refresh(true); 1938 return ()=>{ 1939 win.removeEventListener('resize', handleResize); 1940 cleanup(); 1941 }; 1942} 1943/** 1944 * Automatically updates the position of the floating element when necessary. 1945 * Should only be called when the floating element is mounted on the DOM or 1946 * visible on the screen. 1947 * @returns cleanup function that should be invoked when the floating element is 1948 * removed from the DOM or hidden from the screen. 1949 * @see https://floating-ui.com/docs/autoUpdate 1950 */ function autoUpdate(reference, floating, update, options) { 1951 if (options === void 0) { 1952 options = {}; 1953 } 1954 const { ancestorScroll = true, ancestorResize = true, elementResize = typeof ResizeObserver === 'function', layoutShift = typeof IntersectionObserver === 'function', animationFrame = false } = options; 1955 const referenceEl = unwrapElement(reference); 1956 const ancestors = ancestorScroll || ancestorResize ? [ 1957 ...referenceEl ? (0, __TURBOPACK__imported__module__229315__["getOverflowAncestors"])(referenceEl) : [], 1958 ...floating ? (0, __TURBOPACK__imported__module__229315__["getOverflowAncestors"])(floating) : [] 1959 ] : [];
1960 ancestors.forEach((ancestor)=>{ 1961 ancestorScroll && ancestor.addEventListener('scroll', update); 1962 ancestorResize && ancestor.addEventListener('resize', update); 1963 }); 1964 const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update, ancestorResize) : null; 1965 let reobserveFrame = -1; 1966 let resizeObserver = null; 1967 if (elementResize) { 1968 resizeObserver = new ResizeObserver((_ref)=>{ 1969 let [firstEntry] = _ref; 1970 if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) { 1971 // Prevent update loops when using the `size` middleware. 1972 // https://github.com/floating-ui/floating-ui/issues/1740 1973 resizeObserver.unobserve(floating); 1974 cancelAnimationFrame(reobserveFrame); 1975 reobserveFrame = requestAnimationFrame(()=>{ 1976 var _resizeObserver; 1977 (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating); 1978 }); 1979 } 1980 update(); 1981 }); 1982 if (referenceEl && !animationFrame) { 1983 resizeObserver.observe(referenceEl); 1984 } 1985 if (floating) { 1986 resizeObserver.observe(floating); 1987 } 1988 } 1989 let frameId; 1990 let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null; 1991 if (animationFrame) { 1992 frameLoop(); 1993 } 1994 function frameLoop() { 1995 const nextRefRect = getBoundingClientRect(reference); 1996 if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) { 1997 update(); 1998 } 1999 prevRefRect = nextRefRect; 2000 frameId = requestAnimationFrame(frameLoop); 2001 } 2002 update(); 2003 return ()=>{ 2004 var _resizeObserver2; 2005 ancestors.forEach((ancestor)=>{ 2006 ancestorScroll && ancestor.removeEventListener('scroll', update); 2007 ancestorResize && ancestor.removeEventListener('resize', update); 2008 }); 2009 cleanupIo == null || cleanupIo(); 2010 (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect(); 2011 resizeObserver = null; 2012 if (animationFrame) { 2013 cancelAnimationFrame(frameId); 2014 } 2015 }; 2016} 2017/** 2018 * Resolves with an object of overflow side offsets that determine how much the 2019 * element is overflowing a given clipping boundary on each side. 2020 * - positive = overflowing the boundary by that number of pixels 2021 * - negative = how many pixels left before it will overflow 2022 * - 0 = lies flush with the boundary 2023 * @see https://floating-ui.com/docs/detectOverflow 2024 */ const detectOverflow = __TURBOPACK__imported__module__101534__["detectOverflow"]; 2025/** 2026 * Modifies the placement by translating the floating element along the 2027 * specified axes. 2028 * A number (shorthand for `mainAxis` or distance), or an axes configuration 2029 * object may be passed. 2030 * @see https://floating-ui.com/docs/offset 2031 */ const offset = __TURBOPACK__imported__module__101534__["offset"]; 2032/** 2033 * Optimizes the visibility of the floating element by choosing the placement 2034 * that has the most space available automatically, without needing to specify a 2035 * preferred placement. Alternative to `flip`. 2036 * @see https://floating-ui.com/docs/autoPlacement 2037 */ const autoPlacement = __TURBOPACK__imported__module__101534__["autoPlacement"]; 2038/** 2039 * Optimizes the visibility of the floating element by shifting it in order to 2040 * keep it in view when it will overflow the clipping boundary. 2041 * @see https://floating-ui.com/docs/shift 2042 */ const shift = __TURBOPACK__imported__module__101534__["shift"]; 2043/** 2044 * Optimizes the visibility of the floating element by flipping the `placement` 2045 * in order to keep it in view when the preferred placement(s) will overflow the 2046 * clipping boundary. Alternative to `autoPlacement`. 2047 * @see https://floating-ui.com/docs/flip 2048 */ const flip = __TURBOPACK__imported__module__101534__["flip"]; 2049/** 2050 * Provides data that allows you to change the size of the floating element â 2051 * for instance, prevent it from overflowing the clipping boundary or match the 2052 * width of the reference element. 2053 * @see https://floating-ui.com/docs/size 2054 */ const size = __TURBOPACK__imported__module__101534__["size"]; 2055/** 2056 * Provides data to hide the floating element in applicable situations, such as 2057 * when it is not in the same clipping context as the reference element. 2058 * @see https://floating-ui.com/docs/hide 2059 */ const hide = __TURBOPACK__imported__module__101534__["hide"]; 2060/** 2061 * Provides data to position an inner element of the floating element so that it 2062 * appears centered to the reference element. 2063 * @see https://floating-ui.com/docs/arrow 2064 */ const arrow = __TURBOPACK__imported__module__101534__["arrow"]; 2065/** 2066 * Provides improved positioning for inline reference elements that can span 2067 * over multiple lines, such as hyperlinks or range selections. 2068 * @see https://floating-ui.com/docs/inline 2069 */ const inline = __TURBOPACK__imported__module__101534__["inline"]; 2070/**
2071 * Built-in `limiter` that will stop `shift()` at a certain point. 2072 */ const limitShift = __TURBOPACK__imported__module__101534__["limitShift"]; 2073/** 2074 * Computes the `x` and `y` coordinates that will place the floating element 2075 * next to a given reference element. 2076 */ const computePosition = (reference, floating, options)=>{ 2077 // This caches the expensive `getClippingElementAncestors` function so that 2078 // multiple lifecycle resets re-use the same result. It only lives for a 2079 // single call. If other functions become expensive, we can add them as well. 2080 const cache = new Map(); 2081 const mergedOptions = options != null ? options : {}; 2082 const platformWithCache = { 2083 ...platform, 2084 ...mergedOptions.platform, 2085 _c: cache 2086 }; 2087 return (0, __TURBOPACK__imported__module__101534__["computePosition"])(reference, floating, { 2088 ...mergedOptions, 2089 platform: platformWithCache 2090 }); 2091}; 2092; 2093__turbopack_context__.s([ 2094 "arrow", 2095 0, 2096 arrow, 2097 "autoPlacement", 2098 0, 2099 autoPlacement, 2100 "autoUpdate", 2101 0, 2102 autoUpdate, 2103 "computePosition", 2104 0, 2105 computePosition, 2106 "detectOverflow", 2107 0, 2108 detectOverflow, 2109 "flip", 2110 0, 2111 flip, 2112 "hide", 2113 0, 2114 hide, 2115 "inline", 2116 0, 2117 inline, 2118 "limitShift", 2119 0, 2120 limitShift, 2121 "offset", 2122 0, 2123 offset, 2124 "shift", 2125 0, 2126 shift, 2127 "size", 2128 0, 2129 size 2130], 953760); 2131var __TURBOPACK__imported__module__271645__ = __turbopack_context__.i(271645); 2132var __TURBOPACK__imported__module__174080__ = __turbopack_context__.i(174080); 2133; 2134; 2135; 2136; 2137; 2138var isClient = typeof document !== 'undefined'; 2139var noop = function noop() {}; 2140var index = isClient ? __TURBOPACK__imported__module__271645__["useLayoutEffect"] : noop; 2141// Fork of `fast-deep-equal` that only does the comparisons we need and compares 2142// functions 2143function deepEqual(a, b) { 2144 if (a === b) { 2145 return true; 2146 } 2147 if (typeof a !== typeof b) { 2148 return false; 2149 } 2150 if (typeof a === 'function' && a.toString() === b.toString()) { 2151 return true; 2152 } 2153 let length; 2154 let i; 2155 let keys; 2156 if (a && b && typeof a === 'object') { 2157 if (Array.isArray(a)) { 2158 length = a.length; 2159 if (length !== b.length) return false; 2160 for(i = length; i-- !== 0;){ 2161 if (!deepEqual(a[i], b[i])) { 2162 return false; 2163 } 2164 } 2165 return true; 2166 } 2167 keys = Object.keys(a); 2168 length = keys.length; 2169 if (length !== Object.keys(b).length) { 2170 return false; 2171 } 2172 for(i = length; i-- !== 0;){ 2173 if (!({}).hasOwnProperty.call(b, keys[i])) { 2174 return false; 2175 } 2176 } 2177 for(i = length; i-- !== 0;){ 2178 const key = keys[i]; 2179 if (key === '_owner' && a.$$typeof) { 2180 continue; 2181 } 2182 if (!deepEqual(a[key], b[key])) { 2183 return false; 2184 } 2185 } 2186 return true; 2187 } 2188 return a !== a && b !== b; 2189} 2190function getDPR(element) { 2191 if (typeof window === 'undefined') { 2192 return 1; 2193 } 2194 const win = element.ownerDocument.defaultView || window; 2195 return win.devicePixelRatio || 1; 2196} 2197function roundByDPR(element, value) { 2198 const dpr = getDPR(element); 2199 return Math.round(value * dpr) / dpr; 2200} 2201function useLatestRef(value) { 2202 const ref = __TURBOPACK__imported__module__271645__["useRef"](value); 2203 index(()=>{ 2204 ref.current = value; 2205 }); 2206 return ref; 2207} 2208/** 2209 * Provides data to position a floating element. 2210 * @see https://floating-ui.com/docs/useFloating 2211 */ function useFloating(options) { 2212 if (options === void 0) { 2213 options = {}; 2214 } 2215 const { placement = 'bottom', strategy = 'absolute', middleware = [], platform, elements: { reference: externalReference, floating: externalFloating } = {}, transform = true, whileElementsMounted, open } = options; 2216 const [data, setData] = __TURBOPACK__imported__module__271645__["useState"]({ 2217 x: 0, 2218 y: 0, 2219 strategy, 2220 placement, 2221 middlewareData: {},
2222 isPositioned: false 2223 }); 2224 const [latestMiddleware, setLatestMiddleware] = __TURBOPACK__imported__module__271645__["useState"](middleware); 2225 if (!deepEqual(latestMiddleware, middleware)) { 2226 setLatestMiddleware(middleware); 2227 } 2228 const [_reference, _setReference] = __TURBOPACK__imported__module__271645__["useState"](null); 2229 const [_floating, _setFloating] = __TURBOPACK__imported__module__271645__["useState"](null); 2230 const setReference = __TURBOPACK__imported__module__271645__["useCallback"]((node)=>{ 2231 if (node !== referenceRef.current) { 2232 referenceRef.current = node; 2233 _setReference(node); 2234 } 2235 }, []); 2236 const setFloating = __TURBOPACK__imported__module__271645__["useCallback"]((node)=>{ 2237 if (node !== floatingRef.current) { 2238 floatingRef.current = node; 2239 _setFloating(node); 2240 } 2241 }, []); 2242 const referenceEl = externalReference || _reference; 2243 const floatingEl = externalFloating || _floating; 2244 const referenceRef = __TURBOPACK__imported__module__271645__["useRef"](null); 2245 const floatingRef = __TURBOPACK__imported__module__271645__["useRef"](null); 2246 const dataRef = __TURBOPACK__imported__module__271645__["useRef"](data); 2247 const hasWhileElementsMounted = whileElementsMounted != null; 2248 const whileElementsMountedRef = useLatestRef(whileElementsMounted); 2249 const platformRef = useLatestRef(platform); 2250 const openRef = useLatestRef(open); 2251 const update = __TURBOPACK__imported__module__271645__["useCallback"](()=>{ 2252 if (!referenceRef.current || !floatingRef.current) { 2253 return; 2254 } 2255 const config = { 2256 placement, 2257 strategy, 2258 middleware: latestMiddleware 2259 }; 2260 if (platformRef.current) { 2261 config.platform = platformRef.current; 2262 } 2263 computePosition(referenceRef.current, floatingRef.current, config).then((data)=>{ 2264 const fullData = { 2265 ...data, 2266 // The floating element's position may be recomputed while it's closed 2267 // but still mounted (such as when transitioning out). To ensure 2268 // `isPositioned` will be `false` initially on the next open, avoid 2269 // setting it to `true` when `open === false` (must be specified). 2270 isPositioned: openRef.current !== false 2271 }; 2272 if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) { 2273 dataRef.current = fullData; 2274 __TURBOPACK__imported__module__174080__["flushSync"](()=>{ 2275 setData(fullData); 2276 }); 2277 } 2278 }); 2279 }, [ 2280 latestMiddleware, 2281 placement, 2282 strategy, 2283 platformRef, 2284 openRef 2285 ]); 2286 index(()=>{ 2287 if (open === false && dataRef.current.isPositioned) { 2288 dataRef.current.isPositioned = false; 2289 setData((data)=>({ 2290 ...data, 2291 isPositioned: false 2292 })); 2293 } 2294 }, [ 2295 open 2296 ]); 2297 const isMountedRef = __TURBOPACK__imported__module__271645__["useRef"](false); 2298 index(()=>{ 2299 isMountedRef.current = true; 2300 return ()=>{ 2301 isMountedRef.current = false; 2302 }; 2303 }, []); 2304 index(()=>{ 2305 if (referenceEl) referenceRef.current = referenceEl; 2306 if (floatingEl) floatingRef.current = floatingEl; 2307 if (referenceEl && floatingEl) { 2308 if (whileElementsMountedRef.current) { 2309 return whileElementsMountedRef.current(referenceEl, floatingEl, update); 2310 } 2311 update(); 2312 } 2313 }, [ 2314 referenceEl, 2315 floatingEl, 2316 update, 2317 whileElementsMountedRef, 2318 hasWhileElementsMounted 2319 ]); 2320 const refs = __TURBOPACK__imported__module__271645__["useMemo"](()=>({ 2321 reference: referenceRef, 2322 floating: floatingRef, 2323 setReference, 2324 setFloating 2325 }), [ 2326 setReference, 2327 setFloating 2328 ]); 2329 const elements = __TURBOPACK__imported__module__271645__["useMemo"](()=>({ 2330 reference: referenceEl, 2331 floating: floatingEl 2332 }), [ 2333 referenceEl, 2334 floatingEl 2335 ]); 2336 const floatingStyles = __TURBOPACK__imported__module__271645__["useMemo"](()=>{ 2337 const initialStyles = { 2338 position: strategy, 2339 left: 0, 2340 top: 0 2341 }; 2342 if (!elements.floating) { 2343 return initialStyles; 2344 } 2345 const x = roundByDPR(elements.floating, data.x); 2346 const y = roundByDPR(elements.floating, data.y); 2347 if (transform) { 2348 return { 2349 ...initialStyles, 2350 transform: "translate(" + x + "px, " + y + "px)", 2351 ...getDPR(elements.floating) >= 1.5 && { 2352 willChange: 'transform' 2353 } 2354 }; 2355 } 2356 return { 2357 position: strategy, 2358 left: x, 2359 top: y 2360 }; 2361 }, [ 2362 strategy, 2363 transform, 2364 elements.floating, 2365 data.x, 2366 data.y 2367 ]); 2368 return __TURBOPACK__imported__module__271645__["useMemo"](()=>({ 2369 ...data, 2370 update, 2371 refs, 2372 elements, 2373 floatingStyles 2374 }), [ 2375 data, 2376 update, 2377 refs, 2378 elements, 2379 floatingStyles 2380 ]); 2381} 2382/** 2383 * Provides data to position an inner element of the floating element so that it 2384 * appears centered to the reference element. 2385 * This wraps the core `arrow` middleware to allow React refs as the element. 2386 * @see https://floating-ui.com/docs/arrow 2387 */ const arrow$1 = (options)=>{ 2388 function isRef(value) { 2389 return ({}).hasOwnProperty.call(value, 'current'); 2390 } 2391 return { 2392 name: 'arrow', 2393 options, 2394 fn (state) { 2395 const { element, padding } = typeof options === 'function' ? options(state) : options; 2396 if (element && isRef(element)) { 2397 if (element.current != null) { 2398 return arrow({ 2399 element: element.current, 2400 padding 2401 }).fn(state); 2402 } 2403 return {}; 2404 } 2405 if (element) { 2406 return arrow({ 2407 element, 2408 padding 2409 }).fn(state); 2410 } 2411 return {}; 2412 } 2413 }; 2414}; 2415/** 2416 * Modifies the placement by translating the floating element along the 2417 * specified axes. 2418 * A number (shorthand for `mainAxis` or distance), or an axes configuration 2419 * object may be passed. 2420 * @see https://floating-ui.com/docs/offset 2421 */ const offset1 = (options, deps)=>{ 2422 const result = offset(options); 2423 return { 2424 name: result.name, 2425 fn: result.fn, 2426 options: [ 2427 options, 2428 deps 2429 ] 2430 }; 2431}; 2432/** 2433 * Optimizes the visibility of the floating element by shifting it in order to 2434 * keep it in view when it will overflow the clipping boundary. 2435 * @see https://floating-ui.com/docs/shift 2436 */ const shift1 = (options, deps)=>{ 2437 const result = shift(options); 2438 return { 2439 name: result.name, 2440 fn: result.fn, 2441 options: [ 2442 options, 2443 deps 2444 ] 2445 }; 2446}; 2447/**
2448 * Built-in `limiter` that will stop `shift()` at a certain point. 2449 */ const limitShift1 = (options, deps)=>{ 2450 const result = limitShift(options); 2451 return { 2452 fn: result.fn, 2453 options: [ 2454 options, 2455 deps 2456 ] 2457 }; 2458}; 2459/** 2460 * Optimizes the visibility of the floating element by flipping the `placement` 2461 * in order to keep it in view when the preferred placement(s) will overflow the 2462 * clipping boundary. Alternative to `autoPlacement`. 2463 * @see https://floating-ui.com/docs/flip 2464 */ const flip1 = (options, deps)=>{ 2465 const result = flip(options); 2466 return { 2467 name: result.name, 2468 fn: result.fn, 2469 options: [ 2470 options, 2471 deps 2472 ] 2473 }; 2474}; 2475/** 2476 * Provides data that allows you to change the size of the floating element â 2477 * for instance, prevent it from overflowing the clipping boundary or match the 2478 * width of the reference element. 2479 * @see https://floating-ui.com/docs/size 2480 */ const size1 = (options, deps)=>{ 2481 const result = size(options); 2482 return { 2483 name: result.name, 2484 fn: result.fn, 2485 options: [ 2486 options, 2487 deps 2488 ] 2489 }; 2490}; 2491/** 2492 * Optimizes the visibility of the floating element by choosing the placement 2493 * that has the most space available automatically, without needing to specify a 2494 * preferred placement. Alternative to `flip`. 2495 * @see https://floating-ui.com/docs/autoPlacement 2496 */ const autoPlacement1 = (options, deps)=>{ 2497 const result = autoPlacement(options); 2498 return { 2499 name: result.name, 2500 fn: result.fn, 2501 options: [ 2502 options, 2503 deps 2504 ] 2505 }; 2506}; 2507/** 2508 * Provides data to hide the floating element in applicable situations, such as 2509 * when it is not in the same clipping context as the reference element. 2510 * @see https://floating-ui.com/docs/hide 2511 */ const hide1 = (options, deps)=>{ 2512 const result = hide(options); 2513 return { 2514 name: result.name, 2515 fn: result.fn, 2516 options: [ 2517 options, 2518 deps 2519 ] 2520 }; 2521}; 2522/** 2523 * Provides improved positioning for inline reference elements that can span 2524 * over multiple lines, such as hyperlinks or range selections. 2525 * @see https://floating-ui.com/docs/inline 2526 */ const inline1 = (options, deps)=>{ 2527 const result = inline(options); 2528 return { 2529 name: result.name, 2530 fn: result.fn, 2531 options: [ 2532 options, 2533 deps 2534 ] 2535 }; 2536}; 2537/** 2538 * Provides data to position an inner element of the floating element so that it 2539 * appears centered to the reference element. 2540 * This wraps the core `arrow` middleware to allow React refs as the element. 2541 * @see https://floating-ui.com/docs/arrow 2542 */ const arrow1 = (options, deps)=>{ 2543 const result = arrow$1(options); 2544 return { 2545 name: result.name, 2546 fn: result.fn, 2547 options: [ 2548 options, 2549 deps 2550 ] 2551 }; 2552}; 2553; 2554__turbopack_context__.s([ 2555 "arrow", 2556 0, 2557 arrow1, 2558 "flip", 2559 0, 2560 flip1, 2561 "hide", 2562 0, 2563 hide1, 2564 "limitShift", 2565 0, 2566 limitShift1, 2567 "offset", 2568 0, 2569 offset1, 2570 "shift", 2571 0, 2572 shift1, 2573 "size", 2574 0, 2575 size1, 2576 "useFloating", 2577 0, 2578 useFloating 2579], 258950); 2580}), 2581]); 2582 2583//# debugId=55850356-9edd-e176-a977-3f98cb8cb913
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.