ghost 6.18.2 → 6.19.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 (191) hide show
  1. package/components/tryghost-i18n-6.19.0.tgz +0 -0
  2. package/components/tryghost-parse-email-address-6.19.0.tgz +0 -0
  3. package/core/built/admin/assets/{PolarAngleAxis-DALH8FDm.js → PolarAngleAxis-CGprvq8M.js} +1 -1
  4. package/core/built/admin/assets/{_baseAssignValue-D_UsvJRN.js → _baseAssignValue-Bwn07Ln5.js} +1 -1
  5. package/core/built/admin/assets/{a-large-small-DVyx4GMu.js → a-large-small-p58xibEK.js} +1 -1
  6. package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +1 -1
  7. package/core/built/admin/assets/admin-x-settings/{code-editor-view-DBrulgE8.mjs → code-editor-view-DCKvO1TY.mjs} +2 -2
  8. package/core/built/admin/assets/admin-x-settings/{index-DgGwb1L-.mjs → index-BxWVtVnD.mjs} +6 -6
  9. package/core/built/admin/assets/admin-x-settings/{index-Cypgljb3.mjs → index-DyZIONe1.mjs} +2 -2
  10. package/core/built/admin/assets/admin-x-settings/{index-CsGHbqSU.mjs → index-HfMJcj2U.mjs} +2 -2
  11. package/core/built/admin/assets/admin-x-settings/{modals-rdo7i0D3.mjs → modals-CIiqfKY0.mjs} +7593 -7509
  12. package/core/built/admin/assets/{at-sign-CGNkBrZS.js → at-sign-BZPuAx5m.js} +1 -1
  13. package/core/built/admin/assets/audience-Cy9gLIa9.js +1 -0
  14. package/core/built/admin/assets/{avatar-flipboard-jqr9Aapd.js → avatar-flipboard-CLmWb5Xn.js} +1 -1
  15. package/core/built/admin/assets/{bluesky-sharing-C2749SVt.js → bluesky-sharing-BHt0oiii.js} +1 -1
  16. package/core/built/admin/assets/{chart-BAQCVPCH.js → chart--RFLGIL4.js} +1 -1
  17. package/core/built/admin/assets/{chunk.524.428356d01feabbc7b932.js → chunk.524.5c5c3f3273a86d1d9913.js} +7 -7
  18. package/core/built/admin/assets/{chunk.582.b8b41ba720f49d724992.js → chunk.582.e6c787cdf7e6de7819e0.js} +9 -9
  19. package/core/built/admin/assets/{code-editor-view-YNhJ1w71.js → code-editor-view-BW9y0JXN.js} +1 -1
  20. package/core/built/admin/assets/comments-C_lilDBp.js +1 -0
  21. package/core/built/admin/assets/content-helpers-BOnQQADZ.js +1 -0
  22. package/core/built/admin/assets/{copy-CNsHZEFR.js → copy-Bi7VpgPR.js} +1 -1
  23. package/core/built/admin/assets/{data-list-Dn5MkmyD.js → data-list-Bu3jzs1s.js} +1 -1
  24. package/core/built/admin/assets/{deleted-feed-item-Dmm_clMl.js → deleted-feed-item-B-doIIKc.js} +1 -1
  25. package/core/built/admin/assets/{edit-profile-BLSdtROQ.js → edit-profile-ZBdjFfvL.js} +1 -1
  26. package/core/built/admin/assets/{empty-indicator-C2Z0dddU.js → empty-indicator-C6BBh99D.js} +1 -1
  27. package/core/built/admin/assets/{en-DuTkaMAI.js → en-C7eSFQRw.js} +1 -1
  28. package/core/built/admin/assets/{feed-B4Xp4C2J.js → feed-CAioauwD.js} +1 -1
  29. package/core/built/admin/assets/{filters-gnOx5Z45.js → filters-DEKF0tIB.js} +1 -1
  30. package/core/built/admin/assets/{gh-chart-B2aWYkGg.js → gh-chart-D9KI0_sO.js} +1 -1
  31. package/core/built/admin/assets/{ghost-29f8f3c80e41126ba5e3c52ad5727e8a.js → ghost-6bff5c535ef015b0ed9421ceb6c699a7.js} +220 -211
  32. package/core/built/admin/assets/{growth-BysawIWe.js → growth-C6XGchvT.js} +1 -1
  33. package/core/built/admin/assets/{hash-j3sh-UI3.js → hash-DFhnGHId.js} +1 -1
  34. package/core/built/admin/assets/{inbox-1cUdr8Mm.js → inbox-p-Y5uScT.js} +1 -1
  35. package/core/built/admin/assets/{index-BVoBTlp_.js → index--VlvGKWi.js} +1 -1
  36. package/core/built/admin/assets/{index-DGBK5k9H.js → index-3uU4zg_6.js} +1 -1
  37. package/core/built/admin/assets/index-4ZkTY34B.css +1 -0
  38. package/core/built/admin/assets/{index-BhY_SbGB.js → index-BWnrLoWI.js} +1 -1
  39. package/core/built/admin/assets/{index-I9n711UW.js → index-BzU2odQq.js} +1 -1
  40. package/core/built/admin/assets/{index-mhojl7aD.js → index-CIZ_upe2.js} +1 -1
  41. package/core/built/admin/assets/{index-WjY3mGep.js → index-CS4XqyC-.js} +2 -2
  42. package/core/built/admin/assets/{index-BgrwCpgw.js → index-D17PEsUB.js} +1 -1
  43. package/core/built/admin/assets/{index-B8G0f0hb.js → index-DCTdAEHx.js} +3 -3
  44. package/core/built/admin/assets/{index-DarAAzVH.js → index-FPf-AERu.js} +1 -1
  45. package/core/built/admin/assets/index-JmqyGBro.js +1 -0
  46. package/core/built/admin/assets/{index-DKAlEWM4.js → index-LyfDjTto.js} +1 -1
  47. package/core/built/admin/assets/index-S62-c8TV.js +13 -0
  48. package/core/built/admin/assets/{index-D8CXbJm4.js → index-Wx8_AGZX.js} +1 -1
  49. package/core/built/admin/assets/{index-CkAUXgAi.js → index-jAidr8jI.js} +1 -1
  50. package/core/built/admin/assets/{index-Dz8eTtOq.js → index-lPLmWtv0.js} +1 -1
  51. package/core/built/admin/assets/koenig-lexical/index.css +1 -1
  52. package/core/built/admin/assets/koenig-lexical/koenig-lexical.js +1853 -1863
  53. package/core/built/admin/assets/koenig-lexical/koenig-lexical.umd.js +94 -94
  54. package/core/built/admin/assets/{koenig-lexical-coiS9dIC.js → koenig-lexical-CWnkYKQt.js} +77 -77
  55. package/core/built/admin/assets/{kpi-card-BEFHo2gr.js → kpi-card-B5UaJgOT.js} +1 -1
  56. package/core/built/admin/assets/{kpis-D-gz-lUk.js → kpis-Cc2RxnvZ.js} +1 -1
  57. package/core/built/admin/assets/{label-BvlHzzcJ.js → label-CW7Kmp9w.js} +1 -1
  58. package/core/built/admin/assets/{links-tdJvBrsT.js → links-wWNc9Uat.js} +1 -1
  59. package/core/built/admin/assets/{list-filter-DPE4Xj2T.js → list-filter-3EF6cVg-.js} +1 -1
  60. package/core/built/admin/assets/{lucide-react-ClQ3Iy7l.js → lucide-react-DtMIZssr.js} +214 -214
  61. package/core/built/admin/assets/{main-layout-DY96wK-_.js → main-layout-BFYhCrLn.js} +1 -1
  62. package/core/built/admin/assets/{message-square-text-Dd1XS5-H.js → message-square-text-BDZtUW-2.js} +1 -1
  63. package/core/built/admin/assets/{minus-CyEc3BE5.js → minus-CSphShdJ.js} +1 -1
  64. package/core/built/admin/assets/modals-CDWP04Iy.js +77 -0
  65. package/core/built/admin/assets/{moderation-B0fdmlig.js → moderation-qcng2_lB.js} +1 -1
  66. package/core/built/admin/assets/{newsletter-Byg3ARa5.js → newsletter-R-IYcV4M.js} +1 -1
  67. package/core/built/admin/assets/{newsletters-DbH39vgA.js → newsletters-BB4e24i1.js} +1 -1
  68. package/core/built/admin/assets/{note-Cwy-rIAF.js → note-B_bpRX66.js} +1 -1
  69. package/core/built/admin/assets/overview-Nh-IoP-v.js +1 -0
  70. package/core/built/admin/assets/{pagemenu-CkzsZrHC.js → pagemenu-Cd45frnF.js} +1 -1
  71. package/core/built/admin/assets/{post-analytics-context-BLkup0Xh.js → post-analytics-context-BST4bzps.js} +1 -1
  72. package/core/built/admin/assets/post-analytics-header-DAZPp6M8.js +1 -0
  73. package/core/built/admin/assets/{post-analytics-aA-nG9Fq.js → post-analytics-jHZOhQ8L.js} +1 -1
  74. package/core/built/admin/assets/{post-share-modal-CkvJtrRw.js → post-share-modal-D1JQfuYx.js} +1 -1
  75. package/core/built/admin/assets/posts/{comments-Bn_vn_sb.mjs → comments-C0ntS6jH.mjs} +678 -692
  76. package/core/built/admin/assets/posts/{dialog-CKPcMrj7.mjs → dialog-CXEmd-rC.mjs} +3 -3
  77. package/core/built/admin/assets/posts/{empty-indicator-kkrhP6K_.mjs → empty-indicator-CY1NEQZt.mjs} +2 -2
  78. package/core/built/admin/assets/posts/{filters-DHsxxy0F.mjs → filters-CWWDQAf0.mjs} +6 -6
  79. package/core/built/admin/assets/posts/{growth-D7ACh-oR.mjs → growth-DUnL-W24.mjs} +20 -19
  80. package/core/built/admin/assets/posts/{heading-BrKVbOxA.mjs → heading-DZWin3nG.mjs} +2 -2
  81. package/core/built/admin/assets/posts/{hooks-BBEMuLiW.mjs → hooks-DQYjPsLg.mjs} +2 -2
  82. package/core/built/admin/assets/posts/{index-C0rRguZx.mjs → index-BiGQFQkQ.mjs} +9 -9
  83. package/core/built/admin/assets/posts/{kpis-1o524OIK.mjs → kpis-DNnkyd0U.mjs} +10 -10
  84. package/core/built/admin/assets/posts/{links-JpeATx1f.mjs → links-D3nSZFlJ.mjs} +4 -4
  85. package/core/built/admin/assets/posts/{loading-indicator-BHAmSf8j.mjs → loading-indicator-CZQmPRvv.mjs} +3 -3
  86. package/core/built/admin/assets/posts/{main-layout-BTItAOQE.mjs → main-layout-D5WnaGr4.mjs} +2 -2
  87. package/core/built/admin/assets/posts/{newsletter-CQdsCEHv.mjs → newsletter-C5eikVBq.mjs} +13 -13
  88. package/core/built/admin/assets/posts/{overview-sYh4JN1D.mjs → overview-C5mCMPJY.mjs} +113 -112
  89. package/core/built/admin/assets/posts/{post-analytics-DtLt2SWx.mjs → post-analytics-Cc2NCQis.mjs} +6 -6
  90. package/core/built/admin/assets/posts/{post-analytics-context-CB1yM9fk.mjs → post-analytics-context-qXWjDzSt.mjs} +44 -41
  91. package/core/built/admin/assets/posts/{post-analytics-header-BYaWuL9W.mjs → post-analytics-header-QGsYyvhA.mjs} +11 -11
  92. package/core/built/admin/assets/posts/{post-share-modal-V0HTOBaf.mjs → post-share-modal-B9Q7FJsH.mjs} +4 -4
  93. package/core/built/admin/assets/posts/posts-C2SKGLoU.mjs +17 -0
  94. package/core/built/admin/assets/posts/posts.js +1 -1
  95. package/core/built/admin/assets/posts/{search-CLjC37AT.mjs → search-C8k0TFkh.mjs} +2 -2
  96. package/core/built/admin/assets/posts/{separator-KNoTIaJx.mjs → separator-CJnnsW1a.mjs} +5 -5
  97. package/core/built/admin/assets/posts/{sheet-DBg_SCDt.mjs → sheet-HDzKgNHc.mjs} +3 -3
  98. package/core/built/admin/assets/posts/{skeleton-DvsoolWu.mjs → skeleton-BlZGKNzB.mjs} +3 -3
  99. package/core/built/admin/assets/posts/{source-icon-OmRaTU2G.mjs → source-icon-DjBIjtaY.mjs} +3 -3
  100. package/core/built/admin/assets/posts/{stats-BC2DzntY.mjs → stats-BRVHejqx.mjs} +4 -4
  101. package/core/built/admin/assets/posts/{table-CxX9OKAj.mjs → table-D7AEpPWL.mjs} +2 -2
  102. package/core/built/admin/assets/posts/{tabs-B1jw7cBi.mjs → tabs-RcpmzDgr.mjs} +10 -10
  103. package/core/built/admin/assets/posts/{tags-BitrLT_j.mjs → tags-8k1xw8R8.mjs} +2 -2
  104. package/core/built/admin/assets/posts/{tags-BBilTo1a.mjs → tags-DNY2rBlf.mjs} +11 -11
  105. package/core/built/admin/assets/posts/{use-infinite-virtual-scroll-DaijA1ao.mjs → use-infinite-virtual-scroll-CMiIpcDA.mjs} +3 -3
  106. package/core/built/admin/assets/posts/{web-CKmyC4Xj.mjs → web-BCl5J6bB.mjs} +15 -15
  107. package/core/built/admin/assets/{posts-DDkuYoN7.js → posts-DFiJPOft.js} +1 -1
  108. package/core/built/admin/assets/{repeat-B-SL0yPM.js → repeat-Smml9n0k.js} +1 -1
  109. package/core/built/admin/assets/{reply-BdCPoUQ9.js → reply-CooY4lmk.js} +1 -1
  110. package/core/built/admin/assets/{select-C7aNW8QS.js → select-WwMsbBbg.js} +1 -1
  111. package/core/built/admin/assets/{settings-D-dhma2e.js → settings-CQEhPDQU.js} +4 -4
  112. package/core/built/admin/assets/{settings-Bzy1GNfD.js → settings-CxWtvcUf.js} +1 -1
  113. package/core/built/admin/assets/{sort-button-Dv8vjh13.js → sort-button-DFr8vezl.js} +1 -1
  114. package/core/built/admin/assets/{source-icon-DTz4isLK.js → source-icon-VpYWpwYb.js} +1 -1
  115. package/core/built/admin/assets/{sprout-BwLQTzMf.js → sprout-DRqlFJSK.js} +1 -1
  116. package/core/built/admin/assets/{square-YF1YE9ex.js → square-CwHQ9sJ2.js} +1 -1
  117. package/core/built/admin/assets/stats/audience-Caf7BjaU.mjs +269 -0
  118. package/core/built/admin/assets/stats/{url-helpers-Drq3xg0l.mjs → content-helpers-MbtAvUJh.mjs} +83 -106
  119. package/core/built/admin/assets/stats/{index-CcCyLMxL.mjs → index-BGqKbF1D.mjs} +8 -8
  120. package/core/built/admin/assets/stats/{index-DXU2rE9t.mjs → index-BTjfXOi6.mjs} +30 -30
  121. package/core/built/admin/assets/stats/{index-K7ASx7EG.mjs → index-ChjIxhHy.mjs} +5 -5
  122. package/core/built/admin/assets/stats/{index-D5mlMG4l.mjs → index-DMkZbbZs.mjs} +14 -14
  123. package/core/built/admin/assets/stats/{index-CUuQaROI.mjs → index-wT0OIw_N.mjs} +355 -335
  124. package/core/built/admin/assets/stats/{sort-button-CELUx6Zp.mjs → sort-button-B8n8fYMi.mjs} +23 -23
  125. package/core/built/admin/assets/stats/{stats-d_u_in4l.mjs → stats-CGH-0JNs.mjs} +120 -119
  126. package/core/built/admin/assets/stats/stats.js +1 -1
  127. package/core/built/admin/assets/stats/{tabs-3wLZsy0v.mjs → tabs-EQCUj3Y9.mjs} +19 -19
  128. package/core/built/admin/assets/stats/{use-growth-stats-28Sr42va.mjs → use-growth-stats--CIfag21.mjs} +3 -3
  129. package/core/built/admin/assets/{stats-C5ad0fgQ.js → stats-lnFiOQZx.js} +1 -1
  130. package/core/built/admin/assets/{stats-view-BvkxPYNX.js → stats-view-BJVawuIv.js} +1 -1
  131. package/core/built/admin/assets/{step-1-D7_s-D99.js → step-1-Bx8MiQVF.js} +1 -1
  132. package/core/built/admin/assets/{step-2-B94Yf7FF.js → step-2-CLLXppER.js} +1 -1
  133. package/core/built/admin/assets/{step-3-DswXYYf4.js → step-3-C5WrQe8u.js} +2 -2
  134. package/core/built/admin/assets/{table-D30IXfUP.js → table-2waWpIF5.js} +1 -1
  135. package/core/built/admin/assets/{tabs-CjNdfW0y.js → tabs-CBD0hW8V.js} +1 -1
  136. package/core/built/admin/assets/{tags-B0ux9_dT.js → tags-Bgw5Hrb5.js} +1 -1
  137. package/core/built/admin/assets/{tags-PGeGAafJ.js → tags-CKrBptuC.js} +1 -1
  138. package/core/built/admin/assets/{tiers-BaXK0JoI.js → tiers-CO-pz1FX.js} +1 -1
  139. package/core/built/admin/assets/{toggle-group-DdY8HF3Y.js → toggle-group-BXAZzvJ9.js} +1 -1
  140. package/core/built/admin/assets/{topic-filter-Boh22uGD.js → topic-filter-U3qUH2P_.js} +1 -1
  141. package/core/built/admin/assets/{trash-D7ZWrnDq.js → trash-CJY1Wro_.js} +1 -1
  142. package/core/built/admin/assets/{use-growth-stats-Bg0nE0WG.js → use-growth-stats-BrLZI7da.js} +1 -1
  143. package/core/built/admin/assets/{use-infinite-virtual-scroll-DoeI5IY-.js → use-infinite-virtual-scroll-CiRn3kpz.js} +2 -2
  144. package/core/built/admin/assets/{use-simple-pagination-BJzBULR3.js → use-simple-pagination-CskJ0MDP.js} +1 -1
  145. package/core/built/admin/assets/{user-round-check-BLc3L-ei.js → user-round-check-zOuzV3OS.js} +1 -1
  146. package/core/built/admin/assets/{wallet-cards-xX4QZik7.js → wallet-cards-ddLuIN-b.js} +1 -1
  147. package/core/built/admin/assets/{web-DQ2qBymm.js → web-CGbkZWn3.js} +1 -1
  148. package/core/built/admin/index.html +6 -5
  149. package/core/frontend/services/theme-engine/i18n/i18n.js +9 -14
  150. package/core/server/api/endpoints/settings-public.js +3 -1
  151. package/core/server/api/endpoints/utils/serializers/input/settings.js +6 -1
  152. package/core/server/data/migrations/versions/6.19/2026-02-10-12-00-00-add-transistor-portal-settings.js +39 -0
  153. package/core/server/data/schema/default-settings/default-settings.json +28 -0
  154. package/core/server/data/schema/schema.js +2 -2
  155. package/core/server/data/seeders/importers/offers-importer.js +2 -2
  156. package/core/server/data/tinybird/endpoints/api_top_pages_router.pipe +28 -0
  157. package/core/server/data/tinybird/endpoints/api_top_pages_v3.pipe +8 -4
  158. package/core/server/data/tinybird/tests/api_top_pages_router.yaml +74 -0
  159. package/core/server/services/comments/comments-service-emails.js +1 -4
  160. package/core/server/services/email-service/email-templates/partials/styles.hbs +43 -0
  161. package/core/server/services/koenig/node-renderers/transistor-renderer.js +23 -17
  162. package/core/server/services/members/members-api/repositories/member-repository.js +30 -6
  163. package/core/server/services/members/members-api/services/next-payment-calculator.js +28 -20
  164. package/core/server/services/members/members-api/services/payments-service.js +1 -1
  165. package/core/server/services/members/members-api/utils/add-calendar-months.js +49 -0
  166. package/core/server/services/offers/application/offer-mapper.js +2 -2
  167. package/core/server/services/offers/domain/models/offer-amount.js +16 -0
  168. package/core/server/services/offers/domain/models/offer-duration.js +3 -4
  169. package/core/server/services/offers/domain/models/offer-type.js +5 -3
  170. package/core/server/services/offers/domain/models/offer.js +8 -1
  171. package/core/server/services/staff/staff-service-emails.js +2 -0
  172. package/core/server/services/stripe/stripe-api.js +19 -0
  173. package/core/shared/config/defaults.json +1 -1
  174. package/core/shared/labs.js +0 -1
  175. package/core/shared/settings-cache/cache-manager.js +8 -0
  176. package/core/shared/settings-cache/public.js +5 -0
  177. package/package.json +5 -5
  178. package/yarn.lock +4 -4
  179. package/components/tryghost-i18n-6.18.2.tgz +0 -0
  180. package/components/tryghost-parse-email-address-6.18.2.tgz +0 -0
  181. package/core/built/admin/assets/audience-CJHVR7kD.js +0 -1
  182. package/core/built/admin/assets/comments-CPd_iCc3.js +0 -1
  183. package/core/built/admin/assets/index-B2yksBz4.js +0 -13
  184. package/core/built/admin/assets/index-Cl_EPbQ2.js +0 -1
  185. package/core/built/admin/assets/index-D_sGUCda.css +0 -1
  186. package/core/built/admin/assets/modals-C06GcVIm.js +0 -77
  187. package/core/built/admin/assets/overview-CVMLGrVt.js +0 -1
  188. package/core/built/admin/assets/post-analytics-header-D9srAPT5.js +0 -1
  189. package/core/built/admin/assets/posts/posts-DeQT3knv.mjs +0 -21
  190. package/core/built/admin/assets/stats/audience-BWqU7WWT.mjs +0 -245
  191. package/core/built/admin/assets/url-helpers-mt6MBIi0.js +0 -1
