@baasix/baasix 0.1.21 → 0.1.22

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 (80) hide show
  1. package/dist/app/404/index.html +1 -1
  2. package/dist/app/404.html +1 -1
  3. package/dist/app/_next/static/chunks/3817-5cb6f63ed38072bd.js +1 -0
  4. package/dist/app/_next/static/chunks/{webpack-77bb6efef9162945.js → webpack-351f818d8cb8b17a.js} +1 -1
  5. package/dist/app/activity-log/all-activity/index.html +1 -1
  6. package/dist/app/activity-log/all-activity/index.txt +2 -2
  7. package/dist/app/activity-log/email-log/index.html +1 -1
  8. package/dist/app/activity-log/email-log/index.txt +2 -2
  9. package/dist/app/activity-log/index.html +1 -1
  10. package/dist/app/activity-log/index.txt +1 -1
  11. package/dist/app/activity-log/notifications/index.html +1 -1
  12. package/dist/app/activity-log/notifications/index.txt +1 -1
  13. package/dist/app/activity-log/sessions/index.html +1 -1
  14. package/dist/app/activity-log/sessions/index.txt +1 -1
  15. package/dist/app/activity-log/workflow-executions/index.html +1 -1
  16. package/dist/app/activity-log/workflow-executions/index.txt +1 -1
  17. package/dist/app/activity-log/workflow-logs/index.html +1 -1
  18. package/dist/app/activity-log/workflow-logs/index.txt +1 -1
  19. package/dist/app/change-password/index.html +1 -1
  20. package/dist/app/change-password/index.txt +1 -1
  21. package/dist/app/dashboard/index.html +1 -1
  22. package/dist/app/dashboard/index.txt +1 -1
  23. package/dist/app/data-browser/index.html +1 -1
  24. package/dist/app/data-browser/index.txt +1 -1
  25. package/dist/app/file-manager/index.html +1 -1
  26. package/dist/app/file-manager/index.txt +2 -2
  27. package/dist/app/forgot-password/index.html +1 -1
  28. package/dist/app/forgot-password/index.txt +1 -1
  29. package/dist/app/index.html +1 -1
  30. package/dist/app/index.txt +1 -1
  31. package/dist/app/login/index.html +1 -1
  32. package/dist/app/login/index.txt +1 -1
  33. package/dist/app/register/index.html +1 -1
  34. package/dist/app/register/index.txt +1 -1
  35. package/dist/app/settings/migrations/index.html +1 -1
  36. package/dist/app/settings/migrations/index.txt +1 -1
  37. package/dist/app/settings/permissions/index.html +1 -1
  38. package/dist/app/settings/permissions/index.txt +2 -2
  39. package/dist/app/settings/project/index.html +1 -1
  40. package/dist/app/settings/project/index.txt +2 -2
  41. package/dist/app/settings/roles/index.html +1 -1
  42. package/dist/app/settings/roles/index.txt +2 -2
  43. package/dist/app/settings/schema/index.html +1 -1
  44. package/dist/app/settings/schema/index.txt +1 -1
  45. package/dist/app/settings/tasks/index.html +1 -1
  46. package/dist/app/settings/tasks/index.txt +1 -1
  47. package/dist/app/settings/templates/edit/index.html +1 -1
  48. package/dist/app/settings/templates/edit/index.txt +1 -1
  49. package/dist/app/settings/templates/index.html +1 -1
  50. package/dist/app/settings/templates/index.txt +2 -2
  51. package/dist/app/settings/tenants/index.html +1 -1
  52. package/dist/app/settings/tenants/index.txt +2 -2
  53. package/dist/app/users/index.html +1 -1
  54. package/dist/app/users/index.txt +2 -2
  55. package/dist/app/users/invites/index.html +1 -1
  56. package/dist/app/users/invites/index.txt +1 -1
  57. package/dist/app/users/list/index.html +1 -1
  58. package/dist/app/users/list/index.txt +2 -2
  59. package/dist/app/users/preferences/index.html +1 -1
  60. package/dist/app/users/preferences/index.txt +1 -1
  61. package/dist/app/users/user-roles/index.html +1 -1
  62. package/dist/app/users/user-roles/index.txt +1 -1
  63. package/dist/app/workflows/detail/index.html +1 -1
  64. package/dist/app/workflows/detail/index.txt +1 -1
  65. package/dist/app/workflows/edit/index.html +1 -1
  66. package/dist/app/workflows/edit/index.txt +1 -1
  67. package/dist/app/workflows/execution/index.html +1 -1
  68. package/dist/app/workflows/execution/index.txt +1 -1
  69. package/dist/app/workflows/index.html +1 -1
  70. package/dist/app/workflows/index.txt +2 -2
  71. package/dist/routes/items.route.d.ts.map +1 -1
  72. package/dist/routes/items.route.js +2 -0
  73. package/dist/routes/items.route.js.map +1 -1
  74. package/dist/utils/common.d.ts.map +1 -1
  75. package/dist/utils/common.js +4 -3
  76. package/dist/utils/common.js.map +1 -1
  77. package/package.json +1 -1
  78. package/dist/app/_next/static/chunks/3817-2309d84b85956d4e.js +0 -1
  79. /package/dist/app/_next/static/{UqrExMMBuUZGJRB_oXaXk → 0OyjnKLbfIe0glU-jWgWZ}/_buildManifest.js +0 -0
  80. /package/dist/app/_next/static/{UqrExMMBuUZGJRB_oXaXk → 0OyjnKLbfIe0glU-jWgWZ}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/admin/_next/static/css/d08072df3a043c8d.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/admin/_next/static/chunks/webpack-77bb6efef9162945.js"/><script src="/admin/_next/static/chunks/fd9d1056-54169f07cd680d6c.js" async=""></script><script src="/admin/_next/static/chunks/2117-29b5fa47421595ad.js" async=""></script><script src="/admin/_next/static/chunks/main-app-55bcae20c77aaf0e.js" async=""></script><script src="/admin/_next/static/chunks/6fcbdc68-90be1a5480b8d353.js" async=""></script><script src="/admin/_next/static/chunks/5094-8d53e403235d4ca6.js" async=""></script><script src="/admin/_next/static/chunks/4438-c9a12ca15b6e9160.js" async=""></script><script src="/admin/_next/static/chunks/6530-a91e10cffa4200c4.js" async=""></script><script src="/admin/_next/static/chunks/6241-30d7169d1010e5a4.js" async=""></script><script src="/admin/_next/static/chunks/1668-e3eabd0f6753c780.js" async=""></script><script src="/admin/_next/static/chunks/6869-11b3cd61c78598a7.js" async=""></script><script src="/admin/_next/static/chunks/8473-6598318371eca31b.js" async=""></script><script src="/admin/_next/static/chunks/4883-8a924721bb21b3b0.js" async=""></script><script src="/admin/_next/static/chunks/7304-53d85c55adc8f184.js" async=""></script><script src="/admin/_next/static/chunks/app/layout-64ac14a534e2809b.js" async=""></script><link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=G-FBCW8DT7KT" as="script"/><meta name="robots" content="noindex"/><title>Baasix</title><script src="/admin/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased"><!--$--><div class="flex items-center justify-center min-h-screen bg-background"><div class="text-center"><div class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-primary border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]"></div><p class="mt-4 text-muted-foreground">Loading...</p></div></div><!--/$--><script src="/admin/_next/static/chunks/webpack-77bb6efef9162945.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/admin/_next/static/css/d08072df3a043c8d.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[12846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[36423,[],\"\"]\n6:I[84821,[\"7999\",\"static/chunks/6fcbdc68-90be1a5480b8d353.js\",\"5094\",\"static/chunks/5094-8d53e403235d4ca6.js\",\"4438\",\"static/chunks/4438-c9a12ca15b6e9160.js\",\"6530\",\"static/chunks/6530-a91e10cffa4200c4.js\",\"6241\",\"static/chunks/6241-30d7169d1010e5a4.js\",\"1668\",\"static/chunks/1668-e3eabd0f6753c780.js\",\"6869\",\"static/chunks/6869-11b3cd61c78598a7.js\",\"8473\",\"static/chunks/8473-6598318371eca31b.js\",\"4883\",\"static/chunks/4883-8a924721bb21b3b0.js\",\"7304\",\"static/chunks/7304-53d85c55adc8f184.js\",\"3185\",\"static/chunks/app/layout-64ac14a534e2809b.js\"],\"default\",1]\nc:I[61060,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"UqrExMMBuUZGJRB_oXaXk\",\"assetPrefix\":\"/admin\",\"urlParts\":[\"\",\"_not-found\",\"\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/admin/_next/static/css/d08072df3a043c8d.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":{}}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}]]\n3:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/admin/_next/static/css/d08072df3a043c8d.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/admin/_next/static/chunks/webpack-351f818d8cb8b17a.js"/><script src="/admin/_next/static/chunks/fd9d1056-54169f07cd680d6c.js" async=""></script><script src="/admin/_next/static/chunks/2117-29b5fa47421595ad.js" async=""></script><script src="/admin/_next/static/chunks/main-app-55bcae20c77aaf0e.js" async=""></script><script src="/admin/_next/static/chunks/6fcbdc68-90be1a5480b8d353.js" async=""></script><script src="/admin/_next/static/chunks/5094-8d53e403235d4ca6.js" async=""></script><script src="/admin/_next/static/chunks/4438-c9a12ca15b6e9160.js" async=""></script><script src="/admin/_next/static/chunks/6530-a91e10cffa4200c4.js" async=""></script><script src="/admin/_next/static/chunks/6241-30d7169d1010e5a4.js" async=""></script><script src="/admin/_next/static/chunks/1668-e3eabd0f6753c780.js" async=""></script><script src="/admin/_next/static/chunks/6869-11b3cd61c78598a7.js" async=""></script><script src="/admin/_next/static/chunks/8473-6598318371eca31b.js" async=""></script><script src="/admin/_next/static/chunks/4883-8a924721bb21b3b0.js" async=""></script><script src="/admin/_next/static/chunks/7304-53d85c55adc8f184.js" async=""></script><script src="/admin/_next/static/chunks/app/layout-64ac14a534e2809b.js" async=""></script><link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=G-FBCW8DT7KT" as="script"/><meta name="robots" content="noindex"/><title>Baasix</title><script src="/admin/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased"><!--$--><div class="flex items-center justify-center min-h-screen bg-background"><div class="text-center"><div class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-primary border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]"></div><p class="mt-4 text-muted-foreground">Loading...</p></div></div><!--/$--><script src="/admin/_next/static/chunks/webpack-351f818d8cb8b17a.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/admin/_next/static/css/d08072df3a043c8d.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[12846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[36423,[],\"\"]\n6:I[84821,[\"7999\",\"static/chunks/6fcbdc68-90be1a5480b8d353.js\",\"5094\",\"static/chunks/5094-8d53e403235d4ca6.js\",\"4438\",\"static/chunks/4438-c9a12ca15b6e9160.js\",\"6530\",\"static/chunks/6530-a91e10cffa4200c4.js\",\"6241\",\"static/chunks/6241-30d7169d1010e5a4.js\",\"1668\",\"static/chunks/1668-e3eabd0f6753c780.js\",\"6869\",\"static/chunks/6869-11b3cd61c78598a7.js\",\"8473\",\"static/chunks/8473-6598318371eca31b.js\",\"4883\",\"static/chunks/4883-8a924721bb21b3b0.js\",\"7304\",\"static/chunks/7304-53d85c55adc8f184.js\",\"3185\",\"static/chunks/app/layout-64ac14a534e2809b.js\"],\"default\",1]\nc:I[61060,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"0OyjnKLbfIe0glU-jWgWZ\",\"assetPrefix\":\"/admin\",\"urlParts\":[\"\",\"_not-found\",\"\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/admin/_next/static/css/d08072df3a043c8d.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":{}}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}]]\n3:null\n"])</script></body></html>
