@gen-epix/ui-client-common 4.1.0 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/_chunks/Breadcrumbs.js +1 -1
  2. package/dist/_chunks/CrudPage.js +183 -183
  3. package/dist/_chunks/CrudPage.js.map +1 -1
  4. package/dist/_chunks/QueryClientProvider.js +1 -1
  5. package/dist/_chunks/QueryClientProvider.js.map +1 -1
  6. package/dist/_chunks/QueryClientService.js +3 -3
  7. package/dist/_chunks/QueryClientService.js.map +1 -1
  8. package/dist/_chunks/Table.js +622 -603
  9. package/dist/_chunks/Table.js.map +1 -1
  10. package/dist/_chunks/UserInvitationsAdminPage.js +97 -97
  11. package/dist/_chunks/{chunk-BV7QT456.js → chunk-OB3PAWPO.js} +4 -4
  12. package/dist/_chunks/chunk-OB3PAWPO.js.map +1 -0
  13. package/dist/_chunks/middleware.js +1 -1
  14. package/dist/_chunks/middleware.js.map +1 -1
  15. package/dist/_chunks/query.js +13 -11
  16. package/dist/_chunks/query.js.map +1 -1
  17. package/dist/_chunks/react-oidc-context.js +1 -1
  18. package/dist/_chunks/react-oidc-context.js.map +1 -1
  19. package/dist/_chunks/react.js +1 -1
  20. package/dist/_chunks/react.js.map +1 -1
  21. package/dist/_chunks/useColumnsMenu.js +2 -2
  22. package/dist/_chunks/useColumnsMenu.js.map +1 -1
  23. package/dist/_chunks/useMutation.js +2 -2
  24. package/dist/_chunks/useMutation.js.map +1 -1
  25. package/dist/_chunks/useQueryMemo.js +7 -7
  26. package/dist/_chunks/useQueryMemo.js.map +1 -1
  27. package/dist/_chunks/vanilla.js +1 -1
  28. package/dist/_chunks/vanilla.js.map +1 -1
  29. package/dist/_chunks/yup.js +23 -23
  30. package/dist/_chunks/yup.js.map +1 -1
  31. package/dist/classes/services/LogService/index.js.map +1 -1
  32. package/dist/classes/services/RouterService/RouterService.d.ts +15 -6
  33. package/dist/classes/services/RouterService/index.js +28 -8
  34. package/dist/classes/services/RouterService/index.js.map +1 -1
  35. package/dist/components/app/App/index.js +40 -39
  36. package/dist/components/app/App/index.js.map +1 -1
  37. package/dist/components/app/AppRouterProvider/AppRouterProvider.d.ts +1 -0
  38. package/dist/components/app/ApplicationBootstrapWithAuthentication/ApplicationBootstrapWithAuthentication.d.ts +2 -0
  39. package/dist/components/app/ApplicationBootstrapWithAuthentication/index.d.ts +1 -0
  40. package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +81 -0
  41. package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -0
  42. package/dist/components/app/ApplicationBootstrapWithoutAuthorization/ApplicationBootstrapWithoutAuthorization.d.ts +2 -0
  43. package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.d.ts +1 -0
  44. package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +63 -0
  45. package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js.map +1 -0
  46. package/dist/components/app/AuthorizationWrapper/index.js +1 -1
  47. package/dist/components/app/RouterRoot/index.js +2 -2
  48. package/dist/components/app/RouterRoot/index.js.map +1 -1
  49. package/dist/components/ui/ApplicationBar/index.js +164 -148
  50. package/dist/components/ui/ApplicationBar/index.js.map +1 -1
  51. package/dist/components/ui/GenericErrorMessage/index.js +1 -1
  52. package/dist/components/ui/NavLink/index.js +1 -1
  53. package/dist/components/ui/OrganizationSwitcherDialog/index.js +31 -31
  54. package/dist/components/ui/UserFeedbackDialog/index.js +35 -35
  55. package/dist/pages/AcceptInvitationPage/index.js +1 -1
  56. package/dist/pages/AdminPage/index.js +1 -1
  57. package/dist/pages/OrganizationContactsAdminPage/index.js +1 -1
  58. package/dist/pages/OrganizationSitesAdminPage/index.js +1 -1
  59. package/dist/pages/RouterErrorPage/index.js +1 -1
  60. package/package.json +77 -72
  61. package/dist/_chunks/chunk-BV7QT456.js.map +0 -1
  62. package/dist/_chunks/index.esm.js +0 -1284
  63. package/dist/_chunks/index.esm.js.map +0 -1
  64. package/dist/components/app/ApplicationBootstrap/ApplicationBootstrap.d.ts +0 -2
  65. package/dist/components/app/ApplicationBootstrap/index.d.ts +0 -1
  66. package/dist/components/app/ApplicationBootstrap/index.js +0 -135
  67. package/dist/components/app/ApplicationBootstrap/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"react-oidc-context.js","names":["React2","React3"],"sources":["../../../../node_modules/.pnpm/react-oidc-context@3.3.1_oidc-client-ts@3.5.0_react@19.2.8/node_modules/react-oidc-context/dist/esm/react-oidc-context.js"],"sourcesContent":["// src/AuthContext.ts\nimport React from \"react\";\nvar AuthContext = React.createContext(void 0);\nAuthContext.displayName = \"AuthContext\";\n\n// src/AuthProvider.tsx\nimport { UserManager } from \"oidc-client-ts\";\nimport React2 from \"react\";\n\n// src/AuthState.ts\nvar initialAuthState = {\n isLoading: true,\n isAuthenticated: false\n};\n\n// src/reducer.ts\nvar reducer = (state, action) => {\n switch (action.type) {\n case \"INITIALISED\":\n case \"USER_LOADED\":\n return {\n ...state,\n user: action.user,\n isLoading: false,\n isAuthenticated: action.user ? !action.user.expired : false,\n error: void 0\n };\n case \"USER_SIGNED_OUT\":\n case \"USER_UNLOADED\":\n return {\n ...state,\n user: void 0,\n isAuthenticated: false\n };\n case \"NAVIGATOR_INIT\":\n return {\n ...state,\n isLoading: true,\n activeNavigator: action.method\n };\n case \"NAVIGATOR_CLOSE\":\n return {\n ...state,\n isLoading: false,\n activeNavigator: void 0\n };\n case \"ERROR\": {\n const error = action.error;\n error[\"toString\"] = () => `${error.name}: ${error.message}`;\n return {\n ...state,\n isLoading: false,\n error\n };\n }\n default: {\n const innerError = new TypeError(`unknown type ${action[\"type\"]}`);\n const error = {\n name: innerError.name,\n message: innerError.message,\n innerError,\n stack: innerError.stack,\n source: \"unknown\"\n };\n error[\"toString\"] = () => `${error.name}: ${error.message}`;\n return {\n ...state,\n isLoading: false,\n error\n };\n }\n }\n};\n\n// src/utils.ts\nvar hasAuthParams = (location = window.location) => {\n let searchParams = new URLSearchParams(location.search);\n if ((searchParams.get(\"code\") || searchParams.get(\"error\")) && searchParams.get(\"state\")) {\n return true;\n }\n searchParams = new URLSearchParams(location.hash.replace(\"#\", \"?\"));\n if ((searchParams.get(\"code\") || searchParams.get(\"error\")) && searchParams.get(\"state\")) {\n return true;\n }\n return false;\n};\nvar signinError = normalizeErrorFn(\"signinCallback\", \"Sign-in failed\");\nvar signoutError = normalizeErrorFn(\"signoutCallback\", \"Sign-out failed\");\nvar renewSilentError = normalizeErrorFn(\"renewSilent\", \"Renew silent failed\");\nfunction normalizeError(error, fallbackMessage) {\n return {\n name: stringFieldOf(error, \"name\", () => \"Error\"),\n message: stringFieldOf(error, \"message\", () => fallbackMessage),\n stack: stringFieldOf(error, \"stack\", () => new Error().stack),\n innerError: error\n };\n}\nfunction normalizeErrorFn(source, fallbackMessage) {\n return (error) => {\n return {\n ...normalizeError(error, fallbackMessage),\n source\n };\n };\n}\nfunction stringFieldOf(element, fieldName, or) {\n if (element && typeof element === \"object\") {\n const value = element[fieldName];\n if (typeof value === \"string\") {\n return value;\n }\n }\n return or();\n}\n\n// src/AuthProvider.tsx\nvar userManagerContextKeys = [\n \"clearStaleState\",\n \"querySessionStatus\",\n \"revokeTokens\",\n \"startSilentRenew\",\n \"stopSilentRenew\"\n];\nvar navigatorKeys = [\n \"signinPopup\",\n \"signinSilent\",\n \"signinRedirect\",\n \"signinResourceOwnerCredentials\",\n \"signoutPopup\",\n \"signoutRedirect\",\n \"signoutSilent\"\n];\nvar unsupportedEnvironment = (fnName) => () => {\n throw new Error(\n `UserManager#${fnName} was called from an unsupported context. If this is a server-rendered page, defer this call with useEffect() or pass a custom UserManager implementation.`\n );\n};\nvar UserManagerImpl = typeof window === \"undefined\" ? null : UserManager;\nvar AuthProvider = (props) => {\n const {\n children,\n onSigninCallback,\n skipSigninCallback,\n matchSignoutCallback,\n onSignoutCallback,\n onRemoveUser,\n userManager: userManagerProp = null,\n ...userManagerSettings\n } = props;\n const [userManager] = React2.useState(() => {\n return userManagerProp != null ? userManagerProp : UserManagerImpl ? new UserManagerImpl(userManagerSettings) : { settings: userManagerSettings };\n });\n const [state, dispatch] = React2.useReducer(reducer, initialAuthState);\n const userManagerContext = React2.useMemo(\n () => Object.assign(\n {\n settings: userManager.settings,\n events: userManager.events\n },\n Object.fromEntries(\n userManagerContextKeys.map((key) => {\n var _a, _b;\n return [\n key,\n (_b = (_a = userManager[key]) == null ? void 0 : _a.bind(userManager)) != null ? _b : unsupportedEnvironment(key)\n ];\n })\n ),\n Object.fromEntries(\n navigatorKeys.map((key) => [\n key,\n userManager[key] ? async (args) => {\n dispatch({\n type: \"NAVIGATOR_INIT\",\n method: key\n });\n try {\n return await userManager[key](args);\n } catch (error) {\n dispatch({\n type: \"ERROR\",\n error: {\n ...normalizeError(error, `Unknown error while executing ${key}(...).`),\n source: key,\n args\n }\n });\n return null;\n } finally {\n dispatch({ type: \"NAVIGATOR_CLOSE\" });\n }\n } : unsupportedEnvironment(key)\n ])\n )\n ),\n [userManager]\n );\n const didInitialize = React2.useRef(false);\n React2.useEffect(() => {\n if (!userManager || didInitialize.current) {\n return;\n }\n didInitialize.current = true;\n void (async () => {\n try {\n let user = null;\n if (hasAuthParams() && !skipSigninCallback) {\n user = await userManager.signinCallback();\n if (onSigninCallback) await onSigninCallback(user);\n }\n user = !user ? await userManager.getUser() : user;\n dispatch({ type: \"INITIALISED\", user });\n } catch (error) {\n dispatch({\n type: \"ERROR\",\n error: signinError(error)\n });\n }\n try {\n if (matchSignoutCallback && matchSignoutCallback(userManager.settings)) {\n const resp = await userManager.signoutCallback();\n if (onSignoutCallback) await onSignoutCallback(resp);\n }\n } catch (error) {\n dispatch({\n type: \"ERROR\",\n error: signoutError(error)\n });\n }\n })();\n }, [userManager, skipSigninCallback, onSigninCallback, onSignoutCallback, matchSignoutCallback]);\n React2.useEffect(() => {\n if (!userManager) return void 0;\n const handleUserLoaded = (user) => {\n dispatch({ type: \"USER_LOADED\", user });\n };\n userManager.events.addUserLoaded(handleUserLoaded);\n const handleUserUnloaded = () => {\n dispatch({ type: \"USER_UNLOADED\" });\n };\n userManager.events.addUserUnloaded(handleUserUnloaded);\n const handleUserSignedOut = () => {\n dispatch({ type: \"USER_SIGNED_OUT\" });\n };\n userManager.events.addUserSignedOut(handleUserSignedOut);\n const handleSilentRenewError = (error) => {\n dispatch({\n type: \"ERROR\",\n error: renewSilentError(error)\n });\n };\n userManager.events.addSilentRenewError(handleSilentRenewError);\n return () => {\n userManager.events.removeUserLoaded(handleUserLoaded);\n userManager.events.removeUserUnloaded(handleUserUnloaded);\n userManager.events.removeUserSignedOut(handleUserSignedOut);\n userManager.events.removeSilentRenewError(handleSilentRenewError);\n };\n }, [userManager]);\n const removeUser = React2.useCallback(async () => {\n if (!userManager) unsupportedEnvironment(\"removeUser\");\n await userManager.removeUser();\n if (onRemoveUser) await onRemoveUser();\n }, [userManager, onRemoveUser]);\n const contextValue = React2.useMemo(() => {\n return {\n ...state,\n ...userManagerContext,\n removeUser\n };\n }, [state, userManagerContext, removeUser]);\n return /* @__PURE__ */ React2.createElement(AuthContext.Provider, { value: contextValue }, children);\n};\n\n// src/useAuth.ts\nimport React3 from \"react\";\nvar useAuth = () => {\n const context = React3.useContext(AuthContext);\n if (!context) {\n console.warn(\"AuthProvider context is undefined, please verify you are calling useAuth() as child of a <AuthProvider> component.\");\n }\n return context;\n};\n\n// src/useAutoSignin.ts\nimport React4 from \"react\";\nfunction useAutoSignin({ signinMethod = \"signinRedirect\", signinArgs } = {}) {\n const auth = useAuth();\n const [hasTriedSignin, setHasTriedSignin] = React4.useState(false);\n const shouldAttemptSignin = React4.useMemo(() => !hasAuthParams() && !auth.isAuthenticated && !auth.activeNavigator && !auth.isLoading && !hasTriedSignin, [auth.activeNavigator, auth.isAuthenticated, auth.isLoading, hasTriedSignin]);\n React4.useEffect(() => {\n if (shouldAttemptSignin) {\n switch (signinMethod) {\n case \"signinPopup\":\n void auth.signinPopup(signinArgs);\n break;\n case \"signinRedirect\":\n default:\n void auth.signinRedirect(signinArgs);\n break;\n }\n setHasTriedSignin(true);\n }\n }, [auth, hasTriedSignin, shouldAttemptSignin, signinMethod, signinArgs]);\n return {\n isLoading: auth.isLoading,\n isAuthenticated: auth.isAuthenticated,\n error: auth.error\n };\n}\n\n// src/withAuth.tsx\nimport React5 from \"react\";\nfunction withAuth(Component) {\n const displayName = `withAuth(${Component.displayName || Component.name})`;\n const C = (props) => {\n const auth = useAuth();\n return /* @__PURE__ */ React5.createElement(Component, { ...props, auth });\n };\n C.displayName = displayName;\n return C;\n}\n\n// src/withAuthenticationRequired.tsx\nimport React6 from \"react\";\nvar withAuthenticationRequired = (Component, options = {}) => {\n const { OnRedirecting = () => /* @__PURE__ */ React6.createElement(React6.Fragment, null), onBeforeSignin, signinRedirectArgs } = options;\n const displayName = `withAuthenticationRequired(${Component.displayName || Component.name})`;\n const C = (props) => {\n const auth = useAuth();\n React6.useEffect(() => {\n if (hasAuthParams() || auth.isLoading || auth.activeNavigator || auth.isAuthenticated) {\n return;\n }\n void (async () => {\n if (onBeforeSignin) await onBeforeSignin();\n await auth.signinRedirect(signinRedirectArgs);\n })();\n }, [auth.isLoading, auth.isAuthenticated, auth]);\n return auth.isAuthenticated ? /* @__PURE__ */ React6.createElement(Component, { ...props }) : OnRedirecting();\n };\n C.displayName = displayName;\n return C;\n};\nexport {\n AuthContext,\n AuthProvider,\n hasAuthParams,\n useAuth,\n useAutoSignin,\n withAuth,\n withAuthenticationRequired\n};\n//# sourceMappingURL=react-oidc-context.js.map\n"],"x_google_ignoreList":[0],"mappings":";;;AAEA,IAAI,IAAc,EAAM,cAAc,KAAK,CAAC;AAC5C,EAAY,cAAc;AAO1B,IAAI,IAAmB;CACrB,WAAW;CACX,iBAAiB;AACnB,GAGI,KAAW,GAAO,MAAW;CAC/B,QAAQ,EAAO,MAAf;EACE,KAAK;EACL,KAAK,eACH,OAAO;GACL,GAAG;GACH,MAAM,EAAO;GACb,WAAW;GACX,iBAAiB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EAAS;IACP,MAAM;IACN,OAAO,EAAiB,CAAK;GAC/B,CAAC;EACH;EAEA,OADA,EAAY,OAAO,oBAAoB,CAAsB,SAChD;GAIX,AAHA,EAAY,OAAO,iBAAiB,CAAgB,GACpD,EAAY,OAAO,mBAAmB,CAAkB,GACxD,EAAY,OAAO,oBAAoB,CAAmB,GAC1D,EAAY,OAAO,uBAAuB,CAAsB;EAClE;CACF,GAAG,CAAC,CAAW,CAAC;CAChB,IAAM,IAAaA,EAAO,YAAY,YAAY;EAGhD,AADA,MAAM,EAAY,WAAW,GACzB,KAAc,MAAM,EAAa;CACvC,GAAG,CAAC,GAAa,CAAY,CAAC,GACxB,IAAeA,EAAO,eACnB;EACL,GAAG;EACH,GAAG;EACH;CACF,IACC;EAAC;EAAO;EAAoB;CAAU,CAAC;CAC1C,OAAuB,kBAAO,cAAc,EAAY,UAAU,EAAE,OAAO,EAAa,GAAG,CAAQ;AACrG,GAII,UAAgB;CAClB,IAAM,IAAUC,EAAO,WAAW,CAAW;CAI7C,OAHK,KACH,QAAQ,KAAK,oHAAoH,GAE5H;AACT"}
