: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
* prop or avoid re-executing effects when passed as a dependency
*/ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
const callbackRef = (0,external_React_namespaceObject.useRef)(callback);
(0,external_React_namespaceObject.useEffect)(()=>{
callbackRef.current = callback;
}); // https://github.com/facebook/react/issues/19240
return (0,external_React_namespaceObject.useMemo)(()=>(...args)=>{
var _callbackRef$current;
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js
function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: prop , defaultProp: defaultProp , onChange: onChange = ()=>{} }) {
const [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState({
defaultProp: defaultProp,
const isControlled = prop !== undefined;
const value1 = isControlled ? prop : uncontrolledProp;
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
const setValue = (0,external_React_namespaceObject.useCallback)((nextValue)=>{
const setter = nextValue;
const value = typeof nextValue === 'function' ? setter(prop) : nextValue;
if (value !== prop) handleChange(value);
} else setUncontrolledProp(nextValue);
function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: defaultProp , onChange: onChange }) {
const uncontrolledState = (0,external_React_namespaceObject.useState)(defaultProp);
const [value] = uncontrolledState;
const prevValueRef = (0,external_React_namespaceObject.useRef)(value);
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
(0,external_React_namespaceObject.useEffect)(()=>{
if (prevValueRef.current !== value) {
prevValueRef.current = value;
return uncontrolledState;
;// CONCATENATED MODULE: external "ReactDOM"
const external_ReactDOM_namespaceObject = window["ReactDOM"];
var external_ReactDOM_default = /*#__PURE__*/__webpack_require__.n(external_ReactDOM_namespaceObject);
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.module.js
/* -------------------------------------------------------------------------------------------------
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
const { children: children , ...slotProps } = props;
const childrenArray = external_React_namespaceObject.Children.toArray(children);
const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
// the new element to render is the one passed as a child of `Slottable`
const newElement = slottable.props.children;
const newChildren = childrenArray.map((child)=>{
if (child === slottable) {
// because the new element will be the one rendered, we are only interested
// in grabbing its children (`newElement.props.children`)
if (external_React_namespaceObject.Children.count(newElement) > 1) return external_React_namespaceObject.Children.only(null);
return /*#__PURE__*/ (0,external_React_namespaceObject.isValidElement)(newElement) ? newElement.props.children : null;
return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
}), /*#__PURE__*/ (0,external_React_namespaceObject.isValidElement)(newElement) ? /*#__PURE__*/ (0,external_React_namespaceObject.cloneElement)(newElement, undefined, newChildren) : null);
return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';
/* -------------------------------------------------------------------------------------------------
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
const { children: children , ...slotProps } = props;
if (/*#__PURE__*/ (0,external_React_namespaceObject.isValidElement)(children)) return /*#__PURE__*/ (0,external_React_namespaceObject.cloneElement)(children, {
...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
ref: $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref)
return external_React_namespaceObject.Children.count(children) > 1 ? external_React_namespaceObject.Children.only(null) : null;
$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';
/* -------------------------------------------------------------------------------------------------
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{
return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, children);
/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {
return /*#__PURE__*/ (0,external_React_namespaceObject.isValidElement)(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
// all child props should override
for(const propName in childProps){
const slotPropValue = slotProps[propName];
const childPropValue = childProps[propName];
const isHandler = /^on[A-Z]/.test(propName); // if it's a handler, modify the override by composing the base handler
if (isHandler) overrideProps[propName] = (...args)=>{
childPropValue === null || childPropValue === void 0 || childPropValue(...args);
slotPropValue === null || slotPropValue === void 0 || slotPropValue(...args);
else if (propName === 'style') overrideProps[propName] = {
else if (propName === 'className') overrideProps[propName] = [
].filter(Boolean).join(' ');
const $5e63c961fc1ce211$export$be92b6f5f03c0fe9 = (/* unused pure expression or super */ null && ($5e63c961fc1ce211$export$8c6ed5c666ac1360));
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.module.js
const $8927f6f2acc4f386$var$NODES = [
]; // Temporary while we await merge of this fix:
// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396
/* -------------------------------------------------------------------------------------------------
* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{
const Node = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
const { asChild: asChild , ...primitiveProps } = props;
const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
(0,external_React_namespaceObject.useEffect)(()=>{
window[Symbol.for('radix-ui')] = true;
return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)(Comp, _extends({}, primitiveProps, {
Node.displayName = `Primitive.${node}`;
/* -------------------------------------------------------------------------------------------------
* -----------------------------------------------------------------------------------------------*/ /**
* Flush custom event dispatch
* https://github.com/radix-ui/primitives/pull/1378
* React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.
* Internally, React prioritises events in the following order:
* https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350
* `discrete` is an important distinction as updates within these events are applied immediately.
* React however, is not able to infer the priority of custom event types due to how they are detected internally.
* Because of this, it's possible for updates from custom events to be unexpectedly batched when
* dispatched by another `discrete` event.
* In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
* This utility should be used when dispatching a custom event from within another `discrete` event, this utility
* is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
* dispatching a known click 👎
* target.dispatchEvent(new Event(‘click’))
* dispatching a custom type within a non-discrete event 👎
* onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}
* dispatching a custom type within a `discrete` event 👍
* onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}
* Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use
* this utility with them. This is because it's possible for those handlers to be called implicitly during render
* e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
*/ function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {
if (target) (0,external_ReactDOM_namespaceObject.flushSync)(()=>target.dispatchEvent(event)
/* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$be92b6f5f03c0fe9 = (/* unused pure expression or super */ null && ($8927f6f2acc4f386$export$250ffa63cdc0d034));
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.js
* Listens for when the escape key is down
*/ function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp) {
const onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp);
(0,external_React_namespaceObject.useEffect)(()=>{
const handleKeyDown = (event)=>{
if (event.key === 'Escape') onEscapeKeyDown(event);
document.addEventListener('keydown', handleKeyDown);
return ()=>document.removeEventListener('keydown', handleKeyDown)
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.js
/* -------------------------------------------------------------------------------------------------
* -----------------------------------------------------------------------------------------------*/ const $5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME = 'DismissableLayer';
const $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update';
const $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';
const $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';
let $5cb92bef7577960e$var$originalBodyPointerEvents;
const $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ (0,external_React_namespaceObject.createContext)({
layersWithOutsidePointerEventsDisabled: new Set(),
const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props;
const context = (0,external_React_namespaceObject.useContext)($5cb92bef7577960e$var$DismissableLayerContext);
const [node1, setNode] = (0,external_React_namespaceObject.useState)(null);
const [, force] = (0,external_React_namespaceObject.useState)({});
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setNode(node)
const layers = Array.from(context.layers);
const [highestLayerWithOutsidePointerEventsDisabled] = [
...context.layersWithOutsidePointerEventsDisabled
].slice(-1); // prettier-ignore
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); // prettier-ignore
const index = node1 ? layers.indexOf(node1) : -1;
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event)=>{
const target = event.target;
const isPointerDownOnBranch = [
].some((branch)=>branch.contains(target)
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event)=>{
const target = event.target;
const isFocusInBranch = [
].some((branch)=>branch.contains(target)
if (isFocusInBranch) return;
onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);
onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
$addc16e1bbe58fd0$export$3a72a57244d6e765((event)=>{
const isHighestLayer = index === context.layers.size - 1;
if (!isHighestLayer) return;
onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
if (!event.defaultPrevented && onDismiss) {
(0,external_React_namespaceObject.useEffect)(()=>{
if (disableOutsidePointerEvents) {
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
$5cb92bef7577960e$var$originalBodyPointerEvents = document.body.style.pointerEvents;
document.body.style.pointerEvents = 'none';
context.layersWithOutsidePointerEventsDisabled.add(node1);
context.layers.add(node1);
$5cb92bef7577960e$var$dispatchUpdate();
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) document.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;
disableOutsidePointerEvents,
* We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect
* because a change to `disableOutsidePointerEvents` would remove this layer from the stack
* and add it to the end again so the layering order wouldn't be _creation order_.
* We only want them to be removed from context stacks when unmounted.
*/ (0,external_React_namespaceObject.useEffect)(()=>{
context.layers.delete(node1);
context.layersWithOutsidePointerEventsDisabled.delete(node1);
$5cb92bef7577960e$var$dispatchUpdate();
(0,external_React_namespaceObject.useEffect)(()=>{
const handleUpdate = ()=>force({})
document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate)
return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, layerProps, {
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,
onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture),
onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture),
onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
/*#__PURE__*/ Object.assign($5cb92bef7577960e$export$177fb62ff3ec1f22, {
displayName: $5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME
/* -------------------------------------------------------------------------------------------------
* -----------------------------------------------------------------------------------------------*/ const $5cb92bef7577960e$var$BRANCH_NAME = 'DismissableLayerBranch';
const $5cb92bef7577960e$export$4d5eb2109db14228 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
const context = (0,external_React_namespaceObject.useContext)($5cb92bef7577960e$var$DismissableLayerContext);
const ref = (0,external_React_namespaceObject.useRef)(null);
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
(0,external_React_namespaceObject.useEffect)(()=>{
const node = ref.current;
context.branches.add(node);
context.branches.delete(node);
return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, props, {
/*#__PURE__*/ Object.assign($5cb92bef7577960e$export$4d5eb2109db14228, {
displayName: $5cb92bef7577960e$var$BRANCH_NAME
/* -----------------------------------------------------------------------------------------------*/ /**
* Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`
* to mimic layer dismissing behaviour present in OS.
* Returns props to pass to the node we want to check for outside events.
*/ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside) {
const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
const isPointerInsideReactTreeRef = (0,external_React_namespaceObject.useRef)(false);
const handleClickRef = (0,external_React_namespaceObject.useRef)(()=>{});
(0,external_React_namespaceObject.useEffect)(()=>{
const handlePointerDown = (event)=>{
if (event.target && !isPointerInsideReactTreeRef.current) {
function handleAndDispatchPointerDownOutsideEvent() {
$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
* On touch devices, we need to wait for a click event because browsers implement
* a ~350ms delay between the time the user stops touching the display and when the
* browser executres events. We need to ensure we don't reactivate pointer-events within
* this timeframe otherwise the browser may execute events that should have been prevented.
* Additionally, this also lets us deal automatically with cancellations when a click event
* isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.
* This is why we also continuously remove the previous listener, because we cannot be
* certain that it was raised, and therefore cleaned-up.
*/ if (event.pointerType === 'touch') {
document.removeEventListener('click', handleClickRef.current);
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
document.addEventListener('click', handleClickRef.current, {
} else handleAndDispatchPointerDownOutsideEvent();
isPointerInsideReactTreeRef.current = false;
* if this hook executes in a component that mounts via a `pointerdown` event, the event
* would bubble up to the document and trigger a `pointerDownOutside` event. We avoid
* this by delaying the event listener registration on the document.
* This is not React specific, but rather how the DOM works, ie:
* button.addEventListener('pointerdown', () => {
* console.log('I will log');
* document.addEventListener('pointerdown', () => {
* console.log('I will also log');
*/ const timerId = window.setTimeout(()=>{
document.addEventListener('pointerdown', handlePointerDown);
window.clearTimeout(timerId);
document.removeEventListener('pointerdown', handlePointerDown);
document.removeEventListener('click', handleClickRef.current);