ghost 6.52.0 → 6.52.1
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-kg-card-factory-5.2.3.tgz +0 -0
- package/components/tryghost-kg-clean-basic-html-4.3.3.tgz +0 -0
- package/components/tryghost-kg-converters-1.2.3.tgz +0 -0
- package/components/tryghost-kg-default-cards-10.3.3.tgz +0 -0
- package/components/tryghost-kg-default-nodes-2.1.3.tgz +0 -0
- package/components/tryghost-kg-default-transforms-1.3.3.tgz +0 -0
- package/components/tryghost-kg-html-to-lexical-1.3.3.tgz +0 -0
- package/components/tryghost-kg-lexical-html-renderer-1.4.3.tgz +0 -0
- package/components/tryghost-kg-markdown-html-renderer-7.2.3.tgz +0 -0
- package/components/tryghost-kg-utils-1.1.3.tgz +0 -0
- package/core/built/admin/assets/Growth-CczbRexv.js +3 -0
- package/core/built/admin/assets/Newsletters-rFycX4x8.js +1 -0
- package/core/built/admin/assets/Overview-DFubBJaR.js +1 -0
- package/core/built/admin/assets/Web-BDE2lN4_.js +2 -0
- package/core/built/admin/assets/{account-migration-DiS76mRS.js → account-migration-gvH5a8ea.js} +1 -1
- package/core/built/admin/assets/audience-CMWMCxFS.js +1 -0
- package/core/built/admin/assets/{automated-emails-Cel18g7S.js → automated-emails-293Lcj5S.js} +1 -1
- package/core/built/admin/assets/automations-BxnjfCKn.js +1 -0
- package/core/built/admin/assets/automations-kPr44AmD.js +1 -0
- package/core/built/admin/assets/bluesky-sharing-Cww54F3Y.js +1 -0
- package/core/built/admin/assets/{chunk.912.9d6df5a6da679d905bbf.js → chunk.251.dd82df30188bb633b4ae.js} +9 -9
- package/core/built/admin/assets/{chunk.730.2457b7fede040aa52c88.js → chunk.341.20e7d2936dfa5877deea.js} +3 -3
- package/core/built/admin/assets/{chunk.524.d6d399b571454ea0234d.js → chunk.524.697bf0ded48e7c994fc3.js} +5 -5
- package/core/built/admin/assets/{chunk.582.50a9a5cbab6996daf0fe.js → chunk.582.6b742e9ba932688c442c.js} +6 -6
- package/core/built/admin/assets/{code-editor-view-BLGzcLub.js → code-editor-view-DSY5RHLf.js} +1 -1
- package/core/built/admin/assets/comments-BwNUmaNM.js +1 -0
- package/core/built/admin/assets/constants-c-JNF9c2.js +1 -0
- package/core/built/admin/assets/container-CD33Rm0u.js +1 -0
- package/core/built/admin/assets/content-helpers-CNBPrwsi.js +1 -0
- package/core/built/admin/assets/date-range-select-BkkNN98H.js +1 -0
- package/core/built/admin/assets/disabled-sources-indicator-ChHTF69d.js +1 -0
- package/core/built/admin/assets/{domain-2REz20SO.js → domain-CGk9SMa-.js} +1 -1
- package/core/built/admin/assets/dropzone-9zocztX0.js +5 -0
- package/core/built/admin/assets/{edit-profile-7QEh0VtN.js → edit-profile-C0B2Kbsl.js} +1 -1
- package/core/built/admin/assets/editor-Bz2Sm2O8.js +8 -0
- package/core/built/admin/assets/{esm-CEtFqV1y.js → esm-CsHLKmLh.js} +1 -1
- package/core/built/admin/assets/explore-CpRAMnx7.js +1 -0
- package/core/built/admin/assets/feed-BRoOWghO.js +1 -0
- package/core/built/admin/assets/filter-sources-DhxqZID1.js +1 -0
- package/core/built/admin/assets/{filters-DUy8rzI5.js → filters-B8nLLYGO.js} +1 -1
- package/core/built/admin/assets/{gh-chart-DdBGmBS8.js → gh-chart-Cqy9gGq7.js} +1 -1
- package/core/built/admin/assets/{gift-link-modal-CSgyxenA.js → gift-link-modal-v55u0VUL.js} +1 -1
- package/core/built/admin/assets/growth-BIfM3w1p.js +1 -0
- package/core/built/admin/assets/{inbox-CTD-ix6u.js → inbox-CDX57fXK.js} +11 -11
- package/core/built/admin/assets/index-B5yxmQNp.js +69 -0
- package/core/built/admin/assets/inline-DdrWe7D3.js +1 -0
- package/core/built/admin/assets/{input-group-DkR63-nk.js → input-group-DUPGQck1.js} +1 -1
- package/core/built/admin/assets/{koenig-lexical-D09TwwLs.js → koenig-lexical-CUVpp-dC.js} +1 -1
- package/core/built/admin/assets/{kpi-card-Fr_HJH78.js → kpi-card-DyDbok3h.js} +1 -1
- package/core/built/admin/assets/kpi-helpers-Bx9IHIMq.js +1 -0
- package/core/built/admin/assets/{kpi-tabs-Dc4Nt4a5.js → kpi-tabs-DmUcThFc.js} +1 -1
- package/core/built/admin/assets/labels-DLL8dl-7.js +1 -0
- package/core/built/admin/assets/layout-B7K3SmL0.js +1 -0
- package/core/built/admin/assets/{links-CfAB2Yeq.js → link-helpers-DHG_8GIT.js} +1 -1
- package/core/built/admin/assets/list-page-COAUFrmV.js +1 -0
- package/core/built/admin/assets/members-BxWs_mjq.js +10 -0
- package/core/built/admin/assets/{modals-Bu-1Uxdc.js → modals-DF2sECo6.js} +4 -4
- package/core/built/admin/assets/moderation-DYKTx5x0.js +1 -0
- package/core/built/admin/assets/newsletter-C-ZD1dI8.js +1 -0
- package/core/built/admin/assets/note-oaRdU_5z.js +1 -0
- package/core/built/admin/assets/notifications-BF4fAiP1.js +1 -0
- package/core/built/admin/assets/{nql-lang-CvCSOQG3.js → nql-lang-BoHzkNg5.js} +1 -1
- package/core/built/admin/assets/{onboarding-route-BDaa9hd3.js → onboarding-route-SS-e9Aeb.js} +1 -1
- package/core/built/admin/assets/overview-Cbn6bIoR.js +1 -0
- package/core/built/admin/assets/post-analytics-Bk9-KEgB.js +1 -0
- package/core/built/admin/assets/post-analytics-context-C8t_048I.js +1 -0
- package/core/built/admin/assets/post-analytics-header-xTjcg4H0.js +1 -0
- package/core/built/admin/assets/post-analytics-provider-CqnWwLMk.js +1 -0
- package/core/built/admin/assets/{post-share-modal-59Ujf4t1.js → post-share-modal-ZUCX7JZo.js} +1 -1
- package/core/built/admin/assets/preferences-BgjgxiBB.js +5 -0
- package/core/built/admin/assets/profile-qIwaxKTm.js +1 -0
- package/core/built/admin/assets/{router-provider-DcttGCQn.js → router-provider-S8Wf6jdu.js} +1 -1
- package/core/built/admin/assets/select-Cp27ScMR.js +1 -0
- package/core/built/admin/assets/{settings-dLraw6et.js → settings-CdDfyF90.js} +1 -1
- package/core/built/admin/assets/{settings-CIslWMfh.js → settings-CynBh-YN.js} +4 -4
- package/core/built/admin/assets/{share-modal-CI3E67kW.js → share-modal-DTIFYNI1.js} +1 -1
- package/core/built/admin/assets/social-urls-DVvRfwEp.js +16 -0
- package/core/built/admin/assets/{sort-button-BYwI0xdN.js → sort-button-BHh5Ba1K.js} +1 -1
- package/core/built/admin/assets/source-icon--egCE7iN.js +1 -0
- package/core/built/admin/assets/stats-DkqCtrPh.js +1 -0
- package/core/built/admin/assets/stats-view-BvWWxegf.js +1 -0
- package/core/built/admin/assets/step-1-DWjw7rIn.js +1 -0
- package/core/built/admin/assets/{step-2-CVOvLQ2n.js → step-2-D1LrETIB.js} +1 -1
- package/core/built/admin/assets/{step-3-BsVXcpWU.js → step-3-BAdJdZw4.js} +2 -2
- package/core/built/admin/assets/{tabs-Bw8aEqsd.js → tabs-DSrHPjWP.js} +1 -1
- package/core/built/admin/assets/tags-BWZqBj19.js +1 -0
- package/core/built/admin/assets/{textarea-CNaqhk5P.js → textarea-CUVQjsrM.js} +1 -1
- package/core/built/admin/assets/{toggle-group-CMp1taHd.js → toggle-group-CrFpl-Xz.js} +1 -1
- package/core/built/admin/assets/{topic-filter-D2_9eEw4.js → topic-filter-jAxwwd9I.js} +1 -1
- package/core/built/admin/assets/types-uYQ1HgqL.js +1 -0
- package/core/built/admin/assets/url-helpers-CCyfRrKj.js +1 -0
- package/core/built/admin/assets/use-analytics-data-DXG7mpgK.js +1 -0
- package/core/built/admin/assets/use-filter-params-EoQBXfP3.js +1 -0
- package/core/built/admin/assets/use-growth-stats-DJoXxVfD.js +1 -0
- package/core/built/admin/assets/use-post-referrers-B-onYbuS.js +1 -0
- package/core/built/admin/assets/use-reply-chain-data-D8IFALoz.js +1 -0
- package/core/built/admin/assets/{use-tinybird-query-CNCaUn39.js → use-tinybird-query-BSL3iVCc.js} +1 -1
- package/core/built/admin/assets/{use-tinybird-token-1T80Odca.js → use-tinybird-token-DHgOnrNu.js} +1 -1
- package/core/built/admin/assets/virtual-list-AQrbRAXP.js +1 -0
- package/core/built/admin/assets/web-zEFi98DS.js +1 -0
- package/core/built/admin/index.html +6 -6
- package/core/server/services/automations/automations-api.js +20 -0
- package/core/server/services/automations/automations-api.ts +31 -0
- package/core/server/services/automations/poll.js +7 -7
- package/core/server/services/automations/poll.ts +12 -9
- package/core/server/services/email-analytics/email-analytics-provider-mailgun.js +2 -2
- package/core/server/services/email-analytics/email-analytics-service-wrapper.js +1 -4
- package/core/server/services/email-analytics/email-analytics-service.js +5 -7
- package/core/server/services/webhooks/serialize.js +6 -5
- package/package.json +1 -1
- package/pnpm-lock.yaml +14 -14
- package/pnpm-workspace.yaml +5 -0
- package/core/built/admin/assets/Growth-Dx0vv-BS.js +0 -3
- package/core/built/admin/assets/Newsletters-v1GnbUjW.js +0 -1
- package/core/built/admin/assets/Overview-BgM7o-Z8.js +0 -1
- package/core/built/admin/assets/Web-DRv-83Ow.js +0 -2
- package/core/built/admin/assets/automations-DFLgH14-.js +0 -1
- package/core/built/admin/assets/automations-Dc4DUKBb.js +0 -1
- package/core/built/admin/assets/bluesky-sharing-Dk1RTUaz.js +0 -1
- package/core/built/admin/assets/comments-DgH1rC7w.js +0 -1
- package/core/built/admin/assets/constants-BlvYJTqz.js +0 -1
- package/core/built/admin/assets/content-helpers-BEgGpvyE.js +0 -1
- package/core/built/admin/assets/editor-u3BPqQed.js +0 -8
- package/core/built/admin/assets/en-DA2zVD_n.js +0 -1
- package/core/built/admin/assets/explore-BgHmdFVz.js +0 -1
- package/core/built/admin/assets/feed-Cs7-F3I5.js +0 -1
- package/core/built/admin/assets/filter-query-core-D6GjHUFB.js +0 -1
- package/core/built/admin/assets/growth-IkQZ1ZV9.js +0 -1
- package/core/built/admin/assets/index-BMhs4O3N.js +0 -69
- package/core/built/admin/assets/inline-C1CpHxuO.js +0 -1
- package/core/built/admin/assets/kpis-BTZ8cyw-.js +0 -1
- package/core/built/admin/assets/labels-sA9m188H.js +0 -5
- package/core/built/admin/assets/layout-szLkuQ88.js +0 -1
- package/core/built/admin/assets/list-page-DWkOdljb.js +0 -1
- package/core/built/admin/assets/main-layout-B-K8KliJ.js +0 -1
- package/core/built/admin/assets/members-PNNhalbu.js +0 -10
- package/core/built/admin/assets/moderation-DqnsNTiw.js +0 -1
- package/core/built/admin/assets/newsletter-BhuQeWFL.js +0 -1
- package/core/built/admin/assets/note-DFy2JTpP.js +0 -1
- package/core/built/admin/assets/notifications-BVu-JOkB.js +0 -1
- package/core/built/admin/assets/overview-Bhg8M7VS.js +0 -1
- package/core/built/admin/assets/pagemenu-C4paivNj.js +0 -1
- package/core/built/admin/assets/post-analytics-BhQUmZyA.js +0 -1
- package/core/built/admin/assets/post-analytics-context-Dy17HR1_.js +0 -1
- package/core/built/admin/assets/post-analytics-header-DAQep1VQ.js +0 -1
- package/core/built/admin/assets/posts/_react-dom-Blmuc0OL.js +0 -21
- package/core/built/admin/assets/posts/alert-dialog-DBJeQQTK.js +0 -154
- package/core/built/admin/assets/posts/app-provider-BJr9fdEC.js +0 -22
- package/core/built/admin/assets/posts/app-utils-9O53Czfw.js +0 -83
- package/core/built/admin/assets/posts/automations-BM0oBTjO.js +0 -275
- package/core/built/admin/assets/posts/automations-Dbp-gdHS.js +0 -223
- package/core/built/admin/assets/posts/avatar-kOk1tTvT.js +0 -144
- package/core/built/admin/assets/posts/badge-DnByIHe9.js +0 -25
- package/core/built/admin/assets/posts/button-Dd8Xreln.js +0 -40844
- package/core/built/admin/assets/posts/chunk-KS7C4IRE-ECXkcZq6.js +0 -7740
- package/core/built/admin/assets/posts/comments-D-7hbbdw.js +0 -8032
- package/core/built/admin/assets/posts/data-list-DdD_glQ-.js +0 -14219
- package/core/built/admin/assets/posts/dialog-DDkTy_np.js +0 -229
- package/core/built/admin/assets/posts/editor-D7-01KV_.js +0 -14633
- package/core/built/admin/assets/posts/empty-indicator-Ze-bwJ27.js +0 -38
- package/core/built/admin/assets/posts/filters-CmKfKtpS.js +0 -5611
- package/core/built/admin/assets/posts/get-site-timezone-DVbWc-NA.js +0 -39
- package/core/built/admin/assets/posts/growth-DlhFUzVg.js +0 -299
- package/core/built/admin/assets/posts/heading-BBl-8tMC.js +0 -92
- package/core/built/admin/assets/posts/hooks-gZAmj4Al.js +0 -5429
- package/core/built/admin/assets/posts/input-DuPLeCGW.js +0 -16
- package/core/built/admin/assets/posts/input-surface-ClwNIxfd.js +0 -17
- package/core/built/admin/assets/posts/jsx-runtime-BfZnKD4L.js +0 -95
- package/core/built/admin/assets/posts/koenig-lexical-DCHiJJou.js +0 -77579
- package/core/built/admin/assets/posts/kpis-Fsx0XmYK.js +0 -2061
- package/core/built/admin/assets/posts/label-D1wSl69p.js +0 -32
- package/core/built/admin/assets/posts/links-DLozzgMh.js +0 -1243
- package/core/built/admin/assets/posts/loading-indicator-BgU2kK3v.js +0 -44
- package/core/built/admin/assets/posts/main-layout-DDlTMrnF.js +0 -15
- package/core/built/admin/assets/posts/newsletter-DAQJ1GLe.js +0 -736
- package/core/built/admin/assets/posts/overview-G3MfRm-S.js +0 -426
- package/core/built/admin/assets/posts/page-header-CanFyB95.js +0 -284
- package/core/built/admin/assets/posts/popover-Cta8ZDHJ.js +0 -221
- package/core/built/admin/assets/posts/post-analytics-cS07-wo_.js +0 -121
- package/core/built/admin/assets/posts/post-analytics-context-D868SMoq.js +0 -150
- package/core/built/admin/assets/posts/post-analytics-header-CZYiuaEL.js +0 -42249
- package/core/built/admin/assets/posts/post-share-modal-BJfswZzf.js +0 -352
- package/core/built/admin/assets/posts/posts-CpusjBC0.js +0 -37
- package/core/built/admin/assets/posts/posts-app-context-CPC7dOlt.js +0 -26
- package/core/built/admin/assets/posts/posts.js +0 -145
- package/core/built/admin/assets/posts/router-provider-DrqpOc8m.js +0 -114
- package/core/built/admin/assets/posts/separator-DAZNzARU.js +0 -37
- package/core/built/admin/assets/posts/settings-CMfUn5Hq.js +0 -66
- package/core/built/admin/assets/posts/shade-app-DLbeExcd-NeEZjE3R.js +0 -4764
- package/core/built/admin/assets/posts/sheet-CEuv-0a5.js +0 -62
- package/core/built/admin/assets/posts/site-WJ6ldary.js +0 -10
- package/core/built/admin/assets/posts/skeleton-CO0qCdQF.js +0 -2426
- package/core/built/admin/assets/posts/source-icon-Bs6o84W3.js +0 -143
- package/core/built/admin/assets/posts/stats-B1Z8H0JT.js +0 -92
- package/core/built/admin/assets/posts/table-CbJ9bOpM.js +0 -77
- package/core/built/admin/assets/posts/tabs-BvzzwQ4P.js +0 -242
- package/core/built/admin/assets/posts/tags-D-4TwsD0.js +0 -462
- package/core/built/admin/assets/posts/tooltip-BI7VtFUY.js +0 -380
- package/core/built/admin/assets/posts/update-queries-DiUznIQ1.js +0 -60
- package/core/built/admin/assets/posts/users-UgRPrTKW.js +0 -83
- package/core/built/admin/assets/posts/value-DF_wOhJe.js +0 -415
- package/core/built/admin/assets/posts/virtual-list-window-DP63Onpm.js +0 -853
- package/core/built/admin/assets/posts/web-axp2l3kK.js +0 -8077
- package/core/built/admin/assets/preferences-ChOzBKcF.js +0 -5
- package/core/built/admin/assets/profile-DlcrYKay.js +0 -1
- package/core/built/admin/assets/select-BbtNHCBq.js +0 -1
- package/core/built/admin/assets/social-urls-DVzIHh2W.js +0 -16
- package/core/built/admin/assets/source-icon-Uuhttjun.js +0 -1
- package/core/built/admin/assets/source-utils-BchD0sF0.js +0 -1
- package/core/built/admin/assets/stats-CrlPzgdd.js +0 -1
- package/core/built/admin/assets/stats-view-UNMhTMCZ.js +0 -1
- package/core/built/admin/assets/step-1-C2HY6pyi.js +0 -1
- package/core/built/admin/assets/tags-DjCsJo0X.js +0 -1
- package/core/built/admin/assets/typeof-Ca-duI-z.js +0 -1
- package/core/built/admin/assets/url-helpers-DxA844rA.js +0 -1
- package/core/built/admin/assets/use-growth-stats-DNIGdI8h.js +0 -1
- package/core/built/admin/assets/use-reply-chain-data-DtEC2Azp.js +0 -1
- package/core/built/admin/assets/virtual-list-window-BTXGwpf5.js +0 -1
- package/core/built/admin/assets/web-Cj8VEw3s.js +0 -1
- /package/core/built/admin/assets/{chunk.912.9d6df5a6da679d905bbf.js.LICENSE.txt → chunk.251.dd82df30188bb633b4ae.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-Bb3IsNbi.js";import{t as n}from"./jsx-runtime-CtMZ-PAS.js";import{i as r,n as i,r as a,t as o}from"./tabs-DSrHPjWP.js";import{Nn as s,t as c}from"./button-DiwO9Rof.js";import{$ as l,$r as u,En as d,Ft as f,G as p,H as m,O as h,Tn as g,Tt as _,ct as v,j as y,kn as b,lt as x,ni as S,ot as C,st as w,wt as T}from"./index-B5yxmQNp.js";import"./layout-B7K3SmL0.js";var E=e(t(),1),D=n(),O=()=>{let{data:e,isLoading:t}=v(`index`),{data:n,isLoading:O}=x(`index`),k=t?[,,,,,].fill({apId:``,name:``,handle:``,avatarUrl:``}):e?.pages.flatMap(e=>e.accounts)??[],A=O?[,,,,,].fill({apId:``,name:``}):n?.pages.flatMap(e=>e.domains)??[],j=w(`index`),M=_(`index`),[N,P]=(0,E.useState)(new Set),F=C(`index`),I=T(`index`),[L,R]=(0,E.useState)(new Set),[z,B]=(0,E.useState)(null),V=f(),H=e=>{P(t=>{let n=new Set([...t]);return n.add(e.apId),n}),M.mutate(e),u.success(`User unblocked`)},U=e=>{P(t=>{let n=new Set([...t]);return n.delete(e.apId),n}),j.mutate(e),u.success(`User blocked`)},W=e=>{R(t=>{let n=new Set([...t]);return n.add(e.url),n}),I.mutate({url:e.url}),u.success(`Domain unblocked`)},G=e=>{R(t=>{let n=new Set([...t]);return n.delete(e.url),n}),F.mutate({url:e.url}),u.success(`Domain blocked`)};return(0,D.jsx)(h,{children:(0,D.jsxs)(`div`,{className:`mx-auto max-w-[620px] py-[min(4vh,48px)]`,children:[(0,D.jsx)(`div`,{className:`flex items-center justify-between gap-8`,children:(0,D.jsx)(S,{children:`Moderation`})}),(0,D.jsx)(`div`,{className:`mt-6`,children:(0,D.jsxs)(o,{defaultValue:`blocked_users`,variant:`underline`,children:[(0,D.jsxs)(a,{children:[(0,D.jsx)(r,{value:`blocked_users`,children:`Blocked users`}),(0,D.jsx)(r,{value:`blocked_domains`,children:`Blocked domains`})]}),(0,D.jsx)(i,{className:`mt-2`,value:`blocked_users`,children:!t&&k.length===0?(0,D.jsxs)(g,{children:[(0,D.jsx)(d,{children:(0,D.jsx)(s,{})}),(0,D.jsx)(`div`,{className:`mt-2 flex max-w-[400px] flex-col items-center gap-1 text-center`,children:(0,D.jsx)(`p`,{children:`When you block someone, they won't be able to follow you or interact with your content on the social web.`})})]}):k.map((e,n)=>(0,D.jsx)(p,{actor:e,isCurrentUser:!0,children:(0,D.jsx)(`div`,{children:(0,D.jsxs)(y,{onClick:t?void 0:()=>m(e.handle,V),children:[(0,D.jsx)(l,{author:{icon:{url:e.avatarUrl},name:e.name,handle:e.handle}}),(0,D.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,D.jsx)(`span`,{className:`block truncate font-semibold text-black dark:text-white`,children:t?(0,D.jsx)(b,{className:`w-24`}):e.name}),(0,D.jsx)(`span`,{className:`block truncate text-sm text-gray-600`,children:t?(0,D.jsx)(b,{className:`w-40`}):e.handle})]}),N.has(e.apId)?(0,D.jsx)(c,{className:`ml-auto min-w-[90px] text-red hover:bg-red/5! hover:text-red-400`,variant:`outline`,onClick:t=>{t.stopPropagation(),U(e)},children:`Block`}):t?(0,D.jsx)(`div`,{className:`ml-auto w-16`,children:(0,D.jsx)(b,{})}):(0,D.jsx)(c,{className:`ml-auto min-w-[90px]`,variant:`destructive`,onClick:t=>{t.stopPropagation(),H(e)},onMouseEnter:()=>B(e.apId),onMouseLeave:()=>B(null),children:z===e.apId?`Unblock`:`Blocked`})]})})},e.apId?e.apId:`loading-${n}`))}),(0,D.jsx)(i,{className:`mt-[11px]`,value:`blocked_domains`,children:!O&&A.length===0?(0,D.jsxs)(g,{children:[(0,D.jsx)(d,{children:(0,D.jsx)(s,{})}),(0,D.jsx)(`div`,{className:`mt-2 flex max-w-[400px] flex-col items-center gap-1 text-center`,children:(0,D.jsx)(`p`,{children:`When you block a domain, all users from that domain won't be able to follow you or interact with your content.`})})]}):A.map((e,t)=>(0,D.jsxs)(y,{children:[(0,D.jsx)(`div`,{className:`flex min-w-0 flex-col`,children:(0,D.jsx)(`span`,{className:`block truncate font-semibold text-black dark:text-white`,children:O?(0,D.jsx)(b,{className:`w-48`}):new URL(e.url).hostname})}),L.has(e.url)?(0,D.jsx)(c,{className:`ml-auto min-w-[90px] text-red hover:bg-red/5! hover:text-red-400`,variant:`outline`,onClick:()=>G(e),children:`Block`}):O?(0,D.jsx)(`div`,{className:`ml-auto w-16`,children:(0,D.jsx)(b,{})}):(0,D.jsx)(c,{className:`ml-auto min-w-[90px]`,variant:`destructive`,onClick:()=>W(e),onMouseEnter:()=>B(e.url),onMouseLeave:()=>B(null),children:z===e.url?`Unblock`:`Blocked`})]},e.url?e.url:`loading-${t}`))})]})})]})})};export{O as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-Bb3IsNbi.js";import{i as n}from"./hooks-tBACnBdQ.js";import{t as r}from"./jsx-runtime-CtMZ-PAS.js";import{i,r as a,t as o}from"./tabs-DSrHPjWP.js";import{C as s,S as c,b as l,i as u,r as d,v as f,x as p,y as m}from"./stats-DkqCtrPh.js";import{t as h}from"./posts-D_gBhqmK.js";import{o as g}from"./post-helpers-C5OQMBoi.js";import{m as _}from"./chunk-KS7C4IRE-DG9HTHQ3.js";import{a as v}from"./router-provider-S8Wf6jdu.js";import{E as y,Fn as b,Qn as x,T as S,Xn as C,Zn as w,it as ee,j as T,mn as E,t as D,tr as O}from"./button-DiwO9Rof.js";import{a as k,i as A,n as j,o as M,r as N}from"./link-helpers-DHG_8GIT.js";import{r as te,t as ne}from"./post-analytics-header-xTjcg4H0.js";import{c as re,l as ie,n as ae,o as oe,r as se,s as ce,t as le,u as ue}from"./data-list-D3nkd86L.js";import{i as P,n as F,o as I,r as L,t as R}from"./use-simple-pagination-CH6qw-vr.js";import{An as z,Dn as de,Fn as fe,In as pe,Pi as me,ai as he,jn as B,lr as ge,qn as _e,sr as V}from"./index-B5yxmQNp.js";import{t as ve}from"./member-route-0Aa52Ntz.js";import{a as H,i as U,n as W,r as G,t as K}from"./kpi-card-B2y2dMMS.js";import{n as ye}from"./post-analytics-context-C8t_048I.js";var q=n({dataType:`FeedbackResponseType`,path:e=>`/feedback/${e}/`}),J=e(t()),Y=(e,t)=>{let{data:n,isLoading:r,error:i}=q(e,{searchParams:{limit:`50`,...t===void 0?{}:{score:t.toString()}}});return{feedback:(0,J.useMemo)(()=>n?.feedback?n.feedback:[],[n]),isLoading:r,error:i}},X=r(),be=({feedbackStats:e})=>{let{postId:t}=_(),n=v(),[r,u]=(0,J.useState)(`positive`),{feedback:d,isLoading:h}=Y(t||``,+(r===`positive`)),{totalPages:g,paginatedData:b,nextPage:C,previousPage:ee,hasNextPage:E,hasPreviousPage:k}=R({data:d,itemsPerPage:9}),A=h;return(0,X.jsxs)(f,{children:[(0,X.jsxs)(c,{className:`pb-5`,children:[(0,X.jsx)(s,{children:`Feedback`}),(0,X.jsx)(l,{children:`What did your readers think?`})]}),e.totalFeedback>0?(0,X.jsxs)(m,{className:`pb-3`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,X.jsx)(o,{className:`pb-3`,defaultValue:`positive`,value:r,variant:`button`,onValueChange:e=>u(e),children:(0,X.jsxs)(a,{className:`gap-1`,children:[(0,X.jsx)(i,{className:`h-7`,value:`positive`,children:(0,X.jsxs)(`div`,{className:`flex items-center gap-1 text-xs`,children:[(0,X.jsx)(S,{size:14,strokeWidth:1.25}),(0,X.jsx)(`span`,{className:`hidden font-medium sm:visible! sm:inline!`,children:`More like this`}),(0,X.jsx)(`span`,{className:`font-semibold tracking-tight`,children:w(e.positiveFeedback/e.totalFeedback)})]})}),(0,X.jsx)(i,{className:`h-7`,value:`negative`,children:(0,X.jsxs)(`div`,{className:`flex items-center gap-1 text-xs`,children:[(0,X.jsx)(y,{size:14,strokeWidth:1.25}),(0,X.jsx)(`span`,{className:`hidden font-medium sm:visible! sm:inline!`,children:`Less like this`}),(0,X.jsx)(`span`,{className:`font-semibold tracking-tight`,children:w(e.negativeFeedback/e.totalFeedback)})]})})]})}),(0,X.jsx)(he,{className:`mr-2 mb-3 lg:hidden xl:visible! xl:block!`,children:`Date`})]}),(0,X.jsx)(B,{}),A?(0,X.jsx)(z,{className:`mt-3`,lines:3}):b&&b.length>0?(0,X.jsx)(`div`,{className:`flex w-full flex-col py-3`,children:b.map(e=>(0,X.jsxs)(`div`,{className:`flex h-10 w-full items-center justify-between gap-3 rounded-sm border-none px-2 text-sm hover:cursor-pointer hover:bg-accent`,onClick:()=>{n(`/members/${e.member.id}`,{crossApp:!0})},children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[(0,X.jsxs)(fe,{className:`size-7`,children:[e.member?.avatar_image&&(0,X.jsx)(`img`,{className:`absolute aspect-square size-full`,src:e.member?.avatar_image}),(0,X.jsx)(pe,{className:`text-white`,style:{backgroundColor:`${O(V(e.member),`45`,`55`)}`},children:ge(e.member)})]}),V(e.member)]}),(0,X.jsx)(`div`,{className:`whitespace-nowrap text-muted-foreground`,children:x(e.created_at)})]},e.id))}):(0,X.jsx)(`div`,{className:`flex h-full items-center justify-center py-8 text-center text-sm text-muted-foreground`,children:(0,X.jsxs)(`div`,{children:[`No `,r===`positive`?`positive`:`negative`,` feedback yet`]})})]}):(0,X.jsxs)(m,{className:`flex grow flex-col items-center justify-center text-center text-sm text-muted-foreground`,children:[(0,X.jsx)(`div`,{children:`No members have given feedback yet`}),(0,X.jsx)(`div`,{children:`When someone does, you'll see their response here.`})]}),e.totalFeedback>0&&(0,X.jsx)(p,{className:`grow-0`,children:(0,X.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-3`,children:[(0,X.jsxs)(D,{variant:`outline`,onClick:()=>{let e=`(feedback.post_id:'${t}'+feedback.score:1)`,i=`(feedback.post_id:'${t}'+feedback.score:0)`,a=`${encodeURIComponent(e)}&post=${t}`,o=`${encodeURIComponent(i)}&post=${t}`;n(`/members?filter=${r===`positive`?a:o}`,{crossApp:!0})},children:[`View all`,(0,X.jsx)(T,{})]}),g>1&&(0,X.jsx)(F,{className:`pb-0`,children:(0,X.jsxs)(L,{children:[(0,X.jsx)(I,{disabled:!k,onClick:ee}),(0,X.jsx)(P,{disabled:!E,onClick:C})]})})]})})]})},xe=()=>{let{mutateAsync:e,isLoading:t}=A();return{editLinks:e,isEditLinksLoading:t}},Se=e=>{let{data:t,isLoading:n}=h(e),{data:r,isLoading:i}=h(e,{searchParams:{include:`count.positive_feedback,count.negative_feedback`}}),a=(0,J.useMemo)(()=>t?.posts[0],[t]),o=(0,J.useMemo)(()=>r?.posts[0],[r]),s=(0,J.useMemo)(()=>a?{sent:a.email?.email_count||0,opened:a.email?.opened_count||0,clicked:a.count?.clicks||0,openedRate:a.email?.opened_count?a.email.opened_count/a.email.email_count:0,clickedRate:a.count?.clicks&&a.email?.email_count?a.count.clicks/a.email.email_count:0}:{sent:0,opened:0,clicked:0,openedRate:0,clickedRate:0},[a]),c=(0,J.useMemo)(()=>{if(!o?.count)return{positiveFeedback:0,negativeFeedback:0,totalFeedback:0};let e=o.count.positive_feedback||0,t=o.count.negative_feedback||0;return{positiveFeedback:e,negativeFeedback:t,totalFeedback:e+t}},[o]),l=(0,J.useMemo)(()=>a?.newsletter?.id,[a]),{data:f,isLoading:p}=d({searchParams:l?{newsletter_id:l}:{},enabled:!!l}),m=(0,J.useMemo)(()=>f?.stats?f.stats.map(e=>e.post_id):[],[f]),{data:g,isLoading:_}=u({searchParams:l&&m.length>0?{newsletter_id:l,post_ids:m.join(`,`)}:{},enabled:!!l&&m.length>0}),v=(0,J.useMemo)(()=>{if(!f?.stats)return;let e=f.stats,t=g?.stats||[],n=new Map;t.forEach(e=>{n.set(e.post_id,e)});let r=e.map(e=>{let t=n.get(e.post_id);return{...e,total_clicks:t?.total_clicks||0,click_rate:t?.click_rate||0}});return{...f,stats:r}},[f,g]),y=p||_,{data:b,isLoading:x,refetch:S}=k({searchParams:{filter:`post_id:'${e}'`}}),C=(0,J.useMemo)(()=>{if(!v||!v.stats)return{openRate:0,clickRate:0};let e=v.stats;if(e.length===0)return{openRate:0,clickRate:0};let t=e.reduce((e,t)=>e+(t.open_rate||0),0),n=e.reduce((e,t)=>e+(t.click_rate||0),0);return{openRate:Number((t/e.length).toFixed(2)),clickRate:Number((n/e.length).toFixed(2))}},[v]),w=(0,J.useMemo)(()=>N(b),[b]);return{post:a,stats:s,feedbackStats:c,averageStats:(0,J.useMemo)(()=>({openedRate:C.openRate,clickedRate:C.clickRate}),[C]),topLinks:w,refetchTopLinks:S,isLoading:n||i||y||x}},Ce=({breakpoints:e={sm:1080,md:1280,lg:1360}}={})=>{let[t,n]=(0,J.useState)(`md`);return(0,J.useEffect)(()=>{let t=()=>{let t=window.innerWidth;t<e.sm?n(`sm`):t<e.md?n(`md`):n(`lg`)};return t(),window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t)},[e]),{chartSize:t,isSmall:t===`sm`,isMedium:t===`md`,isLarge:t===`lg`}},we=()=>(0,X.jsx)(`div`,{className:`absolute top-1/2 -right-4 z-10 hidden size-8 -translate-y-1/2 items-center justify-center rounded-full border bg-background text-muted-foreground md:visible! md:flex!`,children:(0,X.jsx)(E,{className:`ml-0.5`,size:16,strokeWidth:1.5})}),Te=({dataColor:e,value:t,avgValue:n})=>(0,X.jsxs)(`div`,{className:`absolute top-6 left-1/2 z-50 flex w-[200px] -translate-x-1/2 flex-col items-stretch gap-1.5 rounded-md bg-background px-4 py-2 text-sm opacity-0 shadow-md transition-all group-hover/block:top-3 group-hover/block:opacity-100`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 text-muted-foreground`,children:[(0,X.jsx)(`div`,{className:`size-2 rounded-full bg-chart-blue opacity-50`,style:{backgroundColor:e}}),`This newsletter`]}),(0,X.jsx)(`div`,{className:`text-right font-mono`,children:t})]}),(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 text-muted-foreground`,children:[(0,X.jsx)(`div`,{className:`size-2 rounded-full bg-chart-gray opacity-80`}),`Average`]}),(0,X.jsx)(`div`,{className:`text-right font-mono`,children:n})]})]}),Ee=()=>{let e=v(),[t,n]=(0,J.useState)(null),[r,i]=(0,J.useState)(``),a=(0,J.useRef)(null),o=(0,J.useRef)(null),{chartSize:u}=Ce(),{appSettings:d}=me(),{emailTrackClicks:h,emailTrackOpens:_}=d?.analytics||{},{post:y,isPostLoading:x,postId:S}=ye(),T=t=>e(ve({filter:t}),{crossApp:!0}),E=y,O=g(E);(0,J.useEffect)(()=>{!x&&!O&&e(`/posts/analytics/${S}`)},[e,S,x,O]);let{stats:k,averageStats:A,topLinks:N,isLoading:fe,refetchTopLinks:pe}=Se(S),{editLinks:ge}=xe(),V=(0,J.useMemo)(()=>{if(!E?.count)return{positiveFeedback:0,negativeFeedback:0,totalFeedback:0};let e=E.count.positive_feedback||0,t=E.count.negative_feedback||0;return{positiveFeedback:e,negativeFeedback:t,totalFeedback:e+t}},[E]),q=(0,J.useMemo)(()=>E?.newsletter?.feedback_enabled===!0,[E]),Y=(0,J.useMemo)(()=>V.totalFeedback>0?!0:q,[V.totalFeedback,q]),Ee=e=>{let t=j(N,e);t&&(n(e),i(t.link.to))},De=()=>{if(!t)return;let e=j(N,t);if(!e)return;let a=r.trim();if(a===``||a===e.link.to){n(null),i(``);return}ge({originalUrl:e.link.originalTo,editedUrl:r,postId:S},{onSuccess:()=>{n(null),i(``),pe()}})},{totalPages:Oe,paginatedData:ke,nextPage:Ae,previousPage:je,hasNextPage:Me,hasPreviousPage:Ne}=R({data:N,itemsPerPage:10});(0,J.useEffect)(()=>{if(t&&a.current){a.current.focus();let e=j(N,t),s=t=>{o.current&&!o.current.contains(t.target)&&r===e?.link.to&&(n(null),i(``))};return document.addEventListener(`mousedown`,s),()=>{document.removeEventListener(`mousedown`,s)}}},[t,r,N]);let Z=fe||x,Pe=[{datatype:`Sent`,value:1,fill:`url(#gradientPurple)`,color:`var(--chart-purple)`}],Fe={percentage:{label:`O`},Average:{label:`Average`},"This newsletter":{label:`This newsletter`}},Ie=[{datatype:`Average`,value:A.openedRate,fill:`url(#gradientGray)`,color:`var(--chart-gray)`},{datatype:`This newsletter`,value:k.openedRate,fill:`url(#gradientBlue)`,color:`var(--chart-blue)`}],Le={percentage:{label:`Opened`},Average:{label:`Average`},"This newsletter":{label:`This newsletter`}},Re=[{datatype:`Average`,value:A.clickedRate,fill:`url(#gradientGray)`,color:`var(--chart-gray)`},{datatype:`This newsletter`,value:k.clickedRate,fill:`url(#gradientTeal)`,color:`var(--chart-teal)`}],ze={percentage:{label:`Clicked`},Average:{label:`Average`},"This newsletter":{label:`This newsletter`}},Q=`grid-cols-3`,$=`aspect-[16/10] w-full max-w-[320px] sm:aspect-[2/1] md:aspect-[10/14] md:max-w-none lg:aspect-square`;return(!h||!_)&&(Q=`grid-cols-2`,$=`aspect-[16/10] w-full max-w-[320px] sm:aspect-[2/1] md:aspect-square md:max-w-none lg:aspect-[15/10]`),!h&&!_&&(Q=`grid-cols-1`,$=`aspect-square w-full sm:aspect-[16/10] md:max-w-[320px] md:max-h-[320px] lg:aspect-[12/10]`),(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(ne,{currentTab:`Newsletter`}),(0,X.jsx)(te,{children:(0,X.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 ${Y&&h&&`lg:grid-cols-2`}`,children:[(0,X.jsxs)(f,{className:Y&&h?`lg:col-span-2`:``,children:[(0,X.jsxs)(c,{className:`hidden`,children:[(0,X.jsx)(s,{children:`Newsletters`}),(0,X.jsx)(l,{children:`How did this post perform`})]}),Z?(0,X.jsx)(m,{className:`h-[25vw] p-6`,children:(0,X.jsx)(de,{})}):(0,X.jsxs)(m,{className:`p-0`,children:[(0,X.jsxs)(`div`,{className:`grid ${Q} items-stretch border-b`,children:[(0,X.jsxs)(K,{className:`group relative isolate grow p-3 md:px-6 md:py-5`,children:[(0,X.jsx)(U,{onClick:()=>{T(`emails.post_id:${S}`)},children:`View members →`}),(0,X.jsxs)(G,{onClick:()=>{T(`emails.post_id:${S}`)},children:[(0,X.jsx)(`div`,{className:`ml-0.5 size-[9px] rounded-full bg-chart-purple opacity-50`}),`Sent`]}),(0,X.jsx)(W,{children:(0,X.jsx)(H,{className:`text-xl leading-none sm:text-2xl md:text-[2.6rem]`,children:C(k.sent)})})]}),_&&(0,X.jsxs)(K,{className:`p-3 md:px-6 md:py-5`,children:[(0,X.jsx)(U,{onClick:()=>{T(`opened_emails.post_id:${S}`)},children:`View members →`}),(0,X.jsxs)(G,{onClick:()=>{T(`opened_emails.post_id:${S}`)},children:[(0,X.jsx)(`div`,{className:`ml-0.5 size-[9px] rounded-full bg-chart-blue opacity-50`}),`Opened`]}),(0,X.jsx)(W,{children:(0,X.jsx)(H,{className:`text-xl leading-none sm:text-2xl md:text-[2.6rem]`,children:C(k.opened)})})]}),h&&(0,X.jsxs)(K,{className:`group relative isolate grow p-3 md:px-6 md:py-5`,children:[(0,X.jsx)(U,{onClick:()=>{T(`clicked_links.post_id:${S}`)},children:`View members →`}),(0,X.jsxs)(G,{onClick:()=>{T(`clicked_links.post_id:${S}`)},children:[(0,X.jsx)(`div`,{className:`ml-0.5 size-[9px] rounded-full bg-chart-teal opacity-50`}),`Clicked`]}),(0,X.jsx)(W,{children:(0,X.jsx)(H,{className:`text-xl leading-none sm:text-2xl md:text-[2.6rem]`,children:C(k.clicked)})})]})]}),(0,X.jsxs)(`div`,{className:`$ mx-auto grid grid-cols-1 items-center justify-center gap-4 transition-all md:gap-0 ${Q===`grid-cols-2`&&`md:grid-cols-2`} ${Q===`grid-cols-3`&&`md:grid-cols-3`}`,children:[(0,X.jsxs)(`div`,{className:`relative border-r-0 px-6 ${(_||h)&&`md:border-r`}`,children:[(0,X.jsx)(M,{className:$,config:Fe,data:Pe,percentageLabel:`Sent`,percentageValue:w(1),size:u,tooltip:!1}),(_||h)&&(0,X.jsx)(we,{})]}),_&&(0,X.jsxs)(`div`,{className:`group/block relative border-r-0 px-6 transition-all hover:bg-muted/25 ${h&&`md:border-r`}`,children:[(0,X.jsx)(Te,{avgValue:w(A.openedRate),dataColor:`var(--chart-blue)`,value:w(k.openedRate)}),(0,X.jsx)(M,{className:$,config:Le,data:Ie,percentageLabel:`Open rate`,percentageValue:w(k.openedRate),size:u,tooltip:!1}),h&&(0,X.jsx)(we,{})]}),h&&(0,X.jsxs)(`div`,{className:`group/block relative px-6 transition-all hover:bg-muted/25`,children:[(0,X.jsx)(Te,{avgValue:w(A.clickedRate),dataColor:`var(--chart-teal)`,value:w(k.clickedRate)}),(0,X.jsx)(M,{className:$,config:ze,data:Re,percentageLabel:`Click rate`,percentageValue:w(k.clickedRate),size:u,tooltip:!1})]})]})]})]}),Y&&(0,X.jsx)(be,{feedbackStats:V}),h&&(0,X.jsxs)(f,{className:`group/datalist overflow-hidden`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between p-6`,children:[(0,X.jsxs)(c,{className:`p-0`,children:[(0,X.jsx)(s,{children:`Newsletter clicks`}),(0,X.jsx)(l,{children:`Which links resonated with your readers`})]}),(0,X.jsx)(he,{className:`mr-2`,children:`Members`})]}),Z?(0,X.jsxs)(m,{className:`p-6 pt-0`,children:[(0,X.jsx)(B,{}),(0,X.jsx)(z,{className:`mt-6`})]}):(0,X.jsxs)(m,{className:`pb-0`,children:[(0,X.jsx)(B,{}),N.length>0?(0,X.jsx)(le,{className:``,children:(0,X.jsx)(se,{children:ke?.map(e=>{let n=k.clicked>0?e.count/k.clicked:0,s=e.link.link_id,c=e.link.title,l=e.link.to,u=e.link.edited;return(0,X.jsxs)(ue,{children:[t!==s&&(0,X.jsx)(ae,{style:{width:`${n?Math.round(n*100):0}%`}}),(0,X.jsx)(oe,{className:`w-full`,children:t===s?(0,X.jsxs)(`div`,{ref:o,className:`flex w-full items-center gap-2`,children:[(0,X.jsx)(_e,{ref:a,className:`z-50 h-7 w-full border-border bg-background text-sm`,value:r,onChange:e=>i(e.target.value)}),(0,X.jsx)(D,{size:`sm`,onClick:De,children:`Update`})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(D,{className:`mr-2 shrink-0 bg-background`,size:`sm`,variant:`outline`,onClick:()=>Ee(s),children:(0,X.jsx)(ee,{})}),(0,X.jsx)(`a`,{className:`block truncate font-medium hover:underline`,href:l,rel:`noreferrer`,target:`_blank`,title:c,children:c}),u&&(0,X.jsx)(`span`,{className:`ml-1 text-gray-500`,children:`(edited)`})]})}),(0,X.jsxs)(ce,{children:[(0,X.jsx)(re,{children:C(e.count||0)}),(0,X.jsx)(ie,{children:w(n)})]})]},s)})})}):(0,X.jsx)(`div`,{className:`py-20 text-center text-sm text-gray-700`,children:`You have no links in your post.`})]}),!Z&&N.length>1&&(0,X.jsx)(p,{children:(0,X.jsxs)(`div`,{className:`flex w-full items-start justify-between gap-3`,children:[(0,X.jsxs)(`div`,{className:`mt-2 flex items-start gap-2 pl-4 text-sm text-green`,children:[(0,X.jsx)(b,{size:20,strokeWidth:1.5}),`Sent a broken link? You can update it!`]}),Oe>1&&(0,X.jsx)(F,{className:`pb-0`,children:(0,X.jsxs)(L,{children:[(0,X.jsx)(I,{disabled:!Ne,onClick:je}),(0,X.jsx)(P,{disabled:!Me,onClick:Ae})]})})]})})]})]})})]})};export{Ee as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-Bb3IsNbi.js";import{t as n}from"./jsx-runtime-CtMZ-PAS.js";import{m as r}from"./chunk-KS7C4IRE-DG9HTHQ3.js";import{s as i}from"./router-provider-S8Wf6jdu.js";import{Lt as a}from"./button-DiwO9Rof.js";import{$ as o,D as s,E as c,Ft as l,G as u,H as d,Nt as f,O as p,On as m,V as h,jt as g,kn as _,z as v}from"./index-B5yxmQNp.js";import{i as y,n as b,r as x,t as S}from"./use-reply-chain-data-D8IFALoz.js";var C=e(t(),1),w=n(),T=()=>(0,w.jsx)(`div`,{className:`h-px w-full bg-gray-200 dark:bg-gray-950`}),E=()=>{let{postId:e}=r(),{canGoBack:t}=i(),[n,E]=(0,C.useState)(new Set),[D,O]=(0,C.useState)(new Set),[k,A]=(0,C.useState)(new Set),[j,M]=(0,C.useState)(!1),N=(0,C.useRef)(null),P=(0,C.useRef)(null),F=(0,C.useRef)(null),I=(0,C.useRef)(null),L=l(),{threadParents:R,post:z,processedReplies:B,isLoading:V,loadMoreChildren:H,loadMoreChildReplies:U,hasMoreChildren:W,hasMoreChildReplies:G}=S(decodeURIComponent(e??``),{includeAncestors:!0}),K=z?.object,q=K?.replyCount??0,[J,Y]=(0,C.useState)(!1);if((0,C.useEffect)(()=>{P.current&&R.length>0&&!J&&(P.current.scrollIntoView({behavior:`instant`,block:`start`}),Y(!0))},[R,J]),(0,C.useEffect)(()=>{F.current&&F.current.disconnect();let e=document.querySelector(`[data-scrollable-container]`);if(e)return F.current=new IntersectionObserver(async e=>{if(e[0].isIntersecting&&W&&!j){M(!0);try{await H()}catch(e){console.error(`Failed to load more top-level replies:`,e)}finally{M(!1)}}},{root:e,rootMargin:`200px`}),I.current&&F.current.observe(I.current),()=>{F.current&&F.current.disconnect()}},[W,j,H]),V)return(0,w.jsx)(p,{children:(0,w.jsxs)(`div`,{className:`mx-auto flex max-w-[620px] flex-col items-center gap-3 pt-9 lg:px-8`,children:[(0,w.jsxs)(`div`,{className:`flex w-full items-center gap-3`,children:[(0,w.jsx)(_,{className:`size-10 rounded-full`}),(0,w.jsxs)(`div`,{className:`grow pt-1`,children:[(0,w.jsx)(_,{className:`w-24`}),(0,w.jsx)(_,{className:`w-3/5`})]})]}),(0,w.jsxs)(`div`,{className:`mb-7 w-full`,children:[(0,w.jsx)(_,{}),(0,w.jsx)(_,{className:`w-4/5`}),(0,w.jsx)(_,{})]}),(0,w.jsx)(T,{}),(0,w.jsxs)(`div`,{className:`flex w-full items-center gap-3 py-3`,children:[(0,w.jsx)(_,{className:`block size-full`,containerClassName:`size-10 rounded-full overflow-hidden`}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(_,{className:`w-52`}),(0,w.jsx)(_,{className:`w-28`})]})]}),(0,w.jsx)(T,{})]})});if(!z)return(0,w.jsx)(p,{children:(0,w.jsx)(`div`,{className:`mx-auto mt-4 flex w-full max-w-[620px] flex-col items-center`,children:(0,w.jsxs)(s,{children:[(0,w.jsx)(c,{children:(0,w.jsx)(a,{})}),(0,w.jsx)(`div`,{children:`Error loading note.`})]})})});function X(){}function Z(e){E(t=>{let n=new Set(t);return n.has(e)?n.delete(e):(n.add(e),O(t=>{let n=new Set(t);return n.add(e),n})),n})}async function Q(e,t){if(!k.has(e)){A(t=>new Set(t).add(e));try{U&&await U(t)}catch(e){console.error(`Failed to load more replies for chain:`,e)}finally{A(t=>{let n=new Set(t);return n.delete(e),n})}}}return(0,w.jsx)(p,{children:(0,w.jsx)(`div`,{className:`mx-auto flex h-full max-w-[620px] flex-col`,children:(0,w.jsx)(`div`,{className:`relative flex-1`,children:(0,w.jsx)(`div`,{className:`grow overflow-y-auto`,children:(0,w.jsxs)(`div`,{className:`mx-auto px-8 pt-5 pb-10 max-lg:px-0`,children:[!R.length&&(0,w.jsx)(u,{actor:z.actor,isCurrentUser:z.object.authored,children:(0,w.jsxs)(`div`,{className:`col-[2/3] mx-auto flex w-full cursor-pointer items-center gap-3 ${t?`pt-10 max-md:pt-5`:`pt-5`}`,children:[(0,w.jsx)(`div`,{className:`relative z-10`,children:(0,w.jsx)(o,{author:z.actor,showFollowButton:!z.object.authored&&!z.actor.followedByMe})}),(0,w.jsxs)(`div`,{className:`relative z-10 flex w-full min-w-0 cursor-pointer flex-col overflow-visible text-[1.5rem]`,onClick:e=>{d(z.actor,L,e)},children:[(0,w.jsx)(`div`,{className:`flex w-full`,children:(0,w.jsx)(`span`,{className:`min-w-0 truncate font-semibold whitespace-nowrap hover:underline`,children:z.actor.name})}),(0,w.jsxs)(`div`,{className:`flex w-full`,children:[(0,w.jsx)(`span`,{className:`truncate text-gray-700 after:mx-1 after:font-normal after:text-gray-700 after:content-["·"]`,children:f(z.actor)}),(0,w.jsx)(`span`,{className:`text-gray-700`,children:h(K,!K.authored)})]})]})]})}),R.map(e=>e.object.type===`Tombstone`?(0,w.jsx)(x,{last:!1}):(0,w.jsx)(v,{actor:e.actor,allowDelete:!1,commentCount:e.object.replyCount??0,last:!1,layout:`reply`,likeCount:e.object.likeCount??0,object:e.object,repostCount:e.object.repostCount??0,type:`Note`,onClick:()=>{L(`/${e.object.type===`Article`?`reader`:`notes`}/${encodeURIComponent(e.object.id)}`)}})),(0,w.jsx)(`div`,{ref:P,className:`${t?`scroll-mt-[12px]`:`scroll-mt-[124px]`}`,children:(0,w.jsxs)(`div`,{className:`${R.length>0&&`min-h-[calc(100vh-52px)]`}`,children:[(0,w.jsx)(v,{actor:z.actor,allowDelete:!1,commentCount:q,last:!0,layout:`modal`,likeCount:K.likeCount??0,object:K,repostCount:K.repostCount,showHeader:R.length>0,showStats:!0,type:`Note`}),(0,w.jsx)(y,{object:K}),(0,w.jsx)(T,{}),(0,w.jsxs)(`div`,{ref:N,children:[B.map((e,t)=>{let r=t===B.length-1,i=e.mainReply.id,a=n.has(i),o=D.has(i),s=k.has(i),c=e.chain.length>0;return(0,w.jsxs)(C.Fragment,{children:[(0,w.jsx)(v,{actor:e.mainReply.actor,allowDelete:e.mainReply.object.authored,commentCount:e.mainReply.object.replyCount??0,isChainParent:c,isPending:g(e.mainReply.id),last:!c,layout:`reply`,likeCount:e.mainReply.object.likeCount??0,object:e.mainReply.object,parentId:K.id,repostCount:e.mainReply.object.repostCount??0,type:`Note`,onClick:()=>{L(`/notes/${encodeURIComponent(e.mainReply.id)}`)},onDelete:X}),c&&e.chain[0]&&(0,w.jsx)(v,{actor:e.chain[0].actor,allowDelete:e.chain[0].object.authored,commentCount:e.chain[0].object.replyCount??0,isChainContinuation:!0,isPending:g(e.chain[0].id),last:e.chain.length===1,layout:`reply`,likeCount:e.chain[0].object.likeCount??0,object:e.chain[0].object,parentId:K.id,repostCount:e.chain[0].object.repostCount??0,type:`Note`,onClick:()=>{L(`/notes/${encodeURIComponent(e.chain[0].id)}`)},onDelete:X},e.chain[0].id),c&&a&&e.chain.slice(1).map((n,r)=>{let i=r===e.chain.slice(1).length-1,a=G&&G(t),o=i&&a;return(0,w.jsx)(v,{actor:n.actor,allowDelete:n.object.authored,commentCount:n.object.replyCount??0,isChainContinuation:!0,isPending:g(n.id),last:i&&!o,layout:`reply`,likeCount:n.object.likeCount??0,object:n.object,parentId:K.id,repostCount:n.object.repostCount??0,type:`Note`,onClick:()=>{L(`/notes/${encodeURIComponent(n.id)}`)},onDelete:X},n.id)}),c&&e.chain.length>1&&!a&&(0,w.jsx)(b,{variant:`expand`,onClick:()=>Z(i)}),c&&a&&o&&G&&G(t)&&(0,w.jsx)(b,{loading:s,variant:`loadMore`,onClick:()=>Q(i,t)}),!r&&(0,w.jsx)(T,{})]},e.mainReply.id)}),j&&(0,w.jsx)(`div`,{className:`flex flex-col items-center justify-center text-center`,children:(0,w.jsx)(m,{size:`md`})})]}),W&&(0,w.jsx)(`div`,{ref:I,className:`h-1`})]})})]})})})})})};export{E as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-Bb3IsNbi.js";import{t as n}from"./jsx-runtime-CtMZ-PAS.js";import{G as r,It as i,Mn as a,Pn as o,Xn as s,gn as c,p as l,q as u,t as d}from"./button-DiwO9Rof.js";import{$ as f,B as p,D as m,E as h,Ft as g,G as _,H as v,Mt as y,O as b,On as x,Q as S,T as C,V as w,W as T,X as E,Z as D,_t as O,kn as k}from"./index-B5yxmQNp.js";import"./layout-B7K3SmL0.js";var A=e(t(),1),j=n(),M=({notificationType:e,size:t=`lg`,className:n})=>{let a,s=``,c=`white`,d=t===`sm`?13:20,f=t===`sm`?2:1.5;switch(e){case`follow`:a=(0,j.jsx)(l,{className:`-mt-0.5 -mr-0.5 ${t===`sm`&&`size-[11px]`}`,color:c,size:d,strokeWidth:f}),s=`bg-blue-600`;break;case`like`:a=(0,j.jsx)(i,{className:`${t===`sm`?`size-[11px]`:`mt-px size-5`}`,color:c,strokeWidth:f}),s=`bg-pink-600`;break;case`reply`:a=(0,j.jsx)(r,{className:`mr-px mb-px`,color:c,size:d,strokeWidth:f}),s=`bg-purple-600`;break;case`repost`:a=(0,j.jsx)(u,{color:c,size:d,strokeWidth:f}),s=`bg-green-500`;break;case`mention`:a=(0,j.jsx)(o,{className:`${t===`sm`?`size-[12px]`:`size-5`}`,color:c,size:d,strokeWidth:f}),s=`bg-orange-500`;break}return(0,j.jsx)(`div`,{className:`flex ${t===`sm`?`size-5`:`size-9`} items-center justify-center rounded-full ${s} ${n&&n}`,children:a})},N=A.createContext(void 0),P=({isGrouped:e,centerAlign:t,children:n,onClick:r,url:i,className:a})=>(0,j.jsx)(N.Provider,{value:{onClick:r,url:i},children:(0,j.jsx)(`div`,{className:`group relative -mx-4 -my-px ${e?`grid`:`flex`} ${t?`items-center`:`items-start`} break-anywhere cursor-pointer grid-cols-[auto_1fr] gap-x-4 gap-y-2.5 rounded-lg px-4 py-5 text-left hover:bg-gray-100 ${a}`,role:`button`,onClick:r,children:n})});P.Icon=({size:e=`lg`,type:t})=>(0,j.jsx)(`div`,{className:`col-start-1 row-start-1`,children:(0,j.jsx)(M,{notificationType:t,size:e})}),P.Avatars=({children:e})=>(0,j.jsx)(`div`,{className:`col-start-2 row-start-1 flex gap-2`,children:e}),P.Content=({children:e})=>(0,j.jsx)(`div`,{className:`col-start-2 row-start-2 -mt-0.5 grow overflow-hidden`,children:e});var F=()=>(0,j.jsx)(`div`,{className:`h-px w-full bg-gray-200 dark:bg-gray-950`});function I(e){let t=1440*60*1e3,n=new Date(e).getTime();return(Math.floor(n/t)*t).toString()}function L(e){let t={},n=null,r=0;return e.forEach(e=>{e.type!==n&&(r+=1,n=e.type);let i=``,a=`_${I(e.createdAt)}`,o=`_seq${r}`;switch(e.type){case`like`:e.post?.id&&(i=`like_${e.post.id}${a}${o}`);break;case`reply`:i=`reply_${e.id}`;break;case`repost`:e.post?.id&&(i=`repost_${e.post.id}${a}${o}`);break;case`follow`:i=`follow_${a}${o}`;break;case`mention`:i=`mention_${e.id}`;break}t[i]||(t[i]={id:e.id,type:e.type,actors:[],post:e.post,inReplyTo:e.inReplyTo,createdAt:e.createdAt}),t[i].actors.find(t=>t.id===e.actor.id)||t[i].actors.push(e.actor)}),Object.values(t)}var R=({group:e})=>{let[t,...n]=e.actors,r=n.length>0,i=n.length,a=g(),o=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(_,{actor:t,align:`center`,isCurrentUser:!1,children:(0,j.jsx)(`span`,{className:`cursor-pointer font-semibold hover:underline text-black dark:text-white`,onClick:e=>{e?.stopPropagation(),t.handle&&v(t.handle,a)},children:t.name})}),r&&` and ${s(i)} ${i>1?`others`:`other`}`]});switch(e.type){case`follow`:return(0,j.jsxs)(j.Fragment,{children:[o,` followed you`]});case`like`:return(0,j.jsxs)(j.Fragment,{children:[o,` liked your `,e.post?.type===`article`?`post`:`note`]});case`repost`:return(0,j.jsxs)(j.Fragment,{children:[o,` reposted your `,e.post?.type===`article`?`post`:`note`]});case`reply`:if(e.inReplyTo&&typeof e.inReplyTo!=`string`)return o;break;case`mention`:return o}return(0,j.jsx)(j.Fragment,{})},z=({content:e,className:t,stripTags:n=[]})=>{let r=(0,A.useRef)(null),i=g();return(0,A.useEffect)(()=>{let e=r.current;if(!e)return;let t=e=>{let t=e.target.closest(`a[data-profile]`);if(t){let n=t.getAttribute(`data-profile`)?.trim();/^@([\w.-]+)@([\w-]+\.[\w.-]+[a-zA-Z])$/.test(n||``)&&n&&(e.preventDefault(),e.stopPropagation(),v(n,i))}};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}},[i,e]),(0,j.jsx)(`div`,{dangerouslySetInnerHTML:{__html:E(D(e||``,n))},ref:r,className:t})},B=()=>{let[e,t]=A.useState({}),n=g(),r=e=>{t(t=>({...t,[e]:!t[e]}))},i=()=>{},{data:o,error:l,fetchNextPage:u,hasNextPage:_,isFetchingNextPage:N,isLoading:I}=O(`index`),B=o?.pages.flatMap(e=>L(e.notifications))??Array(10).fill({actors:[{}]}),V=(0,A.useRef)(null),H=(0,A.useRef)(null);(0,A.useEffect)(()=>(V.current&&V.current.disconnect(),V.current=new IntersectionObserver(e=>{e[0].isIntersecting&&_&&!N&&u()}),H.current&&V.current.observe(H.current),()=>{V.current&&V.current.disconnect()}),[_,N,u]);let U=(e,t)=>{switch(e.type){case`like`:e.post&&n(`/${e.post.type===`article`?`reader`:`notes`}/${encodeURIComponent(e.post.id)}`);break;case`reply`:e.post&&e.inReplyTo&&n(`/notes/${encodeURIComponent(e.post.id)}`);break;case`repost`:e.post&&n(`/${e.post.type===`article`?`reader`:`notes`}/${encodeURIComponent(e.post.id)}`);break;case`follow`:e.actors.length>1?r(e.id||`${e.type}_${t}`):e.actors[0]?.handle&&v(e.actors[0].handle,n);break;case`mention`:e.post&&n(`/notes/${encodeURIComponent(e.post.id)}`);break}};return l&&y(l)?(0,j.jsx)(C,{errorCode:l.code,statusCode:l.statusCode}):(0,j.jsx)(b,{children:(0,j.jsxs)(`div`,{className:`z-0 flex w-full flex-col items-center`,children:[I===!1&&B.length===0&&(0,j.jsxs)(m,{children:[(0,j.jsx)(h,{children:(0,j.jsx)(a,{})}),`Quiet for now, but not for long! When someone likes, boosts, or replies to you, you'll find it here.`]}),B.length>0&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`div`,{className:`my-8 flex w-full max-w-[620px] flex-col max-md:mt-5`,children:B.map((t,a)=>(0,j.jsxs)(A.Fragment,{children:[(0,j.jsxs)(P,{centerAlign:t.actors.length<2&&t.type===`follow`,className:`hover:bg-gray-100 dark:hover:bg-gray-950`,isGrouped:t.actors.length>1,onClick:()=>U(t,a),children:[I?(0,j.jsx)(k,{className:`rounded-full`,containerClassName:`flex h-10 w-10`}):t.actors.length>1?(0,j.jsx)(P.Icon,{type:t.type}):(0,j.jsxs)(`div`,{className:`relative`,children:[(0,j.jsx)(f,{author:{icon:{url:t.actors[0].avatarUrl||``},name:t.actors[0].name,handle:t.actors[0].handle},size:`notification`},t.actors[0].id),(0,j.jsx)(M,{className:`absolute -right-1 -bottom-1 z-10 border-2 border-white dark:border-black`,notificationType:t.type,size:`sm`})]}),t.actors.length>1&&(0,j.jsx)(P.Avatars,{children:(0,j.jsxs)(`div`,{className:`flex w-full flex-col`,children:[(0,j.jsxs)(`div`,{className:`relative flex w-fit items-center pl-2`,children:[!e[t.id||`${t.type}_${a}`]&&t.actors.slice(0,5).map(e=>(0,j.jsx)(f,{author:{icon:{url:e.avatarUrl||``},name:e.name,handle:e.handle},className:`-ml-2 bg-[#F3F3F3]! outline-2 outline-white group-hover:bg-[#EDEEF0]! group-hover:outline-gray-100 dark:outline-black group-hover:dark:outline-gray-950`,size:`notification`},e.id)),t.actors.length>5&&!e[t.id||`${t.type}_${a}`]&&(0,j.jsx)(`div`,{className:`absolute right-[28px] z-10 flex size-9 items-center justify-center rounded-full bg-black/50 text-base font-semibold tracking-tightest text-white`,children:`+${s(t.actors.length-5)}`}),t.actors.length>1&&(0,j.jsxs)(d,{className:`group flex items-center gap-0.5 text-gray-700 hover:bg-transparent hover:text-black dark:text-gray-600 dark:hover:text-white ${e[t.id||`${t.type}_${a}`]?`ml-[-20px]`:`ml-0 w-[28px]`}`,variant:`ghost`,onClick:e=>{e?.stopPropagation(),r(t.id||`${t.type}_${a}`)},children:[(0,j.jsx)(c,{className:`${e[t.id||`${t.type}_${a}`]?`rotate-180`:``}`,size:20,strokeWidth:1.5}),e[t.id||`${t.type}_${a}`]?`Hide`:(0,j.jsx)(`span`,{className:`sr-only`,children:`Show all`})]})]}),(0,j.jsx)(`div`,{className:`overflow-hidden transition-all duration-300 ease-in-out ${e[t.id||`${t.type}_${a}`]?`mb-2 max-h-[1384px] opacity-100`:`max-h-0 opacity-0`}`,children:e[t.id||`${t.type}_${a}`]&&t.actors.length>1&&(0,j.jsx)(`div`,{className:`flex flex-col gap-2 pt-2`,children:t.actors.map(e=>(0,j.jsxs)(`div`,{className:`group/item break-anywhere flex items-center justify-between gap-4`,onClick:t=>{t?.stopPropagation(),e.handle&&v(e.handle,n)},children:[(0,j.jsxs)(`div`,{className:`flex min-w-0 items-center`,children:[(0,j.jsx)(f,{author:{icon:{url:e.avatarUrl||``},name:e.name,handle:e.handle},size:`xs`}),(0,j.jsx)(`span`,{className:`ml-2 line-clamp-1 text-base font-semibold group-hover/item:underline dark:text-white`,children:e.name}),(0,j.jsx)(`span`,{className:`ml-1 line-clamp-1 text-base text-gray-700 dark:text-gray-600`,children:e.handle})]}),t.type===`follow`&&!e.followedByMe&&e.handle&&(0,j.jsx)(S,{following:!1,handle:e.handle,variant:`link`})]},e.id))})})]})}),(0,j.jsxs)(P.Content,{children:[(0,j.jsx)(`div`,{children:I?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(k,{}),(0,j.jsx)(k,{className:`w-full max-w-60`})]}):(0,j.jsxs)(`div`,{className:`flex justify-between`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,j.jsx)(`span`,{className:`truncate`,children:(0,j.jsx)(R,{group:t})}),t.actors.length<2&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`span`,{className:`mt-px text-[8px] text-gray-700 dark:text-gray-600`,children:`•`}),(0,j.jsx)(`span`,{className:`mt-0.5 text-sm text-gray-700 dark:text-gray-600`,children:w(t,!1)})]})]}),t.actors.length===1&&(t.type===`follow`||t.type===`reply`||t.type===`mention`)&&!t.actors[0].followedByMe&&t.actors[0].handle&&(0,j.jsx)(S,{following:!1,handle:t.actors[0].handle,variant:`link`})]})}),(t.type===`reply`&&t.inReplyTo||t.type===`mention`||t.type===`like`&&!t.post?.name&&t.post?.content||t.type===`repost`&&!t.post?.name&&t.post?.content)&&(t.type!==`reply`&&t.type!==`mention`?(0,j.jsxs)(`div`,{className:`ap-note-content mt-0.5 line-clamp-1 text-sm text-pretty text-gray-700 dark:text-gray-600`,children:[t.post?.type===`article`&&t.post?.title&&(0,j.jsxs)(j.Fragment,{children:[t.post.title,` — `]}),(0,j.jsx)(`span`,{dangerouslySetInnerHTML:{__html:E(D(t.post?.content||``))}})]}):(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)(`div`,{className:`mt-2.5 rounded-md bg-gray-100 px-5 py-[14px] group-hover:bg-gray-200 dark:bg-gray-950/30 group-hover:dark:bg-black/40`,children:[(0,j.jsx)(z,{className:`ap-note-content text-pretty`,content:t.post?.content||``,stripTags:[`a`]}),t.post&&t.post.attachments&&t.post.attachments.length>0&&(0,j.jsx)(`div`,{className:`notification-attachments mb-1 [&_.attachment-gallery]:flex [&_.attachment-gallery]:flex-wrap [&_img]:aspect-square [&_img]:max-w-[calc(20%-6.4px)]`,children:p({...t.post,type:`Note`,attachment:t.post.attachments})})]})})),(t.type===`reply`&&t.post||t.type===`mention`)&&(0,j.jsx)(`div`,{className:`mt-1.5`,children:(0,j.jsx)(T,{actor:{...t.actors[0],icon:{url:t.actors[0].avatarUrl||``},id:t.actors[0].url,preferredUsername:t.actors[0].handle?.replace(/^@([^@]+)@.*$/,`$1`)||`unknown`},buttonClassName:`hover:bg-gray-200`,commentCount:t.post.replyCount||0,layout:`notification`,likeCount:t.post.likeCount||0,object:{...t.post,liked:t.post.likedByMe,reposted:t.post.repostedByMe},repostCount:t.post.repostCount||0,onLikeClick:i})})]})]}),a<B.length-1&&(0,j.jsx)(`div`,{className:`pl-[52px]`,children:(0,j.jsx)(F,{})})]},t.id||`${t.type}_${a}`))}),(0,j.jsx)(`div`,{ref:H,className:`h-1`}),N&&(0,j.jsx)(`div`,{className:`-mt-4 mb-8 flex flex-col items-center justify-center gap-4 text-center`,children:(0,j.jsx)(x,{size:`md`})})]})]})})};export{B as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,i as t,n,r,t as i}from"./rolldown-runtime-DAXXjFlN.js";import{n as a,t as o}from"./typeof-Ca-duI-z.js";var s=i(((e,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}})),c=i(((e,t)=>{var n=s();t.exports=function(){return n()&&!!Symbol.toStringTag}})),l=i(((e,t)=>{t.exports=Object})),u=i(((e,t)=>{t.exports=Error})),d=i(((e,t)=>{t.exports=EvalError})),f=i(((e,t)=>{t.exports=RangeError})),p=i(((e,t)=>{t.exports=ReferenceError})),m=i(((e,t)=>{t.exports=SyntaxError})),h=i(((e,t)=>{t.exports=TypeError})),g=i(((e,t)=>{t.exports=URIError})),_=i(((e,t)=>{t.exports=Math.abs})),v=i(((e,t)=>{t.exports=Math.floor})),y=i(((e,t)=>{t.exports=Math.max})),b=i(((e,t)=>{t.exports=Math.min})),x=i(((e,t)=>{t.exports=Math.pow})),S=i(((e,t)=>{t.exports=Math.round})),C=i(((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}})),w=i(((e,t)=>{var n=C();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}})),T=i(((e,t)=>{t.exports=Object.getOwnPropertyDescriptor})),E=i(((e,t)=>{var n=T();if(n)try{n([],`length`)}catch{n=null}t.exports=n})),D=i(((e,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n})),O=i(((e,t)=>{var n=typeof Symbol<`u`&&Symbol,r=s();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}})),k=i(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null})),A=i(((e,t)=>{t.exports=l().getPrototypeOf||null})),j=i(((e,t)=>{var n=Object.prototype.toString,r=Math.max,i=`[object Function]`,a=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},o=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},s=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||n.apply(t)!==i)throw TypeError(`Function.prototype.bind called on incompatible `+t);for(var c=o(arguments,1),l,u=function(){if(this instanceof l){var n=t.apply(this,a(c,arguments));return Object(n)===n?n:this}return t.apply(e,a(c,arguments))},d=r(0,t.length-c.length),f=[],p=0;p<d;p++)f[p]=`$`+p;if(l=Function(`binder`,`return function (`+s(f,`,`)+`){ return binder.apply(this,arguments); }`)(u),t.prototype){var m=function(){};m.prototype=t.prototype,l.prototype=new m,m.prototype=null}return l}})),M=i(((e,t)=>{var n=j();t.exports=Function.prototype.bind||n})),ee=i(((e,t)=>{t.exports=Function.prototype.call})),N=i(((e,t)=>{t.exports=Function.prototype.apply})),P=i(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply})),F=i(((e,t)=>{var n=M(),r=N(),i=ee();t.exports=P()||n.call(i,r)})),I=i(((e,t)=>{var n=M(),r=h(),i=ee(),a=F();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}})),L=i(((e,t)=>{var n=I(),r=E(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`?function(e){return s(e==null?e:o(e))}:!1})),R=i(((e,t)=>{var n=k(),r=A(),i=L();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null})),z=i(((e,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=M().call(n,r)})),B=i(((e,t)=>{var n,r=l(),i=u(),a=d(),o=f(),s=p(),c=m(),C=h(),T=g(),j=_(),P=v(),F=y(),I=b(),L=x(),B=S(),V=w(),te=Function,H=function(e){try{return te(`"use strict"; return (`+e+`).constructor;`)()}catch{}},U=E(),ne=D(),re=function(){throw new C},ie=U?function(){try{return arguments.callee,re}catch{try{return U(arguments,`callee`).get}catch{return re}}}():re,W=O()(),G=R(),ae=A(),oe=k(),se=N(),K=ee(),q={},ce=typeof Uint8Array>`u`||!G?n:G(Uint8Array),J={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":W&&G?G([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":q,"%AsyncGenerator%":q,"%AsyncGeneratorFunction%":q,"%AsyncIteratorPrototype%":q,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":te,"%GeneratorFunction%":q,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":W&&G?G(G([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!W||!G?n:G(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":U,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!W||!G?n:G(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":W&&G?G(``[Symbol.iterator]()):n,"%Symbol%":W?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":ie,"%TypedArray%":ce,"%TypeError%":C,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":T,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":K,"%Function.prototype.apply%":se,"%Object.defineProperty%":ne,"%Object.getPrototypeOf%":ae,"%Math.abs%":j,"%Math.floor%":P,"%Math.max%":F,"%Math.min%":I,"%Math.pow%":L,"%Math.round%":B,"%Math.sign%":V,"%Reflect.getPrototypeOf%":oe};if(G)try{null.error}catch(e){J[`%Error.prototype%`]=G(G(e))}var le=function e(t){var n;if(t===`%AsyncFunction%`)n=H(`async function () {}`);else if(t===`%GeneratorFunction%`)n=H(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=H(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&G&&(n=G(i.prototype))}return J[t]=n,n},ue={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},Y=M(),de=z(),fe=Y.call(K,Array.prototype.concat),X=Y.call(se,Array.prototype.splice),Z=Y.call(K,String.prototype.replace),Q=Y.call(K,String.prototype.slice),$=Y.call(K,RegExp.prototype.exec),pe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,me=/\\(\\)?/g,he=function(e){var t=Q(e,0,1),n=Q(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return Z(e,pe,function(e,t,n,i){r[r.length]=n?Z(i,me,`$1`):t||e}),r},ge=function(e,t){var n=e,r;if(de(ue,n)&&(r=ue[n],n=`%`+r[0]+`%`),de(J,n)){var i=J[n];if(i===q&&(i=le(n)),i===void 0&&!t)throw new C(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new C(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new C(`"allowMissing" argument must be a boolean`);if($(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=he(e),r=n.length>0?n[0]:``,i=ge(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,l=i.alias;l&&(r=l[0],X(n,fe([0,1],l)));for(var u=1,d=!0;u<n.length;u+=1){var f=n[u],p=Q(f,0,1),m=Q(f,-1);if((p===`"`||p===`'`||p==="`"||m===`"`||m===`'`||m==="`")&&p!==m)throw new c(`property names with quotes must have matching quotes`);if((f===`constructor`||!d)&&(s=!0),r+=`.`+f,a=`%`+r+`%`,de(J,a))o=J[a];else if(o!=null){if(!(f in o)){if(!t)throw new C(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(U&&u+1>=n.length){var h=U(o,f);d=!!h,o=d&&`get`in h&&!(`originalValue`in h.get)?h.get:o[f]}else d=de(o,f),o=o[f];d&&!s&&(J[a]=o)}}return o}})),V=i(((e,t)=>{var n=B(),r=I(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}})),te=i(((e,t)=>{var n=c()(),r=V()(`Object.prototype.toString`),i=function(e){return n&&e&&typeof e==`object`&&Symbol.toStringTag in e?!1:r(e)===`[object Arguments]`},a=function(e){return i(e)?!0:typeof e==`object`&&!!e&&`length`in e&&typeof e.length==`number`&&e.length>=0&&r(e)!==`[object Array]`&&`callee`in e&&r(e.callee)===`[object Function]`},o=function(){return i(arguments)}();i.isLegacyArguments=a,t.exports=o?i:a})),H=i(((e,t)=>{var n=V(),r=c()(),i=z(),a=E(),o;if(r){var s=n(`RegExp.prototype.exec`),l={},u=function(){throw l},d={toString:u,valueOf:u};typeof Symbol.toPrimitive==`symbol`&&(d[Symbol.toPrimitive]=u),o=function(e){if(!e||typeof e!=`object`)return!1;var t=a(e,`lastIndex`);if(!(t&&i(t,`value`)))return!1;try{s(e,d)}catch(e){return e===l}}}else{var f=n(`Object.prototype.toString`),p=`[object RegExp]`;o=function(e){return!e||typeof e!=`object`&&typeof e!=`function`?!1:f(e)===p}}t.exports=o})),U=i(((e,t)=>{var n=V(),r=H(),i=n(`RegExp.prototype.exec`),a=h();t.exports=function(e){if(!r(e))throw new a("`regex` must be a RegExp");return function(t){return i(e,t)!==null}}})),ne=i(((e,t)=>{var n=function*(){}.constructor;t.exports=()=>n})),re=i(((e,t)=>{var n=V(),r=U()(/^\s*(?:function)?\*/),i=c()(),a=R(),o=n(`Object.prototype.toString`),s=n(`Function.prototype.toString`),l=ne();t.exports=function(e){if(typeof e!=`function`)return!1;if(r(s(e)))return!0;if(!i)return o(e)===`[object GeneratorFunction]`;if(!a)return!1;var t=l();return t&&a(e)===t.prototype}})),ie=i(((e,t)=>{var n=Function.prototype.toString,r=typeof Reflect==`object`&&Reflect!==null&&Reflect.apply,i,a;if(typeof r==`function`&&typeof Object.defineProperty==`function`)try{i=Object.defineProperty({},"length",{get:function(){throw a}}),a={},r(function(){throw 42},null,i)}catch(e){e!==a&&(r=null)}else r=null;var o=/^\s*class\b/,s=function(e){try{var t=n.call(e);return o.test(t)}catch{return!1}},c=function(e){try{return s(e)?!1:(n.call(e),!0)}catch{return!1}},l=Object.prototype.toString,u=`[object Object]`,d=`[object Function]`,f=`[object GeneratorFunction]`,p=`[object HTMLAllCollection]`,m=`[object HTML document.all class]`,h=`[object HTMLCollection]`,g=typeof Symbol==`function`&&!!Symbol.toStringTag,_=!(0 in[,]),v=function(){return!1};if(typeof document==`object`){var y=document.all;l.call(y)===l.call(document.all)&&(v=function(e){if((_||!e)&&(e===void 0||typeof e==`object`))try{var t=l.call(e);return(t===p||t===m||t===h||t===u)&&e(``)==null}catch{}return!1})}t.exports=r?function(e){if(v(e))return!0;if(!e||typeof e!=`function`&&typeof e!=`object`)return!1;try{r(e,null,i)}catch(e){if(e!==a)return!1}return!s(e)&&c(e)}:function(e){if(v(e))return!0;if(!e||typeof e!=`function`&&typeof e!=`object`)return!1;if(g)return c(e);if(s(e))return!1;var t=l.call(e);return t!==d&&t!==f&&!/^\[object HTML/.test(t)?!1:c(e)}})),W=i(((e,t)=>{var n=ie(),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,a=function(e,t,n){for(var r=0,a=e.length;r<a;r++)i.call(e,r)&&(n==null?t(e[r],r,e):t.call(n,e[r],r,e))},o=function(e,t,n){for(var r=0,i=e.length;r<i;r++)n==null?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)},s=function(e,t,n){for(var r in e)i.call(e,r)&&(n==null?t(e[r],r,e):t.call(n,e[r],r,e))};function c(e){return r.call(e)===`[object Array]`}t.exports=function(e,t,r){if(!n(t))throw TypeError(`iterator must be a function`);var i;arguments.length>=3&&(i=r),c(e)?a(e,t,i):typeof e==`string`?o(e,t,i):s(e,t,i)}})),G=i(((e,t)=>{t.exports=[`Float16Array`,`Float32Array`,`Float64Array`,`Int8Array`,`Int16Array`,`Int32Array`,`Uint8Array`,`Uint8ClampedArray`,`Uint16Array`,`Uint32Array`,`BigInt64Array`,`BigUint64Array`]})),ae=i(((e,t)=>{var n=G(),r=typeof globalThis>`u`?global:globalThis;t.exports=function(){for(var e=[],t=0;t<n.length;t++)typeof r[n[t]]==`function`&&(e[e.length]=n[t]);return e}})),oe=i(((e,t)=>{var n=D(),r=m(),i=h(),a=E();t.exports=function(e,t,o){if(!e||typeof e!=`object`&&typeof e!=`function`)throw new i("`obj` must be an object or a function`");if(typeof t!=`string`&&typeof t!=`symbol`)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=`boolean`&&arguments[3]!==null)throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=`boolean`&&arguments[4]!==null)throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=`boolean`&&arguments[5]!==null)throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=`boolean`)throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6?arguments[6]:!1,d=!!a&&a(e,t);if(n)n(e,t,{configurable:l===null&&d?d.configurable:!l,enumerable:s===null&&d?d.enumerable:!s,value:o,writable:c===null&&d?d.writable:!c});else if(u||!s&&!c&&!l)e[t]=o;else throw new r(`This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.`)}})),se=i(((e,t)=>{var n=D(),r=function(){return!!n};r.hasArrayLengthDefineBug=function(){if(!n)return null;try{return n([],`length`,{value:1}).length!==1}catch{return!0}},t.exports=r})),K=i(((e,t)=>{var n=B(),r=oe(),i=se()(),a=E(),o=h(),s=n(`%Math.floor%`);t.exports=function(e,t){if(typeof e!=`function`)throw new o("`fn` is not a function");if(typeof t!=`number`||t<0||t>4294967295||s(t)!==t)throw new o("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],c=!0,l=!0;if(`length`in e&&a){var u=a(e,`length`);u&&!u.configurable&&(c=!1),u&&!u.writable&&(l=!1)}return(c||l||!n)&&(i?r(e,`length`,t,!0,!0):r(e,`length`,t)),e}})),q=i(((e,t)=>{var n=M(),r=N(),i=F();t.exports=function(){return i(n,r,arguments)}})),ce=i(((e,t)=>{var n=K(),r=D(),i=I(),a=q();t.exports=function(e){var t=i(arguments),r=1+e.length-(arguments.length-1);return n(t,r>0?r:0,!0)},r?r(t.exports,`apply`,{value:a}):t.exports.apply=a})),J=i(((e,t)=>{var n=W(),r=ae(),i=ce(),a=V(),o=E(),s=R(),l=a(`Object.prototype.toString`),u=c()(),d=typeof globalThis>`u`?global:globalThis,f=r(),p=a(`String.prototype.slice`),m=a(`Array.prototype.indexOf`,!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},h={__proto__:null};u&&o&&s?n(f,function(e){var t=new d[e];if(Symbol.toStringTag in t&&s){var n=s(t),r=o(n,Symbol.toStringTag);if(!r&&n&&(r=o(s(n),Symbol.toStringTag)),r&&r.get){var a=i(r.get);h[`$`+e]=a}}}):n(f,function(e){var t=new d[e],n=t.slice||t.set;if(n){var r=i(n);h[`$`+e]=r}});function g(e){var t=!1;return n(h,function(n,r){if(!t)try{`$`+n(e)===r&&(t=p(r,1))}catch{}}),t}function _(e){var t=!1;return n(h,function(n,r){if(!t)try{n(e),t=p(r,1)}catch{}}),t}function v(e){return m(f,e)>-1}t.exports=function(e){if(!e||typeof e!=`object`)return!1;if(!u){var t=p(l(e),8,-1);return v(t)?t:t===`Object`?_(e):!1}return o?g(e):null}})),le=i(((e,t)=>{var n=J();t.exports=function(e){return!!n(e)}})),ue=i((e=>{var t=te(),n=re(),r=J(),i=le();function a(e){return e.call.bind(e)}var o=typeof BigInt<`u`,s=typeof Symbol<`u`,c=a(Object.prototype.toString),l=a(Number.prototype.valueOf),u=a(String.prototype.valueOf),d=a(Boolean.prototype.valueOf);if(o)var f=a(BigInt.prototype.valueOf);if(s)var p=a(Symbol.prototype.valueOf);function m(e,t){if(typeof e!=`object`)return!1;try{return t(e),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=n,e.isTypedArray=i;function h(e){return typeof Promise<`u`&&e instanceof Promise||typeof e==`object`&&!!e&&typeof e.then==`function`&&typeof e.catch==`function`}e.isPromise=h;function g(e){return typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):i(e)||R(e)}e.isArrayBufferView=g;function _(e){return r(e)===`Uint8Array`}e.isUint8Array=_;function v(e){return r(e)===`Uint8ClampedArray`}e.isUint8ClampedArray=v;function y(e){return r(e)===`Uint16Array`}e.isUint16Array=y;function b(e){return r(e)===`Uint32Array`}e.isUint32Array=b;function x(e){return r(e)===`Int8Array`}e.isInt8Array=x;function S(e){return r(e)===`Int16Array`}e.isInt16Array=S;function C(e){return r(e)===`Int32Array`}e.isInt32Array=C;function w(e){return r(e)===`Float32Array`}e.isFloat32Array=w;function T(e){return r(e)===`Float64Array`}e.isFloat64Array=T;function E(e){return r(e)===`BigInt64Array`}e.isBigInt64Array=E;function D(e){return r(e)===`BigUint64Array`}e.isBigUint64Array=D;function O(e){return c(e)===`[object Map]`}O.working=typeof Map<`u`&&O(new Map);function k(e){return typeof Map>`u`?!1:O.working?O(e):e instanceof Map}e.isMap=k;function A(e){return c(e)===`[object Set]`}A.working=typeof Set<`u`&&A(new Set);function j(e){return typeof Set>`u`?!1:A.working?A(e):e instanceof Set}e.isSet=j;function M(e){return c(e)===`[object WeakMap]`}M.working=typeof WeakMap<`u`&&M(new WeakMap);function ee(e){return typeof WeakMap>`u`?!1:M.working?M(e):e instanceof WeakMap}e.isWeakMap=ee;function N(e){return c(e)===`[object WeakSet]`}N.working=typeof WeakSet<`u`&&N(new WeakSet);function P(e){return N(e)}e.isWeakSet=P;function F(e){return c(e)===`[object ArrayBuffer]`}F.working=typeof ArrayBuffer<`u`&&F(new ArrayBuffer);function I(e){return typeof ArrayBuffer>`u`?!1:F.working?F(e):e instanceof ArrayBuffer}e.isArrayBuffer=I;function L(e){return c(e)===`[object DataView]`}L.working=typeof ArrayBuffer<`u`&&typeof DataView<`u`&&L(new DataView(new ArrayBuffer(1),0,1));function R(e){return typeof DataView>`u`?!1:L.working?L(e):e instanceof DataView}e.isDataView=R;var z=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:void 0;function B(e){return c(e)===`[object SharedArrayBuffer]`}function V(e){return z===void 0?!1:(B.working===void 0&&(B.working=B(new z)),B.working?B(e):e instanceof z)}e.isSharedArrayBuffer=V;function H(e){return c(e)===`[object AsyncFunction]`}e.isAsyncFunction=H;function U(e){return c(e)===`[object Map Iterator]`}e.isMapIterator=U;function ne(e){return c(e)===`[object Set Iterator]`}e.isSetIterator=ne;function ie(e){return c(e)===`[object Generator]`}e.isGeneratorObject=ie;function W(e){return c(e)===`[object WebAssembly.Module]`}e.isWebAssemblyCompiledModule=W;function G(e){return m(e,l)}e.isNumberObject=G;function ae(e){return m(e,u)}e.isStringObject=ae;function oe(e){return m(e,d)}e.isBooleanObject=oe;function se(e){return o&&m(e,f)}e.isBigIntObject=se;function K(e){return s&&m(e,p)}e.isSymbolObject=K;function q(e){return G(e)||ae(e)||oe(e)||se(e)||K(e)}e.isBoxedPrimitive=q;function ce(e){return typeof Uint8Array<`u`&&(I(e)||V(e))}e.isAnyArrayBuffer=ce,[`isProxy`,`isExternal`,`isModuleNamespaceObject`].forEach(function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw Error(t+` is not supported in userland`)}})})})),Y=i(((e,t)=>{t.exports=function(e){return e&&typeof e==`object`&&typeof e.copy==`function`&&typeof e.fill==`function`&&typeof e.readUInt8==`function`}})),de=i(((e,t)=>{typeof Object.create==`function`?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),fe=i((e=>{var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},n=/%[sdj%]/g;e.format=function(e){if(!x(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(o(arguments[r]));return t.join(` `)}for(var r=1,i=arguments,a=i.length,s=String(e).replace(n,function(e){if(e===`%%`)return`%`;if(r>=a)return e;switch(e){case`%s`:return String(i[r++]);case`%d`:return Number(i[r++]);case`%j`:try{return JSON.stringify(i[r++])}catch{return`[Circular]`}default:return e}}),c=i[r];r<a;c=i[++r])v(c)||!T(c)?s+=` `+c:s+=` `+o(c);return s},e.deprecate=function(t,n){if(typeof process<`u`&&process.noDeprecation===!0)return t;if(typeof process>`u`)return function(){return e.deprecate(t,n).apply(this,arguments)};var r=!1;function i(){if(!r){if(process.throwDeprecation)throw Error(n);process.traceDeprecation?console.trace(n):console.error(n),r=!0}return t.apply(this,arguments)}return i};var r={},i=/^$/;if({}.NODE_DEBUG){var a={}.NODE_DEBUG;a=a.replace(/[|\\{}()[\]^$+?.]/g,`\\$&`).replace(/\*/g,`.*`).replace(/,/g,`$|^`).toUpperCase(),i=RegExp(`^`+a+`$`,`i`)}e.debuglog=function(t){if(t=t.toUpperCase(),!r[t])if(i.test(t)){var n=process.pid;r[t]=function(){var r=e.format.apply(e,arguments);console.error(`%s %d: %s`,t,n,r)}}else r[t]=function(){};return r[t]};function o(t,n){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),_(n)?r.showHidden=n:n&&e._extend(r,n),C(r.showHidden)&&(r.showHidden=!1),C(r.depth)&&(r.depth=2),C(r.colors)&&(r.colors=!1),C(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),u(r,t,r.depth)}e.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:`cyan`,number:`yellow`,boolean:`yellow`,undefined:`grey`,null:`bold`,string:`green`,date:`magenta`,regexp:`red`};function s(e,t){var n=o.styles[t];return n?`\x1B[`+o.colors[n][0]+`m`+e+`\x1B[`+o.colors[n][1]+`m`:e}function c(e,t){return e}function l(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(t,n,r){if(t.customInspect&&n&&O(n.inspect)&&n.inspect!==e.inspect&&!(n.constructor&&n.constructor.prototype===n)){var i=n.inspect(r,t);return x(i)||(i=u(t,i,r)),i}var a=d(t,n);if(a)return a;var o=Object.keys(n),s=l(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(n)),D(n)&&(o.indexOf(`message`)>=0||o.indexOf(`description`)>=0))return f(n);if(o.length===0){if(O(n)){var c=n.name?`: `+n.name:``;return t.stylize(`[Function`+c+`]`,`special`)}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),`regexp`);if(E(n))return t.stylize(Date.prototype.toString.call(n),`date`);if(D(n))return f(n)}var _=``,v=!1,y=[`{`,`}`];if(g(n)&&(v=!0,y=[`[`,`]`]),O(n)&&(_=` [Function`+(n.name?`: `+n.name:``)+`]`),w(n)&&(_=` `+RegExp.prototype.toString.call(n)),E(n)&&(_=` `+Date.prototype.toUTCString.call(n)),D(n)&&(_=` `+f(n)),o.length===0&&(!v||n.length==0))return y[0]+_+y[1];if(r<0)return w(n)?t.stylize(RegExp.prototype.toString.call(n),`regexp`):t.stylize(`[Object]`,`special`);t.seen.push(n);var b=v?p(t,n,r,s,o):o.map(function(e){return m(t,n,r,s,e,v)});return t.seen.pop(),h(b,_,y)}function d(e,t){if(C(t))return e.stylize(`undefined`,`undefined`);if(x(t)){var n=`'`+JSON.stringify(t).replace(/^"|"$/g,``).replace(/'/g,`\\'`).replace(/\\"/g,`"`)+`'`;return e.stylize(n,`string`)}if(b(t))return e.stylize(``+t,`number`);if(_(t))return e.stylize(``+t,`boolean`);if(v(t))return e.stylize(`null`,`null`)}function f(e){return`[`+Error.prototype.toString.call(e)+`]`}function p(e,t,n,r,i){for(var a=[],o=0,s=t.length;o<s;++o)N(t,String(o))?a.push(m(e,t,n,r,String(o),!0)):a.push(``);return i.forEach(function(i){i.match(/^\d+$/)||a.push(m(e,t,n,r,i,!0))}),a}function m(e,t,n,r,i,a){var o,s,c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]};if(c.get?s=c.set?e.stylize(`[Getter/Setter]`,`special`):e.stylize(`[Getter]`,`special`):c.set&&(s=e.stylize(`[Setter]`,`special`)),N(r,i)||(o=`[`+i+`]`),s||(e.seen.indexOf(c.value)<0?(s=v(n)?u(e,c.value,null):u(e,c.value,n-1),s.indexOf(`
|
|
1
|
+
import{a as e,i as t,n,r,t as i}from"./rolldown-runtime-DAXXjFlN.js";import{c as a,s as o}from"./labels-DLL8dl-7.js";var s=i(((e,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}})),c=i(((e,t)=>{var n=s();t.exports=function(){return n()&&!!Symbol.toStringTag}})),l=i(((e,t)=>{t.exports=Object})),u=i(((e,t)=>{t.exports=Error})),d=i(((e,t)=>{t.exports=EvalError})),f=i(((e,t)=>{t.exports=RangeError})),p=i(((e,t)=>{t.exports=ReferenceError})),m=i(((e,t)=>{t.exports=SyntaxError})),h=i(((e,t)=>{t.exports=TypeError})),g=i(((e,t)=>{t.exports=URIError})),_=i(((e,t)=>{t.exports=Math.abs})),v=i(((e,t)=>{t.exports=Math.floor})),y=i(((e,t)=>{t.exports=Math.max})),b=i(((e,t)=>{t.exports=Math.min})),x=i(((e,t)=>{t.exports=Math.pow})),S=i(((e,t)=>{t.exports=Math.round})),C=i(((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}})),w=i(((e,t)=>{var n=C();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}})),T=i(((e,t)=>{t.exports=Object.getOwnPropertyDescriptor})),E=i(((e,t)=>{var n=T();if(n)try{n([],`length`)}catch{n=null}t.exports=n})),D=i(((e,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n})),O=i(((e,t)=>{var n=typeof Symbol<`u`&&Symbol,r=s();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}})),k=i(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null})),A=i(((e,t)=>{t.exports=l().getPrototypeOf||null})),j=i(((e,t)=>{var n=Object.prototype.toString,r=Math.max,i=`[object Function]`,a=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},o=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},s=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||n.apply(t)!==i)throw TypeError(`Function.prototype.bind called on incompatible `+t);for(var c=o(arguments,1),l,u=function(){if(this instanceof l){var n=t.apply(this,a(c,arguments));return Object(n)===n?n:this}return t.apply(e,a(c,arguments))},d=r(0,t.length-c.length),f=[],p=0;p<d;p++)f[p]=`$`+p;if(l=Function(`binder`,`return function (`+s(f,`,`)+`){ return binder.apply(this,arguments); }`)(u),t.prototype){var m=function(){};m.prototype=t.prototype,l.prototype=new m,m.prototype=null}return l}})),M=i(((e,t)=>{var n=j();t.exports=Function.prototype.bind||n})),ee=i(((e,t)=>{t.exports=Function.prototype.call})),N=i(((e,t)=>{t.exports=Function.prototype.apply})),P=i(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply})),F=i(((e,t)=>{var n=M(),r=N(),i=ee();t.exports=P()||n.call(i,r)})),I=i(((e,t)=>{var n=M(),r=h(),i=ee(),a=F();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}})),L=i(((e,t)=>{var n=I(),r=E(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`?function(e){return s(e==null?e:o(e))}:!1})),R=i(((e,t)=>{var n=k(),r=A(),i=L();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null})),z=i(((e,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=M().call(n,r)})),B=i(((e,t)=>{var n,r=l(),i=u(),a=d(),o=f(),s=p(),c=m(),C=h(),T=g(),j=_(),P=v(),F=y(),I=b(),L=x(),B=S(),V=w(),te=Function,H=function(e){try{return te(`"use strict"; return (`+e+`).constructor;`)()}catch{}},U=E(),ne=D(),re=function(){throw new C},ie=U?function(){try{return arguments.callee,re}catch{try{return U(arguments,`callee`).get}catch{return re}}}():re,W=O()(),G=R(),ae=A(),oe=k(),se=N(),K=ee(),q={},ce=typeof Uint8Array>`u`||!G?n:G(Uint8Array),J={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":W&&G?G([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":q,"%AsyncGenerator%":q,"%AsyncGeneratorFunction%":q,"%AsyncIteratorPrototype%":q,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":te,"%GeneratorFunction%":q,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":W&&G?G(G([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!W||!G?n:G(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":U,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!W||!G?n:G(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":W&&G?G(``[Symbol.iterator]()):n,"%Symbol%":W?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":ie,"%TypedArray%":ce,"%TypeError%":C,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":T,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":K,"%Function.prototype.apply%":se,"%Object.defineProperty%":ne,"%Object.getPrototypeOf%":ae,"%Math.abs%":j,"%Math.floor%":P,"%Math.max%":F,"%Math.min%":I,"%Math.pow%":L,"%Math.round%":B,"%Math.sign%":V,"%Reflect.getPrototypeOf%":oe};if(G)try{null.error}catch(e){J[`%Error.prototype%`]=G(G(e))}var le=function e(t){var n;if(t===`%AsyncFunction%`)n=H(`async function () {}`);else if(t===`%GeneratorFunction%`)n=H(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=H(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&G&&(n=G(i.prototype))}return J[t]=n,n},ue={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},Y=M(),de=z(),fe=Y.call(K,Array.prototype.concat),X=Y.call(se,Array.prototype.splice),Z=Y.call(K,String.prototype.replace),Q=Y.call(K,String.prototype.slice),$=Y.call(K,RegExp.prototype.exec),pe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,me=/\\(\\)?/g,he=function(e){var t=Q(e,0,1),n=Q(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return Z(e,pe,function(e,t,n,i){r[r.length]=n?Z(i,me,`$1`):t||e}),r},ge=function(e,t){var n=e,r;if(de(ue,n)&&(r=ue[n],n=`%`+r[0]+`%`),de(J,n)){var i=J[n];if(i===q&&(i=le(n)),i===void 0&&!t)throw new C(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new C(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new C(`"allowMissing" argument must be a boolean`);if($(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=he(e),r=n.length>0?n[0]:``,i=ge(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,l=i.alias;l&&(r=l[0],X(n,fe([0,1],l)));for(var u=1,d=!0;u<n.length;u+=1){var f=n[u],p=Q(f,0,1),m=Q(f,-1);if((p===`"`||p===`'`||p==="`"||m===`"`||m===`'`||m==="`")&&p!==m)throw new c(`property names with quotes must have matching quotes`);if((f===`constructor`||!d)&&(s=!0),r+=`.`+f,a=`%`+r+`%`,de(J,a))o=J[a];else if(o!=null){if(!(f in o)){if(!t)throw new C(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(U&&u+1>=n.length){var h=U(o,f);d=!!h,o=d&&`get`in h&&!(`originalValue`in h.get)?h.get:o[f]}else d=de(o,f),o=o[f];d&&!s&&(J[a]=o)}}return o}})),V=i(((e,t)=>{var n=B(),r=I(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}})),te=i(((e,t)=>{var n=c()(),r=V()(`Object.prototype.toString`),i=function(e){return n&&e&&typeof e==`object`&&Symbol.toStringTag in e?!1:r(e)===`[object Arguments]`},a=function(e){return i(e)?!0:typeof e==`object`&&!!e&&`length`in e&&typeof e.length==`number`&&e.length>=0&&r(e)!==`[object Array]`&&`callee`in e&&r(e.callee)===`[object Function]`},o=function(){return i(arguments)}();i.isLegacyArguments=a,t.exports=o?i:a})),H=i(((e,t)=>{var n=V(),r=c()(),i=z(),a=E(),o;if(r){var s=n(`RegExp.prototype.exec`),l={},u=function(){throw l},d={toString:u,valueOf:u};typeof Symbol.toPrimitive==`symbol`&&(d[Symbol.toPrimitive]=u),o=function(e){if(!e||typeof e!=`object`)return!1;var t=a(e,`lastIndex`);if(!(t&&i(t,`value`)))return!1;try{s(e,d)}catch(e){return e===l}}}else{var f=n(`Object.prototype.toString`),p=`[object RegExp]`;o=function(e){return!e||typeof e!=`object`&&typeof e!=`function`?!1:f(e)===p}}t.exports=o})),U=i(((e,t)=>{var n=V(),r=H(),i=n(`RegExp.prototype.exec`),a=h();t.exports=function(e){if(!r(e))throw new a("`regex` must be a RegExp");return function(t){return i(e,t)!==null}}})),ne=i(((e,t)=>{var n=function*(){}.constructor;t.exports=()=>n})),re=i(((e,t)=>{var n=V(),r=U()(/^\s*(?:function)?\*/),i=c()(),a=R(),o=n(`Object.prototype.toString`),s=n(`Function.prototype.toString`),l=ne();t.exports=function(e){if(typeof e!=`function`)return!1;if(r(s(e)))return!0;if(!i)return o(e)===`[object GeneratorFunction]`;if(!a)return!1;var t=l();return t&&a(e)===t.prototype}})),ie=i(((e,t)=>{var n=Function.prototype.toString,r=typeof Reflect==`object`&&Reflect!==null&&Reflect.apply,i,a;if(typeof r==`function`&&typeof Object.defineProperty==`function`)try{i=Object.defineProperty({},"length",{get:function(){throw a}}),a={},r(function(){throw 42},null,i)}catch(e){e!==a&&(r=null)}else r=null;var o=/^\s*class\b/,s=function(e){try{var t=n.call(e);return o.test(t)}catch{return!1}},c=function(e){try{return s(e)?!1:(n.call(e),!0)}catch{return!1}},l=Object.prototype.toString,u=`[object Object]`,d=`[object Function]`,f=`[object GeneratorFunction]`,p=`[object HTMLAllCollection]`,m=`[object HTML document.all class]`,h=`[object HTMLCollection]`,g=typeof Symbol==`function`&&!!Symbol.toStringTag,_=!(0 in[,]),v=function(){return!1};if(typeof document==`object`){var y=document.all;l.call(y)===l.call(document.all)&&(v=function(e){if((_||!e)&&(e===void 0||typeof e==`object`))try{var t=l.call(e);return(t===p||t===m||t===h||t===u)&&e(``)==null}catch{}return!1})}t.exports=r?function(e){if(v(e))return!0;if(!e||typeof e!=`function`&&typeof e!=`object`)return!1;try{r(e,null,i)}catch(e){if(e!==a)return!1}return!s(e)&&c(e)}:function(e){if(v(e))return!0;if(!e||typeof e!=`function`&&typeof e!=`object`)return!1;if(g)return c(e);if(s(e))return!1;var t=l.call(e);return t!==d&&t!==f&&!/^\[object HTML/.test(t)?!1:c(e)}})),W=i(((e,t)=>{var n=ie(),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,a=function(e,t,n){for(var r=0,a=e.length;r<a;r++)i.call(e,r)&&(n==null?t(e[r],r,e):t.call(n,e[r],r,e))},o=function(e,t,n){for(var r=0,i=e.length;r<i;r++)n==null?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)},s=function(e,t,n){for(var r in e)i.call(e,r)&&(n==null?t(e[r],r,e):t.call(n,e[r],r,e))};function c(e){return r.call(e)===`[object Array]`}t.exports=function(e,t,r){if(!n(t))throw TypeError(`iterator must be a function`);var i;arguments.length>=3&&(i=r),c(e)?a(e,t,i):typeof e==`string`?o(e,t,i):s(e,t,i)}})),G=i(((e,t)=>{t.exports=[`Float16Array`,`Float32Array`,`Float64Array`,`Int8Array`,`Int16Array`,`Int32Array`,`Uint8Array`,`Uint8ClampedArray`,`Uint16Array`,`Uint32Array`,`BigInt64Array`,`BigUint64Array`]})),ae=i(((e,t)=>{var n=G(),r=typeof globalThis>`u`?global:globalThis;t.exports=function(){for(var e=[],t=0;t<n.length;t++)typeof r[n[t]]==`function`&&(e[e.length]=n[t]);return e}})),oe=i(((e,t)=>{var n=D(),r=m(),i=h(),a=E();t.exports=function(e,t,o){if(!e||typeof e!=`object`&&typeof e!=`function`)throw new i("`obj` must be an object or a function`");if(typeof t!=`string`&&typeof t!=`symbol`)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=`boolean`&&arguments[3]!==null)throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=`boolean`&&arguments[4]!==null)throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=`boolean`&&arguments[5]!==null)throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=`boolean`)throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6?arguments[6]:!1,d=!!a&&a(e,t);if(n)n(e,t,{configurable:l===null&&d?d.configurable:!l,enumerable:s===null&&d?d.enumerable:!s,value:o,writable:c===null&&d?d.writable:!c});else if(u||!s&&!c&&!l)e[t]=o;else throw new r(`This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.`)}})),se=i(((e,t)=>{var n=D(),r=function(){return!!n};r.hasArrayLengthDefineBug=function(){if(!n)return null;try{return n([],`length`,{value:1}).length!==1}catch{return!0}},t.exports=r})),K=i(((e,t)=>{var n=B(),r=oe(),i=se()(),a=E(),o=h(),s=n(`%Math.floor%`);t.exports=function(e,t){if(typeof e!=`function`)throw new o("`fn` is not a function");if(typeof t!=`number`||t<0||t>4294967295||s(t)!==t)throw new o("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],c=!0,l=!0;if(`length`in e&&a){var u=a(e,`length`);u&&!u.configurable&&(c=!1),u&&!u.writable&&(l=!1)}return(c||l||!n)&&(i?r(e,`length`,t,!0,!0):r(e,`length`,t)),e}})),q=i(((e,t)=>{var n=M(),r=N(),i=F();t.exports=function(){return i(n,r,arguments)}})),ce=i(((e,t)=>{var n=K(),r=D(),i=I(),a=q();t.exports=function(e){var t=i(arguments),r=1+e.length-(arguments.length-1);return n(t,r>0?r:0,!0)},r?r(t.exports,`apply`,{value:a}):t.exports.apply=a})),J=i(((e,t)=>{var n=W(),r=ae(),i=ce(),a=V(),o=E(),s=R(),l=a(`Object.prototype.toString`),u=c()(),d=typeof globalThis>`u`?global:globalThis,f=r(),p=a(`String.prototype.slice`),m=a(`Array.prototype.indexOf`,!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},h={__proto__:null};u&&o&&s?n(f,function(e){var t=new d[e];if(Symbol.toStringTag in t&&s){var n=s(t),r=o(n,Symbol.toStringTag);if(!r&&n&&(r=o(s(n),Symbol.toStringTag)),r&&r.get){var a=i(r.get);h[`$`+e]=a}}}):n(f,function(e){var t=new d[e],n=t.slice||t.set;if(n){var r=i(n);h[`$`+e]=r}});function g(e){var t=!1;return n(h,function(n,r){if(!t)try{`$`+n(e)===r&&(t=p(r,1))}catch{}}),t}function _(e){var t=!1;return n(h,function(n,r){if(!t)try{n(e),t=p(r,1)}catch{}}),t}function v(e){return m(f,e)>-1}t.exports=function(e){if(!e||typeof e!=`object`)return!1;if(!u){var t=p(l(e),8,-1);return v(t)?t:t===`Object`?_(e):!1}return o?g(e):null}})),le=i(((e,t)=>{var n=J();t.exports=function(e){return!!n(e)}})),ue=i((e=>{var t=te(),n=re(),r=J(),i=le();function a(e){return e.call.bind(e)}var o=typeof BigInt<`u`,s=typeof Symbol<`u`,c=a(Object.prototype.toString),l=a(Number.prototype.valueOf),u=a(String.prototype.valueOf),d=a(Boolean.prototype.valueOf);if(o)var f=a(BigInt.prototype.valueOf);if(s)var p=a(Symbol.prototype.valueOf);function m(e,t){if(typeof e!=`object`)return!1;try{return t(e),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=n,e.isTypedArray=i;function h(e){return typeof Promise<`u`&&e instanceof Promise||typeof e==`object`&&!!e&&typeof e.then==`function`&&typeof e.catch==`function`}e.isPromise=h;function g(e){return typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):i(e)||R(e)}e.isArrayBufferView=g;function _(e){return r(e)===`Uint8Array`}e.isUint8Array=_;function v(e){return r(e)===`Uint8ClampedArray`}e.isUint8ClampedArray=v;function y(e){return r(e)===`Uint16Array`}e.isUint16Array=y;function b(e){return r(e)===`Uint32Array`}e.isUint32Array=b;function x(e){return r(e)===`Int8Array`}e.isInt8Array=x;function S(e){return r(e)===`Int16Array`}e.isInt16Array=S;function C(e){return r(e)===`Int32Array`}e.isInt32Array=C;function w(e){return r(e)===`Float32Array`}e.isFloat32Array=w;function T(e){return r(e)===`Float64Array`}e.isFloat64Array=T;function E(e){return r(e)===`BigInt64Array`}e.isBigInt64Array=E;function D(e){return r(e)===`BigUint64Array`}e.isBigUint64Array=D;function O(e){return c(e)===`[object Map]`}O.working=typeof Map<`u`&&O(new Map);function k(e){return typeof Map>`u`?!1:O.working?O(e):e instanceof Map}e.isMap=k;function A(e){return c(e)===`[object Set]`}A.working=typeof Set<`u`&&A(new Set);function j(e){return typeof Set>`u`?!1:A.working?A(e):e instanceof Set}e.isSet=j;function M(e){return c(e)===`[object WeakMap]`}M.working=typeof WeakMap<`u`&&M(new WeakMap);function ee(e){return typeof WeakMap>`u`?!1:M.working?M(e):e instanceof WeakMap}e.isWeakMap=ee;function N(e){return c(e)===`[object WeakSet]`}N.working=typeof WeakSet<`u`&&N(new WeakSet);function P(e){return N(e)}e.isWeakSet=P;function F(e){return c(e)===`[object ArrayBuffer]`}F.working=typeof ArrayBuffer<`u`&&F(new ArrayBuffer);function I(e){return typeof ArrayBuffer>`u`?!1:F.working?F(e):e instanceof ArrayBuffer}e.isArrayBuffer=I;function L(e){return c(e)===`[object DataView]`}L.working=typeof ArrayBuffer<`u`&&typeof DataView<`u`&&L(new DataView(new ArrayBuffer(1),0,1));function R(e){return typeof DataView>`u`?!1:L.working?L(e):e instanceof DataView}e.isDataView=R;var z=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:void 0;function B(e){return c(e)===`[object SharedArrayBuffer]`}function V(e){return z===void 0?!1:(B.working===void 0&&(B.working=B(new z)),B.working?B(e):e instanceof z)}e.isSharedArrayBuffer=V;function H(e){return c(e)===`[object AsyncFunction]`}e.isAsyncFunction=H;function U(e){return c(e)===`[object Map Iterator]`}e.isMapIterator=U;function ne(e){return c(e)===`[object Set Iterator]`}e.isSetIterator=ne;function ie(e){return c(e)===`[object Generator]`}e.isGeneratorObject=ie;function W(e){return c(e)===`[object WebAssembly.Module]`}e.isWebAssemblyCompiledModule=W;function G(e){return m(e,l)}e.isNumberObject=G;function ae(e){return m(e,u)}e.isStringObject=ae;function oe(e){return m(e,d)}e.isBooleanObject=oe;function se(e){return o&&m(e,f)}e.isBigIntObject=se;function K(e){return s&&m(e,p)}e.isSymbolObject=K;function q(e){return G(e)||ae(e)||oe(e)||se(e)||K(e)}e.isBoxedPrimitive=q;function ce(e){return typeof Uint8Array<`u`&&(I(e)||V(e))}e.isAnyArrayBuffer=ce,[`isProxy`,`isExternal`,`isModuleNamespaceObject`].forEach(function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw Error(t+` is not supported in userland`)}})})})),Y=i(((e,t)=>{t.exports=function(e){return e&&typeof e==`object`&&typeof e.copy==`function`&&typeof e.fill==`function`&&typeof e.readUInt8==`function`}})),de=i(((e,t)=>{typeof Object.create==`function`?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),fe=i((e=>{var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},n=/%[sdj%]/g;e.format=function(e){if(!x(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(o(arguments[r]));return t.join(` `)}for(var r=1,i=arguments,a=i.length,s=String(e).replace(n,function(e){if(e===`%%`)return`%`;if(r>=a)return e;switch(e){case`%s`:return String(i[r++]);case`%d`:return Number(i[r++]);case`%j`:try{return JSON.stringify(i[r++])}catch{return`[Circular]`}default:return e}}),c=i[r];r<a;c=i[++r])v(c)||!T(c)?s+=` `+c:s+=` `+o(c);return s},e.deprecate=function(t,n){if(typeof process<`u`&&process.noDeprecation===!0)return t;if(typeof process>`u`)return function(){return e.deprecate(t,n).apply(this,arguments)};var r=!1;function i(){if(!r){if(process.throwDeprecation)throw Error(n);process.traceDeprecation?console.trace(n):console.error(n),r=!0}return t.apply(this,arguments)}return i};var r={},i=/^$/;if({}.NODE_DEBUG){var a={}.NODE_DEBUG;a=a.replace(/[|\\{}()[\]^$+?.]/g,`\\$&`).replace(/\*/g,`.*`).replace(/,/g,`$|^`).toUpperCase(),i=RegExp(`^`+a+`$`,`i`)}e.debuglog=function(t){if(t=t.toUpperCase(),!r[t])if(i.test(t)){var n=process.pid;r[t]=function(){var r=e.format.apply(e,arguments);console.error(`%s %d: %s`,t,n,r)}}else r[t]=function(){};return r[t]};function o(t,n){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),_(n)?r.showHidden=n:n&&e._extend(r,n),C(r.showHidden)&&(r.showHidden=!1),C(r.depth)&&(r.depth=2),C(r.colors)&&(r.colors=!1),C(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),u(r,t,r.depth)}e.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:`cyan`,number:`yellow`,boolean:`yellow`,undefined:`grey`,null:`bold`,string:`green`,date:`magenta`,regexp:`red`};function s(e,t){var n=o.styles[t];return n?`\x1B[`+o.colors[n][0]+`m`+e+`\x1B[`+o.colors[n][1]+`m`:e}function c(e,t){return e}function l(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(t,n,r){if(t.customInspect&&n&&O(n.inspect)&&n.inspect!==e.inspect&&!(n.constructor&&n.constructor.prototype===n)){var i=n.inspect(r,t);return x(i)||(i=u(t,i,r)),i}var a=d(t,n);if(a)return a;var o=Object.keys(n),s=l(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(n)),D(n)&&(o.indexOf(`message`)>=0||o.indexOf(`description`)>=0))return f(n);if(o.length===0){if(O(n)){var c=n.name?`: `+n.name:``;return t.stylize(`[Function`+c+`]`,`special`)}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),`regexp`);if(E(n))return t.stylize(Date.prototype.toString.call(n),`date`);if(D(n))return f(n)}var _=``,v=!1,y=[`{`,`}`];if(g(n)&&(v=!0,y=[`[`,`]`]),O(n)&&(_=` [Function`+(n.name?`: `+n.name:``)+`]`),w(n)&&(_=` `+RegExp.prototype.toString.call(n)),E(n)&&(_=` `+Date.prototype.toUTCString.call(n)),D(n)&&(_=` `+f(n)),o.length===0&&(!v||n.length==0))return y[0]+_+y[1];if(r<0)return w(n)?t.stylize(RegExp.prototype.toString.call(n),`regexp`):t.stylize(`[Object]`,`special`);t.seen.push(n);var b=v?p(t,n,r,s,o):o.map(function(e){return m(t,n,r,s,e,v)});return t.seen.pop(),h(b,_,y)}function d(e,t){if(C(t))return e.stylize(`undefined`,`undefined`);if(x(t)){var n=`'`+JSON.stringify(t).replace(/^"|"$/g,``).replace(/'/g,`\\'`).replace(/\\"/g,`"`)+`'`;return e.stylize(n,`string`)}if(b(t))return e.stylize(``+t,`number`);if(_(t))return e.stylize(``+t,`boolean`);if(v(t))return e.stylize(`null`,`null`)}function f(e){return`[`+Error.prototype.toString.call(e)+`]`}function p(e,t,n,r,i){for(var a=[],o=0,s=t.length;o<s;++o)N(t,String(o))?a.push(m(e,t,n,r,String(o),!0)):a.push(``);return i.forEach(function(i){i.match(/^\d+$/)||a.push(m(e,t,n,r,i,!0))}),a}function m(e,t,n,r,i,a){var o,s,c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]};if(c.get?s=c.set?e.stylize(`[Getter/Setter]`,`special`):e.stylize(`[Getter]`,`special`):c.set&&(s=e.stylize(`[Setter]`,`special`)),N(r,i)||(o=`[`+i+`]`),s||(e.seen.indexOf(c.value)<0?(s=v(n)?u(e,c.value,null):u(e,c.value,n-1),s.indexOf(`
|
|
2
2
|
`)>-1&&(s=a?s.split(`
|
|
3
3
|
`).map(function(e){return` `+e}).join(`
|
|
4
4
|
`).slice(2):`
|
package/core/built/admin/assets/{onboarding-route-BDaa9hd3.js → onboarding-route-SS-e9Aeb.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-Bb3IsNbi.js";import{t as n}from"./jsx-runtime-CtMZ-PAS.js";import{g as r}from"./chunk-KS7C4IRE-DG9HTHQ3.js";import{a as i,t as a}from"./router-provider-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-Bb3IsNbi.js";import{t as n}from"./jsx-runtime-CtMZ-PAS.js";import{g as r}from"./chunk-KS7C4IRE-DG9HTHQ3.js";import{a as i,t as a}from"./router-provider-S8Wf6jdu.js";import{Ln as o,Pt as s,W as c,_n as l,t as u}from"./button-DiwO9Rof.js";import{cn as d,mn as f,n as p,t as m,un as h}from"./index-B5yxmQNp.js";import{t as g}from"./share-modal-DTIFYNI1.js";var _=e(t(),1),v=``+new URL(`logo-loader-dark-CuSPz-zc.mp4`,import.meta.url).href,y=``+new URL(`logo-loader-88VPEpXE.mp4`,import.meta.url).href,b=n();function x(){return(0,b.jsxs)(`div`,{className:`relative mb-6 size-20`,children:[(0,b.jsx)(`video`,{"aria-hidden":`true`,autoPlay:!0,className:`size-20 dark:hidden`,height:80,loop:!0,muted:!0,playsInline:!0,preload:`metadata`,role:`presentation`,tabIndex:-1,width:80,children:(0,b.jsx)(`source`,{src:y,type:`video/mp4`})}),(0,b.jsx)(`video`,{"aria-hidden":`true`,autoPlay:!0,className:`hidden size-20 dark:block`,height:80,loop:!0,muted:!0,playsInline:!0,preload:`metadata`,role:`presentation`,tabIndex:-1,width:80,children:(0,b.jsx)(`source`,{src:v,type:`video/mp4`})}),(0,b.jsx)(`div`,{className:`pointer-events-none absolute inset-0 hidden bg-[hsl(216deg_11%_70%/1%)] dark:block`})]})}function S({complete:e,id:t,isBeforeNext:n,isLast:r,isNext:i,onClick:a,step:s}){let c=s.icon;return(0,b.jsxs)(`button`,{className:`group ${i?`relative z-10 -mx-8 flex w-[calc(100%+64px)] items-center justify-between rounded-md bg-background px-8 py-6 text-left shadow-[0_1px_0_rgba(17,17,26,0.05),0_0_8px_rgba(17,17,26,0.10)] transition-none dark:ring-1 dark:ring-border ${r?`-mb-[18px]`:`mb-1.5`}`:`relative flex w-full items-center justify-between bg-transparent py-6 text-left ${r||n||i?``:`after:absolute after:inset-x-0 after:bottom-0 after:h-px after:bg-border after:content-['']`}`}`,"data-testid":`onboarding-step-${s.id}`,id:t,type:`button`,onClick:a,children:[(0,b.jsxs)(`span`,{className:`flex min-w-0 items-center ${e?`opacity-20 group-hover:opacity-25`:`group-hover:opacity-90`}`,children:[(0,b.jsx)(c,{className:`mr-4 size-5 shrink-0 text-purple`}),(0,b.jsxs)(`span`,{className:`min-w-0 text-left`,children:[(0,b.jsx)(`span`,{className:`block truncate pr-8 text-[16px] leading-[1.3] font-bold text-foreground`,children:s.title}),i&&(0,b.jsx)(`span`,{className:`mt-1 block pr-8 text-[15px] leading-[1.4] text-muted-foreground`,children:s.description})]})]}),(0,b.jsx)(`span`,{className:`flex shrink-0 items-center transition-transform group-hover:translate-x-[5px] ${e?`text-green`:`text-purple`}`,children:e?(0,b.jsx)(l,{className:`size-5`}):(0,b.jsx)(o,{className:`size-3.5`})})]})}function C({allStepsCompleted:e,completedSteps:t,nextStep:n,onComplete:r,onDismiss:i,onStepClick:a,siteTitle:o}){let s=new Set(t);return(0,b.jsx)(`main`,{className:`relative flex min-h-screen flex-col items-center justify-center px-6 py-8`,children:(0,b.jsxs)(`section`,{className:`mt-[-48px] flex w-full flex-col items-center`,"data-test-dashboard":`onboarding-checklist`,"data-testid":`onboarding-checklist`,children:[(0,b.jsxs)(`div`,{className:`mb-8 flex flex-col items-center text-center`,children:[(0,b.jsx)(x,{}),e?(0,b.jsx)(`h1`,{className:`text-[32px] leading-[1.15] font-bold tracking-normal text-foreground max-[480px]:text-[24px]`,children:`You're all set.`}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`h1`,{className:`text-[32px] leading-[1.15] font-bold tracking-normal text-foreground max-[480px]:text-[24px]`,children:`Let's get started!`}),(0,b.jsxs)(`p`,{className:`mt-2 mb-0 text-[15px] text-muted-foreground max-[480px]:m-0 max-[480px]:text-[14px]`,children:[`Welcome! It's time to set up `,o,`.`]})]})]}),(0,b.jsxs)(`div`,{className:`w-full max-w-[540px] rounded-md border border-border bg-background px-6 pt-4 pb-1`,children:[(0,b.jsxs)(`div`,{className:`mt-[-12px] flex items-center justify-between py-6 ${n===`customize-design`?`border-b-0`:`border-b border-border`}`,children:[(0,b.jsxs)(`span`,{className:`flex min-w-0 items-center opacity-20`,children:[(0,b.jsx)(c,{className:`mr-4 size-5 shrink-0 text-purple`}),(0,b.jsx)(`span`,{className:`truncate pr-8 text-[16px] leading-[1.3] font-bold text-foreground`,children:`Start a new Ghost publication`})]}),(0,b.jsx)(`span`,{className:`shrink-0 text-green`,children:(0,b.jsx)(l,{className:`size-5`})})]}),p.map((e,t)=>(0,b.jsx)(S,{complete:s.has(e.id),id:`ob-${e.id}`,isBeforeNext:p[t+1]?.id===n,isLast:t===p.length-1,isNext:n===e.id,step:e,onClick:()=>a(e.id)},e.id))]}),e&&(0,b.jsx)(u,{className:`mt-6 h-auto w-full max-w-[540px] px-3 py-3 text-[16px] max-[480px]:text-[15px]`,"data-testid":`onboarding-complete`,id:`ob-completed`,type:`button`,onClick:r,children:`Explore your dashboard`}),(0,b.jsxs)(`p`,{className:`mt-8 mb-0 text-[15px] text-muted-foreground max-[480px]:text-[14px]`,children:[`More questions? Check out our`,` `,(0,b.jsx)(u,{asChild:!0,className:`h-auto p-0 align-baseline text-[15px] text-green hover:text-green/90 max-[480px]:text-[14px]`,variant:`link`,children:(0,b.jsx)(`a`,{href:`https://ghost.org/help?utm_source=admin&utm_campaign=onboarding`,id:`ob-help-center`,rel:`noreferrer`,target:`_blank`,children:`Help Center`})}),`.`]}),!e&&(0,b.jsx)(u,{className:`mt-6 h-[38px] overflow-hidden px-3.5 py-px text-[15px] font-normal whitespace-nowrap text-muted-foreground hover:border-gray-300 hover:text-foreground`,"data-testid":`onboarding-skip`,id:`ob-skip`,type:`button`,variant:`outline`,onClick:i,children:`Skip onboarding`})]})})}function w({description:e,imageUrl:t,onOpenChange:n,open:r,siteTitle:i,siteUrl:a}){let o=encodeURIComponent(a),c=[{href:`https://twitter.com/intent/tweet?url=${o}`,id:`ob-share-on-x`,label:`Share your publication on X`,service:`x`},{href:`https://threads.net/intent/post?text=${o}`,id:`ob-share-on-threads`,label:`Share your publication on Threads`,service:`threads`},{href:`https://www.facebook.com/sharer/sharer.php?u=${o}`,id:`ob-share-on-fb`,label:`Share your publication on Facebook`,service:`facebook`},{href:`https://www.linkedin.com/feed/?shareActive=true&text=${o}`,id:`ob-share-on-li`,label:`Share your publication on LinkedIn`,service:`linkedin`}];return(0,b.jsx)(g.Root,{open:r,onOpenChange:n,children:(0,b.jsxs)(g.Content,{className:`dark:bg-surface-elevated`,"data-test-modal":`onboarding-share`,"data-testid":`onboarding-share-modal`,children:[(0,b.jsxs)(g.Header,{className:`flex-row items-center justify-between gap-4 space-y-0 text-left`,children:[(0,b.jsx)(g.Title,{className:`text-2xl`,children:`Share your publication`}),(0,b.jsx)(g.CloseButton,{id:`ob-close-share-modal`,onClick:()=>n(!1)})]}),(0,b.jsxs)(g.Preview,{className:`rounded-lg bg-card`,href:a,children:[t?(0,b.jsx)(`div`,{className:`aspect-video bg-cover bg-center`,style:{backgroundImage:`url(${t})`}}):(0,b.jsx)(`div`,{className:`flex aspect-video items-center justify-center bg-muted text-muted-foreground`,children:(0,b.jsx)(s,{className:`size-8`})}),(0,b.jsxs)(`div`,{className:`p-5`,children:[(0,b.jsx)(`div`,{className:`text-lg font-semibold`,children:i}),e&&(0,b.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:e})]})]}),(0,b.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Set your publication's cover image and description in`,` `,(0,b.jsx)(u,{asChild:!0,className:`h-auto p-0 align-baseline text-sm text-green hover:text-green/90`,variant:`link`,children:(0,b.jsx)(`a`,{href:`#/settings/design/edit?ref=setup`,id:`ob-share-modal-design-settings`,children:`Design settings`})}),`.`]}),(0,b.jsxs)(g.Footer,{children:[(0,b.jsx)(g.SocialLinks,{links:c}),(0,b.jsx)(g.CopyButton,{className:`ml-0! grow cursor-pointer`,copyURL:a,"data-testid":`onboarding-copy-link`,icon:`link`,id:`ob-copy-publication-link`,label:`Copy link`})]})]})})}function T(e){return e&&/^\/analytics(?:\/|\?|$)/.test(e)?e:`/analytics`}function E(){let e=i(),[t]=r(),n=T(t.get(`returnTo`)),o=m(),s=f(),c=d(),l=(0,_.useRef)(!1),[u,g]=(0,_.useState)(!1),[v,y]=(0,_.useState)(!1),x=String(h(s.data?.settings,`title`)||c.data?.site.title||`your publication`),S=String(h(s.data?.settings,`description`)||c.data?.site.description||``),E=String(h(s.data?.settings,`cover_image`)||``),D=c.data?.site.url||`/`,{allStepsCompleted:O,completeChecklist:k,completedSteps:A,dismissChecklist:j,shouldShowChecklist:M,isLoading:N,markStepCompleted:P,nextStep:F}=o;if(N||c.isLoading||u||l.current)return null;if(!M)return(0,b.jsx)(a,{crossApp:!0,replace:!0,to:n});let I=async t=>{l.current=!0,g(!0);try{await t(),e(n,{crossApp:!0,replace:!0})}catch(e){l.current=!1,g(!1),console.error(e)}},L=async t=>{if(t===`share-publication`){await P(t),y(!0);return}await P(t);let n=p.find(({id:e})=>e===t)?.route;n&&e(n,{crossApp:!0})};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(C,{allStepsCompleted:O,completedSteps:A,nextStep:F,siteTitle:x,onComplete:()=>{I(k)},onDismiss:()=>{I(j)},onStepClick:e=>{L(e)}}),(0,b.jsx)(w,{description:S,imageUrl:E,open:v,siteTitle:x,siteUrl:D,onOpenChange:y})]})}export{E as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-Bb3IsNbi.js";import{t as n}from"./jsx-runtime-CtMZ-PAS.js";import{t as r}from"./use-tinybird-query-BSL3iVCc.js";import{C as i,S as a,v as o,y as s}from"./stats-DkqCtrPh.js";import{i as c,o as l}from"./post-helpers-C5OQMBoi.js";import{m as u}from"./chunk-KS7C4IRE-DG9HTHQ3.js";import{a as d}from"./router-provider-S8Wf6jdu.js";import{P as f,Rt as p,Xn as m,Zn as h,jt as g,t as _,wt as v,zt as y}from"./button-DiwO9Rof.js";import{a as b,o as x,r as S,t as C}from"./link-helpers-DHG_8GIT.js";import{t as w}from"./gh-chart-Cqy9gGq7.js";import{n as T,r as ee,t as te}from"./post-analytics-header-xTjcg4H0.js";import{c as E,l as D,n as ne,o as re,r as O,s as k,t as ie,u as A}from"./data-list-D3nkd86L.js";import{t as j}from"./empty-indicator-Cl63eDpB.js";import{Dn as M,Pi as ae,ai as N,c as oe,cr as P,dr as se,jn as F,kn as I,pr as ce,ur as le}from"./index-B5yxmQNp.js";import{t as ue}from"./disabled-sources-indicator-ChHTF69d.js";import{n as L,r as R,t as z}from"./kpi-card-DyDbok3h.js";import{t as B}from"./use-analytics-data-DXG7mpgK.js";import{a as V,n as H,r as U,t as W}from"./kpi-card-B2y2dMMS.js";import{t as de}from"./gift-links-bR_JDdWo.js";import{r as fe,t as pe}from"./gift-link-modal-v55u0VUL.js";import{n as me}from"./post-analytics-context-C8t_048I.js";import{n as he,t as ge}from"./use-post-referrers-B-onYbuS.js";import{n as _e,r as G}from"./kpi-helpers-Bx9IHIMq.js";var K=e(t(),1),q=n(),ve=({post:e,isNewsletterStatsLoading:t,isWebShown:n})=>{let{postId:r}=u(),c=d(),l=(0,K.useMemo)(()=>{let t=e.email?.opened_count||0,n=e.email?.email_count||0,r=e.count?.clicks||0;return{opened:t,clicked:r,openedRate:n>0?t/n:0,clickedRate:n>0?r/n:0,sent:n}},[e]),{data:f}=b({searchParams:{filter:`post_id:'${r}'`}}),p=(0,K.useMemo)(()=>S(f),[f]),y=[{datatype:`Clicked`,value:l.clickedRate,fill:`url(#gradientTeal)`,color:`var(--chart-teal)`},{datatype:`Opened`,value:l.openedRate,fill:`url(#gradientBlue)`,color:`var(--chart-blue)`}],w={percentage:{label:`Opened`},Average:{label:`Clicked`},"This newsletter":{label:`Opened`}},T=e.email_only||!n;return(0,q.jsxs)(o,{className:`group/datalist overflow-hidden ${T&&`col-span-2`}`,children:[(0,q.jsxs)(`div`,{className:`relative flex items-center justify-between gap-6`,children:[(0,q.jsx)(a,{children:(0,q.jsxs)(i,{className:`flex items-center gap-1.5 text-lg`,children:[(0,q.jsx)(v,{size:16,strokeWidth:1.5}),`Newsletter performance`]})}),(0,q.jsx)(_,{className:`absolute right-6 translate-x-10 opacity-0 transition-all duration-300 group-hover/datalist:translate-x-0 group-hover/datalist:opacity-100 focus-visible:translate-x-0 focus-visible:opacity-100`,size:`sm`,variant:`outline`,onClick:()=>{c(`/posts/analytics/${r}/newsletter`)},children:`View more`})]}),t?(0,q.jsx)(s,{children:(0,q.jsx)(`div`,{className:`mx-auto flex min-h-[250px] items-center justify-center xl:size-full`,children:(0,q.jsx)(M,{})})}):(0,q.jsxs)(s,{className:`${T&&`grid grid-cols-2`}`,children:[(0,q.jsxs)(`div`,{className:`${T&&`border-r pr-6`}`,children:[(0,q.jsxs)(`div`,{className:`grid grid-cols-2 gap-6`,children:[(0,q.jsx)(z,{className:`group relative flex grow flex-row items-start justify-between gap-5 border-none px-0 pt-0`,children:(0,q.jsxs)(`div`,{className:`flex grow flex-col gap-1.5 border-none pb-0`,children:[(0,q.jsx)(L,{color:`var(--chart-blue)`,children:`Open rate`}),(0,q.jsx)(R,{value:h(l.openedRate)})]})}),(0,q.jsx)(z,{className:`group relative flex grow flex-row items-start justify-between gap-5 border-none px-0 pt-0`,children:(0,q.jsxs)(`div`,{className:`flex grow flex-col gap-1.5 border-none pb-0`,children:[(0,q.jsx)(L,{color:`var(--chart-teal)`,children:`Click rate`}),(0,q.jsx)(R,{value:h(l.clickedRate)})]})})]}),!T&&(0,q.jsx)(F,{}),(0,q.jsx)(`div`,{className:`mx-auto my-6 h-[240px]`,children:(0,q.jsx)(x,{className:`pointer-events-none aspect-square h-[240px]`,config:w,data:y,tooltip:!1})})]}),(0,q.jsxs)(`div`,{className:`${T&&`pl-6`}`,children:[!T&&(0,q.jsx)(F,{}),(0,q.jsxs)(`div`,{className:T?``:`pt-3`,children:[(0,q.jsxs)(`div`,{className:`flex items-center justify-between gap-3 ${T?`pb-3`:`py-3`}`,children:[(0,q.jsx)(`span`,{className:`font-medium text-muted-foreground`,children:`Top clicked links in this email`}),(0,q.jsx)(N,{children:`Members`})]}),p.length>0?(0,q.jsx)(ie,{className:``,children:(0,q.jsx)(O,{children:p.slice(0,T?10:5).map(e=>{let t=l.clicked>0?e.count/l.clicked:0;return(0,q.jsxs)(A,{children:[(0,q.jsx)(ne,{style:{width:`${t?Math.round(t*100):0}%`}}),(0,q.jsx)(re,{children:(0,q.jsxs)(`div`,{className:`flex items-center space-x-2 overflow-hidden`,children:[(0,q.jsx)(g,{className:`shrink-0 text-muted-foreground`,size:16,strokeWidth:1.5}),(0,q.jsx)(`a`,{className:`block truncate font-medium hover:underline`,href:e.link.to,rel:`noreferrer`,target:`_blank`,title:e.link.to,children:C(e.link.to,!0)})]})}),(0,q.jsxs)(k,{children:[(0,q.jsx)(E,{children:m(e.count||0)}),(0,q.jsx)(D,{children:h(t)})]})]},e.link.link_id)})})}):(0,q.jsx)(`div`,{className:`py-20 text-center text-sm text-gray-700`,children:`You have no links in your post.`})]})]})]})]})},ye=({chartData:e,range:t,isLoading:n,visitors:r,sourcesData:c,isNewsletterShown:l=!0})=>{let{postId:f}=u(),h=d(),{site:g}=B(),v=g.url,y=g.icon,b=(0,K.useMemo)(()=>c?c.reduce((e,t)=>e+Number(t.visits||0),0):0,[c]);return(0,q.jsx)(q.Fragment,{children:(0,q.jsxs)(o,{className:`group/datalist overflow-hidden ${!l&&`col-span-2`}`,"data-testid":`web-performance`,children:[(0,q.jsxs)(`div`,{className:`relative flex items-center justify-between gap-6`,children:[(0,q.jsx)(a,{children:(0,q.jsxs)(i,{className:`flex items-center gap-1.5 text-lg`,children:[(0,q.jsx)(p,{size:16,strokeWidth:1.5}),`Web performance`]})}),(0,q.jsx)(_,{className:`absolute right-6 translate-x-10 opacity-0 transition-all duration-300 group-hover/datalist:translate-x-0 group-hover/datalist:opacity-100 focus-visible:translate-x-0 focus-visible:opacity-100`,size:`sm`,variant:`outline`,onClick:()=>{h(`/posts/analytics/${f}/web`)},children:`View more`})]}),(0,q.jsxs)(s,{children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(z,{className:`group relative flex grow flex-row items-start justify-between gap-5 border-none px-0 pt-0`,"data-testid":`unique-visitors`,children:(0,q.jsxs)(`div`,{className:`flex grow flex-col gap-1.5 border-none pb-0`,children:[(0,q.jsx)(L,{color:`var(--chart-blue)`,children:`Unique visitors`}),(0,q.jsx)(R,{value:m(r)})]})}),(0,q.jsx)(F,{}),(0,q.jsx)(`div`,{className:`max-h-[288px] py-6 [&_.recharts-cartesian-axis-tick-value]:fill-gray-500`,children:n?(0,q.jsx)(`div`,{className:`flex h-[16vw] min-h-[240px] items-center justify-center`,children:(0,q.jsx)(M,{})}):(0,q.jsx)(w,{className:`aspect-auto h-[240px] w-full`,color:`var(--chart-blue)`,data:e||[],id:`visitors`,range:t,syncId:`overview-charts`})})]}),l&&(0,q.jsxs)(`div`,{className:l?`border-t pt-3`:`-mt-3`,children:[(0,q.jsx)(`div`,{children:(0,q.jsxs)(`div`,{className:`flex items-center justify-between gap-3 py-3`,children:[(0,q.jsx)(`span`,{className:`font-medium text-muted-foreground`,children:`How readers found this post`}),(0,q.jsx)(N,{children:`Visitors`})]})}),c&&c.length>0?(0,q.jsx)(G,{data:c,range:t,siteIcon:y,siteUrl:v,tableOnly:!0,topSourcesLimit:5,totalVisitors:b}):(0,q.jsx)(j,{className:`h-full py-10`,description:`Once someone visits this post, sources will show here`,title:`No visitors since you published this post`,children:(0,q.jsx)(p,{strokeWidth:1.5})})]})]})]})})},J=()=>{let e=d(),{statsConfig:t,isLoading:n}=B(),{post:u,isPostLoading:p,postId:h}=me(),{totals:g,isLoading:v,currencySymbol:b}=ge(h),{appSettings:x}=ae(),{emailTrackClicks:S,emailTrackOpens:C}=x?.analytics||{},w=x?.analytics?.webAnalytics===!0,E=T(u),{token:D,isLoading:ne,error:re}=de(h,{enabled:E}),{usage:O,loading:k,error:ie}=fe({postUuid:u?.uuid,token:D,tokenLoading:ne,tokenError:re,enabled:E}),[A,j]=(0,K.useState)(!1),N=(0,K.useMemo)(()=>u?.published_at?se(u.published_at):oe.allTime.value,[u?.published_at]),{startDate:F,endDate:L,timezone:R}=le(N),z=(0,K.useMemo)(()=>{let e={site_uuid:t?.id||``,date_from:P(F),date_to:P(L),timezone:R,post_uuid:``};return!p&&u?.uuid?{...e,post_uuid:u.uuid}:e},[p,u,t?.id,F,L,R]),{data:G,loading:J}=r({endpoint:`api_kpis`,statsConfig:t,params:z}),be=(0,K.useMemo)(()=>G?.length?G.reduce((e,t)=>{let n=Number(t.visits);return e+(isNaN(n)?0:n)},0):0,[G]),Y=_e.visits,xe=ce(G||[],N,Y.dataKey,`sum`)?.map(e=>{let t=Number(e[Y.dataKey]);return{date:String(e.date),value:t,formattedValue:Y.formatter(t),label:Y.label}}),{data:Se,loading:Ce}=r({endpoint:`api_top_sources`,statsConfig:t,params:z}),we=n||v||p||J,Te=p||n||J,X=l(u)&&C&&S,Z=!u?.email_only&&w,Q=x?.analytics.membersTrackSources,$=!!(E&&u&&x?.analytics.webAnalytics);return(0,K.useEffect)(()=>{!p&&u&&c(u)&&!w&&Q&&e(`/posts/analytics/${h}/growth`,{replace:!0})},[p,u,w,e,h,Q]),p?(0,q.jsx)(M,{}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(te,{currentTab:`Overview`}),(0,q.jsx)(ee,{children:(0,q.jsxs)(`div`,{className:`flex flex-col gap-6 lg:grid lg:grid-cols-2`,children:[Z&&(0,q.jsx)(ye,{chartData:xe,isLoading:Te||we||Ce,isNewsletterShown:X,range:N,sourcesData:Se,visitors:be}),X&&(0,q.jsx)(ve,{isNewsletterStatsLoading:p,isWebShown:Z,post:u}),(Q||$)&&(0,q.jsxs)(`div`,{className:`col-span-2 flex flex-col gap-6 lg:grid lg:grid-cols-3`,children:[Q&&(0,q.jsxs)(o,{className:`group overflow-hidden p-0 ${$?`lg:col-span-2`:`lg:col-span-3`}`,"data-testid":`growth`,children:[(0,q.jsxs)(`div`,{className:`relative flex items-center justify-between gap-6`,children:[(0,q.jsx)(a,{children:(0,q.jsxs)(i,{className:`flex items-center gap-1.5 text-lg`,children:[(0,q.jsx)(f,{size:16,strokeWidth:1.5}),`Growth`]})}),(0,q.jsx)(_,{className:`absolute right-6 translate-x-10 opacity-0 transition-all duration-200 group-hover:translate-x-0 group-hover:opacity-100 focus-visible:translate-x-0 focus-visible:opacity-100`,size:`sm`,variant:`outline`,onClick:()=>{e(`/posts/analytics/${h}/growth`)},children:`View more`})]}),(0,q.jsx)(s,{className:`flex flex-col gap-6 px-0 md:grid md:grid-cols-3 md:items-stretch md:gap-0`,children:we?Array.from({length:3},(e,t)=>(0,q.jsxs)(`div`,{className:`h-[98px] gap-1 border-r px-6 py-5 last:border-r-0`,children:[(0,q.jsx)(I,{className:`w-2/3`}),(0,q.jsx)(I,{className:`h-7 w-12`})]},t)):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(W,{className:`grow gap-1 py-0`,children:[(0,q.jsx)(U,{children:`Free members`}),(0,q.jsx)(H,{children:(0,q.jsx)(V,{className:`text-[2.2rem]`,children:m(g?.free_members||0)})})]}),x?.paidMembersEnabled&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(W,{className:`grow gap-1 py-0`,children:[(0,q.jsx)(U,{children:`Paid members`}),(0,q.jsx)(H,{children:(0,q.jsx)(V,{className:`text-[2.2rem]`,children:m(g?.paid_members||0)})})]}),(0,q.jsxs)(W,{className:`grow gap-1 py-0`,children:[(0,q.jsx)(U,{children:`MRR impact`}),(0,q.jsx)(H,{children:(0,q.jsxs)(V,{className:`text-[2.2rem]`,children:[b,m(he(g?.mrr||0))]})})]})]})]})})]}),$&&(0,q.jsxs)(o,{className:`group/datalist overflow-hidden ${Q?`lg:col-span-1`:`lg:col-span-3`}`,"data-testid":`gift-link-card`,children:[(0,q.jsxs)(`div`,{className:`relative flex items-center justify-between gap-6`,children:[(0,q.jsx)(a,{children:(0,q.jsxs)(i,{className:`flex items-center gap-1.5 text-lg`,children:[(0,q.jsx)(y,{size:16,strokeWidth:1.5}),`Gift link`]})}),(0,q.jsx)(_,{className:`absolute right-6 translate-x-10 opacity-0 transition-all duration-300 group-hover/datalist:translate-x-0 group-hover/datalist:opacity-100 focus-visible:translate-x-0 focus-visible:opacity-100`,size:`sm`,variant:`outline`,onClick:()=>j(!0),children:`Share`})]}),!k&&!ie&&(0,q.jsxs)(s,{className:`flex flex-col gap-1`,children:[(0,q.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Visitors`}),(0,q.jsx)(`span`,{className:`text-[2.2rem] leading-none font-semibold`,"data-testid":`gift-link-card-visitors`,children:m(O?.visits??0)})]})]})]}),!Z&&!X&&!Q&&!$&&(0,q.jsx)(ue,{className:`col-span-2 py-20`})]})}),$&&(0,q.jsx)(pe,{open:A,postId:h,source:`gift-link-card`,onOpenChange:j},h)]})};export{J as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-Bb3IsNbi.js";import{t as n}from"./jsx-runtime-CtMZ-PAS.js";import{n as r}from"./posts-D_gBhqmK.js";import{t as i}from"./analytics-53FOa2wq.js";import{r as a}from"./chunk-KS7C4IRE-DG9HTHQ3.js";import{n as o,t as s}from"./container-CD33Rm0u.js";import{t as c}from"./use-analytics-data-DXG7mpgK.js";import{t as l}from"./post-share-modal-ZUCX7JZo.js";var u=e(t(),1),d=n(),f=({children:e})=>(0,d.jsx)(o,{className:`size-full`,children:(0,d.jsx)(s,{className:`relative flex h-full flex-col`,size:`page`,children:(0,d.jsx)(`div`,{className:`grid w-full grow`,children:(0,d.jsx)(`div`,{className:`flex h-full flex-col px-8`,children:e})})})}),p=()=>{let[e,t]=(0,u.useState)(!1),[n,i]=(0,u.useState)(null),[a,o]=(0,u.useState)(null),{site:s}=c(),{data:l}=r({searchParams:n?{filter:`id:${n.id}`,include:`authors,newsletter,email`}:{},enabled:!!n}),{data:d}=r({searchParams:{filter:`status:[published,sent]`,limit:`1`,fields:`id`},enabled:!!n}),f=l?.posts?.[0],p=e=>`${e.toLocaleString()} subscriber${e===1?``:`s`}`,m=e=>new Date(e).toLocaleTimeString(`en-US`,{hour:`2-digit`,minute:`2-digit`,hour12:!1}),h=e=>e?.map(e=>e.name).join(`, `)||``,g=(0,u.useMemo)(()=>{if(!f)return null;let n=!!a,r=()=>{let e=[];if(f.email_only?e.push(`Your email was sent to`):f.email?.email_count?e.push(`Your post was published on your site and sent to`):e.push(`Your post was published on your site`),f.email?.email_count){let t=p(f.email.email_count);e.push(` `),e.push(u.createElement(`strong`,{key:`subscriber-count`},t)),f.newsletter?.name&&(e.push(` of `),e.push(u.createElement(`strong`,{key:`newsletter-name`},f.newsletter.name))),e.push(`,`)}if(f.published_at){let t=new Date(f.published_at);t.toDateString()===new Date().toDateString()?(e.push(` `),e.push(u.createElement(`strong`,{key:`today`},`today`))):(e.push(` on `),e.push(u.createElement(`strong`,{key:`date`},t.toLocaleDateString(`en-US`,{month:`long`,day:`numeric`})))),e.push(` at `),e.push(u.createElement(`strong`,{key:`time`},m(f.published_at)))}return e.push(`.`),u.createElement(`span`,{},...e)},c=()=>{t(!1),i(null),o(null)};return{open:e,onOpenChange:e=>{e||c()},emailOnly:f.email_only,postURL:f.url||``,primaryTitle:`Boom! It's out there.`,secondaryTitle:n&&a?`That's ${a.toLocaleString()} post${a===1?``:`s`} published.`:`Spread the word!`,description:r(),featureImageURL:f.feature_image||``,postTitle:f.title||``,postExcerpt:f.excerpt||``,faviconURL:s?.icon||``,siteTitle:s?.title||``,author:h(f.authors),onClose:c}},[f,e,a,s?.title]);return(0,u.useEffect)(()=>{let e=()=>{try{let e=localStorage.getItem(`ghost-last-published-post`);if(e){let n=JSON.parse(e);i(n),t(!0),localStorage.removeItem(`ghost-last-published-post`)}}catch{}};e();let n=setTimeout(e,100);return()=>clearTimeout(n)},[]),(0,u.useEffect)(()=>{d?.meta?.pagination?.total&&o(d.meta.pagination.total)},[d]),{isModalOpen:e,post:f,postCount:a,showPostCount:!!a,closeModal:()=>{t(!1),i(null),o(null)},modalProps:g}},m=()=>{let{isModalOpen:e,modalProps:t}=p(),n=e&&!!t;return(0,u.useEffect)(()=>{n&&i(`Share Modal Opened`,{giftLinkShown:!1,source:`publish-flow`})},[n]),(0,d.jsxs)(f,{children:[(0,d.jsx)(a,{}),e&&t&&(0,d.jsx)(l,{...t})]})};export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-Bb3IsNbi.js";var n=e(t()),r=(0,n.createContext)(void 0),i=()=>{let e=(0,n.useContext)(r);if(!e)throw Error(`usePostAnalytics must be used within a PostAnalyticsProvider`);return e};export{i as n,r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-Bb3IsNbi.js";import{a as n,p as r}from"./hooks-tBACnBdQ.js";import{t as i}from"./jsx-runtime-CtMZ-PAS.js";import{t as a}from"./dist-B7kX8alP.js";import{T as o,h as ee,m as s,p as te}from"./stats-DkqCtrPh.js";import{i as ne}from"./posts-D_gBhqmK.js";import{t as re}from"./analytics-53FOa2wq.js";import{i as c,n as l,o as ie,r as ae}from"./post-helpers-C5OQMBoi.js";import{a as u}from"./router-provider-S8Wf6jdu.js";import{$t as d,I as f,Jn as p,Kn as m,Qt as oe,S as se,Xn as ce,it as le,mn as h,qn as g,t as _}from"./button-DiwO9Rof.js";import{r as v}from"./users-Y8qhvF1q.js";import{Ar as y,Bn as b,Er as x,Gn as ue,Hn as de,Nr as fe,Or as pe,Pi as me,Rn as he,Un as ge,Vn as _e,Wn as ve,jr as ye,kr as S,ti as C,zn as w}from"./index-B5yxmQNp.js";import{t as T}from"./use-analytics-data-DXG7mpgK.js";import{t as E}from"./post-share-modal-ZUCX7JZo.js";import{t as D}from"./get-site-timezone-HgL0jI_F.js";import{i as O,t as k}from"./gift-link-modal-v55u0VUL.js";import{n as A}from"./post-analytics-context-C8t_048I.js";var j=e(t(),1),M=i(),N=j.forwardRef(({...e},t)=>(0,M.jsx)(`nav`,{ref:t,"aria-label":`breadcrumb`,...e}));N.displayName=`Breadcrumb`;var P=j.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`ol`,{ref:n,className:m(`flex h-(--control-height) flex-wrap items-center gap-1.5 text-lg font-medium break-words text-muted-foreground sm:gap-2.5`,e),...t}));P.displayName=`BreadcrumbList`;var F=j.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`li`,{ref:n,className:m(`inline-flex items-center gap-1.5`,e),...t}));F.displayName=`BreadcrumbItem`;var I=j.forwardRef(({asChild:e,className:t,...n},r)=>(0,M.jsx)(e?a:`a`,{ref:r,className:m(`inline-flex items-center gap-1 transition-colors hover:text-foreground`,t),...n}));I.displayName=`BreadcrumbLink`;var L=j.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`span`,{ref:n,"aria-current":`page`,"aria-disabled":`true`,className:m(`font-medium text-foreground`,e),role:`link`,...t}));L.displayName=`BreadcrumbPage`;var R=({children:e,className:t,...n})=>(0,M.jsx)(`li`,{"aria-hidden":`true`,className:m(`[&>svg]:size-3.5`,t),role:`presentation`,...n,children:e??(0,M.jsx)(h,{})});R.displayName=`BreadcrumbSeparator`;var z=({className:e,...t})=>(0,M.jsxs)(`span`,{"aria-hidden":`true`,className:m(`flex size-9 items-center justify-center`,e),role:`presentation`,...t,children:[(0,M.jsx)(d,{className:`size-4`}),(0,M.jsx)(`span`,{className:`sr-only`,children:`More`})]});z.displayName=`BreadcrumbElipssis`;var B=(0,j.forwardRef)(({children:e,className:t,...n},r)=>(0,M.jsx)(`section`,{ref:r,className:m(`flex size-full grow flex-col gap-6 py-8`,t),...n,children:e}));B.displayName=`PostAnalyticsContent`;var V=e=>{let{data:t}=n();return!e||!t?!1:e.status===`published`&&!!e.visibility&&e.visibility!==`public`&&v(t)},H=({currentTab:e,children:t})=>{let n=u(),{appSettings:i}=me(),{mutateAsync:a}=ne(),m=r(),[h,v]=(0,j.useState)(!1),[z,B]=(0,j.useState)(!1),[H,U]=(0,j.useState)(!1),{settings:be,site:W,statsConfig:xe}=T(),{post:G,isPostLoading:K,postId:q}=A(),J=V(G),Y=D(be),X=(0,j.useRef)(!1);(0,j.useEffect)(()=>{if(!z){X.current=!1;return}X.current||(X.current=!0,re(`Share Modal Opened`,{giftLinkShown:J,source:`post-analytics`}))},[z,J]);let{activeVisitors:Z,isLoading:Q}=o({postUuid:G?.uuid,statsConfig:xe,enabled:i?.analytics?.webAnalytics??!1}),$=(0,j.useMemo)(()=>{if(!G)return[];let e=[];return c(G)&&!i?.analytics.webAnalytics||(e.push(`Overview`),!G.email_only&&i?.analytics.webAnalytics&&e.push(`Web`)),ie(G)&&e.push(`Newsletter`),i?.analytics.membersTrackSources&&e.push(`Growth`),e},[G,i?.analytics.webAnalytics,i?.analytics.membersTrackSources]),Se=()=>{G&&v(!0)},Ce=async()=>{if(G)try{await a(q),v(!1),n(`/posts/`,{crossApp:!0})}catch(e){m(e)}};return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`header`,{className:`z-50 -mx-8 bg-white/70 backdrop-blur-md dark:bg-background`,children:(0,M.jsx)(`div`,{className:`relative flex min-h-[102px] w-full items-start justify-between gap-5 px-8 pt-8 pb-0`,"data-header":`header`,children:(0,M.jsxs)(`div`,{className:`flex w-full flex-col gap-6`,children:[(0,M.jsxs)(`div`,{className:`flex w-full flex-col justify-between md:flex-row md:items-center`,children:[(0,M.jsx)(N,{children:(0,M.jsxs)(P,{children:[(0,M.jsx)(F,{children:(0,M.jsx)(I,{className:`cursor-pointer leading-[24px]`,onClick:()=>n(`/analytics/`,{crossApp:!0}),children:`Analytics`})}),(0,M.jsx)(R,{}),(0,M.jsx)(F,{children:(0,M.jsx)(L,{className:`leading-[24px]`,children:`Post analytics`})})]})}),(0,M.jsxs)(`div`,{className:`flex w-full items-center gap-2 md:w-auto`,children:[i?.analytics.webAnalytics&&!G?.email_only&&(0,M.jsx)(`div`,{className:`mr-3 flex grow items-center gap-2 md:grow-0`,children:(0,M.jsxs)(`div`,{className:`flex items-center gap-2 text-muted-foreground`,title:`Active readers in the last 5 minutes · Updates every 60 seconds`,children:[(0,M.jsxs)(`span`,{children:[Q?``:ce(Z),` reading now`]}),(0,M.jsx)(`div`,{className:`size-2 rounded-full ${Q?`animate-pulse bg-muted`:Z?`bg-green-500`:`border border-muted-foreground`}`})]})}),!K&&(0,M.jsxs)(M.Fragment,{children:[!G?.email_only&&(0,M.jsx)(E,{author:G?.authors?.[0]?.name||``,canShareAsGift:J,description:``,faviconURL:W?.icon||``,featureImageURL:G?.feature_image,giftAccessLabel:O(G?.visibility),open:z,postExcerpt:G?.excerpt||``,postTitle:G?.title,postURL:G?.url,siteTitle:W?.title||``,onClose:()=>B(!1),onOpenChange:B,onShareAsGift:()=>{B(!1),U(!0)},children:(0,M.jsxs)(_,{variant:`outline`,onClick:()=>B(!0),children:[(0,M.jsx)(f,{}),` Share`]})}),(0,M.jsxs)(x,{children:[(0,M.jsx)(fe,{asChild:!0,children:(0,M.jsx)(_,{variant:`outline`,children:(0,M.jsx)(d,{})})}),(0,M.jsxs)(pe,{align:`end`,children:[(0,M.jsxs)(S,{children:[(0,M.jsx)(y,{asChild:!0,children:(0,M.jsxs)(`a`,{href:G?.url,rel:`noopener noreferrer`,target:`_blank`,children:[(0,M.jsx)(oe,{}),`View in browser`]})}),(0,M.jsxs)(y,{onClick:()=>{n(`/editor/post/${q}`,{crossApp:!0})},children:[(0,M.jsx)(le,{}),`Edit post`]})]}),(0,M.jsx)(ye,{}),(0,M.jsx)(S,{children:(0,M.jsxs)(y,{className:`text-destructive focus:text-destructive`,onClick:Se,children:[(0,M.jsx)(se,{}),`Delete post`]})})]})]})]})]})]}),!K&&(0,M.jsxs)(`div`,{className:`flex items-start gap-6 md:items-center`,children:[G?.feature_image&&(0,M.jsx)(`div`,{className:`aspect-[16/10] w-full max-w-[100px] rounded-md bg-cover bg-center md:max-w-[132px]`,style:{backgroundImage:`url(${G.feature_image})`}}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(C,{className:`-ml-px max-w-[920px] indent-0 !text-xl md:leading-[1.2em]`,"data-header":`header-title`,children:G?.title}),G?.published_at&&(0,M.jsxs)(`div`,{className:`mt-0.5 flex items-center justify-start leading-[1.65em] text-muted-foreground`,children:[l(G)&&`Sent on ${g(G.published_at,Y)} at ${p(G.published_at,Y)}`,c(G)&&`Published on your site on ${g(G.published_at,Y)} at ${p(G.published_at,Y)}`,ae(G)&&`Published and sent on ${g(G.published_at,Y)} at ${p(G.published_at,Y)}`]})]})]})]})})}),(0,M.jsxs)(ee,{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-background`,children:[!K&&(0,M.jsxs)(te,{className:`min-h-[34px]`,defaultValue:e,responsive:!0,children:[$.includes(`Overview`)&&(0,M.jsx)(s,{value:`Overview`,onClick:()=>{n(`/posts/analytics/${q}`)},children:`Overview`}),$.includes(`Web`)&&(0,M.jsx)(s,{value:`Web`,onClick:()=>{n(`/posts/analytics/${q}/web`)},children:`Web traffic`}),$.includes(`Newsletter`)&&(0,M.jsx)(s,{value:`Newsletter`,onClick:()=>{n(`/posts/analytics/${q}/newsletter`)},children:`Newsletter`}),$.includes(`Growth`)&&(0,M.jsx)(s,{value:`Growth`,onClick:()=>{n(`/posts/analytics/${q}/growth`)},children:`Growth`})]}),t]}),J&&q&&(0,M.jsx)(k,{open:H,postId:q,source:`share-modal`,onOpenChange:U},q),(0,M.jsx)(he,{open:h,onOpenChange:v,children:(0,M.jsxs)(_e,{children:[(0,M.jsxs)(ve,{children:[(0,M.jsx)(ue,{children:`Are you sure you want to delete this post?`}),(0,M.jsxs)(de,{children:[`You're about to delete "`,(0,M.jsx)(`strong`,{children:G?.title}),`". This is permanent! We warned you, k?`]})]}),(0,M.jsxs)(ge,{children:[(0,M.jsx)(b,{children:`Cancel`}),(0,M.jsx)(w,{className:`bg-red-600 text-white hover:bg-red-700`,onClick:()=>void Ce(),children:`Delete`})]})]})})]})};export{V as n,B as r,H as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-Bb3IsNbi.js";import{t as n}from"./jsx-runtime-CtMZ-PAS.js";import{n as r}from"./posts-D_gBhqmK.js";import{m as i}from"./chunk-KS7C4IRE-DG9HTHQ3.js";import{c as a}from"./index-B5yxmQNp.js";import{t as o}from"./constants-c-JNF9c2.js";import{t as s}from"./post-analytics-context-C8t_048I.js";var c=e(t(),1),l=n(),u=({children:e})=>{let{postId:t}=i();if(!t)throw Error(`Post ID is required for PostAnalyticsProvider`);let[n,u]=(0,c.useState)(a.last30Days.value),{data:{posts:[d]}={posts:[]},isLoading:f}=r({searchParams:{filter:`id:${t}`,include:o}});return(0,l.jsx)(s.Provider,{value:{postId:t,post:d,isPostLoading:f,range:n,setRange:u},children:e})};export{u as default};
|
package/core/built/admin/assets/{post-share-modal-59Ujf4t1.js → post-share-modal-ZUCX7JZo.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-DAXXjFlN.js";import{t as e}from"./react-Bb3IsNbi.js";import{t}from"./jsx-runtime-CtMZ-PAS.js";import{t as n}from"./button-DiwO9Rof.js";import{
|
|
1
|
+
import"./rolldown-runtime-DAXXjFlN.js";import{t as e}from"./react-Bb3IsNbi.js";import{t}from"./jsx-runtime-CtMZ-PAS.js";import{t as n}from"./button-DiwO9Rof.js";import{ri as r}from"./index-B5yxmQNp.js";import{t as i}from"./share-modal-DTIFYNI1.js";e();var a=t(),o=({author:e=``,canShareAsGift:t=!1,children:o,description:s=``,emailOnly:c=!1,faviconURL:l=``,featureImageURL:u=``,giftAccessLabel:d=``,onClose:f=()=>{},onShareAsGift:p=()=>{},postExcerpt:m=``,postTitle:h=``,postURL:g=``,primaryTitle:_=`Your post is published.`,secondaryTitle:v=`Spread the word!`,siteTitle:y=``,...b})=>{let x=encodeURIComponent(h),S=encodeURIComponent(g),C=encodeURIComponent(`${h} ${g}`),w=c?[]:[{href:`https://twitter.com/intent/tweet?text=${x}%0A${S}`,label:`Share on X`,service:`x`},{href:`https://threads.net/intent/post?text=${C}`,label:`Share on Threads`,service:`threads`},{href:`https://www.facebook.com/sharer/sharer.php?u=${S}`,label:`Share on Facebook`,service:`facebook`},{href:`https://www.linkedin.com/shareArticle?mini=true&title=${x}&url=${S}`,label:`Share on LinkedIn`,service:`linkedin`}];return(0,a.jsxs)(i.Root,{...b,children:[o&&(0,a.jsx)(i.Trigger,{children:o}),(0,a.jsxs)(i.Content,{children:[(0,a.jsx)(`div`,{className:`sticky top-0 ml-auto size-0`,children:(0,a.jsx)(i.CloseButton,{className:`absolute -top-5 -right-5`,onClick:f})}),(0,a.jsxs)(i.Header,{className:`relative -mt-5`,children:[(0,a.jsxs)(i.Title,{className:`text-3xl leading-[1.15em] font-bold`,children:[_&&(0,a.jsx)(`span`,{className:`text-state-success`,children:_}),_&&v&&(0,a.jsx)(`br`,{}),v&&(0,a.jsx)(`span`,{children:v})]}),s&&(0,a.jsx)(i.Description,{className:`mb-0 pt-1 pb-0 text-lg text-foreground`,children:s})]}),(0,a.jsxs)(i.Preview,{className:`rounded-md`,href:g,children:[u&&(0,a.jsx)(`div`,{className:`aspect-video bg-cover bg-center`,style:{backgroundImage:`url(${u})`}}),(0,a.jsxs)(`div`,{className:`p-6 pt-5`,children:[(0,a.jsx)(r,{children:h}),m&&(0,a.jsx)(`p`,{className:`line-clamp-2`,children:m}),(0,a.jsxs)(`div`,{className:`mt-2 flex items-start gap-2`,children:[(0,a.jsx)(`div`,{className:`mt-0.5 size-4 bg-cover bg-center`,style:{backgroundImage:`url(${l})`}}),(0,a.jsxs)(`div`,{className:`flex gap-1`,children:[(0,a.jsx)(`strong`,{children:y}),(0,a.jsx)(`span`,{children:`•`}),(0,a.jsx)(`span`,{children:e})]})]})]})]}),(0,a.jsx)(i.Footer,{children:c?(0,a.jsx)(n,{className:`cursor-pointer`,type:`button`,onClick:f,children:`Close`}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.SocialLinks,{links:w}),(0,a.jsx)(i.CopyButton,{className:`ml-0! grow cursor-pointer`,copyURL:g,icon:`link`})]})}),t&&!c&&(0,a.jsxs)(`p`,{className:`text-center text-sm text-muted-foreground`,children:[`Want to share full access to this `,d,` post?`,` `,(0,a.jsx)(n,{className:`h-auto p-0 align-baseline text-sm`,type:`button`,variant:`link`,onClick:p,children:`Share as a gift`}),`.`]})]})]})};export{o as t};
|