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.
- package/components/tryghost-i18n-6.19.0.tgz +0 -0
- package/components/tryghost-parse-email-address-6.19.0.tgz +0 -0
- package/core/built/admin/assets/{PolarAngleAxis-DALH8FDm.js → PolarAngleAxis-CGprvq8M.js} +1 -1
- package/core/built/admin/assets/{_baseAssignValue-D_UsvJRN.js → _baseAssignValue-Bwn07Ln5.js} +1 -1
- package/core/built/admin/assets/{a-large-small-DVyx4GMu.js → a-large-small-p58xibEK.js} +1 -1
- package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +1 -1
- package/core/built/admin/assets/admin-x-settings/{code-editor-view-DBrulgE8.mjs → code-editor-view-DCKvO1TY.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-DgGwb1L-.mjs → index-BxWVtVnD.mjs} +6 -6
- package/core/built/admin/assets/admin-x-settings/{index-Cypgljb3.mjs → index-DyZIONe1.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-CsGHbqSU.mjs → index-HfMJcj2U.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{modals-rdo7i0D3.mjs → modals-CIiqfKY0.mjs} +7593 -7509
- package/core/built/admin/assets/{at-sign-CGNkBrZS.js → at-sign-BZPuAx5m.js} +1 -1
- package/core/built/admin/assets/audience-Cy9gLIa9.js +1 -0
- package/core/built/admin/assets/{avatar-flipboard-jqr9Aapd.js → avatar-flipboard-CLmWb5Xn.js} +1 -1
- package/core/built/admin/assets/{bluesky-sharing-C2749SVt.js → bluesky-sharing-BHt0oiii.js} +1 -1
- package/core/built/admin/assets/{chart-BAQCVPCH.js → chart--RFLGIL4.js} +1 -1
- package/core/built/admin/assets/{chunk.524.428356d01feabbc7b932.js → chunk.524.5c5c3f3273a86d1d9913.js} +7 -7
- package/core/built/admin/assets/{chunk.582.b8b41ba720f49d724992.js → chunk.582.e6c787cdf7e6de7819e0.js} +9 -9
- package/core/built/admin/assets/{code-editor-view-YNhJ1w71.js → code-editor-view-BW9y0JXN.js} +1 -1
- package/core/built/admin/assets/comments-C_lilDBp.js +1 -0
- package/core/built/admin/assets/content-helpers-BOnQQADZ.js +1 -0
- package/core/built/admin/assets/{copy-CNsHZEFR.js → copy-Bi7VpgPR.js} +1 -1
- package/core/built/admin/assets/{data-list-Dn5MkmyD.js → data-list-Bu3jzs1s.js} +1 -1
- package/core/built/admin/assets/{deleted-feed-item-Dmm_clMl.js → deleted-feed-item-B-doIIKc.js} +1 -1
- package/core/built/admin/assets/{edit-profile-BLSdtROQ.js → edit-profile-ZBdjFfvL.js} +1 -1
- package/core/built/admin/assets/{empty-indicator-C2Z0dddU.js → empty-indicator-C6BBh99D.js} +1 -1
- package/core/built/admin/assets/{en-DuTkaMAI.js → en-C7eSFQRw.js} +1 -1
- package/core/built/admin/assets/{feed-B4Xp4C2J.js → feed-CAioauwD.js} +1 -1
- package/core/built/admin/assets/{filters-gnOx5Z45.js → filters-DEKF0tIB.js} +1 -1
- package/core/built/admin/assets/{gh-chart-B2aWYkGg.js → gh-chart-D9KI0_sO.js} +1 -1
- package/core/built/admin/assets/{ghost-29f8f3c80e41126ba5e3c52ad5727e8a.js → ghost-6bff5c535ef015b0ed9421ceb6c699a7.js} +220 -211
- package/core/built/admin/assets/{growth-BysawIWe.js → growth-C6XGchvT.js} +1 -1
- package/core/built/admin/assets/{hash-j3sh-UI3.js → hash-DFhnGHId.js} +1 -1
- package/core/built/admin/assets/{inbox-1cUdr8Mm.js → inbox-p-Y5uScT.js} +1 -1
- package/core/built/admin/assets/{index-BVoBTlp_.js → index--VlvGKWi.js} +1 -1
- package/core/built/admin/assets/{index-DGBK5k9H.js → index-3uU4zg_6.js} +1 -1
- package/core/built/admin/assets/index-4ZkTY34B.css +1 -0
- package/core/built/admin/assets/{index-BhY_SbGB.js → index-BWnrLoWI.js} +1 -1
- package/core/built/admin/assets/{index-I9n711UW.js → index-BzU2odQq.js} +1 -1
- package/core/built/admin/assets/{index-mhojl7aD.js → index-CIZ_upe2.js} +1 -1
- package/core/built/admin/assets/{index-WjY3mGep.js → index-CS4XqyC-.js} +2 -2
- package/core/built/admin/assets/{index-BgrwCpgw.js → index-D17PEsUB.js} +1 -1
- package/core/built/admin/assets/{index-B8G0f0hb.js → index-DCTdAEHx.js} +3 -3
- package/core/built/admin/assets/{index-DarAAzVH.js → index-FPf-AERu.js} +1 -1
- package/core/built/admin/assets/index-JmqyGBro.js +1 -0
- package/core/built/admin/assets/{index-DKAlEWM4.js → index-LyfDjTto.js} +1 -1
- package/core/built/admin/assets/index-S62-c8TV.js +13 -0
- package/core/built/admin/assets/{index-D8CXbJm4.js → index-Wx8_AGZX.js} +1 -1
- package/core/built/admin/assets/{index-CkAUXgAi.js → index-jAidr8jI.js} +1 -1
- package/core/built/admin/assets/{index-Dz8eTtOq.js → index-lPLmWtv0.js} +1 -1
- package/core/built/admin/assets/koenig-lexical/index.css +1 -1
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.js +1853 -1863
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.umd.js +94 -94
- package/core/built/admin/assets/{koenig-lexical-coiS9dIC.js → koenig-lexical-CWnkYKQt.js} +77 -77
- package/core/built/admin/assets/{kpi-card-BEFHo2gr.js → kpi-card-B5UaJgOT.js} +1 -1
- package/core/built/admin/assets/{kpis-D-gz-lUk.js → kpis-Cc2RxnvZ.js} +1 -1
- package/core/built/admin/assets/{label-BvlHzzcJ.js → label-CW7Kmp9w.js} +1 -1
- package/core/built/admin/assets/{links-tdJvBrsT.js → links-wWNc9Uat.js} +1 -1
- package/core/built/admin/assets/{list-filter-DPE4Xj2T.js → list-filter-3EF6cVg-.js} +1 -1
- package/core/built/admin/assets/{lucide-react-ClQ3Iy7l.js → lucide-react-DtMIZssr.js} +214 -214
- package/core/built/admin/assets/{main-layout-DY96wK-_.js → main-layout-BFYhCrLn.js} +1 -1
- package/core/built/admin/assets/{message-square-text-Dd1XS5-H.js → message-square-text-BDZtUW-2.js} +1 -1
- package/core/built/admin/assets/{minus-CyEc3BE5.js → minus-CSphShdJ.js} +1 -1
- package/core/built/admin/assets/modals-CDWP04Iy.js +77 -0
- package/core/built/admin/assets/{moderation-B0fdmlig.js → moderation-qcng2_lB.js} +1 -1
- package/core/built/admin/assets/{newsletter-Byg3ARa5.js → newsletter-R-IYcV4M.js} +1 -1
- package/core/built/admin/assets/{newsletters-DbH39vgA.js → newsletters-BB4e24i1.js} +1 -1
- package/core/built/admin/assets/{note-Cwy-rIAF.js → note-B_bpRX66.js} +1 -1
- package/core/built/admin/assets/overview-Nh-IoP-v.js +1 -0
- package/core/built/admin/assets/{pagemenu-CkzsZrHC.js → pagemenu-Cd45frnF.js} +1 -1
- package/core/built/admin/assets/{post-analytics-context-BLkup0Xh.js → post-analytics-context-BST4bzps.js} +1 -1
- package/core/built/admin/assets/post-analytics-header-DAZPp6M8.js +1 -0
- package/core/built/admin/assets/{post-analytics-aA-nG9Fq.js → post-analytics-jHZOhQ8L.js} +1 -1
- package/core/built/admin/assets/{post-share-modal-CkvJtrRw.js → post-share-modal-D1JQfuYx.js} +1 -1
- package/core/built/admin/assets/posts/{comments-Bn_vn_sb.mjs → comments-C0ntS6jH.mjs} +678 -692
- package/core/built/admin/assets/posts/{dialog-CKPcMrj7.mjs → dialog-CXEmd-rC.mjs} +3 -3
- package/core/built/admin/assets/posts/{empty-indicator-kkrhP6K_.mjs → empty-indicator-CY1NEQZt.mjs} +2 -2
- package/core/built/admin/assets/posts/{filters-DHsxxy0F.mjs → filters-CWWDQAf0.mjs} +6 -6
- package/core/built/admin/assets/posts/{growth-D7ACh-oR.mjs → growth-DUnL-W24.mjs} +20 -19
- package/core/built/admin/assets/posts/{heading-BrKVbOxA.mjs → heading-DZWin3nG.mjs} +2 -2
- package/core/built/admin/assets/posts/{hooks-BBEMuLiW.mjs → hooks-DQYjPsLg.mjs} +2 -2
- package/core/built/admin/assets/posts/{index-C0rRguZx.mjs → index-BiGQFQkQ.mjs} +9 -9
- package/core/built/admin/assets/posts/{kpis-1o524OIK.mjs → kpis-DNnkyd0U.mjs} +10 -10
- package/core/built/admin/assets/posts/{links-JpeATx1f.mjs → links-D3nSZFlJ.mjs} +4 -4
- package/core/built/admin/assets/posts/{loading-indicator-BHAmSf8j.mjs → loading-indicator-CZQmPRvv.mjs} +3 -3
- package/core/built/admin/assets/posts/{main-layout-BTItAOQE.mjs → main-layout-D5WnaGr4.mjs} +2 -2
- package/core/built/admin/assets/posts/{newsletter-CQdsCEHv.mjs → newsletter-C5eikVBq.mjs} +13 -13
- package/core/built/admin/assets/posts/{overview-sYh4JN1D.mjs → overview-C5mCMPJY.mjs} +113 -112
- package/core/built/admin/assets/posts/{post-analytics-DtLt2SWx.mjs → post-analytics-Cc2NCQis.mjs} +6 -6
- package/core/built/admin/assets/posts/{post-analytics-context-CB1yM9fk.mjs → post-analytics-context-qXWjDzSt.mjs} +44 -41
- package/core/built/admin/assets/posts/{post-analytics-header-BYaWuL9W.mjs → post-analytics-header-QGsYyvhA.mjs} +11 -11
- package/core/built/admin/assets/posts/{post-share-modal-V0HTOBaf.mjs → post-share-modal-B9Q7FJsH.mjs} +4 -4
- package/core/built/admin/assets/posts/posts-C2SKGLoU.mjs +17 -0
- package/core/built/admin/assets/posts/posts.js +1 -1
- package/core/built/admin/assets/posts/{search-CLjC37AT.mjs → search-C8k0TFkh.mjs} +2 -2
- package/core/built/admin/assets/posts/{separator-KNoTIaJx.mjs → separator-CJnnsW1a.mjs} +5 -5
- package/core/built/admin/assets/posts/{sheet-DBg_SCDt.mjs → sheet-HDzKgNHc.mjs} +3 -3
- package/core/built/admin/assets/posts/{skeleton-DvsoolWu.mjs → skeleton-BlZGKNzB.mjs} +3 -3
- package/core/built/admin/assets/posts/{source-icon-OmRaTU2G.mjs → source-icon-DjBIjtaY.mjs} +3 -3
- package/core/built/admin/assets/posts/{stats-BC2DzntY.mjs → stats-BRVHejqx.mjs} +4 -4
- package/core/built/admin/assets/posts/{table-CxX9OKAj.mjs → table-D7AEpPWL.mjs} +2 -2
- package/core/built/admin/assets/posts/{tabs-B1jw7cBi.mjs → tabs-RcpmzDgr.mjs} +10 -10
- package/core/built/admin/assets/posts/{tags-BitrLT_j.mjs → tags-8k1xw8R8.mjs} +2 -2
- package/core/built/admin/assets/posts/{tags-BBilTo1a.mjs → tags-DNY2rBlf.mjs} +11 -11
- package/core/built/admin/assets/posts/{use-infinite-virtual-scroll-DaijA1ao.mjs → use-infinite-virtual-scroll-CMiIpcDA.mjs} +3 -3
- package/core/built/admin/assets/posts/{web-CKmyC4Xj.mjs → web-BCl5J6bB.mjs} +15 -15
- package/core/built/admin/assets/{posts-DDkuYoN7.js → posts-DFiJPOft.js} +1 -1
- package/core/built/admin/assets/{repeat-B-SL0yPM.js → repeat-Smml9n0k.js} +1 -1
- package/core/built/admin/assets/{reply-BdCPoUQ9.js → reply-CooY4lmk.js} +1 -1
- package/core/built/admin/assets/{select-C7aNW8QS.js → select-WwMsbBbg.js} +1 -1
- package/core/built/admin/assets/{settings-D-dhma2e.js → settings-CQEhPDQU.js} +4 -4
- package/core/built/admin/assets/{settings-Bzy1GNfD.js → settings-CxWtvcUf.js} +1 -1
- package/core/built/admin/assets/{sort-button-Dv8vjh13.js → sort-button-DFr8vezl.js} +1 -1
- package/core/built/admin/assets/{source-icon-DTz4isLK.js → source-icon-VpYWpwYb.js} +1 -1
- package/core/built/admin/assets/{sprout-BwLQTzMf.js → sprout-DRqlFJSK.js} +1 -1
- package/core/built/admin/assets/{square-YF1YE9ex.js → square-CwHQ9sJ2.js} +1 -1
- package/core/built/admin/assets/stats/audience-Caf7BjaU.mjs +269 -0
- package/core/built/admin/assets/stats/{url-helpers-Drq3xg0l.mjs → content-helpers-MbtAvUJh.mjs} +83 -106
- package/core/built/admin/assets/stats/{index-CcCyLMxL.mjs → index-BGqKbF1D.mjs} +8 -8
- package/core/built/admin/assets/stats/{index-DXU2rE9t.mjs → index-BTjfXOi6.mjs} +30 -30
- package/core/built/admin/assets/stats/{index-K7ASx7EG.mjs → index-ChjIxhHy.mjs} +5 -5
- package/core/built/admin/assets/stats/{index-D5mlMG4l.mjs → index-DMkZbbZs.mjs} +14 -14
- package/core/built/admin/assets/stats/{index-CUuQaROI.mjs → index-wT0OIw_N.mjs} +355 -335
- package/core/built/admin/assets/stats/{sort-button-CELUx6Zp.mjs → sort-button-B8n8fYMi.mjs} +23 -23
- package/core/built/admin/assets/stats/{stats-d_u_in4l.mjs → stats-CGH-0JNs.mjs} +120 -119
- package/core/built/admin/assets/stats/stats.js +1 -1
- package/core/built/admin/assets/stats/{tabs-3wLZsy0v.mjs → tabs-EQCUj3Y9.mjs} +19 -19
- package/core/built/admin/assets/stats/{use-growth-stats-28Sr42va.mjs → use-growth-stats--CIfag21.mjs} +3 -3
- package/core/built/admin/assets/{stats-C5ad0fgQ.js → stats-lnFiOQZx.js} +1 -1
- package/core/built/admin/assets/{stats-view-BvkxPYNX.js → stats-view-BJVawuIv.js} +1 -1
- package/core/built/admin/assets/{step-1-D7_s-D99.js → step-1-Bx8MiQVF.js} +1 -1
- package/core/built/admin/assets/{step-2-B94Yf7FF.js → step-2-CLLXppER.js} +1 -1
- package/core/built/admin/assets/{step-3-DswXYYf4.js → step-3-C5WrQe8u.js} +2 -2
- package/core/built/admin/assets/{table-D30IXfUP.js → table-2waWpIF5.js} +1 -1
- package/core/built/admin/assets/{tabs-CjNdfW0y.js → tabs-CBD0hW8V.js} +1 -1
- package/core/built/admin/assets/{tags-B0ux9_dT.js → tags-Bgw5Hrb5.js} +1 -1
- package/core/built/admin/assets/{tags-PGeGAafJ.js → tags-CKrBptuC.js} +1 -1
- package/core/built/admin/assets/{tiers-BaXK0JoI.js → tiers-CO-pz1FX.js} +1 -1
- package/core/built/admin/assets/{toggle-group-DdY8HF3Y.js → toggle-group-BXAZzvJ9.js} +1 -1
- package/core/built/admin/assets/{topic-filter-Boh22uGD.js → topic-filter-U3qUH2P_.js} +1 -1
- package/core/built/admin/assets/{trash-D7ZWrnDq.js → trash-CJY1Wro_.js} +1 -1
- package/core/built/admin/assets/{use-growth-stats-Bg0nE0WG.js → use-growth-stats-BrLZI7da.js} +1 -1
- package/core/built/admin/assets/{use-infinite-virtual-scroll-DoeI5IY-.js → use-infinite-virtual-scroll-CiRn3kpz.js} +2 -2
- package/core/built/admin/assets/{use-simple-pagination-BJzBULR3.js → use-simple-pagination-CskJ0MDP.js} +1 -1
- package/core/built/admin/assets/{user-round-check-BLc3L-ei.js → user-round-check-zOuzV3OS.js} +1 -1
- package/core/built/admin/assets/{wallet-cards-xX4QZik7.js → wallet-cards-ddLuIN-b.js} +1 -1
- package/core/built/admin/assets/{web-DQ2qBymm.js → web-CGbkZWn3.js} +1 -1
- package/core/built/admin/index.html +6 -5
- package/core/frontend/services/theme-engine/i18n/i18n.js +9 -14
- package/core/server/api/endpoints/settings-public.js +3 -1
- package/core/server/api/endpoints/utils/serializers/input/settings.js +6 -1
- package/core/server/data/migrations/versions/6.19/2026-02-10-12-00-00-add-transistor-portal-settings.js +39 -0
- package/core/server/data/schema/default-settings/default-settings.json +28 -0
- package/core/server/data/schema/schema.js +2 -2
- package/core/server/data/seeders/importers/offers-importer.js +2 -2
- package/core/server/data/tinybird/endpoints/api_top_pages_router.pipe +28 -0
- package/core/server/data/tinybird/endpoints/api_top_pages_v3.pipe +8 -4
- package/core/server/data/tinybird/tests/api_top_pages_router.yaml +74 -0
- package/core/server/services/comments/comments-service-emails.js +1 -4
- package/core/server/services/email-service/email-templates/partials/styles.hbs +43 -0
- package/core/server/services/koenig/node-renderers/transistor-renderer.js +23 -17
- package/core/server/services/members/members-api/repositories/member-repository.js +30 -6
- package/core/server/services/members/members-api/services/next-payment-calculator.js +28 -20
- package/core/server/services/members/members-api/services/payments-service.js +1 -1
- package/core/server/services/members/members-api/utils/add-calendar-months.js +49 -0
- package/core/server/services/offers/application/offer-mapper.js +2 -2
- package/core/server/services/offers/domain/models/offer-amount.js +16 -0
- package/core/server/services/offers/domain/models/offer-duration.js +3 -4
- package/core/server/services/offers/domain/models/offer-type.js +5 -3
- package/core/server/services/offers/domain/models/offer.js +8 -1
- package/core/server/services/staff/staff-service-emails.js +2 -0
- package/core/server/services/stripe/stripe-api.js +19 -0
- package/core/shared/config/defaults.json +1 -1
- package/core/shared/labs.js +0 -1
- package/core/shared/settings-cache/cache-manager.js +8 -0
- package/core/shared/settings-cache/public.js +5 -0
- package/package.json +5 -5
- package/yarn.lock +4 -4
- package/components/tryghost-i18n-6.18.2.tgz +0 -0
- package/components/tryghost-parse-email-address-6.18.2.tgz +0 -0
- package/core/built/admin/assets/audience-CJHVR7kD.js +0 -1
- package/core/built/admin/assets/comments-CPd_iCc3.js +0 -1
- package/core/built/admin/assets/index-B2yksBz4.js +0 -13
- package/core/built/admin/assets/index-Cl_EPbQ2.js +0 -1
- package/core/built/admin/assets/index-D_sGUCda.css +0 -1
- package/core/built/admin/assets/modals-C06GcVIm.js +0 -77
- package/core/built/admin/assets/overview-CVMLGrVt.js +0 -1
- package/core/built/admin/assets/post-analytics-header-D9srAPT5.js +0 -1
- package/core/built/admin/assets/posts/posts-DeQT3knv.mjs +0 -21
- package/core/built/admin/assets/stats/audience-BWqU7WWT.mjs +0 -245
- package/core/built/admin/assets/url-helpers-mt6MBIi0.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as Q,aP as D,r as h,j as e,B as I,aQ as M,ai as y,aR as _,aS as Y,ab as te,aj as f,aT as H,aU as re,aV as ie,af as le,ag as F,aW as oe,S as U}from"./index-B8G0f0hb.js";import{K as w,a as k,b as C,c as L}from"./kpi-card-BEFHo2gr.js";import{C as A,a as P,b as V,c as N,K as S,d as T,e as R,u as q}from"./pagemenu-CkzsZrHC.js";import{D as ne,a as ce,b as de,c as me,d as pe,e as he,f as xe,g as ue}from"./data-list-Dn5MkmyD.js";import{u as ge,p as je,N as fe,c as ve}from"./links-tdJvBrsT.js";import{M as be}from"./wallet-cards-xX4QZik7.js";import{P as Ne,a as ye}from"./post-analytics-header-D9srAPT5.js";import{S as we,K as ke}from"./kpis-D-gz-lUk.js";import{E as Ce}from"./empty-indicator-C2Z0dddU.js";import{G as Le}from"./gh-chart-B2aWYkGg.js";import{u as J,S as _e}from"./post-analytics-context-BLkup0Xh.js";import{u as Se,c as Te}from"./growth-BysawIWe.js";import{h as Re,i as De}from"./post-helpers-gInwAwEv.js";import{S as Ie}from"./sprout-BwLQTzMf.js";import"./chart-BAQCVPCH.js";import"./_baseAssignValue-D_UsvJRN.js";import"./PolarAngleAxis-DALH8FDm.js";import"./post-share-modal-CkvJtrRw.js";import"./posts-DDkuYoN7.js";import"./trash-D7ZWrnDq.js";import"./source-icon-DTz4isLK.js";import"./source-utils-B1S3ZHA2.js";import"./lucide-react-ClQ3Iy7l.js";import"./a-large-small-DVyx4GMu.js";import"./at-sign-CGNkBrZS.js";import"./message-square-text-Dd1XS5-H.js";import"./copy-CNsHZEFR.js";import"./hash-j3sh-UI3.js";import"./inbox-1cUdr8Mm.js";import"./list-filter-DPE4Xj2T.js";import"./minus-CyEc3BE5.js";import"./tags-PGeGAafJ.js";import"./square-YF1YE9ex.js";import"./user-round-check-BLc3L-ei.js";import"./repeat-B-SL0yPM.js";import"./reply-BdCPoUQ9.js";import"./tabs-CjNdfW0y.js";import"./index-DKAlEWM4.js";import"./table-D30IXfUP.js";import"./currency-fEUUCkj0.js";import"./stats-C5ad0fgQ.js";const Me=({post:o,isNewsletterStatsLoading:n,isWebShown:x})=>{const{postId:s}=Q(),a=D(),t=h.useMemo(()=>{const l=o.email?.opened_count||0,r=o.email?.email_count||0,p=o.count?.clicks||0;return{opened:l,clicked:p,openedRate:r>0?l/r:0,clickedRate:r>0?p/r:0,sent:r}},[o]),{data:m}=ge({searchParams:{filter:`post_id:'${s}'`}}),u=h.useMemo(()=>je(m),[m]),g=[{datatype:"Clicked",value:t.clickedRate,fill:"url(#gradientTeal)",color:"hsl(var(--chart-teal))"},{datatype:"Opened",value:t.openedRate,fill:"url(#gradientBlue)",color:"hsl(var(--chart-blue))"}],c={percentage:{label:"Opened"},Average:{label:"Clicked"},"This newsletter":{label:"Opened"}},i=o.email_only||!x;return e.jsxs(A,{className:`group/datalist overflow-hidden ${i&&"col-span-2"}`,children:[e.jsxs("div",{className:"relative flex items-center justify-between gap-6",children:[e.jsx(P,{children:e.jsxs(V,{className:"flex items-center gap-1.5 text-lg",children:[e.jsx(be,{size:16,strokeWidth:1.5}),"Newsletter performance"]})}),e.jsx(I,{className:"absolute right-6 translate-x-10 opacity-0 transition-all duration-300 group-hover/datalist:translate-x-0 group-hover/datalist:opacity-100",size:"sm",variant:"outline",onClick:()=>{a(`/posts/analytics/${s}/newsletter`)},children:"View more"})]}),n?e.jsx(N,{children:e.jsx("div",{className:"mx-auto flex min-h-[250px] items-center justify-center xl:size-full",children:e.jsx(M,{})})}):e.jsxs(N,{className:`${i&&"grid grid-cols-2"}`,children:[e.jsxs("div",{className:`${i&&"border-r pr-6"}`,children:[e.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[e.jsx(S,{className:"group relative flex grow flex-row items-start justify-between gap-5 border-none px-0 pt-0",children:e.jsxs("div",{className:"flex grow flex-col gap-1.5 border-none pb-0",children:[e.jsx(T,{color:"hsl(var(--chart-blue))",children:"Open rate"}),e.jsx(R,{value:y(t.openedRate)})]})}),e.jsx(S,{className:"group relative flex grow flex-row items-start justify-between gap-5 border-none px-0 pt-0",children:e.jsxs("div",{className:"flex grow flex-col gap-1.5 border-none pb-0",children:[e.jsx(T,{color:"hsl(var(--chart-teal))",children:"Click rate"}),e.jsx(R,{value:y(t.clickedRate)})]})})]}),!i&&e.jsx(_,{}),e.jsx("div",{className:"mx-auto my-6 h-[240px]",children:e.jsx(fe,{className:"pointer-events-none aspect-square h-[240px]",config:c,data:g,tooltip:!1})})]}),e.jsxs("div",{className:`${i&&"pl-6"}`,children:[!i&&e.jsx(_,{}),e.jsxs("div",{className:i?"":"pt-3",children:[e.jsxs("div",{className:`flex items-center justify-between gap-3 ${i?"pb-3":"py-3"}`,children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"Top clicked links in this email"}),e.jsx(Y,{children:"Members"})]}),u.length>0?e.jsx(ne,{className:"",children:e.jsx(ce,{children:u.slice(0,i?10:5).map(l=>{const r=t.clicked>0?l.count/t.clicked:0;return e.jsxs(de,{children:[e.jsx(me,{style:{width:`${r?Math.round(r*100):0}%`}}),e.jsx(pe,{children:e.jsxs("div",{className:"flex items-center space-x-2 overflow-hidden",children:[e.jsx(te,{className:"shrink-0 text-muted-foreground",size:16,strokeWidth:1.5}),e.jsx("a",{className:"block truncate font-medium hover:underline",href:l.link.to,rel:"noreferrer",target:"_blank",title:l.link.to,children:ve(l.link.to,!0)})]})}),e.jsxs(he,{children:[e.jsx(xe,{children:f(l.count||0)}),e.jsx(ue,{children:y(r)})]})]},l.link.link_id)})})}):e.jsx("div",{className:"py-20 text-center text-sm text-gray-700",children:"You have no links in your post."})]})]})]})]})},Ae=({chartData:o,range:n,isLoading:x,visitors:s,sourcesData:a,isNewsletterShown:t=!0})=>{const{postId:m}=Q(),u=D(),{data:g}=J(),c=g?.url,i=g?.icon,l=h.useMemo(()=>a?a.reduce((r,p)=>r+Number(p.visits||0),0):0,[a]);return e.jsx(e.Fragment,{children:e.jsxs(A,{className:`group/datalist overflow-hidden ${!t&&"col-span-2"}`,"data-testid":"web-performance",children:[e.jsxs("div",{className:"relative flex items-center justify-between gap-6",children:[e.jsx(P,{children:e.jsxs(V,{className:"flex items-center gap-1.5 text-lg",children:[e.jsx(H,{size:16,strokeWidth:1.5}),"Web performance"]})}),e.jsx(I,{className:"absolute right-6 translate-x-10 opacity-0 transition-all duration-300 group-hover/datalist:translate-x-0 group-hover/datalist:opacity-100",size:"sm",variant:"outline",onClick:()=>{u(`/posts/analytics/${m}/web`)},children:"View more"})]}),e.jsxs(N,{children:[e.jsxs("div",{children:[e.jsx(S,{className:"group relative flex grow flex-row items-start justify-between gap-5 border-none px-0 pt-0","data-testid":"unique-visitors",children:e.jsxs("div",{className:"flex grow flex-col gap-1.5 border-none pb-0",children:[e.jsx(T,{color:"hsl(var(--chart-blue))",children:"Unique visitors"}),e.jsx(R,{value:f(s)})]})}),e.jsx(_,{}),e.jsx("div",{className:"max-h-[288px] py-6 [&_.recharts-cartesian-axis-tick-value]:fill-gray-500",children:x?e.jsx("div",{className:"flex h-[16vw] min-h-[240px] items-center justify-center",children:e.jsx(M,{})}):e.jsx(Le,{className:"aspect-auto h-[240px] w-full",color:"hsl(var(--chart-blue))",data:o||[],id:"visitors",range:n,syncId:"overview-charts"})})]}),t&&e.jsxs("div",{className:t?"border-t pt-3":"-mt-3",children:[e.jsx("div",{children:e.jsxs("div",{className:"flex items-center justify-between gap-3 py-3",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"How readers found this post"}),e.jsx(Y,{children:"Visitors"})]})}),a&&a.length>0?e.jsx(we,{data:a,range:n,siteIcon:i,siteUrl:c,tableOnly:!0,topSourcesLimit:5,totalVisitors:l}):e.jsx(Ce,{className:"h-full py-10",description:"Once someone visits this post, sources will show here",title:"No visitors since you published this post",children:e.jsx(H,{strokeWidth:1.5})})]})]})]})})},ys=()=>{const o=D(),{statsConfig:n,isLoading:x,post:s,isPostLoading:a,postId:t}=J(),{totals:m,isLoading:u,currencySymbol:g}=Se(t),{appSettings:c}=re(),{emailTrackClicks:i,emailTrackOpens:l}=c?.analytics||{},r=h.useMemo(()=>s?.published_at?ie(s.published_at):_e.ALL_TIME.value,[s?.published_at]),{startDate:p,endDate:E,timezone:K}=le(r),O=h.useMemo(()=>{const d={site_uuid:n?.id||"",date_from:F(p),date_to:F(E),timezone:K,post_uuid:""};return!a&&s?.uuid?{...d,post_uuid:s.uuid}:d},[a,s,n?.id,p,E,K]),{data:v,loading:z}=q({endpoint:"api_kpis",statsConfig:n||{id:""},params:O}),X=h.useMemo(()=>v?.length?v.reduce((d,j)=>{const G=Number(j.visits);return d+(isNaN(G)?0:G)},0):0,[v]),b=ke.visits,Z=oe(v||[],r,b.dataKey,"sum")?.map(d=>{const j=Number(d[b.dataKey]);return{date:String(d.date),value:j,formattedValue:b.formatter(j),label:b.label}}),{data:ee,loading:se}=q({endpoint:"api_top_sources",statsConfig:n||{id:""},params:O}),$=x||u||a||z,ae=a||x||z,W=Re(s)&&l&&i,B=!s?.email_only&&c?.analytics.webAnalytics;return h.useEffect(()=>{!a&&s&&De(s)&&!c?.analytics.webAnalytics&&o(`/posts/analytics/${t}/growth`)},[a,s,c?.analytics.webAnalytics,o,t]),a?e.jsx(M,{}):e.jsxs(e.Fragment,{children:[e.jsx(Ne,{currentTab:"Overview"}),e.jsx(ye,{children:e.jsxs("div",{className:"flex flex-col gap-6 lg:grid lg:grid-cols-2",children:[B&&e.jsx(Ae,{chartData:Z,isLoading:ae||$||se,isNewsletterShown:W,range:r,sourcesData:ee,visitors:X}),W&&e.jsx(Me,{isNewsletterStatsLoading:a,isWebShown:B,post:s}),e.jsxs(A,{className:"group col-span-2 overflow-hidden p-0","data-testid":"growth",children:[e.jsxs("div",{className:"relative flex items-center justify-between gap-6",children:[e.jsx(P,{children:e.jsxs(V,{className:"flex items-center gap-1.5 text-lg",children:[e.jsx(Ie,{size:16,strokeWidth:1.5}),"Growth"]})}),e.jsx(I,{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:()=>{o(`/posts/analytics/${t}/growth`)},children:"View more"})]}),e.jsx(N,{className:"flex flex-col gap-6 px-0 md:grid md:grid-cols-3 md:items-stretch md:gap-0",children:$?Array.from({length:3},(d,j)=>e.jsxs("div",{className:"h-[98px] gap-1 border-r px-6 py-5 last:border-r-0",children:[e.jsx(U,{className:"w-2/3"}),e.jsx(U,{className:"h-7 w-12"})]},j)):e.jsxs(e.Fragment,{children:[e.jsxs(w,{className:"grow gap-1 py-0",children:[e.jsx(k,{children:"Free members"}),e.jsx(C,{children:e.jsx(L,{className:"text-[2.2rem]",children:f(m?.free_members||0)})})]}),c?.paidMembersEnabled&&e.jsxs(e.Fragment,{children:[e.jsxs(w,{className:"grow gap-1 py-0",children:[e.jsx(k,{children:"Paid members"}),e.jsx(C,{children:e.jsx(L,{className:"text-[2.2rem]",children:f(m?.paid_members||0)})})]}),e.jsxs(w,{className:"grow gap-1 py-0",children:[e.jsx(k,{children:"MRR impact"}),e.jsx(C,{children:e.jsxs(L,{className:"text-[2.2rem]",children:[g,f(Te(m?.mrr||0))]})})]})]})]})})]})]})})]})};export{ys as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,j as e,y as d,bL as I,C as W,aP as z,aU as U,bM as H,aj as V,B as D,bH as F,ap as J,bN as Q,bI as Y,bO as k,bJ as g,x as q,bP as K,bQ as X,bR as j,bS as w,aT as Z,a0 as ee,a1 as se,a2 as ae,a3 as te,a4 as re,a5 as ie,a6 as le,a7 as ne}from"./index-B8G0f0hb.js";import{h as oe,N as ce,P as de,i as u}from"./pagemenu-CkzsZrHC.js";import{P as me}from"./post-share-modal-CkvJtrRw.js";import{u as ue}from"./post-analytics-context-BLkup0Xh.js";import{i as C,h as pe,a as xe,b as he}from"./post-helpers-gInwAwEv.js";import{a as fe}from"./posts-DDkuYoN7.js";import{S as be,P as ge,G as je,M as we}from"./wallet-cards-xX4QZik7.js";import{T as ye}from"./trash-D7ZWrnDq.js";import{S as ve}from"./sprout-BwLQTzMf.js";const P=i.forwardRef(({...r},t)=>e.jsx("nav",{ref:t,"aria-label":"breadcrumb",...r}));P.displayName="Breadcrumb";const S=i.forwardRef(({className:r,...t},a)=>e.jsx("ol",{ref:a,className:d("flex flex-wrap items-center gap-1.5 break-words text-sm font-medium text-muted-foreground sm:gap-2.5 h-[34px]",r),...t}));S.displayName="BreadcrumbList";const p=i.forwardRef(({className:r,...t},a)=>e.jsx("li",{ref:a,className:d("inline-flex items-center gap-1.5",r),...t}));p.displayName="BreadcrumbItem";const y=i.forwardRef(({asChild:r,className:t,...a},x)=>{const l=r?I:"a";return e.jsx(l,{ref:x,className:d("inline-flex items-center gap-1 transition-colors hover:text-foreground",t),...a})});y.displayName="BreadcrumbLink";const B=i.forwardRef(({className:r,...t},a)=>e.jsx("span",{ref:a,"aria-current":"page","aria-disabled":"true",className:d("font-medium text-foreground",r),role:"link",...t}));B.displayName="BreadcrumbPage";const T=({children:r,className:t,...a})=>e.jsx("li",{"aria-hidden":"true",className:d("[&>svg]:w-3.5 [&>svg]:h-3.5",t),role:"presentation",...a,children:r??e.jsx(W,{})});T.displayName="BreadcrumbSeparator";const Me=({children:r,className:t,...a})=>e.jsx("section",{className:d("flex gap-6 flex-col py-8 size-full grow",t),...a,children:r}),Ne=r=>{for(const t of r)if(t.key==="timezone"){const a=t.value;if(typeof a!="string")throw new TypeError("Site timezone setting is not a string");return a}return"Etc/UTC"},Oe=({currentTab:r,children:t})=>{const a=z(),{fromAnalytics:x,appSettings:l}=U(),{mutateAsync:_}=fe(),E=H(),[M,h]=i.useState(!1),[O,f]=i.useState(!1),{settings:$,site:v,statsConfig:L,post:s,isPostLoading:b,postId:o}=ue(),c=Ne($),{activeVisitors:N,isLoading:A}=oe({postUuid:s?.uuid,statsConfig:L,enabled:l?.analytics?.webAnalytics??!1}),m=i.useMemo(()=>{if(!s)return[];const n=[];return C(s)&&!l?.analytics.webAnalytics||(n.push("Overview"),!s.email_only&&l?.analytics.webAnalytics&&n.push("Web")),pe(s)&&n.push("Newsletter"),n.push("Growth"),n},[s,l?.analytics.webAnalytics]),R=()=>{s&&h(!0)},G=async()=>{if(s)try{await _(o),h(!1),a("/posts/",{crossApp:!0})}catch(n){E(n)}};return e.jsxs(e.Fragment,{children:[e.jsx("header",{className:"z-50 -mx-8 bg-white/70 backdrop-blur-md dark:bg-black",children:e.jsx("div",{className:"relative flex min-h-[102px] w-full items-start justify-between gap-5 px-8 pb-0 pt-8","data-header":"header",children:e.jsxs("div",{className:"flex w-full flex-col gap-5",children:[e.jsxs("div",{className:"flex w-full flex-col justify-between md:flex-row md:items-center",children:[e.jsx(P,{children:e.jsxs(S,{children:[x?e.jsx(p,{children:e.jsx(y,{className:"cursor-pointer leading-[24px]",onClick:()=>a("/analytics/",{crossApp:!0}),children:"Analytics"})}):e.jsx(p,{children:e.jsx(y,{className:"cursor-pointer leading-[24px]",onClick:()=>a("/posts/",{crossApp:!0}),children:"Posts"})}),e.jsx(T,{}),e.jsx(p,{children:e.jsx(B,{className:"leading-[24px]",children:"Post analytics"})})]})}),e.jsxs("div",{className:"flex w-full items-center gap-2 md:w-auto",children:[l?.analytics.webAnalytics&&!s?.email_only&&e.jsx("div",{className:"mr-3 flex grow items-center gap-2 text-sm md:grow-0",children:e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",title:"Active readers in the last 5 minutes · Updates every 60 seconds",children:[e.jsxs("span",{className:"text-sm",children:[A?"":V(N)," reading now"]}),e.jsx("div",{className:`size-2 rounded-full ${A?"animate-pulse bg-muted":N?"bg-green-500":"border border-muted-foreground"}`})]})}),!b&&e.jsxs(e.Fragment,{children:[!s?.email_only&&e.jsx(me,{author:s?.authors?.[0]?.name||"",description:"",faviconURL:v?.icon||"",featureImageURL:s?.feature_image,open:O,postExcerpt:s?.excerpt||"",postTitle:s?.title,postURL:s?.url,siteTitle:v?.title||"",onClose:()=>f(!1),onOpenChange:f,children:e.jsxs(D,{variant:"outline",onClick:()=>f(!0),children:[e.jsx(be,{})," Share"]})}),e.jsxs(F,{children:[e.jsx(J,{asChild:!0,children:e.jsx(D,{variant:"outline",children:e.jsx(Q,{})})}),e.jsxs(Y,{align:"end",children:[e.jsxs(k,{children:[e.jsx(g,{asChild:!0,children:e.jsxs("a",{href:s?.url,rel:"noopener noreferrer",target:"_blank",children:[e.jsx(q,{}),"View in browser"]})}),e.jsxs(g,{onClick:()=>{a(`/editor/post/${o}`,{crossApp:!0})},children:[e.jsx(ge,{}),"Edit post"]})]}),e.jsx(K,{}),e.jsx(k,{children:e.jsxs(g,{className:"text-destructive focus:text-destructive",onClick:R,children:[e.jsx(ye,{}),"Delete post"]})})]})]})]})]})]}),!b&&e.jsxs("div",{className:"flex items-start gap-6 md:items-center",children:[s?.feature_image&&e.jsx("div",{className:"aspect-[16/10] w-full max-w-[100px] rounded-md bg-cover bg-center md:max-w-[132px]",style:{backgroundImage:`url(${s.feature_image})`}}),e.jsxs("div",{children:[e.jsx(X,{className:"-ml-px max-w-[920px] indent-0 text-xl md:min-h-[35px] md:text-3xl md:leading-[1.2em]","data-header":"header-title",children:s?.title}),s?.published_at&&e.jsxs("div",{className:"mt-0.5 flex items-center justify-start text-sm leading-[1.65em] text-muted-foreground",children:[xe(s)&&`Sent on ${j(s.published_at,c)} at ${w(s.published_at,c)}`,C(s)&&`Published on your site on ${j(s.published_at,c)} at ${w(s.published_at,c)}`,he(s)&&`Published and sent on ${j(s.published_at,c)} at ${w(s.published_at,c)}`]})]})]})]})})}),e.jsxs(ce,{className:"sticky top-0 z-50 -mb-8 transform-gpu flex-col items-start gap-y-0 border-none bg-white/70 py-8 backdrop-blur-md lg:flex-row lg:items-center dark:bg-black",children:[!b&&e.jsxs(de,{className:"min-h-[34px]",defaultValue:r,responsive:!0,children:[m.includes("Overview")&&e.jsxs(u,{value:"Overview",onClick:()=>{a(`/posts/analytics/${o}`)},children:[e.jsx(je,{}),"Overview"]}),m.includes("Web")&&e.jsxs(u,{value:"Web",onClick:()=>{a(`/posts/analytics/${o}/web`)},children:[e.jsx(Z,{}),"Web traffic"]}),m.includes("Newsletter")&&e.jsxs(u,{value:"Newsletter",onClick:()=>{a(`/posts/analytics/${o}/newsletter`)},children:[e.jsx(we,{}),"Newsletter"]}),m.includes("Growth")&&e.jsxs(u,{value:"Growth",onClick:()=>{a(`/posts/analytics/${o}/growth`)},children:[e.jsx(ve,{}),"Growth"]})]}),t]}),e.jsx(ee,{open:M,onOpenChange:h,children:e.jsxs(se,{children:[e.jsxs(ae,{children:[e.jsx(te,{children:"Are you sure you want to delete this post?"}),e.jsxs(re,{children:[`You're about to delete "`,e.jsx("strong",{children:s?.title}),'". This is permanent! We warned you, k?']})]}),e.jsxs(ie,{children:[e.jsx(le,{children:"Cancel"}),e.jsx(ne,{className:"hover:bg-red-700 bg-red-600 text-white",onClick:G,children:"Delete"})]})]})})]})};export{Oe as P,Me as a};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { a as t, b as o, c as a } from "./hooks-BBEMuLiW.mjs";
|
|
2
|
-
const p = "ConfigResponseType", c = t({
|
|
3
|
-
dataType: p,
|
|
4
|
-
path: "/config/"
|
|
5
|
-
}), e = "PostsResponseType", r = t({
|
|
6
|
-
dataType: e,
|
|
7
|
-
path: "/posts/"
|
|
8
|
-
}), u = a({
|
|
9
|
-
dataType: e,
|
|
10
|
-
path: (s) => `/posts/${s}/`
|
|
11
|
-
}), y = o({
|
|
12
|
-
method: "DELETE",
|
|
13
|
-
path: (s) => `/posts/${s}/`
|
|
14
|
-
});
|
|
15
|
-
export {
|
|
16
|
-
y as a,
|
|
17
|
-
c as b,
|
|
18
|
-
u as g,
|
|
19
|
-
r as u
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=posts-DeQT3knv.mjs.map
|
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
import { f as u, q as p, j as s, t as Q, C as V, r as P, A as R, Z as C, _ as E } from "./index-K7ASx7EG.mjs";
|
|
2
|
-
import { P as Y, Q as K, Z as h, O as I, R as v, T as D, a0 as N, a1 as z, a7 as J, a8 as X, a9 as ee, aa as te, ab as oe, a2 as ne, br as re } from "./stats-d_u_in4l.mjs";
|
|
3
|
-
var x = "Dialog", [T] = K(x), [ae, l] = T(x), b = (e) => {
|
|
4
|
-
const {
|
|
5
|
-
__scopeDialog: t,
|
|
6
|
-
children: n,
|
|
7
|
-
open: a,
|
|
8
|
-
defaultOpen: r,
|
|
9
|
-
onOpenChange: o,
|
|
10
|
-
modal: i = !0
|
|
11
|
-
} = e, c = p(null), d = p(null), [f, _] = Y({
|
|
12
|
-
prop: a,
|
|
13
|
-
defaultProp: r ?? !1,
|
|
14
|
-
onChange: o,
|
|
15
|
-
caller: x
|
|
16
|
-
});
|
|
17
|
-
return /* @__PURE__ */ s.jsx(
|
|
18
|
-
ae,
|
|
19
|
-
{
|
|
20
|
-
scope: t,
|
|
21
|
-
triggerRef: c,
|
|
22
|
-
contentRef: d,
|
|
23
|
-
contentId: h(),
|
|
24
|
-
titleId: h(),
|
|
25
|
-
descriptionId: h(),
|
|
26
|
-
open: f,
|
|
27
|
-
onOpenChange: _,
|
|
28
|
-
onOpenToggle: Q(() => _((H) => !H), [_]),
|
|
29
|
-
modal: i,
|
|
30
|
-
children: n
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
b.displayName = x;
|
|
35
|
-
var j = "DialogTrigger", M = u(
|
|
36
|
-
(e, t) => {
|
|
37
|
-
const { __scopeDialog: n, ...a } = e, r = l(j, n), o = I(t, r.triggerRef);
|
|
38
|
-
return /* @__PURE__ */ s.jsx(
|
|
39
|
-
v.button,
|
|
40
|
-
{
|
|
41
|
-
type: "button",
|
|
42
|
-
"aria-haspopup": "dialog",
|
|
43
|
-
"aria-expanded": r.open,
|
|
44
|
-
"aria-controls": r.contentId,
|
|
45
|
-
"data-state": O(r.open),
|
|
46
|
-
...a,
|
|
47
|
-
ref: o,
|
|
48
|
-
onClick: D(e.onClick, r.onOpenToggle)
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
M.displayName = j;
|
|
54
|
-
var y = "DialogPortal", [se, F] = T(y, {
|
|
55
|
-
forceMount: void 0
|
|
56
|
-
}), S = (e) => {
|
|
57
|
-
const { __scopeDialog: t, forceMount: n, children: a, container: r } = e, o = l(y, t);
|
|
58
|
-
return /* @__PURE__ */ s.jsx(se, { scope: t, forceMount: n, children: V.map(a, (i) => /* @__PURE__ */ s.jsx(N, { present: n || o.open, children: /* @__PURE__ */ s.jsx(z, { asChild: !0, container: r, children: i }) })) });
|
|
59
|
-
};
|
|
60
|
-
S.displayName = y;
|
|
61
|
-
var m = "DialogOverlay", W = u(
|
|
62
|
-
(e, t) => {
|
|
63
|
-
const n = F(m, e.__scopeDialog), { forceMount: a = n.forceMount, ...r } = e, o = l(m, e.__scopeDialog);
|
|
64
|
-
return o.modal ? /* @__PURE__ */ s.jsx(N, { present: a || o.open, children: /* @__PURE__ */ s.jsx(ce, { ...r, ref: t }) }) : null;
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
W.displayName = m;
|
|
68
|
-
var ie = ee("DialogOverlay.RemoveScroll"), ce = u(
|
|
69
|
-
(e, t) => {
|
|
70
|
-
const { __scopeDialog: n, ...a } = e, r = l(m, n);
|
|
71
|
-
return (
|
|
72
|
-
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
73
|
-
// ie. when `Overlay` and `Content` are siblings
|
|
74
|
-
/* @__PURE__ */ s.jsx(X, { as: ie, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ s.jsx(
|
|
75
|
-
v.div,
|
|
76
|
-
{
|
|
77
|
-
"data-state": O(r.open),
|
|
78
|
-
...a,
|
|
79
|
-
ref: t,
|
|
80
|
-
style: { pointerEvents: "auto", ...a.style }
|
|
81
|
-
}
|
|
82
|
-
) })
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
), g = "DialogContent", L = u(
|
|
86
|
-
(e, t) => {
|
|
87
|
-
const n = F(g, e.__scopeDialog), { forceMount: a = n.forceMount, ...r } = e, o = l(g, e.__scopeDialog);
|
|
88
|
-
return /* @__PURE__ */ s.jsx(N, { present: a || o.open, children: o.modal ? /* @__PURE__ */ s.jsx(le, { ...r, ref: t }) : /* @__PURE__ */ s.jsx(ue, { ...r, ref: t }) });
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
L.displayName = g;
|
|
92
|
-
var le = u(
|
|
93
|
-
(e, t) => {
|
|
94
|
-
const n = l(g, e.__scopeDialog), a = p(null), r = I(t, n.contentRef, a);
|
|
95
|
-
return P(() => {
|
|
96
|
-
const o = a.current;
|
|
97
|
-
if (o) return J(o);
|
|
98
|
-
}, []), /* @__PURE__ */ s.jsx(
|
|
99
|
-
w,
|
|
100
|
-
{
|
|
101
|
-
...e,
|
|
102
|
-
ref: r,
|
|
103
|
-
trapFocus: n.open,
|
|
104
|
-
disableOutsidePointerEvents: !0,
|
|
105
|
-
onCloseAutoFocus: D(e.onCloseAutoFocus, (o) => {
|
|
106
|
-
var i;
|
|
107
|
-
o.preventDefault(), (i = n.triggerRef.current) == null || i.focus();
|
|
108
|
-
}),
|
|
109
|
-
onPointerDownOutside: D(e.onPointerDownOutside, (o) => {
|
|
110
|
-
const i = o.detail.originalEvent, c = i.button === 0 && i.ctrlKey === !0;
|
|
111
|
-
(i.button === 2 || c) && o.preventDefault();
|
|
112
|
-
}),
|
|
113
|
-
onFocusOutside: D(
|
|
114
|
-
e.onFocusOutside,
|
|
115
|
-
(o) => o.preventDefault()
|
|
116
|
-
)
|
|
117
|
-
}
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
), ue = u(
|
|
121
|
-
(e, t) => {
|
|
122
|
-
const n = l(g, e.__scopeDialog), a = p(!1), r = p(!1);
|
|
123
|
-
return /* @__PURE__ */ s.jsx(
|
|
124
|
-
w,
|
|
125
|
-
{
|
|
126
|
-
...e,
|
|
127
|
-
ref: t,
|
|
128
|
-
trapFocus: !1,
|
|
129
|
-
disableOutsidePointerEvents: !1,
|
|
130
|
-
onCloseAutoFocus: (o) => {
|
|
131
|
-
var i, c;
|
|
132
|
-
(i = e.onCloseAutoFocus) == null || i.call(e, o), o.defaultPrevented || (a.current || (c = n.triggerRef.current) == null || c.focus(), o.preventDefault()), a.current = !1, r.current = !1;
|
|
133
|
-
},
|
|
134
|
-
onInteractOutside: (o) => {
|
|
135
|
-
var d, f;
|
|
136
|
-
(d = e.onInteractOutside) == null || d.call(e, o), o.defaultPrevented || (a.current = !0, o.detail.originalEvent.type === "pointerdown" && (r.current = !0));
|
|
137
|
-
const i = o.target;
|
|
138
|
-
((f = n.triggerRef.current) == null ? void 0 : f.contains(i)) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && r.current && o.preventDefault();
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
), w = u(
|
|
144
|
-
(e, t) => {
|
|
145
|
-
const { __scopeDialog: n, trapFocus: a, onOpenAutoFocus: r, onCloseAutoFocus: o, ...i } = e, c = l(g, n), d = p(null), f = I(t, d);
|
|
146
|
-
return te(), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
147
|
-
/* @__PURE__ */ s.jsx(
|
|
148
|
-
oe,
|
|
149
|
-
{
|
|
150
|
-
asChild: !0,
|
|
151
|
-
loop: !0,
|
|
152
|
-
trapped: a,
|
|
153
|
-
onMountAutoFocus: r,
|
|
154
|
-
onUnmountAutoFocus: o,
|
|
155
|
-
children: /* @__PURE__ */ s.jsx(
|
|
156
|
-
ne,
|
|
157
|
-
{
|
|
158
|
-
role: "dialog",
|
|
159
|
-
id: c.contentId,
|
|
160
|
-
"aria-describedby": c.descriptionId,
|
|
161
|
-
"aria-labelledby": c.titleId,
|
|
162
|
-
"data-state": O(c.open),
|
|
163
|
-
...i,
|
|
164
|
-
ref: f,
|
|
165
|
-
onDismiss: () => c.onOpenChange(!1)
|
|
166
|
-
}
|
|
167
|
-
)
|
|
168
|
-
}
|
|
169
|
-
),
|
|
170
|
-
/* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
171
|
-
/* @__PURE__ */ s.jsx(de, { titleId: c.titleId }),
|
|
172
|
-
/* @__PURE__ */ s.jsx(fe, { contentRef: d, descriptionId: c.descriptionId })
|
|
173
|
-
] })
|
|
174
|
-
] });
|
|
175
|
-
}
|
|
176
|
-
), A = "DialogTitle", k = u(
|
|
177
|
-
(e, t) => {
|
|
178
|
-
const { __scopeDialog: n, ...a } = e, r = l(A, n);
|
|
179
|
-
return /* @__PURE__ */ s.jsx(v.h2, { id: r.titleId, ...a, ref: t });
|
|
180
|
-
}
|
|
181
|
-
);
|
|
182
|
-
k.displayName = A;
|
|
183
|
-
var G = "DialogDescription", $ = u(
|
|
184
|
-
(e, t) => {
|
|
185
|
-
const { __scopeDialog: n, ...a } = e, r = l(G, n);
|
|
186
|
-
return /* @__PURE__ */ s.jsx(v.p, { id: r.descriptionId, ...a, ref: t });
|
|
187
|
-
}
|
|
188
|
-
);
|
|
189
|
-
$.displayName = G;
|
|
190
|
-
var B = "DialogClose", U = u(
|
|
191
|
-
(e, t) => {
|
|
192
|
-
const { __scopeDialog: n, ...a } = e, r = l(B, n);
|
|
193
|
-
return /* @__PURE__ */ s.jsx(
|
|
194
|
-
v.button,
|
|
195
|
-
{
|
|
196
|
-
type: "button",
|
|
197
|
-
...a,
|
|
198
|
-
ref: t,
|
|
199
|
-
onClick: D(e.onClick, () => r.onOpenChange(!1))
|
|
200
|
-
}
|
|
201
|
-
);
|
|
202
|
-
}
|
|
203
|
-
);
|
|
204
|
-
U.displayName = B;
|
|
205
|
-
function O(e) {
|
|
206
|
-
return e ? "open" : "closed";
|
|
207
|
-
}
|
|
208
|
-
var Z = "DialogTitleWarning", [ve, q] = re(Z, {
|
|
209
|
-
contentName: g,
|
|
210
|
-
titleName: A,
|
|
211
|
-
docsSlug: "dialog"
|
|
212
|
-
}), de = ({ titleId: e }) => {
|
|
213
|
-
const t = q(Z), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
214
|
-
|
|
215
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
216
|
-
|
|
217
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
|
|
218
|
-
return P(() => {
|
|
219
|
-
e && (document.getElementById(e) || console.error(n));
|
|
220
|
-
}, [n, e]), null;
|
|
221
|
-
}, ge = "DialogDescriptionWarning", fe = ({ contentRef: e, descriptionId: t }) => {
|
|
222
|
-
const a = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${q(ge).contentName}}.`;
|
|
223
|
-
return P(() => {
|
|
224
|
-
var o;
|
|
225
|
-
const r = (o = e.current) == null ? void 0 : o.getAttribute("aria-describedby");
|
|
226
|
-
t && r && (document.getElementById(t) || console.warn(a));
|
|
227
|
-
}, [a, e, t]), null;
|
|
228
|
-
}, Ce = b, me = M, xe = S, _e = W, Ee = L, he = k, Pe = $, Ie = U;
|
|
229
|
-
const Ne = (e) => !e || e.length === 0 ? R : C.filter((t) => e.includes(t.value)).reduce((t, n) => t | n.bit, 0) || R, ye = (e) => {
|
|
230
|
-
const t = [];
|
|
231
|
-
return e & E.PUBLIC && t.push(C[0].value), e & E.FREE && t.push(C[1].value), e & E.PAID && t.push(C[2].value), t.join(",");
|
|
232
|
-
};
|
|
233
|
-
export {
|
|
234
|
-
Ee as C,
|
|
235
|
-
Pe as D,
|
|
236
|
-
_e as O,
|
|
237
|
-
xe as P,
|
|
238
|
-
Ce as R,
|
|
239
|
-
me as T,
|
|
240
|
-
he as a,
|
|
241
|
-
Ne as b,
|
|
242
|
-
Ie as c,
|
|
243
|
-
ye as g
|
|
244
|
-
};
|
|
245
|
-
//# sourceMappingURL=audience-BWqU7WWT.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as c}from"./index-B8G0f0hb.js";import{M as h}from"./wallet-cards-xX4QZik7.js";const i=({defaultSourceIconUrl:e,displayName:t,iconSrc:s})=>c.jsx(c.Fragment,{children:t.trim().toLowerCase().endsWith("newsletter")?c.jsx(h,{"aria-label":"Newsletter",className:"size-4 text-muted-foreground"}):c.jsx("img",{alt:"",className:"size-4",src:s,onError:o=>{o.currentTarget.src=e}})}),r={POSTS:"posts",PAGES:"pages",POSTS_AND_PAGES:"posts_and_pages",SOURCES:"sources"},w=e=>{switch(e){case r.POSTS:return"Top posts";case r.PAGES:return"Top pages";case r.SOURCES:return"Top sources";default:return"Top content"}},m=(e,t,s)=>{switch(e){case r.POSTS:return`Your highest viewed posts ${s(t)}`;case r.PAGES:return`Your highest viewed pages ${s(t)}`;case r.POSTS_AND_PAGES:return`Your highest viewed posts or pages ${s(t)}`;case r.SOURCES:return`How readers found your site ${s(t)}`;default:return`Your highest viewed posts or pages ${s(t)}`}},d=(e,t,s)=>{switch(e){case r.POSTS:return`Which posts drove the most growth ${s(t)}`;case r.PAGES:return`Which pages drove the most growth ${s(t)}`;case r.POSTS_AND_PAGES:return`Which posts or pages drove the most growth ${s(t)}`;case r.SOURCES:return`Which sources drove the most growth ${s(t)}`;default:return`Which posts drove the most growth ${s(t)}`}};function p(e,t){if(!e||!t)return"";try{const s=new URL(t),o=s.pathname.endsWith("/")?s.pathname:`${s.pathname}/`,a=e.replace(/^\//,""),n=`${o}${a}`;return`${s.origin}${n}`}catch{return""}}function f(e,t,s,o,a){return()=>{if(t&&e&&a==="post"){o(`/posts/analytics/${t}`,{crossApp:!0});return}if(e&&s){const n=p(e,s);n&&window.open(n,"_blank","noopener,noreferrer")}}}export{r as C,i as S,m as a,f as b,d as c,w as g};
|