: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
autoFocusOnShow: autoFocusEnabled
props = useDisclosureContent(_4R3V3JGP_spreadValues({ store }, props));
props = useFocusable(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { focusable }));
props = usePortal(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ portal }, props), { portalRef, preserveTabOrder }));
function createDialogComponent(Component, useProviderContext = useDialogProviderContext) {
return createComponent((props) => {
const context = useProviderContext();
const store = props.store || context;
const mounted = useStoreState(
(state) => !props.unmountOnHide || (state == null ? void 0 : state.mounted) || !!props.open
return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, _4R3V3JGP_spreadValues({}, props));
var Dialog = createDialogComponent(
createComponent((props) => {
const htmlProps = useDialog(props);
return _3ORBWXWF_createElement("div", htmlProps);
;// CONCATENATED MODULE: ./node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
const floating_ui_utils_sides = (/* unused pure expression or super */ null && (['top', 'right', 'bottom', 'left']));
const alignments = (/* unused pure expression or super */ null && (['start', 'end']));
const floating_ui_utils_placements = /*#__PURE__*/(/* unused pure expression or super */ null && (floating_ui_utils_sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), [])));
const floating_ui_utils_min = Math.min;
const floating_ui_utils_max = Math.max;
const round = Math.round;
const floor = Math.floor;
const createCoords = v => ({
const oppositeSideMap = {
const oppositeAlignmentMap = {
function clamp(start, value, end) {
return floating_ui_utils_max(start, floating_ui_utils_min(value, end));
function floating_ui_utils_evaluate(value, param) {
return typeof value === 'function' ? value(param) : value;
function floating_ui_utils_getSide(placement) {
return placement.split('-')[0];
function floating_ui_utils_getAlignment(placement) {
return placement.split('-')[1];
function getOppositeAxis(axis) {
return axis === 'x' ? 'y' : 'x';
function getAxisLength(axis) {
return axis === 'y' ? 'height' : 'width';
function floating_ui_utils_getSideAxis(placement) {
return ['top', 'bottom'].includes(floating_ui_utils_getSide(placement)) ? 'y' : 'x';
function getAlignmentAxis(placement) {
return getOppositeAxis(floating_ui_utils_getSideAxis(placement));
function floating_ui_utils_getAlignmentSides(placement, rects, rtl) {
const alignment = floating_ui_utils_getAlignment(placement);
const alignmentAxis = getAlignmentAxis(placement);
const length = getAxisLength(alignmentAxis);
let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
if (rects.reference[length] > rects.floating[length]) {
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
function getExpandedPlacements(placement) {
const oppositePlacement = getOppositePlacement(placement);
return [floating_ui_utils_getOppositeAlignmentPlacement(placement), oppositePlacement, floating_ui_utils_getOppositeAlignmentPlacement(oppositePlacement)];
function floating_ui_utils_getOppositeAlignmentPlacement(placement) {
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
function getSideList(side, isStart, rtl) {
const lr = ['left', 'right'];
const rl = ['right', 'left'];
const tb = ['top', 'bottom'];
const bt = ['bottom', 'top'];
if (rtl) return isStart ? rl : lr;
return isStart ? lr : rl;
return isStart ? tb : bt;
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
const alignment = floating_ui_utils_getAlignment(placement);
let list = getSideList(floating_ui_utils_getSide(placement), direction === 'start', rtl);
list = list.map(side => side + "-" + alignment);
list = list.concat(list.map(floating_ui_utils_getOppositeAlignmentPlacement));
function getOppositePlacement(placement) {
return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
function expandPaddingObject(padding) {
function floating_ui_utils_getPaddingObject(padding) {
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
function floating_ui_utils_rectToClientRect(rect) {
right: rect.x + rect.width,
bottom: rect.y + rect.height
;// CONCATENATED MODULE: ./node_modules/@floating-ui/core/dist/floating-ui.core.mjs
function computeCoordsFromPlacement(_ref, placement, rtl) {
const sideAxis = floating_ui_utils_getSideAxis(placement);
const alignmentAxis = getAlignmentAxis(placement);
const alignLength = getAxisLength(alignmentAxis);
const side = floating_ui_utils_getSide(placement);
const isVertical = sideAxis === 'y';
const commonX = reference.x + reference.width / 2 - floating.width / 2;
const commonY = reference.y + reference.height / 2 - floating.height / 2;
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
y: reference.y - floating.height
y: reference.y + reference.height
x: reference.x + reference.width,
x: reference.x - floating.width,
switch (floating_ui_utils_getAlignment(placement)) {
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
* Computes the `x` and `y` coordinates that will place the floating element
* next to a reference element when it is given a certain positioning strategy.
* This export does not have any `platform` interface logic. You will need to
* write one for the platform you are using Floating UI with.
const computePosition = async (reference, floating, config) => {
const validMiddleware = middleware.filter(Boolean);
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
let rects = await platform.getElementRects({
} = computeCoordsFromPlacement(rects, placement, rtl);
let statefulPlacement = placement;
for (let i = 0; i < validMiddleware.length; i++) {
initialPlacement: placement,
placement: statefulPlacement,
x = nextX != null ? nextX : x;
y = nextY != null ? nextY : y;
if (reset && resetCount <= 50) {
if (typeof reset === 'object') {
statefulPlacement = reset.placement;
rects = reset.rects === true ? await platform.getElementRects({
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
placement: statefulPlacement,
* Resolves with an object of overflow side offsets that determine how much the
* element is overflowing a given clipping boundary on each side.
* - positive = overflowing the boundary by that number of pixels
* - negative = how many pixels left before it will overflow
* - 0 = lies flush with the boundary
* @see https://floating-ui.com/docs/detectOverflow
async function detectOverflow(state, options) {
var _await$platform$isEle;
if (options === void 0) {
boundary = 'clippingAncestors',
rootBoundary = 'viewport',
elementContext = 'floating',
} = floating_ui_utils_evaluate(options, state);
const paddingObject = floating_ui_utils_getPaddingObject(padding);
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
const element = elements[altBoundary ? altContext : elementContext];
const clippingClientRect = floating_ui_utils_rectToClientRect(await platform.getClippingRect({
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))),
const rect = elementContext === 'floating' ? {
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
const elementClientRect = floating_ui_utils_rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
* Provides data to position an inner element of the floating element so that it
* appears centered to the reference element.
* @see https://floating-ui.com/docs/arrow
const arrow = options => ({
// Since `element` is required, we don't Partial<> the type.
} = floating_ui_utils_evaluate(options, state) || {};
const paddingObject = floating_ui_utils_getPaddingObject(padding);
const axis = getAlignmentAxis(placement);
const length = getAxisLength(axis);
const arrowDimensions = await platform.getDimensions(element);
const isYAxis = axis === 'y';
const minProp = isYAxis ? 'top' : 'left';
const maxProp = isYAxis ? 'bottom' : 'right';
const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
const startDiff = coords[axis] - rects.reference[axis];
const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
// DOM platform can return `window` as the `offsetParent`.
if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
clientSize = elements.floating[clientProp] || rects.floating[length];
const centerToReference = endDiff / 2 - startDiff / 2;
// If the padding is large enough that it causes the arrow to no longer be
// centered, modify the padding so that it is centered.
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
const minPadding = floating_ui_utils_min(paddingObject[minProp], largestPossiblePadding);
const maxPadding = floating_ui_utils_min(paddingObject[maxProp], largestPossiblePadding);
// Make sure the arrow doesn't overflow the floating element if the center
// point is outside the floating element's bounds.
const min$1 = minPadding;
const max = clientSize - arrowDimensions[length] - maxPadding;
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
const offset = clamp(min$1, center, max);
// If the reference is small enough that the arrow's padding causes it to
// to point to nothing for an aligned placement, adjust the offset of the
// floating element itself. To ensure `shift()` continues to take action,
// a single reset is performed when this is true.
const shouldAddOffset = !middlewareData.arrow && floating_ui_utils_getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
[axis]: coords[axis] + alignmentOffset,
centerOffset: center - offset - alignmentOffset,
function getPlacementList(alignment, autoAlignment, allowedPlacements) {
const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);
return allowedPlacementsSortedByAlignment.filter(placement => {
return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
* Optimizes the visibility of the floating element by choosing the placement
* that has the most space available automatically, without needing to specify a
* preferred placement. Alternative to `flip`.
* @see https://floating-ui.com/docs/autoPlacement
const autoPlacement = function (options) {
if (options === void 0) {
var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
allowedPlacements = placements,
} = evaluate(options, state);
const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
const overflow = await detectOverflow(state, detectOverflowOptions);
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
const currentPlacement = placements$1[currentIndex];
if (currentPlacement == null) {