tanstack_start_ts 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) hide show
  1. package/.wrangler/deploy/config.json +1 -0
  2. package/bunfig.toml +6 -0
  3. package/components.json +22 -0
  4. package/config.json +0 -0
  5. package/dist/client/.assetsignore +2 -0
  6. package/dist/client/assets/ProductCard-DbIkJAE-.js +1 -0
  7. package/dist/client/assets/about-AskxOruL.js +1 -0
  8. package/dist/client/assets/admin-BZVcAQM3.js +1 -0
  9. package/dist/client/assets/admin.functions--RdVcuBx.js +1 -0
  10. package/dist/client/assets/admin.login-QgrF_9Fp.js +1 -0
  11. package/dist/client/assets/affiliate-disclosure-BIAsA-HO.js +1 -0
  12. package/dist/client/assets/categories-D0N418mK.js +1 -0
  13. package/dist/client/assets/category._slug-aCaQm14E.js +1 -0
  14. package/dist/client/assets/contact-PhvO-V15.js +1 -0
  15. package/dist/client/assets/faq-BsiHWPM8.js +1 -0
  16. package/dist/client/assets/hero-bg-BP2eVUIX.jpg +0 -0
  17. package/dist/client/assets/index-BU9rnkF3.js +1 -0
  18. package/dist/client/assets/index-BpJWZkva.js +1 -0
  19. package/dist/client/assets/index-vRX-zAyq.js +1 -0
  20. package/dist/client/assets/login-DteE0ZGp.js +1 -0
  21. package/dist/client/assets/logo-pSNfLJQk.png +0 -0
  22. package/dist/client/assets/privacy-B_Pu7040.js +1 -0
  23. package/dist/client/assets/product-links-BkZ41Gv3.js +1 -0
  24. package/dist/client/assets/product._id-BVUysCW-.js +1 -0
  25. package/dist/client/assets/products.functions-cGzRziKO.js +1 -0
  26. package/dist/client/assets/profile-CveRcKq2.js +1 -0
  27. package/dist/client/assets/reset-password-ySEjItX_.js +1 -0
  28. package/dist/client/assets/saved-CHtdQDJF.js +1 -0
  29. package/dist/client/assets/search-CXWfET1y.js +1 -0
  30. package/dist/client/assets/signup-CEx90iuV.js +1 -0
  31. package/dist/client/assets/styles-DrNJG0BO.css +1 -0
  32. package/dist/client/assets/terms-VqJ9kX9b.js +1 -0
  33. package/dist/client/assets/update-password-C-d0ix5e.js +1 -0
  34. package/dist/client/assets/vendor-aria-hidden-DvXkyWUv.js +1 -0
  35. package/dist/client/assets/vendor-class-variance-authority-5VPnzWs2.js +1 -0
  36. package/dist/client/assets/vendor-clsx-B-dksMZM.js +1 -0
  37. package/dist/client/assets/vendor-cookie-es-CS0aJGDi.js +1 -0
  38. package/dist/client/assets/vendor-detect-node-es-l0sNRNKZ.js +1 -0
  39. package/dist/client/assets/vendor-floating-ui-core-BlUy28sp.js +1 -0
  40. package/dist/client/assets/vendor-floating-ui-dom-BxK0hn2R.js +1 -0
  41. package/dist/client/assets/vendor-floating-ui-react-dom-Bas3975S.js +1 -0
  42. package/dist/client/assets/vendor-floating-ui-utils-BfYUAVcw.js +1 -0
  43. package/dist/client/assets/vendor-framer-motion-BMdL-cuX.js +9 -0
  44. package/dist/client/assets/vendor-get-nonce-C-Z93AgS.js +1 -0
  45. package/dist/client/assets/vendor-iceberg-js-tWD4K6Lg.js +1 -0
  46. package/dist/client/assets/vendor-lovable.dev-cloud-auth-js-VuzqtJVg.js +1 -0
  47. package/dist/client/assets/vendor-lucide-react-b5K2fehp.js +1 -0
  48. package/dist/client/assets/vendor-motion-dom-BETJamZt.js +1 -0
  49. package/dist/client/assets/vendor-motion-utils-BuWewJbj.js +1 -0
  50. package/dist/client/assets/vendor-radix-ui-primitive-Dc_FVRD7.js +1 -0
  51. package/dist/client/assets/vendor-radix-ui-react-accordion-C22Rgxe9.js +1 -0
  52. package/dist/client/assets/vendor-radix-ui-react-arrow-DMHj2mKI.js +1 -0
  53. package/dist/client/assets/vendor-radix-ui-react-avatar-CVPBkFXg.js +1 -0
  54. package/dist/client/assets/vendor-radix-ui-react-collapsible-BvM-4sKX.js +1 -0
  55. package/dist/client/assets/vendor-radix-ui-react-collection-D9KtqmHm.js +1 -0
  56. package/dist/client/assets/vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js +1 -0
  57. package/dist/client/assets/vendor-radix-ui-react-context-CAqqn5Nx.js +1 -0
  58. package/dist/client/assets/vendor-radix-ui-react-dialog-DZ01vOLq.js +5 -0
  59. package/dist/client/assets/vendor-radix-ui-react-direction-DxZwNuei.js +1 -0
  60. package/dist/client/assets/vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js +1 -0
  61. package/dist/client/assets/vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js +1 -0
  62. package/dist/client/assets/vendor-radix-ui-react-focus-guards-DgWoZ-fP.js +1 -0
  63. package/dist/client/assets/vendor-radix-ui-react-focus-scope-BLIu5QaL.js +1 -0
  64. package/dist/client/assets/vendor-radix-ui-react-id-bpga_rLa.js +1 -0
  65. package/dist/client/assets/vendor-radix-ui-react-menu-D0qf2r6_.js +1 -0
  66. package/dist/client/assets/vendor-radix-ui-react-popper-BafIylxU.js +1 -0
  67. package/dist/client/assets/vendor-radix-ui-react-portal-BnAsfNCS.js +1 -0
  68. package/dist/client/assets/vendor-radix-ui-react-presence-C-f3UKQ2.js +1 -0
  69. package/dist/client/assets/vendor-radix-ui-react-primitive-zTHwXNoz.js +1 -0
  70. package/dist/client/assets/vendor-radix-ui-react-roving-focus-jyJB8K2E.js +1 -0
  71. package/dist/client/assets/vendor-radix-ui-react-slot-6LXHJrHl.js +1 -0
  72. package/dist/client/assets/vendor-radix-ui-react-use-callback-ref-E91aPc6s.js +1 -0
  73. package/dist/client/assets/vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js +1 -0
  74. package/dist/client/assets/vendor-radix-ui-react-use-effect-event-CPeX4A3c.js +1 -0
  75. package/dist/client/assets/vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js +1 -0
  76. package/dist/client/assets/vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js +1 -0
  77. package/dist/client/assets/vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js +1 -0
  78. package/dist/client/assets/vendor-radix-ui-react-use-size-CXS04sct.js +1 -0
  79. package/dist/client/assets/vendor-react-dom-BnNs-kzm.js +9 -0
  80. package/dist/client/assets/vendor-react-gJPiVnX5.js +1 -0
  81. package/dist/client/assets/vendor-react-remove-scroll-DHKl-IMP.js +4 -0
  82. package/dist/client/assets/vendor-react-remove-scroll-bar-CSjdInc2.js +38 -0
  83. package/dist/client/assets/vendor-react-style-singleton-BqHpkgXn.js +1 -0
  84. package/dist/client/assets/vendor-scheduler-7OC5HNn7.js +1 -0
  85. package/dist/client/assets/vendor-seroval-B_Fur-nl.js +3 -0
  86. package/dist/client/assets/vendor-seroval-plugins-CBHnPkZJ.js +1 -0
  87. package/dist/client/assets/vendor-sonner-71-LdGG1.js +1 -0
  88. package/dist/client/assets/vendor-supabase-auth-js-DWrN-bIx.js +18 -0
  89. package/dist/client/assets/vendor-supabase-functions-js-uY_V-TxC.js +1 -0
  90. package/dist/client/assets/vendor-supabase-phoenix-BzEf37Ve.js +2 -0
  91. package/dist/client/assets/vendor-supabase-postgrest-js-C4rBWbCx.js +4 -0
  92. package/dist/client/assets/vendor-supabase-realtime-js-D6BlOYKE.js +23 -0
  93. package/dist/client/assets/vendor-supabase-storage-js-BG98L3Zz.js +1 -0
  94. package/dist/client/assets/vendor-supabase-supabase-js-DCCzdwBJ.js +1 -0
  95. package/dist/client/assets/vendor-tailwind-merge-Ct12j0u0.js +1 -0
  96. package/dist/client/assets/vendor-tanstack-history-C617CaxG.js +1 -0
  97. package/dist/client/assets/vendor-tanstack-query-core-7wuJJ5ZL.js +1 -0
  98. package/dist/client/assets/vendor-tanstack-react-query-HImzo8sX.js +1 -0
  99. package/dist/client/assets/vendor-tanstack-react-router-sIZLK-LU.js +1 -0
  100. package/dist/client/assets/vendor-tanstack-react-start-client-GiYCfWmf.js +1 -0
  101. package/dist/client/assets/vendor-tanstack-react-store-EvTi3ahh.js +1 -0
  102. package/dist/client/assets/vendor-tanstack-router-core-Cr7bYUZv.js +1 -0
  103. package/dist/client/assets/vendor-tanstack-start-client-core-C-00BBOu.js +2 -0
  104. package/dist/client/assets/vendor-tanstack-start-fn-stubs-l0sNRNKZ.js +1 -0
  105. package/dist/client/assets/vendor-tanstack-store-BC7mA7pq.js +1 -0
  106. package/dist/client/assets/vendor-tslib-Du-meQkk.js +1 -0
  107. package/dist/client/assets/vendor-use-callback-ref-C_fIAtot.js +1 -0
  108. package/dist/client/assets/vendor-use-sidecar-Bh0DDN6h.js +1 -0
  109. package/dist/client/assets/vendor-use-sync-external-store-ZvKHXaIn.js +1 -0
  110. package/dist/client/assets/vendor-vercel-analytics-DwPM5BWs.js +1 -0
  111. package/dist/client/assets/vendor-zod-By9teAtI.js +1 -0
  112. package/dist/client/robots.txt +2 -0
  113. package/dist/server/.dev.vars +5 -0
  114. package/dist/server/.vite/manifest.json +2528 -0
  115. package/dist/server/assets/ProductCard-CUPXy5Eo.js +149 -0
  116. package/dist/server/assets/_tanstack-start-manifest_v-do7vTWFD.js +4 -0
  117. package/dist/server/assets/about-TfKQw0Ga.js +28 -0
  118. package/dist/server/assets/admin-DspfJOJk.js +578 -0
  119. package/dist/server/assets/admin.functions-B78ppWLR.js +645 -0
  120. package/dist/server/assets/admin.functions-BWlKBoTL.js +93 -0
  121. package/dist/server/assets/admin.login-CV7QfeA6.js +139 -0
  122. package/dist/server/assets/affiliate-disclosure-B1wI1cDb.js +86 -0
  123. package/dist/server/assets/auth-middleware-Cn49MidW.js +62 -0
  124. package/dist/server/assets/categories-Z7jnAYZP.js +108 -0
  125. package/dist/server/assets/category._slug-D0XY3FGK.js +112 -0
  126. package/dist/server/assets/contact-IzyONsXs.js +104 -0
  127. package/dist/server/assets/faq-aRhB_CR3.js +133 -0
  128. package/dist/server/assets/hero-bg-BP2eVUIX.jpg +0 -0
  129. package/dist/server/assets/index-BTPHbXw9.js +221 -0
  130. package/dist/server/assets/index-ByJkHkrU.js +30 -0
  131. package/dist/server/assets/login-Dvy5Dm0f.js +175 -0
  132. package/dist/server/assets/logo-pSNfLJQk.png +0 -0
  133. package/dist/server/assets/privacy-B6Wiez1P.js +93 -0
  134. package/dist/server/assets/product-links-CGYEPP56.js +16 -0
  135. package/dist/server/assets/product._id-BpRa-1z0.js +231 -0
  136. package/dist/server/assets/products.functions-DSlmibYN.js +209 -0
  137. package/dist/server/assets/products.functions-DlHkRiqi.js +24 -0
  138. package/dist/server/assets/profile-B0NWzVAZ.js +314 -0
  139. package/dist/server/assets/reset-password-CY-rmqMr.js +115 -0
  140. package/dist/server/assets/saved-7FA6Dbom.js +126 -0
  141. package/dist/server/assets/search-Yw5c_fZa.js +329 -0
  142. package/dist/server/assets/signup-UPzgZo4i.js +143 -0
  143. package/dist/server/assets/styles-DrNJG0BO.css +1 -0
  144. package/dist/server/assets/terms-CMnX95bP.js +89 -0
  145. package/dist/server/assets/update-password-Cr94ea8n.js +131 -0
  146. package/dist/server/assets/vendor-aria-hidden-DPa16MWu.js +122 -0
  147. package/dist/server/assets/vendor-class-variance-authority-0YxJPB9Y.js +44 -0
  148. package/dist/server/assets/vendor-cloudflare-unenv-preset-ya0VEFBz.js +250 -0
  149. package/dist/server/assets/vendor-clsx-DgYk2OaC.js +16 -0
  150. package/dist/server/assets/vendor-cookie-es-DAoofYiI.js +44 -0
  151. package/dist/server/assets/vendor-detect-node-es-l0sNRNKZ.js +1 -0
  152. package/dist/server/assets/vendor-floating-ui-core-3tkK0THV.js +726 -0
  153. package/dist/server/assets/vendor-floating-ui-dom-C-cPtgJv.js +626 -0
  154. package/dist/server/assets/vendor-floating-ui-react-dom-CRG6gBpH.js +319 -0
  155. package/dist/server/assets/vendor-floating-ui-utils-DmXANH-E.js +320 -0
  156. package/dist/server/assets/vendor-framer-motion-X4zAkX3J.js +1979 -0
  157. package/dist/server/assets/vendor-get-nonce-DiSj3EHl.js +9 -0
  158. package/dist/server/assets/vendor-h3-v2-CCobnLY5.js +287 -0
  159. package/dist/server/assets/vendor-iceberg-js-bHCkXyJn.js +534 -0
  160. package/dist/server/assets/vendor-isbot-CZ7WjwVs.js +21 -0
  161. package/dist/server/assets/vendor-lovable.dev-cloud-auth-js-BE03njZw.js +180 -0
  162. package/dist/server/assets/vendor-lucide-react-Ddew6HYb.js +458 -0
  163. package/dist/server/assets/vendor-motion-dom-D2MTwGIG.js +5983 -0
  164. package/dist/server/assets/vendor-motion-utils-LJlIFN6m.js +161 -0
  165. package/dist/server/assets/vendor-radix-ui-primitive-B-mNdDrH.js +11 -0
  166. package/dist/server/assets/vendor-radix-ui-react-accordion-1Izf6x00.js +308 -0
  167. package/dist/server/assets/vendor-radix-ui-react-arrow-B882lnFK.js +23 -0
  168. package/dist/server/assets/vendor-radix-ui-react-avatar-BVgZt2Ab.js +209 -0
  169. package/dist/server/assets/vendor-radix-ui-react-collapsible-DCBbMZiS.js +147 -0
  170. package/dist/server/assets/vendor-radix-ui-react-collection-BZ2srfgU.js +150 -0
  171. package/dist/server/assets/vendor-radix-ui-react-compose-refs-D3qsKVk1.js +39 -0
  172. package/dist/server/assets/vendor-radix-ui-react-context-BVoNDLue.js +78 -0
  173. package/dist/server/assets/vendor-radix-ui-react-dialog-DlxMaNYK.js +406 -0
  174. package/dist/server/assets/vendor-radix-ui-react-direction-Dt_WDL1t.js +9 -0
  175. package/dist/server/assets/vendor-radix-ui-react-dismissable-layer-CjsuPohV.js +210 -0
  176. package/dist/server/assets/vendor-radix-ui-react-dropdown-menu-DVxKumY8.js +263 -0
  177. package/dist/server/assets/vendor-radix-ui-react-focus-guards-D_6NoePE.js +29 -0
  178. package/dist/server/assets/vendor-radix-ui-react-focus-scope-DEIhTJJH.js +206 -0
  179. package/dist/server/assets/vendor-radix-ui-react-id-DFFpgh6m.js +14 -0
  180. package/dist/server/assets/vendor-radix-ui-react-menu-CiTMLwjT.js +893 -0
  181. package/dist/server/assets/vendor-radix-ui-react-popper-23Ye2Vyc.js +286 -0
  182. package/dist/server/assets/vendor-radix-ui-react-portal-CZCH5uPk.js +16 -0
  183. package/dist/server/assets/vendor-radix-ui-react-presence-CaAULlDU.js +128 -0
  184. package/dist/server/assets/vendor-radix-ui-react-primitive-BeOk3UYa.js +124 -0
  185. package/dist/server/assets/vendor-radix-ui-react-roving-focus-DES9GR8l.js +224 -0
  186. package/dist/server/assets/vendor-radix-ui-react-slot-DUhZbzoH.js +103 -0
  187. package/dist/server/assets/vendor-radix-ui-react-use-callback-ref-BynBgohw.js +11 -0
  188. package/dist/server/assets/vendor-radix-ui-react-use-controllable-state-C9KpT6DG.js +69 -0
  189. package/dist/server/assets/vendor-radix-ui-react-use-effect-event-gpNY2xjS.js +1 -0
  190. package/dist/server/assets/vendor-radix-ui-react-use-escape-keydown-CcYRQ2pp.js +17 -0
  191. package/dist/server/assets/vendor-radix-ui-react-use-is-hydrated-D_LcBPXY.js +15 -0
  192. package/dist/server/assets/vendor-radix-ui-react-use-layout-effect-1LNLXAjr.js +6 -0
  193. package/dist/server/assets/vendor-radix-ui-react-use-size-D6fiKJQo.js +39 -0
  194. package/dist/server/assets/vendor-react-DvBrY0qp.js +511 -0
  195. package/dist/server/assets/vendor-react-dom-yvMLPM0j.js +10484 -0
  196. package/dist/server/assets/vendor-react-remove-scroll-BNtiEvVN.js +328 -0
  197. package/dist/server/assets/vendor-react-remove-scroll-bar-hLqRASRk.js +82 -0
  198. package/dist/server/assets/vendor-react-style-singleton-BXjcXskB.js +69 -0
  199. package/dist/server/assets/vendor-rou3-3NaGPdI8.js +8 -0
  200. package/dist/server/assets/vendor-seroval-dJyC-Zhz.js +1775 -0
  201. package/dist/server/assets/vendor-seroval-plugins-Pq_U2meB.js +58 -0
  202. package/dist/server/assets/vendor-sonner-CqbjhsRh.js +1086 -0
  203. package/dist/server/assets/vendor-srvx-BA-baEX9.js +6 -0
  204. package/dist/server/assets/vendor-supabase-auth-js-D4xjVprw.js +7602 -0
  205. package/dist/server/assets/vendor-supabase-functions-js-sWy4UYn1.js +322 -0
  206. package/dist/server/assets/vendor-supabase-phoenix-Bw3Uh2Nn.js +1777 -0
  207. package/dist/server/assets/vendor-supabase-postgrest-js-AO-BXa7I.js +4938 -0
  208. package/dist/server/assets/vendor-supabase-realtime-js-BtdNgJbm.js +2111 -0
  209. package/dist/server/assets/vendor-supabase-storage-js-Dk_MrPYO.js +2679 -0
  210. package/dist/server/assets/vendor-supabase-supabase-js-D1EEtG3j.js +697 -0
  211. package/dist/server/assets/vendor-tailwind-merge-BHb_obmC.js +3255 -0
  212. package/dist/server/assets/vendor-tanstack-history-C4pKJmkt.js +204 -0
  213. package/dist/server/assets/vendor-tanstack-query-core-PwwTR5ld.js +2552 -0
  214. package/dist/server/assets/vendor-tanstack-react-query-hhHzXAK1.js +190 -0
  215. package/dist/server/assets/vendor-tanstack-react-router-XzqpA65A.js +1120 -0
  216. package/dist/server/assets/vendor-tanstack-react-start-RvWUpvat.js +37 -0
  217. package/dist/server/assets/vendor-tanstack-react-start-client-gpNY2xjS.js +1 -0
  218. package/dist/server/assets/vendor-tanstack-react-start-server-uj_Y9pEN.js +15 -0
  219. package/dist/server/assets/vendor-tanstack-react-store-gpNY2xjS.js +1 -0
  220. package/dist/server/assets/vendor-tanstack-router-core-6wywV3KN.js +4252 -0
  221. package/dist/server/assets/vendor-tanstack-start-client-core-DoOKV2pA.js +1741 -0
  222. package/dist/server/assets/vendor-tanstack-start-fn-stubs-l0sNRNKZ.js +1 -0
  223. package/dist/server/assets/vendor-tanstack-start-server-core-CsAstXv7.js +1421 -0
  224. package/dist/server/assets/vendor-tanstack-start-storage-context-DgH9hIJT.js +17 -0
  225. package/dist/server/assets/vendor-tanstack-store-l0sNRNKZ.js +1 -0
  226. package/dist/server/assets/vendor-tslib-_8ICaZ64.js +67 -0
  227. package/dist/server/assets/vendor-unenv-DUvF4YIF.js +544 -0
  228. package/dist/server/assets/vendor-use-callback-ref-DMFDRvmi.js +66 -0
  229. package/dist/server/assets/vendor-use-sidecar-DG1tHua4.js +106 -0
  230. package/dist/server/assets/vendor-use-sync-external-store-rZ8vi0It.js +64 -0
  231. package/dist/server/assets/vendor-vercel-analytics-oP8BDp0L.js +168 -0
  232. package/dist/server/assets/vendor-zod-BRyQdbC-.js +3580 -0
  233. package/dist/server/index.js +158 -0
  234. package/dist/server/wrangler.json +1 -0
  235. package/enable-powershell.ps1 +7 -0
  236. package/eslint.config.js +41 -0
  237. package/lint.bat +4 -0
  238. package/package.json +95 -0
  239. package/public/robots.txt +2 -0
  240. package/run-npm-build.cjs +20 -0
  241. package/run-npm-build.js +20 -0
  242. package/src/assets/hero-bg.jpg +0 -0
  243. package/src/assets/logo.png +0 -0
  244. package/src/components/scrollsy/Footer.tsx +68 -0
  245. package/src/components/scrollsy/LiveTicker.tsx +31 -0
  246. package/src/components/scrollsy/Logo.tsx +28 -0
  247. package/src/components/scrollsy/Nav.tsx +255 -0
  248. package/src/components/scrollsy/ProductCard.tsx +190 -0
  249. package/src/components/scrollsy/ProductFilters.tsx +226 -0
  250. package/src/components/scrollsy/SupportWidget.tsx +197 -0
  251. package/src/components/ui/accordion.tsx +51 -0
  252. package/src/components/ui/alert-dialog.tsx +115 -0
  253. package/src/components/ui/alert.tsx +49 -0
  254. package/src/components/ui/aspect-ratio.tsx +5 -0
  255. package/src/components/ui/avatar.tsx +47 -0
  256. package/src/components/ui/badge.tsx +32 -0
  257. package/src/components/ui/breadcrumb.tsx +101 -0
  258. package/src/components/ui/button.tsx +49 -0
  259. package/src/components/ui/calendar.tsx +177 -0
  260. package/src/components/ui/card.tsx +55 -0
  261. package/src/components/ui/carousel.tsx +240 -0
  262. package/src/components/ui/chart.tsx +331 -0
  263. package/src/components/ui/checkbox.tsx +26 -0
  264. package/src/components/ui/collapsible.tsx +11 -0
  265. package/src/components/ui/command.tsx +143 -0
  266. package/src/components/ui/context-menu.tsx +187 -0
  267. package/src/components/ui/dialog.tsx +104 -0
  268. package/src/components/ui/drawer.tsx +98 -0
  269. package/src/components/ui/dropdown-menu.tsx +188 -0
  270. package/src/components/ui/form.tsx +171 -0
  271. package/src/components/ui/hover-card.tsx +27 -0
  272. package/src/components/ui/input-otp.tsx +69 -0
  273. package/src/components/ui/input.tsx +22 -0
  274. package/src/components/ui/label.tsx +21 -0
  275. package/src/components/ui/menubar.tsx +229 -0
  276. package/src/components/ui/navigation-menu.tsx +120 -0
  277. package/src/components/ui/pagination.tsx +98 -0
  278. package/src/components/ui/popover.tsx +31 -0
  279. package/src/components/ui/progress.tsx +25 -0
  280. package/src/components/ui/radio-group.tsx +36 -0
  281. package/src/components/ui/resizable.tsx +37 -0
  282. package/src/components/ui/scroll-area.tsx +44 -0
  283. package/src/components/ui/select.tsx +152 -0
  284. package/src/components/ui/separator.tsx +24 -0
  285. package/src/components/ui/sheet.tsx +122 -0
  286. package/src/components/ui/sidebar.tsx +744 -0
  287. package/src/components/ui/skeleton.tsx +7 -0
  288. package/src/components/ui/slider.tsx +23 -0
  289. package/src/components/ui/sonner.tsx +23 -0
  290. package/src/components/ui/switch.tsx +27 -0
  291. package/src/components/ui/table.tsx +94 -0
  292. package/src/components/ui/tabs.tsx +53 -0
  293. package/src/components/ui/textarea.tsx +21 -0
  294. package/src/components/ui/toggle-group.tsx +57 -0
  295. package/src/components/ui/toggle.tsx +42 -0
  296. package/src/components/ui/tooltip.tsx +32 -0
  297. package/src/hooks/use-auth.ts +26 -0
  298. package/src/hooks/use-mobile.tsx +19 -0
  299. package/src/integrations/lovable/index.ts +41 -0
  300. package/src/lib/admin.functions.ts +564 -0
  301. package/src/lib/error-capture.ts +27 -0
  302. package/src/lib/error-page.ts +30 -0
  303. package/src/lib/product-links.ts +39 -0
  304. package/src/lib/products.functions.ts +101 -0
  305. package/src/lib/utils.ts +6 -0
  306. package/src/routeTree.gen.ts +480 -0
  307. package/src/router.tsx +16 -0
  308. package/src/routes/__root.tsx +177 -0
  309. package/src/routes/about.tsx +66 -0
  310. package/src/routes/admin.login.tsx +95 -0
  311. package/src/routes/admin.tsx +811 -0
  312. package/src/routes/affiliate-disclosure.tsx +35 -0
  313. package/src/routes/categories.tsx +57 -0
  314. package/src/routes/category.$slug.tsx +51 -0
  315. package/src/routes/contact.tsx +69 -0
  316. package/src/routes/faq.tsx +63 -0
  317. package/src/routes/index.tsx +269 -0
  318. package/src/routes/login.tsx +160 -0
  319. package/src/routes/privacy.tsx +39 -0
  320. package/src/routes/product.$id.tsx +212 -0
  321. package/src/routes/profile.tsx +393 -0
  322. package/src/routes/reset-password.tsx +71 -0
  323. package/src/routes/saved.tsx +83 -0
  324. package/src/routes/search.tsx +136 -0
  325. package/src/routes/signup.tsx +108 -0
  326. package/src/routes/sitemap[.]xml.ts +34 -0
  327. package/src/routes/terms.tsx +40 -0
  328. package/src/routes/update-password.tsx +91 -0
  329. package/src/server.ts +80 -0
  330. package/src/start.ts +24 -0
  331. package/src/styles.css +333 -0
  332. package/terminal-test-output.txt +1 -0
  333. package/tsconfig.json +27 -0
  334. package/vercel.json +26 -0
  335. package/vite.config.ts +38 -0
  336. package/wrangler.jsonc +7 -0