1
+ {"version":3,"file":"react-oidc-context.js","names":["React2","React3"],"sources":["../../../../node_modules/.pnpm/react-oidc-context@3.3.1_oidc-client-ts@3.5.0_react@19.3.0/node_modules/react-oidc-context/dist/esm/react-oidc-context.js"],"sourcesContent":["// src/AuthContext.ts\nimport React from \"react\";\nvar AuthContext = React.createContext(void 0);\nAuthContext.displayName = \"AuthContext\";\n\n// src/AuthProvider.tsx\nimport { UserManager } from \"oidc-client-ts\";\nimport React2 from \"react\";\n\n// src/AuthState.ts\nvar initialAuthState = {\n isLoading: true,\n isAuthenticated: false\n};\n\n// src/reducer.ts\nvar reducer = (state, action) => {\n switch (action.type) {\n case \"INITIALISED\":\n case \"USER_LOADED\":\n return {\n ...state,\n user: action.user,\n isLoading: false,\n isAuthenticated: action.user ? !action.user.expired : false,\n error: void 0\n };\n case \"USER_SIGNED_OUT\":\n case \"USER_UNLOADED\":\n return {\n ...state,\n user: void 0,\n isAuthenticated: false\n };\n case \"NAVIGATOR_INIT\":\n return {\n ...state,\n isLoading: true,\n activeNavigator: action.method\n };\n case \"NAVIGATOR_CLOSE\":\n return {\n ...state,\n isLoading: false,\n activeNavigator: void 0\n };\n case \"ERROR\": {\n const error = action.error;\n error[\"toString\"] = () => `${error.name}: ${error.message}`;\n return {\n ...state,\n isLoading: false,\n error\n };\n }\n default: {\n const innerError = new TypeError(`unknown type ${action[\"type\"]}`);\n const error = {\n name: innerError.name,\n message: innerError.message,\n innerError,\n stack: innerError.stack,\n source: \"unknown\"\n };\n error[\"toString\"] = () => `${error.name}: ${error.message}`;\n return {\n ...state,\n isLoading: false,\n error\n };\n }\n }\n};\n\n// src/utils.ts\nvar hasAuthParams = (location = window.location) => {\n let searchParams = new URLSearchParams(location.search);\n if ((searchParams.get(\"code\") || searchParams.get(\"error\")) && searchParams.get(\"state\")) {\n return true;\n }\n searchParams = new URLSearchParams(location.hash.replace(\"#\", \"?\"));\n if ((searchParams.get(\"code\") || searchParams.get(\"error\")) && searchParams.get(\"state\")) {\n return true;\n }\n return false;\n};\nvar signinError = normalizeErrorFn(\"signinCallback\", \"Sign-in failed\");\nvar signoutError = normalizeErrorFn(\"signoutCallback\", \"Sign-out failed\");\nvar renewSilentError = normalizeErrorFn(\"renewSilent\", \"Renew silent failed\");\nfunction normalizeError(error, fallbackMessage) {\n return {\n name: stringFieldOf(error, \"name\", () => \"Error\"),\n message: stringFieldOf(error, \"message\", () => fallbackMessage),\n stack: stringFieldOf(error, \"stack\", () => new Error().stack),\n innerError: error\n };\n}\nfunction normalizeErrorFn(source, fallbackMessage) {\n return (error) => {\n return {\n ...normalizeError(error, fallbackMessage),\n source\n };\n };\n}\nfunction stringFieldOf(element, fieldName, or) {\n if (element && typeof element === \"object\") {\n const value = element[fieldName];\n if (typeof value === \"string\") {\n return value;\n }\n }\n return or();\n}\n\n// src/AuthProvider.tsx\nvar userManagerContextKeys = [\n \"clearStaleState\",\n \"querySessionStatus\",\n \"revokeTokens\",\n \"startSilentRenew\",\n \"stopSilentRenew\"\n];\nvar navigatorKeys = [\n \"signinPopup\",\n \"signinSilent\",\n \"signinRedirect\",\n \"signinResourceOwnerCredentials\",\n \"signoutPopup\",\n \"signoutRedirect\",\n \"signoutSilent\"\n];\nvar unsupportedEnvironment = (fnName) => () => {\n throw new Error(\n `UserManager#${fnName} was called from an unsupported context. If this is a server-rendered page, defer this call with useEffect() or pass a custom UserManager implementation.`\n );\n};\nvar UserManagerImpl = typeof window === \"undefined\" ? null : UserManager;\nvar AuthProvider = (props) => {\n const {\n children,\n onSigninCallback,\n skipSigninCallback,\n matchSignoutCallback,\n onSignoutCallback,\n onRemoveUser,\n userManager: userManagerProp = null,\n ...userManagerSettings\n } = props;\n const [userManager] = React2.useState(() => {\n return userManagerProp != null ? userManagerProp : UserManagerImpl ? new UserManagerImpl(userManagerSettings) : { settings: userManagerSettings };\n });\n const [state, dispatch] = React2.useReducer(reducer, initialAuthState);\n const userManagerContext = React2.useMemo(\n () => Object.assign(\n {\n settings: userManager.settings,\n events: userManager.events\n },\n Object.fromEntries(\n userManagerContextKeys.map((key) => {\n var _a, _b;\n return [\n key,\n (_b = (_a = userManager[key]) == null ? void 0 : _a.bind(userManager)) != null ? _b : unsupportedEnvironment(key)\n ];\n })\n ),\n Object.fromEntries(\n navigatorKeys.map((key) => [\n key,\n userManager[key] ? async (args) => {\n dispatch({\n type: \"NAVIGATOR_INIT\",\n method: key\n });\n try {\n return await userManager[key](args);\n } catch (error) {\n dispatch({\n type: \"ERROR\",\n error: {\n ...normalizeError(error, `Unknown error while executing ${key}(...).`),\n source: key,\n args\n }\n });\n return null;\n } finally {\n dispatch({ type: \"NAVIGATOR_CLOSE\" });\n }\n } : unsupportedEnvironment(key)\n ])\n )\n ),\n [userManager]\n );\n const didInitialize = React2.useRef(false);\n React2.useEffect(() => {\n if (!userManager || didInitialize.current) {\n return;\n }\n didInitialize.current = true;\n void (async () => {\n try {\n let user = null;\n if (hasAuthParams() && !skipSigninCallback) {\n user = await userManager.signinCallback();\n if (onSigninCallback) await onSigninCallback(user);\n }\n user = !user ? await userManager.getUser() : user;\n dispatch({ type: \"INITIALISED\", user });\n } catch (error) {\n dispatch({\n type: \"ERROR\",\n error: signinError(error)\n });\n }\n try {\n if (matchSignoutCallback && matchSignoutCallback(userManager.settings)) {\n const resp = await userManager.signoutCallback();\n if (onSignoutCallback) await onSignoutCallback(resp);\n }\n } catch (error) {\n dispatch({\n type: \"ERROR\",\n error: signoutError(error)\n });\n }\n })();\n }, [userManager, skipSigninCallback, onSigninCallback, onSignoutCallback, matchSignoutCallback]);\n React2.useEffect(() => {\n if (!userManager) return void 0;\n const handleUserLoaded = (user) => {\n dispatch({ type: \"USER_LOADED\", user });\n };\n userManager.events.addUserLoaded(handleUserLoaded);\n const handleUserUnloaded = () => {\n dispatch({ type: \"USER_UNLOADED\" });\n };\n userManager.events.addUserUnloaded(handleUserUnloaded);\n const handleUserSignedOut = () => {\n dispatch({ type: \"USER_SIGNED_OUT\" });\n };\n userManager.events.addUserSignedOut(handleUserSignedOut);\n const handleSilentRenewError = (error) => {\n dispatch({\n type: \"ERROR\",\n error: renewSilentError(error)\n });\n };\n userManager.events.addSilentRenewError(handleSilentRenewError);\n return () => {\n userManager.events.removeUserLoaded(handleUserLoaded);\n userManager.events.removeUserUnloaded(handleUserUnloaded);\n userManager.events.removeUserSignedOut(handleUserSignedOut);\n userManager.events.removeSilentRenewError(handleSilentRenewError);\n };\n }, [userManager]);\n const removeUser = React2.useCallback(async () => {\n if (!userManager) unsupportedEnvironment(\"removeUser\");\n await userManager.removeUser();\n if (onRemoveUser) await onRemoveUser();\n }, [userManager, onRemoveUser]);\n const contextValue = React2.useMemo(() => {\n return {\n ...state,\n ...userManagerContext,\n removeUser\n };\n }, [state, userManagerContext, removeUser]);\n return /* @__PURE__ */ React2.createElement(AuthContext.Provider, { value: contextValue }, children);\n};\n\n// src/useAuth.ts\nimport React3 from \"react\";\nvar useAuth = () => {\n const context = React3.useContext(AuthContext);\n if (!context) {\n console.warn(\"AuthProvider context is undefined, please verify you are calling useAuth() as child of a <AuthProvider> component.\");\n }\n return context;\n};\n\n// src/useAutoSignin.ts\nimport React4 from \"react\";\nfunction useAutoSignin({ signinMethod = \"signinRedirect\", signinArgs } = {}) {\n const auth = useAuth();\n const [hasTriedSignin, setHasTriedSignin] = React4.useState(false);\n const shouldAttemptSignin = React4.useMemo(() => !hasAuthParams() && !auth.isAuthenticated && !auth.activeNavigator && !auth.isLoading && !hasTriedSignin, [auth.activeNavigator, auth.isAuthenticated, auth.isLoading, hasTriedSignin]);\n React4.useEffect(() => {\n if (shouldAttemptSignin) {\n switch (signinMethod) {\n case \"signinPopup\":\n void auth.signinPopup(signinArgs);\n break;\n case \"signinRedirect\":\n default:\n void auth.signinRedirect(signinArgs);\n break;\n }\n setHasTriedSignin(true);\n }\n }, [auth, hasTriedSignin, shouldAttemptSignin, signinMethod, signinArgs]);\n return {\n isLoading: auth.isLoading,\n isAuthenticated: auth.isAuthenticated,\n error: auth.error\n };\n}\n\n// src/withAuth.tsx\nimport React5 from \"react\";\nfunction withAuth(Component) {\n const displayName = `withAuth(${Component.displayName || Component.name})`;\n const C = (props) => {\n const auth = useAuth();\n return /* @__PURE__ */ React5.createElement(Component, { ...props, auth });\n };\n C.displayName = displayName;\n return C;\n}\n\n// src/withAuthenticationRequired.tsx\nimport React6 from \"react\";\nvar withAuthenticationRequired = (Component, options = {}) => {\n const { OnRedirecting = () => /* @__PURE__ */ React6.createElement(React6.Fragment, null), onBeforeSignin, signinRedirectArgs } = options;\n const displayName = `withAuthenticationRequired(${Component.displayName || Component.name})`;\n const C = (props) => {\n const auth = useAuth();\n React6.useEffect(() => {\n if (hasAuthParams() || auth.isLoading || auth.activeNavigator || auth.isAuthenticated) {\n return;\n }\n void (async () => {\n if (onBeforeSignin) await onBeforeSignin();\n await auth.signinRedirect(signinRedirectArgs);\n })();\n }, [auth.isLoading, auth.isAuthenticated, auth]);\n return auth.isAuthenticated ? /* @__PURE__ */ React6.createElement(Component, { ...props }) : OnRedirecting();\n };\n C.displayName = displayName;\n return C;\n};\nexport {\n AuthContext,\n AuthProvider,\n hasAuthParams,\n useAuth,\n useAutoSignin,\n withAuth,\n withAuthenticationRequired\n};\n//# sourceMappingURL=react-oidc-context.js.map\n"],"x_google_ignoreList":[0],"mappings":";;;AAEA,IAAI,IAAc,EAAM,cAAc,KAAK,CAAC;AAC5C,EAAY,cAAc;AAO1B,IAAI,IAAmB;CACrB,WAAW;CACX,iBAAiB;AACnB,GAGI,KAAW,GAAO,MAAW;CAC/B,QAAQ,EAAO,MAAf;EACE,KAAK;EACL,KAAK,eACH,OAAO;GACL,GAAG;GACH,MAAM,EAAO;GACb,WAAW;GACX,iBAAiB,EAAO,OAAO,CAAC,EAAO,KAAK,UAAU;GACtD,OAAO,KAAK;EACd;EACF,KAAK;EACL,KAAK,iBACH,OAAO;GACL,GAAG;GACH,MAAM,KAAK;GACX,iBAAiB;EACnB;EACF,KAAK,kBACH,OAAO;GACL,GAAG;GACH,WAAW;GACX,iBAAiB,EAAO;EAC1B;EACF,KAAK,mBACH,OAAO;GACL,GAAG;GACH,WAAW;GACX,iBAAiB,KAAK;EACxB;EACF,KAAK,SAAS;GACZ,IAAM,IAAQ,EAAO;GAErB,OADA,EAAM,iBAAoB,GAAG,EAAM,KAAK,IAAI,EAAM,WAC3C;IACL,GAAG;IACH,WAAW;IACX;GACF;EACF;EACA,SAAS;GACP,IAAM,IAAa,gBAAI,UAAU,gBAAgB,EAAO,MAAS,GAC3D,IAAQ;IACZ,MAAM,EAAW;IACjB,SAAS,EAAW;IACpB;IACA,OAAO,EAAW;IAClB,QAAQ;GACV;GAEA,OADA,EAAM,iBAAoB,GAAG,EAAM,KAAK,IAAI,EAAM,WAC3C;IACL,GAAG;IACH,WAAW;IACX;GACF;EACF;CACF;AACF,GAGI,KAAiB,IAAW,OAAO,aAAa;CAClD,IAAI,IAAe,IAAI,gB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and@5.0.15_@types+react@19.2.18_immer@11.1.18_react@19.2.8_use-sync-external-store@1.6.0_react@19.2.8_/node_modules/zustand/esm/react.mjs
2
+ //#region ../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.18_react@19.3.0_use-sync-external-store@1.6.0_react@19.3.0_/node_modules/zustand/esm/react.mjs
3
3
  var t = (e) => e;
4
4
  function n(n, r = t) {
5
5
  let i = e.useSyncExternalStore(n.subscribe, e.useCallback(() => r(n.getState()), [n, r]), e.useCallback(() => r(n.getInitialState()), [n, r]));
@@ -1 +1 @@
1
- {"version":3,"file":"react.js","names":[],"sources":["../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.2.18_immer@11.1.18_react@19.2.8_use-sync-external-store@1.6.0_react@19.2.8_/node_modules/zustand/esm/react.mjs"],"sourcesContent":["import React from 'react';\nimport { createStore } from 'zustand/vanilla';\n\nconst identity = (arg) => arg;\nfunction useStore(api, selector = identity) {\n const slice = React.useSyncExternalStore(\n api.subscribe,\n React.useCallback(() => selector(api.getState()), [api, selector]),\n React.useCallback(() => selector(api.getInitialState()), [api, selector])\n );\n React.useDebugValue(slice);\n return slice;\n}\nconst createImpl = (createState) => {\n const api = createStore(createState);\n const useBoundStore = (selector) => useStore(api, selector);\n Object.assign(useBoundStore, api);\n return useBoundStore;\n};\nconst create = ((createState) => createState ? createImpl(createState) : createImpl);\n\nexport { create, useStore };\n"],"x_google_ignoreList":[0],"mappings":";;AAGA,IAAM,KAAY,MAAQ;AAC1B,SAAS,EAAS,GAAK,IAAW,GAAU;CAC1C,IAAM,IAAQ,EAAM,qBAClB,EAAI,WACJ,EAAM,kBAAkB,EAAS,EAAI,SAAS,CAAC,GAAG,CAAC,GAAK,CAAQ,CAAC,GACjE,EAAM,kBAAkB,EAAS,EAAI,gBAAgB,CAAC,GAAG,CAAC,GAAK,CAAQ,CAAC,CAC1E;CAEA,OADA,EAAM,cAAc,CAAK,GAClB;AACT"}
1
+ {"version":3,"file":"react.js","names":[],"sources":["../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.18_react@19.3.0_use-sync-external-store@1.6.0_react@19.3.0_/node_modules/zustand/esm/react.mjs"],"sourcesContent":["import React from 'react';\nimport { createStore } from 'zustand/vanilla';\n\nconst identity = (arg) => arg;\nfunction useStore(api, selector = identity) {\n const slice = React.useSyncExternalStore(\n api.subscribe,\n React.useCallback(() => selector(api.getState()), [api, selector]),\n React.useCallback(() => selector(api.getInitialState()), [api, selector])\n );\n React.useDebugValue(slice);\n return slice;\n}\nconst createImpl = (createState) => {\n const api = createStore(createState);\n const useBoundStore = (selector) => useStore(api, selector);\n Object.assign(useBoundStore, api);\n return useBoundStore;\n};\nconst create = ((createState) => createState ? createImpl(createState) : createImpl);\n\nexport { create, useStore };\n"],"x_google_ignoreList":[0],"mappings":";;AAGA,IAAM,KAAY,MAAQ;AAC1B,SAAS,EAAS,GAAK,IAAW,GAAU;CAC1C,IAAM,IAAQ,EAAM,qBAClB,EAAI,WACJ,EAAM,kBAAkB,EAAS,EAAI,SAAS,CAAC,GAAG,CAAC,GAAK,CAAQ,CAAC,GACjE,EAAM,kBAAkB,EAAS,EAAI,gBAAgB,CAAC,GAAG,CAAC,GAAK,CAAQ,CAAC,CAC1E;CAEA,OADA,EAAM,cAAc,CAAK,GAClB;AACT"}
@@ -9,7 +9,7 @@ import u from "@mui/icons-material/CheckBoxOutlined";
9
9
  import d from "@mui/icons-material/CheckBoxOutlineBlankOutlined";
10
10
  import f from "@mui/icons-material/ToggleOffOutlined";
11
11
  import p from "@mui/icons-material/ToggleOnOutlined";
12
- //#region ../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.2.18_immer@11.1.18_react@19.2.8_use-sync-external-store@1.6.0_react@19.2.8_/node_modules/zustand/esm/vanilla/shallow.mjs
12
+ //#region ../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.18_react@19.3.0_use-sync-external-store@1.6.0_react@19.3.0_/node_modules/zustand/esm/vanilla/shallow.mjs
13
13
  var m = (e) => Symbol.iterator in e, h = (e) => "entries" in e, g = (e, t) => {
14
14
  let n = e instanceof Map ? e : new Map(e.entries()), r = t instanceof Map ? t : new Map(t.entries());
15
15
  if (n.size !== r.size) return !1;
@@ -27,7 +27,7 @@ function v(e, t) {
27
27
  return Object.is(e, t) ? !0 : typeof e != "object" || !e || typeof t != "object" || !t || Object.getPrototypeOf(e) !== Object.getPrototypeOf(t) ? !1 : m(e) && m(t) ? h(e) && h(t) ? g(e, t) : _(e, t) : g({ entries: () => Object.entries(e) }, { entries: () => Object.entries(t) });
28
28
  }
29
29
  //#endregion
30
- //#region ../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.2.18_immer@11.1.18_react@19.2.8_use-sync-external-store@1.6.0_react@19.2.8_/node_modules/zustand/esm/react/shallow.mjs
30
+ //#region ../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.18_react@19.3.0_use-sync-external-store@1.6.0_react@19.3.0_/node_modules/zustand/esm/react/shallow.mjs
31
31
  function y(e) {
32
32
  let t = i.useRef(void 0);
33
33
  return (n) => {
@@ -1 +1 @@
1
- {"version":3,"file":"useColumnsMenu.js","names":[],"sources":["../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.2.18_immer@11.1.18_react@19.2.8_use-sync-external-store@1.6.0_react@19.2.8_/node_modules/zustand/esm/vanilla/shallow.mjs","../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.2.18_immer@11.1.18_react@19.2.8_use-sync-external-store@1.6.0_react@19.2.8_/node_modules/zustand/esm/react/shallow.mjs","../../src/hooks/useColumnsMenu/useColumnsMenu.tsx"],"sourcesContent":["const isIterable = (obj) => Symbol.iterator in obj;\nconst hasIterableEntries = (value) => (\n // HACK: avoid checking entries type\n \"entries\" in value\n);\nconst compareEntries = (valueA, valueB) => {\n const mapA = valueA instanceof Map ? valueA : new Map(valueA.entries());\n const mapB = valueB instanceof Map ? valueB : new Map(valueB.entries());\n if (mapA.size !== mapB.size) {\n return false;\n }\n for (const [key, value] of mapA) {\n if (!mapB.has(key) || !Object.is(value, mapB.get(key))) {\n return false;\n }\n }\n return true;\n};\nconst compareIterables = (valueA, valueB) => {\n const iteratorA = valueA[Symbol.iterator]();\n const iteratorB = valueB[Symbol.iterator]();\n let nextA = iteratorA.next();\n let nextB = iteratorB.next();\n while (!nextA.done && !nextB.done) {\n if (!Object.is(nextA.value, nextB.value)) {\n return false;\n }\n nextA = iteratorA.next();\n nextB = iteratorB.next();\n }\n return !!nextA.done && !!nextB.done;\n};\nfunction shallow(valueA, valueB) {\n if (Object.is(valueA, valueB)) {\n return true;\n }\n if (typeof valueA !== \"object\" || valueA === null || typeof valueB !== \"object\" || valueB === null) {\n return false;\n }\n if (Object.getPrototypeOf(valueA) !== Object.getPrototypeOf(valueB)) {\n return false;\n }\n if (isIterable(valueA) && isIterable(valueB)) {\n if (hasIterableEntries(valueA) && hasIterableEntries(valueB)) {\n return compareEntries(valueA, valueB);\n }\n return compareIterables(valueA, valueB);\n }\n return compareEntries(\n { entries: () => Object.entries(valueA) },\n { entries: () => Object.entries(valueB) }\n );\n}\n\nexport { shallow };\n","import React from 'react';\nimport { shallow } from 'zustand/vanilla/shallow';\n\nfunction useShallow(selector) {\n const prev = React.useRef(void 0);\n return (state) => {\n const next = selector(state);\n return shallow(prev.current, next) ? prev.current : prev.current = next;\n };\n}\n\nexport { useShallow };\n","import { produce } from 'immer';\nimport { useStore } from 'zustand';\nimport { useShallow } from 'zustand/shallow';\nimport CheckBoxOutlinedIcon from '@mui/icons-material/CheckBoxOutlined';\nimport CheckBoxOutlineBlankOutlinedIcon from '@mui/icons-material/CheckBoxOutlineBlankOutlined';\nimport ToggleOffOutlinedIcon from '@mui/icons-material/ToggleOffOutlined';\nimport ToggleOnOutlinedIcon from '@mui/icons-material/ToggleOnOutlined';\nimport IndeterminateCheckBoxIcon from '@mui/icons-material/IndeterminateCheckBox';\nimport {\n useCallback,\n useMemo,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport type { MenuItemData } from '@gen-epix/ui-core-components/models/nestedMenu';\n\nimport type { HasCellDataFn } from '../../models/table';\nimport { useTableStoreContext } from '../../stores/tableStore';\nimport { TableUtil } from '../../utils/TableUtil';\n\n\nexport type UseColumnsMenuProps<TRowData, TDataContext = null> = {\n readonly hasCellData?: HasCellDataFn<TRowData, TDataContext>;\n};\n\nexport const useColumnsMenu = <TRowData, TDataContext = null>({ hasCellData }: UseColumnsMenuProps<TRowData, TDataContext>): MenuItemData => {\n const tableStore = useTableStoreContext<TRowData, TDataContext>();\n const emitTableEvent = useStore(tableStore, useShallow((state) => state.emitEvent));\n const tableColumns = useStore(tableStore, useShallow((state) => state.columns));\n const dataContext = useStore(tableStore, useShallow((state) => state.dataContext));\n const visibleColumnIds = useStore(tableStore, useShallow((state) => state.getCurrentColumnVisualSettings().filter(c => c.isVisible).map(c => c.id)));\n const columnDimensions = useStore(tableStore, useShallow((state) => state.columnDimensions));\n const isCondensed = useStore(tableStore, useShallow((state) => state.isCondensed));\n const sortedData = useStore(tableStore, useShallow((state) => state.sortedData));\n const { t } = useTranslation();\n\n const isCondensingSupported = useMemo(() => {\n return tableColumns.some(c => c.cellColorGetter);\n }, [tableColumns]);\n\n const onColumnsEditorMenuItemClick = useCallback(() => {\n emitTableEvent('openColumnsEditorDialog', hasCellData);\n }, [emitTableEvent, hasCellData]);\n\n const toggleItem = useCallback((columnId: string): void => {\n const newVisibleColumnIds = produce(visibleColumnIds, (draft) => {\n if (draft.includes(columnId)) {\n return draft.filter(c => c !== columnId);\n }\n draft.push(columnId);\n return draft;\n });\n emitTableEvent('columnVisibilityChange', newVisibleColumnIds);\n }, [emitTableEvent, visibleColumnIds]);\n\n const toggleDimension = useCallback((dimensionColumnIds: string[]): void => {\n const areAllVisible = dimensionColumnIds.every(columnId => visibleColumnIds.includes(columnId));\n const newVisibleColumnIds = produce(visibleColumnIds, (draft) => {\n if (areAllVisible) {\n return draft.filter(c => !dimensionColumnIds.includes(c));\n }\n dimensionColumnIds.forEach((columnId) => {\n if (!draft.includes(columnId)) {\n draft.push(columnId);\n }\n });\n return draft;\n });\n emitTableEvent('columnVisibilityChange', newVisibleColumnIds);\n }, [emitTableEvent, visibleColumnIds]);\n\n const onHideColumnsWithoutDataClick = useCallback(() => {\n emitTableEvent('columnVisibilityChange', TableUtil.getColumnIdsWithData<TRowData, TDataContext>({\n dataContext,\n hasCellData,\n sortedData,\n tableColumns,\n visibleColumnIds,\n }));\n\n }, [emitTableEvent, hasCellData, sortedData, tableColumns, visibleColumnIds, dataContext]);\n\n const onIsCondensedMenuItemClick = useCallback(() => {\n emitTableEvent('condensedChange', !isCondensed);\n }, [emitTableEvent, isCondensed]);\n\n const menuItemData: MenuItemData = useMemo(() => {\n const items: MenuItemData[] = [\n isCondensingSupported ? {\n autoCloseDisabled: true,\n callback: () => onIsCondensedMenuItemClick(),\n checked: isCondensed ? 'true' : 'false',\n divider: true,\n label: t`Condensed`,\n rightIcon: isCondensed ? <ToggleOnOutlinedIcon /> : <ToggleOffOutlinedIcon />,\n } : undefined,\n {\n callback: () => onColumnsEditorMenuItemClick(),\n divider: true,\n label: t`Change order / visibility`,\n },\n {\n autoCloseDisabled: true,\n callback: () => emitTableEvent('reset'),\n label: t`Reset`,\n },\n {\n autoCloseDisabled: true,\n callback: () => {\n emitTableEvent('columnVisibilityChange', [...tableColumns.map(c => c.id)]);\n },\n label: t`Show all`,\n },\n {\n autoCloseDisabled: true,\n callback: () => {\n emitTableEvent('columnVisibilityChange', [...tableColumns.filter(c => c.frozen).map(c => c.id)]);\n },\n label: t`Hide all`,\n },\n {\n autoCloseDisabled: true,\n callback: () => onHideColumnsWithoutDataClick(),\n divider: true,\n label: t`Hide columns without data`,\n },\n ].filter(x => x) as MenuItemData[];\n\n if (columnDimensions) {\n columnDimensions.forEach((columnDimension) => {\n const areAllVisible = columnDimension.columnIds.every(columnId => visibleColumnIds.includes(columnId));\n const areSomeVisible = columnDimension.columnIds.some(columnId => visibleColumnIds.includes(columnId));\n items.push({\n autoCloseDisabled: true,\n callback: () => toggleDimension(columnDimension.columnIds),\n // eslint-disable-next-line no-nested-ternary\n checked: areAllVisible ? 'true' : areSomeVisible ? 'mixed' : 'false',\n items: columnDimension.columnIds.map((columnId) => {\n const checked = visibleColumnIds.includes(columnId);\n return {\n autoCloseDisabled: true,\n callback: () => toggleItem(columnId),\n checked: checked ? 'true' : 'false',\n label: tableColumns.find(c => c.id === columnId)?.headerName ?? '',\n rightIcon: checked ? <CheckBoxOutlinedIcon /> : <CheckBoxOutlineBlankOutlinedIcon />,\n };\n }),\n label: columnDimension.label,\n // eslint-disable-next-line no-nested-ternary\n rightIcon: areAllVisible ? <CheckBoxOutlinedIcon /> : areSomeVisible ? <IndeterminateCheckBoxIcon /> : <CheckBoxOutlineBlankOutlinedIcon />,\n });\n });\n } else {\n tableColumns.filter(c => !c.frozen).forEach((column) => {\n const checked = visibleColumnIds.includes(column.id);\n items.push({\n autoCloseDisabled: true,\n callback: () => toggleItem(column.id),\n checked: checked ? 'true' : 'false',\n label: column.headerName,\n rightIcon: checked ? <CheckBoxOutlinedIcon /> : <CheckBoxOutlineBlankOutlinedIcon />,\n });\n });\n }\n\n return {\n items,\n label: t`Columns`,\n };\n }, [isCondensed, isCondensingSupported, t, columnDimensions, onIsCondensedMenuItemClick, onColumnsEditorMenuItemClick, emitTableEvent, tableColumns, onHideColumnsWithoutDataClick, visibleColumnIds, toggleDimension, toggleItem]);\n\n return menuItemData;\n};\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;;;;AAAA,IAAM,KAAc,MAAQ,OAAO,YAAY,GACzC,KAAsB,MAE1B,aAAa,GAET,KAAkB,GAAQ,MAAW;CACzC,IAAM,IAAO,aAAkB,MAAM,IAAS,IAAI,IAAI,EAAO,QAAQ,CAAC,GAChE,IAAO,aAAkB,MAAM,IAAS,IAAI,IAAI,EAAO,QAAQ,CAAC;CACtE,IAAI,EAAK,SAAS,EAAK,M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;IACnB,gBAAgB,EAAgB,EAAgB,SAAS;IAEzD,SAAS,IAAgB,SAAS,IAAiB,UAAU;IAC7D,OAAO,EAAgB,UAAU,KAAK,MAAa;KACjD,IAAM,IAAU,EAAiB,SAAS,CAAQ;KAClD,OAAO;MACL,mBAAmB;MACnB,gBAAgB,EAAW,CAAQ;MACnC,SAAS,IAAU,SAAS;MAC5B,OAAO,EAAa,MAAK,MAAK,EAAE,OAAO,CAAQ,CAAC,EAAE,cAAc;MAChE,WAAqB,EAAV,IAAW,IAA2B,GAA5B,CAAuB,CAAuC;KACrF;IACF,CAAC;IACD,OAAO,EAAgB;IAEvB,WAA2B,EAAhB,IAAiB,IAA0B,IAAkB,IAAgC,GAA7E,CAAuB,CAAwF;GAC5I,CAAC;EACH,CAAC,IAED,EAAa,QAAO,MAAK,CAAC,EAAE,MAAM,CAAC,CAAC,SAAS,MAAW;GACtD,IAAM,IAAU,EAAiB,SAAS,EAAO,EAAE;GACnD,EAAM,KAAK;IACT,mBAAmB;IACnB,gBAAgB,EAAW,EAAO,EAAE;IACpC,SAAS,IAAU,SAAS;IAC5B,OAAO,EAAO;IACd,WAAqB,EAAV,IAAW,IAA2B,GAA5B,CAAuB,CAAuC;GACrF,CAAC;EACH,CAAC,GAGI;GACL;GACA,OAAO,CAAC;EACV;CACF,GAAG;EAAC;EAAa;EAAuB;EAAG;EAAkB;EAA4B;EAA8B;EAAgB;EAAc;EAA+B;EAAkB;EAAiB;CAAU,CAE1N;AACT"}
1
+ {"version":3,"file":"useColumnsMenu.js","names":[],"sources":["../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.18_react@19.3.0_use-sync-external-store@1.6.0_react@19.3.0_/node_modules/zustand/esm/vanilla/shallow.mjs","../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.18_react@19.3.0_use-sync-external-store@1.6.0_react@19.3.0_/node_modules/zustand/esm/react/shallow.mjs","../../src/hooks/useColumnsMenu/useColumnsMenu.tsx"],"sourcesContent":["const isIterable = (obj) => Symbol.iterator in obj;\nconst hasIterableEntries = (value) => (\n // HACK: avoid checking entries type\n \"entries\" in value\n);\nconst compareEntries = (valueA, valueB) => {\n const mapA = valueA instanceof Map ? valueA : new Map(valueA.entries());\n const mapB = valueB instanceof Map ? valueB : new Map(valueB.entries());\n if (mapA.size !== mapB.size) {\n return false;\n }\n for (const [key, value] of mapA) {\n if (!mapB.has(key) || !Object.is(value, mapB.get(key))) {\n return false;\n }\n }\n return true;\n};\nconst compareIterables = (valueA, valueB) => {\n const iteratorA = valueA[Symbol.iterator]();\n const iteratorB = valueB[Symbol.iterator]();\n let nextA = iteratorA.next();\n let nextB = iteratorB.next();\n while (!nextA.done && !nextB.done) {\n if (!Object.is(nextA.value, nextB.value)) {\n return false;\n }\n nextA = iteratorA.next();\n nextB = iteratorB.next();\n }\n return !!nextA.done && !!nextB.done;\n};\nfunction shallow(valueA, valueB) {\n if (Object.is(valueA, valueB)) {\n return true;\n }\n if (typeof valueA !== \"object\" || valueA === null || typeof valueB !== \"object\" || valueB === null) {\n return false;\n }\n if (Object.getPrototypeOf(valueA) !== Object.getPrototypeOf(valueB)) {\n return false;\n }\n if (isIterable(valueA) && isIterable(valueB)) {\n if (hasIterableEntries(valueA) && hasIterableEntries(valueB)) {\n return compareEntries(valueA, valueB);\n }\n return compareIterables(valueA, valueB);\n }\n return compareEntries(\n { entries: () => Object.entries(valueA) },\n { entries: () => Object.entries(valueB) }\n );\n}\n\nexport { shallow };\n","import React from 'react';\nimport { shallow } from 'zustand/vanilla/shallow';\n\nfunction useShallow(selector) {\n const prev = React.useRef(void 0);\n return (state) => {\n const next = selector(state);\n return shallow(prev.current, next) ? prev.current : prev.current = next;\n };\n}\n\nexport { useShallow };\n","import { produce } from 'immer';\nimport { useStore } from 'zustand';\nimport { useShallow } from 'zustand/shallow';\nimport CheckBoxOutlinedIcon from '@mui/icons-material/CheckBoxOutlined';\nimport CheckBoxOutlineBlankOutlinedIcon from '@mui/icons-material/CheckBoxOutlineBlankOutlined';\nimport ToggleOffOutlinedIcon from '@mui/icons-material/ToggleOffOutlined';\nimport ToggleOnOutlinedIcon from '@mui/icons-material/ToggleOnOutlined';\nimport IndeterminateCheckBoxIcon from '@mui/icons-material/IndeterminateCheckBox';\nimport {\n useCallback,\n useMemo,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport type { MenuItemData } from '@gen-epix/ui-core-components/models/nestedMenu';\n\nimport type { HasCellDataFn } from '../../models/table';\nimport { useTableStoreContext } from '../../stores/tableStore';\nimport { TableUtil } from '../../utils/TableUtil';\n\n\nexport type UseColumnsMenuProps<TRowData, TDataContext = null> = {\n readonly hasCellData?: HasCellDataFn<TRowData, TDataContext>;\n};\n\nexport const useColumnsMenu = <TRowData, TDataContext = null>({ hasCellData }: UseColumnsMenuProps<TRowData, TDataContext>): MenuItemData => {\n const tableStore = useTableStoreContext<TRowData, TDataContext>();\n const emitTableEvent = useStore(tableStore, useShallow((state) => state.emitEvent));\n const tableColumns = useStore(tableStore, useShallow((state) => state.columns));\n const dataContext = useStore(tableStore, useShallow((state) => state.dataContext));\n const visibleColumnIds = useStore(tableStore, useShallow((state) => state.getCurrentColumnVisualSettings().filter(c => c.isVisible).map(c => c.id)));\n const columnDimensions = useStore(tableStore, useShallow((state) => state.columnDimensions));\n const isCondensed = useStore(tableStore, useShallow((state) => state.isCondensed));\n const sortedData = useStore(tableStore, useShallow((state) => state.sortedData));\n const { t } = useTranslation();\n\n const isCondensingSupported = useMemo(() => {\n return tableColumns.some(c => c.cellColorGetter);\n }, [tableColumns]);\n\n const onColumnsEditorMenuItemClick = useCallback(() => {\n emitTableEvent('openColumnsEditorDialog', hasCellData);\n }, [emitTableEvent, hasCellData]);\n\n const toggleItem = useCallback((columnId: string): void => {\n const newVisibleColumnIds = produce(visibleColumnIds, (draft) => {\n if (draft.includes(columnId)) {\n return draft.filter(c => c !== columnId);\n }\n draft.push(columnId);\n return draft;\n });\n emitTableEvent('columnVisibilityChange', newVisibleColumnIds);\n }, [emitTableEvent, visibleColumnIds]);\n\n const toggleDimension = useCallback((dimensionColumnIds: string[]): void => {\n const areAllVisible = dimensionColumnIds.every(columnId => visibleColumnIds.includes(columnId));\n const newVisibleColumnIds = produce(visibleColumnIds, (draft) => {\n if (areAllVisible) {\n return draft.filter(c => !dimensionColumnIds.includes(c));\n }\n dimensionColumnIds.forEach((columnId) => {\n if (!draft.includes(columnId)) {\n draft.push(columnId);\n }\n });\n return draft;\n });\n emitTableEvent('columnVisibilityChange', newVisibleColumnIds);\n }, [emitTableEvent, visibleColumnIds]);\n\n const onHideColumnsWithoutDataClick = useCallback(() => {\n emitTableEvent('columnVisibilityChange', TableUtil.getColumnIdsWithData<TRowData, TDataContext>({\n dataContext,\n hasCellData,\n sortedData,\n tableColumns,\n visibleColumnIds,\n }));\n\n }, [emitTableEvent, hasCellData, sortedData, tableColumns, visibleColumnIds, dataContext]);\n\n const onIsCondensedMenuItemClick = useCallback(() => {\n emitTableEvent('condensedChange', !isCondensed);\n }, [emitTableEvent, isCondensed]);\n\n const menuItemData: MenuItemData = useMemo(() => {\n const items: MenuItemData[] = [\n isCondensingSupported ? {\n autoCloseDisabled: true,\n callback: () => onIsCondensedMenuItemClick(),\n checked: isCondensed ? 'true' : 'false',\n divider: true,\n label: t`Condensed`,\n rightIcon: isCondensed ? <ToggleOnOutlinedIcon /> : <ToggleOffOutlinedIcon />,\n } : undefined,\n {\n callback: () => onColumnsEditorMenuItemClick(),\n divider: true,\n label: t`Change order / visibility`,\n },\n {\n autoCloseDisabled: true,\n callback: () => emitTableEvent('reset'),\n label: t`Reset`,\n },\n {\n autoCloseDisabled: true,\n callback: () => {\n emitTableEvent('columnVisibilityChange', [...tableColumns.map(c => c.id)]);\n },\n label: t`Show all`,\n },\n {\n autoCloseDisabled: true,\n callback: () => {\n emitTableEvent('columnVisibilityChange', [...tableColumns.filter(c => c.frozen).map(c => c.id)]);\n },\n label: t`Hide all`,\n },\n {\n autoCloseDisabled: true,\n callback: () => onHideColumnsWithoutDataClick(),\n divider: true,\n label: t`Hide columns without data`,\n },\n ].filter(x => x) as MenuItemData[];\n\n if (columnDimensions) {\n columnDimensions.forEach((columnDimension) => {\n const areAllVisible = columnDimension.columnIds.every(columnId => visibleColumnIds.includes(columnId));\n const areSomeVisible = columnDimension.columnIds.some(columnId => visibleColumnIds.includes(columnId));\n items.push({\n autoCloseDisabled: true,\n callback: () => toggleDimension(columnDimension.columnIds),\n // eslint-disable-next-line no-nested-ternary\n checked: areAllVisible ? 'true' : areSomeVisible ? 'mixed' : 'false',\n items: columnDimension.columnIds.map((columnId) => {\n const checked = visibleColumnIds.includes(columnId);\n return {\n autoCloseDisabled: true,\n callback: () => toggleItem(columnId),\n checked: checked ? 'true' : 'false',\n label: tableColumns.find(c => c.id === columnId)?.headerName ?? '',\n rightIcon: checked ? <CheckBoxOutlinedIcon /> : <CheckBoxOutlineBlankOutlinedIcon />,\n };\n }),\n label: columnDimension.label,\n // eslint-disable-next-line no-nested-ternary\n rightIcon: areAllVisible ? <CheckBoxOutlinedIcon /> : areSomeVisible ? <IndeterminateCheckBoxIcon /> : <CheckBoxOutlineBlankOutlinedIcon />,\n });\n });\n } else {\n tableColumns.filter(c => !c.frozen).forEach((column) => {\n const checked = visibleColumnIds.includes(column.id);\n items.push({\n autoCloseDisabled: true,\n callback: () => toggleItem(column.id),\n checked: checked ? 'true' : 'false',\n label: column.headerName,\n rightIcon: checked ? <CheckBoxOutlinedIcon /> : <CheckBoxOutlineBlankOutlinedIcon />,\n });\n });\n }\n\n return {\n items,\n label: t`Columns`,\n };\n }, [isCondensed, isCondensingSupported, t, columnDimensions, onIsCondensedMenuItemClick, onColumnsEditorMenuItemClick, emitTableEvent, tableColumns, onHideColumnsWithoutDataClick, visibleColumnIds, toggleDimension, toggleItem]);\n\n return menuItemData;\n};\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;;;;AAAA,IAAM,KAAc,MAAQ,OAAO,YAAY,GACzC,K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EAuCf,OArCI,IACF,EAAiB,SAAS,MAAoB;GAC5C,IAAM,IAAgB,EAAgB,UAAU,OAAM,MAAY,EAAiB,SAAS,CAAQ,CAAC,GAC/F,IAAiB,EAAgB,UAAU,MAAK,MAAY,EAAiB,SAAS,CAAQ,CAAC;GACrG,EAAM,KAAK;IACT,mBAAmB;IACnB,gBAAgB,EAAgB,EAAgB,SAAS;IAEzD,SAAS,IAAgB,SAAS,IAAiB,UAAU;IAC7D,OAAO,EAAgB,UAAU,KAAK,MAAa;KACjD,IAAM,IAAU,EAAiB,SAAS,CAAQ;KAClD,OAAO;MACL,mBAAmB;MACnB,gBAAgB,EAAW,CAAQ;MACnC,SAAS,IAAU,SAAS;MAC5B,OAAO,EAAa,MAAK,MAAK,EAAE,OAAO,CAAQ,CAAC,EAAE,cAAc;MAChE,WAAqB,EAAV,IAAW,IAA2B,GAA5B,CAAuB,CAAuC;KACrF;IACF,CAAC;IACD,OAAO,EAAgB;IAEvB,WAA2B,EAAhB,IAAiB,IAA0B,IAAkB,IAAgC,GAA7E,CAAuB,CAAwF;GAC5I,CAAC;EACH,CAAC,IAED,EAAa,QAAO,MAAK,CAAC,EAAE,MAAM,CAAC,CAAC,SAAS,MAAW;GACtD,IAAM,IAAU,EAAiB,SAAS,EAAO,EAAE;GACnD,EAAM,KAAK;IACT,mBAAmB;IACnB,gBAAgB,EAAW,EAAO,EAAE;IACpC,SAAS,IAAU,SAAS;IAC5B,OAAO,EAAO;IACd,WAAqB,EAAV,IAAW,IAA2B,GAA5B,CAAuB,CAAuC;GACrF,CAAC;EACH,CAAC,GAGI;GACL;GACA,OAAO,CAAC;EACV;CACF,GAAG;EAAC;EAAa;EAAuB;EAAG;EAAkB;EAA4B;EAA8B;EAAgB;EAAc;EAA+B;EAAkB;EAAiB;CAAU,CAE1N;AACT"}
@@ -2,7 +2,7 @@ import { n as e } from "./QueryClientProvider.js";
2
2
  import { b as t, c as n, d as r, g as i, o as a, x as o } from "./query.js";
3
3
  import { n as s } from "./QueryClientService.js";
4
4
  import * as c from "react";
5
- //#region ../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/mutationObserver.js
5
+ //#region ../../node_modules/.pnpm/@tanstack+query-core@5.103.1/node_modules/@tanstack/query-core/build/modern/mutationObserver.js
6
6
  var l = class extends n {
7
7
  #e;
8
8
  #t = void 0;
@@ -91,7 +91,7 @@ var l = class extends n {
91
91
  }
92
92
  };
93
93
  //#endregion
94
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.2.8/node_modules/@tanstack/react-query/build/modern/useMutation.js
94
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useMutation.js
95
95
  function u(t, n) {
96
96
  let r = e(n), [s] = c.useState(() => new l(r, t));
97
97
  c.useEffect(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"useMutation.js","names":["React"],"sources":["../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/mutationObserver.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.2.8/node_modules/@tanstack/react-query/build/modern/useMutation.js"],"sourcesContent":["import { hashKey, shallowEqualObjects } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { getDefaultState } from \"./mutation.js\";\n//#region src/mutationObserver.ts\nvar MutationObserver = class extends Subscribable {\n\t#client;\n\t#currentResult = void 0;\n\t#currentMutation;\n\t#mutateOptions;\n\tconstructor(client, options) {\n\t\tsuper();\n\t\tthis.#client = client;\n\t\tthis.setOptions(options);\n\t\tthis.bindMethods();\n\t\tthis.#updateResult();\n\t}\n\tbindMethods() {\n\t\tthis.mutate = this.mutate.bind(this);\n\t\tthis.reset = this.reset.bind(this);\n\t}\n\tsetOptions(options) {\n\t\tconst prevOptions = this.options;\n\t\tthis.options = this.#client.defaultMutationOptions(options);\n\t\tif (!shallowEqualObjects(this.options, prevOptions)) this.#client.getMutationCache().notify({\n\t\t\ttype: \"observerOptionsUpdated\",\n\t\t\tmutation: this.#currentMutation,\n\t\t\tobserver: this\n\t\t});\n\t\tif (prevOptions?.mutationKey && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) this.reset();\n\t\telse if (this.#currentMutation?.state.status === \"pending\") this.#currentMutation.setOptions(this.options);\n\t}\n\tonSubscribe() {\n\t\tif (this.listeners.size === 1 && this.#currentMutation) {\n\t\t\tthis.#currentMutation.addObserver(this);\n\t\t\tthis.#updateResult();\n\t\t}\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) this.#currentMutation?.removeObserver(this);\n\t}\n\tonMutationUpdate(action) {\n\t\tthis.#updateResult();\n\t\tthis.#notify(action);\n\t}\n\tgetCurrentResult() {\n\t\treturn this.#currentResult;\n\t}\n\treset() {\n\t\tthis.#currentMutation?.removeObserver(this);\n\t\tthis.#currentMutation = void 0;\n\t\tthis.#updateResult();\n\t\tthis.#notify();\n\t}\n\tmutate(variables, options) {\n\t\tthis.#mutateOptions = options;\n\t\tthis.#currentMutation?.removeObserver(this);\n\t\tthis.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);\n\t\tthis.#currentMutation.addObserver(this);\n\t\treturn this.#currentMutation.execute(variables);\n\t}\n\t#updateResult() {\n\t\tconst state = this.#currentMutation?.state ?? getDefaultState();\n\t\tthis.#currentResult = {\n\t\t\t...state,\n\t\t\tisPending: state.status === \"pending\",\n\t\t\tisSuccess: state.status === \"success\",\n\t\t\tisError: state.status === \"error\",\n\t\t\tisIdle: state.status === \"idle\",\n\t\t\tmutate: this.mutate,\n\t\t\treset: this.reset\n\t\t};\n\t}\n\t#notify(action) {\n\t\tnotifyManager.batch(() => {\n\t\t\tif (this.#mutateOptions && this.hasListeners()) {\n\t\t\t\tconst variables = this.#currentResult.variables;\n\t\t\t\tconst onMutateResult = this.#currentResult.context;\n\t\t\t\tconst context = {\n\t\t\t\t\tclient: this.#client,\n\t\t\t\t\tmeta: this.options.meta,\n\t\t\t\t\tmutationKey: this.options.mutationKey\n\t\t\t\t};\n\t\t\t\tif (action?.type === \"success\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSuccess?.(action.data, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSettled?.(action.data, null, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t} else if (action?.type === \"error\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onError?.(action.error, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSettled?.(void 0, action.error, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\tlistener(this.#currentResult);\n\t\t\t});\n\t\t});\n\t}\n};\n//#endregion\nexport { MutationObserver };\n\n//# sourceMappingURL=mutationObserver.js.map","\"use client\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport * as React from \"react\";\nimport { MutationObserver, noop, notifyManager, shouldThrowError } from \"@tanstack/query-core\";\n//#region src/useMutation.ts\nfunction useMutation(options, queryClient) {\n\tconst client = useQueryClient(queryClient);\n\tconst [observer] = React.useState(() => new MutationObserver(client, options));\n\tReact.useEffect(() => {\n\t\tobserver.setOptions(options);\n\t}, [observer, options]);\n\tconst result = React.useSyncExternalStore(React.useCallback((onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), [observer]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n\tconst mutate = React.useCallback((...args) => {\n\t\tobserver.mutate(args[0], args[1]).catch(noop);\n\t}, [observer]);\n\tif (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) throw result.error;\n\treturn {\n\t\t...result,\n\t\tmutate,\n\t\tmutateAsync: result.mutate\n\t};\n}\n//#endregion\nexport { useMutation };\n\n//# sourceMappingURL=useMutation.js.map"],"x_google_ignoreList":[0,1],"mappings":";;;;;AAKA,IAAI,IAAmB,cAAc,EAAa;CACjD;CACA,KAAiB,KAAK;CACtB;CACA;CACA,YAAY,GAAQ,GAAS;EAK5B,AAJA,MAAM,GACN,KAAK,KAAU,GACf,KAAK,WAAW,CAAO,GACvB,KAAK,YAAY,GACjB,KAAK,GAAc;CACpB;CACA,cAAc;EAEb,AADA,KAAK,SAAS,KAAK,OAAO,KAAK,IAAI,GACnC,KAAK,QAAQ,KAAK,MAAM,KAAK,IAAI;CAClC;CACA,WAAW,GAAS;EACnB,IAAM,IAAc,KAAK;EAOzB,AANA,KAAK,UAAU,KAAK,GAAQ,uBAAuB,CAAO,GACrD,EAAoB,KAAK,SAAS,CAAW,KAAG,KAAK,GAAQ,iBAAiB,CAAC,CAAC,OAAO;GAC3F,MAAM;GACN,UAAU,KAAK;GACf,UAAU;EACX,CAAC,GACG,GAAa,eAAe,KAAK,QAAQ,eAAe,EAAQ,EAAY,WAAW,MAAM,EAAQ,KAAK,QAAQ,WAAW,IAAG,KAAK,MAAM,IACtI,KAAK,IAAkB,MAAM,WAAW,aAAW,KAAK,GAAiB,WAAW,KAAK,OAAO;CAC1G;CACA,cAAc;EACb,AAAI,KAAK,UAAU,SAAS,KAAK,KAAK,OACrC,KAAK,GAAiB,YAAY,IAAI,GACtC,KAAK,GAAc;CAErB;CACA,gBAAgB;EACf,AAAK,KAAK,aAAa,KAAG,KAAK,IAAkB,eAAe,IAAI;CACrE;CACA,iBAAiB,GAAQ;EAExB,AADA,KAAK,GAAc,GAC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GAAgB,CAAO;KAC/E,SAAS,GAAG;MACX,QAAQ,OAAO,CAAC;KACjB;KACA,IAAI;MACH,KAAK,GAAe,YAAY,KAAK,GAAG,EAAO,OAAO,GAAW,GAAgB,CAAO;KACzF,SAAS,GAAG;MACX,QAAQ,OAAO,CAAC;KACjB;IACD;GACD;GACA,KAAK,UAAU,SAAS,MAAa;IACpC,EAAS,KAAK,EAAc;GAC7B,CAAC;EACF,CAAC;CACF;AACD;;;AC3GA,SAAS,EAAY,GAAS,GAAa;CAC1C,IAAM,IAAS,EAAe,CAAW,GACnC,CAAC,KAAYA,EAAM,eAAe,IAAI,EAAiB,GAAQ,CAAO,CAAC;CAC7E,EAAM,gBAAgB;EACrB,EAAS,WAAW,CAAO;CAC5B,GAAG,CAAC,GAAU,CAAO,CAAC;CACtB,IAAM,IAASA,EAAM,qBAAqBA,EAAM,aAAa,MAAkB,EAAS,UAAU,EAAc,WAAW,CAAa,CAAC,GAAG,CAAC,CAAQ,CAAC,SAAS,EAAS,iBAAiB,SAAS,EAAS,iBAAiB,CAAC,GACvN,IAASA,EAAM,aAAa,GAAG,MAAS;EAC7C,EAAS,OAAO,EAAK,IAAI,EAAK,EAAE,CAAC,CAAC,MAAM,CAAI;CAC7C,GAAG,CAAC,CAAQ,CAAC;CACb,IAAI,EAAO,SAAS,EAAiB,EAAS,QAAQ,cAAc,CAAC,EAAO,KAAK,CAAC,GAAG,MAAM,EAAO;CAClG,OAAO;EACN,GAAG;EACH;EACA,aAAa,EAAO;CACrB;AACD"}
1
+ {"version":3,"file":"useMutation.js","names":["React"],"sources":["../../../../node_modules/.pnpm/@tanstack+query-core@5.103.1/node_modules/@tanstack/query-core/build/modern/mutationObserver.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useMutation.js"],"sourcesContent":["import { hashKey, shallowEqualObjects } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { getDefaultState } from \"./mutation.js\";\n//#region src/mutationObserver.ts\n/**\n* Observes a single mutation and derives a `MutationObserverResult` from it.\n* A framework hook like `useMutation` creates one `MutationObserver` per hook\n* call, keeps it stable across re-renders, calls `setOptions` when the options\n* passed to the hook change, subscribes to it to re-render on updates, and\n* reads `getCurrentResult()` for the value to return. Calling `mutate()`\n* builds a new underlying `Mutation` in the `MutationCache` and executes it.\n*\n* @example\n* ```ts\n* const observer = new MutationObserver(queryClient, {\n* mutationFn: (variables: { title: string }) => addPost(variables),\n* })\n* ```\n*/\nvar MutationObserver = class extends Subscribable {\n\t#client;\n\t#currentResult = void 0;\n\t#currentMutation;\n\t#mutateOptions;\n\tconstructor(client, options) {\n\t\tsuper();\n\t\tthis.#client = client;\n\t\tthis.setOptions(options);\n\t\tthis.bindMethods();\n\t\tthis.#updateResult();\n\t}\n\tbindMethods() {\n\t\tthis.mutate = this.mutate.bind(this);\n\t\tthis.reset = this.reset.bind(this);\n\t}\n\t/**\n\t* Updates the observer's options.\n\t*\n\t* If the new `mutationKey` differs from the previous one (and both were\n\t* defined), the observer is reset, detaching it from the mutation it was\n\t* observing. Otherwise, if the currently observed mutation is still\n\t* `pending`, its options are updated in place as well.\n\t*\n\t* @example\n\t* ```ts\n\t* observer.setOptions({\n\t* mutationFn: (variables: { title: string }) => addPost(variables),\n\t* onSuccess: (data) => console.log(data),\n\t* })\n\t* ```\n\t*/\n\tsetOptions(options) {\n\t\tconst prevOptions = this.options;\n\t\tthis.options = this.#client.defaultMutationOptions(options);\n\t\tif (!shallowEqualObjects(this.options, prevOptions)) this.#client.getMutationCache().notify({\n\t\t\ttype: \"observerOptionsUpdated\",\n\t\t\tmutation: this.#currentMutation,\n\t\t\tobserver: this\n\t\t});\n\t\tif (prevOptions?.mutationKey && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) this.reset();\n\t\telse if (this.#currentMutation?.state.status === \"pending\") this.#currentMutation.setOptions(this.options);\n\t}\n\tonSubscribe() {\n\t\tif (this.listeners.size === 1 && this.#currentMutation) {\n\t\t\tthis.#currentMutation.addObserver(this);\n\t\t\tthis.#updateResult();\n\t\t}\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) this.#currentMutation?.removeObserver(this);\n\t}\n\t/** @internal */\n\tonMutationUpdate(action) {\n\t\tthis.#updateResult();\n\t\tthis.#notify(action);\n\t}\n\t/**\n\t* Returns the observer's current result, derived from the observed\n\t* mutation's state (or the default, `idle` state if no mutation has been\n\t* built yet, e.g. before the first `mutate()` call or after `reset()`).\n\t*/\n\tgetCurrentResult() {\n\t\treturn this.#currentResult;\n\t}\n\t/**\n\t* Detaches the observer from the mutation it is currently observing (if\n\t* any) and resets the observed result back to its default, `idle` state.\n\t*\n\t* This does not cancel an in-flight mutation; the mutation itself keeps\n\t* running to completion and its own callbacks still fire, but this\n\t* observer stops reflecting its state and a subsequent `mutate()` call\n\t* will build a brand new mutation.\n\t*\n\t* @example\n\t* ```ts\n\t* observer.reset()\n\t* ```\n\t*\n\t* @see {@link MutationObserver#mutate}\n\t*/\n\treset() {\n\t\tthis.#currentMutation?.removeObserver(this);\n\t\tthis.#currentMutation = void 0;\n\t\tthis.#updateResult();\n\t\tthis.#notify();\n\t}\n\t/**\n\t* Builds a new `Mutation` in the `MutationCache` using the observer's\n\t* current options, detaches this observer from any previously observed\n\t* mutation, attaches it to the new one, and executes it with the given\n\t* variables.\n\t*\n\t* The optional per-call `options` (`onSuccess`/`onError`/`onSettled`) are\n\t* invoked once the mutation settles, in addition to any callbacks defined\n\t* on the observer's own options.\n\t*\n\t* @example\n\t* ```ts\n\t* await observer.mutate(\n\t* { title: 'New post' },\n\t* { onSuccess: (data) => console.log(data) },\n\t* )\n\t* ```\n\t*/\n\tmutate(variables, options) {\n\t\tthis.#mutateOptions = options;\n\t\tthis.#currentMutation?.removeObserver(this);\n\t\tthis.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);\n\t\tthis.#currentMutation.addObserver(this);\n\t\treturn this.#currentMutation.execute(variables);\n\t}\n\t#updateResult() {\n\t\tconst state = this.#currentMutation?.state ?? getDefaultState();\n\t\tthis.#currentResult = {\n\t\t\t...state,\n\t\t\tisPending: state.status === \"pending\",\n\t\t\tisSuccess: state.status === \"success\",\n\t\t\tisError: state.status === \"error\",\n\t\t\tisIdle: state.status === \"idle\",\n\t\t\tmutate: this.mutate,\n\t\t\treset: this.reset\n\t\t};\n\t}\n\t#notify(action) {\n\t\tnotifyManager.batch(() => {\n\t\t\tif (this.#mutateOptions && this.hasListeners()) {\n\t\t\t\tconst variables = this.#currentResult.variables;\n\t\t\t\tconst onMutateResult = this.#currentResult.context;\n\t\t\t\tconst context = {\n\t\t\t\t\tclient: this.#client,\n\t\t\t\t\tmeta: this.options.meta,\n\t\t\t\t\tmutationKey: this.options.mutationKey\n\t\t\t\t};\n\t\t\t\tif (action?.type === \"success\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSuccess?.(action.data, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSettled?.(action.data, null, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t} else if (action?.type === \"error\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onError?.(action.error, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSettled?.(void 0, action.error, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\tlistener(this.#currentResult);\n\t\t\t});\n\t\t});\n\t}\n};\n//#endregion\nexport { MutationObserver };\n\n//# sourceMappingURL=mutationObserver.js.map","\"use client\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport * as React from \"react\";\nimport { MutationObserver, noop, notifyManager, shouldThrowError } from \"@tanstack/query-core\";\n//#region src/useMutation.ts\n/**\n* Unlike queries, mutations are typically used to create/update/delete data or perform server side-effects.\n* `useMutation` is the hook for that.\n*\n* @see {@link mutationOptions} to share these options across multiple `useMutation` call sites, or to look\n* the mutation up elsewhere via its `mutationKey` (e.g. with `useMutationState`).\n* @param options - The {@link UseMutationOptions} to use — everything you can pass to `useMutation`.\n* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will\n* be used.\n* @returns `mutate`/`mutateAsync` also accept per-call `onSuccess`/`onError`/`onSettled` callbacks as a second\n* argument, useful for triggering call-site side effects (e.g. navigation) without coupling them to the shared\n* mutation definition. Hook-level callbacks (passed to `options`) fire for every mutation; per-call callbacks\n* fire only for the latest call you've made, and only while the component is still mounted — unmounting before\n* the mutation settles removes the subscription and prevents them from firing.\n*\n* @example\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* return (\n* <button\n* onClick={() =>\n* addMutation.mutate('Item', {\n* onError: (error) => console.error('Failed to add item:', error),\n* })\n* }\n* >\n* Add\n* </button>\n* )\n* }\n* ```\n*\n* @example\n* Rendering the mutation's own state, rather than just firing it off:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* return (\n* <div>\n* {addMutation.isPending ? (\n* 'Adding todo...'\n* ) : (\n* <>\n* {addMutation.isError ? (\n* <div>An error occurred: {addMutation.error.message}</div>\n* ) : null}\n* <button onClick={() => addMutation.mutate('Item')}>Add</button>\n* </>\n* )}\n* </div>\n* )\n* }\n* ```\n*\n* @example\n* Optimistic update via `onMutate`, rolling back on `onError`:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onMutate: async (newTodo) => {\n* await queryClient.cancelQueries({ queryKey: ['todos'] })\n* const previousTodos = queryClient.getQueryData<Array<string>>(['todos'])\n*\n* queryClient.setQueryData<Array<string>>(['todos'], (old) => [\n* ...(old ?? []),\n* newTodo,\n* ])\n*\n* // Passed to `onError` as `onMutateResult` if the mutation fails.\n* return { previousTodos }\n* },\n* onError: (_err, _newTodo, onMutateResult) => {\n* queryClient.setQueryData(['todos'], onMutateResult?.previousTodos)\n* },\n* onSettled: () => {\n* queryClient.invalidateQueries({ queryKey: ['todos'] })\n* },\n* })\n*\n* return (\n* <button onClick={() => addMutation.mutate('Item')}>Add</button>\n* )\n* }\n* ```\n*\n* @example\n* Callbacks passed per call to `mutate` only fire for the last call — `mutateAsync` gives you a\n* promise per call instead, so you can wait for all of them when they succeed:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodos() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* async function handleAddAll(todos: Array<string>) {\n* try {\n* await Promise.all(todos.map((todo) => addMutation.mutateAsync(todo)))\n* } catch (error) {\n* console.error('Failed to add todos:', error)\n* }\n* }\n*\n* return (\n* <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>\n* Add all\n* </button>\n* )\n* }\n* ```\n*\n* @example\n* If some of the mutations above can fail independently of the others, and you want to know which ones\n* did — rather than losing that information the moment the first one rejects — swap `Promise.all` for\n* `Promise.allSettled`:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodos() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* async function handleAddAll(todos: Array<string>) {\n* const addResults = await Promise.allSettled(\n* todos.map((todo) => addMutation.mutateAsync(todo)),\n* )\n*\n* addResults.forEach((addResult, index) => {\n* if (addResult.status === 'rejected') {\n* console.error(`Failed to add \"${todos[index]}\":`, addResult.reason)\n* }\n* })\n* }\n*\n* return (\n* <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>\n* Add all\n* </button>\n* )\n* }\n* ```\n*/\nfunction useMutation(options, queryClient) {\n\tconst client = useQueryClient(queryClient);\n\tconst [observer] = React.useState(() => new MutationObserver(client, options));\n\tReact.useEffect(() => {\n\t\tobserver.setOptions(options);\n\t}, [observer, options]);\n\tconst result = React.useSyncExternalStore(React.useCallback((onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), [observer]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n\tconst mutate = React.useCallback((...args) => {\n\t\tobserver.mutate(args[0], args[1]).catch(noop);\n\t}, [observer]);\n\tif (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) throw result.error;\n\treturn {\n\t\t...result,\n\t\tmutate,\n\t\tmutateAsync: result.mutate\n\t};\n}\n//#endregion\nexport { useMutation };\n\n//# sourceMappingURL=useMutation.js.map"],"x_google_ignoreList":[0,1],"mappings":";;;;;AAoBA,IAAI,IAAmB,cAAc,EAAa;CACjD;CACA,KAAiB,KAAK;CACtB;CACA;CACA,YAAY,GAAQ,GAAS;EAK5B,AAJA,MAAM,GACN,KAAK,KAAU,GACf,KAAK,WAAW,CAAO,GACvB,KAAK,YAAY,GACjB,KAAK,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C,GAAU,CAAO,CAAC;CACtB,IAAM,IAASA,EAAM,qBAAqBA,EAAM,aAAa,MAAkB,EAAS,UAAU,EAAc,WAAW,CAAa,CAAC,GAAG,CAAC,CAAQ,CAAC,SAAS,EAAS,iBAAiB,SAAS,EAAS,iBAAiB,CAAC,GACvN,IAASA,EAAM,aAAa,GAAG,MAAS;EAC7C,EAAS,OAAO,EAAK,IAAI,EAAK,EAAE,CAAC,CAAC,MAAM,CAAI;CAC7C,GAAG,CAAC,CAAQ,CAAC;CACb,IAAI,EAAO,SAAS,EAAiB,EAAS,QAAQ,cAAc,CAAC,EAAO,KAAK,CAAC,GAAG,MAAM,EAAO;CAClG,OAAO;EACN,GAAG;EACH;EACA,aAAa,EAAO;CACrB;AACD"}
@@ -3,7 +3,7 @@ import { C as t, b as n, c as r, g as i, l as a, n as o, o as s, p as c, s as l,
3
3
  import * as m from "react";
4
4
  import { useMemo as h } from "react";
5
5
  import "react/jsx-runtime";
6
- //#region ../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/queryObserver.js
6
+ //#region ../../node_modules/.pnpm/@tanstack+query-core@5.103.1/node_modules/@tanstack/query-core/build/modern/queryObserver.js
7
7
  var g = class extends r {
8
8
  #e;
9
9
  #t = void 0;
@@ -109,7 +109,7 @@ var g = class extends r {
109
109
  }, n);
110
110
  }
111
111
  #_() {
112
- return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
112
+ return p(this.options.refetchInterval, this.#t) ?? !1;
113
113
  }
114
114
  #v(e) {
115
115
  this.#x(), this.#f = e, !(this.#f === 0 || !this.#h(this.#f)) && (this.#d = d.setInterval(() => {
@@ -220,7 +220,7 @@ function v(e, t) {
220
220
  }
221
221
  function y(e, t, n) {
222
222
  if (p(t.enabled, e) !== !1 && p(t.staleTime, e) !== "static") {
223
- let r = typeof n == "function" ? n(e) : n;
223
+ let r = p(n, e);
224
224
  return r === "always" || r !== !1 && x(e, t);
225
225
  }
226
226
  return !1;
@@ -232,11 +232,11 @@ function x(e, t) {
232
232
  return p(t.enabled, e) !== !1 && e.isStaleByTime(p(t.staleTime, e));
233
233
  }
234
234
  //#endregion
235
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.2.8/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
235
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.3.0/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
236
236
  var S = m.createContext(!1), C = () => m.useContext(S);
237
237
  S.Provider;
238
238
  //#endregion
239
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.2.8/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
239
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.3.0/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
240
240
  function w() {
241
241
  let e = !1;
242
242
  return {
@@ -265,7 +265,7 @@ var T = m.createContext(w()), E = () => m.useContext(T), D = (e, t, n) => {
265
265
  n.clearReset();
266
266
  });
267
267
  //#endregion
268
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.2.8/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
268
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
269
269
  function N(t, n, r) {
270
270
  if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t))) throw Error("Bad argument type. Starting with v5, only the \"Object\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object");
271
271
  let a = C(), o = E(), c = e(r), l = c.defaultQueryOptions(t), u = c.getQueryCache().get(l.queryHash);
@@ -289,7 +289,7 @@ function N(t, n, r) {
289
289
  return l.notifyOnChangeProps ? p : f.trackResult(p);
290
290
  }
291
291
  //#endregion
292
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.2.8/node_modules/@tanstack/react-query/build/modern/useQuery.js
292
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useQuery.js
293
293
  function P(e, t) {
294
294
  return N(e, g, t);
295
295
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useQueryMemo.js","names":["React","React","React"],"sources":["../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/queryObserver.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.2.8/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.2.8/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.2.8/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.2.8/node_modules/@tanstack/react-query/build/modern/suspense.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.2.8/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.2.8/node_modules/@tanstack/react-query/build/modern/useQuery.js","../../src/hooks/useQueryMemo/useQueryMemo.ts"],"sourcesContent":["import { timeoutManager } from \"./timeoutManager.js\";\nimport { isValidTimeout, noop, replaceData, resolveQueryValue, shallowEqualObjects, timeUntilStale } from \"./utils.js\";\nimport { isServer } from \"./environmentManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { fetchState } from \"./query.js\";\n//#region src/queryObserver.ts\nvar QueryObserver = class extends Subscribable {\n\t#client;\n\t#currentQuery = void 0;\n\t#currentQueryInitialState = void 0;\n\t#currentResult = void 0;\n\t#currentResultState;\n\t#currentResultOptions;\n\t#selectError;\n\t#selectFn;\n\t#selectResult;\n\t#lastQueryWithDefinedData;\n\t#staleTimeoutId;\n\t#refetchIntervalId;\n\t#currentRefetchInterval;\n\t#trackedProps = /* @__PURE__ */ new Set();\n\tconstructor(client, options) {\n\t\tsuper();\n\t\tthis.options = options;\n\t\tthis.#client = client;\n\t\tthis.#selectError = null;\n\t\tthis.bindMethods();\n\t\tthis.setOptions(options);\n\t}\n\tbindMethods() {\n\t\tthis.refetch = this.refetch.bind(this);\n\t}\n\tonSubscribe() {\n\t\tif (this.listeners.size === 1) {\n\t\t\tthis.#currentQuery.addObserver(this);\n\t\t\tif (shouldFetchOnMount(this.#currentQuery, this.options)) this.#executeFetch();\n\t\t\telse this.updateResult();\n\t\t\tthis.#updateTimers();\n\t\t}\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) this.destroy();\n\t}\n\tshouldFetchOnReconnect() {\n\t\treturn shouldFetchOn(this.#currentQuery, this.options, this.options.refetchOnReconnect);\n\t}\n\tshouldFetchOnWindowFocus() {\n\t\treturn shouldFetchOn(this.#currentQuery, this.options, this.options.refetchOnWindowFocus);\n\t}\n\tdestroy() {\n\t\tthis.listeners = /* @__PURE__ */ new Set();\n\t\tthis.#clearStaleTimeout();\n\t\tthis.#clearRefetchInterval();\n\t\tthis.#currentQuery.removeObserver(this);\n\t}\n\tsetOptions(options) {\n\t\tconst prevOptions = this.options;\n\t\tconst prevQuery = this.#currentQuery;\n\t\tthis.options = this.#client.defaultQueryOptions(options);\n\t\tif (this.options.enabled !== void 0 && typeof this.options.enabled !== \"boolean\" && typeof this.options.enabled !== \"function\" && typeof resolveQueryValue(this.options.enabled, this.#currentQuery) !== \"boolean\") throw new Error(\"Expected enabled to be a boolean or a callback that returns a boolean\");\n\t\tthis.#updateQuery();\n\t\tthis.#currentQuery.setOptions(this.options);\n\t\tif (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) this.#client.getQueryCache().notify({\n\t\t\ttype: \"observerOptionsUpdated\",\n\t\t\tquery: this.#currentQuery,\n\t\t\tobserver: this\n\t\t});\n\t\tconst mounted = this.hasListeners();\n\t\tif (mounted && shouldFetchOptionally(this.#currentQuery, prevQuery, this.options, prevOptions)) this.#executeFetch();\n\t\tthis.updateResult();\n\t\tif (mounted && (this.#currentQuery !== prevQuery || resolveQueryValue(this.options.enabled, this.#currentQuery) !== resolveQueryValue(prevOptions.enabled, this.#currentQuery) || resolveQueryValue(this.options.staleTime, this.#currentQuery) !== resolveQueryValue(prevOptions.staleTime, this.#currentQuery))) this.#updateStaleTimeout();\n\t\tconst nextRefetchInterval = this.#computeRefetchInterval();\n\t\tif (mounted && (this.#currentQuery !== prevQuery || resolveQueryValue(this.options.enabled, this.#currentQuery) !== resolveQueryValue(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) this.#updateRefetchInterval(nextRefetchInterval);\n\t}\n\tgetOptimisticResult(options) {\n\t\tconst query = this.#client.getQueryCache().build(this.#client, options);\n\t\tconst result = this.createResult(query, options);\n\t\tif (!shallowEqualObjects(this.getCurrentResult(), result)) {\n\t\t\tthis.#currentResult = result;\n\t\t\tthis.#currentResultOptions = this.options;\n\t\t\tthis.#currentResultState = this.#currentQuery.state;\n\t\t}\n\t\treturn result;\n\t}\n\tgetCurrentResult() {\n\t\treturn this.#currentResult;\n\t}\n\ttrackResult(result, onPropTracked) {\n\t\treturn new Proxy(result, { get: (target, key) => {\n\t\t\tthis.trackProp(key);\n\t\t\tonPropTracked?.(key);\n\t\t\treturn Reflect.get(target, key);\n\t\t} });\n\t}\n\ttrackProp(key) {\n\t\tthis.#trackedProps.add(key);\n\t}\n\tgetCurrentQuery() {\n\t\treturn this.#currentQuery;\n\t}\n\trefetch({ ...options } = {}) {\n\t\treturn this.fetch({ ...options });\n\t}\n\tfetchOptimistic(options) {\n\t\tconst defaultedOptions = this.#client.defaultQueryOptions(options);\n\t\tconst query = this.#client.getQueryCache().build(this.#client, defaultedOptions);\n\t\tlet unsubscribe = () => {};\n\t\tlet resolveEarly;\n\t\tconst cachePromise = new Promise((resolve) => {\n\t\t\tresolveEarly = resolve;\n\t\t\tunsubscribe = this.#client.getQueryCache().subscribe((event) => {\n\t\t\t\tif (event.type === \"updated\" && event.query.queryHash === query.queryHash && query.state.data !== void 0) {\n\t\t\t\t\tunsubscribe();\n\t\t\t\t\tresolve(this.createResult(query, defaultedOptions));\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn Promise.race([query.fetch().then(() => {\n\t\t\tconst result = this.createResult(query, defaultedOptions);\n\t\t\tresolveEarly?.(result);\n\t\t\treturn result;\n\t\t}).finally(() => {\n\t\t\tunsubscribe();\n\t\t}), cachePromise]);\n\t}\n\tfetch(fetchOptions) {\n\t\treturn this.#executeFetch({\n\t\t\t...fetchOptions,\n\t\t\tcancelRefetch: fetchOptions.cancelRefetch ?? true\n\t\t}).then(() => {\n\t\t\tthis.updateResult();\n\t\t\treturn this.#currentResult;\n\t\t});\n\t}\n\t#executeFetch(fetchOptions) {\n\t\tthis.#updateQuery();\n\t\tlet promise = this.#currentQuery.fetch(this.options, fetchOptions);\n\t\tif (!fetchOptions?.throwOnError) promise = promise.catch(noop);\n\t\treturn promise;\n\t}\n\t#shouldScheduleTimer(timeout) {\n\t\treturn !isServer() && resolveQueryValue(this.options.enabled, this.#currentQuery) !== false && isValidTimeout(timeout);\n\t}\n\t#updateStaleTimeout() {\n\t\tthis.#clearStaleTimeout();\n\t\tconst staleTime = resolveQueryValue(this.options.staleTime, this.#currentQuery);\n\t\tif (this.#currentResult.isStale || !this.#shouldScheduleTimer(staleTime)) return;\n\t\tconst timeout = timeUntilStale(this.#currentResult.dataUpdatedAt, staleTime) + 1;\n\t\tthis.#staleTimeoutId = timeoutManager.setTimeout(() => {\n\t\t\tif (!this.#currentResult.isStale) this.updateResult();\n\t\t}, timeout);\n\t}\n\t#computeRefetchInterval() {\n\t\treturn (typeof this.options.refetchInterval === \"function\" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;\n\t}\n\t#updateRefetchInterval(nextInterval) {\n\t\tthis.#clearRefetchInterval();\n\t\tthis.#currentRefetchInterval = nextInterval;\n\t\tif (this.#currentRefetchInterval === 0 || !this.#shouldScheduleTimer(this.#currentRefetchInterval)) return;\n\t\tthis.#refetchIntervalId = timeoutManager.setInterval(() => {\n\t\t\tif (this.options.refetchIntervalInBackground || focusManager.isFocused()) this.#executeFetch();\n\t\t}, this.#currentRefetchInterval);\n\t}\n\t#updateTimers() {\n\t\tthis.#updateStaleTimeout();\n\t\tthis.#updateRefetchInterval(this.#computeRefetchInterval());\n\t}\n\t#clearStaleTimeout() {\n\t\tif (this.#staleTimeoutId !== void 0) {\n\t\t\ttimeoutManager.clearTimeout(this.#staleTimeoutId);\n\t\t\tthis.#staleTimeoutId = void 0;\n\t\t}\n\t}\n\t#clearRefetchInterval() {\n\t\tif (this.#refetchIntervalId !== void 0) {\n\t\t\ttimeoutManager.clearInterval(this.#refetchIntervalId);\n\t\t\tthis.#refetchIntervalId = void 0;\n\t\t}\n\t}\n\tcreateResult(query, options) {\n\t\tconst prevQuery = this.#currentQuery;\n\t\tconst prevOptions = this.options;\n\t\tconst prevResult = this.#currentResult;\n\t\tconst prevResultState = this.#currentResultState;\n\t\tconst prevResultOptions = this.#currentResultOptions;\n\t\tconst queryInitialState = query !== prevQuery ? query.state : this.#currentQueryInitialState;\n\t\tconst { state } = query;\n\t\tlet newState = { ...state };\n\t\tlet isPlaceholderData = false;\n\t\tlet data;\n\t\tif (options._optimisticResults) {\n\t\t\tconst mounted = this.hasListeners();\n\t\t\tconst fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n\t\t\tconst fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n\t\t\tif (fetchOnMount || fetchOptionally) newState = {\n\t\t\t\t...newState,\n\t\t\t\t...fetchState(state.data, query.options)\n\t\t\t};\n\t\t\tif (options._optimisticResults === \"isRestoring\") newState.fetchStatus = \"idle\";\n\t\t}\n\t\tlet { error, errorUpdatedAt, status } = newState;\n\t\tdata = newState.data;\n\t\tlet skipSelect = false;\n\t\tif (options.placeholderData !== void 0 && data === void 0 && status === \"pending\") {\n\t\t\tlet placeholderData;\n\t\t\tif (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {\n\t\t\t\tplaceholderData = prevResult.data;\n\t\t\t\tskipSelect = true;\n\t\t\t} else placeholderData = typeof options.placeholderData === \"function\" ? options.placeholderData(this.#lastQueryWithDefinedData?.state.data, this.#lastQueryWithDefinedData) : options.placeholderData;\n\t\t\tif (placeholderData !== void 0) {\n\t\t\t\tstatus = \"success\";\n\t\t\t\tdata = replaceData(prevResult?.data, placeholderData, options);\n\t\t\t\tisPlaceholderData = true;\n\t\t\t}\n\t\t}\n\t\tif (options.select && data !== void 0 && !skipSelect) {\n\t\t\tif (prevResult && data === prevResultState?.data && options.select === this.#selectFn) data = this.#selectResult;\n\t\t\telse try {\n\t\t\t\tthis.#selectFn = options.select;\n\t\t\t\tdata = options.select(data);\n\t\t\t\tdata = replaceData(prevResult?.data, data, options);\n\t\t\t\tthis.#selectResult = data;\n\t\t\t\tthis.#selectError = null;\n\t\t\t} catch (selectError) {\n\t\t\t\tthis.#selectError = selectError;\n\t\t\t}\n\t\t} else if (data === void 0) this.#selectError = null;\n\t\tif (this.#selectError) {\n\t\t\terror = this.#selectError;\n\t\t\tdata = this.#selectResult;\n\t\t\terrorUpdatedAt = Date.now();\n\t\t\tstatus = \"error\";\n\t\t\tisPlaceholderData = false;\n\t\t}\n\t\tconst isFetching = newState.fetchStatus === \"fetching\";\n\t\tconst isPending = status === \"pending\";\n\t\tconst isError = status === \"error\";\n\t\tconst isLoading = isPending && isFetching;\n\t\tconst hasData = data !== void 0;\n\t\treturn {\n\t\t\tstatus,\n\t\t\tfetchStatus: newState.fetchStatus,\n\t\t\tisPending,\n\t\t\tisSuccess: status === \"success\",\n\t\t\tisError,\n\t\t\tisInitialLoading: isLoading,\n\t\t\tisLoading,\n\t\t\tdata,\n\t\t\tdataUpdatedAt: newState.dataUpdatedAt,\n\t\t\terror,\n\t\t\terrorUpdatedAt,\n\t\t\tfailureCount: newState.fetchFailureCount,\n\t\t\tfailureReason: newState.fetchFailureReason,\n\t\t\terrorUpdateCount: newState.errorUpdateCount,\n\t\t\tisFetched: query.isFetched(),\n\t\t\tisFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,\n\t\t\tisFetching,\n\t\t\tisRefetching: isFetching && !isPending,\n\t\t\tisLoadingError: isError && !hasData,\n\t\t\tisPaused: newState.fetchStatus === \"paused\",\n\t\t\tisPlaceholderData,\n\t\t\tisRefetchError: isError && hasData,\n\t\t\tisStale: isStale(query, options),\n\t\t\trefetch: this.refetch,\n\t\t\tisEnabled: resolveQueryValue(options.enabled, query) !== false\n\t\t};\n\t}\n\tupdateResult() {\n\t\tconst prevResult = this.#currentResult;\n\t\tconst nextResult = this.createResult(this.#currentQuery, this.options);\n\t\tthis.#currentResultState = this.#currentQuery.state;\n\t\tthis.#currentResultOptions = this.options;\n\t\tif (this.#currentResultState.data !== void 0) this.#lastQueryWithDefinedData = this.#currentQuery;\n\t\tif (shallowEqualObjects(nextResult, prevResult)) return;\n\t\tthis.#currentResult = nextResult;\n\t\tconst shouldNotifyListeners = () => {\n\t\t\tif (!prevResult) return true;\n\t\t\tconst { notifyOnChangeProps } = this.options;\n\t\t\tconst notifyOnChangePropsValue = typeof notifyOnChangeProps === \"function\" ? notifyOnChangeProps() : notifyOnChangeProps;\n\t\t\tif (notifyOnChangePropsValue === \"all\" || !notifyOnChangePropsValue && !this.#trackedProps.size) return true;\n\t\t\tconst includedProps = new Set(notifyOnChangePropsValue ?? this.#trackedProps);\n\t\t\tif (this.options.throwOnError) includedProps.add(\"error\");\n\t\t\treturn Object.keys(this.#currentResult).some((key) => {\n\t\t\t\tconst typedKey = key;\n\t\t\t\treturn this.#currentResult[typedKey] !== prevResult[typedKey] && includedProps.has(typedKey);\n\t\t\t});\n\t\t};\n\t\tconst notifyListeners = shouldNotifyListeners();\n\t\tnotifyManager.batch(() => {\n\t\t\tif (notifyListeners) this.listeners.forEach((listener) => {\n\t\t\t\tlistener(this.#currentResult);\n\t\t\t});\n\t\t\tthis.#client.getQueryCache().notify({\n\t\t\t\tquery: this.#currentQuery,\n\t\t\t\ttype: \"observerResultsUpdated\"\n\t\t\t});\n\t\t});\n\t}\n\t#updateQuery() {\n\t\tconst query = this.#client.getQueryCache().build(this.#client, this.options);\n\t\tif (query === this.#currentQuery) return;\n\t\tconst prevQuery = this.#currentQuery;\n\t\tthis.#currentQuery = query;\n\t\tthis.#currentQueryInitialState = query.state;\n\t\tif (this.hasListeners()) {\n\t\t\tprevQuery?.removeObserver(this);\n\t\t\tquery.addObserver(this);\n\t\t}\n\t}\n\tonQueryUpdate() {\n\t\tthis.updateResult();\n\t\tif (this.hasListeners()) this.#updateTimers();\n\t}\n};\nfunction shouldLoadOnMount(query, options) {\n\treturn resolveQueryValue(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === \"error\" && resolveQueryValue(options.retryOnMount, query) === false);\n}\nfunction shouldFetchOnMount(query, options) {\n\treturn shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\nfunction shouldFetchOn(query, options, field) {\n\tif (resolveQueryValue(options.enabled, query) !== false && resolveQueryValue(options.staleTime, query) !== \"static\") {\n\t\tconst value = typeof field === \"function\" ? field(query) : field;\n\t\treturn value === \"always\" || value !== false && isStale(query, options);\n\t}\n\treturn false;\n}\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n\treturn (query !== prevQuery || resolveQueryValue(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== \"error\") && isStale(query, options);\n}\nfunction isStale(query, options) {\n\treturn resolveQueryValue(options.enabled, query) !== false && query.isStaleByTime(resolveQueryValue(options.staleTime, query));\n}\n//#endregion\nexport { QueryObserver };\n\n//# sourceMappingURL=queryObserver.js.map","\"use client\";\nimport * as React from \"react\";\n//#region src/IsRestoringProvider.ts\nconst IsRestoringContext = React.createContext(false);\nconst useIsRestoring = () => React.useContext(IsRestoringContext);\nconst IsRestoringProvider = IsRestoringContext.Provider;\n//#endregion\nexport { IsRestoringProvider, useIsRestoring };\n\n//# sourceMappingURL=IsRestoringProvider.js.map","\"use client\";\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/QueryErrorResetBoundary.tsx\nfunction createValue() {\n\tlet isReset = false;\n\treturn {\n\t\tclearReset: () => {\n\t\t\tisReset = false;\n\t\t},\n\t\treset: () => {\n\t\t\tisReset = true;\n\t\t},\n\t\tisReset: () => {\n\t\t\treturn isReset;\n\t\t}\n\t};\n}\nconst QueryErrorResetBoundaryContext = React.createContext(createValue());\nconst useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);\nconst QueryErrorResetBoundary = ({ children }) => {\n\tconst [value] = React.useState(() => createValue());\n\treturn /* @__PURE__ */ jsx(QueryErrorResetBoundaryContext.Provider, {\n\t\tvalue,\n\t\tchildren: typeof children === \"function\" ? children(value) : children\n\t});\n};\n//#endregion\nexport { QueryErrorResetBoundary, useQueryErrorResetBoundary };\n\n//# sourceMappingURL=QueryErrorResetBoundary.js.map","\"use client\";\nimport * as React from \"react\";\nimport { shouldThrowError } from \"@tanstack/query-core\";\n//#region src/errorBoundaryUtils.ts\nconst ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {\n\tconst throwOnError = query?.state.error && typeof options.throwOnError === \"function\" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;\n\tif (options.suspense || throwOnError) {\n\t\tif (!errorResetBoundary.isReset()) options.retryOnMount = false;\n\t}\n};\nconst useClearResetErrorBoundary = (errorResetBoundary) => {\n\tReact.useEffect(() => {\n\t\terrorResetBoundary.clearReset();\n\t}, [errorResetBoundary]);\n};\nconst getHasError = ({ result, errorResetBoundary, throwOnError, query, suspense }) => {\n\treturn result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));\n};\n//#endregion\nexport { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary };\n\n//# sourceMappingURL=errorBoundaryUtils.js.map","//#region src/suspense.ts\nconst defaultThrowOnError = (_error, query) => query.state.data === void 0;\nconst ensureSuspenseTimers = (defaultedOptions) => {\n\tif (defaultedOptions.suspense) {\n\t\tconst MIN_SUSPENSE_TIME_MS = 1e3;\n\t\tconst clamp = (value) => value === \"static\" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);\n\t\tconst originalStaleTime = defaultedOptions.staleTime;\n\t\tdefaultedOptions.staleTime = typeof originalStaleTime === \"function\" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);\n\t\tif (typeof defaultedOptions.gcTime === \"number\") defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, MIN_SUSPENSE_TIME_MS);\n\t}\n};\nconst shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;\nconst fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {\n\terrorResetBoundary.clearReset();\n});\n//#endregion\nexport { defaultThrowOnError, ensureSuspenseTimers, fetchOptimistic, shouldSuspend };\n\n//# sourceMappingURL=suspense.js.map","\"use client\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { useIsRestoring } from \"./IsRestoringProvider.js\";\nimport { useQueryErrorResetBoundary } from \"./QueryErrorResetBoundary.js\";\nimport { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary } from \"./errorBoundaryUtils.js\";\nimport { ensureSuspenseTimers, fetchOptimistic, shouldSuspend } from \"./suspense.js\";\nimport * as React from \"react\";\nimport { noop, notifyManager } from \"@tanstack/query-core\";\n//#region src/useBaseQuery.ts\nfunction useBaseQuery(options, Observer, queryClient) {\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tif (typeof options !== \"object\" || Array.isArray(options)) throw new Error(\"Bad argument type. Starting with v5, only the \\\"Object\\\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object\");\n\t}\n\tconst isRestoring = useIsRestoring();\n\tconst errorResetBoundary = useQueryErrorResetBoundary();\n\tconst client = useQueryClient(queryClient);\n\tconst defaultedOptions = client.defaultQueryOptions(options);\n\tconst query = client.getQueryCache().get(defaultedOptions.queryHash);\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tif (!defaultedOptions.queryFn) console.error(`[${defaultedOptions.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`);\n\t}\n\tconst subscribed = options.subscribed !== false;\n\tdefaultedOptions._optimisticResults = isRestoring ? \"isRestoring\" : subscribed ? \"optimistic\" : void 0;\n\tensureSuspenseTimers(defaultedOptions);\n\tensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary, query);\n\tuseClearResetErrorBoundary(errorResetBoundary);\n\tconst [observer] = React.useState(() => new Observer(client, defaultedOptions));\n\tconst result = observer.getOptimisticResult(defaultedOptions);\n\tconst shouldSubscribe = !isRestoring && subscribed;\n\tReact.useSyncExternalStore(React.useCallback((onStoreChange) => {\n\t\tconst unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop;\n\t\tobserver.updateResult();\n\t\treturn unsubscribe;\n\t}, [observer, shouldSubscribe]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n\tReact.useEffect(() => {\n\t\tobserver.setOptions(defaultedOptions);\n\t}, [defaultedOptions, observer]);\n\tif (shouldSuspend(defaultedOptions, result)) throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);\n\tif (getHasError({\n\t\tresult,\n\t\terrorResetBoundary,\n\t\tthrowOnError: defaultedOptions.throwOnError,\n\t\tquery,\n\t\tsuspense: defaultedOptions.suspense\n\t})) throw result.error;\n\treturn !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;\n}\n//#endregion\nexport { useBaseQuery };\n\n//# sourceMappingURL=useBaseQuery.js.map","\"use client\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nimport { QueryObserver } from \"@tanstack/query-core\";\n//#region src/useQuery.ts\nfunction useQuery(options, queryClient) {\n\treturn useBaseQuery(options, QueryObserver, queryClient);\n}\n//#endregion\nexport { useQuery };\n\n//# sourceMappingURL=useQuery.js.map","import type {\n DefaultError,\n QueryClient,\n QueryKey,\n UseQueryOptions,\n UseQueryResult,\n} from '@tanstack/react-query';\nimport { useQuery } from '@tanstack/react-query';\nimport { useMemo } from 'react';\n\n\nexport const useQueryMemo = <TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, queryClient?: QueryClient): UseQueryResult<NoInfer<TData>, TError> => {\n const query = useQuery(options, queryClient);\n\n return useMemo(() => {\n return query;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps, react-hooks/use-memo\n }, [JSON.stringify({\n data: query.data,\n error: query.error,\n isEnabled: query.isEnabled,\n isFetching: query.isFetching,\n isLoading: query.isLoading,\n isPending: query.isPending,\n })]);\n};\n"],"x_google_ignoreList":[0,1,2,3,4,5,6],"mappings":";;;;;;AAQA,IAAI,IAAgB,cAAc,EAAa;CAC9C;CACA,KAAgB,KAAK;CACrB,KAA4B,KAAK;CACjC,KAAiB,KAAK;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,qBAAgC,IAAI,IAAI;CACxC,YAAY,GAAQ,GAAS;EAM5B,AALA,MAAM,GACN,KAAK,UAAU,GACf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BAAqD,IAA/B,EAAS,YAAY,CAAM;AAC3E;;;AC1CA,SAAS,EAAS,GAAS,GAAa;CACvC,OAAO,EAAa,GAAS,GAAe,CAAW;AACxD;;;ACKA,IAAa,KAA4H,GAAkE,MAAsE;CAC/Q,IAAM,IAAQ,EAAS,GAAS,CAAW;CAE3C,OAAO,QACE,GAGN,CAAC,KAAK,UAAU;EACjB,MAAM,EAAM;EACZ,OAAO,EAAM;EACb,WAAW,EAAM;EACjB,YAAY,EAAM;EAClB,WAAW,EAAM;EACjB,WAAW,EAAM;CACnB,CAAC,CAAC,CAAC;AACL"}
1
+ {"version":3,"file":"useQueryMemo.js","names":["React","React","React"],"sources":["../../../../node_modules/.pnpm/@tanstack+query-core@5.103.1/node_modules/@tanstack/query-core/build/modern/queryObserver.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.3.0/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.3.0/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.3.0/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.3.0/node_modules/@tanstack/react-query/build/modern/suspense.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useQuery.js","../../src/hooks/useQueryMemo/useQueryMemo.ts"],"sourcesContent":["import { timeoutManager } from \"./timeoutManager.js\";\nimport { isValidTimeout, noop, replaceData, resolveQueryValue, shallowEqualObjects, timeUntilStale } from \"./utils.js\";\nimport { isServer } from \"./environmentManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { fetchState } from \"./query.js\";\n//#region src/queryObserver.ts\n/**\n* A `QueryObserver` watches a single query in the `QueryCache` and computes a\n* `QueryObserverResult` from its state, recomputing and notifying subscribers\n* whenever the underlying query (or the observer's options) changes. It is\n* the primitive that framework adapters (e.g. `useQuery`) build their hooks\n* on top of, but it can also be used directly to observe and switch between\n* queries outside of any framework.\n*\n* @example\n* ```ts\n* const observer = new QueryObserver(queryClient, {\n* queryKey: ['posts'],\n* queryFn: fetchPosts,\n* })\n*\n* const unsubscribe = observer.subscribe((result) => {\n* console.log(result.data)\n* })\n* ```\n*/\nvar QueryObserver = class extends Subscribable {\n\t#client;\n\t#currentQuery = void 0;\n\t#currentQueryInitialState = void 0;\n\t#currentResult = void 0;\n\t#currentResultState;\n\t#currentResultOptions;\n\t#selectError;\n\t#selectFn;\n\t#selectResult;\n\t#lastQueryWithDefinedData;\n\t#staleTimeoutId;\n\t#refetchIntervalId;\n\t#currentRefetchInterval;\n\t#trackedProps = /* @__PURE__ */ new Set();\n\tconstructor(client, options) {\n\t\tsuper();\n\t\tthis.options = options;\n\t\tthis.#client = client;\n\t\tthis.#selectError = null;\n\t\tthis.bindMethods();\n\t\tthis.setOptions(options);\n\t}\n\tbindMethods() {\n\t\tthis.refetch = this.refetch.bind(this);\n\t}\n\tonSubscribe() {\n\t\tif (this.listeners.size === 1) {\n\t\t\tthis.#currentQuery.addObserver(this);\n\t\t\tif (shouldFetchOnMount(this.#currentQuery, this.options)) this.#executeFetch();\n\t\t\telse this.updateResult();\n\t\t\tthis.#updateTimers();\n\t\t}\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) this.destroy();\n\t}\n\t/**\n\t* Returns whether the observed query is currently stale and configured\n\t* (via the `refetchOnReconnect` option) to refetch when the network\n\t* reconnects.\n\t*/\n\tshouldFetchOnReconnect() {\n\t\treturn shouldFetchOn(this.#currentQuery, this.options, this.options.refetchOnReconnect);\n\t}\n\t/**\n\t* Returns whether the observed query is currently stale and configured\n\t* (via the `refetchOnWindowFocus` option) to refetch when the window\n\t* regains focus.\n\t*/\n\tshouldFetchOnWindowFocus() {\n\t\treturn shouldFetchOn(this.#currentQuery, this.options, this.options.refetchOnWindowFocus);\n\t}\n\t/**\n\t* Stops observing the current query: clears all listeners, cancels the\n\t* stale and refetch-interval timers, and removes this observer from the\n\t* query it was observing.\n\t*/\n\tdestroy() {\n\t\tthis.listeners = /* @__PURE__ */ new Set();\n\t\tthis.#clearStaleTimeout();\n\t\tthis.#clearRefetchInterval();\n\t\tthis.#currentQuery.removeObserver(this);\n\t}\n\t/**\n\t* Updates the observer's options. This will re-resolve the query being\n\t* observed (switching to a different query if the `queryKey` changed),\n\t* trigger a fetch if the new options require one and the observer has\n\t* subscribers, recompute the current result, and reschedule the stale and\n\t* refetch-interval timers as needed.\n\t*\n\t* @example\n\t* ```ts\n\t* observer.setOptions({ queryKey: ['posts', 1], queryFn: () => fetchPost(1) })\n\t* // later: switch to a different query, reusing the same observer\n\t* observer.setOptions({ queryKey: ['posts', 2], queryFn: () => fetchPost(2) })\n\t* ```\n\t*/\n\tsetOptions(options) {\n\t\tconst prevOptions = this.options;\n\t\tconst prevQuery = this.#currentQuery;\n\t\tthis.options = this.#client.defaultQueryOptions(options);\n\t\tif (this.options.enabled !== void 0 && typeof this.options.enabled !== \"boolean\" && typeof this.options.enabled !== \"function\" && typeof resolveQueryValue(this.options.enabled, this.#currentQuery) !== \"boolean\") throw new Error(\"Expected enabled to be a boolean or a callback that returns a boolean\");\n\t\tthis.#updateQuery();\n\t\tthis.#currentQuery.setOptions(this.options);\n\t\tif (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) this.#client.getQueryCache().notify({\n\t\t\ttype: \"observerOptionsUpdated\",\n\t\t\tquery: this.#currentQuery,\n\t\t\tobserver: this\n\t\t});\n\t\tconst mounted = this.hasListeners();\n\t\tif (mounted && shouldFetchOptionally(this.#currentQuery, prevQuery, this.options, prevOptions)) this.#executeFetch();\n\t\tthis.updateResult();\n\t\tif (mounted && (this.#currentQuery !== prevQuery || resolveQueryValue(this.options.enabled, this.#currentQuery) !== resolveQueryValue(prevOptions.enabled, this.#currentQuery) || resolveQueryValue(this.options.staleTime, this.#currentQuery) !== resolveQueryValue(prevOptions.staleTime, this.#currentQuery))) this.#updateStaleTimeout();\n\t\tconst nextRefetchInterval = this.#computeRefetchInterval();\n\t\tif (mounted && (this.#currentQuery !== prevQuery || resolveQueryValue(this.options.enabled, this.#currentQuery) !== resolveQueryValue(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) this.#updateRefetchInterval(nextRefetchInterval);\n\t}\n\t/**\n\t* Computes the result the observer would produce for the given (already-defaulted) options\n\t* right now, building the underlying `Query` if it doesn't exist yet, without waiting for a\n\t* subscription callback. Called by framework adapters on every render (e.g. `useQuery`) so the\n\t* returned value is available synchronously, ahead of `setOptions` triggering an actual fetch.\n\t*/\n\tgetOptimisticResult(options) {\n\t\tconst query = this.#client.getQueryCache().build(this.#client, options);\n\t\tconst result = this.createResult(query, options);\n\t\tif (!shallowEqualObjects(this.getCurrentResult(), result)) {\n\t\t\tthis.#currentResult = result;\n\t\t\tthis.#currentResultOptions = this.options;\n\t\t\tthis.#currentResultState = this.#currentQuery.state;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t* Returns the most recently computed `QueryObserverResult` for the\n\t* observed query. This is a point-in-time read; to be notified of updates\n\t* as they happen, subscribe to the observer instead (its inherited\n\t* `subscribe` method).\n\t*\n\t* @example\n\t* ```ts\n\t* const result = observer.getCurrentResult()\n\t* console.log(result.status, result.data)\n\t* ```\n\t*/\n\tgetCurrentResult() {\n\t\treturn this.#currentResult;\n\t}\n\t/**\n\t* Wraps a `QueryObserverResult` in a `Proxy` that records which properties are read, via\n\t* {@link QueryObserver#trackProp} (and an optional `onPropTracked` callback). Used by framework\n\t* adapters when `notifyOnChangeProps` is not set, to implement its default \"only re-render on\n\t* properties you actually read\" behavior.\n\t*/\n\ttrackResult(result, onPropTracked) {\n\t\treturn new Proxy(result, { get: (target, key) => {\n\t\t\tthis.trackProp(key);\n\t\t\tonPropTracked?.(key);\n\t\t\treturn Reflect.get(target, key);\n\t\t} });\n\t}\n\t/**\n\t* Records that the given `QueryObserverResult` property was read, so a subsequent update only\n\t* notifies this observer if a tracked property actually changed. Normally called indirectly via\n\t* {@link QueryObserver#trackResult}'s proxy; exposed directly for adapters that track property\n\t* access themselves (e.g. through their own reactivity system) instead of via the proxy.\n\t*/\n\ttrackProp(key) {\n\t\tthis.#trackedProps.add(key);\n\t}\n\t/**\n\t* Returns the `Query` instance this observer is currently observing.\n\t*/\n\tgetCurrentQuery() {\n\t\treturn this.#currentQuery;\n\t}\n\t/**\n\t* Refetches the observed query and returns a promise that resolves with\n\t* the resulting `QueryObserverResult`.\n\t*\n\t* @example\n\t* ```ts\n\t* const result = await observer.refetch({ cancelRefetch: false })\n\t* console.log(result.data)\n\t* ```\n\t*/\n\trefetch({ ...options } = {}) {\n\t\treturn this.fetch({ ...options });\n\t}\n\t/**\n\t* Fetches a query defined by the given options without affecting this\n\t* observer's own tracked query or result, and returns a promise that\n\t* resolves with the `QueryObserverResult` for that fetch. This is useful\n\t* for prefetching data that another observer (e.g. a query about to be\n\t* navigated to) will need, ahead of time.\n\t*\n\t* @example\n\t* ```ts\n\t* const result = await observer.fetchOptimistic({\n\t* queryKey: ['posts', 2],\n\t* queryFn: () => fetchPost(2),\n\t* })\n\t* console.log(result.data)\n\t* ```\n\t*/\n\tfetchOptimistic(options) {\n\t\tconst defaultedOptions = this.#client.defaultQueryOptions(options);\n\t\tconst query = this.#client.getQueryCache().build(this.#client, defaultedOptions);\n\t\tlet unsubscribe = () => {};\n\t\tlet resolveEarly;\n\t\tconst cachePromise = new Promise((resolve) => {\n\t\t\tresolveEarly = resolve;\n\t\t\tunsubscribe = this.#client.getQueryCache().subscribe((event) => {\n\t\t\t\tif (event.type === \"updated\" && event.query.queryHash === query.queryHash && query.state.data !== void 0) {\n\t\t\t\t\tunsubscribe();\n\t\t\t\t\tresolve(this.createResult(query, defaultedOptions));\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn Promise.race([query.fetch().then(() => {\n\t\t\tconst result = this.createResult(query, defaultedOptions);\n\t\t\tresolveEarly?.(result);\n\t\t\treturn result;\n\t\t}).finally(() => {\n\t\t\tunsubscribe();\n\t\t}), cachePromise]);\n\t}\n\tfetch(fetchOptions) {\n\t\treturn this.#executeFetch({\n\t\t\t...fetchOptions,\n\t\t\tcancelRefetch: fetchOptions.cancelRefetch ?? true\n\t\t}).then(() => {\n\t\t\tthis.updateResult();\n\t\t\treturn this.#currentResult;\n\t\t});\n\t}\n\t#executeFetch(fetchOptions) {\n\t\tthis.#updateQuery();\n\t\tlet promise = this.#currentQuery.fetch(this.options, fetchOptions);\n\t\tif (!fetchOptions?.throwOnError) promise = promise.catch(noop);\n\t\treturn promise;\n\t}\n\t#shouldScheduleTimer(timeout) {\n\t\treturn !isServer() && resolveQueryValue(this.options.enabled, this.#currentQuery) !== false && isValidTimeout(timeout);\n\t}\n\t#updateStaleTimeout() {\n\t\tthis.#clearStaleTimeout();\n\t\tconst staleTime = resolveQueryValue(this.options.staleTime, this.#currentQuery);\n\t\tif (this.#currentResult.isStale || !this.#shouldScheduleTimer(staleTime)) return;\n\t\tconst timeout = timeUntilStale(this.#currentResult.dataUpdatedAt, staleTime) + 1;\n\t\tthis.#staleTimeoutId = timeoutManager.setTimeout(() => {\n\t\t\tif (!this.#currentResult.isStale) this.updateResult();\n\t\t}, timeout);\n\t}\n\t#computeRefetchInterval() {\n\t\treturn resolveQueryValue(this.options.refetchInterval, this.#currentQuery) ?? false;\n\t}\n\t#updateRefetchInterval(nextInterval) {\n\t\tthis.#clearRefetchInterval();\n\t\tthis.#currentRefetchInterval = nextInterval;\n\t\tif (this.#currentRefetchInterval === 0 || !this.#shouldScheduleTimer(this.#currentRefetchInterval)) return;\n\t\tthis.#refetchIntervalId = timeoutManager.setInterval(() => {\n\t\t\tif (this.options.refetchIntervalInBackground || focusManager.isFocused()) this.#executeFetch();\n\t\t}, this.#currentRefetchInterval);\n\t}\n\t#updateTimers() {\n\t\tthis.#updateStaleTimeout();\n\t\tthis.#updateRefetchInterval(this.#computeRefetchInterval());\n\t}\n\t#clearStaleTimeout() {\n\t\tif (this.#staleTimeoutId !== void 0) {\n\t\t\ttimeoutManager.clearTimeout(this.#staleTimeoutId);\n\t\t\tthis.#staleTimeoutId = void 0;\n\t\t}\n\t}\n\t#clearRefetchInterval() {\n\t\tif (this.#refetchIntervalId !== void 0) {\n\t\t\ttimeoutManager.clearInterval(this.#refetchIntervalId);\n\t\t\tthis.#refetchIntervalId = void 0;\n\t\t}\n\t}\n\tcreateResult(query, options) {\n\t\tconst prevQuery = this.#currentQuery;\n\t\tconst prevOptions = this.options;\n\t\tconst prevResult = this.#currentResult;\n\t\tconst prevResultState = this.#currentResultState;\n\t\tconst prevResultOptions = this.#currentResultOptions;\n\t\tconst queryInitialState = query !== prevQuery ? query.state : this.#currentQueryInitialState;\n\t\tconst { state } = query;\n\t\tlet newState = { ...state };\n\t\tlet isPlaceholderData = false;\n\t\tlet data;\n\t\tif (options._optimisticResults) {\n\t\t\tconst mounted = this.hasListeners();\n\t\t\tconst fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n\t\t\tconst fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n\t\t\tif (fetchOnMount || fetchOptionally) newState = {\n\t\t\t\t...newState,\n\t\t\t\t...fetchState(state.data, query.options)\n\t\t\t};\n\t\t\tif (options._optimisticResults === \"isRestoring\") newState.fetchStatus = \"idle\";\n\t\t}\n\t\tlet { error, errorUpdatedAt, status } = newState;\n\t\tdata = newState.data;\n\t\tlet skipSelect = false;\n\t\tif (options.placeholderData !== void 0 && data === void 0 && status === \"pending\") {\n\t\t\tlet placeholderData;\n\t\t\tif (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {\n\t\t\t\tplaceholderData = prevResult.data;\n\t\t\t\tskipSelect = true;\n\t\t\t} else placeholderData = typeof options.placeholderData === \"function\" ? options.placeholderData(this.#lastQueryWithDefinedData?.state.data, this.#lastQueryWithDefinedData) : options.placeholderData;\n\t\t\tif (placeholderData !== void 0) {\n\t\t\t\tstatus = \"success\";\n\t\t\t\tdata = replaceData(prevResult?.data, placeholderData, options);\n\t\t\t\tisPlaceholderData = true;\n\t\t\t}\n\t\t}\n\t\tif (options.select && data !== void 0 && !skipSelect) {\n\t\t\tif (prevResult && data === prevResultState?.data && options.select === this.#selectFn) data = this.#selectResult;\n\t\t\telse try {\n\t\t\t\tthis.#selectFn = options.select;\n\t\t\t\tdata = options.select(data);\n\t\t\t\tdata = replaceData(prevResult?.data, data, options);\n\t\t\t\tthis.#selectResult = data;\n\t\t\t\tthis.#selectError = null;\n\t\t\t} catch (selectError) {\n\t\t\t\tthis.#selectError = selectError;\n\t\t\t}\n\t\t} else if (data === void 0) this.#selectError = null;\n\t\tif (this.#selectError) {\n\t\t\terror = this.#selectError;\n\t\t\tdata = this.#selectResult;\n\t\t\terrorUpdatedAt = Date.now();\n\t\t\tstatus = \"error\";\n\t\t\tisPlaceholderData = false;\n\t\t}\n\t\tconst isFetching = newState.fetchStatus === \"fetching\";\n\t\tconst isPending = status === \"pending\";\n\t\tconst isError = status === \"error\";\n\t\tconst isLoading = isPending && isFetching;\n\t\tconst hasData = data !== void 0;\n\t\treturn {\n\t\t\tstatus,\n\t\t\tfetchStatus: newState.fetchStatus,\n\t\t\tisPending,\n\t\t\tisSuccess: status === \"success\",\n\t\t\tisError,\n\t\t\tisInitialLoading: isLoading,\n\t\t\tisLoading,\n\t\t\tdata,\n\t\t\tdataUpdatedAt: newState.dataUpdatedAt,\n\t\t\terror,\n\t\t\terrorUpdatedAt,\n\t\t\tfailureCount: newState.fetchFailureCount,\n\t\t\tfailureReason: newState.fetchFailureReason,\n\t\t\terrorUpdateCount: newState.errorUpdateCount,\n\t\t\tisFetched: query.isFetched(),\n\t\t\tisFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,\n\t\t\tisFetching,\n\t\t\tisRefetching: isFetching && !isPending,\n\t\t\tisLoadingError: isError && !hasData,\n\t\t\tisPaused: newState.fetchStatus === \"paused\",\n\t\t\tisPlaceholderData,\n\t\t\tisRefetchError: isError && hasData,\n\t\t\tisStale: isStale(query, options),\n\t\t\trefetch: this.refetch,\n\t\t\tisEnabled: resolveQueryValue(options.enabled, query) !== false\n\t\t};\n\t}\n\t/**\n\t* Recomputes and stores the current result from the current query/options, notifying listeners\n\t* if it changed. Framework adapters call this right after subscribing to make sure no query\n\t* update was missed in the gap between creating the observer and subscribing to it.\n\t*/\n\tupdateResult() {\n\t\tconst prevResult = this.#currentResult;\n\t\tconst nextResult = this.createResult(this.#currentQuery, this.options);\n\t\tthis.#currentResultState = this.#currentQuery.state;\n\t\tthis.#currentResultOptions = this.options;\n\t\tif (this.#currentResultState.data !== void 0) this.#lastQueryWithDefinedData = this.#currentQuery;\n\t\tif (shallowEqualObjects(nextResult, prevResult)) return;\n\t\tthis.#currentResult = nextResult;\n\t\tconst shouldNotifyListeners = () => {\n\t\t\tif (!prevResult) return true;\n\t\t\tconst { notifyOnChangeProps } = this.options;\n\t\t\tconst notifyOnChangePropsValue = typeof notifyOnChangeProps === \"function\" ? notifyOnChangeProps() : notifyOnChangeProps;\n\t\t\tif (notifyOnChangePropsValue === \"all\" || !notifyOnChangePropsValue && !this.#trackedProps.size) return true;\n\t\t\tconst includedProps = new Set(notifyOnChangePropsValue ?? this.#trackedProps);\n\t\t\tif (this.options.throwOnError) includedProps.add(\"error\");\n\t\t\treturn Object.keys(this.#currentResult).some((key) => {\n\t\t\t\tconst typedKey = key;\n\t\t\t\treturn this.#currentResult[typedKey] !== prevResult[typedKey] && includedProps.has(typedKey);\n\t\t\t});\n\t\t};\n\t\tconst notifyListeners = shouldNotifyListeners();\n\t\tnotifyManager.batch(() => {\n\t\t\tif (notifyListeners) this.listeners.forEach((listener) => {\n\t\t\t\tlistener(this.#currentResult);\n\t\t\t});\n\t\t\tthis.#client.getQueryCache().notify({\n\t\t\t\tquery: this.#currentQuery,\n\t\t\t\ttype: \"observerResultsUpdated\"\n\t\t\t});\n\t\t});\n\t}\n\t#updateQuery() {\n\t\tconst query = this.#client.getQueryCache().build(this.#client, this.options);\n\t\tif (query === this.#currentQuery) return;\n\t\tconst prevQuery = this.#currentQuery;\n\t\tthis.#currentQuery = query;\n\t\tthis.#currentQueryInitialState = query.state;\n\t\tif (this.hasListeners()) {\n\t\t\tprevQuery?.removeObserver(this);\n\t\t\tquery.addObserver(this);\n\t\t}\n\t}\n\t/** @internal */\n\tonQueryUpdate() {\n\t\tthis.updateResult();\n\t\tif (this.hasListeners()) this.#updateTimers();\n\t}\n};\nfunction shouldLoadOnMount(query, options) {\n\treturn resolveQueryValue(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === \"error\" && resolveQueryValue(options.retryOnMount, query) === false);\n}\nfunction shouldFetchOnMount(query, options) {\n\treturn shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\nfunction shouldFetchOn(query, options, field) {\n\tif (resolveQueryValue(options.enabled, query) !== false && resolveQueryValue(options.staleTime, query) !== \"static\") {\n\t\tconst value = resolveQueryValue(field, query);\n\t\treturn value === \"always\" || value !== false && isStale(query, options);\n\t}\n\treturn false;\n}\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n\treturn (query !== prevQuery || resolveQueryValue(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== \"error\") && isStale(query, options);\n}\nfunction isStale(query, options) {\n\treturn resolveQueryValue(options.enabled, query) !== false && query.isStaleByTime(resolveQueryValue(options.staleTime, query));\n}\n//#endregion\nexport { QueryObserver };\n\n//# sourceMappingURL=queryObserver.js.map","\"use client\";\nimport * as React from \"react\";\n//#region src/IsRestoringProvider.ts\nconst IsRestoringContext = React.createContext(false);\n/**\n* If you are using `PersistQueryClientProvider`, you can also use the `useIsRestoring` hook alongside it to\n* check if a restore is currently in progress. `useQuery` and friends also check this internally to avoid\n* race conditions between the restore and mounting queries.\n*\n* @returns `true` while a persisted client is being restored, `false` otherwise.\n*/\nconst useIsRestoring = () => React.useContext(IsRestoringContext);\n/**\n* The Provider that `PersistQueryClientProvider` uses to signal whether a persisted client is currently\n* being restored, read by `useIsRestoring`.\n*/\nconst IsRestoringProvider = IsRestoringContext.Provider;\n//#endregion\nexport { IsRestoringProvider, useIsRestoring };\n\n//# sourceMappingURL=IsRestoringProvider.js.map","\"use client\";\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/QueryErrorResetBoundary.tsx\n/**\n* Resets any query errors within the boundary, so queries know they can try again.\n*/\nfunction createValue() {\n\tlet isReset = false;\n\treturn {\n\t\t/**\n\t\t* Clears the reset state, so queries know not to try again until the boundary is reset again.\n\t\t*/\n\t\tclearReset: () => {\n\t\t\tisReset = false;\n\t\t},\n\t\t/**\n\t\t* Resets any query errors within the boundary, so queries know they can try again.\n\t\t*/\n\t\treset: () => {\n\t\t\tisReset = true;\n\t\t},\n\t\t/**\n\t\t* Returns whether the boundary has been reset and not yet cleared.\n\t\t*/\n\t\tisReset: () => {\n\t\t\treturn isReset;\n\t\t}\n\t};\n}\nconst QueryErrorResetBoundaryContext = React.createContext(createValue());\n/**\n* This hook will reset any query errors within the closest `QueryErrorResetBoundary`. If there is no boundary\n* defined it will reset them globally.\n*\n* @returns The boundary's {@link QueryErrorResetBoundaryValue}.\n*\n* @example\n* ```tsx\n* import { ErrorBoundary } from 'react-error-boundary'\n* import { useQueryErrorResetBoundary } from '@tanstack/react-query'\n*\n* function App({ children }: { children: React.ReactNode }) {\n* const { reset } = useQueryErrorResetBoundary()\n*\n* return (\n* <ErrorBoundary\n* onReset={reset}\n* fallbackRender={({ resetErrorBoundary }) => (\n* <div>\n* There was an error!\n* <button onClick={() => resetErrorBoundary()}>Try again</button>\n* </div>\n* )}\n* >\n* {children}\n* </ErrorBoundary>\n* )\n* }\n* ```\n*/\nconst useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);\n/**\n* When using `suspense` or `throwOnError` in your queries, you need a way to let queries know that you want to\n* try again when re-rendering after some error occurred. With the `QueryErrorResetBoundary` component you can\n* reset any query errors within the boundaries of the component.\n*\n* @returns The `children`, rendered as-is, or called with the boundary's {@link QueryErrorResetBoundaryValue}\n* if `children` is a function.\n*\n* @example\n* ```tsx\n* import { ErrorBoundary } from 'react-error-boundary'\n* import { QueryErrorResetBoundary } from '@tanstack/react-query'\n*\n* function App() {\n* return (\n* <QueryErrorResetBoundary>\n* {({ reset }) => (\n* <ErrorBoundary\n* onReset={reset}\n* fallbackRender={({ resetErrorBoundary }) => (\n* <div>\n* There was an error!\n* <button onClick={() => resetErrorBoundary()}>Try again</button>\n* </div>\n* )}\n* >\n* <Page />\n* </ErrorBoundary>\n* )}\n* </QueryErrorResetBoundary>\n* )\n* }\n* ```\n*/\nconst QueryErrorResetBoundary = ({ children }) => {\n\tconst [value] = React.useState(() => createValue());\n\treturn /* @__PURE__ */ jsx(QueryErrorResetBoundaryContext.Provider, {\n\t\tvalue,\n\t\tchildren: typeof children === \"function\" ? children(value) : children\n\t});\n};\n//#endregion\nexport { QueryErrorResetBoundary, useQueryErrorResetBoundary };\n\n//# sourceMappingURL=QueryErrorResetBoundary.js.map","\"use client\";\nimport * as React from \"react\";\nimport { shouldThrowError } from \"@tanstack/query-core\";\n//#region src/errorBoundaryUtils.ts\nconst ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {\n\tconst throwOnError = query?.state.error && typeof options.throwOnError === \"function\" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;\n\tif (options.suspense || throwOnError) {\n\t\tif (!errorResetBoundary.isReset()) options.retryOnMount = false;\n\t}\n};\nconst useClearResetErrorBoundary = (errorResetBoundary) => {\n\tReact.useEffect(() => {\n\t\terrorResetBoundary.clearReset();\n\t}, [errorResetBoundary]);\n};\nconst getHasError = ({ result, errorResetBoundary, throwOnError, query, suspense }) => {\n\treturn result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));\n};\n//#endregion\nexport { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary };\n\n//# sourceMappingURL=errorBoundaryUtils.js.map","//#region src/suspense.ts\nconst defaultThrowOnError = (_error, query) => query.state.data === void 0;\nconst ensureSuspenseTimers = (defaultedOptions) => {\n\tif (defaultedOptions.suspense) {\n\t\tconst MIN_SUSPENSE_TIME_MS = 1e3;\n\t\tconst clamp = (value) => value === \"static\" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);\n\t\tconst originalStaleTime = defaultedOptions.staleTime;\n\t\tdefaultedOptions.staleTime = typeof originalStaleTime === \"function\" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);\n\t\tif (typeof defaultedOptions.gcTime === \"number\") defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, MIN_SUSPENSE_TIME_MS);\n\t}\n};\nconst shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;\nconst fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {\n\terrorResetBoundary.clearReset();\n});\n//#endregion\nexport { defaultThrowOnError, ensureSuspenseTimers, fetchOptimistic, shouldSuspend };\n\n//# sourceMappingURL=suspense.js.map","\"use client\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { useIsRestoring } from \"./IsRestoringProvider.js\";\nimport { useQueryErrorResetBoundary } from \"./QueryErrorResetBoundary.js\";\nimport { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary } from \"./errorBoundaryUtils.js\";\nimport { ensureSuspenseTimers, fetchOptimistic, shouldSuspend } from \"./suspense.js\";\nimport * as React from \"react\";\nimport { noop, notifyManager } from \"@tanstack/query-core\";\n//#region src/useBaseQuery.ts\nfunction useBaseQuery(options, Observer, queryClient) {\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tif (typeof options !== \"object\" || Array.isArray(options)) throw new Error(\"Bad argument type. Starting with v5, only the \\\"Object\\\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object\");\n\t}\n\tconst isRestoring = useIsRestoring();\n\tconst errorResetBoundary = useQueryErrorResetBoundary();\n\tconst client = useQueryClient(queryClient);\n\tconst defaultedOptions = client.defaultQueryOptions(options);\n\tconst query = client.getQueryCache().get(defaultedOptions.queryHash);\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tif (!defaultedOptions.queryFn) console.error(`[${defaultedOptions.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`);\n\t}\n\tconst subscribed = options.subscribed !== false;\n\tdefaultedOptions._optimisticResults = isRestoring ? \"isRestoring\" : subscribed ? \"optimistic\" : void 0;\n\tensureSuspenseTimers(defaultedOptions);\n\tensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary, query);\n\tuseClearResetErrorBoundary(errorResetBoundary);\n\tconst [observer] = React.useState(() => new Observer(client, defaultedOptions));\n\tconst result = observer.getOptimisticResult(defaultedOptions);\n\tconst shouldSubscribe = !isRestoring && subscribed;\n\tReact.useSyncExternalStore(React.useCallback((onStoreChange) => {\n\t\tconst unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop;\n\t\tobserver.updateResult();\n\t\treturn unsubscribe;\n\t}, [observer, shouldSubscribe]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n\tReact.useEffect(() => {\n\t\tobserver.setOptions(defaultedOptions);\n\t}, [defaultedOptions, observer]);\n\tif (shouldSuspend(defaultedOptions, result)) throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);\n\tif (getHasError({\n\t\tresult,\n\t\terrorResetBoundary,\n\t\tthrowOnError: defaultedOptions.throwOnError,\n\t\tquery,\n\t\tsuspense: defaultedOptions.suspense\n\t})) throw result.error;\n\treturn !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;\n}\n//#endregion\nexport { useBaseQuery };\n\n//# sourceMappingURL=useBaseQuery.js.map","\"use client\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nimport { QueryObserver } from \"@tanstack/query-core\";\n//#region src/useQuery.ts\nfunction useQuery(options, queryClient) {\n\treturn useBaseQuery(options, QueryObserver, queryClient);\n}\n//#endregion\nexport { useQuery };\n\n//# sourceMappingURL=useQuery.js.map","import type {\n DefaultError,\n QueryClient,\n QueryKey,\n UseQueryOptions,\n UseQueryResult,\n} from '@tanstack/react-query';\nimport { useQuery } from '@tanstack/react-query';\nimport { useMemo } from 'react';\n\n\nexport const useQueryMemo = <TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, queryClient?: QueryClient): UseQueryResult<NoInfer<TData>, TError> => {\n const query = useQuery(options, queryClient);\n\n return useMemo(() => {\n return query;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps, react-hooks/use-memo\n }, [JSON.stringify({\n data: query.data,\n error: query.error,\n isEnabled: query.isEnabled,\n isFetching: query.isFetching,\n isLoading: query.isLoading,\n isPending: query.isPending,\n })]);\n};\n"],"x_google_ignoreList":[0,1,2,3,4,5,6],"mappings":";;;;;;AA4BA,IAAI,IAAgB,cAAc,EAAa;CAC9C;CACA,KAAgB,KAAK;CACrB,KAA4B,KAAK;CACjC,KAAiB,KAAK;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,qBAAgC,IAAI,IAAI;CACxC,YAAY,GAAQ,GAAS;EAM5B,AALA,MAA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AAS,YAAY,CAAM;AAC3E;;;AC1CA,SAAS,EAAS,GAAS,GAAa;CACvC,OAAO,EAAa,GAAS,GAAe,CAAW;AACxD;;;ACKA,IAAa,KAA4H,GAAkE,MAAsE;CAC/Q,IAAM,IAAQ,EAAS,GAAS,CAAW;CAE3C,OAAO,QACE,GAGN,CAAC,KAAK,UAAU;EACjB,MAAM,EAAM;EACZ,OAAO,EAAM;EACb,WAAW,EAAM;EACjB,YAAY,EAAM;EAClB,WAAW,EAAM;EACjB,WAAW,EAAM;CACnB,CAAC,CAAC,CAAC;AACL"}
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.2.18_immer@11.1.18_react@19.2.8_use-sync-external-store@1.6.0_react@19.2.8_/node_modules/zustand/esm/vanilla.mjs
1
+ //#region ../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.18_react@19.3.0_use-sync-external-store@1.6.0_react@19.3.0_/node_modules/zustand/esm/vanilla.mjs
2
2
  var e = (e) => {
3
3
  let t, n = /* @__PURE__ */ new Set(), r = (e, r) => {
4
4
  let i = typeof e == "function" ? e(t) : e;
@@ -1 +1 @@
1
- {"version":3,"file":"vanilla.js","names":[],"sources":["../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.2.18_immer@11.1.18_react@19.2.8_use-sync-external-store@1.6.0_react@19.2.8_/node_modules/zustand/esm/vanilla.mjs"],"sourcesContent":["const createStoreImpl = (createState) => {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (!Object.is(nextState, state)) {\n const previousState = state;\n state = (replace != null ? replace : typeof nextState !== \"object\" || nextState === null) ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const getInitialState = () => initialState;\n const subscribe = (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const api = { setState, getState, getInitialState, subscribe };\n const initialState = state = createState(setState, getState, api);\n return api;\n};\nconst createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);\n\nexport { createStore };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAM,KAAmB,MAAgB;CACvC,IAAI,GACE,oBAA4B,IAAI,IAAI,GACpC,KAAY,GAAS,MAAY;EACrC,IAAM,IAAY,OAAO,KAAY,aAAa,EAAQ,CAAK,IAAI;EACnE,IAAI,CAAC,OAAO,GAAG,GAAW,CAAK,GAAG;GAChC,IAAM,IAAgB;GAEtB,AADA,IAAS,MAA4B,OAAO,KAAc,aAAY,KAAsB,IAAY,OAAO,OAAO,CAAC,GAAG,GAAO,CAAS,GAC1I,EAAU,SAAS,MAAa,EAAS,GAAO,CAAa,CAAC;EAChE;CACF,GACM,UAAiB,GAMjB,IAAM;EAAE;EAAU;EAAU,uBALJ;EAKqB,YAJhC,OACjB,EAAU,IAAI,CAAQ,SACT,EAAU,OAAO,CAAQ;CAEqB,GACvD,IAAe,IAAQ,EAAY,GAAU,GAAU,CAAG;CAChE,OAAO;AACT,GACM,MAAgB,MAAgB,IAAc,EAAgB,CAAW,IAAI"}
1
+ {"version":3,"file":"vanilla.js","names":[],"sources":["../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.18_react@19.3.0_use-sync-external-store@1.6.0_react@19.3.0_/node_modules/zustand/esm/vanilla.mjs"],"sourcesContent":["const createStoreImpl = (createState) => {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (!Object.is(nextState, state)) {\n const previousState = state;\n state = (replace != null ? replace : typeof nextState !== \"object\" || nextState === null) ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const getInitialState = () => initialState;\n const subscribe = (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const api = { setState, getState, getInitialState, subscribe };\n const initialState = state = createState(setState, getState, api);\n return api;\n};\nconst createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);\n\nexport { createStore };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAM,KAAmB,MAAgB;CACvC,IAAI,GACE,oBAA4B,IAAI,IAAI,GACpC,KAAY,GAAS,MAAY;EACrC,IAAM,IAAY,OAAO,KAAY,aAAa,EAAQ,CAAK,IAAI;EACnE,IAAI,CAAC,OAAO,GAAG,GAAW,CAAK,GAAG;GAChC,IAAM,IAAgB;GAEtB,AADA,IAAS,MAA4B,OAAO,KAAc,aAAY,KAAsB,IAAY,OAAO,OAAO,CAAC,GAAG,GAAO,CAAS,GAC1I,EAAU,SAAS,MAAa,EAAS,GAAO,CAAa,CAAC;EAChE;CACF,GACM,UAAiB,GAMjB,IAAM;EAAE;EAAU;EAAU,uBALJ;EAKqB,YAJhC,OACjB,EAAU,IAAI,CAAQ,SACT,EAAU,OAAO,CAAQ;CAEqB,GACvD,IAAe,IAAQ,EAAY,GAAU,GAAU,CAAG;CAChE,OAAO;AACT,GACM,MAAgB,MAAgB,IAAc,EAAgB,CAAW,IAAI"}