"use strict"; (self["webpackChunk_core_volunteer_app"] = self["webpackChunk_core_volunteer_app"] || []).push([["vendors-node_modules_react-dom_client_js-node_modules_react-router-dom_dist_index_js-node_mod-48faa6"],{ /***/ "../../../node_modules/react-dom/client.js": /*!*************************************************!*\ !*** ../../../node_modules/react-dom/client.js ***! \*************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var m = __webpack_require__(/*! react-dom */ "../../../node_modules/react-dom/index.js"); if (false) // removed by dead control flow {} else { var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; exports.createRoot = function(c, o) { i.usingClientEntryPoint = true; try { return m.createRoot(c, o); } finally { i.usingClientEntryPoint = false; } }; exports.hydrateRoot = function(c, h, o) { i.usingClientEntryPoint = true; try { return m.hydrateRoot(c, h, o); } finally { i.usingClientEntryPoint = false; } }; } /***/ }), /***/ "../../../node_modules/react-dom/index.js": /*!************************************************!*\ !*** ../../../node_modules/react-dom/index.js ***! \************************************************/ /***/ ((module, __unused_webpack_exports, __webpack_require__) => { function checkDCE() { /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function' ) { return; } if (true) { // This branch is unreachable because this function is only called // in production, but the condition is true only in development. // Therefore if the branch is still here, dead code elimination wasn't // properly applied. // Don't change the message. React DevTools relies on it. Also make sure // this message doesn't occur elsewhere in this function, or it will cause // a false positive. throw new Error('^_^'); } // removed by dead control flow {} } if (false) // removed by dead control flow {} else { module.exports = __webpack_require__(/*! ./cjs/react-dom.development.js */ "../../../node_modules/react-dom/cjs/react-dom.development.js"); } /***/ }), /***/ "../../../node_modules/react-redux/dist/react-redux.mjs": /*!**************************************************************!*\ !*** ../../../node_modules/react-redux/dist/react-redux.mjs ***! \**************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Provider: () => (/* binding */ Provider_default), /* harmony export */ ReactReduxContext: () => (/* binding */ ReactReduxContext), /* harmony export */ batch: () => (/* binding */ batch), /* harmony export */ connect: () => (/* binding */ connect_default), /* harmony export */ createDispatchHook: () => (/* binding */ createDispatchHook), /* harmony export */ createSelectorHook: () => (/* binding */ createSelectorHook), /* harmony export */ createStoreHook: () => (/* binding */ createStoreHook), /* harmony export */ shallowEqual: () => (/* binding */ shallowEqual), /* harmony export */ useDispatch: () => (/* binding */ useDispatch), /* harmony export */ useSelector: () => (/* binding */ useSelector), /* harmony export */ useStore: () => (/* binding */ useStore) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../../../node_modules/react/index.js"); /* harmony import */ var use_sync_external_store_with_selector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! use-sync-external-store/with-selector.js */ "../../../node_modules/use-sync-external-store/with-selector.js"); // src/utils/react.ts // src/utils/react-is.ts var IS_REACT_19 = /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.version.startsWith("19"); var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for( IS_REACT_19 ? "react.transitional.element" : "react.element" ); var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"); var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"); var REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"); var REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"); var REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"); var REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"); var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"); var REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"); var REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for( "react.suspense_list" ); var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"); var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"); var REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for("react.offscreen"); var REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for( "react.client.reference" ); var ForwardRef = REACT_FORWARD_REF_TYPE; var Memo = REACT_MEMO_TYPE; function isValidElementType(type) { return typeof type === "string" || typeof type === "function" || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_OFFSCREEN_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || type.getModuleId !== void 0) ? true : false; } function typeOf(object) { if (typeof object === "object" && object !== null) { const { $$typeof } = object; switch ($$typeof) { case REACT_ELEMENT_TYPE: switch (object = object.type, object) { case REACT_FRAGMENT_TYPE: case REACT_PROFILER_TYPE: case REACT_STRICT_MODE_TYPE: case REACT_SUSPENSE_TYPE: case REACT_SUSPENSE_LIST_TYPE: return object; default: switch (object = object && object.$$typeof, object) { case REACT_CONTEXT_TYPE: case REACT_FORWARD_REF_TYPE: case REACT_LAZY_TYPE: case REACT_MEMO_TYPE: return object; case REACT_CONSUMER_TYPE: return object; default: return $$typeof; } } case REACT_PORTAL_TYPE: return $$typeof; } } } function isContextConsumer(object) { return IS_REACT_19 ? typeOf(object) === REACT_CONSUMER_TYPE : typeOf(object) === REACT_CONTEXT_TYPE; } function isMemo(object) { return typeOf(object) === REACT_MEMO_TYPE; } // src/utils/warning.ts function warning(message) { if (typeof console !== "undefined" && typeof console.error === "function") { console.error(message); } try { throw new Error(message); } catch (e) { } } // src/connect/verifySubselectors.ts function verify(selector, methodName) { if (!selector) { throw new Error(`Unexpected value for ${methodName} in connect.`); } else if (methodName === "mapStateToProps" || methodName === "mapDispatchToProps") { if (!Object.prototype.hasOwnProperty.call(selector, "dependsOnOwnProps")) { warning( `The selector for ${methodName} of connect did not specify a value for dependsOnOwnProps.` ); } } } function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps) { verify(mapStateToProps, "mapStateToProps"); verify(mapDispatchToProps, "mapDispatchToProps"); verify(mergeProps, "mergeProps"); } // src/connect/selectorFactory.ts function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, { areStatesEqual, areOwnPropsEqual, areStatePropsEqual }) { let hasRunAtLeastOnce = false; let state; let ownProps; let stateProps; let dispatchProps; let mergedProps; function handleFirstCall(firstState, firstOwnProps) { state = firstState; ownProps = firstOwnProps; stateProps = mapStateToProps(state, ownProps); dispatchProps = mapDispatchToProps(dispatch, ownProps); mergedProps = mergeProps(stateProps, dispatchProps, ownProps); hasRunAtLeastOnce = true; return mergedProps; } function handleNewPropsAndNewState() { stateProps = mapStateToProps(state, ownProps); if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); mergedProps = mergeProps(stateProps, dispatchProps, ownProps); return mergedProps; } function handleNewProps() { if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps); if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); mergedProps = mergeProps(stateProps, dispatchProps, ownProps); return mergedProps; } function handleNewState() { const nextStateProps = mapStateToProps(state, ownProps); const statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps); stateProps = nextStateProps; if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps); return mergedProps; } function handleSubsequentCalls(nextState, nextOwnProps) { const propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps); const stateChanged = !areStatesEqual( nextState, state, nextOwnProps, ownProps ); state = nextState; ownProps = nextOwnProps; if (propsChanged && stateChanged) return handleNewPropsAndNewState(); if (propsChanged) return handleNewProps(); if (stateChanged) return handleNewState(); return mergedProps; } return function pureFinalPropsSelector(nextState, nextOwnProps) { return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps); }; } function finalPropsSelectorFactory(dispatch, { initMapStateToProps, initMapDispatchToProps, initMergeProps, ...options }) { const mapStateToProps = initMapStateToProps(dispatch, options); const mapDispatchToProps = initMapDispatchToProps(dispatch, options); const mergeProps = initMergeProps(dispatch, options); if (true) { verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps); } return pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options); } // src/utils/bindActionCreators.ts function bindActionCreators(actionCreators, dispatch) { const boundActionCreators = {}; for (const key in actionCreators) { const actionCreator = actionCreators[key]; if (typeof actionCreator === "function") { boundActionCreators[key] = (...args) => dispatch(actionCreator(...args)); } } return boundActionCreators; } // src/utils/isPlainObject.ts function isPlainObject(obj) { if (typeof obj !== "object" || obj === null) return false; const proto = Object.getPrototypeOf(obj); if (proto === null) return true; let baseProto = proto; while (Object.getPrototypeOf(baseProto) !== null) { baseProto = Object.getPrototypeOf(baseProto); } return proto === baseProto; } // src/utils/verifyPlainObject.ts function verifyPlainObject(value, displayName, methodName) { if (!isPlainObject(value)) { warning( `${methodName}() in ${displayName} must return a plain object. Instead received ${value}.` ); } } // src/connect/wrapMapToProps.ts function wrapMapToPropsConstant(getConstant) { return function initConstantSelector(dispatch) { const constant = getConstant(dispatch); function constantSelector() { return constant; } constantSelector.dependsOnOwnProps = false; return constantSelector; }; } function getDependsOnOwnProps(mapToProps) { return mapToProps.dependsOnOwnProps ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1; } function wrapMapToPropsFunc(mapToProps, methodName) { return function initProxySelector(dispatch, { displayName }) { const proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch, void 0); }; proxy.dependsOnOwnProps = true; proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { proxy.mapToProps = mapToProps; proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); let props = proxy(stateOrDispatch, ownProps); if (typeof props === "function") { proxy.mapToProps = props; proxy.dependsOnOwnProps = getDependsOnOwnProps(props); props = proxy(stateOrDispatch, ownProps); } if (true) verifyPlainObject(props, displayName, methodName); return props; }; return proxy; }; } // src/connect/invalidArgFactory.ts function createInvalidArgFactory(arg, name) { return (dispatch, options) => { throw new Error( `Invalid value of type ${typeof arg} for ${name} argument when connecting component ${options.wrappedComponentName}.` ); }; } // src/connect/mapDispatchToProps.ts function mapDispatchToPropsFactory(mapDispatchToProps) { return mapDispatchToProps && typeof mapDispatchToProps === "object" ? wrapMapToPropsConstant( (dispatch) => ( // @ts-ignore bindActionCreators(mapDispatchToProps, dispatch) ) ) : !mapDispatchToProps ? wrapMapToPropsConstant((dispatch) => ({ dispatch })) : typeof mapDispatchToProps === "function" ? ( // @ts-ignore wrapMapToPropsFunc(mapDispatchToProps, "mapDispatchToProps") ) : createInvalidArgFactory(mapDispatchToProps, "mapDispatchToProps"); } // src/connect/mapStateToProps.ts function mapStateToPropsFactory(mapStateToProps) { return !mapStateToProps ? wrapMapToPropsConstant(() => ({})) : typeof mapStateToProps === "function" ? ( // @ts-ignore wrapMapToPropsFunc(mapStateToProps, "mapStateToProps") ) : createInvalidArgFactory(mapStateToProps, "mapStateToProps"); } // src/connect/mergeProps.ts function defaultMergeProps(stateProps, dispatchProps, ownProps) { return { ...ownProps, ...stateProps, ...dispatchProps }; } function wrapMergePropsFunc(mergeProps) { return function initMergePropsProxy(dispatch, { displayName, areMergedPropsEqual }) { let hasRunOnce = false; let mergedProps; return function mergePropsProxy(stateProps, dispatchProps, ownProps) { const nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps); if (hasRunOnce) { if (!areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps; } else { hasRunOnce = true; mergedProps = nextMergedProps; if (true) verifyPlainObject(mergedProps, displayName, "mergeProps"); } return mergedProps; }; }; } function mergePropsFactory(mergeProps) { return !mergeProps ? () => defaultMergeProps : typeof mergeProps === "function" ? wrapMergePropsFunc(mergeProps) : createInvalidArgFactory(mergeProps, "mergeProps"); } // src/utils/batch.ts function defaultNoopBatch(callback) { callback(); } // src/utils/Subscription.ts function createListenerCollection() { let first = null; let last = null; return { clear() { first = null; last = null; }, notify() { defaultNoopBatch(() => { let listener = first; while (listener) { listener.callback(); listener = listener.next; } }); }, get() { const listeners = []; let listener = first; while (listener) { listeners.push(listener); listener = listener.next; } return listeners; }, subscribe(callback) { let isSubscribed = true; const listener = last = { callback, next: null, prev: last }; if (listener.prev) { listener.prev.next = listener; } else { first = listener; } return function unsubscribe() { if (!isSubscribed || first === null) return; isSubscribed = false; if (listener.next) { listener.next.prev = listener.prev; } else { last = listener.prev; } if (listener.prev) { listener.prev.next = listener.next; } else { first = listener.next; } }; } }; } var nullListeners = { notify() { }, get: () => [] }; function createSubscription(store, parentSub) { let unsubscribe; let listeners = nullListeners; let subscriptionsAmount = 0; let selfSubscribed = false; function addNestedSub(listener) { trySubscribe(); const cleanupListener = listeners.subscribe(listener); let removed = false; return () => { if (!removed) { removed = true; cleanupListener(); tryUnsubscribe(); } }; } function notifyNestedSubs() { listeners.notify(); } function handleChangeWrapper() { if (subscription.onStateChange) { subscription.onStateChange(); } } function isSubscribed() { return selfSubscribed; } function trySubscribe() { subscriptionsAmount++; if (!unsubscribe) { unsubscribe = parentSub ? parentSub.addNestedSub(handleChangeWrapper) : store.subscribe(handleChangeWrapper); listeners = createListenerCollection(); } } function tryUnsubscribe() { subscriptionsAmount--; if (unsubscribe && subscriptionsAmount === 0) { unsubscribe(); unsubscribe = void 0; listeners.clear(); listeners = nullListeners; } } function trySubscribeSelf() { if (!selfSubscribed) { selfSubscribed = true; trySubscribe(); } } function tryUnsubscribeSelf() { if (selfSubscribed) { selfSubscribed = false; tryUnsubscribe(); } } const subscription = { addNestedSub, notifyNestedSubs, handleChangeWrapper, isSubscribed, trySubscribe: trySubscribeSelf, tryUnsubscribe: tryUnsubscribeSelf, getListeners: () => listeners }; return subscription; } // src/utils/useIsomorphicLayoutEffect.ts var canUseDOM = () => !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined"); var isDOM = /* @__PURE__ */ canUseDOM(); var isRunningInReactNative = () => typeof navigator !== "undefined" && navigator.product === "ReactNative"; var isReactNative = /* @__PURE__ */ isRunningInReactNative(); var getUseIsomorphicLayoutEffect = () => isDOM || isReactNative ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_0__.useEffect; var useIsomorphicLayoutEffect = /* @__PURE__ */ getUseIsomorphicLayoutEffect(); // src/utils/shallowEqual.ts function is(x, y) { if (x === y) { return x !== 0 || y !== 0 || 1 / x === 1 / y; } else { return x !== x && y !== y; } } function shallowEqual(objA, objB) { if (is(objA, objB)) return true; if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) { return false; } const keysA = Object.keys(objA); const keysB = Object.keys(objB); if (keysA.length !== keysB.length) return false; for (let i = 0; i < keysA.length; i++) { if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { return false; } } return true; } // src/utils/hoistStatics.ts var REACT_STATICS = { childContextTypes: true, contextType: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, getDerivedStateFromError: true, getDerivedStateFromProps: true, mixins: true, propTypes: true, type: true }; var KNOWN_STATICS = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }; var FORWARD_REF_STATICS = { $$typeof: true, render: true, defaultProps: true, displayName: true, propTypes: true }; var MEMO_STATICS = { $$typeof: true, compare: true, defaultProps: true, displayName: true, propTypes: true, type: true }; var TYPE_STATICS = { [ForwardRef]: FORWARD_REF_STATICS, [Memo]: MEMO_STATICS }; function getStatics(component) { if (isMemo(component)) { return MEMO_STATICS; } return TYPE_STATICS[component["$$typeof"]] || REACT_STATICS; } var defineProperty = Object.defineProperty; var getOwnPropertyNames = Object.getOwnPropertyNames; var getOwnPropertySymbols = Object.getOwnPropertySymbols; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var getPrototypeOf = Object.getPrototypeOf; var objectPrototype = Object.prototype; function hoistNonReactStatics(targetComponent, sourceComponent) { if (typeof sourceComponent !== "string") { if (objectPrototype) { const inheritedComponent = getPrototypeOf(sourceComponent); if (inheritedComponent && inheritedComponent !== objectPrototype) { hoistNonReactStatics(targetComponent, inheritedComponent); } } let keys = getOwnPropertyNames(sourceComponent); if (getOwnPropertySymbols) { keys = keys.concat(getOwnPropertySymbols(sourceComponent)); } const targetStatics = getStatics(targetComponent); const sourceStatics = getStatics(sourceComponent); for (let i = 0; i < keys.length; ++i) { const key = keys[i]; if (!KNOWN_STATICS[key] && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) { const descriptor = getOwnPropertyDescriptor(sourceComponent, key); try { defineProperty(targetComponent, key, descriptor); } catch (e) { } } } } return targetComponent; } // src/components/Context.ts var ContextKey = /* @__PURE__ */ Symbol.for(`react-redux-context`); var gT = typeof globalThis !== "undefined" ? globalThis : ( /* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */ {} ); function getContext() { if (!react__WEBPACK_IMPORTED_MODULE_0__.createContext) return {}; const contextMap = gT[ContextKey] ??= /* @__PURE__ */ new Map(); let realContext = contextMap.get(react__WEBPACK_IMPORTED_MODULE_0__.createContext); if (!realContext) { realContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext( null ); if (true) { realContext.displayName = "ReactRedux"; } contextMap.set(react__WEBPACK_IMPORTED_MODULE_0__.createContext, realContext); } return realContext; } var ReactReduxContext = /* @__PURE__ */ getContext(); // src/components/connect.tsx var NO_SUBSCRIPTION_ARRAY = [null, null]; var stringifyComponent = (Comp) => { try { return JSON.stringify(Comp); } catch (err) { return String(Comp); } }; function useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) { useIsomorphicLayoutEffect(() => effectFunc(...effectArgs), dependencies); } function captureWrapperProps(lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, childPropsFromStoreUpdate, notifyNestedSubs) { lastWrapperProps.current = wrapperProps; renderIsScheduled.current = false; if (childPropsFromStoreUpdate.current) { childPropsFromStoreUpdate.current = null; notifyNestedSubs(); } } function subscribeUpdates(shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, isMounted, childPropsFromStoreUpdate, notifyNestedSubs, additionalSubscribeListener) { if (!shouldHandleStateChanges) return () => { }; let didUnsubscribe = false; let lastThrownError = null; const checkForUpdates = () => { if (didUnsubscribe || !isMounted.current) { return; } const latestStoreState = store.getState(); let newChildProps, error; try { newChildProps = childPropsSelector( latestStoreState, lastWrapperProps.current ); } catch (e) { error = e; lastThrownError = e; } if (!error) { lastThrownError = null; } if (newChildProps === lastChildProps.current) { if (!renderIsScheduled.current) { notifyNestedSubs(); } } else { lastChildProps.current = newChildProps; childPropsFromStoreUpdate.current = newChildProps; renderIsScheduled.current = true; additionalSubscribeListener(); } }; subscription.onStateChange = checkForUpdates; subscription.trySubscribe(); checkForUpdates(); const unsubscribeWrapper = () => { didUnsubscribe = true; subscription.tryUnsubscribe(); subscription.onStateChange = null; if (lastThrownError) { throw lastThrownError; } }; return unsubscribeWrapper; } function strictEqual(a, b) { return a === b; } var hasWarnedAboutDeprecatedPureOption = false; function connect(mapStateToProps, mapDispatchToProps, mergeProps, { // The `pure` option has been removed, so TS doesn't like us destructuring this to check its existence. // @ts-ignore pure, areStatesEqual = strictEqual, areOwnPropsEqual = shallowEqual, areStatePropsEqual = shallowEqual, areMergedPropsEqual = shallowEqual, // use React's forwardRef to expose a ref of the wrapped component forwardRef = false, // the context consumer to use context = ReactReduxContext } = {}) { if (true) { if (pure !== void 0 && !hasWarnedAboutDeprecatedPureOption) { hasWarnedAboutDeprecatedPureOption = true; warning( 'The `pure` option has been removed. `connect` is now always a "pure/memoized" component' ); } } const Context = context; const initMapStateToProps = mapStateToPropsFactory(mapStateToProps); const initMapDispatchToProps = mapDispatchToPropsFactory(mapDispatchToProps); const initMergeProps = mergePropsFactory(mergeProps); const shouldHandleStateChanges = Boolean(mapStateToProps); const wrapWithConnect = (WrappedComponent) => { if (true) { const isValid = /* @__PURE__ */ isValidElementType(WrappedComponent); if (!isValid) throw new Error( `You must pass a component to the function returned by connect. Instead received ${stringifyComponent( WrappedComponent )}` ); } const wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || "Component"; const displayName = `Connect(${wrappedComponentName})`; const selectorFactoryOptions = { shouldHandleStateChanges, displayName, wrappedComponentName, WrappedComponent, // @ts-ignore initMapStateToProps, initMapDispatchToProps, initMergeProps, areStatesEqual, areStatePropsEqual, areOwnPropsEqual, areMergedPropsEqual }; function ConnectFunction(props) { const [propsContext, reactReduxForwardedRef, wrapperProps] = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => { const { reactReduxForwardedRef: reactReduxForwardedRef2, ...wrapperProps2 } = props; return [props.context, reactReduxForwardedRef2, wrapperProps2]; }, [props]); const ContextToUse = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => { let ResultContext = Context; if (propsContext?.Consumer) { if (true) { const isValid = /* @__PURE__ */ isContextConsumer( // @ts-ignore /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(propsContext.Consumer, null) ); if (!isValid) { throw new Error( "You must pass a valid React context consumer as `props.context`" ); } ResultContext = propsContext; } } return ResultContext; }, [propsContext, Context]); const contextValue = react__WEBPACK_IMPORTED_MODULE_0__.useContext(ContextToUse); const didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch); const didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store); if ( true && !didStoreComeFromProps && !didStoreComeFromContext) { throw new Error( `Could not find "store" in the context of "${displayName}". Either wrap the root component in a , or pass a custom React context provider to and the corresponding React context consumer to ${displayName} in connect options.` ); } const store = didStoreComeFromProps ? props.store : contextValue.store; const getServerState = didStoreComeFromContext ? contextValue.getServerState : store.getState; const childPropsSelector = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => { return finalPropsSelectorFactory(store.dispatch, selectorFactoryOptions); }, [store]); const [subscription, notifyNestedSubs] = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => { if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY; const subscription2 = createSubscription( store, didStoreComeFromProps ? void 0 : contextValue.subscription ); const notifyNestedSubs2 = subscription2.notifyNestedSubs.bind(subscription2); return [subscription2, notifyNestedSubs2]; }, [store, didStoreComeFromProps, contextValue]); const overriddenContextValue = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => { if (didStoreComeFromProps) { return contextValue; } return { ...contextValue, subscription }; }, [didStoreComeFromProps, contextValue, subscription]); const lastChildProps = react__WEBPACK_IMPORTED_MODULE_0__.useRef(void 0); const lastWrapperProps = react__WEBPACK_IMPORTED_MODULE_0__.useRef(wrapperProps); const childPropsFromStoreUpdate = react__WEBPACK_IMPORTED_MODULE_0__.useRef(void 0); const renderIsScheduled = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false); const isMounted = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false); const latestSubscriptionCallbackError = react__WEBPACK_IMPORTED_MODULE_0__.useRef( void 0 ); useIsomorphicLayoutEffect(() => { isMounted.current = true; return () => { isMounted.current = false; }; }, []); const actualChildPropsSelector = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => { const selector = () => { if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) { return childPropsFromStoreUpdate.current; } return childPropsSelector(store.getState(), wrapperProps); }; return selector; }, [store, wrapperProps]); const subscribeForReact = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => { const subscribe = (reactListener) => { if (!subscription) { return () => { }; } return subscribeUpdates( shouldHandleStateChanges, store, subscription, // @ts-ignore childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, isMounted, childPropsFromStoreUpdate, notifyNestedSubs, reactListener ); }; return subscribe; }, [subscription]); useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [ lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, childPropsFromStoreUpdate, notifyNestedSubs ]); let actualChildProps; try { actualChildProps = react__WEBPACK_IMPORTED_MODULE_0__.useSyncExternalStore( // TODO We're passing through a big wrapper that does a bunch of extra side effects besides subscribing subscribeForReact, // TODO This is incredibly hacky. We've already processed the store update and calculated new child props, // TODO and we're just passing that through so it triggers a re-render for us rather than relying on `uSES`. actualChildPropsSelector, getServerState ? () => childPropsSelector(getServerState(), wrapperProps) : actualChildPropsSelector ); } catch (err) { if (latestSubscriptionCallbackError.current) { ; err.message += ` The error may be correlated with this previous error: ${latestSubscriptionCallbackError.current.stack} `; } throw err; } useIsomorphicLayoutEffect(() => { latestSubscriptionCallbackError.current = void 0; childPropsFromStoreUpdate.current = void 0; lastChildProps.current = actualChildProps; }); const renderedWrappedComponent = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => { return ( // @ts-ignore /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement( WrappedComponent, { ...actualChildProps, ref: reactReduxForwardedRef } ) ); }, [reactReduxForwardedRef, WrappedComponent, actualChildProps]); const renderedChild = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => { if (shouldHandleStateChanges) { return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(ContextToUse.Provider, { value: overriddenContextValue }, renderedWrappedComponent); } return renderedWrappedComponent; }, [ContextToUse, renderedWrappedComponent, overriddenContextValue]); return renderedChild; } const _Connect = react__WEBPACK_IMPORTED_MODULE_0__.memo(ConnectFunction); const Connect = _Connect; Connect.WrappedComponent = WrappedComponent; Connect.displayName = ConnectFunction.displayName = displayName; if (forwardRef) { const _forwarded = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( function forwardConnectRef(props, ref) { return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(Connect, { ...props, reactReduxForwardedRef: ref }); } ); const forwarded = _forwarded; forwarded.displayName = displayName; forwarded.WrappedComponent = WrappedComponent; return /* @__PURE__ */ hoistNonReactStatics(forwarded, WrappedComponent); } return /* @__PURE__ */ hoistNonReactStatics(Connect, WrappedComponent); }; return wrapWithConnect; } var connect_default = connect; // src/components/Provider.tsx function Provider(providerProps) { const { children, context, serverState, store } = providerProps; const contextValue = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => { const subscription = createSubscription(store); const baseContextValue = { store, subscription, getServerState: serverState ? () => serverState : void 0 }; if (false) // removed by dead control flow {} else { const { identityFunctionCheck = "once", stabilityCheck = "once" } = providerProps; return /* @__PURE__ */ Object.assign(baseContextValue, { stabilityCheck, identityFunctionCheck }); } }, [store, serverState]); const previousState = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => store.getState(), [store]); useIsomorphicLayoutEffect(() => { const { subscription } = contextValue; subscription.onStateChange = subscription.notifyNestedSubs; subscription.trySubscribe(); if (previousState !== store.getState()) { subscription.notifyNestedSubs(); } return () => { subscription.tryUnsubscribe(); subscription.onStateChange = void 0; }; }, [contextValue, previousState]); const Context = context || ReactReduxContext; return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(Context.Provider, { value: contextValue }, children); } var Provider_default = Provider; // src/hooks/useReduxContext.ts function createReduxContextHook(context = ReactReduxContext) { return function useReduxContext2() { const contextValue = react__WEBPACK_IMPORTED_MODULE_0__.useContext(context); if ( true && !contextValue) { throw new Error( "could not find react-redux context value; please ensure the component is wrapped in a " ); } return contextValue; }; } var useReduxContext = /* @__PURE__ */ createReduxContextHook(); // src/hooks/useStore.ts function createStoreHook(context = ReactReduxContext) { const useReduxContext2 = context === ReactReduxContext ? useReduxContext : ( // @ts-ignore createReduxContextHook(context) ); const useStore2 = () => { const { store } = useReduxContext2(); return store; }; Object.assign(useStore2, { withTypes: () => useStore2 }); return useStore2; } var useStore = /* @__PURE__ */ createStoreHook(); // src/hooks/useDispatch.ts function createDispatchHook(context = ReactReduxContext) { const useStore2 = context === ReactReduxContext ? useStore : createStoreHook(context); const useDispatch2 = () => { const store = useStore2(); return store.dispatch; }; Object.assign(useDispatch2, { withTypes: () => useDispatch2 }); return useDispatch2; } var useDispatch = /* @__PURE__ */ createDispatchHook(); // src/hooks/useSelector.ts var refEquality = (a, b) => a === b; function createSelectorHook(context = ReactReduxContext) { const useReduxContext2 = context === ReactReduxContext ? useReduxContext : createReduxContextHook(context); const useSelector2 = (selector, equalityFnOrOptions = {}) => { const { equalityFn = refEquality } = typeof equalityFnOrOptions === "function" ? { equalityFn: equalityFnOrOptions } : equalityFnOrOptions; if (true) { if (!selector) { throw new Error(`You must pass a selector to useSelector`); } if (typeof selector !== "function") { throw new Error(`You must pass a function as a selector to useSelector`); } if (typeof equalityFn !== "function") { throw new Error( `You must pass a function as an equality function to useSelector` ); } } const reduxContext = useReduxContext2(); const { store, subscription, getServerState } = reduxContext; const firstRun = react__WEBPACK_IMPORTED_MODULE_0__.useRef(true); const wrappedSelector = react__WEBPACK_IMPORTED_MODULE_0__.useCallback( { [selector.name](state) { const selected = selector(state); if (true) { const { devModeChecks = {} } = typeof equalityFnOrOptions === "function" ? {} : equalityFnOrOptions; const { identityFunctionCheck, stabilityCheck } = reduxContext; const { identityFunctionCheck: finalIdentityFunctionCheck, stabilityCheck: finalStabilityCheck } = { stabilityCheck, identityFunctionCheck, ...devModeChecks }; if (finalStabilityCheck === "always" || finalStabilityCheck === "once" && firstRun.current) { const toCompare = selector(state); if (!equalityFn(selected, toCompare)) { let stack = void 0; try { throw new Error(); } catch (e) { ; ({ stack } = e); } console.warn( "Selector " + (selector.name || "unknown") + " returned a different result when called with the same parameters. This can lead to unnecessary rerenders.\nSelectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization", { state, selected, selected2: toCompare, stack } ); } } if (finalIdentityFunctionCheck === "always" || finalIdentityFunctionCheck === "once" && firstRun.current) { if (selected === state) { let stack = void 0; try { throw new Error(); } catch (e) { ; ({ stack } = e); } console.warn( "Selector " + (selector.name || "unknown") + " returned the root state when called. This can lead to unnecessary rerenders.\nSelectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.", { stack } ); } } if (firstRun.current) firstRun.current = false; } return selected; } }[selector.name], [selector] ); const selectedState = (0,use_sync_external_store_with_selector_js__WEBPACK_IMPORTED_MODULE_1__.useSyncExternalStoreWithSelector)( subscription.addNestedSub, store.getState, getServerState || store.getState, wrappedSelector, equalityFn ); react__WEBPACK_IMPORTED_MODULE_0__.useDebugValue(selectedState); return selectedState; }; Object.assign(useSelector2, { withTypes: () => useSelector2 }); return useSelector2; } var useSelector = /* @__PURE__ */ createSelectorHook(); // src/exports.ts var batch = defaultNoopBatch; //# sourceMappingURL=react-redux.mjs.map /***/ }), /***/ "../../../node_modules/react-router-dom/dist/index.js": /*!************************************************************!*\ !*** ../../../node_modules/react-router-dom/dist/index.js ***! \************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { var react_dom__WEBPACK_IMPORTED_MODULE_1___namespace_cache; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ AbortedDeferredError: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.AbortedDeferredError), /* harmony export */ Await: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.Await), /* harmony export */ BrowserRouter: () => (/* binding */ BrowserRouter), /* harmony export */ Form: () => (/* binding */ Form), /* harmony export */ HashRouter: () => (/* binding */ HashRouter), /* harmony export */ Link: () => (/* binding */ Link), /* harmony export */ MemoryRouter: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.MemoryRouter), /* harmony export */ NavLink: () => (/* binding */ NavLink), /* harmony export */ Navigate: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.Navigate), /* harmony export */ NavigationType: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.Action), /* harmony export */ Outlet: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.Outlet), /* harmony export */ Route: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.Route), /* harmony export */ Router: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.Router), /* harmony export */ RouterProvider: () => (/* binding */ RouterProvider), /* harmony export */ Routes: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.Routes), /* harmony export */ ScrollRestoration: () => (/* binding */ ScrollRestoration), /* harmony export */ UNSAFE_DataRouterContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_DataRouterContext), /* harmony export */ UNSAFE_DataRouterStateContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_DataRouterStateContext), /* harmony export */ UNSAFE_ErrorResponseImpl: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_ErrorResponseImpl), /* harmony export */ UNSAFE_FetchersContext: () => (/* binding */ FetchersContext), /* harmony export */ UNSAFE_LocationContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_LocationContext), /* harmony export */ UNSAFE_NavigationContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_NavigationContext), /* harmony export */ UNSAFE_RouteContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_RouteContext), /* harmony export */ UNSAFE_ViewTransitionContext: () => (/* binding */ ViewTransitionContext), /* harmony export */ UNSAFE_useRouteId: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_useRouteId), /* harmony export */ UNSAFE_useScrollRestoration: () => (/* binding */ useScrollRestoration), /* harmony export */ createBrowserRouter: () => (/* binding */ createBrowserRouter), /* harmony export */ createHashRouter: () => (/* binding */ createHashRouter), /* harmony export */ createMemoryRouter: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.createMemoryRouter), /* harmony export */ createPath: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.createPath), /* harmony export */ createRoutesFromChildren: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.createRoutesFromChildren), /* harmony export */ createRoutesFromElements: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.createRoutesFromElements), /* harmony export */ createSearchParams: () => (/* binding */ createSearchParams), /* harmony export */ defer: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.defer), /* harmony export */ generatePath: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.generatePath), /* harmony export */ isRouteErrorResponse: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.isRouteErrorResponse), /* harmony export */ json: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.json), /* harmony export */ matchPath: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.matchPath), /* harmony export */ matchRoutes: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.matchRoutes), /* harmony export */ parsePath: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.parsePath), /* harmony export */ redirect: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.redirect), /* harmony export */ redirectDocument: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.redirectDocument), /* harmony export */ renderMatches: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.renderMatches), /* harmony export */ replace: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.replace), /* harmony export */ resolvePath: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.resolvePath), /* harmony export */ unstable_HistoryRouter: () => (/* binding */ HistoryRouter), /* harmony export */ unstable_usePrompt: () => (/* binding */ usePrompt), /* harmony export */ useActionData: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useActionData), /* harmony export */ useAsyncError: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useAsyncError), /* harmony export */ useAsyncValue: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useAsyncValue), /* harmony export */ useBeforeUnload: () => (/* binding */ useBeforeUnload), /* harmony export */ useBlocker: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useBlocker), /* harmony export */ useFetcher: () => (/* binding */ useFetcher), /* harmony export */ useFetchers: () => (/* binding */ useFetchers), /* harmony export */ useFormAction: () => (/* binding */ useFormAction), /* harmony export */ useHref: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useHref), /* harmony export */ useInRouterContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useInRouterContext), /* harmony export */ useLinkClickHandler: () => (/* binding */ useLinkClickHandler), /* harmony export */ useLoaderData: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useLoaderData), /* harmony export */ useLocation: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useLocation), /* harmony export */ useMatch: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useMatch), /* harmony export */ useMatches: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useMatches), /* harmony export */ useNavigate: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useNavigate), /* harmony export */ useNavigation: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useNavigation), /* harmony export */ useNavigationType: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useNavigationType), /* harmony export */ useOutlet: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useOutlet), /* harmony export */ useOutletContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useOutletContext), /* harmony export */ useParams: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useParams), /* harmony export */ useResolvedPath: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useResolvedPath), /* harmony export */ useRevalidator: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useRevalidator), /* harmony export */ useRouteError: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useRouteError), /* harmony export */ useRouteLoaderData: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useRouteLoaderData), /* harmony export */ useRoutes: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useRoutes), /* harmony export */ useSearchParams: () => (/* binding */ useSearchParams), /* harmony export */ useSubmit: () => (/* binding */ useSubmit), /* harmony export */ useViewTransitionState: () => (/* binding */ useViewTransitionState) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../../../node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "../../../node_modules/react-dom/index.js"); /* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-router */ "../../../node_modules/react-router/dist/index.js"); /* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @remix-run/router */ "../../../node_modules/@remix-run/router/dist/router.js"); /** * React Router DOM v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } const defaultMethod = "get"; const defaultEncType = "application/x-www-form-urlencoded"; function isHtmlElement(object) { return object != null && typeof object.tagName === "string"; } function isButtonElement(object) { return isHtmlElement(object) && object.tagName.toLowerCase() === "button"; } function isFormElement(object) { return isHtmlElement(object) && object.tagName.toLowerCase() === "form"; } function isInputElement(object) { return isHtmlElement(object) && object.tagName.toLowerCase() === "input"; } function isModifiedEvent(event) { return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); } function shouldProcessLinkClick(event, target) { return event.button === 0 && ( // Ignore everything but left clicks !target || target === "_self") && // Let browser handle "target=_blank" etc. !isModifiedEvent(event) // Ignore clicks with modifier keys ; } /** * Creates a URLSearchParams object using the given initializer. * * This is identical to `new URLSearchParams(init)` except it also * supports arrays as values in the object form of the initializer * instead of just strings. This is convenient when you need multiple * values for a given key, but don't want to use an array initializer. * * For example, instead of: * * let searchParams = new URLSearchParams([ * ['sort', 'name'], * ['sort', 'price'] * ]); * * you can do: * * let searchParams = createSearchParams({ * sort: ['name', 'price'] * }); */ function createSearchParams(init) { if (init === void 0) { init = ""; } return new URLSearchParams(typeof init === "string" || Array.isArray(init) || init instanceof URLSearchParams ? init : Object.keys(init).reduce((memo, key) => { let value = init[key]; return memo.concat(Array.isArray(value) ? value.map(v => [key, v]) : [[key, value]]); }, [])); } function getSearchParamsForLocation(locationSearch, defaultSearchParams) { let searchParams = createSearchParams(locationSearch); if (defaultSearchParams) { // Use `defaultSearchParams.forEach(...)` here instead of iterating of // `defaultSearchParams.keys()` to work-around a bug in Firefox related to // web extensions. Relevant Bugzilla tickets: // https://bugzilla.mozilla.org/show_bug.cgi?id=1414602 // https://bugzilla.mozilla.org/show_bug.cgi?id=1023984 defaultSearchParams.forEach((_, key) => { if (!searchParams.has(key)) { defaultSearchParams.getAll(key).forEach(value => { searchParams.append(key, value); }); } }); } return searchParams; } // One-time check for submitter support let _formDataSupportsSubmitter = null; function isFormDataSubmitterSupported() { if (_formDataSupportsSubmitter === null) { try { new FormData(document.createElement("form"), // @ts-expect-error if FormData supports the submitter parameter, this will throw 0); _formDataSupportsSubmitter = false; } catch (e) { _formDataSupportsSubmitter = true; } } return _formDataSupportsSubmitter; } const supportedFormEncTypes = new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]); function getFormEncType(encType) { if (encType != null && !supportedFormEncTypes.has(encType)) { true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_warning)(false, "\"" + encType + "\" is not a valid `encType` for `
`/`` " + ("and will default to \"" + defaultEncType + "\"")) : 0; return null; } return encType; } function getFormSubmissionInfo(target, basename) { let method; let action; let encType; let formData; let body; if (isFormElement(target)) { // When grabbing the action from the element, it will have had the basename // prefixed to ensure non-JS scenarios work, so strip it since we'll // re-prefix in the router let attr = target.getAttribute("action"); action = attr ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.stripBasename)(attr, basename) : null; method = target.getAttribute("method") || defaultMethod; encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType; formData = new FormData(target); } else if (isButtonElement(target) || isInputElement(target) && (target.type === "submit" || target.type === "image")) { let form = target.form; if (form == null) { throw new Error("Cannot submit a