@@ -0,0 +1,697 @@
1
+ import { P as PostgrestClient } from "./vendor-supabase-postgrest-js-AO-BXa7I.js";
2
+ import { R as RealtimeClient } from "./vendor-supabase-realtime-js-BtdNgJbm.js";
3
+ import { S as StorageClient } from "./vendor-supabase-storage-js-Dk_MrPYO.js";
4
+ import { A as AuthClient } from "./vendor-supabase-auth-js-D4xjVprw.js";
5
+ import { F as FunctionsClient } from "./vendor-supabase-functions-js-sWy4UYn1.js";
6
+ const version = "2.106.1";
7
+ let JS_ENV = "";
8
+ if (typeof Deno !== "undefined") JS_ENV = "deno";
9
+ else if (typeof document !== "undefined") JS_ENV = "web";
10
+ else if (typeof navigator !== "undefined" && navigator.product === "ReactNative") JS_ENV = "react-native";
11
+ else JS_ENV = "node";
12
+ const DEFAULT_HEADERS = { "X-Client-Info": `supabase-js-${JS_ENV}/${version}` };
13
+ const DEFAULT_GLOBAL_OPTIONS = { headers: DEFAULT_HEADERS };
14
+ const DEFAULT_DB_OPTIONS = { schema: "public" };
15
+ const DEFAULT_AUTH_OPTIONS = {
16
+ autoRefreshToken: true,
17
+ persistSession: true,
18
+ detectSessionInUrl: true,
19
+ flowType: "implicit"
20
+ };
21
+ const DEFAULT_REALTIME_OPTIONS = {};
22
+ const DEFAULT_TRACE_PROPAGATION_OPTIONS = {
23
+ enabled: false,
24
+ respectSamplingDecision: true
25
+ };
26
+ function __awaiter(thisArg, _arguments, P, generator) {
27
+ function adopt(value) {
28
+ return value instanceof P ? value : new P(function(resolve) {
29
+ resolve(value);
30
+ });
31
+ }
32
+ return new (P || (P = Promise))(function(resolve, reject) {
33
+ function fulfilled(value) {
34
+ try {
35
+ step(generator.next(value));
36
+ } catch (e) {
37
+ reject(e);
38
+ }
39
+ }
40
+ function rejected(value) {
41
+ try {
42
+ step(generator["throw"](value));
43
+ } catch (e) {
44
+ reject(e);
45
+ }
46
+ }
47
+ function step(result) {
48
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
49
+ }
50
+ step((generator = generator.apply(thisArg, [])).next());
51
+ });
52
+ }
53
+ let otelModulePromise = null;
54
+ const OTEL_PKG = "@opentelemetry/api";
55
+ function loadOtel() {
56
+ if (otelModulePromise === null) otelModulePromise = import(
57
+ /* webpackIgnore: true */
58
+ /* turbopackIgnore: true */
59
+ /* @vite-ignore */
60
+ OTEL_PKG
61
+ ).catch(() => null);
62
+ return otelModulePromise;
63
+ }
64
+ function extractTraceContext() {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ try {
67
+ const otel = yield loadOtel();
68
+ if (!otel || !otel.propagation || !otel.context) return null;
69
+ const carrier = {};
70
+ otel.propagation.inject(otel.context.active(), carrier);
71
+ const traceparent = carrier["traceparent"];
72
+ if (!traceparent) return null;
73
+ return {
74
+ traceparent,
75
+ tracestate: carrier["tracestate"],
76
+ baggage: carrier["baggage"]
77
+ };
78
+ } catch (_a) {
79
+ return null;
80
+ }
81
+ });
82
+ }
83
+ function parseTraceParent(traceparent) {
84
+ if (!traceparent || typeof traceparent !== "string") return null;
85
+ const parts = traceparent.split("-");
86
+ if (parts.length !== 4) return null;
87
+ const [version$1, traceId, parentId, traceFlags] = parts;
88
+ if (version$1.length !== 2 || traceId.length !== 32 || parentId.length !== 16 || traceFlags.length !== 2) return null;
89
+ const hexRegex = /^[0-9a-f]+$/i;
90
+ if (!hexRegex.test(version$1) || !hexRegex.test(traceId) || !hexRegex.test(parentId) || !hexRegex.test(traceFlags)) return null;
91
+ if (traceId === "00000000000000000000000000000000" || parentId === "0000000000000000") return null;
92
+ return {
93
+ version: version$1,
94
+ traceId,
95
+ parentId,
96
+ traceFlags,
97
+ isSampled: (parseInt(traceFlags, 16) & 1) === 1
98
+ };
99
+ }
100
+ function shouldPropagateToTarget(targetUrl, targets) {
101
+ if (!targetUrl || !targets || targets.length === 0) return false;
102
+ let url;
103
+ if (targetUrl instanceof URL) url = targetUrl;
104
+ else try {
105
+ url = new URL(targetUrl);
106
+ } catch (error) {
107
+ return false;
108
+ }
109
+ for (const target of targets) try {
110
+ if (typeof target === "string") {
111
+ if (matchStringTarget(url.hostname, target)) return true;
112
+ } else if (target instanceof RegExp) {
113
+ if (target.test(url.hostname)) return true;
114
+ } else if (typeof target === "function") {
115
+ if (target(url)) return true;
116
+ }
117
+ } catch (error) {
118
+ continue;
119
+ }
120
+ return false;
121
+ }
122
+ function matchStringTarget(hostname, target) {
123
+ if (target === hostname) return true;
124
+ if (target.startsWith("*.")) {
125
+ const domain = target.slice(2);
126
+ if (hostname.endsWith(domain)) {
127
+ if (hostname === domain || hostname.endsWith("." + domain)) return true;
128
+ }
129
+ }
130
+ return false;
131
+ }
132
+ function getDefaultPropagationTargets(supabaseUrl) {
133
+ const targets = [];
134
+ try {
135
+ const url = new URL(supabaseUrl);
136
+ targets.push(url.hostname);
137
+ } catch (error) {
138
+ }
139
+ targets.push("*.supabase.co", "*.supabase.in");
140
+ targets.push("localhost", "127.0.0.1", "[::1]");
141
+ return targets;
142
+ }
143
+ function _typeof(o) {
144
+ "@babel/helpers - typeof";
145
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
146
+ return typeof o$1;
147
+ } : function(o$1) {
148
+ return o$1 && "function" == typeof Symbol && o$1.constructor === Symbol && o$1 !== Symbol.prototype ? "symbol" : typeof o$1;
149
+ }, _typeof(o);
150
+ }
151
+ function toPrimitive(t, r) {
152
+ if ("object" != _typeof(t) || !t) return t;
153
+ var e = t[Symbol.toPrimitive];
154
+ if (void 0 !== e) {
155
+ var i = e.call(t, r);
156
+ if ("object" != _typeof(i)) return i;
157
+ throw new TypeError("@@toPrimitive must return a primitive value.");
158
+ }
159
+ return ("string" === r ? String : Number)(t);
160
+ }
161
+ function toPropertyKey(t) {
162
+ var i = toPrimitive(t, "string");
163
+ return "symbol" == _typeof(i) ? i : i + "";
164
+ }
165
+ function _defineProperty(e, r, t) {
166
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
167
+ value: t,
168
+ enumerable: true,
169
+ configurable: true,
170
+ writable: true
171
+ }) : e[r] = t, e;
172
+ }
173
+ function ownKeys(e, r) {
174
+ var t = Object.keys(e);
175
+ if (Object.getOwnPropertySymbols) {
176
+ var o = Object.getOwnPropertySymbols(e);
177
+ r && (o = o.filter(function(r$1) {
178
+ return Object.getOwnPropertyDescriptor(e, r$1).enumerable;
179
+ })), t.push.apply(t, o);
180
+ }
181
+ return t;
182
+ }
183
+ function _objectSpread2(e) {
184
+ for (var r = 1; r < arguments.length; r++) {
185
+ var t = null != arguments[r] ? arguments[r] : {};
186
+ r % 2 ? ownKeys(Object(t), true).forEach(function(r$1) {
187
+ _defineProperty(e, r$1, t[r$1]);
188
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r$1) {
189
+ Object.defineProperty(e, r$1, Object.getOwnPropertyDescriptor(t, r$1));
190
+ });
191
+ }
192
+ return e;
193
+ }
194
+ const resolveFetch = (customFetch) => {
195
+ if (customFetch) return (...args) => customFetch(...args);
196
+ return (...args) => fetch(...args);
197
+ };
198
+ const resolveHeadersConstructor = () => {
199
+ return Headers;
200
+ };
201
+ const fetchWithAuth = (supabaseKey, supabaseUrl, getAccessToken, customFetch, tracePropagationOptions) => {
202
+ const fetch$1 = resolveFetch(customFetch);
203
+ const HeadersConstructor = resolveHeadersConstructor();
204
+ const traceEnabled = (tracePropagationOptions === null || tracePropagationOptions === void 0 ? void 0 : tracePropagationOptions.enabled) === true;
205
+ const respectSampling = (tracePropagationOptions === null || tracePropagationOptions === void 0 ? void 0 : tracePropagationOptions.respectSamplingDecision) !== false;
206
+ const traceTargets = traceEnabled ? getDefaultPropagationTargets(supabaseUrl) : null;
207
+ return async (input, init) => {
208
+ var _await$getAccessToken;
209
+ const accessToken = (_await$getAccessToken = await getAccessToken()) !== null && _await$getAccessToken !== void 0 ? _await$getAccessToken : supabaseKey;
210
+ let headers = new HeadersConstructor(init === null || init === void 0 ? void 0 : init.headers);
211
+ if (!headers.has("apikey")) headers.set("apikey", supabaseKey);
212
+ if (!headers.has("Authorization")) headers.set("Authorization", `Bearer ${accessToken}`);
213
+ if (traceTargets) {
214
+ const traceHeaders = await getTraceHeaders(input, traceTargets, respectSampling);
215
+ if (traceHeaders) {
216
+ if (traceHeaders.traceparent && !headers.has("traceparent")) headers.set("traceparent", traceHeaders.traceparent);
217
+ if (traceHeaders.tracestate && !headers.has("tracestate")) headers.set("tracestate", traceHeaders.tracestate);
218
+ if (traceHeaders.baggage && !headers.has("baggage")) headers.set("baggage", traceHeaders.baggage);
219
+ }
220
+ }
221
+ return fetch$1(input, _objectSpread2(_objectSpread2({}, init), {}, { headers }));
222
+ };
223
+ };
224
+ async function getTraceHeaders(input, targets, respectSampling) {
225
+ if (!shouldPropagateToTarget(typeof input === "string" ? input : input instanceof URL ? input : input.url, targets)) return null;
226
+ const traceContext = await extractTraceContext();
227
+ if (!traceContext || !traceContext.traceparent) return null;
228
+ if (respectSampling) {
229
+ const parsed = parseTraceParent(traceContext.traceparent);
230
+ if (parsed && !parsed.isSampled) return null;
231
+ }
232
+ return traceContext;
233
+ }
234
+ function normalizeTracePropagation(value) {
235
+ return typeof value === "boolean" ? { enabled: value } : value;
236
+ }
237
+ function ensureTrailingSlash(url) {
238
+ return url.endsWith("/") ? url : url + "/";
239
+ }
240
+ function applySettingDefaults(options, defaults) {
241
+ var _DEFAULT_GLOBAL_OPTIO, _globalOptions$header, _ref, _tracePropagationOpti, _ref2, _tracePropagationOpti2;
242
+ const { db: dbOptions, auth: authOptions, realtime: realtimeOptions, global: globalOptions } = options;
243
+ const { db: DEFAULT_DB_OPTIONS$1, auth: DEFAULT_AUTH_OPTIONS$1, realtime: DEFAULT_REALTIME_OPTIONS$1, global: DEFAULT_GLOBAL_OPTIONS$1 } = defaults;
244
+ const tracePropagationOptions = normalizeTracePropagation(options.tracePropagation);
245
+ const DEFAULT_TRACE_PROPAGATION_OPTIONS$1 = normalizeTracePropagation(defaults.tracePropagation);
246
+ const result = {
247
+ db: _objectSpread2(_objectSpread2({}, DEFAULT_DB_OPTIONS$1), dbOptions),
248
+ auth: _objectSpread2(_objectSpread2({}, DEFAULT_AUTH_OPTIONS$1), authOptions),
249
+ realtime: _objectSpread2(_objectSpread2({}, DEFAULT_REALTIME_OPTIONS$1), realtimeOptions),
250
+ storage: {},
251
+ global: _objectSpread2(_objectSpread2(_objectSpread2({}, DEFAULT_GLOBAL_OPTIONS$1), globalOptions), {}, { headers: _objectSpread2(_objectSpread2({}, (_DEFAULT_GLOBAL_OPTIO = DEFAULT_GLOBAL_OPTIONS$1 === null || DEFAULT_GLOBAL_OPTIONS$1 === void 0 ? void 0 : DEFAULT_GLOBAL_OPTIONS$1.headers) !== null && _DEFAULT_GLOBAL_OPTIO !== void 0 ? _DEFAULT_GLOBAL_OPTIO : {}), (_globalOptions$header = globalOptions === null || globalOptions === void 0 ? void 0 : globalOptions.headers) !== null && _globalOptions$header !== void 0 ? _globalOptions$header : {}) }),
252
+ tracePropagation: {
253
+ enabled: (_ref = (_tracePropagationOpti = tracePropagationOptions === null || tracePropagationOptions === void 0 ? void 0 : tracePropagationOptions.enabled) !== null && _tracePropagationOpti !== void 0 ? _tracePropagationOpti : DEFAULT_TRACE_PROPAGATION_OPTIONS$1 === null || DEFAULT_TRACE_PROPAGATION_OPTIONS$1 === void 0 ? void 0 : DEFAULT_TRACE_PROPAGATION_OPTIONS$1.enabled) !== null && _ref !== void 0 ? _ref : false,
254
+ respectSamplingDecision: (_ref2 = (_tracePropagationOpti2 = tracePropagationOptions === null || tracePropagationOptions === void 0 ? void 0 : tracePropagationOptions.respectSamplingDecision) !== null && _tracePropagationOpti2 !== void 0 ? _tracePropagationOpti2 : DEFAULT_TRACE_PROPAGATION_OPTIONS$1 === null || DEFAULT_TRACE_PROPAGATION_OPTIONS$1 === void 0 ? void 0 : DEFAULT_TRACE_PROPAGATION_OPTIONS$1.respectSamplingDecision) !== null && _ref2 !== void 0 ? _ref2 : true
255
+ },
256
+ accessToken: async () => ""
257
+ };
258
+ if (options.accessToken) result.accessToken = options.accessToken;
259
+ else delete result.accessToken;
260
+ return result;
261
+ }
262
+ function validateSupabaseUrl(supabaseUrl) {
263
+ const trimmedUrl = supabaseUrl === null || supabaseUrl === void 0 ? void 0 : supabaseUrl.trim();
264
+ if (!trimmedUrl) throw new Error("supabaseUrl is required.");
265
+ if (!trimmedUrl.match(/^https?:\/\//i)) throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");
266
+ try {
267
+ return new URL(ensureTrailingSlash(trimmedUrl));
268
+ } catch (_unused) {
269
+ throw Error("Invalid supabaseUrl: Provided URL is malformed.");
270
+ }
271
+ }
272
+ var SupabaseAuthClient = class extends AuthClient {
273
+ constructor(options) {
274
+ super(options);
275
+ }
276
+ };
277
+ var SupabaseClient = class {
278
+ /**
279
+ * Create a new client for use in the browser.
280
+ *
281
+ * @category Initializing
282
+ *
283
+ * @param supabaseUrl The unique Supabase URL which is supplied when you create a new project in your project dashboard.
284
+ * @param supabaseKey The unique Supabase Key which is supplied when you create a new project in your project dashboard.
285
+ * @param options.db.schema You can switch in between schemas. The schema needs to be on the list of exposed schemas inside Supabase.
286
+ * @param options.auth.autoRefreshToken Set to "true" if you want to automatically refresh the token before expiring.
287
+ * @param options.auth.persistSession Set to "true" if you want to automatically save the user session into local storage.
288
+ * @param options.auth.detectSessionInUrl Set to "true" if you want to automatically detects OAuth grants in the URL and signs in the user.
289
+ * @param options.realtime Options passed along to realtime-js constructor.
290
+ * @param options.storage Options passed along to the storage-js constructor.
291
+ * @param options.global.fetch A custom fetch implementation.
292
+ * @param options.global.headers Any additional headers to send with each network request.
293
+ *
294
+ * @example Creating a client
295
+ * ```js
296
+ * import { createClient } from '@supabase/supabase-js'
297
+ *
298
+ * // Create a single supabase client for interacting with your database
299
+ * const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
300
+ * ```
301
+ *
302
+ * @example With a custom domain
303
+ * ```js
304
+ * import { createClient } from '@supabase/supabase-js'
305
+ *
306
+ * // Use a custom domain as the supabase URL
307
+ * const supabase = createClient('https://my-custom-domain.com', 'your-publishable-key')
308
+ * ```
309
+ *
310
+ * @example With additional parameters
311
+ * ```js
312
+ * import { createClient } from '@supabase/supabase-js'
313
+ *
314
+ * const options = {
315
+ * db: {
316
+ * schema: 'public',
317
+ * },
318
+ * auth: {
319
+ * autoRefreshToken: true,
320
+ * persistSession: true,
321
+ * detectSessionInUrl: true
322
+ * },
323
+ * global: {
324
+ * headers: { 'x-my-custom-header': 'my-app-name' },
325
+ * },
326
+ * }
327
+ * const supabase = createClient("https://xyzcompany.supabase.co", "your-publishable-key", options)
328
+ * ```
329
+ *
330
+ * @exampleDescription With custom schemas
331
+ * By default the API server points to the `public` schema. You can enable other database schemas within the Dashboard.
332
+ * Go to [Settings > API > Exposed schemas](/dashboard/project/_/settings/api) and add the schema which you want to expose to the API.
333
+ *
334
+ * Note: each client connection can only access a single schema, so the code above can access the `other_schema` schema but cannot access the `public` schema.
335
+ *
336
+ * @example With custom schemas
337
+ * ```js
338
+ * import { createClient } from '@supabase/supabase-js'
339
+ *
340
+ * const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key', {
341
+ * // Provide a custom schema. Defaults to "public".
342
+ * db: { schema: 'other_schema' }
343
+ * })
344
+ * ```
345
+ *
346
+ * @exampleDescription Custom fetch implementation
347
+ * `supabase-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests,
348
+ * but an alternative `fetch` implementation can be provided as an option.
349
+ * This is most useful in environments where `cross-fetch` is not compatible (for instance Cloudflare Workers).
350
+ *
351
+ * @example Custom fetch implementation
352
+ * ```js
353
+ * import { createClient } from '@supabase/supabase-js'
354
+ *
355
+ * const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key', {
356
+ * global: { fetch: fetch.bind(globalThis) }
357
+ * })
358
+ * ```
359
+ *
360
+ * @exampleDescription React Native options with AsyncStorage
361
+ * For React Native we recommend using `AsyncStorage` as the storage implementation for Supabase Auth.
362
+ *
363
+ * @example React Native options with AsyncStorage
364
+ * ```js
365
+ * import 'react-native-url-polyfill/auto'
366
+ * import { createClient } from '@supabase/supabase-js'
367
+ * import AsyncStorage from "@react-native-async-storage/async-storage";
368
+ *
369
+ * const supabase = createClient("https://xyzcompany.supabase.co", "your-publishable-key", {
370
+ * auth: {
371
+ * storage: AsyncStorage,
372
+ * autoRefreshToken: true,
373
+ * persistSession: true,
374
+ * detectSessionInUrl: false,
375
+ * },
376
+ * });
377
+ * ```
378
+ *
379
+ * @exampleDescription React Native options with Expo SecureStore
380
+ * If you wish to encrypt the user's session information, you can use `aes-js` and store the encryption key in Expo SecureStore.
381
+ * The `aes-js` library, a reputable JavaScript-only implementation of the AES encryption algorithm in CTR mode.
382
+ * A new 256-bit encryption key is generated using the `react-native-get-random-values` library.
383
+ * This key is stored inside Expo's SecureStore, while the value is encrypted and placed inside AsyncStorage.
384
+ *
385
+ * Please make sure that:
386
+ * - You keep the `expo-secure-store`, `aes-js` and `react-native-get-random-values` libraries up-to-date.
387
+ * - Choose the correct [`SecureStoreOptions`](https://docs.expo.dev/versions/latest/sdk/securestore/#securestoreoptions) for your app's needs.
388
+ * E.g. [`SecureStore.WHEN_UNLOCKED`](https://docs.expo.dev/versions/latest/sdk/securestore/#securestorewhen_unlocked) regulates when the data can be accessed.
389
+ * - Carefully consider optimizations or other modifications to the above example, as those can lead to introducing subtle security vulnerabilities.
390
+ *
391
+ * @example React Native options with Expo SecureStore
392
+ * ```ts
393
+ * import 'react-native-url-polyfill/auto'
394
+ * import { createClient } from '@supabase/supabase-js'
395
+ * import AsyncStorage from '@react-native-async-storage/async-storage';
396
+ * import * as SecureStore from 'expo-secure-store';
397
+ * import * as aesjs from 'aes-js';
398
+ * import 'react-native-get-random-values';
399
+ *
400
+ * // As Expo's SecureStore does not support values larger than 2048
401
+ * // bytes, an AES-256 key is generated and stored in SecureStore, while
402
+ * // it is used to encrypt/decrypt values stored in AsyncStorage.
403
+ * class LargeSecureStore {
404
+ * private async _encrypt(key: string, value: string) {
405
+ * const encryptionKey = crypto.getRandomValues(new Uint8Array(256 / 8));
406
+ *
407
+ * const cipher = new aesjs.ModeOfOperation.ctr(encryptionKey, new aesjs.Counter(1));
408
+ * const encryptedBytes = cipher.encrypt(aesjs.utils.utf8.toBytes(value));
409
+ *
410
+ * await SecureStore.setItemAsync(key, aesjs.utils.hex.fromBytes(encryptionKey));
411
+ *
412
+ * return aesjs.utils.hex.fromBytes(encryptedBytes);
413
+ * }
414
+ *
415
+ * private async _decrypt(key: string, value: string) {
416
+ * const encryptionKeyHex = await SecureStore.getItemAsync(key);
417
+ * if (!encryptionKeyHex) {
418
+ * return encryptionKeyHex;
419
+ * }
420
+ *
421
+ * const cipher = new aesjs.ModeOfOperation.ctr(aesjs.utils.hex.toBytes(encryptionKeyHex), new aesjs.Counter(1));
422
+ * const decryptedBytes = cipher.decrypt(aesjs.utils.hex.toBytes(value));
423
+ *
424
+ * return aesjs.utils.utf8.fromBytes(decryptedBytes);
425
+ * }
426
+ *
427
+ * async getItem(key: string) {
428
+ * const encrypted = await AsyncStorage.getItem(key);
429
+ * if (!encrypted) { return encrypted; }
430
+ *
431
+ * return await this._decrypt(key, encrypted);
432
+ * }
433
+ *
434
+ * async removeItem(key: string) {
435
+ * await AsyncStorage.removeItem(key);
436
+ * await SecureStore.deleteItemAsync(key);
437
+ * }
438
+ *
439
+ * async setItem(key: string, value: string) {
440
+ * const encrypted = await this._encrypt(key, value);
441
+ *
442
+ * await AsyncStorage.setItem(key, encrypted);
443
+ * }
444
+ * }
445
+ *
446
+ * const supabase = createClient("https://xyzcompany.supabase.co", "your-publishable-key", {
447
+ * auth: {
448
+ * storage: new LargeSecureStore(),
449
+ * autoRefreshToken: true,
450
+ * persistSession: true,
451
+ * detectSessionInUrl: false,
452
+ * },
453
+ * });
454
+ * ```
455
+ *
456
+ * @example With a database query
457
+ * ```ts
458
+ * import { createClient } from '@supabase/supabase-js'
459
+ *
460
+ * const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
461
+ *
462
+ * const { data } = await supabase.from('profiles').select('*')
463
+ * ```
464
+ */
465
+ constructor(supabaseUrl, supabaseKey, options) {
466
+ var _settings$auth$storag, _settings$global$head;
467
+ this.supabaseUrl = supabaseUrl;
468
+ this.supabaseKey = supabaseKey;
469
+ const baseUrl = validateSupabaseUrl(supabaseUrl);
470
+ if (!supabaseKey) throw new Error("supabaseKey is required.");
471
+ this.realtimeUrl = new URL("realtime/v1", baseUrl);
472
+ this.realtimeUrl.protocol = this.realtimeUrl.protocol.replace("http", "ws");
473
+ this.authUrl = new URL("auth/v1", baseUrl);
474
+ this.storageUrl = new URL("storage/v1", baseUrl);
475
+ this.functionsUrl = new URL("functions/v1", baseUrl);
476
+ const defaultStorageKey = `sb-${baseUrl.hostname.split(".")[0]}-auth-token`;
477
+ const DEFAULTS = {
478
+ db: DEFAULT_DB_OPTIONS,
479
+ realtime: DEFAULT_REALTIME_OPTIONS,
480
+ auth: _objectSpread2(_objectSpread2({}, DEFAULT_AUTH_OPTIONS), {}, { storageKey: defaultStorageKey }),
481
+ global: DEFAULT_GLOBAL_OPTIONS,
482
+ tracePropagation: DEFAULT_TRACE_PROPAGATION_OPTIONS
483
+ };
484
+ const settings = applySettingDefaults(options !== null && options !== void 0 ? options : {}, DEFAULTS);
485
+ this.settings = settings;
486
+ this.storageKey = (_settings$auth$storag = settings.auth.storageKey) !== null && _settings$auth$storag !== void 0 ? _settings$auth$storag : "";
487
+ this.headers = (_settings$global$head = settings.global.headers) !== null && _settings$global$head !== void 0 ? _settings$global$head : {};
488
+ if (!settings.accessToken) {
489
+ var _settings$auth;
490
+ this.auth = this._initSupabaseAuthClient((_settings$auth = settings.auth) !== null && _settings$auth !== void 0 ? _settings$auth : {}, this.headers, settings.global.fetch);
491
+ } else {
492
+ this.accessToken = settings.accessToken;
493
+ this.auth = new Proxy({}, { get: (_, prop) => {
494
+ throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(prop)} is not possible`);
495
+ } });
496
+ }
497
+ this.fetch = fetchWithAuth(supabaseKey, supabaseUrl, this._getAccessToken.bind(this), settings.global.fetch, settings.tracePropagation);
498
+ this.realtime = this._initRealtimeClient(_objectSpread2({
499
+ headers: this.headers,
500
+ accessToken: this._getAccessToken.bind(this),
501
+ fetch: this.fetch
502
+ }, settings.realtime));
503
+ if (this.accessToken) Promise.resolve(this.accessToken()).then((token) => this.realtime.setAuth(token)).catch((e) => console.warn("Failed to set initial Realtime auth token:", e));
504
+ this.rest = new PostgrestClient(new URL("rest/v1", baseUrl).href, {
505
+ headers: this.headers,
506
+ schema: settings.db.schema,
507
+ fetch: this.fetch,
508
+ timeout: settings.db.timeout,
509
+ urlLengthLimit: settings.db.urlLengthLimit
510
+ });
511
+ this.storage = new StorageClient(this.storageUrl.href, this.headers, this.fetch, options === null || options === void 0 ? void 0 : options.storage);
512
+ if (!settings.accessToken) this._listenForAuthEvents();
513
+ }
514
+ /**
515
+ * Supabase Functions allows you to deploy and invoke edge functions.
516
+ */
517
+ get functions() {
518
+ return new FunctionsClient(this.functionsUrl.href, {
519
+ headers: this.headers,
520
+ customFetch: this.fetch
521
+ });
522
+ }
523
+ /**
524
+ * Perform a query on a table or a view.
525
+ *
526
+ * @param relation - The table or view name to query
527
+ */
528
+ from(relation) {
529
+ return this.rest.from(relation);
530
+ }
531
+ /**
532
+ * Select a schema to query or perform an function (rpc) call.
533
+ *
534
+ * The schema needs to be on the list of exposed schemas inside Supabase.
535
+ *
536
+ * @param schema - The schema to query
537
+ */
538
+ schema(schema) {
539
+ return this.rest.schema(schema);
540
+ }
541
+ /**
542
+ * Perform a function call.
543
+ *
544
+ * @param fn - The function name to call
545
+ * @param args - The arguments to pass to the function call
546
+ * @param options - Named parameters
547
+ * @param options.head - When set to `true`, `data` will not be returned.
548
+ * Useful if you only need the count.
549
+ * @param options.get - When set to `true`, the function will be called with
550
+ * read-only access mode.
551
+ * @param options.count - Count algorithm to use to count rows returned by the
552
+ * function. Only applicable for [set-returning
553
+ * functions](https://www.postgresql.org/docs/current/functions-srf.html).
554
+ *
555
+ * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
556
+ * hood.
557
+ *
558
+ * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
559
+ * statistics under the hood.
560
+ *
561
+ * `"estimated"`: Uses exact count for low numbers and planned count for high
562
+ * numbers.
563
+ */
564
+ rpc(fn, args = {}, options = {
565
+ head: false,
566
+ get: false,
567
+ count: void 0
568
+ }) {
569
+ return this.rest.rpc(fn, args, options);
570
+ }
571
+ /**
572
+ * Creates a Realtime channel with Broadcast, Presence, and Postgres Changes.
573
+ *
574
+ * @param {string} name - The name of the Realtime channel.
575
+ * @param {Object} opts - The options to pass to the Realtime channel.
576
+ *
577
+ * @category Realtime
578
+ */
579
+ channel(name, opts = { config: {} }) {
580
+ return this.realtime.channel(name, opts);
581
+ }
582
+ /**
583
+ * Returns all Realtime channels.
584
+ *
585
+ * @category Realtime
586
+ *
587
+ * @example Get all channels
588
+ * ```js
589
+ * const channels = supabase.getChannels()
590
+ * ```
591
+ */
592
+ getChannels() {
593
+ return this.realtime.getChannels();
594
+ }
595
+ /**
596
+ * Unsubscribes and removes Realtime channel from Realtime client.
597
+ *
598
+ * @param {RealtimeChannel} channel - The name of the Realtime channel.
599
+ *
600
+ *
601
+ * @category Realtime
602
+ *
603
+ * @remarks
604
+ * - Removing a channel is a great way to maintain the performance of your project's Realtime service as well as your database if you're listening to Postgres changes. Supabase will automatically handle cleanup 30 seconds after a client is disconnected, but unused channels may cause degradation as more clients are simultaneously subscribed.
605
+ *
606
+ * @example Removes a channel
607
+ * ```js
608
+ * supabase.removeChannel(myChannel)
609
+ * ```
610
+ */
611
+ removeChannel(channel) {
612
+ return this.realtime.removeChannel(channel);
613
+ }
614
+ /**
615
+ * Unsubscribes and removes all Realtime channels from Realtime client.
616
+ *
617
+ * @category Realtime
618
+ *
619
+ * @remarks
620
+ * - Removing channels is a great way to maintain the performance of your project's Realtime service as well as your database if you're listening to Postgres changes. Supabase will automatically handle cleanup 30 seconds after a client is disconnected, but unused channels may cause degradation as more clients are simultaneously subscribed.
621
+ *
622
+ * @example Remove all channels
623
+ * ```js
624
+ * supabase.removeAllChannels()
625
+ * ```
626
+ */
627
+ removeAllChannels() {
628
+ return this.realtime.removeAllChannels();
629
+ }
630
+ async _getAccessToken() {
631
+ var _this = this;
632
+ var _data$session$access_, _data$session;
633
+ if (_this.accessToken) return await _this.accessToken();
634
+ const { data } = await _this.auth.getSession();
635
+ return (_data$session$access_ = (_data$session = data.session) === null || _data$session === void 0 ? void 0 : _data$session.access_token) !== null && _data$session$access_ !== void 0 ? _data$session$access_ : _this.supabaseKey;
636
+ }
637
+ _initSupabaseAuthClient({ autoRefreshToken, persistSession, detectSessionInUrl, storage, userStorage, storageKey, flowType, lock, debug, throwOnError, experimental, lockAcquireTimeout, skipAutoInitialize }, headers, fetch$1) {
638
+ const authHeaders = {
639
+ Authorization: `Bearer ${this.supabaseKey}`,
640
+ apikey: `${this.supabaseKey}`
641
+ };
642
+ return new SupabaseAuthClient({
643
+ url: this.authUrl.href,
644
+ headers: _objectSpread2(_objectSpread2({}, authHeaders), headers),
645
+ storageKey,
646
+ autoRefreshToken,
647
+ persistSession,
648
+ detectSessionInUrl,
649
+ storage,
650
+ userStorage,
651
+ flowType,
652
+ lock,
653
+ debug,
654
+ throwOnError,
655
+ experimental,
656
+ fetch: fetch$1,
657
+ lockAcquireTimeout,
658
+ skipAutoInitialize,
659
+ hasCustomAuthorizationHeader: Object.keys(this.headers).some((key) => key.toLowerCase() === "authorization")
660
+ });
661
+ }
662
+ _initRealtimeClient(options) {
663
+ return new RealtimeClient(this.realtimeUrl.href, _objectSpread2(_objectSpread2({}, options), {}, { params: _objectSpread2(_objectSpread2({}, { apikey: this.supabaseKey }), options === null || options === void 0 ? void 0 : options.params) }));
664
+ }
665
+ _listenForAuthEvents() {
666
+ return this.auth.onAuthStateChange((event, session) => {
667
+ this._handleTokenChanged(event, "CLIENT", session === null || session === void 0 ? void 0 : session.access_token);
668
+ });
669
+ }
670
+ _handleTokenChanged(event, source, token) {
671
+ if ((event === "TOKEN_REFRESHED" || event === "SIGNED_IN") && this.changedAccessToken !== token) {
672
+ this.changedAccessToken = token;
673
+ this.realtime.setAuth(token);
674
+ } else if (event === "SIGNED_OUT") {
675
+ this.realtime.setAuth();
676
+ if (source == "STORAGE") this.auth.signOut();
677
+ this.changedAccessToken = void 0;
678
+ }
679
+ }
680
+ };
681
+ const createClient = (supabaseUrl, supabaseKey, options) => {
682
+ return new SupabaseClient(supabaseUrl, supabaseKey, options);
683
+ };
684
+ function shouldShowDeprecationWarning() {
685
+ if (typeof window !== "undefined") return false;
686
+ const _process = globalThis["process"];
687
+ if (!_process) return false;
688
+ const processVersion = _process["version"];
689
+ if (processVersion === void 0 || processVersion === null) return false;
690
+ const versionMatch = processVersion.match(/^v(\d+)\./);
691
+ if (!versionMatch) return false;
692
+ return parseInt(versionMatch[1], 10) <= 18;
693
+ }
694
+ if (shouldShowDeprecationWarning()) console.warn("⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");
695
+ export {
696
+ createClient as c
697
+ };