package/dist/app/404.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/admin/_next/static/css/d08072df3a043c8d.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/admin/_next/static/chunks/webpack-77bb6efef9162945.js"/><script src="/admin/_next/static/chunks/fd9d1056-54169f07cd680d6c.js" async=""></script><script src="/admin/_next/static/chunks/2117-29b5fa47421595ad.js" async=""></script><script src="/admin/_next/static/chunks/main-app-55bcae20c77aaf0e.js" async=""></script><script src="/admin/_next/static/chunks/6fcbdc68-90be1a5480b8d353.js" async=""></script><script src="/admin/_next/static/chunks/5094-8d53e403235d4ca6.js" async=""></script><script src="/admin/_next/static/chunks/4438-c9a12ca15b6e9160.js" async=""></script><script src="/admin/_next/static/chunks/6530-a91e10cffa4200c4.js" async=""></script><script src="/admin/_next/static/chunks/6241-30d7169d1010e5a4.js" async=""></script><script src="/admin/_next/static/chunks/1668-e3eabd0f6753c780.js" async=""></script><script src="/admin/_next/static/chunks/6869-11b3cd61c78598a7.js" async=""></script><script src="/admin/_next/static/chunks/8473-6598318371eca31b.js" async=""></script><script src="/admin/_next/static/chunks/4883-8a924721bb21b3b0.js" async=""></script><script src="/admin/_next/static/chunks/7304-53d85c55adc8f184.js" async=""></script><script src="/admin/_next/static/chunks/app/layout-64ac14a534e2809b.js" async=""></script><link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=G-FBCW8DT7KT" as="script"/><meta name="robots" content="noindex"/><title>Baasix</title><script src="/admin/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased"><!--$--><div class="flex items-center justify-center min-h-screen bg-background"><div class="text-center"><div class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-primary border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]"></div><p class="mt-4 text-muted-foreground">Loading...</p></div></div><!--/$--><script src="/admin/_next/static/chunks/webpack-77bb6efef9162945.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/admin/_next/static/css/d08072df3a043c8d.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[12846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[36423,[],\"\"]\n6:I[84821,[\"7999\",\"static/chunks/6fcbdc68-90be1a5480b8d353.js\",\"5094\",\"static/chunks/5094-8d53e403235d4ca6.js\",\"4438\",\"static/chunks/4438-c9a12ca15b6e9160.js\",\"6530\",\"static/chunks/6530-a91e10cffa4200c4.js\",\"6241\",\"static/chunks/6241-30d7169d1010e5a4.js\",\"1668\",\"static/chunks/1668-e3eabd0f6753c780.js\",\"6869\",\"static/chunks/6869-11b3cd61c78598a7.js\",\"8473\",\"static/chunks/8473-6598318371eca31b.js\",\"4883\",\"static/chunks/4883-8a924721bb21b3b0.js\",\"7304\",\"static/chunks/7304-53d85c55adc8f184.js\",\"3185\",\"static/chunks/app/layout-64ac14a534e2809b.js\"],\"default\",1]\nc:I[61060,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"UqrExMMBuUZGJRB_oXaXk\",\"assetPrefix\":\"/admin\",\"urlParts\":[\"\",\"_not-found\",\"\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/admin/_next/static/css/d08072df3a043c8d.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":{}}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}]]\n3:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/admin/_next/static/css/d08072df3a043c8d.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/admin/_next/static/chunks/webpack-351f818d8cb8b17a.js"/><script src="/admin/_next/static/chunks/fd9d1056-54169f07cd680d6c.js" async=""></script><script src="/admin/_next/static/chunks/2117-29b5fa47421595ad.js" async=""></script><script src="/admin/_next/static/chunks/main-app-55bcae20c77aaf0e.js" async=""></script><script src="/admin/_next/static/chunks/6fcbdc68-90be1a5480b8d353.js" async=""></script><script src="/admin/_next/static/chunks/5094-8d53e403235d4ca6.js" async=""></script><script src="/admin/_next/static/chunks/4438-c9a12ca15b6e9160.js" async=""></script><script src="/admin/_next/static/chunks/6530-a91e10cffa4200c4.js" async=""></script><script src="/admin/_next/static/chunks/6241-30d7169d1010e5a4.js" async=""></script><script src="/admin/_next/static/chunks/1668-e3eabd0f6753c780.js" async=""></script><script src="/admin/_next/static/chunks/6869-11b3cd61c78598a7.js" async=""></script><script src="/admin/_next/static/chunks/8473-6598318371eca31b.js" async=""></script><script src="/admin/_next/static/chunks/4883-8a924721bb21b3b0.js" async=""></script><script src="/admin/_next/static/chunks/7304-53d85c55adc8f184.js" async=""></script><script src="/admin/_next/static/chunks/app/layout-64ac14a534e2809b.js" async=""></script><link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=G-FBCW8DT7KT" as="script"/><meta name="robots" content="noindex"/><title>Baasix</title><script src="/admin/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased"><!--$--><div class="flex items-center justify-center min-h-screen bg-background"><div class="text-center"><div class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-primary border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]"></div><p class="mt-4 text-muted-foreground">Loading...</p></div></div><!--/$--><script src="/admin/_next/static/chunks/webpack-351f818d8cb8b17a.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/admin/_next/static/css/d08072df3a043c8d.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[12846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[36423,[],\"\"]\n6:I[84821,[\"7999\",\"static/chunks/6fcbdc68-90be1a5480b8d353.js\",\"5094\",\"static/chunks/5094-8d53e403235d4ca6.js\",\"4438\",\"static/chunks/4438-c9a12ca15b6e9160.js\",\"6530\",\"static/chunks/6530-a91e10cffa4200c4.js\",\"6241\",\"static/chunks/6241-30d7169d1010e5a4.js\",\"1668\",\"static/chunks/1668-e3eabd0f6753c780.js\",\"6869\",\"static/chunks/6869-11b3cd61c78598a7.js\",\"8473\",\"static/chunks/8473-6598318371eca31b.js\",\"4883\",\"static/chunks/4883-8a924721bb21b3b0.js\",\"7304\",\"static/chunks/7304-53d85c55adc8f184.js\",\"3185\",\"static/chunks/app/layout-64ac14a534e2809b.js\"],\"default\",1]\nc:I[61060,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"0OyjnKLbfIe0glU-jWgWZ\",\"assetPrefix\":\"/admin\",\"urlParts\":[\"\",\"_not-found\",\"\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/admin/_next/static/css/d08072df3a043c8d.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":{}}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}]]\n3:null\n"])</script></body></html>
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3817],{92322:function(e,l,s){s.d(l,{j:function(){return y}});var t=s(57437),a=s(2265),n=s(29501),r=s(12381),i=s(40279),o=s(75060),c=s(23675),d=s(94589),u=s(51817),m=s(90641),h=s(79622),x=s(5101),p=s(24065);let f=["createdAt","updatedAt","deletedAt","userCreated_Id","userUpdated_Id","userDeleted_Id","userCreated","userUpdated","userDeleted"],g=["UUIDV4","SUID","AUTOINCREMENT","NOW"],v=e=>!!e.defaultValue&&"object"==typeof e.defaultValue&&!!e.defaultValue.type&&g.includes(e.defaultValue.type),j=["createdAt","updatedAt","deletedAt"],y=e=>{let{fields:l,initialValues:s,onSubmit:g,isLoading:y,onCancel:N,disabledFields:b=[]}=e,{register:w,handleSubmit:C,setValue:S,watch:T,reset:k,formState:{errors:D}}=(0,n.cI)({defaultValues:s||{}}),[A,_]=(0,a.useState)(!1),[I,E]=(0,a.useState)(null),[O,F]=(0,a.useState)({});(0,a.useEffect)(()=>{if(s){k(s);let e=l.filter(e=>e.relType),t={};e.forEach(e=>{let l=s[e.name];if(("BelongsTo"===e.relType||"HasOne"===e.relType)&&!l&&e.foreignKey){let t=s[e.foreignKey];t&&(l={id:t})}("BelongsTo"===e.relType||"HasOne"===e.relType)&&l?t[e.name]=l:["HasMany","BelongsToMany","M2M","M2A"].includes(e.relType)&&l&&(t[e.name]=Array.isArray(l)?l:[l])}),F(t)}},[s,k,l]);let Z=s&&Object.keys(s).length>0,z=l.filter(e=>e.relType&&e.foreignKey).map(e=>e.foreignKey),M=l.filter(e=>!(z.includes(e.name)||f.includes(e.name))&&(!e.primaryKey||!Z&&!v(e))),P=M.filter(e=>!e.relType),L=M.filter(e=>e.relType),B=(e,l)=>{if("BelongsTo"===e.relType||"HasOne"===e.relType){let s=l?"string"==typeof l?{id:l}:l:null;if(F(l=>({...l,[e.name]:s})),e.foreignKey){let s="string"==typeof l?l:null==l?void 0:l.id;S(e.foreignKey,s)}}else{let s=(Array.isArray(l)?l:[l]).map(e=>"string"==typeof e?{id:e}:e);F(l=>({...l,[e.name]:s}))}},U=(e,l)=>{"BelongsTo"===e.relType||"HasOne"===e.relType?(F(l=>{let s={...l};return delete s[e.name],s}),e.foreignKey&&S(e.foreignKey,null)):F(s=>({...s,[e.name]:(s[e.name]||[]).filter(e=>e.id!==l)}))},R=e=>{E(e),_(!0)};return(0,t.jsxs)("form",{onSubmit:C(e=>{let s={...e};j.forEach(e=>{delete s[e]}),l.filter(e=>e.relType).forEach(e=>{if("BelongsTo"===e.relType||"HasOne"===e.relType){let l=O[e.name];if(l&&e.foreignKey){let t="string"==typeof l?l:l.id;s[e.foreignKey]=t}delete s[e.name]}else if(["HasMany","BelongsToMany","M2M","M2A"].includes(e.relType)){let l=O[e.name];l&&Array.isArray(l)?s[e.name]=l.map(e=>({id:"string"==typeof e?e:e.id})):delete s[e.name]}}),g(s)}),children:[(0,t.jsx)(m.x,{className:"h-[calc(100vh-200px)] pr-4",children:(0,t.jsxs)("div",{className:"space-y-4",children:[P.map(e=>{let l=T(e.name),s=e.name,a=e.label||s.replace(/_/g," "),n=b.includes(s);switch(e.type){case"Boolean":return(0,t.jsxs)("div",{className:"flex items-center justify-between space-x-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(d.r,{id:s,checked:l||!1,onCheckedChange:e=>S(s,e),disabled:n})]},s);case"Number":case"Integer":case"Float":case"Decimal":case"BigInt":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(i.I,{id:s,type:"number",step:"Integer"===e.type||"BigInt"===e.type?"1":"any",disabled:n,...w(s,{valueAsNumber:!0})})]},s);case"Date":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(i.I,{id:s,type:"date",value:(e=>{if(!e)return"";let l=new Date(e),s=l.getFullYear(),t=String(l.getMonth()+1).padStart(2,"0"),a=String(l.getDate()).padStart(2,"0");return"".concat(s,"-").concat(t,"-").concat(a)})(l),disabled:n,onChange:e=>{S(s,e.target.value||null)}})]},s);case"DateTime":case"DateTime_NO_TZ":case"DATETIME":case"TIMESTAMP":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(i.I,{id:s,type:"datetime-local",value:(e=>{if(!e)return"";let l=new Date(e),s=l.getFullYear(),t=String(l.getMonth()+1).padStart(2,"0"),a=String(l.getDate()).padStart(2,"0"),n=String(l.getHours()).padStart(2,"0"),r=String(l.getMinutes()).padStart(2,"0");return"".concat(s,"-").concat(t,"-").concat(a,"T").concat(n,":").concat(r)})(l),disabled:n,onChange:e=>{S(s,e.target.value?new Date(e.target.value).toISOString():null)}})]},s);case"Time":case"Time_NO_TZ":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(i.I,{id:s,type:"time",value:(e=>{if(!e)return"";if("string"==typeof e){let l=e.match(/^(\d{2}):(\d{2})/);if(l)return"".concat(l[1],":").concat(l[2]);if(e.includes("T")){let l=new Date(e),s=String(l.getHours()).padStart(2,"0"),t=String(l.getMinutes()).padStart(2,"0");return"".concat(s,":").concat(t)}}return e})(l),disabled:n,onChange:e=>{S(s,e.target.value||null)}})]},s);case"Text":case"LONGTEXT":case"MEDIUMTEXT":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(c.g,{id:s,rows:4,disabled:n,...w(s)})]},s);case"JSON":case"JSONB":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.mq,{value:l,onChange:e=>S(s,e),disabled:n})]},s);case"Enum":case"ENUM":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.o_,{value:l||"",onChange:e=>S(s,e),options:e.values||[],placeholder:"Select an option",allowNull:e.allowNull,disabled:n})]},s);case"Email":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(i.I,{id:s,type:"email",disabled:n,...w(s)})]},s);case"URL":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(i.I,{id:s,type:"url",placeholder:"https://",disabled:n,...w(s)})]},s);case"Phone":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(i.I,{id:s,type:"tel",disabled:n,...w(s)})]},s);case"Password":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(i.I,{id:s,type:"password",disabled:n,...w(s)})]},s);case"Array_Integer":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.OF,{value:l||[],onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),itemType:"number"})]},s);case"Array_String":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.OF,{value:l||[],onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),itemType:"string"})]},s);case"Array_Double":case"Array_Decimal":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.OF,{value:l||[],onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),itemType:"number"})]},s);case"Array_UUID":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.OF,{value:l||[],onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),itemType:"string",placeholder:"Enter UUID values"})]},s);case"Array_Date":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.OF,{value:l||[],onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),itemType:"date"})]},s);case"Array_DateTime":case"Array_DateTime_NO_TZ":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.OF,{value:l||[],onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),itemType:"datetime"})]},s);case"Array_Time":case"Array_Time_NO_TZ":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.OF,{value:l||[],onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),itemType:"time"})]},s);case"Array_Boolean":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.OF,{value:l||[],onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),itemType:"boolean"})]},s);case"Range_Integer":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.sU,{value:l,onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),rangeType:"integer"})]},s);case"Range_Double":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.sU,{value:l,onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),rangeType:"double"})]},s);case"Range_Decimal":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.sU,{value:l,onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),rangeType:"decimal"})]},s);case"Range_Date":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.sU,{value:l,onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),rangeType:"date"})]},s);case"Range_DateTime":case"Range_DateTime_NO_TZ":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.sU,{value:l,onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),rangeType:"datetime"})]},s);case"Range_Time":case"Range_Time_NO_TZ":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.sU,{value:l,onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),rangeType:"time"})]},s);case"Point":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.XG,{value:l,onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),geometryType:"Point",fieldName:a})]},s);case"Polygon":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.XG,{value:l,onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),geometryType:"Polygon",fieldName:a})]},s);case"LineString":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.XG,{value:l,onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),geometryType:"LineString",fieldName:a})]},s);case"MultiPoint":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.XG,{value:l,onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),geometryType:"MultiPoint",fieldName:a})]},s);case"MultiPolygon":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.XG,{value:l,onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),geometryType:"MultiPolygon",fieldName:a})]},s);case"MultiLineString":return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(h.XG,{value:l,onChange:e=>S(s,e,{shouldDirty:!0,shouldTouch:!0}),geometryType:"MultiLineString",fieldName:a})]},s);default:return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{htmlFor:s,children:a}),(0,t.jsx)(i.I,{id:s,type:"text",disabled:n,...w(s)})]},s)}}),L.length>0&&(0,t.jsxs)("div",{className:"space-y-4 pt-4 border-t",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-muted-foreground",children:"Relationships"}),L.map(e=>{let l="BelongsTo"===e.relType||"HasOne"===e.relType?O[e.name]:O[e.name]||[];return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o._,{children:e.label||e.name.replace(/_/g," ")}),(0,t.jsx)(x.q,{value:l,field:e,onClick:()=>R(e),onRemove:l=>U(e,l)})]},e.name)})]})]})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t mt-4",children:[(0,t.jsx)(r.z,{type:"button",variant:"outline",onClick:N,disabled:y,children:"Cancel"}),(0,t.jsxs)(r.z,{type:"submit",disabled:y,children:[y&&(0,t.jsx)(u.Z,{className:"mr-2 h-4 w-4 animate-spin"}),s?"Update":"Create"]})]}),I&&(0,t.jsx)(p.x,{open:A,onClose:()=>{_(!1),setTimeout(()=>E(null),100)},onSelect:e=>{B(I,e)},target:I.target,field:I,selectedItems:"BelongsTo"===I.relType||"HasOne"===I.relType?O[I.name]?[O[I.name]]:[]:O[I.name]||[]})]})}},24065:function(e,l,s){s.d(l,{x:function(){return N}});var t=s(57437),a=s(2265),n=s(29696),r=s(91032),i=s(12381),o=s(69174),c=s(75060),d=s(17168),u=s(99397),m=s(32489),h=s(69658),x=s(17689),p=s(51817),f=s(72337),g=s(92322),v=s(72135),j=s(14438);let y=e=>{if(0===e)return"0 B";let l=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,l)).toFixed(2))+" "+["B","KB","MB","GB"][l]},N=e=>{var l;let{open:s,onClose:N,onSelect:b,target:w,field:C,selectedItems:S=[]}=e,[T,k]=(0,a.useState)(S),[D,A]=(0,a.useState)(!1),[_,I]=(0,a.useState)("select"),[E,O]=(0,a.useState)([]),[F,Z]=(0,a.useState)(!1),[z,M]=(0,a.useState)(0),P=(0,a.useRef)(null),{getFieldsByCollection:L,schemas:B}=(0,n.I_)();(0,v.Ji)();let U="files"===w||"baasix_File"===w,R="HasMany"===C.relType||"BelongsToMany"===C.relType||"M2M"===C.relType||"M2A"===C.relType;(0,a.useEffect)(()=>{s&&(k(S||[]),I("select"),O([]))},[s,S]);let V=L(w),J=null==B?void 0:B.find(e=>e.collectionName===w),q=(0,a.useMemo)(()=>V?Object.entries(V).map(e=>{let[l,s]=e;return{name:l,...s,label:l.replace(/_/g," ").replace(/([A-Z])/g," $1").trim()}}):[],[V]),{mutate:K,isLoading:W}=(0,v.RO)(),G=(0,a.useCallback)(e=>{e.preventDefault(),O(Array.from(e.dataTransfer.files))},[]),H=(0,a.useCallback)(e=>{e.preventDefault()},[]),Y=e=>{O(E.filter((l,s)=>s!==e))},X=async()=>{if(0===E.length)return;Z(!0);let e=[];try{for(let l of E){let s=new FormData;s.append("file",l),await new Promise((t,a)=>{K({resource:"files",values:s},{onSuccess:l=>{let s=null==l?void 0:l.data;s&&e.push(s),t()},onError:e=>{j.Am.error("Failed to upload ".concat(l.name,": ").concat(e.message)),a(e)}})})}if(j.Am.success("".concat(E.length," file(s) uploaded successfully")),Z(!1),e.length>0){if(R){let l=[...T,...e];k(l),b(l),O([]),I("select"),M(e=>e+1)}else{b(e[0]),setTimeout(()=>{N()},50);return}}}catch(e){console.error("Upload error:",e),Z(!1)}},Q=(0,a.useCallback)(e=>{k(e),!R&&e.length>0&&(b(e[0]),N())},[R,b,N]),$=()=>{b(T),N()};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.yo,{open:s,onOpenChange:e=>!e&&N(),children:(0,t.jsx)(r.ue,{className:"w-full sm:w-[900px] sm:max-w-[900px] flex flex-col p-0",hideDefaultClose:!0,children:U?(0,t.jsxs)(d.mQ,{value:_,onValueChange:e=>I(e),className:"flex-1 flex flex-col min-h-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b shrink-0",children:[(0,t.jsx)(r.sw,{asChild:!0,children:(0,t.jsxs)(i.z,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0",children:[(0,t.jsx)(m.Z,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})}),(0,t.jsxs)("span",{className:"font-medium truncate text-sm",children:["Select ",(null==C?void 0:C.label)||(null==C?void 0:C.name)]}),R&&T.length>0&&(0,t.jsx)(o.C,{variant:"secondary",className:"shrink-0",children:T.length}),(0,t.jsxs)(d.dr,{className:"grid grid-cols-2 ml-auto",children:[(0,t.jsxs)(d.SP,{value:"select",className:"text-xs px-3",children:[(0,t.jsx)(h.Z,{className:"mr-1.5 h-3.5 w-3.5"}),"Select"]}),(0,t.jsxs)(d.SP,{value:"upload",className:"text-xs px-3",children:[(0,t.jsx)(x.Z,{className:"mr-1.5 h-3.5 w-3.5"}),"Upload"]})]}),R&&(0,t.jsxs)(i.z,{onClick:$,children:["Done (",T.length,")"]})]}),(0,t.jsx)(d.nU,{value:"select",className:"flex-1 flex flex-col min-h-0 mt-0 data-[state=inactive]:hidden",children:(0,t.jsx)("div",{className:"flex-1 flex flex-col min-h-0 px-3 pb-3",children:w&&(0,t.jsx)(f.DataBrowserInner,{selectedCollection:w,hideTitle:!0,enableSearch:!0,enableFilters:!0,enableCreate:!1,enableView:!1,enableEdit:!1,enableDelete:!1,enableExport:!1,enableImport:!1,enableBulkSelect:!1,enableColumnSettings:!1,showSelectionColumn:!0,selectionMode:R?"multiple":"single",externalSelectedRows:T,onExternalSelectionChange:Q,highlightSelectedRows:!0},z)})}),(0,t.jsx)(d.nU,{value:"upload",className:"flex-1 overflow-auto p-4 mt-0 data-[state=inactive]:hidden",children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"border-2 border-dashed rounded-lg p-12 text-center cursor-pointer hover:border-primary transition-colors",onClick:()=>{var e;return null===(e=P.current)||void 0===e?void 0:e.click()},onDrop:G,onDragOver:H,children:[(0,t.jsx)(x.Z,{className:"h-12 w-12 mx-auto mb-4 text-muted-foreground"}),(0,t.jsx)("p",{className:"text-lg font-medium",children:"Drag and drop files here"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"or click to browse"}),(0,t.jsx)("input",{ref:P,type:"file",multiple:R,className:"hidden",onChange:e=>{e.target.files&&O(Array.from(e.target.files))}})]}),E.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(c._,{children:"Selected Files"}),(0,t.jsx)("div",{className:"space-y-2 max-h-60 overflow-y-auto",children:E.map((e,l)=>(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-muted rounded-lg",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 truncate",children:[(0,t.jsx)(h.Z,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("span",{className:"text-sm font-medium truncate block",children:e.name}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:y(e.size)})]})]}),(0,t.jsx)(i.z,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0",onClick:()=>Y(l),children:(0,t.jsx)(m.Z,{className:"h-4 w-4"})})]},l))}),(0,t.jsxs)(i.z,{onClick:X,disabled:F||0===E.length,className:"w-full",children:[F?(0,t.jsx)(p.Z,{className:"mr-2 h-4 w-4 animate-spin"}):(0,t.jsx)(x.Z,{className:"mr-2 h-4 w-4"}),"Upload & Select"]})]})]})})]}):(0,t.jsx)("div",{className:"flex-1 flex flex-col min-h-0 px-3 pb-3 pt-2",children:w&&(0,t.jsx)(f.DataBrowserInner,{selectedCollection:w,hideTitle:!0,enableSearch:!0,enableFilters:!0,enableCreate:!1,enableView:!1,enableEdit:!1,enableDelete:!1,enableExport:!1,enableImport:!1,enableBulkSelect:!1,enableColumnSettings:!1,showSelectionColumn:!0,selectionMode:R?"multiple":"single",externalSelectedRows:T,onExternalSelectionChange:Q,highlightSelectedRows:!0,quickFilters:(0,t.jsxs)("div",{className:"flex items-center gap-2 mr-auto",children:[(0,t.jsx)(r.sw,{asChild:!0,children:(0,t.jsxs)(i.z,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0",children:[(0,t.jsx)(m.Z,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})}),(0,t.jsxs)("span",{className:"font-medium truncate text-sm",children:["Select ",(null==C?void 0:C.label)||(null==C?void 0:C.name)]}),R&&T.length>0&&(0,t.jsx)(o.C,{variant:"secondary",className:"shrink-0",children:T.length})]}),headerActions:(0,t.jsxs)(t.Fragment,{children:[!U&&(0,t.jsx)(i.z,{size:"icon",onClick:()=>A(!0),title:"Create New",children:(0,t.jsx)(u.Z,{className:"h-4 w-4"})}),R&&(0,t.jsxs)(i.z,{onClick:$,children:["Done (",T.length,")"]})]})})})})}),(0,t.jsx)(r.yo,{open:D,onOpenChange:A,children:(0,t.jsxs)(r.ue,{className:"w-full sm:w-[600px] sm:max-w-[600px] overflow-y-auto",children:[(0,t.jsx)(r.Tu,{children:(0,t.jsxs)(r.bC,{children:["Create New ",(null==J?void 0:null===(l=J.schema)||void 0===l?void 0:l.name)||w]})}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(g.j,{fields:q,onSubmit:e=>{K({resource:w,values:e},{onSuccess:e=>{j.Am.success("Item created successfully"),A(!1),R?k([...T,e.data]):(b(e.data),N())},onError:e=>{j.Am.error("Failed to create: ".concat(e.message))}})},isLoading:W,onCancel:()=>A(!1)})})]})})]})}},5101:function(e,l,s){s.d(l,{q:function(){return o}});var t=s(57437);s(2265);var a=s(12381),n=s(69174),r=s(32489),i=s(73247);let o=e=>{let{value:l,field:s,onClick:o,onRemove:c,placeholder:d}=e,u=e=>{if(!e||"object"!=typeof e)return!1;let l=Object.keys(e);return 0===l.length||l.every(l=>null===e[l]||void 0===e[l])},m=e=>{if(!e||"object"==typeof e&&u(e))return"";if("string"==typeof e||"number"==typeof e)return String(e);if(s.showAs&&Array.isArray(s.showAs)){let l=["-"," ",",","_"," and "," or "],t=[];s.showAs.forEach(s=>{if(l.includes(s))t.push(s);else{let l;if(s.includes(".")){let t=s.split("."),a=e;for(let e of t)if(null==(a=null==a?void 0:a[e]))break;l=a}else l=e[s];null!=l&&""!==l&&t.push(String(l))}});let a=t.filter((e,s)=>{let a=l.includes(e),n=s>0&&l.includes(t[s-1]),r=s===t.length-1;return!a||0!==s&&!r&&!n});return a.length>0?a.join(""):e.id||e.name||""}return e.name||e.title||e.label||e.email||e.id||""};if(Array.isArray(l))return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("div",{onClick:o,className:"cursor-pointer",children:l.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1 p-2 border rounded-md min-h-10 bg-background",children:l.map((e,l)=>(0,t.jsxs)(n.C,{variant:"secondary",className:"flex items-center gap-1",children:[m(e),(0,t.jsx)("button",{type:"button",onClick:l=>{l.stopPropagation(),null==c||c(e)},className:"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:(0,t.jsx)(r.Z,{className:"h-3 w-3"})})]},e.id||l))}):(0,t.jsxs)("div",{className:"flex items-center gap-2 p-2 border rounded-md min-h-10 bg-background text-muted-foreground cursor-pointer hover:bg-accent",children:[(0,t.jsx)(i.Z,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:d||"Select ".concat(s.label||s.name)})]})}),l.length>0&&(0,t.jsxs)(a.z,{type:"button",variant:"outline",size:"sm",onClick:o,className:"flex items-center gap-1",children:[(0,t.jsx)(i.Z,{className:"h-3 w-3"}),"Add More"]})]});let h=l&&!u(l);return(0,t.jsx)("div",{onClick:o,className:"cursor-pointer",children:(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("div",{className:"flex-1",children:h?(0,t.jsxs)("div",{className:"flex items-center gap-2 p-2 border rounded-md min-h-10 bg-background",children:[(0,t.jsx)("span",{className:"flex-1",children:m(l)}),(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),null==c||c(l)},className:"text-muted-foreground hover:text-foreground",children:(0,t.jsx)(r.Z,{className:"h-4 w-4"})})]}):(0,t.jsxs)("div",{className:"flex items-center gap-2 p-2 border rounded-md min-h-10 bg-background text-muted-foreground hover:bg-accent",children:[(0,t.jsx)(i.Z,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:d||"Select ".concat(s.label||s.name)})]})})})})}},72337:function(e,l,s){s.r(l),s.d(l,{DataBrowser:function(){return eH},DataBrowserInner:function(){return eG},default:function(){return eY}});var t=s(57437),a=s(2265),n=s(99376),r=s(72135),i=s(10795),o=s(93662),c=s(84314),d=s(29696),u=s(63751),m=s(28757),h=s(83434),x=s(79622),p=s(12381),f=s(43368),g=s(79820),v=s(33804),j=s(69174),y=s(91032),N=s(74291),b=s(32060),w=s(15291),C=s(68245),S=s(90740),T=s(98728),k=s(82431),D=s(67782),A=s(92735),_=s(17689),I=s(99397),E=s(41905),O=s(20265),F=s(15051),Z=s(28842),z=s(51817),M=s(42208),P=s(15868),L=s(18930),B=s(92451),U=s(10407),R=s(83774),V=s(40875),J=s(82284),q=s(13781),K=s(7586),W=s(64935),G=s(17168),H=s(23675),Y=s(12749),X=s(90641),Q=s(71096),$=s.n(Q),ee=s(40279),el=s(94589),es=s(46291),et=s(31047),ea=s(91723),en=s(93448),er=s(27107);let ei={text:[{label:"Equals",value:"eq"},{label:"Not Equals",value:"ne"},{label:"Contains",value:"contains"},{label:"Not Contains",value:"ncontains"},{label:"Starts With",value:"startswith"},{label:"Ends With",value:"endswith"},{label:"Is Empty",value:"null"},{label:"Is Not Empty",value:"nnull"}],number:[{label:"Equals",value:"eq"},{label:"Not Equals",value:"ne"},{label:"Greater Than",value:"gt"},{label:"Greater Than or Equal",value:"gte"},{label:"Less Than",value:"lt"},{label:"Less Than or Equal",value:"lte"},{label:"Between",value:"between"},{label:"Is Empty",value:"null"},{label:"Is Not Empty",value:"nnull"}],date:[{label:"Equals",value:"eq"},{label:"Not Equals",value:"ne"},{label:"Greater Than",value:"gt"},{label:"Greater Than or Equal",value:"gte"},{label:"Less Than",value:"lt"},{label:"Less Than or Equal",value:"lte"},{label:"Between",value:"between"},{label:"Is Empty",value:"null"},{label:"Is Not Empty",value:"nnull"}],boolean:[{label:"Is True",value:"true"},{label:"Is False",value:"false"},{label:"Is Empty",value:"null"},{label:"Is Not Empty",value:"nnull"}],relation:[{label:"Equals",value:"eq"},{label:"Not Equals",value:"ne"},{label:"Is Empty",value:"null"},{label:"Is Not Empty",value:"nnull"}],array:[{label:"Contains",value:"contains"},{label:"Not Contains",value:"ncontains"},{label:"Is Empty",value:"null"},{label:"Is Not Empty",value:"nnull"}],json:[{label:"Contains Key",value:"contains"},{label:"Not Contains Key",value:"ncontains"},{label:"Is Empty",value:"null"},{label:"Is Not Empty",value:"nnull"}],geospatial:[{label:"Within",value:"within"},{label:"Contains",value:"containsGEO"},{label:"Intersects",value:"intersects"},{label:"Distance Within",value:"dwithin"},{label:"Is Empty",value:"null"},{label:"Is Not Empty",value:"nnull"}]},eo=e=>{var l;if(!e)return ei.text;if(e.relType)return ei.relation;if(null===(l=e.type)||void 0===l?void 0:l.startsWith("Array_"))return ei.array;switch(e.type){case"Number":case"Integer":case"Float":case"Decimal":case"BigInt":return ei.number;case"Date":case"DateTime":case"DateTime_NO_TZ":case"Time":case"Time_NO_TZ":return ei.date;case"Boolean":return ei.boolean;case"JSON":case"JSONB":return ei.json;case"Point":case"Polygon":case"LineString":return ei.geospatial;default:return ei.text}},ec=(e,l,s)=>{if(null==e)return e;if("null"===l||"nnull"===l||"true"===l)return!0;if("false"===l)return!1;if(s){var t;if("Date"===s.type||"DateTime"===s.type||"DateTime_NO_TZ"===s.type)return"between"===l&&Array.isArray(e)?e.map(e=>e?$()(e).toISOString():null):e?$()(e).toISOString():null;if("Time"===s.type||"Time_NO_TZ"===s.type)return"between"===l&&Array.isArray(e)?e.map(e=>e||null):e||null;if("Number"===s.type||"Integer"===s.type||"Float"===s.type||"Decimal"===s.type||"BigInt"===s.type)return"between"===l&&Array.isArray(e)?e.map(e=>void 0!==e&&""!==e?Number(e):null):void 0!==e&&""!==e?Number(e):null;if("Boolean"===s.type)return!!e;if(null===(t=s.type)||void 0===t?void 0:t.startsWith("Array_"))return Array.isArray(e)?e:[e];if("Point"===s.type||"Polygon"===s.type||"LineString"===s.type)try{return"string"==typeof e?JSON.parse(e):e}catch(e){}}return e},ed=e=>{let{value:l,onChange:s,placeholder:a}=e;return(0,t.jsxs)(Y.J2,{children:[(0,t.jsx)(Y.xo,{asChild:!0,children:(0,t.jsxs)(p.z,{variant:"outline",className:(0,en.cn)("w-full justify-start text-left font-normal",!l&&"text-muted-foreground"),children:[(0,t.jsx)(et.Z,{className:"mr-2 h-4 w-4"}),l?(0,er.WU)(l,"PPP"):a||"Pick a date"]})}),(0,t.jsx)(Y.yk,{className:"w-auto p-0",align:"start",children:(0,t.jsx)(es.f,{mode:"single",selected:l,onSelect:s,initialFocus:!0})})]})},eu=e=>{let{value:l,onChange:s,placeholder:a}=e,n=l?"".concat(String(l.getHours()).padStart(2,"0"),":").concat(String(l.getMinutes()).padStart(2,"0")):"",r=e=>{if(!e)return;let[t,a]=e.split(":").map(Number),n=l?new Date(l):new Date;n.setHours(t,a,0,0),s(n)};return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(Y.J2,{children:[(0,t.jsx)(Y.xo,{asChild:!0,children:(0,t.jsxs)(p.z,{variant:"outline",className:(0,en.cn)("justify-start text-left font-normal",!l&&"text-muted-foreground"),children:[(0,t.jsx)(et.Z,{className:"mr-2 h-4 w-4"}),l?(0,er.WU)(l,"PPP"):a||"Pick a date"]})}),(0,t.jsx)(Y.yk,{className:"w-auto p-0",align:"start",children:(0,t.jsx)(es.f,{mode:"single",selected:l,onSelect:e=>{if(!e){s(void 0);return}l&&e.setHours(l.getHours(),l.getMinutes(),0,0),s(e)},initialFocus:!0})})]}),(0,t.jsx)(ee.I,{type:"time",value:n,onChange:e=>r(e.target.value),className:"w-28"})]})},em=e=>{let{value:l,onChange:s,placeholder:a}=e;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ea.Z,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsx)(ee.I,{type:"time",value:(e=>{if(!e)return"";if(e.includes("T")){let l=new Date(e);if(!isNaN(l.getTime()))return"".concat(String(l.getHours()).padStart(2,"0"),":").concat(String(l.getMinutes()).padStart(2,"0"))}return/^\d{2}:\d{2}/.test(e)?e.substring(0,5):e})(l),onChange:e=>s(e.target.value||void 0),placeholder:a||"Select time",className:"w-full"})]})},eh=(e,l,s,a)=>{var n,r,i,o;if("null"===l||"nnull"===l)return null;if(!e)return(0,t.jsx)(ee.I,{placeholder:"Enter value",value:s||"",onChange:e=>a(e.target.value)});if(e.relType)return(0,t.jsxs)(w.Ph,{value:s||"",onValueChange:a,children:[(0,t.jsx)(w.i4,{className:"w-full",children:(0,t.jsx)(w.ki,{placeholder:"Select value"})}),(0,t.jsx)(w.Bw,{})]});if(null===(n=e.type)||void 0===n?void 0:n.startsWith("Array_"))return(0,t.jsx)(ee.I,{placeholder:"Enter values (comma-separated)",value:Array.isArray(s)?s.join(", "):s||"",onChange:e=>{let l=e.target.value.split(",").map(e=>e.trim()).filter(Boolean);a(l.length>0?l:void 0)}});switch(e.type){case"Number":case"Integer":case"Float":case"Decimal":case"BigInt":if("between"===l)return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ee.I,{type:"number",className:"w-24",value:null!==(r=null==s?void 0:s[0])&&void 0!==r?r:"",onChange:e=>a([e.target.value?Number(e.target.value):void 0,null==s?void 0:s[1]]),placeholder:"Min"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"to"}),(0,t.jsx)(ee.I,{type:"number",className:"w-24",value:null!==(i=null==s?void 0:s[1])&&void 0!==i?i:"",onChange:e=>a([null==s?void 0:s[0],e.target.value?Number(e.target.value):void 0]),placeholder:"Max"})]});return(0,t.jsx)(ee.I,{type:"number",value:null!=s?s:"",onChange:e=>a(e.target.value?Number(e.target.value):void 0),className:"w-full"});case"Boolean":return(0,t.jsx)(el.r,{checked:!0===s,onCheckedChange:a});case"Date":if("between"===l)return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ed,{value:(null==s?void 0:s[0])?new Date(s[0]):void 0,onChange:e=>a([null==e?void 0:e.toISOString(),null==s?void 0:s[1]]),placeholder:"From"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"to"}),(0,t.jsx)(ed,{value:(null==s?void 0:s[1])?new Date(s[1]):void 0,onChange:e=>a([null==s?void 0:s[0],null==e?void 0:e.toISOString()]),placeholder:"To"})]});return(0,t.jsx)(ed,{value:s?new Date(s):void 0,onChange:e=>a(null==e?void 0:e.toISOString())});case"DateTime":case"DateTime_NO_TZ":if("between"===l)return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(eu,{value:(null==s?void 0:s[0])?new Date(s[0]):void 0,onChange:e=>a([null==e?void 0:e.toISOString(),null==s?void 0:s[1]]),placeholder:"From"}),(0,t.jsx)("span",{className:"text-muted-foreground text-center",children:"to"}),(0,t.jsx)(eu,{value:(null==s?void 0:s[1])?new Date(s[1]):void 0,onChange:e=>a([null==s?void 0:s[0],null==e?void 0:e.toISOString()]),placeholder:"To"})]});return(0,t.jsx)(eu,{value:s?new Date(s):void 0,onChange:e=>a(null==e?void 0:e.toISOString())});case"Time":case"Time_NO_TZ":if("between"===l)return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(em,{value:null==s?void 0:s[0],onChange:e=>a([e,null==s?void 0:s[1]]),placeholder:"From"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"to"}),(0,t.jsx)(em,{value:null==s?void 0:s[1],onChange:e=>a([null==s?void 0:s[0],e]),placeholder:"To"})]});return(0,t.jsx)(em,{value:s,onChange:a});case"Enum":case"ENUM":return(0,t.jsxs)(w.Ph,{value:s||"",onValueChange:a,children:[(0,t.jsx)(w.i4,{className:"w-full",children:(0,t.jsx)(w.ki,{placeholder:"Select value"})}),(0,t.jsx)(w.Bw,{children:null===(o=e.values)||void 0===o?void 0:o.map(e=>(0,t.jsx)(w.Ql,{value:e,children:e},e))})]});case"Point":case"Polygon":case"LineString":return(0,t.jsx)(H.g,{placeholder:"Enter GeoJSON",value:"object"==typeof s?JSON.stringify(s):s||"",onChange:e=>a(e.target.value)});default:return(0,t.jsx)(ee.I,{placeholder:"Enter value",value:s||"",onChange:e=>a(e.target.value)})}},ex=e=>e&&"object"==typeof e&&"field"in e&&"operator"in e,ep=e=>{let{fields:l,value:s,onChange:n}=e,{getFieldsByCollection:r}=(0,d.I_)(),[i,o]=(0,a.useState)(new Set),[c,u]=(0,a.useState)(!1),m=(0,a.useCallback)(function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;return 0===s?[]:e.map(e=>{let t=l?"".concat(l,".").concat(e.name):e.name,a={name:e.name,path:t,label:e.label||e.name,type:e.type,relType:e.relType,target:e.target};if(e.relType&&e.target){let l=r(e.target);if(l){let e=Object.entries(l).map(e=>{let[l,s]=e;return{name:l,...s,label:l.replace(/_/g," ").replace(/([A-Z])/g," $1").trim()}});a.children=m(e,t,s-1)}}return a})},[r]),h=(0,a.useMemo)(()=>m(l),[l,m]),x=(e,l)=>{l.stopPropagation();let s=new Set(i);s.has(e)?s.delete(e):s.add(e),o(s)},f=e=>{n(e),u(!1)},g=function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=e.children&&e.children.length>0,n=i.has(e.path),r=s===e.path;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1 py-1.5 px-2 cursor-pointer hover:bg-accent rounded-sm ".concat(r?"bg-accent":""),style:{paddingLeft:"".concat(16*l+8,"px")},onClick:()=>f(e.path),children:[a?(0,t.jsx)("button",{type:"button",onClick:l=>x(e.path,l),className:"p-0.5 hover:bg-muted rounded",children:n?(0,t.jsx)(V.Z,{className:"h-3 w-3"}):(0,t.jsx)(U.Z,{className:"h-3 w-3"})}):(0,t.jsx)("span",{className:"w-4"}),(0,t.jsxs)("span",{className:"text-sm truncate flex-1",children:[e.label,e.relType&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground ml-1",children:["(",e.relType,")"]})]})]}),a&&n&&(0,t.jsx)("div",{children:e.children.map(e=>g(e,l+1))})]},e.path)};return(0,t.jsxs)(Y.J2,{open:c,onOpenChange:u,children:[(0,t.jsx)(Y.xo,{asChild:!0,children:(0,t.jsxs)(p.z,{variant:"outline",role:"combobox","aria-expanded":c,className:"w-full sm:w-[180px] justify-between text-left font-normal",children:[(0,t.jsx)("span",{className:"truncate",children:s?s.split(".").join(" → "):"Select field"}),(0,t.jsx)(V.Z,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(Y.yk,{className:"w-[280px] p-1",align:"start",onWheel:e=>{e.stopPropagation()},children:(0,t.jsx)(X.x,{className:"h-[300px]",children:h.map(e=>g(e))})})]})},ef=e=>{let{fields:l,onApply:s,initialFilters:n=[],collectionName:r}=e,{getFieldsByCollection:i}=(0,d.I_)(),[o,c]=(0,a.useState)(r),[u,h]=(0,a.useState)("builder"),[x,f]=(0,a.useState)("{}"),[v,j]=(0,a.useState)(""),[y,N]=(0,a.useState)({logic:"and",conditions:[{field:"",operator:"",value:void 0}]});(0,a.useEffect)(()=>{r&&r!==o&&(N({logic:"and",conditions:[{field:"",operator:"",value:void 0}]}),c(r))},[r,o]);let b=(0,a.useCallback)(e=>{if(!e)return null;if(e.includes(".")){let s=e.split("."),t=l,a=null;for(let e=0;e<s.length;e++){let l=s[e];if(!(a=t.find(e=>e.name===l)))return null;if(a.relType&&a.target&&e<s.length-1){let e=i(a.target);if(!e)return null;t=Object.entries(e).map(e=>{let[l,s]=e;return{name:l,...s}})}}return a}return l.find(l=>l.name===e)},[l,i]),C=(0,a.useCallback)(e=>e&&0!==e.length?1===e.length&&"operator"in e[0]&&("and"===e[0].operator||"or"===e[0].operator)&&Array.isArray(e[0].value)?{logic:e[0].operator,conditions:e[0].value.map(e=>"field"in e?{field:e.field,operator:e.operator,value:e.value}:"operator"in e&&("and"===e.operator||"or"===e.operator)&&Array.isArray(e.value)?{logic:e.operator,conditions:e.value.map(e=>"field"in e?{field:e.field,operator:e.operator,value:e.value}:"operator"in e&&("and"===e.operator||"or"===e.operator)&&Array.isArray(e.value)?C([e]):{field:"",operator:"",value:void 0})}:{field:"",operator:"",value:void 0})}:{logic:"and",conditions:e.map(e=>"field"in e?{field:e.field,operator:e.operator,value:e.value}:{field:"",operator:"",value:void 0})}:{logic:"and",conditions:[{field:"",operator:"",value:void 0}]},[]);(0,a.useEffect)(()=>{n.length>0?N(C(n)):N({logic:"and",conditions:[{field:"",operator:"",value:void 0}]})},[n,C]);let S=(0,a.useCallback)(e=>{if(!e||!e.conditions||0===e.conditions.length)return[];let l=e.conditions.filter(e=>ex(e)?e.field&&e.operator&&("null"===e.operator||"nnull"===e.operator||void 0!==e.value):S(e).length>0);if(0===l.length)return[];if(1===l.length&&ex(l[0])){let e=l[0],s=b(e.field);return[{field:e.field,operator:e.operator,value:ec(e.value,e.operator,s)}]}return[{operator:e.logic,value:l.map(e=>{if(ex(e)){let l=b(e.field);return{field:e.field,operator:e.operator,value:ec(e.value,e.operator,l)}}{let l=S(e);return 1===l.length?l[0]:{operator:"and",value:[]}}})}]},[b]);(0,a.useEffect)(()=>{if("json"===u){let e=S(y);f(JSON.stringify((0,m.gm)(e),null,2)),j("")}},[y,u,S]);let T=e=>{f(e);try{JSON.parse(e),j("")}catch(e){j("Invalid JSON format")}},k=()=>{try{let e=JSON.parse(x),l=(0,m.LR)(e);j(""),s(l)}catch(e){j("Invalid JSON format")}},D=e=>JSON.parse(JSON.stringify(e)),A=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],l=D(y),s=l;for(let l=0;l<e.length;l++){let t=e[l];if(ex(s.conditions[t])){console.error("Invalid path: expected a group but found a condition");return}s=s.conditions[t]}s.conditions.push({field:"",operator:"",value:void 0}),N(l)},_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],l=D(y),s=l;for(let l=0;l<e.length;l++){let t=e[l];if(ex(s.conditions[t])){console.error("Invalid path: expected a group but found a condition");return}s=s.conditions[t]}s.conditions.push({logic:"and",conditions:[{field:"",operator:"",value:void 0}]}),N(l)},E=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],l=arguments.length>1?arguments[1]:void 0,s=D(y),t=s;for(let l=0;l<e.length;l++){let s=e[l];if(ex(t.conditions[s])){console.error("Invalid path: expected a group but found a condition");return}t=t.conditions[s]}if(t.conditions.splice(l,1),0===t.conditions.length){if(0===e.length)t.conditions.push({field:"",operator:"",value:void 0});else{let l=s;for(let s=0;s<e.length-1;s++){let t=e[s];ex(l.conditions[t])||(l=l.conditions[t])}l.conditions.splice(e[e.length-1],1),0===l.conditions.length&&l.conditions.push({field:"",operator:"",value:void 0})}}N(s)},O=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(0===e.length)return;let l=D(y),s=l;for(let l=0;l<e.length-1;l++){let t=e[l];if(ex(s.conditions[t])){console.error("Invalid path: expected a group but found a condition");return}s=s.conditions[t]}s.conditions.splice(e[e.length-1],1),0===s.conditions.length&&s.conditions.push({field:"",operator:"",value:void 0}),N(l)},F=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],l=arguments.length>1?arguments[1]:void 0,s=D(y),t=s;for(let l=0;l<e.length;l++){let s=e[l];if(ex(t.conditions[s])){console.error("Invalid path: expected a group but found a condition");return}t=t.conditions[s]}t.logic=l,N(s)},Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],l=arguments.length>1?arguments[1]:void 0,s=arguments.length>2?arguments[2]:void 0,t=D(y),a=t;for(let l=0;l<e.length;l++){let s=e[l];if(ex(a.conditions[s])){console.error("Invalid path: expected a group but found a condition");return}a=a.conditions[s]}let n=a.conditions[l];ex(n)&&(n.field=s,n.operator="",n.value=void 0),N(t)},z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],l=arguments.length>1?arguments[1]:void 0,s=arguments.length>2?arguments[2]:void 0,t=D(y),a=t;for(let l=0;l<e.length;l++){let s=e[l];if(ex(a.conditions[s])){console.error("Invalid path: expected a group but found a condition");return}a=a.conditions[s]}let n=a.conditions[l];ex(n)&&(n.operator=s,"null"===s||"nnull"===s||"true"===s||"false"===s?n.value=!0:n.value=void 0),N(t)},M=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],l=arguments.length>1?arguments[1]:void 0,s=arguments.length>2?arguments[2]:void 0,t=D(y),a=t;for(let l=0;l<e.length;l++){let s=e[l];if(ex(a.conditions[s])){console.error("Invalid path: expected a group but found a condition");return}a=a.conditions[s]}let n=a.conditions[l];ex(n)&&(n.value=s),N(t)},P=function(e,s){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=b(e.field),i=n?eo(n):[];return(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2 mb-2 p-2 sm:p-0 bg-muted/30 sm:bg-transparent rounded-lg",children:[(0,t.jsx)("div",{className:"relative w-full sm:w-auto",children:(0,t.jsx)(ep,{fields:l,value:e.field||"",onChange:e=>Z(a,s,e),collectionName:r})}),(0,t.jsxs)(w.Ph,{value:e.operator||"",onValueChange:e=>z(a,s,e),disabled:!e.field,children:[(0,t.jsx)(w.i4,{className:"w-full sm:w-[180px]",children:(0,t.jsx)(w.ki,{placeholder:"Select operator"})}),(0,t.jsx)(w.Bw,{children:i.map(e=>(0,t.jsx)(w.Ql,{value:e.value,children:e.label},e.value))})]}),e.field&&e.operator&&"null"!==e.operator&&"nnull"!==e.operator&&(0,t.jsx)("div",{className:"w-full sm:w-auto sm:min-w-[180px]",children:eh(n,e.operator,e.value,e=>M(a,s,e))}),(0,t.jsx)(p.z,{type:"button",variant:"ghost",size:"icon",onClick:()=>E(a,s),className:"text-muted-foreground hover:text-destructive self-end sm:self-auto",children:(0,t.jsx)(J.Z,{className:"h-4 w-4"})})]},"condition-".concat(a.join("-"),"-").concat(s))},B=function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=0===l.length;return(0,t.jsxs)(g.Zb,{className:"".concat(s?"":"ml-4 border-l-2 border-l-primary/30"),children:[(0,t.jsx)(g.Ol,{className:"py-3 px-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(g.ll,{className:"text-sm font-medium",children:s?"Filter Conditions":"Nested Group"}),(0,t.jsxs)(w.Ph,{value:e.logic,onValueChange:e=>F(l,e),children:[(0,t.jsx)(w.i4,{className:"w-[80px] h-8",children:(0,t.jsx)(w.ki,{})}),(0,t.jsxs)(w.Bw,{children:[(0,t.jsx)(w.Ql,{value:"and",children:"AND"}),(0,t.jsx)(w.Ql,{value:"or",children:"OR"})]})]}),!s&&(0,t.jsx)(p.z,{type:"button",variant:"ghost",size:"icon",onClick:()=>O(l),className:"text-destructive hover:text-destructive",children:(0,t.jsx)(L.Z,{className:"h-4 w-4"})})]})}),(0,t.jsxs)(g.aY,{className:"py-2 px-4",children:[e.conditions.map((e,s)=>ex(e)?P(e,s,l):B(e,[...l,s])),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[(0,t.jsxs)(p.z,{type:"button",variant:"outline",size:"sm",onClick:()=>A(l),children:[(0,t.jsx)(I.Z,{className:"h-4 w-4 mr-1"}),"Add Condition"]}),(0,t.jsxs)(p.z,{type:"button",variant:"outline",size:"sm",onClick:()=>_(l),children:[(0,t.jsx)(q.Z,{className:"h-4 w-4 mr-1"}),"Add Nested Group"]})]})]})]},"group-".concat(l.join("-")))};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)(G.mQ,{value:u,onValueChange:e=>{if("json"===e&&"builder"===u){let e=S(y);f(JSON.stringify((0,m.gm)(e),null,2)),j("")}else if("builder"===e&&"json"===u)try{let e=JSON.parse(x),l=(0,m.LR)(e),s=C(l);N(s),j("")}catch(e){}h(e)},children:[(0,t.jsxs)(G.dr,{className:"grid w-full grid-cols-2 max-w-[300px]",children:[(0,t.jsxs)(G.SP,{value:"builder",className:"flex items-center gap-2",children:[(0,t.jsx)(K.Z,{className:"h-4 w-4"}),"Builder"]}),(0,t.jsxs)(G.SP,{value:"json",className:"flex items-center gap-2",children:[(0,t.jsx)(W.Z,{className:"h-4 w-4"}),"JSON"]})]}),(0,t.jsx)(G.nU,{value:"builder",className:"mt-4",children:B(y)}),(0,t.jsx)(G.nU,{value:"json",className:"mt-4",children:(0,t.jsxs)(g.Zb,{children:[(0,t.jsx)(g.Ol,{className:"py-3 px-4",children:(0,t.jsx)(g.ll,{className:"text-sm font-medium",children:"JSON Filter Editor (Baasix Format)"})}),(0,t.jsxs)(g.aY,{className:"py-2 px-4",children:[(0,t.jsx)(H.g,{value:x,onChange:e=>T(e.target.value),placeholder:'{"fieldName": {"eq": "value"}}',className:"font-mono text-sm min-h-[300px]"}),v&&(0,t.jsx)("p",{className:"text-sm text-destructive mt-2",children:v}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-2",children:["Edit filters in Baasix format. Example: ",'{"status": {"eq": "active"}, "AND": [{"price": {"gte": 10}}]}']})]})]})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(p.z,{type:"button",onClick:()=>{"json"===u?k():s(S(y))},children:"Apply Filters"}),(0,t.jsx)(p.z,{type:"button",variant:"outline",onClick:()=>{N({logic:"and",conditions:[{field:"",operator:"",value:void 0}]}),f("{}"),j(""),s([])},children:"Reset"})]})]})},eg=e=>{let{visible:l,onClose:s,formFields:a,onApply:n,initialFilters:r,collectionName:i}=e;return(0,t.jsx)(y.yo,{open:l,onOpenChange:e=>!e&&s(),children:(0,t.jsxs)(y.ue,{className:"w-full sm:w-[600px] sm:max-w-[600px] md:w-[700px] md:max-w-[700px] lg:w-[800px] lg:max-w-[800px] overflow-y-auto",side:"right",children:[(0,t.jsx)(y.Tu,{children:(0,t.jsx)(y.bC,{children:"Advanced Filters"})}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(ef,{fields:a,onApply:e=>{n(e),s()},initialFilters:r,collectionName:i})})]})})};var ev=s(75060);let ej=e=>{let{nodes:l,selectedColumns:s,onSelectionChange:a,level:n=0,expandedNodes:r,onToggleExpand:i}=e,o=e=>e.children&&0!==e.children.length?e.children.flatMap(o):e.disabled?[]:[e.value],c=e=>{if(!e.disabled){if(e.children&&e.children.length>0){let l=o(e);l.every(e=>s.includes(e))?a(s.filter(e=>!l.includes(e))):a(Array.from(new Set([...s,...l])))}else s.includes(e.value)?a(s.filter(l=>l!==e.value)):a([...s,e.value])}},d=e=>{let l=e.split(".");return l[l.length-1].replace(/_/g," ").replace(/([A-Z])/g," $1").trim()};return(0,t.jsx)("div",{className:"space-y-0.5 ".concat(n>0?"ml-4 pl-2 border-l border-muted":""),children:l.map(e=>{let l=e.children&&e.children.length>0,u=r.has(e.key),m=o(e),h=l?m.length>0&&m.every(e=>s.includes(e)):s.includes(e.value),x=l&&m.some(e=>s.includes(e))&&!m.every(e=>s.includes(e));return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1 py-1 hover:bg-muted/50 rounded px-1",children:[l&&(0,t.jsx)("button",{type:"button",onClick:()=>i(e.key),className:"p-0.5 hover:bg-muted rounded",children:u?(0,t.jsx)(V.Z,{className:"h-3.5 w-3.5"}):(0,t.jsx)(U.Z,{className:"h-3.5 w-3.5"})}),!l&&(0,t.jsx)("span",{className:"w-4"}),(0,t.jsx)(C.X,{id:"export-".concat(e.key),checked:h,disabled:e.disabled&&!l,onCheckedChange:()=>c(e),className:(0,en.cn)(x&&"data-[state=unchecked]:bg-primary/30")}),(0,t.jsxs)(ev._,{htmlFor:"export-".concat(e.key),className:(0,en.cn)("text-sm cursor-pointer flex-1",e.disabled&&!l&&"text-muted-foreground"),children:[d(e.title),l&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground ml-1",children:"(relation)"})]})]}),l&&u&&(0,t.jsx)(ej,{nodes:e.children,selectedColumns:s,onSelectionChange:a,level:n+1,expandedNodes:r,onToggleExpand:i})]},e.key)})})},ey=e=>{let{visible:l,onClose:s,exportColumns:n,onExportColumnsChange:r,exportLimit:i,onExportLimitChange:o,exportPage:c,onExportPageChange:d,isExporting:u,onExport:m,columnTreeData:h}=e,[f,v]=(0,a.useState)(new Set),[j,N]=(0,a.useState)("tree");return(0,t.jsx)(y.yo,{open:l,onOpenChange:e=>!e&&s(),children:(0,t.jsxs)(y.ue,{className:"w-[600px] sm:max-w-[600px] overflow-y-auto flex flex-col",side:"right",children:[(0,t.jsx)(y.Tu,{children:(0,t.jsx)(y.bC,{children:"Export Data"})}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ev._,{className:"text-base font-semibold",children:"Select Columns to Export:"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Choose which columns to include in the export. Expand relational fields to access nested columns."}),(0,t.jsxs)(G.mQ,{value:j,onValueChange:e=>N(e),children:[(0,t.jsxs)(G.dr,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(G.SP,{value:"tree",children:"Tree Selection"}),(0,t.jsx)(G.SP,{value:"json",children:"JSON"})]}),(0,t.jsx)(G.nU,{value:"tree",className:"mt-2",children:(0,t.jsx)(g.Zb,{className:"max-h-[300px] overflow-y-auto",children:(0,t.jsx)(g.aY,{className:"p-3",children:h.length>0?(0,t.jsx)(ej,{nodes:h,selectedColumns:n,onSelectionChange:r,expandedNodes:f,onToggleExpand:e=>{v(l=>{let s=new Set(l);return s.has(e)?s.delete(e):s.add(e),s})}}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground py-2",children:"No columns available"})})})}),(0,t.jsxs)(G.nU,{value:"json",className:"mt-2",children:[(0,t.jsx)(x.mq,{value:n,onChange:e=>{Array.isArray(e)&&e.every(e=>"string"==typeof e)?r(e):null===e&&r([])},placeholder:'["id", "name", "user.email"]'}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:'Enter column names as a JSON array. Use dot notation for nested fields (e.g., "user.name").'})]})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ev._,{className:"text-base font-semibold",children:"Export Limits:"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ev._,{htmlFor:"exportLimit",children:"Number of Records"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ee.I,{id:"exportLimit",type:"number",value:-1===i?"":i,onChange:e=>{let l=e.target.value;o(""===l?-1:parseInt(l)||0),(""===l||-1===parseInt(l))&&d(1)},placeholder:"Enter number of records",className:"flex-1"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(C.X,{id:"allRecords",checked:-1===i,onCheckedChange:e=>{e&&(o(-1),d(1))}}),(0,t.jsx)(ev._,{htmlFor:"allRecords",className:"text-sm",children:"All Records"})]})]})]}),-1!==i&&i>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ev._,{htmlFor:"exportPage",children:"Page Number"}),(0,t.jsx)(ee.I,{id:"exportPage",type:"number",min:1,value:c,onChange:e=>d(parseInt(e.target.value)||1),placeholder:"Enter page number"}),(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Records ",(c-1)*i+1," to ",c*i," will be exported"]})]})]})]}),(0,t.jsx)(g.Zb,{children:(0,t.jsxs)(g.aY,{className:"p-4",children:[(0,t.jsx)(ev._,{className:"text-base font-semibold",children:"Export Summary:"}),(0,t.jsxs)("div",{className:"mt-2 space-y-1 text-sm",children:[(0,t.jsxs)("p",{children:["• Columns: ",n.length," selected"]}),(0,t.jsxs)("p",{children:["• Records: ",-1===i?"All records":"".concat(i," records from page ").concat(c)]}),(0,t.jsx)("p",{children:"• Format: CSV"})]})]})})]}),(0,t.jsxs)(y.FF,{className:"pt-4 border-t",children:[(0,t.jsx)(p.z,{variant:"outline",onClick:s,children:"Cancel"}),(0,t.jsx)(p.z,{onClick:m,disabled:0===n.length||u,children:u?"Exporting...":"Export"})]})]})})};var eN=s(48736),eb=s(49322),ew=s(32489),eC=s(14438),eS=s(95937),eT=s(81853);let ek=e=>{var l,s,n,i,o;let{visible:c,onClose:u,selectedCollection:m,onImportComplete:h}=e,[x,f]=(0,a.useState)("csv"),[v,j]=(0,a.useState)([]),[N,b]=(0,a.useState)(void 0),[C,S]=(0,a.useState)(!1),T=(0,r.Ji)(),{mutate:k,isLoading:D}=(0,r.uC)(),{isMultiTenant:A}=(0,eT.PY)(),{getFieldsByCollection:I}=(0,d.I_)(),E=(0,a.useMemo)(()=>{let e=I(m);return!!e&&"tenant_Id"in e},[m,I]),O=A&&E,{data:F,isLoading:Z}=(0,r.sm)({resource:"baasix_Tenant",queryOptions:{enabled:A&&E}}),z=(0,a.useCallback)(e=>{f(e),j([])},[]),M=(0,a.useCallback)(e=>("csv"===x?"text/csv"===e.type||e.name.toLowerCase().endsWith(".csv"):"application/json"===e.type||e.name.toLowerCase().endsWith(".json"))?e.size/1024/1024<50||(eC.Am.error("File must be smaller than 50MB"),!1):(eC.Am.error("Please upload a valid ".concat(x.toUpperCase()," file")),!1),[x]),P=(0,a.useCallback)(e=>{if(!e||0===e.length)return;let l=e[0];M(l)&&j([l])},[M]),L=(0,a.useCallback)(e=>{e.preventDefault(),S(!1),P(e.dataTransfer.files)},[P]),B=(0,a.useCallback)(e=>{e.preventDefault(),S(!0)},[]),U=(0,a.useCallback)(e=>{e.preventDefault(),S(!1)},[]),R=(0,a.useCallback)(()=>{if(0===v.length){eC.Am.error("Please select a file to import");return}if(O&&!N){eC.Am.error("Please select a tenant for this tenant-enabled collection");return}let e=v[0],l=new FormData;"csv"===x?l.append("csvFile",e):l.append("jsonFile",e),N&&l.append("tenant",N);let s="csv"===x?"items/".concat(m,"/import-csv"):"items/".concat(m,"/import-json");k({url:"".concat(T,"/").concat(s),method:"post",values:l},{onSuccess:e=>{var l;eC.Am.success("Successfully imported ".concat((null==e?void 0:null===(l=e.results)||void 0===l?void 0:l.imported)||0," items")),h(),u(),j([])},onError:e=>{var l,s,t,a,n,r,i,o,c;console.error("Import error:",e);let d="Import failed";if((null==e?void 0:null===(t=e.response)||void 0===t?void 0:null===(s=t.data)||void 0===s?void 0:null===(l=s.error)||void 0===l?void 0:l.message)?d=e.response.data.error.message:(null==e?void 0:e.message)&&(d=e.message),(null==e?void 0:null===(c=e.response)||void 0===c?void 0:null===(o=c.data)||void 0===o?void 0:null===(i=o.error)||void 0===i?void 0:null===(r=i.details)||void 0===r?void 0:null===(n=r.results)||void 0===n?void 0:null===(a=n.errors)||void 0===a?void 0:a.length)>0){let l=e.response.data.error.details.results.errors.length;d+=". ".concat(l," rows had errors.")}eC.Am.error(d)}})},[v,x,m,h,u,T,k,O,N]),V=(0,a.useCallback)(()=>{j([])},[]),J=(0,a.useCallback)(()=>"csv"===x?{title:"CSV Example",content:'name,email,age,tags,metadata\n"John Doe","john@example.com",30,"[""admin"", ""user""]","{""department"": ""IT""}"\n"Jane Smith","jane@example.com",25,"[""user""]","{""department"": ""HR""}"',description:"CSV files should have headers in the first row. JSON fields should be properly escaped strings."}:{title:"JSON Example",content:'[\n {\n "name": "John Doe",\n "email": "john@example.com", \n "age": 30,\n "tags": ["admin", "user"],\n "metadata": {"department": "IT"}\n },\n {\n "name": "Jane Smith",\n "email": "jane@example.com",\n "age": 25, \n "tags": ["user"],\n "metadata": {"department": "HR"}\n }\n]',description:"JSON files should contain an array of objects. Each object represents a record to import."},[x])();return(0,t.jsx)(y.yo,{open:c,onOpenChange:e=>!e&&u(),children:(0,t.jsxs)(y.ue,{className:"w-[700px] sm:max-w-[700px] overflow-y-auto flex flex-col",side:"right",children:[(0,t.jsx)(y.Tu,{children:(0,t.jsx)(y.bC,{children:"Import Data"})}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ev._,{className:"text-base font-semibold",children:"Select Import Format:"}),(0,t.jsx)(G.mQ,{value:x,onValueChange:z,children:(0,t.jsxs)(G.dr,{className:"grid w-full grid-cols-2",children:[(0,t.jsxs)(G.SP,{value:"csv",className:"flex items-center gap-2",children:[(0,t.jsx)(eN.Z,{className:"h-4 w-4"}),"CSV File"]}),(0,t.jsxs)(G.SP,{value:"json",className:"flex items-center gap-2",children:[(0,t.jsx)(W.Z,{className:"h-4 w-4"}),"JSON File"]})]})})]}),A&&E&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(ev._,{className:"text-base font-semibold",children:["Select Tenant",O?" (Required)":" (Optional)",":"]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:O?"This collection is tenant-enabled. Please select a tenant to import data into.":"Leave empty to import into your current tenant context. Select a specific tenant to import data into that tenant."}),(0,t.jsxs)(w.Ph,{value:N||"",onValueChange:e=>b(e||void 0),children:[(0,t.jsx)(w.i4,{className:O&&!N?"border-destructive":"",children:(0,t.jsx)(w.ki,{placeholder:Z?"Loading...":O?"Select tenant (required)":"Select tenant (optional)"})}),(0,t.jsx)(w.Bw,{children:null==F?void 0:null===(l=F.data)||void 0===l?void 0:l.map(e=>(0,t.jsx)(w.Ql,{value:e.id,children:e.name},e.id))})]})]}),(0,t.jsxs)(eS.bZ,{children:[(0,t.jsx)(eb.Z,{className:"h-4 w-4"}),(0,t.jsx)(eS.Cd,{children:"Important Notes"}),(0,t.jsx)(eS.X,{children:(0,t.jsxs)("ul",{className:"list-disc list-inside mt-2 space-y-1 text-sm",children:[(0,t.jsx)("li",{children:"The import will create new records in the selected collection"}),(0,t.jsx)("li",{children:"If any record fails validation, the entire import will be rolled back"}),(0,t.jsx)("li",{children:"JSON fields should be properly formatted (arrays and objects)"}),(0,t.jsx)("li",{children:"Relational data can be created by providing nested objects"}),(0,t.jsx)("li",{children:"Maximum file size: 50MB"})]})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(ev._,{className:"text-base font-semibold",children:["Upload ",x.toUpperCase()," File:"]}),0===v.length?(0,t.jsxs)("div",{className:"border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-colors ".concat(C?"border-primary bg-primary/5":"border-muted-foreground/25 hover:border-primary/50"),onDrop:L,onDragOver:B,onDragLeave:U,onClick:()=>{let e=document.createElement("input");e.type="file",e.accept="csv"===x?".csv,text/csv":".json,application/json",e.onchange=e=>{P(e.target.files)},e.click()},children:[(0,t.jsx)(_.Z,{className:"h-10 w-10 mx-auto text-muted-foreground mb-4"}),(0,t.jsxs)("p",{className:"text-sm font-medium",children:["Click or drag ",x.toUpperCase()," file to this area to upload"]}),(0,t.jsxs)("p",{className:"text-sm text-muted-foreground mt-1",children:["Support for single ",x.toUpperCase()," file upload"]})]}):(0,t.jsx)(g.Zb,{children:(0,t.jsxs)(g.aY,{className:"p-4 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:["csv"===x?(0,t.jsx)(eN.Z,{className:"h-8 w-8 text-green-600"}):(0,t.jsx)(W.Z,{className:"h-8 w-8 text-blue-600"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium text-sm",children:v[0].name}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(v[0].size/1024/1024).toFixed(2)," MB"]})]})]}),(0,t.jsx)(p.z,{variant:"ghost",size:"icon",onClick:V,children:(0,t.jsx)(ew.Z,{className:"h-4 w-4"})})]})})]}),(0,t.jsx)(g.Zb,{children:(0,t.jsxs)(g.aY,{className:"p-4",children:[(0,t.jsx)("h4",{className:"font-semibold mb-2",children:J.title}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:J.description}),(0,t.jsx)("pre",{className:"bg-muted p-3 rounded text-xs overflow-x-auto max-h-[200px]",children:J.content})]})}),v.length>0&&(0,t.jsx)(g.Zb,{children:(0,t.jsxs)(g.aY,{className:"p-4",children:[(0,t.jsx)(ev._,{className:"text-base font-semibold",children:"Import Summary:"}),(0,t.jsxs)("div",{className:"mt-2 space-y-1 text-sm",children:[(0,t.jsxs)("p",{children:["• Collection: ",m]}),(0,t.jsxs)("p",{children:["• File: ",null===(s=v[0])||void 0===s?void 0:s.name]}),(0,t.jsxs)("p",{children:["• Size: ",((null===(n=v[0])||void 0===n?void 0:n.size)/1024/1024).toFixed(2)," MB"]}),(0,t.jsxs)("p",{children:["• Format: ",x.toUpperCase()]}),A&&E&&(0,t.jsxs)("p",{children:["• Tenant:"," ",N?(null==F?void 0:null===(o=F.data)||void 0===o?void 0:null===(i=o.find(e=>e.id===N))||void 0===i?void 0:i.name)||N:(0,t.jsx)("span",{className:O?"text-destructive":"",children:O?"Not selected (required)":"Current tenant context"})]})]})]})})]}),(0,t.jsxs)(y.FF,{className:"pt-4 border-t",children:[(0,t.jsx)(p.z,{variant:"outline",onClick:u,children:"Cancel"}),(0,t.jsx)(p.z,{onClick:R,disabled:0===v.length||D||O&&!N,children:D?"Importing...":"Import Data"})]})]})})};var eD=s(45675),eA=s(29501),e_=s(33245),eI=s(30401),eE=s(71488);let eO=["id","createdAt","updatedAt","deletedAt","userCreated_Id","userUpdated_Id","userDeleted_Id","userCreated","userUpdated","userDeleted"],eF=e=>{let{visible:l,onClose:s,selectedRows:n,selectedCollection:i,onSuccess:o}=e,{getFieldsByCollection:c}=(0,d.I_)(),[u,m]=(0,a.useState)([]),[h,f]=(0,a.useState)(!1),{mutate:g}=(0,r.e)(),{register:v,handleSubmit:j,setValue:y,watch:b,reset:w,formState:{errors:S}}=(0,eA.cI)({defaultValues:{}}),T=(0,a.useMemo)(()=>{let e=c(i);return e?Object.entries(e).filter(e=>{var l,s;let[t,a]=e;return!eO.includes(t)&&!a.primaryKey&&(null===(l=a.defaultValue)||void 0===l?void 0:l.type)!=="AUTOINCREMENT"&&(null===(s=a.defaultValue)||void 0===s?void 0:s.type)!=="UUIDV4"&&!a.virtual&&!a.relType}).map(e=>{let[l,s]=e;return{name:l,...s}}):[]},[i,c]);(0,a.useEffect)(()=>{l||(m([]),w({}))},[l,w]);let k=(e,l)=>{l?m(l=>[...l,e]):(m(l=>l.filter(l=>l!==e)),y(e,void 0))},D=async e=>{if(0===u.length){eC.Am.error("Please select at least one field to update");return}f(!0);let l=n.map(e=>e.id),t={};for(let l of u)void 0!==e[l]&&(t[l]=e[l]);if(0===Object.keys(t).length){eC.Am.error("Please provide values for the selected fields"),f(!1);return}try{await new Promise((e,s)=>{g({resource:i,ids:l,values:t},{onSuccess:()=>e(),onError:e=>s(e)})}),eC.Am.success("".concat(n.length," items updated successfully")),o(),s()}catch(e){console.error("Bulk update error:",e),eC.Am.error((null==e?void 0:e.message)||"Failed to update items")}finally{f(!1)}},A=e=>{var l,s;let a=e.name,n=b(a),r=(null===(l=e.type)||void 0===l?void 0:l.toLowerCase())||"string",i=!u.includes(a);if("enum"===r){let l=e.values||[];return(0,t.jsx)(x.o_,{value:n,onChange:e=>y(a,e),options:l,allowNull:!1!==e.allowNull,disabled:i,placeholder:"Select ".concat(e.name,"...")})}return"boolean"===r?(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(el.r,{checked:n||!1,onCheckedChange:e=>y(a,e),disabled:i}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:n?"True":"False"})]}):["integer","bigint","float","decimal","double","real"].includes(r)?(0,t.jsx)(ee.I,{type:"number",...v(a,{valueAsNumber:!0}),disabled:i,placeholder:"Enter ".concat(e.name,"..."),step:["float","decimal","double","real"].includes(r)?"0.01":"1"}):["json","jsonb"].includes(r)?(0,t.jsx)(x.mq,{value:n,onChange:e=>y(a,e),disabled:i}):"array"===r?(0,t.jsx)(x.OF,{value:n||[],onChange:e=>y(a,e),itemType:(null===(s=e.values)||void 0===s?void 0:s.type)||"String",disabled:i}):"text"===r?(0,t.jsx)(H.g,{...v(a),disabled:i,placeholder:"Enter ".concat(e.name,"..."),rows:3}):["date","datetime"].includes(r)?(0,t.jsx)(ee.I,{type:"date"===r?"date":"datetime-local",...v(a),disabled:i}):(0,t.jsx)(ee.I,{...v(a),disabled:i,placeholder:"Enter ".concat(e.name,"...")})};return(0,t.jsx)(N.Vq,{open:l,onOpenChange:e=>!e&&s(),children:(0,t.jsxs)(N.cZ,{className:"sm:max-w-[600px] max-h-[80vh]",children:[(0,t.jsxs)(N.fK,{children:[(0,t.jsx)(N.$N,{children:"Bulk Edit"}),(0,t.jsxs)(N.Be,{children:["Update ",n.length," selected items. Only the fields you select and fill in will be updated."]})]}),(0,t.jsxs)("form",{onSubmit:j(D),children:[(0,t.jsx)(X.x,{className:"h-[400px] pr-4",children:(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-lg",children:[(0,t.jsx)(e_.Z,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"Select the fields you want to update by checking the checkbox next to each field."})]}),0===T.length?(0,t.jsx)("div",{className:"text-center py-8 text-muted-foreground",children:"No editable fields found for this collection."}):T.map(e=>(0,t.jsx)("div",{className:"p-3 border rounded-lg transition-colors ".concat(u.includes(e.name)?"border-primary bg-primary/5":"border-border"),children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(C.X,{id:"field-".concat(e.name),checked:u.includes(e.name),onCheckedChange:l=>k(e.name,l),className:"mt-1"}),(0,t.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ev._,{htmlFor:"field-".concat(e.name),className:"font-medium cursor-pointer",children:e.name}),(0,t.jsx)(eE.pn,{children:(0,t.jsxs)(eE.u,{children:[(0,t.jsx)(eE.aJ,{asChild:!0,children:(0,t.jsxs)("span",{className:"text-xs px-2 py-0.5 bg-muted rounded text-muted-foreground",children:[e.type,e.relType&&" (".concat(e.relType,")")]})}),(0,t.jsxs)(eE._v,{children:[(0,t.jsxs)("p",{children:["Field type: ",e.type]}),e.relType&&(0,t.jsxs)("p",{children:["Relation: ",e.relType]}),!1===e.allowNull&&(0,t.jsx)("p",{children:"Required field"})]})]})})]}),(0,t.jsx)("div",{className:u.includes(e.name)?"":"opacity-50",children:A(e)})]})]})},e.name))]})}),(0,t.jsx)(N.cN,{className:"mt-4",children:(0,t.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,t.jsxs)("span",{className:"text-sm text-muted-foreground",children:[u.length," field(s) selected"]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(p.z,{type:"button",variant:"outline",onClick:s,disabled:h,children:"Cancel"}),(0,t.jsx)(p.z,{type:"submit",disabled:h||0===u.length,children:h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(z.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Updating..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eI.Z,{className:"mr-2 h-4 w-4"}),"Update ",n.length," Items"]})})]})]})})]})]})})},eZ=e=>{let{visible:l,onClose:s,selectedRows:n,selectedCollection:i,onClearSelection:o,customActions:c}=e,[d,u]=(0,a.useState)(!1),[m,h]=(0,a.useState)(!1),[x,f]=(0,a.useState)(!1),{mutate:g}=(0,r.F2)();(0,a.useEffect)(()=>{l||(u(!1),h(!1),f(!1))},[l]);let v=async()=>{f(!0);let e=n.length,l=n.map(e=>e.id);try{await new Promise((e,s)=>{g({resource:i,ids:l},{onSuccess:()=>e(),onError:e=>s(e)})}),eC.Am.success("".concat(e," items deleted successfully")),f(!1),u(!1),o(),s()}catch(e){console.error("Bulk delete error:",e),eC.Am.error((null==e?void 0:e.message)||"Failed to delete items"),f(!1)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.Vq,{open:l,onOpenChange:e=>!e&&s(),children:(0,t.jsxs)(N.cZ,{className:"sm:max-w-[500px]",children:[(0,t.jsxs)(N.fK,{children:[(0,t.jsx)(N.$N,{children:"Bulk Actions"}),(0,t.jsxs)(N.Be,{children:[n.length," items selected. Choose an action to perform on all selected items."]})]}),(0,t.jsxs)("div",{className:"space-y-3 py-4",children:[(0,t.jsxs)(p.z,{variant:"destructive",className:"w-full justify-start gap-2",onClick:()=>u(!0),children:[(0,t.jsx)(L.Z,{className:"h-4 w-4"}),"Delete Selected (",n.length,")"]}),(0,t.jsxs)(p.z,{variant:"outline",className:"w-full justify-start gap-2",onClick:()=>{h(!0)},children:[(0,t.jsx)(eD.Z,{className:"h-4 w-4"}),"Edit Selected (",n.length,")"]}),null==c?void 0:c.map((e,l)=>(0,t.jsxs)(p.z,{variant:e.variant||"outline",className:"w-full justify-start gap-2",onClick:()=>e.onClick(n),disabled:e.disabled,children:[e.icon,e.label," (",n.length,")"]},l))]}),(0,t.jsx)(N.cN,{children:(0,t.jsx)(p.z,{variant:"outline",onClick:s,children:"Cancel"})})]})}),(0,t.jsx)(N.Vq,{open:d,onOpenChange:e=>{x||e||u(!1)},children:(0,t.jsxs)(N.cZ,{children:[(0,t.jsxs)(N.fK,{children:[(0,t.jsx)(N.$N,{children:"Delete Selected Items"}),(0,t.jsxs)(N.Be,{children:["Are you sure you want to delete ",n.length," items? This action cannot be undone."]})]}),(0,t.jsxs)(N.cN,{children:[(0,t.jsx)(p.z,{type:"button",variant:"outline",onClick:()=>u(!1),disabled:x,children:"Cancel"}),(0,t.jsx)(p.z,{type:"button",variant:"destructive",onClick:v,disabled:x,children:x?"Deleting...":"Delete"})]})]})}),(0,t.jsx)(eF,{visible:m,onClose:()=>h(!1),selectedRows:n,selectedCollection:i,onSuccess:()=>{o(),s()}})]})},ez=e=>{let{nodes:l,selectedColumns:s,onSelectionChange:a,level:n=0,expandedNodes:r,onToggleExpand:i}=e,o=e=>{if(!e.disabled){if(s.includes(e.value)){let l=e.value+".";a(s.filter(s=>s!==e.value&&!s.startsWith(l)))}else a([...s,e.value])}},c=e=>e.children&&0!==e.children.length?e.children.flatMap(c):e.disabled?[]:[e.value],d=e=>{let l=e.split(".");return l[l.length-1].replace(/_/g," ").replace(/([A-Z])/g," $1").trim()};return(0,t.jsx)("div",{className:"space-y-0.5 ".concat(n>0?"ml-4 pl-2 border-l border-muted":""),children:l.map(e=>{let l=e.children&&e.children.length>0,c=r.has(e.key),u=s.includes(e.value),m=e.value+".",h=l&&s.some(e=>e.startsWith(m)),x=l&&h&&!u;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1 py-1 hover:bg-muted/50 rounded px-1",children:[l&&(0,t.jsx)("button",{type:"button",onClick:()=>i(e.key),className:"p-0.5 hover:bg-muted rounded",children:c?(0,t.jsx)(V.Z,{className:"h-3.5 w-3.5"}):(0,t.jsx)(U.Z,{className:"h-3.5 w-3.5"})}),!l&&(0,t.jsx)("span",{className:"w-4"}),(0,t.jsx)(C.X,{id:"col-".concat(e.key),checked:u,disabled:e.disabled,onCheckedChange:()=>o(e),className:(0,en.cn)(x&&"data-[state=unchecked]:bg-primary/30")}),(0,t.jsxs)(ev._,{htmlFor:"col-".concat(e.key),className:(0,en.cn)("text-sm cursor-pointer flex-1",e.disabled&&"text-muted-foreground"),children:[d(e.title),l&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground ml-1",children:"(relation)"})]})]}),l&&c&&(0,t.jsx)(ez,{nodes:e.children,selectedColumns:s,onSelectionChange:a,level:n+1,expandedNodes:r,onToggleExpand:i})]},e.key)})})},eM=e=>{let{visible:l,onClose:s,tableDensity:n,onTableDensityChange:r,visibleColumns:i,onVisibleColumnsChange:o,columnTreeData:c}=e,[d,u]=(0,a.useState)(new Set),[m,h]=(0,a.useState)("tree");return(0,t.jsx)(N.Vq,{open:l,onOpenChange:e=>!e&&s(),children:(0,t.jsxs)(N.cZ,{className:"sm:max-w-[500px] max-h-[80vh] flex flex-col",children:[(0,t.jsxs)(N.fK,{children:[(0,t.jsx)(N.$N,{children:"Column Settings"}),(0,t.jsx)(N.Be,{children:"Customize your table display preferences."})]}),(0,t.jsxs)("div",{className:"space-y-6 py-4 flex-1 overflow-y-auto",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ev._,{className:"text-sm font-semibold",children:"Table Density"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(p.z,{size:"sm",variant:"small"===n?"default":"outline",onClick:()=>r("small"),className:(0,en.cn)("small"===n&&"bg-primary text-primary-foreground"),children:"Compact"}),(0,t.jsx)(p.z,{size:"default",variant:"middle"===n?"default":"outline",onClick:()=>r("middle"),className:(0,en.cn)("middle"===n&&"bg-primary text-primary-foreground"),children:"Default"}),(0,t.jsx)(p.z,{size:"lg",variant:"large"===n?"default":"outline",onClick:()=>r("large"),className:(0,en.cn)("large"===n&&"bg-primary text-primary-foreground"),children:"Comfortable"})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ev._,{className:"text-sm font-semibold",children:"Visible Columns"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Select columns to display. Expand relational fields to access nested columns."}),(0,t.jsxs)(G.mQ,{value:m,onValueChange:e=>h(e),children:[(0,t.jsxs)(G.dr,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(G.SP,{value:"tree",children:"Tree Selection"}),(0,t.jsx)(G.SP,{value:"json",children:"JSON"})]}),(0,t.jsx)(G.nU,{value:"tree",className:"mt-2",children:(0,t.jsx)(g.Zb,{className:"max-h-[250px] overflow-y-auto",children:(0,t.jsx)(g.aY,{className:"p-3",children:c.length>0?(0,t.jsx)(ez,{nodes:c,selectedColumns:i,onSelectionChange:o,expandedNodes:d,onToggleExpand:e=>{u(l=>{let s=new Set(l);return s.has(e)?s.delete(e):s.add(e),s})}}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No columns available"})})})}),(0,t.jsxs)(G.nU,{value:"json",className:"mt-2",children:[(0,t.jsx)(x.mq,{value:i,onChange:e=>{Array.isArray(e)&&e.every(e=>"string"==typeof e)?o(e):null===e&&o([])},placeholder:'["id", "name", "user.email"]'}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Enter column names as a JSON array. Use dot notation for nested fields."})]})]})]})]}),(0,t.jsx)(N.cN,{children:(0,t.jsx)(p.z,{variant:"outline",onClick:s,children:"Close"})})]})})};var eP=s(92322),eL=s(2596),eB=s(24156);let eU=e=>{let{value:l,field:s,onSave:n,onCancel:r,isLoading:i=!1}=e,[o,c]=(0,a.useState)(l),[d,u]=(0,a.useState)(""),m=(0,a.useRef)(null),h=(0,a.useRef)(null),x=(0,a.useRef)(l);(0,a.useEffect)(()=>{m.current&&(m.current.focus(),m.current.select())},[]);let f=(0,a.useCallback)(e=>null===x.current||void 0===x.current?null!=e&&""!==e:null==e||""===e?null!==x.current&&void 0!==x.current&&""!==x.current:String(x.current)!==String(e),[]),g=(0,a.useCallback)(e=>{f(e)?n(e):r()},[f,n,r]),v=(0,a.useCallback)(e=>{"Enter"!==e.key||e.shiftKey?"Escape"===e.key?(e.preventDefault(),r()):"Tab"===e.key&&(e.preventDefault(),g(o)):(e.preventDefault(),g(o))},[o,g,r]),j=(0,a.useCallback)(e=>{var l;null!==(l=h.current)&&void 0!==l&&l.contains(e.relatedTarget)||g(o)},[o,g]);if("Boolean"===s.type||"BOOLEAN"===s.type)return(0,t.jsx)("div",{ref:h,className:"flex items-center justify-center h-full",onKeyDown:v,tabIndex:0,onBlur:j,children:i?(0,t.jsx)(z.Z,{className:"h-4 w-4 animate-spin"}):(0,t.jsx)(C.X,{checked:!!o,onCheckedChange:e=>{c(e),!!x.current!=!!e?n(e):r()},autoFocus:!0})});if(("Enum"===s.type||"ENUM"===s.type)&&s.values&&s.values.length>0){let e=s.values||[],l=d.trim()?e.filter(e=>e.toLowerCase().includes(d.toLowerCase())):e,a=d.trim()&&!e.some(e=>e.toLowerCase()===d.trim().toLowerCase()),m=e=>{c(e),u(""),String(x.current||"")!==String(e||"")?n(e):r()},f=()=>{if(d.trim()){let e=d.trim();c(e),u(""),String(x.current||"")!==String(e||"")?n(e):r()}};return(0,t.jsx)("div",{ref:h,className:"w-full",onKeyDown:v,children:i?(0,t.jsx)("div",{className:"flex items-center justify-center h-8",children:(0,t.jsx)(z.Z,{className:"h-4 w-4 animate-spin"})}):(0,t.jsxs)(Y.J2,{open:!0,onOpenChange:e=>!e&&r(),children:[(0,t.jsx)(Y.xo,{asChild:!0,children:(0,t.jsxs)(p.z,{variant:"outline",role:"combobox",className:"h-8 w-full justify-between text-sm font-normal",children:[o||"Select...",(0,t.jsx)(eB.Z,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(Y.yk,{className:"w-[200px] p-0",align:"start",children:(0,t.jsxs)(eL.mY,{shouldFilter:!1,children:[(0,t.jsx)(eL.sZ,{placeholder:"Search or type custom...",value:d,onValueChange:u}),(0,t.jsxs)(eL.e8,{children:[(0,t.jsx)(eL.rb,{children:d.trim()?(0,t.jsxs)("button",{onClick:f,className:"flex w-full items-center gap-2 px-2 py-1.5 text-sm hover:bg-accent rounded cursor-pointer",children:[(0,t.jsx)(I.Z,{className:"h-4 w-4"}),'Add "',d.trim(),'"']}):"No options found."}),(0,t.jsxs)(eL.fu,{children:[s.allowNull&&(0,t.jsxs)(eL.di,{value:"",onSelect:()=>m(""),children:[(0,t.jsx)(eI.Z,{className:(0,en.cn)("mr-2 h-4 w-4",o?"opacity-0":"opacity-100")}),(0,t.jsx)("span",{className:"text-muted-foreground italic",children:"None"})]}),l.map(e=>(0,t.jsxs)(eL.di,{value:e,onSelect:()=>m(e),children:[(0,t.jsx)(eI.Z,{className:(0,en.cn)("mr-2 h-4 w-4",o===e?"opacity-100":"opacity-0")}),e]},e))]}),a&&l.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eL.zz,{}),(0,t.jsx)(eL.fu,{children:(0,t.jsxs)(eL.di,{value:"add-custom-".concat(d),onSelect:f,children:[(0,t.jsx)(I.Z,{className:"mr-2 h-4 w-4"}),'Add "',d.trim(),'"']})})]})]})]})})]})})}return"Number"===s.type||"Integer"===s.type||"INTEGER"===s.type||"INT"===s.type||"BigInt"===s.type||"BIGINT"===s.type||"SMALLINT"===s.type||"TINYINT"===s.type||"Float"===s.type||"FLOAT"===s.type||"Double"===s.type||"DOUBLE"===s.type||"Decimal"===s.type||"DECIMAL"===s.type?(0,t.jsxs)("div",{ref:h,className:"relative w-full",children:[i&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-background/50 z-10",children:(0,t.jsx)(z.Z,{className:"h-4 w-4 animate-spin"})}),(0,t.jsx)(ee.I,{ref:m,type:"number",value:null!=o?o:"",onChange:e=>{let l=e.target.value;c(""===l?null:Number(l))},onKeyDown:v,onBlur:j,className:"h-8 text-sm",disabled:i})]}):"Date"===s.type||"DATEONLY"===s.type?(0,t.jsxs)("div",{ref:h,className:"relative w-full",children:[i&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-background/50 z-10",children:(0,t.jsx)(z.Z,{className:"h-4 w-4 animate-spin"})}),(0,t.jsx)(ee.I,{ref:m,type:"date",value:(e=>{if(!e)return"";let l=new Date(e),s=l.getFullYear(),t=String(l.getMonth()+1).padStart(2,"0"),a=String(l.getDate()).padStart(2,"0");return"".concat(s,"-").concat(t,"-").concat(a)})(o),onChange:e=>c(e.target.value||null),onKeyDown:v,onBlur:j,className:"h-8 text-sm",disabled:i})]}):"DateTime"===s.type||"DateTime_NO_TZ"===s.type||"DATETIME"===s.type||"TIMESTAMP"===s.type?(0,t.jsxs)("div",{ref:h,className:"relative w-full",children:[i&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-background/50 z-10",children:(0,t.jsx)(z.Z,{className:"h-4 w-4 animate-spin"})}),(0,t.jsx)(ee.I,{ref:m,type:"datetime-local",value:(e=>{if(!e)return"";let l=new Date(e),s=l.getFullYear(),t=String(l.getMonth()+1).padStart(2,"0"),a=String(l.getDate()).padStart(2,"0"),n=String(l.getHours()).padStart(2,"0"),r=String(l.getMinutes()).padStart(2,"0");return"".concat(s,"-").concat(t,"-").concat(a,"T").concat(n,":").concat(r)})(o),onChange:e=>{c(e.target.value?new Date(e.target.value).toISOString():null)},onKeyDown:v,onBlur:j,className:"h-8 text-sm",disabled:i})]}):"Time"===s.type||"Time_NO_TZ"===s.type?(0,t.jsxs)("div",{ref:h,className:"relative w-full",children:[i&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-background/50 z-10",children:(0,t.jsx)(z.Z,{className:"h-4 w-4 animate-spin"})}),(0,t.jsx)(ee.I,{ref:m,type:"time",value:(e=>{if(!e)return"";if("string"==typeof e){let l=e.match(/^(\d{2}):(\d{2})/);if(l)return"".concat(l[1],":").concat(l[2]);if(e.includes("T")){let l=new Date(e),s=String(l.getHours()).padStart(2,"0"),t=String(l.getMinutes()).padStart(2,"0");return"".concat(s,":").concat(t)}}return e})(o),onChange:e=>c(e.target.value||null),onKeyDown:v,onBlur:j,className:"h-8 text-sm",disabled:i})]}):(0,t.jsxs)("div",{ref:h,className:"relative w-full",children:[i&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-background/50 z-10",children:(0,t.jsx)(z.Z,{className:"h-4 w-4 animate-spin"})}),(0,t.jsx)(ee.I,{ref:m,type:"text",value:null!=o?o:"",onChange:e=>c(e.target.value||null),onKeyDown:v,onBlur:j,className:"h-8 text-sm",disabled:i})]})},eR=["String","VARCHAR","CHAR","Number","Integer","INTEGER","INT","BigInt","BIGINT","SMALLINT","TINYINT","Float","FLOAT","Double","DOUBLE","Decimal","DECIMAL","Boolean","BOOLEAN","Date","Date_NO_TZ","DATEONLY","DateTime","DateTime_NO_TZ","DATETIME","TIMESTAMP","Time","Time_NO_TZ","Enum","ENUM","Email","URL","Phone"],eV=e=>!e.relType&&!e.primaryKey&&!["createdAt","updatedAt","deletedAt","userCreated","userUpdated","userDeleted","userCreated_Id","userUpdated_Id","userDeleted_Id"].includes(e.name)&&eR.includes(e.type);var eJ=s(59892);let eq=e=>{let{id:l,children:s,className:a,onClick:n,disabled:r=!1}=e,{attributes:i,listeners:c,setNodeRef:d,transform:u,transition:m,isDragging:h}=(0,o.nB)({id:l,disabled:r}),x={transform:eJ.ux.Transform.toString(u),transition:m,opacity:h?.5:1,zIndex:h?1e3:void 0};return r?(0,t.jsx)(v.SC,{className:a,onClick:n,children:s}):(0,t.jsxs)(v.SC,{ref:d,style:x,className:(0,en.cn)(a,h&&"bg-muted shadow-lg"),onClick:n,children:[(0,t.jsx)(v.pj,{className:"w-8 px-2 cursor-grab active:cursor-grabbing",...i,...c,onClick:e=>e.stopPropagation(),children:(0,t.jsx)(E.Z,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"})}),s]})};var eK=s(83724);let eW=e=>{let l=e.replace(/\./g," → ").replace(/_/g," ").replace(/([A-Z])/g," $1").trim();return l.charAt(0).toUpperCase()+l.slice(1)},eG=e=>{let{selectedCollection:l,schemaName:s,title:n,hideTitle:V=!1,enableSearch:J=!0,enableFilters:q=!0,enableCreate:K=!0,enableView:W=!1,enableEdit:G=!0,enableDelete:H=!0,enableExport:Y=!0,enableImport:X=!0,enableBulkSelect:Q=!0,enableColumnSettings:$=!0,enableFilePreview:ee=!1,enableInlineEdit:el=!0,headerActions:es,renderRowActions:et,quickFilters:ea,customColumnRenderers:er,defaultVisibleColumns:ei,getDisabledFields:eo,defaultMeta:ec,defaultFilters:ed,permanentFilters:eu,defaultSorters:em,onRecordClick:eh,onRefresh:ex,showSelectionColumn:ep=!1,selectionMode:ef="single",externalSelectedRows:ev,onExternalSelectionChange:ej,highlightSelectedRows:eN=!1,customBulkActions:eb}=e,[ew,eS]=(0,a.useState)(""),[eT,eD]=(0,a.useState)(!1),[eA,e_]=(0,a.useState)(!1),[eI,eE]=(0,a.useState)(!1),[eO,eF]=(0,a.useState)(!1),[ez,eL]=(0,a.useState)(!1),[eB,eR]=(0,a.useState)(null),[eJ,eG]=(0,a.useState)(1),[eH,eY]=(0,a.useState)(10),[eX,eQ]=(0,a.useState)([]),[e$,e0]=(0,a.useState)(ed||[]),e1=(0,a.useCallback)(()=>em&&em.length>0?em:[],[em]),[e2,e4]=(0,a.useState)(e1()),[e5,e3]=(0,a.useState)(!1),[e8,e7]=(0,a.useState)(null),[e6,e9]=(0,a.useState)(""),[le,ll]=(0,a.useState)(""),[ls,lt]=(0,a.useState)(!1),[la,ln]=(0,a.useState)(!1),[lr,li]=(0,a.useState)(!1),[lo,lc]=(0,a.useState)(!1),[ld,lu]=(0,a.useState)([]),[lm,lh]=(0,a.useState)(-1),[lx,lp]=(0,a.useState)(1),[lf,lg]=(0,a.useState)(!1),[lv,lj]=(0,a.useState)("middle"),[ly,lN]=(0,a.useState)(null),[lb,lw]=(0,a.useState)(null),[lC,lS]=(0,a.useState)({}),[lT,lk]=(0,a.useState)(null),[lD,lA]=(0,a.useState)(0),[l_,lI]=(0,a.useState)(0),[lE,lO]=(0,a.useState)(null),[lF,lZ]=(0,a.useState)(!1),lz=(0,r.Ji)(),lM=localStorage.getItem("token"),{getFieldsByCollection:lP,getNestedFields:lL,isSortEnabled:lB}=(0,d.I_)(),lU=lB(l),[lR,lV]=(0,a.useState)(!1),{getColumnPreferences:lJ,saveColumnPreferences:lq,getFilterPreferences:lK,saveFilterPreferences:lW,isInitialized:lG}=(0,u.Gn)(),lH=(0,a.useMemo)(()=>lP(l),[l,lP]),lY=(0,a.useMemo)(()=>{if(!l||!lH)return[];if(ei&&ei.length>0){let e=lJ(l);return e&&e.visibleColumns&&e.visibleColumns.length>0?e.visibleColumns:ei}let e=lJ(l);if(e&&e.visibleColumns&&e.visibleColumns.length>0)return e.visibleColumns;let s=["userCreated_Id","userCreated","userUpdated_Id","userUpdated","userDeleted","userDeleted_Id","createdAt","updatedAt","deletedAt"];return Object.keys(lH).filter(e=>{let l=lH[e];return!s.includes(e)&&!l.relType}).slice(0,5)},[l,lH,lJ,ei]);(0,a.useEffect)(()=>{if(l&&lG){let e=lJ(l);(null==e?void 0:e.columnWidths)?lS(e.columnWidths):lS({})}},[l,lG,lJ]),(0,a.useEffect)(()=>{if(l&&lG&&!ed){let e=lK(l);(null==e?void 0:e.filters)?e0(e.filters):e0([])}},[l,lG,ed]),(0,a.useEffect)(()=>{!lU||(null==em?void 0:em.length)||0!==e2.length||e4([{field:"sort",order:"asc"}])},[lU,em,e2.length]);let lX=(0,a.useMemo)(()=>{if(!lH||!l)return["*"];let e=["id"];return lY.forEach(l=>{if("id"!==l){if(l.includes("."))e.push(l);else{let s=lH[l];s&&(s.relType&&s.showAs?e.push(l+".*"):e.push(l))}}}),e.length>0?e:["*"]},[lH,l,lY]),lQ=(0,a.useMemo)(()=>ew?[{field:"search",operator:"contains",value:ew}]:[],[ew]),l$=(0,a.useMemo)(()=>[...eu||[],...e$,...lQ],[eu,e$,lQ]),l0=!!l&&lX.length>0&&lG,{data:l1,isLoading:l2,refetch:l4}=(0,r.sm)({resource:l,meta:{fields:lX,...ec},queryOptions:{enabled:l0},pagination:{current:eJ,pageSize:eH,mode:"server"},filters:l$,sorters:e2}),l5=(0,a.useCallback)(()=>{l4(),null==ex||ex()},[l4,ex]),l3=(null==l1?void 0:l1.data)||[],l8=(null==l1?void 0:l1.total)||0,l7=Math.ceil(l8/eH),{mutate:l6,isLoading:l9}=(0,r.R2)(),{mutate:se,isLoading:sl}=(0,r.RO)(),{mutate:ss,isLoading:st}=(0,r.PQ)(),sa=null==eB?void 0:eB.id,sn=(0,a.useMemo)(()=>{if(!lH)return["*"];let e=["*"];return Object.entries(lH).forEach(l=>{let[s,t]=l;t.relType&&e.push("".concat(s,".*"))}),e},[lH]),{data:sr,isLoading:si,isFetching:so}=(0,r.rD)({resource:l,id:sa||"",queryOptions:{enabled:!!(sa&&(eI||eO))},meta:{fields:sn}}),sc=null==sr?void 0:sr.data,sd=(0,a.useMemo)(()=>Object.entries(lH||{}).map(e=>{let[l,s]=e;return{name:l,...s,label:l.replace(/_/g," ").replace(/([A-Z])/g," $1").trim()}}),[lH]),su=(0,a.useCallback)((e,l)=>{if(!e)return"-";if("string"==typeof e||"number"==typeof e)return String(e);if(l.showAs&&Array.isArray(l.showAs)){let s=["-"," ",",","_"," and "," or "],t=[];l.showAs.forEach(l=>{if(s.includes(l))t.push(l);else{let s;if(l.includes(".")){let t=l.split("."),a=e;for(let e of t)if(null==(a=null==a?void 0:a[e]))break;s=a}else s=e[l];null!=s&&""!==s&&t.push(String(s))}});let a=t.filter((e,l)=>{let a=s.includes(e),n=l>0&&s.includes(t[l-1]),r=l===t.length-1;return!a||0!==l&&!r&&!n});if(a.length>0)return a.join("")}return e.name||e.title||e.label||e.email||e.id||JSON.stringify(e)},[]);(0,a.useMemo)(()=>lH?Object.keys(lH):[],[lH]);let sm=(0,a.useMemo)(()=>lH?lL(l):[],[lH,l,lL]);(0,a.useEffect)(()=>{l&&lH&&lu(Object.keys(lH).filter(e=>!["userCreated_Id","userCreated","userUpdated_Id","userUpdated","userDeleted","userDeleted_Id","createdAt","updatedAt","deletedAt"].includes(e)))},[l,lH]);let sh=(0,r.x5)(),sx=(0,a.useCallback)((e,l,s)=>{let t=new Blob([[l.map(e=>e.includes(",")||e.includes('"')||e.includes("\n")?'"'.concat(e.replace(/"/g,'""'),'"'):e).join(","),...e.map(e=>l.map(l=>{let s=e;for(let e of l.split("."))s=null==s?void 0:s[e];if(null==s)return"";if("object"==typeof s){let e=JSON.stringify(s);return'"'.concat(e.replace(/"/g,'""'),'"')}return"string"==typeof s&&(s.includes(",")||s.includes('"')||s.includes("\n"))?'"'.concat(s.replace(/"/g,'""'),'"'):s}).join(","))].join("\n")],{type:"text/csv;charset=utf-8;"}),a=document.createElement("a"),n=URL.createObjectURL(t);a.setAttribute("href",n),a.setAttribute("download","".concat(s,"_export_").concat(new Date().toISOString().split("T")[0],".csv")),a.style.visibility="hidden",document.body.appendChild(a),a.click(),document.body.removeChild(a)},[]),sp=(0,a.useCallback)(async()=>{lg(!0);try{let e={resource:l,meta:{fields:ld},filters:l$,dataProviderName:void 0};-1!==lm&&lm>0&&(e.pagination={current:lx,pageSize:lm,mode:"server"});let{data:s}=await sh().getList(e);sx(s,ld,l),lt(!1),eC.Am.success("Export completed successfully")}catch(e){console.error("Export error:",e),eC.Am.error("Export failed")}finally{lg(!1)}},[ld,lm,lx,l,l$,sh,sx]),sf=(0,a.useCallback)(()=>{l5()},[l5]),sg=(0,a.useMemo)(()=>new Set(["JSON","JSONB","VIRTUAL","Array_Integer","Array_String","Array_Double","Array_Decimal","Array_UUID","Array_Date","Array_DateTime","Array_Boolean","Point","Polygon","LineString"]),[]),sv=(0,a.useCallback)((e,l)=>!e||!sg.has(e)&&(null==l?void 0:l.relType)!=="M2A"&&(null==l||!l.alias),[sg]),sj=(0,a.useMemo)(()=>lH?lY.map(e=>{if(e.includes(".")){let[l,...s]=e.split("."),t=lH[l];if(t&&t.relType){let l="BelongsTo"===t.relType||"HasOne"===t.relType||"M2O"===t.relType||"O2O"===t.relType;return{key:e,title:eW(e),field:{name:e,type:"String",relType:null,isNested:!0},sortable:l,isNested:!0}}return null}let l=lH[e];if(!l)return null;let s=!("HasMany"===l.relType||"BelongsToMany"===l.relType)&&sv(l.type,l);return{key:e,title:eW(e),field:{name:e,type:l.type||"String",relType:l.relType,showAs:Array.isArray(l.showAs)?l.showAs:l.showAs?[l.showAs]:void 0,displayFormat:l.displayFormat,displayOptions:l.displayOptions,values:l.values,allowNull:l.allowNull},sortable:s,isNested:!1}}).filter(Boolean):[],[lH,lY,sv]),sy=(0,a.useCallback)(e=>{e4(l=>{let s=l.find(l=>l.field===e);return s?"asc"===s.order?[{field:e,order:"desc"}]:[]:[{field:e,order:"asc"}]})},[]),sN=(0,i.Dy)((0,i.VT)(i.we,{activationConstraint:{distance:8}}),(0,i.VT)(i.Lg,{coordinateGetter:o.is})),sb=(0,a.useCallback)(async e=>{let{active:s,over:t}=e;if(lV(!1),!t||s.id===t.id)return;let a=String(s.id),n=String(t.id),r=l3.findIndex(e=>String(e.id)===a),i=l3.findIndex(e=>String(e.id)===n);if(-1!==r&&-1!==i)try{let e=(0,m.fO)(h.G);await e(l,a,n,r<i?"after":"before"),eC.Am.success("Order updated successfully"),l5()}catch(e){eC.Am.error((null==e?void 0:e.message)||"Failed to update order")}},[l,l5,l3]),sw=(0,a.useCallback)(()=>{lV(!0)},[]),sC=(0,a.useCallback)(e=>{let l=e2.find(l=>l.field===e);return(null==l?void 0:l.order)||null},[e2]),sS=(0,a.useCallback)(async e=>{e0(e),await lW(l,{filters:e,sorters:[]}),eG(1)},[l,lW]);(0,a.useCallback)(async(e,s)=>{let t=s?[...lY,e]:lY.filter(l=>l!==e);await lq(l,{visibleColumns:t,tableDensity:lv,columnWidths:lC})},[l,lY,lq,lv,lC]);let sT=(0,a.useCallback)(async e=>{await lq(l,{visibleColumns:e,tableDensity:lv,columnWidths:lC})},[l,lq,lv,lC]),sk=(0,a.useCallback)(async e=>{lj(e),await lq(l,{visibleColumns:lY,tableDensity:e,columnWidths:lC})},[l,lY,lq,lC]),sD=(0,a.useCallback)((e,l)=>{lN(l),e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",l);let s=e.currentTarget;setTimeout(()=>{s.style.opacity="0.5"},0)},[]),sA=(0,a.useCallback)(e=>{e.currentTarget.style.opacity="1",lN(null),lw(null)},[]),s_=(0,a.useCallback)((e,l)=>{e.preventDefault(),e.dataTransfer.dropEffect="move",ly&&l!==ly&&lw(l)},[ly]),sI=(0,a.useCallback)(()=>{lw(null)},[]),sE=(0,a.useCallback)(async(e,s)=>{if(e.preventDefault(),!ly||ly===s){lN(null),lw(null);return}let t=[...lY],a=t.indexOf(ly),n=t.indexOf(s);-1!==a&&-1!==n&&(t.splice(a,1),t.splice(n,0,ly),await lq(l,{visibleColumns:t,tableDensity:lv,columnWidths:lC})),lN(null),lw(null)},[ly,lY,l,lq,lv,lC]),sO=(0,a.useCallback)((e,l)=>{e.preventDefault(),e.stopPropagation(),lk(l),lA(e.clientX),lI(lC[l]||150)},[lC]),sF=(0,a.useCallback)(e=>{if(!lT)return;let l=Math.max(80,l_+(e.clientX-lD));lS(e=>({...e,[lT]:l}))},[lT,lD,l_]),sZ=(0,a.useCallback)(async()=>{lT&&(await lq(l,{visibleColumns:lY,tableDensity:lv,columnWidths:lC}),lk(null))},[lT,l,lY,lv,lC,lq]);(0,a.useEffect)(()=>(lT&&(document.addEventListener("mousemove",sF),document.addEventListener("mouseup",sZ),document.body.style.cursor="col-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",sF),document.removeEventListener("mouseup",sZ),document.body.style.cursor="",document.body.style.userSelect=""}),[lT,sF,sZ]);let sz=(0,a.useCallback)(()=>{eB&&l6({resource:l,id:eB.id},{onSuccess:()=>{eC.Am.success("Record deleted successfully"),eL(!1),eR(null),l5()},onError:e=>{eC.Am.error("Failed to delete record"),console.error(e)}})},[eB,l,l6,l5]),sM=(0,a.useCallback)(e=>{se({resource:l,values:e},{onSuccess:()=>{eC.Am.success("Record created successfully"),e_(!1),l5()},onError:e=>{eC.Am.error("Failed to create record"),console.error(e)}})},[l,se,l5]),sP=(0,a.useCallback)(e=>{eB&&ss({resource:l,id:eB.id,values:e},{onSuccess:()=>{eC.Am.success("Record updated successfully"),eF(!1),eR(null),l5()},onError:e=>{eC.Am.error("Failed to update record"),console.error(e)}})},[eB,l,ss,l5]),sL=(0,a.useCallback)(async(e,s,t)=>(lZ(!0),new Promise((a,n)=>{ss({resource:l,id:e,values:{[s]:t}},{onSuccess:()=>{eC.Am.success("Field updated"),lO(null),lZ(!1),l5(),a()},onError:e=>{eC.Am.error("Failed to update field"),console.error(e),lZ(!1),n(e)}})})),[l,ss,l5]),sB=(0,a.useCallback)(()=>{lO(null)},[]),sU=(0,a.useCallback)(()=>{eX.length===l3.length?eQ([]):eQ(l3.map(e=>e.id))},[eX,l3]),sR=(0,a.useCallback)(e=>{eQ(l=>l.includes(e)?l.filter(l=>l!==e):[...l,e])},[]);return l?(0,t.jsxs)("div",{className:"flex flex-col h-full gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[!V&&(0,t.jsx)("h1",{className:"text-lg font-semibold",children:n||s||l}),(0,t.jsxs)("div",{className:(0,en.cn)("flex items-center gap-2 flex-wrap",V&&"flex-1 justify-end"),children:[ea,J&&(0,t.jsx)(f.t,{value:ew,onChange:eS,placeholder:"Search...",expandedWidth:"w-64"}),q&&(0,t.jsxs)(p.z,{variant:e$.length>0?"default":"outline",size:"icon",onClick:()=>eD(!0),title:"Filters",className:"relative",children:[(0,t.jsx)(S.Z,{className:"h-4 w-4"}),e$.length>0&&(0,t.jsx)(j.C,{variant:"secondary",className:"absolute -top-1 -right-1 h-4 w-4 p-0 flex items-center justify-center text-xs",children:e$.length})]}),$&&(0,t.jsx)(p.z,{variant:"outline",size:"icon",onClick:()=>lc(!0),title:"Settings",children:(0,t.jsx)(T.Z,{className:"h-4 w-4"})}),(0,t.jsx)(p.z,{variant:"outline",size:"icon",onClick:()=>l5(),title:"Refresh",children:(0,t.jsx)(k.Z,{className:"h-4 w-4"})}),(Y||X)&&(0,t.jsxs)(b.h_,{children:[(0,t.jsx)(b.$F,{asChild:!0,children:(0,t.jsx)(p.z,{variant:"outline",size:"icon",title:"More",children:(0,t.jsx)(D.Z,{className:"h-4 w-4"})})}),(0,t.jsxs)(b.AW,{align:"end",children:[(0,t.jsx)(b.Ju,{children:"Data Actions"}),(0,t.jsx)(b.VD,{}),Y&&(0,t.jsxs)(b.Xi,{onClick:()=>lt(!0),children:[(0,t.jsx)(A.Z,{className:"mr-2 h-4 w-4"}),"Export"]}),X&&(0,t.jsxs)(b.Xi,{onClick:()=>ln(!0),children:[(0,t.jsx)(_.Z,{className:"mr-2 h-4 w-4"}),"Import"]})]})]}),es,K&&(0,t.jsx)(p.z,{size:"icon",onClick:()=>e_(!0),title:"Create",children:(0,t.jsx)(I.Z,{className:"h-4 w-4"})})]})]}),Q&&eX.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-2 bg-muted rounded-md",children:[(0,t.jsxs)("span",{className:"text-sm font-medium",children:[eX.length," row(s) selected"]}),(0,t.jsx)(p.z,{variant:"outline",size:"sm",onClick:()=>li(!0),children:"Bulk Actions"}),(0,t.jsx)(p.z,{variant:"outline",size:"sm",onClick:()=>eQ([]),children:"Clear"})]}),(0,t.jsxs)(g.Zb,{className:"flex-1 flex flex-col overflow-hidden min-h-0",children:[(0,t.jsx)("div",{className:"flex-1 overflow-auto relative",children:(0,t.jsxs)("table",{className:"w-full caption-bottom text-sm min-w-max",children:[(0,t.jsx)("thead",{className:"sticky top-0 z-10 bg-background",children:(0,t.jsxs)(v.SC,{className:"border-b",children:[lU&&(0,t.jsx)(v.ss,{className:"w-8 px-2",children:(0,t.jsx)(E.Z,{className:"h-4 w-4 text-muted-foreground"})}),ep&&(0,t.jsx)(v.ss,{className:"w-12 sticky left-0 bg-background z-20",children:"multiple"===ef?"Select":""}),Q&&(0,t.jsx)(v.ss,{className:"w-12 sticky left-0 bg-background z-20",children:(0,t.jsx)(C.X,{checked:l3.length>0&&eX.length===l3.length,onCheckedChange:sU})}),sj.map(e=>{let l=sC(e.key),s=ly===e.key,a=lb===e.key,n=lC[e.key];return(0,t.jsxs)(v.ss,{draggable:!0,onDragStart:l=>sD(l,e.key),onDragEnd:sA,onDragOver:l=>s_(l,e.key),onDragLeave:sI,onDrop:l=>sE(l,e.key),style:{width:n?"".concat(n,"px"):void 0,minWidth:n?"".concat(n,"px"):void 0},className:(0,en.cn)("whitespace-nowrap cursor-grab active:cursor-grabbing relative group/header",e.sortable&&"cursor-pointer select-none",s&&"opacity-50",a&&"border-l-2 border-l-primary"),onClick:()=>e.sortable&&sy(e.key),children:[(0,t.jsxs)("div",{className:"flex items-center gap-1 pr-2",children:[(0,t.jsx)(E.Z,{className:"h-4 w-4 text-muted-foreground opacity-40 hover:opacity-100 cursor-grab flex-shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.title}),e.sortable&&(0,t.jsx)("span",{className:"ml-1 flex-shrink-0",children:"asc"===l?(0,t.jsx)(O.Z,{className:"h-4 w-4"}):"desc"===l?(0,t.jsx)(F.Z,{className:"h-4 w-4"}):(0,t.jsx)(Z.Z,{className:"h-4 w-4 text-muted-foreground"})})]}),(0,t.jsx)("div",{className:(0,en.cn)("absolute right-0 top-0 bottom-0 w-[3px] cursor-col-resize","border-r border-border hover:border-primary hover:bg-primary/20",lT===e.key&&"border-primary bg-primary/30"),onMouseDown:l=>sO(l,e.key),onClick:e=>e.stopPropagation()})]},e.key)}),(et||W||G||H)&&(0,t.jsx)(v.ss,{className:"w-24",children:"Actions"})]})}),(0,t.jsx)(i.LB,{sensors:sN,collisionDetection:i.pE,onDragStart:sw,onDragEnd:sb,modifiers:[c.DL],children:(0,t.jsx)(o.Fo,{items:l3.map(e=>e.id),strategy:o.qw,disabled:!lU,children:(0,t.jsx)("tbody",{className:(0,en.cn)("[&_tr:last-child]:border-0","small"===lv&&"[&_tr]:h-8 [&_td]:py-1 [&_td]:text-xs","middle"===lv&&"[&_tr]:h-12 [&_td]:py-2 [&_td]:text-sm","large"===lv&&"[&_tr]:h-16 [&_td]:py-4"),children:l2?(0,t.jsx)(v.SC,{children:(0,t.jsx)(v.pj,{colSpan:sj.length+(lU?1:0)+(ep?1:0)+(Q?1:0)+(et||W||G||H?1:0),className:"h-48 text-center",children:(0,t.jsx)(z.Z,{className:"h-8 w-8 animate-spin mx-auto"})})}):0===l3.length?(0,t.jsx)(v.SC,{children:(0,t.jsx)(v.pj,{colSpan:sj.length+(lU?1:0)+(ep?1:0)+(Q?1:0)+(et||W||G||H?1:0),className:"h-48 text-center text-muted-foreground",children:"No data available"})}):l3.map((e,l)=>{let s=null==ev?void 0:ev.some(l=>l.id===e.id);return(0,t.jsxs)(eq,{id:e.id,disabled:!lU,className:(0,en.cn)(eh&&"cursor-pointer hover:bg-muted/50",eN&&s&&"bg-primary/10 hover:bg-primary/15"),onClick:()=>null==eh?void 0:eh(e),children:[ep&&(0,t.jsx)(v.pj,{onClick:e=>e.stopPropagation(),className:"sticky left-0 bg-background z-10",children:"multiple"===ef?(0,t.jsx)(C.X,{checked:s||!1,onCheckedChange:l=>{l?null==ej||ej([...ev||[],e]):null==ej||ej((ev||[]).filter(l=>l.id!==e.id))}}):(0,t.jsx)("input",{type:"radio",name:"external-selection",checked:s||!1,onChange:()=>{null==ej||ej([e])},className:"h-4 w-4 text-primary border-border focus:ring-primary"})}),Q&&(0,t.jsx)(v.pj,{onClick:e=>e.stopPropagation(),children:(0,t.jsx)(C.X,{checked:eX.includes(e.id),onCheckedChange:()=>sR(e.id)})}),sj.map(l=>{let s=e;if(l.isNested){for(let e of l.key.split(".")){if(null==s)break;if(Array.isArray(s)){if(0===(s=s.map(l=>null==l?void 0:l[e]).filter(e=>null!=e)).length){s=null;break}}else s=null==s?void 0:s[e]}Array.isArray(s)&&(s=s.join(", "))}else s=e[l.key];if(er&&er[l.key]){let a=lC[l.key];return(0,t.jsx)(v.pj,{style:{width:a?"".concat(a,"px"):void 0,maxWidth:a?"".concat(a,"px"):void 0},className:a?"overflow-hidden":"",children:(0,t.jsx)("div",{className:a?"truncate":"",children:er[l.key](s,e,l.field)})},l.key)}let a=lC[l.key],n=l.isNested&&null!=s&&"object"==typeof s?null:s,r=(null==lE?void 0:lE.recordId)===e.id&&(null==lE?void 0:lE.columnKey)===l.key,i=el&&!l.isNested&&l.field&&eV(l.field);return(0,t.jsx)(v.pj,{style:{width:a?"".concat(a,"px"):void 0,maxWidth:a?"".concat(a,"px"):void 0},className:(0,en.cn)(a?"overflow-hidden":"",i&&!r&&"cursor-cell"),onDoubleClick:s=>{i&&!r&&(s.stopPropagation(),lO({recordId:e.id,columnKey:l.key}))},children:r?(0,t.jsx)(eU,{value:s,field:l.field,onSave:s=>sL(e.id,l.key,s),onCancel:sB,isLoading:lF}):(0,t.jsx)("div",{className:a?"truncate":"",children:l.isNested?(0,t.jsx)("span",{className:"text-sm",children:null!=n?String(n):"-"}):(0,t.jsx)(x.Zl,{field:l.field,value:s,readOnly:!0,size:"small"})})},l.key)}),(et||W||G||H)&&(0,t.jsx)(v.pj,{onClick:e=>e.stopPropagation(),children:et?et({record:e,onView:()=>{eR(e),eE(!0)},onEdit:()=>{eR(e),eF(!0)},onDelete:()=>{eR(e),eL(!0)}}):(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[W&&(0,t.jsx)(p.z,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>{eR(e),eE(!0)},children:(0,t.jsx)(M.Z,{className:"h-4 w-4"})}),G&&(0,t.jsx)(p.z,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>{eR(e),eF(!0)},children:(0,t.jsx)(P.Z,{className:"h-4 w-4"})}),H&&(0,t.jsx)(p.z,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive",onClick:()=>{eR(e),eL(!0)},children:(0,t.jsx)(L.Z,{className:"h-4 w-4"})})]})})]},e.id||l)})})})})]})}),(0,t.jsxs)("div",{className:"flex items-center justify-between border-t px-3 py-2 gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("p",{className:"text-sm text-muted-foreground hidden sm:block",children:["Showing ",(eJ-1)*eH+1," to"," ",Math.min(eJ*eH,l8)," of ",l8," ","records"]}),(0,t.jsxs)(w.Ph,{value:eH.toString(),onValueChange:e=>{eY(Number(e)),eG(1)},children:[(0,t.jsx)(w.i4,{className:"w-[70px] sm:w-[100px]",children:(0,t.jsx)(w.ki,{})}),(0,t.jsxs)(w.Bw,{children:[(0,t.jsxs)(w.Ql,{value:"10",children:[(0,t.jsx)("span",{className:"sm:hidden",children:"10"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"10 / page"})]}),(0,t.jsxs)(w.Ql,{value:"25",children:[(0,t.jsx)("span",{className:"sm:hidden",children:"25"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"25 / page"})]}),(0,t.jsxs)(w.Ql,{value:"50",children:[(0,t.jsx)("span",{className:"sm:hidden",children:"50"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"50 / page"})]}),(0,t.jsxs)(w.Ql,{value:"100",children:[(0,t.jsx)("span",{className:"sm:hidden",children:"100"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"100 / page"})]})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 sm:gap-2",children:[(0,t.jsxs)(p.z,{variant:"outline",size:"sm",onClick:()=>eG(e=>Math.max(1,e-1)),disabled:1===eJ,children:[(0,t.jsx)(B.Z,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,t.jsxs)("span",{className:"text-sm whitespace-nowrap",children:[(0,t.jsxs)("span",{className:"sm:hidden",children:[eJ,"/",l7||1]}),(0,t.jsxs)("span",{className:"hidden sm:inline",children:["Page ",eJ," of ",l7||1]})]}),(0,t.jsxs)(p.z,{variant:"outline",size:"sm",onClick:()=>eG(e=>Math.min(l7,e+1)),disabled:eJ>=l7,children:[(0,t.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,t.jsx)(U.Z,{className:"h-4 w-4"})]})]})]})]}),q&&(0,t.jsx)(eg,{visible:eT,onClose:()=>eD(!1),formFields:sd,onApply:sS,initialFilters:e$,collectionName:l}),K&&(0,t.jsx)(y.yo,{open:eA,onOpenChange:e_,children:(0,t.jsxs)(y.ue,{className:"w-[600px] sm:max-w-[600px] overflow-y-auto",children:[(0,t.jsx)(y.Tu,{children:(0,t.jsx)(y.bC,{children:"Create New Record"})}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(eP.j,{fields:sd,onSubmit:sM,isLoading:sl,onCancel:()=>e_(!1)})})]})}),W&&(0,t.jsx)(y.yo,{open:eI,onOpenChange:e=>{eE(e),e||eR(null)},children:(0,t.jsxs)(y.ue,{className:"w-[600px] sm:max-w-[600px] overflow-y-auto",children:[(0,t.jsx)(y.Tu,{children:(0,t.jsx)(y.bC,{children:"View Record"})}),(0,t.jsx)("div",{className:"mt-4 space-y-4",children:si||so?(0,t.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,t.jsx)(z.Z,{className:"h-8 w-8 animate-spin"})}):sc?(()=>{let e,l;let s=sd.filter(e=>e.relType&&e.foreignKey).map(e=>e.foreignKey),a=ee&&sc.type&&sc.id?(0,t.jsxs)("div",{className:"mb-4 space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-muted-foreground",children:"Preview"}),(0,t.jsx)("div",{className:"p-3 bg-muted/50 rounded-md flex items-center justify-center",children:(null==(e=sc.type)?void 0:e.startsWith("image/"))?(0,t.jsx)("img",{src:"".concat(lz,"/assets/").concat(sc.id,"?access_token=").concat(lM),alt:sc.title||"Image preview",className:"max-w-full max-h-64 object-contain rounded",onError:e=>{e.target.style.display="none"}}):(null==(l=sc.type)?void 0:l.startsWith("video/"))?(0,t.jsx)("video",{src:"".concat(lz,"/assets/").concat(sc.id,"?access_token=").concat(lM),controls:!0,className:"max-w-full max-h-64 rounded"}):(0,t.jsx)("div",{className:"text-center text-muted-foreground py-4",children:(0,t.jsx)("span",{className:"text-sm",children:"No preview available for this file type"})})})]}):null,n=sd.filter(e=>!s.includes(e.name)).map(e=>{var l,s;let a=sc[e.name],n=e=>!e||"object"==typeof e&&(null===e.id||void 0===e.id);return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-muted-foreground capitalize",children:e.label||e.name.replace(/_/g," ")}),["Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon"].includes(e.type)&&a&&(0,t.jsxs)(p.z,{variant:"ghost",size:"sm",className:"h-6 text-xs gap-1",onClick:()=>{e7(a),e9(e.label||e.name),ll(e.type),e3(!0)},children:[(0,t.jsx)(R.Z,{className:"h-3 w-3"}),"View in Map"]})]}),(0,t.jsx)("div",{className:"p-3 bg-muted/50 rounded-md min-h-[40px]",children:(null==er?void 0:er[e.name])?er[e.name](a,sc,e):e.relType?(()=>{if(!a||n(a))return(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"-"});if(Array.isArray(a)){let l=a.filter(e=>!n(e));return 0===l.length?(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"-"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:l.map((l,s)=>(0,t.jsx)(j.C,{variant:"secondary",className:"text-xs",children:su(l,e)},(null==l?void 0:l.id)||s))})}return"object"==typeof a?(0,t.jsx)(j.C,{variant:"secondary",className:"text-xs",children:su(a,e)}):(0,t.jsx)("span",{className:"text-sm",children:String(a)})})():null!=a?["DateTime","DateTime_NO_TZ","DATETIME","TIMESTAMP"].includes(e.type)?(0,t.jsxs)("span",{className:"text-sm",children:[new Date(a).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),(0,t.jsxs)("span",{className:"text-muted-foreground ml-1",children:["(",Intl.DateTimeFormat().resolvedOptions().timeZone,")"]})]}):"Date"===e.type?(0,t.jsx)("span",{className:"text-sm",children:new Date(a).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}):["Time","Time_NO_TZ"].includes(e.type)?(0,t.jsx)("span",{className:"text-sm",children:a}):["Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon"].includes(e.type)?(0,t.jsx)("pre",{className:"text-sm whitespace-pre-wrap break-all max-h-24 overflow-auto",children:JSON.stringify(a,null,2)}):(null===(l=e.type)||void 0===l?void 0:l.startsWith("Array_"))?(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[Array.isArray(a)&&a.length>0?a.slice(0,10).map((l,s)=>{let a=String(l);if(e.type.includes("Date")||e.type.includes("DateTime")){let s=new Date(l);a=e.type.includes("DateTime")?s.toLocaleString():s.toLocaleDateString()}else e.type.includes("Boolean")&&(a=l?"true":"false");return(0,t.jsx)(j.C,{variant:"secondary",className:"text-xs",children:a},s)}):(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"Empty array"}),Array.isArray(a)&&a.length>10&&(0,t.jsxs)(j.C,{variant:"outline",className:"text-xs",children:["+",a.length-10," more"]})]}):(null===(s=e.type)||void 0===s?void 0:s.startsWith("Range_"))?(()=>{var l,s;if(!a||"object"!=typeof a)return(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"-"});let n=!1!==a.lowerInclusive?"[":"(",r=!1!==a.upperInclusive?"]":")",i=String(null!==(l=a.lower)&&void 0!==l?l:""),o=String(null!==(s=a.upper)&&void 0!==s?s:"");if(e.type.includes("Date")||e.type.includes("DateTime")){if(a.lower){let l=new Date(a.lower);i=e.type.includes("DateTime")?l.toLocaleString():l.toLocaleDateString()}if(a.upper){let l=new Date(a.upper);o=e.type.includes("DateTime")?l.toLocaleString():l.toLocaleDateString()}}return(0,t.jsxs)(j.C,{variant:"secondary",className:"font-mono text-xs",children:[n,i," – ",o,r]})})():"object"==typeof a?(0,t.jsx)("pre",{className:"text-sm whitespace-pre-wrap break-all",children:JSON.stringify(a,null,2)}):(0,t.jsx)("span",{className:"text-sm",children:String(a)}):(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"-"})})]},e.name)});return(0,t.jsxs)(t.Fragment,{children:[a,n]})})():(0,t.jsx)("div",{className:"text-center py-8 text-muted-foreground",children:"No data available"})})]})}),G&&(0,t.jsx)(y.yo,{open:eO,onOpenChange:e=>{eF(e),e||eR(null)},children:(0,t.jsxs)(y.ue,{className:"w-[600px] sm:max-w-[600px] overflow-y-auto",children:[(0,t.jsx)(y.Tu,{children:(0,t.jsx)(y.bC,{children:"Edit Record"})}),(0,t.jsx)("div",{className:"mt-4",children:si||so?(0,t.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,t.jsx)(z.Z,{className:"h-8 w-8 animate-spin"})}):sc?(0,t.jsx)(eP.j,{fields:sd,initialValues:sc,onSubmit:sP,isLoading:st,disabledFields:(null==eo?void 0:eo(sc))||[],onCancel:()=>{eF(!1),eR(null)}}):(0,t.jsx)("div",{className:"text-center py-8 text-muted-foreground",children:"No data available"})})]})}),H&&(0,t.jsx)(N.Vq,{open:ez,onOpenChange:eL,children:(0,t.jsxs)(N.cZ,{children:[(0,t.jsxs)(N.fK,{children:[(0,t.jsx)(N.$N,{children:"Delete Record"}),(0,t.jsx)(N.Be,{children:"Are you sure you want to delete this record? This action cannot be undone."})]}),(0,t.jsxs)(N.cN,{children:[(0,t.jsx)(p.z,{variant:"outline",onClick:()=>{eL(!1),eR(null)},children:"Cancel"}),(0,t.jsxs)(p.z,{variant:"destructive",onClick:sz,disabled:l9,children:[l9&&(0,t.jsx)(z.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Delete"]})]})]})}),Y&&(0,t.jsx)(ey,{visible:ls,onClose:()=>lt(!1),exportColumns:ld,onExportColumnsChange:lu,exportLimit:lm,onExportLimitChange:lh,exportPage:lx,onExportPageChange:lp,isExporting:lf,onExport:sp,columnTreeData:sm}),X&&(0,t.jsx)(ek,{visible:la,onClose:()=>ln(!1),selectedCollection:l,onImportComplete:sf}),Q&&(0,t.jsx)(eZ,{visible:lr,onClose:()=>li(!1),selectedRows:l3.filter(e=>eX.includes(e.id)),selectedCollection:l,onClearSelection:()=>{eQ([]),l5()},customActions:eb}),$&&(0,t.jsx)(eM,{visible:lo,onClose:()=>lc(!1),tableDensity:lv,onTableDensityChange:sk,visibleColumns:lY,onVisibleColumnsChange:sT,columnTreeData:sm}),(0,t.jsx)(eK.Z,{open:e5,onOpenChange:e3,value:e8,fieldName:e6,fieldType:le})]}):(0,t.jsx)(g.Zb,{children:(0,t.jsxs)(g.aY,{className:"p-8 text-center",children:[(0,t.jsx)("h3",{className:"text-lg font-medium",children:"Please select a collection"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-2",children:"Choose a collection from the sidebar to view and manage its data."})]})})},eH=()=>{let e=(0,n.useSearchParams)(),l=e.get("collection")||"",s=e.get("schema")||"",{isLoading:a}=(0,d.I_)(),{isInitialized:r,isLoading:i}=(0,u.Gn)();return a||i||!r?(0,t.jsx)(g.Zb,{children:(0,t.jsxs)(g.aY,{className:"p-8 text-center",children:[(0,t.jsx)(z.Z,{className:"h-8 w-8 animate-spin mx-auto"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-2",children:"Loading..."})]})}):(0,t.jsx)(eG,{selectedCollection:l,schemaName:s,enableView:!0},l)};var eY=eH},32060:function(e,l,s){s.d(l,{$F:function(){return u},AW:function(){return m},Ju:function(){return x},VD:function(){return p},Xi:function(){return h},h_:function(){return d}});var t=s(57437),a=s(2265),n=s(28119),r=s(10407),i=s(30401),o=s(40519),c=s(93448);let d=n.fC,u=n.xz;n.ZA,n.Uv,n.Tr,n.Ee,a.forwardRef((e,l)=>{let{className:s,inset:a,children:i,...o}=e;return(0,t.jsxs)(n.fF,{ref:l,className:(0,c.cn)("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",a&&"pl-8",s),...o,children:[i,(0,t.jsx)(r.Z,{className:"ml-auto h-4 w-4"})]})}).displayName=n.fF.displayName,a.forwardRef((e,l)=>{let{className:s,...a}=e;return(0,t.jsx)(n.tu,{ref:l,className:(0,c.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a})}).displayName=n.tu.displayName;let m=a.forwardRef((e,l)=>{let{className:s,sideOffset:a=4,...r}=e;return(0,t.jsx)(n.Uv,{children:(0,t.jsx)(n.VY,{ref:l,sideOffset:a,className:(0,c.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...r})})});m.displayName=n.VY.displayName;let h=a.forwardRef((e,l)=>{let{className:s,inset:a,...r}=e;return(0,t.jsx)(n.ck,{ref:l,className:(0,c.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a&&"pl-8",s),...r})});h.displayName=n.ck.displayName,a.forwardRef((e,l)=>{let{className:s,children:a,checked:r,...o}=e;return(0,t.jsxs)(n.oC,{ref:l,className:(0,c.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),checked:r,...o,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(n.wU,{children:(0,t.jsx)(i.Z,{className:"h-4 w-4"})})}),a]})}).displayName=n.oC.displayName,a.forwardRef((e,l)=>{let{className:s,children:a,...r}=e;return(0,t.jsxs)(n.Rk,{ref:l,className:(0,c.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...r,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(n.wU,{children:(0,t.jsx)(o.Z,{className:"h-2 w-2 fill-current"})})}),a]})}).displayName=n.Rk.displayName;let x=a.forwardRef((e,l)=>{let{className:s,inset:a,...r}=e;return(0,t.jsx)(n.__,{ref:l,className:(0,c.cn)("px-2 py-1.5 text-sm font-semibold",a&&"pl-8",s),...r})});x.displayName=n.__.displayName;let p=a.forwardRef((e,l)=>{let{className:s,...a}=e;return(0,t.jsx)(n.Z0,{ref:l,className:(0,c.cn)("-mx-1 my-1 h-px bg-muted",s),...a})});p.displayName=n.Z0.displayName},17168:function(e,l,s){s.d(l,{SP:function(){return c},dr:function(){return o},mQ:function(){return i},nU:function(){return d}});var t=s(57437),a=s(2265),n=s(20271),r=s(93448);let i=n.fC,o=a.forwardRef((e,l)=>{let{className:s,...a}=e;return(0,t.jsx)(n.aV,{ref:l,className:(0,r.cn)("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",s),...a})});o.displayName=n.aV.displayName;let c=a.forwardRef((e,l)=>{let{className:s,...a}=e;return(0,t.jsx)(n.xz,{ref:l,className:(0,r.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",s),...a})});c.displayName=n.xz.displayName;let d=a.forwardRef((e,l)=>{let{className:s,...a}=e;return(0,t.jsx)(n.VY,{ref:l,className:(0,r.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...a})});d.displayName=n.VY.displayName},63751:function(e,l,s){s.d(l,{CE:function(){return c},Gn:function(){return o}});var t=s(57437),a=s(2265),n=s(72135),r=s(14438);let i=(0,a.createContext)(void 0),o=()=>{let e=(0,a.useContext)(i);if(!e)throw Error("usePreferences must be used within a PreferencesProvider");return e};function c(e){var l;let{children:s}=e,[o,c]=(0,a.useState)([]),[d,u]=(0,a.useState)(!1),{data:m}=(0,n.kS)(),h=(null==m?void 0:m.id)||(null==m?void 0:null===(l=m.user)||void 0===l?void 0:l.id)||null,{data:x,isLoading:p,refetch:f}=(0,n.sm)({resource:"baasix_UserPreference",queryOptions:{enabled:!!h},filters:h?[{field:"userId",operator:"eq",value:h}]:[],pagination:{pageSize:-1,mode:"off"}}),{mutate:g}=(0,n.RO)({resource:"baasix_UserPreference"}),{mutate:v}=(0,n.PQ)({resource:"baasix_UserPreference"});(0,a.useEffect)(()=>{(null==x?void 0:x.data)?(c(x.data),u(!0)):h&&!p&&(c([]),u(!0))},[x,h,p]);let j=(0,a.useMemo)(()=>{let e={};return o.forEach(l=>{l.isDefault&&(e[l.collectionName]||(e[l.collectionName]={}),e[l.collectionName][l.preferenceType]=l)}),e},[o]),y=(0,a.useCallback)((e,l)=>{var s;return(null===(s=j[e])||void 0===s?void 0:s[l])||null},[j]),N=(0,a.useCallback)(async(e,l,s)=>{if(!h){console.warn("No user ID available for saving preferences");return}let t=y(e,l),a={userId:h,collectionName:e,preferenceType:l,preferenceData:s,isDefault:!0};try{(null==t?void 0:t.id)?await new Promise((e,l)=>{v({id:t.id,values:a,successNotification:!1},{onSuccess:()=>{f(),e()},onError:e=>{console.error("Error updating preference:",e),l(e)}})}):await new Promise((e,l)=>{g({values:a,successNotification:!1},{onSuccess:()=>{f(),e()},onError:e=>{console.error("Error creating preference:",e),l(e)}})})}catch(e){throw r.Am.error("Failed to save preferences"),e}},[h,y,g,v,f]),b=(0,a.useCallback)(e=>{var l;let s=null===(l=j[e])||void 0===l?void 0:l.columns;return s?s.preferenceData:null},[j]),w=(0,a.useCallback)(async(e,l)=>{await N(e,"columns",l)},[N]),C=(0,a.useCallback)(e=>{var l;let s=null===(l=j[e])||void 0===l?void 0:l.filters;return s?s.preferenceData:null},[j]),S=(0,a.useCallback)(async(e,l)=>{await N(e,"filters",l)},[N]),T=(0,a.useCallback)(e=>{var l;let s=null===(l=j[e])||void 0===l?void 0:l.sorting;return s?s.preferenceData:null},[j]),k=(0,a.useCallback)(async(e,l)=>{await N(e,"sorting",l)},[N]),D=(0,a.useCallback)(e=>{var l;let s=null===(l=j[e])||void 0===l?void 0:l.pagination;return s?s.preferenceData:null},[j]),A=(0,a.useCallback)(async(e,l)=>{await N(e,"pagination",l)},[N]);return(0,t.jsx)(i.Provider,{value:{getColumnPreferences:b,saveColumnPreferences:w,getFilterPreferences:C,saveFilterPreferences:S,getSortingPreferences:T,saveSortingPreferences:k,getPaginationPreferences:D,savePaginationPreferences:A,isLoading:p,isInitialized:d,refetchPreferences:f},children:s})}}}]);
@@ -1 +1 @@
1
- !function(){"use strict";var e,t,n,r,o,c,a,u,i,f,d,s,l={},b={};function p(e){var t=b[e];if(void 0!==t)return t.exports;var n=b[e]={exports:{}},r=!0;try{l[e].call(n.exports,n,n.exports,p),r=!1}finally{r&&delete b[e]}return n.exports}p.m=l,e=[],p.O=function(t,n,r,o){if(n){o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[n,r,o];return}for(var a=1/0,c=0;c<e.length;c++){for(var n=e[c][0],r=e[c][1],o=e[c][2],u=!0,i=0;i<n.length;i++)a>=o&&Object.keys(p.O).every(function(e){return p.O[e](n[i])})?n.splice(i--,1):(u=!1,o<a&&(a=o));if(u){e.splice(c--,1);var f=r();void 0!==f&&(t=f)}}return t},p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},p.t=function(e,r){if(1&r&&(e=this(e)),8&r||"object"==typeof e&&e&&(4&r&&e.__esModule||16&r&&"function"==typeof e.then))return e;var o=Object.create(null);p.r(o);var c={};t=t||[null,n({}),n([]),n(n)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach(function(t){c[t]=function(){return e[t]}});return c.default=function(){return e},p.d(o,c),o},p.d=function(e,t){for(var n in t)p.o(t,n)&&!p.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},p.f={},p.e=function(e){return Promise.all(Object.keys(p.f).reduce(function(t,n){return p.f[n](e,t),t},[]))},p.u=function(e){return 4212===e?"static/chunks/d0deef33.0379166a4ec23470.js":2344===e?"static/chunks/2344.35b46d2179a765b5.js":1627===e?"static/chunks/1627.e85886e75c6c4cf1.js":780===e?"static/chunks/c37d3baf.c2ff165f5b02c692.js":3834===e?"static/chunks/3834.84944e390d902509.js":1299===e?"static/chunks/1299.77cc7b7b76b75cba.js":"static/chunks/"+(({3572:"70e0d97a",7902:"54a60aa6",7999:"6fcbdc68"})[e]||e)+"-"+({600:"539045311240f579",926:"156f32067d111d6b",1509:"56ac00cdaaecdf53",1668:"e3eabd0f6753c780",1783:"d9fb550fd324300c",2033:"8355304f13887db5",2676:"73b0ee7c80073a84",3563:"b8842744384391fe",3572:"aeaf0cdc26ba1a58",3817:"2309d84b85956d4e",4438:"c9a12ca15b6e9160",4475:"8bdfbd536fba8c48",5094:"8d53e403235d4ca6",6241:"30d7169d1010e5a4",6530:"a91e10cffa4200c4",6547:"1aaab011e6089042",6712:"781937c53a2c49da",6869:"11b3cd61c78598a7",7304:"53d85c55adc8f184",7324:"b53229c59a640880",7902:"d9747982e0a81f58",7999:"90be1a5480b8d353",9124:"a02f9e209e6e3cce",9487:"b17481605e513b83",9881:"419697138376e755"})[e]+".js"},p.miniCssF=function(e){return"static/css/a275cc2b185e04f8.css"},p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="_N_E:",p.l=function(e,t,n,c){if(r[e]){r[e].push(t);return}if(void 0!==n)for(var a,u,i=document.getElementsByTagName("script"),f=0;f<i.length;f++){var d=i[f];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==o+n){a=d;break}}a||(u=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,p.nc&&a.setAttribute("nonce",p.nc),a.setAttribute("data-webpack",o+n),a.src=p.tu(e)),r[e]=[t];var s=function(t,n){a.onerror=a.onload=null,clearTimeout(l);var o=r[e];if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach(function(e){return e(n)}),t)return t(n)},l=setTimeout(s.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=s.bind(null,a.onerror),a.onload=s.bind(null,a.onload),u&&document.head.appendChild(a)},p.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.tt=function(){return void 0===c&&(c={createScriptURL:function(e){return e}},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(c=trustedTypes.createPolicy("nextjs#bundler",c))),c},p.tu=function(e){return p.tt().createScriptURL(e)},p.p="/admin/_next/",a=function(e,t,n,r){var o=document.createElement("link");return o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=function(c){if(o.onerror=o.onload=null,"load"===c.type)n();else{var a=c&&("load"===c.type?"missing":c.type),u=c&&c.target&&c.target.href||t,i=Error("Loading CSS chunk "+e+" failed.\n("+u+")");i.code="CSS_CHUNK_LOAD_FAILED",i.type=a,i.request=u,o.parentNode.removeChild(o),r(i)}},o.href=t,document.head.appendChild(o),o},u=function(e,t){for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var o=n[r],c=o.getAttribute("data-href")||o.getAttribute("href");if("stylesheet"===o.rel&&(c===e||c===t))return o}for(var a=document.getElementsByTagName("style"),r=0;r<a.length;r++){var o=a[r],c=o.getAttribute("data-href");if(c===e||c===t)return o}},i={2272:0},p.f.miniCss=function(e,t){i[e]?t.push(i[e]):0!==i[e]&&({1627:1})[e]&&t.push(i[e]=new Promise(function(t,n){var r=p.miniCssF(e),o=p.p+r;if(u(r,o))return t();a(e,o,t,n)}).then(function(){i[e]=0},function(t){throw delete i[e],t}))},f={2272:0,7825:0},p.f.j=function(e,t){var n=p.o(f,e)?f[e]:void 0;if(0!==n){if(n)t.push(n[2]);else if(/^(1627|2272|7825)$/.test(e))f[e]=0;else{var r=new Promise(function(t,r){n=f[e]=[t,r]});t.push(n[2]=r);var o=p.p+p.u(e),c=Error();p.l(o,function(t){if(p.o(f,e)&&(0!==(n=f[e])&&(f[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",c.name="ChunkLoadError",c.type=r,c.request=o,n[1](c)}},"chunk-"+e,e)}}},p.O.j=function(e){return 0===f[e]},d=function(e,t){var n,r,o=t[0],c=t[1],a=t[2],u=0;if(o.some(function(e){return 0!==f[e]})){for(n in c)p.o(c,n)&&(p.m[n]=c[n]);if(a)var i=a(p)}for(e&&e(t);u<o.length;u++)r=o[u],p.o(f,r)&&f[r]&&f[r][0](),f[r]=0;return p.O(i)},(s=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(d.bind(null,0)),s.push=d.bind(null,s.push.bind(s)),p.nc=void 0}();
1
+ !function(){"use strict";var e,t,n,r,o,c,a,u,i,f,d,s,l={},b={};function p(e){var t=b[e];if(void 0!==t)return t.exports;var n=b[e]={exports:{}},r=!0;try{l[e].call(n.exports,n,n.exports,p),r=!1}finally{r&&delete b[e]}return n.exports}p.m=l,e=[],p.O=function(t,n,r,o){if(n){o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[n,r,o];return}for(var a=1/0,c=0;c<e.length;c++){for(var n=e[c][0],r=e[c][1],o=e[c][2],u=!0,i=0;i<n.length;i++)a>=o&&Object.keys(p.O).every(function(e){return p.O[e](n[i])})?n.splice(i--,1):(u=!1,o<a&&(a=o));if(u){e.splice(c--,1);var f=r();void 0!==f&&(t=f)}}return t},p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},p.t=function(e,r){if(1&r&&(e=this(e)),8&r||"object"==typeof e&&e&&(4&r&&e.__esModule||16&r&&"function"==typeof e.then))return e;var o=Object.create(null);p.r(o);var c={};t=t||[null,n({}),n([]),n(n)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach(function(t){c[t]=function(){return e[t]}});return c.default=function(){return e},p.d(o,c),o},p.d=function(e,t){for(var n in t)p.o(t,n)&&!p.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},p.f={},p.e=function(e){return Promise.all(Object.keys(p.f).reduce(function(t,n){return p.f[n](e,t),t},[]))},p.u=function(e){return 4212===e?"static/chunks/d0deef33.0379166a4ec23470.js":2344===e?"static/chunks/2344.35b46d2179a765b5.js":1627===e?"static/chunks/1627.e85886e75c6c4cf1.js":780===e?"static/chunks/c37d3baf.c2ff165f5b02c692.js":3834===e?"static/chunks/3834.84944e390d902509.js":1299===e?"static/chunks/1299.77cc7b7b76b75cba.js":"static/chunks/"+(({3572:"70e0d97a",7902:"54a60aa6",7999:"6fcbdc68"})[e]||e)+"-"+({600:"539045311240f579",926:"156f32067d111d6b",1509:"56ac00cdaaecdf53",1668:"e3eabd0f6753c780",1783:"d9fb550fd324300c",2033:"8355304f13887db5",2676:"73b0ee7c80073a84",3563:"b8842744384391fe",3572:"aeaf0cdc26ba1a58",3817:"5cb6f63ed38072bd",4438:"c9a12ca15b6e9160",4475:"8bdfbd536fba8c48",5094:"8d53e403235d4ca6",6241:"30d7169d1010e5a4",6530:"a91e10cffa4200c4",6547:"1aaab011e6089042",6712:"781937c53a2c49da",6869:"11b3cd61c78598a7",7304:"53d85c55adc8f184",7324:"b53229c59a640880",7902:"d9747982e0a81f58",7999:"90be1a5480b8d353",9124:"a02f9e209e6e3cce",9487:"b17481605e513b83",9881:"419697138376e755"})[e]+".js"},p.miniCssF=function(e){return"static/css/a275cc2b185e04f8.css"},p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="_N_E:",p.l=function(e,t,n,c){if(r[e]){r[e].push(t);return}if(void 0!==n)for(var a,u,i=document.getElementsByTagName("script"),f=0;f<i.length;f++){var d=i[f];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==o+n){a=d;break}}a||(u=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,p.nc&&a.setAttribute("nonce",p.nc),a.setAttribute("data-webpack",o+n),a.src=p.tu(e)),r[e]=[t];var s=function(t,n){a.onerror=a.onload=null,clearTimeout(l);var o=r[e];if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach(function(e){return e(n)}),t)return t(n)},l=setTimeout(s.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=s.bind(null,a.onerror),a.onload=s.bind(null,a.onload),u&&document.head.appendChild(a)},p.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.tt=function(){return void 0===c&&(c={createScriptURL:function(e){return e}},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(c=trustedTypes.createPolicy("nextjs#bundler",c))),c},p.tu=function(e){return p.tt().createScriptURL(e)},p.p="/admin/_next/",a=function(e,t,n,r){var o=document.createElement("link");return o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=function(c){if(o.onerror=o.onload=null,"load"===c.type)n();else{var a=c&&("load"===c.type?"missing":c.type),u=c&&c.target&&c.target.href||t,i=Error("Loading CSS chunk "+e+" failed.\n("+u+")");i.code="CSS_CHUNK_LOAD_FAILED",i.type=a,i.request=u,o.parentNode.removeChild(o),r(i)}},o.href=t,document.head.appendChild(o),o},u=function(e,t){for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var o=n[r],c=o.getAttribute("data-href")||o.getAttribute("href");if("stylesheet"===o.rel&&(c===e||c===t))return o}for(var a=document.getElementsByTagName("style"),r=0;r<a.length;r++){var o=a[r],c=o.getAttribute("data-href");if(c===e||c===t)return o}},i={2272:0},p.f.miniCss=function(e,t){i[e]?t.push(i[e]):0!==i[e]&&({1627:1})[e]&&t.push(i[e]=new Promise(function(t,n){var r=p.miniCssF(e),o=p.p+r;if(u(r,o))return t();a(e,o,t,n)}).then(function(){i[e]=0},function(t){throw delete i[e],t}))},f={2272:0,7825:0},p.f.j=function(e,t){var n=p.o(f,e)?f[e]:void 0;if(0!==n){if(n)t.push(n[2]);else if(/^(1627|2272|7825)$/.test(e))f[e]=0;else{var r=new Promise(function(t,r){n=f[e]=[t,r]});t.push(n[2]=r);var o=p.p+p.u(e),c=Error();p.l(o,function(t){if(p.o(f,e)&&(0!==(n=f[e])&&(f[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",c.name="ChunkLoadError",c.type=r,c.request=o,n[1](c)}},"chunk-"+e,e)}}},p.O.j=function(e){return 0===f[e]},d=function(e,t){var n,r,o=t[0],c=t[1],a=t[2],u=0;if(o.some(function(e){return 0!==f[e]})){for(n in c)p.o(c,n)&&(p.m[n]=c[n]);if(a)var i=a(p)}for(e&&e(t);u<o.length;u++)r=o[u],p.o(f,r)&&f[r]&&f[r][0](),f[r]=0;return p.O(i)},(s=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(d.bind(null,0)),s.push=d.bind(null,s.push.bind(s)),p.nc=void 0}();
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/admin/_next/static/css/d08072df3a043c8d.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/admin/_next/static/chunks/webpack-77bb6efef9162945.js"/><script src="/admin/_next/static/chunks/fd9d1056-54169f07cd680d6c.js" async=""></script><script src="/admin/_next/static/chunks/2117-29b5fa47421595ad.js" async=""></script><script src="/admin/_next/static/chunks/main-app-55bcae20c77aaf0e.js" async=""></script><script src="/admin/_next/static/chunks/6fcbdc68-90be1a5480b8d353.js" async=""></script><script src="/admin/_next/static/chunks/70e0d97a-aeaf0cdc26ba1a58.js" async=""></script><script src="/admin/_next/static/chunks/54a60aa6-d9747982e0a81f58.js" async=""></script><script src="/admin/_next/static/chunks/5094-8d53e403235d4ca6.js" async=""></script><script src="/admin/_next/static/chunks/4438-c9a12ca15b6e9160.js" async=""></script><script src="/admin/_next/static/chunks/6530-a91e10cffa4200c4.js" async=""></script><script src="/admin/_next/static/chunks/6241-30d7169d1010e5a4.js" async=""></script><script src="/admin/_next/static/chunks/4475-8bdfbd536fba8c48.js" async=""></script><script src="/admin/_next/static/chunks/926-156f32067d111d6b.js" async=""></script><script src="/admin/_next/static/chunks/600-539045311240f579.js" async=""></script><script src="/admin/_next/static/chunks/1668-e3eabd0f6753c780.js" async=""></script><script src="/admin/_next/static/chunks/2676-73b0ee7c80073a84.js" async=""></script><script src="/admin/_next/static/chunks/1509-56ac00cdaaecdf53.js" async=""></script><script src="/admin/_next/static/chunks/9487-b17481605e513b83.js" async=""></script><script src="/admin/_next/static/chunks/6869-11b3cd61c78598a7.js" async=""></script><script src="/admin/_next/static/chunks/1783-d9fb550fd324300c.js" async=""></script><script src="/admin/_next/static/chunks/9881-419697138376e755.js" async=""></script><script src="/admin/_next/static/chunks/7324-b53229c59a640880.js" async=""></script><script src="/admin/_next/static/chunks/9124-a02f9e209e6e3cce.js" async=""></script><script src="/admin/_next/static/chunks/6712-781937c53a2c49da.js" async=""></script><script src="/admin/_next/static/chunks/6547-1aaab011e6089042.js" async=""></script><script src="/admin/_next/static/chunks/2033-8355304f13887db5.js" async=""></script><script src="/admin/_next/static/chunks/7304-53d85c55adc8f184.js" async=""></script><script src="/admin/_next/static/chunks/3817-2309d84b85956d4e.js" async=""></script><script src="/admin/_next/static/chunks/app/(authenticated)/activity-log/all-activity/page-ff48b4acd0fc42fe.js" async=""></script><script src="/admin/_next/static/chunks/8473-6598318371eca31b.js" async=""></script><script src="/admin/_next/static/chunks/3563-b8842744384391fe.js" async=""></script><script src="/admin/_next/static/chunks/478-2b8adfd5c2853600.js" async=""></script><script src="/admin/_next/static/chunks/6599-03e2f2327c30b4c1.js" async=""></script><script src="/admin/_next/static/chunks/app/(authenticated)/layout-2a4b221af5cbbade.js" async=""></script><script src="/admin/_next/static/chunks/4883-8a924721bb21b3b0.js" async=""></script><script src="/admin/_next/static/chunks/app/layout-64ac14a534e2809b.js" async=""></script><link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=G-FBCW8DT7KT" as="script"/><title>Baasix</title><script src="/admin/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased"><!--$--><div class="flex items-center justify-center min-h-screen bg-background"><div class="text-center"><div class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-primary border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]"></div><p class="mt-4 text-muted-foreground">Loading...</p></div></div><!--/$--><script src="/admin/_next/static/chunks/webpack-77bb6efef9162945.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/admin/_next/static/css/d08072df3a043c8d.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[12846,[],\"\"]\n4:I[19107,[],\"ClientPageRoot\"]\n5:I[11314,[\"7999\",\"static/chunks/6fcbdc68-90be1a5480b8d353.js\",\"3572\",\"static/chunks/70e0d97a-aeaf0cdc26ba1a58.js\",\"7902\",\"static/chunks/54a60aa6-d9747982e0a81f58.js\",\"5094\",\"static/chunks/5094-8d53e403235d4ca6.js\",\"4438\",\"static/chunks/4438-c9a12ca15b6e9160.js\",\"6530\",\"static/chunks/6530-a91e10cffa4200c4.js\",\"6241\",\"static/chunks/6241-30d7169d1010e5a4.js\",\"4475\",\"static/chunks/4475-8bdfbd536fba8c48.js\",\"926\",\"static/chunks/926-156f32067d111d6b.js\",\"600\",\"static/chunks/600-539045311240f579.js\",\"1668\",\"static/chunks/1668-e3eabd0f6753c780.js\",\"2676\",\"static/chunks/2676-73b0ee7c80073a84.js\",\"1509\",\"static/chunks/1509-56ac00cdaaecdf53.js\",\"9487\",\"static/chunks/9487-b17481605e513b83.js\",\"6869\",\"static/chunks/6869-11b3cd61c78598a7.js\",\"1783\",\"static/chunks/1783-d9fb550fd324300c.js\",\"9881\",\"static/chunks/9881-419697138376e755.js\",\"7324\",\"static/chunks/7324-b53229c59a640880.js\",\"9124\",\"static/chunks/9124-a02f9e209e6e3cce.js\",\"6712\",\"static/chunks/6712-781937c53a2c49da.js\",\"6547\",\"static/chunks/6547-1aaab011e6089042.js\",\"2033\",\"static/chunks/2033-8355304f13887db5.js\",\"7304\",\"static/chunks/7304-53d85c55adc8f184.js\",\"3817\",\"static/chunks/3817-2309d84b85956d4e.js\",\"8037\",\"static/chunks/app/(authenticated)/activity-log/all-activity/page-ff48b4acd0fc42fe.js\"],\"default\",1]\n6:I[4707,[],\"\"]\n7:I[36423,[],\"\"]\n8:I[7915,[\"7999\",\"static/chunks/6fcbdc68-90be1a5480b8d353.js\",\"5094\",\"static/chunks/5094-8d53e403235d4ca6.js\",\"4438\",\"static/chunks/4438-c9a12ca15b6e9160.js\",\"6530\",\"static/chunks/6530-a91e10cffa4200c4.js\",\"6241\",\"static/chunks/6241-30d7169d1010e5a4.js\",\"4475\",\"static/chunks/4475-8bdfbd536fba8c48.js\",\"926\",\"static/chunks/926-156f32067d111d6b.js\",\"600\",\"static/chunks/600-539045311240f579.js\",\"1668\",\"static/chunks/1668-e3eabd0f6753c780.js\",\"9124\",\"static/chunks/9124-a02f9e209e6e3cce.js\",\"8473\",\"static/chunks/8473-6598318371eca31b.js\",\"3563\",\"static/chunks/3563-b8842744384391fe.js\",\"478\",\"static/chunks/478-2b8adfd5c2853600.js\",\"6599\",\"static/chunks/6599-03e2f2327c30b4c1.js\",\"2760\",\""])</script><script>self.__next_f.push([1,"static/chunks/app/(authenticated)/layout-2a4b221af5cbbade.js\"],\"default\",1]\na:I[84821,[\"7999\",\"static/chunks/6fcbdc68-90be1a5480b8d353.js\",\"5094\",\"static/chunks/5094-8d53e403235d4ca6.js\",\"4438\",\"static/chunks/4438-c9a12ca15b6e9160.js\",\"6530\",\"static/chunks/6530-a91e10cffa4200c4.js\",\"6241\",\"static/chunks/6241-30d7169d1010e5a4.js\",\"1668\",\"static/chunks/1668-e3eabd0f6753c780.js\",\"6869\",\"static/chunks/6869-11b3cd61c78598a7.js\",\"8473\",\"static/chunks/8473-6598318371eca31b.js\",\"4883\",\"static/chunks/4883-8a924721bb21b3b0.js\",\"7304\",\"static/chunks/7304-53d85c55adc8f184.js\",\"3185\",\"static/chunks/app/layout-64ac14a534e2809b.js\"],\"default\",1]\n10:I[61060,[],\"\"]\n9:{}\nb:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\nc:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\nd:{\"display\":\"inline-block\"}\ne:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\n11:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"UqrExMMBuUZGJRB_oXaXk\",\"assetPrefix\":\"/admin\",\"urlParts\":[\"\",\"activity-log\",\"all-activity\",\"\"],\"initialTree\":[\"\",{\"children\":[\"(authenticated)\",{\"children\":[\"activity-log\",{\"children\":[\"all-activity\",{\"children\":[\"__PAGE__\",{}]}]}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"(authenticated)\",{\"children\":[\"activity-log\",{\"children\":[\"all-activity\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[\"$\",\"$L4\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$5\"}],null],null],null]},[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(authenticated)\",\"children\",\"activity-log\",\"children\",\"all-activity\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(authenticated)\",\"children\",\"activity-log\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[null,[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(authenticated)\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":\"$9\"}]],null],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/admin/_next/static/css/d08072df3a043c8d.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$La\",null,{\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$b\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$c\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$d\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$e\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":\"$9\"}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$Lf\"],\"globalErrorComponent\":\"$10\",\"missingSlots\":\"$W11\"}]\n"])</script><script>self.__next_f.push([1,"f:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}]]\n3:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/admin/_next/static/css/d08072df3a043c8d.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/admin/_next/static/chunks/webpack-351f818d8cb8b17a.js"/><script src="/admin/_next/static/chunks/fd9d1056-54169f07cd680d6c.js" async=""></script><script src="/admin/_next/static/chunks/2117-29b5fa47421595ad.js" async=""></script><script src="/admin/_next/static/chunks/main-app-55bcae20c77aaf0e.js" async=""></script><script src="/admin/_next/static/chunks/6fcbdc68-90be1a5480b8d353.js" async=""></script><script src="/admin/_next/static/chunks/70e0d97a-aeaf0cdc26ba1a58.js" async=""></script><script src="/admin/_next/static/chunks/54a60aa6-d9747982e0a81f58.js" async=""></script><script src="/admin/_next/static/chunks/5094-8d53e403235d4ca6.js" async=""></script><script src="/admin/_next/static/chunks/4438-c9a12ca15b6e9160.js" async=""></script><script src="/admin/_next/static/chunks/6530-a91e10cffa4200c4.js" async=""></script><script src="/admin/_next/static/chunks/6241-30d7169d1010e5a4.js" async=""></script><script src="/admin/_next/static/chunks/4475-8bdfbd536fba8c48.js" async=""></script><script src="/admin/_next/static/chunks/926-156f32067d111d6b.js" async=""></script><script src="/admin/_next/static/chunks/600-539045311240f579.js" async=""></script><script src="/admin/_next/static/chunks/1668-e3eabd0f6753c780.js" async=""></script><script src="/admin/_next/static/chunks/2676-73b0ee7c80073a84.js" async=""></script><script src="/admin/_next/static/chunks/1509-56ac00cdaaecdf53.js" async=""></script><script src="/admin/_next/static/chunks/9487-b17481605e513b83.js" async=""></script><script src="/admin/_next/static/chunks/6869-11b3cd61c78598a7.js" async=""></script><script src="/admin/_next/static/chunks/1783-d9fb550fd324300c.js" async=""></script><script src="/admin/_next/static/chunks/9881-419697138376e755.js" async=""></script><script src="/admin/_next/static/chunks/7324-b53229c59a640880.js" async=""></script><script src="/admin/_next/static/chunks/9124-a02f9e209e6e3cce.js" async=""></script><script src="/admin/_next/static/chunks/6712-781937c53a2c49da.js" async=""></script><script src="/admin/_next/static/chunks/6547-1aaab011e6089042.js" async=""></script><script src="/admin/_next/static/chunks/2033-8355304f13887db5.js" async=""></script><script src="/admin/_next/static/chunks/7304-53d85c55adc8f184.js" async=""></script><script src="/admin/_next/static/chunks/3817-5cb6f63ed38072bd.js" async=""></script><script src="/admin/_next/static/chunks/app/(authenticated)/activity-log/all-activity/page-ff48b4acd0fc42fe.js" async=""></script><script src="/admin/_next/static/chunks/8473-6598318371eca31b.js" async=""></script><script src="/admin/_next/static/chunks/3563-b8842744384391fe.js" async=""></script><script src="/admin/_next/static/chunks/478-2b8adfd5c2853600.js" async=""></script><script src="/admin/_next/static/chunks/6599-03e2f2327c30b4c1.js" async=""></script><script src="/admin/_next/static/chunks/app/(authenticated)/layout-2a4b221af5cbbade.js" async=""></script><script src="/admin/_next/static/chunks/4883-8a924721bb21b3b0.js" async=""></script><script src="/admin/_next/static/chunks/app/layout-64ac14a534e2809b.js" async=""></script><link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=G-FBCW8DT7KT" as="script"/><title>Baasix</title><script src="/admin/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased"><!--$--><div class="flex items-center justify-center min-h-screen bg-background"><div class="text-center"><div class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-primary border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]"></div><p class="mt-4 text-muted-foreground">Loading...</p></div></div><!--/$--><script src="/admin/_next/static/chunks/webpack-351f818d8cb8b17a.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/admin/_next/static/css/d08072df3a043c8d.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[12846,[],\"\"]\n4:I[19107,[],\"ClientPageRoot\"]\n5:I[11314,[\"7999\",\"static/chunks/6fcbdc68-90be1a5480b8d353.js\",\"3572\",\"static/chunks/70e0d97a-aeaf0cdc26ba1a58.js\",\"7902\",\"static/chunks/54a60aa6-d9747982e0a81f58.js\",\"5094\",\"static/chunks/5094-8d53e403235d4ca6.js\",\"4438\",\"static/chunks/4438-c9a12ca15b6e9160.js\",\"6530\",\"static/chunks/6530-a91e10cffa4200c4.js\",\"6241\",\"static/chunks/6241-30d7169d1010e5a4.js\",\"4475\",\"static/chunks/4475-8bdfbd536fba8c48.js\",\"926\",\"static/chunks/926-156f32067d111d6b.js\",\"600\",\"static/chunks/600-539045311240f579.js\",\"1668\",\"static/chunks/1668-e3eabd0f6753c780.js\",\"2676\",\"static/chunks/2676-73b0ee7c80073a84.js\",\"1509\",\"static/chunks/1509-56ac00cdaaecdf53.js\",\"9487\",\"static/chunks/9487-b17481605e513b83.js\",\"6869\",\"static/chunks/6869-11b3cd61c78598a7.js\",\"1783\",\"static/chunks/1783-d9fb550fd324300c.js\",\"9881\",\"static/chunks/9881-419697138376e755.js\",\"7324\",\"static/chunks/7324-b53229c59a640880.js\",\"9124\",\"static/chunks/9124-a02f9e209e6e3cce.js\",\"6712\",\"static/chunks/6712-781937c53a2c49da.js\",\"6547\",\"static/chunks/6547-1aaab011e6089042.js\",\"2033\",\"static/chunks/2033-8355304f13887db5.js\",\"7304\",\"static/chunks/7304-53d85c55adc8f184.js\",\"3817\",\"static/chunks/3817-5cb6f63ed38072bd.js\",\"8037\",\"static/chunks/app/(authenticated)/activity-log/all-activity/page-ff48b4acd0fc42fe.js\"],\"default\",1]\n6:I[4707,[],\"\"]\n7:I[36423,[],\"\"]\n8:I[7915,[\"7999\",\"static/chunks/6fcbdc68-90be1a5480b8d353.js\",\"5094\",\"static/chunks/5094-8d53e403235d4ca6.js\",\"4438\",\"static/chunks/4438-c9a12ca15b6e9160.js\",\"6530\",\"static/chunks/6530-a91e10cffa4200c4.js\",\"6241\",\"static/chunks/6241-30d7169d1010e5a4.js\",\"4475\",\"static/chunks/4475-8bdfbd536fba8c48.js\",\"926\",\"static/chunks/926-156f32067d111d6b.js\",\"600\",\"static/chunks/600-539045311240f579.js\",\"1668\",\"static/chunks/1668-e3eabd0f6753c780.js\",\"9124\",\"static/chunks/9124-a02f9e209e6e3cce.js\",\"8473\",\"static/chunks/8473-6598318371eca31b.js\",\"3563\",\"static/chunks/3563-b8842744384391fe.js\",\"478\",\"static/chunks/478-2b8adfd5c2853600.js\",\"6599\",\"static/chunks/6599-03e2f2327c30b4c1.js\",\"2760\",\""])</script><script>self.__next_f.push([1,"static/chunks/app/(authenticated)/layout-2a4b221af5cbbade.js\"],\"default\",1]\na:I[84821,[\"7999\",\"static/chunks/6fcbdc68-90be1a5480b8d353.js\",\"5094\",\"static/chunks/5094-8d53e403235d4ca6.js\",\"4438\",\"static/chunks/4438-c9a12ca15b6e9160.js\",\"6530\",\"static/chunks/6530-a91e10cffa4200c4.js\",\"6241\",\"static/chunks/6241-30d7169d1010e5a4.js\",\"1668\",\"static/chunks/1668-e3eabd0f6753c780.js\",\"6869\",\"static/chunks/6869-11b3cd61c78598a7.js\",\"8473\",\"static/chunks/8473-6598318371eca31b.js\",\"4883\",\"static/chunks/4883-8a924721bb21b3b0.js\",\"7304\",\"static/chunks/7304-53d85c55adc8f184.js\",\"3185\",\"static/chunks/app/layout-64ac14a534e2809b.js\"],\"default\",1]\n10:I[61060,[],\"\"]\n9:{}\nb:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\nc:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\nd:{\"display\":\"inline-block\"}\ne:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\n11:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"0OyjnKLbfIe0glU-jWgWZ\",\"assetPrefix\":\"/admin\",\"urlParts\":[\"\",\"activity-log\",\"all-activity\",\"\"],\"initialTree\":[\"\",{\"children\":[\"(authenticated)\",{\"children\":[\"activity-log\",{\"children\":[\"all-activity\",{\"children\":[\"__PAGE__\",{}]}]}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"(authenticated)\",{\"children\":[\"activity-log\",{\"children\":[\"all-activity\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[\"$\",\"$L4\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$5\"}],null],null],null]},[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(authenticated)\",\"children\",\"activity-log\",\"children\",\"all-activity\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(authenticated)\",\"children\",\"activity-log\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[null,[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(authenticated)\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":\"$9\"}]],null],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/admin/_next/static/css/d08072df3a043c8d.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$La\",null,{\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$b\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$c\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$d\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$e\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":\"$9\"}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$Lf\"],\"globalErrorComponent\":\"$10\",\"missingSlots\":\"$W11\"}]\n"])</script><script>self.__next_f.push([1,"f:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}]]\n3:null\n"])</script></body></html>