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,36 +1,36 @@
1
- import { f as W, j as e, S as Ne, c as k, u as ae, a as Q, b as M, d as E, e as te, g, h as J, i as P, R as we, k as X, l as Z, m as ye, n as T, o as ke, p as L, s as B, A as _e } from "./index-K7ASx7EG.mjs";
2
- import { B as C, X as Ce, H as re, C as ze, L as Ae, a as R, b as D, c as H, d as V, e as F, S as w, f as Te, g as Me, G as $, U as ie, M as Y, h as Le, E as q, F as ne, i as $e, j as We, k as O, l as Ee, m as K, K as Re, n as De, o as He, p as Ve, I as Fe, q as Ie, r as S, s as ee, t as Be, u as Oe, v as Ue, w as Ge, x as Pe, y as Ye, z as Ke, N as Qe, D as qe, A as Je, J as Xe } from "./stats-d_u_in4l.mjs";
3
- import { R as Ze, T as Se, P as es, C as le, a as oe, D as ce, O as de, g as ss } from "./audience-BWqU7WWT.mjs";
4
- import { u as as } from "./use-growth-stats-28Sr42va.mjs";
5
- function ts(s) {
1
+ import { f as F, j as e, S as we, c as _, u as ie, a as X, b as E, d as H, e as ne, g as x, h as S, i as q, R as ye, k as ee, l as se, m as ke, n as L, o as _e, p as D, s as G, A as Ce } from "./index-ChjIxhHy.mjs";
2
+ import { B as A, X as ze, H as le, C as Ae, L as Me, a as V, b as I, c as B, d as O, e as U, S as y, f as Te, P as Le, g as Ee, G as R, U as oe, M as P, h as $e, E as Z, F as ce, i as We, j as De, k as Y, l as Re, m as J, K as Fe, n as He, o as Ve, p as Ie, I as Be, q as Oe, r as ae, s as te, t as Ue, u as Ge, v as Ye, w as Ke, x as Qe, y as qe, z as Pe, N as Je, D as Xe, A as Ze, J as Se } from "./stats-CGH-0JNs.mjs";
3
+ import { R as es, T as ss, P as as, C as de, a as me, D as ue, O as he, g as xe, b as ts } from "./audience-Caf7BjaU.mjs";
4
+ import { u as rs } from "./use-growth-stats--CIfag21.mjs";
5
+ function is(s) {
6
6
  const t = s.open_rate !== null;
7
7
  return s.status === "sent" ? "Email only" : s.status === "published" ? t ? "Published and sent" : "Published" : s.status;
8
8
  }
9
- function rs(s) {
9
+ function ns(s) {
10
10
  return !!s.email_only && s.status === "sent";
11
11
  }
12
- function is(s) {
13
- return s.status === "published" && !me(s);
12
+ function ls(s) {
13
+ return s.status === "published" && !pe(s);
14
14
  }
15
- function ns(s) {
16
- return s.status === "published" && me(s);
15
+ function os(s) {
16
+ return s.status === "published" && pe(s);
17
17
  }
18
- function me(s) {
18
+ function pe(s) {
19
19
  var t, a;
20
- const i = s.status === "published", l = s.status === "sent", n = !!s.email, m = ((t = s.email) == null ? void 0 : t.status) !== "failed", o = typeof ((a = s.email) == null ? void 0 : a.email_count) == "number" && s.email.email_count > 0;
21
- return (l || i) && n && (m || o);
20
+ const i = s.status === "published", n = s.status === "sent", l = !!s.email, u = ((t = s.email) == null ? void 0 : t.status) !== "failed", o = typeof ((a = s.email) == null ? void 0 : a.email_count) == "number" && s.email.email_count > 0;
21
+ return (n || i) && l && (u || o);
22
22
  }
23
- function ls(s, t) {
23
+ function cs(s, t) {
24
24
  const a = (t == null ? void 0 : t.membersTrackSources) ?? !0;
25
- return rs(s) ? {
25
+ return ns(s) ? {
26
26
  showEmailMetrics: !0,
27
27
  showWebMetrics: !1,
28
28
  showMemberGrowth: a
29
- } : is(s) ? {
29
+ } : ls(s) ? {
30
30
  showEmailMetrics: !1,
31
31
  showWebMetrics: !0,
32
32
  showMemberGrowth: a
33
- } : ns(s) ? {
33
+ } : os(s) ? {
34
34
  showEmailMetrics: !0,
35
35
  showWebMetrics: !0,
36
36
  showMemberGrowth: a
@@ -40,25 +40,25 @@ function ls(s, t) {
40
40
  showMemberGrowth: a
41
41
  };
42
42
  }
43
- const os = Ze, cs = Se, ds = es, ue = W(({ className: s, ...t }, a) => /* @__PURE__ */ e.jsx(
44
- de,
43
+ const ds = es, ms = ss, us = as, ge = F(({ className: s, ...t }, a) => /* @__PURE__ */ e.jsx(
44
+ he,
45
45
  {
46
46
  ref: a,
47
- className: k(
47
+ className: _(
48
48
  "fixed inset-0 z-50 bg-black/30 backdrop-blur-none transform-gpu data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=open]:backdrop-blur-[3px]",
49
49
  s
50
50
  ),
51
51
  ...t
52
52
  }
53
53
  ));
54
- ue.displayName = de.displayName;
55
- const he = W(({ className: s, children: t, ...a }, i) => /* @__PURE__ */ e.jsx(ds, { children: /* @__PURE__ */ e.jsxs("div", { className: Ne, children: [
56
- /* @__PURE__ */ e.jsx(ue, {}),
54
+ ge.displayName = he.displayName;
55
+ const fe = F(({ className: s, children: t, ...a }, i) => /* @__PURE__ */ e.jsx(us, { children: /* @__PURE__ */ e.jsxs("div", { className: we, children: [
56
+ /* @__PURE__ */ e.jsx(ge, {}),
57
57
  /* @__PURE__ */ e.jsx(
58
- le,
58
+ de,
59
59
  {
60
60
  ref: i,
61
- className: k(
61
+ className: _(
62
62
  "fixed left-[50%] top-[8vmin] z-50 grid w-full max-w-lg translate-x-[-50%] gap-6 bg-background dark:bg-[#101114] p-6 shadow-lg duration-200 transform-gpu data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2 sm:rounded-lg outline-none",
63
63
  s
64
64
  ),
@@ -67,123 +67,123 @@ const he = W(({ className: s, children: t, ...a }, i) => /* @__PURE__ */ e.jsx(d
67
67
  }
68
68
  )
69
69
  ] }) }));
70
- he.displayName = le.displayName;
71
- const xe = ({
70
+ fe.displayName = de.displayName;
71
+ const be = ({
72
72
  className: s,
73
73
  ...t
74
74
  }) => /* @__PURE__ */ e.jsx(
75
75
  "div",
76
76
  {
77
- className: k(
77
+ className: _(
78
78
  "flex flex-col space-y-1.5 text-center sm:text-left",
79
79
  s
80
80
  ),
81
81
  ...t
82
82
  }
83
83
  );
84
- xe.displayName = "DialogHeader";
85
- const pe = ({
84
+ be.displayName = "DialogHeader";
85
+ const je = ({
86
86
  className: s,
87
87
  ...t
88
88
  }) => /* @__PURE__ */ e.jsx(
89
89
  "div",
90
90
  {
91
- className: k(
91
+ className: _(
92
92
  "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 sm:items-end [&_button]:min-w-20",
93
93
  s
94
94
  ),
95
95
  ...t
96
96
  }
97
97
  );
98
- pe.displayName = "DialogFooter";
99
- const ge = W(({ className: s, ...t }, a) => /* @__PURE__ */ e.jsx(
100
- oe,
98
+ je.displayName = "DialogFooter";
99
+ const ve = F(({ className: s, ...t }, a) => /* @__PURE__ */ e.jsx(
100
+ me,
101
101
  {
102
102
  ref: a,
103
- className: k(
103
+ className: _(
104
104
  "text-xl font-semibold leading-none tracking-tight",
105
105
  s
106
106
  ),
107
107
  ...t
108
108
  }
109
109
  ));
110
- ge.displayName = oe.displayName;
111
- const fe = W(({ className: s, ...t }, a) => /* @__PURE__ */ e.jsx(
112
- ce,
110
+ ve.displayName = me.displayName;
111
+ const Ne = F(({ className: s, ...t }, a) => /* @__PURE__ */ e.jsx(
112
+ ue,
113
113
  {
114
114
  ref: a,
115
- className: k("text-sm text-muted-foreground", s),
115
+ className: _("text-sm text-muted-foreground", s),
116
116
  ...t
117
117
  }
118
118
  ));
119
- fe.displayName = ce.displayName;
120
- const ms = ({
119
+ Ne.displayName = ue.displayName;
120
+ const hs = ({
121
121
  emailOnly: s = !1,
122
122
  postURL: t = "",
123
123
  primaryTitle: a = "Your post is published.",
124
124
  secondaryTitle: i = "Spread the word!",
125
- description: l = "",
126
- featureImageURL: n = "",
127
- postTitle: m = "",
125
+ description: n = "",
126
+ featureImageURL: l = "",
127
+ postTitle: u = "",
128
128
  postExcerpt: o = "",
129
129
  faviconURL: c = "",
130
- siteTitle: f = "",
130
+ siteTitle: p = "",
131
131
  author: d = "",
132
- onClose: N = () => {
132
+ onClose: g = () => {
133
133
  },
134
- children: p,
135
- ...r
134
+ children: N,
135
+ ...f
136
136
  }) => {
137
- const [x, b] = ae(!1), j = async () => {
137
+ const [r, m] = ie(!1), v = async () => {
138
138
  try {
139
- await navigator.clipboard.writeText(t), b(!0), setTimeout(() => b(!1), 2e3);
139
+ await navigator.clipboard.writeText(t), m(!0), setTimeout(() => m(!1), 2e3);
140
140
  } catch {
141
141
  }
142
- }, y = encodeURIComponent(m), u = encodeURIComponent(t), z = encodeURIComponent(`${m} ${t}`);
143
- return /* @__PURE__ */ e.jsxs(os, { ...r, children: [
144
- /* @__PURE__ */ e.jsx(cs, { className: "cursor-pointer", asChild: !0, children: p }),
145
- /* @__PURE__ */ e.jsxs(he, { className: "max-h-[calc(100vh-16vmin)] max-w-[540px] overflow-y-auto p-8", children: [
146
- /* @__PURE__ */ e.jsx("div", { className: "sticky top-0 ml-auto size-0", children: /* @__PURE__ */ e.jsx(C, { className: "absolute -right-5 -top-5 cursor-pointer p-2 text-muted-foreground hover:text-foreground [&_svg]:!size-6", size: "lg", variant: "link", onClick: N, children: /* @__PURE__ */ e.jsx(Ce, { size: 24, strokeWidth: 1 }) }) }),
147
- /* @__PURE__ */ e.jsxs(xe, { className: "relative -mt-5", children: [
148
- /* @__PURE__ */ e.jsxs(ge, { className: "text-3xl font-bold leading-[1.15em]", children: [
142
+ }, w = encodeURIComponent(u), b = encodeURIComponent(t), k = encodeURIComponent(`${u} ${t}`);
143
+ return /* @__PURE__ */ e.jsxs(ds, { ...f, children: [
144
+ /* @__PURE__ */ e.jsx(ms, { className: "cursor-pointer", asChild: !0, children: N }),
145
+ /* @__PURE__ */ e.jsxs(fe, { className: "max-h-[calc(100vh-16vmin)] max-w-[540px] overflow-y-auto p-8", children: [
146
+ /* @__PURE__ */ e.jsx("div", { className: "sticky top-0 ml-auto size-0", children: /* @__PURE__ */ e.jsx(A, { className: "absolute -right-5 -top-5 cursor-pointer p-2 text-muted-foreground hover:text-foreground [&_svg]:!size-6", size: "lg", variant: "link", onClick: g, children: /* @__PURE__ */ e.jsx(ze, { size: 24, strokeWidth: 1 }) }) }),
147
+ /* @__PURE__ */ e.jsxs(be, { className: "relative -mt-5", children: [
148
+ /* @__PURE__ */ e.jsxs(ve, { className: "text-3xl font-bold leading-[1.15em]", children: [
149
149
  /* @__PURE__ */ e.jsx("span", { className: "text-green-500", children: a }),
150
150
  /* @__PURE__ */ e.jsx("br", {}),
151
151
  /* @__PURE__ */ e.jsx("span", { children: i })
152
152
  ] }),
153
- l && /* @__PURE__ */ e.jsx(fe, { className: "mb-0 pb-0 pt-1 text-lg text-foreground", children: l })
153
+ n && /* @__PURE__ */ e.jsx(Ne, { className: "mb-0 pb-0 pt-1 text-lg text-foreground", children: n })
154
154
  ] }),
155
155
  /* @__PURE__ */ e.jsxs("a", { className: "flex flex-col items-stretch overflow-hidden rounded-md border transition-all hover:border-muted-foreground/40", href: t, rel: "noopener noreferrer", target: "_blank", children: [
156
- n && /* @__PURE__ */ e.jsx("div", { className: "aspect-video bg-cover bg-center", style: {
157
- backgroundImage: `url(${n})`
156
+ l && /* @__PURE__ */ e.jsx("div", { className: "aspect-video bg-cover bg-center", style: {
157
+ backgroundImage: `url(${l})`
158
158
  } }),
159
159
  /* @__PURE__ */ e.jsxs("div", { className: "p-6 pt-5", children: [
160
- /* @__PURE__ */ e.jsx(re, { children: m }),
160
+ /* @__PURE__ */ e.jsx(le, { children: u }),
161
161
  o && /* @__PURE__ */ e.jsx("p", { children: o }),
162
162
  /* @__PURE__ */ e.jsxs("div", { className: "mt-2 flex items-start gap-2", children: [
163
163
  /* @__PURE__ */ e.jsx("div", { className: "mt-0.5 size-4 bg-cover bg-center", style: {
164
164
  backgroundImage: `url(${c})`
165
165
  } }),
166
166
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
167
- /* @__PURE__ */ e.jsx("strong", { children: f }),
167
+ /* @__PURE__ */ e.jsx("strong", { children: p }),
168
168
  /* @__PURE__ */ e.jsx("span", { children: "•" }),
169
169
  /* @__PURE__ */ e.jsx("span", { children: d })
170
170
  ] })
171
171
  ] })
172
172
  ] })
173
173
  ] }),
174
- /* @__PURE__ */ e.jsx(pe, { className: "justify-between gap-6", children: s ? /* @__PURE__ */ e.jsx(C, { className: "cursor-pointer", type: "submit", onClick: N, children: "Close" }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
174
+ /* @__PURE__ */ e.jsx(je, { className: "justify-between gap-6", children: s ? /* @__PURE__ */ e.jsx(A, { className: "cursor-pointer", type: "submit", onClick: g, children: "Close" }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
175
175
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
176
- /* @__PURE__ */ e.jsx("a", { className: "flex h-[34px] w-14 items-center justify-center rounded-sm bg-muted px-3 hover:bg-muted-foreground/20 [&_svg]:h-4", href: `https://twitter.com/intent/tweet?text=${y}%0A${u}`, rel: "noopener noreferrer", target: "_blank", children: /* @__PURE__ */ e.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { className: "social-x_svg__x", d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) }) }),
177
- /* @__PURE__ */ e.jsx("a", { className: "flex h-[34px] w-14 items-center justify-center rounded-sm bg-muted px-3 hover:bg-muted-foreground/20 [&_svg]:h-4", href: `https://threads.net/intent/post?text=${z}`, rel: "noopener noreferrer", target: "_blank", children: /* @__PURE__ */ e.jsxs("svg", { fill: "none", viewBox: "0 0 18 18", children: [
176
+ /* @__PURE__ */ e.jsx("a", { className: "flex h-[34px] w-14 items-center justify-center rounded-sm bg-muted px-3 hover:bg-muted-foreground/20 [&_svg]:h-4", href: `https://twitter.com/intent/tweet?text=${w}%0A${b}`, rel: "noopener noreferrer", target: "_blank", children: /* @__PURE__ */ e.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { className: "social-x_svg__x", d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) }) }),
177
+ /* @__PURE__ */ e.jsx("a", { className: "flex h-[34px] w-14 items-center justify-center rounded-sm bg-muted px-3 hover:bg-muted-foreground/20 [&_svg]:h-4", href: `https://threads.net/intent/post?text=${k}`, rel: "noopener noreferrer", target: "_blank", children: /* @__PURE__ */ e.jsxs("svg", { fill: "none", viewBox: "0 0 18 18", children: [
178
178
  /* @__PURE__ */ e.jsx("g", { clipPath: "url(#social-threads_svg__clip0_351_18008)", children: /* @__PURE__ */ e.jsx("path", { d: "M13.033 8.38a5.924 5.924 0 00-.223-.102c-.13-2.418-1.452-3.802-3.67-3.816h-.03c-1.327 0-2.43.566-3.11 1.597l1.22.837c.507-.77 1.304-.934 1.89-.934h.02c.73.004 1.282.217 1.639.63.26.302.433.72.519 1.245a9.334 9.334 0 00-2.097-.101c-2.109.121-3.465 1.351-3.374 3.06.047.868.478 1.614 1.216 2.1.624.413 1.428.614 2.263.568 1.103-.06 1.969-.48 2.572-1.25.459-.585.749-1.342.877-2.296.526.317.915.735 1.13 1.236.366.854.387 2.255-.756 3.398-1.003 1.002-2.207 1.435-4.028 1.448-2.02-.015-3.547-.663-4.54-1.925-.93-1.182-1.41-2.89-1.428-5.075.018-2.185.498-3.893 1.428-5.075.993-1.262 2.52-1.91 4.54-1.925 2.034.015 3.588.666 4.62 1.934.505.622.886 1.405 1.137 2.317l1.43-.382c-.305-1.122-.784-2.09-1.436-2.892C13.52 1.35 11.587.517 9.096.5h-.01C6.6.517 4.689 1.354 3.404 2.986 2.262 4.44 1.672 6.46 1.652 8.994v.012c.02 2.534.61 4.555 1.752 6.008C4.69 16.646 6.6 17.483 9.086 17.5h.01c2.21-.015 3.768-.594 5.051-1.876 1.68-1.678 1.629-3.78 1.075-5.07-.397-.927-1.154-1.678-2.189-2.175zm-3.816 3.587c-.924.052-1.884-.363-1.932-1.252-.035-.659.47-1.394 1.99-1.482a8.9 8.9 0 01.512-.014c.552 0 1.068.053 1.538.156-.175 2.187-1.203 2.542-2.108 2.592z", fill: "#000" }) }),
179
179
  /* @__PURE__ */ e.jsx("defs", { children: /* @__PURE__ */ e.jsx("clipPath", { id: "social-threads_svg__clip0_351_18008", children: /* @__PURE__ */ e.jsx("path", { d: "M0 0h17v17H0z", fill: "#fff", transform: "translate(.5 .5)" }) }) })
180
180
  ] }) }),
181
- /* @__PURE__ */ e.jsx("a", { className: "flex h-[34px] w-14 items-center justify-center rounded-sm bg-muted px-3 hover:bg-muted-foreground/20 [&_svg]:h-4", href: `https://www.facebook.com/sharer/sharer.php?u=${u}`, rel: "noopener noreferrer", target: "_blank", children: /* @__PURE__ */ e.jsxs("svg", { fill: "none", viewBox: "0 0 40 40", children: [
181
+ /* @__PURE__ */ e.jsx("a", { className: "flex h-[34px] w-14 items-center justify-center rounded-sm bg-muted px-3 hover:bg-muted-foreground/20 [&_svg]:h-4", href: `https://www.facebook.com/sharer/sharer.php?u=${b}`, rel: "noopener noreferrer", target: "_blank", children: /* @__PURE__ */ e.jsxs("svg", { fill: "none", viewBox: "0 0 40 40", children: [
182
182
  /* @__PURE__ */ e.jsx("title", { children: "social-facebook" }),
183
183
  /* @__PURE__ */ e.jsx("path", { className: "social-facebook_svg__fb", d: "M20 40.004c11.046 0 20-8.955 20-20 0-11.046-8.954-20-20-20s-20 8.954-20 20c0 11.045 8.954 20 20 20z", fill: "#1977f3" }),
184
184
  /* @__PURE__ */ e.jsx("path", { d: "M27.785 25.785l.886-5.782h-5.546V16.25c0-1.58.773-3.125 3.26-3.125h2.522V8.204s-2.29-.39-4.477-.39c-4.568 0-7.555 2.767-7.555 7.781v4.408h-5.08v5.782h5.08v13.976a20.08 20.08 0 003.125.242c1.063 0 2.107-.085 3.125-.242V25.785h4.66z", fill: "#fff" })
185
185
  ] }) }),
186
- /* @__PURE__ */ e.jsx("a", { className: "flex h-[34px] w-14 items-center justify-center rounded-sm bg-muted px-3 hover:bg-muted-foreground/20 [&_svg]:h-4", href: `http://www.linkedin.com/shareArticle?mini=true&title=${y}&url=${u}`, rel: "noopener noreferrer", target: "_blank", children: /* @__PURE__ */ e.jsxs("svg", { fill: "none", viewBox: "0 0 16 16", children: [
186
+ /* @__PURE__ */ e.jsx("a", { className: "flex h-[34px] w-14 items-center justify-center rounded-sm bg-muted px-3 hover:bg-muted-foreground/20 [&_svg]:h-4", href: `http://www.linkedin.com/shareArticle?mini=true&title=${w}&url=${b}`, rel: "noopener noreferrer", target: "_blank", children: /* @__PURE__ */ e.jsxs("svg", { fill: "none", viewBox: "0 0 16 16", children: [
187
187
  /* @__PURE__ */ e.jsxs("g", { clipPath: "url(#social-linkedin_svg__clip0_537_833)", children: [
188
188
  /* @__PURE__ */ e.jsx("path", { className: "social-linkedin_svg__linkedin", clipRule: "evenodd", d: "M1.778 16h12.444c.982 0 1.778-.796 1.778-1.778V1.778C16 .796 15.204 0 14.222 0H1.778C.796 0 0 .796 0 1.778v12.444C0 15.204.796 16 1.778 16z", fill: "#007ebb", fillRule: "evenodd" }),
189
189
  /* @__PURE__ */ e.jsx("path", { clipRule: "evenodd", d: "M13.778 13.778h-2.374V9.734c0-1.109-.421-1.729-1.299-1.729-.955 0-1.453.645-1.453 1.729v4.044H6.363V6.074h2.289v1.038s.688-1.273 2.322-1.273c1.634 0 2.804.997 2.804 3.061v4.878zM3.634 5.065c-.78 0-1.411-.636-1.411-1.421s.631-1.422 1.41-1.422c.78 0 1.411.637 1.411 1.422 0 .785-.631 1.421-1.41 1.421zm-1.182 8.713h2.386V6.074H2.452v7.704z", fill: "#fff", fillRule: "evenodd" })
@@ -192,269 +192,277 @@ const ms = ({
192
192
  ] }) })
193
193
  ] }),
194
194
  /* @__PURE__ */ e.jsxs(
195
- C,
195
+ A,
196
196
  {
197
197
  className: "!ml-0 grow cursor-pointer",
198
198
  disabled: !t,
199
199
  type: "button",
200
- onClick: j,
200
+ onClick: v,
201
201
  children: [
202
- x ? /* @__PURE__ */ e.jsx(ze, {}) : /* @__PURE__ */ e.jsx(Ae, {}),
203
- x ? "Copied!" : "Copy link"
202
+ r ? /* @__PURE__ */ e.jsx(Ae, {}) : /* @__PURE__ */ e.jsx(Me, {}),
203
+ r ? "Copied!" : "Copy link"
204
204
  ]
205
205
  }
206
206
  )
207
207
  ] }) })
208
208
  ] })
209
209
  ] });
210
- }, us = (s) => s.email_only ? "Sent" : s.email ? "Published and sent" : "Published", hs = ({
210
+ }, xs = (s) => s.email_only ? "Sent" : s.email ? "Published and sent" : "Published", ps = ({
211
211
  latestPostStats: s,
212
212
  isLoading: t
213
213
  }) => {
214
- var x, b, j, y;
215
- const a = Q(), [i, l] = ae(!1), { site: n, settings: m } = M(), { appSettings: o } = E(), { emailTrackClicks: c, emailTrackOpens: f } = (o == null ? void 0 : o.analytics) || {}, d = n.title || String(((x = m.find((u) => u.key === "title")) == null ? void 0 : x.value) || "Ghost Site"), N = String(((b = m.find((u) => u.key === "timezone")) == null ? void 0 : b.value) || "Etc/UTC"), p = s ? ls(s, {
216
- membersTrackSources: o == null ? void 0 : o.analytics.membersTrackSources
217
- }) : null, r = "group mr-2 flex flex-col gap-1.5 hover:cursor-pointer";
218
- return /* @__PURE__ */ e.jsxs(R, { className: "group/card bg-gradient-to-tr from-muted/40 to-muted/0 to-50%", "data-testid": "latest-post", children: [
219
- /* @__PURE__ */ e.jsxs(D, { children: [
220
- /* @__PURE__ */ e.jsx(H, { className: "flex items-baseline justify-between font-medium leading-snug text-muted-foreground", children: "Latest post performance" }),
221
- /* @__PURE__ */ e.jsx(V, { className: "hidden", children: "How your last post did" })
214
+ var k, T, $, W;
215
+ const a = X(), [i, n] = ie(!1), { site: l, settings: u } = E(), { appSettings: o } = H(), {
216
+ emailTrackClicks: c,
217
+ emailTrackOpens: p,
218
+ webAnalytics: d = !1,
219
+ membersTrackSources: g = !1
220
+ } = (o == null ? void 0 : o.analytics) || {}, N = l.title || String(((k = u.find((C) => C.key === "title")) == null ? void 0 : k.value) || "Ghost Site"), f = String(((T = u.find((C) => C.key === "timezone")) == null ? void 0 : T.value) || "Etc/UTC"), r = s ? cs(s, {
221
+ membersTrackSources: g
222
+ }) : null, m = "group mr-2 flex flex-col gap-1.5 hover:cursor-pointer", v = !!(s != null && s.email), w = xe({ postId: s == null ? void 0 : s.id, hasEmailData: v, analytics: { webAnalytics: d, membersTrackSources: g } }), b = w.startsWith("/editor/");
223
+ return /* @__PURE__ */ e.jsxs(V, { className: "group/card bg-gradient-to-tr from-muted/40 to-muted/0 to-50%", "data-testid": "latest-post", children: [
224
+ /* @__PURE__ */ e.jsxs(I, { children: [
225
+ /* @__PURE__ */ e.jsx(B, { className: "flex items-baseline justify-between font-medium leading-snug text-muted-foreground", children: "Latest post performance" }),
226
+ /* @__PURE__ */ e.jsx(O, { className: "hidden", children: "How your last post did" })
222
227
  ] }),
223
- /* @__PURE__ */ e.jsxs(F, { className: "flex flex-col gap-6 px-0 lg:flex-row xl:grid xl:grid-cols-3", children: [
228
+ /* @__PURE__ */ e.jsxs(U, { className: "flex flex-col gap-6 px-0 lg:flex-row xl:grid xl:grid-cols-3", children: [
224
229
  t && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
225
230
  /* @__PURE__ */ e.jsxs("div", { className: "flex w-full items-center gap-6 px-6 xl:col-span-2", children: [
226
- /* @__PURE__ */ e.jsx("div", { className: "w-full max-w-[232px] grow", children: /* @__PURE__ */ e.jsx(w, { className: "aspect-[16/10] rounded-md" }) }),
231
+ /* @__PURE__ */ e.jsx("div", { className: "w-full max-w-[232px] grow", children: /* @__PURE__ */ e.jsx(y, { className: "aspect-[16/10] rounded-md" }) }),
227
232
  /* @__PURE__ */ e.jsxs("div", { className: "w-full grow", children: [
228
- /* @__PURE__ */ e.jsx(w, { className: "w-full max-w-[420px]" }),
229
- /* @__PURE__ */ e.jsx(w, { className: "w-1/2" })
233
+ /* @__PURE__ */ e.jsx(y, { className: "w-full max-w-[420px]" }),
234
+ /* @__PURE__ */ e.jsx(y, { className: "w-1/2" })
230
235
  ] })
231
236
  ] }),
232
237
  /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-stretch gap-2 px-6 text-sm", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 gap-5", children: [
233
238
  /* @__PURE__ */ e.jsxs("div", { children: [
234
- /* @__PURE__ */ e.jsx(w, { className: "w-3/4" }),
235
- /* @__PURE__ */ e.jsx(w, { className: "h-10 w-1/3" })
239
+ /* @__PURE__ */ e.jsx(y, { className: "w-3/4" }),
240
+ /* @__PURE__ */ e.jsx(y, { className: "h-10 w-1/3" })
236
241
  ] }),
237
242
  /* @__PURE__ */ e.jsxs("div", { children: [
238
- /* @__PURE__ */ e.jsx(w, { className: "w-3/4" }),
239
- /* @__PURE__ */ e.jsx(w, { className: "h-10 w-1/3" })
243
+ /* @__PURE__ */ e.jsx(y, { className: "w-3/4" }),
244
+ /* @__PURE__ */ e.jsx(y, { className: "h-10 w-1/3" })
240
245
  ] }),
241
246
  /* @__PURE__ */ e.jsxs("div", { children: [
242
- /* @__PURE__ */ e.jsx(w, { className: "w-3/4" }),
243
- /* @__PURE__ */ e.jsx(w, { className: "h-10 w-1/3" })
247
+ /* @__PURE__ */ e.jsx(y, { className: "w-3/4" }),
248
+ /* @__PURE__ */ e.jsx(y, { className: "h-10 w-1/3" })
244
249
  ] }),
245
250
  /* @__PURE__ */ e.jsxs("div", { children: [
246
- /* @__PURE__ */ e.jsx(w, { className: "w-3/4" }),
247
- /* @__PURE__ */ e.jsx(w, { className: "h-10 w-1/3" })
251
+ /* @__PURE__ */ e.jsx(y, { className: "w-3/4" }),
252
+ /* @__PURE__ */ e.jsx(y, { className: "h-10 w-1/3" })
248
253
  ] })
249
254
  ] }) })
250
255
  ] }),
251
- !t && s && p ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
256
+ !t && s && r ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
252
257
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-6 px-6 transition-all md:flex-row md:items-start xl:col-span-2", children: [
253
258
  s.feature_image && /* @__PURE__ */ e.jsx("div", { className: "aspect-[16/10] w-full min-w-[100px] rounded-sm bg-cover bg-center sm:max-w-[170px] lg:max-w-[170px] xl:max-w-[232px]", style: {
254
259
  backgroundImage: `url(${s.feature_image})`
255
260
  } }),
256
261
  /* @__PURE__ */ e.jsxs("div", { className: "flex grow flex-col items-start justify-center self-stretch", children: [
257
262
  /* @__PURE__ */ e.jsx("div", { className: "text-lg font-semibold leading-tighter tracking-tight hover:cursor-pointer hover:opacity-75", onClick: () => {
258
- !t && s && a(`/posts/analytics/${s.id}`, { crossApp: !0 });
263
+ !t && s && a(w, { crossApp: !0 });
259
264
  }, children: s.title }),
260
265
  /* @__PURE__ */ e.jsxs("div", { className: "mt-0.5 text-sm text-muted-foreground", children: [
261
266
  s.authors && s.authors.length > 0 && /* @__PURE__ */ e.jsxs("div", { children: [
262
267
  "By ",
263
- s.authors.map((u) => u.name).join(", "),
268
+ s.authors.map((C) => C.name).join(", "),
264
269
  " – ",
265
- te(s.published_at, N)
270
+ ne(s.published_at, f)
266
271
  ] }),
267
- /* @__PURE__ */ e.jsx("div", { className: "mt-0.5", children: us(s) })
272
+ /* @__PURE__ */ e.jsx("div", { className: "mt-0.5", children: xs(s) })
268
273
  ] }),
269
274
  /* @__PURE__ */ e.jsxs("div", { className: "mt-6 flex items-center gap-2", children: [
270
275
  !s.email_only && /* @__PURE__ */ e.jsx(
271
- ms,
276
+ hs,
272
277
  {
273
- author: ((j = s.authors) == null ? void 0 : j.map((u) => u.name).join(", ")) || "",
278
+ author: (($ = s.authors) == null ? void 0 : $.map((C) => C.name).join(", ")) || "",
274
279
  description: "",
275
- faviconURL: n.icon || "",
280
+ faviconURL: l.icon || "",
276
281
  featureImageURL: s.feature_image || "",
277
282
  open: i,
278
283
  postExcerpt: s.excerpt || "",
279
284
  postTitle: s.title,
280
285
  postURL: s.url || "",
281
- siteTitle: d,
282
- onClose: () => l(!1),
283
- onOpenChange: l,
284
- children: /* @__PURE__ */ e.jsxs(C, { onClick: () => l(!0), children: [
286
+ siteTitle: N,
287
+ onClose: () => n(!1),
288
+ onOpenChange: n,
289
+ children: /* @__PURE__ */ e.jsxs(A, { onClick: () => n(!0), children: [
285
290
  /* @__PURE__ */ e.jsx(Te, {}),
286
291
  " Share post"
287
292
  ] })
288
293
  }
289
294
  ),
290
- /* @__PURE__ */ e.jsxs(
291
- C,
295
+ /* @__PURE__ */ e.jsx(
296
+ A,
292
297
  {
293
298
  className: s.email_only ? "w-full" : "",
294
299
  variant: "outline",
295
300
  onClick: () => {
296
- a(`/posts/analytics/${s.id}`, { crossApp: !0 });
301
+ a(w, { crossApp: !0 });
297
302
  },
298
- children: [
299
- /* @__PURE__ */ e.jsx(Me, {}),
303
+ children: b ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
304
+ /* @__PURE__ */ e.jsx(Le, {}),
305
+ /* @__PURE__ */ e.jsx("span", { className: "hidden md:!visible md:!block", children: "Edit post" })
306
+ ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
307
+ /* @__PURE__ */ e.jsx(Ee, {}),
300
308
  /* @__PURE__ */ e.jsx("span", { className: "hidden md:!visible md:!block", children: s.email_only ? "Post analytics" : "Analytics" })
301
- ]
309
+ ] })
302
310
  }
303
311
  )
304
312
  ] })
305
313
  ] })
306
314
  ] }),
307
315
  /* @__PURE__ */ e.jsx("div", { className: "-ml-4 flex w-full flex-col items-stretch gap-2 pr-6 text-sm xl:h-full xl:max-w-none", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 gap-6 pl-10 lg:border-l xl:h-full", children: [
308
- p.showWebMetrics && (o == null ? void 0 : o.analytics.webAnalytics) && /* @__PURE__ */ e.jsxs("div", { className: r, "data-testid": "latest-post-visitors", onClick: () => {
316
+ r.showWebMetrics && d && /* @__PURE__ */ e.jsxs("div", { className: m, "data-testid": "latest-post-visitors", onClick: () => {
309
317
  a(`/posts/analytics/${s.id}/web`, { crossApp: !0 });
310
318
  }, children: [
311
319
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1.5 font-medium text-muted-foreground transition-all group-hover:text-foreground", children: [
312
- /* @__PURE__ */ e.jsx($, { size: 16, strokeWidth: 1.25 }),
320
+ /* @__PURE__ */ e.jsx(R, { size: 16, strokeWidth: 1.25 }),
313
321
  /* @__PURE__ */ e.jsx("span", { className: "hidden md:!visible md:!block", children: "Visitors" })
314
322
  ] }),
315
- /* @__PURE__ */ e.jsx("span", { className: "text-[2.2rem] font-semibold leading-none tracking-tighter", children: g(s.visitors) })
323
+ /* @__PURE__ */ e.jsx("span", { className: "text-[2.2rem] font-semibold leading-none tracking-tighter", children: x(s.visitors) })
316
324
  ] }),
317
- p.showMemberGrowth && /* @__PURE__ */ e.jsxs("div", { className: k(
318
- r,
325
+ r.showMemberGrowth && /* @__PURE__ */ e.jsxs("div", { className: _(
326
+ m,
319
327
  // Member metric is moved to the 2nd row in the grid if the post is email only or if web analytics is turned off, otherwise leave as is
320
- p.showEmailMetrics && (!p.showWebMetrics || !(o != null && o.analytics.webAnalytics)) && "row-[2/3] col-[1/2]"
328
+ r.showEmailMetrics && (!r.showWebMetrics || !d) && "row-[2/3] col-[1/2]"
321
329
  ), "data-testid": "latest-post-members", onClick: () => {
322
330
  a(`/posts/analytics/${s.id}/growth`, { crossApp: !0 });
323
331
  }, children: [
324
332
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1.5 font-medium text-muted-foreground transition-all group-hover:text-foreground", children: [
325
- /* @__PURE__ */ e.jsx(ie, { size: 16, strokeWidth: 1.25 }),
333
+ /* @__PURE__ */ e.jsx(oe, { size: 16, strokeWidth: 1.25 }),
326
334
  /* @__PURE__ */ e.jsx("span", { className: "hidden md:!visible md:!block", children: "Members" })
327
335
  ] }),
328
336
  /* @__PURE__ */ e.jsx("span", { className: "text-[2.2rem] font-semibold leading-none tracking-tighter", children: s.member_delta ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
329
337
  "+",
330
- g(s.member_delta)
338
+ x(s.member_delta)
331
339
  ] }) : 0 })
332
340
  ] }),
333
- p.showEmailMetrics && s.email && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
334
- f && /* @__PURE__ */ e.jsxs("div", { className: r, onClick: () => {
341
+ r.showEmailMetrics && s.email && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
342
+ p && /* @__PURE__ */ e.jsxs("div", { className: m, onClick: () => {
335
343
  a(`/posts/analytics/${s.id}/newsletter`, { crossApp: !0 });
336
344
  }, children: [
337
345
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1.5 font-medium text-muted-foreground transition-all group-hover:text-foreground", children: [
338
- /* @__PURE__ */ e.jsx(Y, { size: 16, strokeWidth: 1.25 }),
346
+ /* @__PURE__ */ e.jsx(P, { size: 16, strokeWidth: 1.25 }),
339
347
  /* @__PURE__ */ e.jsx("span", { className: "hidden whitespace-nowrap md:!visible md:!block", children: "Opens" })
340
348
  ] }),
341
- /* @__PURE__ */ e.jsx("span", { className: "text-[2.2rem] font-semibold leading-none tracking-tighter", children: s.email.email_count ? J((s.email.opened_count || 0) / s.email.email_count) : "0%" })
349
+ /* @__PURE__ */ e.jsx("span", { className: "text-[2.2rem] font-semibold leading-none tracking-tighter", children: s.email.email_count ? S((s.email.opened_count || 0) / s.email.email_count) : "0%" })
342
350
  ] }),
343
- c && /* @__PURE__ */ e.jsxs("div", { className: r, onClick: () => {
351
+ c && /* @__PURE__ */ e.jsxs("div", { className: m, onClick: () => {
344
352
  a(`/posts/analytics/${s.id}/newsletter`, { crossApp: !0 });
345
353
  }, children: [
346
354
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1.5 font-medium text-muted-foreground transition-all group-hover:text-foreground", children: [
347
- /* @__PURE__ */ e.jsx(Le, { size: 16, strokeWidth: 1.25 }),
355
+ /* @__PURE__ */ e.jsx($e, { size: 16, strokeWidth: 1.25 }),
348
356
  /* @__PURE__ */ e.jsx("span", { className: "hidden whitespace-nowrap md:!visible md:!block", children: "Clicks" })
349
357
  ] }),
350
- /* @__PURE__ */ e.jsx("span", { className: "text-[2.2rem] font-semibold leading-none tracking-tighter", children: s.email.email_count && ((y = s.count) != null && y.clicks) ? J((s.count.clicks || 0) / s.email.email_count) : "0%" })
358
+ /* @__PURE__ */ e.jsx("span", { className: "text-[2.2rem] font-semibold leading-none tracking-tighter", children: s.email.email_count && ((W = s.count) != null && W.clicks) ? S((s.count.clicks || 0) / s.email.email_count) : "0%" })
351
359
  ] })
352
360
  ] })
353
361
  ] }) })
354
362
  ] }) : !t && /* @__PURE__ */ e.jsx(
355
- q,
363
+ Z,
356
364
  {
357
- actions: /* @__PURE__ */ e.jsx(C, { variant: "secondary", onClick: () => {
365
+ actions: /* @__PURE__ */ e.jsx(A, { variant: "secondary", onClick: () => {
358
366
  a("/editor/post", { crossApp: !0 });
359
367
  }, children: "New post" }),
360
368
  className: "w-full pb-10 xl:col-span-3",
361
369
  description: "Once it's live, you can track performance here",
362
370
  title: "Publish your first post",
363
- children: /* @__PURE__ */ e.jsx(ne, { strokeWidth: 1.5 })
371
+ children: /* @__PURE__ */ e.jsx(ce, { strokeWidth: 1.5 })
364
372
  }
365
373
  )
366
374
  ] })
367
375
  ] });
368
- }, xs = () => {
369
- const { data: s } = M();
376
+ }, gs = () => {
377
+ const { data: s } = E();
370
378
  return {
371
379
  isLimited: (a) => {
372
- var l, n;
380
+ var n, l;
373
381
  const i = s == null ? void 0 : s.config;
374
- return (l = i == null ? void 0 : i.hostSettings) != null && l.limits && a === "limitAnalytics" ? ((n = i.hostSettings.limits.limitAnalytics) == null ? void 0 : n.disabled) === !0 : !1;
382
+ return (n = i == null ? void 0 : i.hostSettings) != null && n.limits && a === "limitAnalytics" ? ((l = i.hostSettings.limits.limitAnalytics) == null ? void 0 : l.disabled) === !0 : !1;
375
383
  }
376
384
  };
377
- }, U = ({
385
+ }, K = ({
378
386
  // linkto,
379
387
  title: s,
380
388
  iconName: t,
381
389
  description: a,
382
390
  color: i,
383
- diffDirection: l,
384
- diffValue: n,
385
- formattedValue: m,
391
+ diffDirection: n,
392
+ diffValue: l,
393
+ formattedValue: u,
386
394
  trendingFromValue: o,
387
395
  children: c,
388
- onClick: f
396
+ onClick: p
389
397
  }) => {
390
- const { range: d } = M(), N = t && He[t], p = we.useMemo(() => {
391
- if (!l || l === "empty" || d === X.allTime.value || !n)
398
+ const { range: d } = E(), g = t && Ve[t], N = ye.useMemo(() => {
399
+ if (!n || n === "empty" || d === ee.allTime.value || !l)
392
400
  return "";
393
- const r = l === "up" ? "up" : l === "down" ? "down" : "at", b = K(d).replace("in the ", "").replace(/^\(|\)$/g, "");
394
- return l === "same" ? /* @__PURE__ */ e.jsxs("span", { children: [
401
+ const f = n === "up" ? "up" : n === "down" ? "down" : "at", m = J(d).replace("in the ", "").replace(/^\(|\)$/g, "");
402
+ return n === "same" ? /* @__PURE__ */ e.jsxs("span", { children: [
395
403
  "You're trending at the same level as ",
396
- /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: m }),
404
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: u }),
397
405
  " compared to the ",
398
- /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: b })
406
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: m })
399
407
  ] }) : /* @__PURE__ */ e.jsxs("span", { children: [
400
408
  "You're trending ",
401
409
  /* @__PURE__ */ e.jsxs("span", { className: "font-semibold", children: [
402
- r,
410
+ f,
403
411
  " ",
404
- n
412
+ l
405
413
  ] }),
406
414
  " from ",
407
415
  /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: o }),
408
416
  " compared to the ",
409
- b
417
+ m
410
418
  ] });
411
- }, [l, n, o, m, d]);
412
- return /* @__PURE__ */ e.jsxs(R, { className: "group", "data-testid": s, children: [
413
- /* @__PURE__ */ e.jsxs(D, { className: "hidden", children: [
414
- /* @__PURE__ */ e.jsx(H, { children: s }),
415
- /* @__PURE__ */ e.jsx(V, { children: a })
419
+ }, [n, l, o, u, d]);
420
+ return /* @__PURE__ */ e.jsxs(V, { className: "group", "data-testid": s, children: [
421
+ /* @__PURE__ */ e.jsxs(I, { className: "hidden", children: [
422
+ /* @__PURE__ */ e.jsx(B, { children: s }),
423
+ /* @__PURE__ */ e.jsx(O, { children: a })
416
424
  ] }),
417
- /* @__PURE__ */ e.jsxs(Re, { className: "relative flex grow flex-row items-start justify-between gap-5 border-none pb-2 xl:pb-4", children: [
425
+ /* @__PURE__ */ e.jsxs(Fe, { className: "relative flex grow flex-row items-start justify-between gap-5 border-none pb-2 xl:pb-4", children: [
418
426
  /* @__PURE__ */ e.jsxs("div", { className: "flex grow flex-col gap-1.5 border-none pb-0", children: [
419
- /* @__PURE__ */ e.jsxs(De, { className: f && "transition-all group-hover:text-foreground", children: [
427
+ /* @__PURE__ */ e.jsxs(He, { className: p && "transition-all group-hover:text-foreground", children: [
420
428
  i && /* @__PURE__ */ e.jsx("span", { className: "inline-block size-2 rounded-full opacity-50", style: { backgroundColor: i } }),
421
- N && /* @__PURE__ */ e.jsx(N, { size: 16, strokeWidth: 1.5 }),
429
+ g && /* @__PURE__ */ e.jsx(g, { size: 16, strokeWidth: 1.5 }),
422
430
  s
423
431
  ] }),
424
432
  /* @__PURE__ */ e.jsx(
425
- Ve,
433
+ Ie,
426
434
  {
427
- diffDirection: d === X.allTime.value ? "hidden" : l,
428
- diffTooltip: p,
429
- diffValue: n,
430
- value: m
435
+ diffDirection: d === ee.allTime.value ? "hidden" : n,
436
+ diffTooltip: N,
437
+ diffValue: l,
438
+ value: u
431
439
  }
432
440
  )
433
441
  ] }),
434
- f && /* @__PURE__ */ e.jsx(C, { className: "absolute right-6 translate-x-10 opacity-0 transition-all duration-200 group-hover:translate-x-0 group-hover:opacity-100", size: "sm", variant: "outline", onClick: f, children: "View more" })
442
+ p && /* @__PURE__ */ e.jsx(A, { className: "absolute right-6 translate-x-10 opacity-0 transition-all duration-200 group-hover:translate-x-0 group-hover:opacity-100", size: "sm", variant: "outline", onClick: p, children: "View more" })
435
443
  ] }),
436
- /* @__PURE__ */ e.jsx(F, { children: c })
444
+ /* @__PURE__ */ e.jsx(U, { children: c })
437
445
  ] });
438
- }, ps = ({
446
+ }, fs = ({
439
447
  kpiValues: s,
440
448
  visitorsChartData: t,
441
449
  visitorsYRange: a,
442
450
  growthTotals: i,
443
- membersChartData: l,
444
- mrrChartData: n,
445
- currencySymbol: m,
451
+ membersChartData: n,
452
+ mrrChartData: l,
453
+ currencySymbol: u,
446
454
  isLoading: o
447
455
  }) => {
448
- const c = Q(), { range: f } = M(), { appSettings: d } = E(), p = xs().isLimited("limitAnalytics"), r = "-mb-3 h-[10vw] max-h-[200px] min-h-[100px] hover:!cursor-pointer";
456
+ const c = X(), { range: p } = E(), { appSettings: d } = H(), N = gs().isLimited("limitAnalytics"), f = "-mb-3 h-[10vw] max-h-[200px] min-h-[100px] hover:!cursor-pointer";
449
457
  if (o)
450
- return /* @__PURE__ */ e.jsx($e, { className: "flex h-[calc(10vw+116px)] max-h-[416px] min-h-20 items-center justify-center hover:!cursor-pointer", children: /* @__PURE__ */ e.jsx(We, {}) });
451
- const x = d == null ? void 0 : d.analytics.webAnalytics, b = p && !x, j = !0, y = d == null ? void 0 : d.paidMembersEnabled, u = [x, b, j, y].filter(Boolean).length;
452
- let z = "lg:grid-cols-3";
453
- u === 2 ? z = "lg:grid-cols-2" : u === 1 && (z = "lg:grid-cols-1");
454
- const I = `flex flex-col lg:grid ${z} gap-6`;
455
- return /* @__PURE__ */ e.jsxs("div", { className: I, children: [
456
- x && !b && /* @__PURE__ */ e.jsx(
457
- U,
458
+ return /* @__PURE__ */ e.jsx(We, { className: "flex h-[calc(10vw+116px)] max-h-[416px] min-h-20 items-center justify-center hover:!cursor-pointer", children: /* @__PURE__ */ e.jsx(De, {}) });
459
+ const r = d == null ? void 0 : d.analytics.webAnalytics, m = N && !r, v = !0, w = d == null ? void 0 : d.paidMembersEnabled, b = [r, m, v, w].filter(Boolean).length;
460
+ let k = "lg:grid-cols-3";
461
+ b === 2 ? k = "lg:grid-cols-2" : b === 1 && (k = "lg:grid-cols-1");
462
+ const T = `flex flex-col lg:grid ${k} gap-6`;
463
+ return /* @__PURE__ */ e.jsxs("div", { className: T, children: [
464
+ r && !m && /* @__PURE__ */ e.jsx(
465
+ K,
458
466
  {
459
467
  description: "Number of individual people who visited your website",
460
468
  diffDirection: "empty",
@@ -466,13 +474,13 @@ const ms = ({
466
474
  c("/analytics/web/");
467
475
  },
468
476
  children: /* @__PURE__ */ e.jsx(
469
- O,
477
+ Y,
470
478
  {
471
- className: r,
479
+ className: f,
472
480
  color: "hsl(var(--chart-blue))",
473
481
  data: t,
474
482
  id: "visitors",
475
- range: f,
483
+ range: p,
476
484
  showHorizontalLines: !0,
477
485
  showYAxisValues: !1,
478
486
  syncId: "overview-charts",
@@ -481,44 +489,44 @@ const ms = ({
481
489
  )
482
490
  }
483
491
  ),
484
- b && /* @__PURE__ */ e.jsxs(R, { children: [
485
- /* @__PURE__ */ e.jsxs(D, { className: "hidden", children: [
486
- /* @__PURE__ */ e.jsx(H, { children: "Unlock web analytics" }),
487
- /* @__PURE__ */ e.jsx(V, { children: "Get the full picture of what's working with detailed, cookie-free traffic analytics." })
492
+ m && /* @__PURE__ */ e.jsxs(V, { children: [
493
+ /* @__PURE__ */ e.jsxs(I, { className: "hidden", children: [
494
+ /* @__PURE__ */ e.jsx(B, { children: "Unlock web analytics" }),
495
+ /* @__PURE__ */ e.jsx(O, { children: "Get the full picture of what's working with detailed, cookie-free traffic analytics." })
488
496
  ] }),
489
- /* @__PURE__ */ e.jsx(F, { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ e.jsx(
490
- q,
497
+ /* @__PURE__ */ e.jsx(U, { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ e.jsx(
498
+ Z,
491
499
  {
492
- actions: /* @__PURE__ */ e.jsx(C, { variant: "outline", onClick: () => c("/pro", { crossApp: !0 }), children: "Upgrade now" }),
500
+ actions: /* @__PURE__ */ e.jsx(A, { variant: "outline", onClick: () => c("/pro", { crossApp: !0 }), children: "Upgrade now" }),
493
501
  className: "py-10",
494
502
  description: "Get the full picture of what's working with detailed, cookie-free traffic analytics.",
495
503
  title: "Unlock web analytics",
496
- children: /* @__PURE__ */ e.jsx(Ee, {})
504
+ children: /* @__PURE__ */ e.jsx(Re, {})
497
505
  }
498
506
  ) })
499
507
  ] }),
500
508
  /* @__PURE__ */ e.jsx(
501
- U,
509
+ K,
502
510
  {
503
511
  description: "How number of members of your publication changed over time",
504
512
  diffDirection: i.directions.total,
505
513
  diffValue: i.percentChanges.total,
506
- formattedValue: g(i.totalMembers),
514
+ formattedValue: x(i.totalMembers),
507
515
  iconName: "User",
508
516
  linkto: "/analytics/growth/",
509
517
  title: "Members",
510
- trendingFromValue: `${g(l[0].value)}`,
518
+ trendingFromValue: `${x(n[0].value)}`,
511
519
  onClick: () => {
512
520
  c("/analytics/growth/?tab=total-members");
513
521
  },
514
522
  children: /* @__PURE__ */ e.jsx(
515
- O,
523
+ Y,
516
524
  {
517
- className: r,
525
+ className: f,
518
526
  color: "hsl(var(--chart-darkblue))",
519
- data: l,
527
+ data: n,
520
528
  id: "members",
521
- range: f,
529
+ range: p,
522
530
  showHorizontalLines: !0,
523
531
  showYAxisValues: !1,
524
532
  syncId: "overview-charts"
@@ -526,28 +534,28 @@ const ms = ({
526
534
  )
527
535
  }
528
536
  ),
529
- y && /* @__PURE__ */ e.jsx(
530
- U,
537
+ w && /* @__PURE__ */ e.jsx(
538
+ K,
531
539
  {
532
540
  description: "Monthly recurring revenue changes over time",
533
541
  diffDirection: i.directions.mrr,
534
542
  diffValue: i.percentChanges.mrr,
535
- formattedValue: `${m}${g(P(i.mrr))}`,
543
+ formattedValue: `${u}${x(q(i.mrr))}`,
536
544
  iconName: "Coins",
537
545
  linkto: "/analytics/growth/",
538
546
  title: "MRR",
539
- trendingFromValue: `${m}${g(n[0].value)}`,
547
+ trendingFromValue: `${u}${x(l[0].value)}`,
540
548
  onClick: () => {
541
549
  c("/analytics/growth/?tab=mrr");
542
550
  },
543
551
  children: /* @__PURE__ */ e.jsx(
544
- O,
552
+ Y,
545
553
  {
546
- className: r,
554
+ className: f,
547
555
  color: "hsl(var(--chart-teal))",
548
- data: n,
556
+ data: l,
549
557
  id: "mrr",
550
- range: f,
558
+ range: p,
551
559
  showHorizontalLines: !0,
552
560
  showYAxisValues: !1,
553
561
  syncId: "overview-charts"
@@ -556,13 +564,13 @@ const ms = ({
556
564
  }
557
565
  )
558
566
  ] });
559
- }, gs = ({
567
+ }, bs = ({
560
568
  className: s
561
- }) => /* @__PURE__ */ e.jsx("div", { className: k("rounded-sm bg-muted dark:bg-[#36373a] flex flex-col items-center justify-center gap-1 p-6", s), children: /* @__PURE__ */ e.jsx(Fe, { className: "text-muted-foreground/50", size: 18, strokeWidth: 1.5 }) }), G = ({
569
+ }) => /* @__PURE__ */ e.jsx("div", { className: _("rounded-sm bg-muted dark:bg-[#36373a] flex flex-col items-center justify-center gap-1 p-6", s), children: /* @__PURE__ */ e.jsx(Be, { className: "text-muted-foreground/50", size: 18, strokeWidth: 1.5 }) }), Q = ({
562
570
  className: s,
563
571
  metrics: t,
564
572
  title: a
565
- }) => /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: k("pointer-events-none absolute bottom-[calc(100%+2px)] left-1/2 z-50 min-w-[160px] -translate-x-1/2 rounded-md bg-background p-3 text-sm opacity-0 shadow-md transition-all group-hover/tooltip:bottom-[calc(100%+12px)] group-hover/tooltip:opacity-100", s), children: [
573
+ }) => /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: _("pointer-events-none absolute bottom-[calc(100%+2px)] left-1/2 z-50 min-w-[160px] -translate-x-1/2 rounded-md bg-background p-3 text-sm opacity-0 shadow-md transition-all group-hover/tooltip:bottom-[calc(100%+12px)] group-hover/tooltip:opacity-100", s), children: [
566
574
  /* @__PURE__ */ e.jsx("div", { className: "mb-1.5 whitespace-nowrap border-b pb-1.5 pr-10 font-medium text-muted-foreground", children: a }),
567
575
  /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-1.5", children: t == null ? void 0 : t.map((i) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-5", children: [
568
576
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1.5 whitespace-nowrap", children: [
@@ -571,162 +579,174 @@ const ms = ({
571
579
  ] }),
572
580
  /* @__PURE__ */ e.jsx("span", { className: "font-mono", children: i.metric })
573
581
  ] }, i.label)) })
574
- ] }) }), fs = ({
582
+ ] }) }), js = ({
575
583
  topPostsData: s,
576
584
  isLoading: t
577
585
  }) => {
578
- var N, p;
579
- const a = Q(), { range: i, settings: l } = M(), { appSettings: n } = E(), m = String(((N = l.find((r) => r.key === "timezone")) == null ? void 0 : N.value) || "Etc/UTC"), o = n == null ? void 0 : n.analytics.webAnalytics, c = n == null ? void 0 : n.analytics.emailTrackClicks, f = n == null ? void 0 : n.analytics.emailTrackOpens, d = "flex items-center justify-end gap-1 rounded-md px-2 py-1 font-mono text-gray-800 hover:bg-muted-foreground/10 group-hover:text-foreground";
580
- return /* @__PURE__ */ e.jsxs(R, { className: "group/card w-full lg:col-span-2", "data-testid": "top-posts-card", children: [
581
- /* @__PURE__ */ e.jsxs(D, { children: [
582
- /* @__PURE__ */ e.jsxs(H, { className: "flex items-baseline justify-between font-medium leading-snug text-muted-foreground", children: [
586
+ var N, f;
587
+ const a = X(), { range: i, settings: n } = E(), { appSettings: l } = H(), u = String(((N = n.find((r) => r.key === "timezone")) == null ? void 0 : N.value) || "Etc/UTC"), {
588
+ webAnalytics: o = !1,
589
+ membersTrackSources: c = !1,
590
+ emailTrackClicks: p = !1,
591
+ emailTrackOpens: d = !1
592
+ } = (l == null ? void 0 : l.analytics) || {}, g = "flex items-center justify-end gap-1 rounded-md px-2 py-1 font-mono text-gray-800 hover:bg-muted-foreground/10 group-hover:text-foreground";
593
+ return /* @__PURE__ */ e.jsxs(V, { className: "group/card w-full lg:col-span-2", "data-testid": "top-posts-card", children: [
594
+ /* @__PURE__ */ e.jsxs(I, { children: [
595
+ /* @__PURE__ */ e.jsxs(B, { className: "flex items-baseline justify-between font-medium leading-snug text-muted-foreground", children: [
583
596
  "Top posts ",
584
- K(i)
597
+ J(i)
585
598
  ] }),
586
- /* @__PURE__ */ e.jsx(V, { className: "hidden", children: "Most viewed posts in this period" })
599
+ /* @__PURE__ */ e.jsx(O, { className: "hidden", children: "Most viewed posts in this period" })
587
600
  ] }),
588
- /* @__PURE__ */ e.jsx(F, { children: t ? /* @__PURE__ */ e.jsx(Ie, { className: "mt-6" }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
589
- (p = s == null ? void 0 : s.stats) == null ? void 0 : p.map((r) => /* @__PURE__ */ e.jsxs("div", { className: 'group relative flex w-full items-start justify-between gap-5 border-t border-border/50 py-4 before:absolute before:-inset-x-4 before:inset-y-0 before:z-0 before:hidden before:rounded-md before:bg-accent before:opacity-80 before:content-[""] first:!border-border hover:cursor-pointer hover:border-transparent hover:before:block md:items-center dark:before:bg-accent/50 [&+div]:hover:border-transparent', children: [
601
+ /* @__PURE__ */ e.jsx(U, { children: t ? /* @__PURE__ */ e.jsx(Oe, { className: "mt-6" }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
602
+ (f = s == null ? void 0 : s.stats) == null ? void 0 : f.map((r) => /* @__PURE__ */ e.jsxs("div", { className: 'group relative flex w-full items-start justify-between gap-5 border-t border-border/50 py-4 before:absolute before:-inset-x-4 before:inset-y-0 before:z-0 before:hidden before:rounded-md before:bg-accent before:opacity-80 before:content-[""] first:!border-border hover:cursor-pointer hover:border-transparent hover:before:block md:items-center dark:before:bg-accent/50 [&+div]:hover:border-transparent', children: [
590
603
  /* @__PURE__ */ e.jsxs("div", { className: "z-10 flex min-w-[160px] grow items-start gap-4 md:items-center lg:min-w-[320px]", onClick: () => {
591
- a(`/posts/analytics/${r.post_id}`, { crossApp: !0 });
604
+ a(xe({
605
+ postId: r.post_id,
606
+ hasEmailData: r.sent_count !== null,
607
+ analytics: {
608
+ webAnalytics: o,
609
+ membersTrackSources: c
610
+ }
611
+ }), { crossApp: !0 });
592
612
  }, children: [
593
613
  r.feature_image ? /* @__PURE__ */ e.jsx("div", { className: "hidden aspect-[16/10] w-[80px] shrink-0 rounded-sm bg-cover bg-center sm:!visible sm:!block lg:w-[100px]", style: {
594
614
  backgroundImage: `url(${r.feature_image})`
595
- } }) : /* @__PURE__ */ e.jsx(gs, { className: "hidden aspect-[16/10] w-[80px] shrink-0 group-hover:bg-muted-foreground/10 sm:!visible sm:!flex lg:w-[100px]" }),
615
+ } }) : /* @__PURE__ */ e.jsx(bs, { className: "hidden aspect-[16/10] w-[80px] shrink-0 group-hover:bg-muted-foreground/10 sm:!visible sm:!flex lg:w-[100px]" }),
596
616
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
597
617
  /* @__PURE__ */ e.jsx("span", { className: "line-clamp-2 text-lg font-semibold leading-[1.35em]", children: r.title }),
598
618
  /* @__PURE__ */ e.jsxs("span", { className: "text-sm text-muted-foreground", children: [
599
619
  "By ",
600
620
  r.authors,
601
621
  " – ",
602
- te(r.published_at, m)
622
+ ne(r.published_at, u)
603
623
  ] }),
604
- /* @__PURE__ */ e.jsx("span", { className: "text-sm text-muted-foreground", children: ts(r) })
624
+ /* @__PURE__ */ e.jsx("span", { className: "text-sm text-muted-foreground", children: is(r) })
605
625
  ] })
606
626
  ] }),
607
627
  /* @__PURE__ */ e.jsxs("div", { className: "z-10 flex flex-col items-end justify-center gap-0.5 text-sm md:flex-row md:items-center md:justify-end md:gap-3", children: [
608
- o && /* @__PURE__ */ e.jsxs("div", { className: "group/tooltip relative flex w-[66px] lg:w-[92px]", "data-testid": "statistics-visitors", onClick: (x) => {
609
- x.stopPropagation(), a(`/posts/analytics/${r.post_id}/web`, { crossApp: !0 });
628
+ o && /* @__PURE__ */ e.jsxs("div", { className: "group/tooltip relative flex w-[66px] lg:w-[92px]", "data-testid": "statistics-visitors", onClick: (m) => {
629
+ m.stopPropagation(), a(`/posts/analytics/${r.post_id}/web`, { crossApp: !0 });
610
630
  }, children: [
611
631
  /* @__PURE__ */ e.jsx(
612
- G,
632
+ Q,
613
633
  {
614
634
  metrics: [
615
635
  {
616
- icon: /* @__PURE__ */ e.jsx($, { className: "shrink-0 text-muted-foreground", size: 16, strokeWidth: 1.5 }),
636
+ icon: /* @__PURE__ */ e.jsx(R, { className: "shrink-0 text-muted-foreground", size: 16, strokeWidth: 1.5 }),
617
637
  label: "Unique visitors",
618
- metric: g(r.views)
638
+ metric: x(r.views)
619
639
  }
620
640
  ],
621
641
  title: "Web traffic"
622
642
  }
623
643
  ),
624
- /* @__PURE__ */ e.jsxs("div", { className: d, children: [
625
- /* @__PURE__ */ e.jsx($, { className: "text-muted-foreground group-hover:text-foreground", size: 16, strokeWidth: 1.5 }),
626
- Z(r.views)
644
+ /* @__PURE__ */ e.jsxs("div", { className: g, children: [
645
+ /* @__PURE__ */ e.jsx(R, { className: "text-muted-foreground group-hover:text-foreground", size: 16, strokeWidth: 1.5 }),
646
+ se(r.views)
627
647
  ] })
628
648
  ] }),
629
- r.sent_count !== null && /* @__PURE__ */ e.jsxs("div", { className: "group/tooltip relative flex w-[66px] lg:w-[92px]", onClick: (x) => {
630
- x.stopPropagation(), a(`/posts/analytics/${r.post_id}/newsletter`, { crossApp: !0 });
649
+ r.sent_count !== null && /* @__PURE__ */ e.jsxs("div", { className: "group/tooltip relative flex w-[66px] lg:w-[92px]", onClick: (m) => {
650
+ m.stopPropagation(), a(`/posts/analytics/${r.post_id}/newsletter`, { crossApp: !0 });
631
651
  }, children: [
632
652
  /* @__PURE__ */ e.jsx(
633
- G,
653
+ Q,
634
654
  {
635
- className: `${n != null && n.analytics.membersTrackSources ? "" : "left-auto right-0 translate-x-0"}`,
655
+ className: `${c ? "" : "left-auto right-0 translate-x-0"}`,
636
656
  metrics: [
637
657
  // Always show sent
638
658
  {
639
- icon: /* @__PURE__ */ e.jsx(S, { className: "shrink-0 text-muted-foreground", size: 16, strokeWidth: 1.5 }),
659
+ icon: /* @__PURE__ */ e.jsx(ae, { className: "shrink-0 text-muted-foreground", size: 16, strokeWidth: 1.5 }),
640
660
  label: "Sent",
641
- metric: g(r.sent_count || 0)
661
+ metric: x(r.sent_count || 0)
642
662
  },
643
663
  // Only show opens if open tracking is enabled
644
- ...f ? [{
645
- icon: /* @__PURE__ */ e.jsx(Y, { className: "shrink-0 text-muted-foreground", size: 16, strokeWidth: 1.5 }),
664
+ ...d ? [{
665
+ icon: /* @__PURE__ */ e.jsx(P, { className: "shrink-0 text-muted-foreground", size: 16, strokeWidth: 1.5 }),
646
666
  label: "Opens",
647
- metric: g(r.opened_count || 0)
667
+ metric: x(r.opened_count || 0)
648
668
  }] : [],
649
669
  // Only show clicks if click tracking is enabled
650
- ...c ? [{
651
- icon: /* @__PURE__ */ e.jsx(ee, { className: "shrink-0 text-muted-foreground", size: 16, strokeWidth: 1.5 }),
670
+ ...p ? [{
671
+ icon: /* @__PURE__ */ e.jsx(te, { className: "shrink-0 text-muted-foreground", size: 16, strokeWidth: 1.5 }),
652
672
  label: "Clicks",
653
- metric: g(r.clicked_count || 0)
673
+ metric: x(r.clicked_count || 0)
654
674
  }] : []
655
675
  ],
656
676
  title: "Newsletter performance"
657
677
  }
658
678
  ),
659
- /* @__PURE__ */ e.jsx("div", { className: d, children: f ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
660
- /* @__PURE__ */ e.jsx(Y, { className: "text-muted-foreground group-hover:text-foreground", size: 16, strokeWidth: 1.5 }),
679
+ /* @__PURE__ */ e.jsx("div", { className: g, children: d ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
680
+ /* @__PURE__ */ e.jsx(P, { className: "text-muted-foreground group-hover:text-foreground", size: 16, strokeWidth: 1.5 }),
661
681
  r.open_rate ? `${Math.round(r.open_rate)}%` : "0%"
662
- ] }) : c ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
663
- /* @__PURE__ */ e.jsx(ee, { className: "text-muted-foreground group-hover:text-foreground", size: 16, strokeWidth: 1.5 }),
682
+ ] }) : p ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
683
+ /* @__PURE__ */ e.jsx(te, { className: "text-muted-foreground group-hover:text-foreground", size: 16, strokeWidth: 1.5 }),
664
684
  r.click_rate ? `${Math.round(r.click_rate)}%` : "0%"
665
685
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
666
- /* @__PURE__ */ e.jsx(S, { className: "text-muted-foreground group-hover:text-foreground", size: 16, strokeWidth: 1.5 }),
667
- Z(r.sent_count || 0)
686
+ /* @__PURE__ */ e.jsx(ae, { className: "text-muted-foreground group-hover:text-foreground", size: 16, strokeWidth: 1.5 }),
687
+ se(r.sent_count || 0)
668
688
  ] }) })
669
689
  ] }),
670
- (n == null ? void 0 : n.analytics.membersTrackSources) && /* @__PURE__ */ e.jsxs("div", { className: "group/tooltip relative flex w-[66px] lg:w-[92px]", "data-testid": "statistics-members", onClick: (x) => {
671
- x.stopPropagation(), a(`/posts/analytics/${r.post_id}/growth`, { crossApp: !0 });
690
+ c && /* @__PURE__ */ e.jsxs("div", { className: "group/tooltip relative flex w-[66px] lg:w-[92px]", "data-testid": "statistics-members", onClick: (m) => {
691
+ m.stopPropagation(), a(`/posts/analytics/${r.post_id}/growth`, { crossApp: !0 });
672
692
  }, children: [
673
693
  /* @__PURE__ */ e.jsx(
674
- G,
694
+ Q,
675
695
  {
676
696
  className: "left-auto right-0 translate-x-0",
677
697
  metrics: [
678
698
  {
679
- icon: /* @__PURE__ */ e.jsx(Be, { className: "shrink-0 text-muted-foreground", size: 16, strokeWidth: 1.5 }),
699
+ icon: /* @__PURE__ */ e.jsx(Ue, { className: "shrink-0 text-muted-foreground", size: 16, strokeWidth: 1.5 }),
680
700
  label: "Free",
681
- metric: r.free_members > 0 ? `+${g(r.free_members)}` : "0"
701
+ metric: r.free_members > 0 ? `+${x(r.free_members)}` : "0"
682
702
  },
683
703
  // Only show paid members if paid members are enabled
684
- ...n != null && n.paidMembersEnabled ? [{
685
- icon: /* @__PURE__ */ e.jsx(Oe, { className: "shrink-0 text-muted-foreground", size: 16, strokeWidth: 1.5 }),
704
+ ...l != null && l.paidMembersEnabled ? [{
705
+ icon: /* @__PURE__ */ e.jsx(Ge, { className: "shrink-0 text-muted-foreground", size: 16, strokeWidth: 1.5 }),
686
706
  label: "Paid",
687
- metric: r.paid_members > 0 ? `+${g(r.paid_members)}` : "0"
707
+ metric: r.paid_members > 0 ? `+${x(r.paid_members)}` : "0"
688
708
  }] : []
689
709
  ],
690
710
  title: "New members"
691
711
  }
692
712
  ),
693
- /* @__PURE__ */ e.jsxs("div", { className: d, children: [
694
- /* @__PURE__ */ e.jsx(ie, { className: "text-muted-foreground group-hover:text-foreground", size: 16, strokeWidth: 1.5 }),
695
- r.members > 0 ? `+${g(r.members)}` : "0"
713
+ /* @__PURE__ */ e.jsxs("div", { className: g, children: [
714
+ /* @__PURE__ */ e.jsx(oe, { className: "text-muted-foreground group-hover:text-foreground", size: 16, strokeWidth: 1.5 }),
715
+ r.members > 0 ? `+${x(r.members)}` : "0"
696
716
  ] })
697
717
  ] })
698
718
  ] })
699
719
  ] }, r.post_id)),
700
720
  (!(s != null && s.stats) || s.stats.length === 0) && /* @__PURE__ */ e.jsx(
701
- q,
721
+ Z,
702
722
  {
703
723
  className: "w-full pb-10",
704
- title: `No posts ${K(i)}`,
705
- children: /* @__PURE__ */ e.jsx(ne, { strokeWidth: 1.5 })
724
+ title: `No posts ${J(i)}`,
725
+ children: /* @__PURE__ */ e.jsx(ce, { strokeWidth: 1.5 })
706
726
  }
707
727
  )
708
728
  ] }) })
709
729
  ] });
710
- }, bs = "PostsResponseType", js = ye({
711
- dataType: bs,
730
+ }, vs = "PostsResponseType", Ns = ke({
731
+ dataType: vs,
712
732
  path: "/posts/"
713
- }), vs = () => {
714
- const { data: { posts: [s] } = { posts: [] }, isLoading: t } = js({
733
+ }), ws = () => {
734
+ const { data: { posts: [s] } = { posts: [] }, isLoading: t } = Ns({
715
735
  searchParams: {
716
736
  filter: "status:[published,sent]",
717
737
  order: "published_at DESC",
718
738
  limit: "1",
719
739
  include: "authors,email,count.clicks"
720
740
  }
721
- }), a = s, i = Ue((a == null ? void 0 : a.id) || "", {
741
+ }), a = s, i = Ye((a == null ? void 0 : a.id) || "", {
722
742
  enabled: !!(a != null && a.id)
723
- }), { data: l, isLoading: n } = i;
743
+ }), { data: n, isLoading: l } = i;
724
744
  return {
725
- data: T(() => {
745
+ data: L(() => {
726
746
  var c;
727
747
  if (!a)
728
748
  return null;
729
- const o = ((c = l == null ? void 0 : l.stats) == null ? void 0 : c[0]) || {
749
+ const o = ((c = n == null ? void 0 : n.stats) == null ? void 0 : c[0]) || {
730
750
  id: a.id,
731
751
  recipient_count: null,
732
752
  opened_count: null,
@@ -762,138 +782,138 @@ const ms = ({
762
782
  click_rate: null
763
783
  // TODO: Add click_rate to PostStats interface if needed
764
784
  };
765
- }, [a, l]),
766
- isLoading: t || !!(a != null && a.id) && n
785
+ }, [a, n]),
786
+ isLoading: t || !!(a != null && a.id) && l
767
787
  };
768
- }, se = ({
788
+ }, re = ({
769
789
  className: s,
770
790
  title: t,
771
791
  description: a,
772
792
  url: i,
773
- children: l
774
- }) => /* @__PURE__ */ e.jsx("a", { className: k(
793
+ children: n
794
+ }) => /* @__PURE__ */ e.jsx("a", { className: _(
775
795
  "block rounded-xl border bg-card p-6 transition-all hover:shadow-xs hover:bg-accent/50 group/card",
776
796
  s
777
797
  ), href: i, rel: "noreferrer", target: "_blank", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-6", children: [
778
- l,
798
+ n,
779
799
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-0.5 leading-tight", children: [
780
800
  /* @__PURE__ */ e.jsx("span", { className: "text-base font-semibold", children: t }),
781
801
  /* @__PURE__ */ e.jsx("span", { className: "text-sm font-normal text-gray-700", children: a })
782
802
  ] })
783
- ] }) }), _s = () => {
784
- const { appSettings: s } = E(), { statsConfig: t, isLoading: a, range: i } = M(), { startDate: l, endDate: n, timezone: m } = ke(i), { isLoading: o, chartData: c, totals: f, currencySymbol: d } = as(i), { data: N, isLoading: p } = vs(), { data: r, isLoading: x } = Ge({
803
+ ] }) }), zs = () => {
804
+ const { appSettings: s } = H(), { statsConfig: t, isLoading: a, range: i } = E(), { startDate: n, endDate: l, timezone: u } = _e(i), { isLoading: o, chartData: c, totals: p, currencySymbol: d } = rs(i), { data: g, isLoading: N } = ws(), { data: f, isLoading: r } = Ke({
785
805
  searchParams: {
786
- date_from: L(l),
787
- date_to: L(n),
806
+ date_from: D(n),
807
+ date_to: D(l),
788
808
  limit: "5",
789
- timezone: m
809
+ timezone: u
790
810
  }
791
- }), b = {
811
+ }), m = {
792
812
  site_uuid: (t == null ? void 0 : t.id) || "",
793
- date_from: L(l),
794
- date_to: L(n),
795
- timezone: m,
796
- member_status: ss(_e)
797
- }, { data: j, loading: y } = Pe({
813
+ date_from: D(n),
814
+ date_to: D(l),
815
+ timezone: u,
816
+ member_status: ts(Ce)
817
+ }, { data: v, loading: w } = Qe({
798
818
  endpoint: "api_kpis",
799
819
  statsConfig: t,
800
- params: b
801
- }), u = T(() => {
802
- var v;
803
- return (v = B(j || [], i, "visits", "sum")) == null ? void 0 : v.map((_) => {
804
- const A = Number(_.visits), h = isNaN(A) ? 0 : A;
820
+ params: m
821
+ }), b = L(() => {
822
+ var j;
823
+ return (j = G(v || [], i, "visits", "sum")) == null ? void 0 : j.map((z) => {
824
+ const M = Number(z.visits), h = isNaN(M) ? 0 : M;
805
825
  return {
806
- date: String(_.date),
826
+ date: String(z.date),
807
827
  value: h,
808
- formattedValue: g(h),
828
+ formattedValue: x(h),
809
829
  label: "Visitors"
810
830
  };
811
831
  });
812
- }, [j, i]), z = T(() => {
813
- const v = [0, 1];
814
- if (!u || u.length === 0)
815
- return v;
816
- const _ = u.map((h) => h.value).filter((h) => h >= 0);
817
- return _.length === 0 ? v : [0, Math.max(..._) || v[1]];
818
- }, [u]), I = T(() => {
832
+ }, [v, i]), k = L(() => {
833
+ const j = [0, 1];
834
+ if (!b || b.length === 0)
835
+ return j;
836
+ const z = b.map((h) => h.value).filter((h) => h >= 0);
837
+ return z.length === 0 ? j : [0, Math.max(...z) || j[1]];
838
+ }, [b]), T = L(() => {
819
839
  if (!c || c.length === 0)
820
840
  return [];
821
- let v = [];
822
- return v = B(c, i, "value", "exact"), v.map((h) => ({
841
+ let j = [];
842
+ return j = G(c, i, "value", "exact"), j.map((h) => ({
823
843
  date: h.date,
824
844
  value: h.free + h.paid,
825
- formattedValue: g(h.free + h.paid),
845
+ formattedValue: x(h.free + h.paid),
826
846
  label: "Members"
827
847
  }));
828
- }, [c, i]), be = T(() => {
848
+ }, [c, i]), $ = L(() => {
829
849
  if (!(s != null && s.paidMembersEnabled) || !c || c.length === 0)
830
850
  return [];
831
- let v = [];
832
- return v = B(c, i, "mrr", "exact"), v.map((h) => ({
851
+ let j = [];
852
+ return j = G(c, i, "mrr", "exact"), j.map((h) => ({
833
853
  date: h.date,
834
- value: P(h.mrr),
835
- formattedValue: `${d}${g(P(h.mrr))}`,
854
+ value: q(h.mrr),
855
+ formattedValue: `${d}${x(q(h.mrr))}`,
836
856
  label: "MRR"
837
857
  }));
838
- }, [c, i, d, s]), je = T(() => {
839
- if (!(j != null && j.length))
858
+ }, [c, i, d, s]), W = L(() => {
859
+ if (!(v != null && v.length))
840
860
  return { visits: "0" };
841
- const v = j.reduce((_, A) => {
842
- const h = Number(A.visits);
843
- return _ + (isNaN(h) ? 0 : h);
861
+ const j = v.reduce((z, M) => {
862
+ const h = Number(M.visits);
863
+ return z + (isNaN(h) ? 0 : h);
844
864
  }, 0);
845
865
  return {
846
- visits: g(v)
866
+ visits: x(j)
847
867
  };
848
- }, [j]), ve = a;
849
- return /* @__PURE__ */ e.jsxs(Ye, { children: [
850
- /* @__PURE__ */ e.jsx(Ke, { children: /* @__PURE__ */ e.jsx(Qe, { children: /* @__PURE__ */ e.jsx(qe, { excludeRanges: ["today"] }) }) }),
851
- /* @__PURE__ */ e.jsxs(Je, { isLoading: ve, loadingComponent: /* @__PURE__ */ e.jsx(e.Fragment, {}), children: [
868
+ }, [v]), C = a;
869
+ return /* @__PURE__ */ e.jsxs(qe, { children: [
870
+ /* @__PURE__ */ e.jsx(Pe, { children: /* @__PURE__ */ e.jsx(Je, { children: /* @__PURE__ */ e.jsx(Xe, { excludeRanges: ["today"] }) }) }),
871
+ /* @__PURE__ */ e.jsxs(Ze, { isLoading: C, loadingComponent: /* @__PURE__ */ e.jsx(e.Fragment, {}), children: [
852
872
  /* @__PURE__ */ e.jsx(
853
- ps,
873
+ fs,
854
874
  {
855
875
  currencySymbol: d,
856
- growthTotals: f,
857
- isLoading: y || o,
858
- kpiValues: je,
859
- membersChartData: I,
860
- mrrChartData: be,
861
- visitorsChartData: u,
862
- visitorsYRange: z
876
+ growthTotals: p,
877
+ isLoading: w || o,
878
+ kpiValues: W,
879
+ membersChartData: T,
880
+ mrrChartData: $,
881
+ visitorsChartData: b,
882
+ visitorsYRange: k
863
883
  }
864
884
  ),
865
885
  /* @__PURE__ */ e.jsx(
866
- hs,
886
+ ps,
867
887
  {
868
- isLoading: p,
869
- latestPostStats: N
888
+ isLoading: N,
889
+ latestPostStats: g
870
890
  }
871
891
  ),
872
892
  /* @__PURE__ */ e.jsx(
873
- fs,
893
+ js,
874
894
  {
875
- isLoading: x,
876
- topPostsData: r
895
+ isLoading: r,
896
+ topPostsData: f
877
897
  }
878
898
  ),
879
899
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 gap-6 lg:grid-cols-2", children: [
880
- /* @__PURE__ */ e.jsx(re, { className: "-mb-4 mt-4 lg:col-span-2", children: "Grow your audience" }),
900
+ /* @__PURE__ */ e.jsx(le, { className: "-mb-4 mt-4 lg:col-span-2", children: "Grow your audience" }),
881
901
  /* @__PURE__ */ e.jsx(
882
- se,
902
+ re,
883
903
  {
884
904
  description: "Find out how to review the performance of your content and get the most out of post analytics in Ghost.",
885
905
  title: "Understanding analytics in Ghost",
886
906
  url: "https://ghost.org/help/native-analytics",
887
- children: /* @__PURE__ */ e.jsx("div", { className: "flex h-18 w-[100px] min-w-[100px] items-center justify-center rounded-md bg-gradient-to-tr from-[#14B8FF]/20 to-[#00BBA7]/20 p-4 opacity-80 transition-all group-hover/card:opacity-100", children: /* @__PURE__ */ e.jsx(Xe, { className: "text-[#00BBA7]", size: 20, strokeWidth: 1.5 }) })
907
+ children: /* @__PURE__ */ e.jsx("div", { className: "flex h-18 w-[100px] min-w-[100px] items-center justify-center rounded-md bg-gradient-to-tr from-[#14B8FF]/20 to-[#00BBA7]/20 p-4 opacity-80 transition-all group-hover/card:opacity-100", children: /* @__PURE__ */ e.jsx(Se, { className: "text-[#00BBA7]", size: 20, strokeWidth: 1.5 }) })
888
908
  }
889
909
  ),
890
910
  /* @__PURE__ */ e.jsx(
891
- se,
911
+ re,
892
912
  {
893
913
  description: "Use these content distribution tactics to get more people to discover your work and increase engagement.",
894
914
  title: "How to get your content seen online",
895
915
  url: "https://ghost.org/resources/content-distribution/",
896
- children: /* @__PURE__ */ e.jsx("div", { className: "flex h-18 w-[100px] min-w-[100px] items-center justify-center rounded-md bg-gradient-to-tl from-[#FDC700]/20 to-[#FF2056]/20 p-4 opacity-80 transition-all group-hover/card:opacity-100", children: /* @__PURE__ */ e.jsx($, { className: "text-[#FE9A00]", size: 20, strokeWidth: 1.5 }) })
916
+ children: /* @__PURE__ */ e.jsx("div", { className: "flex h-18 w-[100px] min-w-[100px] items-center justify-center rounded-md bg-gradient-to-tl from-[#FDC700]/20 to-[#FF2056]/20 p-4 opacity-80 transition-all group-hover/card:opacity-100", children: /* @__PURE__ */ e.jsx(R, { className: "text-[#FE9A00]", size: 20, strokeWidth: 1.5 }) })
897
917
  }
898
918
  )
899
919
  ] })
@@ -901,6 +921,6 @@ const ms = ({
901
921
  ] });
902
922
  };
903
923
  export {
904
- _s as default
924
+ zs as default
905
925
  };
906
- //# sourceMappingURL=index-CUuQaROI.mjs.map
926
+ //# sourceMappingURL=index-wT0OIw_N.mjs.map