@@ -1,145 +1,145 @@
1
- import { o as L, j as e, u as R, p as _, b as E, n as T, V as Se, F as is, G as U, H as K, J as Pe, K as os, a as I, q as V, Q as q, v as Y, e as ls, _ as ie, $ as cs } from "./index-C0rRguZx.mjs";
2
- import { u as ds, F as ms, T as te, a as re, b as ne, d as ae, c as us } from "./filters-DHsxxy0F.mjs";
3
- import { c as X, b as Z, a as hs, d as ps } from "./hooks-BBEMuLiW.mjs";
4
- import { u as fs, g as xs, b as bs } from "./posts-DeQT3knv.mjs";
5
- import { u as gs, U as oe, g as js, D as vs, b as Cs, E as ys, d as Ns, e as A, h as Ce, S as ks } from "./separator-KNoTIaJx.mjs";
6
- import { e as ws, i as _s, b as le, a as Ss, F as Ps, f as Ts, C as Rs, g as Te, D as ce, M as Ls, H as Re, R as Is, d as Le, E as Ie, h as Ee } from "./search-CLjC37AT.mjs";
7
- import { a as Es, C as $s, X as Ms, k as de, m as me, n as ue, o as he, p as Ds, q as pe } from "./dialog-CKPcMrj7.mjs";
8
- import { H as ye, g as Fs, u as zs } from "./use-infinite-virtual-scroll-DaijA1ao.mjs";
9
- import { M as Os } from "./main-layout-BTItAOQE.mjs";
10
- import { c as Bs, P as fe, u as Hs, b as $e, e as Ne, h as As, B as P, C as Us } from "./heading-BrKVbOxA.mjs";
11
- import { L as W } from "./loading-indicator-BHAmSf8j.mjs";
12
- import { E as Me } from "./empty-indicator-kkrhP6K_.mjs";
13
- import { S as Vs, b as qs, c as Ws, d as Qs } from "./sheet-DBg_SCDt.mjs";
14
- var J = "Checkbox", [Ks] = Bs(J), [Gs, xe] = Ks(J);
15
- function Ys(s) {
1
+ import { o as L, j as e, u as T, p as w, b as I, n as P, V as we, F as ns, G as H, H as Q, J as _e, K as as, a as E, q as B, Q as A, v as G, e as is, _ as ie, $ as os } from "./index-BiGQFQkQ.mjs";
2
+ import { u as ls, F as cs, T as te, a as re, b as ne, d as ae, c as ds } from "./filters-CWWDQAf0.mjs";
3
+ import { c as Y, b as X, a as ms, d as us } from "./hooks-DQYjPsLg.mjs";
4
+ import { u as hs, g as ps } from "./posts-C2SKGLoU.mjs";
5
+ import { u as fs, U as oe, g as xs, D as bs, b as gs, E as js, d as vs, e as W, h as Cs, S as ys } from "./separator-CJnnsW1a.mjs";
6
+ import { e as Ns, i as ks, b as le, a as ws, F as _s, f as Ss, C as Ps, g as Se, D as ce, M as Ts, H as Pe, R as Rs, d as Te, E as Re, h as Le } from "./search-C8k0TFkh.mjs";
7
+ import { a as Ls, C as Es, X as Is, k as de, m as me, n as ue, o as he, p as $s, q as pe } from "./dialog-CXEmd-rC.mjs";
8
+ import { H as ve, g as Ms, u as Ds } from "./use-infinite-virtual-scroll-CMiIpcDA.mjs";
9
+ import { M as Fs } from "./main-layout-D5WnaGr4.mjs";
10
+ import { c as zs, P as fe, u as Os, b as Ee, e as Ce, h as Hs, B as S, C as Bs } from "./heading-DZWin3nG.mjs";
11
+ import { L as U } from "./loading-indicator-CZQmPRvv.mjs";
12
+ import { E as Ie } from "./empty-indicator-CY1NEQZt.mjs";
13
+ import { S as As, b as Us, c as Vs, d as qs } from "./sheet-HDzKgNHc.mjs";
14
+ var Z = "Checkbox", [Ws] = zs(Z), [Qs, xe] = Ws(Z);
15
+ function Ks(s) {
16
16
  const {
17
17
  __scopeCheckbox: t,
18
18
  checked: r,
19
- children: i,
19
+ children: a,
20
20
  defaultChecked: n,
21
- disabled: a,
22
- form: l,
23
- name: c,
24
- onCheckedChange: o,
21
+ disabled: i,
22
+ form: o,
23
+ name: l,
24
+ onCheckedChange: c,
25
25
  required: d,
26
26
  value: u = "on",
27
27
  // @ts-expect-error
28
28
  internal_do_not_use_render: m
29
- } = s, [p, f] = Hs({
29
+ } = s, [x, p] = Os({
30
30
  prop: r,
31
31
  defaultProp: n ?? !1,
32
- onChange: o,
33
- caller: J
34
- }), [g, h] = R(null), [v, j] = R(null), x = _(!1), C = g ? !!l || !!g.closest("form") : (
32
+ onChange: c,
33
+ caller: Z
34
+ }), [f, j] = T(null), [g, v] = T(null), b = w(!1), y = f ? !!o || !!f.closest("form") : (
35
35
  // We set this to true by default so that events bubble to forms without JS (SSR)
36
36
  !0
37
- ), w = {
38
- checked: p,
39
- disabled: a,
40
- setChecked: f,
41
- control: g,
42
- setControl: h,
43
- name: c,
44
- form: l,
37
+ ), C = {
38
+ checked: x,
39
+ disabled: i,
40
+ setChecked: p,
41
+ control: f,
42
+ setControl: j,
43
+ name: l,
44
+ form: o,
45
45
  value: u,
46
- hasConsumerStoppedPropagationRef: x,
46
+ hasConsumerStoppedPropagationRef: b,
47
47
  required: d,
48
48
  defaultChecked: $(n) ? !1 : n,
49
- isFormControl: C,
50
- bubbleInput: v,
51
- setBubbleInput: j
49
+ isFormControl: y,
50
+ bubbleInput: g,
51
+ setBubbleInput: v
52
52
  };
53
53
  return /* @__PURE__ */ e.jsx(
54
- Gs,
54
+ Qs,
55
55
  {
56
56
  scope: t,
57
- ...w,
58
- children: Xs(m) ? m(w) : i
57
+ ...C,
58
+ children: Gs(m) ? m(C) : a
59
59
  }
60
60
  );
61
61
  }
62
- var De = "CheckboxTrigger", Fe = L(
63
- ({ __scopeCheckbox: s, onKeyDown: t, onClick: r, ...i }, n) => {
62
+ var $e = "CheckboxTrigger", Me = L(
63
+ ({ __scopeCheckbox: s, onKeyDown: t, onClick: r, ...a }, n) => {
64
64
  const {
65
- control: a,
66
- value: l,
67
- disabled: c,
68
- checked: o,
65
+ control: i,
66
+ value: o,
67
+ disabled: l,
68
+ checked: c,
69
69
  required: d,
70
70
  setControl: u,
71
71
  setChecked: m,
72
- hasConsumerStoppedPropagationRef: p,
73
- isFormControl: f,
74
- bubbleInput: g
75
- } = xe(De, s), h = $e(n, u), v = _(o);
76
- return E(() => {
77
- const j = a == null ? void 0 : a.form;
78
- if (j) {
79
- const x = () => m(v.current);
80
- return j.addEventListener("reset", x), () => j.removeEventListener("reset", x);
72
+ hasConsumerStoppedPropagationRef: x,
73
+ isFormControl: p,
74
+ bubbleInput: f
75
+ } = xe($e, s), j = Ee(n, u), g = w(c);
76
+ return I(() => {
77
+ const v = i == null ? void 0 : i.form;
78
+ if (v) {
79
+ const b = () => m(g.current);
80
+ return v.addEventListener("reset", b), () => v.removeEventListener("reset", b);
81
81
  }
82
- }, [a, m]), /* @__PURE__ */ e.jsx(
82
+ }, [i, m]), /* @__PURE__ */ e.jsx(
83
83
  fe.button,
84
84
  {
85
85
  type: "button",
86
86
  role: "checkbox",
87
- "aria-checked": $(o) ? "mixed" : o,
87
+ "aria-checked": $(c) ? "mixed" : c,
88
88
  "aria-required": d,
89
- "data-state": Ae(o),
90
- "data-disabled": c ? "" : void 0,
91
- disabled: c,
92
- value: l,
93
- ...i,
94
- ref: h,
95
- onKeyDown: Ne(t, (j) => {
96
- j.key === "Enter" && j.preventDefault();
89
+ "data-state": He(c),
90
+ "data-disabled": l ? "" : void 0,
91
+ disabled: l,
92
+ value: o,
93
+ ...a,
94
+ ref: j,
95
+ onKeyDown: Ce(t, (v) => {
96
+ v.key === "Enter" && v.preventDefault();
97
97
  }),
98
- onClick: Ne(r, (j) => {
99
- m((x) => $(x) ? !0 : !x), g && f && (p.current = j.isPropagationStopped(), p.current || j.stopPropagation());
98
+ onClick: Ce(r, (v) => {
99
+ m((b) => $(b) ? !0 : !b), f && p && (x.current = v.isPropagationStopped(), x.current || v.stopPropagation());
100
100
  })
101
101
  }
102
102
  );
103
103
  }
104
104
  );
105
- Fe.displayName = De;
105
+ Me.displayName = $e;
106
106
  var be = L(
107
107
  (s, t) => {
108
108
  const {
109
109
  __scopeCheckbox: r,
110
- name: i,
110
+ name: a,
111
111
  checked: n,
112
- defaultChecked: a,
113
- required: l,
114
- disabled: c,
115
- value: o,
112
+ defaultChecked: i,
113
+ required: o,
114
+ disabled: l,
115
+ value: c,
116
116
  onCheckedChange: d,
117
117
  form: u,
118
118
  ...m
119
119
  } = s;
120
120
  return /* @__PURE__ */ e.jsx(
121
- Ys,
121
+ Ks,
122
122
  {
123
123
  __scopeCheckbox: r,
124
124
  checked: n,
125
- defaultChecked: a,
126
- disabled: c,
127
- required: l,
125
+ defaultChecked: i,
126
+ disabled: l,
127
+ required: o,
128
128
  onCheckedChange: d,
129
- name: i,
129
+ name: a,
130
130
  form: u,
131
- value: o,
132
- internal_do_not_use_render: ({ isFormControl: p }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
131
+ value: c,
132
+ internal_do_not_use_render: ({ isFormControl: x }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
133
133
  /* @__PURE__ */ e.jsx(
134
- Fe,
134
+ Me,
135
135
  {
136
136
  ...m,
137
137
  ref: t,
138
138
  __scopeCheckbox: r
139
139
  }
140
140
  ),
141
- p && /* @__PURE__ */ e.jsx(
142
- He,
141
+ x && /* @__PURE__ */ e.jsx(
142
+ Oe,
143
143
  {
144
144
  __scopeCheckbox: r
145
145
  }
@@ -149,19 +149,19 @@ var be = L(
149
149
  );
150
150
  }
151
151
  );
152
- be.displayName = J;
153
- var ze = "CheckboxIndicator", Oe = L(
152
+ be.displayName = Z;
153
+ var De = "CheckboxIndicator", Fe = L(
154
154
  (s, t) => {
155
- const { __scopeCheckbox: r, forceMount: i, ...n } = s, a = xe(ze, r);
155
+ const { __scopeCheckbox: r, forceMount: a, ...n } = s, i = xe(De, r);
156
156
  return /* @__PURE__ */ e.jsx(
157
- Es,
157
+ Ls,
158
158
  {
159
- present: i || $(a.checked) || a.checked === !0,
159
+ present: a || $(i.checked) || i.checked === !0,
160
160
  children: /* @__PURE__ */ e.jsx(
161
161
  fe.span,
162
162
  {
163
- "data-state": Ae(a.checked),
164
- "data-disabled": a.disabled ? "" : void 0,
163
+ "data-state": He(i.checked),
164
+ "data-disabled": i.disabled ? "" : void 0,
165
165
  ...n,
166
166
  ref: t,
167
167
  style: { pointerEvents: "none", ...s.style }
@@ -171,52 +171,52 @@ var ze = "CheckboxIndicator", Oe = L(
171
171
  );
172
172
  }
173
173
  );
174
- Oe.displayName = ze;
175
- var Be = "CheckboxBubbleInput", He = L(
174
+ Fe.displayName = De;
175
+ var ze = "CheckboxBubbleInput", Oe = L(
176
176
  ({ __scopeCheckbox: s, ...t }, r) => {
177
177
  const {
178
- control: i,
178
+ control: a,
179
179
  hasConsumerStoppedPropagationRef: n,
180
- checked: a,
181
- defaultChecked: l,
182
- required: c,
183
- disabled: o,
180
+ checked: i,
181
+ defaultChecked: o,
182
+ required: l,
183
+ disabled: c,
184
184
  name: d,
185
185
  value: u,
186
186
  form: m,
187
- bubbleInput: p,
188
- setBubbleInput: f
189
- } = xe(Be, s), g = $e(r, f), h = ds(a), v = gs(i);
190
- E(() => {
191
- const x = p;
192
- if (!x) return;
193
- const C = window.HTMLInputElement.prototype, k = Object.getOwnPropertyDescriptor(
194
- C,
187
+ bubbleInput: x,
188
+ setBubbleInput: p
189
+ } = xe(ze, s), f = Ee(r, p), j = ls(i), g = fs(a);
190
+ I(() => {
191
+ const b = x;
192
+ if (!b) return;
193
+ const y = window.HTMLInputElement.prototype, k = Object.getOwnPropertyDescriptor(
194
+ y,
195
195
  "checked"
196
- ).set, y = !n.current;
197
- if (h !== a && k) {
198
- const b = new Event("click", { bubbles: y });
199
- x.indeterminate = $(a), k.call(x, $(a) ? !1 : a), x.dispatchEvent(b);
196
+ ).set, h = !n.current;
197
+ if (j !== i && k) {
198
+ const R = new Event("click", { bubbles: h });
199
+ b.indeterminate = $(i), k.call(b, $(i) ? !1 : i), b.dispatchEvent(R);
200
200
  }
201
- }, [p, h, a, n]);
202
- const j = _($(a) ? !1 : a);
201
+ }, [x, j, i, n]);
202
+ const v = w($(i) ? !1 : i);
203
203
  return /* @__PURE__ */ e.jsx(
204
204
  fe.input,
205
205
  {
206
206
  type: "checkbox",
207
207
  "aria-hidden": !0,
208
- defaultChecked: l ?? j.current,
209
- required: c,
210
- disabled: o,
208
+ defaultChecked: o ?? v.current,
209
+ required: l,
210
+ disabled: c,
211
211
  name: d,
212
212
  value: u,
213
213
  form: m,
214
214
  ...t,
215
215
  tabIndex: -1,
216
- ref: g,
216
+ ref: f,
217
217
  style: {
218
218
  ...t.style,
219
- ...v,
219
+ ...g,
220
220
  position: "absolute",
221
221
  pointerEvents: "none",
222
222
  opacity: 0,
@@ -230,17 +230,17 @@ var Be = "CheckboxBubbleInput", He = L(
230
230
  );
231
231
  }
232
232
  );
233
- He.displayName = Be;
234
- function Xs(s) {
233
+ Oe.displayName = ze;
234
+ function Gs(s) {
235
235
  return typeof s == "function";
236
236
  }
237
237
  function $(s) {
238
238
  return s === "indeterminate";
239
239
  }
240
- function Ae(s) {
240
+ function He(s) {
241
241
  return $(s) ? "indeterminate" : s ? "checked" : "unchecked";
242
242
  }
243
- const Zs = Se(
243
+ const Ys = we(
244
244
  "inline-flex items-center rounded-sm border px-1.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
245
245
  {
246
246
  variants: {
@@ -257,82 +257,82 @@ const Zs = Se(
257
257
  }
258
258
  }
259
259
  );
260
- function Js({ className: s, variant: t, ...r }) {
261
- return /* @__PURE__ */ e.jsx("div", { className: T(Zs({ variant: t }), s), ...r });
260
+ function Xs({ className: s, variant: t, ...r }) {
261
+ return /* @__PURE__ */ e.jsx("div", { className: P(Ys({ variant: t }), s), ...r });
262
262
  }
263
- const Ue = L(({ className: s, ...t }, r) => /* @__PURE__ */ e.jsx(
263
+ const Be = L(({ className: s, ...t }, r) => /* @__PURE__ */ e.jsx(
264
264
  be,
265
265
  {
266
266
  ref: r,
267
- className: T(
267
+ className: P(
268
268
  "grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
269
269
  s
270
270
  ),
271
271
  ...t,
272
272
  children: /* @__PURE__ */ e.jsx(
273
- Oe,
273
+ Fe,
274
274
  {
275
- className: T("grid place-content-center text-current"),
276
- children: /* @__PURE__ */ e.jsx($s, { className: "size-4" })
275
+ className: P("grid place-content-center text-current"),
276
+ children: /* @__PURE__ */ e.jsx(Es, { className: "size-4" })
277
277
  }
278
278
  )
279
279
  }
280
280
  ));
281
- Ue.displayName = be.displayName;
282
- var et = Symbol.for("react.lazy"), G = is[" use ".trim().toString()];
283
- function st(s) {
281
+ Be.displayName = be.displayName;
282
+ var Zs = Symbol.for("react.lazy"), K = ns[" use ".trim().toString()];
283
+ function Js(s) {
284
284
  return typeof s == "object" && s !== null && "then" in s;
285
285
  }
286
- function Ve(s) {
287
- return s != null && typeof s == "object" && "$$typeof" in s && s.$$typeof === et && "_payload" in s && st(s._payload);
286
+ function Ae(s) {
287
+ return s != null && typeof s == "object" && "$$typeof" in s && s.$$typeof === Zs && "_payload" in s && Js(s._payload);
288
288
  }
289
289
  // @__NO_SIDE_EFFECTS__
290
- function tt(s) {
291
- const t = /* @__PURE__ */ rt(s), r = L((i, n) => {
292
- let { children: a, ...l } = i;
293
- Ve(a) && typeof G == "function" && (a = G(a._payload));
294
- const c = U.toArray(a), o = c.find(at);
295
- if (o) {
296
- const d = o.props.children, u = c.map((m) => m === o ? U.count(d) > 1 ? U.only(null) : K(d) ? d.props.children : null : m);
297
- return /* @__PURE__ */ e.jsx(t, { ...l, ref: n, children: K(d) ? Pe(d, void 0, u) : null });
290
+ function et(s) {
291
+ const t = /* @__PURE__ */ st(s), r = L((a, n) => {
292
+ let { children: i, ...o } = a;
293
+ Ae(i) && typeof K == "function" && (i = K(i._payload));
294
+ const l = H.toArray(i), c = l.find(rt);
295
+ if (c) {
296
+ const d = c.props.children, u = l.map((m) => m === c ? H.count(d) > 1 ? H.only(null) : Q(d) ? d.props.children : null : m);
297
+ return /* @__PURE__ */ e.jsx(t, { ...o, ref: n, children: Q(d) ? _e(d, void 0, u) : null });
298
298
  }
299
- return /* @__PURE__ */ e.jsx(t, { ...l, ref: n, children: a });
299
+ return /* @__PURE__ */ e.jsx(t, { ...o, ref: n, children: i });
300
300
  });
301
301
  return r.displayName = `${s}.Slot`, r;
302
302
  }
303
303
  // @__NO_SIDE_EFFECTS__
304
- function rt(s) {
305
- const t = L((r, i) => {
306
- let { children: n, ...a } = r;
307
- if (Ve(n) && typeof G == "function" && (n = G(n._payload)), K(n)) {
308
- const l = ot(n), c = it(a, n.props);
309
- return n.type !== os && (c.ref = i ? As(i, l) : l), Pe(n, c);
304
+ function st(s) {
305
+ const t = L((r, a) => {
306
+ let { children: n, ...i } = r;
307
+ if (Ae(n) && typeof K == "function" && (n = K(n._payload)), Q(n)) {
308
+ const o = at(n), l = nt(i, n.props);
309
+ return n.type !== as && (l.ref = a ? Hs(a, o) : o), _e(n, l);
310
310
  }
311
- return U.count(n) > 1 ? U.only(null) : null;
311
+ return H.count(n) > 1 ? H.only(null) : null;
312
312
  });
313
313
  return t.displayName = `${s}.SlotClone`, t;
314
314
  }
315
- var nt = Symbol("radix.slottable");
316
- function at(s) {
317
- return K(s) && typeof s.type == "function" && "__radixId" in s.type && s.type.__radixId === nt;
315
+ var tt = Symbol("radix.slottable");
316
+ function rt(s) {
317
+ return Q(s) && typeof s.type == "function" && "__radixId" in s.type && s.type.__radixId === tt;
318
318
  }
319
- function it(s, t) {
319
+ function nt(s, t) {
320
320
  const r = { ...t };
321
- for (const i in t) {
322
- const n = s[i], a = t[i];
323
- /^on[A-Z]/.test(i) ? n && a ? r[i] = (...c) => {
324
- const o = a(...c);
325
- return n(...c), o;
326
- } : n && (r[i] = n) : i === "style" ? r[i] = { ...n, ...a } : i === "className" && (r[i] = [n, a].filter(Boolean).join(" "));
321
+ for (const a in t) {
322
+ const n = s[a], i = t[a];
323
+ /^on[A-Z]/.test(a) ? n && i ? r[a] = (...l) => {
324
+ const c = i(...l);
325
+ return n(...l), c;
326
+ } : n && (r[a] = n) : a === "style" ? r[a] = { ...n, ...i } : a === "className" && (r[a] = [n, i].filter(Boolean).join(" "));
327
327
  }
328
328
  return { ...s, ...r };
329
329
  }
330
- function ot(s) {
331
- var i, n;
332
- let t = (i = Object.getOwnPropertyDescriptor(s.props, "ref")) == null ? void 0 : i.get, r = t && "isReactWarning" in t && t.isReactWarning;
330
+ function at(s) {
331
+ var a, n;
332
+ let t = (a = Object.getOwnPropertyDescriptor(s.props, "ref")) == null ? void 0 : a.get, r = t && "isReactWarning" in t && t.isReactWarning;
333
333
  return r ? s.ref : (t = (n = Object.getOwnPropertyDescriptor(s, "ref")) == null ? void 0 : n.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? s.props.ref : s.props.ref || s.ref);
334
334
  }
335
- var lt = [
335
+ var it = [
336
336
  "a",
337
337
  "button",
338
338
  "div",
@@ -350,14 +350,14 @@ var lt = [
350
350
  "span",
351
351
  "svg",
352
352
  "ul"
353
- ], ct = lt.reduce((s, t) => {
354
- const r = /* @__PURE__ */ tt(`Primitive.${t}`), i = L((n, a) => {
355
- const { asChild: l, ...c } = n, o = l ? r : t;
356
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e.jsx(o, { ...c, ref: a });
353
+ ], ot = it.reduce((s, t) => {
354
+ const r = /* @__PURE__ */ et(`Primitive.${t}`), a = L((n, i) => {
355
+ const { asChild: o, ...l } = n, c = o ? r : t;
356
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e.jsx(c, { ...l, ref: i });
357
357
  });
358
- return i.displayName = `Primitive.${t}`, { ...s, [t]: i };
359
- }, {}), dt = "Label", qe = L((s, t) => /* @__PURE__ */ e.jsx(
360
- ct.label,
358
+ return a.displayName = `Primitive.${t}`, { ...s, [t]: a };
359
+ }, {}), lt = "Label", Ue = L((s, t) => /* @__PURE__ */ e.jsx(
360
+ ot.label,
361
361
  {
362
362
  ...s,
363
363
  ref: t,
@@ -367,26 +367,26 @@ var lt = [
367
367
  }
368
368
  }
369
369
  ));
370
- qe.displayName = dt;
371
- var We = qe;
372
- const mt = Se(
370
+ Ue.displayName = lt;
371
+ var Ve = Ue;
372
+ const ct = we(
373
373
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
374
- ), Qe = L(({ className: s, ...t }, r) => /* @__PURE__ */ e.jsx(
375
- We,
374
+ ), qe = L(({ className: s, ...t }, r) => /* @__PURE__ */ e.jsx(
375
+ Ve,
376
376
  {
377
377
  ref: r,
378
- className: T(mt(), s),
378
+ className: P(ct(), s),
379
379
  ...t
380
380
  }
381
381
  ));
382
- Qe.displayName = We.displayName;
383
- const ut = ({ children: s, className: t, ...r }) => /* @__PURE__ */ e.jsx("section", { className: T("flex gap-6 flex-col p-4 lg:p-8 size-full grow", t), ...r, children: s }), Ke = "MembersResponseType", ht = hs({
384
- dataType: Ke,
382
+ qe.displayName = Ve.displayName;
383
+ const dt = ({ children: s, className: t, ...r }) => /* @__PURE__ */ e.jsx("section", { className: P("flex gap-6 flex-col p-4 lg:p-8 size-full grow", t), ...r, children: s }), We = "MembersResponseType", mt = ms({
384
+ dataType: We,
385
385
  path: "/members/"
386
- }), pt = X({
387
- dataType: Ke,
386
+ }), ut = Y({
387
+ dataType: We,
388
388
  path: (s) => `/members/${s}/`
389
- }), ft = Z({
389
+ }), ht = X({
390
390
  method: "POST",
391
391
  path: ({ id: s }) => `/members/${s}/commenting/disable`,
392
392
  body: ({ reason: s, hideComments: t }) => ({
@@ -396,7 +396,7 @@ const ut = ({ children: s, className: t, ...r }) => /* @__PURE__ */ e.jsx("secti
396
396
  invalidateQueries: {
397
397
  dataType: "CommentsResponseType"
398
398
  }
399
- }), xt = Z({
399
+ }), pt = X({
400
400
  method: "POST",
401
401
  path: ({ id: s }) => `/members/${s}/commenting/enable`,
402
402
  body: () => ({}),
@@ -404,104 +404,104 @@ const ut = ({ children: s, className: t, ...r }) => /* @__PURE__ */ e.jsx("secti
404
404
  dataType: "CommentsResponseType"
405
405
  }
406
406
  });
407
- function ke({
407
+ function ye({
408
408
  knownItems: s,
409
409
  useSearch: t,
410
410
  useGetById: r,
411
- filters: i,
411
+ filters: a,
412
412
  filterFieldName: n,
413
- searchFieldName: a,
414
- toOption: l
413
+ searchFieldName: i,
414
+ toOption: o
415
415
  }) {
416
- const [c, o] = R(""), { data: d, isLoading: u } = t(c), m = I(() => {
417
- const x = i.find((C) => C.field === n);
418
- return x != null && x.values[0] ? String(x.values[0]) : "";
419
- }, [i, n]), p = I(() => !m || s.some((C) => C.id === m) ? !1 : !((d == null ? void 0 : d[a]) ?? []).some((C) => C.id === m), [m, s, d, a]), { data: f, isLoading: g } = r(m || "", {
420
- enabled: p,
416
+ const [l, c] = T(""), { data: d, isLoading: u } = t(l), m = E(() => {
417
+ const b = a.find((y) => y.field === n);
418
+ return b != null && b.values[0] ? String(b.values[0]) : "";
419
+ }, [a, n]), x = E(() => !m || s.some((y) => y.id === m) ? !1 : !((d == null ? void 0 : d[i]) ?? []).some((y) => y.id === m), [m, s, d, i]), { data: p, isLoading: f } = r(m || "", {
420
+ enabled: x,
421
421
  defaultErrorHandler: !1
422
- }), h = u || g, v = V((x) => l(x), [l]);
422
+ }), j = u || f, g = B((b) => o(b), [o]);
423
423
  return {
424
- options: I(() => {
424
+ options: E(() => {
425
425
  var k;
426
- const x = (d == null ? void 0 : d[a]) ?? [], C = {};
427
- for (const y of s)
428
- C[y.id] = v(y);
429
- for (const y of x)
430
- C[y.id] = v(y);
431
- const w = (k = f == null ? void 0 : f[a]) == null ? void 0 : k[0];
432
- return w != null && w.id && (C[w.id] = v(w)), m && !(m in C) && (C[m] = { value: m, label: `ID: ${m}` }), Object.values(C);
433
- }, [s, d, a, f, m, v]),
434
- isLoading: h,
435
- searchValue: c,
436
- onSearchChange: o
426
+ const b = (d == null ? void 0 : d[i]) ?? [], y = {};
427
+ for (const h of s)
428
+ y[h.id] = g(h);
429
+ for (const h of b)
430
+ y[h.id] = g(h);
431
+ const C = (k = p == null ? void 0 : p[i]) == null ? void 0 : k[0];
432
+ return C != null && C.id && (y[C.id] = g(C)), m && !(m in y) && (y[m] = { value: m, label: `ID: ${m}` }), Object.values(y);
433
+ }, [s, d, i, p, m, g]),
434
+ isLoading: j,
435
+ searchValue: l,
436
+ onSearchChange: c
437
437
  };
438
438
  }
439
- function bt(s, t, r, i) {
440
- var n = this, a = _(null), l = _(0), c = _(0), o = _(null), d = _([]), u = _(), m = _(), p = _(s), f = _(!0);
441
- p.current = s;
442
- var g = typeof window < "u", h = !t && t !== 0 && g;
439
+ function ft(s, t, r, a) {
440
+ var n = this, i = w(null), o = w(0), l = w(0), c = w(null), d = w([]), u = w(), m = w(), x = w(s), p = w(!0);
441
+ x.current = s;
442
+ var f = typeof window < "u", j = !t && t !== 0 && f;
443
443
  if (typeof s != "function") throw new TypeError("Expected a function");
444
444
  t = +t || 0;
445
- var v = !!(r = r || {}).leading, j = !("trailing" in r) || !!r.trailing, x = "maxWait" in r, C = "debounceOnServer" in r && !!r.debounceOnServer, w = x ? Math.max(+r.maxWait || 0, t) : null;
446
- E(function() {
447
- return f.current = !0, function() {
448
- f.current = !1;
445
+ var g = !!(r = r || {}).leading, v = !("trailing" in r) || !!r.trailing, b = "maxWait" in r, y = "debounceOnServer" in r && !!r.debounceOnServer, C = b ? Math.max(+r.maxWait || 0, t) : null;
446
+ I(function() {
447
+ return p.current = !0, function() {
448
+ p.current = !1;
449
449
  };
450
450
  }, []);
451
- var k = I(function() {
452
- var y = function(N) {
453
- var S = d.current, z = u.current;
454
- return d.current = u.current = null, l.current = N, c.current = c.current || N, m.current = p.current.apply(z, S);
455
- }, b = function(N, S) {
456
- h && cancelAnimationFrame(o.current), o.current = h ? requestAnimationFrame(N) : setTimeout(N, S);
457
- }, M = function(N) {
458
- if (!f.current) return !1;
459
- var S = N - a.current;
460
- return !a.current || S >= t || S < 0 || x && N - l.current >= w;
461
- }, H = function(N) {
462
- return o.current = null, j && d.current ? y(N) : (d.current = u.current = null, m.current);
463
- }, D = function N() {
464
- var S = Date.now();
465
- if (v && c.current === l.current && O(), M(S)) return H(S);
466
- if (f.current) {
467
- var z = t - (S - a.current), Q = x ? Math.min(z, w - (S - l.current)) : z;
468
- b(N, Q);
451
+ var k = E(function() {
452
+ var h = function(N) {
453
+ var _ = d.current, D = u.current;
454
+ return d.current = u.current = null, o.current = N, l.current = l.current || N, m.current = x.current.apply(D, _);
455
+ }, R = function(N, _) {
456
+ j && cancelAnimationFrame(c.current), c.current = j ? requestAnimationFrame(N) : setTimeout(N, _);
457
+ }, ee = function(N) {
458
+ if (!p.current) return !1;
459
+ var _ = N - i.current;
460
+ return !i.current || _ >= t || _ < 0 || b && N - o.current >= C;
461
+ }, O = function(N) {
462
+ return c.current = null, v && d.current ? h(N) : (d.current = u.current = null, m.current);
463
+ }, F = function N() {
464
+ var _ = Date.now();
465
+ if (g && l.current === o.current && V(), ee(_)) return O(_);
466
+ if (p.current) {
467
+ var D = t - (_ - i.current), q = b ? Math.min(D, C - (_ - o.current)) : D;
468
+ R(N, q);
469
469
  }
470
- }, O = function() {
471
- i && i({});
472
- }, F = function() {
473
- if (g || C) {
474
- var N = Date.now(), S = M(N);
475
- if (d.current = [].slice.call(arguments), u.current = n, a.current = N, S) {
476
- if (!o.current && f.current) return l.current = a.current, b(D, t), v ? y(a.current) : m.current;
477
- if (x) return b(D, t), y(a.current);
470
+ }, V = function() {
471
+ a && a({});
472
+ }, M = function() {
473
+ if (f || y) {
474
+ var N = Date.now(), _ = ee(N);
475
+ if (d.current = [].slice.call(arguments), u.current = n, i.current = N, _) {
476
+ if (!c.current && p.current) return o.current = i.current, R(F, t), g ? h(i.current) : m.current;
477
+ if (b) return R(F, t), h(i.current);
478
478
  }
479
- return o.current || b(D, t), m.current;
479
+ return c.current || R(F, t), m.current;
480
480
  }
481
481
  };
482
- return F.cancel = function() {
483
- var N = o.current;
484
- N && (h ? cancelAnimationFrame(o.current) : clearTimeout(o.current)), l.current = 0, d.current = a.current = u.current = o.current = null, N && i && i({});
485
- }, F.isPending = function() {
486
- return !!o.current;
487
- }, F.flush = function() {
488
- return o.current ? H(Date.now()) : m.current;
489
- }, F;
490
- }, [v, x, t, w, j, h, g, C, i]);
482
+ return M.cancel = function() {
483
+ var N = c.current;
484
+ N && (j ? cancelAnimationFrame(c.current) : clearTimeout(c.current)), o.current = 0, d.current = i.current = u.current = c.current = null, N && a && a({});
485
+ }, M.isPending = function() {
486
+ return !!c.current;
487
+ }, M.flush = function() {
488
+ return c.current ? O(Date.now()) : m.current;
489
+ }, M;
490
+ }, [g, b, t, C, v, j, f, y, a]);
491
491
  return k;
492
492
  }
493
- function gt(s, t) {
493
+ function xt(s, t) {
494
494
  return s === t;
495
495
  }
496
- function Ge(s, t, r) {
497
- var i = gt, n = _(s), a = R({})[1], l = bt(V(function(o) {
498
- n.current = o, a({});
499
- }, [a]), t, r, a), c = _(s);
500
- return i(c.current, s) || (l(s), c.current = s), [n.current, l];
496
+ function Qe(s, t, r) {
497
+ var a = xt, n = w(s), i = T({})[1], o = ft(B(function(c) {
498
+ n.current = c, i({});
499
+ }, [i]), t, r, i), l = w(s);
500
+ return a(l.current, s) || (o(s), l.current = s), [n.current, o];
501
501
  }
502
- function jt(s) {
503
- const [t] = Ge(s, 200);
504
- return ht({
502
+ function bt(s) {
503
+ const [t] = Qe(s, 200);
504
+ return mt({
505
505
  searchParams: {
506
506
  ...t && { search: t },
507
507
  limit: "100",
@@ -509,9 +509,9 @@ function jt(s) {
509
509
  }
510
510
  });
511
511
  }
512
- function vt(s) {
513
- const [t] = Ge(s, 200), r = t ? `title:~'${t.replace(/'/g, "\\'")}'` : "";
514
- return fs({
512
+ function gt(s) {
513
+ const [t] = Qe(s, 200), r = t ? `title:~'${t.replace(/'/g, "\\'")}'` : "";
514
+ return hs({
515
515
  searchParams: {
516
516
  ...r && { filter: r },
517
517
  limit: "100",
@@ -520,16 +520,16 @@ function vt(s) {
520
520
  }
521
521
  });
522
522
  }
523
- const Ct = ({
523
+ const jt = ({
524
524
  knownPosts: s,
525
525
  knownMembers: t,
526
526
  filters: r,
527
- onFiltersChange: i
527
+ onFiltersChange: a
528
528
  }) => {
529
- const n = ke({
529
+ const n = ye({
530
530
  knownItems: s,
531
- useSearch: vt,
532
- useGetById: xs,
531
+ useSearch: gt,
532
+ useGetById: ps,
533
533
  searchFieldName: "posts",
534
534
  filters: r,
535
535
  filterFieldName: "post",
@@ -537,10 +537,10 @@ const Ct = ({
537
537
  value: d.id,
538
538
  label: d.title || "(Untitled)"
539
539
  })
540
- }), a = ke({
540
+ }), i = ye({
541
541
  knownItems: t,
542
- useSearch: jt,
543
- useGetById: pt,
542
+ useSearch: bt,
543
+ useGetById: ut,
544
544
  searchFieldName: "members",
545
545
  filters: r,
546
546
  filterFieldName: "author",
@@ -549,17 +549,17 @@ const Ct = ({
549
549
  label: d.name || "Unknown name",
550
550
  detail: d.email ?? "(Unknown email)"
551
551
  })
552
- }), l = I(
552
+ }), o = E(
553
553
  () => [
554
554
  {
555
555
  key: "author",
556
556
  label: "Author",
557
557
  type: "select",
558
558
  icon: /* @__PURE__ */ e.jsx(oe, { className: "size-4" }),
559
- options: a.options,
560
- isLoading: a.options.length === 0 && a.isLoading,
561
- onSearchChange: a.onSearchChange,
562
- searchValue: a.searchValue,
559
+ options: i.options,
560
+ isLoading: i.options.length === 0 && i.isLoading,
561
+ onSearchChange: i.onSearchChange,
562
+ searchValue: i.searchValue,
563
563
  searchable: !0,
564
564
  className: "w-80",
565
565
  popoverContentClassName: "w-80",
@@ -572,7 +572,7 @@ const Ct = ({
572
572
  key: "post",
573
573
  label: "Post",
574
574
  type: "select",
575
- icon: /* @__PURE__ */ e.jsx(ws, { className: "size-4" }),
575
+ icon: /* @__PURE__ */ e.jsx(Ns, { className: "size-4" }),
576
576
  options: n.options,
577
577
  isLoading: n.options.length === 0 && n.isLoading,
578
578
  onSearchChange: n.onSearchChange,
@@ -589,7 +589,7 @@ const Ct = ({
589
589
  key: "body",
590
590
  label: "Text",
591
591
  type: "text",
592
- icon: /* @__PURE__ */ e.jsx(_s, { className: "size-4" }),
592
+ icon: /* @__PURE__ */ e.jsx(ks, { className: "size-4" }),
593
593
  placeholder: "Search comment text...",
594
594
  operators: [
595
595
  { value: "contains", label: "contains" },
@@ -603,7 +603,7 @@ const Ct = ({
603
603
  key: "status",
604
604
  label: "Status",
605
605
  type: "select",
606
- icon: /* @__PURE__ */ e.jsx(js, { className: "size-4" }),
606
+ icon: /* @__PURE__ */ e.jsx(xs, { className: "size-4" }),
607
607
  options: [
608
608
  { value: "published", label: "Published" },
609
609
  { value: "hidden", label: "Hidden" }
@@ -634,7 +634,7 @@ const Ct = ({
634
634
  label: "Date",
635
635
  type: "date",
636
636
  className: "w-full max-w-32",
637
- icon: /* @__PURE__ */ e.jsx(Ss, { className: "size-4" }),
637
+ icon: /* @__PURE__ */ e.jsx(ws, { className: "size-4" }),
638
638
  operators: [
639
639
  { value: "is", label: "is" },
640
640
  { value: "before", label: "before" },
@@ -642,92 +642,92 @@ const Ct = ({
642
642
  ]
643
643
  }
644
644
  ],
645
- [n, a]
646
- ), c = r.length > 0, o = T(
645
+ [n, i]
646
+ ), l = r.length > 0, c = P(
647
647
  "flex flex-row",
648
- !c && "[grid-area:actions] pt-5 justify-start sm:justify-end sm:pt-0",
649
- c && "col-start-1 col-end-4 row-start-3 pt-5"
648
+ !l && "[grid-area:actions] pt-5 justify-start sm:justify-end sm:pt-0",
649
+ l && "col-start-1 col-end-4 row-start-3 pt-5"
650
650
  );
651
- return /* @__PURE__ */ e.jsx("div", { className: o, children: /* @__PURE__ */ e.jsx(
652
- ms,
651
+ return /* @__PURE__ */ e.jsx("div", { className: c, children: /* @__PURE__ */ e.jsx(
652
+ cs,
653
653
  {
654
- addButtonIcon: c ? /* @__PURE__ */ e.jsx(Ps, {}) : /* @__PURE__ */ e.jsx(Ts, {}),
655
- addButtonText: c ? "Add filter" : "Filter",
654
+ addButtonIcon: l ? /* @__PURE__ */ e.jsx(_s, {}) : /* @__PURE__ */ e.jsx(Ss, {}),
655
+ addButtonText: l ? "Add filter" : "Filter",
656
656
  allowMultiple: !1,
657
- className: `[&>button]:order-last ${c ? "[&>button]:border-none" : "w-auto"}`,
657
+ className: `[&>button]:order-last ${l ? "[&>button]:border-none" : "w-auto"}`,
658
658
  clearButtonClassName: "font-normal text-muted-foreground",
659
- clearButtonIcon: /* @__PURE__ */ e.jsx(Ms, {}),
659
+ clearButtonIcon: /* @__PURE__ */ e.jsx(Is, {}),
660
660
  clearButtonText: "Clear",
661
- fields: l,
661
+ fields: o,
662
662
  filters: r,
663
663
  keyboardShortcut: "f",
664
- popoverAlign: c ? "start" : "end",
665
- showClearButton: c,
664
+ popoverAlign: l ? "start" : "end",
665
+ showClearButton: l,
666
666
  showSearchInput: !1,
667
- onChange: i
667
+ onChange: a
668
668
  }
669
669
  ) });
670
- }, yt = ({ children: s }) => /* @__PURE__ */ e.jsxs(ye, { className: "relative !pb-6 md:sticky", variant: "inline-nav", children: [
671
- /* @__PURE__ */ e.jsx(ye.Title, { children: "Comments" }),
670
+ }, vt = ({ children: s }) => /* @__PURE__ */ e.jsxs(ve, { className: "relative !pb-6 md:sticky", variant: "inline-nav", children: [
671
+ /* @__PURE__ */ e.jsx(ve.Title, { children: "Comments" }),
672
672
  s
673
- ] }), Nt = ({ children: s }) => /* @__PURE__ */ e.jsx(Os, { children: /* @__PURE__ */ e.jsx("div", { className: "grid w-full grow", children: /* @__PURE__ */ e.jsx("div", { className: "flex h-full flex-col", "data-testid": "comments-page", children: s }) }) });
674
- function kt({ onClick: s, expanded: t }) {
673
+ ] }), Ct = ({ children: s }) => /* @__PURE__ */ e.jsx(Fs, { children: /* @__PURE__ */ e.jsx("div", { className: "grid w-full grow", children: /* @__PURE__ */ e.jsx("div", { className: "flex h-full flex-col", "data-testid": "comments-page", children: s }) }) });
674
+ function yt({ onClick: s, expanded: t }) {
675
675
  return /* @__PURE__ */ e.jsxs(
676
- P,
676
+ S,
677
677
  {
678
678
  className: "shrink-0 gap-0.5 self-start p-0 text-base hover:bg-transparent",
679
679
  variant: "ghost",
680
680
  onClick: s,
681
681
  children: [
682
682
  t ? "Show less" : "Show more",
683
- t ? /* @__PURE__ */ e.jsx(Rs, {}) : /* @__PURE__ */ e.jsx(Us, {})
683
+ t ? /* @__PURE__ */ e.jsx(Ps, {}) : /* @__PURE__ */ e.jsx(Bs, {})
684
684
  ]
685
685
  }
686
686
  );
687
687
  }
688
- function Ye({ item: s }) {
689
- const t = _(null), [r, i] = R(!1), [n, a] = R(!1);
690
- return E(() => {
688
+ function Ke({ item: s }) {
689
+ const t = w(null), [r, a] = T(!1), [n, i] = T(!1);
690
+ return I(() => {
691
691
  if (n)
692
692
  return;
693
- const l = () => {
694
- t.current && i(t.current.scrollHeight > t.current.clientHeight);
693
+ const o = () => {
694
+ t.current && a(t.current.scrollHeight > t.current.clientHeight);
695
695
  };
696
- return l(), window.addEventListener("resize", l), () => window.removeEventListener("resize", l);
696
+ return o(), window.addEventListener("resize", o), () => window.removeEventListener("resize", o);
697
697
  }, [s.html, n]), /* @__PURE__ */ e.jsx("div", { className: "mt-1 flex flex-col gap-2", children: /* @__PURE__ */ e.jsxs("div", { className: `flex max-w-full flex-col items-start ${s.status === "hidden" && "opacity-50"}`, children: [
698
698
  /* @__PURE__ */ e.jsx(
699
699
  "div",
700
700
  {
701
701
  dangerouslySetInnerHTML: { __html: s.html || "" },
702
702
  ref: t,
703
- className: T(
703
+ className: P(
704
704
  "prose flex-1 text-base max-w-[80ch] balance leading-[1.5em] [&_*]:leading-[1.5em] [&_*]:text-base [&_*]:font-normal [&_blockquote]:border-l-[3px] [&_blockquote]:border-foreground [&_blockquote]:p-0 [&_blockquote]:pl-3 [&_blockquote_p]:mt-0 [&_a]:underline",
705
705
  n ? "-mb-1 [&_p]:mb-[0.85em]" : "line-clamp-2 [&_p]:m-0 [&_blockquote+p]:mt-1 mb-1"
706
706
  )
707
707
  }
708
708
  ),
709
- r && /* @__PURE__ */ e.jsx(kt, { expanded: n, onClick: () => a(!n) })
709
+ r && /* @__PURE__ */ e.jsx(yt, { expanded: n, onClick: () => i(!n) })
710
710
  ] }) });
711
711
  }
712
- const ee = "CommentsResponseType", wt = ps({
713
- dataType: ee,
712
+ const J = "CommentsResponseType", Nt = us({
713
+ dataType: J,
714
714
  path: "/comments/",
715
715
  defaultNextPageParams: (s, t) => {
716
- var r, i;
716
+ var r, a;
717
717
  return (r = s.meta) != null && r.pagination.next ? {
718
718
  ...t,
719
- page: (((i = s.meta) == null ? void 0 : i.pagination.next) || 1).toString()
719
+ page: (((a = s.meta) == null ? void 0 : a.pagination.next) || 1).toString()
720
720
  } : void 0;
721
721
  },
722
722
  returnData: (s) => {
723
- const { pages: t } = s, r = t.flatMap((n) => n.comments), i = t[t.length - 1].meta;
723
+ const { pages: t } = s, r = t.flatMap((n) => n.comments), a = t[t.length - 1].meta;
724
724
  return {
725
725
  comments: r,
726
- meta: i,
727
- isEnd: i ? i.pagination.pages === i.pagination.page : !0
726
+ meta: a,
727
+ isEnd: a ? a.pagination.pages === a.pagination.page : !0
728
728
  };
729
729
  }
730
- }), Xe = (s) => wt({
730
+ }), Ge = (s) => Nt({
731
731
  ...s,
732
732
  searchParams: {
733
733
  limit: "100",
@@ -735,7 +735,7 @@ const ee = "CommentsResponseType", wt = ps({
735
735
  include: "member,post,parent",
736
736
  ...s == null ? void 0 : s.searchParams
737
737
  }
738
- }), Ze = Z({
738
+ }), Ye = X({
739
739
  method: "PUT",
740
740
  path: ({ id: s }) => `/comments/${s}/`,
741
741
  body: ({ id: s }) => ({
@@ -745,9 +745,9 @@ const ee = "CommentsResponseType", wt = ps({
745
745
  }]
746
746
  }),
747
747
  invalidateQueries: {
748
- dataType: ee
748
+ dataType: J
749
749
  }
750
- }), Je = Z({
750
+ }), Xe = X({
751
751
  method: "PUT",
752
752
  path: ({ id: s }) => `/comments/${s}/`,
753
753
  body: ({ id: s }) => ({
@@ -757,18 +757,18 @@ const ee = "CommentsResponseType", wt = ps({
757
757
  }]
758
758
  }),
759
759
  invalidateQueries: {
760
- dataType: ee
760
+ dataType: J
761
761
  }
762
- }), _t = X({
763
- dataType: ee,
762
+ }), kt = Y({
763
+ dataType: J,
764
764
  path: (s) => `/comments/${s}/`,
765
765
  defaultSearchParams: {
766
766
  include: "member,post,count.replies,count.direct_replies,count.likes,count.reports,parent,in_reply_to"
767
767
  }
768
- }), St = X({
768
+ }), wt = Y({
769
769
  dataType: "CommentReportsResponseType",
770
770
  path: (s) => `/comments/${s}/reports/`
771
- }), Pt = (s, t) => St(s, { ...t }), Tt = X({
771
+ }), _t = (s, t) => wt(s, { ...t }), St = Y({
772
772
  dataType: "CommentLikesResponseType",
773
773
  path: (s) => `/comments/${s}/likes/`,
774
774
  defaultSearchParams: {
@@ -776,7 +776,7 @@ const ee = "CommentsResponseType", wt = ps({
776
776
  limit: "100",
777
777
  order: "created_at desc"
778
778
  }
779
- }), Rt = (s, t) => Tt(s, { ...t }), Lt = (s, t) => Xe({
779
+ }), Pt = (s, t) => St(s, { ...t }), Tt = (s, t) => Ge({
780
780
  ...t,
781
781
  searchParams: {
782
782
  filter: `(parent_id:${s}+in_reply_to_id:null),in_reply_to_id:${s}`,
@@ -785,17 +785,17 @@ const ee = "CommentsResponseType", wt = ps({
785
785
  limit: "100"
786
786
  }
787
787
  });
788
- function B({ avatarImage: s, memberId: t, isHidden: r, className: i }) {
789
- return /* @__PURE__ */ e.jsxs("div", { className: T(
788
+ function z({ avatarImage: s, memberId: t, isHidden: r, className: a }) {
789
+ return /* @__PURE__ */ e.jsxs("div", { className: P(
790
790
  "relative flex size-6 min-w-6 items-center justify-center overflow-hidden rounded-full bg-accent md:size-8 md:min-w-8",
791
791
  r && "opacity-50",
792
- i
792
+ a
793
793
  ), children: [
794
794
  t && s && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0", children: /* @__PURE__ */ e.jsx("img", { alt: "Member avatar", src: s }) }),
795
795
  /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(oe, { className: "!size-3 text-muted-foreground md:!size-4", size: 12 }) })
796
796
  ] });
797
797
  }
798
- function It(s) {
798
+ function Rt(s) {
799
799
  const t = new Date(s);
800
800
  return new Intl.DateTimeFormat("en-US", {
801
801
  month: "short",
@@ -805,34 +805,34 @@ function It(s) {
805
805
  minute: "numeric"
806
806
  }).format(t).replace(/(\d+),(\s+\d{4})/, "$1$2");
807
807
  }
808
- function es({
808
+ function Ze({
809
809
  memberName: s,
810
810
  memberId: t,
811
811
  createdAt: r,
812
- isHidden: i,
812
+ isHidden: a,
813
813
  canComment: n,
814
- onAuthorClick: a,
815
- postTitle: l,
816
- onPostClick: c,
817
- className: o
814
+ onAuthorClick: i,
815
+ postTitle: o,
816
+ onPostClick: l,
817
+ className: c
818
818
  }) {
819
- return /* @__PURE__ */ e.jsxs("div", { className: T("flex items-baseline gap-4", o), children: [
820
- /* @__PURE__ */ e.jsxs("div", { className: T(
819
+ return /* @__PURE__ */ e.jsxs("div", { className: P("flex items-baseline gap-4", c), children: [
820
+ /* @__PURE__ */ e.jsxs("div", { className: P(
821
821
  "mb-1 flex min-w-0 items-center gap-x-1 text-sm",
822
- i && "opacity-50"
822
+ a && "opacity-50"
823
823
  ), children: [
824
- /* @__PURE__ */ e.jsx("div", { className: "whitespace-nowrap", children: t && a ? /* @__PURE__ */ e.jsx(
825
- P,
824
+ /* @__PURE__ */ e.jsx("div", { className: "whitespace-nowrap", children: t && i ? /* @__PURE__ */ e.jsx(
825
+ S,
826
826
  {
827
827
  className: "flex h-auto items-center gap-1.5 truncate p-0 font-semibold text-primary hover:opacity-70",
828
828
  variant: "link",
829
- onClick: a,
829
+ onClick: i,
830
830
  children: s || "Unknown"
831
831
  }
832
832
  ) : /* @__PURE__ */ e.jsx("span", { className: "block truncate font-semibold", children: s || "Unknown" }) }),
833
833
  n === !1 && /* @__PURE__ */ e.jsx(te, { children: /* @__PURE__ */ e.jsxs(re, { children: [
834
834
  /* @__PURE__ */ e.jsx(ne, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { "data-testid": "commenting-disabled-indicator", children: /* @__PURE__ */ e.jsx(
835
- Te,
835
+ Se,
836
836
  {
837
837
  className: "size-3.5 text-muted-foreground"
838
838
  }
@@ -841,129 +841,125 @@ function es({
841
841
  ] }) }),
842
842
  /* @__PURE__ */ e.jsx(ce, { className: "shrink-0 text-muted-foreground/50", size: 16 }),
843
843
  /* @__PURE__ */ e.jsx("div", { className: "shrink-0 whitespace-nowrap", children: r && /* @__PURE__ */ e.jsx(te, { children: /* @__PURE__ */ e.jsxs(re, { children: [
844
- /* @__PURE__ */ e.jsx(ne, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { className: "cursor-default text-sm text-muted-foreground", children: q(r) }) }),
845
- /* @__PURE__ */ e.jsx(ae, { children: It(r) })
844
+ /* @__PURE__ */ e.jsx(ne, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { className: "cursor-default text-sm text-muted-foreground", children: A(r) }) }),
845
+ /* @__PURE__ */ e.jsx(ae, { children: Rt(r) })
846
846
  ] }) }) }),
847
- l && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
847
+ o && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
848
848
  /* @__PURE__ */ e.jsx("div", { className: "shrink-0 text-muted-foreground", children: "on" }),
849
- /* @__PURE__ */ e.jsx("div", { className: "min-w-0 truncate", children: c ? /* @__PURE__ */ e.jsx(
850
- P,
849
+ /* @__PURE__ */ e.jsx("div", { className: "min-w-0 truncate", children: l ? /* @__PURE__ */ e.jsx(
850
+ S,
851
851
  {
852
852
  className: "block h-auto w-full cursor-pointer truncate p-0 text-left font-medium text-gray-800 hover:opacity-70 dark:text-gray-400",
853
853
  variant: "link",
854
- onClick: c,
855
- children: l
854
+ onClick: l,
855
+ children: o
856
856
  }
857
- ) : /* @__PURE__ */ e.jsx("span", { className: "font-medium text-gray-800 dark:text-gray-400", children: l }) })
857
+ ) : /* @__PURE__ */ e.jsx("span", { className: "font-medium text-gray-800 dark:text-gray-400", children: o }) })
858
858
  ] })
859
859
  ] }),
860
- i && /* @__PURE__ */ e.jsx(Js, { variant: "secondary", children: "Hidden" })
860
+ a && /* @__PURE__ */ e.jsx(Xs, { variant: "secondary", children: "Hidden" })
861
861
  ] });
862
862
  }
863
- function Et({
863
+ function Lt({
864
864
  open: s,
865
865
  memberName: t,
866
866
  onOpenChange: r,
867
- onConfirm: i
867
+ onConfirm: a
868
868
  }) {
869
- const [n, a] = R(!1), l = (o) => {
870
- o || a(!1), r(o);
871
- }, c = () => {
872
- i(n), a(!1);
869
+ const [n, i] = T(!1), o = (c) => {
870
+ c || i(!1), r(c);
871
+ }, l = () => {
872
+ a(n), i(!1);
873
873
  };
874
- return /* @__PURE__ */ e.jsx(de, { open: s, onOpenChange: l, children: /* @__PURE__ */ e.jsxs(me, { className: "gap-5", children: [
874
+ return /* @__PURE__ */ e.jsx(de, { open: s, onOpenChange: o, children: /* @__PURE__ */ e.jsxs(me, { className: "gap-5", children: [
875
875
  /* @__PURE__ */ e.jsxs(ue, { children: [
876
876
  /* @__PURE__ */ e.jsx(he, { children: "Disable comments" }),
877
- /* @__PURE__ */ e.jsxs(Ds, { children: [
877
+ /* @__PURE__ */ e.jsxs($s, { children: [
878
878
  t || "This member",
879
879
  " won't be able to comment in the future. You can re-enable commenting anytime."
880
880
  ] })
881
881
  ] }),
882
882
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
883
883
  /* @__PURE__ */ e.jsx(
884
- Ue,
884
+ Be,
885
885
  {
886
886
  checked: n,
887
887
  id: "hide-comments",
888
- onCheckedChange: (o) => a(o === !0)
888
+ onCheckedChange: (c) => i(c === !0)
889
889
  }
890
890
  ),
891
- /* @__PURE__ */ e.jsx(Qe, { htmlFor: "hide-comments", children: "Hide all previous comments" })
891
+ /* @__PURE__ */ e.jsx(qe, { htmlFor: "hide-comments", children: "Hide all previous comments" })
892
892
  ] }),
893
893
  /* @__PURE__ */ e.jsxs(pe, { children: [
894
- /* @__PURE__ */ e.jsx(P, { variant: "outline", onClick: () => l(!1), children: "Cancel" }),
895
- /* @__PURE__ */ e.jsx(P, { onClick: c, children: "Disable comments" })
894
+ /* @__PURE__ */ e.jsx(S, { variant: "outline", onClick: () => o(!1), children: "Cancel" }),
895
+ /* @__PURE__ */ e.jsx(S, { onClick: l, children: "Disable comments" })
896
896
  ] })
897
897
  ] }) });
898
898
  }
899
- function ss({
900
- comment: s,
901
- commentPermalinksEnabled: t
899
+ function Je({
900
+ comment: s
902
901
  }) {
903
- const { mutate: r } = ft(), { mutate: i } = xt(), [n, a] = R(!1), { id: l, post: c, member: o } = s, d = c == null ? void 0 : c.url, u = o == null ? void 0 : o.id, m = o == null ? void 0 : o.can_comment, p = (g) => {
904
- u && (r({
905
- id: u,
906
- reason: `Disabled from comment ${l}`,
907
- hideComments: g
908
- }), a(!1));
909
- }, f = () => {
910
- u && i({ id: u });
902
+ const { mutate: t } = ht(), { mutate: r } = pt(), [a, n] = T(!1), { id: i, post: o, member: l } = s, c = o == null ? void 0 : o.url, d = l == null ? void 0 : l.id, u = l == null ? void 0 : l.can_comment, m = (p) => {
903
+ d && (t({
904
+ id: d,
905
+ reason: `Disabled from comment ${i}`,
906
+ hideComments: p
907
+ }), n(!1));
908
+ }, x = () => {
909
+ d && r({ id: d });
911
910
  };
912
911
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
913
- /* @__PURE__ */ e.jsxs(vs, { children: [
914
- /* @__PURE__ */ e.jsx(Cs, { asChild: !0, children: /* @__PURE__ */ e.jsx(
915
- P,
912
+ /* @__PURE__ */ e.jsxs(bs, { children: [
913
+ /* @__PURE__ */ e.jsx(gs, { asChild: !0, children: /* @__PURE__ */ e.jsx(
914
+ S,
916
915
  {
917
916
  className: "relative z-10 text-gray-800 hover:bg-secondary [&_svg]:size-4",
918
917
  size: "sm",
919
918
  variant: "ghost",
920
- children: /* @__PURE__ */ e.jsx(ys, {})
919
+ children: /* @__PURE__ */ e.jsx(js, {})
921
920
  }
922
921
  ) }),
923
- /* @__PURE__ */ e.jsxs(Ns, { align: "start", children: [
924
- d && (t ? /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsxs("a", { href: `${d}#ghost-comments-${l}`, rel: "noopener noreferrer", target: "_blank", children: [
925
- /* @__PURE__ */ e.jsx(Ce, { className: "size-4" }),
922
+ /* @__PURE__ */ e.jsxs(vs, { align: "start", children: [
923
+ c && /* @__PURE__ */ e.jsx(W, { asChild: !0, children: /* @__PURE__ */ e.jsxs("a", { href: `${c}#ghost-comments-${i}`, rel: "noopener noreferrer", target: "_blank", children: [
924
+ /* @__PURE__ */ e.jsx(Cs, { className: "size-4" }),
926
925
  "View on post"
927
- ] }) }) : /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsxs("a", { href: d, rel: "noopener noreferrer", target: "_blank", children: [
928
- /* @__PURE__ */ e.jsx(Ce, { className: "size-4" }),
929
- "View post"
930
- ] }) })),
931
- u && /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsxs("a", { href: `#/members/${u}`, children: [
926
+ ] }) }),
927
+ d && /* @__PURE__ */ e.jsx(W, { asChild: !0, children: /* @__PURE__ */ e.jsxs("a", { href: `#/members/${d}`, children: [
932
928
  /* @__PURE__ */ e.jsx(oe, { className: "size-4" }),
933
929
  "View member"
934
930
  ] }) }),
935
- u && (m !== !1 ? /* @__PURE__ */ e.jsxs(A, { onClick: () => a(!0), children: [
936
- /* @__PURE__ */ e.jsx(Te, { className: "size-4" }),
931
+ d && (u !== !1 ? /* @__PURE__ */ e.jsxs(W, { onClick: () => n(!0), children: [
932
+ /* @__PURE__ */ e.jsx(Se, { className: "size-4" }),
937
933
  "Disable commenting"
938
- ] }) : /* @__PURE__ */ e.jsxs(A, { onClick: f, children: [
939
- /* @__PURE__ */ e.jsx(Ls, { className: "size-4" }),
934
+ ] }) : /* @__PURE__ */ e.jsxs(W, { onClick: x, children: [
935
+ /* @__PURE__ */ e.jsx(Ts, { className: "size-4" }),
940
936
  "Enable commenting"
941
937
  ] }))
942
938
  ] })
943
939
  ] }),
944
940
  /* @__PURE__ */ e.jsx(
945
- Et,
941
+ Lt,
946
942
  {
947
- memberName: o == null ? void 0 : o.name,
948
- open: n,
949
- onConfirm: p,
950
- onOpenChange: a
943
+ memberName: l == null ? void 0 : l.name,
944
+ open: a,
945
+ onConfirm: m,
946
+ onOpenChange: n
951
947
  }
952
948
  )
953
949
  ] });
954
950
  }
955
- function $t({ comment: s, open: t, onOpenChange: r }) {
956
- var o, d, u, m, p;
957
- const { data: i, isLoading: n } = Rt(s.id, { enabled: t }), a = (i == null ? void 0 : i.comment_likes) ?? [], l = ((o = s.count) == null ? void 0 : o.likes) ?? 0, c = l - a.length;
951
+ function Et({ comment: s, open: t, onOpenChange: r }) {
952
+ var c, d, u, m, x;
953
+ const { data: a, isLoading: n } = Pt(s.id, { enabled: t }), i = (a == null ? void 0 : a.comment_likes) ?? [], o = ((c = s.count) == null ? void 0 : c.likes) ?? 0, l = o - i.length;
958
954
  return /* @__PURE__ */ e.jsx(de, { open: t, onOpenChange: r, children: /* @__PURE__ */ e.jsxs(me, { "aria-describedby": void 0, children: [
959
955
  /* @__PURE__ */ e.jsx(ue, { children: /* @__PURE__ */ e.jsxs(he, { children: [
960
- l,
956
+ o,
961
957
  " ",
962
- l === 1 ? "like" : "likes"
958
+ o === 1 ? "like" : "likes"
963
959
  ] }) }),
964
960
  /* @__PURE__ */ e.jsx("div", { className: "overflow-hidden rounded-md border p-3", children: /* @__PURE__ */ e.jsxs("div", { className: "flex min-w-0 items-start gap-3", children: [
965
961
  /* @__PURE__ */ e.jsx(
966
- B,
962
+ z,
967
963
  {
968
964
  avatarImage: (d = s.member) == null ? void 0 : d.avatar_image,
969
965
  className: "shrink-0",
@@ -974,9 +970,9 @@ function $t({ comment: s, open: t, onOpenChange: r }) {
974
970
  /* @__PURE__ */ e.jsxs("div", { className: "flex min-w-0 items-center gap-1 text-sm", children: [
975
971
  /* @__PURE__ */ e.jsx("span", { className: "shrink-0 font-semibold", children: ((m = s.member) == null ? void 0 : m.name) || "Unknown" }),
976
972
  /* @__PURE__ */ e.jsx(ce, { className: "shrink-0 text-muted-foreground/50", size: 16 }),
977
- /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-muted-foreground", children: s.created_at && q(s.created_at) }),
973
+ /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-muted-foreground", children: s.created_at && A(s.created_at) }),
978
974
  /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-muted-foreground", children: "on" }),
979
- /* @__PURE__ */ e.jsx("span", { className: "min-w-0 truncate font-medium text-gray-800 dark:text-gray-400", children: ((p = s.post) == null ? void 0 : p.title) || "Unknown post" })
975
+ /* @__PURE__ */ e.jsx("span", { className: "min-w-0 truncate font-medium text-gray-800 dark:text-gray-400", children: ((x = s.post) == null ? void 0 : x.title) || "Unknown post" })
980
976
  ] }),
981
977
  /* @__PURE__ */ e.jsx(
982
978
  "div",
@@ -987,49 +983,49 @@ function $t({ comment: s, open: t, onOpenChange: r }) {
987
983
  )
988
984
  ] })
989
985
  ] }) }),
990
- /* @__PURE__ */ e.jsx("div", { className: "-mx-1 max-h-64 overflow-y-auto px-1", children: n ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-4", children: /* @__PURE__ */ e.jsx(W, { size: "md" }) }) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3 pb-1", children: [
991
- a.map((f) => {
992
- var g, h, v;
986
+ /* @__PURE__ */ e.jsx("div", { className: "-mx-1 max-h-64 overflow-y-auto px-1", children: n ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-4", children: /* @__PURE__ */ e.jsx(U, { size: "md" }) }) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3 pb-1", children: [
987
+ i.map((p) => {
988
+ var f, j, g;
993
989
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
994
990
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
995
991
  /* @__PURE__ */ e.jsxs("div", { className: "relative shrink-0", children: [
996
992
  /* @__PURE__ */ e.jsx(
997
- B,
993
+ z,
998
994
  {
999
- avatarImage: (g = f.member) == null ? void 0 : g.avatar_image,
1000
- memberId: (h = f.member) == null ? void 0 : h.id
995
+ avatarImage: (f = p.member) == null ? void 0 : f.avatar_image,
996
+ memberId: (j = p.member) == null ? void 0 : j.id
1001
997
  }
1002
998
  ),
1003
- /* @__PURE__ */ e.jsx("div", { className: "absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-pink-500 text-white", children: /* @__PURE__ */ e.jsx(Re, { className: "size-2.5", fill: "currentColor" }) })
999
+ /* @__PURE__ */ e.jsx("div", { className: "absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-pink-500 text-white", children: /* @__PURE__ */ e.jsx(Pe, { className: "size-2.5", fill: "currentColor" }) })
1004
1000
  ] }),
1005
- /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: ((v = f.member) == null ? void 0 : v.name) || "Deleted member" })
1001
+ /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: ((g = p.member) == null ? void 0 : g.name) || "Deleted member" })
1006
1002
  ] }),
1007
- /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: q(f.created_at) })
1008
- ] }, f.id);
1003
+ /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: A(p.created_at) })
1004
+ ] }, p.id);
1009
1005
  }),
1010
- c > 0 && /* @__PURE__ */ e.jsxs("div", { className: "pt-1 text-center text-sm text-muted-foreground", children: [
1006
+ l > 0 && /* @__PURE__ */ e.jsxs("div", { className: "pt-1 text-center text-sm text-muted-foreground", children: [
1011
1007
  "and ",
1012
- c,
1008
+ l,
1013
1009
  " more"
1014
1010
  ] })
1015
1011
  ] }) }),
1016
- /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsx(P, { onClick: () => r(!1), children: "OK" }) })
1012
+ /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsx(S, { onClick: () => r(!1), children: "OK" }) })
1017
1013
  ] }) });
1018
1014
  }
1019
- function Mt({ comment: s, open: t, onOpenChange: r }) {
1020
- var c, o, d, u, m;
1021
- const { data: i, isLoading: n } = Pt(s.id, { enabled: t }), a = (i == null ? void 0 : i.comment_reports) ?? [], l = ((c = s.count) == null ? void 0 : c.reports) ?? a.length;
1015
+ function It({ comment: s, open: t, onOpenChange: r }) {
1016
+ var l, c, d, u, m;
1017
+ const { data: a, isLoading: n } = _t(s.id, { enabled: t }), i = (a == null ? void 0 : a.comment_reports) ?? [], o = ((l = s.count) == null ? void 0 : l.reports) ?? i.length;
1022
1018
  return /* @__PURE__ */ e.jsx(de, { open: t, onOpenChange: r, children: /* @__PURE__ */ e.jsxs(me, { "aria-describedby": void 0, children: [
1023
1019
  /* @__PURE__ */ e.jsx(ue, { children: /* @__PURE__ */ e.jsxs(he, { children: [
1024
- l,
1020
+ o,
1025
1021
  " ",
1026
- l === 1 ? "report" : "reports"
1022
+ o === 1 ? "report" : "reports"
1027
1023
  ] }) }),
1028
1024
  /* @__PURE__ */ e.jsx("div", { className: "overflow-hidden rounded-md border p-3", children: /* @__PURE__ */ e.jsxs("div", { className: "flex min-w-0 items-start gap-3", children: [
1029
1025
  /* @__PURE__ */ e.jsx(
1030
- B,
1026
+ z,
1031
1027
  {
1032
- avatarImage: (o = s.member) == null ? void 0 : o.avatar_image,
1028
+ avatarImage: (c = s.member) == null ? void 0 : c.avatar_image,
1033
1029
  className: "shrink-0",
1034
1030
  memberId: (d = s.member) == null ? void 0 : d.id
1035
1031
  }
@@ -1038,7 +1034,7 @@ function Mt({ comment: s, open: t, onOpenChange: r }) {
1038
1034
  /* @__PURE__ */ e.jsxs("div", { className: "flex min-w-0 items-center gap-1 text-sm", children: [
1039
1035
  /* @__PURE__ */ e.jsx("span", { className: "shrink-0 font-semibold", children: ((u = s.member) == null ? void 0 : u.name) || "Unknown" }),
1040
1036
  /* @__PURE__ */ e.jsx(ce, { className: "shrink-0 text-muted-foreground/50", size: 16 }),
1041
- /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-muted-foreground", children: s.created_at && q(s.created_at) }),
1037
+ /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-muted-foreground", children: s.created_at && A(s.created_at) }),
1042
1038
  /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-muted-foreground", children: "on" }),
1043
1039
  /* @__PURE__ */ e.jsx("span", { className: "min-w-0 truncate font-medium text-gray-800 dark:text-gray-400", children: ((m = s.post) == null ? void 0 : m.title) || "Unknown post" })
1044
1040
  ] }),
@@ -1051,57 +1047,57 @@ function Mt({ comment: s, open: t, onOpenChange: r }) {
1051
1047
  )
1052
1048
  ] })
1053
1049
  ] }) }),
1054
- /* @__PURE__ */ e.jsx("div", { className: "-mx-1 max-h-64 overflow-y-auto px-1", children: n ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-4", children: /* @__PURE__ */ e.jsx(W, { size: "md" }) }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3 pb-1", children: a.map((p) => {
1055
- var f, g, h;
1050
+ /* @__PURE__ */ e.jsx("div", { className: "-mx-1 max-h-64 overflow-y-auto px-1", children: n ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-4", children: /* @__PURE__ */ e.jsx(U, { size: "md" }) }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3 pb-1", children: i.map((x) => {
1051
+ var p, f, j;
1056
1052
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
1057
1053
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
1058
1054
  /* @__PURE__ */ e.jsxs("div", { className: "relative shrink-0", children: [
1059
1055
  /* @__PURE__ */ e.jsx(
1060
- B,
1056
+ z,
1061
1057
  {
1062
- avatarImage: (f = p.member) == null ? void 0 : f.avatar_image,
1063
- memberId: (g = p.member) == null ? void 0 : g.id
1058
+ avatarImage: (p = x.member) == null ? void 0 : p.avatar_image,
1059
+ memberId: (f = x.member) == null ? void 0 : f.id
1064
1060
  }
1065
1061
  ),
1066
1062
  /* @__PURE__ */ e.jsx("div", { className: "absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-red text-white", children: /* @__PURE__ */ e.jsx(le, { className: "size-2.5", fill: "currentColor" }) })
1067
1063
  ] }),
1068
- /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: ((h = p.member) == null ? void 0 : h.name) || "Deleted member" })
1064
+ /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: ((j = x.member) == null ? void 0 : j.name) || "Deleted member" })
1069
1065
  ] }),
1070
- /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: q(p.created_at) })
1071
- ] }, p.id);
1066
+ /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: A(x.created_at) })
1067
+ ] }, x.id);
1072
1068
  }) }) }),
1073
- /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsx(P, { onClick: () => r(!1), children: "OK" }) })
1069
+ /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsx(S, { onClick: () => r(!1), children: "OK" }) })
1074
1070
  ] }) });
1075
1071
  }
1076
- function se({ icon: s, count: t, label: r, to: i, onClick: n, className: a, testId: l }) {
1077
- const c = T("flex items-center gap-1 text-xs text-gray-800", a), o = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1072
+ function se({ icon: s, count: t, label: r, to: a, onClick: n, className: i, testId: o }) {
1073
+ const l = P("flex items-center gap-1 text-xs text-gray-800", i), c = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1078
1074
  s,
1079
- /* @__PURE__ */ e.jsx("span", { children: ls(t) })
1080
- ] }), d = i || n;
1075
+ /* @__PURE__ */ e.jsx("span", { children: is(t) })
1076
+ ] }), d = a || n;
1081
1077
  return /* @__PURE__ */ e.jsx(te, { children: /* @__PURE__ */ e.jsxs(re, { children: [
1082
- /* @__PURE__ */ e.jsx(ne, { asChild: !0, children: i ? /* @__PURE__ */ e.jsx(
1078
+ /* @__PURE__ */ e.jsx(ne, { asChild: !0, children: a ? /* @__PURE__ */ e.jsx(
1083
1079
  ie,
1084
1080
  {
1085
- className: T(c, "cursor-pointer hover:opacity-70"),
1086
- "data-testid": l,
1087
- to: i,
1081
+ className: P(l, "cursor-pointer hover:opacity-70"),
1082
+ "data-testid": o,
1083
+ to: a,
1088
1084
  onClick: (u) => {
1089
1085
  u.stopPropagation();
1090
1086
  },
1091
- children: o
1087
+ children: c
1092
1088
  }
1093
1089
  ) : n ? /* @__PURE__ */ e.jsx(
1094
1090
  "button",
1095
1091
  {
1096
- className: T(c, "cursor-pointer hover:opacity-70"),
1097
- "data-testid": l,
1092
+ className: P(l, "cursor-pointer hover:opacity-70"),
1093
+ "data-testid": o,
1098
1094
  type: "button",
1099
1095
  onClick: (u) => {
1100
1096
  u.stopPropagation(), n();
1101
1097
  },
1102
- children: o
1098
+ children: c
1103
1099
  }
1104
- ) : /* @__PURE__ */ e.jsx("div", { className: c, "data-testid": l, children: o }) }),
1100
+ ) : /* @__PURE__ */ e.jsx("div", { className: l, "data-testid": o, children: c }) }),
1105
1101
  /* @__PURE__ */ e.jsx(ae, { children: d ? `View ${r.toLowerCase()}` : r })
1106
1102
  ] }) });
1107
1103
  }
@@ -1111,63 +1107,63 @@ function ge(s, t) {
1111
1107
  const r = new URLSearchParams(s);
1112
1108
  return r.set("thread", `is:${t}`), `?${r.toString()}`;
1113
1109
  }
1114
- function ts({
1110
+ function es({
1115
1111
  comment: s,
1116
1112
  className: t
1117
1113
  }) {
1118
- var g, h, v, j, x;
1119
- const [r] = Y(), [i, n] = R(!1), [a, l] = R(!1), c = ge(r, s.id), o = ((g = s.count) == null ? void 0 : g.direct_replies) ?? ((h = s.count) == null ? void 0 : h.replies) ?? ((v = s.replies) == null ? void 0 : v.length) ?? 0, d = ((j = s.count) == null ? void 0 : j.likes) ?? 0, u = ((x = s.count) == null ? void 0 : x.reports) ?? 0, m = o > 0, p = d > 0, f = u > 0;
1114
+ var f, j, g, v, b;
1115
+ const [r] = G(), [a, n] = T(!1), [i, o] = T(!1), l = ge(r, s.id), c = ((f = s.count) == null ? void 0 : f.direct_replies) ?? ((j = s.count) == null ? void 0 : j.replies) ?? ((g = s.replies) == null ? void 0 : g.length) ?? 0, d = ((v = s.count) == null ? void 0 : v.likes) ?? 0, u = ((b = s.count) == null ? void 0 : b.reports) ?? 0, m = c > 0, x = d > 0, p = u > 0;
1120
1116
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1121
- /* @__PURE__ */ e.jsxs("div", { className: T("flex items-center gap-6", t), children: [
1117
+ /* @__PURE__ */ e.jsxs("div", { className: P("flex items-center gap-6", t), children: [
1122
1118
  /* @__PURE__ */ e.jsx(
1123
1119
  se,
1124
1120
  {
1125
- count: o,
1126
- icon: /* @__PURE__ */ e.jsx(Is, { size: 16, strokeWidth: 1.5 }),
1121
+ count: c,
1122
+ icon: /* @__PURE__ */ e.jsx(Rs, { size: 16, strokeWidth: 1.5 }),
1127
1123
  label: "Replies",
1128
1124
  testId: "replies-metric",
1129
- to: m ? c : void 0
1125
+ to: m ? l : void 0
1130
1126
  }
1131
1127
  ),
1132
1128
  /* @__PURE__ */ e.jsx(
1133
1129
  se,
1134
1130
  {
1135
1131
  count: d,
1136
- icon: /* @__PURE__ */ e.jsx(Re, { size: 16, strokeWidth: 1.5 }),
1132
+ icon: /* @__PURE__ */ e.jsx(Pe, { size: 16, strokeWidth: 1.5 }),
1137
1133
  label: "Likes",
1138
- onClick: p ? () => n(!0) : void 0
1134
+ onClick: x ? () => n(!0) : void 0
1139
1135
  }
1140
1136
  ),
1141
1137
  /* @__PURE__ */ e.jsx(
1142
1138
  se,
1143
1139
  {
1144
- className: f ? "font-semibold text-red" : void 0,
1140
+ className: p ? "font-semibold text-red" : void 0,
1145
1141
  count: u,
1146
1142
  icon: /* @__PURE__ */ e.jsx(le, { size: 16, strokeWidth: 1.5 }),
1147
1143
  label: "Reports",
1148
- onClick: f ? () => l(!0) : void 0
1144
+ onClick: p ? () => o(!0) : void 0
1149
1145
  }
1150
1146
  )
1151
1147
  ] }),
1152
1148
  /* @__PURE__ */ e.jsx(
1153
- $t,
1149
+ Et,
1154
1150
  {
1155
1151
  comment: s,
1156
- open: i,
1152
+ open: a,
1157
1153
  onOpenChange: n
1158
1154
  }
1159
1155
  ),
1160
1156
  /* @__PURE__ */ e.jsx(
1161
- Mt,
1157
+ It,
1162
1158
  {
1163
1159
  comment: s,
1164
- open: a,
1165
- onOpenChange: l
1160
+ open: i,
1161
+ onOpenChange: o
1166
1162
  }
1167
1163
  )
1168
1164
  ] });
1169
1165
  }
1170
- function Dt({ hasReplies: s }) {
1166
+ function $t({ hasReplies: s }) {
1171
1167
  return s ? /* @__PURE__ */ e.jsx(
1172
1168
  "div",
1173
1169
  {
@@ -1176,21 +1172,21 @@ function Dt({ hasReplies: s }) {
1176
1172
  }
1177
1173
  ) : null;
1178
1174
  }
1179
- function rs({ comment: s, isReply: t = !1, isSelectedComment: r = !1, selectedCommentId: i, commentPermalinksEnabled: n }) {
1180
- var u, m, p, f, g, h, v, j;
1181
- const [a] = Y(), { mutate: l } = Ze(), { mutate: c } = Je(), o = (((u = s.replies) == null ? void 0 : u.length) ?? 0) > 0 || (((m = s.count) == null ? void 0 : m.direct_replies) ?? ((p = s.count) == null ? void 0 : p.replies) ?? 0) > 0, d = !o || t ? "mb-7" : "mb-0";
1182
- return /* @__PURE__ */ e.jsxs("div", { className: `flex w-full flex-row ${d}`, children: [
1175
+ function ss({ comment: s, isReply: t = !1, isSelectedComment: r = !1, selectedCommentId: a }) {
1176
+ var d, u, m, x, p, f, j, g;
1177
+ const [n] = G(), { mutate: i } = Ye(), { mutate: o } = Xe(), l = (((d = s.replies) == null ? void 0 : d.length) ?? 0) > 0 || (((u = s.count) == null ? void 0 : u.direct_replies) ?? ((m = s.count) == null ? void 0 : m.replies) ?? 0) > 0, c = !l || t ? "mb-7" : "mb-0";
1178
+ return /* @__PURE__ */ e.jsxs("div", { className: `flex w-full flex-row ${c}`, children: [
1183
1179
  /* @__PURE__ */ e.jsxs("div", { className: "mr-2 flex shrink-0 flex-col items-center justify-start md:mr-3", children: [
1184
1180
  /* @__PURE__ */ e.jsx(
1185
- B,
1181
+ z,
1186
1182
  {
1187
- avatarImage: (f = s.member) == null ? void 0 : f.avatar_image,
1183
+ avatarImage: (x = s.member) == null ? void 0 : x.avatar_image,
1188
1184
  className: "mb-3 shrink-0 md:mb-4",
1189
1185
  isHidden: s.status === "hidden",
1190
- memberId: (g = s.member) == null ? void 0 : g.id
1186
+ memberId: (p = s.member) == null ? void 0 : p.id
1191
1187
  }
1192
1188
  ),
1193
- /* @__PURE__ */ e.jsx(Dt, { hasReplies: o && !t })
1189
+ /* @__PURE__ */ e.jsx($t, { hasReplies: l && !t })
1194
1190
  ] }),
1195
1191
  /* @__PURE__ */ e.jsx("div", { className: "grow", children: /* @__PURE__ */ e.jsxs(
1196
1192
  "div",
@@ -1200,13 +1196,13 @@ function rs({ comment: s, isReply: t = !1, isSelectedComment: r = !1, selectedCo
1200
1196
  children: [
1201
1197
  /* @__PURE__ */ e.jsxs("div", { className: "flex min-w-0 flex-col", children: [
1202
1198
  /* @__PURE__ */ e.jsx(
1203
- es,
1199
+ Ze,
1204
1200
  {
1205
- canComment: (h = s.member) == null ? void 0 : h.can_comment,
1201
+ canComment: (f = s.member) == null ? void 0 : f.can_comment,
1206
1202
  createdAt: s.created_at,
1207
1203
  isHidden: s.status === "hidden",
1208
- memberId: (v = s.member) == null ? void 0 : v.id,
1209
- memberName: (j = s.member) == null ? void 0 : j.name
1204
+ memberId: (j = s.member) == null ? void 0 : j.id,
1205
+ memberName: (g = s.member) == null ? void 0 : g.name
1210
1206
  }
1211
1207
  ),
1212
1208
  s.in_reply_to_snippet && r && /* @__PURE__ */ e.jsxs("div", { className: `mb-1 line-clamp-1 text-sm ${s.status === "hidden" && "opacity-50"}`, children: [
@@ -1217,187 +1213,181 @@ function rs({ comment: s, isReply: t = !1, isSelectedComment: r = !1, selectedCo
1217
1213
  {
1218
1214
  className: "text-sm font-normal text-muted-foreground hover:text-foreground",
1219
1215
  "data-testid": "replied-to-link",
1220
- to: ge(a, s.in_reply_to_id || s.parent_id) || "",
1221
- onClick: (x) => {
1222
- x.stopPropagation();
1216
+ to: ge(n, s.in_reply_to_id || s.parent_id) || "",
1217
+ onClick: (v) => {
1218
+ v.stopPropagation();
1223
1219
  },
1224
1220
  children: s.in_reply_to_snippet
1225
1221
  }
1226
1222
  )
1227
1223
  ] }),
1228
- /* @__PURE__ */ e.jsx(Ye, { item: s }),
1224
+ /* @__PURE__ */ e.jsx(Ke, { item: s }),
1229
1225
  /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex flex-row flex-wrap items-center gap-3", children: [
1230
- s.status === "published" && /* @__PURE__ */ e.jsxs(P, { className: "text-gray-800", size: "sm", variant: "outline", onClick: () => l({ id: s.id }), children: [
1231
- /* @__PURE__ */ e.jsx(Le, {}),
1226
+ s.status === "published" && /* @__PURE__ */ e.jsxs(S, { className: "text-gray-800", size: "sm", variant: "outline", onClick: () => i({ id: s.id }), children: [
1227
+ /* @__PURE__ */ e.jsx(Te, {}),
1232
1228
  /* @__PURE__ */ e.jsx("span", { className: "max-md:hidden", children: "Hide" })
1233
1229
  ] }),
1234
- s.status === "hidden" && /* @__PURE__ */ e.jsxs(P, { className: "text-gray-800", size: "sm", variant: "outline", onClick: () => c({ id: s.id }), children: [
1235
- /* @__PURE__ */ e.jsx(Ie, {}),
1230
+ s.status === "hidden" && /* @__PURE__ */ e.jsxs(S, { className: "text-gray-800", size: "sm", variant: "outline", onClick: () => o({ id: s.id }), children: [
1231
+ /* @__PURE__ */ e.jsx(Re, {}),
1236
1232
  /* @__PURE__ */ e.jsx("span", { className: "max-md:hidden", children: "Show" })
1237
1233
  ] }),
1238
1234
  /* @__PURE__ */ e.jsx(
1239
- ts,
1235
+ es,
1240
1236
  {
1241
1237
  comment: s
1242
1238
  }
1243
1239
  ),
1244
1240
  /* @__PURE__ */ e.jsx(
1245
- ss,
1241
+ Je,
1246
1242
  {
1247
- comment: s,
1248
- commentPermalinksEnabled: n
1243
+ comment: s
1249
1244
  }
1250
1245
  )
1251
1246
  ] })
1252
1247
  ] }),
1253
- o && s.replies && /* @__PURE__ */ e.jsx("div", { className: "-ml-2 mb-4 mt-7 pl-2 md:-ml-3 md:mb-0 md:mt-8 md:pl-3", children: s.replies.map((x) => /* @__PURE__ */ e.jsx(
1254
- rs,
1248
+ l && s.replies && /* @__PURE__ */ e.jsx("div", { className: "-ml-2 mb-4 mt-7 pl-2 md:-ml-3 md:mb-0 md:mt-8 md:pl-3", children: s.replies.map((v) => /* @__PURE__ */ e.jsx(
1249
+ ss,
1255
1250
  {
1256
- comment: x,
1257
- commentPermalinksEnabled: n,
1251
+ comment: v,
1258
1252
  isReply: !0,
1259
- selectedCommentId: i
1253
+ selectedCommentId: a
1260
1254
  },
1261
- x.id
1255
+ v.id
1262
1256
  )) })
1263
1257
  ]
1264
1258
  }
1265
1259
  ) })
1266
1260
  ] });
1267
1261
  }
1268
- const Ft = ({
1262
+ const Mt = ({
1269
1263
  selectedComment: s,
1270
1264
  replies: t,
1271
1265
  selectedCommentId: r,
1272
- commentPermalinksEnabled: i,
1273
- fetchNextPage: n,
1274
- hasNextPage: a,
1275
- isFetchingNextPage: l
1266
+ fetchNextPage: a,
1267
+ hasNextPage: n,
1268
+ isFetchingNextPage: i
1276
1269
  }) => {
1277
- const c = { ...s, replies: t };
1270
+ const o = { ...s, replies: t };
1278
1271
  return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", "data-testid": "comment-thread-list", children: [
1279
1272
  /* @__PURE__ */ e.jsx(
1280
- rs,
1273
+ ss,
1281
1274
  {
1282
- comment: c,
1283
- commentPermalinksEnabled: i,
1275
+ comment: o,
1284
1276
  isSelectedComment: !0,
1285
1277
  selectedCommentId: r
1286
1278
  }
1287
1279
  ),
1288
- a && /* @__PURE__ */ e.jsx("div", { className: "flex justify-center pb-4", children: /* @__PURE__ */ e.jsx(
1289
- P,
1280
+ n && /* @__PURE__ */ e.jsx("div", { className: "flex justify-center pb-4", children: /* @__PURE__ */ e.jsx(
1281
+ S,
1290
1282
  {
1291
- disabled: l,
1283
+ disabled: i,
1292
1284
  variant: "outline",
1293
- onClick: () => n(),
1294
- children: l ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1295
- /* @__PURE__ */ e.jsx(W, { size: "sm" }),
1285
+ onClick: () => a(),
1286
+ children: i ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1287
+ /* @__PURE__ */ e.jsx(U, { size: "sm" }),
1296
1288
  "Loading..."
1297
1289
  ] }) : "Load more replies"
1298
1290
  }
1299
1291
  ) })
1300
1292
  ] });
1301
- }, zt = ({
1293
+ }, Dt = ({
1302
1294
  commentId: s,
1303
1295
  open: t,
1304
- onOpenChange: r,
1305
- commentPermalinksEnabled: i
1296
+ onOpenChange: r
1306
1297
  }) => {
1307
- var j;
1298
+ var g;
1308
1299
  const {
1309
- data: n,
1310
- isLoading: a,
1311
- isError: l,
1312
- fetchNextPage: c,
1313
- hasNextPage: o,
1314
- isFetchingNextPage: d
1315
- } = Lt(s ?? "", {
1300
+ data: a,
1301
+ isLoading: n,
1302
+ isError: i,
1303
+ fetchNextPage: o,
1304
+ hasNextPage: l,
1305
+ isFetchingNextPage: c
1306
+ } = Tt(s ?? "", {
1316
1307
  enabled: t && !!s
1317
- }), { data: u, isLoading: m, isError: p } = _t(s ?? "", {
1308
+ }), { data: d, isLoading: u, isError: m } = kt(s ?? "", {
1318
1309
  enabled: t && !!s
1319
- }), f = a || m, g = p || l && !u, h = (j = u == null ? void 0 : u.comments) == null ? void 0 : j[0], v = (n == null ? void 0 : n.comments) || [];
1320
- return /* @__PURE__ */ e.jsx(Vs, { open: t, onOpenChange: r, children: /* @__PURE__ */ e.jsxs(qs, { className: "overflow-y-auto px-6 pt-0 sm:max-w-[600px]", children: [
1321
- /* @__PURE__ */ e.jsx(Ws, { className: "sticky top-0 z-40 -mx-6 bg-background/60 p-6 backdrop-blur", children: /* @__PURE__ */ e.jsx(Qs, { className: "text-md", children: "Thread" }) }),
1322
- (h == null ? void 0 : h.post) && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1310
+ }), x = n || u, p = m || i && !d, f = (g = d == null ? void 0 : d.comments) == null ? void 0 : g[0], j = (a == null ? void 0 : a.comments) || [];
1311
+ return /* @__PURE__ */ e.jsx(As, { open: t, onOpenChange: r, children: /* @__PURE__ */ e.jsxs(Us, { className: "overflow-y-auto px-6 pt-0 sm:max-w-[600px]", children: [
1312
+ /* @__PURE__ */ e.jsx(Vs, { className: "sticky top-0 z-40 -mx-6 bg-background/60 p-6 backdrop-blur", children: /* @__PURE__ */ e.jsx(qs, { className: "text-md", children: "Thread" }) }),
1313
+ (f == null ? void 0 : f.post) && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1323
1314
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-4", children: [
1324
1315
  /* @__PURE__ */ e.jsxs("div", { className: "min-w-0 flex-1", children: [
1325
- /* @__PURE__ */ e.jsx("h3", { className: "line-clamp-1 text-xl font-semibold text-foreground", children: h.post.title }),
1326
- h.post.excerpt && /* @__PURE__ */ e.jsx("p", { className: "mt-1 line-clamp-2 text-sm text-muted-foreground", children: h.post.excerpt })
1316
+ /* @__PURE__ */ e.jsx("h3", { className: "line-clamp-1 text-xl font-semibold text-foreground", children: f.post.title }),
1317
+ f.post.excerpt && /* @__PURE__ */ e.jsx("p", { className: "mt-1 line-clamp-2 text-sm text-muted-foreground", children: f.post.excerpt })
1327
1318
  ] }),
1328
- h.post.feature_image && /* @__PURE__ */ e.jsx(
1319
+ f.post.feature_image && /* @__PURE__ */ e.jsx(
1329
1320
  "img",
1330
1321
  {
1331
- alt: h.post.title || "Post feature image",
1322
+ alt: f.post.title || "Post feature image",
1332
1323
  className: "hidden aspect-video h-18 shrink-0 rounded object-cover lg:block",
1333
- src: h.post.feature_image
1324
+ src: f.post.feature_image
1334
1325
  }
1335
1326
  )
1336
1327
  ] }),
1337
- /* @__PURE__ */ e.jsx(ks, { className: "-mx-6 my-6 w-auto" })
1328
+ /* @__PURE__ */ e.jsx(ys, { className: "-mx-6 my-6 w-auto" })
1338
1329
  ] }),
1339
- /* @__PURE__ */ e.jsx("div", { children: f ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center py-8", children: /* @__PURE__ */ e.jsx(W, { size: "lg" }) }) : g || !h ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center py-8", children: /* @__PURE__ */ e.jsx(
1340
- Me,
1330
+ /* @__PURE__ */ e.jsx("div", { children: x ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center py-8", children: /* @__PURE__ */ e.jsx(U, { size: "lg" }) }) : p || !f ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center py-8", children: /* @__PURE__ */ e.jsx(
1331
+ Ie,
1341
1332
  {
1342
- actions: /* @__PURE__ */ e.jsx(P, { variant: "outline", onClick: () => r(!1), children: "Back to comments" }),
1333
+ actions: /* @__PURE__ */ e.jsx(S, { variant: "outline", onClick: () => r(!1), children: "Back to comments" }),
1343
1334
  description: "This thread may have been deleted or doesn't exist.",
1344
1335
  title: "Thread not found",
1345
- children: /* @__PURE__ */ e.jsx(Ee, {})
1336
+ children: /* @__PURE__ */ e.jsx(Le, {})
1346
1337
  }
1347
1338
  ) }) : /* @__PURE__ */ e.jsx(
1348
- Ft,
1339
+ Mt,
1349
1340
  {
1350
- commentPermalinksEnabled: i,
1351
- fetchNextPage: c,
1352
- hasNextPage: o,
1353
- isFetchingNextPage: d,
1354
- replies: v,
1355
- selectedComment: h,
1341
+ fetchNextPage: o,
1342
+ hasNextPage: l,
1343
+ isFetchingNextPage: c,
1344
+ replies: j,
1345
+ selectedComment: f,
1356
1346
  selectedCommentId: s ?? ""
1357
1347
  }
1358
1348
  ) })
1359
1349
  ] }) });
1360
- }, we = /* @__PURE__ */ new Map();
1361
- function Ot({ parentRef: s, enabled: t = !0, isLoading: r = !1 }) {
1362
- const i = cs(), [n, a] = R(null), l = _(null);
1363
- E(() => {
1350
+ }, Ne = /* @__PURE__ */ new Map();
1351
+ function Ft({ parentRef: s, enabled: t = !0, isLoading: r = !1 }) {
1352
+ const a = os(), [n, i] = T(null), o = w(null);
1353
+ I(() => {
1364
1354
  if (!t || !s.current)
1365
1355
  return;
1366
- const c = Fs(s.current);
1367
- a(c);
1368
- }, [t, s]), E(() => {
1356
+ const l = Ms(s.current);
1357
+ i(l);
1358
+ }, [t, s]), I(() => {
1369
1359
  if (!t || !n)
1370
1360
  return;
1371
- const c = i.pathname + i.search, o = () => {
1361
+ const l = a.pathname + a.search, c = () => {
1372
1362
  const d = n.scrollTop;
1373
- we.set(c, d);
1363
+ Ne.set(l, d);
1374
1364
  };
1375
- return n.addEventListener("scroll", o), () => n.removeEventListener("scroll", o);
1376
- }, [t, i.pathname, i.search, n]), E(() => {
1377
- const c = i.pathname + i.search, o = we.get(c);
1365
+ return n.addEventListener("scroll", c), () => n.removeEventListener("scroll", c);
1366
+ }, [t, a.pathname, a.search, n]), I(() => {
1367
+ const l = a.pathname + a.search, c = Ne.get(l);
1378
1368
  if (!(!t || !n || r)) {
1379
- if (o !== void 0 && l.current !== c) {
1369
+ if (c !== void 0 && o.current !== l) {
1380
1370
  let d = 0;
1381
1371
  const u = 3, m = () => {
1382
1372
  if (d += 1, !n)
1383
1373
  return;
1384
- const f = n.scrollTop, g = n.scrollHeight, h = n.clientHeight, v = g - h;
1385
- if (o > v && d < u) {
1374
+ const p = n.scrollTop, f = n.scrollHeight, j = n.clientHeight, g = f - j;
1375
+ if (c > g && d < u) {
1386
1376
  setTimeout(m, 100);
1387
1377
  return;
1388
1378
  }
1389
- if (Math.abs(o - f) > 5) {
1390
- const j = Math.min(o, v);
1391
- n.scrollTop = j;
1379
+ if (Math.abs(c - p) > 5) {
1380
+ const v = Math.min(c, g);
1381
+ n.scrollTop = v;
1392
1382
  }
1393
- }, p = setTimeout(m, 150);
1394
- return () => clearTimeout(p);
1383
+ }, x = setTimeout(m, 150);
1384
+ return () => clearTimeout(x);
1395
1385
  }
1396
- l.current = c;
1386
+ o.current = l;
1397
1387
  }
1398
- }, [t, i.pathname, i.search, n, r]);
1388
+ }, [t, a.pathname, a.search, n, r]);
1399
1389
  }
1400
- const _e = ({ height: s }) => /* @__PURE__ */ e.jsx("div", { "aria-hidden": "true", className: "flex", children: /* @__PURE__ */ e.jsx("div", { className: "flex", style: { height: s } }) }), Bt = L(function(t, r) {
1390
+ const ke = ({ height: s }) => /* @__PURE__ */ e.jsx("div", { "aria-hidden": "true", className: "flex", children: /* @__PURE__ */ e.jsx("div", { className: "flex", style: { height: s } }) }), zt = L(function(t, r) {
1401
1391
  return /* @__PURE__ */ e.jsx(
1402
1392
  "div",
1403
1393
  {
@@ -1409,86 +1399,85 @@ const _e = ({ height: s }) => /* @__PURE__ */ e.jsx("div", { "aria-hidden": "tru
1409
1399
  }
1410
1400
  );
1411
1401
  });
1412
- function Ht({
1402
+ function Ot({
1413
1403
  items: s,
1414
1404
  totalItems: t,
1415
1405
  hasNextPage: r,
1416
- isFetchingNextPage: i,
1406
+ isFetchingNextPage: a,
1417
1407
  fetchNextPage: n,
1418
- onAddFilter: a,
1419
- isLoading: l,
1420
- commentPermalinksEnabled: c
1408
+ onAddFilter: i,
1409
+ isLoading: o
1421
1410
  }) {
1422
- const o = _(null), [d, u] = Y(), [m, p] = R(!1), [f, g] = R(null), { mutate: h } = Ze(), { mutate: v } = Je(), j = (k) => {
1423
- if (p(k), !k) {
1424
- const y = new URLSearchParams(d);
1425
- y.delete("thread"), u(y, { replace: !0 });
1411
+ const l = w(null), [c, d] = G(), [u, m] = T(!1), [x, p] = T(null), { mutate: f } = Ye(), { mutate: j } = Xe(), g = (C) => {
1412
+ if (m(C), !C) {
1413
+ const k = new URLSearchParams(c);
1414
+ k.delete("thread"), d(k, { replace: !0 });
1426
1415
  }
1427
1416
  };
1428
- E(() => {
1429
- const k = d.get("thread");
1430
- if (k) {
1431
- const y = k.match(/^is:(.+)$/);
1432
- if (y && y[1]) {
1433
- const b = y[1];
1434
- g(b), p(!0);
1417
+ I(() => {
1418
+ const C = c.get("thread");
1419
+ if (C) {
1420
+ const k = C.match(/^is:(.+)$/);
1421
+ if (k && k[1]) {
1422
+ const h = k[1];
1423
+ p(h), m(!0);
1435
1424
  } else
1436
- p(!1), g(null);
1425
+ m(!1), p(null);
1437
1426
  } else
1438
- p(!1), g(null);
1439
- }, [d]), Ot({ parentRef: o, isLoading: l });
1440
- const { visibleItems: x, spaceBefore: C, spaceAfter: w } = zs({
1427
+ m(!1), p(null);
1428
+ }, [c]), Ft({ parentRef: l, isLoading: o });
1429
+ const { visibleItems: v, spaceBefore: b, spaceAfter: y } = Ds({
1441
1430
  items: s,
1442
1431
  totalItems: t,
1443
1432
  hasNextPage: r,
1444
- isFetchingNextPage: i,
1433
+ isFetchingNextPage: a,
1445
1434
  fetchNextPage: n,
1446
- parentRef: o
1435
+ parentRef: l
1447
1436
  });
1448
- return /* @__PURE__ */ e.jsxs("div", { ref: o, className: "overflow-hidden", children: [
1437
+ return /* @__PURE__ */ e.jsxs("div", { ref: l, className: "overflow-hidden", children: [
1449
1438
  /* @__PURE__ */ e.jsx(
1450
1439
  "div",
1451
1440
  {
1452
1441
  className: "flex flex-col",
1453
1442
  "data-testid": "comments-list",
1454
1443
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
1455
- /* @__PURE__ */ e.jsx(_e, { height: C }),
1456
- x.map(({ key: k, virtualItem: y, item: b, props: M }) => {
1457
- var D, O, F, N, S, z, Q, je, ve;
1458
- return y.index > s.length - 1 ? /* @__PURE__ */ e.jsx(Bt, { ...M }, k) : /* @__PURE__ */ e.jsxs(
1444
+ /* @__PURE__ */ e.jsx(ke, { height: b }),
1445
+ v.map(({ key: C, virtualItem: k, item: h, props: R }) => {
1446
+ var O, F, V, M, N, _, D, q, je;
1447
+ return k.index > s.length - 1 ? /* @__PURE__ */ e.jsx(zt, { ...R }, C) : /* @__PURE__ */ e.jsxs(
1459
1448
  "div",
1460
1449
  {
1461
- ...M,
1450
+ ...R,
1462
1451
  className: "grid w-full grid-cols-1 items-start justify-between gap-4 border-b p-3 hover:bg-muted/50 md:p-5 lg:grid-cols-[minmax(0,1fr)_144px]",
1463
1452
  "data-testid": "comment-list-row",
1464
1453
  onClick: () => {
1465
- m && j(!1);
1454
+ u && g(!1);
1466
1455
  },
1467
1456
  children: [
1468
1457
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-3", children: [
1469
1458
  /* @__PURE__ */ e.jsx(
1470
- B,
1459
+ z,
1471
1460
  {
1472
- avatarImage: (D = b.member) == null ? void 0 : D.avatar_image,
1473
- isHidden: b.status === "hidden",
1474
- memberId: (O = b.member) == null ? void 0 : O.id
1461
+ avatarImage: (O = h.member) == null ? void 0 : O.avatar_image,
1462
+ isHidden: h.status === "hidden",
1463
+ memberId: (F = h.member) == null ? void 0 : F.id
1475
1464
  }
1476
1465
  ),
1477
1466
  /* @__PURE__ */ e.jsxs("div", { className: "flex min-w-0 flex-col", children: [
1478
1467
  /* @__PURE__ */ e.jsx(
1479
- es,
1468
+ Ze,
1480
1469
  {
1481
- canComment: (F = b.member) == null ? void 0 : F.can_comment,
1482
- createdAt: b.created_at,
1483
- isHidden: b.status === "hidden",
1484
- memberId: (N = b.member) == null ? void 0 : N.id,
1485
- memberName: (S = b.member) == null ? void 0 : S.name,
1486
- postTitle: (z = b.post) == null ? void 0 : z.title,
1487
- onAuthorClick: (Q = b.member) != null && Q.id ? () => a("author", b.member.id) : void 0,
1488
- onPostClick: (je = b.post) != null && je.id ? () => a("post", b.post.id) : void 0
1470
+ canComment: (V = h.member) == null ? void 0 : V.can_comment,
1471
+ createdAt: h.created_at,
1472
+ isHidden: h.status === "hidden",
1473
+ memberId: (M = h.member) == null ? void 0 : M.id,
1474
+ memberName: (N = h.member) == null ? void 0 : N.name,
1475
+ postTitle: (_ = h.post) == null ? void 0 : _.title,
1476
+ onAuthorClick: (D = h.member) != null && D.id ? () => i("author", h.member.id) : void 0,
1477
+ onPostClick: (q = h.post) != null && q.id ? () => i("post", h.post.id) : void 0
1489
1478
  }
1490
1479
  ),
1491
- b.in_reply_to_snippet && /* @__PURE__ */ e.jsxs("div", { className: `mb-1 line-clamp-1 max-w-3xl text-sm ${b.status === "hidden" && "opacity-50"}`, children: [
1480
+ h.in_reply_to_snippet && /* @__PURE__ */ e.jsxs("div", { className: `mb-1 line-clamp-1 max-w-3xl text-sm ${h.status === "hidden" && "opacity-50"}`, children: [
1492
1481
  /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Replied to:" }),
1493
1482
  " ",
1494
1483
  /* @__PURE__ */ e.jsx(
@@ -1496,71 +1485,69 @@ function Ht({
1496
1485
  {
1497
1486
  className: "text-sm font-normal text-muted-foreground hover:text-foreground",
1498
1487
  "data-testid": "replied-to-link",
1499
- to: ge(d, b.in_reply_to_id || b.parent_id) || "",
1500
- onClick: (as) => {
1501
- as.stopPropagation();
1488
+ to: ge(c, h.in_reply_to_id || h.parent_id) || "",
1489
+ onClick: (rs) => {
1490
+ rs.stopPropagation();
1502
1491
  },
1503
- children: b.in_reply_to_snippet
1492
+ children: h.in_reply_to_snippet
1504
1493
  }
1505
1494
  )
1506
1495
  ] }),
1507
- /* @__PURE__ */ e.jsx(Ye, { item: b }),
1496
+ /* @__PURE__ */ e.jsx(Ke, { item: h }),
1508
1497
  /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex flex-row flex-nowrap items-center gap-3", children: [
1509
- b.status === "published" && /* @__PURE__ */ e.jsxs(P, { className: "text-foreground", size: "sm", variant: "outline", onClick: () => h({ id: b.id }), children: [
1510
- /* @__PURE__ */ e.jsx(Le, {}),
1498
+ h.status === "published" && /* @__PURE__ */ e.jsxs(S, { className: "text-foreground", size: "sm", variant: "outline", onClick: () => f({ id: h.id }), children: [
1499
+ /* @__PURE__ */ e.jsx(Te, {}),
1511
1500
  "Hide"
1512
1501
  ] }),
1513
- b.status === "hidden" && /* @__PURE__ */ e.jsxs(P, { className: "text-foreground", size: "sm", variant: "outline", onClick: () => v({ id: b.id }), children: [
1514
- /* @__PURE__ */ e.jsx(Ie, {}),
1502
+ h.status === "hidden" && /* @__PURE__ */ e.jsxs(S, { className: "text-foreground", size: "sm", variant: "outline", onClick: () => j({ id: h.id }), children: [
1503
+ /* @__PURE__ */ e.jsx(Re, {}),
1515
1504
  "Show"
1516
1505
  ] }),
1517
1506
  /* @__PURE__ */ e.jsx(
1518
- ts,
1507
+ es,
1519
1508
  {
1520
1509
  className: "ml-2",
1521
- comment: b
1510
+ comment: h
1522
1511
  }
1523
1512
  ),
1524
1513
  /* @__PURE__ */ e.jsx(
1525
- ss,
1514
+ Je,
1526
1515
  {
1527
- comment: b,
1528
- commentPermalinksEnabled: c
1516
+ comment: h
1529
1517
  }
1530
1518
  )
1531
1519
  ] })
1532
1520
  ] })
1533
1521
  ] }),
1534
- /* @__PURE__ */ e.jsx("div", { children: (ve = b.post) != null && ve.feature_image ? /* @__PURE__ */ e.jsx(
1522
+ /* @__PURE__ */ e.jsx("div", { children: (je = h.post) != null && je.feature_image ? /* @__PURE__ */ e.jsx(
1535
1523
  "img",
1536
1524
  {
1537
- alt: b.post.title || "Post feature image",
1538
- className: `hidden aspect-video w-36 rounded object-cover lg:block ${b.status === "hidden" && "opacity-50"}`,
1539
- src: b.post.feature_image
1525
+ alt: h.post.title || "Post feature image",
1526
+ className: `hidden aspect-video w-36 rounded object-cover lg:block ${h.status === "hidden" && "opacity-50"}`,
1527
+ src: h.post.feature_image
1540
1528
  }
1541
1529
  ) : null })
1542
1530
  ]
1543
1531
  },
1544
- k
1532
+ C
1545
1533
  );
1546
1534
  }),
1547
- /* @__PURE__ */ e.jsx(_e, { height: w })
1535
+ /* @__PURE__ */ e.jsx(ke, { height: y })
1548
1536
  ] })
1549
1537
  }
1550
1538
  ),
1551
1539
  /* @__PURE__ */ e.jsx(
1552
- zt,
1540
+ Dt,
1553
1541
  {
1554
- commentId: f,
1555
- commentPermalinksEnabled: c,
1556
- open: m,
1557
- onOpenChange: j
1542
+ commentId: x,
1543
+ open: u,
1544
+ onOpenChange: g
1558
1545
  }
1559
1546
  )
1560
1547
  ] });
1561
1548
  }
1562
- const ns = ["id", "status", "created_at", "body", "post", "author", "reported"];
1563
- function At(s) {
1549
+ const ts = ["id", "status", "created_at", "body", "post", "author", "reported"];
1550
+ function Ht(s) {
1564
1551
  const t = [];
1565
1552
  for (const r of s)
1566
1553
  if (r.values[0])
@@ -1577,8 +1564,8 @@ function At(s) {
1577
1564
  else if (r.operator === "after" && r.values[0])
1578
1565
  t.push(`created_at:>'${r.values[0]}'`);
1579
1566
  else if (r.operator === "is" && r.values[0]) {
1580
- const a = String(r.values[0]), l = (/* @__PURE__ */ new Date(a + "T00:00:00")).toISOString(), c = (/* @__PURE__ */ new Date(a + "T23:59:59.999")).toISOString();
1581
- t.push(`created_at:>='${l}'+created_at:<='${c}'`);
1567
+ const i = String(r.values[0]), o = (/* @__PURE__ */ new Date(i + "T00:00:00")).toISOString(), l = (/* @__PURE__ */ new Date(i + "T23:59:59.999")).toISOString();
1568
+ t.push(`created_at:>='${o}'+created_at:<='${l}'`);
1582
1569
  }
1583
1570
  break;
1584
1571
  case "body":
@@ -1597,7 +1584,7 @@ function At(s) {
1597
1584
  }
1598
1585
  return t.length ? t.join("+") : void 0;
1599
1586
  }
1600
- function Ut(s) {
1587
+ function Bt(s) {
1601
1588
  if (!s)
1602
1589
  return null;
1603
1590
  const t = s.indexOf(":");
@@ -1606,12 +1593,12 @@ function Ut(s) {
1606
1593
  value: s.substring(t + 1)
1607
1594
  };
1608
1595
  }
1609
- function Vt(s) {
1596
+ function At(s) {
1610
1597
  const t = [];
1611
- for (const [r, i] of s.entries()) {
1612
- if (!ns.includes(r) || !i)
1598
+ for (const [r, a] of s.entries()) {
1599
+ if (!ts.includes(r) || !a)
1613
1600
  continue;
1614
- const n = Ut(i);
1601
+ const n = Bt(a);
1615
1602
  n && t.push({
1616
1603
  id: r,
1617
1604
  field: r,
@@ -1621,36 +1608,36 @@ function Vt(s) {
1621
1608
  }
1622
1609
  return t;
1623
1610
  }
1624
- function qt(s) {
1611
+ function Ut(s) {
1625
1612
  const t = new URLSearchParams();
1626
1613
  for (const r of s)
1627
- if (ns.includes(r.field) && r.values[0] !== void 0) {
1628
- const i = `${r.operator}:${String(r.values[0])}`;
1629
- t.set(r.field, i);
1614
+ if (ts.includes(r.field) && r.values[0] !== void 0) {
1615
+ const a = `${r.operator}:${String(r.values[0])}`;
1616
+ t.set(r.field, a);
1630
1617
  }
1631
1618
  return t;
1632
1619
  }
1633
- function Wt() {
1634
- const [s, t] = Y(), r = I(() => Vt(s), [s]), i = V((c, o = {}) => {
1635
- const d = typeof c == "function" ? c(r) : c, u = qt(d), m = o.replace ?? !0;
1620
+ function Vt() {
1621
+ const [s, t] = G(), r = E(() => At(s), [s]), a = B((l, c = {}) => {
1622
+ const d = typeof l == "function" ? l(r) : l, u = Ut(d), m = c.replace ?? !0;
1636
1623
  t(u, { replace: m });
1637
- }, [r, t]), n = V(({ replace: c = !0 } = {}) => {
1638
- t(new URLSearchParams(), { replace: c });
1639
- }, [t]), a = I(() => At(r), [r]), l = I(() => r.length === 1 && r[0].field === "id", [r]);
1640
- return { filters: r, nql: a, setFilters: i, clearFilters: n, isSingleIdFilter: l };
1624
+ }, [r, t]), n = B(({ replace: l = !0 } = {}) => {
1625
+ t(new URLSearchParams(), { replace: l });
1626
+ }, [t]), i = E(() => Ht(r), [r]), o = E(() => r.length === 1 && r[0].field === "id", [r]);
1627
+ return { filters: r, nql: i, setFilters: a, clearFilters: n, isSingleIdFilter: o };
1641
1628
  }
1642
- function Qt({ comments: s }) {
1643
- return I(() => {
1644
- var i, n, a;
1629
+ function qt({ comments: s }) {
1630
+ return E(() => {
1631
+ var a, n, i;
1645
1632
  const t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
1646
- for (const l of s)
1647
- (i = l.post) != null && i.id && ((n = l.post) != null && n.title) && t.set(l.post.id, {
1648
- id: l.post.id,
1649
- title: l.post.title
1650
- }), (a = l.member) != null && a.id && r.set(l.member.id, {
1651
- id: l.member.id,
1652
- name: l.member.name,
1653
- email: l.member.email
1633
+ for (const o of s)
1634
+ (a = o.post) != null && a.id && ((n = o.post) != null && n.title) && t.set(o.post.id, {
1635
+ id: o.post.id,
1636
+ title: o.post.title
1637
+ }), (i = o.member) != null && i.id && r.set(o.member.id, {
1638
+ id: o.member.id,
1639
+ name: o.member.name,
1640
+ email: o.member.email
1654
1641
  });
1655
1642
  return {
1656
1643
  knownPosts: Array.from(t.values()),
@@ -1658,61 +1645,60 @@ function Qt({ comments: s }) {
1658
1645
  };
1659
1646
  }, [s]);
1660
1647
  }
1661
- const or = () => {
1662
- var x, C, w, k;
1663
- const { filters: s, nql: t, setFilters: r, clearFilters: i, isSingleIdFilter: n } = Wt(), { data: a } = bs(), l = ((C = (x = a == null ? void 0 : a.config) == null ? void 0 : x.labs) == null ? void 0 : C.commentPermalinks) === !0, c = V((y, b, M = "is") => {
1664
- r((H) => [...H.filter((O) => O.field !== y), us(y, M, [b])], { replace: !1 });
1648
+ const ar = () => {
1649
+ var g, v;
1650
+ const { filters: s, nql: t, setFilters: r, clearFilters: a, isSingleIdFilter: n } = Vt(), i = B((b, y, C = "is") => {
1651
+ r((k) => [...k.filter((R) => R.field !== b), ds(b, C, [y])], { replace: !1 });
1665
1652
  }, [r]), {
1666
1653
  data: o,
1667
- isError: d,
1668
- isFetching: u,
1669
- isFetchingNextPage: m,
1670
- isRefetching: p,
1671
- fetchNextPage: f,
1672
- hasNextPage: g
1673
- } = Xe({
1654
+ isError: l,
1655
+ isFetching: c,
1656
+ isFetchingNextPage: d,
1657
+ isRefetching: u,
1658
+ fetchNextPage: m,
1659
+ hasNextPage: x
1660
+ } = Ge({
1674
1661
  searchParams: t ? { filter: t } : {},
1675
1662
  keepPreviousData: !0
1676
- }), { knownPosts: h, knownMembers: v } = Qt({ comments: (o == null ? void 0 : o.comments) ?? [] }), j = u && !m && !p;
1677
- return /* @__PURE__ */ e.jsxs(Nt, { children: [
1678
- /* @__PURE__ */ e.jsx(yt, { children: !n && /* @__PURE__ */ e.jsx(
1679
- Ct,
1663
+ }), { knownPosts: p, knownMembers: f } = qt({ comments: (o == null ? void 0 : o.comments) ?? [] }), j = c && !d && !u;
1664
+ return /* @__PURE__ */ e.jsxs(Ct, { children: [
1665
+ /* @__PURE__ */ e.jsx(vt, { children: !n && /* @__PURE__ */ e.jsx(
1666
+ jt,
1680
1667
  {
1681
1668
  filters: s,
1682
- knownMembers: v,
1683
- knownPosts: h,
1669
+ knownMembers: f,
1670
+ knownPosts: p,
1684
1671
  onFiltersChange: r
1685
1672
  }
1686
1673
  ) }),
1687
- /* @__PURE__ */ e.jsx(ut, { children: j ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx(W, { size: "lg" }) }) : d ? /* @__PURE__ */ e.jsxs("div", { className: "mb-16 flex h-full flex-col items-center justify-center", children: [
1674
+ /* @__PURE__ */ e.jsx(dt, { children: j ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx(U, { size: "lg" }) }) : l ? /* @__PURE__ */ e.jsxs("div", { className: "mb-16 flex h-full flex-col items-center justify-center", children: [
1688
1675
  /* @__PURE__ */ e.jsx("h2", { className: "mb-2 text-xl font-medium", children: "Error loading comments" }),
1689
1676
  /* @__PURE__ */ e.jsx("p", { className: "mb-4 text-muted-foreground", children: "Please reload the page to try again" }),
1690
- /* @__PURE__ */ e.jsx(P, { onClick: () => window.location.reload(), children: "Reload page" })
1677
+ /* @__PURE__ */ e.jsx(S, { onClick: () => window.location.reload(), children: "Reload page" })
1691
1678
  ] }) : o != null && o.comments.length ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1692
1679
  /* @__PURE__ */ e.jsx(
1693
- Ht,
1680
+ Ot,
1694
1681
  {
1695
- commentPermalinksEnabled: l,
1696
- fetchNextPage: f,
1697
- hasNextPage: g,
1698
- isFetchingNextPage: m,
1699
- isLoading: u && !m,
1682
+ fetchNextPage: m,
1683
+ hasNextPage: x,
1684
+ isFetchingNextPage: d,
1685
+ isLoading: c && !d,
1700
1686
  items: (o == null ? void 0 : o.comments) ?? [],
1701
- totalItems: ((k = (w = o == null ? void 0 : o.meta) == null ? void 0 : w.pagination) == null ? void 0 : k.total) ?? 0,
1702
- onAddFilter: c
1687
+ totalItems: ((v = (g = o == null ? void 0 : o.meta) == null ? void 0 : g.pagination) == null ? void 0 : v.total) ?? 0,
1688
+ onAddFilter: i
1703
1689
  }
1704
1690
  ),
1705
- n && /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(P, { variant: "outline", onClick: () => i({ replace: !1 }), children: "Show all comments" }) })
1691
+ n && /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(S, { variant: "outline", onClick: () => a({ replace: !1 }), children: "Show all comments" }) })
1706
1692
  ] }) : /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx(
1707
- Me,
1693
+ Ie,
1708
1694
  {
1709
1695
  title: "No comments yet",
1710
- children: /* @__PURE__ */ e.jsx(Ee, {})
1696
+ children: /* @__PURE__ */ e.jsx(Le, {})
1711
1697
  }
1712
1698
  ) }) })
1713
1699
  ] });
1714
1700
  };
1715
1701
  export {
1716
- or as default
1702
+ ar as default
1717
1703
  };
1718
- //# sourceMappingURL=comments-Bn_vn_sb.mjs.map
1704
+ //# sourceMappingURL=comments-C0ntS6jH.mjs.map