ghost 6.18.2 → 6.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/tryghost-i18n-6.19.0.tgz +0 -0
- package/components/tryghost-parse-email-address-6.19.0.tgz +0 -0
- package/core/built/admin/assets/{PolarAngleAxis-DALH8FDm.js → PolarAngleAxis-CGprvq8M.js} +1 -1
- package/core/built/admin/assets/{_baseAssignValue-D_UsvJRN.js → _baseAssignValue-Bwn07Ln5.js} +1 -1
- package/core/built/admin/assets/{a-large-small-DVyx4GMu.js → a-large-small-p58xibEK.js} +1 -1
- package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +1 -1
- package/core/built/admin/assets/admin-x-settings/{code-editor-view-DBrulgE8.mjs → code-editor-view-DCKvO1TY.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-DgGwb1L-.mjs → index-BxWVtVnD.mjs} +6 -6
- package/core/built/admin/assets/admin-x-settings/{index-Cypgljb3.mjs → index-DyZIONe1.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-CsGHbqSU.mjs → index-HfMJcj2U.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{modals-rdo7i0D3.mjs → modals-CIiqfKY0.mjs} +7593 -7509
- package/core/built/admin/assets/{at-sign-CGNkBrZS.js → at-sign-BZPuAx5m.js} +1 -1
- package/core/built/admin/assets/audience-Cy9gLIa9.js +1 -0
- package/core/built/admin/assets/{avatar-flipboard-jqr9Aapd.js → avatar-flipboard-CLmWb5Xn.js} +1 -1
- package/core/built/admin/assets/{bluesky-sharing-C2749SVt.js → bluesky-sharing-BHt0oiii.js} +1 -1
- package/core/built/admin/assets/{chart-BAQCVPCH.js → chart--RFLGIL4.js} +1 -1
- package/core/built/admin/assets/{chunk.524.428356d01feabbc7b932.js → chunk.524.5c5c3f3273a86d1d9913.js} +7 -7
- package/core/built/admin/assets/{chunk.582.b8b41ba720f49d724992.js → chunk.582.e6c787cdf7e6de7819e0.js} +9 -9
- package/core/built/admin/assets/{code-editor-view-YNhJ1w71.js → code-editor-view-BW9y0JXN.js} +1 -1
- package/core/built/admin/assets/comments-C_lilDBp.js +1 -0
- package/core/built/admin/assets/content-helpers-BOnQQADZ.js +1 -0
- package/core/built/admin/assets/{copy-CNsHZEFR.js → copy-Bi7VpgPR.js} +1 -1
- package/core/built/admin/assets/{data-list-Dn5MkmyD.js → data-list-Bu3jzs1s.js} +1 -1
- package/core/built/admin/assets/{deleted-feed-item-Dmm_clMl.js → deleted-feed-item-B-doIIKc.js} +1 -1
- package/core/built/admin/assets/{edit-profile-BLSdtROQ.js → edit-profile-ZBdjFfvL.js} +1 -1
- package/core/built/admin/assets/{empty-indicator-C2Z0dddU.js → empty-indicator-C6BBh99D.js} +1 -1
- package/core/built/admin/assets/{en-DuTkaMAI.js → en-C7eSFQRw.js} +1 -1
- package/core/built/admin/assets/{feed-B4Xp4C2J.js → feed-CAioauwD.js} +1 -1
- package/core/built/admin/assets/{filters-gnOx5Z45.js → filters-DEKF0tIB.js} +1 -1
- package/core/built/admin/assets/{gh-chart-B2aWYkGg.js → gh-chart-D9KI0_sO.js} +1 -1
- package/core/built/admin/assets/{ghost-29f8f3c80e41126ba5e3c52ad5727e8a.js → ghost-6bff5c535ef015b0ed9421ceb6c699a7.js} +220 -211
- package/core/built/admin/assets/{growth-BysawIWe.js → growth-C6XGchvT.js} +1 -1
- package/core/built/admin/assets/{hash-j3sh-UI3.js → hash-DFhnGHId.js} +1 -1
- package/core/built/admin/assets/{inbox-1cUdr8Mm.js → inbox-p-Y5uScT.js} +1 -1
- package/core/built/admin/assets/{index-BVoBTlp_.js → index--VlvGKWi.js} +1 -1
- package/core/built/admin/assets/{index-DGBK5k9H.js → index-3uU4zg_6.js} +1 -1
- package/core/built/admin/assets/index-4ZkTY34B.css +1 -0
- package/core/built/admin/assets/{index-BhY_SbGB.js → index-BWnrLoWI.js} +1 -1
- package/core/built/admin/assets/{index-I9n711UW.js → index-BzU2odQq.js} +1 -1
- package/core/built/admin/assets/{index-mhojl7aD.js → index-CIZ_upe2.js} +1 -1
- package/core/built/admin/assets/{index-WjY3mGep.js → index-CS4XqyC-.js} +2 -2
- package/core/built/admin/assets/{index-BgrwCpgw.js → index-D17PEsUB.js} +1 -1
- package/core/built/admin/assets/{index-B8G0f0hb.js → index-DCTdAEHx.js} +3 -3
- package/core/built/admin/assets/{index-DarAAzVH.js → index-FPf-AERu.js} +1 -1
- package/core/built/admin/assets/index-JmqyGBro.js +1 -0
- package/core/built/admin/assets/{index-DKAlEWM4.js → index-LyfDjTto.js} +1 -1
- package/core/built/admin/assets/index-S62-c8TV.js +13 -0
- package/core/built/admin/assets/{index-D8CXbJm4.js → index-Wx8_AGZX.js} +1 -1
- package/core/built/admin/assets/{index-CkAUXgAi.js → index-jAidr8jI.js} +1 -1
- package/core/built/admin/assets/{index-Dz8eTtOq.js → index-lPLmWtv0.js} +1 -1
- package/core/built/admin/assets/koenig-lexical/index.css +1 -1
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.js +1853 -1863
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.umd.js +94 -94
- package/core/built/admin/assets/{koenig-lexical-coiS9dIC.js → koenig-lexical-CWnkYKQt.js} +77 -77
- package/core/built/admin/assets/{kpi-card-BEFHo2gr.js → kpi-card-B5UaJgOT.js} +1 -1
- package/core/built/admin/assets/{kpis-D-gz-lUk.js → kpis-Cc2RxnvZ.js} +1 -1
- package/core/built/admin/assets/{label-BvlHzzcJ.js → label-CW7Kmp9w.js} +1 -1
- package/core/built/admin/assets/{links-tdJvBrsT.js → links-wWNc9Uat.js} +1 -1
- package/core/built/admin/assets/{list-filter-DPE4Xj2T.js → list-filter-3EF6cVg-.js} +1 -1
- package/core/built/admin/assets/{lucide-react-ClQ3Iy7l.js → lucide-react-DtMIZssr.js} +214 -214
- package/core/built/admin/assets/{main-layout-DY96wK-_.js → main-layout-BFYhCrLn.js} +1 -1
- package/core/built/admin/assets/{message-square-text-Dd1XS5-H.js → message-square-text-BDZtUW-2.js} +1 -1
- package/core/built/admin/assets/{minus-CyEc3BE5.js → minus-CSphShdJ.js} +1 -1
- package/core/built/admin/assets/modals-CDWP04Iy.js +77 -0
- package/core/built/admin/assets/{moderation-B0fdmlig.js → moderation-qcng2_lB.js} +1 -1
- package/core/built/admin/assets/{newsletter-Byg3ARa5.js → newsletter-R-IYcV4M.js} +1 -1
- package/core/built/admin/assets/{newsletters-DbH39vgA.js → newsletters-BB4e24i1.js} +1 -1
- package/core/built/admin/assets/{note-Cwy-rIAF.js → note-B_bpRX66.js} +1 -1
- package/core/built/admin/assets/overview-Nh-IoP-v.js +1 -0
- package/core/built/admin/assets/{pagemenu-CkzsZrHC.js → pagemenu-Cd45frnF.js} +1 -1
- package/core/built/admin/assets/{post-analytics-context-BLkup0Xh.js → post-analytics-context-BST4bzps.js} +1 -1
- package/core/built/admin/assets/post-analytics-header-DAZPp6M8.js +1 -0
- package/core/built/admin/assets/{post-analytics-aA-nG9Fq.js → post-analytics-jHZOhQ8L.js} +1 -1
- package/core/built/admin/assets/{post-share-modal-CkvJtrRw.js → post-share-modal-D1JQfuYx.js} +1 -1
- package/core/built/admin/assets/posts/{comments-Bn_vn_sb.mjs → comments-C0ntS6jH.mjs} +678 -692
- package/core/built/admin/assets/posts/{dialog-CKPcMrj7.mjs → dialog-CXEmd-rC.mjs} +3 -3
- package/core/built/admin/assets/posts/{empty-indicator-kkrhP6K_.mjs → empty-indicator-CY1NEQZt.mjs} +2 -2
- package/core/built/admin/assets/posts/{filters-DHsxxy0F.mjs → filters-CWWDQAf0.mjs} +6 -6
- package/core/built/admin/assets/posts/{growth-D7ACh-oR.mjs → growth-DUnL-W24.mjs} +20 -19
- package/core/built/admin/assets/posts/{heading-BrKVbOxA.mjs → heading-DZWin3nG.mjs} +2 -2
- package/core/built/admin/assets/posts/{hooks-BBEMuLiW.mjs → hooks-DQYjPsLg.mjs} +2 -2
- package/core/built/admin/assets/posts/{index-C0rRguZx.mjs → index-BiGQFQkQ.mjs} +9 -9
- package/core/built/admin/assets/posts/{kpis-1o524OIK.mjs → kpis-DNnkyd0U.mjs} +10 -10
- package/core/built/admin/assets/posts/{links-JpeATx1f.mjs → links-D3nSZFlJ.mjs} +4 -4
- package/core/built/admin/assets/posts/{loading-indicator-BHAmSf8j.mjs → loading-indicator-CZQmPRvv.mjs} +3 -3
- package/core/built/admin/assets/posts/{main-layout-BTItAOQE.mjs → main-layout-D5WnaGr4.mjs} +2 -2
- package/core/built/admin/assets/posts/{newsletter-CQdsCEHv.mjs → newsletter-C5eikVBq.mjs} +13 -13
- package/core/built/admin/assets/posts/{overview-sYh4JN1D.mjs → overview-C5mCMPJY.mjs} +113 -112
- package/core/built/admin/assets/posts/{post-analytics-DtLt2SWx.mjs → post-analytics-Cc2NCQis.mjs} +6 -6
- package/core/built/admin/assets/posts/{post-analytics-context-CB1yM9fk.mjs → post-analytics-context-qXWjDzSt.mjs} +44 -41
- package/core/built/admin/assets/posts/{post-analytics-header-BYaWuL9W.mjs → post-analytics-header-QGsYyvhA.mjs} +11 -11
- package/core/built/admin/assets/posts/{post-share-modal-V0HTOBaf.mjs → post-share-modal-B9Q7FJsH.mjs} +4 -4
- package/core/built/admin/assets/posts/posts-C2SKGLoU.mjs +17 -0
- package/core/built/admin/assets/posts/posts.js +1 -1
- package/core/built/admin/assets/posts/{search-CLjC37AT.mjs → search-C8k0TFkh.mjs} +2 -2
- package/core/built/admin/assets/posts/{separator-KNoTIaJx.mjs → separator-CJnnsW1a.mjs} +5 -5
- package/core/built/admin/assets/posts/{sheet-DBg_SCDt.mjs → sheet-HDzKgNHc.mjs} +3 -3
- package/core/built/admin/assets/posts/{skeleton-DvsoolWu.mjs → skeleton-BlZGKNzB.mjs} +3 -3
- package/core/built/admin/assets/posts/{source-icon-OmRaTU2G.mjs → source-icon-DjBIjtaY.mjs} +3 -3
- package/core/built/admin/assets/posts/{stats-BC2DzntY.mjs → stats-BRVHejqx.mjs} +4 -4
- package/core/built/admin/assets/posts/{table-CxX9OKAj.mjs → table-D7AEpPWL.mjs} +2 -2
- package/core/built/admin/assets/posts/{tabs-B1jw7cBi.mjs → tabs-RcpmzDgr.mjs} +10 -10
- package/core/built/admin/assets/posts/{tags-BitrLT_j.mjs → tags-8k1xw8R8.mjs} +2 -2
- package/core/built/admin/assets/posts/{tags-BBilTo1a.mjs → tags-DNY2rBlf.mjs} +11 -11
- package/core/built/admin/assets/posts/{use-infinite-virtual-scroll-DaijA1ao.mjs → use-infinite-virtual-scroll-CMiIpcDA.mjs} +3 -3
- package/core/built/admin/assets/posts/{web-CKmyC4Xj.mjs → web-BCl5J6bB.mjs} +15 -15
- package/core/built/admin/assets/{posts-DDkuYoN7.js → posts-DFiJPOft.js} +1 -1
- package/core/built/admin/assets/{repeat-B-SL0yPM.js → repeat-Smml9n0k.js} +1 -1
- package/core/built/admin/assets/{reply-BdCPoUQ9.js → reply-CooY4lmk.js} +1 -1
- package/core/built/admin/assets/{select-C7aNW8QS.js → select-WwMsbBbg.js} +1 -1
- package/core/built/admin/assets/{settings-D-dhma2e.js → settings-CQEhPDQU.js} +4 -4
- package/core/built/admin/assets/{settings-Bzy1GNfD.js → settings-CxWtvcUf.js} +1 -1
- package/core/built/admin/assets/{sort-button-Dv8vjh13.js → sort-button-DFr8vezl.js} +1 -1
- package/core/built/admin/assets/{source-icon-DTz4isLK.js → source-icon-VpYWpwYb.js} +1 -1
- package/core/built/admin/assets/{sprout-BwLQTzMf.js → sprout-DRqlFJSK.js} +1 -1
- package/core/built/admin/assets/{square-YF1YE9ex.js → square-CwHQ9sJ2.js} +1 -1
- package/core/built/admin/assets/stats/audience-Caf7BjaU.mjs +269 -0
- package/core/built/admin/assets/stats/{url-helpers-Drq3xg0l.mjs → content-helpers-MbtAvUJh.mjs} +83 -106
- package/core/built/admin/assets/stats/{index-CcCyLMxL.mjs → index-BGqKbF1D.mjs} +8 -8
- package/core/built/admin/assets/stats/{index-DXU2rE9t.mjs → index-BTjfXOi6.mjs} +30 -30
- package/core/built/admin/assets/stats/{index-K7ASx7EG.mjs → index-ChjIxhHy.mjs} +5 -5
- package/core/built/admin/assets/stats/{index-D5mlMG4l.mjs → index-DMkZbbZs.mjs} +14 -14
- package/core/built/admin/assets/stats/{index-CUuQaROI.mjs → index-wT0OIw_N.mjs} +355 -335
- package/core/built/admin/assets/stats/{sort-button-CELUx6Zp.mjs → sort-button-B8n8fYMi.mjs} +23 -23
- package/core/built/admin/assets/stats/{stats-d_u_in4l.mjs → stats-CGH-0JNs.mjs} +120 -119
- package/core/built/admin/assets/stats/stats.js +1 -1
- package/core/built/admin/assets/stats/{tabs-3wLZsy0v.mjs → tabs-EQCUj3Y9.mjs} +19 -19
- package/core/built/admin/assets/stats/{use-growth-stats-28Sr42va.mjs → use-growth-stats--CIfag21.mjs} +3 -3
- package/core/built/admin/assets/{stats-C5ad0fgQ.js → stats-lnFiOQZx.js} +1 -1
- package/core/built/admin/assets/{stats-view-BvkxPYNX.js → stats-view-BJVawuIv.js} +1 -1
- package/core/built/admin/assets/{step-1-D7_s-D99.js → step-1-Bx8MiQVF.js} +1 -1
- package/core/built/admin/assets/{step-2-B94Yf7FF.js → step-2-CLLXppER.js} +1 -1
- package/core/built/admin/assets/{step-3-DswXYYf4.js → step-3-C5WrQe8u.js} +2 -2
- package/core/built/admin/assets/{table-D30IXfUP.js → table-2waWpIF5.js} +1 -1
- package/core/built/admin/assets/{tabs-CjNdfW0y.js → tabs-CBD0hW8V.js} +1 -1
- package/core/built/admin/assets/{tags-B0ux9_dT.js → tags-Bgw5Hrb5.js} +1 -1
- package/core/built/admin/assets/{tags-PGeGAafJ.js → tags-CKrBptuC.js} +1 -1
- package/core/built/admin/assets/{tiers-BaXK0JoI.js → tiers-CO-pz1FX.js} +1 -1
- package/core/built/admin/assets/{toggle-group-DdY8HF3Y.js → toggle-group-BXAZzvJ9.js} +1 -1
- package/core/built/admin/assets/{topic-filter-Boh22uGD.js → topic-filter-U3qUH2P_.js} +1 -1
- package/core/built/admin/assets/{trash-D7ZWrnDq.js → trash-CJY1Wro_.js} +1 -1
- package/core/built/admin/assets/{use-growth-stats-Bg0nE0WG.js → use-growth-stats-BrLZI7da.js} +1 -1
- package/core/built/admin/assets/{use-infinite-virtual-scroll-DoeI5IY-.js → use-infinite-virtual-scroll-CiRn3kpz.js} +2 -2
- package/core/built/admin/assets/{use-simple-pagination-BJzBULR3.js → use-simple-pagination-CskJ0MDP.js} +1 -1
- package/core/built/admin/assets/{user-round-check-BLc3L-ei.js → user-round-check-zOuzV3OS.js} +1 -1
- package/core/built/admin/assets/{wallet-cards-xX4QZik7.js → wallet-cards-ddLuIN-b.js} +1 -1
- package/core/built/admin/assets/{web-DQ2qBymm.js → web-CGbkZWn3.js} +1 -1
- package/core/built/admin/index.html +6 -5
- package/core/frontend/services/theme-engine/i18n/i18n.js +9 -14
- package/core/server/api/endpoints/settings-public.js +3 -1
- package/core/server/api/endpoints/utils/serializers/input/settings.js +6 -1
- package/core/server/data/migrations/versions/6.19/2026-02-10-12-00-00-add-transistor-portal-settings.js +39 -0
- package/core/server/data/schema/default-settings/default-settings.json +28 -0
- package/core/server/data/schema/schema.js +2 -2
- package/core/server/data/seeders/importers/offers-importer.js +2 -2
- package/core/server/data/tinybird/endpoints/api_top_pages_router.pipe +28 -0
- package/core/server/data/tinybird/endpoints/api_top_pages_v3.pipe +8 -4
- package/core/server/data/tinybird/tests/api_top_pages_router.yaml +74 -0
- package/core/server/services/comments/comments-service-emails.js +1 -4
- package/core/server/services/email-service/email-templates/partials/styles.hbs +43 -0
- package/core/server/services/koenig/node-renderers/transistor-renderer.js +23 -17
- package/core/server/services/members/members-api/repositories/member-repository.js +30 -6
- package/core/server/services/members/members-api/services/next-payment-calculator.js +28 -20
- package/core/server/services/members/members-api/services/payments-service.js +1 -1
- package/core/server/services/members/members-api/utils/add-calendar-months.js +49 -0
- package/core/server/services/offers/application/offer-mapper.js +2 -2
- package/core/server/services/offers/domain/models/offer-amount.js +16 -0
- package/core/server/services/offers/domain/models/offer-duration.js +3 -4
- package/core/server/services/offers/domain/models/offer-type.js +5 -3
- package/core/server/services/offers/domain/models/offer.js +8 -1
- package/core/server/services/staff/staff-service-emails.js +2 -0
- package/core/server/services/stripe/stripe-api.js +19 -0
- package/core/shared/config/defaults.json +1 -1
- package/core/shared/labs.js +0 -1
- package/core/shared/settings-cache/cache-manager.js +8 -0
- package/core/shared/settings-cache/public.js +5 -0
- package/package.json +5 -5
- package/yarn.lock +4 -4
- package/components/tryghost-i18n-6.18.2.tgz +0 -0
- package/components/tryghost-parse-email-address-6.18.2.tgz +0 -0
- package/core/built/admin/assets/audience-CJHVR7kD.js +0 -1
- package/core/built/admin/assets/comments-CPd_iCc3.js +0 -1
- package/core/built/admin/assets/index-B2yksBz4.js +0 -13
- package/core/built/admin/assets/index-Cl_EPbQ2.js +0 -1
- package/core/built/admin/assets/index-D_sGUCda.css +0 -1
- package/core/built/admin/assets/modals-C06GcVIm.js +0 -77
- package/core/built/admin/assets/overview-CVMLGrVt.js +0 -1
- package/core/built/admin/assets/post-analytics-header-D9srAPT5.js +0 -1
- package/core/built/admin/assets/posts/posts-DeQT3knv.mjs +0 -21
- package/core/built/admin/assets/stats/audience-BWqU7WWT.mjs +0 -245
- package/core/built/admin/assets/url-helpers-mt6MBIi0.js +0 -1
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import{j as r,r as D,aH as we,e as ot,d7 as x_,av as Yg,aq as b_,ar as v_,as as Gg,aw as w_,au as el,aE as Jf,ax as y_,ay as If,az as __,aF as k_,aG as M_,d8 as rt,ad as ns,bM as it,d9 as ao,da as On,db as xt,dc as mt,cF as Xg,cW as Kg,dd as Vg,de as ch,df as j_,dg as Xr,dh as E_,di as ts,aB as T_,dj as N_,d6 as ed,d5 as Bs,dk as Ba,ak as S_,aN as A_,dl as C_,dm as tl,dn as td,dp as uh,dq as dr,dr as Qa,ds as Df,dt as I_,du as qs,dv as D_,dw as R_,dx as O_,dy as Wi,dz as $_,dA as L_,dB as Rf,ac as P_,dC as F_,dD as U_,dE as z_,dF as H_,dG as Cn,dH as fh,dI as dh,dJ as B_}from"./index-B8G0f0hb.js";import{H as bt,a as Kr,S as Ja,B as Ue,x as rl,K as W_,y as Gt,z as q_,A as Ot,M as vt,C as Gr,F as Y_,G as fn,J as rd,O as G_,Q as nl,U as ye,V as Ve,W as X_,X as nd,Y as Qe,Z as cn,_ as $n,$ as Et,a0 as St,a1 as ss,a2 as pr,a3 as K_,a4 as ph,a5 as et,a6 as Ne,a7 as hh,a8 as mh,a9 as st,aa as Zg,ab as Qg,ac as V_,ad as Z_,ae as Q_,af as J_,ag as Gs,ah as Xs,ai as Vr,aj as dn,ak as Ka,al as e2,am as t2,an as r2,ao as n2,ap as s2,aq as qi,ar as Yi,as as a2,at as gh,au as xh,av as o2,aw as Ks,ax as un,ay as ln,az as Jg,aA as i2,aB as l2,aC as c2,aD as e0,aE as sd,aF as u2,aG as f2,aH as d2,aI as Gi,aJ as ad,aK as p2,aL as od,aM as h2,aN as m2,aO as t0,aP as r0,aQ as id,aR as g2,aS as x2,aT as b2,aU as n0,aV as s0,aW as v2,aX as w2,aY as bh,aZ as a0,a_ as o0,a$ as i0,b0 as Of,b1 as y2,b2 as _2,b3 as k2,b4 as l0,b5 as Hi,b6 as M2,b7 as c0,b8 as u0,b9 as j2,ba as E2,bb as vh,bc as T2,bd as f0,be as wh,bf as N2,bg as d0,bh as ld,bi as cd,bj as S2,bk as A2,bl as p0,bm as C2,bn as h0,bo as I2,bp as D2,bq as R2}from"./settings-D-dhma2e.js";import{a as O2,u as m0,b as g0}from"./newsletters-DbH39vgA.js";import{C as $2,a as L2}from"./index-Dz8eTtOq.js";import{u as x0}from"./posts-DDkuYoN7.js";import{a as Vs,b as ud,c as P2,g as sl}from"./tiers-BaXK0JoI.js";import{L as F2}from"./list-filter-DPE4Xj2T.js";import"./index-DKAlEWM4.js";function U2(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}const b0=({children:e,...s})=>r.jsx("div",{className:"flex h-full w-full flex-col px-8",...s,children:r.jsx("div",{className:"h-full w-full overflow-hidden rounded-t-[4px] shadow-sm",children:e})}),v0=({children:e,...s})=>r.jsx("div",{className:"flex h-[775px] w-[380px] flex-col rounded-3xl bg-white p-2 shadow-xl dark:bg-grey-900",...s,children:r.jsx("div",{className:"w-100 h-100 grow overflow-auto rounded-2xl border border-grey-100 dark:border-grey-950",children:e})}),z2=({title:e,label:s,value:a,onChange:o,disabled:c,error:h,hint:y,checked:m,separator:l,testId:f})=>{const u=D.useId(),d=g=>{o(g===!0)};return r.jsxs("div",{children:[r.jsxs("div",{className:`flex flex-col gap-1 ${l&&"pb-2"}`,children:[e&&r.jsx(bt,{grey:!0,level:6,children:e}),r.jsxs("label",{className:`flex cursor-pointer items-start ${e&&"-mb-1 mt-1"}`,htmlFor:u,children:[r.jsx($2,{className:"mt-0.5 flex size-4 cursor-pointer appearance-none items-center justify-center rounded-[3px] border border-solid border-grey-500 bg-white outline-none data-[state=checked]:border-black data-[state=indeterminate]:border-black data-[state=checked]:bg-black data-[state=indeterminate]:bg-black","data-testid":f,defaultChecked:m,disabled:c,id:u,value:a,onCheckedChange:d,children:r.jsx(L2,{children:r.jsx("svg",{fill:"none",height:"11",viewBox:"0 0 10 11",width:"10",children:r.jsx("path",{d:"M1 5.88889L4.6 9L9 1",stroke:"white",strokeLinecap:"round",strokeWidth:"2"})})})}),r.jsxs("div",{className:`ml-2 flex flex-col ${y&&"mb-2"}`,children:[r.jsx("span",{className:`inline-block text-[1.425rem] dark:text-white ${y&&"-mb-1"}`,children:s}),y&&r.jsx(Kr,{color:h?"red":"",children:y})]})]})]}),(l||h)&&r.jsx(Ja,{className:h?"border-red":""})]})},$f=({title:e,checkboxes:s,hint:a,error:o})=>r.jsxs("div",{children:[e&&r.jsx(bt,{grey:!0,level:6,children:e}),r.jsx("div",{className:"mt-2 flex flex-col gap-1",children:s?.map(({key:c,...h})=>r.jsx(z2,{...h},c))}),r.jsx("div",{className:`flex flex-col ${a&&"mb-2"}`,children:a&&r.jsx(Kr,{color:o?"red":"",children:a})})]}),H2=({hex:e,value:s,title:a,size:o="md",isSelected:c,onSelect:h})=>{const y=D.useRef(null),m=u=>{u.preventDefault(),h(s!==void 0?s:e)},l=e.length===4&&e[3]==="0"||e.length===8&&e.slice(6)==="00";let f="h-5 w-5";switch(o){case"lg":f="w-6 h-6";break}return r.jsx("button",{ref:y,className:we("relative flex shrink-0 cursor-pointer items-center rounded-full border border-grey-300 dark:border-grey-800",f,c&&"outline outline-2 outline-green"),style:{backgroundColor:e},title:a,type:"button",onClick:m,children:l&&r.jsx("div",{className:"absolute left-0 top-0 z-10 w-[136%] origin-left rotate-45 border-b border-b-red"})})},w0=({title:e,value:s,swatches:a,swatchSize:o="md",onSwatchChange:c,onTogglePicker:h,isExpanded:y,picker:m=!0,containerClassName:l})=>{const f=a.find(d=>d.value===s||d.hex===s);l=we("flex flex-col gap-3");const u=y||!m;return r.jsxs("div",{className:l,children:[e&&r.jsx(bt,{useLabelTag:!0,children:e}),r.jsxs("div",{className:"flex gap-1",children:[u&&r.jsx("div",{className:"flex items-center gap-1",children:a.map(({customContent:d,...g})=>d?r.jsx(D.Fragment,{children:d},g.title):r.jsx(H2,{isSelected:f?.title===g.title,size:o,onSelect:c,...g},g.title))}),m&&r.jsxs("button",{"aria-label":"Pick color",className:"relative size-6 cursor-pointer rounded-full border border-grey-250 dark:border-grey-800",type:"button",onClick:h,children:[r.jsx("div",{className:"absolute inset-0 rounded-full bg-[conic-gradient(hsl(360,100%,50%),hsl(315,100%,50%),hsl(270,100%,50%),hsl(225,100%,50%),hsl(180,100%,50%),hsl(135,100%,50%),hsl(90,100%,50%),hsl(45,100%,50%),hsl(0,100%,50%))]"}),f&&r.jsx("div",{className:"absolute inset-[3px] overflow-hidden rounded-full border border-white dark:border-grey-950",style:{backgroundColor:f.hex},children:f.hex==="transparent"&&r.jsx("div",{className:"absolute left-[3px] top-[3px] z-10 w-[136%] origin-left rotate-45 border-b border-b-red"})}),!f&&s&&r.jsx("div",{className:"absolute inset-[3px] overflow-hidden rounded-full border border-white dark:border-grey-950",style:{backgroundColor:s},children:s==="transparent"&&r.jsx("div",{className:"absolute left-[3px] top-[3px] z-10 w-[136%] origin-left rotate-45 border-b border-b-red"})})]})]})]})};function Zs(){return(Zs=Object.assign||function(e){for(var s=1;s<arguments.length;s++){var a=arguments[s];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o])}return e}).apply(this,arguments)}function al(e,s){if(e==null)return{};var a,o,c={},h=Object.keys(e);for(o=0;o<h.length;o++)s.indexOf(a=h[o])>=0||(c[a]=e[a]);return c}function eo(e){var s=D.useRef(e),a=D.useRef(function(o){s.current&&s.current(o)});return s.current=e,a.current}var to=function(e,s,a){return s===void 0&&(s=0),a===void 0&&(a=1),e>a?a:e<s?s:e},Va=function(e){return"touches"in e},Lf=function(e){return e&&e.ownerDocument.defaultView||self},yh=function(e,s,a){var o=e.getBoundingClientRect(),c=Va(s)?(function(h,y){for(var m=0;m<h.length;m++)if(h[m].identifier===y)return h[m];return h[0]})(s.touches,a):s;return{left:to((c.pageX-(o.left+Lf(e).pageXOffset))/o.width),top:to((c.pageY-(o.top+Lf(e).pageYOffset))/o.height)}},_h=function(e){!Va(e)&&e.preventDefault()},y0=ot.memo(function(e){var s=e.onMove,a=e.onKey,o=al(e,["onMove","onKey"]),c=D.useRef(null),h=eo(s),y=eo(a),m=D.useRef(null),l=D.useRef(!1),f=D.useMemo(function(){var b=function(M){_h(M),(Va(M)?M.touches.length>0:M.buttons>0)&&c.current?h(yh(c.current,M,m.current)):k(!1)},_=function(){return k(!1)};function k(M){var T=l.current,A=Lf(c.current),I=M?A.addEventListener:A.removeEventListener;I(T?"touchmove":"mousemove",b),I(T?"touchend":"mouseup",_)}return[function(M){var T=M.nativeEvent,A=c.current;if(A&&(_h(T),!(function(O,$){return $&&!Va(O)})(T,l.current)&&A)){if(Va(T)){l.current=!0;var I=T.changedTouches||[];I.length&&(m.current=I[0].identifier)}A.focus(),h(yh(A,T,m.current)),k(!0)}},function(M){var T=M.which||M.keyCode;T<37||T>40||(M.preventDefault(),y({left:T===39?.05:T===37?-.05:0,top:T===40?.05:T===38?-.05:0}))},k]},[y,h]),u=f[0],d=f[1],g=f[2];return D.useEffect(function(){return g},[g]),ot.createElement("div",Zs({},o,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:c,onKeyDown:d,tabIndex:0,role:"slider"}))}),fd=function(e){return e.filter(Boolean).join(" ")},_0=function(e){var s=e.color,a=e.left,o=e.top,c=o===void 0?.5:o,h=fd(["react-colorful__pointer",e.className]);return ot.createElement("div",{className:h,style:{top:100*c+"%",left:100*a+"%"}},ot.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:s}}))},Yt=function(e,s,a){return s===void 0&&(s=0),a===void 0&&(a=Math.pow(10,s)),Math.round(a*e)/a},B2=function(e){return X2(Pf(e))},Pf=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Yt(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?Yt(parseInt(e.substring(6,8),16)/255,2):1}},W2=function(e){return G2(Y2(e))},q2=function(e){var s=e.s,a=e.v,o=e.a,c=(200-s)*a/100;return{h:Yt(e.h),s:Yt(c>0&&c<200?s*a/100/(c<=100?c:200-c)*100:0),l:Yt(c/2),a:Yt(o,2)}},Ff=function(e){var s=q2(e);return"hsl("+s.h+", "+s.s+"%, "+s.l+"%)"},Y2=function(e){var s=e.h,a=e.s,o=e.v,c=e.a;s=s/360*6,a/=100,o/=100;var h=Math.floor(s),y=o*(1-a),m=o*(1-(s-h)*a),l=o*(1-(1-s+h)*a),f=h%6;return{r:Yt(255*[o,m,y,y,l,o][f]),g:Yt(255*[l,o,o,m,y,y][f]),b:Yt(255*[y,y,l,o,o,m][f]),a:Yt(c,2)}},Ri=function(e){var s=e.toString(16);return s.length<2?"0"+s:s},G2=function(e){var s=e.r,a=e.g,o=e.b,c=e.a,h=c<1?Ri(Yt(255*c)):"";return"#"+Ri(s)+Ri(a)+Ri(o)+h},X2=function(e){var s=e.r,a=e.g,o=e.b,c=e.a,h=Math.max(s,a,o),y=h-Math.min(s,a,o),m=y?h===s?(a-o)/y:h===a?2+(o-s)/y:4+(s-a)/y:0;return{h:Yt(60*(m<0?m+6:m)),s:Yt(h?y/h*100:0),v:Yt(h/255*100),a:c}},K2=ot.memo(function(e){var s=e.hue,a=e.onChange,o=fd(["react-colorful__hue",e.className]);return ot.createElement("div",{className:o},ot.createElement(y0,{onMove:function(c){a({h:360*c.left})},onKey:function(c){a({h:to(s+360*c.left,0,360)})},"aria-label":"Hue","aria-valuenow":Yt(s),"aria-valuemax":"360","aria-valuemin":"0"},ot.createElement(_0,{className:"react-colorful__hue-pointer",left:s/360,color:Ff({h:s,s:100,v:100,a:1})})))}),V2=ot.memo(function(e){var s=e.hsva,a=e.onChange,o={backgroundColor:Ff({h:s.h,s:100,v:100,a:1})};return ot.createElement("div",{className:"react-colorful__saturation",style:o},ot.createElement(y0,{onMove:function(c){a({s:100*c.left,v:100-100*c.top})},onKey:function(c){a({s:to(s.s+100*c.left,0,100),v:to(s.v-100*c.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Yt(s.s)+"%, Brightness "+Yt(s.v)+"%"},ot.createElement(_0,{className:"react-colorful__saturation-pointer",top:1-s.v/100,left:s.s/100,color:Ff(s)})))}),k0=function(e,s){if(e===s)return!0;for(var a in e)if(e[a]!==s[a])return!1;return!0},Z2=function(e,s){return e.toLowerCase()===s.toLowerCase()||k0(Pf(e),Pf(s))};function Q2(e,s,a){var o=eo(a),c=D.useState(function(){return e.toHsva(s)}),h=c[0],y=c[1],m=D.useRef({color:s,hsva:h});D.useEffect(function(){if(!e.equal(s,m.current.color)){var f=e.toHsva(s);m.current={hsva:f,color:s},y(f)}},[s,e]),D.useEffect(function(){var f;k0(h,m.current.hsva)||e.equal(f=e.fromHsva(h),m.current.color)||(m.current={hsva:h,color:f},o(f))},[h,e,o]);var l=D.useCallback(function(f){y(function(u){return Object.assign({},u,f)})},[]);return[h,l]}var J2=typeof window<"u"?D.useLayoutEffect:D.useEffect,e3=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},kh=new Map,t3=function(e){J2(function(){var s=e.current?e.current.ownerDocument:document;if(s!==void 0&&!kh.has(s)){var a=s.createElement("style");a.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,kh.set(s,a);var o=e3();o&&a.setAttribute("nonce",o),s.head.appendChild(a)}},[])},r3=function(e){var s=e.className,a=e.colorModel,o=e.color,c=o===void 0?a.defaultColor:o,h=e.onChange,y=al(e,["className","colorModel","color","onChange"]),m=D.useRef(null);t3(m);var l=Q2(a,c,h),f=l[0],u=l[1],d=fd(["react-colorful",s]);return ot.createElement("div",Zs({},y,{ref:m,className:d}),ot.createElement(V2,{hsva:f,onChange:u}),ot.createElement(K2,{hue:f.h,onChange:u,className:"react-colorful__last-control"}))},n3={defaultColor:"000",toHsva:B2,fromHsva:function(e){return W2({h:e.h,s:e.s,v:e.v,a:1})},equal:Z2},s3=function(e){return ot.createElement(r3,Zs({},e,{colorModel:n3}))},a3=/^#?([0-9A-F]{3,8})$/i,o3=function(e){var s=e.color,a=s===void 0?"":s,o=e.onChange,c=e.onBlur,h=e.escape,y=e.validate,m=e.format,l=e.process,f=al(e,["color","onChange","onBlur","escape","validate","format","process"]),u=D.useState(function(){return h(a)}),d=u[0],g=u[1],b=eo(o),_=eo(c),k=D.useCallback(function(T){var A=h(T.target.value);g(A),y(A)&&b(l?l(A):A)},[h,l,y,b]),M=D.useCallback(function(T){y(T.target.value)||g(h(a)),_(T)},[a,h,y,_]);return D.useEffect(function(){g(h(a))},[a,h]),ot.createElement("input",Zs({},f,{value:m?m(d):d,spellCheck:"false",onChange:k,onBlur:M}))},Mh=function(e){return"#"+e},i3=function(e){var s=e.prefixed,a=e.alpha,o=al(e,["prefixed","alpha"]),c=D.useCallback(function(y){return y.replace(/([^0-9A-F]+)/gi,"").substring(0,a?8:6)},[a]),h=D.useCallback(function(y){return(function(m,l){var f=a3.exec(m),u=f?f[1].length:0;return u===3||u===6||!!l&&u===4||!!l&&u===8})(y,a)},[a]);return ot.createElement(o3,Zs({},o,{escape:c,format:s?Mh:void 0,process:Mh,validate:h}))};const l3=({hexValue:e,eyedropper:s,clearButtonValue:a,containerClassName:o,onChange:c})=>{const h=D.useRef(null),y=D.useCallback(g=>{var b,_,k;g.stopPropagation();const M=(b=h.current)==null?void 0:b.querySelector("input");g.target!==M&&((k=(_=h.current)==null?void 0:_.querySelector("input"))==null||k.focus(),g.preventDefault())},[]),m=D.useRef(!1),l=D.useCallback(()=>{var g,b;m.current=!1,(b=(g=h.current)==null?void 0:g.querySelector("input"))==null||b.focus(),document.removeEventListener("mouseup",l),document.removeEventListener("touchend",l)},[]),f=D.useCallback(()=>{m.current=!0,document.addEventListener("mouseup",l),document.addEventListener("touchend",l)},[l]),u=D.useCallback(g=>{if(g.preventDefault(),!window.EyeDropper)return;m.current=!0,document.body.style.setProperty("pointer-events","none"),new window.EyeDropper().open().then(_=>c?.(_.sRGBHex)).finally(()=>{var _,k;m.current=!1,document.body.style.removeProperty("pointer-events"),(k=(_=h.current)==null?void 0:_.querySelector("input"))==null||k.focus()})},[c]);D.useEffect(()=>{var g,b;(b=(g=h.current)==null?void 0:g.querySelector("input"))==null||b.focus()},[]);const d=D.useCallback(()=>{var g,b;(b=(g=h.current)==null?void 0:g.querySelector("input"))==null||b.focus()},[]);return o=we("mt-2",o),r.jsxs("div",{className:o,onMouseDown:y,onTouchStart:y,children:[r.jsx(s3,{className:"w-full",color:e||"#ffffff",onChange:c,onMouseDown:f,onTouchStart:f}),r.jsxs("div",{className:"mt-3 flex gap-2",children:[r.jsxs("div",{ref:h,className:"peer relative order-2 flex h-10 w-full items-center",onClick:d,children:[r.jsx("span",{className:"absolute left-2 top-[9px] z-10 ml-1 mr-2 text-grey-700",children:"#"}),r.jsx(i3,{"aria-label":"Color value",className:"z-[1] w-full rounded-md border border-transparent bg-grey-150 p-2 pl-6 transition-all hover:bg-grey-100 focus:border-green focus:bg-white focus:shadow-[0_0_0_1px_rgba(48,207,67,1)] dark:bg-grey-900 dark:text-white dark:focus:bg-grey-925",color:e,onChange:c}),s&&!!window.EyeDropper&&r.jsx("button",{className:"absolute inset-y-0 right-3 z-50 my-auto h-4 w-4 p-[1px]",type:"button",onClick:u,children:r.jsx(x_,{className:"h-full w-full"})})]}),a!==void 0&&r.jsx(Ue,{color:"grey",value:"Clear",onClick:()=>c?.(a)})]})]})},c3=D.createContext({colorPickers:[]}),jh=e=>e.length===4?e.replace(/#(.)(.)(.)/,"#$1$1$2$2$3$3"):e,Yr=({testId:e,title:s,direction:a,value:o,hint:c,error:h,eyedropper:y,clearButtonValue:m,onChange:l,swatches:f=[],alwaysOpen:u=!1,debounceMs:d})=>{const[g,b]=D.useState(!1),[_,k]=D.useState(o),M=D.useContext(c3),T=D.useId();D.useEffect(()=>{k(q=>jh(q||"")===o?q:o)},[o]),D.useEffect(()=>(M.colorPickers.push({id:T,setExpanded:b}),()=>{M.colorPickers=M.colorPickers.filter(q=>q.id!==T)}),[M,T]),D.useEffect(()=>{if(g){M.colorPickers.filter(R=>R.id!==T).forEach(R=>R.setExpanded(!1));const q=()=>{b(!1)};return document.addEventListener("click",q),()=>{document.removeEventListener("click",q)}}},[M,T,g]);const A=D.useMemo(()=>l&&d?rl(l,d):l,[d,l]),I=q=>{k(q),A?.(q?jh(q):null)};let O=r.jsx(w0,{isExpanded:g,swatches:f,value:_,onSwatchChange:q=>{I(q),b(!1)},onTogglePicker:()=>!u&&b(!g)});s&&(O=r.jsxs("div",{className:we("flex w-full cursor-pointer items-start first:mt-0 dark:text-white",a==="rtl"&&"flex-row-reverse"),children:[r.jsx("div",{className:"shrink-0",children:O}),r.jsxs("div",{className:we("flex-1",a==="rtl"?"pr-2":"pl-2",c?"mt-[-2px]":"mt-[1px]"),onClick:()=>!u&&b(!g),children:[s,c&&r.jsx("div",{className:`text-xs ${h?"text-red":"text-grey-700"}`,children:c})]})]}));const $=f.find(q=>q.value===_);return r.jsxs("div",{className:"flex-col","data-testid":e,onClick:q=>q.stopPropagation(),children:[O,(u||g)&&r.jsx(l3,{clearButtonValue:m,eyedropper:y,hexValue:$?.hex||_||void 0,onChange:I})]})},u3=({value:e,onChange:s,singleParagraph:a=!0,...o})=>{const c=D.useCallback(h=>{const m=new DOMParser().parseFromString(h,"text/html");m.querySelectorAll("*").forEach(f=>{f.style.removeProperty("white-space"),f.getAttribute("style")||f.removeAttribute("style")}),m.body.innerHTML!==e&&s?.(m.body.innerHTML)},[e,s]);return r.jsx(W_,{...o,singleParagraph:a,children:h=>r.jsx(h.HtmlOutputPlugin,{html:e,setHtml:c})})},dd=({title:e,hideTitle:s,error:a,hint:o,value:c,clearBg:h=!1,className:y="",containerClassName:m="",hintClassName:l="",unstyled:f=!1,...u})=>{const d=f?"":we("flex min-h-[32px] items-center rounded-md border border-transparent py-1.5 md:min-h-[36px]",h?"bg-transparent":"bg-grey-150 px-3 dark:bg-grey-900",a?"border-red":"transition-all hover:bg-grey-100 has-[:focus]:border-green has-[:focus]:bg-white has-[:focus]:shadow-[0_0_0_1px_rgba(48,207,67,1)] dark:selection:bg-[rgba(88,101,116,0.99)] dark:hover:bg-grey-925 dark:has-[:focus]:bg-grey-950",e&&!s&&!h&&"mt-2",y);return r.jsxs("div",{className:`flex flex-col ${m}`,children:[e&&r.jsx(bt,{className:s?"sr-only":"",grey:!0,useLabelTag:!0,children:e}),r.jsx("div",{className:d,children:r.jsx(u3,{...u,value:c})}),o&&r.jsx(Kr,{className:l,color:a?"red":"",children:o})]})};var pd="Radio",[f3,M0]=Gg(pd),[d3,p3]=f3(pd),j0=D.forwardRef((e,s)=>{const{__scopeRadio:a,name:o,checked:c=!1,required:h,disabled:y,value:m="on",onCheck:l,form:f,...u}=e,[d,g]=D.useState(null),b=Jf(s,M=>g(M)),_=D.useRef(!1),k=d?f||!!d.closest("form"):!0;return r.jsxs(d3,{scope:a,checked:c,disabled:y,children:[r.jsx(el.button,{type:"button",role:"radio","aria-checked":c,"data-state":S0(c),"data-disabled":y?"":void 0,disabled:y,value:m,...u,ref:b,onClick:If(e.onClick,M=>{c||l?.(),k&&(_.current=M.isPropagationStopped(),_.current||M.stopPropagation())})}),k&&r.jsx(N0,{control:d,bubbles:!_.current,name:o,value:m,checked:c,required:h,disabled:y,form:f,style:{transform:"translateX(-100%)"}})]})});j0.displayName=pd;var E0="RadioIndicator",T0=D.forwardRef((e,s)=>{const{__scopeRadio:a,forceMount:o,...c}=e,h=p3(E0,a);return r.jsx(__,{present:o||h.checked,children:r.jsx(el.span,{"data-state":S0(h.checked),"data-disabled":h.disabled?"":void 0,...c,ref:s})})});T0.displayName=E0;var h3="RadioBubbleInput",N0=D.forwardRef(({__scopeRadio:e,control:s,checked:a,bubbles:o=!0,...c},h)=>{const y=D.useRef(null),m=Jf(y,h),l=k_(a),f=M_(s);return D.useEffect(()=>{const u=y.current;if(!u)return;const d=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==a&&b){const _=new Event("click",{bubbles:o});b.call(u,a),u.dispatchEvent(_)}},[l,a,o]),r.jsx(el.input,{type:"radio","aria-hidden":!0,defaultChecked:a,...c,tabIndex:-1,ref:m,style:{...c.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N0.displayName=h3;function S0(e){return e?"checked":"unchecked"}var m3=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ol="RadioGroup",[g3]=Gg(ol,[Yg,M0]),A0=Yg(),C0=M0(),[x3,b3]=g3(ol),I0=D.forwardRef((e,s)=>{const{__scopeRadioGroup:a,name:o,defaultValue:c,value:h,required:y=!1,disabled:m=!1,orientation:l,dir:f,loop:u=!0,onValueChange:d,...g}=e,b=A0(a),_=b_(f),[k,M]=v_({prop:h,defaultProp:c??null,onChange:d,caller:ol});return r.jsx(x3,{scope:a,name:o,required:y,disabled:m,value:k,onValueChange:M,children:r.jsx(w_,{asChild:!0,...b,orientation:l,dir:_,loop:u,children:r.jsx(el.div,{role:"radiogroup","aria-required":y,"aria-orientation":l,"data-disabled":m?"":void 0,dir:_,...g,ref:s})})})});I0.displayName=ol;var D0="RadioGroupItem",R0=D.forwardRef((e,s)=>{const{__scopeRadioGroup:a,disabled:o,...c}=e,h=b3(D0,a),y=h.disabled||o,m=A0(a),l=C0(a),f=D.useRef(null),u=Jf(s,f),d=h.value===c.value,g=D.useRef(!1);return D.useEffect(()=>{const b=k=>{m3.includes(k.key)&&(g.current=!0)},_=()=>g.current=!1;return document.addEventListener("keydown",b),document.addEventListener("keyup",_),()=>{document.removeEventListener("keydown",b),document.removeEventListener("keyup",_)}},[]),r.jsx(y_,{asChild:!0,...m,focusable:!y,active:d,children:r.jsx(j0,{disabled:y,required:h.required,checked:d,...l,...c,name:h.name,ref:u,onCheck:()=>h.onValueChange(c.value),onKeyDown:If(b=>{b.key==="Enter"&&b.preventDefault()}),onFocus:If(c.onFocus,()=>{g.current&&f.current?.click()})})})});R0.displayName=D0;var v3="RadioGroupIndicator",O0=D.forwardRef((e,s)=>{const{__scopeRadioGroup:a,...o}=e,c=C0(a);return r.jsx(T0,{...c,...o,ref:s})});O0.displayName=v3;var w3=I0,y3=R0,_3=O0;const k3=({id:e,title:s,options:a,onSelect:o,error:c,hint:h,selectedOption:y,separator:m})=>r.jsxs(w3,{defaultValue:y,name:e,onValueChange:o,children:[r.jsxs("div",{className:`flex flex-col gap-2 ${m&&"pb-2"}`,children:[s&&r.jsx(bt,{level:6,children:s}),a.map(l=>r.jsxs("label",{className:`flex cursor-pointer items-start ${s&&"-mb-1 mt-1"}`,htmlFor:l.value,children:[r.jsx(y3,{className:"relative float-left mt-[3px] size-4 min-w-[16px] appearance-none rounded-full border-2 border-solid border-grey-300 hover:cursor-pointer focus:shadow-none focus:outline-none focus:ring-0 data-[state=checked]:border-green data-[state=checked]:focus:border-green dark:border-grey-800 dark:text-white dark:data-[state=checked]:border-green dark:data-[state=checked]:focus:border-green",id:l.value,value:l.value,children:r.jsx(_3,{className:"flex size-full items-center justify-center after:block after:size-[6px] after:rounded-full after:border-green after:bg-green after:content-[''] dark:after:border-green dark:after:bg-green"})}),r.jsxs("div",{className:`ml-2 flex flex-col ${l.hint&&"mb-2"}`,children:[r.jsx("span",{className:`inline-block text-md dark:text-white ${l.hint&&"-mb-1"}`,children:l.label}),l.hint&&r.jsx(Kr,{children:l.hint})]})]},l.value)),h&&r.jsx(Kr,{color:c?"red":"",children:h})]}),(m||c)&&r.jsx(Ja,{className:c?"border-red":""})]}),Xi=({children:e,gap:s="md",className:a})=>{let o="gap-3";switch(s){case"sm":o="gap-2";break;case"md":o="gap-3";break;case"lg":o="gap-4";break}return a=we("flex flex-col",o,a),r.jsx("div",{className:a,children:e})},hd=({heading:e,children:s,className:a})=>(a=we("w-full p-[8vmin] pt-5",a),r.jsxs("div",{className:a,children:[e&&r.jsx(bt,{className:"mb-8",children:e}),s]})),md=({items:e,backIcon:s=!1,snapBackIcon:a=!0,onBack:o,containerClassName:c,itemClassName:h,activeItemClassName:y,separatorClassName:m})=>{const l=e.length;let f=0;return c=we("flex items-center gap-2 text-sm",c),y=we("font-bold",y),h=we("text-sm",h),r.jsxs("div",{className:c,children:[s&&r.jsx(Ue,{className:a?"mr-1":"mr-6",icon:"arrow-left",iconColorClass:"dark:text-white",size:"sm",link:!0,onClick:o}),e.map(u=>{const d=f===l-1?r.jsx("span",{className:y,children:u.label}):r.jsxs(r.Fragment,{children:[r.jsx("button",{className:`${h} ${u.onClick&&"-mx-1 cursor-pointer rounded-sm px-1 py-px hover:bg-grey-100 dark:hover:bg-grey-900"}`,type:"button",onClick:u.onClick,children:u.label},`bc-${f}`),r.jsx("span",{className:m,children:"/"})]});return f=f+1,d})]})},as=({testId:e,title:s,titleHeadingLevel:a=4,size:o="full",width:c,height:h,sidebar:y="",preview:m,dirty:l=!1,cancelLabel:f="Cancel",okLabel:u="OK",okColor:d="black",previewToolbar:g=!0,leftToolbar:b=!0,rightToolbar:_=!0,deviceSelector:k=!0,siteLink:M,previewToolbarURLs:T,previewBgColor:A="grey",selectedURL:I,previewToolbarTabs:O,previewToolbarBreadcrumbs:$,buttonsDisabled:q,sidebarButtons:R,sidebarHeader:K,sidebarPadding:X=!0,sidebarContentClasses:Y,enableCMDS:L=!0,backDropClick:B,onCancel:J,onOk:te,afterClose:ne,onSelectURL:Q,onSelectDesktopView:se,onSelectMobileView:be,onBreadcrumbsBack:je})=>{const W=Gt(),{setGlobalDirtyState:he}=q_();D.useEffect(()=>{he(l)},[l,he]),D.useEffect(()=>{if(te){const ee=xe=>{(xe.metaKey||xe.ctrlKey)&&xe.key==="s"&&(xe.preventDefault(),te())};if(L)return window.addEventListener("keydown",ee),()=>{window.removeEventListener("keydown",ee)}}});const[ge,U]=D.useState("desktop");if(ge==="mobile"&&k?m=r.jsx(v0,{"data-testid":"preview-mobile",children:m}):ge==="desktop"&&k&&(m=r.jsx(b0,{"data-testid":"preview-desktop",children:m})),g){let ee=r.jsx(r.Fragment,{});T?ee=r.jsx(Ot,{options:T,selectedOption:T.find(Ce=>Ce.value===I),onSelect:Ce=>Ce&&Q?.(Ce.value)}):O?ee=r.jsx(fn,{border:!1,selectedTab:I,tabs:O,width:"wide",onTabChange:Q}):$&&(ee=r.jsx(md,{activeItemClassName:"hidden md:!block md:!visible",containerClassName:"whitespace-nowrap",itemClassName:"hidden md:!block md:!visible",items:$,separatorClassName:"hidden md:!block md:!visible",backIcon:!0,onBack:je}));const xe="text-black dark:text-green",Te="text-grey-500 dark:text-grey-600",De=[{icon:"laptop",label:"Desktop",hideLabel:!0,link:!0,size:"sm",iconColorClass:ge==="desktop"?xe:Te,onClick:se||(()=>{U("desktop")})},{icon:"mobile",label:"Mobile",hideLabel:!0,link:!0,size:"sm",iconColorClass:ge==="mobile"?xe:Te,onClick:be||(()=>{U("mobile")})}],Me=k&&r.jsx(Gr,{buttons:De});let oe="";A==="grey"?oe="bg-grey-50 dark:bg-black":A==="greygradient"&&(oe="bg-gradient-to-tr from-white to-[#f9f9fa] dark:from-grey-950 dark:to-black");const Ee=we("min-w-100 absolute inset-y-0 left-0 right-[400px] flex w-full grow flex-col overflow-y-auto",oe);let Ae;M&&(Ae=r.jsx("div",{className:"ml-3 border-l border-grey-400 dark:border-grey-800",children:r.jsxs("a",{className:"ml-3 flex items-center gap-1 text-sm",href:M,rel:"noopener noreferrer",target:"_blank",children:["View site ",r.jsx(rt,{name:"arrow-top-right",size:"xs"})]})})),m=r.jsxs("div",{className:Ee,children:[g&&r.jsxs("header",{className:"relative flex h-[80px] shrink-0 items-center justify-center px-8 py-5","data-testid":"design-toolbar",children:[b&&r.jsx("div",{className:"absolute left-8 flex h-full items-center",children:ee}),_&&r.jsxs("div",{className:"absolute right-8 flex h-full items-center",children:[Me,Ae]})]}),r.jsx("div",{className:"flex grow items-center justify-center text-sm text-grey-400",children:m})]})}const P=[];return R||(P.push({key:"cancel-modal",label:f,onClick:J||(()=>{Y_(l,()=>{W.remove(),ne?.()})}),disabled:q}),P.push({key:"ok-modal",label:u,color:d,onClick:te,disabled:q})),r.jsx(vt,{afterClose:ne,animate:!1,backDropClick:B,dirty:l,footer:!1,height:h,padding:!1,size:o,testId:e,title:"",width:c,hideXOnMobile:!0,children:r.jsxs("div",{className:"flex h-full grow",children:[r.jsx("div",{className:`relative hidden grow flex-col [@media(min-width:801px)]:!visible [@media(min-width:801px)]:!flex ${A==="grey"?"bg-grey-50":"bg-white dark:bg-black"}`,children:m}),y&&r.jsxs("div",{className:"relative flex size-full flex-col border-l border-grey-100 dark:border-grey-900 [@media(min-width:801px)]:w-auto [@media(min-width:801px)]:basis-[400px]",children:[K||r.jsxs("div",{className:"flex max-h-[82px] items-center justify-between gap-3 px-7 py-6",children:[r.jsx(bt,{level:a,children:s}),R||r.jsx(Gr,{buttons:P})]}),r.jsx("div",{className:`${K?"":"absolute inset-x-0 bottom-0 top-[80px] grow"} ${X&&"p-7 pt-0"} flex flex-col justify-between overflow-y-auto ${Y&&Y}`,children:y})]})]})})},M3=({offset:e,onTrigger:s})=>{const a=D.useRef(null);return D.useEffect(()=>{const o=new IntersectionObserver(c=>{c[0].intersectionRatio<=0||s()});return a.current&&o.observe(a.current),()=>o.disconnect()},[s]),r.jsx("div",{ref:a,className:"absolute w-full",style:{bottom:e}})},$0=({trigger:e,triggerButtonProps:s,items:a,position:o="start",open:c,setOpen:h})=>(e||(e=r.jsx(Ue,{icon:"ellipsis",label:"Menu",hideLabel:!0,...s})),r.jsx(rd,{open:c,position:o,setOpen:h,trigger:e,closeOnItemClick:!0,children:r.jsx("div",{className:"flex min-w-[160px] flex-col justify-stretch py-1",role:"none",children:a.map(y=>r.jsx("button",{className:`mx-1 block cursor-pointer rounded-[2.5px] px-4 py-1.5 text-left text-sm hover:bg-grey-100 dark:hover:bg-grey-925 ${y.destructive&&" text-red-500"}`,type:"button",onClick:m=>{y.onClick&&y.onClick(m)},children:y.label},y.id))})}));var L0=typeof global=="object"&&global&&global.Object===Object&&global,j3=typeof self=="object"&&self&&self.Object===Object&&self,pn=L0||j3||Function("return this")(),Ys=pn.Symbol,P0=Object.prototype,E3=P0.hasOwnProperty,T3=P0.toString,Wa=Ys?Ys.toStringTag:void 0;function N3(e){var s=E3.call(e,Wa),a=e[Wa];try{e[Wa]=void 0;var o=!0}catch{}var c=T3.call(e);return o&&(s?e[Wa]=a:delete e[Wa]),c}var S3=Object.prototype,A3=S3.toString;function C3(e){return A3.call(e)}var I3="[object Null]",D3="[object Undefined]",Eh=Ys?Ys.toStringTag:void 0;function oo(e){return e==null?e===void 0?D3:I3:Eh&&Eh in Object(e)?N3(e):C3(e)}function ro(e){return e!=null&&typeof e=="object"}var Ki=Array.isArray;function F0(e){var s=typeof e;return e!=null&&(s=="object"||s=="function")}var R3="[object AsyncFunction]",O3="[object Function]",$3="[object GeneratorFunction]",L3="[object Proxy]";function U0(e){if(!F0(e))return!1;var s=oo(e);return s==O3||s==$3||s==R3||s==L3}var ou=pn["__core-js_shared__"],Th=(function(){var e=/[^.]+$/.exec(ou&&ou.keys&&ou.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function P3(e){return!!Th&&Th in e}var F3=Function.prototype,U3=F3.toString;function os(e){if(e!=null){try{return U3.call(e)}catch{}try{return e+""}catch{}}return""}var z3=/[\\^$.*+?()[\]{}|]/g,H3=/^\[object .+?Constructor\]$/,B3=Function.prototype,W3=Object.prototype,q3=B3.toString,Y3=W3.hasOwnProperty,G3=RegExp("^"+q3.call(Y3).replace(z3,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function X3(e){if(!F0(e)||P3(e))return!1;var s=U0(e)?G3:H3;return s.test(os(e))}function K3(e,s){return e?.[s]}function Qs(e,s){var a=K3(e,s);return X3(a)?a:void 0}var Uf=Qs(pn,"WeakMap"),V3=9007199254740991,Z3=/^(?:0|[1-9]\d*)$/;function Q3(e,s){var a=typeof e;return s=s??V3,!!s&&(a=="number"||a!="symbol"&&Z3.test(e))&&e>-1&&e%1==0&&e<s}function z0(e,s){return e===s||e!==e&&s!==s}var J3=9007199254740991;function H0(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=J3}function ek(e){return e!=null&&H0(e.length)&&!U0(e)}var tk=Object.prototype;function rk(e){var s=e&&e.constructor,a=typeof s=="function"&&s.prototype||tk;return e===a}function nk(e,s){for(var a=-1,o=Array(e);++a<e;)o[a]=s(a);return o}var sk="[object Arguments]";function Nh(e){return ro(e)&&oo(e)==sk}var B0=Object.prototype,ak=B0.hasOwnProperty,ok=B0.propertyIsEnumerable,ik=Nh((function(){return arguments})())?Nh:function(e){return ro(e)&&ak.call(e,"callee")&&!ok.call(e,"callee")};function lk(){return!1}var W0=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Sh=W0&&typeof module=="object"&&module&&!module.nodeType&&module,ck=Sh&&Sh.exports===W0,Ah=ck?pn.Buffer:void 0,uk=Ah?Ah.isBuffer:void 0,zf=uk||lk,fk="[object Arguments]",dk="[object Array]",pk="[object Boolean]",hk="[object Date]",mk="[object Error]",gk="[object Function]",xk="[object Map]",bk="[object Number]",vk="[object Object]",wk="[object RegExp]",yk="[object Set]",_k="[object String]",kk="[object WeakMap]",Mk="[object ArrayBuffer]",jk="[object DataView]",Ek="[object Float32Array]",Tk="[object Float64Array]",Nk="[object Int8Array]",Sk="[object Int16Array]",Ak="[object Int32Array]",Ck="[object Uint8Array]",Ik="[object Uint8ClampedArray]",Dk="[object Uint16Array]",Rk="[object Uint32Array]",yt={};yt[Ek]=yt[Tk]=yt[Nk]=yt[Sk]=yt[Ak]=yt[Ck]=yt[Ik]=yt[Dk]=yt[Rk]=!0;yt[fk]=yt[dk]=yt[Mk]=yt[pk]=yt[jk]=yt[hk]=yt[mk]=yt[gk]=yt[xk]=yt[bk]=yt[vk]=yt[wk]=yt[yk]=yt[_k]=yt[kk]=!1;function Ok(e){return ro(e)&&H0(e.length)&&!!yt[oo(e)]}function $k(e){return function(s){return e(s)}}var q0=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Za=q0&&typeof module=="object"&&module&&!module.nodeType&&module,Lk=Za&&Za.exports===q0,iu=Lk&&L0.process,Ch=(function(){try{var e=Za&&Za.require&&Za.require("util").types;return e||iu&&iu.binding&&iu.binding("util")}catch{}})(),Ih=Ch&&Ch.isTypedArray,Y0=Ih?$k(Ih):Ok,Pk=Object.prototype,Fk=Pk.hasOwnProperty;function Uk(e,s){var a=Ki(e),o=!a&&ik(e),c=!a&&!o&&zf(e),h=!a&&!o&&!c&&Y0(e),y=a||o||c||h,m=y?nk(e.length,String):[],l=m.length;for(var f in e)Fk.call(e,f)&&!(y&&(f=="length"||c&&(f=="offset"||f=="parent")||h&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Q3(f,l)))&&m.push(f);return m}function zk(e,s){return function(a){return e(s(a))}}var Hk=zk(Object.keys,Object),Bk=Object.prototype,Wk=Bk.hasOwnProperty;function qk(e){if(!rk(e))return Hk(e);var s=[];for(var a in Object(e))Wk.call(e,a)&&a!="constructor"&&s.push(a);return s}function Yk(e){return ek(e)?Uk(e):qk(e)}var no=Qs(Object,"create");function Gk(){this.__data__=no?no(null):{},this.size=0}function Xk(e){var s=this.has(e)&&delete this.__data__[e];return this.size-=s?1:0,s}var Kk="__lodash_hash_undefined__",Vk=Object.prototype,Zk=Vk.hasOwnProperty;function Qk(e){var s=this.__data__;if(no){var a=s[e];return a===Kk?void 0:a}return Zk.call(s,e)?s[e]:void 0}var Jk=Object.prototype,e8=Jk.hasOwnProperty;function t8(e){var s=this.__data__;return no?s[e]!==void 0:e8.call(s,e)}var r8="__lodash_hash_undefined__";function n8(e,s){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=no&&s===void 0?r8:s,this}function rs(e){var s=-1,a=e==null?0:e.length;for(this.clear();++s<a;){var o=e[s];this.set(o[0],o[1])}}rs.prototype.clear=Gk;rs.prototype.delete=Xk;rs.prototype.get=Qk;rs.prototype.has=t8;rs.prototype.set=n8;function s8(){this.__data__=[],this.size=0}function il(e,s){for(var a=e.length;a--;)if(z0(e[a][0],s))return a;return-1}var a8=Array.prototype,o8=a8.splice;function i8(e){var s=this.__data__,a=il(s,e);if(a<0)return!1;var o=s.length-1;return a==o?s.pop():o8.call(s,a,1),--this.size,!0}function l8(e){var s=this.__data__,a=il(s,e);return a<0?void 0:s[a][1]}function c8(e){return il(this.__data__,e)>-1}function u8(e,s){var a=this.__data__,o=il(a,e);return o<0?(++this.size,a.push([e,s])):a[o][1]=s,this}function hn(e){var s=-1,a=e==null?0:e.length;for(this.clear();++s<a;){var o=e[s];this.set(o[0],o[1])}}hn.prototype.clear=s8;hn.prototype.delete=i8;hn.prototype.get=l8;hn.prototype.has=c8;hn.prototype.set=u8;var so=Qs(pn,"Map");function f8(){this.size=0,this.__data__={hash:new rs,map:new(so||hn),string:new rs}}function d8(e){var s=typeof e;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?e!=="__proto__":e===null}function ll(e,s){var a=e.__data__;return d8(s)?a[typeof s=="string"?"string":"hash"]:a.map}function p8(e){var s=ll(this,e).delete(e);return this.size-=s?1:0,s}function h8(e){return ll(this,e).get(e)}function m8(e){return ll(this,e).has(e)}function g8(e,s){var a=ll(this,e),o=a.size;return a.set(e,s),this.size+=a.size==o?0:1,this}function is(e){var s=-1,a=e==null?0:e.length;for(this.clear();++s<a;){var o=e[s];this.set(o[0],o[1])}}is.prototype.clear=f8;is.prototype.delete=p8;is.prototype.get=h8;is.prototype.has=m8;is.prototype.set=g8;function x8(e,s){for(var a=-1,o=s.length,c=e.length;++a<o;)e[c+a]=s[a];return e}function b8(){this.__data__=new hn,this.size=0}function v8(e){var s=this.__data__,a=s.delete(e);return this.size=s.size,a}function w8(e){return this.__data__.get(e)}function y8(e){return this.__data__.has(e)}var _8=200;function k8(e,s){var a=this.__data__;if(a instanceof hn){var o=a.__data__;if(!so||o.length<_8-1)return o.push([e,s]),this.size=++a.size,this;a=this.__data__=new is(o)}return a.set(e,s),this.size=a.size,this}function Rn(e){var s=this.__data__=new hn(e);this.size=s.size}Rn.prototype.clear=b8;Rn.prototype.delete=v8;Rn.prototype.get=w8;Rn.prototype.has=y8;Rn.prototype.set=k8;function M8(e,s){for(var a=-1,o=e==null?0:e.length,c=0,h=[];++a<o;){var y=e[a];s(y,a,e)&&(h[c++]=y)}return h}function j8(){return[]}var E8=Object.prototype,T8=E8.propertyIsEnumerable,Dh=Object.getOwnPropertySymbols,N8=Dh?function(e){return e==null?[]:(e=Object(e),M8(Dh(e),function(s){return T8.call(e,s)}))}:j8;function S8(e,s,a){var o=s(e);return Ki(e)?o:x8(o,a(e))}function Rh(e){return S8(e,Yk,N8)}var Hf=Qs(pn,"DataView"),Bf=Qs(pn,"Promise"),Wf=Qs(pn,"Set"),Oh="[object Map]",A8="[object Object]",$h="[object Promise]",Lh="[object Set]",Ph="[object WeakMap]",Fh="[object DataView]",C8=os(Hf),I8=os(so),D8=os(Bf),R8=os(Wf),O8=os(Uf),Dn=oo;(Hf&&Dn(new Hf(new ArrayBuffer(1)))!=Fh||so&&Dn(new so)!=Oh||Bf&&Dn(Bf.resolve())!=$h||Wf&&Dn(new Wf)!=Lh||Uf&&Dn(new Uf)!=Ph)&&(Dn=function(e){var s=oo(e),a=s==A8?e.constructor:void 0,o=a?os(a):"";if(o)switch(o){case C8:return Fh;case I8:return Oh;case D8:return $h;case R8:return Lh;case O8:return Ph}return s});var Uh=pn.Uint8Array,$8="__lodash_hash_undefined__";function L8(e){return this.__data__.set(e,$8),this}function P8(e){return this.__data__.has(e)}function Vi(e){var s=-1,a=e==null?0:e.length;for(this.__data__=new is;++s<a;)this.add(e[s])}Vi.prototype.add=Vi.prototype.push=L8;Vi.prototype.has=P8;function F8(e,s){for(var a=-1,o=e==null?0:e.length;++a<o;)if(s(e[a],a,e))return!0;return!1}function U8(e,s){return e.has(s)}var z8=1,H8=2;function G0(e,s,a,o,c,h){var y=a&z8,m=e.length,l=s.length;if(m!=l&&!(y&&l>m))return!1;var f=h.get(e),u=h.get(s);if(f&&u)return f==s&&u==e;var d=-1,g=!0,b=a&H8?new Vi:void 0;for(h.set(e,s),h.set(s,e);++d<m;){var _=e[d],k=s[d];if(o)var M=y?o(k,_,d,s,e,h):o(_,k,d,e,s,h);if(M!==void 0){if(M)continue;g=!1;break}if(b){if(!F8(s,function(T,A){if(!U8(b,A)&&(_===T||c(_,T,a,o,h)))return b.push(A)})){g=!1;break}}else if(!(_===k||c(_,k,a,o,h))){g=!1;break}}return h.delete(e),h.delete(s),g}function B8(e){var s=-1,a=Array(e.size);return e.forEach(function(o,c){a[++s]=[c,o]}),a}function W8(e){var s=-1,a=Array(e.size);return e.forEach(function(o){a[++s]=o}),a}var q8=1,Y8=2,G8="[object Boolean]",X8="[object Date]",K8="[object Error]",V8="[object Map]",Z8="[object Number]",Q8="[object RegExp]",J8="[object Set]",eM="[object String]",tM="[object Symbol]",rM="[object ArrayBuffer]",nM="[object DataView]",zh=Ys?Ys.prototype:void 0,lu=zh?zh.valueOf:void 0;function sM(e,s,a,o,c,h,y){switch(a){case nM:if(e.byteLength!=s.byteLength||e.byteOffset!=s.byteOffset)return!1;e=e.buffer,s=s.buffer;case rM:return!(e.byteLength!=s.byteLength||!h(new Uh(e),new Uh(s)));case G8:case X8:case Z8:return z0(+e,+s);case K8:return e.name==s.name&&e.message==s.message;case Q8:case eM:return e==s+"";case V8:var m=B8;case J8:var l=o&q8;if(m||(m=W8),e.size!=s.size&&!l)return!1;var f=y.get(e);if(f)return f==s;o|=Y8,y.set(e,s);var u=G0(m(e),m(s),o,c,h,y);return y.delete(e),u;case tM:if(lu)return lu.call(e)==lu.call(s)}return!1}var aM=1,oM=Object.prototype,iM=oM.hasOwnProperty;function lM(e,s,a,o,c,h){var y=a&aM,m=Rh(e),l=m.length,f=Rh(s),u=f.length;if(l!=u&&!y)return!1;for(var d=l;d--;){var g=m[d];if(!(y?g in s:iM.call(s,g)))return!1}var b=h.get(e),_=h.get(s);if(b&&_)return b==s&&_==e;var k=!0;h.set(e,s),h.set(s,e);for(var M=y;++d<l;){g=m[d];var T=e[g],A=s[g];if(o)var I=y?o(A,T,g,s,e,h):o(T,A,g,e,s,h);if(!(I===void 0?T===A||c(T,A,a,o,h):I)){k=!1;break}M||(M=g=="constructor")}if(k&&!M){var O=e.constructor,$=s.constructor;O!=$&&"constructor"in e&&"constructor"in s&&!(typeof O=="function"&&O instanceof O&&typeof $=="function"&&$ instanceof $)&&(k=!1)}return h.delete(e),h.delete(s),k}var cM=1,Hh="[object Arguments]",Bh="[object Array]",Oi="[object Object]",uM=Object.prototype,Wh=uM.hasOwnProperty;function fM(e,s,a,o,c,h){var y=Ki(e),m=Ki(s),l=y?Bh:Dn(e),f=m?Bh:Dn(s);l=l==Hh?Oi:l,f=f==Hh?Oi:f;var u=l==Oi,d=f==Oi,g=l==f;if(g&&zf(e)){if(!zf(s))return!1;y=!0,u=!1}if(g&&!u)return h||(h=new Rn),y||Y0(e)?G0(e,s,a,o,c,h):sM(e,s,l,a,o,c,h);if(!(a&cM)){var b=u&&Wh.call(e,"__wrapped__"),_=d&&Wh.call(s,"__wrapped__");if(b||_){var k=b?e.value():e,M=_?s.value():s;return h||(h=new Rn),c(k,M,a,o,h)}}return g?(h||(h=new Rn),lM(e,s,a,o,c,h)):!1}function X0(e,s,a,o,c){return e===s?!0:e==null||s==null||!ro(e)&&!ro(s)?e!==e&&s!==s:fM(e,s,a,o,X0,c)}function dM(e,s){return X0(e,s)}const qh=({className:e,children:s,colSpan:a,sticky:o=!1,...c})=>{const h=we("!py-2 !pl-0 !pr-6 text-left align-top",o&&"sticky top-0 bg-white",c.onClick&&"hover:cursor-pointer",e);return r.jsx("th",{className:h,colSpan:a,...c,children:r.jsx(bt,{className:"whitespace-nowrap",level:6,children:s})})},K0=({left:e,center:s,right:a,sticky:o=!0,containerClassName:c,children:h})=>{const y=we("z-50 h-22 min-h-[92px] p-8",!h&&"flex items-center justify-between gap-3",o&&"sticky top-0",c);if(!h){if(e){const m=we("flex flex-auto items-center",a&&s&&"basis-1/3",!a&&s&&"basis-1/2");e=r.jsx("div",{className:m,children:e})}if(s){const m=we("flex flex-auto items-center justify-center",e&&a&&"basis-1/3",(e&&!a||!e&&a)&&"basis-1/2");s=r.jsx("div",{className:m,children:s})}if(a){const m=we("flex flex-auto items-center justify-end",e&&s&&"basis-1/3",!e&&s&&"basis-1/2");a=r.jsx("div",{className:m,children:a})}}return r.jsx("div",{className:y,children:h||r.jsxs(r.Fragment,{children:[e,s,a]})})},V0=({items:e,setItems:s,blank:a,canAddNewItem:o})=>{const[c,h]=D.useState(e.map((g,b)=>({item:g,id:b.toString()}))),[y,m]=D.useState(a);return D.useEffect(()=>{const g=c.map(({item:b})=>b);o(y)&&g.push(y),dM(JSON.parse(JSON.stringify(g)),JSON.parse(JSON.stringify(e)))||s(g)},[c,y,e,s,o]),{items:c,updateItem:(g,b)=>{const _=c.map(k=>k.id===g?{...k,item:b}:k);h(_),s(_.map(k=>k.item))},addItem:()=>{if(o(y)){const g=c.reduce((_,k)=>Math.max(_,parseInt(k.id)),0),b=c.concat({item:y,id:(g+1).toString()});h(b),s(b.map(_=>_.item)),m(a)}},removeItem:g=>{const b=c.filter(_=>_.id!==g);h(b),s(b.map(_=>_.item))},moveItem:(g,b)=>{if(g!==b){const _=c.findIndex(T=>T.id===g),k=b?c.findIndex(T=>T.id===b):0,M=G_(c,_,k);h(M),s(M.map(T=>T.item))}},newItem:y,setNewItem:m}},pM=({label:e,text:s="",hint:a,onRegenerate:o})=>{const[c,h]=D.useState(!1),y=()=>{navigator.clipboard.writeText(s),h(!0),setTimeout(()=>h(!1),2e3)},m=we("group/api-keys relative -mt-1 mb-1 w-full overflow-hidden border-b border-transparent py-2 hover:border-grey-300 dark:hover:border-grey-600");return r.jsxs("div",{className:"mb-3 grid grid-cols-1",children:[e&&r.jsx(bt,{level:6,grey:!0,children:e}),r.jsxs("div",{className:m,children:[r.jsx("span",{children:s}),a,r.jsxs("div",{className:"visible absolute right-0 top-1/2 flex translate-y-[-50%] gap-1 bg-white pl-1 text-sm group-hover/api-keys:visible md:invisible dark:bg-black",children:[o&&r.jsx(Ue,{color:"outline",label:"Regenerate",size:"sm",onClick:o}),r.jsx(Ue,{color:"outline",label:c?"Copied":"Copy",size:"sm",onClick:y})]})]})]})},cl=({keys:e})=>r.jsx("div",{"data-testid":"api-keys",children:e.map(s=>r.jsx(pM,{...s},s.label))}),Js=({icon:e,title:s,detail:a,extra:o})=>r.jsxs("div",{className:"-mx-8 -mt-8 flex flex-col gap-4 bg-grey-75 p-8 md:flex-row dark:bg-grey-950",children:[r.jsx("div",{className:"size-14",children:e}),r.jsxs("div",{className:"mt-1.5 flex min-w-0 flex-1 flex-col",children:[r.jsx("h3",{children:s}),r.jsx("div",{children:a}),o&&r.jsx("div",{className:"mt-4",children:o})]})]}),gd=ns({method:"POST",path:({integrationId:e,apiKeyId:s})=>`/integrations/${e}/api_key/${s}/refresh/`,body:({integrationId:e})=>({integrations:[{id:e}]}),updateQueries:{emberUpdateType:"createOrUpdate",dataType:nl,update:(e,s)=>s&&{...s,integrations:s.integrations.map(a=>e.integrations.find(({id:c})=>c===a.id)||a)}}}),hM=ye.create(()=>{const e=ye.useModal(),{updateRoute:s}=Ve(),{zapierTemplates:a}=X_(),{data:{integrations:o}={integrations:[]}}=nd(),{config:c}=Qe(),{mutateAsync:h}=gd(),y=it(),[m,l]=D.useState(!1),f=c.hostSettings?.limits?.customIntegrations?.disabled,u=o.find(({slug:b})=>b==="zapier"),d=u?.api_keys?.find(b=>b.type==="admin");D.useEffect(()=>{f&&s("integrations")},[f,s]);const g=()=>{!u||!d||(l(!1),ye.show(Et,{title:"Regenerate Admin API Key",prompt:'You will need to locate the Ghost App within your Zapier account and click on "Reconnect" to enter the new Admin API Key.',okLabel:"Regenerate Admin API Key",onOk:async b=>{try{await h({integrationId:u.id,apiKeyId:d.id}),l(!0),b?.remove()}catch(_){y(_)}}}))};return r.jsxs(vt,{afterClose:()=>{s("integrations")},cancelLabel:"",footer:r.jsxs("div",{className:"mx-8 flex w-full items-center justify-between",children:[r.jsxs("a",{className:"mt-1 self-baseline text-sm font-bold",href:"https://zapier.com/apps/ghost/integrations?utm_medium=partner_api&utm_source=widget&utm_campaign=Widget",rel:"noopener noreferrer",target:"_blank",children:["View more Ghost integrations powered by ",r.jsx("span",{children:r.jsx(rt,{className:"relative top-[-2px] inline-block",name:"zapier-logo",size:24})})]}),r.jsx(Ue,{color:"black",label:"Close",onClick:()=>{e.remove()}})]}),okColor:"black",okLabel:"Close",testId:"zapier-modal",title:"",stickyFooter:!0,onOk:()=>{s("integrations"),e.remove()},children:[r.jsx(Js,{detail:"Automation for your favorite apps",extra:r.jsx("div",{className:"-mb-4 mt-1",children:r.jsx(cl,{keys:[{label:"Admin API key",text:d?.secret,hint:m?r.jsx("div",{className:"text-green",children:"Admin API Key was successfully regenerated"}):void 0,onRegenerate:g},{label:"API URL",text:window.location.origin+ao().subdir}]})}),icon:r.jsx(rt,{name:"zapier",size:56}),title:"Zapier"}),r.jsx(cn,{children:a.map(b=>r.jsx($n,{action:r.jsx(Ue,{className:"whitespace-nowrap text-sm font-semibold text-[#FF4A00]",href:b.url,label:"Use this Zap",tag:"a",target:"_blank",link:!0,unstyled:!0}),bgOnHover:!1,className:"flex items-center gap-3 py-2 pl-3",title:r.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center",children:[r.jsxs("div",{className:"flex shrink-0 flex-nowrap items-center gap-2",children:[r.jsx("img",{className:"size-8 object-contain dark:invert",role:"presentation",src:b.ghostImage}),r.jsx(rt,{name:"arrow-right",size:"xs"}),r.jsx("img",{className:"size-8 object-contain",role:"presentation",src:b.appImage})]}),r.jsx("span",{className:"text-sm",children:b.title})]}),hideActions:!0}))})]})});function Z0(e){const s="The URL must be in a format like https://www.threads.net/@yourUsername";if(!e)return"";if(e.startsWith("http")){if(!e.includes("threads.net")&&!e.includes("threads.com"))throw new Error(s);if(e=e.replace("threads.com","threads.net"),e.includes("www.")||(e=e.replace("https://","https://www.")),!St.isURL(e))throw new Error(s);if(!e.match(/^https:\/\/www\.threads\.net\/@?[a-zA-Z0-9._]+$/))throw new Error(s);return e}if(!e.includes("/")){if(e.startsWith("@")&&(e=e.slice(1)),!e.match(/^[a-zA-Z0-9._]+$/))throw new Error(s);return`https://www.threads.net/@${e}`}throw new Error(s)}const mM=e=>`https://www.threads.net/${e}`,gM=e=>{const s=e.match(/(?:https:\/\/)(?:www\.)?(?:threads\.(?:com|net))(?:\/)?(?:#!\/)?@?([^/]*)/)?.[1];return s?`@${s}`:null},Ws={INVALID_USERNAME:"Your Username is not a valid Bluesky Username",INVALID_URL:"The URL must be in a format like https://bsky.app/profile/yourUsername"};function Q0(e){return[/^did:plc:[a-z2-7]{24}$/,/^[a-zA-Z0-9._]{1,15}$/,/^(?=.{1,191}$)[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+$/].some(a=>a.test(e))}function qf(e){let s=e.trim();return s.startsWith("@")&&(s=s.slice(1)),s.startsWith("did:plc:")?s.toLowerCase():s}function J0(e){if(!e)return"";let s;if(e.startsWith("http")||e.startsWith("www.")||e.includes("bsky.app")){if(!e.includes("bsky.app"))throw new Error(Ws.INVALID_URL);const o=e.match(/bsky\.app\/profile\/@?([^/]+)/);if(!o)throw new Error(Ws.INVALID_URL);s=qf(o[1])}else s=qf(e);if(!Q0(s))throw new Error(Ws.INVALID_USERNAME);const a=`https://bsky.app/profile/${s}`;if(!St.isURL(a))throw new Error(Ws.INVALID_URL);return a}const xM=e=>{if(!e)throw new Error(Ws.INVALID_USERNAME);let s=qf(e);if(!Q0(s))throw new Error(Ws.INVALID_USERNAME);return`https://bsky.app/profile/${s}`},bM=e=>{const s=e.match(/(?:https?:\/\/)?(?:www\.)?bsky\.app\/profile\/@?([^/]*)/);return s?`${s[1]}`:null},es={INVALID_URL:"The URL must be in a format like https://www.linkedin.com/in/yourUsername",INVALID_USERNAME:"Your Username is not a valid LinkedIn Username"},vM=["in","pub","company","school"],wM=/^[a-zA-Z0-9-]{3,100}$/,yM=/^[a-zA-Z0-9-]{3,100}(?:\/[a-zA-Z0-9-]*)*$/,ex=/^(?:https?:\/\/)?(?:www\.)?(?:([a-z]{2})\.)?linkedin\.com\/(in|pub|company|school)\/([^?#]+)/i,Yf=e=>e.trim().replace(/^@/,""),tx=e=>{if(/^(https?:\/\/|www\.)/.test(e)||e.includes("linkedin.com")){const o=e.match(ex);if(!o)throw new Error(es.INVALID_URL);if(o[0].length!==e.length)throw new Error(es.INVALID_USERNAME);const[,c,h,y]=o,m=Yf(y);if(c&&!/^[A-Z]{2}$/.test(c.toUpperCase()))throw new Error(es.INVALID_URL);return{regional:c,pathType:h,username:m}}const s=Yf(e),a=s.indexOf("/");if(a!==-1){const o=s.substring(0,a);if(vM.includes(o))return{pathType:o,username:s.substring(a+1)}}return{username:s}},rx=(e,s)=>(e==="pub"?yM:wM).test(s),nx=({regional:e,pathType:s,username:a})=>{const c=`https://${e?`${e.toLowerCase()}.`:"www."}linkedin.com/${s}/${a}`;if(!St.isURL(c))throw new Error(es.INVALID_URL);return c};function sx(e){if(!e)return"";const{regional:s,pathType:a="in",username:o}=tx(e);if(!rx(a,o))throw new Error(es.INVALID_USERNAME);return nx({regional:s,pathType:a,username:o})}const _M=e=>{if(!e)throw new Error(es.INVALID_USERNAME);const{regional:s,pathType:a="in",username:o}=tx(e);if(!rx(a,o))throw new Error(es.INVALID_USERNAME);return nx({regional:s,pathType:a,username:o})},kM=e=>{const s=e.match(ex);if(!s)return null;const[,,a,o]=s,c=Yf(o);return a==="in"?c:`${a}/${c}`};function ax(e){const s="The URL must be in a format like https://www.instagram.com/yourUsername",a="Your Username is not a valid Instagram Username";if(!e)return"";let o;if(e.startsWith("http")||e.startsWith("www.")||e.includes("instagram.com")){if(!e.includes("instagram.com"))throw new Error(s);const h=e.match(/(?:https?:\/\/)?(?:www\.)?instagram\.com\/@?([^/]+)/);if(!h)throw new Error(s);o=h[1]}else o=e.startsWith("@")?e.slice(1):e;if(!o.match(/^[a-zA-Z0-9_][a-zA-Z0-9._]{0,28}[a-zA-Z0-9_]$/)||o.includes("..")||o.length>30)throw new Error(a);const c=`https://www.instagram.com/${o}`;if(!St.isURL(c))throw new Error(s);return c}const MM=e=>{const s="Your Username is not a valid Instagram Username";if(!e)throw new Error(s);let a=e;if(a.startsWith("@")&&(a=a.slice(1)),!a.match(/^[a-zA-Z0-9_][a-zA-Z0-9._]{0,28}[a-zA-Z0-9_]$/)||a.includes("..")||a.length>30)throw new Error(s);return`https://www.instagram.com/${a}`},jM=e=>{const s=e.match(/(?:https?:\/\/)?(?:www\.)?instagram\.com\/@?([^/]*)/);return s?`${s[1]}`:null};function ox(e){const s="The URL must be in a format like https://www.youtube.com/@yourUsername, https://www.youtube.com/user/yourUsername, or https://www.youtube.com/channel/yourChannelId",a="Your Username is not a valid YouTube Username";if(!e)return"";let o;if(e.startsWith("http")||e.startsWith("www.")||e.includes("youtube.com")){if(!e.includes("youtube.com"))throw new Error(s);const h=e.match(/(?:https?:\/\/)?(?:www\.)?youtube\.com\/((?:@|user\/|channel\/)[^/]+)/);if(!h)throw new Error(s);o=h[1]}else o=e;if(o.startsWith("@")){const h=o.slice(1);if(!h.match(/^[a-zA-Z0-9][a-zA-Z0-9._-]{1,28}[a-zA-Z0-9]$/)||h.includes("..")||h.length>30)throw new Error(a)}else if(o.startsWith("user/")){if(!o.slice(5).match(/^[a-zA-Z0-9._-]{1,50}$/))throw new Error(a)}else if(o.startsWith("channel/")){if(!o.slice(8).match(/^UC[a-zA-Z0-9_-]{22}$/))throw new Error(a)}else throw new Error(s);const c=`https://www.youtube.com/${o}`;if(!St.isURL(c))throw new Error(s);return c}const EM=e=>{const s="Your Username is not a valid YouTube Username";if(!e)throw new Error(s);if(e.startsWith("@")){const a=e.slice(1);if(!a.match(/^[a-zA-Z0-9][a-zA-Z0-9._-]{1,28}[a-zA-Z0-9]$/)||a.includes("..")||a.length>30)throw new Error(s)}else if(e.startsWith("user/")){if(!e.slice(5).match(/^[a-zA-Z0-9._-]{1,50}$/))throw new Error(s)}else if(e.startsWith("channel/")){if(!e.slice(8).match(/^UC[a-zA-Z0-9_-]{22}$/))throw new Error(s)}else throw new Error("The handle must be in a format like @yourUsername, user/yourUsername, or channel/yourChannelId");return`https://www.youtube.com/${e}`},TM=e=>{const s=e.match(/(?:https?:\/\/)?(?:www\.)?youtube\.com\/((?:@|user\/|channel\/)[^/]*)/);return s?s[1]:null};function ix(e){const s="The URL must be in a format like https://www.tiktok.com/@yourUsername",a="Your Username is not a valid TikTok Username";if(!e)return"";let o;if(e.startsWith("http")||e.startsWith("www.")||e.includes("tiktok.com")){if(!e.includes("tiktok.com"))throw new Error(s);const y=e.match(/(?:https?:\/\/)?(?:www\.)?tiktok\.com\/(@[^/]+)/);if(!y)throw new Error(s);o=y[1]}else o=e.startsWith("@")?e:`@${e}`;const c=o.slice(1);if(!c.match(/^[a-zA-Z0-9_][a-zA-Z0-9._]{0,22}[a-zA-Z0-9_]$/)||c.includes("..")||c.length<2||c.length>24)throw new Error(a);const h=`https://www.tiktok.com/${o}`;if(!St.isURL(h))throw new Error(s);return h}const NM=e=>{const s="Your Username is not a valid TikTok Username";if(!e)throw new Error(s);const a=e.startsWith("@")?e:`@${e}`,o=a.slice(1);if(!o.match(/^[a-zA-Z0-9_][a-zA-Z0-9._]{0,22}[a-zA-Z0-9_]$/)||o.includes("..")||o.length<2||o.length>24)throw new Error(s);return`https://www.tiktok.com/${a}`},SM=e=>{const s=e.match(/(?:https?:\/\/)?(?:www\.)?tiktok\.com\/(@[^/]*)/);return s?s[1]:null};function lx(e){const s="The URL must be in a format like @username@instance.tld or https://instance.tld/@username or https://website.com/@username@instance.tld";if(!e)return"";let a=e;if(a=a.replace(/^https?:\/\//,""),a.match(/^@[^@]+@[^/]+$/)){const[o,c]=a.split("@").slice(1);if(!St.isFQDN(c))throw new Error(s);return`https://${c}/@${o}`}if(a.match(/^[^/]+\.[^/]+\/@[^/]+(@[^/]+)?$/)){const[o,c]=a.split("/@");if(!St.isFQDN(o))throw new Error(s);if(c.includes("@")){const[,h]=c.split("@");if(!St.isFQDN(h))throw new Error(s)}return`https://${a}`}throw new Error(s)}const AM=e=>{const s="Your Username is not a valid Mastodon Username";if(!e)throw new Error(s);if(e.match(/^@[^@]+@[^/]+$/)){const[a,o]=e.split("@").slice(1);if(!St.isFQDN(o))throw new Error(s);return`https://${o}/@${a}`}if(e.match(/^[^/]+\.[^/]+\/@[^/]+(@[^/]+)?$/)){const[a,o]=e.split("/@");if(!St.isFQDN(a))throw new Error(s);if(o.includes("@")){const[,c]=o.split("@");if(!St.isFQDN(c))throw new Error(s)}return`https://${e}`}throw new Error(s)},CM=e=>e.replace(/^https?:\/\//,""),IM=({tier:e})=>{const s=e?.type==="free",{updateRoute:a}=Ve(),{mutateAsync:o}=ud(),{mutateAsync:c}=P2(),{mutateAsync:h}=On(),[y,m]=ot.useState(!!e?.trial_days),l=it(),{localSettings:f,siteData:u}=ss(),[d]=xt(f,["portal_plans"]),g=JSON.parse(d?.toString()||"[]"),b={name:()=>_.name?void 0:"Enter a name for the tier",monthly_price:()=>_.type!=="free"?ph(_.monthly_price||0,_.currency,{allowZero:!1}):void 0,yearly_price:()=>_.type!=="free"?ph(_.yearly_price||0,_.currency,{allowZero:!1}):void 0},{formState:_,saveState:k,updateForm:M,handleSave:T,errors:A,clearError:I,okProps:O}=pr({initialState:{...e||{},trial_days:e?.trial_days?.toString()||"",currency:e?.currency||K_[0].isoCode,visibility:e?.visibility||"none",welcome_page_url:e?.welcome_page_url||null},savingDelay:500,savedDelay:500,onValidate:()=>{const Y={};return Object.entries(b).forEach(([L,B])=>{Y[L]=B?.()}),Y},onSave:async()=>{const{trial_days:Y,currency:L,...B}=_,J=B;if(J.benefits=J.benefits?.filter(te=>te),s||(J.currency=L,J.trial_days=parseInt(Y)),e?.id?await o({...e,...J}):await c(J),s){const te=_.visibility==="public";let ne=!1;g.includes("free")&&!te&&(g.splice(g.indexOf("free"),1),ne=!0),!g.includes("free")&&te&&(g.push("free"),ne=!0),ne&&await h([{key:"portal_plans",value:JSON.stringify(g)}])}},onSaveError:l}),$=V0({items:_.benefits||[],setItems:Y=>M(L=>({...L,benefits:Y})),blank:"",canAddNewItem:Y=>!!Y}),q=Y=>{Y.target.checked?(m(!0),M(L=>({...L,trial_days:e?.trial_days?e?.trial_days.toString():"7"}))):(m(!1),M(L=>({...L,trial_days:"0"})))},R=D.useRef(!1);D.useEffect(()=>{R.current&&(b.monthly_price?.(),b.yearly_price?.()),R.current=!0},[_.currency]);const K=()=>{if(e){const Y=e.active?"Archive tier":"Reactivate tier",L=e.active?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"mb-6",children:["Members will no longer be able to subscribe to ",r.jsx("strong",{children:e.name})," and it will be removed from the list of available tiers in portal."]}),r.jsx("div",{children:"Existing members on this tier will remain unchanged. Offers using this tier will be disabled."})]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"mb-6",children:["Reactivating ",r.jsx("strong",{children:e.name})," will re-enable it as an option in portal and allow new members to subscribe to this tier."]}),r.jsx("div",{children:"Existing members will remain unchanged."})]}),B=e.active?"Archive":"Reactivate";ye.show(Et,{title:Y,prompt:L,okLabel:B,cancelLabel:"Cancel",okColor:e.active?"red":"black",onOk:J=>{o({...e,active:!e.active}),J?.remove(),mt({type:"success",title:`Tier ${e.active?"archived":"reactivated"}`})}})}};let X={};return e&&(e.active&&e.type!=="free"?X={label:"Archive tier",color:"red",link:!0,onClick:K}:e.active||(X={label:"Reactivate tier",color:"green",link:!0,onClick:K})),r.jsx(vt,{afterClose:()=>{a("tiers")},buttonsDisabled:O.disabled,cancelLabel:"Close",dirty:k==="unsaved",leftButtonProps:X,okColor:O.color,okLabel:O.label||"Save",size:"lg",testId:"tier-detail-modal",title:e?e.active?"Edit tier":"Edit archived tier":"New tier",stickyFooter:!0,onOk:async()=>{await T({fakeWhenUnchanged:!0})},children:r.jsxs("div",{className:"-mb-8 mt-8 flex items-start gap-8",children:[r.jsxs("div",{className:"flex grow flex-col gap-8",children:[r.jsxs(et,{marginBottom:!1,title:"Basic",grouped:!0,children:[r.jsx(Ne,{autoComplete:"off",error:!!A.name,hint:A.name,maxLength:191,placeholder:s?"Free":"Bronze",title:"Name",value:_.name||"",autoFocus:!0,onChange:Y=>M(L=>({...L,name:Y.target.value})),onKeyDown:()=>I("name")}),r.jsx(Ne,{autoComplete:"off",autoFocus:s,maxLength:191,placeholder:s?"Free preview":"Full access to premium content",title:"Description",value:_.description||"",onChange:Y=>M(L=>({...L,description:Y.target.value}))}),!s&&r.jsx(r.Fragment,{children:r.jsxs("div",{className:"flex flex-col gap-10 md:flex-row",children:[r.jsxs("div",{className:"basis-1/2",children:[r.jsxs("div",{className:"mb-1 flex h-6 items-center justify-between",children:[r.jsx(bt,{level:6,children:"Prices"}),r.jsx("div",{className:"-mr-2 w-[50px]",children:r.jsx(Ot,{border:!1,containerClassName:"font-medium",controlClasses:{menu:"w-18"},options:hh(),selectedOption:hh().flatMap(Y=>Y.options).find(Y=>Y.value===_.currency),size:"xs",clearBg:!0,isSearchable:!0,onSelect:Y=>M(L=>({...L,currency:Y?.value}))})})]}),r.jsxs("div",{className:"flex flex-col gap-2",children:[r.jsx(mh,{error:!!A.monthly_price,hint:A.monthly_price,placeholder:"5",rightPlaceholder:`${_.currency}/month`,title:"Monthly price",valueInCents:_.monthly_price||"",hideTitle:!0,onBlur:Y=>Y.target.value===""?M(L=>({...L,monthly_price:0})):null,onChange:Y=>M(L=>({...L,monthly_price:Y})),onKeyDown:()=>I("monthly_price")}),r.jsx(mh,{error:!!A.yearly_price,hint:A.yearly_price,placeholder:"50",rightPlaceholder:`${_.currency}/year`,title:"Yearly price",valueInCents:_.yearly_price||"",hideTitle:!0,onBlur:Y=>Y.target.value===""?M(L=>({...L,yearly_price:0})):null,onChange:Y=>M(L=>({...L,yearly_price:Y})),onKeyDown:()=>I("yearly_price")})]})]}),r.jsxs("div",{className:"basis-1/2",children:[r.jsx("div",{className:"mb-1 flex h-6 flex-col justify-center",children:r.jsx(st,{checked:y,label:"Add a free trial",labelStyle:"heading",onChange:q})}),r.jsx(Ne,{disabled:!y,hint:r.jsxs("div",{className:"mt-1",children:["Members will be subscribed at full price once the trial ends. ",r.jsx("a",{className:"text-green",href:"https://ghost.org/help/free-trials/",rel:"noreferrer",target:"_blank",children:"Learn more"})]}),placeholder:"0",rightPlaceholder:"days",title:"Trial days",value:_.trial_days,hideTitle:!0,onChange:Y=>M(L=>({...L,trial_days:Y.target.value.replace(/[^\d]/,"")}))})]})]})}),r.jsx(Zg,{baseUrl:u?.url,hint:`Redirect to this URL after signup ${s?"":" for premium membership"}`,maxLength:2e3,placeholder:u?.url,title:"Welcome page",value:_.welcome_page_url||null,nullable:!0,transformPathWithoutSlash:!0,onChange:Y=>M(L=>({...L,welcome_page_url:Y||null}))})]}),r.jsxs(et,{gap:"none",title:"Benefits",grouped:!0,children:[r.jsx("div",{className:"-mt-3",children:r.jsx(Qg,{items:$.items,itemSeparator:!1,renderItem:({id:Y,item:L})=>r.jsxs("div",{className:"relative flex w-full items-center gap-5",children:[r.jsx("div",{className:"absolute left-[-32px] top-[7px] flex size-6 items-center justify-center bg-white group-hover:hidden dark:bg-black",children:r.jsx(rt,{name:"check",size:"sm"})}),r.jsx(Ne,{maxLength:191,value:L,onChange:B=>$.updateItem(Y,B.target.value)}),r.jsx(Ue,{className:"absolute right-1 top-1 z-10 opacity-0 group-hover:opacity-100",color:"grey",icon:"trash",size:"sm",onClick:()=>$.removeItem(Y)})]}),onMove:$.moveItem})}),r.jsxs("div",{className:"relative mt-1 flex items-center gap-3",children:[r.jsx(rt,{className:"dark:text-white",name:"check",size:"sm"}),r.jsx(Ne,{className:"grow",containerClassName:"w-100",maxLength:191,placeholder:"Expert analysis",title:"New benefit",value:$.newItem,hideTitle:!0,onChange:Y=>$.setNewItem(Y.target.value),onKeyDown:Y=>{Y.key==="Enter"&&$.addItem()}}),r.jsx(Ue,{className:"absolute right-[5px] top-[5px] z-10",color:"green",icon:"add",iconColorClass:"text-white",label:"Add",size:"sm",hideLabel:!0,onClick:()=>$.addItem()})]})]})]}),r.jsx("div",{className:"sticky top-[96px] hidden shrink-0 basis-[380px] min-[920px]:!visible min-[920px]:!block",children:r.jsx(V_,{isFreeTier:s,tier:_})})]})})},DM=({params:e})=>{const{data:{tiers:s,isEnd:a}={},fetchNextPage:o}=Vs();let c;return D.useEffect(()=>{e?.id&&!c&&!a&&o()},[o,a,e?.id,c]),e?.id&&(c=s?.find(({id:h})=>h===e?.id),!c)?null:r.jsx(IM,{tier:c})},RM=ye.create(DM);var cu,Yh;function cx(){if(Yh)return cu;Yh=1;var e={};return cu=typeof process=="object"&&e&&e.NODE_DEBUG&&/\bsemver\b/i.test(e.NODE_DEBUG)?(...a)=>console.error("SEMVER",...a):()=>{},cu}var uu,Gh;function ux(){if(Gh)return uu;Gh=1;const e="2.0.0",s=256,a=Number.MAX_SAFE_INTEGER||9007199254740991,o=16,c=s-6;return uu={MAX_LENGTH:s,MAX_SAFE_COMPONENT_LENGTH:o,MAX_SAFE_BUILD_LENGTH:c,MAX_SAFE_INTEGER:a,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},uu}var $i={exports:{}},Xh;function OM(){return Xh||(Xh=1,(function(e,s){const{MAX_SAFE_COMPONENT_LENGTH:a,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:c}=ux(),h=cx();s=e.exports={};const y=s.re=[],m=s.safeRe=[],l=s.src=[],f=s.safeSrc=[],u=s.t={};let d=0;const g="[a-zA-Z0-9-]",b=[["\\s",1],["\\d",c],[g,o]],_=M=>{for(const[T,A]of b)M=M.split(`${T}*`).join(`${T}{0,${A}}`).split(`${T}+`).join(`${T}{1,${A}}`);return M},k=(M,T,A)=>{const I=_(T),O=d++;h(M,O,T),u[M]=O,l[O]=T,f[O]=I,y[O]=new RegExp(T,A?"g":void 0),m[O]=new RegExp(I,A?"g":void 0)};k("NUMERICIDENTIFIER","0|[1-9]\\d*"),k("NUMERICIDENTIFIERLOOSE","\\d+"),k("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${g}*`),k("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),k("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),k("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),k("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),k("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),k("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),k("BUILDIDENTIFIER",`${g}+`),k("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),k("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),k("FULL",`^${l[u.FULLPLAIN]}$`),k("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),k("LOOSE",`^${l[u.LOOSEPLAIN]}$`),k("GTLT","((?:<|>)?=?)"),k("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),k("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),k("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),k("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),k("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),k("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),k("COERCEPLAIN",`(^|[^\\d])(\\d{1,${a}})(?:\\.(\\d{1,${a}}))?(?:\\.(\\d{1,${a}}))?`),k("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),k("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?(?:${l[u.BUILD]})?(?:$|[^\\d])`),k("COERCERTL",l[u.COERCE],!0),k("COERCERTLFULL",l[u.COERCEFULL],!0),k("LONETILDE","(?:~>?)"),k("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),s.tildeTrimReplace="$1~",k("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),k("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),k("LONECARET","(?:\\^)"),k("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),s.caretTrimReplace="$1^",k("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),k("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),k("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),k("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),k("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),s.comparatorTrimReplace="$1$2$3",k("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),k("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),k("STAR","(<|>)?=?\\s*\\*"),k("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),k("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})($i,$i.exports)),$i.exports}var fu,Kh;function $M(){if(Kh)return fu;Kh=1;const e=Object.freeze({loose:!0}),s=Object.freeze({});return fu=o=>o?typeof o!="object"?e:o:s,fu}var du,Vh;function LM(){if(Vh)return du;Vh=1;const e=/^[0-9]+$/,s=(o,c)=>{if(typeof o=="number"&&typeof c=="number")return o===c?0:o<c?-1:1;const h=e.test(o),y=e.test(c);return h&&y&&(o=+o,c=+c),o===c?0:h&&!y?-1:y&&!h?1:o<c?-1:1};return du={compareIdentifiers:s,rcompareIdentifiers:(o,c)=>s(c,o)},du}var pu,Zh;function PM(){if(Zh)return pu;Zh=1;const e=cx(),{MAX_LENGTH:s,MAX_SAFE_INTEGER:a}=ux(),{safeRe:o,t:c}=OM(),h=$M(),{compareIdentifiers:y}=LM();class m{constructor(f,u){if(u=h(u),f instanceof m){if(f.loose===!!u.loose&&f.includePrerelease===!!u.includePrerelease)return f;f=f.version}else if(typeof f!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof f}".`);if(f.length>s)throw new TypeError(`version is longer than ${s} characters`);e("SemVer",f,u),this.options=u,this.loose=!!u.loose,this.includePrerelease=!!u.includePrerelease;const d=f.trim().match(u.loose?o[c.LOOSE]:o[c.FULL]);if(!d)throw new TypeError(`Invalid Version: ${f}`);if(this.raw=f,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");d[4]?this.prerelease=d[4].split(".").map(g=>{if(/^[0-9]+$/.test(g)){const b=+g;if(b>=0&&b<a)return b}return g}):this.prerelease=[],this.build=d[5]?d[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(f){if(e("SemVer.compare",this.version,this.options,f),!(f instanceof m)){if(typeof f=="string"&&f===this.version)return 0;f=new m(f,this.options)}return f.version===this.version?0:this.compareMain(f)||this.comparePre(f)}compareMain(f){return f instanceof m||(f=new m(f,this.options)),this.major<f.major?-1:this.major>f.major?1:this.minor<f.minor?-1:this.minor>f.minor?1:this.patch<f.patch?-1:this.patch>f.patch?1:0}comparePre(f){if(f instanceof m||(f=new m(f,this.options)),this.prerelease.length&&!f.prerelease.length)return-1;if(!this.prerelease.length&&f.prerelease.length)return 1;if(!this.prerelease.length&&!f.prerelease.length)return 0;let u=0;do{const d=this.prerelease[u],g=f.prerelease[u];if(e("prerelease compare",u,d,g),d===void 0&&g===void 0)return 0;if(g===void 0)return 1;if(d===void 0)return-1;if(d===g)continue;return y(d,g)}while(++u)}compareBuild(f){f instanceof m||(f=new m(f,this.options));let u=0;do{const d=this.build[u],g=f.build[u];if(e("build compare",u,d,g),d===void 0&&g===void 0)return 0;if(g===void 0)return 1;if(d===void 0)return-1;if(d===g)continue;return y(d,g)}while(++u)}inc(f,u,d){if(f.startsWith("pre")){if(!u&&d===!1)throw new Error("invalid increment argument: identifier is empty");if(u){const g=`-${u}`.match(this.options.loose?o[c.PRERELEASELOOSE]:o[c.PRERELEASE]);if(!g||g[1]!==u)throw new Error(`invalid identifier: ${u}`)}}switch(f){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",u,d);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",u,d);break;case"prepatch":this.prerelease.length=0,this.inc("patch",u,d),this.inc("pre",u,d);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",u,d),this.inc("pre",u,d);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const g=Number(d)?1:0;if(this.prerelease.length===0)this.prerelease=[g];else{let b=this.prerelease.length;for(;--b>=0;)typeof this.prerelease[b]=="number"&&(this.prerelease[b]++,b=-2);if(b===-1){if(u===this.prerelease.join(".")&&d===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(g)}}if(u){let b=[u,g];d===!1&&(b=[u]),y(this.prerelease[0],u)===0?isNaN(this.prerelease[1])&&(this.prerelease=b):this.prerelease=b}break}default:throw new Error(`invalid increment argument: ${f}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return pu=m,pu}var hu,Qh;function FM(){if(Qh)return hu;Qh=1;const e=PM();return hu=(a,o,c=!1)=>{if(a instanceof e)return a;try{return new e(a,o)}catch(h){if(!c)return null;throw h}},hu}var UM=FM();const zM=Xg(UM);function Jh(e){if(!e)return"";const s=e.replace("+moya","");try{const o=zM(s,{includePrerelease:!0})?.prerelease;if(o&&o?.length>0){const h=String(o[0]).split("-")[1];return!h||!h.startsWith("g")?"":`https://github.com/TryGhost/Ghost/commit/${h.slice(1)}`}return`https://github.com/TryGhost/Ghost/releases/tag/v${s}`}catch{return""}}function HM(e,s){const a=!!e.match?.(/production/i);return!!(a&&s!=="mysql8"||!a&&s==="mysql5")}const BM=ye.create(({})=>{const{updateRoute:e}=Ve();let a=Qe().config;const o=Z_();function c(){return new Date().getFullYear()}function h(){return!!a.enableDeveloperExperiments}function y(){return!a.hostSettings?.siteId}return r.jsx(vt,{afterClose:()=>{e("")},cancelLabel:"",footer:r.jsx(r.Fragment,{}),topRightContent:"close",width:540,children:r.jsxs("div",{className:"flex flex-col gap-4 pb-7 text-sm",children:[r.jsx(Q_,{className:"h-auto w-[120px] dark:invert"}),r.jsxs("div",{className:"mt-3 flex flex-col gap-1.5",children:[o?.message&&r.jsxs("div",{className:"gh-prose-links mb-4 rounded-sm border border-green p-5",children:[r.jsx("strong",{children:"Update available!"}),r.jsx("div",{dangerouslySetInnerHTML:{__html:o.message}})]}),Jh(a.version)&&r.jsxs("div",{children:[r.jsx("strong",{children:"Version:"})," ",r.jsx("a",{className:"text-green",href:Jh(a.version),rel:"noopener noreferrer",target:"_blank",children:a.version})]})||r.jsxs("div",{children:[r.jsx("strong",{children:"Version:"})," ",a.version]}),y()&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{children:[r.jsx("strong",{children:"Environment:"})," ",a.environment]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Database:"})," ",a.database]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Mail:"})," ",a.mail?a.mail:"Native"]})]}),h()&&r.jsxs("div",{children:[r.jsx("strong",{children:"Developer experiments:"})," Enabled"]}),y()&&HM(a.environment,a.database)&&r.jsxs("div",{className:"text-red-500 dark:text-red-400",children:["You are running an unsupported database in production. Please ",r.jsx("a",{href:"https://ghost.org/docs/faq/supported-databases/",rel:"noopener noreferrer",target:"_blank",children:"upgrade to MySQL 8"}),"."]})]}),r.jsx(Ja,{}),r.jsxs("div",{className:"flex flex-col gap-1.5",children:[r.jsxs("a",{className:"flex items-center gap-2 hover:text-grey-900 dark:hover:text-grey-400",href:"https://ghost.org/docs/",rel:"noopener noreferrer",target:"_blank",children:[r.jsx(rt,{name:"book-open",size:"sm"})," User documentation"]}),r.jsxs("a",{className:"flex items-center gap-2 hover:text-grey-900 dark:hover:text-grey-400",href:"https://forum.ghost.org/",rel:"noopener noreferrer",target:"_blank",children:[r.jsx(rt,{name:"question-circle",size:"sm"})," Get help with Ghost"]}),r.jsxs("a",{className:"flex items-center gap-2 hover:text-grey-900 dark:hover:text-grey-400",href:"https://ghost.org/docs/contributing/",rel:"noopener noreferrer",target:"_blank",children:[r.jsx(rt,{name:"angle-brackets",size:"sm"})," Get involved"]})]}),r.jsx(Ja,{}),r.jsxs("p",{className:"max-w-[460px] text-xs",children:["Copyright © 2013 – ",c()," Ghost Foundation, released under the ",r.jsx("a",{className:"text-green",href:"https://github.com/TryGhost/Ghost/blob/main/LICENSE",rel:"noopener noreferrer",target:"_blank",children:"MIT license"}),". ",r.jsx("a",{className:"text-green",href:"https://ghost.org/",rel:"noopener noreferrer",target:"_blank",children:"Ghost"})," is a registered trademark of ",r.jsx("a",{className:"text-green",href:"https://ghost.org/trademark/",rel:"noopener noreferrer",target:"_blank",children:"Ghost Foundation Ltd"}),"."]})]})})}),WM=()=>{const e=Gt(),{updateRoute:s}=Ve(),[a,o]=D.useState(""),[c,h]=D.useState({name:""}),{mutateAsync:y}=J_(),m=Gs(),l=it();return D.useEffect(()=>{m?.isLimited("customIntegrations")&&m.errorIfWouldGoOverLimit("customIntegrations").catch(f=>{f instanceof Xs&&(ye.show(Vr,{prompt:f.message||"Your current plan doesn't support more custom integrations.",onOk:()=>s({route:"/pro",isExternal:!0})}),e.remove(),s("integrations"))})},[m,e,s]),r.jsx(vt,{afterClose:()=>{s("integrations")},okColor:"black",okLabel:"Add",size:"sm",testId:"add-integration-modal",title:"Add integration",onOk:async()=>{if(!a){h({name:"Name is required"});return}try{const f=await y({name:a});e.remove(),s({route:`integrations/${f.integrations[0].id}`})}catch(f){l(f)}},children:r.jsx("div",{className:"mt-5",children:r.jsx(et,{marginBottom:!1,marginTop:!1,children:r.jsx(Ne,{autoFocus:!0,error:!!c.name,hint:c.name,maxLength:191,placeholder:"Custom integration",title:"Name",value:a,onChange:f=>o(f.target.value),onInput:()=>{c.name&&h({name:""})}})})})})},qM=ye.create(WM),YM=()=>{const e=Gt(),{updateRoute:s}=Ve(),a=it(),[o,c]=D.useState(!0),[h,y]=D.useState(null),{data:m}=Kg({searchParams:{filter:"newsletters.status:active+email_disabled:0",limit:"1",page:"1",include:"newsletters,labels"}}),{mutateAsync:l}=O2(),{formState:f,updateForm:u,saveState:d,handleSave:g,errors:b,clearError:_}=pr({initialState:{name:"",description:"",optInExistingSubscribers:!0},onSave:async()=>{const T=await l({name:f.name,description:f.description,opt_in_existing:f.optInExistingSubscribers,feedback_enabled:!0});s({route:`newsletters/${T.newsletters[0].id}`})},onSaveError:a,onValidate:()=>{const T={};return f.name||(T.name="A name is required for your newsletter"),T}}),k=Gs();D.useEffect(()=>{if(!k){c(!1);return}k.errorIfWouldGoOverLimit("newsletters").catch(T=>{if(T instanceof Xs)y(T);else throw T}).finally(()=>{c(!1)})},[k]);const M=m?.meta?.pagination.total;return D.useEffect(()=>{h&&(ye.show(Vr,{prompt:h.message||"Your current plan doesn't support more newsletters.",onOk:()=>s({route:"/pro",isExternal:!0})}),e.remove(),s("newsletters"))},[h,e,s]),o||h?null:r.jsx(vt,{afterClose:()=>{s("newsletters")},backDropClick:!1,okColor:"black",okDisabled:d==="saving",okLabel:"Create",okLoading:d==="saving",size:"sm",testId:"add-newsletter-modal",title:"Create newsletter",onOk:async()=>{await g()&&e.remove()},children:r.jsxs(et,{marginBottom:!1,marginTop:!0,children:[r.jsx(Ne,{autoFocus:!0,error:!!b.name,hint:b.name,maxLength:191,placeholder:"Weekly roundup",title:"Name",value:f.name,onChange:T=>u(A=>({...A,name:T.target.value})),onKeyDown:()=>_("name")}),r.jsx(dn,{maxLength:2e3,title:"Description",value:f.description,onChange:T=>u(A=>({...A,description:T.target.value}))}),r.jsx(st,{checked:f.optInExistingSubscribers,direction:"rtl",hint:f.optInExistingSubscribers?`This newsletter will be available to all members. Your ${M===void 0?"":Ka(M)} existing subscriber${m?.meta?.pagination.total===1?"":"s"} will also be opted-in to receive it.`:"The newsletter will be available to all new members. Existing members won’t be subscribed, but may visit their account area to opt-in to future emails.",label:"Opt-in existing subscribers",labelStyle:"heading",onChange:T=>u(A=>({...A,optInExistingSubscribers:T.target.checked}))})]})})},GM=ye.create(YM),XM=({recommendation:e,animate:s})=>{const a=Gt(),{updateRoute:o,route:c}=Ve(),{mutateAsync:h}=e2(),y=it(),{formState:m,updateForm:l,handleSave:f,saveState:u,errors:d,clearError:g,setErrors:b}=pr({initialState:{...e},onSave:async T=>{await h(T),a.remove(),mt({title:"Recommendation added",type:"success"}),r2("Recommendation Added",{oneClickSubscribe:T.one_click_subscribe}),o("recommendations")},onSaveError:y,onValidate:T=>t2(T)});let _="Add",k=!1;u==="saving"?k=!0:u==="saved"&&(_="Added");let M={label:"Back",icon:"arrow-left",iconColorClass:"text-black dark:text-white",link:!0,size:"sm",onClick:()=>{u!=="saving"&&(a.remove(),ye.show(fx,{pathName:c,animate:!1,recommendation:{...m}}))}};return r.jsx(vt,{afterClose:()=>{o("recommendations")},animate:s??!0,backDropClick:!1,cancelLabel:"Cancel",dirty:!0,leftButtonProps:M,okColor:"black",okLabel:_,okLoading:k,size:"sm",testId:"add-recommendation-modal",title:"Add recommendation",stickyFooter:!0,onCancel:()=>{u!=="saving"&&(a.remove(),o("recommendations"))},onOk:async()=>{if(u!=="saving"){Vg();try{await f({force:!0})}catch{mt({type:"error",title:"Something went wrong when adding this recommendation, please try again."})}}},children:r.jsx(n2,{clearError:g,errors:d,formState:m,setErrors:b,showURL:!1,updateForm:l})})},KM=ye.create(XM),em=e=>qi(e).save||"",VM=function(e,s){try{new URL(s).hostname.includes(".")?delete e.url:e.url="Enter a valid URL"}catch{e.url="Enter a valid URL"}return e},ZM=({searchParams:e,recommendation:s,animate:a})=>{const[o,c]=D.useState(!1),h=Gt(),{updateRoute:y}=Ve(),{mutateAsync:m}=s2(),l=s?"":e?.get("url")??"",{save:f}=l?qi(l):{save:""},u=ot.useRef(!1),[d,g]=ot.useState(!!f),{formState:b,updateForm:_,handleSave:k,errors:M,saveState:T,clearError:A}=pr({initialState:s??{title:"",url:f||"",description:"",excerpt:null,featured_image:null,favicon:null,one_click_subscribe:!1},onSave:async()=>{let O;O=new URL(b.url);const $=O.hostname.replace("www.",""),q={...b,url:O.toString()},{recommendations:R=[]}=await m(O);if(!R||R.length===0)return;const K=R[0];if(K.id)throw new ch("A recommendation with this URL already exists.");q.title=K.title??$,q.excerpt=K.excerpt??q.excerpt,q.featured_image=K.featured_image??q.featured_image??null,q.favicon=K.favicon??q.favicon??null,q.one_click_subscribe=K.one_click_subscribe??q.one_click_subscribe??!1,q.description=q.excerpt||null,h.remove(),ye.show(KM,{animate:!1,recommendation:q})},onValidate:()=>{const O={};return VM(O,b.url),d&&g(Object.keys(O).length===0),O}}),I=ot.useCallback(async()=>{if(T!=="saving"){Vg();try{if(await k({force:!0}))return}catch(O){const $=O instanceof ch?O.message:"Something went wrong while checking this URL, please try again.";mt({type:"error",title:$})}d&&g(!1)}},[k,T,d,g]);return ot.useEffect(()=>{d&&!u.current&&(u.current=!0,I())},[d,I]),D.useEffect(()=>{o&&(I(),c(!1))},[b]),d?r.jsx(vt,{afterClose:()=>{y("recommendations")},animate:a??!0,backDropClick:!1,footer:!1,header:!1,size:"sm",children:r.jsx("div",{className:"flex flex-col items-center justify-center p-8",children:r.jsx(Yi,{})})}):r.jsxs(vt,{afterClose:()=>{y("recommendations")},animate:a??!0,backDropClick:!1,okColor:"black",okLabel:"Next",okLoading:T==="saving",size:"sm",testId:"add-recommendation-modal",title:"Add recommendation",onOk:I,children:[r.jsxs("p",{className:"mt-4",children:["You can recommend ",r.jsx("strong",{children:"any site"})," your audience will find valuable, not just those published on Ghost."]}),r.jsx(et,{marginBottom:!1,marginTop:!0,children:r.jsx(Ne,{autoFocus:!0,error:!!M.url,hint:M.url||r.jsxs(r.Fragment,{children:["Need inspiration? ",r.jsx("a",{className:"text-green",href:"https://www.ghost.org/explore",rel:"noopener noreferrer",target:"_blank",children:"Explore thousands of sites"})," to recommend"]}),maxLength:2e3,placeholder:"https://www.example.com",title:"URL",value:b.url,onBlur:()=>{const O=em(b.url);_($=>({...$,url:O}))},onChange:O=>{A?.("url"),_($=>({...$,url:O.target.value}))},onKeyDown:O=>{O.key==="Enter"&&(O.preventDefault(),_($=>({...$,url:em(b.url)})),c(!0))}})})]})},fx=ye.create(ZM);function QM(e,s){let a;return function(...c){const h=()=>{clearTimeout(a),e(...c)};clearTimeout(a),a=setTimeout(h,s)}}const xd=({generateContent:e,className:s,height:a,width:o,parentClassName:c,testId:h,addDelay:y=!1})=>{const[m,l]=D.useState(0),f=[D.useRef(null),D.useRef(null)],[u,d]=D.useState(0);return D.useEffect(()=>{const g=m===0?1:0,b=f[g].current;if(b){e(b);const _=()=>{y?setTimeout(()=>{l(g)},500):l(g)};return b.addEventListener("load",_),()=>{b.removeEventListener("load",_)}}},[e]),D.useEffect(()=>{const g=f[m].current,b=QM(()=>{d(g?.contentWindow?.scrollY||0)},250);return g?.contentWindow?.addEventListener("scroll",b),()=>{g?.contentWindow?.removeEventListener("scroll",b)}},[m,f]),D.useEffect(()=>{const g=f[m].current;if(g)try{g.contentWindow?.scrollTo(0,u)}catch(b){j_(b)}},[u,m,f]),r.jsxs("div",{className:c,"data-testid":h,children:[r.jsx("iframe",{ref:f[0],className:`${s} ${m!==0?"z-10 opacity-0":"z-20 opacity-100"}`,"data-visible":m===0,frameBorder:"0",height:a,title:"Buffered Preview 1",width:o}),r.jsx("iframe",{ref:f[1],className:`${s} ${m!==1?"z-10 opacity-0":"z-20 opacity-100"}`,"data-visible":m===1,frameBorder:"0",height:a,title:"Buffered Preview 2",width:o})]})},JM=(e,s,a)=>{const o=new URLSearchParams;return o.append("announcement_bg",e||"accent"),o.append("announcement",s||""),a&&a.length>0&&o.append("announcement_vis",a?.join(",")||""),o.toString()},ej=({announcementBackgroundColor:e,announcementContent:s,url:a,visibility:o})=>{const c=D.useMemo(()=>o,[o?.join(",")]),h=D.useCallback(y=>{a&&fetch(a,{method:"POST",headers:{"Content-Type":"text/html;charset=utf-8","x-ghost-preview":JM(e,s,c),Accept:"text/plain"},mode:"cors",credentials:"include"}).then(m=>m.text()).then(m=>{const l="html { pointer-events: none; }",u=new DOMParser().parseFromString(m,"text/html"),d=u.querySelector("style"),g=d.innerHTML;d.innerHTML=`${g}
|
|
2
|
-
|
|
3
|
-
${l}`;let _=(u.doctype?new XMLSerializer().serializeToString(u.doctype):"")+u.documentElement.outerHTML;y.contentDocument?.open(),y.contentDocument?.write(_),y.contentDocument?.close()}).catch(()=>{})},[e,s,a,c]);return r.jsx(xd,{addDelay:!0,className:"absolute size-[110%] origin-top-left scale-[.90909] bg-white max-[1600px]:size-[130%] max-[1600px]:scale-[.76923]",generateContent:h,height:"100%",parentClassName:"relative h-full w-full",testId:"announcement-bar-preview-iframe",width:"100%"})},tj=({announcementContent:e,announcementTextHandler:s,accentColor:a,announcementBackgroundColor:o,toggleColorSwatch:c,toggleVisibility:h,visibility:y=[],paidMembersEnabled:m,onBlur:l})=>{const f=[{label:"Public visitors",onChange:u=>{h("visitors",u)},value:"visitors",checked:y.includes("visitors")},{label:"Free members",onChange:u=>{h("free_members",u)},value:"free_members",checked:y.includes("free_members")},...m?[{label:"Paid members",onChange:u=>{h("paid_members",u)},value:"paid_members",checked:y.includes("paid_members")}]:[]];return r.jsxs(et,{children:[r.jsx(dd,{nodes:"MINIMAL_NODES",placeholder:"Highlight breaking news, offers or updates",title:"Announcement",value:e,onBlur:l,onChange:s}),r.jsx(w0,{isExpanded:!1,picker:!1,swatches:[{hex:"#08090c",title:"Dark",value:"dark"},{hex:"#ffffff",title:"Light",value:"light"},{hex:a||"#ffdd00",title:"Accent",value:"accent"}],swatchSize:"lg",title:"Background color",value:o,onSwatchChange:u=>{u!==null&&c(u)},onTogglePicker:()=>{}}),r.jsx($f,{checkboxes:f,title:"Visibility"})]})},rj=()=>{const{siteData:e}=Qe(),{localSettings:s,updateSetting:a,handleSave:o,okProps:c}=ss({savingDelay:500}),[h]=xt(s,["announcement_content"]),[y]=xt(s,["accent_color"]),[m]=xt(s,["announcement_background"]),[l]=xt(s,["announcement_visibility"]),[f]=xt(s,["paid_members_enabled"]),u=JSON.parse(l?.toString()||"[]"),{updateRoute:d}=Ve(),[g,b]=D.useState("homepage"),_=R=>{a("announcement_background",R)},k=(R,K)=>{const X=u.indexOf(R);X===-1&&K?u.push(R):u.splice(X,1),a("announcement_visibility",JSON.stringify(u))},M=D.useRef(rl(R=>{a("announcement_content",R)},500)),T=r.jsx(tj,{accentColor:y,announcementBackgroundColor:m,announcementContent:h,announcementTextHandler:R=>{M.current(R)},paidMembersEnabled:f,toggleColorSwatch:_,toggleVisibility:k,visibility:l,onBlur:()=>{}}),{data:{posts:[A]}={posts:[]}}=x0({searchParams:{filter:"status:published",order:"published_at DESC",limit:"1",fields:"id,url"}});let I=[];A&&(I=[{id:"homepage",title:"Homepage"},{id:"post",title:"Post"}]);const O=R=>{I.length&&b(R)};let $=Xr(e);switch(g){case"homepage":$=Xr(e);break;case"post":$=A.url;break}const q=r.jsx(ej,{announcementBackgroundColor:m,announcementContent:h,url:$,visibility:u});return r.jsx(as,{afterClose:()=>{d("announcement-bar")},buttonsDisabled:c.disabled,cancelLabel:"Close",deviceSelector:!0,dirty:!1,okColor:c.color,okLabel:c.label||"Save",preview:q,previewBgColor:"greygradient",previewToolbarTabs:I,selectedURL:g,sidebar:T,testId:"announcement-bar-modal",title:"Announcement",titleHeadingLevel:5,onOk:async()=>{await o({fakeWhenUnchanged:!0})||mt({type:"error",message:"An error occurred while saving your changes. Please try again."})},onSelectURL:O})},nj=ye.create(rj),Gf=[{label:"Global",options:[{value:"site.changed",label:"Site changed (rebuild)"}]},{label:"Posts",options:[{value:"post.added",label:"Post created"},{value:"post.deleted",label:"Post deleted"},{value:"post.edited",label:"Post updated"},{value:"post.published",label:"Post published"},{value:"post.published.edited",label:"Published post updated"},{value:"post.unpublished",label:"Post unpublished"},{value:"post.scheduled",label:"Post scheduled"},{value:"post.unscheduled",label:"Post unscheduled"},{value:"post.tag.attached",label:"Tag added to post"},{value:"post.tag.detached",label:"Tag removed from post"}]},{label:"Pages",options:[{value:"page.added",label:"Page created"},{value:"page.deleted",label:"Page deleted"},{value:"page.edited",label:"Page updated"},{value:"page.published",label:"Page published"},{value:"page.published.edited",label:"Published page updated"},{value:"page.unpublished",label:"Page unpublished"},{value:"page.tag.attached",label:"Tag added to page"},{value:"page.tag.detached",label:"Tag removed from page"}]},{label:"Tags",options:[{value:"tag.added",label:"Tag created"},{value:"tag.edited",label:"Tag updated"},{value:"tag.deleted",label:"Tag deleted"}]},{label:"Members",options:[{value:"member.added",label:"Member added"},{value:"member.edited",label:"Member updated"},{value:"member.deleted",label:"Member deleted"}]}],sj=e=>Gf.flatMap(({options:a})=>a).find(a=>a.value===e)?.label,aj=ns({method:"POST",path:()=>"/webhooks/",body:e=>({webhooks:[e]}),updateQueries:{dataType:nl,emberUpdateType:"createOrUpdate",update:(e,s)=>s&&{...s,integrations:s.integrations.map(a=>{const o=e.webhooks[0];return o.integration_id===a.id?{...a,webhooks:[...a.webhooks||[],o]}:a})}}}),oj=ns({method:"PUT",path:e=>`/webhooks/${e.id}/`,body:e=>({webhooks:[e]}),updateQueries:{dataType:nl,emberUpdateType:"createOrUpdate",update:(e,s)=>s&&{...s,integrations:s.integrations.map(a=>{var o;return{...a,webhooks:(o=a.webhooks)==null?void 0:o.map(c=>c.id===e.webhooks[0].id?e.webhooks[0]:c)}})}}}),ij=ns({method:"DELETE",path:e=>`/webhooks/${e}/`,updateQueries:{dataType:nl,emberUpdateType:"createOrUpdate",update:(e,s,a)=>({...s,integrations:s.integrations.map(o=>{var c;return{...o,webhooks:(c=o.webhooks)==null?void 0:c.filter(h=>h.id!==a)}})})}}),lj=({webhook:e,integrationId:s})=>{const a=Gt(),{mutateAsync:o}=aj(),{mutateAsync:c}=oj(),h=it(),{formState:y,updateForm:m,handleSave:l,errors:f,clearError:u}=pr({initialState:e||{},onSave:async()=>{y.id?await c(y):await o({...y,integration_id:s})},onSaveError:h,onValidate:()=>{const d={};return y.name||(d.name="Enter a name"),y.event||(d.event="Select an event"),y.target_url||(d.target_url="Enter a target URL"),y.target_url&&!St.isURL(y.target_url,{require_tld:!1})&&(d.target_url="Enter a valid URL"),d}});return r.jsx(vt,{okColor:"black",okLabel:e?"Update":"Add",size:"sm",testId:"webhook-modal",title:"Add webhook",formSheet:!0,onOk:async()=>{await l()&&a.remove()},children:r.jsx("div",{className:"mt-5",children:r.jsxs(et,{marginBottom:!1,marginTop:!1,children:[r.jsx(Ne,{error:!!f.name,hint:f.name,maxLength:191,placeholder:"Custom webhook",title:"Name",value:y.name,onChange:d=>m(g=>({...g,name:d.target.value})),onKeyDown:()=>u("name")}),r.jsx(Ot,{error:!!f.event,hint:f.event,options:Gf,prompt:"Select an event",selectedOption:Gf.flatMap(d=>d.options).find(d=>d.value===y.event),testId:"event-select",title:"Event",hideTitle:!0,onSelect:d=>{m(g=>({...g,event:d?.value})),u("event")}}),r.jsx(Ne,{error:!!f.target_url,hint:f.target_url,maxLength:2e3,placeholder:"https://example.com",title:"Target URL",type:"url",value:y.target_url,onChange:d=>m(g=>({...g,target_url:d.target.value})),onKeyDown:()=>u("target_url")}),r.jsx(Ne,{maxLength:191,placeholder:"https://example.com",title:"Secret",value:y.secret||void 0,onChange:d=>m(g=>({...g,secret:d.target.value}))})]})})})},tm=ye.create(lj),cj=({integration:e})=>{const{mutateAsync:s}=ij(),a=it(),o=c=>{ye.show(Et,{title:"Are you sure?",prompt:"Deleting this webhook may prevent the integration from functioning.",okColor:"red",okLabel:"Delete Webhook",onOk:async h=>{try{await s(c),h?.remove(),mt({message:"Webhook deleted",type:"info"})}catch(y){a(y)}}})};return r.jsxs("div",{children:[r.jsxs(a2,{children:[r.jsxs(gh,{bgOnHover:!1,children:[r.jsxs(qh,{children:[e.webhooks?.length||0," ",e.webhooks?.length===1?"webhook":"webhooks"]}),r.jsx(qh,{children:"Last triggered"})]}),e.webhooks?.map(c=>r.jsxs(gh,{action:r.jsx(Ue,{color:"red",label:"Delete",link:!0,onClick:h=>{h?.stopPropagation(),o(c.id)}}),bgOnHover:!1,hideActions:!0,onClick:()=>{ye.show(tm,{webhook:c,integrationId:e.id})},children:[r.jsxs(xh,{className:"w-3/4",children:[r.jsx("div",{className:"text-sm font-semibold",children:c.name}),r.jsxs("div",{className:"grid grid-cols-[max-content_1fr] gap-x-1 text-xs leading-snug",children:[r.jsx("span",{className:"text-grey-600",children:"Event:"}),r.jsx("span",{children:sj(c.event)}),r.jsx("span",{className:"text-grey-600",children:"URL:"}),r.jsx("span",{className:"line-clamp-3 break-all",title:c.target_url,children:c.target_url})]})]}),r.jsx(xh,{className:"w-1/4 text-sm",children:c.last_triggered_at&&new Date(c.last_triggered_at).toLocaleString("default",{weekday:"short",month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})})]}))]}),r.jsx("div",{className:"mt-5",children:r.jsx(Ue,{color:"green",icon:"add",iconColorClass:"text-green",label:"Add webhook",size:"sm",link:!0,onClick:()=>{ye.show(tm,{integrationId:e.id})}})})]})},uj=({integration:e})=>{const s=Gt(),{updateRoute:a}=Ve(),{mutateAsync:o}=o2(),{mutateAsync:c}=gd(),{mutateAsync:h}=Ks(),y=it(),{formState:m,updateForm:l,handleSave:f,saveState:u,errors:d,clearError:g,okProps:b}=pr({initialState:e,savingDelay:500,savedDelay:500,onSave:async()=>{await o(m)},onSavedStateReset:()=>{a("integrations")},onSaveError:y,onValidate:()=>{const $={};return m.name||($.name="Enter integration title"),$}}),_=e.api_keys?.find($=>$.type==="admin"),k=e.api_keys?.find($=>$.type==="content"),[M,T]=D.useState(!1),[A,I]=D.useState(!1);D.useEffect(()=>{e.type!=="custom"&&(s.remove(),a("integrations"))},[e.type,s,a]);const O=($,q)=>{q(!1);const R=$.type==="content"?"Content":"Admin";ye.show(Et,{title:`Regenerate ${R} API Key`,prompt:`You can regenerate ${R} API Key any time, but any scripts or applications using it will need to be updated.`,okLabel:`Regenerate ${R} API Key`,onOk:async K=>{try{await c({integrationId:e.id,apiKeyId:$.id}),q(!0),K?.remove()}catch(X){y(X)}}})};return r.jsxs(vt,{afterClose:()=>{a("integrations")},buttonsDisabled:b.disabled,cancelLabel:"Close",dirty:u==="unsaved",okColor:b.color,okLabel:b.label||"Save",size:"md",testId:"custom-integration-modal",title:m.name||"Custom integration",stickyFooter:!0,onOk:async()=>{await f({fakeWhenUnchanged:!0})},children:[r.jsxs("div",{className:"mt-7 flex w-full flex-col gap-7 md:flex-row",children:[r.jsx("div",{children:r.jsx(un,{height:"100px",id:"custom-integration-icon",imageURL:m.icon_image||void 0,width:"100px",onDelete:()=>l($=>({...$,icon_image:null})),onUpload:async $=>{try{const q=ln(await h({file:$}));l(R=>({...R,icon_image:q}))}catch(q){const R=q;R.response.status===415&&(R.message="Unsupported file type"),y(R)}},children:"Upload icon"})}),r.jsx("div",{className:"flex grow flex-col",children:r.jsxs(et,{children:[r.jsx(Ne,{error:!!d.name,hint:d.name,maxLength:191,title:"Title",value:m.name,onChange:$=>l(q=>({...q,name:$.target.value})),onKeyDown:()=>g("name")}),r.jsx(Ne,{maxLength:2e3,title:"Description",value:m.description||"",onChange:$=>l(q=>({...q,description:$.target.value}))}),r.jsx(cl,{keys:[{label:"Content API key",text:k?.secret,hint:A?r.jsx("div",{className:"text-green",children:"Content API Key was successfully regenerated"}):void 0,onRegenerate:()=>k&&O(k,I)},{label:"Admin API key",text:_?.secret,hint:M?r.jsx("div",{className:"text-green",children:"Admin API Key was successfully regenerated"}):void 0,onRegenerate:()=>_&&O(_,T)},{label:"API URL",text:window.location.origin+ao().subdir}]})]})})]}),r.jsx("div",{children:r.jsx(cj,{integration:e})})]})},fj=({params:e})=>{const{data:{integrations:s}={}}=nd(),a=s?.find(({id:o})=>o===e?.id);return a?r.jsx(uj,{integration:a}):null},dj=ye.create(fj),pj=({problem:e})=>{const[s,a]=D.useState(!1),o=()=>{a(!s)};return r.jsx($n,{title:r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e.level==="error"?"before:bg-red":"before:bg-yellow"} relative px-4 text-sm before:absolute before:left-0 before:top-1.5 before:block before:size-2 before:rounded-full before:content-['']`,children:[e?.fatal?r.jsx("strong",{children:"Fatal: "}):r.jsx("strong",{children:e.level==="error"?"Error: ":"Warning: "}),r.jsx("span",{dangerouslySetInnerHTML:{__html:e.rule}}),r.jsx("div",{className:"absolute -right-4 top-1",children:r.jsx(Ue,{color:"green",icon:s?"chevron-down":"chevron-right",iconColorClass:"text-grey-700",size:"sm",link:!0,onClick:()=>o()})})]}),s?r.jsxs("div",{className:"mt-2 px-4 text-[13px] leading-8",children:[r.jsx("div",{dangerouslySetInnerHTML:{__html:e.details},className:"mb-4"}),r.jsx(bt,{level:6,children:"Affected files:"}),r.jsx("ul",{className:"mt-1",children:e.failures.map(c=>r.jsxs("li",{children:[r.jsx("code",{children:c.ref}),c.message?`: ${c.message}`:""]}))})]}):null]}),hideActions:!0,separator:!0})},hj=({title:e,prompt:s,fatalErrors:a,onRetry:o})=>{let c=null;return a&&(c=r.jsx("div",{className:"mt-10",children:r.jsx(cn,{title:"Errors",children:a.map(h=>typeof h.details=="object"&&h.details.errors&&h.details.errors.length>0?h.details.errors.map(y=>r.jsx(pj,{problem:y})):typeof h.details=="string"?r.jsx($n,{title:h.details}):null)})})),r.jsx(Jg,{cancelLabel:"Close",okColor:"black",okLabel:"Retry",prompt:r.jsxs(r.Fragment,{children:[s,c]}),title:e,onOk:o})},dx=ye.create(hj),bd=()=>{const e=i2(),a=!e.data?.themes[0]?.warnings?.some(c=>c.code==="GS051-CUSTOM-FONTS"),o=D.useCallback(()=>{e.refetch()},[e]);return{supportsCustomFonts:a,refreshActiveThemeData:o}};function mj(e){let s=e.package?.name||e.name;return l2(e)?s+=" (default)":c2(e)?s+=" (legacy)":e.package?.name!==e.name&&(s=r.jsxs("span",{className:"text-sm md:text-base",children:[s," ",r.jsxs("span",{className:"text-grey-600",children:["(",e.name,")"]})]})),e0(e)&&(s=r.jsxs("span",{className:"text-sm font-bold md:text-base",children:[s," — ",r.jsx("span",{className:"text-green",children:" Active"})]})),s}function gj(e){return e.package?.version||"1.0"}const xj=({theme:e})=>{const{mutateAsync:s}=sd(),{mutateAsync:a}=u2(),{refreshActiveThemeData:o}=bd(),c=it(),h=async()=>{try{await s(e.name),o(),mt({title:"Theme activated",type:"success",message:r.jsxs("div",{children:[r.jsx("span",{className:"capitalize",children:e.name})," is now your active theme"]})})}catch(d){let g=null;d instanceof ts&&d.response?.status===422&&d.data?.errors?g=d.data.errors:c(d);let b="Invalid Theme",_=r.jsx(r.Fragment,{children:"This theme is invalid and cannot be activated. Fix the following errors and re-upload the theme"});g&&ye.show(dx,{title:b,prompt:_,fatalErrors:g,onRetry:async k=>{k?.remove(),h()}})}},y=async()=>{const{apiRoot:d}=ao();E_(`${d}/themes/${e.name}/download`)},m=async()=>{ye.show(Et,{title:"Are you sure you want to delete this?",prompt:r.jsxs(r.Fragment,{children:["You are about to delete ",r.jsxs("strong",{children:['"',e.name,'".']})," This is permanent! We warned you, k? Maybe download"," ",r.jsx("span",{className:"cursor-pointer text-green-500",onClick:()=>{y()},children:"your theme before continuing"})]}),okLabel:"Delete",okRunningLabel:"Deleting",okColor:"red",onOk:async d=>{try{await a(e.name),d?.remove()}catch(g){c(g)}}})};let l=[];e0(e)||l.push(r.jsx(Ue,{className:"ml-2",color:"green",label:"Activate",link:!0,onClick:h},"activate"));let f=[{id:"download",label:"Download",onClick:y}];f2(e)&&f.push({id:"delete",label:"Delete",onClick:m});const u={iconColorClass:"text-base",size:"sm"};return r.jsxs("div",{className:"-mr-3 flex items-center gap-4",children:[l,r.jsx($0,{items:f,position:"end",triggerButtonProps:u})]})},bj=({themes:e})=>(e.sort((s,a)=>s.active&&!a.active?-1:!s.active&&a.active?1:s.package?.name&&a.package?.name?s.package.name.localeCompare(a.package.name):s.name.localeCompare(a.name)),r.jsx(cn,{pageTitle:"Installed themes",children:e.map(s=>{const a=mj(s),o=gj(s);return r.jsx($n,{action:r.jsx(xj,{theme:s}),detail:o,id:`theme-${s.name}`,separator:!1,testId:"theme-list-item",title:a},s.name)})})),vj=({themes:e})=>r.jsx(hd,{children:r.jsx(bj,{themes:e})}),wj=""+new URL("footer-marketplace-bg-BpIYEF6z.png",import.meta.url).href,yj=3e3,rm=e=>e.variants&&e.variants.length>0,mu=e=>{const s=[{category:e.category,previewUrl:e.previewUrl,image:e.image}];return e.variants&&e.variants.length>0&&s.push(...e.variants),s},_j=({onSelectTheme:e})=>{const s=d2(),[a,o]=D.useState(null),[c,h]=D.useState(0),y=m=>{o(m),h(m!==null&&rm(m)&&mu(m).length>1?1:0)};return D.useEffect(()=>{if(a===null)return;const m=setInterval(()=>{h((c+1)%(mu(a).length||0))},yj);return()=>clearInterval(m)},[a,c]),r.jsxs(hd,{heading:"Themes",children:[r.jsx("div",{className:"mt-[6vmin] grid grid-cols-1 gap-[6vmin] sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4",children:s.map(m=>{const l=rm(m),f=mu(m),u=a===m;return r.jsxs("button",{className:"flex cursor-pointer flex-col gap-3 text-left",type:"button",onClick:()=>{e?.(m)},children:[r.jsx("div",{className:"relative w-full bg-grey-100 shadow-md transition-all duration-500 hover:scale-[1.05]",onMouseEnter:()=>y(m),onMouseLeave:()=>y(null),children:l?r.jsx(r.Fragment,{children:f.map((d,g)=>r.jsx("img",{alt:`${m.name} Theme - ${d.category}`,className:we("size-full object-contain opacity-0 transition-opacity duration-500",{"opacity-100":g===c&&u||!u&&g===0,relative:g===c,absolute:g!==c,"left-0":g!==c,"top-0":g!==c}),src:d.image},`theme-variant-${d.category.toLowerCase()}`))}):r.jsx("img",{alt:`${m.name} Theme`,className:"size-full object-contain",src:m.image})}),r.jsxs("div",{className:"relative mt-3",children:[r.jsx(bt,{level:4,children:m.name}),l?f.map((d,g)=>r.jsx("span",{className:we("absolute left-0 translate-y-px text-sm text-grey-700 opacity-0",{"opacity-100":g===c&&u||!u&&g===0}),children:d.category})):r.jsx("span",{className:"text-sm text-grey-700",children:m.category})]})]},m.name)})}),r.jsxs("div",{className:"mx-[-8vmin] mb-[-8vmin] mt-[8vmin] bg-black px-[8vmin] py-16 text-center text-lg text-white",style:{background:`#15171a url(${wj}) 100% 100% / 35vw no-repeat`},children:["Find and buy third-party, premium themes from independent developers in the ",r.jsx("a",{className:"inline-block font-semibold text-lime",href:"https://ghost.org/themes/",rel:"noopener noreferrer",target:"_blank",children:"Ghost Marketplace →"})]})]})},nm=({problem:e})=>{const[s,a]=D.useState(!1);return r.jsx($n,{title:r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e.level==="error"?"before:bg-red":"before:bg-yellow"} relative px-4 text-sm before:absolute before:left-0 before:top-1.5 before:block before:size-2 before:rounded-full before:content-['']`,children:[r.jsx("strong",{children:e.level==="error"?"Error: ":"Warning: "}),r.jsx("span",{dangerouslySetInnerHTML:{__html:e.rule}}),r.jsx("div",{className:"absolute -right-4 top-1",children:r.jsx(Ue,{color:"green",icon:s?"chevron-down":"chevron-right",iconColorClass:"text-grey-700",size:"sm",link:!0,onClick:()=>a(!s)})})]}),s?r.jsxs("div",{className:"mt-2 px-4 text-[13px] leading-8",children:[r.jsx("div",{dangerouslySetInnerHTML:{__html:e.details},className:"mb-4"}),r.jsx(bt,{level:6,children:"Affected files:"}),r.jsx("ul",{className:"mt-1",children:e.failures.map(o=>r.jsxs("li",{children:[r.jsx("code",{children:o.ref}),o.message?`: ${o.message}`:""]},o.ref))})]}):null]}),hideActions:!0,separator:!0})},kj=({title:e,prompt:s,installedTheme:a,onActivate:o})=>{const{mutateAsync:c}=sd(),{refreshActiveThemeData:h}=bd(),y=it();let m=null;a&&a.errors&&(m=r.jsx("div",{className:"mt-6",children:r.jsx(cn,{hint:r.jsxs(r.Fragment,{children:["Highly recommended to fix, functionality ",r.jsx("strong",{children:"could"})," be restricted"]}),title:"Errors",children:a.errors?.map((u,d)=>r.jsx(nm,{problem:u},d))})}));let l=null;a&&a.warnings&&(l=r.jsx("div",{className:"mt-10",children:r.jsx(cn,{title:"Warnings",children:a.warnings?.map((u,d)=>r.jsx(nm,{problem:u},d))})}));let f=`Activate${a.errors?.length?" with errors":""}`;return a.active&&(f="OK"),r.jsx(Jg,{cancelLabel:"Close",okColor:"black",okLabel:f,okRunningLabel:"Activating...",prompt:r.jsxs(r.Fragment,{children:[s,m,l]}),title:e,onOk:async u=>{if(!a.active)try{const g=(await c(a.name)).themes[0];h(),mt({title:"Theme activated",type:"success",message:r.jsxs("div",{children:[r.jsx("span",{className:"capitalize",children:g.name})," is now your active theme."]})})}catch(d){y(d)}o?.(),u?.remove()}})},px=ye.create(kj),sm=e=>e.variants&&e.variants.length>0,am=e=>{const s=[{image:e.image,category:e.category,previewUrl:e.previewUrl}];return e.variants&&e.variants.length>0&&s.push(...e.variants),s},om=e=>e.category.toLowerCase(),Mj=({selectedTheme:e,isInstalling:s,installedTheme:a,onBack:o,onInstall:c})=>{const[h,y]=D.useState("desktop"),[m,l]=D.useState(void 0);if(!e)return null;let f=e.previewUrl;const u=am(e).map(k=>({label:k.category,value:om(k)}));sm(e)&&(m===void 0&&l(u[0]),f=am(e).find(k=>om(k)===m?.value)?.previewUrl||f);let d=`Install ${e.name}`;s?d="Installing...":Gi(e)&&!a?.active?d=`Activate ${e.name}`:a&&(d=`Update ${e.name}`);const g=()=>{c?.()},b=r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(md,{activeItemClassName:"hidden md:!block md:!visible",containerClassName:"whitespace-nowrap",itemClassName:"hidden md:!block md:!visible",items:[{label:"Change theme",onClick:o},{label:e.name}],separatorClassName:"hidden md:!block md:!visible",backIcon:!0,onBack:o}),sm(e)?r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"hidden md:!visible md:!block",children:"–"}),r.jsx(Ot,{border:!1,containerClassName:"text-sm font-bold",controlClasses:{menu:"w-24"},fullWidth:!1,options:u,selectedOption:m,clearBg:!0,onSelect:k=>{l(k||void 0)}})]}):null]}),_=r.jsxs("div",{className:"flex justify-end gap-8",children:[r.jsx(Gr,{buttons:[{icon:"laptop",iconColorClass:h==="desktop"?"text-black dark:text-green":"text-grey-500 dark:text-grey-600",link:!0,size:"sm",onClick:()=>{y("desktop")}},{icon:"mobile",iconColorClass:h==="mobile"?"text-black dark:text-green":"text-grey-500 dark:text-grey-600",link:!0,size:"sm",onClick:()=>{y("mobile")}}]}),r.jsx(Ue,{color:"green",disabled:s,label:s?"Installing...":d,onClick:g})]});return r.jsxs("div",{className:"absolute inset-0 z-[100]",children:[r.jsx(K0,{containerClassName:"bg-grey-50 dark:bg-black z-[100]",left:b,right:_,sticky:!1}),r.jsx("div",{className:"flex h-[calc(100%-92px)] grow flex-col items-center justify-center bg-grey-50 dark:bg-black",children:h==="desktop"?r.jsx(b0,{children:r.jsx("iframe",{className:"size-full",src:f,title:"Theme preview"})}):r.jsx(v0,{children:r.jsx("iframe",{className:"size-full",src:f,title:"Theme preview"})})})]})},jj=({onUpload:e})=>{const s=Gt();return r.jsx("div",{className:"-mb-6",children:r.jsx(m2,{id:"theme-upload",onUpload:a=>{s.remove(),e(a)},children:r.jsx("div",{className:"cursor-pointer bg-grey-75 p-10 text-center dark:bg-grey-950",children:"Click to select or drag & drop zip file"})})})},Ej=({currentTab:e,setCurrentTab:s,themes:a})=>{const o=Gt(),{updateRoute:c}=Ve(),{mutateAsync:h}=h2(),{checkThemeLimitError:y,isThemeLimited:m}=od(),l=it(),[f,u]=D.useState(),[d,g]=D.useState(!1);D.useEffect(()=>{(async()=>{if(m){const O=await y(".");u({enabled:!1,error:O||"Your current plan doesn't support uploading custom themes."})}else u({enabled:!0})})()},[y,m]);const b=()=>{c("/")},_=async I=>{const O=I?.name.replace(/\.zip$/,""),$=a.map(q=>q.name);Gi({name:O})?ye.show(Et,{title:"Upload failed",cancelLabel:"Cancel",okLabel:"",prompt:r.jsxs(r.Fragment,{children:[r.jsxs("p",{children:["The default ",r.jsx("strong",{children:O})," theme cannot be overwritten."]}),r.jsx("p",{children:"Rename your zip file and try again."})]}),onOk:async q=>{q?.remove()}}):$.includes(O)?ye.show(Et,{title:"Overwrite theme",prompt:r.jsxs(r.Fragment,{children:["The theme ",r.jsx("strong",{children:O})," already exists. Do you want to overwrite it?"]}),okLabel:"Overwrite",cancelLabel:"Cancel",okRunningLabel:"Overwriting...",okColor:"red",onOk:async q=>{g(!0);const R=$.indexOf(O);a.splice(R,1),await k({file:I,onActivate:b}),g(!1),s("installed"),q?.remove()}}):(s("installed"),k({file:I,onActivate:b}))},k=async({file:I,onActivate:O})=>{let $,q=null;try{g(!0),$=await h({file:I}),g(!1)}catch(Y){g(!1),Y instanceof ts&&Y.response?.status===422&&Y.data?.errors?q=Y.data.errors:l(Y)}if(q&&!$){let Y="Invalid Theme",L=r.jsx(r.Fragment,{children:"This theme is invalid and cannot be activated. Fix the following errors and re-upload the theme"});ye.show(dx,{title:Y,prompt:L,fatalErrors:q,onRetry:async()=>{o?.remove(),T()}})}if(!$)return;const R=$.themes[0];let K="Upload successful",X=r.jsxs(r.Fragment,{children:[r.jsx("strong",{children:R.name})," uploaded"]});if(R.active||(X=r.jsxs(r.Fragment,{children:[X," ","Do you want to activate it now?"]})),R?.errors?.length||R.warnings?.length){const Y=R?.errors?.length;K=`Upload successful with ${Y?"errors":"warnings"}`,X=r.jsxs(r.Fragment,{children:["The theme ",r.jsxs("strong",{children:['"',R.name,'"']})," was installed but we detected some ",Y?"errors":"warnings","."]}),R.active||(X=r.jsxs(r.Fragment,{children:[X,"You are still able to activate and use the theme but it is recommended to fix these ",Y?"errors":"warnings"," before you do so."]}))}ye.show(px,{title:K,prompt:X,installedTheme:R,onActivate:O})},M=r.jsx("div",{className:"hidden md:!visible md:!block",children:r.jsx(fn,{border:!1,selectedTab:e,tabs:[{id:"official",title:"Official themes"},{id:"installed",title:"Installed"}],onTabChange:I=>{s(I)}})}),T=()=>{f&&(f.enabled?ye.show(Et,{title:"Upload theme",prompt:r.jsx(jj,{onUpload:_}),okLabel:"",formSheet:!1}):ye.show(Vr,{title:"Upgrade to enable custom themes",prompt:f.error||r.jsxs(r.Fragment,{children:["Your current plan only supports official themes. You can install them from the ",r.jsx("a",{href:"https://ghost.org/marketplace/",children:"Ghost theme marketplace"}),"."]}),onOk:()=>c({route:"/pro",isExternal:!0})}))},A=r.jsx("div",{className:"flex items-center gap-14",children:r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(Ue,{label:"Close",onClick:()=>{o.remove(),b()}}),r.jsx(Ue,{color:"black",label:"Upload theme",loading:d,onClick:T})]})});return r.jsxs(r.Fragment,{children:[r.jsx(K0,{containerClassName:"bg-white dark:bg-black",left:M,right:A}),r.jsx("div",{className:"px-[8vmin] md:hidden",children:r.jsx(fn,{border:!1,selectedTab:e,tabs:[{id:"official",title:"Official themes"},{id:"installed",title:"Installed"}],onTabChange:I=>{s(I)}})})]})},Tj=({currentTab:e,onSelectTheme:s,themes:a})=>{switch(e){case"official":return r.jsx(_j,{onSelectTheme:s});case"installed":return r.jsx(vj,{themes:a})}return null},im=({source:e,themeRef:s})=>{const[a,o]=D.useState("official"),[c,h]=D.useState(null),[y,m]=D.useState("desktop"),[l,f]=D.useState(!1),[u,d]=D.useState(!1),[g,b]=D.useState(!1),{updateRoute:_}=Ve(),k=Gt(),{data:{themes:M}={}}=ad(),{mutateAsync:T}=p2(),{mutateAsync:A}=sd(),{checkThemeLimitError:I}=od(),O=it(),$=K=>{h(K)};if(D.useEffect(()=>{b(!0)},[]),D.useEffect(()=>{(async()=>{if(e&&s&&!u&&g){const X=s.split("/")[1];if(await I(X)){k.remove();return}let L="Install Theme";const B=M?.map(se=>se.name)||[];let J=B.includes(X.toLowerCase());const te=B.indexOf(X.toLowerCase()),ne=M?.[te];let Q=r.jsxs(r.Fragment,{children:["By clicking below, ",r.jsx("strong",{children:X})," will automatically be activated as the theme for your site.",J&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),r.jsx("br",{}),"This will overwrite your existing version of ",r.jsx("strong",{children:X}),ne?.active?" which is your active theme":"",". All custom changes will be lost."]})]});ye.show(Et,{title:L,prompt:Q,okLabel:"Install",cancelLabel:"Cancel",okRunningLabel:"Installing...",okColor:"black",onOk:async se=>{let be;d(!0);try{J&&M&&M.splice(te,1),be=await T(s),be?.themes[0]&&(await A(be.themes[0].name),mt({title:"Theme activated",type:"success",message:r.jsxs("div",{children:[r.jsx("span",{className:"capitalize",children:be.themes[0].name})," is now your active theme"]})})),se?.remove(),_("")}catch(je){O(je)}}})}})()},[s,e,T,O,A,_,M,u,I,k,g]),!M)return;let q,R;if(c){q=M.find(X=>X.name.toLowerCase()===c.name.toLowerCase()),R=async()=>{const X=await I(c.name);if(X){ye.show(Vr,{prompt:X,onOk:()=>_({route:"/pro",isExternal:!0})});return}return q&&!Gi(c)?new Promise(Y=>{ye.show(Et,{title:"Overwrite theme",prompt:r.jsxs(r.Fragment,{children:["This will overwrite your existing version of ",c.name,q?.active?", which is your active theme":"",". All custom changes will be lost."]}),okLabel:"Overwrite",okRunningLabel:"Installing...",cancelLabel:"Cancel",okColor:"red",onOk:async L=>{L?.remove(),await K(),Y()}})}):K()};const K=async()=>{let X="Success",Y=r.jsx(r.Fragment,{});if(Gi(c))X="Activate theme",Y=r.jsxs(r.Fragment,{children:["By clicking below, ",r.jsx("strong",{children:c.name})," will automatically be activated as the theme for your site."]});else{f(!0);let L;try{L=await T(c.ref)}catch(J){O(J)}finally{f(!1)}if(!L)return;const B=L.themes[0];if(X="Success",Y=r.jsxs(r.Fragment,{children:[r.jsx("strong",{children:B.name})," has been successfully installed."]}),B.active||(Y=r.jsxs(r.Fragment,{children:[Y," ","Do you want to activate it now?"]})),B.errors?.length||B.warnings?.length){const J=B.errors?.length;X=`Installed with ${J?"errors":"warnings"}`,Y=r.jsxs(r.Fragment,{children:["The theme ",r.jsxs("strong",{children:['"',B.name,'"']})," was installed successfully but we detected some ",J?"errors":"warnings","."]}),B.active||(Y=r.jsxs(r.Fragment,{children:[Y,"You are still able to activate and use the theme but it is recommended to contact the theme developer fix these ",J?"errors":"warnings"," before you do so."]}))}q=B}ye.show(px,{title:X,prompt:Y,installedTheme:q,onActivate:()=>{_("")}})}}return r.jsx(vt,{afterClose:()=>{_("")},animate:!1,cancelLabel:"",footer:!1,padding:!1,size:"full",testId:"theme-modal",title:"",scrolling:!0,onCancel:()=>{k.remove(),_("")},children:r.jsx("div",{className:"flex h-full justify-between",children:r.jsxs("div",{className:"grow",children:[c&&r.jsx(Mj,{installedTheme:q,isInstalling:l,selectedTheme:c,onBack:()=>{h(null)},onClose:()=>{_("")},onInstall:R}),r.jsx(Ej,{currentTab:a,modal:k,previewMode:y,selectedTheme:c,setCurrentTab:o,setPreviewMode:m,setSelectedTheme:h,themes:M}),!c&&r.jsx(Tj,{currentTab:a,themes:M,onSelectTheme:$})]})})})},Nj=({children:e,to:s,classNames:a})=>{const o=s||document.body;if(!o)return r.jsx(r.Fragment,{children:e});const c=h=>{h.stopPropagation()};return T_.createPortal(r.jsx("div",{className:a,onMouseDown:c,children:r.jsx("div",{children:e})}),o)};var Sj=Object.defineProperty,Aj=(e,s,a)=>s in e?Sj(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a,jt=(e,s,a)=>Aj(e,typeof s!="symbol"?s+"":s,a),hx={exports:{}},qa={};/**
|
|
4
|
-
* @license React
|
|
5
|
-
* react-jsx-runtime.production.min.js
|
|
6
|
-
*
|
|
7
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/var lm;function Cj(){if(lm)return qa;lm=1;var e=ot,s=Symbol.for("react.element"),a=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,c=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,h={key:!0,ref:!0,__self:!0,__source:!0};function y(m,l,f){var u,d={},g=null,b=null;f!==void 0&&(g=""+f),l.key!==void 0&&(g=""+l.key),l.ref!==void 0&&(b=l.ref);for(u in l)o.call(l,u)&&!h.hasOwnProperty(u)&&(d[u]=l[u]);if(m&&m.defaultProps)for(u in l=m.defaultProps,l)d[u]===void 0&&(d[u]=l[u]);return{$$typeof:s,type:m,key:g,ref:b,props:d,_owner:c.current}}return qa.Fragment=a,qa.jsx=y,qa.jsxs=y,qa}hx.exports=Cj();var Fe=hx.exports;class Ij{constructor(s=3){jt(this,"columnCount"),jt(this,"columns",[]),jt(this,"columnHeights"),this.columnCount=s,this.columns=[[]],this.columnHeights=null}reset(){let s=[],a=[];for(let o=0;o<this.columnCount;o+=1)s[o]=[],a[o]=0;this.columns=s,this.columnHeights=a}addColumns(){for(let s=0;s<this.columnCount;s++)this.columns.push([]),this.columnHeights.push(0)}addPhotoToColumns(s){this.columns||this.reset();let a=Math.min(...this.columnHeights),o=this.columnHeights.indexOf(a);this.columnHeights[o]+=300*s.ratio,this.columns[o].push(s)}getColumns(){return this.columns}changeColumnCount(s){s!==this.columnCount&&(this.columnCount=s,this.reset())}}const Dj=e=>D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},D.createElement("path",{d:"M20 5.5l-8 8-8-8m-3.5 13h23",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,fill:"none"})),Rj=e=>D.createElement("svg",{viewBox:"0 0 32 32",...e},D.createElement("path",{d:"M17.4 29c-.8.8-2 .8-2.8 0L2.3 16.2C-.8 13.1-.8 8 2.3 4.8c3.1-3.1 8.2-3.1 11.3 0L16 7.6l2.3-2.8c3.1-3.1 8.2-3.1 11.3 0 3.1 3.1 3.1 8.2 0 11.4L17.4 29z"})),Oj={heart:Rj,download:Dj},gu=({icon:e,label:s,...a})=>{let o=null;return e&&(o=Oj[e]),Fe.jsxs("a",{className:"text-grey-700 flex h-8 shrink-0 cursor-pointer items-center rounded-md bg-white px-3 py-2 font-sans text-sm font-medium leading-6 opacity-90 transition-all ease-in-out hover:opacity-100",onClick:c=>c.stopPropagation(),...a,children:[e&&o&&Fe.jsx(o,{className:`size-4 ${e==="heart"?"fill-red":""} stroke-[3px] ${s&&"mr-1"}`}),s&&Fe.jsx("span",{children:s})]})},mx=({payload:e,srcUrl:s,links:a,likes:o,user:c,alt:h,urls:y,height:m,width:l,zoomed:f,insertImage:u,selectImg:d})=>{const g=b=>{b.stopPropagation(),d(f?null:e)};return Fe.jsxs("div",{className:`relative mb-6 block ${f?"h-full w-[max-content] cursor-zoom-out":"w-full cursor-zoom-in"}`,style:{backgroundColor:e.color||"transparent"},"data-kg-unsplash-gallery-item":!0,onClick:g,children:[Fe.jsx("img",{alt:h,className:`${f?"h-full w-auto object-contain":"block h-auto"}`,height:m,loading:"lazy",src:s,width:l,"data-kg-unsplash-gallery-img":!0}),Fe.jsxs("div",{className:"absolute inset-0 flex flex-col justify-between bg-gradient-to-b from-black/5 via-black/5 to-black/30 p-5 opacity-0 transition-all ease-in-out hover:opacity-100",children:[Fe.jsxs("div",{className:"flex items-center justify-end gap-3",children:[Fe.jsx(gu,{"data-kg-button":"unsplash-like",href:`${a.html}/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit`,icon:"heart",label:o.toString(),rel:"noopener noreferrer",target:"_blank"}),Fe.jsx(gu,{"data-kg-button":"unsplash-download",href:`${a.download}/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit&force=true`,icon:"download"})]}),Fe.jsxs("div",{className:"flex items-center justify-between",children:[Fe.jsxs("div",{className:"flex items-center",children:[Fe.jsx("img",{alt:"author",className:"mr-2 size-8 rounded-full",src:c.profile_image.medium}),Fe.jsx("div",{className:"mr-2 truncate font-sans text-sm font-medium text-white",children:c.name})]}),Fe.jsx(gu,{label:"Insert image","data-kg-unsplash-insert-button":!0,onClick:b=>{b.stopPropagation(),u({src:y.regular.replace(/&w=1080/,"&w=2000"),caption:`<span>Photo by <a href="${c.links.html}">${c.name}</a> / <a href="https://unsplash.com/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit">Unsplash</a></span>`,height:m,width:l,alt:h,links:a})}})]})]})]})},$j=({payload:e,insertImage:s,selectImg:a,zoomed:o})=>Fe.jsx("div",{className:"flex h-full grow basis-0 justify-center","data-kg-unsplash-zoomed":!0,onClick:()=>a(null),children:Fe.jsx(mx,{alt:e.alt_description,height:e.height,insertImage:s,likes:e.likes,links:e.links,payload:e,selectImg:a,srcUrl:e.urls.regular,urls:e.urls,user:e.user,width:e.width,zoomed:o})}),Lj=()=>Fe.jsx("div",{className:"absolute inset-y-0 left-0 flex w-full items-center justify-center overflow-hidden pb-[8vh]","data-kg-loader":!0,children:Fe.jsx("div",{className:"animate-spin before:bg-grey-800 relative inline-block size-[50px] rounded-full border border-black/10 before:z-10 before:mt-[7px] before:block before:size-[7px] before:rounded-full"})}),Pj=e=>Fe.jsx("div",{className:"mr-6 flex grow basis-0 flex-col justify-start last-of-type:mr-0",children:e.children}),Fj=e=>e!=null&&e.columns?e?.columns.map((s,a)=>Fe.jsx(Pj,{children:s.map(o=>Fe.jsx(mx,{alt:o.alt_description,height:o.height,insertImage:e?.insertImage,likes:o.likes,links:o.links,payload:o,selectImg:e?.selectImg,srcUrl:o.urls.regular,urls:o.urls,user:o.user,width:o.width,zoomed:e?.zoomed||null},o.id))},a)):null,xu=e=>Fe.jsx("div",{className:"relative h-full overflow-hidden","data-kg-unsplash-gallery":!0,children:Fe.jsxs("div",{ref:e.galleryRef,className:`flex size-full justify-center overflow-auto px-20 ${e!=null&&e.zoomed?"pb-10":""}`,"data-kg-unsplash-gallery-scrollref":!0,children:[e.children,e?.isLoading&&Fe.jsx(Lj,{})]})}),Uj=({zoomed:e,error:s,galleryRef:a,isLoading:o,dataset:c,selectImg:h,insertImage:y})=>e?Fe.jsx(xu,{galleryRef:a,zoomed:e,children:Fe.jsx($j,{alt:e.alt_description,height:e.height,insertImage:y,likes:e.likes,links:e.links,payload:e,selectImg:h,srcUrl:e.urls.regular,urls:e.urls,user:e.user,width:e.width,zoomed:e})}):s?Fe.jsx(xu,{galleryRef:a,zoomed:e,children:Fe.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[Fe.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Error"}),Fe.jsx("p",{className:"text-lg font-medium",children:s})]})}):Fe.jsx(xu,{galleryRef:a,isLoading:o,zoomed:e,children:Fe.jsx(Fj,{columns:c,insertImage:y,selectImg:h,zoomed:e})}),zj=e=>D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",strokeWidth:1.5,viewBox:"0 0 24 24",...e},D.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M.75 23.249l22.5-22.5M23.25 23.249L.75.749"})),Hj=e=>D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",strokeWidth:1.5,viewBox:"0 0 24 24",...e},D.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M1.472 13.357a9.063 9.063 0 1 0 16.682-7.09 9.063 9.063 0 1 0-16.682 7.09Zm14.749 2.863 7.029 7.03"})),Bj=e=>D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 122.43 122.41",...e},D.createElement("path",{d:"M83.86 54.15v34.13H38.57V54.15H0v68.26h122.43V54.15H83.86zM38.57 0h45.3v34.13h-45.3z"})),Wj=({closeModal:e,handleSearch:s,children:a})=>Fe.jsxs(Fe.Fragment,{children:[Fe.jsx("div",{className:"fixed inset-0 z-40 h-[100vh] bg-black opacity-60"}),Fe.jsxs("div",{className:"not-kg-prose fixed inset-8 z-50 overflow-hidden rounded bg-white shadow-xl","data-kg-modal":"unsplash",children:[Fe.jsx("button",{className:"absolute right-6 top-6 cursor-pointer",type:"button",children:Fe.jsx(zj,{className:"text-grey-400 size-4 stroke-2","data-kg-modal-close-button":!0,onClick:()=>e()})}),Fe.jsxs("div",{className:"flex h-full flex-col",children:[Fe.jsxs("header",{className:"flex shrink-0 items-center justify-between px-20 py-10",children:[Fe.jsxs("h1",{className:"flex items-center gap-2 font-sans text-3xl font-bold text-black",children:[Fe.jsx(Bj,{className:"mb-1"}),"Unsplash"]}),Fe.jsxs("div",{className:"relative w-full max-w-sm",children:[Fe.jsx(Hj,{className:"text-grey-700 absolute left-4 top-1/2 size-4 -translate-y-2"}),Fe.jsx("input",{className:"border-grey-300 focus:border-grey-400 h-10 w-full rounded-full border border-solid pl-10 pr-8 font-sans text-md font-normal text-black focus-visible:outline-none",placeholder:"Search free high-resolution photos",autoFocus:!0,"data-kg-unsplash-search":!0,onChange:s})]})]}),a]})]})]}),qj=[{id:"TA5hw14Coh4",slug:"a-person-standing-on-a-sand-dune-in-the-desert-TA5hw14Coh4",alternative_slugs:{en:"a-person-standing-on-a-sand-dune-in-the-desert-TA5hw14Coh4"},created_at:"2024-02-07T22:39:36Z",updated_at:"2024-03-07T23:46:14Z",promoted_at:null,width:8640,height:5760,color:"#8c5940",blur_hash:"LKD]brE2IUr?Lgwci_NaDjR*ofoe",description:"NEOM will be home to one of the world’s largest nature reserves: a 25,000 sq km stretch of wilderness, encompassing two deserts divided by a mountain range. | NEOM, Saudi Arabia",alt_description:"a person standing on a sand dune in the desert",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1707345512638-997d31a10eaa?ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1707345512638-997d31a10eaa?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1707345512638-997d31a10eaa?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1707345512638-997d31a10eaa?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1707345512638-997d31a10eaa?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1707345512638-997d31a10eaa"},links:{self:"https://api.unsplash.com/photos/a-person-standing-on-a-sand-dune-in-the-desert-TA5hw14Coh4",html:"https://unsplash.com/photos/a-person-standing-on-a-sand-dune-in-the-desert-TA5hw14Coh4",download:"https://unsplash.com/photos/TA5hw14Coh4/download?ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA",download_location:"https://api.unsplash.com/photos/TA5hw14Coh4/download?ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA"},likes:226,liked_by_user:!1,current_user_collections:[],sponsorship:{impression_urls:[],tagline:"Made to Change",tagline_url:"https://www.neom.com/en-us?utm_source=unsplash&utm_medium=referral",sponsor:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},topic_submissions:{},user:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},{id:"UArA9A02Kvk",slug:"a-black-and-white-photo-of-a-man-with-his-head-in-his-hands-UArA9A02Kvk",alternative_slugs:{en:"a-black-and-white-photo-of-a-man-with-his-head-in-his-hands-UArA9A02Kvk"},created_at:"2024-03-05T15:48:31Z",updated_at:"2024-03-11T06:59:25Z",promoted_at:"2024-03-11T06:59:25Z",width:2160,height:2700,color:"#262626",blur_hash:"L78;S$~p00oLD%D%IVay9F9ZIUay",description:null,alt_description:"a black and white photo of a man with his head in his hands",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709653688483-fc2b356c1f36?ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709653688483-fc2b356c1f36?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709653688483-fc2b356c1f36?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709653688483-fc2b356c1f36?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709653688483-fc2b356c1f36?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709653688483-fc2b356c1f36"},links:{self:"https://api.unsplash.com/photos/a-black-and-white-photo-of-a-man-with-his-head-in-his-hands-UArA9A02Kvk",html:"https://unsplash.com/photos/a-black-and-white-photo-of-a-man-with-his-head-in-his-hands-UArA9A02Kvk",download:"https://unsplash.com/photos/UArA9A02Kvk/download?ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA",download_location:"https://api.unsplash.com/photos/UArA9A02Kvk/download?ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA"},likes:20,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"gwWL9kMcm2g",updated_at:"2024-03-11T10:14:07Z",username:"nickandreka",name:"Nick Andréka",first_name:"Nick",last_name:"Andréka",twitter_username:null,portfolio_url:null,bio:null,location:null,links:{self:"https://api.unsplash.com/users/nickandreka",html:"https://unsplash.com/@nickandreka",photos:"https://api.unsplash.com/users/nickandreka/photos",likes:"https://api.unsplash.com/users/nickandreka/likes",portfolio:"https://api.unsplash.com/users/nickandreka/portfolio",following:"https://api.unsplash.com/users/nickandreka/following",followers:"https://api.unsplash.com/users/nickandreka/followers"},profile_image:{small:"https://images.unsplash.com/profile-1698854198608-989031a5ccdeimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1698854198608-989031a5ccdeimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1698854198608-989031a5ccdeimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"andreka.art",total_collections:0,total_likes:8,total_photos:35,total_promoted_photos:19,accepted_tos:!0,for_hire:!0,social:{instagram_username:"andreka.art",portfolio_url:null,twitter_username:null,paypal_email:null}}},{id:"QX_7m4Lh2qg",slug:"a-black-and-white-photo-of-a-lighthouse-QX_7m4Lh2qg",alternative_slugs:{en:"a-black-and-white-photo-of-a-lighthouse-QX_7m4Lh2qg"},created_at:"2024-03-10T16:46:33Z",updated_at:"2024-03-11T06:59:11Z",promoted_at:"2024-03-11T06:59:11Z",width:4e3,height:5751,color:"#f3f3f3",blur_hash:"LAQJiu~X-;9G-:?cIURj~qD%00xt",description:null,alt_description:"a black and white photo of a lighthouse",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1710088912041-34d1767d376a?ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1710088912041-34d1767d376a?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1710088912041-34d1767d376a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1710088912041-34d1767d376a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1710088912041-34d1767d376a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710088912041-34d1767d376a"},links:{self:"https://api.unsplash.com/photos/a-black-and-white-photo-of-a-lighthouse-QX_7m4Lh2qg",html:"https://unsplash.com/photos/a-black-and-white-photo-of-a-lighthouse-QX_7m4Lh2qg",download:"https://unsplash.com/photos/QX_7m4Lh2qg/download?ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA",download_location:"https://api.unsplash.com/photos/QX_7m4Lh2qg/download?ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA"},likes:21,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"ue6QWAAHoIQ",updated_at:"2024-03-11T08:53:54Z",username:"huzhewseh",name:"Volodymyr M",first_name:"Volodymyr",last_name:"M",twitter_username:"huzhewseh",portfolio_url:null,bio:null,location:null,links:{self:"https://api.unsplash.com/users/huzhewseh",html:"https://unsplash.com/@huzhewseh",photos:"https://api.unsplash.com/users/huzhewseh/photos",likes:"https://api.unsplash.com/users/huzhewseh/likes",portfolio:"https://api.unsplash.com/users/huzhewseh/portfolio",following:"https://api.unsplash.com/users/huzhewseh/following",followers:"https://api.unsplash.com/users/huzhewseh/followers"},profile_image:{small:"https://images.unsplash.com/profile-1663221970918-58b1620c49c9image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1663221970918-58b1620c49c9image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1663221970918-58b1620c49c9image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"huzhewseh",total_collections:0,total_likes:0,total_photos:18,total_promoted_photos:3,accepted_tos:!0,for_hire:!0,social:{instagram_username:"huzhewseh",portfolio_url:null,twitter_username:"huzhewseh",paypal_email:null}}},{id:"fMNP7XVcct0",slug:"a-woman-standing-in-a-dark-room-with-her-eyes-closed-fMNP7XVcct0",alternative_slugs:{en:"a-woman-standing-in-a-dark-room-with-her-eyes-closed-fMNP7XVcct0"},created_at:"2024-03-09T08:40:07Z",updated_at:"2024-03-11T06:58:58Z",promoted_at:"2024-03-11T06:58:58Z",width:3264,height:4928,color:"#262626",blur_hash:"L35hY|xu00D%-;xuIUD%00j[?bWB",description:null,alt_description:"a woman standing in a dark room with her eyes closed",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709973540503-77d699279634?ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709973540503-77d699279634?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709973540503-77d699279634?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709973540503-77d699279634?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709973540503-77d699279634?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709973540503-77d699279634"},links:{self:"https://api.unsplash.com/photos/a-woman-standing-in-a-dark-room-with-her-eyes-closed-fMNP7XVcct0",html:"https://unsplash.com/photos/a-woman-standing-in-a-dark-room-with-her-eyes-closed-fMNP7XVcct0",download:"https://unsplash.com/photos/fMNP7XVcct0/download?ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA",download_location:"https://api.unsplash.com/photos/fMNP7XVcct0/download?ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA"},likes:7,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"lSlibqdw_c8",updated_at:"2024-03-11T08:54:13Z",username:"vitaliyshev89",name:"Vitaliy Shevchenko",first_name:"Vitaliy",last_name:"Shevchenko",twitter_username:null,portfolio_url:null,bio:null,location:"Kharkiv, Ukraine",links:{self:"https://api.unsplash.com/users/vitaliyshev89",html:"https://unsplash.com/@vitaliyshev89",photos:"https://api.unsplash.com/users/vitaliyshev89/photos",likes:"https://api.unsplash.com/users/vitaliyshev89/likes",portfolio:"https://api.unsplash.com/users/vitaliyshev89/portfolio",following:"https://api.unsplash.com/users/vitaliyshev89/following",followers:"https://api.unsplash.com/users/vitaliyshev89/followers"},profile_image:{small:"https://images.unsplash.com/profile-1652271342920-31eebbc2c3d0image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1652271342920-31eebbc2c3d0image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1652271342920-31eebbc2c3d0image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:null,total_collections:0,total_likes:1,total_photos:205,total_promoted_photos:29,accepted_tos:!0,for_hire:!1,social:{instagram_username:null,portfolio_url:null,twitter_username:null,paypal_email:null}}},{id:"b4kKyX0BQvc",slug:"a-train-station-with-a-train-on-the-tracks-b4kKyX0BQvc",alternative_slugs:{en:"a-train-station-with-a-train-on-the-tracks-b4kKyX0BQvc"},created_at:"2024-03-08T21:58:28Z",updated_at:"2024-03-11T06:57:35Z",promoted_at:"2024-03-11T06:57:27Z",width:6e3,height:4e3,color:"#0c2626",blur_hash:"LSDJS6kD9Zxu~qkDM|xaS%j]xaV@",description:'Stunning metro train station "Elbbrücken" in Hamburg, Germany during sunset',alt_description:"a train station with a train on the tracks",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709934645859-f1ed8d3a4954?ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709934645859-f1ed8d3a4954?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709934645859-f1ed8d3a4954?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709934645859-f1ed8d3a4954?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709934645859-f1ed8d3a4954?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709934645859-f1ed8d3a4954"},links:{self:"https://api.unsplash.com/photos/a-train-station-with-a-train-on-the-tracks-b4kKyX0BQvc",html:"https://unsplash.com/photos/a-train-station-with-a-train-on-the-tracks-b4kKyX0BQvc",download:"https://unsplash.com/photos/b4kKyX0BQvc/download?ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA",download_location:"https://api.unsplash.com/photos/b4kKyX0BQvc/download?ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA"},likes:8,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{"street-photography":{status:"approved",approved_on:"2024-03-11T06:57:35Z"}},user:{id:"TffftDPlBPk",updated_at:"2024-03-11T06:59:04Z",username:"christianlue",name:"Christian Lue",first_name:"Christian",last_name:"Lue",twitter_username:"chrrischii",portfolio_url:null,bio:null,location:"Frankfurt / Berlin",links:{self:"https://api.unsplash.com/users/christianlue",html:"https://unsplash.com/@christianlue",photos:"https://api.unsplash.com/users/christianlue/photos",likes:"https://api.unsplash.com/users/christianlue/likes",portfolio:"https://api.unsplash.com/users/christianlue/portfolio",following:"https://api.unsplash.com/users/christianlue/following",followers:"https://api.unsplash.com/users/christianlue/followers"},profile_image:{small:"https://images.unsplash.com/profile-1581889127238-ea4aa40e8cb4image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1581889127238-ea4aa40e8cb4image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1581889127238-ea4aa40e8cb4image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:null,total_collections:7,total_likes:15,total_photos:571,total_promoted_photos:103,accepted_tos:!0,for_hire:!0,social:{instagram_username:null,portfolio_url:null,twitter_username:"chrrischii",paypal_email:null}}},{id:"9633dHhioC8",slug:"a-person-walking-through-a-canyon-in-the-desert-9633dHhioC8",alternative_slugs:{en:"a-person-walking-through-a-canyon-in-the-desert-9633dHhioC8"},created_at:"2023-04-28T15:30:26Z",updated_at:"2024-03-10T10:46:58Z",promoted_at:"2023-05-13T12:02:35Z",width:8316,height:5544,color:"#734026",blur_hash:"LVHdd89G57-o.9IBsSR-~pD*M{xt",description:"Amongst expansive red sands and spectacular sandstone rock formations, Hisma Desert – NEOM, Saudi Arabia | The NEOM Nature Reserve region is being designed to deliver protection and restoration of biodiversity across 95% of NEOM.",alt_description:"a person walking through a canyon in the desert",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1682695795255-b236b1f1267d?ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1682695795255-b236b1f1267d?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1682695795255-b236b1f1267d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1682695795255-b236b1f1267d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1682695795255-b236b1f1267d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1682695795255-b236b1f1267d"},links:{self:"https://api.unsplash.com/photos/a-person-walking-through-a-canyon-in-the-desert-9633dHhioC8",html:"https://unsplash.com/photos/a-person-walking-through-a-canyon-in-the-desert-9633dHhioC8",download:"https://unsplash.com/photos/9633dHhioC8/download?ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA",download_location:"https://api.unsplash.com/photos/9633dHhioC8/download?ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA"},likes:631,liked_by_user:!1,current_user_collections:[],sponsorship:{impression_urls:["https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false&bannerID=11515595&rnd=[timestamp]&redir=https://secure.insightexpressai.com/adserver/1pixel.gif","https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false&bannerID=11515798&rnd=[timestamp]&redir=https://secure.insightexpressai.com/adserver/1pixel.gif"],tagline:"Made to Change",tagline_url:"https://www.neom.com/en-us?utm_source=unsplash&utm_medium=referral",sponsor:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},topic_submissions:{},user:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},{id:"4PmYYBFhwFM",slug:"a-close-up-of-a-car-door-with-the-word-budder-on-it-4PmYYBFhwFM",alternative_slugs:{en:"a-close-up-of-a-car-door-with-the-word-budder-on-it-4PmYYBFhwFM"},created_at:"2024-03-09T18:40:37Z",updated_at:"2024-03-11T06:57:23Z",promoted_at:"2024-03-11T06:57:23Z",width:5248,height:7872,color:"#a6a6a6",blur_hash:"LHDA40%MbGxu%L?bt7of_N%gIBRj",description:null,alt_description:"a close up of a car door with the word budder on it",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1710009439657-c0dfdc051a28?ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1710009439657-c0dfdc051a28?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1710009439657-c0dfdc051a28?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1710009439657-c0dfdc051a28?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1710009439657-c0dfdc051a28?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710009439657-c0dfdc051a28"},links:{self:"https://api.unsplash.com/photos/a-close-up-of-a-car-door-with-the-word-budder-on-it-4PmYYBFhwFM",html:"https://unsplash.com/photos/a-close-up-of-a-car-door-with-the-word-budder-on-it-4PmYYBFhwFM",download:"https://unsplash.com/photos/4PmYYBFhwFM/download?ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA",download_location:"https://api.unsplash.com/photos/4PmYYBFhwFM/download?ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA"},likes:5,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"Xz7_QPPM2So",updated_at:"2024-03-11T08:27:09Z",username:"tiago_f_ferreira",name:"Tiago Ferreira",first_name:"Tiago",last_name:"Ferreira",twitter_username:null,portfolio_url:"https://tiagoferreira765.wixsite.com/photographyandmusic",bio:`Photography - a hobby, a passion.\r
|
|
12
|
-
Planet earth 🌎, a creative space to enjoy.`,location:"Lisboa, Portugal",links:{self:"https://api.unsplash.com/users/tiago_f_ferreira",html:"https://unsplash.com/@tiago_f_ferreira",photos:"https://api.unsplash.com/users/tiago_f_ferreira/photos",likes:"https://api.unsplash.com/users/tiago_f_ferreira/likes",portfolio:"https://api.unsplash.com/users/tiago_f_ferreira/portfolio",following:"https://api.unsplash.com/users/tiago_f_ferreira/following",followers:"https://api.unsplash.com/users/tiago_f_ferreira/followers"},profile_image:{small:"https://images.unsplash.com/profile-1595844391672-cdf854039843image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1595844391672-cdf854039843image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1595844391672-cdf854039843image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"tiago_f_ferreira",total_collections:1,total_likes:144,total_photos:205,total_promoted_photos:8,accepted_tos:!0,for_hire:!1,social:{instagram_username:"tiago_f_ferreira",portfolio_url:"https://tiagoferreira765.wixsite.com/photographyandmusic",twitter_username:null,paypal_email:null}}},{id:"BUhVFtY-890",slug:"a-close-up-of-a-bird-with-a-red-head-BUhVFtY-890",alternative_slugs:{en:"a-close-up-of-a-bird-with-a-red-head-BUhVFtY-890"},created_at:"2024-03-09T10:03:28Z",updated_at:"2024-03-11T06:57:20Z",promoted_at:"2024-03-11T06:57:20Z",width:3511,height:2231,color:"#262626",blur_hash:"L24epEWB0eMx$*t8OEV@RPj]baay",description:null,alt_description:"a close up of a bird with a red head",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709978601970-036e92662b46?ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709978601970-036e92662b46?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709978601970-036e92662b46?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709978601970-036e92662b46?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709978601970-036e92662b46?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709978601970-036e92662b46"},links:{self:"https://api.unsplash.com/photos/a-close-up-of-a-bird-with-a-red-head-BUhVFtY-890",html:"https://unsplash.com/photos/a-close-up-of-a-bird-with-a-red-head-BUhVFtY-890",download:"https://unsplash.com/photos/BUhVFtY-890/download?ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA",download_location:"https://api.unsplash.com/photos/BUhVFtY-890/download?ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA"},likes:8,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{"textures-patterns":{status:"rejected"},spring:{status:"rejected"},"earth-hour":{status:"approved",approved_on:"2024-03-10T12:31:10Z"},health:{status:"unevaluated"},animals:{status:"unevaluated"},film:{status:"unevaluated"},travel:{status:"unevaluated"},nature:{status:"unevaluated"},wallpapers:{status:"unevaluated"}},user:{id:"3SCC0WcF-wA",updated_at:"2024-03-11T09:44:02Z",username:"refargotohp",name:"refargotohp",first_name:"refargotohp",last_name:null,twitter_username:null,portfolio_url:null,bio:"Hello 👋🏼 My name is Pavel, and I am a photographer. I enjoy the photo in any of its manifestations. Sequential shooting, street, studio, portraiture - it's all me. Waiting for you on my social networks - @refargotohp",location:null,links:{self:"https://api.unsplash.com/users/refargotohp",html:"https://unsplash.com/@refargotohp",photos:"https://api.unsplash.com/users/refargotohp/photos",likes:"https://api.unsplash.com/users/refargotohp/likes",portfolio:"https://api.unsplash.com/users/refargotohp/portfolio",following:"https://api.unsplash.com/users/refargotohp/following",followers:"https://api.unsplash.com/users/refargotohp/followers"},profile_image:{small:"https://images.unsplash.com/profile-1653036388874-dab6bdb375bcimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1653036388874-dab6bdb375bcimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1653036388874-dab6bdb375bcimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"refargotohp",total_collections:1,total_likes:86,total_photos:132,total_promoted_photos:61,accepted_tos:!0,for_hire:!0,social:{instagram_username:"refargotohp",portfolio_url:null,twitter_username:null,paypal_email:null}}},{id:"99clkpyauJI",slug:"there-are-bottles-of-beer-on-a-shelf-in-front-of-a-window-99clkpyauJI",alternative_slugs:{en:"there-are-bottles-of-beer-on-a-shelf-in-front-of-a-window-99clkpyauJI"},created_at:"2024-03-10T00:15:28Z",updated_at:"2024-03-11T06:56:32Z",promoted_at:"2024-03-11T06:56:32Z",width:4299,height:3448,color:"#f3f3f3",blur_hash:"LjJuGn?bM{xu~qoKRPM{9FM{t6M_",description:null,alt_description:"there are bottles of beer on a shelf in front of a window",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1710029721414-9e2125e155c3?ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1710029721414-9e2125e155c3?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1710029721414-9e2125e155c3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1710029721414-9e2125e155c3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1710029721414-9e2125e155c3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710029721414-9e2125e155c3"},links:{self:"https://api.unsplash.com/photos/there-are-bottles-of-beer-on-a-shelf-in-front-of-a-window-99clkpyauJI",html:"https://unsplash.com/photos/there-are-bottles-of-beer-on-a-shelf-in-front-of-a-window-99clkpyauJI",download:"https://unsplash.com/photos/99clkpyauJI/download?ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA",download_location:"https://api.unsplash.com/photos/99clkpyauJI/download?ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA"},likes:2,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{film:{status:"approved",approved_on:"2024-03-10T16:39:06Z"}},user:{id:"TPCcwPbQzmY",updated_at:"2024-03-11T06:59:01Z",username:"suzm4film",name:"szm 4",first_name:"szm",last_name:"4",twitter_username:null,portfolio_url:null,bio:null,location:"Japan",links:{self:"https://api.unsplash.com/users/suzm4film",html:"https://unsplash.com/@suzm4film",photos:"https://api.unsplash.com/users/suzm4film/photos",likes:"https://api.unsplash.com/users/suzm4film/likes",portfolio:"https://api.unsplash.com/users/suzm4film/portfolio",following:"https://api.unsplash.com/users/suzm4film/following",followers:"https://api.unsplash.com/users/suzm4film/followers"},profile_image:{small:"https://images.unsplash.com/profile-1632890829763-5c518f873dee?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1632890829763-5c518f873dee?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1632890829763-5c518f873dee?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:null,total_collections:0,total_likes:0,total_photos:189,total_promoted_photos:19,accepted_tos:!0,for_hire:!1,social:{instagram_username:null,portfolio_url:null,twitter_username:null,paypal_email:null}}},{id:"Lbt-cZyOUM4",slug:"an-old-fashioned-typewriter-sitting-on-a-table-in-front-of-a-window-Lbt-cZyOUM4",alternative_slugs:{en:"an-old-fashioned-typewriter-sitting-on-a-table-in-front-of-a-window-Lbt-cZyOUM4"},created_at:"2024-03-09T16:58:57Z",updated_at:"2024-03-11T06:57:06Z",promoted_at:"2024-03-11T06:55:38Z",width:5783,height:3848,color:"#0c2626",blur_hash:"LkG[.y01Ri-:?bM{RjofM{xuRkWB",description:null,alt_description:"an old fashioned typewriter sitting on a table in front of a window",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1710003364549-de37d4ed3413?ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1710003364549-de37d4ed3413?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1710003364549-de37d4ed3413?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1710003364549-de37d4ed3413?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1710003364549-de37d4ed3413?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710003364549-de37d4ed3413"},links:{self:"https://api.unsplash.com/photos/an-old-fashioned-typewriter-sitting-on-a-table-in-front-of-a-window-Lbt-cZyOUM4",html:"https://unsplash.com/photos/an-old-fashioned-typewriter-sitting-on-a-table-in-front-of-a-window-Lbt-cZyOUM4",download:"https://unsplash.com/photos/Lbt-cZyOUM4/download?ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/Lbt-cZyOUM4/download?ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:3,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"8D4VFtkiIuw",updated_at:"2024-03-11T07:28:57Z",username:"tama66",name:"Peter Herrmann",first_name:"Peter",last_name:"Herrmann",twitter_username:null,portfolio_url:null,bio:"Everything... but not boring! Instagram@Tiefstapler66",location:"Leverkusen/Germany",links:{self:"https://api.unsplash.com/users/tama66",html:"https://unsplash.com/@tama66",photos:"https://api.unsplash.com/users/tama66/photos",likes:"https://api.unsplash.com/users/tama66/likes",portfolio:"https://api.unsplash.com/users/tama66/portfolio",following:"https://api.unsplash.com/users/tama66/following",followers:"https://api.unsplash.com/users/tama66/followers"},profile_image:{small:"https://images.unsplash.com/profile-1611475141936-383e23c6cc6dimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1611475141936-383e23c6cc6dimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1611475141936-383e23c6cc6dimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"tiefstapler66",total_collections:1,total_likes:149,total_photos:363,total_promoted_photos:152,accepted_tos:!0,for_hire:!0,social:{instagram_username:"tiefstapler66",portfolio_url:null,twitter_username:null,paypal_email:null}}},{id:"D1jr0Mevs-c",slug:"an-aerial-view-of-a-body-of-water-D1jr0Mevs-c",alternative_slugs:{en:"an-aerial-view-of-a-body-of-water-D1jr0Mevs-c"},created_at:"2024-02-07T22:34:15Z",updated_at:"2024-03-10T10:54:36Z",promoted_at:null,width:5280,height:2970,color:"#0c2626",blur_hash:"LH9[JL0i+HM{^}Ezw#R.b@n$nhbb",description:"The Islands of NEOM are home to kaleidoscopic-coloured coral reefs and an abundance of diverse marine life | Islands of NEOM – NEOM, Saudi Arabia",alt_description:"an aerial view of a body of water",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1707343843982-f8275f3994c5?ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1707343843982-f8275f3994c5?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1707343843982-f8275f3994c5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1707343843982-f8275f3994c5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1707343843982-f8275f3994c5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1707343843982-f8275f3994c5"},links:{self:"https://api.unsplash.com/photos/an-aerial-view-of-a-body-of-water-D1jr0Mevs-c",html:"https://unsplash.com/photos/an-aerial-view-of-a-body-of-water-D1jr0Mevs-c",download:"https://unsplash.com/photos/D1jr0Mevs-c/download?ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/D1jr0Mevs-c/download?ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:308,liked_by_user:!1,current_user_collections:[],sponsorship:{impression_urls:[],tagline:"Made to Change",tagline_url:"https://www.neom.com/en-us?utm_source=unsplash&utm_medium=referral",sponsor:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},topic_submissions:{},user:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},{id:"0RBEUjWQBBA",slug:"a-woman-standing-under-a-cherry-blossom-tree-0RBEUjWQBBA",alternative_slugs:{en:"a-woman-standing-under-a-cherry-blossom-tree-0RBEUjWQBBA"},created_at:"2024-03-10T10:15:48Z",updated_at:"2024-03-11T06:55:22Z",promoted_at:"2024-03-11T06:55:22Z",width:4672,height:7008,color:"#262626",blur_hash:"LOG8o{t7WBWB~DofR*j@D%NGR%WB",description:null,alt_description:"a woman standing under a cherry blossom tree",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1710065574765-a685385c6d9a?ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1710065574765-a685385c6d9a?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1710065574765-a685385c6d9a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1710065574765-a685385c6d9a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1710065574765-a685385c6d9a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710065574765-a685385c6d9a"},links:{self:"https://api.unsplash.com/photos/a-woman-standing-under-a-cherry-blossom-tree-0RBEUjWQBBA",html:"https://unsplash.com/photos/a-woman-standing-under-a-cherry-blossom-tree-0RBEUjWQBBA",download:"https://unsplash.com/photos/0RBEUjWQBBA/download?ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/0RBEUjWQBBA/download?ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:11,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"ePlndXHeIiM",updated_at:"2024-03-11T09:04:03Z",username:"lwdzl",name:"Jack Dong",first_name:"Jack",last_name:"Dong",twitter_username:null,portfolio_url:"https://www.xiaohongshu.com/user/profile/5f11b998000000000101d8d2?xhsshare=CopyLink&appuid=5f11b998000000000101d8d2&apptime=1696562673",bio:null,location:null,links:{self:"https://api.unsplash.com/users/lwdzl",html:"https://unsplash.com/@lwdzl",photos:"https://api.unsplash.com/users/lwdzl/photos",likes:"https://api.unsplash.com/users/lwdzl/likes",portfolio:"https://api.unsplash.com/users/lwdzl/portfolio",following:"https://api.unsplash.com/users/lwdzl/following",followers:"https://api.unsplash.com/users/lwdzl/followers"},profile_image:{small:"https://images.unsplash.com/profile-1696563144074-80a8da44bcd4?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1696563144074-80a8da44bcd4?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1696563144074-80a8da44bcd4?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:null,total_collections:0,total_likes:101,total_photos:640,total_promoted_photos:112,accepted_tos:!0,for_hire:!0,social:{instagram_username:null,portfolio_url:"https://www.xiaohongshu.com/user/profile/5f11b998000000000101d8d2?xhsshare=CopyLink&appuid=5f11b998000000000101d8d2&apptime=1696562673",twitter_username:null,paypal_email:null}}},{id:"2IGDvJa2Bd0",slug:"a-path-in-the-middle-of-a-foggy-forest-2IGDvJa2Bd0",alternative_slugs:{en:"a-path-in-the-middle-of-a-foggy-forest-2IGDvJa2Bd0"},created_at:"2024-02-21T14:32:53Z",updated_at:"2024-03-11T06:54:06Z",promoted_at:"2024-03-11T06:54:06Z",width:4672,height:5840,color:"#f3f3f3",blur_hash:"L#Gv00ofD%ay~qoeM_ay%NafWVj[",description:null,alt_description:"a path in the middle of a foggy forest",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1708525736169-534ee3e24e99?ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1708525736169-534ee3e24e99?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1708525736169-534ee3e24e99?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1708525736169-534ee3e24e99?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1708525736169-534ee3e24e99?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1708525736169-534ee3e24e99"},links:{self:"https://api.unsplash.com/photos/a-path-in-the-middle-of-a-foggy-forest-2IGDvJa2Bd0",html:"https://unsplash.com/photos/a-path-in-the-middle-of-a-foggy-forest-2IGDvJa2Bd0",download:"https://unsplash.com/photos/2IGDvJa2Bd0/download?ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/2IGDvJa2Bd0/download?ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:11,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"zL5HAN1fnJw",updated_at:"2024-03-11T06:58:57Z",username:"viklukphotography",name:"Viktor Mischke",first_name:"Viktor",last_name:"Mischke",twitter_username:null,portfolio_url:"https://www.istockphoto.com/de/portfolio/snoviktor",bio:null,location:"Schloss Holte-Stukenbrock",links:{self:"https://api.unsplash.com/users/viklukphotography",html:"https://unsplash.com/@viklukphotography",photos:"https://api.unsplash.com/users/viklukphotography/photos",likes:"https://api.unsplash.com/users/viklukphotography/likes",portfolio:"https://api.unsplash.com/users/viklukphotography/portfolio",following:"https://api.unsplash.com/users/viklukphotography/following",followers:"https://api.unsplash.com/users/viklukphotography/followers"},profile_image:{small:"https://images.unsplash.com/profile-1646051425690-ed09fae6858fimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1646051425690-ed09fae6858fimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1646051425690-ed09fae6858fimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"viktormischke",total_collections:0,total_likes:141,total_photos:38,total_promoted_photos:8,accepted_tos:!0,for_hire:!1,social:{instagram_username:"viktormischke",portfolio_url:"https://www.istockphoto.com/de/portfolio/snoviktor",twitter_username:null,paypal_email:null}}},{id:"PZfeP0uwBpQ",slug:"a-person-with-a-hat-on-their-head-in-a-field-PZfeP0uwBpQ",alternative_slugs:{en:"a-person-with-a-hat-on-their-head-in-a-field-PZfeP0uwBpQ"},created_at:"2024-02-24T10:57:49Z",updated_at:"2024-03-11T06:53:56Z",promoted_at:"2024-03-11T06:53:56Z",width:2720,height:4080,color:"#404026",blur_hash:"LIB:Tx%K56NGORbYxas:0KRj-poe",description:"A woman wearing a traditional coolie hat kneels in a field of green vegetables, carefully harvesting the crops.",alt_description:"a person with a hat on their head in a field",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1708771641703-0df3d179cec3?ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1708771641703-0df3d179cec3?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1708771641703-0df3d179cec3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1708771641703-0df3d179cec3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1708771641703-0df3d179cec3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1708771641703-0df3d179cec3"},links:{self:"https://api.unsplash.com/photos/a-person-with-a-hat-on-their-head-in-a-field-PZfeP0uwBpQ",html:"https://unsplash.com/photos/a-person-with-a-hat-on-their-head-in-a-field-PZfeP0uwBpQ",download:"https://unsplash.com/photos/PZfeP0uwBpQ/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/PZfeP0uwBpQ/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:2,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{people:{status:"rejected"},experimental:{status:"rejected"}},user:{id:"mWjiXj5vQuQ",updated_at:"2024-03-11T06:58:57Z",username:"chanwei_snap",name:"Chanwei",first_name:"Chanwei",last_name:null,twitter_username:null,portfolio_url:null,bio:`👋 Just a snap-happy amateur sharing my photos with you!\r
|
|
13
|
-
📍Instagram: @chanwei.snap\r
|
|
14
|
-
`,location:"Taipei, Taiwan",links:{self:"https://api.unsplash.com/users/chanwei_snap",html:"https://unsplash.com/@chanwei_snap",photos:"https://api.unsplash.com/users/chanwei_snap/photos",likes:"https://api.unsplash.com/users/chanwei_snap/likes",portfolio:"https://api.unsplash.com/users/chanwei_snap/portfolio",following:"https://api.unsplash.com/users/chanwei_snap/following",followers:"https://api.unsplash.com/users/chanwei_snap/followers"},profile_image:{small:"https://images.unsplash.com/profile-1705518610211-a929b876f4d5image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1705518610211-a929b876f4d5image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1705518610211-a929b876f4d5image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"chanwei.snap",total_collections:15,total_likes:63,total_photos:150,total_promoted_photos:2,accepted_tos:!0,for_hire:!1,social:{instagram_username:"chanwei.snap",portfolio_url:null,twitter_username:null,paypal_email:null}}},{id:"1JwHaWeSK9s",slug:"a-picture-of-some-white-flowers-on-a-white-background-1JwHaWeSK9s",alternative_slugs:{en:"a-picture-of-some-white-flowers-on-a-white-background-1JwHaWeSK9s"},created_at:"2024-03-10T11:33:51Z",updated_at:"2024-03-11T06:57:09Z",promoted_at:"2024-03-11T06:53:39Z",width:3586,height:3917,color:"#f3f3d9",blur_hash:"LIQ0T^j=_4%M%MxbM{M{_4jZITbH",description:"Title: Christmas eve Artist: Callowhill, James Publisher: L. Prang & Co. Name on Item: JC Date: [ca. 1861–1897] https://www.digitalcommonwealth.org/search/commonwealth:7w62f880r",alt_description:"a picture of some white flowers on a white background",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1710069455079-2059d3cefe91?ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1710069455079-2059d3cefe91?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1710069455079-2059d3cefe91?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1710069455079-2059d3cefe91?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1710069455079-2059d3cefe91?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710069455079-2059d3cefe91"},links:{self:"https://api.unsplash.com/photos/a-picture-of-some-white-flowers-on-a-white-background-1JwHaWeSK9s",html:"https://unsplash.com/photos/a-picture-of-some-white-flowers-on-a-white-background-1JwHaWeSK9s",download:"https://unsplash.com/photos/1JwHaWeSK9s/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/1JwHaWeSK9s/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:7,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"piFVWeoWxU8",updated_at:"2024-03-11T07:28:12Z",username:"bostonpubliclibrary",name:"Boston Public Library",first_name:"Boston",last_name:"Public Library",twitter_username:null,portfolio_url:"https://www.bpl.org/",bio:"Considered a pioneer of public library service in the United States, the Boston Public Library is among the three largest collections in the country and is committed to be ‘Free for All’.",location:"Boston, USA",links:{self:"https://api.unsplash.com/users/bostonpubliclibrary",html:"https://unsplash.com/@bostonpubliclibrary",photos:"https://api.unsplash.com/users/bostonpubliclibrary/photos",likes:"https://api.unsplash.com/users/bostonpubliclibrary/likes",portfolio:"https://api.unsplash.com/users/bostonpubliclibrary/portfolio",following:"https://api.unsplash.com/users/bostonpubliclibrary/following",followers:"https://api.unsplash.com/users/bostonpubliclibrary/followers"},profile_image:{small:"https://images.unsplash.com/profile-1579171056760-0293bb679901image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1579171056760-0293bb679901image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1579171056760-0293bb679901image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:null,total_collections:6,total_likes:0,total_photos:510,total_promoted_photos:62,accepted_tos:!0,for_hire:!1,social:{instagram_username:null,portfolio_url:"https://www.bpl.org/",twitter_username:null,paypal_email:null}}},{id:"efzvMAIpfWY",slug:"a-couple-of-people-that-are-standing-in-the-dirt-efzvMAIpfWY",alternative_slugs:{en:"a-couple-of-people-that-are-standing-in-the-dirt-efzvMAIpfWY"},created_at:"2023-04-28T12:46:16Z",updated_at:"2024-03-11T09:48:19Z",promoted_at:null,width:9504,height:6336,color:"#c07359",blur_hash:"LELo7xNHxa~Bz:s9S4nO~VbwoLS~",description:"Amongst expansive red sands and spectacular sandstone rock formations, Hisma Desert – NEOM, Saudi Arabia | The NEOM Nature Reserve region is being designed to deliver protection and restoration of biodiversity across 95% of NEOM.",alt_description:"a couple of people that are standing in the dirt",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1682685797742-42c9987a2c34?ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1682685797742-42c9987a2c34?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1682685797742-42c9987a2c34?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1682685797742-42c9987a2c34?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1682685797742-42c9987a2c34?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1682685797742-42c9987a2c34"},links:{self:"https://api.unsplash.com/photos/a-couple-of-people-that-are-standing-in-the-dirt-efzvMAIpfWY",html:"https://unsplash.com/photos/a-couple-of-people-that-are-standing-in-the-dirt-efzvMAIpfWY",download:"https://unsplash.com/photos/efzvMAIpfWY/download?ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/efzvMAIpfWY/download?ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:211,liked_by_user:!1,current_user_collections:[],sponsorship:{impression_urls:["https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false&bannerID=11515544&rnd=[timestamp]&redir=https://secure.insightexpressai.com/adserver/1pixel.gif","https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false&bannerID=11515747&rnd=[timestamp]&redir=https://secure.insightexpressai.com/adserver/1pixel.gif"],tagline:"Made to Change",tagline_url:"https://www.neom.com/en-us?utm_source=unsplash&utm_medium=referral",sponsor:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},topic_submissions:{},user:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},{id:"j39-6Uto9QQ",slug:"a-forest-filled-with-lots-of-tall-trees-j39-6Uto9QQ",alternative_slugs:{en:"a-forest-filled-with-lots-of-tall-trees-j39-6Uto9QQ"},created_at:"2024-03-09T22:12:40Z",updated_at:"2024-03-11T07:57:13Z",promoted_at:"2024-03-11T06:51:56Z",width:3759,height:5639,color:"#26260c",blur_hash:"L79tDG?H4;IURu%MM{RP~oohIoIo",description:null,alt_description:"a forest filled with lots of tall trees",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1710020339360-ce951881b835?ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1710020339360-ce951881b835?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1710020339360-ce951881b835?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1710020339360-ce951881b835?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1710020339360-ce951881b835?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710020339360-ce951881b835"},links:{self:"https://api.unsplash.com/photos/a-forest-filled-with-lots-of-tall-trees-j39-6Uto9QQ",html:"https://unsplash.com/photos/a-forest-filled-with-lots-of-tall-trees-j39-6Uto9QQ",download:"https://unsplash.com/photos/j39-6Uto9QQ/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/j39-6Uto9QQ/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:1,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"MarIhx6ztc0",updated_at:"2024-03-11T06:51:56Z",username:"brice_cooper18",name:"Brice Cooper",first_name:"Brice",last_name:"Cooper",twitter_username:null,portfolio_url:null,bio:"Always down for an adventure, capturing those adventures one photo at a time. Never stop exploring!",location:"Florida",links:{self:"https://api.unsplash.com/users/brice_cooper18",html:"https://unsplash.com/@brice_cooper18",photos:"https://api.unsplash.com/users/brice_cooper18/photos",likes:"https://api.unsplash.com/users/brice_cooper18/likes",portfolio:"https://api.unsplash.com/users/brice_cooper18/portfolio",following:"https://api.unsplash.com/users/brice_cooper18/following",followers:"https://api.unsplash.com/users/brice_cooper18/followers"},profile_image:{small:"https://images.unsplash.com/profile-1673045276376-91bb892b6e94image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1673045276376-91bb892b6e94image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1673045276376-91bb892b6e94image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"brice_cooper18",total_collections:14,total_likes:0,total_photos:1467,total_promoted_photos:51,accepted_tos:!0,for_hire:!0,social:{instagram_username:"brice_cooper18",portfolio_url:null,twitter_username:null,paypal_email:null}}},{id:"oTE1p2Awp3I",slug:"a-couple-of-people-standing-on-top-of-a-cliff-next-to-the-ocean-oTE1p2Awp3I",alternative_slugs:{en:"a-couple-of-people-standing-on-top-of-a-cliff-next-to-the-ocean-oTE1p2Awp3I"},created_at:"2024-02-27T22:15:01Z",updated_at:"2024-03-11T06:51:52Z",promoted_at:"2024-03-11T06:51:52Z",width:4e3,height:5333,color:"#c0c0c0",blur_hash:"LLE:C[u5IooJ_N%gE1ax~ps8Vsoe",description:null,alt_description:"a couple of people standing on top of a cliff next to the ocean",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709071784840-cf3ecc434749?ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709071784840-cf3ecc434749?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709071784840-cf3ecc434749?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709071784840-cf3ecc434749?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709071784840-cf3ecc434749?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709071784840-cf3ecc434749"},links:{self:"https://api.unsplash.com/photos/a-couple-of-people-standing-on-top-of-a-cliff-next-to-the-ocean-oTE1p2Awp3I",html:"https://unsplash.com/photos/a-couple-of-people-standing-on-top-of-a-cliff-next-to-the-ocean-oTE1p2Awp3I",download:"https://unsplash.com/photos/oTE1p2Awp3I/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/oTE1p2Awp3I/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:8,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"khtnjqjzcq0",updated_at:"2024-03-11T06:51:53Z",username:"mitchorr",name:"Mitchell Orr",first_name:"Mitchell",last_name:"Orr",twitter_username:null,portfolio_url:"https://mitchorr.darkroom.tech/",bio:`If you feel you would like to support my work, any donations no matter how small, would be extremely helpful. \r
|
|
15
|
-
Thanks for looking!`,location:"Wirral",links:{self:"https://api.unsplash.com/users/mitchorr",html:"https://unsplash.com/@mitchorr",photos:"https://api.unsplash.com/users/mitchorr/photos",likes:"https://api.unsplash.com/users/mitchorr/likes",portfolio:"https://api.unsplash.com/users/mitchorr/portfolio",following:"https://api.unsplash.com/users/mitchorr/following",followers:"https://api.unsplash.com/users/mitchorr/followers"},profile_image:{small:"https://images.unsplash.com/profile-1687891061126-8858e815018fimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1687891061126-8858e815018fimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1687891061126-8858e815018fimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"mitchorr1",total_collections:0,total_likes:41,total_photos:358,total_promoted_photos:118,accepted_tos:!0,for_hire:!0,social:{instagram_username:"mitchorr1",portfolio_url:"https://mitchorr.darkroom.tech/",twitter_username:null,paypal_email:null}}},{id:"ihmo0uRQ3jA",slug:"a-bed-sitting-in-a-bedroom-next-to-a-window-ihmo0uRQ3jA",alternative_slugs:{en:"a-bed-sitting-in-a-bedroom-next-to-a-window-ihmo0uRQ3jA"},created_at:"2024-02-24T20:00:04Z",updated_at:"2024-03-11T06:51:48Z",promoted_at:"2024-03-11T06:51:48Z",width:4e3,height:6e3,color:"#260c0c",blur_hash:"L78;b;?I4Xx?tcIUD+xt03oy-.M|",description:null,alt_description:"a bed sitting in a bedroom next to a window",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1708804309492-5ef3f3458c33?ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1708804309492-5ef3f3458c33?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1708804309492-5ef3f3458c33?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1708804309492-5ef3f3458c33?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1708804309492-5ef3f3458c33?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1708804309492-5ef3f3458c33"},links:{self:"https://api.unsplash.com/photos/a-bed-sitting-in-a-bedroom-next-to-a-window-ihmo0uRQ3jA",html:"https://unsplash.com/photos/a-bed-sitting-in-a-bedroom-next-to-a-window-ihmo0uRQ3jA",download:"https://unsplash.com/photos/ihmo0uRQ3jA/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/ihmo0uRQ3jA/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:20,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"Og5qBrDjufI",updated_at:"2024-03-11T06:51:49Z",username:"mariailves",name:"Maria Ilves",first_name:"Maria",last_name:"Ilves",twitter_username:null,portfolio_url:"http://www.mariailves.com",bio:null,location:"Ambleside",links:{self:"https://api.unsplash.com/users/mariailves",html:"https://unsplash.com/@mariailves",photos:"https://api.unsplash.com/users/mariailves/photos",likes:"https://api.unsplash.com/users/mariailves/likes",portfolio:"https://api.unsplash.com/users/mariailves/portfolio",following:"https://api.unsplash.com/users/mariailves/following",followers:"https://api.unsplash.com/users/mariailves/followers"},profile_image:{small:"https://images.unsplash.com/profile-1708802611867-ab4ff1564c8cimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1708802611867-ab4ff1564c8cimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1708802611867-ab4ff1564c8cimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"mariailves_",total_collections:0,total_likes:0,total_photos:38,total_promoted_photos:4,accepted_tos:!0,for_hire:!0,social:{instagram_username:"mariailves_",portfolio_url:"http://www.mariailves.com",twitter_username:null,paypal_email:null}}},{id:"UvQtTVdFi9I",slug:"UvQtTVdFi9I",alternative_slugs:{en:"UvQtTVdFi9I"},created_at:"2016-08-12T16:12:25Z",updated_at:"2024-03-11T06:50:27Z",promoted_at:"2024-03-11T06:50:27Z",width:3648,height:5472,color:"#8ca673",blur_hash:"LGG9g4IAVax[.Zxus=kB9HtQ%LRj",description:null,alt_description:null,breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1471018289981-5d9f06e2bf45?ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1471018289981-5d9f06e2bf45?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1471018289981-5d9f06e2bf45?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1471018289981-5d9f06e2bf45?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1471018289981-5d9f06e2bf45?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1471018289981-5d9f06e2bf45"},links:{self:"https://api.unsplash.com/photos/UvQtTVdFi9I",html:"https://unsplash.com/photos/UvQtTVdFi9I",download:"https://unsplash.com/photos/UvQtTVdFi9I/download?ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/UvQtTVdFi9I/download?ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:60,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"dhG1THiRwtA",updated_at:"2024-03-11T06:50:28Z",username:"clarissemeyer",name:"Clarisse Meyer",first_name:"Clarisse",last_name:"Meyer",twitter_username:"claireymeyer",portfolio_url:"https://www.clarisserae.com",bio:`Photo | Video | Design - Southern California & Beyond\r
|
|
16
|
-
Instagram: @clarisse.rae`,location:"Orange County, CA",links:{self:"https://api.unsplash.com/users/clarissemeyer",html:"https://unsplash.com/@clarissemeyer",photos:"https://api.unsplash.com/users/clarissemeyer/photos",likes:"https://api.unsplash.com/users/clarissemeyer/likes",portfolio:"https://api.unsplash.com/users/clarissemeyer/portfolio",following:"https://api.unsplash.com/users/clarissemeyer/following",followers:"https://api.unsplash.com/users/clarissemeyer/followers"},profile_image:{small:"https://images.unsplash.com/profile-1470948329031-558b487bdf37?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1470948329031-558b487bdf37?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1470948329031-558b487bdf37?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"clarisse.rae",total_collections:2,total_likes:139,total_photos:99,total_promoted_photos:58,accepted_tos:!1,for_hire:!1,social:{instagram_username:"clarisse.rae",portfolio_url:"https://www.clarisserae.com",twitter_username:"claireymeyer",paypal_email:null}}},{id:"iswshBYbTBk",slug:"a-woman-riding-an-escalator-down-an-escalator-iswshBYbTBk",alternative_slugs:{en:"a-woman-riding-an-escalator-down-an-escalator-iswshBYbTBk"},created_at:"2024-02-27T19:26:10Z",updated_at:"2024-03-11T06:48:50Z",promoted_at:"2024-03-11T06:48:50Z",width:3940,height:2634,color:"#73a673",blur_hash:"LEDn~t%{y:WXDPVtH[jt8{o|VGk9",description:null,alt_description:"a woman riding an escalator down an escalator",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709061965707-9a89ffb23103?ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709061965707-9a89ffb23103?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709061965707-9a89ffb23103?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709061965707-9a89ffb23103?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709061965707-9a89ffb23103?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709061965707-9a89ffb23103"},links:{self:"https://api.unsplash.com/photos/a-woman-riding-an-escalator-down-an-escalator-iswshBYbTBk",html:"https://unsplash.com/photos/a-woman-riding-an-escalator-down-an-escalator-iswshBYbTBk",download:"https://unsplash.com/photos/iswshBYbTBk/download?ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/iswshBYbTBk/download?ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:4,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{people:{status:"rejected"}},user:{id:"d-2o2yQwtxY",updated_at:"2024-03-11T06:48:59Z",username:"vitalymazur",name:"Vitalii Mazur",first_name:"Vitalii",last_name:"Mazur",twitter_username:"@madebyvitalii",portfolio_url:"https://www.behance.net/vitaliimazur",bio:`Life through photography 🌿 \r
|
|
17
|
-
Feel free to support me via PayPal (vitaly.mazur@icloud.com) if you like to use my shots. Also I'm available for a photoshoot in Toronto 📸🇨🇦`,location:"Toronto, Canada",links:{self:"https://api.unsplash.com/users/vitalymazur",html:"https://unsplash.com/@vitalymazur",photos:"https://api.unsplash.com/users/vitalymazur/photos",likes:"https://api.unsplash.com/users/vitalymazur/likes",portfolio:"https://api.unsplash.com/users/vitalymazur/portfolio",following:"https://api.unsplash.com/users/vitalymazur/following",followers:"https://api.unsplash.com/users/vitalymazur/followers"},profile_image:{small:"https://images.unsplash.com/profile-1708119387274-fad12c7d293b?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1708119387274-fad12c7d293b?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1708119387274-fad12c7d293b?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"vitalymazur ",total_collections:14,total_likes:773,total_photos:263,total_promoted_photos:15,accepted_tos:!0,for_hire:!0,social:{instagram_username:"vitalymazur ",portfolio_url:"https://www.behance.net/vitaliimazur",twitter_username:"@madebyvitalii",paypal_email:null}}},{id:"uSNuKKh7wpA",slug:"a-picture-of-a-green-object-with-a-white-background-uSNuKKh7wpA",alternative_slugs:{en:"a-picture-of-a-green-object-with-a-white-background-uSNuKKh7wpA"},created_at:"2024-03-01T10:58:28Z",updated_at:"2024-03-11T06:48:07Z",promoted_at:"2024-03-11T06:48:07Z",width:9600,height:5400,color:"#d9d9d9",blur_hash:"LJLq]_WI_3%eo$xa?cRi~qobITM|",description:"Made in blender 4.0",alt_description:"a picture of a green object with a white background",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709290649154-54c725bd4484?ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709290649154-54c725bd4484?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709290649154-54c725bd4484?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709290649154-54c725bd4484?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709290649154-54c725bd4484?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709290649154-54c725bd4484"},links:{self:"https://api.unsplash.com/photos/a-picture-of-a-green-object-with-a-white-background-uSNuKKh7wpA",html:"https://unsplash.com/photos/a-picture-of-a-green-object-with-a-white-background-uSNuKKh7wpA",download:"https://unsplash.com/photos/uSNuKKh7wpA/download?ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/uSNuKKh7wpA/download?ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:42,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{"3d-renders":{status:"approved",approved_on:"2024-03-06T08:20:20Z"},experimental:{status:"approved",approved_on:"2024-03-06T07:38:30Z"}},user:{id:"5TCQxdaW0wE",updated_at:"2024-03-11T10:04:04Z",username:"theshubhamdhage",name:"Shubham Dhage",first_name:"Shubham",last_name:"Dhage",twitter_username:"theshubhamdhage",portfolio_url:"https://theshubhamdhage.com/",bio:"Creating things is my passion.",location:"Pune, India",links:{self:"https://api.unsplash.com/users/theshubhamdhage",html:"https://unsplash.com/@theshubhamdhage",photos:"https://api.unsplash.com/users/theshubhamdhage/photos",likes:"https://api.unsplash.com/users/theshubhamdhage/likes",portfolio:"https://api.unsplash.com/users/theshubhamdhage/portfolio",following:"https://api.unsplash.com/users/theshubhamdhage/following",followers:"https://api.unsplash.com/users/theshubhamdhage/followers"},profile_image:{small:"https://images.unsplash.com/profile-1702918491890-622aa47079a5image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1702918491890-622aa47079a5image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1702918491890-622aa47079a5image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"theshubhamdhage",total_collections:2,total_likes:296,total_photos:734,total_promoted_photos:147,accepted_tos:!0,for_hire:!0,social:{instagram_username:"theshubhamdhage",portfolio_url:"https://theshubhamdhage.com/",twitter_username:"theshubhamdhage",paypal_email:null}}},{id:"7lN8MJPnlXs",slug:"a-close-up-of-a-pine-tree-with-lots-of-needles-7lN8MJPnlXs",alternative_slugs:{en:"a-close-up-of-a-pine-tree-with-lots-of-needles-7lN8MJPnlXs"},created_at:"2024-03-06T19:31:23Z",updated_at:"2024-03-11T06:47:23Z",promoted_at:"2024-03-11T06:47:23Z",width:6720,height:4480,color:"#26260c",blur_hash:"L05OKD},~lR7TJRj%d^$_0E49Is:",description:null,alt_description:"a close up of a pine tree with lots of needles",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709753422610-39ed7ddf9e08?ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709753422610-39ed7ddf9e08?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709753422610-39ed7ddf9e08?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709753422610-39ed7ddf9e08?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709753422610-39ed7ddf9e08?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709753422610-39ed7ddf9e08"},links:{self:"https://api.unsplash.com/photos/a-close-up-of-a-pine-tree-with-lots-of-needles-7lN8MJPnlXs",html:"https://unsplash.com/photos/a-close-up-of-a-pine-tree-with-lots-of-needles-7lN8MJPnlXs",download:"https://unsplash.com/photos/7lN8MJPnlXs/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/7lN8MJPnlXs/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:5,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{"textures-patterns":{status:"approved",approved_on:"2024-03-11T06:47:18Z"}},user:{id:"gMFqynHNocY",updated_at:"2024-03-11T06:48:57Z",username:"blakecheekk",name:"Blake Cheek",first_name:"Blake",last_name:"Cheek",twitter_username:"blakecheekk",portfolio_url:"http://blakecheek.com",bio:"Photographer and Videographer. Lover of coffee and Jesus. ",location:"Atlanta, Ga",links:{self:"https://api.unsplash.com/users/blakecheekk",html:"https://unsplash.com/@blakecheekk",photos:"https://api.unsplash.com/users/blakecheekk/photos",likes:"https://api.unsplash.com/users/blakecheekk/likes",portfolio:"https://api.unsplash.com/users/blakecheekk/portfolio",following:"https://api.unsplash.com/users/blakecheekk/following",followers:"https://api.unsplash.com/users/blakecheekk/followers"},profile_image:{small:"https://images.unsplash.com/profile-1709746841716-156061dd4fe9image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1709746841716-156061dd4fe9image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1709746841716-156061dd4fe9image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"blakecheekk",total_collections:4,total_likes:0,total_photos:423,total_promoted_photos:165,accepted_tos:!0,for_hire:!0,social:{instagram_username:"blakecheekk",portfolio_url:"http://blakecheek.com",twitter_username:"blakecheekk",paypal_email:null}}},{id:"Fw8vp9G6FtE",slug:"the-contents-of-a-backpack-laid-out-on-a-table-Fw8vp9G6FtE",alternative_slugs:{en:"the-contents-of-a-backpack-laid-out-on-a-table-Fw8vp9G6FtE"},created_at:"2024-03-10T00:43:31Z",updated_at:"2024-03-11T06:46:50Z",promoted_at:"2024-03-11T06:46:50Z",width:6240,height:4160,color:"#262626",blur_hash:"LIINNov{ae}=56I]eToaEmWC^iI;",description:null,alt_description:"the contents of a backpack laid out on a table",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1710031407576-135a680d6e10?ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1710031407576-135a680d6e10?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1710031407576-135a680d6e10?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1710031407576-135a680d6e10?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1710031407576-135a680d6e10?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710031407576-135a680d6e10"},links:{self:"https://api.unsplash.com/photos/the-contents-of-a-backpack-laid-out-on-a-table-Fw8vp9G6FtE",html:"https://unsplash.com/photos/the-contents-of-a-backpack-laid-out-on-a-table-Fw8vp9G6FtE",download:"https://unsplash.com/photos/Fw8vp9G6FtE/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/Fw8vp9G6FtE/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:4,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"UmKpkFAcSDE",updated_at:"2024-03-11T06:46:50Z",username:"taylorheeryphoto",name:"Taylor Heery",first_name:"Taylor",last_name:"Heery",twitter_username:"tahegri",portfolio_url:"http://www.taylorheery.com",bio:`VENMO: @taylorheeryphoto\r
|
|
18
|
-
Fujifilm fanatic.`,location:"Hendersonville, NC",links:{self:"https://api.unsplash.com/users/taylorheeryphoto",html:"https://unsplash.com/@taylorheeryphoto",photos:"https://api.unsplash.com/users/taylorheeryphoto/photos",likes:"https://api.unsplash.com/users/taylorheeryphoto/likes",portfolio:"https://api.unsplash.com/users/taylorheeryphoto/portfolio",following:"https://api.unsplash.com/users/taylorheeryphoto/following",followers:"https://api.unsplash.com/users/taylorheeryphoto/followers"},profile_image:{small:"https://images.unsplash.com/profile-1710031596049-549d947d2a3a?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1710031596049-549d947d2a3a?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1710031596049-549d947d2a3a?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"taylorheeryphoto",total_collections:0,total_likes:107,total_photos:520,total_promoted_photos:209,accepted_tos:!0,for_hire:!0,social:{instagram_username:"taylorheeryphoto",portfolio_url:"http://www.taylorheery.com",twitter_username:"tahegri",paypal_email:null}}},{id:"e75CfMG0Sgo",slug:"a-person-with-a-backpack-looking-at-mountains-e75CfMG0Sgo",alternative_slugs:{en:"a-person-with-a-backpack-looking-at-mountains-e75CfMG0Sgo"},created_at:"2023-04-28T12:46:16Z",updated_at:"2024-03-10T11:50:20Z",promoted_at:null,width:5429,height:3619,color:"#a6c0d9",blur_hash:"LnHLYm%0IAi_?wn$ngj[OtRjs:f6",description:"Nature Reserve – NEOM, Saudi Arabia | The NEOM Nature Reserve region is being designed to deliver protection and restoration of biodiversity across 95% of NEOM.",alt_description:"a person with a backpack looking at mountains",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1682685796002-e05458d61f07?ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1682685796002-e05458d61f07?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1682685796002-e05458d61f07?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1682685796002-e05458d61f07?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1682685796002-e05458d61f07?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1682685796002-e05458d61f07"},links:{self:"https://api.unsplash.com/photos/a-person-with-a-backpack-looking-at-mountains-e75CfMG0Sgo",html:"https://unsplash.com/photos/a-person-with-a-backpack-looking-at-mountains-e75CfMG0Sgo",download:"https://unsplash.com/photos/e75CfMG0Sgo/download?ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/e75CfMG0Sgo/download?ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:174,liked_by_user:!1,current_user_collections:[],sponsorship:{impression_urls:["https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false&bannerID=11515577&rnd=[timestamp]&redir=https://secure.insightexpressai.com/adserver/1pixel.gif","https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false&bannerID=11515780&rnd=[timestamp]&redir=https://secure.insightexpressai.com/adserver/1pixel.gif"],tagline:"Made to Change",tagline_url:"https://www.neom.com/en-us?utm_source=unsplash&utm_medium=referral",sponsor:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},topic_submissions:{},user:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},{id:"jSjHcyHFOdQ",slug:"a-picture-of-a-green-plant-in-a-dark-room-jSjHcyHFOdQ",alternative_slugs:{en:"a-picture-of-a-green-plant-in-a-dark-room-jSjHcyHFOdQ"},created_at:"2024-02-08T15:36:25Z",updated_at:"2024-03-11T06:46:46Z",promoted_at:"2024-03-11T06:46:46Z",width:8400,height:5600,color:"#0c260c",blur_hash:"L44CLsVuD7pF.Po2R7R*-.oyX5My",description:null,alt_description:"a picture of a green plant in a dark room",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1707406543260-ed14bbd0d086?ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1707406543260-ed14bbd0d086?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1707406543260-ed14bbd0d086?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1707406543260-ed14bbd0d086?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1707406543260-ed14bbd0d086?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1707406543260-ed14bbd0d086"},links:{self:"https://api.unsplash.com/photos/a-picture-of-a-green-plant-in-a-dark-room-jSjHcyHFOdQ",html:"https://unsplash.com/photos/a-picture-of-a-green-plant-in-a-dark-room-jSjHcyHFOdQ",download:"https://unsplash.com/photos/jSjHcyHFOdQ/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/jSjHcyHFOdQ/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:14,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"ogQykx6hk_c",updated_at:"2024-03-11T06:46:46Z",username:"pawel_czerwinski",name:"Pawel Czerwinski",first_name:"Pawel",last_name:"Czerwinski",twitter_username:"pm_cze",portfolio_url:"http://paypal.me/pmcze",bio:"Questions about how you can use the photos? help.unsplash.com/en/collections/1463188-unsplash-license 👍",location:"Poland",links:{self:"https://api.unsplash.com/users/pawel_czerwinski",html:"https://unsplash.com/@pawel_czerwinski",photos:"https://api.unsplash.com/users/pawel_czerwinski/photos",likes:"https://api.unsplash.com/users/pawel_czerwinski/likes",portfolio:"https://api.unsplash.com/users/pawel_czerwinski/portfolio",following:"https://api.unsplash.com/users/pawel_czerwinski/following",followers:"https://api.unsplash.com/users/pawel_czerwinski/followers"},profile_image:{small:"https://images.unsplash.com/profile-1592328433409-d9ce8a5333eaimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1592328433409-d9ce8a5333eaimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1592328433409-d9ce8a5333eaimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"pmcze",total_collections:7,total_likes:39154,total_photos:2137,total_promoted_photos:1760,accepted_tos:!0,for_hire:!1,social:{instagram_username:"pmcze",portfolio_url:"http://paypal.me/pmcze",twitter_username:"pm_cze",paypal_email:null}}},{id:"OfGHUYX0CCg",slug:"a-body-of-water-that-has-some-waves-on-it-OfGHUYX0CCg",alternative_slugs:{en:"a-body-of-water-that-has-some-waves-on-it-OfGHUYX0CCg"},created_at:"2024-03-06T14:06:51Z",updated_at:"2024-03-11T08:56:52Z",promoted_at:"2024-03-11T06:45:54Z",width:8192,height:5460,color:"#260c0c",blur_hash:"LUF{kg=cj@fQ}XxFS3azxFfjS2WW",description:null,alt_description:"a body of water that has some waves on it",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709733167477-25398ca709c0?ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709733167477-25398ca709c0?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709733167477-25398ca709c0?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709733167477-25398ca709c0?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709733167477-25398ca709c0?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709733167477-25398ca709c0"},links:{self:"https://api.unsplash.com/photos/a-body-of-water-that-has-some-waves-on-it-OfGHUYX0CCg",html:"https://unsplash.com/photos/a-body-of-water-that-has-some-waves-on-it-OfGHUYX0CCg",download:"https://unsplash.com/photos/OfGHUYX0CCg/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/OfGHUYX0CCg/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:16,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{"earth-hour":{status:"approved",approved_on:"2024-03-07T09:43:45Z"}},user:{id:"uFFemR6e1vs",updated_at:"2024-03-11T06:48:56Z",username:"marcospradobr",name:"Marcos Paulo Prado",first_name:"Marcos Paulo",last_name:"Prado",twitter_username:null,portfolio_url:"https://www.instagram.com/eusoumarcosprado",bio:"People and commercial photographer based in Rio de Janeiro, Brasil",location:"Rio de Janeiro, Brazil",links:{self:"https://api.unsplash.com/users/marcospradobr",html:"https://unsplash.com/@marcospradobr",photos:"https://api.unsplash.com/users/marcospradobr/photos",likes:"https://api.unsplash.com/users/marcospradobr/likes",portfolio:"https://api.unsplash.com/users/marcospradobr/portfolio",following:"https://api.unsplash.com/users/marcospradobr/following",followers:"https://api.unsplash.com/users/marcospradobr/followers"},profile_image:{small:"https://images.unsplash.com/profile-1572910425876-25d44d080554image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1572910425876-25d44d080554image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1572910425876-25d44d080554image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"eusoumarcosprado",total_collections:0,total_likes:306,total_photos:413,total_promoted_photos:139,accepted_tos:!0,for_hire:!0,social:{instagram_username:"eusoumarcosprado",portfolio_url:"https://www.instagram.com/eusoumarcosprado",twitter_username:null,paypal_email:null}}},{id:"VKQpbzeWbrk",slug:"a-bouquet-of-orange-and-white-tulips-on-a-red-door-VKQpbzeWbrk",alternative_slugs:{en:"a-bouquet-of-orange-and-white-tulips-on-a-red-door-VKQpbzeWbrk"},created_at:"2024-03-09T21:24:04Z",updated_at:"2024-03-11T06:45:51Z",promoted_at:"2024-03-11T06:45:51Z",width:2592,height:3872,color:"#8c2626",blur_hash:"LFI2{Exr0gE}Dlo|=_W-5RE3O=xH",description:null,alt_description:"a bouquet of orange and white tulips on a red door",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1710018337941-58197591d55a?ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1710018337941-58197591d55a?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1710018337941-58197591d55a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1710018337941-58197591d55a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1710018337941-58197591d55a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710018337941-58197591d55a"},links:{self:"https://api.unsplash.com/photos/a-bouquet-of-orange-and-white-tulips-on-a-red-door-VKQpbzeWbrk",html:"https://unsplash.com/photos/a-bouquet-of-orange-and-white-tulips-on-a-red-door-VKQpbzeWbrk",download:"https://unsplash.com/photos/VKQpbzeWbrk/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/VKQpbzeWbrk/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:3,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"H8-Yyg-eX4A",updated_at:"2024-03-11T06:48:56Z",username:"jaelphotos",name:"Jael Coon",first_name:"Jael",last_name:"Coon",twitter_username:null,portfolio_url:"https://linktr.ee/jaelcoon",bio:"Coffee drinker, photographer, artist and chef/baker",location:"USA",links:{self:"https://api.unsplash.com/users/jaelphotos",html:"https://unsplash.com/@jaelphotos",photos:"https://api.unsplash.com/users/jaelphotos/photos",likes:"https://api.unsplash.com/users/jaelphotos/likes",portfolio:"https://api.unsplash.com/users/jaelphotos/portfolio",following:"https://api.unsplash.com/users/jaelphotos/following",followers:"https://api.unsplash.com/users/jaelphotos/followers"},profile_image:{small:"https://images.unsplash.com/profile-1693432710439-47b22b3f6a9eimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1693432710439-47b22b3f6a9eimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1693432710439-47b22b3f6a9eimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"jaelcoon",total_collections:51,total_likes:0,total_photos:230,total_promoted_photos:3,accepted_tos:!0,for_hire:!1,social:{instagram_username:"jaelcoon",portfolio_url:"https://linktr.ee/jaelcoon",twitter_username:null,paypal_email:null}}},{id:"W6AqsLH6HOg",slug:"a-license-plate-on-the-back-of-a-car-W6AqsLH6HOg",alternative_slugs:{en:"a-license-plate-on-the-back-of-a-car-W6AqsLH6HOg"},created_at:"2024-03-06T06:59:15Z",updated_at:"2024-03-11T06:45:45Z",promoted_at:"2024-03-11T06:45:45Z",width:6e3,height:4e3,color:"#595959",blur_hash:"LYE_]gO?}qOsW--Ux]$%RPoeX9oz",description:null,alt_description:"a license plate on the back of a car",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709708210553-490ba885fcf6?ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709708210553-490ba885fcf6?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709708210553-490ba885fcf6?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709708210553-490ba885fcf6?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709708210553-490ba885fcf6?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709708210553-490ba885fcf6"},links:{self:"https://api.unsplash.com/photos/a-license-plate-on-the-back-of-a-car-W6AqsLH6HOg",html:"https://unsplash.com/photos/a-license-plate-on-the-back-of-a-car-W6AqsLH6HOg",download:"https://unsplash.com/photos/W6AqsLH6HOg/download?ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/W6AqsLH6HOg/download?ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:3,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"VNV70zPYNto",updated_at:"2024-03-11T06:48:56Z",username:"venajeborec",name:"Václav Pechar",first_name:"Václav",last_name:"Pechar",twitter_username:null,portfolio_url:null,bio:`Photographer from South Bohemia ✌🏻\r
|
|
19
|
-
Be free to contact me to book a shoot 🙏🏻`,location:"Czech Republic - Písek",links:{self:"https://api.unsplash.com/users/venajeborec",html:"https://unsplash.com/@venajeborec",photos:"https://api.unsplash.com/users/venajeborec/photos",likes:"https://api.unsplash.com/users/venajeborec/likes",portfolio:"https://api.unsplash.com/users/venajeborec/portfolio",following:"https://api.unsplash.com/users/venajeborec/following",followers:"https://api.unsplash.com/users/venajeborec/followers"},profile_image:{small:"https://images.unsplash.com/profile-1687031143105-2420498da92eimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1687031143105-2420498da92eimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1687031143105-2420498da92eimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"amazingvena",total_collections:0,total_likes:7,total_photos:324,total_promoted_photos:30,accepted_tos:!0,for_hire:!0,social:{instagram_username:"amazingvena",portfolio_url:null,twitter_username:null,paypal_email:null}}}],Yj=qj;class Gj{constructor(){jt(this,"photos",Yj),jt(this,"PAGINATION",{}),jt(this,"REQUEST_IS_RUNNING",!1),jt(this,"SEARCH_IS_RUNNING",!1),jt(this,"LAST_REQUEST_URL",""),jt(this,"ERROR",null),jt(this,"IS_LOADING",!1),jt(this,"currentPage",1)}async fetchPhotos(){this.IS_LOADING=!0;const s=(this.currentPage-1)*30,a=this.currentPage*30;return this.currentPage+=1,this.IS_LOADING=!1,this.photos.slice(s,a)}async fetchNextPage(){if(this.REQUEST_IS_RUNNING||this.SEARCH_IS_RUNNING)return null;const s=await this.fetchPhotos();return s.length>0?s:null}async searchPhotos(s){this.SEARCH_IS_RUNNING=!0;const a=this.photos.filter(o=>o.description&&o.description.toLowerCase().includes(s.toLowerCase())||o.alt_description&&o.alt_description.toLowerCase().includes(s.toLowerCase()));return this.SEARCH_IS_RUNNING=!1,a}searchIsRunning(){return this.SEARCH_IS_RUNNING}triggerDownload(s){}}class Xj{constructor(s){jt(this,"_provider"),this._provider=s}async fetchPhotos(){return await this._provider.fetchPhotos()}async searchPhotos(s){return await this._provider.searchPhotos(s)}async triggerDownload(s){this._provider.triggerDownload(s)}async fetchNextPage(){return await this._provider.fetchNextPage()||null}searchIsRunning(){return this._provider.searchIsRunning()}}class Kj{constructor(s){jt(this,"API_URL","https://api.unsplash.com"),jt(this,"HEADERS"),jt(this,"ERROR",null),jt(this,"PAGINATION",{}),jt(this,"REQUEST_IS_RUNNING",!1),jt(this,"SEARCH_IS_RUNNING",!1),jt(this,"LAST_REQUEST_URL",""),jt(this,"IS_LOADING",!1),this.HEADERS=s}async makeRequest(s){if(this.REQUEST_IS_RUNNING)return null;this.LAST_REQUEST_URL=s;const a={method:"GET",headers:this.HEADERS};try{this.REQUEST_IS_RUNNING=!0,this.IS_LOADING=!0;const o=await fetch(s,a),c=await this.checkStatus(o);this.extractPagination(c);const h=await c.json();return"results"in h?h.results:h}catch(o){return this.ERROR=o,null}finally{this.REQUEST_IS_RUNNING=!1,this.IS_LOADING=!1}}extractPagination(s){let a=new RegExp('<(.*)>; rel="(.*)"'),o=[],c={};for(let h of s.headers.entries())h[0]==="link"&&o.push(h[1]);return o&&o.toString().split(",").forEach(h=>{if(h){let y=a.exec(h);y&&(c[y[2]]=y[1])}}),this.PAGINATION=c,s}async fetchPhotos(){const s=`${this.API_URL}/photos?per_page=30`;return await this.makeRequest(s)}async fetchNextPage(){if(this.REQUEST_IS_RUNNING||this.SEARCH_IS_RUNNING)return null;if(this.PAGINATION.next){const s=`${this.PAGINATION.next}`,a=await this.makeRequest(s);if(a)return a}return null}async searchPhotos(s){const a=`${this.API_URL}/search/photos?query=${s}&per_page=30`;return await this.makeRequest(a)||[]}async triggerDownload(s){s.links.download_location&&await this.makeRequest(s.links.download_location)}async checkStatus(s){if(s.status>=200&&s.status<300)return s;let a="",o;const c=s.headers.get("content-type");if(c==="application/json")o=s.json().then(h=>h.errors[0]);else if(c==="text/xml")o=s.text();else throw new Error("Unsupported content type");return o.then(h=>{throw s.status===403&&s.headers.get("x-ratelimit-remaining")==="0"&&(a="Unsplash API rate limit reached, please try again later."),a=a||h||`Error ${s.status}: Uh-oh! Trouble reaching the Unsplash API`,this.ERROR=a,new Error(a)})}searchIsRunning(){return this.SEARCH_IS_RUNNING}}class Vj{constructor(s,a){jt(this,"photoUseCases"),jt(this,"masonryService"),jt(this,"photos",[]),this.photoUseCases=s,this.masonryService=a}async loadNew(){let s=await this.photoUseCases.fetchPhotos();this.photos=s,await this.layoutPhotos()}async layoutPhotos(){this.masonryService.reset(),this.photos&&this.photos.forEach(s=>{s.ratio=s.height/s.width,this.masonryService.addPhotoToColumns(s)})}getColumns(){return this.masonryService.getColumns()}async updateSearch(s){let a=await this.photoUseCases.searchPhotos(s);this.photos=a,this.layoutPhotos()}async loadNextPage(){const s=await this.photoUseCases.fetchNextPage()||[];this.photos=[...this.photos,...s],this.layoutPhotos()}clearPhotos(){this.photos=[]}triggerDownload(s){this.photoUseCases.triggerDownload(s)}searchIsRunning(){return this.photoUseCases.searchIsRunning()}}const Zj=({onClose:e,onImageInsert:s,unsplashProviderConfig:a})=>{const o=D.useMemo(()=>a?new Kj(a):new Gj,[a]),c=D.useMemo(()=>new Xj(o),[o]),h=D.useMemo(()=>new Ij(3),[]),y=D.useMemo(()=>new Vj(c,h),[c,h]),m=D.useRef(null),[l,f]=D.useState(0),[u,d]=D.useState(0),[g,b]=D.useState(y.searchIsRunning()||!0),_=D.useRef(!1),[k,M]=D.useState(""),[T,A]=D.useState(null),[I,O]=D.useState([]);ot.useEffect(()=>{m.current&&T===null&&u!==0&&(m.current.scrollTop=u,d(0))},[T,l,u]),ot.useEffect(()=>{const L=B=>{B.key==="Escape"&&e()};return window.addEventListener("keydown",L),()=>{window.removeEventListener("keydown",L)}},[e]),ot.useEffect(()=>{const L=m.current;if(!T)return L&&L.addEventListener("scroll",()=>{f(L.scrollTop)}),()=>{L&&L.removeEventListener("scroll",()=>{f(L.scrollTop)})}},[m,T]);const $=ot.useCallback(async()=>{if(_.current===!1||k.length===0){O([]),y.clearPhotos(),await y.loadNew();const L=y.getColumns();O(L||[]),m.current&&m.current.scrollTop!==0&&(m.current.scrollTop=0),b(!1)}},[y,k]),q=async L=>{const B=L.target.value;B.length>2&&(A(null),M(B)),B.length===0&&(M(""),_.current=!1,await $())},R=ot.useCallback(async()=>{if(k){b(!0),O([]),y.clearPhotos(),await y.updateSearch(k);const L=y.getColumns();L&&O(L),m.current&&m.current.scrollTop!==0&&(m.current.scrollTop=0),b(!1)}},[k,y]);ot.useEffect(()=>{const L=setTimeout(async()=>{k.length>2?await R():await $()},300);return()=>{_.current=!0,clearTimeout(L)}},[k,R,$]);const K=ot.useCallback(async()=>{b(!0),await y.loadNextPage();const L=y.getColumns();O(L||[]),b(!1)},[y]);ot.useEffect(()=>{const L=m.current;if(L){const B=async()=>{T===null&&L.scrollTop+L.clientHeight>=L.scrollHeight-1e3&&await K()};return L.addEventListener("scroll",B),()=>{L.removeEventListener("scroll",B)}}},[m,K,T]);const X=L=>{L&&(A(L),d(l)),L===null&&(A(null),m.current&&(m.current.scrollTop=u))};async function Y(L){L.src&&(y.triggerDownload(L),s(L))}return Fe.jsx(Wj,{closeModal:e,handleSearch:q,children:Fe.jsx(Uj,{dataset:I,error:null,galleryRef:m,insertImage:Y,isLoading:g,selectImg:X,zoomed:T})})},Qj=({unsplashProviderConfig:e,onClose:s,onImageInsert:a})=>r.jsx(Nj,{classNames:"admin-x-settings",children:r.jsx(Zj,{unsplashProviderConfig:e,onClose:s,onImageInsert:a})}),zs={heading:[{name:"Cardo",creator:"David Perry"},{name:"Chakra Petch",creator:"Cadson Demak"},{name:"Fira Mono",creator:"Carrois Apostrophe"},{name:"Fira Sans",creator:"Carrois Apostrophe"},{name:"IBM Plex Serif",creator:"Mike Abbink"},{name:"Inter",creator:"Rasmus Andersson"},{name:"JetBrains Mono",creator:"JetBrains"},{name:"Libre Baskerville",creator:"Impallari Type"},{name:"Lora",creator:"Cyreal"},{name:"Manrope",creator:"Mikhail Sharanda"},{name:"Merriweather",creator:"Sorkin Type"},{name:"Noto Sans",creator:"Google"},{name:"Noto Serif",creator:"Google"},{name:"Nunito",creator:"Vernon Adams"},{name:"Old Standard TT",creator:"Alexey Kryukov"},{name:"Poppins",creator:"Indian Type Foundry"},{name:"Roboto",creator:"Christian Robertson"},{name:"Rufina",creator:"Martin Sommaruga"},{name:"Space Grotesk",creator:"Florian Karsten"},{name:"Space Mono",creator:"Colophon Foundry"},{name:"Tenor Sans",creator:"Denis Masharov"}],body:[{name:"Fira Mono",creator:"Carrois Apostrophe"},{name:"Fira Sans",creator:"Carrois Apostrophe"},{name:"IBM Plex Serif",creator:"Mike Abbink"},{name:"Inter",creator:"Rasmus Andersson"},{name:"JetBrains Mono",creator:"JetBrains"},{name:"Lora",creator:"Cyreal"},{name:"Manrope",creator:"Mikhail Sharanda"},{name:"Merriweather",creator:"Sorkin Type"},{name:"Noto Sans",creator:"Google"},{name:"Noto Serif",creator:"Google"},{name:"Nunito",creator:"Vernon Adams"},{name:"Poppins",creator:"Indian Type Foundry"},{name:"Roboto",creator:"Christian Robertson"},{name:"Space Mono",creator:"Colophon Foundry"}]},$r="Theme default",cm=({children:e,...s})=>r.jsx(r0.SingleValue,{...s,children:r.jsx("div",{className:"group","data-testid":"select-current-option","data-value":s.data.value,children:r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"flex size-12 items-center justify-center rounded-md bg-white text-2xl font-bold dark:bg-black",children:"Aa"}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("span",{className:"text-md",children:e}),r.jsx("span",{className:"font-sans text-xs font-normal text-grey-700 dark:text-grey-600",children:s.data.creator})]})]})})}),um=({children:e,...s})=>r.jsx(r0.Option,{...s,children:r.jsxs("div",{className:s.isSelected?"relative flex w-full items-center justify-between gap-2":"group","data-testid":"select-option","data-value":s.data.value,children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"dark:group-hover:bg-grey-800 flex size-12 items-center justify-center rounded-md bg-grey-150 text-2xl font-bold group-hover:bg-grey-250 dark:bg-grey-900",children:"Aa"}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("span",{className:"text-md",children:e}),r.jsx("span",{className:"font-sans text-xs font-normal text-grey-700 dark:text-grey-600",children:s.data.creator})]})]}),s.isSelected&&r.jsx("span",{children:r.jsx(rt,{name:"check",size:14})})]})}),Jj=e=>e.split(" ").map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" "),fm=({values:e,updateSetting:s})=>{const{mutateAsync:a}=Ks(),{settings:o}=Qe(),[c]=xt(o,["unsplash"]),[h,y]=D.useState(!1),{unsplashConfig:m}=N_(),l=it(),f=t0(),{data:u}=ad(),d=u?.themes.find(R=>R.active),g=d?`${Jj(d.name)} (v${d.package?.version||"1.0"})`:"Loading...",[b,_]=D.useState(zs.heading.find(R=>R.name===e.headingFont)||{name:$r,creator:g}),[k,M]=D.useState(zs.heading.find(R=>R.name===e.bodyFont)||{name:$r,creator:g}),T=(R,K=!0)=>{let X="";return R==="Cardo"?X=we("font-cardo",K&&"font-bold"):R==="Manrope"?X=we("font-manrope",K&&"font-bold"):R==="Merriweather"?X=we("font-merriweather",K&&"font-bold"):R==="Nunito"?X=we("font-nunito",K&&"font-semibold"):R==="Old Standard TT"?X=we("font-old-standard-tt",K&&"font-bold"):R==="Prata"?X=we("font-prata",K&&"font-normal"):R==="Roboto"?X=we("font-roboto",K&&"font-bold"):R==="Rufina"?X=we("font-rufina",K&&"font-bold"):R==="Tenor Sans"?X=we("font-tenor-sans",K&&"font-normal"):R==="Chakra Petch"?X=we("font-chakra-petch",K&&"font-normal"):R==="Fira Mono"?X=we("font-fira-mono",K&&"font-bold"):R==="Fira Sans"?X=we("font-fira-sans",K&&"font-bold"):R==="IBM Plex Serif"?X=we("font-ibm-plex-serif",K&&"font-bold"):R==="Inter"?X=we("font-inter",K&&"font-bold"):R==="JetBrains Mono"?X=we("font-jetbrains-mono",K&&"font-bold"):R==="Lora"?X=we("font-lora",K&&"font-bold"):R==="Noto Sans"?X=we("font-noto-sans",K&&"font-bold"):R==="Noto Serif"?X=we("font-noto-serif",K&&"font-bold"):R==="Poppins"?X=we("font-poppins",K&&"font-bold"):R==="Space Grotesk"?X=we("font-space-grotesk",K&&"font-bold"):R==="Space Mono"&&(X=we("font-space-mono",K&&"font-bold")),X},A=zs.heading.map(R=>{let K=T(R.name,!0);return{label:R.name,value:R.name,creator:R.creator,className:K}});A.unshift({label:$r,value:$r,creator:g,className:"font-sans font-normal"});const I=zs.body.map(R=>{let K=T(R.name,!1);return{label:R.name,value:R.name,creator:R.creator,className:K}});I.unshift({label:$r,value:$r,creator:g,className:"font-sans font-normal"});const O=(R,K)=>R===$r?"":T(R,K),$={label:b.name,value:b.name,creator:b.creator},q={label:k.name,value:k.name,creator:k.creator};return r.jsxs(r.Fragment,{children:[r.jsxs(et,{className:"mt-6",gap:"sm",margins:"lg",title:"",children:[r.jsx(Yr,{debounceMs:200,direction:"rtl",testId:"accent-color-picker",title:r.jsx("div",{children:"Accent color"}),value:e.accentColor,onChange:R=>s("accent_color",R)}),r.jsxs("div",{className:"flex items-start justify-between",children:[r.jsxs("div",{children:[r.jsx("div",{children:"Publication icon"}),r.jsx(Kr,{className:"!mt-0 mr-5 max-w-[160px]",children:"A square, social icon, at least 60x60px"})]}),r.jsx("div",{className:"flex gap-3",children:r.jsx(un,{deleteButtonClassName:"!top-1 !right-1",editButtonClassName:"!top-1 !right-1",height:e.icon?"66px":"36px",id:"logo",imageBWCheckedBg:!0,imageURL:e.icon||"",width:e.icon?"66px":"160px",onDelete:()=>s("icon",null),onUpload:async R=>{try{s("icon",ln(await a({file:R})))}catch(K){const X=K;X.response.status===415&&(X.message="Unsupported file type"),l(X)}},children:"Upload icon"})})]}),r.jsxs("div",{className:`flex items-start justify-between ${e.icon&&"mt-2"}`,children:[r.jsxs("div",{children:[r.jsx("div",{children:"Publication logo"}),r.jsx(Kr,{className:"!mt-0 mr-5 max-w-[160px]",children:"Appears usually in the main header of your theme"})]}),r.jsx("div",{children:r.jsx(un,{deleteButtonClassName:"!top-1 !right-1",height:"60px",id:"site-logo",imageBWCheckedBg:!0,imageFit:"contain",imageURL:e.logo||"",width:"160px",onDelete:()=>s("logo",null),onUpload:async R=>{try{s("logo",ln(await a({file:R})))}catch(K){const X=K;X.response.status===415&&(X.message="Unsupported file type"),l(X)}},children:"Upload logo"})})]}),r.jsxs("div",{className:"mt-2 flex items-start justify-between","data-testid":"publication-cover",children:[r.jsxs("div",{children:[r.jsx("div",{children:"Publication cover"}),r.jsx(Kr,{className:"!mt-0 mr-5 max-w-[160px]",children:"Usually as a large banner image on your index pages"})]}),r.jsx(un,{deleteButtonClassName:"!top-1 !right-1",editButtonClassName:"!top-1 !right-10",height:"95px",id:"cover",imageURL:e.coverImage||"",openUnsplash:()=>y(!0),pintura:{isEnabled:f.isEnabled,openEditor:async()=>f.openEditor({image:e.coverImage||"",handleSave:async R=>{try{s("cover_image",ln(await a({file:R})))}catch(K){l(K)}}})},unsplashButtonClassName:"!bg-transparent !h-6 !top-1.5 !w-6 !right-1.5 z-50",unsplashEnabled:c,width:"160px",onDelete:()=>s("cover_image",null),onUpload:async R=>{try{s("cover_image",ln(await a({file:R})))}catch(K){const X=K;X.response.status===415&&(X.message="Unsupported file type"),l(X)}},children:"Upload cover"}),h&&m&&c&&r.jsx(Qj,{unsplashProviderConfig:m,onClose:()=>{y(!1)},onImageInsert:R=>{R.src&&s("cover_image",R.src),y(!1)}})]})]}),r.jsxs(et,{className:"-mt-4",gap:"sm",margins:"lg",title:"Typography",children:[r.jsx(Ot,{className:O($.label,!0),components:{Option:um,SingleValue:cm},controlClasses:{control:"!min-h-16 !pl-2",option:"!pl-2"},hint:"",menuShouldScrollIntoView:!0,options:A,selectedOption:$,testId:"heading-font-select",title:"Heading font",onSelect:R=>{R?.value===$r?(_({name:$r,creator:g}),s("heading_font","")):(_({name:R?.value||"",creator:zs.heading.find(K=>K.name===R?.value)?.creator||""}),s("heading_font",R?.value||""))}}),r.jsx(Ot,{className:O(q.label,!1),components:{Option:um,SingleValue:cm},controlClasses:{control:"!min-h-16 !pl-2",option:"!pl-2"},hint:"",maxMenuHeight:200,menuPosition:"fixed",menuShouldScrollIntoView:!0,options:I,selectedOption:q,testId:"body-font-select",title:"Body font",onSelect:R=>{R?.value===$r?(M({name:$r,creator:g}),s("body_font","")):(M({name:R?.value||"",creator:zs.body.find(K=>K.name===R?.value)?.creator||""}),s("body_font",R?.value||""))}})]})]})};var Li={exports:{}},Bi={exports:{}},e5=Bi.exports,dm;function t5(){return dm||(dm=1,(function(e,s){//! mingo.js 2.5.3
|
|
20
|
-
//! Copyright (c) 2020 Francis Asante
|
|
21
|
-
//! MIT
|
|
22
|
-
(function(a,o){e.exports=o()})(e5,(function(){function a(p){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?a=function(x){return typeof x}:a=function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x},a(p)}function o(p,x){if(!(p instanceof x))throw new TypeError("Cannot call a class as a function")}function c(p,x){for(var v=0;v<x.length;v++){var j=x[v];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(p,j.key,j)}}function h(p,x,v){return x&&c(p.prototype,x),p}function y(p,x){return m(p)||l(p,x)||f(p,x)||d()}function m(p){if(Array.isArray(p))return p}function l(p,x){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(p)))){var v=[],j=!0,C=!1,z=void 0;try{for(var Z=p[Symbol.iterator](),re;!(j=(re=Z.next()).done)&&(v.push(re.value),!(x&&v.length===x));j=!0);}catch(me){C=!0,z=me}finally{try{!j&&Z.return!=null&&Z.return()}finally{if(C)throw z}}return v}}function f(p,x){if(p){if(typeof p=="string")return u(p,x);var v=Object.prototype.toString.call(p).slice(8,-1);if(v==="Object"&&p.constructor&&(v=p.constructor.name),v==="Map"||v==="Set")return Array.from(v);if(v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v))return u(p,x)}}function u(p,x){(x==null||x>p.length)&&(x=p.length);for(var v=0,j=new Array(x);v<x;v++)j[v]=p[v];return j}function d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
23
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var g="null",b="undefined",_="bool",k="boolean",M="number",T="string",A="date",I="regex",O="regexp",$="array",q="object",R="function",K=[g,b,k,M,T,A,O],X="expression",Y="group",L="pipeline",B="projection",J="query",te=function(){};Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(x,v){if(this==null)throw new TypeError('"this" is null or not defined');var j=Object(this),C=j.length>>>0;if(C===0)return!1;var z=v|0,Z=Math.max(z>=0?z:C-Math.abs(z),0);function re(me,fe){return me===fe||typeof me=="number"&&typeof fe=="number"&&isNaN(me)&&isNaN(fe)}for(;Z<C;){if(re(j[Z],x))return!0;Z++}return!1}});var ne=Array.prototype.push;function Q(p,x){p||le(x)}function se(p){switch(W(p)){case $:return p.map(se);case q:return hr(p,se);default:return p}}function be(p){switch(W(p)){case $:return Xt([],p);case q:return Object.assign({},p);default:return p}}function je(p){return p===null?"Null":p===void 0?"Undefined":p.constructor.name}function W(p){return je(p).toLowerCase()}function he(p){return W(p)===k}function ge(p){return W(p)===T}function U(p){return W(p)===M}var P=Array.isArray||function(p){return!!p&&p.constructor===Array};function ee(p){return!!p&&p.constructor===Object}function xe(p){return p===Object(p)}function Te(p){return W(p)===A}function De(p){return W(p)===O}function Me(p){return W(p)===R}function oe(p){return p==null}function Ee(p){return p===null}function Ae(p){return p===void 0}function Ce(p,x){return p.includes(x)}function qe(p,x){return!Ce(p,x)}function at(p){return!!p}function ze(p){return oe(p)||P(p)&&p.length===0||ee(p)&&Be(p).length===0||!p}function wt(p){return P(p)?p:[p]}function ct(p,x){return p.hasOwnProperty(x)}function le(p){throw new Error(p)}var Be=Object.keys;function Re(p,x,v){if(x=x.bind(v),P(p))for(var j=0,C=p.length;j<C&&x(p[j],j,p)!==!1;j++);else for(var z in p)if(p.hasOwnProperty(z)&&x(p[z],z,p)===!1)break}function hr(p,x,v){x=x.bind(v);for(var j={},C=Be(p),z=0;z<C.length;z++){var Z=C[z];j[Z]=x(p[Z],Z)}return j}function mr(p,x){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(p===te)return x;if(x===te)return p;var j=[p,x];if(!(j.every(ee)||j.every(P)))throw Error("mismatched types. must both be array or object");if(v.flatten=v.flatten||!1,P(p))if(v.flatten){for(var C=0,z=0;C<p.length&&z<x.length;)p[C]=mr(p[C++],x[z++],v);for(;z<x.length;)p.push(x[z++])}else ne.apply(p,x);else Object.keys(x).forEach(function(Z){p.hasOwnProperty(Z)?p[Z]=mr(p[Z],x[Z],v):p[Z]=x[Z]});return p}function kt(p,x,v){return P(p)?p.reduce(x,v):(Re(p,function(j,C){return v=x(v,j,C,p)}),v)}function Ar(p,x){var v=x.map(Mr);return p.filter(function(j){return Ce(v,Mr(j))})}function hl(p,x){return Xt(Xt([],p),x.filter(qe.bind(null,p)))}function mn(p){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,v=[];function j(C,z){for(var Z=0,re=C.length;Z<re;Z++)P(C[Z])&&(z>0||z<0)?j(C[Z],Math.max(-1,z-1)):v.push(C[Z])}return j(p,x),v}function gn(p,x){if(x<1)return p;for(;x--&&P(p)&&p.length===1;)p=p[0];return p}function Pr(p,x){for(var v=[p],j=[x];v.length>0;)if(p=v.pop(),x=j.pop(),p!==x){var C=W(p);if(C!==W(x)||C===R)return!1;switch(C){case $:if(p.length!==x.length)return!1;Xt(v,p),Xt(j,x);break;case q:var z=Be(p),Z=Be(x);if(z.length!==Z.length)return!1;z.sort(),Z.sort();for(var re=0,me=z.length;re<me;re++){var fe=z[re];if(fe!==Z[re])return!1;v.push(p[fe]),j.push(x[fe])}break;default:if(Fr(p)!==Fr(x))return!1}}return v.length===0}function Ln(p){var x={},v=[];return Re(p,function(j){var C=Mr(j);ct(x,C)||(v.push(j),x[C]=0)}),v}function Fr(p){var x=W(p);switch(x){case k:case M:case O:return p.toString();case T:return JSON.stringify(p);case A:return p.toISOString();case g:case b:return x;case $:return"["+p.map(Fr)+"]";default:var v=x===q?"":"".concat(je(p)),j=Be(p);return j.sort(),"".concat(v,"{")+j.map(function(C){return"".concat(Fr(C),":").concat(Fr(p[C]))})+"}"}}function Mr(p){if(oe(p))return null;for(var x=0,v=Fr(p),j=v.length;j;)x=(x<<5)-x^v.charCodeAt(--j);return x>>>0}function Pn(p,x){return p<x?-1:p>x?1:0}function cs(p,x,v){var j=[],C=[],z={};if(v=v||Pn,ze(p))return p;for(var Z=0;Z<p.length;Z++){var re=p[Z],me=x(re,Z);oe(me)?C.push(re):(z[me]?z[me].push(re):z[me]=[re],j.push(me))}j.sort(v);for(var fe=0;fe<j.length;fe++)Xt(C,z[j[fe]]);return C}function us(p,x){var v={keys:[],groups:[]},j={};return Re(p,function(C){var z=x(C),Z=Mr(z),re=-1;j[Z]===void 0&&(re=v.keys.length,j[Z]=re,v.keys.push(z),v.groups.push([])),re=j[Z],v.groups[re].push(C)}),v}function Xt(p,x){return ne.apply(p,x),p}function ta(p,x){for(var v=0,j=p.length-1;v<=j;){var C=Math.round(v+(j-v)/2);if(x<p[C])j=C-1;else if(x>p[C])v=C+1;else return C}return v}function ml(p){var x=this;return(function(v){return function(){for(var j=arguments.length,C=new Array(j),z=0;z<j;z++)C[z]=arguments[z];var Z=Mr(C);return ct(v,Z)||(v[Z]=p.apply(x,C)),v[Z]}})({})}function ra(p,x){return xe(p)?p[x]:void 0}function gr(p,x){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},j=0;v.meta=v.meta||!1;function C(z,Z){for(var re=z,me=0;me<Z.length;me++){var fe=Z[me],Ie=fe.match(/^\d+$/)===null;if(Ie&&P(re)){if(me===0&&j>0)break;j+=1,Z=Z.slice(me),re=kt(re,function(_e,nt){var Xe=C(nt,Z);return Xe!==void 0&&_e.push(Xe),_e},[]);break}else re=ra(re,fe);if(re===void 0)break}return re}return p=Ce(K,W(p))?p:C(p,x.split(".")),v.meta?{result:p,depth:j}:p}function xn(p,x){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};v.preserveMissingValues=v.preserveMissingValues||!1;var j=x.split("."),C=j[0],z=j.length===1||j.slice(1).join("."),Z=C.match(/^\d+$/)!==null,re=j.length>1,me,fe;try{P(p)?Z?(me=ra(p,Number(C)),re&&(me=xn(me,z,v)),me=[me]):(me=[],Re(p,function(Ie){fe=xn(Ie,x,v),v.preserveMissingValues?(fe===void 0&&(fe=te),me.push(fe)):fe!==void 0&&me.push(fe)})):(fe=ra(p,C),re&&(fe=xn(fe,z,v)),Q(fe!==void 0),me={},me[C]=fe)}catch{me=void 0}return me}function fs(p){if(P(p))for(var x=p.length-1;x>=0;x--)p[x]===te?p.splice(x,1):fs(p[x]);else if(ee(p))for(var v in p)p.hasOwnProperty(v)&&fs(p[v]);return p}function na(p,x,v){var j=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,C=x.split("."),z=C[0],Z=C.length===1||C.slice(1).join(".");C.length===1?v(p,z):(j===!0&&oe(p[z])&&(p[z]={}),na(p[z],Z,v,j))}function sa(p,x,v){na(p,x,function(j,C){j[C]=v},!0)}function aa(p,x){na(p,x,function(v,j){P(v)&&/^\d+$/.test(j)?v.splice(parseInt(j),1):ee(v)&&delete v[j]})}function oa(p){return!!p&&p[0]==="$"}function ia(p){if(Ce(K,W(p)))return De(p)?{$regex:p}:{$eq:p};if(xe(p)){var x=Be(p);if(!x.some(oa))return{$eq:p};if(Ce(x,"$regex")){var v=p.$regex,j=p.$options||"",C="";ge(v)&&(C+=v.ignoreCase||j.indexOf("i")>=0?"i":"",C+=v.multiline||j.indexOf("m")>=0?"m":"",C+=v.global||j.indexOf("g")>=0?"g":"",v=new RegExp(v,C)),p.$regex=v,delete p.$options}}return p}function la(p,x){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;return oe(v)?x<0?(x=Math.max(0,p.length+x),v=p.length-x+1):(v=x,x=0):(x<0&&(x=Math.max(0,p.length+x)),Q(v>0,"Invalid argument value for $slice operator. Limit must be a positive number"),v+=x),p.slice(x,v)}function co(p,x){var v=kt(p,function(Z,re){return Z+re},0),j=p.length||1,C=x&&1||0,z=v/j;return Math.sqrt(kt(p,function(Z,re){return Z+Math.pow(re-z,2)},0)/(j-C))}function gl(){return{assert:Q,clone:be,cloneDeep:se,each:Re,err:le,hashCode:Mr,getType:je,has:ct,includes:Ce.bind(null),isArray:P,isBoolean:he,isDate:Te,isEmpty:ze,isEqual:Pr,isFunction:Me,isNil:oe,isNull:Ee,isNumber:U,isObject:ee,isRegExp:De,isString:ge,isUndefined:Ae,keys:Be,reduce:kt,resolve:gr,resolveObj:xn}}var ds=function(){return Object.assign({computeValue:pe,ops:ua},gl())},uo={key:"_id"};function ca(p){Object.assign(uo,p||{})}var fo={$$ROOT:function(x,v,j){return j.root},$$CURRENT:function(x,v,j){return x},$$REMOVE:function(x,v,j){}},po={$$KEEP:function(x){return x},$$PRUNE:function(){},$$DESCEND:function(x,v,j){if(!ct(v,"$cond"))return x;var C;return Re(x,function(z,Z){xe(z)&&(P(z)?(C=[],Re(z,function(re){ee(re)&&(re=hs(re,v,j)),oe(re)||C.push(re)})):C=hs(z,v,j),oe(C)?delete x[Z]:x[Z]=C)}),x}},ho=Be(fo),mo=Be(po);function bn(){return uo.key}function ua(){var p=Array.prototype.slice.call(arguments);return kt(p,function(x,v){return Xt(x,Be(_t[v]))},[])}function ps(p,x,v){if(ct(_t[Y],x))return _t[Y][x](p,v);if(ee(v)){var j={};return Re(v,function(C,z){if(j[z]=ps(p,z,v[z]),ct(_t[Y],z))return j=j[z],Q(Be(v).length===1,"Invalid $group expression '"+JSON.stringify(v)+"'"),!1}),j}}function pe(p,x){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,j=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(j.root=j.root||p,ct(_t[X],v))return _t[X][v](p,x,j);if(ct(_t[Y],v))return p=pe(p,x,null,j),Q(P(p),v+" expression must resolve to an array"),_t[Y][v](p,null,j);if(ge(x)&&x.length>0&&x[0]==="$"){if(Ce(ho,x))return fo[x](p,null,j);if(Ce(mo,x))return x;var C=ho.filter(function(Z){return x.indexOf(Z+".")===0});return C.length===1&&(C=C[0],C==="$$ROOT"&&(p=j.root),x=x.substr(C.length)),gr(p,x.slice(1))}switch(W(x)){case $:return x.map(function(Z){return pe(p,Z)});case q:var z={};return Re(x,function(Z,re){if(z[re]=pe(p,Z,re,j),[X,Y].some(function(me){return ct(_t[me],re)}))return Q(Be(x).length===1,"Invalid aggregation expression '"+JSON.stringify(x)+"'"),z=z[re],!1}),z;default:return x}}function hs(p,x){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};v.root=v.root||p;var j=pe(p,x,null,v);return Ce(mo,j)?po[j](p,x,v):j}function xl(p,x){var v=pe(p,x);return v==null?null:Math.abs(v)}function bl(p,x){var v=pe(p,x),j=!1,C=kt(v,function(z,Z){return Te(Z)&&(Q(!j,"'$add' can only have one date value"),j=!0,Z=Z.getTime()),z+=Z,z},0);return j?new Date(C):C}function vl(p,x){var v=pe(p,x);return oe(v)?null:(Q(U(v)||isNaN(v),"$ceil expression must resolve to a number."),Math.ceil(v))}function wl(p,x){var v=pe(p,x);return v[0]/v[1]}function yl(p,x){var v=pe(p,x);return oe(v)?null:(Q(U(v)||isNaN(v),"$exp expression must resolve to a number."),Math.exp(v))}function _l(p,x){var v=pe(p,x);return oe(v)?null:(Q(U(v)||isNaN(v),"$floor expression must resolve to a number."),Math.floor(v))}function ms(p,x){var v=pe(p,x);return oe(v)?null:(Q(U(v)||isNaN(v),"$ln expression must resolve to a number."),Math.log(v))}function kl(p,x){var v=pe(p,x),j="$log expression must resolve to array(2) of numbers";return Q(P(v)&&v.length===2,j),v.some(oe)?null:(Q(v.some(isNaN)||v.every(U),j),Math.log10(v[0])/Math.log10(v[1]))}function gs(p,x){var v=pe(p,x);return oe(v)?null:(Q(U(v)||isNaN(v),"$log10 expression must resolve to a number."),Math.log10(v))}function Ml(p,x){var v=pe(p,x);return v[0]%v[1]}function jl(p,x){var v=pe(p,x);return kt(v,function(j,C){return j*C},1)}function El(p,x){var v=pe(p,x);return Q(P(v)&&v.length===2&&v.every(U),"$pow expression must resolve to array(2) of numbers"),Q(!(v[0]===0&&v[1]<0),"$pow cannot raise 0 to a negative exponent"),Math.pow(v[0],v[1])}function go(p,x){var v=pe(p,x),j=v[0],C=v[1];return oe(j)||isNaN(j)||Math.abs(j)===1/0?j:(Q(U(j),"$round expression must resolve to a number."),vo(j,C,!0))}function xo(p,x){var v=pe(p,x);return oe(v)?null:(Q(U(v)&&v>0||isNaN(v),"$sqrt expression must resolve to non-negative number."),Math.sqrt(v))}function bo(p,x){var v=pe(p,x);return v[0]-v[1]}function Tl(p,x){var v=pe(p,x),j=v[0],C=v[1];return oe(j)||isNaN(j)||Math.abs(j)===1/0?j:(Q(U(j),"$trunc expression must resolve to a number."),Q(oe(C)||U(C)&&C>-20&&C<100,"$trunc expression has invalid place"),vo(j,C,!1))}function vo(p,x,v){x=x||0;var j=Math.abs(p)===p?1:-1;p=Math.abs(p);var C=Math.trunc(p),z=p-C;if(x===0){var Z=Math.trunc(10*z);v&&(C&1)===1&&Z>=5&&C++}else if(x>0){var re=Math.pow(10,x),me=Math.trunc(z*re),fe=Math.trunc(z*re*10)%10;v&&fe>5&&(me+=1),C+=me/re}else if(x<0){var Ie=Math.pow(10,-1*x),_e=C%Ie;if(C=Math.max(0,C-_e),v&&j===-1){for(;_e>10;)_e-=_e%10;C>0&&_e>=5&&(C+=Ie)}}return C*j}function Nl(p,x){var v=pe(p,x);Q(P(v)&&v.length===2,"$arrayElemAt expression must resolve to array(2)"),Q(P(v[0]),"First operand to $arrayElemAt must resolve to an array"),Q(U(v[1]),"Second operand to $arrayElemAt must resolve to an integer");var j=v[1];if(v=v[0],j<0&&Math.abs(j)<=v.length)return v[j+v.length];if(j>=0&&j<v.length)return v[j]}function Sl(p,x){var v=pe(p,x);return Q(P(v),"$arrayToObject expression must resolve to an array"),kt(v,function(j,C){return P(C)&&C.length==2?j[C[0]]=C[1]:(Q(ee(C)&&ct(C,"k")&&ct(C,"v"),"$arrayToObject expression is invalid."),j[C.k]=C.v),j},{})}function wo(p,x){var v=pe(p,x,null);return Q(P(v),"$concatArrays must resolve to an array"),v.some(oe)?null:v.reduce(function(j,C){return Xt(j,C)},[])}function yo(p,x){var v=pe(p,x.input),j=x.as,C=x.cond;return Q(P(v),"$filter 'input' expression must resolve to an array"),v.filter(function(z){var Z={};return Z["$"+j]=z,pe(Z,C)===!0})}function _o(p,x){var v=pe(p,x[0]),j=pe(p,x[1]);return Q(P(j),"$in second argument must be an array"),j.some(Pr.bind(null,v))}function fa(p,x){var v=pe(p,x);if(oe(v))return null;var j=v[0],C=v[1];if(oe(j))return null;Q(P(j),"$indexOfArray expression must resolve to an array.");var z=v[2]||0,Z=v[3];return oe(Z)&&(Z=j.length),z>Z?-1:(Q(z>=0&&Z>=0,"$indexOfArray expression is invalid"),(z>0||Z<j.length)&&(j=j.slice(z,Z)),j.findIndex(Pr.bind(null,C))+z)}function Al(p,x){return P(pe(p,x[0]))}function ko(p,x){var v=pe(p,x.input);Q(P(v),"$map 'input' expression must resolve to an array");var j=x.as,C=x.in,z="$"+j;return v.map(function(Z){return p[z]=Z,pe(p,C)})}function xs(p,x){var v=pe(p,x);Q(ee(v),"$objectToArray expression must resolve to an object");var j=[];return Re(v,function(C,z){return j.push({k:z,v:C})}),j}function Mo(p,x){for(var v=pe(p,x),j=v[0],C=v[1],z=v[2]||1,Z=[];j<C&&z>0||j>C&&z<0;)Z.push(j),j+=z;return Z}function Cl(p,x){var v=pe(p,x.input),j=pe(p,x.initialValue),C=x.in;return oe(v)?null:(Q(P(v),"$reduce 'input' expression must resolve to an array"),kt(v,function(z,Z){return pe({$value:z,$this:Z},C)},j))}function jo(p,x){var v=pe(p,x);if(oe(v))return null;Q(P(v),"$reverseArray expression must resolve to an array");var j=[];return Xt(j,v),j.reverse(),j}function Eo(p,x){var v=pe(p,x);return P(v)?v.length:void 0}function da(p,x){var v=pe(p,x);return la(v[0],v[1],v[2])}function Il(p,x){var v=pe(p,x.inputs),j=x.useLongestLength||!1;Q(P(v),"'inputs' expression must resolve to an array"),Q(he(j),"'useLongestLength' must be a boolean"),P(x.defaults)&&Q(at(j),"'useLongestLength' must be set to true to use 'defaults'");for(var C=0,z=0,Z=v.length;z<Z;z++){var re=v[z];if(oe(re))return null;Q(P(re),"'inputs' expression values must resolve to an array or null"),C=j?Math.max(C,re.length):Math.min(C||re.length,re.length)}for(var me=[],fe=x.defaults||[],Ie=function(Xe){var pt=v.map(function($t,ir){return oe($t[Xe])?fe[ir]||null:$t[Xe]});me.push(pt)},_e=0;_e<C;_e++)Ie(_e);return me}function To(p,x){var v=pe(p,x);return P(v)?kt(v,function(j,C){return Object.assign(j,C)},{}):{}}function pa(p,x){var v=pe(p,x);return at(v)&&v.every(at)}function ha(p,x){var v=pe(p,x);return at(v)&&v.some(at)}function vn(p,x){return!pe(p,x[0])}function Zt(p){return p instanceof vs?p:new vs(p)}Zt.isIterator=ma;function ma(p){return!!p&&a(p)==="object"&&ga(p.next)}function ga(p){return!!p&&typeof p=="function"}function No(p,x){var v=p.slice(x+1);p.splice(x),Array.prototype.push.apply(p,v)}var bs=new Error,xa=1,ba=2,So=3,Ao=4;function Dl(p,x,v){var j=!1,C=-1,z=0;return function(Z){Z=Z===v;try{e:for(;!j;){var re=p();C++;for(var me=-1,fe=x.length,Ie=!1;++me<fe;){var _e=x[me],nt=_e.func,Xe=_e.type;switch(Xe){case xa:re=nt(re,C);break;case ba:if(!nt(re,C))continue e;break;case So:--_e.func,_e.func||(Ie=!0);break;case Ao:--_e.func,_e.func||No(x,me);continue e;default:break e}}if(j=Ie,Z)v[z++]=re;else return{value:re,done:!1}}}catch(pt){if(pt!==bs)throw pt}return j=!0,{done:!0}}}var vs=(function(){function p(x){if(o(this,p),this.__iteratees=[],this.__first=!1,this.__done=!1,this.__buf=[],ga(x)&&(x={next:x}),ma(x)){var v=x;x=function(){var re=v.next();if(re.done)throw bs;return re.value}}else if(Array.isArray(x)){var j=x,C=j.length,z=0;x=function(){if(z<C)return j[z++];throw bs}}else if(!ga(x))throw new Error("Source is not iterable. Must be Array, Function or Object{next:Function}");this.next=Dl(x,this.__iteratees,this.__buf)}return h(p,[{key:"_validate",value:function(){if(this.__first)throw new Error("Cannot add iteratee/transform after `first()`")}},{key:"_push",value:function(v){return this._validate(),this.__iteratees.push(v),this}},{key:"map",value:function(v){return this._push({type:xa,func:v})}},{key:"filter",value:function(v){return this._push({type:ba,func:v})}},{key:"take",value:function(v){return v>0?this._push({type:So,func:v}):this}},{key:"drop",value:function(v){return v>0?this._push({type:Ao,func:v}):this}},{key:"transform",value:function(v){this._validate();var j=this,C;return Zt(function(){return C||(C=Zt(v(j.value()))),C.next()})}},{key:"first",value:function(){return this.take(1),this.__first=!0,this}},{key:"value",value:function(){return this.__done||(this.__done=this.next(this.__buf).done),this.__first?this.__buf[0]:this.__buf}},{key:"each",value:function(v){for(;;){var j=this.next();if(j.done)break;if(v(j.value)===!1)return!1}return!0}},{key:"reduce",value:function(v,j){var C=this.next(),z=0;for(j===void 0&&!C.done&&(j=C.value,C=this.next(),z++);!C.done;)j=v(j,C.value,z++),C=this.next();return j}},{key:"size",value:function(){return this.reduce(function(v,j){return++v},0)}}]),p})();typeof Symbol=="function"&&(vs.prototype[Symbol.iterator]=function(){return this});var ws=(function(){function p(x,v){o(this,p),this.__operators=x,this.__options=v}return h(p,[{key:"stream",value:function(v,j){var C=this;v=Zt(v);var z=_t[L];return ze(this.__operators)||Re(this.__operators,function(Z){var re=Be(Z);Q(re.length===1&&Ce(ua(L),re[0]),"invalid aggregation operator ".concat(re)),re=re[0],j&&j instanceof xr?v=z[re].call(j,v,Z[re],C.__options):v=z[re](v,Z[re],C.__options)}),v}},{key:"run",value:function(v,j){return this.stream(v,j).value()}}]),p})();function Co(p,x,v){return Q(P(x),"Aggregation pipeline must be an array"),new ws(x,v).run(p)}var va=(function(){function p(x,v,j){o(this,p),this.__filterFn=v.test.bind(v),this.__query=v,this.__source=x,this.__projection=j||v.__projection,this.__operators=[],this.__result=null,this.__stack=[],this.__options={}}return h(p,[{key:"_fetch",value:function(){return this.__result?this.__result:(ee(this.__projection)&&this.__operators.push({$project:this.__projection}),this.__result=Zt(this.__source).filter(this.__filterFn),this.__operators.length>0&&(this.__result=new ws(this.__operators,this.__options).stream(this.__result,this.__query)),this.__result)}},{key:"all",value:function(){return this._fetch().value()}},{key:"count",value:function(){return this.all().length}},{key:"skip",value:function(v){return this.__operators.push({$skip:v}),this}},{key:"limit",value:function(v){return this.__operators.push({$limit:v}),this}},{key:"sort",value:function(v){return this.__operators.push({$sort:v}),this}},{key:"collation",value:function(v){return this.__options.collation=v,this}},{key:"next",value:function(){if(this.__stack){if(this.__stack.length>0)return this.__stack.pop();var v=this._fetch().next();if(!v.done)return v.value;this.__stack=null}}},{key:"hasNext",value:function(){if(!this.__stack)return!1;if(this.__stack.length>0)return!0;var v=this._fetch().next();return v.done?this.__stack=null:this.__stack.push(v.value),!!this.__stack}},{key:"map",value:function(v){return this._fetch().map(v).value()}},{key:"forEach",value:function(v){this._fetch().each(v)}}]),p})();typeof Symbol=="function"&&(va.prototype[Symbol.iterator]=function(){return this._fetch()});var xr=(function(){function p(x,v){o(this,p),this.__criteria=x,this.__projection=v||{},this.__compiled=[],this._compile()}return h(p,[{key:"_compile",value:function(){var v=this;Q(ee(this.__criteria),"query criteria must be an object");var j;Re(this.__criteria,function(C,z){z==="$where"?j={field:z,expr:C}:z==="$expr"||Ce(["$and","$or","$nor"],z)?v._processOperator(z,z,C):(Q(!oa(z),"unknown top level operator: ".concat(z)),C=ia(C),Re(C,function(Z,re){v._processOperator(z,re,Z)})),ee(j)&&v._processOperator(j.field,j.field,j.expr)})}},{key:"_processOperator",value:function(v,j,C){Q(ct(_t[J],j),"invalid query operator ".concat(j," detected")),this.__compiled.push(_t[J][j](v,C))}},{key:"test",value:function(v){for(var j=0,C=this.__compiled.length;j<C;j++)if(!this.__compiled[j](v))return!1;return!0}},{key:"find",value:function(v,j){return new va(v,this,j)}},{key:"remove",value:function(v){var j=this;return kt(v,function(C,z){return j.test(z)||C.push(z),C},[])}}]),p})();function wa(p,x,v){return new xr(x).find(p,v)}function Rl(p,x){return new xr(x).remove(p)}function ya(p,x){if(Pr(p,x)||oe(p)&&oe(x))return!0;if(P(p)){var v=Pr.bind(null,x);return p.some(v)||mn(p,1).some(v)}return!1}function Io(p,x){return!ya(p,x)}function Do(p,x){return oe(p)?x.some(Ee):Ar(wt(p),x).length>0}function Ro(p,x){return!Do(p,x)}function ht(p,x){return wn(p,x,function(v,j){return v<j})}function ft(p,x){return wn(p,x,function(v,j){return v<=j})}function Oo(p,x){return wn(p,x,function(v,j){return v>j})}function $o(p,x){return wn(p,x,function(v,j){return v>=j})}function Ol(p,x){return wt(p).some(function(v){return U(v)&&P(x)&&x.length===2&&v%x[0]===x[1]})}function $l(p,x){p=wt(p);var v=function(C){return ge(C)&&!!C.match(x)};return p.some(v)||mn(p,1).some(v)}function Ll(p,x){return(x===!1||x===0)&&p===void 0||(x===!0||x===1)&&p!==void 0}function Pl(p,x){var v=!1;if(P(p)&&P(x))for(var j=0,C=x.length;j<C;j++)if(ee(x[j])&&Ce(Be(x[j]),"$elemMatch"))v=v||Po(p,x[j].$elemMatch);else return Ar(x,p).length===C;return v}function Lo(p,x){return P(p)&&U(x)&&p.length===x}function Po(p,x){if(P(p)&&!ze(p)){var v=function(me){return me},j=x;Be(x).every(oa)&&(j={temp:x},v=function(me){return{temp:me}});for(var C=new xr(j),z=0,Z=p.length;z<Z;z++)if(C.test(v(p[z])))return!0}return!1}function Pt(p,x){switch(x){case 1:case"double":return U(p)&&(p+"").indexOf(".")!==-1;case 2:case T:return ge(p);case 3:case q:return ee(p);case 4:case $:return P(p);case 6:case b:return oe(p);case 8:case _:return he(p);case 9:case A:return Te(p);case 10:case g:return Ee(p);case 11:case I:return De(p);case 16:case"int":return U(p)&&p<=2147483647&&(p+"").indexOf(".")===-1;case 18:case"long":return U(p)&&p>2147483647&&p<=9223372036854776e3&&(p+"").indexOf(".")===-1;case 19:case"decimal":return U(p);default:return!1}}function wn(p,x,v){return wt(p).some(function(j){return je(j)===je(x)&&v(j,x)})}function Qt(p){return function(x,v){var j=pe(x,v);return p(j[0],j[1])}}var Fo=Qt(ya),_a=Qt(Io),ar=Qt(Oo),Uo=Qt(ht),zo=Qt($o),Ho=Qt(ft),Bo=Qt(Ro);function Wo(p,x){var v=pe(p,x);return v[0]>v[1]?1:v[0]<v[1]?-1:0}function qo(p,x){var v,j,C,z="$cond: invalid arguments";P(x)?(Q(x.length===3,z),v=x[0],j=x[1],C=x[2]):(Q(ee(x),z),v=x.if,j=x.then,C=x.else);var Z=pe(p,v);return Z?pe(p,j):pe(p,C)}function Jt(p,x){var v="Invalid arguments for $switch operator";Q(x.branches,v);var j=x.branches.find(function(C){return Q(C.case&&C.then,v),pe(p,C.case)});return j?pe(p,j.then):(Q(x.default,v),pe(p,x.default))}function Fl(p,x){Q(P(x)&&x.length===2,"$ifNull expression must resolve to array(2)");var v=pe(p,x);return oe(v[0])?v[1]:v[0]}function er(p,x){var v=pe(p,x),j=new Date(v.getFullYear(),0,0),C=v-j,z=1e3*60*60*24;return Math.round(C/z)}function Yo(p,x){var v=pe(p,x);return v.getDate()}function ka(p,x){var v=pe(p,x);return v.getDay()+1}function Cr(p,x){var v=pe(p,x);return v.getFullYear()}function Fn(p,x){var v=pe(p,x);return v.getMonth()+1}function ys(p,x){var v=pe(p,x);v=new Date(+v),v.setHours(0,0,0),v.setDate(v.getDate()+4-(v.getDay()||7));var j=new Date(v.getFullYear(),0,1);return Math.floor(((v-j)/864e5+1)/7)}function gt(p,x){var v=pe(p,x);return v.getUTCHours()}function Ir(p,x){var v=pe(p,x);return v.getMinutes()}function _s(p,x){var v=pe(p,x);return v.getSeconds()}function Go(p,x){var v=pe(p,x);return v.getMilliseconds()}var Ma={"%Y":[Cr,4],"%m":[Fn,2],"%d":[Yo,2],"%H":[gt,2],"%M":[Ir,2],"%S":[_s,2],"%L":[Go,3],"%j":[er,3],"%w":[ka,1],"%U":[ys,2],"%%":"%"};function Ul(p,x){for(var v=x.format,j=pe(p,x.date),C=v.match(/(%%|%Y|%m|%d|%H|%M|%S|%L|%j|%w|%U)/g),z=0,Z=C.length;z<Z;z++){var re=Ma[C[z]],me=re;if(P(re)){var fe=re[0],Ie=re[1];me=zl(fe(p,j),Ie)}v=v.replace(C[z],me)}return v}function zl(p,x){return new Array(Math.max(x-String(p).length+1,0)).join("0")+p}function Hl(p,x){return x}function Xo(p,x){var v=pe(p,x),j=Ln(v[0]),C=Ln(v[1]);return j.length===C.length&&j.length===Ar(j,C).length}function ks(p,x){var v=pe(p,x);return Ar(v[0],v[1])}function yn(p,x){var v=pe(p,x);return v[0].filter(qe.bind(null,v[1]))}function Bl(p,x){var v=pe(p,x);return hl(v[0],v[1])}function Ko(p,x){var v=pe(p,x);return Ar(v[0],v[1]).length===v[0].length}function Vo(p,x){var v=pe(p,x)[0];return v.some(at)}function ja(p,x){var v=pe(p,x)[0];return v.every(at)}function Ea(p,x){var v=pe(p,x);return[null,void 0].some(Ce.bind(null,v))?null:v.join("")}function Zo(p,x){var v=pe(p,x),j="$indexOfBytes expression resolves to invalid an argument";if(oe(v[0]))return null;Q(ge(v[0])&&ge(v[1]),j);var C=v[0],z=v[1],Z=v[2],re=v[3],me=oe(Z)||U(Z)&&Z>=0&&Math.round(Z)===Z;if(me=me&&(oe(re)||U(re)&&re>=0&&Math.round(re)===re),Q(me,j),Z=Z||0,re=re||C.length,Z>re)return-1;var fe=C.substring(Z,re).indexOf(z);return fe>-1?fe+Z:fe}function Wl(p,x){var v=pe(p,x);return oe(v[0])?null:(Q(v.every(ge),"$split expression must result to array(2) of strings"),v[0].split(v[1]))}function Ta(p,x){return~-encodeURI(pe(p,x)).split(/%..|./).length}function Na(p,x){return pe(p,x).length}function ql(p,x){var v=pe(p,x),j=v[0],C=v[1];return Pr(j,C)||v.every(oe)?0:(Q(v.every(ge),"$strcasecmp must resolve to array(2) of strings"),j=j.toUpperCase(),C=C.toUpperCase(),j>C&&1||j<C&&-1||0)}function Qo(p,x){var v=pe(p,x),j=v[0],C=v[1],z=v[2];Q(ge(j)&&U(C)&&C>=0&&U(z)&&z>=0,"$substrBytes: invalid arguments");for(var Z=Gl(j),re=[],me=0,fe=0;fe<Z.length;fe++)re.push(me),me+=Z[fe].length;var Ie=re.indexOf(C),_e=re.indexOf(C+z);return Q(Ie>-1&&_e>-1,"$substrBytes: invalid range, start or end index is a UTF-8 continuation byte."),j.substring(Ie,_e)}function Kt(p,x){var v=pe(p,x),j=v[0],C=v[1],z=v[2];return ge(j)?C<0?"":z<0?j.substr(C):j.substr(C,z):""}function Sa(p,x){return Kt(p,x)}function Un(p,x){var v=pe(p,x);return ze(v)?"":v.toLowerCase()}function Jo(p,x){var v=pe(p,x);return ze(v)?"":v.toUpperCase()}var ei=[192,224,240];function Yl(p){if(p<128)return[p];for(var x=p<2048&&1||p<65536&&2||3,v=ei[x-1],j=[(p>>6*x)+v];x>0;)j.push(128|p>>6*--x&63);return j}function Gl(p){for(var x=[],v=0,j=p.length;v<j;v++)x.push(Yl(p.codePointAt(v)));return x}function Xl(p,x){var v=x.vars,j=x.in,C=Be(v);return Re(C,function(z){var Z=pe(p,v[z]),re="$"+z;p[re]=Z}),pe(p,j)}var Kl=Object.freeze({__proto__:null,$abs:xl,$add:bl,$ceil:vl,$divide:wl,$exp:yl,$floor:_l,$ln:ms,$log:kl,$log10:gs,$mod:Ml,$multiply:jl,$pow:El,$round:go,$sqrt:xo,$subtract:bo,$trunc:Tl,$arrayElemAt:Nl,$arrayToObject:Sl,$concatArrays:wo,$filter:yo,$in:_o,$indexOfArray:fa,$isArray:Al,$map:ko,$objectToArray:xs,$range:Mo,$reduce:Cl,$reverseArray:jo,$size:Eo,$slice:da,$zip:Il,$mergeObjects:To,$and:pa,$or:ha,$not:vn,$eq:Fo,$ne:_a,$gt:ar,$lt:Uo,$gte:zo,$lte:Ho,$nin:Bo,$cmp:Wo,$cond:qo,$switch:Jt,$ifNull:Fl,$dayOfYear:er,$dayOfMonth:Yo,$dayOfWeek:ka,$year:Cr,$month:Fn,$week:ys,$hour:gt,$minute:Ir,$second:_s,$millisecond:Go,$dateToString:Ul,$literal:Hl,$setEquals:Xo,$setIntersection:ks,$setDifference:yn,$setUnion:Bl,$setIsSubset:Ko,$anyElementTrue:Vo,$allElementsTrue:ja,$concat:Ea,$indexOfBytes:Zo,$split:Wl,$strLenBytes:Ta,$strLenCP:Na,$strcasecmp:ql,$substrBytes:Qo,$substr:Kt,$substrCP:Sa,$toLower:Un,$toUpper:Jo,$let:Xl});function Ur(p,x){return oe(x)?p:p.map(function(v){return pe(v,x)})}function _n(p,x){return Ln(Ur(p,x))}function Vl(p,x){var v=Ur(p,x).filter(U),j=kt(v,function(C,z){return C+z},0);return j/(v.length||1)}function Zl(p,x){return p.length>0?pe(p[0],x):void 0}function Aa(p,x){return p.length>0?pe(p[p.length-1],x):void 0}function ti(p,x){return kt(Ur(p,x),function(v,j){return oe(v)||j>v?j:v},void 0)}function zr(p,x){return kt(p,function(v,j){return Object.assign(v,pe(j,x))},{})}function Ms(p,x){return kt(Ur(p,x),function(v,j){return oe(v)||j<v?j:v},void 0)}function Ql(p,x){return co(Ur(p,x).filter(U),!1)}function Jl(p,x){return co(Ur(p,x).filter(U),!0)}function ec(p,x){return P(p)?U(x)?p.length*x:kt(Ur(p,x).filter(U),function(v,j){return v+j},0):0}var kn=Object.freeze({__proto__:null,$addToSet:_n,$avg:Vl,$first:Zl,$last:Aa,$max:ti,$mergeObjects:zr,$min:Ms,$push:Ur,$stdDevPop:Ql,$stdDevSamp:Jl,$sum:ec});function or(p,x,v){var j=Be(x);return j.length===0?p:p.map(function(C){var z=se(C);return Re(j,function(Z){var re=pe(C,x[Z]);sa(z,Z,re)}),z})}var ri=or;function tc(p,x,v){var j=x.boundaries,C=x.default,z=j[0],Z=j[j.length-1],re=x.output||{count:{$sum:1}};Q(j.length>2,"$bucket 'boundaries' expression must have at least 3 elements");for(var me=je(z),fe=0,Ie=j.length-1;fe<Ie;fe++)Q(me===je(j[fe+1]),"$bucket 'boundaries' must all be of the same type"),Q(j[fe]<j[fe+1],"$bucket 'boundaries' must be sorted in ascending order");!oe(C)&&je(x.default)===je(z)&&Q(z>x.default||Z<x.default,"$bucket 'default' expression must be out of boundaries range");var _e={};Re(j,function(Xe){return _e[Xe]=[]}),oe(C)||(_e[C]=[]);var nt=!1;return Zt(function(){return nt||(p.each(function(Xe){var pt=pe(Xe,x.groupBy);if(oe(pt)||pt<z||pt>=Z)Q(!oe(C),"$bucket require a default for out of range values"),_e[C].push(Xe);else{Q(pt>=z&&pt<Z,"$bucket 'groupBy' expression must resolve to a value in range of boundaries");var $t=ta(j,pt),ir=j[Math.max(0,$t-1)];_e[ir].push(Xe)}}),j.pop(),oe(C)||j.push(C),nt=Zt(j).map(function(Xe){var pt=ps(_e[Xe],null,re);return Object.assign(pt,{_id:Xe})})),nt.next()})}function rc(p,x,v){var j=x.output||{count:{$sum:1}},C=x.groupBy,z=x.buckets;return Q(z>0,"The $bucketAuto 'buckets' field must be greater than 0, but found: "+z),p.transform(function(Z){for(var re=Math.max(1,Math.round(Z.length/z)),me=ml(pe),fe={},Ie=[],_e=cs(Z,function(Da){var Bn=me(Da,C);return oe(Bn)?Ie.push(Da):(fe[Bn]||(fe[Bn]=[]),fe[Bn].push(Da)),Bn}),nt=bn(),Xe=[],pt=0,$t=0,ir=_e.length;$t<z&&pt<ir;$t++){for(var N={},br=[],Hn=0;Hn<re&&pt<ir;Hn++){var Lt=me(_e[pt],C);if(oe(Lt)&&(Lt=null),Xt(br,oe(Lt)?Ie:fe[Lt]),pt+=oe(Lt)?Ie.length:fe[Lt].length,ct(N,"min")||(N.min=Lt),Xe.length>0){var Ke=Xe[Xe.length-1];Ke[nt].max=N.min}}$t==z-1&&Xt(br,_e.slice(pt)),Xe.push(Object.assign(ps(br,null,j),{_id:N}))}return Xe.length>0&&(Xe[Xe.length-1][nt].max=me(_e[_e.length-1],C)),Xe})}function nc(p,x,v){return Q(ge(x)&&x.trim()!==""&&x.indexOf(".")===-1&&x.trim()[0]!=="$","Invalid expression value for $count"),Zt(function(){var j={};return j[x]=p.size(),{value:j,done:!1}}).first()}function sc(p,x,v){return p.transform(function(j){return[hr(x,function(C){return Co(j,C)})]})}function ni(p,x,v){var j=bn(),C=x[j];return p.transform(function(z){var Z=us(z,function(fe){return pe(fe,C,C)});x=be(x),delete x[j];var re=-1,me=Z.keys.length;return function(){if(++re===me)return{done:!0};var fe=Z.keys[re],Ie={};return fe!==void 0&&(Ie[j]=fe),Re(x,function(_e,nt){Ie[nt]=ps(Z.groups[re],nt,_e)}),{value:Ie,done:!1}}})}function Mn(p,x,v){return p.take(x)}function G(p,x,v){var j=x.from,C=x.localField,z=x.foreignField,Z=x.as;Q(P(j)&&ge(z)&&ge(C)&&ge(Z),"$lookup: invalid argument");var re={};return Re(j,function(me){var fe=Mr(gr(me,z));re[fe]=re[fe]||[],re[fe].push(me)}),p.map(function(me){var fe=Mr(gr(me,C)),Ie=be(me);return Ie[Z]=re[fe]||[],Ie})}function ie(p,x,v){var j=new xr(x);return p.filter(function(C){return j.test(C)})}function ae(p,x,v){return Q(P(x),"$out expression must be an array"),p.map(function(j){return x.push(j),j})}function ke(p,x,v){if(ze(x))return p;var j=Be(x),C=!1,z=bn();if(tt(x),Ce(j,z)){var Z=x[z];(Z===0||Z===!1)&&(j=j.filter(qe.bind(null,[z])),Q(qe(j,z),"Must not contain collections id key"),C=ze(j))}else j.push(z);return p.map(function(re){return Pe(re,x,j,C)})}function Pe(p,x,v,j){var C=bn(),z={},Z=!1,re=!1,me=[];return j&&me.push(C),v.forEach(function(fe){var Ie,_e=x[fe];if(fe!==C&&Ce([0,!1],_e)&&(re=!0),fe===C&&ze(_e))Ie=p[fe];else if(ge(_e))Ie=pe(p,_e,fe);else if(!Ce([1,!0],_e))if(P(_e))Ie=_e.map(function(N){var br=pe(p,N);return oe(br)?null:br});else if(ee(_e)){var nt=Be(_e),Xe=nt.length>1?!1:nt[0];if(Ce(ua(B),Xe)){var pt=_t[B];Xe==="$slice"?wt(_e[Xe]).every(U)?(Ie=pt[Xe](p,_e[Xe],fe),Z=!0):Ie=pe(p,_e,fe):Ie=pt[Xe](p,_e[Xe],fe)}else if(ct(p,fe)){tt(_e);var $t=p[fe];Ie=P($t)?$t.map(function(N){return Pe(N,_e,nt,!1)}):Pe($t,_e,nt,!1)}else Ie=pe(p,_e,fe)}else{me.push(fe);return}var ir=xn(p,fe,{preserveMissingValues:!0});ir!==void 0&&mr(z,ir,{flatten:!0}),qe([0,1,!1,!0],_e)&&(Ie===void 0?aa(z,fe):sa(z,fe,Ie))}),fs(z),(Z||re||j)&&(z=Object.assign({},p,z),me.length>0&&(z=se(z),Re(me,function(fe){return aa(z,fe)}))),z}function tt(p){var x=bn(),v=[!1,!1];Re(p,function(j,C){C!==x&&(j===0||j===!1?v[0]=!0:(j===1||j===!0)&&(v[1]=!0),Q(!(v[0]&&v[1]),"Projection cannot have a mix of inclusion and exclusion."))})}function Ct(p,x,v){return p.map(function(j){return hs(se(j),x)})}function dt(p,x,v){return p.map(function(j){return j=pe(j,x.newRoot),Q(ee(j),"$replaceRoot expression must return an object"),j})}function Ca(p,x,v){var j=x.size;return Q(U(j),"$sample size must be a positive integer"),p.transform(function(C){var z=C.length,Z=-1;return function(){if(++Z===j)return{done:!0};var re=Math.floor(Math.random()*z);return{value:C[re],done:!1}}})}function ac(p,x,v){return p.drop(x)}function tr(p,x,v){if(ze(x)||!ee(x))return p;v=v||{};var j=Pn,C=v.collation;return ee(C)&&ge(C.locale)&&(j=oc(C)),p.transform(function(z){var Z=Be(x);return Re(Z.reverse(),function(re){var me=us(z,function(_e){return gr(_e,re)}),fe={},Ie=cs(me.keys,function(_e,nt){return fe[_e]=nt,_e},j);x[re]===-1&&Ie.reverse(),z=[],Re(Ie,function(_e){return Xt(z,me.groups[fe[_e]])})}),z})}var js={1:"base",2:"accent",3:"variant"};function oc(p){var x={sensitivity:js[p.strength||3],caseFirst:p.caseFirst==="off"?"false":p.caseFirst||"false",numeric:p.numericOrdering||!1,ignorePunctuation:p.alternate==="shifted"};(p.caseLevel||!1)===!0&&(x.sensitivity==="base"&&(x.sensitivity="case"),x.sensitivity==="accent"&&(x.sensitivity="variant"));var v=new Intl.Collator(p.locale,x);return function(j,C){if(!ge(j)||!ge(C))return Pn(j,C);var z=v.compare(j,C);return z<0?-1:z>0?1:0}}function jn(p,x,v){var j={count:{$sum:1}};return j[bn()]=x,tr(ni(p,j),{count:-1},v)}function Es(p,x,v){ge(x)&&(x={path:x});var j=x.path.substr(1),C=x.includeArrayIndex||!1,z=x.preserveNullAndEmptyArrays||!1,Z=function(fe,Ie){return C!==!1&&(fe[C]=Ie),fe},re;return Zt(function(){for(var me=function(){if(Zt.isIterator(re)){var _e=re.next();if(!_e.done)return{v:_e}}var nt=p.next();if(nt.done)return{v:nt};if(nt=nt.value,re=gr(nt,j),P(re))if(re.length===0&&z===!0){re=null;var Xe=se(nt);return aa(Xe,j),{v:{value:Z(Xe,null),done:!1}}}else re=Zt(re).map(function($t,ir){var N=se(nt);return sa(N,j,$t),Z(N,ir)});else if(!ze(re)||z===!0){var pt=se(nt);return{v:{value:Z(pt,null),done:!1}}}};;){var fe=me();if(a(fe)==="object")return fe.v}})}var Ts=Object.freeze({__proto__:null,$addFields:or,$set:ri,$bucket:tc,$bucketAuto:rc,$count:nc,$facet:sc,$group:ni,$limit:Mn,$lookup:G,$match:ie,$out:ae,$project:ke,$redact:Ct,$replaceRoot:dt,$sample:Ca,$skip:ac,$sort:tr,$sortByCount:jn,$unwind:Es});function lt(p,x,v){le("$ not implemented")}function ic(p,x,v){var j=gr(p,v),C=new xr(x);Q(P(j),"$elemMatch: invalid argument");for(var z=0;z<j.length;z++)if(C.test(j[z]))return[j[z]]}function si(p,x,v){var j=gr(p,v);return P(j)?P(x)?la(j,x[0],x[1]):(Q(U(x),"$slice: invalid arguments for projection"),la(j,x)):j}var Ns=Object.freeze({__proto__:null,$:lt,$elemMatch:ic,$slice:si});function Bt(p){return function(x,v){return function(j){var C=gr(j,x,{meta:!0});return C=gn(C.result,C.depth),p(C,v)}}}var lc=Bt(Pl),cc=Bt(Po),Ss=Bt(ya),Hr=Bt(Ll),As=Bt(Oo),ai=Bt($o),Cs=Bt(Do),oi=Bt(ht),ii=Bt(ft),Is=Bt(Ol),li=Bt(Io),zn=Bt(Ro),Zr=Bt($l),Ds=Bt(Lo),uc=Bt(Pt);function fc(p,x){Q(P(x),"Invalid expression: $and expects value to be an Array");var v=[];return Re(x,function(j){return v.push(new xr(j))}),function(j){for(var C=0;C<v.length;C++)if(!v[C].test(j))return!1;return!0}}function ci(p,x){Q(P(x),"Invalid expression. $or expects value to be an Array");var v=[];return Re(x,function(j){return v.push(new xr(j))}),function(j){for(var C=0;C<v.length;C++)if(v[C].test(j))return!0;return!1}}function Rs(p,x){Q(P(x),"Invalid expression. $nor expects value to be an Array");var v=ci("$or",x);return function(j){return!v(j)}}function Os(p,x){var v={};v[p]=ia(x);var j=new xr(v);return function(C){return!j.test(C)}}function Ia(p,x){return Me(x)||(x=new Function("return "+x+";")),function(v){return x.call(v)===!0}}function dc(p,x){return function(v){return pe(v,x)}}var ui=Object.freeze({__proto__:null,$all:lc,$elemMatch:cc,$eq:Ss,$exists:Hr,$gt:As,$gte:ai,$in:Cs,$lt:oi,$lte:ii,$mod:Is,$ne:li,$nin:zn,$regex:Zr,$size:Ds,$type:uc,$and:fc,$or:ci,$nor:Rs,$not:Os,$where:Ia,$expr:dc}),_t={};_t[X]={},_t[Y]={},_t[L]={},_t[B]={},_t[J]={};var pc=[[X,Kl],[Y,kn],[L,Ts],[B,Ns],[J,ui]];function It(){Re(pc,function(p){var x=y(p,2),v=x[0],j=x[1];Object.assign(_t[v],j)})}function Ut(p,x){var v=x(ds());Q(ct(_t,p),"Invalid operator class ".concat(p));var j=_t[p];Re(v,function(z,Z){Q(/^\$[a-zA-Z0-9_]*$/.test(Z),"Invalid operator name ".concat(Z)),Q(!ct(j,Z),"".concat(Z," already exists for '").concat(p,"' operators"))});var C={};switch(p){case J:Re(v,function(z,Z){z=z.bind(v),C[Z]=function(re,me){return function(fe){var Ie=gr(fe,re),_e=z(re,Ie,me);return Q(he(_e),"".concat(Z," must return a boolean")),_e}}});break;case B:Re(v,function(z,Z){z=z.bind(v),C[Z]=function(re,me,fe){var Ie=gr(re,fe);return z(fe,Ie,me)}});break;default:Re(v,function(z,Z){C[Z]=function(){for(var re=arguments.length,me=new Array(re),fe=0;fe<re;fe++)me[fe]=arguments[fe];return z.apply(v,me)}})}Object.assign(_t[p],C)}var hc={query:function(x,v){return new xr(x).find(this.toJSON(),v)},aggregate:function(x){return new ws(x).run(this.toJSON())}};It();var mc="2.5.3",fi={_internal:ds,Aggregator:ws,CollectionMixin:hc,Cursor:va,Lazy:Zt,OP_EXPRESSION:X,OP_GROUP:Y,OP_PIPELINE:L,OP_PROJECTION:B,OP_QUERY:J,Query:xr,VERSION:mc,addOperators:Ut,aggregate:Co,find:wa,remove:Rl,setup:ca};return fi}))})(Bi)),Bi.exports}var Pi={},Fi={exports:{}};const r5={},n5=Object.freeze(Object.defineProperty({__proto__:null,default:r5},Symbol.toStringTag,{value:"Module"})),pm=ed(n5);var hm;function s5(){return hm||(hm=1,(function(e,s){var a=(function(){var o=function(L,B,J,te){for(J=J||{},te=L.length;te--;J[L[te]]=B);return J},c=[1,5],h=[1,7],y=[1,8],m=[1,6,10],l=[1,9],f=[1,6,8,10],u=[1,24],d=[1,25],g=[1,26],b=[1,27],_=[1,28],k=[1,29],M=[1,30],T=[1,17],A=[1,18],I=[1,19],O=[21,22,23,24,25,29,30],$=[1,6,8,10,18],q=[1,47],R=[6,18],K={trace:function(){},yy:{},symbols_:{error:2,expressions:3,expression:4,andCondition:5,OR:6,filterExpr:7,AND:8,LPAREN:9,RPAREN:10,propExpr:11,valueExpr:12,PROP:13,NOT:14,REGEXPOP:15,LBRACKET:16,inExpr:17,RBRACKET:18,OP:19,VALUE:20,NULL:21,TRUE:22,FALSE:23,NUMBER:24,NOW:25,DATEOP:26,AMOUNT:27,INTERVAL:28,LITERAL:29,STRING:30,ADD:31,SUB:32,CONTAINS:33,STARTSWITH:34,ENDSWITH:35,GT:36,LT:37,GTE:38,LTE:39,$accept:0,$end:1},terminals_:{2:"error",6:"OR",8:"AND",9:"LPAREN",10:"RPAREN",13:"PROP",14:"NOT",16:"LBRACKET",18:"RBRACKET",21:"NULL",22:"TRUE",23:"FALSE",24:"NUMBER",25:"NOW",27:"AMOUNT",28:"INTERVAL",29:"LITERAL",30:"STRING",31:"ADD",32:"SUB",33:"CONTAINS",34:"STARTSWITH",35:"ENDSWITH",36:"GT",37:"LT",38:"GTE",39:"LTE"},productions_:[0,[3,1],[4,1],[4,3],[5,1],[5,3],[7,3],[7,2],[11,1],[12,2],[12,1],[12,4],[12,3],[12,2],[12,1],[17,3],[17,1],[20,1],[20,1],[20,1],[20,1],[20,4],[20,1],[20,1],[26,1],[26,1],[15,2],[15,2],[15,2],[19,1],[19,1],[19,1],[19,1],[19,1]],performAction:function(B,J,te,ne,Q,se,be,je){var W=se.length-1;switch(Q){case 1:return ne.debug("expression",se[W]),ne.debug("opt",je),se[W]&&se[W].yg?se[W].yg:se[W];case 2:ne.debug("andCondition",se[W]),this.$=se[W];break;case 3:ne.debug("expression OR andCondition",se[W-2],se[W]),se[W-2]=se[W-2].$or?se[W-2]:{$or:[ne.ungroup(se[W-2])]},se[W-2].$or.push(ne.ungroup(se[W])),this.$=se[W-2];break;case 4:ne.debug("filterExpr",se[W]),this.$=se[W];break;case 5:ne.debug("andCondition AND filterExpr",se[W-2],se[W]),se[W-2]=se[W-2].$and?se[W-2]:{$and:[ne.ungroup(se[W-2])]},se[W-2].$and.push(ne.ungroup(se[W])),this.$=se[W-2];break;case 6:ne.debug("LPAREN expression RPAREN",se[W-1]),this.$={yg:se[W-1]};break;case 7:this.$={[se[W-1]]:se[W]};break;case 8:se[W]=se[W].replace(/:$/,""),se[W]=je.aliases&&je.aliases[se[W]]?je.aliases[se[W]]:se[W],this.$=se[W];break;case 9:this.$={$not:se[W]};break;case 10:this.$={$regex:se[W]};break;case 11:this.$={$nin:se[W-1]};break;case 12:this.$={$in:se[W-1]};break;case 13:this.$={},this.$[se[W-1]]=se[W];break;case 14:this.$=se[W];break;case 15:this.$.push(se[W]);break;case 16:this.$=[se[W]];break;case 17:this.$=null;break;case 18:this.$=!0;break;case 19:this.$=!1;break;case 20:this.$=parseInt(B);break;case 21:this.$=ne.relDateToAbsolute(se[W-2],se[W-1],se[W]);break;case 22:this.$=ne.unescape(se[W]);break;case 23:se[W]=se[W].replace(/^'|'$/g,""),this.$=ne.unescape(se[W]);break;case 24:this.$="add";break;case 25:this.$="sub";break;case 26:se[W]=se[W].replace(/^'|'$/g,""),se[W]=ne.unescape(se[W]),this.$=ne.stringToRegExp(se[W]);break;case 27:se[W]=se[W].replace(/^'|'$/g,""),se[W]=ne.unescape(se[W]),this.$=ne.stringToRegExp(se[W],"^");break;case 28:se[W]=se[W].replace(/^'|'$/g,""),se[W]=ne.unescape(se[W]),this.$=ne.stringToRegExp(se[W],"$");break;case 29:this.$="$ne";break;case 30:this.$="$gt";break;case 31:this.$="$lt";break;case 32:this.$="$gte";break;case 33:this.$="$lte";break}},table:[{3:1,4:2,5:3,7:4,9:c,11:6,13:h},{1:[3]},{1:[2,1],6:y},o(m,[2,2],{8:l}),o(f,[2,4]),{4:10,5:3,7:4,9:c,11:6,13:h},{12:11,14:[1,12],15:13,16:[1,14],19:15,20:16,21:u,22:d,23:g,24:b,25:_,29:k,30:M,33:T,34:A,35:I,36:[1,20],37:[1,21],38:[1,22],39:[1,23]},o([14,16,21,22,23,24,25,29,30,33,34,35,36,37,38,39],[2,8]),{5:31,7:4,9:c,11:6,13:h},{7:32,9:c,11:6,13:h},{6:y,10:[1,33]},o(f,[2,7]),o(O,[2,29],{15:34,16:[1,35],33:T,34:A,35:I}),o(f,[2,10]),{17:36,20:37,21:u,22:d,23:g,24:b,25:_,29:k,30:M},{20:38,21:u,22:d,23:g,24:b,25:_,29:k,30:M},o(f,[2,14]),{30:[1,39]},{30:[1,40]},{30:[1,41]},o(O,[2,30]),o(O,[2,31]),o(O,[2,32]),o(O,[2,33]),o($,[2,17]),o($,[2,18]),o($,[2,19]),o($,[2,20]),{26:42,31:[1,43],32:[1,44]},o($,[2,22]),o($,[2,23]),o(m,[2,3],{8:l}),o(f,[2,5]),o(f,[2,6]),o(f,[2,9]),{17:45,20:37,21:u,22:d,23:g,24:b,25:_,29:k,30:M},{6:q,18:[1,46]},o(R,[2,16]),o(f,[2,13]),o(f,[2,26]),o(f,[2,27]),o(f,[2,28]),{27:[1,48]},{27:[2,24]},{27:[2,25]},{6:q,18:[1,49]},o(f,[2,12]),{20:50,21:u,22:d,23:g,24:b,25:_,29:k,30:M},{28:[1,51]},o(f,[2,11]),o(R,[2,15]),o($,[2,21])],defaultActions:{43:[2,24],44:[2,25]},parseError:function(B,J){if(J.recoverable)this.trace(B);else{var te=new Error(B);throw te.hash=J,te}},parse:function(B){var J=this,te=[0],ne=[null],Q=[],se=this.table,be="",je=0,W=0,he=2,ge=1,U=Q.slice.call(arguments,1),P=Object.create(this.lexer),ee={yy:{}};for(var xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xe)&&(ee.yy[xe]=this.yy[xe]);P.setInput(B,ee.yy),ee.yy.lexer=P,ee.yy.parser=this,typeof P.yylloc>"u"&&(P.yylloc={});var Te=P.yylloc;Q.push(Te);var De=P.options&&P.options.ranges;typeof ee.yy.parseError=="function"?this.parseError=ee.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var Me=function(){var Be;return Be=P.lex()||ge,typeof Be!="number"&&(Be=J.symbols_[Be]||Be),Be},oe,Ee,Ae,Ce,qe={},at,ze,wt,ct;;){if(Ee=te[te.length-1],this.defaultActions[Ee]?Ae=this.defaultActions[Ee]:((oe===null||typeof oe>"u")&&(oe=Me()),Ae=se[Ee]&&se[Ee][oe]),typeof Ae>"u"||!Ae.length||!Ae[0]){var le="";ct=[];for(at in se[Ee])this.terminals_[at]&&at>he&&ct.push("'"+this.terminals_[at]+"'");P.showPosition?le="Parse error on line "+(je+1)+`:
|
|
24
|
-
`+P.showPosition()+`
|
|
25
|
-
Expecting `+ct.join(", ")+", got '"+(this.terminals_[oe]||oe)+"'":le="Parse error on line "+(je+1)+": Unexpected "+(oe==ge?"end of input":"'"+(this.terminals_[oe]||oe)+"'"),this.parseError(le,{text:P.match,token:this.terminals_[oe]||oe,line:P.yylineno,loc:Te,expected:ct})}if(Ae[0]instanceof Array&&Ae.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ee+", token: "+oe);switch(Ae[0]){case 1:te.push(oe),ne.push(P.yytext),Q.push(P.yylloc),te.push(Ae[1]),oe=null,W=P.yyleng,be=P.yytext,je=P.yylineno,Te=P.yylloc;break;case 2:if(ze=this.productions_[Ae[1]][1],qe.$=ne[ne.length-ze],qe._$={first_line:Q[Q.length-(ze||1)].first_line,last_line:Q[Q.length-1].last_line,first_column:Q[Q.length-(ze||1)].first_column,last_column:Q[Q.length-1].last_column},De&&(qe._$.range=[Q[Q.length-(ze||1)].range[0],Q[Q.length-1].range[1]]),Ce=this.performAction.apply(qe,[be,W,je,ee.yy,Ae[1],ne,Q].concat(U)),typeof Ce<"u")return Ce;ze&&(te=te.slice(0,-1*ze*2),ne=ne.slice(0,-1*ze),Q=Q.slice(0,-1*ze)),te.push(this.productions_[Ae[1]][0]),ne.push(qe.$),Q.push(qe._$),wt=se[te[te.length-2]][te[te.length-1]],te.push(wt);break;case 3:return!0}}return!0}};K.parseError=function(L,B){var J=L.split(`
|
|
26
|
-
`);throw J[0]="Query Error: unexpected character in filter at char "+(B.loc.first_column+1),new Error(J.join(`
|
|
27
|
-
`))};var X=(function(){var L={EOF:1,parseError:function(J,te){if(this.yy.parser)this.yy.parser.parseError(J,te);else throw new Error(J)},setInput:function(B,J){return this.yy=J||this.yy||{},this._input=B,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var B=this._input[0];this.yytext+=B,this.yyleng++,this.offset++,this.match+=B,this.matched+=B;var J=B.match(/(?:\r\n?|\n).*/g);return J?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),B},unput:function(B){var J=B.length,te=B.split(/(?:\r\n?|\n)/g);this._input=B+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-J),this.offset-=J;var ne=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),te.length-1&&(this.yylineno-=te.length-1);var Q=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:te?(te.length===ne.length?this.yylloc.first_column:0)+ne[ne.length-te.length].length-te[0].length:this.yylloc.first_column-J},this.options.ranges&&(this.yylloc.range=[Q[0],Q[0]+this.yyleng-J]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
28
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(B){this.unput(this.match.slice(B))},pastInput:function(){var B=this.matched.substr(0,this.matched.length-this.match.length);return(B.length>20?"...":"")+B.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var B=this.match;return B.length<20&&(B+=this._input.substr(0,20-B.length)),(B.substr(0,20)+(B.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var B=this.pastInput(),J=new Array(B.length+1).join("-");return B+this.upcomingInput()+`
|
|
29
|
-
`+J+"^"},test_match:function(B,J){var te,ne,Q;if(this.options.backtrack_lexer&&(Q={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Q.yylloc.range=this.yylloc.range.slice(0))),ne=B[0].match(/(?:\r\n?|\n).*/g),ne&&(this.yylineno+=ne.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ne?ne[ne.length-1].length-ne[ne.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+B[0].length},this.yytext+=B[0],this.match+=B[0],this.matches=B,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(B[0].length),this.matched+=B[0],te=this.performAction.call(this,this.yy,this,J,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),te)return te;if(this._backtrack){for(var se in Q)this[se]=Q[se];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var B,J,te,ne;this._more||(this.yytext="",this.match="");for(var Q=this._currentRules(),se=0;se<Q.length;se++)if(te=this._input.match(this.rules[Q[se]]),te&&(!J||te[0].length>J[0].length)){if(J=te,ne=se,this.options.backtrack_lexer){if(B=this.test_match(te,Q[se]),B!==!1)return B;if(this._backtrack){J=!1;continue}else return!1}else if(!this.options.flex)break}return J?(B=this.test_match(J,Q[ne]),B!==!1?B:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
30
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var J=this.next();return J||this.lex()},begin:function(J){this.conditionStack.push(J)},popState:function(){var J=this.conditionStack.length-1;return J>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(J){return J=this.conditionStack.length-1-Math.abs(J||0),J>=0?this.conditionStack[J]:"INITIAL"},pushState:function(J){this.begin(J)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(J,te,ne,Q){switch(ne){case 0:break;case 1:return 21;case 2:return 22;case 3:return 23;case 4:return 13;case 5:return 24;case 6:return 16;case 7:return 18;case 8:return this.pushState("reldate"),25;case 9:return 32;case 10:return 31;case 11:return 27;case 12:return this.popState(),28;case 13:return 29;case 14:return 30;case 15:return 9;case 16:return 10;case 17:return 6;case 18:return 8;case 19:return 14;case 20:return 38;case 21:return 39;case 22:return 36;case 23:return 37;case 24:return 34;case 25:return 35;case 26:return 33;case 27:return 29}},rules:[/^(?:\s+)/,/^(?:(?:null|NULL|Null)(?!(\\(['"\+\,\(\)\>\<=\[\]\~\^\$])|([^\s'"\+\,\(\)\>\<=\[\]\~]))+))/,/^(?:(?:true|TRUE|True)(?!(\\(['"\+\,\(\)\>\<=\[\]\~\^\$])|([^\s'"\+\,\(\)\>\<=\[\]\~]))+))/,/^(?:(?:false|FALSE|False)(?!(\\(['"\+\,\(\)\>\<=\[\]\~\^\$])|([^\s'"\+\,\(\)\>\<=\[\]\~]))+))/,/^(?:[a-zA-Z_][a-zA-Z0-9_\.]*[:])/,/^(?:[0-9]+(\.[0-9]+)?\b(?![\-]))/,/^(?:\[)/,/^(?:\])/,/^(?:now(?=[-+]\d+[dwMyhms](?:([\+\,\(\)\[\]])|$)))/,/^(?:-)/,/^(?:\+)/,/^(?:\d+)/,/^(?:[dwMyhms])/,/^(?:([^\s'"\+\,\(\)\>\<=\[\]\~\-])(\\(['"\+\,\(\)\>\<=\[\]\~\^\$])|([^\s'"\+\,\(\)\>\<=\[\]\~]))+)/,/^(?:['](\\['"]|[^'"])+?['])/,/^(?:\()/,/^(?:\))/,/^(?:,)/,/^(?:\+)/,/^(?:-)/,/^(?:>=)/,/^(?:<=)/,/^(?:>)/,/^(?:<)/,/^(?:~\^)/,/^(?:~\$)/,/^(?:~)/,/^(?:([a-zA-Z])(?![a-zA-Z'"\,\(\)\>\<=\[\]\~]))/],conditions:{reldate:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27],inclusive:!0},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27],inclusive:!0}}};return L.parseError=function(B,J){var te=B.split(`
|
|
31
|
-
`),ne,Q;throw ne=te[2].indexOf("^"),Q=te[1].charAt(ne),te[0]='Query Error: unrecognized text "'+Q+'" in filter at char '+(ne+1),Error(te.join(`
|
|
32
|
-
`))},L})();K.lexer=X;function Y(){this.yy={}}return Y.prototype=K,K.Parser=Y,new Y})();typeof U2<"u"&&(s.parser=a,s.Parser=a.Parser,s.parse=function(){return a.parse.apply(a,arguments)},s.main=function(c){c[1]||(console.log("Usage: "+c[0]+" FILE"),process.exit(1));var h=pm.readFileSync(pm.normalize(c[1]),"utf8");return s.parser.parse(h)},require.main===e&&s.main(process.argv.slice(1)))})(Fi,Fi.exports)),Fi.exports}var bu={},vu={},wu,mm;function gx(){return mm||(mm=1,wu=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var s={},a=Symbol("test"),o=Object(a);if(typeof a=="string"||Object.prototype.toString.call(a)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var c=42;s[a]=c;for(var h in s)return!1;if(typeof Object.keys=="function"&&Object.keys(s).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(s).length!==0)return!1;var y=Object.getOwnPropertySymbols(s);if(y.length!==1||y[0]!==a||!Object.prototype.propertyIsEnumerable.call(s,a))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var m=Object.getOwnPropertyDescriptor(s,a);if(m.value!==c||m.enumerable!==!0)return!1}return!0}),wu}var yu,gm;function ul(){if(gm)return yu;gm=1;var e=gx();return yu=function(){return e()&&!!Symbol.toStringTag},yu}var _u,xm;function xx(){return xm||(xm=1,_u=Object),_u}var ku,bm;function a5(){return bm||(bm=1,ku=Error),ku}var Mu,vm;function o5(){return vm||(vm=1,Mu=EvalError),Mu}var ju,wm;function i5(){return wm||(wm=1,ju=RangeError),ju}var Eu,ym;function l5(){return ym||(ym=1,Eu=ReferenceError),Eu}var Tu,_m;function bx(){return _m||(_m=1,Tu=SyntaxError),Tu}var Nu,km;function io(){return km||(km=1,Nu=TypeError),Nu}var Su,Mm;function c5(){return Mm||(Mm=1,Su=URIError),Su}var Au,jm;function u5(){return jm||(jm=1,Au=Math.abs),Au}var Cu,Em;function f5(){return Em||(Em=1,Cu=Math.floor),Cu}var Iu,Tm;function d5(){return Tm||(Tm=1,Iu=Math.max),Iu}var Du,Nm;function p5(){return Nm||(Nm=1,Du=Math.min),Du}var Ru,Sm;function h5(){return Sm||(Sm=1,Ru=Math.pow),Ru}var Ou,Am;function m5(){return Am||(Am=1,Ou=Math.round),Ou}var $u,Cm;function g5(){return Cm||(Cm=1,$u=Number.isNaN||function(s){return s!==s}),$u}var Lu,Im;function x5(){if(Im)return Lu;Im=1;var e=g5();return Lu=function(a){return e(a)||a===0?a:a<0?-1:1},Lu}var Pu,Dm;function b5(){return Dm||(Dm=1,Pu=Object.getOwnPropertyDescriptor),Pu}var Fu,Rm;function ea(){if(Rm)return Fu;Rm=1;var e=b5();if(e)try{e([],"length")}catch{e=null}return Fu=e,Fu}var Uu,Om;function fl(){if(Om)return Uu;Om=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Uu=e,Uu}var zu,$m;function v5(){if($m)return zu;$m=1;var e=typeof Symbol<"u"&&Symbol,s=gx();return zu=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:s()},zu}var Hu,Lm;function vx(){return Lm||(Lm=1,Hu=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Hu}var Bu,Pm;function wx(){if(Pm)return Bu;Pm=1;var e=xx();return Bu=e.getPrototypeOf||null,Bu}var Wu,Fm;function w5(){if(Fm)return Wu;Fm=1;var e="Function.prototype.bind called on incompatible ",s=Object.prototype.toString,a=Math.max,o="[object Function]",c=function(l,f){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var g=0;g<f.length;g+=1)u[g+l.length]=f[g];return u},h=function(l,f){for(var u=[],d=f,g=0;d<l.length;d+=1,g+=1)u[g]=l[d];return u},y=function(m,l){for(var f="",u=0;u<m.length;u+=1)f+=m[u],u+1<m.length&&(f+=l);return f};return Wu=function(l){var f=this;if(typeof f!="function"||s.apply(f)!==o)throw new TypeError(e+f);for(var u=h(arguments,1),d,g=function(){if(this instanceof d){var T=f.apply(this,c(u,arguments));return Object(T)===T?T:this}return f.apply(l,c(u,arguments))},b=a(0,f.length-u.length),_=[],k=0;k<b;k++)_[k]="$"+k;if(d=Function("binder","return function ("+y(_,",")+"){ return binder.apply(this,arguments); }")(g),f.prototype){var M=function(){};M.prototype=f.prototype,d.prototype=new M,M.prototype=null}return d},Wu}var qu,Um;function lo(){if(Um)return qu;Um=1;var e=w5();return qu=Function.prototype.bind||e,qu}var Yu,zm;function vd(){return zm||(zm=1,Yu=Function.prototype.call),Yu}var Gu,Hm;function wd(){return Hm||(Hm=1,Gu=Function.prototype.apply),Gu}var Xu,Bm;function y5(){return Bm||(Bm=1,Xu=typeof Reflect<"u"&&Reflect&&Reflect.apply),Xu}var Ku,Wm;function yx(){if(Wm)return Ku;Wm=1;var e=lo(),s=wd(),a=vd(),o=y5();return Ku=o||e.call(a,s),Ku}var Vu,qm;function yd(){if(qm)return Vu;qm=1;var e=lo(),s=io(),a=vd(),o=yx();return Vu=function(h){if(h.length<1||typeof h[0]!="function")throw new s("a function is required");return o(e,a,h)},Vu}var Zu,Ym;function _5(){if(Ym)return Zu;Ym=1;var e=yd(),s=ea(),a;try{a=[].__proto__===Array.prototype}catch(y){if(!y||typeof y!="object"||!("code"in y)||y.code!=="ERR_PROTO_ACCESS")throw y}var o=!!a&&s&&s(Object.prototype,"__proto__"),c=Object,h=c.getPrototypeOf;return Zu=o&&typeof o.get=="function"?e([o.get]):typeof h=="function"?function(m){return h(m==null?m:c(m))}:!1,Zu}var Qu,Gm;function _d(){if(Gm)return Qu;Gm=1;var e=vx(),s=wx(),a=_5();return Qu=e?function(c){return e(c)}:s?function(c){if(!c||typeof c!="object"&&typeof c!="function")throw new TypeError("getProto: not an object");return s(c)}:a?function(c){return a(c)}:null,Qu}var Ju,Xm;function _x(){if(Xm)return Ju;Xm=1;var e=Function.prototype.call,s=Object.prototype.hasOwnProperty,a=lo();return Ju=a.call(e,s),Ju}var ef,Km;function kd(){if(Km)return ef;Km=1;var e,s=xx(),a=a5(),o=o5(),c=i5(),h=l5(),y=bx(),m=io(),l=c5(),f=u5(),u=f5(),d=d5(),g=p5(),b=h5(),_=m5(),k=x5(),M=Function,T=function(Me){try{return M('"use strict"; return ('+Me+").constructor;")()}catch{}},A=ea(),I=fl(),O=function(){throw new m},$=A?(function(){try{return arguments.callee,O}catch{try{return A(arguments,"callee").get}catch{return O}}})():O,q=v5()(),R=_d(),K=wx(),X=vx(),Y=wd(),L=vd(),B={},J=typeof Uint8Array>"u"||!R?e:R(Uint8Array),te={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":q&&R?R([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":B,"%AsyncGenerator%":B,"%AsyncGeneratorFunction%":B,"%AsyncIteratorPrototype%":B,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":a,"%eval%":eval,"%EvalError%":o,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":M,"%GeneratorFunction%":B,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":q&&R?R(R([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!q||!R?e:R(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":s,"%Object.getOwnPropertyDescriptor%":A,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":c,"%ReferenceError%":h,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!q||!R?e:R(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":q&&R?R(""[Symbol.iterator]()):e,"%Symbol%":q?Symbol:e,"%SyntaxError%":y,"%ThrowTypeError%":$,"%TypedArray%":J,"%TypeError%":m,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":L,"%Function.prototype.apply%":Y,"%Object.defineProperty%":I,"%Object.getPrototypeOf%":K,"%Math.abs%":f,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":g,"%Math.pow%":b,"%Math.round%":_,"%Math.sign%":k,"%Reflect.getPrototypeOf%":X};if(R)try{null.error}catch(Me){var ne=R(R(Me));te["%Error.prototype%"]=ne}var Q=function Me(oe){var Ee;if(oe==="%AsyncFunction%")Ee=T("async function () {}");else if(oe==="%GeneratorFunction%")Ee=T("function* () {}");else if(oe==="%AsyncGeneratorFunction%")Ee=T("async function* () {}");else if(oe==="%AsyncGenerator%"){var Ae=Me("%AsyncGeneratorFunction%");Ae&&(Ee=Ae.prototype)}else if(oe==="%AsyncIteratorPrototype%"){var Ce=Me("%AsyncGenerator%");Ce&&R&&(Ee=R(Ce.prototype))}return te[oe]=Ee,Ee},se={__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"]},be=lo(),je=_x(),W=be.call(L,Array.prototype.concat),he=be.call(Y,Array.prototype.splice),ge=be.call(L,String.prototype.replace),U=be.call(L,String.prototype.slice),P=be.call(L,RegExp.prototype.exec),ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,xe=/\\(\\)?/g,Te=function(oe){var Ee=U(oe,0,1),Ae=U(oe,-1);if(Ee==="%"&&Ae!=="%")throw new y("invalid intrinsic syntax, expected closing `%`");if(Ae==="%"&&Ee!=="%")throw new y("invalid intrinsic syntax, expected opening `%`");var Ce=[];return ge(oe,ee,function(qe,at,ze,wt){Ce[Ce.length]=ze?ge(wt,xe,"$1"):at||qe}),Ce},De=function(oe,Ee){var Ae=oe,Ce;if(je(se,Ae)&&(Ce=se[Ae],Ae="%"+Ce[0]+"%"),je(te,Ae)){var qe=te[Ae];if(qe===B&&(qe=Q(Ae)),typeof qe>"u"&&!Ee)throw new m("intrinsic "+oe+" exists, but is not available. Please file an issue!");return{alias:Ce,name:Ae,value:qe}}throw new y("intrinsic "+oe+" does not exist!")};return ef=function(oe,Ee){if(typeof oe!="string"||oe.length===0)throw new m("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Ee!="boolean")throw new m('"allowMissing" argument must be a boolean');if(P(/^%?[^%]*%?$/,oe)===null)throw new y("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Ae=Te(oe),Ce=Ae.length>0?Ae[0]:"",qe=De("%"+Ce+"%",Ee),at=qe.name,ze=qe.value,wt=!1,ct=qe.alias;ct&&(Ce=ct[0],he(Ae,W([0,1],ct)));for(var le=1,Be=!0;le<Ae.length;le+=1){var Re=Ae[le],hr=U(Re,0,1),mr=U(Re,-1);if((hr==='"'||hr==="'"||hr==="`"||mr==='"'||mr==="'"||mr==="`")&&hr!==mr)throw new y("property names with quotes must have matching quotes");if((Re==="constructor"||!Be)&&(wt=!0),Ce+="."+Re,at="%"+Ce+"%",je(te,at))ze=te[at];else if(ze!=null){if(!(Re in ze)){if(!Ee)throw new m("base intrinsic for "+oe+" exists, but the property is not available.");return}if(A&&le+1>=Ae.length){var kt=A(ze,Re);Be=!!kt,Be&&"get"in kt&&!("originalValue"in kt.get)?ze=kt.get:ze=ze[Re]}else Be=je(ze,Re),ze=ze[Re];Be&&!wt&&(te[at]=ze)}}return ze},ef}var tf={exports:{}},rf,Vm;function k5(){if(Vm)return rf;Vm=1;var e=fl(),s=bx(),a=io(),o=ea();return rf=function(h,y,m){if(!h||typeof h!="object"&&typeof h!="function")throw new a("`obj` must be an object or a function`");if(typeof y!="string"&&typeof y!="symbol")throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new a("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,d=arguments.length>6?arguments[6]:!1,g=!!o&&o(h,y);if(e)e(h,y,{configurable:u===null&&g?g.configurable:!u,enumerable:l===null&&g?g.enumerable:!l,value:m,writable:f===null&&g?g.writable:!f});else if(d||!l&&!f&&!u)h[y]=m;else throw new s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},rf}var nf,Zm;function M5(){if(Zm)return nf;Zm=1;var e=fl(),s=function(){return!!e};return s.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},nf=s,nf}var sf,Qm;function j5(){if(Qm)return sf;Qm=1;var e=kd(),s=k5(),a=M5()(),o=ea(),c=io(),h=e("%Math.floor%");return sf=function(m,l){if(typeof m!="function")throw new c("`fn` is not a function");if(typeof l!="number"||l<0||l>4294967295||h(l)!==l)throw new c("`length` must be a positive 32-bit integer");var f=arguments.length>2&&!!arguments[2],u=!0,d=!0;if("length"in m&&o){var g=o(m,"length");g&&!g.configurable&&(u=!1),g&&!g.writable&&(d=!1)}return(u||d||!f)&&(a?s(m,"length",l,!0,!0):s(m,"length",l)),m},sf}var af,Jm;function E5(){if(Jm)return af;Jm=1;var e=lo(),s=wd(),a=yx();return af=function(){return a(e,s,arguments)},af}var eg;function kx(){return eg||(eg=1,(function(e){var s=j5(),a=fl(),o=yd(),c=E5();e.exports=function(y){var m=o(arguments),l=y.length-(arguments.length-1);return s(m,1+(l>0?l:0),!0)},a?a(e.exports,"apply",{value:c}):e.exports.apply=c})(tf)),tf.exports}var of,tg;function T5(){if(tg)return of;tg=1;var e=kd(),s=kx(),a=s(e("String.prototype.indexOf"));return of=function(c,h){var y=e(c,!!h);return typeof y=="function"&&a(c,".prototype.")>-1?s(y):y},of}var lf,rg;function N5(){if(rg)return lf;rg=1;var e=ul()(),s=T5(),a=s("Object.prototype.toString"),o=function(m){return e&&m&&typeof m=="object"&&Symbol.toStringTag in m?!1:a(m)==="[object Arguments]"},c=function(m){return o(m)?!0:m!==null&&typeof m=="object"&&typeof m.length=="number"&&m.length>=0&&a(m)!=="[object Array]"&&a(m.callee)==="[object Function]"},h=(function(){return o(arguments)})();return o.isLegacyArguments=c,lf=h?o:c,lf}var cf,ng;function dl(){if(ng)return cf;ng=1;var e=kd(),s=yd(),a=s([e("%String.prototype.indexOf%")]);return cf=function(c,h){var y=e(c,!!h);return typeof y=="function"&&a(c,".prototype.")>-1?s([y]):y},cf}var uf,sg;function S5(){if(sg)return uf;sg=1;var e=dl(),s=ul()(),a=_x(),o=ea(),c;if(s){var h=e("RegExp.prototype.exec"),y={},m=function(){throw y},l={toString:m,valueOf:m};typeof Symbol.toPrimitive=="symbol"&&(l[Symbol.toPrimitive]=m),c=function(g){if(!g||typeof g!="object")return!1;var b=o(g,"lastIndex"),_=b&&a(b,"value");if(!_)return!1;try{h(g,l)}catch(k){return k===y}}}else{var f=e("Object.prototype.toString"),u="[object RegExp]";c=function(g){return!g||typeof g!="object"&&typeof g!="function"?!1:f(g)===u}}return uf=c,uf}var ff,ag;function A5(){if(ag)return ff;ag=1;var e=dl(),s=S5(),a=e("RegExp.prototype.exec"),o=io();return ff=function(h){if(!s(h))throw new o("`regex` must be a RegExp");return function(m){return a(h,m)!==null}},ff}var df,og;function C5(){if(og)return df;og=1;var e=dl(),s=A5(),a=s(/^\s*(?:function)?\*/),o=ul()(),c=_d(),h=e("Object.prototype.toString"),y=e("Function.prototype.toString"),m=function(){if(!o)return!1;try{return Function("return function*() {}")()}catch{}},l;return df=function(u){if(typeof u!="function")return!1;if(a(y(u)))return!0;if(!o){var d=h(u);return d==="[object GeneratorFunction]"}if(!c)return!1;if(typeof l>"u"){var g=m();l=g?c(g):!1}return c(u)===l},df}var pf,ig;function I5(){if(ig)return pf;ig=1;var e=Function.prototype.toString,s=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,a,o;if(typeof s=="function"&&typeof Object.defineProperty=="function")try{a=Object.defineProperty({},"length",{get:function(){throw o}}),o={},s(function(){throw 42},null,a)}catch(A){A!==o&&(s=null)}else s=null;var c=/^\s*class\b/,h=function(I){try{var O=e.call(I);return c.test(O)}catch{return!1}},y=function(I){try{return h(I)?!1:(e.call(I),!0)}catch{return!1}},m=Object.prototype.toString,l="[object Object]",f="[object Function]",u="[object GeneratorFunction]",d="[object HTMLAllCollection]",g="[object HTML document.all class]",b="[object HTMLCollection]",_=typeof Symbol=="function"&&!!Symbol.toStringTag,k=!(0 in[,]),M=function(){return!1};if(typeof document=="object"){var T=document.all;m.call(T)===m.call(document.all)&&(M=function(I){if((k||!I)&&(typeof I>"u"||typeof I=="object"))try{var O=m.call(I);return(O===d||O===g||O===b||O===l)&&I("")==null}catch{}return!1})}return pf=s?function(I){if(M(I))return!0;if(!I||typeof I!="function"&&typeof I!="object")return!1;try{s(I,null,a)}catch(O){if(O!==o)return!1}return!h(I)&&y(I)}:function(I){if(M(I))return!0;if(!I||typeof I!="function"&&typeof I!="object")return!1;if(_)return y(I);if(h(I))return!1;var O=m.call(I);return O!==f&&O!==u&&!/^\[object HTML/.test(O)?!1:y(I)},pf}var hf,lg;function D5(){if(lg)return hf;lg=1;var e=I5(),s=Object.prototype.toString,a=Object.prototype.hasOwnProperty,o=function(l,f,u){for(var d=0,g=l.length;d<g;d++)a.call(l,d)&&(u==null?f(l[d],d,l):f.call(u,l[d],d,l))},c=function(l,f,u){for(var d=0,g=l.length;d<g;d++)u==null?f(l.charAt(d),d,l):f.call(u,l.charAt(d),d,l)},h=function(l,f,u){for(var d in l)a.call(l,d)&&(u==null?f(l[d],d,l):f.call(u,l[d],d,l))};function y(m){return s.call(m)==="[object Array]"}return hf=function(l,f,u){if(!e(f))throw new TypeError("iterator must be a function");var d;arguments.length>=3&&(d=u),y(l)?o(l,f,d):typeof l=="string"?c(l,f,d):h(l,f,d)},hf}var mf,cg;function R5(){return cg||(cg=1,mf=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),mf}var gf,ug;function O5(){if(ug)return gf;ug=1;var e=R5(),s=typeof globalThis>"u"?Bs:globalThis;return gf=function(){for(var o=[],c=0;c<e.length;c++)typeof s[e[c]]=="function"&&(o[o.length]=e[c]);return o},gf}var xf,fg;function Mx(){if(fg)return xf;fg=1;var e=D5(),s=O5(),a=kx(),o=dl(),c=ea(),h=_d(),y=o("Object.prototype.toString"),m=ul()(),l=typeof globalThis>"u"?Bs:globalThis,f=s(),u=o("String.prototype.slice"),d=o("Array.prototype.indexOf",!0)||function(M,T){for(var A=0;A<M.length;A+=1)if(M[A]===T)return A;return-1},g={__proto__:null};m&&c&&h?e(f,function(k){var M=new l[k];if(Symbol.toStringTag in M&&h){var T=h(M),A=c(T,Symbol.toStringTag);if(!A&&T){var I=h(T);A=c(I,Symbol.toStringTag)}g["$"+k]=a(A.get)}}):e(f,function(k){var M=new l[k],T=M.slice||M.set;T&&(g["$"+k]=a(T))});var b=function(M){var T=!1;return e(g,function(A,I){if(!T)try{"$"+A(M)===I&&(T=u(I,1))}catch{}}),T},_=function(M){var T=!1;return e(g,function(A,I){if(!T)try{A(M),T=u(I,1)}catch{}}),T};return xf=function(M){if(!M||typeof M!="object")return!1;if(!m){var T=u(y(M),8,-1);return d(f,T)>-1?T:T!=="Object"?!1:_(M)}return c?b(M):null},xf}var bf,dg;function $5(){if(dg)return bf;dg=1;var e=Mx();return bf=function(a){return!!e(a)},bf}var pg;function L5(){return pg||(pg=1,(function(e){var s=N5(),a=C5(),o=Mx(),c=$5();function h(le){return le.call.bind(le)}var y=typeof BigInt<"u",m=typeof Symbol<"u",l=h(Object.prototype.toString),f=h(Number.prototype.valueOf),u=h(String.prototype.valueOf),d=h(Boolean.prototype.valueOf);if(y)var g=h(BigInt.prototype.valueOf);if(m)var b=h(Symbol.prototype.valueOf);function _(le,Be){if(typeof le!="object")return!1;try{return Be(le),!0}catch{return!1}}e.isArgumentsObject=s,e.isGeneratorFunction=a,e.isTypedArray=c;function k(le){return typeof Promise<"u"&&le instanceof Promise||le!==null&&typeof le=="object"&&typeof le.then=="function"&&typeof le.catch=="function"}e.isPromise=k;function M(le){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(le):c(le)||U(le)}e.isArrayBufferView=M;function T(le){return o(le)==="Uint8Array"}e.isUint8Array=T;function A(le){return o(le)==="Uint8ClampedArray"}e.isUint8ClampedArray=A;function I(le){return o(le)==="Uint16Array"}e.isUint16Array=I;function O(le){return o(le)==="Uint32Array"}e.isUint32Array=O;function $(le){return o(le)==="Int8Array"}e.isInt8Array=$;function q(le){return o(le)==="Int16Array"}e.isInt16Array=q;function R(le){return o(le)==="Int32Array"}e.isInt32Array=R;function K(le){return o(le)==="Float32Array"}e.isFloat32Array=K;function X(le){return o(le)==="Float64Array"}e.isFloat64Array=X;function Y(le){return o(le)==="BigInt64Array"}e.isBigInt64Array=Y;function L(le){return o(le)==="BigUint64Array"}e.isBigUint64Array=L;function B(le){return l(le)==="[object Map]"}B.working=typeof Map<"u"&&B(new Map);function J(le){return typeof Map>"u"?!1:B.working?B(le):le instanceof Map}e.isMap=J;function te(le){return l(le)==="[object Set]"}te.working=typeof Set<"u"&&te(new Set);function ne(le){return typeof Set>"u"?!1:te.working?te(le):le instanceof Set}e.isSet=ne;function Q(le){return l(le)==="[object WeakMap]"}Q.working=typeof WeakMap<"u"&&Q(new WeakMap);function se(le){return typeof WeakMap>"u"?!1:Q.working?Q(le):le instanceof WeakMap}e.isWeakMap=se;function be(le){return l(le)==="[object WeakSet]"}be.working=typeof WeakSet<"u"&&be(new WeakSet);function je(le){return be(le)}e.isWeakSet=je;function W(le){return l(le)==="[object ArrayBuffer]"}W.working=typeof ArrayBuffer<"u"&&W(new ArrayBuffer);function he(le){return typeof ArrayBuffer>"u"?!1:W.working?W(le):le instanceof ArrayBuffer}e.isArrayBuffer=he;function ge(le){return l(le)==="[object DataView]"}ge.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&ge(new DataView(new ArrayBuffer(1),0,1));function U(le){return typeof DataView>"u"?!1:ge.working?ge(le):le instanceof DataView}e.isDataView=U;var P=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ee(le){return l(le)==="[object SharedArrayBuffer]"}function xe(le){return typeof P>"u"?!1:(typeof ee.working>"u"&&(ee.working=ee(new P)),ee.working?ee(le):le instanceof P)}e.isSharedArrayBuffer=xe;function Te(le){return l(le)==="[object AsyncFunction]"}e.isAsyncFunction=Te;function De(le){return l(le)==="[object Map Iterator]"}e.isMapIterator=De;function Me(le){return l(le)==="[object Set Iterator]"}e.isSetIterator=Me;function oe(le){return l(le)==="[object Generator]"}e.isGeneratorObject=oe;function Ee(le){return l(le)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=Ee;function Ae(le){return _(le,f)}e.isNumberObject=Ae;function Ce(le){return _(le,u)}e.isStringObject=Ce;function qe(le){return _(le,d)}e.isBooleanObject=qe;function at(le){return y&&_(le,g)}e.isBigIntObject=at;function ze(le){return m&&_(le,b)}e.isSymbolObject=ze;function wt(le){return Ae(le)||Ce(le)||qe(le)||at(le)||ze(le)}e.isBoxedPrimitive=wt;function ct(le){return typeof Uint8Array<"u"&&(he(le)||xe(le))}e.isAnyArrayBuffer=ct,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(le){Object.defineProperty(e,le,{enumerable:!1,value:function(){throw new Error(le+" is not supported in userland")}})})})(vu)),vu}var vf,hg;function P5(){return hg||(hg=1,vf=function(s){return s&&typeof s=="object"&&typeof s.copy=="function"&&typeof s.fill=="function"&&typeof s.readUInt8=="function"}),vf}var Ui={exports:{}},mg;function F5(){return mg||(mg=1,typeof Object.create=="function"?Ui.exports=function(s,a){a&&(s.super_=a,s.prototype=Object.create(a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}))}:Ui.exports=function(s,a){if(a){s.super_=a;var o=function(){};o.prototype=a.prototype,s.prototype=new o,s.prototype.constructor=s}}),Ui.exports}var gg;function U5(){return gg||(gg=1,(function(e){var s={},a=Object.getOwnPropertyDescriptors||function(P){for(var ee=Object.keys(P),xe={},Te=0;Te<ee.length;Te++)xe[ee[Te]]=Object.getOwnPropertyDescriptor(P,ee[Te]);return xe},o=/%[sdj%]/g;e.format=function(U){if(!q(U)){for(var P=[],ee=0;ee<arguments.length;ee++)P.push(m(arguments[ee]));return P.join(" ")}for(var ee=1,xe=arguments,Te=xe.length,De=String(U).replace(o,function(oe){if(oe==="%%")return"%";if(ee>=Te)return oe;switch(oe){case"%s":return String(xe[ee++]);case"%d":return Number(xe[ee++]);case"%j":try{return JSON.stringify(xe[ee++])}catch{return"[Circular]"}default:return oe}}),Me=xe[ee];ee<Te;Me=xe[++ee])I(Me)||!Y(Me)?De+=" "+Me:De+=" "+m(Me);return De},e.deprecate=function(U,P){if(typeof process<"u"&&process.noDeprecation===!0)return U;if(typeof process>"u")return function(){return e.deprecate(U,P).apply(this,arguments)};var ee=!1;function xe(){if(!ee){if(process.throwDeprecation)throw new Error(P);process.traceDeprecation?console.trace(P):console.error(P),ee=!0}return U.apply(this,arguments)}return xe};var c={},h=/^$/;if(s.NODE_DEBUG){var y=s.NODE_DEBUG;y=y.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),h=new RegExp("^"+y+"$","i")}e.debuglog=function(U){if(U=U.toUpperCase(),!c[U])if(h.test(U)){var P=process.pid;c[U]=function(){var ee=e.format.apply(e,arguments);console.error("%s %d: %s",U,P,ee)}}else c[U]=function(){};return c[U]};function m(U,P){var ee={seen:[],stylize:f};return arguments.length>=3&&(ee.depth=arguments[2]),arguments.length>=4&&(ee.colors=arguments[3]),A(P)?ee.showHidden=P:P&&e._extend(ee,P),K(ee.showHidden)&&(ee.showHidden=!1),K(ee.depth)&&(ee.depth=2),K(ee.colors)&&(ee.colors=!1),K(ee.customInspect)&&(ee.customInspect=!0),ee.colors&&(ee.stylize=l),d(ee,U,ee.depth)}e.inspect=m,m.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]},m.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function l(U,P){var ee=m.styles[P];return ee?"\x1B["+m.colors[ee][0]+"m"+U+"\x1B["+m.colors[ee][1]+"m":U}function f(U,P){return U}function u(U){var P={};return U.forEach(function(ee,xe){P[ee]=!0}),P}function d(U,P,ee){if(U.customInspect&&P&&J(P.inspect)&&P.inspect!==e.inspect&&!(P.constructor&&P.constructor.prototype===P)){var xe=P.inspect(ee,U);return q(xe)||(xe=d(U,xe,ee)),xe}var Te=g(U,P);if(Te)return Te;var De=Object.keys(P),Me=u(De);if(U.showHidden&&(De=Object.getOwnPropertyNames(P)),B(P)&&(De.indexOf("message")>=0||De.indexOf("description")>=0))return b(P);if(De.length===0){if(J(P)){var oe=P.name?": "+P.name:"";return U.stylize("[Function"+oe+"]","special")}if(X(P))return U.stylize(RegExp.prototype.toString.call(P),"regexp");if(L(P))return U.stylize(Date.prototype.toString.call(P),"date");if(B(P))return b(P)}var Ee="",Ae=!1,Ce=["{","}"];if(T(P)&&(Ae=!0,Ce=["[","]"]),J(P)){var qe=P.name?": "+P.name:"";Ee=" [Function"+qe+"]"}if(X(P)&&(Ee=" "+RegExp.prototype.toString.call(P)),L(P)&&(Ee=" "+Date.prototype.toUTCString.call(P)),B(P)&&(Ee=" "+b(P)),De.length===0&&(!Ae||P.length==0))return Ce[0]+Ee+Ce[1];if(ee<0)return X(P)?U.stylize(RegExp.prototype.toString.call(P),"regexp"):U.stylize("[Object]","special");U.seen.push(P);var at;return Ae?at=_(U,P,ee,Me,De):at=De.map(function(ze){return k(U,P,ee,Me,ze,Ae)}),U.seen.pop(),M(at,Ee,Ce)}function g(U,P){if(K(P))return U.stylize("undefined","undefined");if(q(P)){var ee="'"+JSON.stringify(P).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(ee,"string")}if($(P))return U.stylize(""+P,"number");if(A(P))return U.stylize(""+P,"boolean");if(I(P))return U.stylize("null","null")}function b(U){return"["+Error.prototype.toString.call(U)+"]"}function _(U,P,ee,xe,Te){for(var De=[],Me=0,oe=P.length;Me<oe;++Me)je(P,String(Me))?De.push(k(U,P,ee,xe,String(Me),!0)):De.push("");return Te.forEach(function(Ee){Ee.match(/^\d+$/)||De.push(k(U,P,ee,xe,Ee,!0))}),De}function k(U,P,ee,xe,Te,De){var Me,oe,Ee;if(Ee=Object.getOwnPropertyDescriptor(P,Te)||{value:P[Te]},Ee.get?Ee.set?oe=U.stylize("[Getter/Setter]","special"):oe=U.stylize("[Getter]","special"):Ee.set&&(oe=U.stylize("[Setter]","special")),je(xe,Te)||(Me="["+Te+"]"),oe||(U.seen.indexOf(Ee.value)<0?(I(ee)?oe=d(U,Ee.value,null):oe=d(U,Ee.value,ee-1),oe.indexOf(`
|
|
33
|
-
`)>-1&&(De?oe=oe.split(`
|
|
34
|
-
`).map(function(Ae){return" "+Ae}).join(`
|
|
35
|
-
`).slice(2):oe=`
|
|
36
|
-
`+oe.split(`
|
|
37
|
-
`).map(function(Ae){return" "+Ae}).join(`
|
|
38
|
-
`))):oe=U.stylize("[Circular]","special")),K(Me)){if(De&&Te.match(/^\d+$/))return oe;Me=JSON.stringify(""+Te),Me.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Me=Me.slice(1,-1),Me=U.stylize(Me,"name")):(Me=Me.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Me=U.stylize(Me,"string"))}return Me+": "+oe}function M(U,P,ee){var xe=U.reduce(function(Te,De){return De.indexOf(`
|
|
39
|
-
`)>=0,Te+De.replace(/\u001b\[\d\d?m/g,"").length+1},0);return xe>60?ee[0]+(P===""?"":P+`
|
|
40
|
-
`)+" "+U.join(`,
|
|
41
|
-
`)+" "+ee[1]:ee[0]+P+" "+U.join(", ")+" "+ee[1]}e.types=L5();function T(U){return Array.isArray(U)}e.isArray=T;function A(U){return typeof U=="boolean"}e.isBoolean=A;function I(U){return U===null}e.isNull=I;function O(U){return U==null}e.isNullOrUndefined=O;function $(U){return typeof U=="number"}e.isNumber=$;function q(U){return typeof U=="string"}e.isString=q;function R(U){return typeof U=="symbol"}e.isSymbol=R;function K(U){return U===void 0}e.isUndefined=K;function X(U){return Y(U)&&ne(U)==="[object RegExp]"}e.isRegExp=X,e.types.isRegExp=X;function Y(U){return typeof U=="object"&&U!==null}e.isObject=Y;function L(U){return Y(U)&&ne(U)==="[object Date]"}e.isDate=L,e.types.isDate=L;function B(U){return Y(U)&&(ne(U)==="[object Error]"||U instanceof Error)}e.isError=B,e.types.isNativeError=B;function J(U){return typeof U=="function"}e.isFunction=J;function te(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}e.isPrimitive=te,e.isBuffer=P5();function ne(U){return Object.prototype.toString.call(U)}function Q(U){return U<10?"0"+U.toString(10):U.toString(10)}var se=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function be(){var U=new Date,P=[Q(U.getHours()),Q(U.getMinutes()),Q(U.getSeconds())].join(":");return[U.getDate(),se[U.getMonth()],P].join(" ")}e.log=function(){console.log("%s - %s",be(),e.format.apply(e,arguments))},e.inherits=F5(),e._extend=function(U,P){if(!P||!Y(P))return U;for(var ee=Object.keys(P),xe=ee.length;xe--;)U[ee[xe]]=P[ee[xe]];return U};function je(U,P){return Object.prototype.hasOwnProperty.call(U,P)}var W=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(P){if(typeof P!="function")throw new TypeError('The "original" argument must be of type Function');if(W&&P[W]){var ee=P[W];if(typeof ee!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(ee,W,{value:ee,enumerable:!1,writable:!1,configurable:!0}),ee}function ee(){for(var xe,Te,De=new Promise(function(Ee,Ae){xe=Ee,Te=Ae}),Me=[],oe=0;oe<arguments.length;oe++)Me.push(arguments[oe]);Me.push(function(Ee,Ae){Ee?Te(Ee):xe(Ae)});try{P.apply(this,Me)}catch(Ee){Te(Ee)}return De}return Object.setPrototypeOf(ee,Object.getPrototypeOf(P)),W&&Object.defineProperty(ee,W,{value:ee,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(ee,a(P))},e.promisify.custom=W;function he(U,P){if(!U){var ee=new Error("Promise was rejected with a falsy value");ee.reason=U,U=ee}return P(U)}function ge(U){if(typeof U!="function")throw new TypeError('The "original" argument must be of type Function');function P(){for(var ee=[],xe=0;xe<arguments.length;xe++)ee.push(arguments[xe]);var Te=ee.pop();if(typeof Te!="function")throw new TypeError("The last argument must be of type Function");var De=this,Me=function(){return Te.apply(De,arguments)};U.apply(this,ee).then(function(oe){process.nextTick(Me.bind(null,null,oe))},function(oe){process.nextTick(he.bind(null,oe,Me))})}return Object.setPrototypeOf(P,Object.getPrototypeOf(U)),Object.defineProperties(P,a(U)),P}e.callbackify=ge})(bu)),bu}function Ht(e){if(e===null||e===!0||e===!1)return NaN;var s=Number(e);return isNaN(s)?s:s<0?Math.ceil(s):Math.floor(s)}function ls(e,s){if(s.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+s.length+" present")}function Md(e){ls(1,arguments);var s=Object.prototype.toString.call(e);return e instanceof Date||id(e)==="object"&&s==="[object Date]"?new Date(e.getTime()):typeof e=="number"||s==="[object Number]"?new Date(e):((typeof e=="string"||s==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function jx(e,s){ls(2,arguments);var a=Md(e),o=Ht(s);return isNaN(o)?new Date(NaN):(o&&a.setDate(a.getDate()+o),a)}function Ex(e,s){ls(2,arguments);var a=Md(e),o=Ht(s);if(isNaN(o))return new Date(NaN);if(!o)return a;var c=a.getDate(),h=new Date(a.getTime());h.setMonth(a.getMonth()+o+1,0);var y=h.getDate();return c>=y?h:(a.setFullYear(h.getFullYear(),h.getMonth(),c),a)}function z5(e,s){if(ls(2,arguments),!s||id(s)!=="object")return new Date(NaN);var a=s.years?Ht(s.years):0,o=s.months?Ht(s.months):0,c=s.weeks?Ht(s.weeks):0,h=s.days?Ht(s.days):0,y=s.hours?Ht(s.hours):0,m=s.minutes?Ht(s.minutes):0,l=s.seconds?Ht(s.seconds):0,f=Md(e),u=o||a?Ex(f,o+a*12):f,d=h||c?jx(u,h+c*7):u,g=m+y*60,b=l+g*60,_=b*1e3,k=new Date(d.getTime()+_);return k}const H5=Object.freeze(Object.defineProperty({__proto__:null,default:z5},Symbol.toStringTag,{value:"Module"})),B5=ed(H5);function W5(e,s){ls(2,arguments);var a=Ht(s);return jx(e,-a)}function q5(e,s){ls(2,arguments);var a=Ht(s);return Ex(e,-a)}function Y5(e,s){if(ls(2,arguments),!s||id(s)!=="object")return new Date(NaN);var a=s.years?Ht(s.years):0,o=s.months?Ht(s.months):0,c=s.weeks?Ht(s.weeks):0,h=s.days?Ht(s.days):0,y=s.hours?Ht(s.hours):0,m=s.minutes?Ht(s.minutes):0,l=s.seconds?Ht(s.seconds):0,f=q5(e,o+a*12),u=W5(f,h+c*7),d=m+y*60,g=l+d*60,b=g*1e3,_=new Date(u.getTime()-b);return _}const G5=Object.freeze(Object.defineProperty({__proto__:null,default:Y5},Symbol.toStringTag,{value:"Module"})),X5=ed(G5);var wf,xg;function K5(){if(xg)return wf;xg=1,U5();const a={add:B5,sub:X5},o={d:"days",w:"weeks",M:"months",y:"years",h:"hours",m:"minutes",s:"seconds"},c=h=>h.toISOString().replace("T"," ").replace(/\.[0-9]{3}Z/,"");return wf={ungroup(h){return h.yg?h.yg:h},unescape(h){const y=new RegExp(`\\\\(['"])`,"g");return h.replace(y,"$1")},stringToRegExp(h,y){let m=h.replace(/[.*+?^$(){}|[\]\\]/g,"\\$&");return y==="^"?m="^"+m:y==="$"&&(m=m+"$"),new RegExp(m,"i")},relDateToAbsolute(h,y,m){const l=new Date,f=a[h](l,{[o[m]]:y});return c(f)},debug(){}},wf}var bg;function V5(){if(bg)return Pi;bg=1;const e=s5().parser;return e.yy=K5(),Pi.lex=s=>{e.lexer.setInput(s);let a=e.lexer.lex();const o=[];for(;a!==e.lexer.EOF;)o.push({token:e.terminals_[a],matched:e.lexer.match}),a=e.lexer.lex();return o},Pi.parse=(s,a)=>e.parse(s,a||{}),Pi}var yf,vg;function Tx(){return vg||(vg=1,yf=V5()),yf}var Xa={exports:{}};/**
|
|
42
|
-
* @license
|
|
43
|
-
* Lodash <https://lodash.com/>
|
|
44
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
45
|
-
* Released under MIT license <https://lodash.com/license>
|
|
46
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
47
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
48
|
-
*/var Z5=Xa.exports,wg;function jd(){return wg||(wg=1,(function(e,s){(function(){var a,o="4.17.21",c=200,h="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",y="Expected a function",m="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",f=500,u="__lodash_placeholder__",d=1,g=2,b=4,_=1,k=2,M=1,T=2,A=4,I=8,O=16,$=32,q=64,R=128,K=256,X=512,Y=30,L="...",B=800,J=16,te=1,ne=2,Q=3,se=1/0,be=9007199254740991,je=17976931348623157e292,W=NaN,he=4294967295,ge=he-1,U=he>>>1,P=[["ary",R],["bind",M],["bindKey",T],["curry",I],["curryRight",O],["flip",X],["partial",$],["partialRight",q],["rearg",K]],ee="[object Arguments]",xe="[object Array]",Te="[object AsyncFunction]",De="[object Boolean]",Me="[object Date]",oe="[object DOMException]",Ee="[object Error]",Ae="[object Function]",Ce="[object GeneratorFunction]",qe="[object Map]",at="[object Number]",ze="[object Null]",wt="[object Object]",ct="[object Promise]",le="[object Proxy]",Be="[object RegExp]",Re="[object Set]",hr="[object String]",mr="[object Symbol]",kt="[object Undefined]",Ar="[object WeakMap]",hl="[object WeakSet]",mn="[object ArrayBuffer]",gn="[object DataView]",Pr="[object Float32Array]",Ln="[object Float64Array]",Fr="[object Int8Array]",Mr="[object Int16Array]",Pn="[object Int32Array]",cs="[object Uint8Array]",us="[object Uint8ClampedArray]",Xt="[object Uint16Array]",ta="[object Uint32Array]",ml=/\b__p \+= '';/g,ra=/\b(__p \+=) '' \+/g,gr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xn=/&(?:amp|lt|gt|quot|#39);/g,fs=/[&<>"']/g,na=RegExp(xn.source),sa=RegExp(fs.source),aa=/<%-([\s\S]+?)%>/g,oa=/<%([\s\S]+?)%>/g,ia=/<%=([\s\S]+?)%>/g,la=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,co=/^\w*$/,gl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ds=/[\\^$.*+?()[\]{}|]/g,uo=RegExp(ds.source),ca=/^\s+/,fo=/\s/,po=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ho=/\{\n\/\* \[wrapped with (.+)\] \*/,mo=/,? & /,bn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ua=/[()=,{}\[\]\/\s]/,ps=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,hs=/\w*$/,xl=/^[-+]0x[0-9a-f]+$/i,bl=/^0b[01]+$/i,vl=/^\[object .+?Constructor\]$/,wl=/^0o[0-7]+$/i,yl=/^(?:0|[1-9]\d*)$/,_l=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ms=/($^)/,kl=/['\n\r\u2028\u2029\\]/g,gs="\\ud800-\\udfff",Ml="\\u0300-\\u036f",jl="\\ufe20-\\ufe2f",El="\\u20d0-\\u20ff",go=Ml+jl+El,xo="\\u2700-\\u27bf",bo="a-z\\xdf-\\xf6\\xf8-\\xff",Tl="\\xac\\xb1\\xd7\\xf7",vo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Nl="\\u2000-\\u206f",Sl=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",wo="A-Z\\xc0-\\xd6\\xd8-\\xde",yo="\\ufe0e\\ufe0f",_o=Tl+vo+Nl+Sl,fa="['’]",Al="["+gs+"]",ko="["+_o+"]",xs="["+go+"]",Mo="\\d+",Cl="["+xo+"]",jo="["+bo+"]",Eo="[^"+gs+_o+Mo+xo+bo+wo+"]",da="\\ud83c[\\udffb-\\udfff]",Il="(?:"+xs+"|"+da+")",To="[^"+gs+"]",pa="(?:\\ud83c[\\udde6-\\uddff]){2}",ha="[\\ud800-\\udbff][\\udc00-\\udfff]",vn="["+wo+"]",Zt="\\u200d",ma="(?:"+jo+"|"+Eo+")",ga="(?:"+vn+"|"+Eo+")",No="(?:"+fa+"(?:d|ll|m|re|s|t|ve))?",bs="(?:"+fa+"(?:D|LL|M|RE|S|T|VE))?",xa=Il+"?",ba="["+yo+"]?",So="(?:"+Zt+"(?:"+[To,pa,ha].join("|")+")"+ba+xa+")*",Ao="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Dl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",vs=ba+xa+So,ws="(?:"+[Cl,pa,ha].join("|")+")"+vs,Co="(?:"+[To+xs+"?",xs,pa,ha,Al].join("|")+")",va=RegExp(fa,"g"),xr=RegExp(xs,"g"),wa=RegExp(da+"(?="+da+")|"+Co+vs,"g"),Rl=RegExp([vn+"?"+jo+"+"+No+"(?="+[ko,vn,"$"].join("|")+")",ga+"+"+bs+"(?="+[ko,vn+ma,"$"].join("|")+")",vn+"?"+ma+"+"+No,vn+"+"+bs,Dl,Ao,Mo,ws].join("|"),"g"),ya=RegExp("["+Zt+gs+go+yo+"]"),Io=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Do=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ro=-1,ht={};ht[Pr]=ht[Ln]=ht[Fr]=ht[Mr]=ht[Pn]=ht[cs]=ht[us]=ht[Xt]=ht[ta]=!0,ht[ee]=ht[xe]=ht[mn]=ht[De]=ht[gn]=ht[Me]=ht[Ee]=ht[Ae]=ht[qe]=ht[at]=ht[wt]=ht[Be]=ht[Re]=ht[hr]=ht[Ar]=!1;var ft={};ft[ee]=ft[xe]=ft[mn]=ft[gn]=ft[De]=ft[Me]=ft[Pr]=ft[Ln]=ft[Fr]=ft[Mr]=ft[Pn]=ft[qe]=ft[at]=ft[wt]=ft[Be]=ft[Re]=ft[hr]=ft[mr]=ft[cs]=ft[us]=ft[Xt]=ft[ta]=!0,ft[Ee]=ft[Ae]=ft[Ar]=!1;var Oo={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},$o={"&":"&","<":"<",">":">",'"':""","'":"'"},Ol={"&":"&","<":"<",">":">",""":'"',"'":"'"},$l={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ll=parseFloat,Pl=parseInt,Lo=typeof Bs=="object"&&Bs&&Bs.Object===Object&&Bs,Po=typeof self=="object"&&self&&self.Object===Object&&self,Pt=Lo||Po||Function("return this")(),wn=s&&!s.nodeType&&s,Qt=wn&&!0&&e&&!e.nodeType&&e,Fo=Qt&&Qt.exports===wn,_a=Fo&&Lo.process,ar=(function(){try{var G=Qt&&Qt.require&&Qt.require("util").types;return G||_a&&_a.binding&&_a.binding("util")}catch{}})(),Uo=ar&&ar.isArrayBuffer,zo=ar&&ar.isDate,Ho=ar&&ar.isMap,Bo=ar&&ar.isRegExp,Wo=ar&&ar.isSet,qo=ar&&ar.isTypedArray;function Jt(G,ie,ae){switch(ae.length){case 0:return G.call(ie);case 1:return G.call(ie,ae[0]);case 2:return G.call(ie,ae[0],ae[1]);case 3:return G.call(ie,ae[0],ae[1],ae[2])}return G.apply(ie,ae)}function Fl(G,ie,ae,ke){for(var Pe=-1,tt=G==null?0:G.length;++Pe<tt;){var Ct=G[Pe];ie(ke,Ct,ae(Ct),G)}return ke}function er(G,ie){for(var ae=-1,ke=G==null?0:G.length;++ae<ke&&ie(G[ae],ae,G)!==!1;);return G}function Yo(G,ie){for(var ae=G==null?0:G.length;ae--&&ie(G[ae],ae,G)!==!1;);return G}function ka(G,ie){for(var ae=-1,ke=G==null?0:G.length;++ae<ke;)if(!ie(G[ae],ae,G))return!1;return!0}function Cr(G,ie){for(var ae=-1,ke=G==null?0:G.length,Pe=0,tt=[];++ae<ke;){var Ct=G[ae];ie(Ct,ae,G)&&(tt[Pe++]=Ct)}return tt}function Fn(G,ie){var ae=G==null?0:G.length;return!!ae&&yn(G,ie,0)>-1}function ys(G,ie,ae){for(var ke=-1,Pe=G==null?0:G.length;++ke<Pe;)if(ae(ie,G[ke]))return!0;return!1}function gt(G,ie){for(var ae=-1,ke=G==null?0:G.length,Pe=Array(ke);++ae<ke;)Pe[ae]=ie(G[ae],ae,G);return Pe}function Ir(G,ie){for(var ae=-1,ke=ie.length,Pe=G.length;++ae<ke;)G[Pe+ae]=ie[ae];return G}function _s(G,ie,ae,ke){var Pe=-1,tt=G==null?0:G.length;for(ke&&tt&&(ae=G[++Pe]);++Pe<tt;)ae=ie(ae,G[Pe],Pe,G);return ae}function Go(G,ie,ae,ke){var Pe=G==null?0:G.length;for(ke&&Pe&&(ae=G[--Pe]);Pe--;)ae=ie(ae,G[Pe],Pe,G);return ae}function Ma(G,ie){for(var ae=-1,ke=G==null?0:G.length;++ae<ke;)if(ie(G[ae],ae,G))return!0;return!1}var Ul=ja("length");function zl(G){return G.split("")}function Hl(G){return G.match(bn)||[]}function Xo(G,ie,ae){var ke;return ae(G,function(Pe,tt,Ct){if(ie(Pe,tt,Ct))return ke=tt,!1}),ke}function ks(G,ie,ae,ke){for(var Pe=G.length,tt=ae+(ke?1:-1);ke?tt--:++tt<Pe;)if(ie(G[tt],tt,G))return tt;return-1}function yn(G,ie,ae){return ie===ie?Jl(G,ie,ae):ks(G,Ko,ae)}function Bl(G,ie,ae,ke){for(var Pe=ae-1,tt=G.length;++Pe<tt;)if(ke(G[Pe],ie))return Pe;return-1}function Ko(G){return G!==G}function Vo(G,ie){var ae=G==null?0:G.length;return ae?Ta(G,ie)/ae:W}function ja(G){return function(ie){return ie==null?a:ie[G]}}function Ea(G){return function(ie){return G==null?a:G[ie]}}function Zo(G,ie,ae,ke,Pe){return Pe(G,function(tt,Ct,dt){ae=ke?(ke=!1,tt):ie(ae,tt,Ct,dt)}),ae}function Wl(G,ie){var ae=G.length;for(G.sort(ie);ae--;)G[ae]=G[ae].value;return G}function Ta(G,ie){for(var ae,ke=-1,Pe=G.length;++ke<Pe;){var tt=ie(G[ke]);tt!==a&&(ae=ae===a?tt:ae+tt)}return ae}function Na(G,ie){for(var ae=-1,ke=Array(G);++ae<G;)ke[ae]=ie(ae);return ke}function ql(G,ie){return gt(ie,function(ae){return[ae,G[ae]]})}function Qo(G){return G&&G.slice(0,ri(G)+1).replace(ca,"")}function Kt(G){return function(ie){return G(ie)}}function Sa(G,ie){return gt(ie,function(ae){return G[ae]})}function Un(G,ie){return G.has(ie)}function Jo(G,ie){for(var ae=-1,ke=G.length;++ae<ke&&yn(ie,G[ae],0)>-1;);return ae}function ei(G,ie){for(var ae=G.length;ae--&&yn(ie,G[ae],0)>-1;);return ae}function Yl(G,ie){for(var ae=G.length,ke=0;ae--;)G[ae]===ie&&++ke;return ke}var Gl=Ea(Oo),Xl=Ea($o);function Kl(G){return"\\"+$l[G]}function Ur(G,ie){return G==null?a:G[ie]}function _n(G){return ya.test(G)}function Vl(G){return Io.test(G)}function Zl(G){for(var ie,ae=[];!(ie=G.next()).done;)ae.push(ie.value);return ae}function Aa(G){var ie=-1,ae=Array(G.size);return G.forEach(function(ke,Pe){ae[++ie]=[Pe,ke]}),ae}function ti(G,ie){return function(ae){return G(ie(ae))}}function zr(G,ie){for(var ae=-1,ke=G.length,Pe=0,tt=[];++ae<ke;){var Ct=G[ae];(Ct===ie||Ct===u)&&(G[ae]=u,tt[Pe++]=ae)}return tt}function Ms(G){var ie=-1,ae=Array(G.size);return G.forEach(function(ke){ae[++ie]=ke}),ae}function Ql(G){var ie=-1,ae=Array(G.size);return G.forEach(function(ke){ae[++ie]=[ke,ke]}),ae}function Jl(G,ie,ae){for(var ke=ae-1,Pe=G.length;++ke<Pe;)if(G[ke]===ie)return ke;return-1}function ec(G,ie,ae){for(var ke=ae+1;ke--;)if(G[ke]===ie)return ke;return ke}function kn(G){return _n(G)?rc(G):Ul(G)}function or(G){return _n(G)?nc(G):zl(G)}function ri(G){for(var ie=G.length;ie--&&fo.test(G.charAt(ie)););return ie}var tc=Ea(Ol);function rc(G){for(var ie=wa.lastIndex=0;wa.test(G);)++ie;return ie}function nc(G){return G.match(wa)||[]}function sc(G){return G.match(Rl)||[]}var ni=(function G(ie){ie=ie==null?Pt:Mn.defaults(Pt.Object(),ie,Mn.pick(Pt,Do));var ae=ie.Array,ke=ie.Date,Pe=ie.Error,tt=ie.Function,Ct=ie.Math,dt=ie.Object,Ca=ie.RegExp,ac=ie.String,tr=ie.TypeError,js=ae.prototype,oc=tt.prototype,jn=dt.prototype,Es=ie["__core-js_shared__"],Ts=oc.toString,lt=jn.hasOwnProperty,ic=0,si=(function(){var t=/[^.]+$/.exec(Es&&Es.keys&&Es.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),Ns=jn.toString,Bt=Ts.call(dt),lc=Pt._,cc=Ca("^"+Ts.call(lt).replace(ds,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ss=Fo?ie.Buffer:a,Hr=ie.Symbol,As=ie.Uint8Array,ai=Ss?Ss.allocUnsafe:a,Cs=ti(dt.getPrototypeOf,dt),oi=dt.create,ii=jn.propertyIsEnumerable,Is=js.splice,li=Hr?Hr.isConcatSpreadable:a,zn=Hr?Hr.iterator:a,Zr=Hr?Hr.toStringTag:a,Ds=(function(){try{var t=Xn(dt,"defineProperty");return t({},"",{}),t}catch{}})(),uc=ie.clearTimeout!==Pt.clearTimeout&&ie.clearTimeout,fc=ke&&ke.now!==Pt.Date.now&&ke.now,ci=ie.setTimeout!==Pt.setTimeout&&ie.setTimeout,Rs=Ct.ceil,Os=Ct.floor,Ia=dt.getOwnPropertySymbols,dc=Ss?Ss.isBuffer:a,ui=ie.isFinite,_t=js.join,pc=ti(dt.keys,dt),It=Ct.max,Ut=Ct.min,hc=ke.now,mc=ie.parseInt,fi=Ct.random,p=js.reverse,x=Xn(ie,"DataView"),v=Xn(ie,"Map"),j=Xn(ie,"Promise"),C=Xn(ie,"Set"),z=Xn(ie,"WeakMap"),Z=Xn(dt,"create"),re=z&&new z,me={},fe=Kn(x),Ie=Kn(v),_e=Kn(j),nt=Kn(C),Xe=Kn(z),pt=Hr?Hr.prototype:a,$t=pt?pt.valueOf:a,ir=pt?pt.toString:a;function N(t){if(Tt(t)&&!He(t)&&!(t instanceof Ke)){if(t instanceof Lt)return t;if(lt.call(t,"__wrapped__"))return Np(t)}return new Lt(t)}var br=(function(){function t(){}return function(n){if(!Mt(n))return{};if(oi)return oi(n);t.prototype=n;var i=new t;return t.prototype=a,i}})();function Hn(){}function Lt(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=a}N.templateSettings={escape:aa,evaluate:oa,interpolate:ia,variable:"",imports:{_:N}},N.prototype=Hn.prototype,N.prototype.constructor=N,Lt.prototype=br(Hn.prototype),Lt.prototype.constructor=Lt;function Ke(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=he,this.__views__=[]}function Da(){var t=new Ke(this.__wrapped__);return t.__actions__=lr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=lr(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=lr(this.__views__),t}function Bn(){if(this.__filtered__){var t=new Ke(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Ix(){var t=this.__wrapped__.value(),n=this.__dir__,i=He(t),w=n<0,E=i?t.length:0,S=Wb(0,E,this.__views__),F=S.start,H=S.end,V=H-F,ce=w?H:F-1,ue=this.__iteratees__,de=ue.length,ve=0,Se=Ut(V,this.__takeCount__);if(!i||!w&&E==V&&Se==V)return Zd(t,this.__actions__);var $e=[];e:for(;V--&&ve<Se;){ce+=n;for(var Ye=-1,Le=t[ce];++Ye<de;){var Ze=ue[Ye],Je=Ze.iteratee,yr=Ze.type,sr=Je(Le);if(yr==ne)Le=sr;else if(!sr){if(yr==te)continue e;break e}}$e[ve++]=Le}return $e}Ke.prototype=br(Hn.prototype),Ke.prototype.constructor=Ke;function Wn(t){var n=-1,i=t==null?0:t.length;for(this.clear();++n<i;){var w=t[n];this.set(w[0],w[1])}}function Dx(){this.__data__=Z?Z(null):{},this.size=0}function Rx(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}function Ox(t){var n=this.__data__;if(Z){var i=n[t];return i===l?a:i}return lt.call(n,t)?n[t]:a}function $x(t){var n=this.__data__;return Z?n[t]!==a:lt.call(n,t)}function Lx(t,n){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=Z&&n===a?l:n,this}Wn.prototype.clear=Dx,Wn.prototype.delete=Rx,Wn.prototype.get=Ox,Wn.prototype.has=$x,Wn.prototype.set=Lx;function Qr(t){var n=-1,i=t==null?0:t.length;for(this.clear();++n<i;){var w=t[n];this.set(w[0],w[1])}}function Px(){this.__data__=[],this.size=0}function Fx(t){var n=this.__data__,i=di(n,t);if(i<0)return!1;var w=n.length-1;return i==w?n.pop():Is.call(n,i,1),--this.size,!0}function Ux(t){var n=this.__data__,i=di(n,t);return i<0?a:n[i][1]}function zx(t){return di(this.__data__,t)>-1}function Hx(t,n){var i=this.__data__,w=di(i,t);return w<0?(++this.size,i.push([t,n])):i[w][1]=n,this}Qr.prototype.clear=Px,Qr.prototype.delete=Fx,Qr.prototype.get=Ux,Qr.prototype.has=zx,Qr.prototype.set=Hx;function Jr(t){var n=-1,i=t==null?0:t.length;for(this.clear();++n<i;){var w=t[n];this.set(w[0],w[1])}}function Bx(){this.size=0,this.__data__={hash:new Wn,map:new(v||Qr),string:new Wn}}function Wx(t){var n=Mi(this,t).delete(t);return this.size-=n?1:0,n}function qx(t){return Mi(this,t).get(t)}function Yx(t){return Mi(this,t).has(t)}function Gx(t,n){var i=Mi(this,t),w=i.size;return i.set(t,n),this.size+=i.size==w?0:1,this}Jr.prototype.clear=Bx,Jr.prototype.delete=Wx,Jr.prototype.get=qx,Jr.prototype.has=Yx,Jr.prototype.set=Gx;function qn(t){var n=-1,i=t==null?0:t.length;for(this.__data__=new Jr;++n<i;)this.add(t[n])}function Xx(t){return this.__data__.set(t,l),this}function Kx(t){return this.__data__.has(t)}qn.prototype.add=qn.prototype.push=Xx,qn.prototype.has=Kx;function Dr(t){var n=this.__data__=new Qr(t);this.size=n.size}function Vx(){this.__data__=new Qr,this.size=0}function Zx(t){var n=this.__data__,i=n.delete(t);return this.size=n.size,i}function Qx(t){return this.__data__.get(t)}function Jx(t){return this.__data__.has(t)}function eb(t,n){var i=this.__data__;if(i instanceof Qr){var w=i.__data__;if(!v||w.length<c-1)return w.push([t,n]),this.size=++i.size,this;i=this.__data__=new Jr(w)}return i.set(t,n),this.size=i.size,this}Dr.prototype.clear=Vx,Dr.prototype.delete=Zx,Dr.prototype.get=Qx,Dr.prototype.has=Jx,Dr.prototype.set=eb;function Nd(t,n){var i=He(t),w=!i&&Vn(t),E=!i&&!w&&An(t),S=!i&&!w&&!E&&Fs(t),F=i||w||E||S,H=F?Na(t.length,ac):[],V=H.length;for(var ce in t)(n||lt.call(t,ce))&&!(F&&(ce=="length"||E&&(ce=="offset"||ce=="parent")||S&&(ce=="buffer"||ce=="byteLength"||ce=="byteOffset")||nn(ce,V)))&&H.push(ce);return H}function Sd(t){var n=t.length;return n?t[Ec(0,n-1)]:a}function tb(t,n){return ji(lr(t),Yn(n,0,t.length))}function rb(t){return ji(lr(t))}function gc(t,n,i){(i!==a&&!Rr(t[n],i)||i===a&&!(n in t))&&en(t,n,i)}function Ra(t,n,i){var w=t[n];(!(lt.call(t,n)&&Rr(w,i))||i===a&&!(n in t))&&en(t,n,i)}function di(t,n){for(var i=t.length;i--;)if(Rr(t[i][0],n))return i;return-1}function nb(t,n,i,w){return En(t,function(E,S,F){n(w,E,i(E),F)}),w}function Ad(t,n){return t&&Wr(n,zt(n),t)}function sb(t,n){return t&&Wr(n,ur(n),t)}function en(t,n,i){n=="__proto__"&&Ds?Ds(t,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[n]=i}function xc(t,n){for(var i=-1,w=n.length,E=ae(w),S=t==null;++i<w;)E[i]=S?a:Zc(t,n[i]);return E}function Yn(t,n,i){return t===t&&(i!==a&&(t=t<=i?t:i),n!==a&&(t=t>=n?t:n)),t}function jr(t,n,i,w,E,S){var F,H=n&d,V=n&g,ce=n&b;if(i&&(F=E?i(t,w,E,S):i(t)),F!==a)return F;if(!Mt(t))return t;var ue=He(t);if(ue){if(F=Yb(t),!H)return lr(t,F)}else{var de=Vt(t),ve=de==Ae||de==Ce;if(An(t))return ep(t,H);if(de==wt||de==ee||ve&&!E){if(F=V||ve?{}:vp(t),!H)return V?Ob(t,sb(F,t)):Rb(t,Ad(F,t))}else{if(!ft[de])return E?t:{};F=Gb(t,de,H)}}S||(S=new Dr);var Se=S.get(t);if(Se)return Se;S.set(t,F),Xp(t)?t.forEach(function(Le){F.add(jr(Le,n,i,Le,t,S))}):Yp(t)&&t.forEach(function(Le,Ze){F.set(Ze,jr(Le,n,i,Ze,t,S))});var $e=ce?V?Lc:$c:V?ur:zt,Ye=ue?a:$e(t);return er(Ye||t,function(Le,Ze){Ye&&(Ze=Le,Le=t[Ze]),Ra(F,Ze,jr(Le,n,i,Ze,t,S))}),F}function ab(t){var n=zt(t);return function(i){return Cd(i,t,n)}}function Cd(t,n,i){var w=i.length;if(t==null)return!w;for(t=dt(t);w--;){var E=i[w],S=n[E],F=t[E];if(F===a&&!(E in t)||!S(F))return!1}return!0}function Id(t,n,i){if(typeof t!="function")throw new tr(y);return za(function(){t.apply(a,i)},n)}function Oa(t,n,i,w){var E=-1,S=Fn,F=!0,H=t.length,V=[],ce=n.length;if(!H)return V;i&&(n=gt(n,Kt(i))),w?(S=ys,F=!1):n.length>=c&&(S=Un,F=!1,n=new qn(n));e:for(;++E<H;){var ue=t[E],de=i==null?ue:i(ue);if(ue=w||ue!==0?ue:0,F&&de===de){for(var ve=ce;ve--;)if(n[ve]===de)continue e;V.push(ue)}else S(n,de,w)||V.push(ue)}return V}var En=ap(Br),Dd=ap(vc,!0);function ob(t,n){var i=!0;return En(t,function(w,E,S){return i=!!n(w,E,S),i}),i}function pi(t,n,i){for(var w=-1,E=t.length;++w<E;){var S=t[w],F=n(S);if(F!=null&&(H===a?F===F&&!wr(F):i(F,H)))var H=F,V=S}return V}function ib(t,n,i,w){var E=t.length;for(i=We(i),i<0&&(i=-i>E?0:E+i),w=w===a||w>E?E:We(w),w<0&&(w+=E),w=i>w?0:Vp(w);i<w;)t[i++]=n;return t}function Rd(t,n){var i=[];return En(t,function(w,E,S){n(w,E,S)&&i.push(w)}),i}function Wt(t,n,i,w,E){var S=-1,F=t.length;for(i||(i=Kb),E||(E=[]);++S<F;){var H=t[S];n>0&&i(H)?n>1?Wt(H,n-1,i,w,E):Ir(E,H):w||(E[E.length]=H)}return E}var bc=op(),Od=op(!0);function Br(t,n){return t&&bc(t,n,zt)}function vc(t,n){return t&&Od(t,n,zt)}function hi(t,n){return Cr(n,function(i){return sn(t[i])})}function Gn(t,n){n=Nn(n,t);for(var i=0,w=n.length;t!=null&&i<w;)t=t[qr(n[i++])];return i&&i==w?t:a}function $d(t,n,i){var w=n(t);return He(t)?w:Ir(w,i(t))}function rr(t){return t==null?t===a?kt:ze:Zr&&Zr in dt(t)?Bb(t):rv(t)}function wc(t,n){return t>n}function lb(t,n){return t!=null&<.call(t,n)}function cb(t,n){return t!=null&&n in dt(t)}function ub(t,n,i){return t>=Ut(n,i)&&t<It(n,i)}function yc(t,n,i){for(var w=i?ys:Fn,E=t[0].length,S=t.length,F=S,H=ae(S),V=1/0,ce=[];F--;){var ue=t[F];F&&n&&(ue=gt(ue,Kt(n))),V=Ut(ue.length,V),H[F]=!i&&(n||E>=120&&ue.length>=120)?new qn(F&&ue):a}ue=t[0];var de=-1,ve=H[0];e:for(;++de<E&&ce.length<V;){var Se=ue[de],$e=n?n(Se):Se;if(Se=i||Se!==0?Se:0,!(ve?Un(ve,$e):w(ce,$e,i))){for(F=S;--F;){var Ye=H[F];if(!(Ye?Un(Ye,$e):w(t[F],$e,i)))continue e}ve&&ve.push($e),ce.push(Se)}}return ce}function fb(t,n,i,w){return Br(t,function(E,S,F){n(w,i(E),S,F)}),w}function $a(t,n,i){n=Nn(n,t),t=kp(t,n);var w=t==null?t:t[qr(Tr(n))];return w==null?a:Jt(w,t,i)}function Ld(t){return Tt(t)&&rr(t)==ee}function db(t){return Tt(t)&&rr(t)==mn}function pb(t){return Tt(t)&&rr(t)==Me}function La(t,n,i,w,E){return t===n?!0:t==null||n==null||!Tt(t)&&!Tt(n)?t!==t&&n!==n:hb(t,n,i,w,La,E)}function hb(t,n,i,w,E,S){var F=He(t),H=He(n),V=F?xe:Vt(t),ce=H?xe:Vt(n);V=V==ee?wt:V,ce=ce==ee?wt:ce;var ue=V==wt,de=ce==wt,ve=V==ce;if(ve&&An(t)){if(!An(n))return!1;F=!0,ue=!1}if(ve&&!ue)return S||(S=new Dr),F||Fs(t)?gp(t,n,i,w,E,S):zb(t,n,V,i,w,E,S);if(!(i&_)){var Se=ue&<.call(t,"__wrapped__"),$e=de&<.call(n,"__wrapped__");if(Se||$e){var Ye=Se?t.value():t,Le=$e?n.value():n;return S||(S=new Dr),E(Ye,Le,i,w,S)}}return ve?(S||(S=new Dr),Hb(t,n,i,w,E,S)):!1}function mb(t){return Tt(t)&&Vt(t)==qe}function _c(t,n,i,w){var E=i.length,S=E,F=!w;if(t==null)return!S;for(t=dt(t);E--;){var H=i[E];if(F&&H[2]?H[1]!==t[H[0]]:!(H[0]in t))return!1}for(;++E<S;){H=i[E];var V=H[0],ce=t[V],ue=H[1];if(F&&H[2]){if(ce===a&&!(V in t))return!1}else{var de=new Dr;if(w)var ve=w(ce,ue,V,t,n,de);if(!(ve===a?La(ue,ce,_|k,w,de):ve))return!1}}return!0}function Pd(t){if(!Mt(t)||Zb(t))return!1;var n=sn(t)?cc:vl;return n.test(Kn(t))}function gb(t){return Tt(t)&&rr(t)==Be}function xb(t){return Tt(t)&&Vt(t)==Re}function bb(t){return Tt(t)&&Ci(t.length)&&!!ht[rr(t)]}function Fd(t){return typeof t=="function"?t:t==null?fr:typeof t=="object"?He(t)?Hd(t[0],t[1]):zd(t):ih(t)}function kc(t){if(!Ua(t))return pc(t);var n=[];for(var i in dt(t))lt.call(t,i)&&i!="constructor"&&n.push(i);return n}function vb(t){if(!Mt(t))return tv(t);var n=Ua(t),i=[];for(var w in t)w=="constructor"&&(n||!lt.call(t,w))||i.push(w);return i}function Mc(t,n){return t<n}function Ud(t,n){var i=-1,w=cr(t)?ae(t.length):[];return En(t,function(E,S,F){w[++i]=n(E,S,F)}),w}function zd(t){var n=Fc(t);return n.length==1&&n[0][2]?yp(n[0][0],n[0][1]):function(i){return i===t||_c(i,t,n)}}function Hd(t,n){return zc(t)&&wp(n)?yp(qr(t),n):function(i){var w=Zc(i,t);return w===a&&w===n?Qc(i,t):La(n,w,_|k)}}function mi(t,n,i,w,E){t!==n&&bc(n,function(S,F){if(E||(E=new Dr),Mt(S))wb(t,n,F,i,mi,w,E);else{var H=w?w(Bc(t,F),S,F+"",t,n,E):a;H===a&&(H=S),gc(t,F,H)}},ur)}function wb(t,n,i,w,E,S,F){var H=Bc(t,i),V=Bc(n,i),ce=F.get(V);if(ce){gc(t,i,ce);return}var ue=S?S(H,V,i+"",t,n,F):a,de=ue===a;if(de){var ve=He(V),Se=!ve&&An(V),$e=!ve&&!Se&&Fs(V);ue=V,ve||Se||$e?He(H)?ue=H:Dt(H)?ue=lr(H):Se?(de=!1,ue=ep(V,!0)):$e?(de=!1,ue=tp(V,!0)):ue=[]:Ha(V)||Vn(V)?(ue=H,Vn(H)?ue=Zp(H):(!Mt(H)||sn(H))&&(ue=vp(V))):de=!1}de&&(F.set(V,ue),E(ue,V,w,S,F),F.delete(V)),gc(t,i,ue)}function Bd(t,n){var i=t.length;if(i)return n+=n<0?i:0,nn(n,i)?t[n]:a}function Wd(t,n,i){n.length?n=gt(n,function(S){return He(S)?function(F){return Gn(F,S.length===1?S[0]:S)}:S}):n=[fr];var w=-1;n=gt(n,Kt(Oe()));var E=Ud(t,function(S,F,H){var V=gt(n,function(ce){return ce(S)});return{criteria:V,index:++w,value:S}});return Wl(E,function(S,F){return Db(S,F,i)})}function yb(t,n){return qd(t,n,function(i,w){return Qc(t,w)})}function qd(t,n,i){for(var w=-1,E=n.length,S={};++w<E;){var F=n[w],H=Gn(t,F);i(H,F)&&Pa(S,Nn(F,t),H)}return S}function _b(t){return function(n){return Gn(n,t)}}function jc(t,n,i,w){var E=w?Bl:yn,S=-1,F=n.length,H=t;for(t===n&&(n=lr(n)),i&&(H=gt(t,Kt(i)));++S<F;)for(var V=0,ce=n[S],ue=i?i(ce):ce;(V=E(H,ue,V,w))>-1;)H!==t&&Is.call(H,V,1),Is.call(t,V,1);return t}function Yd(t,n){for(var i=t?n.length:0,w=i-1;i--;){var E=n[i];if(i==w||E!==S){var S=E;nn(E)?Is.call(t,E,1):Sc(t,E)}}return t}function Ec(t,n){return t+Os(fi()*(n-t+1))}function kb(t,n,i,w){for(var E=-1,S=It(Rs((n-t)/(i||1)),0),F=ae(S);S--;)F[w?S:++E]=t,t+=i;return F}function Tc(t,n){var i="";if(!t||n<1||n>be)return i;do n%2&&(i+=t),n=Os(n/2),n&&(t+=t);while(n);return i}function Ge(t,n){return Wc(_p(t,n,fr),t+"")}function Mb(t){return Sd(Us(t))}function jb(t,n){var i=Us(t);return ji(i,Yn(n,0,i.length))}function Pa(t,n,i,w){if(!Mt(t))return t;n=Nn(n,t);for(var E=-1,S=n.length,F=S-1,H=t;H!=null&&++E<S;){var V=qr(n[E]),ce=i;if(V==="__proto__"||V==="constructor"||V==="prototype")return t;if(E!=F){var ue=H[V];ce=w?w(ue,V,H):a,ce===a&&(ce=Mt(ue)?ue:nn(n[E+1])?[]:{})}Ra(H,V,ce),H=H[V]}return t}var Gd=re?function(t,n){return re.set(t,n),t}:fr,Eb=Ds?function(t,n){return Ds(t,"toString",{configurable:!0,enumerable:!1,value:eu(n),writable:!0})}:fr;function Tb(t){return ji(Us(t))}function Er(t,n,i){var w=-1,E=t.length;n<0&&(n=-n>E?0:E+n),i=i>E?E:i,i<0&&(i+=E),E=n>i?0:i-n>>>0,n>>>=0;for(var S=ae(E);++w<E;)S[w]=t[w+n];return S}function Nb(t,n){var i;return En(t,function(w,E,S){return i=n(w,E,S),!i}),!!i}function gi(t,n,i){var w=0,E=t==null?w:t.length;if(typeof n=="number"&&n===n&&E<=U){for(;w<E;){var S=w+E>>>1,F=t[S];F!==null&&!wr(F)&&(i?F<=n:F<n)?w=S+1:E=S}return E}return Nc(t,n,fr,i)}function Nc(t,n,i,w){var E=0,S=t==null?0:t.length;if(S===0)return 0;n=i(n);for(var F=n!==n,H=n===null,V=wr(n),ce=n===a;E<S;){var ue=Os((E+S)/2),de=i(t[ue]),ve=de!==a,Se=de===null,$e=de===de,Ye=wr(de);if(F)var Le=w||$e;else ce?Le=$e&&(w||ve):H?Le=$e&&ve&&(w||!Se):V?Le=$e&&ve&&!Se&&(w||!Ye):Se||Ye?Le=!1:Le=w?de<=n:de<n;Le?E=ue+1:S=ue}return Ut(S,ge)}function Xd(t,n){for(var i=-1,w=t.length,E=0,S=[];++i<w;){var F=t[i],H=n?n(F):F;if(!i||!Rr(H,V)){var V=H;S[E++]=F===0?0:F}}return S}function Kd(t){return typeof t=="number"?t:wr(t)?W:+t}function vr(t){if(typeof t=="string")return t;if(He(t))return gt(t,vr)+"";if(wr(t))return ir?ir.call(t):"";var n=t+"";return n=="0"&&1/t==-se?"-0":n}function Tn(t,n,i){var w=-1,E=Fn,S=t.length,F=!0,H=[],V=H;if(i)F=!1,E=ys;else if(S>=c){var ce=n?null:Fb(t);if(ce)return Ms(ce);F=!1,E=Un,V=new qn}else V=n?[]:H;e:for(;++w<S;){var ue=t[w],de=n?n(ue):ue;if(ue=i||ue!==0?ue:0,F&&de===de){for(var ve=V.length;ve--;)if(V[ve]===de)continue e;n&&V.push(de),H.push(ue)}else E(V,de,i)||(V!==H&&V.push(de),H.push(ue))}return H}function Sc(t,n){return n=Nn(n,t),t=kp(t,n),t==null||delete t[qr(Tr(n))]}function Vd(t,n,i,w){return Pa(t,n,i(Gn(t,n)),w)}function xi(t,n,i,w){for(var E=t.length,S=w?E:-1;(w?S--:++S<E)&&n(t[S],S,t););return i?Er(t,w?0:S,w?S+1:E):Er(t,w?S+1:0,w?E:S)}function Zd(t,n){var i=t;return i instanceof Ke&&(i=i.value()),_s(n,function(w,E){return E.func.apply(E.thisArg,Ir([w],E.args))},i)}function Ac(t,n,i){var w=t.length;if(w<2)return w?Tn(t[0]):[];for(var E=-1,S=ae(w);++E<w;)for(var F=t[E],H=-1;++H<w;)H!=E&&(S[E]=Oa(S[E]||F,t[H],n,i));return Tn(Wt(S,1),n,i)}function Qd(t,n,i){for(var w=-1,E=t.length,S=n.length,F={};++w<E;){var H=w<S?n[w]:a;i(F,t[w],H)}return F}function Cc(t){return Dt(t)?t:[]}function Ic(t){return typeof t=="function"?t:fr}function Nn(t,n){return He(t)?t:zc(t,n)?[t]:Tp(ut(t))}var Sb=Ge;function Sn(t,n,i){var w=t.length;return i=i===a?w:i,!n&&i>=w?t:Er(t,n,i)}var Jd=uc||function(t){return Pt.clearTimeout(t)};function ep(t,n){if(n)return t.slice();var i=t.length,w=ai?ai(i):new t.constructor(i);return t.copy(w),w}function Dc(t){var n=new t.constructor(t.byteLength);return new As(n).set(new As(t)),n}function Ab(t,n){var i=n?Dc(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)}function Cb(t){var n=new t.constructor(t.source,hs.exec(t));return n.lastIndex=t.lastIndex,n}function Ib(t){return $t?dt($t.call(t)):{}}function tp(t,n){var i=n?Dc(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function rp(t,n){if(t!==n){var i=t!==a,w=t===null,E=t===t,S=wr(t),F=n!==a,H=n===null,V=n===n,ce=wr(n);if(!H&&!ce&&!S&&t>n||S&&F&&V&&!H&&!ce||w&&F&&V||!i&&V||!E)return 1;if(!w&&!S&&!ce&&t<n||ce&&i&&E&&!w&&!S||H&&i&&E||!F&&E||!V)return-1}return 0}function Db(t,n,i){for(var w=-1,E=t.criteria,S=n.criteria,F=E.length,H=i.length;++w<F;){var V=rp(E[w],S[w]);if(V){if(w>=H)return V;var ce=i[w];return V*(ce=="desc"?-1:1)}}return t.index-n.index}function np(t,n,i,w){for(var E=-1,S=t.length,F=i.length,H=-1,V=n.length,ce=It(S-F,0),ue=ae(V+ce),de=!w;++H<V;)ue[H]=n[H];for(;++E<F;)(de||E<S)&&(ue[i[E]]=t[E]);for(;ce--;)ue[H++]=t[E++];return ue}function sp(t,n,i,w){for(var E=-1,S=t.length,F=-1,H=i.length,V=-1,ce=n.length,ue=It(S-H,0),de=ae(ue+ce),ve=!w;++E<ue;)de[E]=t[E];for(var Se=E;++V<ce;)de[Se+V]=n[V];for(;++F<H;)(ve||E<S)&&(de[Se+i[F]]=t[E++]);return de}function lr(t,n){var i=-1,w=t.length;for(n||(n=ae(w));++i<w;)n[i]=t[i];return n}function Wr(t,n,i,w){var E=!i;i||(i={});for(var S=-1,F=n.length;++S<F;){var H=n[S],V=w?w(i[H],t[H],H,i,t):a;V===a&&(V=t[H]),E?en(i,H,V):Ra(i,H,V)}return i}function Rb(t,n){return Wr(t,Uc(t),n)}function Ob(t,n){return Wr(t,xp(t),n)}function bi(t,n){return function(i,w){var E=He(i)?Fl:nb,S=n?n():{};return E(i,t,Oe(w,2),S)}}function $s(t){return Ge(function(n,i){var w=-1,E=i.length,S=E>1?i[E-1]:a,F=E>2?i[2]:a;for(S=t.length>3&&typeof S=="function"?(E--,S):a,F&&nr(i[0],i[1],F)&&(S=E<3?a:S,E=1),n=dt(n);++w<E;){var H=i[w];H&&t(n,H,w,S)}return n})}function ap(t,n){return function(i,w){if(i==null)return i;if(!cr(i))return t(i,w);for(var E=i.length,S=n?E:-1,F=dt(i);(n?S--:++S<E)&&w(F[S],S,F)!==!1;);return i}}function op(t){return function(n,i,w){for(var E=-1,S=dt(n),F=w(n),H=F.length;H--;){var V=F[t?H:++E];if(i(S[V],V,S)===!1)break}return n}}function $b(t,n,i){var w=n&M,E=Fa(t);function S(){var F=this&&this!==Pt&&this instanceof S?E:t;return F.apply(w?i:this,arguments)}return S}function ip(t){return function(n){n=ut(n);var i=_n(n)?or(n):a,w=i?i[0]:n.charAt(0),E=i?Sn(i,1).join(""):n.slice(1);return w[t]()+E}}function Ls(t){return function(n){return _s(ah(sh(n).replace(va,"")),t,"")}}function Fa(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var i=br(t.prototype),w=t.apply(i,n);return Mt(w)?w:i}}function Lb(t,n,i){var w=Fa(t);function E(){for(var S=arguments.length,F=ae(S),H=S,V=Ps(E);H--;)F[H]=arguments[H];var ce=S<3&&F[0]!==V&&F[S-1]!==V?[]:zr(F,V);if(S-=ce.length,S<i)return dp(t,n,vi,E.placeholder,a,F,ce,a,a,i-S);var ue=this&&this!==Pt&&this instanceof E?w:t;return Jt(ue,this,F)}return E}function lp(t){return function(n,i,w){var E=dt(n);if(!cr(n)){var S=Oe(i,3);n=zt(n),i=function(H){return S(E[H],H,E)}}var F=t(n,i,w);return F>-1?E[S?n[F]:F]:a}}function cp(t){return rn(function(n){var i=n.length,w=i,E=Lt.prototype.thru;for(t&&n.reverse();w--;){var S=n[w];if(typeof S!="function")throw new tr(y);if(E&&!F&&ki(S)=="wrapper")var F=new Lt([],!0)}for(w=F?w:i;++w<i;){S=n[w];var H=ki(S),V=H=="wrapper"?Pc(S):a;V&&Hc(V[0])&&V[1]==(R|I|$|K)&&!V[4].length&&V[9]==1?F=F[ki(V[0])].apply(F,V[3]):F=S.length==1&&Hc(S)?F[H]():F.thru(S)}return function(){var ce=arguments,ue=ce[0];if(F&&ce.length==1&&He(ue))return F.plant(ue).value();for(var de=0,ve=i?n[de].apply(this,ce):ue;++de<i;)ve=n[de].call(this,ve);return ve}})}function vi(t,n,i,w,E,S,F,H,V,ce){var ue=n&R,de=n&M,ve=n&T,Se=n&(I|O),$e=n&X,Ye=ve?a:Fa(t);function Le(){for(var Ze=arguments.length,Je=ae(Ze),yr=Ze;yr--;)Je[yr]=arguments[yr];if(Se)var sr=Ps(Le),_r=Yl(Je,sr);if(w&&(Je=np(Je,w,E,Se)),S&&(Je=sp(Je,S,F,Se)),Ze-=_r,Se&&Ze<ce){var Rt=zr(Je,sr);return dp(t,n,vi,Le.placeholder,i,Je,Rt,H,V,ce-Ze)}var Or=de?i:this,on=ve?Or[t]:t;return Ze=Je.length,H?Je=nv(Je,H):$e&&Ze>1&&Je.reverse(),ue&&V<Ze&&(Je.length=V),this&&this!==Pt&&this instanceof Le&&(on=Ye||Fa(on)),on.apply(Or,Je)}return Le}function up(t,n){return function(i,w){return fb(i,t,n(w),{})}}function wi(t,n){return function(i,w){var E;if(i===a&&w===a)return n;if(i!==a&&(E=i),w!==a){if(E===a)return w;typeof i=="string"||typeof w=="string"?(i=vr(i),w=vr(w)):(i=Kd(i),w=Kd(w)),E=t(i,w)}return E}}function Rc(t){return rn(function(n){return n=gt(n,Kt(Oe())),Ge(function(i){var w=this;return t(n,function(E){return Jt(E,w,i)})})})}function yi(t,n){n=n===a?" ":vr(n);var i=n.length;if(i<2)return i?Tc(n,t):n;var w=Tc(n,Rs(t/kn(n)));return _n(n)?Sn(or(w),0,t).join(""):w.slice(0,t)}function Pb(t,n,i,w){var E=n&M,S=Fa(t);function F(){for(var H=-1,V=arguments.length,ce=-1,ue=w.length,de=ae(ue+V),ve=this&&this!==Pt&&this instanceof F?S:t;++ce<ue;)de[ce]=w[ce];for(;V--;)de[ce++]=arguments[++H];return Jt(ve,E?i:this,de)}return F}function fp(t){return function(n,i,w){return w&&typeof w!="number"&&nr(n,i,w)&&(i=w=a),n=an(n),i===a?(i=n,n=0):i=an(i),w=w===a?n<i?1:-1:an(w),kb(n,i,w,t)}}function _i(t){return function(n,i){return typeof n=="string"&&typeof i=="string"||(n=Nr(n),i=Nr(i)),t(n,i)}}function dp(t,n,i,w,E,S,F,H,V,ce){var ue=n&I,de=ue?F:a,ve=ue?a:F,Se=ue?S:a,$e=ue?a:S;n|=ue?$:q,n&=~(ue?q:$),n&A||(n&=-4);var Ye=[t,n,E,Se,de,$e,ve,H,V,ce],Le=i.apply(a,Ye);return Hc(t)&&Mp(Le,Ye),Le.placeholder=w,jp(Le,t,n)}function Oc(t){var n=Ct[t];return function(i,w){if(i=Nr(i),w=w==null?0:Ut(We(w),292),w&&ui(i)){var E=(ut(i)+"e").split("e"),S=n(E[0]+"e"+(+E[1]+w));return E=(ut(S)+"e").split("e"),+(E[0]+"e"+(+E[1]-w))}return n(i)}}var Fb=C&&1/Ms(new C([,-0]))[1]==se?function(t){return new C(t)}:nu;function pp(t){return function(n){var i=Vt(n);return i==qe?Aa(n):i==Re?Ql(n):ql(n,t(n))}}function tn(t,n,i,w,E,S,F,H){var V=n&T;if(!V&&typeof t!="function")throw new tr(y);var ce=w?w.length:0;if(ce||(n&=-97,w=E=a),F=F===a?F:It(We(F),0),H=H===a?H:We(H),ce-=E?E.length:0,n&q){var ue=w,de=E;w=E=a}var ve=V?a:Pc(t),Se=[t,n,i,w,E,ue,de,S,F,H];if(ve&&ev(Se,ve),t=Se[0],n=Se[1],i=Se[2],w=Se[3],E=Se[4],H=Se[9]=Se[9]===a?V?0:t.length:It(Se[9]-ce,0),!H&&n&(I|O)&&(n&=-25),!n||n==M)var $e=$b(t,n,i);else n==I||n==O?$e=Lb(t,n,H):(n==$||n==(M|$))&&!E.length?$e=Pb(t,n,i,w):$e=vi.apply(a,Se);var Ye=ve?Gd:Mp;return jp(Ye($e,Se),t,n)}function hp(t,n,i,w){return t===a||Rr(t,jn[i])&&!lt.call(w,i)?n:t}function mp(t,n,i,w,E,S){return Mt(t)&&Mt(n)&&(S.set(n,t),mi(t,n,a,mp,S),S.delete(n)),t}function Ub(t){return Ha(t)?a:t}function gp(t,n,i,w,E,S){var F=i&_,H=t.length,V=n.length;if(H!=V&&!(F&&V>H))return!1;var ce=S.get(t),ue=S.get(n);if(ce&&ue)return ce==n&&ue==t;var de=-1,ve=!0,Se=i&k?new qn:a;for(S.set(t,n),S.set(n,t);++de<H;){var $e=t[de],Ye=n[de];if(w)var Le=F?w(Ye,$e,de,n,t,S):w($e,Ye,de,t,n,S);if(Le!==a){if(Le)continue;ve=!1;break}if(Se){if(!Ma(n,function(Ze,Je){if(!Un(Se,Je)&&($e===Ze||E($e,Ze,i,w,S)))return Se.push(Je)})){ve=!1;break}}else if(!($e===Ye||E($e,Ye,i,w,S))){ve=!1;break}}return S.delete(t),S.delete(n),ve}function zb(t,n,i,w,E,S,F){switch(i){case gn:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case mn:return!(t.byteLength!=n.byteLength||!S(new As(t),new As(n)));case De:case Me:case at:return Rr(+t,+n);case Ee:return t.name==n.name&&t.message==n.message;case Be:case hr:return t==n+"";case qe:var H=Aa;case Re:var V=w&_;if(H||(H=Ms),t.size!=n.size&&!V)return!1;var ce=F.get(t);if(ce)return ce==n;w|=k,F.set(t,n);var ue=gp(H(t),H(n),w,E,S,F);return F.delete(t),ue;case mr:if($t)return $t.call(t)==$t.call(n)}return!1}function Hb(t,n,i,w,E,S){var F=i&_,H=$c(t),V=H.length,ce=$c(n),ue=ce.length;if(V!=ue&&!F)return!1;for(var de=V;de--;){var ve=H[de];if(!(F?ve in n:lt.call(n,ve)))return!1}var Se=S.get(t),$e=S.get(n);if(Se&&$e)return Se==n&&$e==t;var Ye=!0;S.set(t,n),S.set(n,t);for(var Le=F;++de<V;){ve=H[de];var Ze=t[ve],Je=n[ve];if(w)var yr=F?w(Je,Ze,ve,n,t,S):w(Ze,Je,ve,t,n,S);if(!(yr===a?Ze===Je||E(Ze,Je,i,w,S):yr)){Ye=!1;break}Le||(Le=ve=="constructor")}if(Ye&&!Le){var sr=t.constructor,_r=n.constructor;sr!=_r&&"constructor"in t&&"constructor"in n&&!(typeof sr=="function"&&sr instanceof sr&&typeof _r=="function"&&_r instanceof _r)&&(Ye=!1)}return S.delete(t),S.delete(n),Ye}function rn(t){return Wc(_p(t,a,Cp),t+"")}function $c(t){return $d(t,zt,Uc)}function Lc(t){return $d(t,ur,xp)}var Pc=re?function(t){return re.get(t)}:nu;function ki(t){for(var n=t.name+"",i=me[n],w=lt.call(me,n)?i.length:0;w--;){var E=i[w],S=E.func;if(S==null||S==t)return E.name}return n}function Ps(t){var n=lt.call(N,"placeholder")?N:t;return n.placeholder}function Oe(){var t=N.iteratee||tu;return t=t===tu?Fd:t,arguments.length?t(arguments[0],arguments[1]):t}function Mi(t,n){var i=t.__data__;return Vb(n)?i[typeof n=="string"?"string":"hash"]:i.map}function Fc(t){for(var n=zt(t),i=n.length;i--;){var w=n[i],E=t[w];n[i]=[w,E,wp(E)]}return n}function Xn(t,n){var i=Ur(t,n);return Pd(i)?i:a}function Bb(t){var n=lt.call(t,Zr),i=t[Zr];try{t[Zr]=a;var w=!0}catch{}var E=Ns.call(t);return w&&(n?t[Zr]=i:delete t[Zr]),E}var Uc=Ia?function(t){return t==null?[]:(t=dt(t),Cr(Ia(t),function(n){return ii.call(t,n)}))}:su,xp=Ia?function(t){for(var n=[];t;)Ir(n,Uc(t)),t=Cs(t);return n}:su,Vt=rr;(x&&Vt(new x(new ArrayBuffer(1)))!=gn||v&&Vt(new v)!=qe||j&&Vt(j.resolve())!=ct||C&&Vt(new C)!=Re||z&&Vt(new z)!=Ar)&&(Vt=function(t){var n=rr(t),i=n==wt?t.constructor:a,w=i?Kn(i):"";if(w)switch(w){case fe:return gn;case Ie:return qe;case _e:return ct;case nt:return Re;case Xe:return Ar}return n});function Wb(t,n,i){for(var w=-1,E=i.length;++w<E;){var S=i[w],F=S.size;switch(S.type){case"drop":t+=F;break;case"dropRight":n-=F;break;case"take":n=Ut(n,t+F);break;case"takeRight":t=It(t,n-F);break}}return{start:t,end:n}}function qb(t){var n=t.match(ho);return n?n[1].split(mo):[]}function bp(t,n,i){n=Nn(n,t);for(var w=-1,E=n.length,S=!1;++w<E;){var F=qr(n[w]);if(!(S=t!=null&&i(t,F)))break;t=t[F]}return S||++w!=E?S:(E=t==null?0:t.length,!!E&&Ci(E)&&nn(F,E)&&(He(t)||Vn(t)))}function Yb(t){var n=t.length,i=new t.constructor(n);return n&&typeof t[0]=="string"&<.call(t,"index")&&(i.index=t.index,i.input=t.input),i}function vp(t){return typeof t.constructor=="function"&&!Ua(t)?br(Cs(t)):{}}function Gb(t,n,i){var w=t.constructor;switch(n){case mn:return Dc(t);case De:case Me:return new w(+t);case gn:return Ab(t,i);case Pr:case Ln:case Fr:case Mr:case Pn:case cs:case us:case Xt:case ta:return tp(t,i);case qe:return new w;case at:case hr:return new w(t);case Be:return Cb(t);case Re:return new w;case mr:return Ib(t)}}function Xb(t,n){var i=n.length;if(!i)return t;var w=i-1;return n[w]=(i>1?"& ":"")+n[w],n=n.join(i>2?", ":" "),t.replace(po,`{
|
|
49
|
-
/* [wrapped with `+n+`] */
|
|
50
|
-
`)}function Kb(t){return He(t)||Vn(t)||!!(li&&t&&t[li])}function nn(t,n){var i=typeof t;return n=n??be,!!n&&(i=="number"||i!="symbol"&&yl.test(t))&&t>-1&&t%1==0&&t<n}function nr(t,n,i){if(!Mt(i))return!1;var w=typeof n;return(w=="number"?cr(i)&&nn(n,i.length):w=="string"&&n in i)?Rr(i[n],t):!1}function zc(t,n){if(He(t))return!1;var i=typeof t;return i=="number"||i=="symbol"||i=="boolean"||t==null||wr(t)?!0:co.test(t)||!la.test(t)||n!=null&&t in dt(n)}function Vb(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}function Hc(t){var n=ki(t),i=N[n];if(typeof i!="function"||!(n in Ke.prototype))return!1;if(t===i)return!0;var w=Pc(i);return!!w&&t===w[0]}function Zb(t){return!!si&&si in t}var Qb=Es?sn:au;function Ua(t){var n=t&&t.constructor,i=typeof n=="function"&&n.prototype||jn;return t===i}function wp(t){return t===t&&!Mt(t)}function yp(t,n){return function(i){return i==null?!1:i[t]===n&&(n!==a||t in dt(i))}}function Jb(t){var n=Si(t,function(w){return i.size===f&&i.clear(),w}),i=n.cache;return n}function ev(t,n){var i=t[1],w=n[1],E=i|w,S=E<(M|T|R),F=w==R&&i==I||w==R&&i==K&&t[7].length<=n[8]||w==(R|K)&&n[7].length<=n[8]&&i==I;if(!(S||F))return t;w&M&&(t[2]=n[2],E|=i&M?0:A);var H=n[3];if(H){var V=t[3];t[3]=V?np(V,H,n[4]):H,t[4]=V?zr(t[3],u):n[4]}return H=n[5],H&&(V=t[5],t[5]=V?sp(V,H,n[6]):H,t[6]=V?zr(t[5],u):n[6]),H=n[7],H&&(t[7]=H),w&R&&(t[8]=t[8]==null?n[8]:Ut(t[8],n[8])),t[9]==null&&(t[9]=n[9]),t[0]=n[0],t[1]=E,t}function tv(t){var n=[];if(t!=null)for(var i in dt(t))n.push(i);return n}function rv(t){return Ns.call(t)}function _p(t,n,i){return n=It(n===a?t.length-1:n,0),function(){for(var w=arguments,E=-1,S=It(w.length-n,0),F=ae(S);++E<S;)F[E]=w[n+E];E=-1;for(var H=ae(n+1);++E<n;)H[E]=w[E];return H[n]=i(F),Jt(t,this,H)}}function kp(t,n){return n.length<2?t:Gn(t,Er(n,0,-1))}function nv(t,n){for(var i=t.length,w=Ut(n.length,i),E=lr(t);w--;){var S=n[w];t[w]=nn(S,i)?E[S]:a}return t}function Bc(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}var Mp=Ep(Gd),za=ci||function(t,n){return Pt.setTimeout(t,n)},Wc=Ep(Eb);function jp(t,n,i){var w=n+"";return Wc(t,Xb(w,sv(qb(w),i)))}function Ep(t){var n=0,i=0;return function(){var w=hc(),E=J-(w-i);if(i=w,E>0){if(++n>=B)return arguments[0]}else n=0;return t.apply(a,arguments)}}function ji(t,n){var i=-1,w=t.length,E=w-1;for(n=n===a?w:n;++i<n;){var S=Ec(i,E),F=t[S];t[S]=t[i],t[i]=F}return t.length=n,t}var Tp=Jb(function(t){var n=[];return t.charCodeAt(0)===46&&n.push(""),t.replace(gl,function(i,w,E,S){n.push(E?S.replace(ps,"$1"):w||i)}),n});function qr(t){if(typeof t=="string"||wr(t))return t;var n=t+"";return n=="0"&&1/t==-se?"-0":n}function Kn(t){if(t!=null){try{return Ts.call(t)}catch{}try{return t+""}catch{}}return""}function sv(t,n){return er(P,function(i){var w="_."+i[0];n&i[1]&&!Fn(t,w)&&t.push(w)}),t.sort()}function Np(t){if(t instanceof Ke)return t.clone();var n=new Lt(t.__wrapped__,t.__chain__);return n.__actions__=lr(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}function av(t,n,i){(i?nr(t,n,i):n===a)?n=1:n=It(We(n),0);var w=t==null?0:t.length;if(!w||n<1)return[];for(var E=0,S=0,F=ae(Rs(w/n));E<w;)F[S++]=Er(t,E,E+=n);return F}function ov(t){for(var n=-1,i=t==null?0:t.length,w=0,E=[];++n<i;){var S=t[n];S&&(E[w++]=S)}return E}function iv(){var t=arguments.length;if(!t)return[];for(var n=ae(t-1),i=arguments[0],w=t;w--;)n[w-1]=arguments[w];return Ir(He(i)?lr(i):[i],Wt(n,1))}var lv=Ge(function(t,n){return Dt(t)?Oa(t,Wt(n,1,Dt,!0)):[]}),cv=Ge(function(t,n){var i=Tr(n);return Dt(i)&&(i=a),Dt(t)?Oa(t,Wt(n,1,Dt,!0),Oe(i,2)):[]}),uv=Ge(function(t,n){var i=Tr(n);return Dt(i)&&(i=a),Dt(t)?Oa(t,Wt(n,1,Dt,!0),a,i):[]});function fv(t,n,i){var w=t==null?0:t.length;return w?(n=i||n===a?1:We(n),Er(t,n<0?0:n,w)):[]}function dv(t,n,i){var w=t==null?0:t.length;return w?(n=i||n===a?1:We(n),n=w-n,Er(t,0,n<0?0:n)):[]}function pv(t,n){return t&&t.length?xi(t,Oe(n,3),!0,!0):[]}function hv(t,n){return t&&t.length?xi(t,Oe(n,3),!0):[]}function mv(t,n,i,w){var E=t==null?0:t.length;return E?(i&&typeof i!="number"&&nr(t,n,i)&&(i=0,w=E),ib(t,n,i,w)):[]}function Sp(t,n,i){var w=t==null?0:t.length;if(!w)return-1;var E=i==null?0:We(i);return E<0&&(E=It(w+E,0)),ks(t,Oe(n,3),E)}function Ap(t,n,i){var w=t==null?0:t.length;if(!w)return-1;var E=w-1;return i!==a&&(E=We(i),E=i<0?It(w+E,0):Ut(E,w-1)),ks(t,Oe(n,3),E,!0)}function Cp(t){var n=t==null?0:t.length;return n?Wt(t,1):[]}function gv(t){var n=t==null?0:t.length;return n?Wt(t,se):[]}function xv(t,n){var i=t==null?0:t.length;return i?(n=n===a?1:We(n),Wt(t,n)):[]}function bv(t){for(var n=-1,i=t==null?0:t.length,w={};++n<i;){var E=t[n];w[E[0]]=E[1]}return w}function Ip(t){return t&&t.length?t[0]:a}function vv(t,n,i){var w=t==null?0:t.length;if(!w)return-1;var E=i==null?0:We(i);return E<0&&(E=It(w+E,0)),yn(t,n,E)}function wv(t){var n=t==null?0:t.length;return n?Er(t,0,-1):[]}var yv=Ge(function(t){var n=gt(t,Cc);return n.length&&n[0]===t[0]?yc(n):[]}),_v=Ge(function(t){var n=Tr(t),i=gt(t,Cc);return n===Tr(i)?n=a:i.pop(),i.length&&i[0]===t[0]?yc(i,Oe(n,2)):[]}),kv=Ge(function(t){var n=Tr(t),i=gt(t,Cc);return n=typeof n=="function"?n:a,n&&i.pop(),i.length&&i[0]===t[0]?yc(i,a,n):[]});function Mv(t,n){return t==null?"":_t.call(t,n)}function Tr(t){var n=t==null?0:t.length;return n?t[n-1]:a}function jv(t,n,i){var w=t==null?0:t.length;if(!w)return-1;var E=w;return i!==a&&(E=We(i),E=E<0?It(w+E,0):Ut(E,w-1)),n===n?ec(t,n,E):ks(t,Ko,E,!0)}function Ev(t,n){return t&&t.length?Bd(t,We(n)):a}var Tv=Ge(Dp);function Dp(t,n){return t&&t.length&&n&&n.length?jc(t,n):t}function Nv(t,n,i){return t&&t.length&&n&&n.length?jc(t,n,Oe(i,2)):t}function Sv(t,n,i){return t&&t.length&&n&&n.length?jc(t,n,a,i):t}var Av=rn(function(t,n){var i=t==null?0:t.length,w=xc(t,n);return Yd(t,gt(n,function(E){return nn(E,i)?+E:E}).sort(rp)),w});function Cv(t,n){var i=[];if(!(t&&t.length))return i;var w=-1,E=[],S=t.length;for(n=Oe(n,3);++w<S;){var F=t[w];n(F,w,t)&&(i.push(F),E.push(w))}return Yd(t,E),i}function qc(t){return t==null?t:p.call(t)}function Iv(t,n,i){var w=t==null?0:t.length;return w?(i&&typeof i!="number"&&nr(t,n,i)?(n=0,i=w):(n=n==null?0:We(n),i=i===a?w:We(i)),Er(t,n,i)):[]}function Dv(t,n){return gi(t,n)}function Rv(t,n,i){return Nc(t,n,Oe(i,2))}function Ov(t,n){var i=t==null?0:t.length;if(i){var w=gi(t,n);if(w<i&&Rr(t[w],n))return w}return-1}function $v(t,n){return gi(t,n,!0)}function Lv(t,n,i){return Nc(t,n,Oe(i,2),!0)}function Pv(t,n){var i=t==null?0:t.length;if(i){var w=gi(t,n,!0)-1;if(Rr(t[w],n))return w}return-1}function Fv(t){return t&&t.length?Xd(t):[]}function Uv(t,n){return t&&t.length?Xd(t,Oe(n,2)):[]}function zv(t){var n=t==null?0:t.length;return n?Er(t,1,n):[]}function Hv(t,n,i){return t&&t.length?(n=i||n===a?1:We(n),Er(t,0,n<0?0:n)):[]}function Bv(t,n,i){var w=t==null?0:t.length;return w?(n=i||n===a?1:We(n),n=w-n,Er(t,n<0?0:n,w)):[]}function Wv(t,n){return t&&t.length?xi(t,Oe(n,3),!1,!0):[]}function qv(t,n){return t&&t.length?xi(t,Oe(n,3)):[]}var Yv=Ge(function(t){return Tn(Wt(t,1,Dt,!0))}),Gv=Ge(function(t){var n=Tr(t);return Dt(n)&&(n=a),Tn(Wt(t,1,Dt,!0),Oe(n,2))}),Xv=Ge(function(t){var n=Tr(t);return n=typeof n=="function"?n:a,Tn(Wt(t,1,Dt,!0),a,n)});function Kv(t){return t&&t.length?Tn(t):[]}function Vv(t,n){return t&&t.length?Tn(t,Oe(n,2)):[]}function Zv(t,n){return n=typeof n=="function"?n:a,t&&t.length?Tn(t,a,n):[]}function Yc(t){if(!(t&&t.length))return[];var n=0;return t=Cr(t,function(i){if(Dt(i))return n=It(i.length,n),!0}),Na(n,function(i){return gt(t,ja(i))})}function Rp(t,n){if(!(t&&t.length))return[];var i=Yc(t);return n==null?i:gt(i,function(w){return Jt(n,a,w)})}var Qv=Ge(function(t,n){return Dt(t)?Oa(t,n):[]}),Jv=Ge(function(t){return Ac(Cr(t,Dt))}),ew=Ge(function(t){var n=Tr(t);return Dt(n)&&(n=a),Ac(Cr(t,Dt),Oe(n,2))}),tw=Ge(function(t){var n=Tr(t);return n=typeof n=="function"?n:a,Ac(Cr(t,Dt),a,n)}),rw=Ge(Yc);function nw(t,n){return Qd(t||[],n||[],Ra)}function sw(t,n){return Qd(t||[],n||[],Pa)}var aw=Ge(function(t){var n=t.length,i=n>1?t[n-1]:a;return i=typeof i=="function"?(t.pop(),i):a,Rp(t,i)});function Op(t){var n=N(t);return n.__chain__=!0,n}function ow(t,n){return n(t),t}function Ei(t,n){return n(t)}var iw=rn(function(t){var n=t.length,i=n?t[0]:0,w=this.__wrapped__,E=function(S){return xc(S,t)};return n>1||this.__actions__.length||!(w instanceof Ke)||!nn(i)?this.thru(E):(w=w.slice(i,+i+(n?1:0)),w.__actions__.push({func:Ei,args:[E],thisArg:a}),new Lt(w,this.__chain__).thru(function(S){return n&&!S.length&&S.push(a),S}))});function lw(){return Op(this)}function cw(){return new Lt(this.value(),this.__chain__)}function uw(){this.__values__===a&&(this.__values__=Kp(this.value()));var t=this.__index__>=this.__values__.length,n=t?a:this.__values__[this.__index__++];return{done:t,value:n}}function fw(){return this}function dw(t){for(var n,i=this;i instanceof Hn;){var w=Np(i);w.__index__=0,w.__values__=a,n?E.__wrapped__=w:n=w;var E=w;i=i.__wrapped__}return E.__wrapped__=t,n}function pw(){var t=this.__wrapped__;if(t instanceof Ke){var n=t;return this.__actions__.length&&(n=new Ke(this)),n=n.reverse(),n.__actions__.push({func:Ei,args:[qc],thisArg:a}),new Lt(n,this.__chain__)}return this.thru(qc)}function hw(){return Zd(this.__wrapped__,this.__actions__)}var mw=bi(function(t,n,i){lt.call(t,i)?++t[i]:en(t,i,1)});function gw(t,n,i){var w=He(t)?ka:ob;return i&&nr(t,n,i)&&(n=a),w(t,Oe(n,3))}function xw(t,n){var i=He(t)?Cr:Rd;return i(t,Oe(n,3))}var bw=lp(Sp),vw=lp(Ap);function ww(t,n){return Wt(Ti(t,n),1)}function yw(t,n){return Wt(Ti(t,n),se)}function _w(t,n,i){return i=i===a?1:We(i),Wt(Ti(t,n),i)}function $p(t,n){var i=He(t)?er:En;return i(t,Oe(n,3))}function Lp(t,n){var i=He(t)?Yo:Dd;return i(t,Oe(n,3))}var kw=bi(function(t,n,i){lt.call(t,i)?t[i].push(n):en(t,i,[n])});function Mw(t,n,i,w){t=cr(t)?t:Us(t),i=i&&!w?We(i):0;var E=t.length;return i<0&&(i=It(E+i,0)),Ii(t)?i<=E&&t.indexOf(n,i)>-1:!!E&&yn(t,n,i)>-1}var jw=Ge(function(t,n,i){var w=-1,E=typeof n=="function",S=cr(t)?ae(t.length):[];return En(t,function(F){S[++w]=E?Jt(n,F,i):$a(F,n,i)}),S}),Ew=bi(function(t,n,i){en(t,i,n)});function Ti(t,n){var i=He(t)?gt:Ud;return i(t,Oe(n,3))}function Tw(t,n,i,w){return t==null?[]:(He(n)||(n=n==null?[]:[n]),i=w?a:i,He(i)||(i=i==null?[]:[i]),Wd(t,n,i))}var Nw=bi(function(t,n,i){t[i?0:1].push(n)},function(){return[[],[]]});function Sw(t,n,i){var w=He(t)?_s:Zo,E=arguments.length<3;return w(t,Oe(n,4),i,E,En)}function Aw(t,n,i){var w=He(t)?Go:Zo,E=arguments.length<3;return w(t,Oe(n,4),i,E,Dd)}function Cw(t,n){var i=He(t)?Cr:Rd;return i(t,Ai(Oe(n,3)))}function Iw(t){var n=He(t)?Sd:Mb;return n(t)}function Dw(t,n,i){(i?nr(t,n,i):n===a)?n=1:n=We(n);var w=He(t)?tb:jb;return w(t,n)}function Rw(t){var n=He(t)?rb:Tb;return n(t)}function Ow(t){if(t==null)return 0;if(cr(t))return Ii(t)?kn(t):t.length;var n=Vt(t);return n==qe||n==Re?t.size:kc(t).length}function $w(t,n,i){var w=He(t)?Ma:Nb;return i&&nr(t,n,i)&&(n=a),w(t,Oe(n,3))}var Lw=Ge(function(t,n){if(t==null)return[];var i=n.length;return i>1&&nr(t,n[0],n[1])?n=[]:i>2&&nr(n[0],n[1],n[2])&&(n=[n[0]]),Wd(t,Wt(n,1),[])}),Ni=fc||function(){return Pt.Date.now()};function Pw(t,n){if(typeof n!="function")throw new tr(y);return t=We(t),function(){if(--t<1)return n.apply(this,arguments)}}function Pp(t,n,i){return n=i?a:n,n=t&&n==null?t.length:n,tn(t,R,a,a,a,a,n)}function Fp(t,n){var i;if(typeof n!="function")throw new tr(y);return t=We(t),function(){return--t>0&&(i=n.apply(this,arguments)),t<=1&&(n=a),i}}var Gc=Ge(function(t,n,i){var w=M;if(i.length){var E=zr(i,Ps(Gc));w|=$}return tn(t,w,n,i,E)}),Up=Ge(function(t,n,i){var w=M|T;if(i.length){var E=zr(i,Ps(Up));w|=$}return tn(n,w,t,i,E)});function zp(t,n,i){n=i?a:n;var w=tn(t,I,a,a,a,a,a,n);return w.placeholder=zp.placeholder,w}function Hp(t,n,i){n=i?a:n;var w=tn(t,O,a,a,a,a,a,n);return w.placeholder=Hp.placeholder,w}function Bp(t,n,i){var w,E,S,F,H,V,ce=0,ue=!1,de=!1,ve=!0;if(typeof t!="function")throw new tr(y);n=Nr(n)||0,Mt(i)&&(ue=!!i.leading,de="maxWait"in i,S=de?It(Nr(i.maxWait)||0,n):S,ve="trailing"in i?!!i.trailing:ve);function Se(Rt){var Or=w,on=E;return w=E=a,ce=Rt,F=t.apply(on,Or),F}function $e(Rt){return ce=Rt,H=za(Ze,n),ue?Se(Rt):F}function Ye(Rt){var Or=Rt-V,on=Rt-ce,lh=n-Or;return de?Ut(lh,S-on):lh}function Le(Rt){var Or=Rt-V,on=Rt-ce;return V===a||Or>=n||Or<0||de&&on>=S}function Ze(){var Rt=Ni();if(Le(Rt))return Je(Rt);H=za(Ze,Ye(Rt))}function Je(Rt){return H=a,ve&&w?Se(Rt):(w=E=a,F)}function yr(){H!==a&&Jd(H),ce=0,w=V=E=H=a}function sr(){return H===a?F:Je(Ni())}function _r(){var Rt=Ni(),Or=Le(Rt);if(w=arguments,E=this,V=Rt,Or){if(H===a)return $e(V);if(de)return Jd(H),H=za(Ze,n),Se(V)}return H===a&&(H=za(Ze,n)),F}return _r.cancel=yr,_r.flush=sr,_r}var Fw=Ge(function(t,n){return Id(t,1,n)}),Uw=Ge(function(t,n,i){return Id(t,Nr(n)||0,i)});function zw(t){return tn(t,X)}function Si(t,n){if(typeof t!="function"||n!=null&&typeof n!="function")throw new tr(y);var i=function(){var w=arguments,E=n?n.apply(this,w):w[0],S=i.cache;if(S.has(E))return S.get(E);var F=t.apply(this,w);return i.cache=S.set(E,F)||S,F};return i.cache=new(Si.Cache||Jr),i}Si.Cache=Jr;function Ai(t){if(typeof t!="function")throw new tr(y);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}function Hw(t){return Fp(2,t)}var Bw=Sb(function(t,n){n=n.length==1&&He(n[0])?gt(n[0],Kt(Oe())):gt(Wt(n,1),Kt(Oe()));var i=n.length;return Ge(function(w){for(var E=-1,S=Ut(w.length,i);++E<S;)w[E]=n[E].call(this,w[E]);return Jt(t,this,w)})}),Xc=Ge(function(t,n){var i=zr(n,Ps(Xc));return tn(t,$,a,n,i)}),Wp=Ge(function(t,n){var i=zr(n,Ps(Wp));return tn(t,q,a,n,i)}),Ww=rn(function(t,n){return tn(t,K,a,a,a,n)});function qw(t,n){if(typeof t!="function")throw new tr(y);return n=n===a?n:We(n),Ge(t,n)}function Yw(t,n){if(typeof t!="function")throw new tr(y);return n=n==null?0:It(We(n),0),Ge(function(i){var w=i[n],E=Sn(i,0,n);return w&&Ir(E,w),Jt(t,this,E)})}function Gw(t,n,i){var w=!0,E=!0;if(typeof t!="function")throw new tr(y);return Mt(i)&&(w="leading"in i?!!i.leading:w,E="trailing"in i?!!i.trailing:E),Bp(t,n,{leading:w,maxWait:n,trailing:E})}function Xw(t){return Pp(t,1)}function Kw(t,n){return Xc(Ic(n),t)}function Vw(){if(!arguments.length)return[];var t=arguments[0];return He(t)?t:[t]}function Zw(t){return jr(t,b)}function Qw(t,n){return n=typeof n=="function"?n:a,jr(t,b,n)}function Jw(t){return jr(t,d|b)}function ey(t,n){return n=typeof n=="function"?n:a,jr(t,d|b,n)}function ty(t,n){return n==null||Cd(t,n,zt(n))}function Rr(t,n){return t===n||t!==t&&n!==n}var ry=_i(wc),ny=_i(function(t,n){return t>=n}),Vn=Ld((function(){return arguments})())?Ld:function(t){return Tt(t)&<.call(t,"callee")&&!ii.call(t,"callee")},He=ae.isArray,sy=Uo?Kt(Uo):db;function cr(t){return t!=null&&Ci(t.length)&&!sn(t)}function Dt(t){return Tt(t)&&cr(t)}function ay(t){return t===!0||t===!1||Tt(t)&&rr(t)==De}var An=dc||au,oy=zo?Kt(zo):pb;function iy(t){return Tt(t)&&t.nodeType===1&&!Ha(t)}function ly(t){if(t==null)return!0;if(cr(t)&&(He(t)||typeof t=="string"||typeof t.splice=="function"||An(t)||Fs(t)||Vn(t)))return!t.length;var n=Vt(t);if(n==qe||n==Re)return!t.size;if(Ua(t))return!kc(t).length;for(var i in t)if(lt.call(t,i))return!1;return!0}function cy(t,n){return La(t,n)}function uy(t,n,i){i=typeof i=="function"?i:a;var w=i?i(t,n):a;return w===a?La(t,n,a,i):!!w}function Kc(t){if(!Tt(t))return!1;var n=rr(t);return n==Ee||n==oe||typeof t.message=="string"&&typeof t.name=="string"&&!Ha(t)}function fy(t){return typeof t=="number"&&ui(t)}function sn(t){if(!Mt(t))return!1;var n=rr(t);return n==Ae||n==Ce||n==Te||n==le}function qp(t){return typeof t=="number"&&t==We(t)}function Ci(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=be}function Mt(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}function Tt(t){return t!=null&&typeof t=="object"}var Yp=Ho?Kt(Ho):mb;function dy(t,n){return t===n||_c(t,n,Fc(n))}function py(t,n,i){return i=typeof i=="function"?i:a,_c(t,n,Fc(n),i)}function hy(t){return Gp(t)&&t!=+t}function my(t){if(Qb(t))throw new Pe(h);return Pd(t)}function gy(t){return t===null}function xy(t){return t==null}function Gp(t){return typeof t=="number"||Tt(t)&&rr(t)==at}function Ha(t){if(!Tt(t)||rr(t)!=wt)return!1;var n=Cs(t);if(n===null)return!0;var i=lt.call(n,"constructor")&&n.constructor;return typeof i=="function"&&i instanceof i&&Ts.call(i)==Bt}var Vc=Bo?Kt(Bo):gb;function by(t){return qp(t)&&t>=-be&&t<=be}var Xp=Wo?Kt(Wo):xb;function Ii(t){return typeof t=="string"||!He(t)&&Tt(t)&&rr(t)==hr}function wr(t){return typeof t=="symbol"||Tt(t)&&rr(t)==mr}var Fs=qo?Kt(qo):bb;function vy(t){return t===a}function wy(t){return Tt(t)&&Vt(t)==Ar}function yy(t){return Tt(t)&&rr(t)==hl}var _y=_i(Mc),ky=_i(function(t,n){return t<=n});function Kp(t){if(!t)return[];if(cr(t))return Ii(t)?or(t):lr(t);if(zn&&t[zn])return Zl(t[zn]());var n=Vt(t),i=n==qe?Aa:n==Re?Ms:Us;return i(t)}function an(t){if(!t)return t===0?t:0;if(t=Nr(t),t===se||t===-se){var n=t<0?-1:1;return n*je}return t===t?t:0}function We(t){var n=an(t),i=n%1;return n===n?i?n-i:n:0}function Vp(t){return t?Yn(We(t),0,he):0}function Nr(t){if(typeof t=="number")return t;if(wr(t))return W;if(Mt(t)){var n=typeof t.valueOf=="function"?t.valueOf():t;t=Mt(n)?n+"":n}if(typeof t!="string")return t===0?t:+t;t=Qo(t);var i=bl.test(t);return i||wl.test(t)?Pl(t.slice(2),i?2:8):xl.test(t)?W:+t}function Zp(t){return Wr(t,ur(t))}function My(t){return t?Yn(We(t),-be,be):t===0?t:0}function ut(t){return t==null?"":vr(t)}var jy=$s(function(t,n){if(Ua(n)||cr(n)){Wr(n,zt(n),t);return}for(var i in n)lt.call(n,i)&&Ra(t,i,n[i])}),Qp=$s(function(t,n){Wr(n,ur(n),t)}),Di=$s(function(t,n,i,w){Wr(n,ur(n),t,w)}),Ey=$s(function(t,n,i,w){Wr(n,zt(n),t,w)}),Ty=rn(xc);function Ny(t,n){var i=br(t);return n==null?i:Ad(i,n)}var Sy=Ge(function(t,n){t=dt(t);var i=-1,w=n.length,E=w>2?n[2]:a;for(E&&nr(n[0],n[1],E)&&(w=1);++i<w;)for(var S=n[i],F=ur(S),H=-1,V=F.length;++H<V;){var ce=F[H],ue=t[ce];(ue===a||Rr(ue,jn[ce])&&!lt.call(t,ce))&&(t[ce]=S[ce])}return t}),Ay=Ge(function(t){return t.push(a,mp),Jt(Jp,a,t)});function Cy(t,n){return Xo(t,Oe(n,3),Br)}function Iy(t,n){return Xo(t,Oe(n,3),vc)}function Dy(t,n){return t==null?t:bc(t,Oe(n,3),ur)}function Ry(t,n){return t==null?t:Od(t,Oe(n,3),ur)}function Oy(t,n){return t&&Br(t,Oe(n,3))}function $y(t,n){return t&&vc(t,Oe(n,3))}function Ly(t){return t==null?[]:hi(t,zt(t))}function Py(t){return t==null?[]:hi(t,ur(t))}function Zc(t,n,i){var w=t==null?a:Gn(t,n);return w===a?i:w}function Fy(t,n){return t!=null&&bp(t,n,lb)}function Qc(t,n){return t!=null&&bp(t,n,cb)}var Uy=up(function(t,n,i){n!=null&&typeof n.toString!="function"&&(n=Ns.call(n)),t[n]=i},eu(fr)),zy=up(function(t,n,i){n!=null&&typeof n.toString!="function"&&(n=Ns.call(n)),lt.call(t,n)?t[n].push(i):t[n]=[i]},Oe),Hy=Ge($a);function zt(t){return cr(t)?Nd(t):kc(t)}function ur(t){return cr(t)?Nd(t,!0):vb(t)}function By(t,n){var i={};return n=Oe(n,3),Br(t,function(w,E,S){en(i,n(w,E,S),w)}),i}function Wy(t,n){var i={};return n=Oe(n,3),Br(t,function(w,E,S){en(i,E,n(w,E,S))}),i}var qy=$s(function(t,n,i){mi(t,n,i)}),Jp=$s(function(t,n,i,w){mi(t,n,i,w)}),Yy=rn(function(t,n){var i={};if(t==null)return i;var w=!1;n=gt(n,function(S){return S=Nn(S,t),w||(w=S.length>1),S}),Wr(t,Lc(t),i),w&&(i=jr(i,d|g|b,Ub));for(var E=n.length;E--;)Sc(i,n[E]);return i});function Gy(t,n){return eh(t,Ai(Oe(n)))}var Xy=rn(function(t,n){return t==null?{}:yb(t,n)});function eh(t,n){if(t==null)return{};var i=gt(Lc(t),function(w){return[w]});return n=Oe(n),qd(t,i,function(w,E){return n(w,E[0])})}function Ky(t,n,i){n=Nn(n,t);var w=-1,E=n.length;for(E||(E=1,t=a);++w<E;){var S=t==null?a:t[qr(n[w])];S===a&&(w=E,S=i),t=sn(S)?S.call(t):S}return t}function Vy(t,n,i){return t==null?t:Pa(t,n,i)}function Zy(t,n,i,w){return w=typeof w=="function"?w:a,t==null?t:Pa(t,n,i,w)}var th=pp(zt),rh=pp(ur);function Qy(t,n,i){var w=He(t),E=w||An(t)||Fs(t);if(n=Oe(n,4),i==null){var S=t&&t.constructor;E?i=w?new S:[]:Mt(t)?i=sn(S)?br(Cs(t)):{}:i={}}return(E?er:Br)(t,function(F,H,V){return n(i,F,H,V)}),i}function Jy(t,n){return t==null?!0:Sc(t,n)}function e1(t,n,i){return t==null?t:Vd(t,n,Ic(i))}function t1(t,n,i,w){return w=typeof w=="function"?w:a,t==null?t:Vd(t,n,Ic(i),w)}function Us(t){return t==null?[]:Sa(t,zt(t))}function r1(t){return t==null?[]:Sa(t,ur(t))}function n1(t,n,i){return i===a&&(i=n,n=a),i!==a&&(i=Nr(i),i=i===i?i:0),n!==a&&(n=Nr(n),n=n===n?n:0),Yn(Nr(t),n,i)}function s1(t,n,i){return n=an(n),i===a?(i=n,n=0):i=an(i),t=Nr(t),ub(t,n,i)}function a1(t,n,i){if(i&&typeof i!="boolean"&&nr(t,n,i)&&(n=i=a),i===a&&(typeof n=="boolean"?(i=n,n=a):typeof t=="boolean"&&(i=t,t=a)),t===a&&n===a?(t=0,n=1):(t=an(t),n===a?(n=t,t=0):n=an(n)),t>n){var w=t;t=n,n=w}if(i||t%1||n%1){var E=fi();return Ut(t+E*(n-t+Ll("1e-"+((E+"").length-1))),n)}return Ec(t,n)}var o1=Ls(function(t,n,i){return n=n.toLowerCase(),t+(i?nh(n):n)});function nh(t){return Jc(ut(t).toLowerCase())}function sh(t){return t=ut(t),t&&t.replace(_l,Gl).replace(xr,"")}function i1(t,n,i){t=ut(t),n=vr(n);var w=t.length;i=i===a?w:Yn(We(i),0,w);var E=i;return i-=n.length,i>=0&&t.slice(i,E)==n}function l1(t){return t=ut(t),t&&sa.test(t)?t.replace(fs,Xl):t}function c1(t){return t=ut(t),t&&uo.test(t)?t.replace(ds,"\\$&"):t}var u1=Ls(function(t,n,i){return t+(i?"-":"")+n.toLowerCase()}),f1=Ls(function(t,n,i){return t+(i?" ":"")+n.toLowerCase()}),d1=ip("toLowerCase");function p1(t,n,i){t=ut(t),n=We(n);var w=n?kn(t):0;if(!n||w>=n)return t;var E=(n-w)/2;return yi(Os(E),i)+t+yi(Rs(E),i)}function h1(t,n,i){t=ut(t),n=We(n);var w=n?kn(t):0;return n&&w<n?t+yi(n-w,i):t}function m1(t,n,i){t=ut(t),n=We(n);var w=n?kn(t):0;return n&&w<n?yi(n-w,i)+t:t}function g1(t,n,i){return i||n==null?n=0:n&&(n=+n),mc(ut(t).replace(ca,""),n||0)}function x1(t,n,i){return(i?nr(t,n,i):n===a)?n=1:n=We(n),Tc(ut(t),n)}function b1(){var t=arguments,n=ut(t[0]);return t.length<3?n:n.replace(t[1],t[2])}var v1=Ls(function(t,n,i){return t+(i?"_":"")+n.toLowerCase()});function w1(t,n,i){return i&&typeof i!="number"&&nr(t,n,i)&&(n=i=a),i=i===a?he:i>>>0,i?(t=ut(t),t&&(typeof n=="string"||n!=null&&!Vc(n))&&(n=vr(n),!n&&_n(t))?Sn(or(t),0,i):t.split(n,i)):[]}var y1=Ls(function(t,n,i){return t+(i?" ":"")+Jc(n)});function _1(t,n,i){return t=ut(t),i=i==null?0:Yn(We(i),0,t.length),n=vr(n),t.slice(i,i+n.length)==n}function k1(t,n,i){var w=N.templateSettings;i&&nr(t,n,i)&&(n=a),t=ut(t),n=Di({},n,w,hp);var E=Di({},n.imports,w.imports,hp),S=zt(E),F=Sa(E,S),H,V,ce=0,ue=n.interpolate||ms,de="__p += '",ve=Ca((n.escape||ms).source+"|"+ue.source+"|"+(ue===ia?pe:ms).source+"|"+(n.evaluate||ms).source+"|$","g"),Se="//# sourceURL="+(lt.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ro+"]")+`
|
|
51
|
-
`;t.replace(ve,function(Le,Ze,Je,yr,sr,_r){return Je||(Je=yr),de+=t.slice(ce,_r).replace(kl,Kl),Ze&&(H=!0,de+=`' +
|
|
52
|
-
__e(`+Ze+`) +
|
|
53
|
-
'`),sr&&(V=!0,de+=`';
|
|
54
|
-
`+sr+`;
|
|
55
|
-
__p += '`),Je&&(de+=`' +
|
|
56
|
-
((__t = (`+Je+`)) == null ? '' : __t) +
|
|
57
|
-
'`),ce=_r+Le.length,Le}),de+=`';
|
|
58
|
-
`;var $e=lt.call(n,"variable")&&n.variable;if(!$e)de=`with (obj) {
|
|
59
|
-
`+de+`
|
|
60
|
-
}
|
|
61
|
-
`;else if(ua.test($e))throw new Pe(m);de=(V?de.replace(ml,""):de).replace(ra,"$1").replace(gr,"$1;"),de="function("+($e||"obj")+`) {
|
|
62
|
-
`+($e?"":`obj || (obj = {});
|
|
63
|
-
`)+"var __t, __p = ''"+(H?", __e = _.escape":"")+(V?`, __j = Array.prototype.join;
|
|
64
|
-
function print() { __p += __j.call(arguments, '') }
|
|
65
|
-
`:`;
|
|
66
|
-
`)+de+`return __p
|
|
67
|
-
}`;var Ye=oh(function(){return tt(S,Se+"return "+de).apply(a,F)});if(Ye.source=de,Kc(Ye))throw Ye;return Ye}function M1(t){return ut(t).toLowerCase()}function j1(t){return ut(t).toUpperCase()}function E1(t,n,i){if(t=ut(t),t&&(i||n===a))return Qo(t);if(!t||!(n=vr(n)))return t;var w=or(t),E=or(n),S=Jo(w,E),F=ei(w,E)+1;return Sn(w,S,F).join("")}function T1(t,n,i){if(t=ut(t),t&&(i||n===a))return t.slice(0,ri(t)+1);if(!t||!(n=vr(n)))return t;var w=or(t),E=ei(w,or(n))+1;return Sn(w,0,E).join("")}function N1(t,n,i){if(t=ut(t),t&&(i||n===a))return t.replace(ca,"");if(!t||!(n=vr(n)))return t;var w=or(t),E=Jo(w,or(n));return Sn(w,E).join("")}function S1(t,n){var i=Y,w=L;if(Mt(n)){var E="separator"in n?n.separator:E;i="length"in n?We(n.length):i,w="omission"in n?vr(n.omission):w}t=ut(t);var S=t.length;if(_n(t)){var F=or(t);S=F.length}if(i>=S)return t;var H=i-kn(w);if(H<1)return w;var V=F?Sn(F,0,H).join(""):t.slice(0,H);if(E===a)return V+w;if(F&&(H+=V.length-H),Vc(E)){if(t.slice(H).search(E)){var ce,ue=V;for(E.global||(E=Ca(E.source,ut(hs.exec(E))+"g")),E.lastIndex=0;ce=E.exec(ue);)var de=ce.index;V=V.slice(0,de===a?H:de)}}else if(t.indexOf(vr(E),H)!=H){var ve=V.lastIndexOf(E);ve>-1&&(V=V.slice(0,ve))}return V+w}function A1(t){return t=ut(t),t&&na.test(t)?t.replace(xn,tc):t}var C1=Ls(function(t,n,i){return t+(i?" ":"")+n.toUpperCase()}),Jc=ip("toUpperCase");function ah(t,n,i){return t=ut(t),n=i?a:n,n===a?Vl(t)?sc(t):Hl(t):t.match(n)||[]}var oh=Ge(function(t,n){try{return Jt(t,a,n)}catch(i){return Kc(i)?i:new Pe(i)}}),I1=rn(function(t,n){return er(n,function(i){i=qr(i),en(t,i,Gc(t[i],t))}),t});function D1(t){var n=t==null?0:t.length,i=Oe();return t=n?gt(t,function(w){if(typeof w[1]!="function")throw new tr(y);return[i(w[0]),w[1]]}):[],Ge(function(w){for(var E=-1;++E<n;){var S=t[E];if(Jt(S[0],this,w))return Jt(S[1],this,w)}})}function R1(t){return ab(jr(t,d))}function eu(t){return function(){return t}}function O1(t,n){return t==null||t!==t?n:t}var $1=cp(),L1=cp(!0);function fr(t){return t}function tu(t){return Fd(typeof t=="function"?t:jr(t,d))}function P1(t){return zd(jr(t,d))}function F1(t,n){return Hd(t,jr(n,d))}var U1=Ge(function(t,n){return function(i){return $a(i,t,n)}}),z1=Ge(function(t,n){return function(i){return $a(t,i,n)}});function ru(t,n,i){var w=zt(n),E=hi(n,w);i==null&&!(Mt(n)&&(E.length||!w.length))&&(i=n,n=t,t=this,E=hi(n,zt(n)));var S=!(Mt(i)&&"chain"in i)||!!i.chain,F=sn(t);return er(E,function(H){var V=n[H];t[H]=V,F&&(t.prototype[H]=function(){var ce=this.__chain__;if(S||ce){var ue=t(this.__wrapped__),de=ue.__actions__=lr(this.__actions__);return de.push({func:V,args:arguments,thisArg:t}),ue.__chain__=ce,ue}return V.apply(t,Ir([this.value()],arguments))})}),t}function H1(){return Pt._===this&&(Pt._=lc),this}function nu(){}function B1(t){return t=We(t),Ge(function(n){return Bd(n,t)})}var W1=Rc(gt),q1=Rc(ka),Y1=Rc(Ma);function ih(t){return zc(t)?ja(qr(t)):_b(t)}function G1(t){return function(n){return t==null?a:Gn(t,n)}}var X1=fp(),K1=fp(!0);function su(){return[]}function au(){return!1}function V1(){return{}}function Z1(){return""}function Q1(){return!0}function J1(t,n){if(t=We(t),t<1||t>be)return[];var i=he,w=Ut(t,he);n=Oe(n),t-=he;for(var E=Na(w,n);++i<t;)n(i);return E}function e_(t){return He(t)?gt(t,qr):wr(t)?[t]:lr(Tp(ut(t)))}function t_(t){var n=++ic;return ut(t)+n}var r_=wi(function(t,n){return t+n},0),n_=Oc("ceil"),s_=wi(function(t,n){return t/n},1),a_=Oc("floor");function o_(t){return t&&t.length?pi(t,fr,wc):a}function i_(t,n){return t&&t.length?pi(t,Oe(n,2),wc):a}function l_(t){return Vo(t,fr)}function c_(t,n){return Vo(t,Oe(n,2))}function u_(t){return t&&t.length?pi(t,fr,Mc):a}function f_(t,n){return t&&t.length?pi(t,Oe(n,2),Mc):a}var d_=wi(function(t,n){return t*n},1),p_=Oc("round"),h_=wi(function(t,n){return t-n},0);function m_(t){return t&&t.length?Ta(t,fr):0}function g_(t,n){return t&&t.length?Ta(t,Oe(n,2)):0}return N.after=Pw,N.ary=Pp,N.assign=jy,N.assignIn=Qp,N.assignInWith=Di,N.assignWith=Ey,N.at=Ty,N.before=Fp,N.bind=Gc,N.bindAll=I1,N.bindKey=Up,N.castArray=Vw,N.chain=Op,N.chunk=av,N.compact=ov,N.concat=iv,N.cond=D1,N.conforms=R1,N.constant=eu,N.countBy=mw,N.create=Ny,N.curry=zp,N.curryRight=Hp,N.debounce=Bp,N.defaults=Sy,N.defaultsDeep=Ay,N.defer=Fw,N.delay=Uw,N.difference=lv,N.differenceBy=cv,N.differenceWith=uv,N.drop=fv,N.dropRight=dv,N.dropRightWhile=pv,N.dropWhile=hv,N.fill=mv,N.filter=xw,N.flatMap=ww,N.flatMapDeep=yw,N.flatMapDepth=_w,N.flatten=Cp,N.flattenDeep=gv,N.flattenDepth=xv,N.flip=zw,N.flow=$1,N.flowRight=L1,N.fromPairs=bv,N.functions=Ly,N.functionsIn=Py,N.groupBy=kw,N.initial=wv,N.intersection=yv,N.intersectionBy=_v,N.intersectionWith=kv,N.invert=Uy,N.invertBy=zy,N.invokeMap=jw,N.iteratee=tu,N.keyBy=Ew,N.keys=zt,N.keysIn=ur,N.map=Ti,N.mapKeys=By,N.mapValues=Wy,N.matches=P1,N.matchesProperty=F1,N.memoize=Si,N.merge=qy,N.mergeWith=Jp,N.method=U1,N.methodOf=z1,N.mixin=ru,N.negate=Ai,N.nthArg=B1,N.omit=Yy,N.omitBy=Gy,N.once=Hw,N.orderBy=Tw,N.over=W1,N.overArgs=Bw,N.overEvery=q1,N.overSome=Y1,N.partial=Xc,N.partialRight=Wp,N.partition=Nw,N.pick=Xy,N.pickBy=eh,N.property=ih,N.propertyOf=G1,N.pull=Tv,N.pullAll=Dp,N.pullAllBy=Nv,N.pullAllWith=Sv,N.pullAt=Av,N.range=X1,N.rangeRight=K1,N.rearg=Ww,N.reject=Cw,N.remove=Cv,N.rest=qw,N.reverse=qc,N.sampleSize=Dw,N.set=Vy,N.setWith=Zy,N.shuffle=Rw,N.slice=Iv,N.sortBy=Lw,N.sortedUniq=Fv,N.sortedUniqBy=Uv,N.split=w1,N.spread=Yw,N.tail=zv,N.take=Hv,N.takeRight=Bv,N.takeRightWhile=Wv,N.takeWhile=qv,N.tap=ow,N.throttle=Gw,N.thru=Ei,N.toArray=Kp,N.toPairs=th,N.toPairsIn=rh,N.toPath=e_,N.toPlainObject=Zp,N.transform=Qy,N.unary=Xw,N.union=Yv,N.unionBy=Gv,N.unionWith=Xv,N.uniq=Kv,N.uniqBy=Vv,N.uniqWith=Zv,N.unset=Jy,N.unzip=Yc,N.unzipWith=Rp,N.update=e1,N.updateWith=t1,N.values=Us,N.valuesIn=r1,N.without=Qv,N.words=ah,N.wrap=Kw,N.xor=Jv,N.xorBy=ew,N.xorWith=tw,N.zip=rw,N.zipObject=nw,N.zipObjectDeep=sw,N.zipWith=aw,N.entries=th,N.entriesIn=rh,N.extend=Qp,N.extendWith=Di,ru(N,N),N.add=r_,N.attempt=oh,N.camelCase=o1,N.capitalize=nh,N.ceil=n_,N.clamp=n1,N.clone=Zw,N.cloneDeep=Jw,N.cloneDeepWith=ey,N.cloneWith=Qw,N.conformsTo=ty,N.deburr=sh,N.defaultTo=O1,N.divide=s_,N.endsWith=i1,N.eq=Rr,N.escape=l1,N.escapeRegExp=c1,N.every=gw,N.find=bw,N.findIndex=Sp,N.findKey=Cy,N.findLast=vw,N.findLastIndex=Ap,N.findLastKey=Iy,N.floor=a_,N.forEach=$p,N.forEachRight=Lp,N.forIn=Dy,N.forInRight=Ry,N.forOwn=Oy,N.forOwnRight=$y,N.get=Zc,N.gt=ry,N.gte=ny,N.has=Fy,N.hasIn=Qc,N.head=Ip,N.identity=fr,N.includes=Mw,N.indexOf=vv,N.inRange=s1,N.invoke=Hy,N.isArguments=Vn,N.isArray=He,N.isArrayBuffer=sy,N.isArrayLike=cr,N.isArrayLikeObject=Dt,N.isBoolean=ay,N.isBuffer=An,N.isDate=oy,N.isElement=iy,N.isEmpty=ly,N.isEqual=cy,N.isEqualWith=uy,N.isError=Kc,N.isFinite=fy,N.isFunction=sn,N.isInteger=qp,N.isLength=Ci,N.isMap=Yp,N.isMatch=dy,N.isMatchWith=py,N.isNaN=hy,N.isNative=my,N.isNil=xy,N.isNull=gy,N.isNumber=Gp,N.isObject=Mt,N.isObjectLike=Tt,N.isPlainObject=Ha,N.isRegExp=Vc,N.isSafeInteger=by,N.isSet=Xp,N.isString=Ii,N.isSymbol=wr,N.isTypedArray=Fs,N.isUndefined=vy,N.isWeakMap=wy,N.isWeakSet=yy,N.join=Mv,N.kebabCase=u1,N.last=Tr,N.lastIndexOf=jv,N.lowerCase=f1,N.lowerFirst=d1,N.lt=_y,N.lte=ky,N.max=o_,N.maxBy=i_,N.mean=l_,N.meanBy=c_,N.min=u_,N.minBy=f_,N.stubArray=su,N.stubFalse=au,N.stubObject=V1,N.stubString=Z1,N.stubTrue=Q1,N.multiply=d_,N.nth=Ev,N.noConflict=H1,N.noop=nu,N.now=Ni,N.pad=p1,N.padEnd=h1,N.padStart=m1,N.parseInt=g1,N.random=a1,N.reduce=Sw,N.reduceRight=Aw,N.repeat=x1,N.replace=b1,N.result=Ky,N.round=p_,N.runInContext=G,N.sample=Iw,N.size=Ow,N.snakeCase=v1,N.some=$w,N.sortedIndex=Dv,N.sortedIndexBy=Rv,N.sortedIndexOf=Ov,N.sortedLastIndex=$v,N.sortedLastIndexBy=Lv,N.sortedLastIndexOf=Pv,N.startCase=y1,N.startsWith=_1,N.subtract=h_,N.sum=m_,N.sumBy=g_,N.template=k1,N.times=J1,N.toFinite=an,N.toInteger=We,N.toLength=Vp,N.toLower=M1,N.toNumber=Nr,N.toSafeInteger=My,N.toString=ut,N.toUpper=j1,N.trim=E1,N.trimEnd=T1,N.trimStart=N1,N.truncate=S1,N.unescape=A1,N.uniqueId=t_,N.upperCase=C1,N.upperFirst=Jc,N.each=$p,N.eachRight=Lp,N.first=Ip,ru(N,(function(){var t={};return Br(N,function(n,i){lt.call(N.prototype,i)||(t[i]=n)}),t})(),{chain:!1}),N.VERSION=o,er(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){N[t].placeholder=N}),er(["drop","take"],function(t,n){Ke.prototype[t]=function(i){i=i===a?1:It(We(i),0);var w=this.__filtered__&&!n?new Ke(this):this.clone();return w.__filtered__?w.__takeCount__=Ut(i,w.__takeCount__):w.__views__.push({size:Ut(i,he),type:t+(w.__dir__<0?"Right":"")}),w},Ke.prototype[t+"Right"]=function(i){return this.reverse()[t](i).reverse()}}),er(["filter","map","takeWhile"],function(t,n){var i=n+1,w=i==te||i==Q;Ke.prototype[t]=function(E){var S=this.clone();return S.__iteratees__.push({iteratee:Oe(E,3),type:i}),S.__filtered__=S.__filtered__||w,S}}),er(["head","last"],function(t,n){var i="take"+(n?"Right":"");Ke.prototype[t]=function(){return this[i](1).value()[0]}}),er(["initial","tail"],function(t,n){var i="drop"+(n?"":"Right");Ke.prototype[t]=function(){return this.__filtered__?new Ke(this):this[i](1)}}),Ke.prototype.compact=function(){return this.filter(fr)},Ke.prototype.find=function(t){return this.filter(t).head()},Ke.prototype.findLast=function(t){return this.reverse().find(t)},Ke.prototype.invokeMap=Ge(function(t,n){return typeof t=="function"?new Ke(this):this.map(function(i){return $a(i,t,n)})}),Ke.prototype.reject=function(t){return this.filter(Ai(Oe(t)))},Ke.prototype.slice=function(t,n){t=We(t);var i=this;return i.__filtered__&&(t>0||n<0)?new Ke(i):(t<0?i=i.takeRight(-t):t&&(i=i.drop(t)),n!==a&&(n=We(n),i=n<0?i.dropRight(-n):i.take(n-t)),i)},Ke.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ke.prototype.toArray=function(){return this.take(he)},Br(Ke.prototype,function(t,n){var i=/^(?:filter|find|map|reject)|While$/.test(n),w=/^(?:head|last)$/.test(n),E=N[w?"take"+(n=="last"?"Right":""):n],S=w||/^find/.test(n);E&&(N.prototype[n]=function(){var F=this.__wrapped__,H=w?[1]:arguments,V=F instanceof Ke,ce=H[0],ue=V||He(F),de=function(Ze){var Je=E.apply(N,Ir([Ze],H));return w&&ve?Je[0]:Je};ue&&i&&typeof ce=="function"&&ce.length!=1&&(V=ue=!1);var ve=this.__chain__,Se=!!this.__actions__.length,$e=S&&!ve,Ye=V&&!Se;if(!S&&ue){F=Ye?F:new Ke(this);var Le=t.apply(F,H);return Le.__actions__.push({func:Ei,args:[de],thisArg:a}),new Lt(Le,ve)}return $e&&Ye?t.apply(this,H):(Le=this.thru(de),$e?w?Le.value()[0]:Le.value():Le)})}),er(["pop","push","shift","sort","splice","unshift"],function(t){var n=js[t],i=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",w=/^(?:pop|shift)$/.test(t);N.prototype[t]=function(){var E=arguments;if(w&&!this.__chain__){var S=this.value();return n.apply(He(S)?S:[],E)}return this[i](function(F){return n.apply(He(F)?F:[],E)})}}),Br(Ke.prototype,function(t,n){var i=N[n];if(i){var w=i.name+"";lt.call(me,w)||(me[w]=[]),me[w].push({name:n,func:i})}}),me[vi(a,T).name]=[{name:"wrapper",func:a}],Ke.prototype.clone=Da,Ke.prototype.reverse=Bn,Ke.prototype.value=Ix,N.prototype.at=iw,N.prototype.chain=lw,N.prototype.commit=cw,N.prototype.next=uw,N.prototype.plant=dw,N.prototype.reverse=pw,N.prototype.toJSON=N.prototype.valueOf=N.prototype.value=hw,N.prototype.first=N.prototype.head,zn&&(N.prototype[zn]=fw),N}),Mn=ni();Qt?((Qt.exports=Mn)._=Mn,wn._=Mn):Pt._=Mn}).call(Z5)})(Xa,Xa.exports)),Xa.exports}var zi={exports:{}},_f,yg;function Q5(){if(yg)return _f;yg=1;var e=1e3,s=e*60,a=s*60,o=a*24,c=o*7,h=o*365.25;_f=function(u,d){d=d||{};var g=typeof u;if(g==="string"&&u.length>0)return y(u);if(g==="number"&&isFinite(u))return d.long?l(u):m(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function y(u){if(u=String(u),!(u.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(d){var g=parseFloat(d[1]),b=(d[2]||"ms").toLowerCase();switch(b){case"years":case"year":case"yrs":case"yr":case"y":return g*h;case"weeks":case"week":case"w":return g*c;case"days":case"day":case"d":return g*o;case"hours":case"hour":case"hrs":case"hr":case"h":return g*a;case"minutes":case"minute":case"mins":case"min":case"m":return g*s;case"seconds":case"second":case"secs":case"sec":case"s":return g*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}function m(u){var d=Math.abs(u);return d>=o?Math.round(u/o)+"d":d>=a?Math.round(u/a)+"h":d>=s?Math.round(u/s)+"m":d>=e?Math.round(u/e)+"s":u+"ms"}function l(u){var d=Math.abs(u);return d>=o?f(u,d,o,"day"):d>=a?f(u,d,a,"hour"):d>=s?f(u,d,s,"minute"):d>=e?f(u,d,e,"second"):u+" ms"}function f(u,d,g,b){var _=d>=g*1.5;return Math.round(u/g)+" "+b+(_?"s":"")}return _f}var kf,_g;function J5(){if(_g)return kf;_g=1;function e(s){o.debug=o,o.default=o,o.coerce=f,o.disable=m,o.enable=h,o.enabled=l,o.humanize=Q5(),o.destroy=u,Object.keys(s).forEach(d=>{o[d]=s[d]}),o.names=[],o.skips=[],o.formatters={};function a(d){let g=0;for(let b=0;b<d.length;b++)g=(g<<5)-g+d.charCodeAt(b),g|=0;return o.colors[Math.abs(g)%o.colors.length]}o.selectColor=a;function o(d){let g,b=null,_,k;function M(...T){if(!M.enabled)return;const A=M,I=Number(new Date),O=I-(g||I);A.diff=O,A.prev=g,A.curr=I,g=I,T[0]=o.coerce(T[0]),typeof T[0]!="string"&&T.unshift("%O");let $=0;T[0]=T[0].replace(/%([a-zA-Z%])/g,(R,K)=>{if(R==="%%")return"%";$++;const X=o.formatters[K];if(typeof X=="function"){const Y=T[$];R=X.call(A,Y),T.splice($,1),$--}return R}),o.formatArgs.call(A,T),(A.log||o.log).apply(A,T)}return M.namespace=d,M.useColors=o.useColors(),M.color=o.selectColor(d),M.extend=c,M.destroy=o.destroy,Object.defineProperty(M,"enabled",{enumerable:!0,configurable:!1,get:()=>b!==null?b:(_!==o.namespaces&&(_=o.namespaces,k=o.enabled(d)),k),set:T=>{b=T}}),typeof o.init=="function"&&o.init(M),M}function c(d,g){const b=o(this.namespace+(typeof g>"u"?":":g)+d);return b.log=this.log,b}function h(d){o.save(d),o.namespaces=d,o.names=[],o.skips=[];const g=(typeof d=="string"?d:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const b of g)b[0]==="-"?o.skips.push(b.slice(1)):o.names.push(b)}function y(d,g){let b=0,_=0,k=-1,M=0;for(;b<d.length;)if(_<g.length&&(g[_]===d[b]||g[_]==="*"))g[_]==="*"?(k=_,M=b,_++):(b++,_++);else if(k!==-1)_=k+1,M++,b=M;else return!1;for(;_<g.length&&g[_]==="*";)_++;return _===g.length}function m(){const d=[...o.names,...o.skips.map(g=>"-"+g)].join(",");return o.enable(""),d}function l(d){for(const g of o.skips)if(y(d,g))return!1;for(const g of o.names)if(y(d,g))return!0;return!1}function f(d){return d instanceof Error?d.stack||d.message:d}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o.enable(o.load()),o}return kf=e,kf}var kg;function Mg(){return kg||(kg=1,(function(e,s){s.formatArgs=o,s.save=c,s.load=h,s.useColors=a,s.storage=y(),s.destroy=(()=>{let l=!1;return()=>{l||(l=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function a(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let l;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(l=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(l[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const f="color: "+this.color;l.splice(1,0,f,"color: inherit");let u=0,d=0;l[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(u++,g==="%c"&&(d=u))}),l.splice(d,0,f)}s.log=console.debug||console.log||(()=>{});function c(l){try{l?s.storage.setItem("debug",l):s.storage.removeItem("debug")}catch{}}function h(){let l;try{l=s.storage.getItem("debug")||s.storage.getItem("DEBUG")}catch{}return!l&&typeof process<"u"&&"env"in process&&(l=!1),l}function y(){try{return localStorage}catch{}}e.exports=J5()(s);const{formatters:m}=e.exports;m.j=function(l){try{return JSON.stringify(l)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}})(zi,zi.exports)),zi.exports}var Mf,jg;function e4(){if(jg)return Mf;jg=1;const e=jd(),s=Mg()("mongo-knex:converter"),a=Mg()("mongo-knex:converter-extended"),o=["$and","$or"],c={$eq:"=",$ne:"!=",$gt:">",$gte:">=",$lt:"<",$lte:"<=",$in:"in",$nin:"not in",$regex:"like",$not:"not like"},h="*",y=_=>_.charAt(0)==="$",m=_=>y(_)&&e.includes(o,_),l=_=>y(_)&&e.includes(e.keys(c),_),f=_=>y(_)&&e.includes(["$ne","$nin"],_),u=_=>e.includes([c.$in,c.$nin],_),d=_=>JSON.stringify(_,function(k,M){return M instanceof RegExp?M.toString():M}),g=({source:_,ignoreCase:k})=>(_=_.replace(/\\([.*+?^${}()|[\]\\/])/g,"$1"),k&&(_=_.toLowerCase()),_=_.replace(new RegExp(e.escapeRegExp(h),"g"),h+h),_=_.replace(/%/g,h+"%"),_=_.replace(/_/g,h+"_"),_.startsWith("^")?_=_.substring(1)+"%":_.endsWith("$")?_="%"+_.substring(0,_.length-1):_="%"+_+"%",{source:_,ignoreCase:k});class b{constructor(k={},M={}){this.tableName=k.tableName,this.cte=M.cte,this.config={},Object.assign(this.config,{relations:{}},M)}processWhereType(k,M,T){return T===null?(k==="$or"?"orWhere":"where")+(M==="$ne"?"NotNull":"Null"):k==="$or"?"orWhere":"andWhere"}processStatement(k,M,T){const[A,I]=k.split(".");if(I){s(A,I);const O=A;let $=this.config.relations[O];return $?{table:A,column:I,operator:M,value:T,config:$,isRelation:!0}:($=e.find(this.config.relations,q=>q.joinTable===O),$?{joinTable:$.joinTable,table:$.tableName,column:I,operator:M,value:T,config:$,isRelation:!0}:{column:k,operator:M,value:T,isRelation:!1})}return{column:this.cte&&this.cte===!0?`${k}`:`${this.tableName}.${k}`,operator:M,value:T,isRelation:!1}}groupRelationStatements(k,M){const T={},A=M==="$and"?k.filter(I=>!I.joinTable):k;if(e.each(A,(I,O)=>{let $=f(I.operator);!$&&T[I.table]&&($=e.find(T[I.table].innerWhereStatements,R=>{if(R.column===I.column)return!0}));let q=I.table;if($&&(q=`${I.table}_${O})}`,T[q]))throw new Error("Key collision detected");T[q]||(T[q]={},T[q].innerWhereStatements=[]),T[q].innerWhereStatements.push(I)}),M==="$and"){const I=k.filter(O=>O.joinTable);e.each(Object.keys(T),O=>{T[O].joinFilterStatements=I})}return T}buildRelationQuery(k,M,T){s("(buildRelationQuery)"),a.enabled&&a(`(buildRelationQuery) ${d(M)}`);const A=this.groupRelationStatements(M,T);a.enabled&&a(`(buildRelationQuery) grouped: ${d(A)}`),e.each(Object.keys(A),I=>{s(`(buildRelationQuery) build relation for ${I}`);const O=A[I].innerWhereStatements,$=O[0];if($.config.type==="manyToMany")if(e.every(O.map(q=>q.operator),l)){const q=e.every(O.map(X=>X.operator),X=>f(X)),R=q?c.$nin:c.$in,K=["whereNull","whereNotNull"].includes($.whereType)?"andWhere":["orWhereNull","orWhereNotNull"].includes($.whereType)?"orWhere":$.whereType;k[K](`${this.tableName}.id`,R,function(){const X=A[I].joinFilterStatements;let Y=$.config.tableName,L=`${$.config.tableName}.${$.config.joinToForeign||"id"}`;$.config.tableNameAs&&(Y=`${$.config.tableName} as ${$.config.tableNameAs}`,L=`${$.config.tableNameAs}.${$.config.joinToForeign||"id"}`);const B=$.config.joinType||"innerJoin",J=this.select(`${$.config.joinTable}.${$.config.joinFrom}`).from(`${$.config.joinTable}`)[B](Y,function(){this.on(L,"=",`${$.config.joinTable}.${$.config.joinTo}`),e.each(X,te=>{this.andOn(`${te.joinTable}.${te.column}`,c[te.operator],te.value)})});return a.enabled&&s(`(buildRelationQuery) innerQB sql-pre: ${J.toSQL().sql}`),e.each(O,(te,ne)=>{s(`(buildRelationQuery) build relation where statements for ${ne}`);const Q=`${te.joinTable||te.table}.${te.column}`;let se;q?se=c.$in:f(te.operator)?se=c.$nin:se=c[te.operator];let be=te.value;u(se)&&(be=e.isArray(te.value)?te.value:[te.value]),J[te.whereType](Q,se,be)}),a.enabled&&s(`(buildRelationQuery) innerQB sql-post: ${J.toSQL().sql}`),J})}else s(`one of ${I} group statements contains unknown operator`);else if($.config.type==="oneToOne")if(e.every(O.map(q=>q.operator),l)){const q=e.every(O.map(Y=>Y.operator),Y=>f(Y)),R=q?c.$nin:c.$in,K=this.tableName,X=$.whereType==="orWhere"?"orWhere":"where";k[X](`${this.tableName}.id`,R,function(){const Y=A[I].joinFilterStatements;let L=$.config.tableName,B=`${$.config.tableName}.${$.config.joinFrom}`;$.config.tableNameAs&&(L=`${$.config.tableName} as ${$.config.tableNameAs}`,B=`${$.config.tableNameAs}.${$.config.joinFrom}`);const J=this.select(`${K}.id`).from(`${K}`).leftJoin(L,function(){this.on(B,"=",`${K}.id`),e.each(Y,te=>{this.andOn(`${te.joinTable}.${te.column}`,c[te.operator],te.value)})});return e.each(O,(te,ne)=>{s(`(buildRelationQuery) build relation where statements for ${ne}`);const Q=`${te.table}.${te.column}`;let se;q?(se=c.$in,te.value===null&&(te.whereType=te.whereType==="whereNotNull"?"whereNull":"whereNotNull")):f(te.operator)?se=c.$nin:se=c[te.operator];let be=te.value;u(se)&&(be=e.isArray(te.value)?te.value:[te.value]),J[te.whereType](Q,se,be)}),a.enabled&&s(`(buildRelationQuery) innerQB sql-pre: ${J.toSQL().sql}`),J})}else s(`one of ${I} group statements contains unknown operator`)})}buildComparison(k,M,T,A,I,O){const $=c[A]||"=",q=this.processStatement(T,A,I);let R=this.processWhereType(M,A,I);if(s(`(buildComparison) mode: ${M}, op: ${A}, isRelation: ${q.isRelation}, group: ${O}`),q.isRelation){if(q.whereType=R,!O){this.buildRelationQuery(k,[q],M);return}Object.prototype.hasOwnProperty.call(k,"relations")||(k.relations=[]),k.relations.push(q);return}const K=q.column;if(A=q.operator,I=q.value,A==="$regex"||A==="$not"){const{source:X,ignoreCase:Y}=g(I);if(I=X,Y){R+="Raw",s(`(buildComparison) whereType: ${R}, statement: ${T}, op: ${A}, comp: ${$}, value: ${I} (REGEX/i)`),k[R](`lower(??) ${$} ? ESCAPE ?`,[K,I,h]);return}R+="Raw",s(`(buildComparison) whereType: ${R}, statement: ${T}, op: ${A}, comp: ${$}, value: ${I} (REGEX)`),k[R](`?? ${$} ? ESCAPE ?`,[K,I,h]);return}s(`(buildComparison) whereType: ${R}, statement: ${T}, op: ${A}, comp: ${$}, value: ${I}`),k[R](K,$,I)}buildWhereClause(k,M,T,A,I){if(s(`(buildWhereClause) mode: ${M}, statement: ${T}`),a.enabled&&a(`(buildWhereClause) ${d(A)}`),!e.isObject(A))return this.buildComparison(k,M,T,"$eq",A,I);e.forIn(A,(O,$)=>{l($)?this.buildComparison(k,M,T,$,O,I):s("unknown operator")})}buildWhereGroup(k,M,T,A){const I=this.processWhereType(M);s(`(buildWhereGroup) mode: ${T}, whereType: ${I}`),a.enabled&&a(`(buildWhereGroup) ${d(A)}`),k[I](O=>{e.isArray(A)?A.forEach($=>this.buildQuery(O,T,$,!0)):e.isObject(A)&&this.buildQuery(O,T,A,!0),Object.prototype.hasOwnProperty.call(O,"relations")&&(this.buildRelationQuery(O,O.relations,T),delete O.relations)})}buildQuery(k,M,T,A){s(`(buildQuery) mode: ${M}`),a.enabled&&a(`(buildQuery) ${d(T)}`),e.forIn(T,(I,O)=>{s(`(buildQuery) key: ${O}`),m(O)?this.buildWhereGroup(k,M,O,I):this.buildWhereClause(k,M,O,I,A)})}processJSON(k,M){s("(processJSON)"),a.enabled&&a(`(processJSON) ${d(M)}`),this.buildQuery(k,"$and",M)}}return Mf=function(k,M,T){return new b({tableName:k._single.table},T).processJSON(k,M),k},Mf}var jf,Eg;function t4(){return Eg||(Eg=1,jf=e4()),jf}var Ef,Tg;function r4(){if(Tg)return Ef;Tg=1;const e=jd(),s=["$and","$or"],a=(M,T)=>Array.isArray(M)?M.map(A=>a(A,T)).filter(A=>!e.isEmpty(A)):e.reduce(M,(A,I,O)=>{let $;if(s.includes(O)){const q=a(I,T);$=e.isEmpty(q)?null:{[O]:q}}else O==="yg"?$={[O]:a(I,T)}:$=T(I,O);return e.assign({},A,$)},{}),o=(M,T)=>e.isEmpty(M)?T:e.isEmpty(T)?M:{$and:[M,T]},c=(M,T)=>e.some(M,(A,I,O)=>I==="$and"?c(O.$and,T):I==="$or"?c(O.$or,T):I!==T&&e.isObject(A)?c(A,T):I===T),h=(M,T)=>M&&a(M,function(A,I){if(!T(I))return{[I]:A}}),y=(...M)=>{let T={};return M.filter(A=>!!A).forEach(A=>{A&&Object.keys(A).length>0&&(A=h(A,I=>c(T,I)),A&&(T=Object.keys(T).length>0?o(T,A):A))}),T},m=(M,T)=>{const A=(I,O)=>O.$and?{$and:[I,...O.$and]}:{$and:[I,O]};return a(M,function(I,O){const $=e.find(T,{key:O});if(!$)return{[O]:I};let q={[$.replacement]:I};return $.expansion?A(q,$.expansion):q})};function l(M,T){const A=T.find(({from:I})=>I===M);return A?A.to:M}function f(M,T){return Array.isArray(M)?M.map(T):T(M)}function u(M){return function(A){return a(A,function(I,O){return O!==M.key.from?{[O]:I}:typeof I!="object"?{[M.key.to]:l(I,M.values)}:{[M.key.to]:e.reduce(I,($,q,R)=>Object.assign($,{[R]:f(q,K=>l(K,M.values))}),{})}})}}const d=(M,T)=>a(M,function(A,I){return Object.keys(T).includes(I)?T[I]??{}:{[I]:A}});function g(...M){return function(T){for(const A of M)T=A(T);return T}}function b(M){if(!M)return[];const T=[];if(M.$and)for(const A of M.$and)for(const I of b(A))T.includes(I)||T.push(I);else if(M.$or)for(const A of M.$or)for(const I of b(A))T.includes(I)||T.push(I);else M.yg?T.push(...b(M.yg)):T.push(...Object.keys(M));return T}function _(M,T){let A,I;if(typeof M!="object")return[A,I];if(M.$and){for(const O of M.$and){const $=b(O);let q=!1;for(const R of $)if(T.includes(R))q=!0;else if(q)throw new Error(`This filter is not supported because you cannot combine ${T.join(", ")} filters with other filters except at the root level in an AND.`);q?A?A.$and.push(O):A={$and:[O]}:I?I.$and.push(O):I={$and:[O]}}A&&A.$and.length===1&&(A=A.$and[0]),I&&I.$and.length===1&&(I=I.$and[0])}else if(M.$or){let O=!1;for(const $ of M.$or){const q=b($);for(const R of q)if(T.includes(R)){O=!0;continue}else if(O)throw new Error(`This filter is not supported because you cannot combine ${T.join(", ")} filters with other filters in an OR.`)}O?A=M:I=M}else{if(M.yg)return this.splitFilter(M.yg,T);{const O=Object.keys(M);for(const $ of O)T.includes($)?A?A[$]=M[$]:A={[$]:M[$]}:I?I[$]=M[$]:I={[$]:M[$]}}}return[A,I]}function k(M){const T=[];for(const A of Object.keys(M))M[A]&&T.push({key:{from:A,to:M[A]},values:[]});return T.map(A=>u(A))}return Ef={mapKeyValues:u,combineFilters:o,findStatement:c,rejectStatements:h,mergeFilters:y,expandFilters:m,mapQuery:a,replaceFilters:d,chainTransformers:g,getUsedKeys:b,splitFilter:_,mapKeys:k},Ef}var Tf,Ng;function Xf(){return Ng||(Ng=1,Tf=r4()),Tf}var Nf,Sg;function n4(){if(Sg)return Nf;Sg=1;const e=Xf(),s=Tx(),a=jd(),o=y=>!y||Object.keys(y).length===0?y:y.map(m=>{const l=Object.assign({},m);return l.expansion&&(l.expansion=s.parse(m.expansion)),l}),c=(y,m)=>{const l=o(m);return e.expandFilters(y,l)},h=y=>{if(!y.$and||!e.findStatement(y,"$ne"))return y;const m=y.$and,l=m.filter(d=>e.findStatement(d,"$ne")),f=a.groupBy(l,d=>Object.keys(d)[0]);Object.keys(f).filter(d=>f[d].length>1).forEach(d=>{const g=f[d].map(b=>b[d].$ne).filter(b=>b!==void 0);g.length!==0&&(y[d]={$nin:g},f[d].forEach(b=>{const _=m.indexOf(b);_>-1&&m.splice(_,1)}))}),m.length===0&&delete y.$and;for(const d in y)d==="$and"&&(y[d]=y[d].map(h));return y};return Nf={mergeFilters:e.mergeFilters,parseExpansions:o,expandFilters:c,combineNeFilters:h},Nf}var Ag;function s4(){if(Ag)return Li.exports;Ag=1;const e=t5(),s=Tx(),a=t4(),o=n4();return Li.exports=(c,h={})=>{const y={};return y.lex=()=>s.lex(c),y.parse=function(){!this.filter&&c&&(this.filter=s.parse(c),h.transformer&&(this.filter=h.transformer(this.filter)));let m,l;h.overrides&&(m=s.parse(h.overrides)),h.defaults&&(l=s.parse(h.defaults));let f=o.mergeFilters(m,this.filter,l);return f=o.combineNeFilters(f),h.expansions&&(f=o.expandFilters(f,h.expansions)),f},y.queryJSON=function(m){return this.query=this.query||new e.Query(y.parse()),this.query.test(m)},y.querySQL=m=>a(m,y.parse(),h),y.toString=()=>c,y.toJSON=y.parse,y},Li.exports.utils={mapQuery:Xf().mapQuery,mapKeyValues:Xf().mapKeyValues},Li.exports}var Sf,Cg;function a4(){return Cg||(Cg=1,Sf=s4()),Sf}var o4=a4();const i4=Xg(o4);function Nx(e,s){return e.visibility?i4(e.visibility).queryJSON(s):!0}function l4({description:e,accentColor:s,icon:a,logo:o,coverImage:c,themeSettings:h,bodyFont:y,headingFont:m}){if(!h)return;const l=h.reduce((d,{key:g,value:b})=>({...d,[g]:b}),{}),f=new URLSearchParams;f.append("c",s),f.append("d",e),f.append("icon",a),f.append("logo",o),f.append("cover",c),f.append("bf",y),f.append("hf",m);const u={};return h.forEach(d=>{u[d.key]=Nx(d,l)?d.value:g2}),f.append("custom",JSON.stringify(u)),f.toString()}const c4=({settings:e,url:s})=>{const a=l4({...e}),o=D.useCallback(c=>{!s||!a||fetch(s,{method:"POST",headers:{"Content-Type":"text/html;charset=utf-8","x-ghost-preview":a,Accept:"text/plain"},mode:"cors",credentials:"include"}).then(h=>h.text()).then(h=>{const y="html { pointer-events: none; }",l=new DOMParser().parseFromString(h,"text/html"),f=l.querySelector("style"),u=f?.innerHTML;u?f.innerHTML=`${u}
|
|
68
|
-
|
|
69
|
-
${y}`:l.head.innerHTML+=`<style>${y}</style>`;let g=(l.doctype?new XMLSerializer().serializeToString(l.doctype):"")+l.documentElement.outerHTML;c.contentDocument?.open(),c.contentDocument?.write(g),c.contentDocument?.close()})},[a,s]);return r.jsx(xd,{addDelay:!1,className:"absolute size-[110%] origin-top-left scale-[.90909] bg-white max-[1600px]:size-[130%] max-[1600px]:scale-[.76923]",generateContent:o,height:"100%",parentClassName:"relative h-full w-full",testId:"theme-preview",width:"100%"})},u4=({setting:e,setSetting:s})=>{const[a,o]=D.useState({});D.useEffect(()=>{const f=e.value===null?"":String(e.value);o(u=>({...u,[e.key]:f}))},[e]);const c=f=>{a[f]!==void 0&&s(a[f])},h=(f,u)=>{o(d=>({...d,[f]:u}))},{mutateAsync:y}=Ks(),m=it(),l=async f=>{try{const u=ln(await y({file:f}));s(u)}catch(u){m(u)}};switch(e.type){case"text":return r.jsx(Ne,{hint:e.description,title:Ba(e.key),value:a[e.key]||"",onBlur:()=>c(e.key),onChange:f=>h(e.key,f.target.value)});case"boolean":return r.jsx(st,{checked:e.value,direction:"rtl",hint:e.description,label:Ba(e.key),onChange:f=>s(f.target.checked)});case"select":return r.jsx(Ot,{hint:e.description,options:e.options.map(f=>({label:f,value:f})),selectedOption:{label:e.value,value:e.value},testId:`setting-select-${e.key}`,title:Ba(e.key),onSelect:f=>s(f?.value||null)});case"color":return r.jsx(Yr,{debounceMs:200,direction:"rtl",hint:e.description,title:Ba(e.key),value:e.value||"",onChange:f=>s(f)});case"image":return r.jsxs(r.Fragment,{children:[r.jsx(bt,{useLabelTag:!0,children:Ba(e.key)}),r.jsx(un,{height:e.value?"100px":"32px",id:`custom-${e.key}`,imageURL:e.value||"",onDelete:()=>s(null),onUpload:f=>l(f),children:"Upload image"}),e.description&&r.jsx(Kr,{children:e.description})]})}},f4={source:["title_font","body_font"],casper:["title_font","body_font"],alto:["title_font","body_font"],bulletin:["title_font","body_font"],dawn:["title_font","body_font"],digest:["title_font","body_font"],dope:["title_font","body_font"],ease:["title_font","body_font"],edge:["title_font","body_font"],edition:["title_font","body_font"],episode:["typography"],headline:["title_font","body_font"],journal:["title_font","body_font"],london:["title_font","body_font"],ruby:["title_font","body_font"],solo:["typography"],taste:["style"],wave:["title_font","body_font"]},d4=({sections:e,updateSetting:s})=>{const{data:a}=ad(),o=a?.themes.find(m=>m.active),c=o?.package.name?.toLowerCase()||"",h=o?.package.author?.name||"",{supportsCustomFonts:y}=bd();return r.jsx(r.Fragment,{children:e.map(m=>{const l=m.settings.filter(u=>Nx(u,m.settings.reduce((d,{key:g,value:b})=>({...d,[g]:b}),{})));let f;return r.jsx(et,{className:"first-of-type:mt-6",gap:"xs",margins:"lg",title:m.title,children:l.map(u=>{let d="";u.type==="boolean"&&f!=="boolean"&&f!==void 0&&(d="mt-3"),(u.type==="text"||u.type==="select")&&(f==="text"||f==="select")&&(d="mt-2");const g=f4[c];return g&&g.includes(u.key)&&h==="Ghost Foundation"&&y&&(d+=" hidden"),f=u.type,r.jsx("div",{className:d,children:r.jsx(u4,{setSetting:b=>s({...u,value:b}),setting:u},u.key)},u.key)})},m.id)})})},p4=({globalSettings:e,themeSettingSections:s,updateGlobalSetting:a,updateThemeSetting:o,onTabChange:c})=>{const[h,y]=D.useState("global"),m=[{id:"global",title:"Brand",contents:r.jsx(fm,{updateSetting:a,values:e})}];s.length>0&&m.push({id:"theme-settings",title:"Theme",contents:r.jsx(d4,{sections:s,updateSetting:o})});const l=f=>{y(f),c(f)};return r.jsx("div",{className:"flex h-full flex-col justify-between",children:r.jsx("div",{className:"grow p-7 pt-0","data-testid":"design-setting-tabs",children:m.length>1?r.jsx(fn,{selectedTab:h,stickyHeader:!0,tabs:m,onTabChange:l}):r.jsx(fm,{updateSetting:a,values:e})})})},h4=()=>{const{settings:e,siteData:s}=Qe(),{mutateAsync:a}=On(),{data:{posts:[o]}={posts:[]}}=x0({searchParams:{filter:"status:published",order:"published_at DESC",limit:"1",fields:"id,url"}}),{data:c}=x2(),{mutateAsync:h}=b2(),y=it(),[m,l]=D.useState("homepage"),{updateRoute:f}=Ve(),u=n0().getParam("ref"),{formState:d,saveState:g,handleSave:b,updateForm:_,setFormState:k,okProps:M}=pr({initialState:{settings:e,themeSettings:c?c.custom_theme_settings:void 0},savingDelay:500,onSave:async()=>{if(d.themeSettings?.some(be=>be.dirty)){const be=await h(d.themeSettings);k(je=>({...je,themeSettings:be.custom_theme_settings}))}if(d.settings.some(be=>be.dirty)){const{settings:be}=await a(d.settings.filter(je=>je.dirty));k(je=>({...je,settings:be}))}},onSaveError:y});D.useEffect(()=>{c&&k(be=>({...be,themeSettings:c.custom_theme_settings}))},[k,c]);const T=(be,je)=>{_(W=>({...W,settings:W.settings.map(he=>he.key===be?{...he,value:je,dirty:!0}:he)}))},A=be=>{_(je=>({...je,themeSettings:je.themeSettings?.map(W=>W.key===be.key?{...be,dirty:!0}:W)}))},[I,O,$,q,R,K,X]=xt(d.settings,["description","accent_color","icon","logo","cover_image","heading_font","body_font"]),Y=(d.themeSettings||[]).reduce((be,je)=>{const W=je.group==="homepage"||je.group==="post"?je.group:"site-wide";return{...be,[W]:(be[W]||[]).concat(je)}},{}),L=Object.entries(Y).map(([be,je])=>({id:be,settings:je||[],title:be==="site-wide"?"Site wide":be==="homepage"?"Homepage":"Post"}));let B=[];o&&(B=[{id:"homepage",title:"Homepage"},{id:"post",title:"Post"}]);const J=be=>{B.length&&l(be)},te=be=>{l(be==="post"&&o?"post":"homepage")};let ne=Xr(s);switch(m){case"homepage":ne=Xr(s);break;case"post":ne=o.url;break}const Q=r.jsx(c4,{settings:{description:I,accentColor:O,icon:$,logo:q,coverImage:R,themeSettings:d.themeSettings,headingFont:K,bodyFont:X},url:ne}),se=r.jsx(p4,{globalSettings:{description:I,accentColor:O,icon:$,logo:q,coverImage:R,headingFont:K,bodyFont:X},handleSave:b,themeSettingSections:L,updateGlobalSetting:T,updateThemeSetting:A,onTabChange:te});return r.jsx(as,{afterClose:()=>{f(u==="setup"?{isExternal:!0,route:"analytics"}:"design")},buttonsDisabled:M.disabled,cancelLabel:"Close",defaultTab:"homepage",dirty:g==="unsaved",okColor:M.color,okLabel:M.label||"Save",preview:Q,previewToolbarTabs:B,selectedURL:m,sidebar:se,sidebarPadding:!1,siteLink:Xr(s),size:"full",testId:"design-modal",title:"Design",onOk:async()=>{await b({fakeWhenUnchanged:!0})},onSelectURL:J})},m4=({pathName:e})=>{const s=Gt(),{updateRoute:a}=Ve(),[o,c]=D.useState(null),[h,y]=D.useState(!1),[m,l]=D.useState(!1),{checkThemeLimitError:f,isThemeLimitCheckReady:u,noThemeChangesAllowed:d,isThemeLimited:g}=od(),[b,_]=D.useState(null),[k,M]=D.useState(!1);if(D.useEffect(()=>{e==="design/change-theme"&&u?(async()=>{if(!d){y(!1),c(null);return}y(!0);const A=await f();c(A),y(!1),A&&(ye.show(Vr,{prompt:A,onOk:()=>a({route:"/pro",isExternal:!0})}),s.remove())})():(c(null),y(!1))},[f,u,e,s,a,d]),D.useEffect(()=>{e!=="theme/install"&&(M(!1),_(null),l(!1))},[e]),D.useEffect(()=>{const T=()=>{const q=window.location.href.split("#")[1]?.split("?")[1];return q?new URLSearchParams(q).get("ref"):null},A=O=>{_(!1);const $={prompt:O,onOk:()=>a({route:"/pro",isExternal:!0})};d?(ye.show(Vr,$),window.history.replaceState({},"",window.location.pathname+window.location.hash.split("?")[0]),s.remove(),a("theme")):(ye.show(Vr,$),s.remove(),a("theme"))};(async()=>{if(e!=="theme/install"){l(!1);return}if(M(!0),!u){l(!0);return}if(!g){_(!0),l(!1);return}l(!0);const O=T();if(!O){_(!1),l(!1);return}const $=O.split("/")[1]?.toLowerCase(),q=await f($);if(e!=="theme/install"){l(!1);return}if(q){_(!1),l(!1),A(q);return}_(!0),l(!1)})()},[e,u,f,d,g,s,a]),e==="design/edit")return r.jsx(h4,{});if(e==="design/change-theme")return h||o?null:r.jsx(im,{});if(e==="theme/install"){if(!k||!u||m||b===null||!b)return null;const I=window.location.href.split("#")[1]?.split("?")[1];let O=null,$=null;if(I){const q=new URLSearchParams(I);O=q.get("ref"),$=q.get("source")}return r.jsx(im,{source:$,themeRef:O})}else s.remove()},g4=ye.create(m4),x4=({html:e,style:s})=>{const a=o=>{const c=o.contentDocument||o.contentWindow?.document;if(!c)return;const h=`
|
|
70
|
-
<html>
|
|
71
|
-
<head>
|
|
72
|
-
<style>body, html {padding: 0; margin: 0; overflow: hidden;}</style>
|
|
73
|
-
<style>${s}</style>
|
|
74
|
-
</head>
|
|
75
|
-
<body>${e}</body>
|
|
76
|
-
</html>
|
|
77
|
-
`;c.open(),c.write(h),c.close()};return r.jsx(xd,{className:"absolute size-full overflow-hidden transition-opacity duration-500",generateContent:a,height:"100%",parentClassName:"relative h-full w-full",width:"100%"})},b4=({selectedLayout:e,accentColor:s,handleColorToggle:a,selectedColor:o,selectedLabels:c,handleLabelClick:h,embedScript:y,handleLayoutSelect:m,handleCopyClick:l,isCopied:f})=>{const{loadData:u}=s0({path:"/labels/",filterKey:"name",responseKey:"labels"}),d=async(g,b)=>{const _=await u(g);b(_.map(k=>({label:k.name,value:k.name})))};return r.jsxs("div",{className:"flex h-[calc(100vh-16vmin)] max-h-[645px] flex-col justify-between overflow-y-scroll border-l border-grey-200 p-6 pb-0 dark:border-grey-900",children:[r.jsxs("div",{children:[r.jsx(bt,{className:"mb-8",level:4,children:"Embed signup form"}),r.jsxs(et,{gap:"sm",children:[r.jsxs("div",{className:"flex w-full items-center justify-between",children:[r.jsx("div",{children:"Layout"}),r.jsx(Gr,{activeKey:e,buttons:[{key:"all-in-one",label:"Branded",size:"md",className:"w-auto !px-3",onClick:()=>m("all-in-one")},{key:"minimal",label:"Minimal",size:"md",className:"w-auto !px-3",onClick:()=>m("minimal")}],clearBg:!1})]}),e==="all-in-one"&&r.jsx(Yr,{direction:"rtl",eyedropper:!0,swatches:[{hex:"#08090c",title:"Dark",value:"#08090c"},{hex:"#ffffff",title:"Light",value:"#ffffff"},{hex:s||"#d74780",title:"Accent",value:s||"#d74780"}],title:"Background color",value:o,onChange:g=>{g&&a(g)}}),r.jsx(v2,{hint:"Will be applied to all members signing up via this form",loadOptions:rl(d,500),placeholder:"Pick one or more labels (optional)",title:"Labels at signup",values:c||[],async:!0,canCreate:!0,defaultOptions:!0,onChange:h}),r.jsx(dn,{className:"text-grey-800",fontStyle:"mono",hint:"Paste this code onto any website where you'd like your signup to appear.",title:"Embed code",value:`${y}`,onChange:()=>{}})]})]}),r.jsx(w2,{height:74,children:r.jsx("div",{className:"flex w-full justify-end",children:r.jsx(Ue,{color:f?"green":"black",label:f?"Copied!":"Copy code",onClick:l})})})]})};function Ig(e){return e?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}function Ed(e,s){return s={exports:{}},e(s,s.exports),s.exports}var Ya={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},v4=function(s){return!s||typeof s=="string"?!1:s instanceof Array||Array.isArray(s)||s.length>=0&&(s.splice instanceof Function||Object.getOwnPropertyDescriptor(s,s.length-1)&&s.constructor.name!=="String")},Ga=Ed(function(e){var s=Array.prototype.concat,a=Array.prototype.slice,o=e.exports=function(h){for(var y=[],m=0,l=h.length;m<l;m++){var f=h[m];v4(f)?y=s.call(y,a.call(f)):y.push(f)}return y};o.wrap=function(c){return function(){return c(o(arguments))}}}),Jn=Ed(function(e){var s=Object.hasOwnProperty,a=Object.create(null);for(var o in Ya)s.call(Ya,o)&&(a[Ya[o]]=o);var c=e.exports={to:{},get:{}};c.get=function(m){var l=m.substring(0,3).toLowerCase(),f,u;switch(l){case"hsl":f=c.get.hsl(m),u="hsl";break;case"hwb":f=c.get.hwb(m),u="hwb";break;default:f=c.get.rgb(m),u="rgb";break}return f?{model:u,value:f}:null},c.get.rgb=function(m){if(!m)return null;var l=/^#([a-f0-9]{3,4})$/i,f=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,u=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,d=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,g=/^(\w+)$/,b=[0,0,0,1],_,k,M;if(_=m.match(f)){for(M=_[2],_=_[1],k=0;k<3;k++){var T=k*2;b[k]=parseInt(_.slice(T,T+2),16)}M&&(b[3]=parseInt(M,16)/255)}else if(_=m.match(l)){for(_=_[1],M=_[3],k=0;k<3;k++)b[k]=parseInt(_[k]+_[k],16);M&&(b[3]=parseInt(M+M,16)/255)}else if(_=m.match(u)){for(k=0;k<3;k++)b[k]=parseInt(_[k+1],0);_[4]&&(_[5]?b[3]=parseFloat(_[4])*.01:b[3]=parseFloat(_[4]))}else if(_=m.match(d)){for(k=0;k<3;k++)b[k]=Math.round(parseFloat(_[k+1])*2.55);_[4]&&(_[5]?b[3]=parseFloat(_[4])*.01:b[3]=parseFloat(_[4]))}else return(_=m.match(g))?_[1]==="transparent"?[0,0,0,0]:s.call(Ya,_[1])?(b=Ya[_[1]],b[3]=1,b):null:null;for(k=0;k<3;k++)b[k]=h(b[k],0,255);return b[3]=h(b[3],0,1),b},c.get.hsl=function(m){if(!m)return null;var l=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,f=m.match(l);if(f){var u=parseFloat(f[4]),d=(parseFloat(f[1])%360+360)%360,g=h(parseFloat(f[2]),0,100),b=h(parseFloat(f[3]),0,100),_=h(isNaN(u)?1:u,0,1);return[d,g,b,_]}return null},c.get.hwb=function(m){if(!m)return null;var l=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,f=m.match(l);if(f){var u=parseFloat(f[4]),d=(parseFloat(f[1])%360+360)%360,g=h(parseFloat(f[2]),0,100),b=h(parseFloat(f[3]),0,100),_=h(isNaN(u)?1:u,0,1);return[d,g,b,_]}return null},c.to.hex=function(){var m=Ga(arguments);return"#"+y(m[0])+y(m[1])+y(m[2])+(m[3]<1?y(Math.round(m[3]*255)):"")},c.to.rgb=function(){var m=Ga(arguments);return m.length<4||m[3]===1?"rgb("+Math.round(m[0])+", "+Math.round(m[1])+", "+Math.round(m[2])+")":"rgba("+Math.round(m[0])+", "+Math.round(m[1])+", "+Math.round(m[2])+", "+m[3]+")"},c.to.rgb.percent=function(){var m=Ga(arguments),l=Math.round(m[0]/255*100),f=Math.round(m[1]/255*100),u=Math.round(m[2]/255*100);return m.length<4||m[3]===1?"rgb("+l+"%, "+f+"%, "+u+"%)":"rgba("+l+"%, "+f+"%, "+u+"%, "+m[3]+")"},c.to.hsl=function(){var m=Ga(arguments);return m.length<4||m[3]===1?"hsl("+m[0]+", "+m[1]+"%, "+m[2]+"%)":"hsla("+m[0]+", "+m[1]+"%, "+m[2]+"%, "+m[3]+")"},c.to.hwb=function(){var m=Ga(arguments),l="";return m.length>=4&&m[3]!==1&&(l=", "+m[3]),"hwb("+m[0]+", "+m[1]+"%, "+m[2]+"%"+l+")"},c.to.keyword=function(m){return a[m.slice(0,3)]};function h(m,l,f){return Math.min(Math.max(l,m),f)}function y(m){var l=Math.round(m).toString(16).toUpperCase();return l.length<2?"0"+l:l}});Jn.to;Jn.get;var Zn={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},At=Ed(function(e){var s={};for(var a in Zn)Zn.hasOwnProperty(a)&&(s[Zn[a]]=a);var o=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var c in o)if(o.hasOwnProperty(c)){if(!("channels"in o[c]))throw new Error("missing channels property: "+c);if(!("labels"in o[c]))throw new Error("missing channel labels property: "+c);if(o[c].labels.length!==o[c].channels)throw new Error("channel and label counts mismatch: "+c);var h=o[c].channels,y=o[c].labels;delete o[c].channels,delete o[c].labels,Object.defineProperty(o[c],"channels",{value:h}),Object.defineProperty(o[c],"labels",{value:y})}o.rgb.hsl=function(l){var f=l[0]/255,u=l[1]/255,d=l[2]/255,g=Math.min(f,u,d),b=Math.max(f,u,d),_=b-g,k,M,T;return b===g?k=0:f===b?k=(u-d)/_:u===b?k=2+(d-f)/_:d===b&&(k=4+(f-u)/_),k=Math.min(k*60,360),k<0&&(k+=360),T=(g+b)/2,b===g?M=0:T<=.5?M=_/(b+g):M=_/(2-b-g),[k,M*100,T*100]},o.rgb.hsv=function(l){var f,u,d,g,b,_=l[0]/255,k=l[1]/255,M=l[2]/255,T=Math.max(_,k,M),A=T-Math.min(_,k,M),I=function(O){return(T-O)/6/A+1/2};return A===0?g=b=0:(b=A/T,f=I(_),u=I(k),d=I(M),_===T?g=d-u:k===T?g=1/3+f-d:M===T&&(g=2/3+u-f),g<0?g+=1:g>1&&(g-=1)),[g*360,b*100,T*100]},o.rgb.hwb=function(l){var f=l[0],u=l[1],d=l[2],g=o.rgb.hsl(l)[0],b=1/255*Math.min(f,Math.min(u,d));return d=1-1/255*Math.max(f,Math.max(u,d)),[g,b*100,d*100]},o.rgb.cmyk=function(l){var f=l[0]/255,u=l[1]/255,d=l[2]/255,g,b,_,k;return k=Math.min(1-f,1-u,1-d),g=(1-f-k)/(1-k)||0,b=(1-u-k)/(1-k)||0,_=(1-d-k)/(1-k)||0,[g*100,b*100,_*100,k*100]};function m(l,f){return Math.pow(l[0]-f[0],2)+Math.pow(l[1]-f[1],2)+Math.pow(l[2]-f[2],2)}o.rgb.keyword=function(l){var f=s[l];if(f)return f;var u=1/0,d;for(var g in Zn)if(Zn.hasOwnProperty(g)){var b=Zn[g],_=m(l,b);_<u&&(u=_,d=g)}return d},o.keyword.rgb=function(l){return Zn[l]},o.rgb.xyz=function(l){var f=l[0]/255,u=l[1]/255,d=l[2]/255;f=f>.04045?Math.pow((f+.055)/1.055,2.4):f/12.92,u=u>.04045?Math.pow((u+.055)/1.055,2.4):u/12.92,d=d>.04045?Math.pow((d+.055)/1.055,2.4):d/12.92;var g=f*.4124+u*.3576+d*.1805,b=f*.2126+u*.7152+d*.0722,_=f*.0193+u*.1192+d*.9505;return[g*100,b*100,_*100]},o.rgb.lab=function(l){var f=o.rgb.xyz(l),u=f[0],d=f[1],g=f[2],b,_,k;return u/=95.047,d/=100,g/=108.883,u=u>.008856?Math.pow(u,1/3):7.787*u+16/116,d=d>.008856?Math.pow(d,1/3):7.787*d+16/116,g=g>.008856?Math.pow(g,1/3):7.787*g+16/116,b=116*d-16,_=500*(u-d),k=200*(d-g),[b,_,k]},o.hsl.rgb=function(l){var f=l[0]/360,u=l[1]/100,d=l[2]/100,g,b,_,k,M;if(u===0)return M=d*255,[M,M,M];d<.5?b=d*(1+u):b=d+u-d*u,g=2*d-b,k=[0,0,0];for(var T=0;T<3;T++)_=f+1/3*-(T-1),_<0&&_++,_>1&&_--,6*_<1?M=g+(b-g)*6*_:2*_<1?M=b:3*_<2?M=g+(b-g)*(2/3-_)*6:M=g,k[T]=M*255;return k},o.hsl.hsv=function(l){var f=l[0],u=l[1]/100,d=l[2]/100,g=u,b=Math.max(d,.01),_,k;return d*=2,u*=d<=1?d:2-d,g*=b<=1?b:2-b,k=(d+u)/2,_=d===0?2*g/(b+g):2*u/(d+u),[f,_*100,k*100]},o.hsv.rgb=function(l){var f=l[0]/60,u=l[1]/100,d=l[2]/100,g=Math.floor(f)%6,b=f-Math.floor(f),_=255*d*(1-u),k=255*d*(1-u*b),M=255*d*(1-u*(1-b));switch(d*=255,g){case 0:return[d,M,_];case 1:return[k,d,_];case 2:return[_,d,M];case 3:return[_,k,d];case 4:return[M,_,d];case 5:return[d,_,k]}},o.hsv.hsl=function(l){var f=l[0],u=l[1]/100,d=l[2]/100,g=Math.max(d,.01),b,_,k;return k=(2-u)*d,b=(2-u)*g,_=u*g,_/=b<=1?b:2-b,_=_||0,k/=2,[f,_*100,k*100]},o.hwb.rgb=function(l){var f=l[0]/360,u=l[1]/100,d=l[2]/100,g=u+d,b,_,k,M;g>1&&(u/=g,d/=g),b=Math.floor(6*f),_=1-d,k=6*f-b,(b&1)!==0&&(k=1-k),M=u+k*(_-u);var T,A,I;switch(b){default:case 6:case 0:T=_,A=M,I=u;break;case 1:T=M,A=_,I=u;break;case 2:T=u,A=_,I=M;break;case 3:T=u,A=M,I=_;break;case 4:T=M,A=u,I=_;break;case 5:T=_,A=u,I=M;break}return[T*255,A*255,I*255]},o.cmyk.rgb=function(l){var f=l[0]/100,u=l[1]/100,d=l[2]/100,g=l[3]/100,b,_,k;return b=1-Math.min(1,f*(1-g)+g),_=1-Math.min(1,u*(1-g)+g),k=1-Math.min(1,d*(1-g)+g),[b*255,_*255,k*255]},o.xyz.rgb=function(l){var f=l[0]/100,u=l[1]/100,d=l[2]/100,g,b,_;return g=f*3.2406+u*-1.5372+d*-.4986,b=f*-.9689+u*1.8758+d*.0415,_=f*.0557+u*-.204+d*1.057,g=g>.0031308?1.055*Math.pow(g,1/2.4)-.055:g*12.92,b=b>.0031308?1.055*Math.pow(b,1/2.4)-.055:b*12.92,_=_>.0031308?1.055*Math.pow(_,1/2.4)-.055:_*12.92,g=Math.min(Math.max(0,g),1),b=Math.min(Math.max(0,b),1),_=Math.min(Math.max(0,_),1),[g*255,b*255,_*255]},o.xyz.lab=function(l){var f=l[0],u=l[1],d=l[2],g,b,_;return f/=95.047,u/=100,d/=108.883,f=f>.008856?Math.pow(f,1/3):7.787*f+16/116,u=u>.008856?Math.pow(u,1/3):7.787*u+16/116,d=d>.008856?Math.pow(d,1/3):7.787*d+16/116,g=116*u-16,b=500*(f-u),_=200*(u-d),[g,b,_]},o.lab.xyz=function(l){var f=l[0],u=l[1],d=l[2],g,b,_;b=(f+16)/116,g=u/500+b,_=b-d/200;var k=Math.pow(b,3),M=Math.pow(g,3),T=Math.pow(_,3);return b=k>.008856?k:(b-16/116)/7.787,g=M>.008856?M:(g-16/116)/7.787,_=T>.008856?T:(_-16/116)/7.787,g*=95.047,b*=100,_*=108.883,[g,b,_]},o.lab.lch=function(l){var f=l[0],u=l[1],d=l[2],g,b,_;return g=Math.atan2(d,u),b=g*360/2/Math.PI,b<0&&(b+=360),_=Math.sqrt(u*u+d*d),[f,_,b]},o.lch.lab=function(l){var f=l[0],u=l[1],d=l[2],g,b,_;return _=d/360*2*Math.PI,g=u*Math.cos(_),b=u*Math.sin(_),[f,g,b]},o.rgb.ansi16=function(l){var f=l[0],u=l[1],d=l[2],g=1 in arguments?arguments[1]:o.rgb.hsv(l)[2];if(g=Math.round(g/50),g===0)return 30;var b=30+(Math.round(d/255)<<2|Math.round(u/255)<<1|Math.round(f/255));return g===2&&(b+=60),b},o.hsv.ansi16=function(l){return o.rgb.ansi16(o.hsv.rgb(l),l[2])},o.rgb.ansi256=function(l){var f=l[0],u=l[1],d=l[2];if(f===u&&u===d)return f<8?16:f>248?231:Math.round((f-8)/247*24)+232;var g=16+36*Math.round(f/255*5)+6*Math.round(u/255*5)+Math.round(d/255*5);return g},o.ansi16.rgb=function(l){var f=l%10;if(f===0||f===7)return l>50&&(f+=3.5),f=f/10.5*255,[f,f,f];var u=(~~(l>50)+1)*.5,d=(f&1)*u*255,g=(f>>1&1)*u*255,b=(f>>2&1)*u*255;return[d,g,b]},o.ansi256.rgb=function(l){if(l>=232){var f=(l-232)*10+8;return[f,f,f]}l-=16;var u,d=Math.floor(l/36)/5*255,g=Math.floor((u=l%36)/6)/5*255,b=u%6/5*255;return[d,g,b]},o.rgb.hex=function(l){var f=((Math.round(l[0])&255)<<16)+((Math.round(l[1])&255)<<8)+(Math.round(l[2])&255),u=f.toString(16).toUpperCase();return"000000".substring(u.length)+u},o.hex.rgb=function(l){var f=l.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!f)return[0,0,0];var u=f[0];f[0].length===3&&(u=u.split("").map(function(k){return k+k}).join(""));var d=parseInt(u,16),g=d>>16&255,b=d>>8&255,_=d&255;return[g,b,_]},o.rgb.hcg=function(l){var f=l[0]/255,u=l[1]/255,d=l[2]/255,g=Math.max(Math.max(f,u),d),b=Math.min(Math.min(f,u),d),_=g-b,k,M;return _<1?k=b/(1-_):k=0,_<=0?M=0:g===f?M=(u-d)/_%6:g===u?M=2+(d-f)/_:M=4+(f-u)/_+4,M/=6,M%=1,[M*360,_*100,k*100]},o.hsl.hcg=function(l){var f=l[1]/100,u=l[2]/100,d=1,g=0;return u<.5?d=2*f*u:d=2*f*(1-u),d<1&&(g=(u-.5*d)/(1-d)),[l[0],d*100,g*100]},o.hsv.hcg=function(l){var f=l[1]/100,u=l[2]/100,d=f*u,g=0;return d<1&&(g=(u-d)/(1-d)),[l[0],d*100,g*100]},o.hcg.rgb=function(l){var f=l[0]/360,u=l[1]/100,d=l[2]/100;if(u===0)return[d*255,d*255,d*255];var g=[0,0,0],b=f%1*6,_=b%1,k=1-_,M=0;switch(Math.floor(b)){case 0:g[0]=1,g[1]=_,g[2]=0;break;case 1:g[0]=k,g[1]=1,g[2]=0;break;case 2:g[0]=0,g[1]=1,g[2]=_;break;case 3:g[0]=0,g[1]=k,g[2]=1;break;case 4:g[0]=_,g[1]=0,g[2]=1;break;default:g[0]=1,g[1]=0,g[2]=k}return M=(1-u)*d,[(u*g[0]+M)*255,(u*g[1]+M)*255,(u*g[2]+M)*255]},o.hcg.hsv=function(l){var f=l[1]/100,u=l[2]/100,d=f+u*(1-f),g=0;return d>0&&(g=f/d),[l[0],g*100,d*100]},o.hcg.hsl=function(l){var f=l[1]/100,u=l[2]/100,d=u*(1-f)+.5*f,g=0;return d>0&&d<.5?g=f/(2*d):d>=.5&&d<1&&(g=f/(2*(1-d))),[l[0],g*100,d*100]},o.hcg.hwb=function(l){var f=l[1]/100,u=l[2]/100,d=f+u*(1-f);return[l[0],(d-f)*100,(1-d)*100]},o.hwb.hcg=function(l){var f=l[1]/100,u=l[2]/100,d=1-u,g=d-f,b=0;return g<1&&(b=(d-g)/(1-g)),[l[0],g*100,b*100]},o.apple.rgb=function(l){return[l[0]/65535*255,l[1]/65535*255,l[2]/65535*255]},o.rgb.apple=function(l){return[l[0]/255*65535,l[1]/255*65535,l[2]/255*65535]},o.gray.rgb=function(l){return[l[0]/100*255,l[0]/100*255,l[0]/100*255]},o.gray.hsl=o.gray.hsv=function(l){return[0,0,l[0]]},o.gray.hwb=function(l){return[0,100,l[0]]},o.gray.cmyk=function(l){return[0,0,0,l[0]]},o.gray.lab=function(l){return[l[0],0,0]},o.gray.hex=function(l){var f=Math.round(l[0]/100*255)&255,u=(f<<16)+(f<<8)+f,d=u.toString(16).toUpperCase();return"000000".substring(d.length)+d},o.rgb.gray=function(l){var f=(l[0]+l[1]+l[2])/3;return[f/255*100]}});At.rgb;At.hsl;At.hsv;At.hwb;At.cmyk;At.xyz;At.lab;At.lch;At.hex;At.keyword;At.ansi16;At.ansi256;At.hcg;At.apple;At.gray;function w4(){for(var e={},s=Object.keys(At),a=s.length,o=0;o<a;o++)e[s[o]]={distance:-1,parent:null};return e}function y4(e){var s=w4(),a=[e];for(s[e].distance=0;a.length;)for(var o=a.pop(),c=Object.keys(At[o]),h=c.length,y=0;y<h;y++){var m=c[y],l=s[m];l.distance===-1&&(l.distance=s[o].distance+1,l.parent=o,a.unshift(m))}return s}function _4(e,s){return function(a){return s(e(a))}}function k4(e,s){for(var a=[s[e].parent,e],o=At[s[e].parent][e],c=s[e].parent;s[c].parent;)a.unshift(s[c].parent),o=_4(At[s[c].parent][c],o),c=s[c].parent;return o.conversion=a,o}var M4=function(e){for(var s=y4(e),a={},o=Object.keys(s),c=o.length,h=0;h<c;h++){var y=o[h],m=s[y];m.parent!==null&&(a[y]=k4(y,s))}return a},Hs={},j4=Object.keys(At);function E4(e){var s=function(a){return a==null?a:(arguments.length>1&&(a=Array.prototype.slice.call(arguments)),e(a))};return"conversion"in e&&(s.conversion=e.conversion),s}function T4(e){var s=function(a){if(a==null)return a;arguments.length>1&&(a=Array.prototype.slice.call(arguments));var o=e(a);if(typeof o=="object")for(var c=o.length,h=0;h<c;h++)o[h]=Math.round(o[h]);return o};return"conversion"in e&&(s.conversion=e.conversion),s}j4.forEach(function(e){Hs[e]={},Object.defineProperty(Hs[e],"channels",{value:At[e].channels}),Object.defineProperty(Hs[e],"labels",{value:At[e].labels});var s=M4(e),a=Object.keys(s);a.forEach(function(o){var c=s[o];Hs[e][o]=T4(c),Hs[e][o].raw=E4(c)})});var kr=Hs,Td=[].slice,Sx=["keyword","gray","hex"],Kf={};Object.keys(kr).forEach(function(e){Kf[Td.call(kr[e].labels).sort().join("")]=e});var Zi={};function qt(e,s){if(!(this instanceof qt))return new qt(e,s);if(s&&s in Sx&&(s=null),s&&!(s in kr))throw new Error("Unknown model: "+s);var a,o;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof qt)this.model=e.model,this.color=e.color.slice(),this.valpha=e.valpha;else if(typeof e=="string"){var c=Jn.get(e);if(c===null)throw new Error("Unable to parse color from string: "+e);this.model=c.model,o=kr[this.model].channels,this.color=c.value.slice(0,o),this.valpha=typeof c.value[o]=="number"?c.value[o]:1}else if(e.length){this.model=s||"rgb",o=kr[this.model].channels;var h=Td.call(e,0,o);this.color=Vf(h,o),this.valpha=typeof e[o]=="number"?e[o]:1}else if(typeof e=="number")e&=16777215,this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;var y=Object.keys(e);"alpha"in e&&(y.splice(y.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);var m=y.sort().join("");if(!(m in Kf))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Kf[m];var l=kr[this.model].labels,f=[];for(a=0;a<l.length;a++)f.push(e[l[a]]);this.color=Vf(f)}if(Zi[this.model])for(o=kr[this.model].channels,a=0;a<o;a++){var u=Zi[this.model][a];u&&(this.color[a]=u(this.color[a]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}qt.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(e){var s=this.model in Jn.to?this:this.rgb();s=s.round(typeof e=="number"?e:1);var a=s.valpha===1?s.color:s.color.concat(this.valpha);return Jn.to[s.model](a)},percentString:function(e){var s=this.rgb().round(typeof e=="number"?e:1),a=s.valpha===1?s.color:s.color.concat(this.valpha);return Jn.to.rgb.percent(a)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var e={},s=kr[this.model].channels,a=kr[this.model].labels,o=0;o<s;o++)e[a[o]]=this.color[o];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray:function(){var e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject:function(){var e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round:function(e){return e=Math.max(e||0,0),new qt(this.color.map(S4(e)).concat(this.valpha),this.model)},alpha:function(e){return arguments.length?new qt(this.color.concat(Math.max(0,Math.min(1,e))),this.model):this.valpha},red:Nt("rgb",0,Ft(255)),green:Nt("rgb",1,Ft(255)),blue:Nt("rgb",2,Ft(255)),hue:Nt(["hsl","hsv","hsl","hwb","hcg"],0,function(e){return(e%360+360)%360}),saturationl:Nt("hsl",1,Ft(100)),lightness:Nt("hsl",2,Ft(100)),saturationv:Nt("hsv",1,Ft(100)),value:Nt("hsv",2,Ft(100)),chroma:Nt("hcg",1,Ft(100)),gray:Nt("hcg",2,Ft(100)),white:Nt("hwb",1,Ft(100)),wblack:Nt("hwb",2,Ft(100)),cyan:Nt("cmyk",0,Ft(100)),magenta:Nt("cmyk",1,Ft(100)),yellow:Nt("cmyk",2,Ft(100)),black:Nt("cmyk",3,Ft(100)),x:Nt("xyz",0,Ft(100)),y:Nt("xyz",1,Ft(100)),z:Nt("xyz",2,Ft(100)),l:Nt("lab",0,Ft(100)),a:Nt("lab",1),b:Nt("lab",2),keyword:function(e){return arguments.length?new qt(e):kr[this.model].keyword(this.color)},hex:function(e){return arguments.length?new qt(e):Jn.to.hex(this.rgb().round().color)},rgbNumber:function(){var e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity:function(){for(var e=this.rgb().color,s=[],a=0;a<e.length;a++){var o=e[a]/255;s[a]=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4)}return .2126*s[0]+.7152*s[1]+.0722*s[2]},contrast:function(e){var s=this.luminosity(),a=e.luminosity();return s>a?(s+.05)/(a+.05):(a+.05)/(s+.05)},level:function(e){var s=this.contrast(e);return s>=7.1?"AAA":s>=4.5?"AA":""},isDark:function(){var e=this.rgb().color,s=(e[0]*299+e[1]*587+e[2]*114)/1e3;return s<128},isLight:function(){return!this.isDark()},negate:function(){for(var e=this.rgb(),s=0;s<3;s++)e.color[s]=255-e.color[s];return e},lighten:function(e){var s=this.hsl();return s.color[2]+=s.color[2]*e,s},darken:function(e){var s=this.hsl();return s.color[2]-=s.color[2]*e,s},saturate:function(e){var s=this.hsl();return s.color[1]+=s.color[1]*e,s},desaturate:function(e){var s=this.hsl();return s.color[1]-=s.color[1]*e,s},whiten:function(e){var s=this.hwb();return s.color[1]+=s.color[1]*e,s},blacken:function(e){var s=this.hwb();return s.color[2]+=s.color[2]*e,s},grayscale:function(){var e=this.rgb().color,s=e[0]*.3+e[1]*.59+e[2]*.11;return qt.rgb(s,s,s)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var s=this.hsl(),a=s.color[0];return a=(a+e)%360,a=a<0?360+a:a,s.color[0]=a,s},mix:function(e,s){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);var a=e.rgb(),o=this.rgb(),c=s===void 0?.5:s,h=2*c-1,y=a.alpha()-o.alpha(),m=((h*y===-1?h:(h+y)/(1+h*y))+1)/2,l=1-m;return qt.rgb(m*a.red()+l*o.red(),m*a.green()+l*o.green(),m*a.blue()+l*o.blue(),a.alpha()*c+o.alpha()*(1-c))}};Object.keys(kr).forEach(function(e){if(Sx.indexOf(e)===-1){var s=kr[e].channels;qt.prototype[e]=function(){if(this.model===e)return new qt(this);if(arguments.length)return new qt(arguments,e);var a=typeof arguments[s]=="number"?s:this.valpha;return new qt(A4(kr[this.model][e].raw(this.color)).concat(a),e)},qt[e]=function(a){return typeof a=="number"&&(a=Vf(Td.call(arguments),s)),new qt(a,e)}}});function N4(e,s){return Number(e.toFixed(s))}function S4(e){return function(s){return N4(s,e)}}function Nt(e,s,a){return e=Array.isArray(e)?e:[e],e.forEach(function(o){(Zi[o]||(Zi[o]=[]))[s]=a}),e=e[0],function(o){var c;return arguments.length?(a&&(o=a(o)),c=this[e](),c.color[s]=o,c):(c=this[e]().color[s],a&&(c=a(c)),c)}}function Ft(e){return function(s){return Math.max(0,Math.min(e,s))}}function A4(e){return Array.isArray(e)?e:[e]}function Vf(e,s){for(var a=0;a<s;a++)typeof e[a]!="number"&&(e[a]=0);return e}var Af=qt;function Sr(e){const s=Af(e),a=Af({r:255,g:255,b:255}),o=Af({r:0,g:0,b:0});return s.red()*.299+s.green()*.587+s.b()*.114>=186?o:a}const Dg=({preview:e,config:s,settings:a,labels:o,backgroundColor:c,layout:h})=>{const y=s.blogUrl,m=s.signupForm.url.replace("{version}",s.signupForm.version);let l={site:y,locale:a.locale,"button-color":a.accentColor,"button-text-color":Sr(a.accentColor).hex()};for(const[_,k]of o.entries())l[`label-${_+1}`]=k.name;let f="min-height: 58px;max-width: 440px;margin: 0 auto;width: 100%";h==="all-in-one"&&(a.icon&&a.icon!==""&&(l.icon=a.icon.replace(/\/content\/images\//,"/content/images/size/w192h192/")),l.title=a.title,l.description=a.description,l["background-color"]=c,l["text-color"]=Sr(c).hex(),f="height: 40vmin;min-height: 360px"),e&&(h==="minimal"?f="min-height: 58px; max-width: 440px;width: 100%;position: absolute; left: 50%; top:50%; transform: translate(-50%, -50%);":f="height: 100vh");let u="";const d=["background-color","text-color","button-color","button-text-color","title","description","icon","site","locale"],g=Object.keys(l).sort((_,k)=>d.indexOf(_)-d.indexOf(k));for(const _ of g){const k=l[_];u+=` data-${_}="${Ig(k)}"`}const b=`<div style="${Ig(f)}"><script src="${encodeURI(m)}"${u} async><\/script></div>`;return e&&h==="minimal"?`<div style="position: absolute; z-index: -1; top: 0; left: 0; width: 100%; height: 100%; background-image: linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%), linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%);background-size: 16px 16px;background-position: 0 0, 8px 8px;;"></div>${b}`:b},C4=ye.create(()=>{const[e,s]=D.useState("#08090c"),[a,o]=D.useState([]),[c,h]=D.useState("all-in-one"),[y,m]=D.useState(""),[l,f]=D.useState(""),[u,d]=D.useState(!1),{updateRoute:g}=Ve(),{config:b}=Qe(),{localSettings:_,siteData:k}=ss(),[M,T,A,I,O]=xt(_,["accent_color","title","description","locale","icon"]),[$,q]=D.useState({active:!1});D.useEffect(()=>{if(!k)return;const Y={config:{blogUrl:k.url,signupForm:{url:b?.signupForm?.url,version:b?.signupForm?.version}},settings:{accentColor:M||"#d74780",title:T||"",locale:I||"en",icon:O||"",description:A||""},labels:a.map(({label:J})=>({name:J})),backgroundColor:e||"#08090c",layout:c},L=Dg({preview:!0,...Y});m(L);const B=Dg({preview:!1,...Y});f(B)},[k,M,a,b,T,e,c,I,O,A]);const R=async()=>{try{await navigator.clipboard.writeText(l),d(!0),setTimeout(()=>d(!1),2e3)}catch(Y){console.error("Failed to copy text: ",Y)}},K=Y=>{s(Y)},X=Y=>{if(Y?.length){const L=Y?.map(({value:B})=>({label:B,value:B}));o(L)}else o([])};return r.jsx(vt,{afterClose:()=>{g("embed-signup-form")},cancelLabel:"",footer:!1,height:645,padding:!1,testId:"embed-signup-form",title:"",topRightContent:"close",width:1120,children:r.jsxs("div",{className:"grid grid-cols-[5.2fr_2.8fr]",children:[r.jsx(x4,{html:y,style:c}),r.jsx(b4,{accentColor:M,customColor:$,embedScript:l,handleColorToggle:K,handleCopyClick:R,handleLabelClick:X,handleLayoutSelect:h,isCopied:u,selectedColor:e,selectedLabels:a,selectedLayout:c,setCustomColor:q})]})})}),I4=ye.create(()=>{const{updateRoute:e}=Ve(),{settings:s}=Qe(),{mutateAsync:a}=On(),o=it(),[c,h]=D.useState(""),[y]=xt(s,["firstpromoter"]),[m]=xt(s,["firstpromoter_id"]),[l,f]=D.useState("Save"),[u,d]=D.useState(!!y);D.useEffect(()=>{d(y||!1),h(m||null)},[y,m]);const g=async()=>{const b=[{key:"firstpromoter",value:u},{key:"firstpromoter_id",value:c}];try{f("Saving..."),await Promise.all([a(b),new Promise(_=>{setTimeout(_,1e3)})]),f("Saved")}catch(_){o(_)}finally{setTimeout(()=>f("Save"),1e3)}};return r.jsxs(vt,{afterClose:()=>{e("integrations")},cancelLabel:"Close",dirty:u!==y||c!==m,okColor:l==="Saved"?"green":"black",okLabel:l,testId:"firstpromoter-modal",title:"",onOk:async()=>{try{await g()}catch(b){o(b)}},children:[r.jsx(Js,{detail:"Launch your own member referral program",icon:r.jsx(rt,{className:"-mt-2",name:"firstpromoter",size:56}),title:"FirstPromoter"}),r.jsx("div",{className:"mt-7",children:r.jsxs(et,{marginBottom:!1,title:"FirstPromoter configuration",grouped:!0,children:[r.jsx(st,{checked:u,direction:"rtl",hint:r.jsxs(r.Fragment,{children:["Enable ",r.jsx("a",{className:"text-green",href:"https://firstpromoter.com/?fpr=ghost&fp_sid=admin",rel:"noopener noreferrer",target:"_blank",children:"FirstPromoter"})," for tracking referrals"]}),label:"Enable FirstPromoter",onChange:b=>{d(b.target.checked)}}),u&&r.jsx(Ne,{hint:r.jsxs(r.Fragment,{children:["Affiliate and referral tracking, find your ID ",r.jsx("a",{className:"text-green",href:"https://ghost.org/help/firstpromoter-id/",rel:"noopener noreferrer",target:"_blank",children:"here"})]}),placeholder:"XXXXXXXX",title:"FirstPromoter account ID",value:c||"",onChange:b=>{h(b.target.value)}})]})})]})}),D4="ActionsResponseType",R4=S_({dataType:D4,path:"/actions/",returnData:e=>{const{pages:s}=e;let a=s.flatMap(h=>h.actions.map(({context:y,...m})=>({...m,context:JSON.parse(y)})));a=a.reverse();let o=1;a.forEach((h,y)=>{const m=a[y+1];m&&h.resource_id===m.resource_id&&h.event===m.event?(h.skip=!0,o+=1):o>1&&(h.count=o,o=1)});const c=s[s.length-1].meta;return{actions:a.reverse(),meta:c,isEnd:c?c.pagination.pages===c.pagination.page:!0}}}),O4=e=>{var s,a;let o=e.resource_type;if(e.event!=="deleted")switch(e.resource_type){case"page":case"post":return!e.resource||!e.resource.id?void 0:(o==="post"&&(s=e.context)!=null&&s.type&&(o=(a=e.context)==null?void 0:a.type),{isExternal:!0,route:`editor/${o}/${e.resource.id}`,models:[o,e.resource.id]});case"integration":return!e.resource||!e.resource.id?void 0:{route:`integrations/${e.resource.id}`};case"offer":return!e.resource||!e.resource.id?void 0:{isExternal:!0,route:`offers/${e.resource.id}`,models:[e.resource.id]};case"tag":return!e.resource||!e.resource.slug?void 0:{isExternal:!0,route:"tag",models:[e.resource.slug]};case"product":return{route:"tiers"};case"user":return!e.resource||!e.resource.slug?void 0:{route:`staff/${e.resource.slug}`}}},$4=e=>{var s,a,o,c,h,y,m;let l=e.resource_type;l==="api_key"?l="API key":l==="setting"?l="settings":l==="product"&&(l="tier"),l==="post"&&(s=e.context)!=null&&s.type&&(l=(a=e.context)==null?void 0:a.type);let f=e.event;return e.event==="edited"&&(o=e.context)!=null&&o.action_name&&(f=(c=e.context)==null?void 0:c.action_name),(h=e.context)!=null&&h.count&&((y=e.context)==null?void 0:y.count)>1?`${(m=e.context)==null?void 0:m.count} ${l}s ${f}`:`${l.slice(0,1).toUpperCase()}${l.slice(1)} ${f}`},L4=e=>{var s,a,o,c;if(e.resource_type==="setting"&&(s=e.context)!=null&&s.group&&(a=e.context)!=null&&a.key)return{group:(o=e.context)==null?void 0:o.group,key:(c=e.context)==null?void 0:c.key}},Rg=e=>{var s,a;return typeof((s=e.context)==null?void 0:s.count)=="number"&&((a=e.context)==null?void 0:a.count)>1},P4=({action:e})=>{let s="pen";switch(e.event){case"added":s="add";break;case"deleted":s="trash";break}return r.jsx(rt,{name:s,size:"xs"})},F4=({action:e})=>r.jsxs("div",{className:"relative shrink-0",children:[r.jsx(a0,{bgColor:i0(e.actor?.name||e.actor?.slug||""),image:e.actor?.image??void 0,label:o0(e.actor?.name||e.actor?.slug),labelColor:"white",size:"md"}),r.jsx("div",{className:"absolute -bottom-1 -right-1 z-30 flex items-center justify-center rounded-full border border-grey-100 bg-white p-1 shadow-sm dark:border-grey-900 dark:bg-black",children:r.jsx(P4,{action:e})})]}),In=({label:e,item:s,excludedItems:a,toggleItem:o})=>r.jsx(st,{checked:!a.includes(s),direction:"rtl",label:e,labelClasses:"text-sm",onChange:c=>o(s,c.target.checked)}),U4=({excludedEvents:e,excludedResources:s,toggleEventType:a,toggleResourceType:o})=>{const{updateRoute:c}=Ve(),h=s0({path:"/users/",filterKey:"name",responseKey:"users"}),y=async(u,d)=>{const g=await h.loadData(u);d(g.map(b=>({label:b.name,value:b.id})))},[m,l]=D.useState(),f=()=>{l(null)};return r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx(rd,{position:"end",trigger:r.jsx(Ue,{color:"outline",label:"Filter"}),children:r.jsxs("div",{className:"flex w-[220px] flex-col gap-8 p-5",children:[r.jsxs(Xi,{children:[r.jsx(In,{excludedItems:e,item:"added",label:"Added",toggleItem:a}),r.jsx(In,{excludedItems:e,item:"edited",label:"Edited",toggleItem:a}),r.jsx(In,{excludedItems:e,item:"deleted",label:"Deleted",toggleItem:a})]}),r.jsxs(Xi,{children:[r.jsx(In,{excludedItems:s,item:"post",label:"Posts",toggleItem:o}),r.jsx(In,{excludedItems:s,item:"page",label:"Pages",toggleItem:o}),r.jsx(In,{excludedItems:s,item:"tag",label:"Tags",toggleItem:o}),r.jsx(In,{excludedItems:s,item:"offer,product",label:"Tiers & offers",toggleItem:o}),r.jsx(In,{excludedItems:s,item:"api_key,integration,setting,user,webhook",label:"Settings & staff",toggleItem:o})]})]})}),r.jsx("div",{className:"w-[200px]",children:r.jsx(Ot,{loadOptions:rl(y,500),placeholder:"Search staff",value:m,async:!0,defaultOptions:!0,isClearable:!0,onSelect:u=>{u?(l(u),c(`history/view/${u.value}`)):(f(),c("history/view"))}})})]})},z4=({action:e})=>{const{updateRoute:s}=Ve(),a=L4(e);if(a){const{group:o,key:c}=a;return r.jsxs(r.Fragment,{children:[o.slice(0,1).toUpperCase(),o.slice(1),o!==c&&r.jsxs("span",{className:"text-xs",children:[" ",r.jsxs("code",{className:"mb-1 bg-white text-grey-800 dark:bg-grey-900 dark:text-white",children:["(",c,")"]})]})]})}else if(e.resource?.title||e.resource?.name||e.context?.primary_name){const o=O4(e);return o?r.jsx("a",{className:"cursor-pointer font-bold",onClick:c=>{c.preventDefault(),s(o)},children:e.resource?.title||e.resource?.name}):r.jsx(r.Fragment,{children:e.resource?.title||e.resource?.name||e.context?.primary_name})}else return r.jsx("span",{className:"text-grey-500",children:"(unknown)"})},H4=e=>{const a=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(e).reduce((o,{type:c,value:h})=>({...o,[c]:h}),{});return`${a.year}-${a.month}-${a.day} ${a.hour}:${a.minute}:${a.second}`},B4=200,W4=ye.create(({params:e})=>{const s=Gt(),{updateRoute:a}=Ve(),[o,c]=D.useState([]),[h,y]=D.useState(["label"]),{data:m,fetchNextPage:l,isFetchingNextPage:f}=R4({searchParams:{include:"actor,resource",limit:B4.toString(),filter:[o.length&&`event:-[${o.join(",")}]`,h.length&&`resource_type:-[${h.join(",")}]`,e?.user&&`actor_id:'${e.user}'`].filter(Boolean).join("+")},getNextPageParams:(b,_)=>({..._,filter:[_.filter,b.actions.length&&`created_at:<'${H4(new Date(b.actions[b.actions.length-1].created_at))}'`].join("+")}),keepPreviousData:!0}),u=D.useCallback(()=>{m?.isEnd||l()},[m?.isEnd,l]),d=(b,_,k)=>{b(M=>k?M.concat(_):M.filter(T=>T!==_))},g=o.length>0||h.length>0||e?.user;return r.jsx(vt,{afterClose:()=>{a("history")},cancelLabel:"",okLabel:"Close",scrolling:!0,size:"md",stickyFooter:!0,stickyHeader:!0,testId:"history-modal",title:"History",topRightContent:r.jsx(U4,{excludedEvents:o,excludedResources:h,toggleEventType:(b,_)=>d(c,b,!_),toggleResourceType:(b,_)=>d(y,b,!_),userId:e?.user}),onOk:()=>{s.remove(),a("history")},children:r.jsx("div",{className:"relative mt-6",children:r.jsx(cn,{hint:m?.isEnd&&m.actions.length>0?"End of history log":void 0,children:m?.actions?m.actions.length>0?r.jsxs(r.Fragment,{children:[r.jsx(M3,{offset:250,onTrigger:u}),m.actions.map(b=>!b.skip&&r.jsx($n,{avatar:r.jsx(F4,{action:b}),detail:[new Date(b.created_at).toLocaleDateString("default",{year:"numeric",month:"short",day:"2-digit"}),new Date(b.created_at).toLocaleTimeString("default",{hour:"2-digit",minute:"2-digit",second:"2-digit"})].join(" | "),title:r.jsxs("div",{className:"text-sm",children:[$4(b),Rg(b)?"":": ",!Rg(b)&&r.jsx(z4,{action:b}),b.count?r.jsxs(r.Fragment,{children:[" ",b.count," times"]}):null,r.jsxs("span",{children:[" — by ",b.actor?.name||b.actor?.slug]})]}),separator:!0})),f&&r.jsx("div",{className:"flex items-center justify-center p-5",children:r.jsx(Yi,{size:"md"})})]}):r.jsx(bh,{icon:"time-back",children:g?"No entries match your current filters.":"No history entries found."}):m===void 0?r.jsx("div",{className:"flex items-center justify-center px-5 pb-10 pt-12",children:r.jsx(Yi,{})}):r.jsx(bh,{children:"No entries found."})})})})}),q4=ye.create(()=>{const e=ye.useModal(),s=Of(),a=Of({searchParams:{limit:"100",permissions:"assign"}}),o=Gs(),{updateRoute:c}=Ve(),{config:h}=Qe(),y=h.labs.superEditors,m=D.useRef(null),[l,f]=D.useState(""),[u,d]=D.useState(""),[g,b]=D.useState("contributor"),[_,k]=D.useState({}),{data:{users:M}={}}=A_(),{data:{invites:T}={}}=y2(),{mutateAsync:A}=_2(),I=it();if(D.useEffect(()=>{m.current&&m.current.focus()},[]),D.useEffect(()=>{u==="saved"&&setTimeout(()=>{d("")},2e3)},[u]),D.useEffect(()=>{g!=="contributor"&&o?.isLimited("staff")?o.errorIfWouldGoOverLimit("staff").then(()=>{k(Y=>({...Y,role:void 0}))}).catch(Y=>{if(Y instanceof Xs){k(L=>({...L,role:Y.message}));return}else throw Y}):k(Y=>({...Y,role:void 0}))},[o,g]),!s.data?.roles||!a.data?.roles)return null;const O=s.data.roles,$=a.data.roles;let q="Send invitation";u==="saving"?q="Sending...":u==="saved"?q="Invite sent!":u==="error"&&(q="Retry");const R=async()=>{if(u!=="saving"){if(!St.isEmail(l)){k({email:"Please enter a valid email address."});return}if(M?.some(({email:Y})=>Y===l)){k({email:"A user with that email address already exists."});return}if(T?.some(({email:Y})=>Y===l)){k({email:"A user with that email address was already invited."});return}if(!_.role){d("saving");try{await A({email:l,roleId:O.find(({name:Y})=>Y.toLowerCase()===g.toLowerCase()).id}),d("saved"),mt({title:"Invitation sent",message:`${l}`,type:"success"}),e.remove(),c("staff?tab=invited")}catch(Y){d("error");let L="Failed to send invitation",B=r.jsxs("span",{children:["If the problem persists, ",r.jsxs("a",{href:"https://ghost.org/contact",children:[r.jsx("u",{children:"contact support"}),"."]}),"."]});Y instanceof C_&&Y.data?.errors?.[0]?.type==="EmailError"&&(B=r.jsx("span",{children:"Check your Mailgun configuration."})),mt({title:L,message:B,type:"error"}),I(Y,{withToast:!1});return}}}},K=[{hint:"Can create and edit their own posts, but cannot publish. An Editor needs to approve and publish for them.",label:"Contributor",value:"contributor"},{hint:"A trusted user who can create, edit and publish their own posts, but can’t modify others.",label:"Author",value:"author"},{hint:"Can invite and manage other Authors and Contributors, as well as edit and publish any posts on the site.",label:"Editor",value:"editor"},{hint:"Trusted staff user who should be able to manage all content and users, as well as site settings and options.",label:"Administrator",value:"administrator"}];y&&(K[2]={hint:"Can invite and manage other Authors and Contributors, as well as edit and publish any posts on the site. Can manage members and moderate comments.",label:"Editor (beta mode)",value:"super editor"});const X=K.filter(Y=>$.some(L=>L.name===Y.label||L.name==="Super Editor"&&Y.label==="Editor (beta mode)"));return _.email&&(q="Retry"),r.jsx(vt,{afterClose:()=>{c("staff")},cancelLabel:"",okColor:u==="error"||_.email?"red":"black",okLabel:q,testId:"invite-user-modal",title:"Invite a new staff user",width:540,onOk:R,children:r.jsxs("div",{className:"flex flex-col gap-6 py-4",children:[r.jsx("p",{children:"Send an invitation for a new person to create a staff account on your site, and select a role that matches what you’d like them to be able to do."}),r.jsx(Ne,{error:!!_.email,hint:_.email,inputRef:m,placeholder:"jamie@example.com",title:"Email address",value:l,onChange:Y=>{f(Y.target.value)},onKeyDown:()=>k(Y=>({...Y,email:void 0}))}),r.jsx("div",{children:r.jsx(k3,{error:!!_.role,hint:_.role,id:"role",options:X,selectedOption:g,separator:!0,title:"Role",onSelect:Y=>{b(Y)}})})]})})}),Og=({items:e,setItems:s})=>{const a=g=>!!(g.label&&!g.label.match(/^\s*$/)||g.url!=="/"),o=V0({items:e.map(g=>({...g,errors:{}})),setItems:g=>s(g.map(({url:b,label:_})=>({url:b,label:_}))),blank:{url:"/",label:"",errors:{}},canAddNewItem:a}),c=new RegExp(/^(\/|#|[a-zA-Z0-9-]+:)/),h=g=>{const b={};return(!g.label||g.label.match(/^\s*$/))&&(b.label="You must specify a label"),(!g.url||g.url.match(/\s/)||!St.isURL(g.url,{require_protocol:!0})&&!g.url.match(c))&&(b.url="You must specify a valid URL or relative path"),b},y=(g,b)=>{const _=o.items.find(k=>k.id===g);o.updateItem(g,{..._.item,...b})},m=()=>{const g=h(o.newItem);Object.values(g).some(b=>b)?o.setNewItem({...o.newItem,errors:g}):o.addItem()},l=g=>{o.removeItem(g)},f=(g,b)=>{o.moveItem(g,b)},u="new",d=(g,b)=>{if(g===u)o.setNewItem({...o.newItem,errors:{...o.newItem.errors,[b]:void 0}});else{const _=o.items.find(k=>k.id===g).item;o.updateItem(g,{..._,errors:{..._.errors,[b]:void 0}})}};return{items:o.items.map(({item:g,id:b})=>({...g,id:b})),updateItem:y,addItem:m,removeItem:l,moveItem:f,newItem:{...o.newItem,id:u},setNewItem:g=>o.setNewItem({...o.newItem,...g}),clearError:d,validate:()=>{let g=!0;if(o.items.forEach(({item:b,id:_})=>{let k=h(b);Object.values(k).some(M=>M)&&(g=!1,o.updateItem(_,{...b,errors:k}))}),a(o.newItem)){const b=h(o.newItem);Object.values(b).some(_=>_)&&(g=!1,o.setNewItem({...o.newItem,errors:b}))}return g}}},$g=({baseUrl:e,item:s,updateItem:a,addItem:o,clearError:c,labelPlaceholder:h,unstyled:y,textFieldClasses:m,action:l,className:f,...u})=>r.jsxs("div",{className:we("flex w-full items-start gap-3",f),"data-testid":"navigation-item-editor",...u,children:[r.jsx("div",{className:"flex flex-1 pt-1",children:r.jsx(Ne,{className:m,containerClassName:"grow",error:!!s.errors.label,hint:s.errors.label,placeholder:h,title:"Label",unstyled:y,value:s.label,hideTitle:!0,onChange:d=>a?.({label:d.target.value}),onKeyDown:d=>{a?.({label:d.target.value}),d.key==="Enter"&&(d.preventDefault(),o?.()),s.errors.label&&c?.("label")}})}),r.jsx("div",{className:"flex flex-1 pt-1",children:r.jsx(Zg,{baseUrl:e,className:m,containerClassName:"grow",error:!!s.errors.url,hint:s.errors.url,title:"URL",unstyled:y,value:s.url,hideTitle:!0,onChange:d=>a?.({url:d||""}),onKeyDown:d=>{const g=qi(d.target.value,e,!0);a?.({url:g.save||""})},onKeyUp:d=>{if(d.key==="Enter"){d.preventDefault();const g=qi(d.target.value,e,!0);a?.({url:g.save||""}),o?.()}s.errors.url&&c?.("url")}})}),l]}),Lg=({baseUrl:e,navigation:s})=>r.jsxs("div",{className:"w-full pt-2",children:[r.jsx(Qg,{items:s.items,itemSeparator:!1,renderItem:a=>r.jsx($g,{action:r.jsx(Ue,{className:"mt-1 self-center",icon:"trash",iconColorClass:"dark:text-white",size:"sm",onClick:()=>s.removeItem(a.id)}),baseUrl:e,clearError:o=>s.clearError(a.id,o),item:a,updateItem:o=>s.updateItem(a.id,o)}),onMove:s.moveItem}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(rt,{colorClass:"text-grey-300 dark:text-grey-900 mt-1",name:"add",size:"sm"}),r.jsx($g,{action:r.jsx(Ue,{className:"mx-2 mt-1 self-center rounded bg-green p-1","data-testid":"add-button",icon:"add",iconColorClass:"text-white",size:"sm",unstyled:!0,onClick:s.addItem}),addItem:s.addItem,baseUrl:e,className:"mt-1",clearError:a=>s.clearError(s.newItem.id,a),"data-testid":"new-navigation-item",item:s.newItem,labelPlaceholder:"New item label",updateItem:s.setNewItem})]})]}),Y4=ye.create(()=>{const e=Gt(),{updateRoute:s}=Ve(),{localSettings:a,updateSetting:o,saveState:c,handleSave:h,siteData:y}=ss(),[m,l]=xt(a,["navigation","secondary_navigation"]).map(b=>JSON.parse(b||"[]")),f=Og({items:m,setItems:b=>{o("navigation",JSON.stringify(b))}}),u=Og({items:l,setItems:b=>o("secondary_navigation",JSON.stringify(b))}),[d,g]=D.useState("primary-nav");return r.jsx(vt,{afterClose:()=>{s("navigation")},buttonsDisabled:c==="saving",cancelLabel:"Close",dirty:a.some(b=>b.dirty),okLabel:c==="saving"?"Saving...":"Save",scrolling:!0,size:"lg",stickyFooter:!0,testId:"navigation-modal",title:"Navigation",onOk:async()=>{f.validate()&&u.validate()&&(await h(),e.remove(),s("navigation"))},children:r.jsx("div",{className:"mb-1 mt-6",children:r.jsx(fn,{selectedTab:d,tabs:[{id:"primary-nav",title:"Primary",contents:r.jsx(Lg,{baseUrl:y.url,navigation:f})},{id:"secondary-nav",title:"Secondary",contents:r.jsx(Lg,{baseUrl:y.url,navigation:u})}],onTabChange:g})})})}),G4=""+new URL("user-cover-yM4cP_Mo.jpg",import.meta.url).href,X4=""+new URL("latest-posts-1-D7-ilqhR.jpg",import.meta.url).href,K4=""+new URL("latest-posts-2-BPfbGB8B.jpg",import.meta.url).href,V4=""+new URL("latest-posts-3-D72O3dn8.jpg",import.meta.url).href,Z4=({senderName:e,senderEmail:s,senderReplyTo:a,headerImage:o,headerIcon:c,headerTitle:h,headerSubtitle:y,showPostTitleSection:m,showExcerpt:l,titleAlignment:f,titleFontCategory:u,titleFontWeight:d,bodyFontCategory:g,authorPlaceholder:b,showCommentCta:_,showFeatureImage:k,showFeedback:M,showLatestPosts:T,showSubscriptionDetails:A,siteTitle:I,footerContent:O,showBadge:$,backgroundColor:q,headerBackgroundColor:R,accentColor:K,textColor:X,secondaryTextColor:Y,headerTextColor:L,secondaryHeaderTextColor:B,postTitleColor:J,sectionTitleColor:te,dividerColor:ne,buttonColor:Q,buttonTextColor:se,linkColor:be,buttonCorners:je,buttonStyle:W,imageCorners:he,linkStyle:ge,dividerStyle:U})=>{const P=c||h,{config:ee}=Qe(),xe=new Date().toLocaleDateString("default",{year:"numeric",month:"short",day:"numeric"}),Te=new Date().getFullYear(),De=O?O.replace(/<a/g,'<a target="_blank" rel="noopener noreferrer"'):"";let Me;tl(ee)?Me=r.jsxs(r.Fragment,{children:[r.jsxs("p",{className:"leading-normal",children:[r.jsx("span",{className:"font-semibold text-grey-900",children:"From: "}),r.jsxs("span",{children:[e," (",s,")"]})]}),r.jsxs("p",{className:"leading-normal",children:[r.jsx("span",{className:"font-semibold text-grey-900",children:"Reply-to: "}),a||s]})]}):Me=r.jsxs(r.Fragment,{children:[r.jsxs("p",{className:"leading-normal",children:[r.jsx("span",{className:"font-semibold text-grey-900",children:e}),r.jsxs("span",{children:[" ",s]})]}),r.jsxs("p",{className:"leading-normal",children:[r.jsx("span",{className:"font-semibold text-grey-900",children:"To:"})," Jamie Larson jamie@example.com"]})]});let oe="mb-5 text-pretty leading-[1.7] text-black";return u==="serif"&&g==="serif"?oe=we(oe,"mb-8 font-serif text-[2.0rem] leading-tight"):u!=="serif"&&g==="serif"?oe=we(oe,"mb-8 text-[1.7rem] leading-tight tracking-tight"):u==="serif"&&g!=="serif"?oe=we(oe,"mb-8 font-serif text-[2.0rem] leading-tight"):oe=we(oe,"mb-8 text-[1.9rem] leading-tight tracking-tight"),f==="center"&&(oe=we(oe,"text-center")),r.jsx("div",{className:"relative flex grow flex-col",children:r.jsx("div",{className:"absolute inset-0 m-5 flex items-center justify-center",children:r.jsxs("div",{className:"mx-auto my-0 flex max-h-full w-full max-w-[700px] flex-col overflow-hidden rounded-[4px] text-black shadow-sm",children:[r.jsx("div",{className:"flex-column flex min-h-[77px] justify-center rounded-t-sm border-b border-grey-200 bg-white px-6 text-sm text-grey-700",children:Me}),r.jsxs("div",{className:"overflow-y-auto text-sm",style:{backgroundColor:q},children:[r.jsxs("div",{className:"px-[7rem]",style:{backgroundColor:R},children:[o&&r.jsx("div",{children:r.jsx("img",{alt:"",className:"mb-4 block pt-6",src:o})}),P&&r.jsxs("div",{className:"py-3",children:[c&&r.jsx("img",{alt:"",className:"mx-auto mb-2 size-10",role:"presentation",src:c}),h&&r.jsx("h4",{className:"mb-1 text-center text-[1.6rem] font-bold uppercase leading-tight tracking-tight text-grey-900",style:{color:L},children:h}),y&&r.jsx("h5",{className:"mb-1 text-center text-[1.3rem] font-normal text-grey-700",style:{color:B},children:y})]}),m&&r.jsxs("div",{className:we("flex flex-col py-8",f==="center"?"items-center":"items-start"),children:[r.jsx("h2",{className:we("text-4xl font-bold leading-supertight text-black",u==="serif"&&"font-serif",d==="normal"&&"font-normal",d==="medium"&&"font-medium",d==="semibold"&&"font-semibold",d==="bold"&&"font-bold",f==="center"?"text-center":"text-left",l?"mb-2":"mb-8"),style:{color:J},children:"Your email newsletter"}),l&&r.jsx("p",{className:oe,style:{color:L},children:"A subtitle to highlight key points and engage your readers."}),r.jsxs("div",{className:we("flex w-full justify-between text-center text-md leading-none text-grey-700",f==="center"?"flex-col gap-1":"flex-row"),children:[r.jsxs("p",{className:"pb-1 text-[1.3rem]",style:{color:B},children:["By ",b,r.jsx("span",{className:"before:pl-0.5 before:pr-1 before:content-['•']",children:xe})]}),r.jsx("p",{className:"pb-1 text-[1.3rem] underline",style:{color:B},children:r.jsx("span",{children:"View in browser"})})]})]}),k&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:we("h-[unset] w-full max-w-[600px] bg-cover bg-no-repeat",m?"":"pt-6"),children:r.jsx("img",{alt:"Feature",className:we("min-h-full min-w-full shrink-0",he==="square"&&"rounded-none",he==="rounded"&&"rounded-md"),src:G4})}),r.jsx("div",{className:"mt-1 w-full max-w-[600px] pb-8 text-center text-[1.3rem] text-grey-700",style:{color:B},children:"Feature image caption"})]})]}),r.jsxs("div",{className:we("px-[7rem]",R!=="transparent"&&"pt-10"),children:[r.jsxs("div",{className:we("max-w-[600px] border-b border-grey-200 pb-[52px] leading-[27.2px] text-black",U==="dashed"&&"border-dashed",U==="dotted"&&"border-b-2 border-dotted",g==="serif"?"font-serif text-[1.8rem]":"text-[1.7rem] tracking-tight",k||m?"":"pt-8"),style:{borderColor:ne},children:[r.jsx("p",{className:"mb-6",style:{color:X},children:"This is what your content will look like when you send one of your posts as an email newsletter to your subscribers."}),r.jsx("p",{className:"mb-6",style:{color:X},children:"Over there on the right you'll see some settings that allow you to customize the look and feel of this template – from colors and typography to layout and buttons – to make it perfectly suited to your brand."}),r.jsx("p",{className:"mb-[52px]",style:{color:X},children:"Email templates are exceptionally finnicky to make, but we've spent a long time optimising this one to make it work beautifully across devices, email clients and content types. So, you can trust that every email you send with Ghost will look great and work well. Just like the rest of your site."}),r.jsx("hr",{className:we("my-[52px] border-[#e0e7eb]",U==="dashed"&&"border-dashed",U==="dotted"&&"border-b-2 border-t-0 border-dotted"),style:{borderColor:ne}}),r.jsx("h3",{className:we("mb-[13px] text-[2.6rem] leading-supertight",u==="serif"&&"font-serif",u==="sans_serif"&&"font-sans",d==="normal"&&"font-normal",d==="medium"&&"font-medium",d==="semibold"&&"font-semibold",d==="bold"&&"font-bold"),style:{color:te},children:"Need inspiration?"}),r.jsxs("p",{className:"mb-[27px]",style:{color:X},children:["We've put together a ",r.jsx("a",{className:we(ge==="underline"&&"underline",ge==="bold"&&"font-bold"),href:"https://ghost.org/help/email-design/",rel:"noopener noreferrer",style:{color:be||K},target:"_blank",children:"quick guide"})," that walks through all of the available settings, along with a few examples of what's possible."]}),r.jsx("a",{className:we("inline-block border px-[18px] py-2 font-sans text-[15px]",je==="rounded"&&"rounded-[6px]",je==="pill"&&"rounded-full",je==="square"&&"rounded-none",W==="outline"?"bg-transparent":"border-transparent text-white",ge==="bold"?"font-bold":"font-semibold"),href:"https://ghost.org/help/email-design/",rel:"noopener noreferrer",style:W==="outline"?{borderColor:Q||K,color:Q||K}:{backgroundColor:Q||K,color:se},target:"_blank",children:"Learn more"})]}),(M||_)&&r.jsx("div",{className:we("grid gap-5 border-b border-grey-200 px-6 py-5",U==="dashed"&&"border-dashed",U==="dotted"&&"border-b-2 border-dotted"),style:{borderColor:ne},children:r.jsxs("div",{className:"flex justify-center gap-3",children:[M&&r.jsxs(r.Fragment,{children:[r.jsx("button",{className:"pointer-events-none cursor-default whitespace-nowrap rounded-[2.2rem] bg-transparent font-semibold",type:"button",children:r.jsxs("span",{className:"inline-flex items-center gap-2 px-[18px] py-[7px]",style:{color:X},children:[r.jsx(rt,{colorClass:"",name:"thumbs-up",size:"md"}),r.jsx("span",{children:"More like this"})]})}),r.jsx("button",{className:"pointer-events-none cursor-default whitespace-nowrap rounded-[2.2rem] bg-transparent font-semibold",type:"button",children:r.jsxs("span",{className:"inline-flex items-center gap-2 px-[18px] py-[7px]",style:{color:X},children:[r.jsx(rt,{colorClass:"",name:"thumbs-down"}),r.jsx("span",{children:"Less like this"})]})})]}),_&&r.jsx("button",{className:"pointer-events-none cursor-default whitespace-nowrap rounded-[2.2rem] bg-transparent font-semibold",type:"button",children:r.jsxs("span",{className:"inline-flex items-center gap-2 px-[18px] py-[7px]",style:{color:X},children:[r.jsx(rt,{colorClass:"",name:"comment"}),r.jsx("span",{children:"Comment"})]})})]})}),T&&r.jsxs("div",{className:we("border-b border-grey-200 py-6",U==="dashed"&&"border-dashed",U==="dotted"&&"border-b-2 border-dotted"),style:{borderColor:ne},children:[r.jsx("h3",{className:"mb-4 mt-2 pb-1 text-[1.2rem] font-semibold uppercase tracking-wide text-black",style:{color:X},children:"Keep reading"}),r.jsxs("div",{className:"flex justify-between gap-4 py-2",children:[r.jsxs("div",{children:[r.jsx("h4",{className:we("mt-0.5 text-[1.9rem] text-black",u==="serif"&&"font-serif",d==="normal"&&"font-normal",d==="medium"&&"font-medium",d==="semibold"&&"font-semibold",d==="bold"&&"font-bold"),style:{color:te},children:"The three latest posts published on your site"}),r.jsx("p",{className:"m-0 text-base text-grey-700",style:{color:Y},children:"Posts sent as an email only will never be shown here."})]}),r.jsx("div",{className:"aspect-square h-auto w-full max-w-[100px] bg-cover bg-no-repeat",children:r.jsx("img",{alt:"Latest post",className:we(he==="square"&&"rounded-none",he==="rounded"&&"rounded-md"),src:X4})})]}),r.jsxs("div",{className:"flex justify-between gap-4 py-2",children:[r.jsxs("div",{children:[r.jsx("h4",{className:we("mt-0.5 text-[1.9rem] text-black",u==="serif"&&"font-serif",d==="normal"&&"font-normal",d==="medium"&&"font-medium",d==="semibold"&&"font-semibold",d==="bold"&&"font-bold"),style:{color:te},children:"Displayed at the bottom of each newsletter"}),r.jsx("p",{className:"m-0 text-base text-grey-700",style:{color:Y},children:"Giving your readers one more place to discover your stories."})]}),r.jsx("div",{className:"aspect-square h-auto w-full max-w-[100px] bg-cover bg-no-repeat",children:r.jsx("img",{alt:"Latest post",className:we(he==="square"&&"rounded-none",he==="rounded"&&"rounded-md"),src:K4})})]}),r.jsxs("div",{className:"flex justify-between gap-4 py-2",children:[r.jsxs("div",{children:[r.jsx("h4",{className:we("mt-0.5 text-[1.9rem] text-black",u==="serif"&&"font-serif",d==="normal"&&"font-normal",d==="medium"&&"font-medium",d==="semibold"&&"font-semibold",d==="bold"&&"font-bold"),style:{color:te},children:"To keep your work front and center"}),r.jsx("p",{className:"m-0 text-base text-grey-700",style:{color:Y},children:"Making sure that your audience stays engaged."})]}),r.jsx("div",{className:"aspect-square h-auto w-full max-w-[100px] bg-cover bg-no-repeat",children:r.jsx("img",{alt:"Latest post",className:we(he==="square"&&"rounded-none",he==="rounded"&&"rounded-md"),src:V4})})]})]}),A&&r.jsxs("div",{className:we("border-b border-grey-200 py-8",U==="dashed"&&"border-dashed",U==="dotted"&&"border-b-2 border-dotted"),style:{borderColor:ne},children:[r.jsx("h4",{className:"mb-3 text-[1.2rem] uppercase tracking-wide text-black",style:{color:X},children:"Subscription details"}),r.jsxs("p",{className:"m-0 mb-4 text-base",style:{color:X},children:["You are receiving this because you are a paid subscriber to ",I,". Your subscription will renew on 17 Jul 2024."]}),r.jsxs("div",{className:"flex",children:[r.jsxs("div",{className:"shrink-0 text-base",children:[r.jsx("p",{style:{color:X},children:"Name: Jamie Larson"}),r.jsx("p",{style:{color:X},children:"Email: jamie@example.com"}),r.jsx("p",{style:{color:X},children:"Member since: 17 July 2023"})]}),r.jsx("span",{className:we("w-full self-end whitespace-nowrap text-right text-base",ge==="underline"&&"underline",ge==="bold"&&"font-bold"),style:{color:be||K},children:"Manage subscription"})]})]}),r.jsxs("div",{className:"flex flex-col items-center pt-10",children:[r.jsx("div",{dangerouslySetInnerHTML:{__html:De||""},className:"text break-words px-8 py-3 text-center text-[1.3rem] leading-base text-grey-700 [&_a]:underline",style:{color:Y}}),r.jsxs("div",{className:"px-8 pb-14 pt-3 text-center text-[1.3rem] text-grey-700",children:[r.jsxs("span",{style:{color:Y},children:[I," © ",Te," — "]}),r.jsx("span",{className:"pointer-events-none cursor-auto underline",style:{color:Y},children:"Unsubscribe"})]}),$&&r.jsx("div",{className:"flex flex-col items-center pb-[40px] pt-[10px]",children:r.jsxs("a",{className:"pointer-events-none inline-flex cursor-auto items-center px-2 py-1 text-[1.25rem] font-semibold tracking-tight text-grey-900",href:"https://ghost.org",style:{color:X},children:[r.jsx(k2,{className:"mr-[6px] size-4"}),r.jsx("span",{children:"Powered by Ghost"})]})})]})]})]})]})})})},pl=(e,s,a)=>tl(s)&&!td(s)&&a?a:e.sender_email||a||"",Zf=(e,s,a,o)=>e.sender_reply_to==="newsletter"?tl(s)?"":pl(e,s,o):e.sender_reply_to==="support"?a||o||"":e.sender_reply_to,Q4=({newsletter:e})=>{const{currentUser:s,settings:a,siteData:o,config:c}=Qe(),[h,y,m,l,f]=xt(a,["title","icon","comments_enabled","support_email_address","default_email_address"]);let u=null;e.show_header_title?u=h||null:e.show_header_name&&(u=e.name);const d=e.show_header_title&&e.show_header_name?e.name:void 0,g=e.show_comment_cta&&m!=="off",b=e.feedback_enabled&&c.labs.audienceFeedback,_=()=>{const L=e.background_color;return/#([0-9a-f]{3}){1,2}$/i.test(L)?L:"#ffffff"},k=()=>{const L=e.header_background_color;return!L||L==="transparent"?"transparent":/#([0-9a-f]{3}){1,2}$/i.test(L)?L:"transparent"},M=()=>{const L=e.button_color;if(/#([0-9a-f]{3}){1,2}$/i.test(L||""))return L;if(L===null){const J=_();return Sr(J).hex()}return o.accent_color},T=()=>{const L=e.button_style,B=M();if(B&&L==="fill")return Sr(B).hex()},A=()=>{const L=e.link_color===void 0?"accent":e.link_color,B=/#([0-9a-f]{3}){1,2}$/i;return L==="accent"?o.accent_color:B.test(L||"")?L:Sr(_()).hex()},I=()=>{const L=e.post_title_color;if(/#([0-9a-f]{3}){1,2}$/i.test(L||""))return L;if(L==="accent")return o.accent_color;const J=k(),te=J==="transparent"?_():J;return Sr(te).hex()},O=()=>{const L=e.section_title_color;return/#([0-9a-f]{3}){1,2}$/i.test(L||"")?L:L==="accent"?o.accent_color:Sr(_()).hex()},$=()=>{const L=e.divider_color;return/#([0-9a-f]{3}){1,2}$/i.test(L||"")?L:L==="accent"?o.accent_color:"#e0e7eb"},q=Sr(_()).hex(),R=Sr(_()).alpha(.5).toString(),K=k()==="transparent"?q:Sr(k()).hex(),X=k()==="transparent"?R:Sr(k()).alpha(.5).toString(),Y={backgroundColor:_(),headerBackgroundColor:k(),postTitleColor:I()||void 0,sectionTitleColor:O()||void 0,buttonColor:M()||void 0,buttonTextColor:T()||void 0,linkColor:A()||void 0,dividerColor:$()||void 0,textColor:q,secondaryTextColor:R,headerTextColor:K,secondaryHeaderTextColor:X};return r.jsx(Z4,{accentColor:o.accent_color,authorPlaceholder:s.name||s.email,backgroundColor:Y.backgroundColor||"#ffffff",bodyFontCategory:e.body_font_category,buttonCorners:e.button_corners||"rounded",buttonStyle:e.button_style||"fill",dividerStyle:e.divider_style||"solid",footerContent:e.footer_content,headerBackgroundColor:Y.headerBackgroundColor||"transparent",headerIcon:e.show_header_icon?y:void 0,headerImage:e.header_image,headerSubtitle:d,headerTitle:u,imageCorners:e.image_corners||"square",linkStyle:e.link_style||"underline",senderEmail:pl(e,c,f),senderName:e.sender_name||h,senderReplyTo:Zf(e,c,l,f),showBadge:e.show_badge,showCommentCta:g,showExcerpt:e.show_excerpt,showFeatureImage:e.show_feature_image,showFeedback:b,showLatestPosts:e.show_latest_posts,showPostTitleSection:e.show_post_title_section,showSubscriptionDetails:e.show_subscription_details,siteTitle:h,titleAlignment:e.title_alignment,titleFontCategory:e.title_font_category,titleFontWeight:e.title_font_weight||"bold",...Y})},J4=({newsletter:e,updateNewsletter:s,errors:a,clearError:o})=>{const{settings:c,config:h}=Qe(),[y,m]=xt(c,["default_email_address","support_email_address"]),[l,f]=D.useState(Zf(e,h,m,y)||"");let u=pl(e,h,y);const d=D.useCallback(b=>{f(b.target.value),s({sender_reply_to:b.target.value||"newsletter"})},[s,f]),g=()=>{const b=Zf(e,h,m,y)||"";f(b)};return r.jsx(Ne,{error:!!a.sender_reply_to,hint:a.sender_reply_to,maxLength:191,placeholder:u||"",title:"Reply-to email",value:l,onBlur:g,onChange:d,onKeyDown:()=>o("sender_reply_to")})},eE=({newsletter:e,onlyOne:s,updateNewsletter:a,validate:o,errors:c,clearError:h})=>{const{updateRoute:y}=Ve(),{mutateAsync:m}=g0(),l=Gs(),{settings:f,config:u,siteData:d}=Qe(),[g,b]=xt(f,["icon","default_email_address"]),{mutateAsync:_}=Ks(),[k,M]=D.useState("generalSettings"),{localSettings:T}=ss(),[A]=xt(T,["title"]),I=it(),{data:{newsletters:O}={}}=m0(),$=["all","paid"].includes(dr(f,"comments_enabled")||"");let q=pl(e,u,b);const[R,K]=D.useState(O||[]),X=R.filter(W=>W.status==="active");D.useEffect(()=>{K(O||[])},[O]);const Y=[{value:"serif",label:"Elegant serif",className:"font-serif"},{value:"sans_serif",label:"Clean sans-serif"}],L={sans_serif:{options:[{value:"normal",label:"Regular",className:"font-normal"},{value:"medium",label:"Medium",className:"font-medium"},{value:"semibold",label:"Semi-bold",className:"font-semibold"},{value:"bold",label:"Bold",className:"font-bold"}]},serif:{options:[{value:"normal",label:"Regular",className:"font-normal"},{value:"bold",label:"Bold",className:"font-bold"}],map:{medium:"normal",semibold:"bold"}}},B=()=>e.background_color==="light"?!1:Sr(e.background_color).hex().toLowerCase()==="#ffffff",J=async()=>{if(e.status==="active")ye.show(Et,{title:"Archive newsletter",prompt:r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"mb-6",children:["Your newsletter ",r.jsx("strong",{children:e.name})," will no longer be visible to members or available as an option when publishing new posts."]}),r.jsx("div",{children:"Existing posts previously sent as this newsletter will remain unchanged."})]}),okLabel:"Archive",okColor:"red",onOk:async W=>{try{await m({...e,status:"archived"}),W?.remove(),mt({type:"success",message:"Newsletter archived"})}catch(he){I(he)}}});else{try{await l?.errorIfWouldGoOverLimit("newsletters")}catch(W){if(W instanceof Xs){ye.show(Vr,{prompt:W.message||"Your current plan doesn't support more newsletters.",onOk:()=>y({route:"/pro",isExternal:!0})});return}else throw W}ye.show(Et,{title:"Reactivate newsletter",prompt:r.jsxs(r.Fragment,{children:["Reactivating ",r.jsx("strong",{children:e.name})," will immediately make it visible to members and re-enable it as an option when publishing new posts."]}),okLabel:"Reactivate",onOk:async W=>{await m({...e,status:"active"}),W?.remove(),mt({type:"success",message:"Newsletter reactivated"})}})}},te=()=>{if(!tl(u))return r.jsx(Ne,{error:!!c.sender_email,hint:c.sender_email,placeholder:q||"",title:"Sender email address",value:e.sender_email||"",onChange:W=>a({sender_email:W.target.value}),onKeyDown:()=>h("sender_email")});if(td(u))return r.jsx(Ne,{error:!!c.sender_email,hint:c.sender_email,maxLength:191,placeholder:b,title:"Sender email address",value:e.sender_email||"",onChange:W=>{a({sender_email:W.target.value})},onKeyDown:()=>h("sender_email")})},ne=L[e.title_font_category||"sans_serif"].options,Q=()=>{const W=e.title_font_category||"sans_serif",he=e.title_font_weight,ge=L[W].map,U=ge&&ge[he]||he;return ne.find(ee=>ee.value===U)||ne[0]},se=W=>{const he=W?.value||"sans_serif",ge=e.title_font_weight;let U=ge;return L[he].options.find(P=>P.value===ge)||(U=L[he].map?.[ge]||"bold"),a({title_font_category:he,title_font_weight:U})},be=[{id:"generalSettings",title:"General",contents:r.jsxs(r.Fragment,{children:[r.jsxs(et,{className:"mt-6",gap:"sm",margins:"lg",title:"Name and description",children:[r.jsx(Ne,{error:!!c.name,hint:c.name,maxLength:191,placeholder:"Weekly Roundup",title:"Name",value:e.name||"",onChange:W=>a({name:W.target.value}),onKeyDown:()=>h("name")}),r.jsx(dn,{maxLength:2e3,rows:2,title:"Description",value:e.description||"",onChange:W=>a({description:W.target.value})})]}),r.jsxs(et,{className:"mt-6",gap:"sm",margins:"lg",title:"Email info",children:[r.jsx(Ne,{maxLength:191,placeholder:A,title:"Sender name",value:e.sender_name||"",onChange:W=>a({sender_name:W.target.value})}),te(),r.jsx(J4,{clearError:h,errors:c,newsletter:e,updateNewsletter:a,validate:o})]}),r.jsx(et,{className:"mt-6",gap:"sm",margins:"lg",title:"Member settings",children:r.jsx(st,{checked:e.subscribe_on_signup,direction:"rtl",label:"Subscribe new members on signup",labelStyle:"value",onChange:W=>a({subscribe_on_signup:W.target.checked})})}),r.jsx("div",{className:"mb-5 mt-10",children:e.status==="active"?!s&&r.jsx(Ue,{color:"red",disabled:X.length===1,label:"Archive newsletter",link:!0,onClick:J}):r.jsx(Ue,{color:"green",label:"Reactivate newsletter",link:!0,onClick:J})})]})},{id:"content",title:"Content",contents:r.jsxs(r.Fragment,{children:[r.jsxs(et,{className:"mt-6",gap:"sm",margins:"lg",title:"Header",children:[r.jsxs("div",{children:[r.jsx("div",{children:r.jsx(bt,{className:"mb-2",level:6,children:"Header image"})}),r.jsxs("div",{className:"flex-column flex gap-1",children:[r.jsx(un,{deleteButtonClassName:"!top-1 !right-1",height:e.header_image?"66px":"64px",id:"logo",imageURL:e.header_image||void 0,onDelete:()=>{a({header_image:null})},onUpload:async W=>{try{const he=ln(await _({file:W}));a({header_image:he})}catch(he){I(he)}},children:r.jsx(rt,{colorClass:"text-grey-700 dark:text-grey-300",name:"picture"})}),r.jsx(Kr,{children:"1200×600 recommended. Use a transparent PNG for best results on any background."})]})]}),r.jsxs(Xi,{children:[g&&r.jsx(st,{checked:e.show_header_icon,direction:"rtl",label:"Publication icon",onChange:W=>a({show_header_icon:W.target.checked})}),r.jsx(st,{checked:e.show_header_title,direction:"rtl",label:"Publication title",onChange:W=>a({show_header_title:W.target.checked})}),r.jsx(st,{checked:e.show_header_name,direction:"rtl",label:"Newsletter name",onChange:W=>a({show_header_name:W.target.checked})})]})]}),r.jsxs(et,{className:"mt-6",gap:"xs",margins:"lg",title:"Title section",children:[r.jsx(st,{checked:e.show_post_title_section,direction:"rtl",label:"Post title",onChange:W=>a({show_post_title_section:W.target.checked})}),e.show_post_title_section&&r.jsx(st,{checked:e.show_excerpt,direction:"rtl",label:"Post excerpt",onChange:W=>a({show_excerpt:W.target.checked})}),r.jsx(st,{checked:e.show_feature_image,direction:"rtl",label:"Feature image",onChange:W=>a({show_feature_image:W.target.checked})})]}),r.jsxs(et,{className:"mt-6",gap:"sm",margins:"lg",title:"Footer",children:[r.jsxs(Xi,{gap:"lg",children:[r.jsx(st,{checked:e.feedback_enabled,direction:"rtl",label:"Ask your readers for feedback",onChange:W=>a({feedback_enabled:W.target.checked})}),$&&r.jsx(st,{checked:e.show_comment_cta,direction:"rtl",label:"Add a link to your comments",onChange:W=>a({show_comment_cta:W.target.checked})}),r.jsx(st,{checked:e.show_latest_posts,direction:"rtl",label:"Share your latest posts",onChange:W=>a({show_latest_posts:W.target.checked})}),r.jsx(st,{checked:e.show_subscription_details,direction:"rtl",label:"Show subscription details",onChange:W=>a({show_subscription_details:W.target.checked})})]}),r.jsx(dd,{hint:"Any extra information or legal text",nodes:"MINIMAL_NODES",placeholder:" ",title:"Email footer",value:e.footer_content||"",onChange:W=>a({footer_content:W})})]}),r.jsx(Ja,{}),r.jsxs("div",{className:"my-5 flex w-full items-start",children:[r.jsx("span",{children:r.jsx(rt,{className:"mr-2 mt-[-1px]",colorClass:"text-red",name:"heart"})}),r.jsx(et,{marginBottom:!1,children:r.jsx(st,{checked:e.show_badge,direction:"rtl",label:r.jsxs("div",{className:"flex flex-col gap-0.5",children:[r.jsx("span",{className:"text-sm md:text-base",children:"Promote independent publishing"}),r.jsx("span",{className:"text-[11px] leading-tight text-grey-700 md:text-xs md:leading-tight",children:"Show you're a part of the indie publishing movement with a small badge in the footer"})]}),labelStyle:"value",onChange:W=>a({show_badge:W.target.checked})})})]})]})},{id:"design",title:"Design",contents:r.jsxs(r.Fragment,{children:[r.jsxs(et,{className:"mt-6",gap:"xs",margins:"lg",title:"Global",children:[r.jsx("div",{className:"mb-1",children:r.jsx(Yr,{direction:"rtl",eyedropper:!0,swatches:[{hex:"#ffffff",value:"light",title:"White"}],title:"Background color",value:e.background_color||"light",onChange:W=>a({background_color:W})})}),r.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[r.jsx("div",{className:"shrink-0",children:"Heading font"}),r.jsx(Ot,{containerClassName:"max-w-[200px]",options:Y,selectedOption:Y.find(W=>W.value===e.title_font_category),onSelect:se})]}),r.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[r.jsx("div",{className:"shrink-0",children:"Heading weight"}),r.jsx(Ot,{containerClassName:"max-w-[200px]",options:ne,selectedOption:Q(),onSelect:W=>a({title_font_weight:W?.value})})]}),r.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[r.jsx("div",{className:"shrink-0",children:"Body font"}),r.jsx(Ot,{containerClassName:"max-w-[200px]",options:Y,selectedOption:Y.find(W=>W.value===e.body_font_category),testId:"body-font-select",onSelect:W=>a({body_font_category:W?.value})})]})]}),r.jsxs(et,{className:"mt-6",gap:"xs",margins:"lg",title:"Header",children:[r.jsx("div",{className:"mb-1",children:r.jsx(Yr,{direction:"rtl",eyedropper:!0,swatches:[{value:"transparent",title:"Transparent",hex:"#00000000"}],title:"Header background color",value:e.header_background_color||"transparent",onChange:W=>a({header_background_color:W})})}),r.jsx("div",{className:"mb-1",children:r.jsx(Yr,{direction:"rtl",eyedropper:!0,swatches:[{value:null,title:"Auto",hex:B()?"#ffffff":"#000000"},{value:"accent",title:"Accent",hex:d.accent_color}],title:"Post title color",value:e.post_title_color,onChange:W=>a({post_title_color:W})})}),r.jsxs("div",{className:"flex w-full justify-between",children:[r.jsx("div",{children:"Title alignment"}),r.jsx(Gr,{activeKey:e.title_alignment,buttons:[{key:"left",icon:"align-left",iconSize:14,label:"Align left",tooltip:"Left",hideLabel:!0,link:!1,size:"sm",onClick:()=>a({title_alignment:"left"}),disabled:!e.show_post_title_section},{key:"center",icon:"align-center",iconSize:14,label:"Align center",tooltip:"Center",hideLabel:!0,link:!1,size:"sm",onClick:()=>a({title_alignment:"center"}),disabled:!e.show_post_title_section}],clearBg:!1})]})]}),r.jsxs(et,{className:"mt-6",gap:"xs",margins:"lg",title:"Body",children:[r.jsx("div",{className:"mb-1",children:r.jsx(Yr,{direction:"rtl",eyedropper:!0,swatches:[{value:null,title:"Auto",hex:B()?"#ffffff":"#000000"},{value:"accent",title:"Accent",hex:d.accent_color}],title:"Section title color",value:e.section_title_color,onChange:W=>a({section_title_color:W})})}),r.jsx("div",{className:"mb-1",children:r.jsx(Yr,{direction:"rtl",eyedropper:!0,swatches:[{value:"accent",title:"Accent",hex:d.accent_color},{value:null,title:"Auto",hex:B()?"#ffffff":"#000000"}],title:"Button color",value:e.button_color,onChange:W=>a({button_color:W})})}),r.jsxs("div",{className:"flex w-full justify-between",children:[r.jsx("div",{children:"Button style"}),r.jsx(Gr,{activeKey:e.button_style||"fill",buttons:[{key:"fill",icon:"squircle-fill",iconSize:14,label:"Fill",tooltip:"Fill",hideLabel:!0,link:!1,size:"sm",onClick:()=>a({button_style:"fill"})},{key:"outline",icon:"squircle",iconSize:14,label:"Outline",tooltip:"Outline",hideLabel:!0,link:!1,size:"sm",onClick:()=>a({button_style:"outline"})}],clearBg:!1})]}),r.jsxs("div",{className:"flex w-full justify-between",children:[r.jsx("div",{children:"Button corners"}),r.jsx(Gr,{activeKey:e.button_corners||"rounded",buttons:[{key:"square",icon:"square",iconSize:14,label:"Square",tooltip:"Squared",hideLabel:!0,link:!1,size:"sm",onClick:()=>a({button_corners:"square"})},{key:"rounded",icon:"squircle",iconSize:14,label:"Rounded",tooltip:"Rounded",hideLabel:!0,link:!1,size:"sm",onClick:()=>a({button_corners:"rounded"})},{key:"pill",icon:"circle",iconSize:14,label:"Pill",tooltip:"Pill",hideLabel:!0,link:!1,size:"sm",onClick:()=>a({button_corners:"pill"})}],clearBg:!1})]}),r.jsx("div",{className:"mb-1",children:r.jsx(Yr,{direction:"rtl",eyedropper:!0,swatches:[{value:"accent",title:"Accent",hex:d.accent_color},{value:null,title:"Auto",hex:B()?"#ffffff":"#000000"}],title:"Link color",value:e.link_color,onChange:W=>a({link_color:W})})}),r.jsxs("div",{className:"flex w-full justify-between",children:[r.jsx("div",{children:"Link style"}),r.jsx(Gr,{activeKey:e.link_style||"underline",buttons:[{key:"underline",icon:"text-underline",iconSize:14,label:"Underline",tooltip:"Underline",hideLabel:!0,link:!1,size:"sm",onClick:()=>a({link_style:"underline"})},{key:"regular",icon:"text-regular",iconSize:14,label:"Regular",tooltip:"Regular",hideLabel:!0,link:!1,size:"sm",onClick:()=>a({link_style:"regular"})},{key:"bold",icon:"text-bold",iconSize:14,label:"Bold",tooltip:"Bold",hideLabel:!0,link:!1,size:"sm",onClick:()=>a({link_style:"bold"})}],clearBg:!1})]}),r.jsxs("div",{className:"flex w-full justify-between",children:[r.jsx("div",{children:"Image corners"}),r.jsx(Gr,{activeKey:e.image_corners||"square",buttons:[{key:"square",icon:"square",iconSize:14,label:"Square",tooltip:"Squared",hideLabel:!0,link:!1,size:"sm",onClick:()=>a({image_corners:"square"})},{key:"rounded",icon:"squircle",iconSize:14,label:"Rounded",tooltip:"Rounded",hideLabel:!0,link:!1,size:"sm",onClick:()=>a({image_corners:"rounded"})}],clearBg:!1})]}),r.jsx("div",{className:"mb-1",children:r.jsx(Yr,{direction:"rtl",eyedropper:!0,swatches:[{value:"light",title:"Light",hex:"#e0e7eb"},{value:"accent",title:"Accent",hex:d.accent_color}],title:"Divider color",value:e.divider_color||"light",onChange:W=>a({divider_color:W})})})]})]})}],je=W=>{M(W)};return r.jsx("div",{className:"flex flex-col",children:r.jsx("div",{className:"px-7 pb-7 pt-0",children:r.jsx(fn,{selectedTab:k,stickyHeader:!0,tabs:be,onTabChange:je})})})},tE=({newsletter:e,onlyOne:s})=>{const{config:a}=Qe(),{mutateAsync:o}=g0(),{updateRoute:c}=Ve(),h=it(),{formState:y,saveState:m,updateForm:l,setFormState:f,handleSave:u,validate:d,errors:g,clearError:b,okProps:_}=pr({initialState:e,savingDelay:500,onSave:async()=>{const{meta:{sent_email_verification:[A]=[]}={}}=await o(y);let I;A&&A==="sender_email"?I=r.jsx("div",{children:"We‘ve sent a confirmation email to the new address."}):A&&A==="sender_reply_to"&&(I=r.jsx("div",{children:"We‘ve sent a confirmation email to the new address."})),I&&mt({icon:"email",message:I,type:"info"})},onSaveError:h,onValidate:()=>{const A={};return y.name||(A.name="A name is required for your newsletter"),y.sender_email&&!St.isEmail(y.sender_email)?A.sender_email="Enter a valid email address":y.sender_email&&td(a)&&y.sender_email.split("@")[1]!==uh(a)&&(A.sender_email=`Email address must end with @${uh(a)}`),y.sender_reply_to&&!St.isEmail(y.sender_reply_to)&&!["newsletter","support"].includes(y.sender_reply_to)&&(A.sender_reply_to="Enter a valid email address"),A}}),k=A=>{l(I=>({...I,...A}))};D.useEffect(()=>{f(()=>e)},[f,e]);const M=r.jsx(Q4,{newsletter:y}),T=r.jsx(eE,{clearError:b,errors:g,newsletter:y,onlyOne:s,updateNewsletter:k,validate:d});return r.jsx(as,{afterClose:()=>c("newsletters"),buttonsDisabled:_.disabled,cancelLabel:"Close",deviceSelector:!1,dirty:m==="unsaved",okColor:_.color,okLabel:_.label||"Save",preview:M,previewBgColor:"grey",previewToolbar:!1,sidebar:T,sidebarPadding:!1,testId:"newsletter-modal",title:"Newsletter",onOk:async()=>{await u({fakeWhenUnchanged:!0})}})},rE=({params:e})=>{const{data:{newsletters:s,isEnd:a}={},fetchNextPage:o}=m0(),c=s?.find(({id:h})=>h===e?.id);return D.useEffect(()=>{!c&&!a&&o()},[o,a,c]),c?r.jsx(tE,{newsletter:c,onlyOne:s.length===1}):null},nE=ye.create(rE),Ax=({id:e})=>{const{updateRoute:s}=Ve(),{data:{offers:a=[]}={}}=l0(e||""),[o,c]=D.useState(),[h,y]=D.useState(""),{siteData:m}=Qe();D.useEffect(()=>{if(a.length>0){const k=a[0],M=`${Xr(m)}${k?.code}`;y(M),c(k)}},[a,m]);const[l,f]=D.useState(!1),u=()=>{let k="";switch(o?.type){case"percent":k=o?.amount+"% discount";break;case"fixed":k=Ka(Hi(o?.amount))+" "+o?.currency+" discount";break;case"trial":k=o?.amount+" days free trial";break}return`${encodeURIComponent(o?.name||"")} — Check out ${encodeURIComponent(k)} on:`},d=async()=>{await navigator.clipboard.writeText(h),f(!0),setTimeout(()=>f(!1),2e3)},g=()=>{window.open(`https://twitter.com/intent/tweet?url=${encodeURI(h)}&text=${u()}`,"_blank")},b=()=>{window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURI(h)}`,"_blank")},_=()=>{window.open(`http://www.linkedin.com/shareArticle?mini=true&url=${encodeURI(h)}&title=${u()}`,"_blank")};return r.jsx(vt,{afterClose:()=>{s("offers")},animate:!1,backDropClick:!1,footer:!1,height:"full",size:"lg",testId:"offer-success-modal",topRightContent:"close",width:1140,children:r.jsxs("div",{className:"-mt-6 flex h-full flex-col items-center justify-center text-center",children:[r.jsx("div",{className:"absolute left-6 top-5",children:r.jsx(md,{activeItemClassName:"hidden md:!block md:!visible",containerClassName:"whitespace-nowrap",itemClassName:"hidden md:!block md:!visible",items:[{label:"Offers",onClick:()=>{s("offers/edit")}},{label:o?.name||""}],separatorClassName:"hidden md:!block md:!visible",backIcon:!0,onBack:()=>{s("offers/edit")}})}),r.jsx(rt,{colorClass:"text-grey-700 -mt-4",name:"tags-check",size:"xl"}),r.jsx("h1",{className:"mt-6 text-4xl",children:"Your new offer is live!"}),r.jsx("p",{className:"mt-3 max-w-[510px] text-[1.6rem]",children:"You can share the link anywhere. In your newsletter, social media, a podcast, or in-person. It all just works."}),r.jsxs("div",{className:"mt-8 flex w-full max-w-md flex-col gap-8",children:[r.jsxs("div",{className:"flex flex-col-reverse gap-2",children:[r.jsx(Ne,{name:"offer-url",type:"url",value:h,disabled:!0}),r.jsx(Ue,{color:"green",label:l?"Copied!":"Copy link",fullWidth:!0,onClick:d})]}),r.jsx("div",{className:'flex items-center gap-4 text-xs font-medium before:h-px before:grow before:bg-grey-300 before:content-[""] after:h-px after:grow after:bg-grey-300 after:content-[""] dark:before:bg-grey-800 dark:after:bg-grey-800',children:"OR"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx(Ue,{className:"h-8 border border-grey-300 dark:border-grey-800",icon:"twitter-x",iconColorClass:"w-[14px] h-[14px]",size:"sm",fullWidth:!0,onClick:g}),r.jsx(Ue,{className:"h-8 border border-grey-300 dark:border-grey-800",icon:"facebook",size:"sm",fullWidth:!0,onClick:b}),r.jsx(Ue,{className:"h-8 border border-grey-300 dark:border-grey-800",icon:"linkedin",size:"sm",fullWidth:!0,onClick:_})]})]})]})})},Qi=({href:e,onDestroyed:s,selectedTab:a,portalParent:o})=>{a||(a="signup");const c=D.useRef(null),[h,y]=D.useState(!1),[m,l]=D.useState(!0),f=D.useCallback(()=>{setTimeout(()=>{c.current&&l(!1)},300)},[c]);if(D.useEffect(()=>{const g=b=>{if(!e)return;new URL(b.origin).origin===new URL(e).origin&&b?.data?.type==="portal-preview-ready"&&f()};return window.addEventListener("message",g,!0),()=>{window.removeEventListener("message",g,!0),s?.()}},[e,s,f,h]),!e)return null;let u="mt-[-7%] flex h-screen items-center justify-center",d="hidden";return o==="preview"?(u="absolute z-50 mt-[-7%] flex h-screen items-center justify-center",d="invisible"):o==="offers"&&(u="absolute z-50 flex w-full h-full items-center justify-center",d="invisible"),r.jsxs(r.Fragment,{children:[m&&r.jsx("div",{className:u,children:r.jsx("span",{children:r.jsx(Yi,{})})}),r.jsx("iframe",{ref:c,className:!m&&h?"":d,"data-testid":"portal-preview",height:"100%",src:e,title:"Portal Preview",width:"100%",onLoad:()=>{y(!0)}})]})},Cx=(e,s)=>{const{disableBackground:a=!1,name:o,code:c,displayTitle:h="",displayDescription:y="",type:m,cadence:l,amount:f=0,duration:u,durationInMonths:d,currency:g="usd",status:b,tierId:_}=e;s=s.replace(/\/$/,"");const k="/?v=modal-portal-offer#/portal/preview/offer",M=new URLSearchParams;return M.append("disableBackground","false"),M.append("name",encodeURIComponent(o)),M.append("code",encodeURIComponent(c)),M.append("display_title",encodeURIComponent(h)),M.append("display_description",encodeURIComponent(y)),M.append("type",encodeURIComponent(m)),M.append("cadence",encodeURIComponent(l)),M.append("amount",encodeURIComponent(f)),M.append("duration",encodeURIComponent(u)),M.append("duration_in_months",encodeURIComponent(d)),M.append("currency",encodeURIComponent(g)),M.append("status",encodeURIComponent(b)),M.append("tier_id",encodeURIComponent(_)),a&&M.append("disableBackground","true"),`${s}${k}?${M.toString()}`},sE=e=>{const s=[];return e.forEach(a=>{s.push({label:`${a.name} - Monthly`,value:`${a.id}-month-${a.currency}`}),s.push({label:`${a.name} - Yearly`,value:`${a.id}-year-${a.currency}`})}),s};function aE(e){return e.toString().toLowerCase().trim().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-")}const Ji=({type:e,checked:s,onClick:a})=>{const o=s?"bg-black text-white dark:bg-white dark:text-black":"border border-grey-300 dark:border-grey-800";return r.jsx("button",{className:"text-left",type:"button",onClick:a,children:r.jsxs("div",{className:"flex gap-3",children:[r.jsx("div",{className:`mt-0.5 flex size-4 items-center justify-center rounded-full ${o}`,children:s?r.jsx(rt,{className:"w-[7px] stroke-[4]",name:"check",size:"custom"}):null}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("span",{children:e.title}),r.jsx("span",{className:"text-sm",children:e.description})]})]})})},Pg=e=>{const{fixedAmount:s=0,percentAmount:a=0,trialAmount:o=0,amount:c=0}=e;switch(e.type){case"fixed":return s*100;case"percent":return a;case"trial":return o;default:return c}},oE=({tierOptions:e,handleTierChange:s,selectedTier:a,typeOptions:o,durationOptions:c,handleTypeChange:h,handleDurationChange:y,overrides:m,handleAmountTypeChange:l,handleNameInput:f,handleTextAreaInput:u,handleDisplayTitleInput:d,handleDurationInMonthsInput:g,handleAmountInput:b,handleCodeInput:_,clearError:k,errors:M,testId:T,handleTrialAmountInput:A,amountOptions:I})=>{const $=a?.label?.includes("Yearly")?c.filter(ne=>ne.value!=="repeating"):c,[q,R]=D.useState(0),K=q>40?"text-red":"text-green",{siteData:X}=Qe(),[Y,L]=D.useState(!1),B=Xr(X),J=`${B}${m.code.value}`,te=async()=>{await navigator.clipboard.writeText(J),L(!0),setTimeout(()=>L(!1),2e3)};return r.jsx("div",{className:"pt-7","data-testId":T,children:r.jsxs(et,{children:[r.jsxs("section",{children:[r.jsx("h2",{className:"mb-4 text-lg",children:"General"}),r.jsxs("div",{className:"flex flex-col gap-6",children:[r.jsx(Ne,{error:!!M.name,hint:M.name||r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{children:"Visible to members on Stripe Checkout page"}),r.jsxs("strong",{children:[r.jsx("span",{className:`${K}`,children:q})," / 40"]})]}),maxLength:40,placeholder:"Black Friday",title:"Offer name",onChange:ne=>{f(ne),R(ne.target.value.length)},onKeyDown:()=>k("name")}),r.jsx(Ne,{error:!!M.displayTitle,hint:M.displayTitle,placeholder:"Black Friday Special",title:"Display title",value:m.displayTitle.value,onChange:ne=>{d(ne)},onKeyDown:()=>k("displayTitle")}),r.jsx(dn,{placeholder:"Take advantage of this limited-time offer.",title:"Display description",value:m.displayDescription,onChange:ne=>{u(ne)}})]})]}),r.jsxs("section",{className:"mt-4",children:[r.jsx("h2",{className:"mb-4 text-lg",children:"Details"}),r.jsxs("div",{className:"flex flex-col gap-6",children:[r.jsxs("div",{className:"flex flex-col gap-4 rounded-md border border-grey-200 p-4 dark:border-grey-800",children:[r.jsx(Ji,{checked:m.type!=="trial",type:o[0],onClick:()=>{h("percent")}}),r.jsx(Ji,{checked:m.type==="trial",type:o[1],onClick:()=>{h("trial")}})]}),r.jsx(Ot,{options:e,selectedOption:a,testId:"tier-cadence-select-offers",title:"Tier — Cadence",onSelect:ne=>{ne&&s(ne)}}),m.type!=="trial"&&r.jsxs(r.Fragment,{children:[" ",r.jsxs("div",{className:"relative",children:[r.jsx(Ne,{error:!!M.amount,hint:M.amount,title:"Amount off",type:"number",value:m.type==="fixed"?m.fixedAmount===0?"":m.fixedAmount?.toString():m.percentAmount===0?"":m.percentAmount?.toString(),onChange:ne=>{b(ne)},onKeyDown:()=>k("amount")}),r.jsx("div",{className:"absolute right-1.5 top-6 z-10",children:r.jsx(Ot,{clearBg:!0,controlClasses:{menu:"w-20 right-0"},options:I,selectedOption:m.type==="percent"?I[0]:I[1],testId:"amount-type-select-offers",onSelect:ne=>{l(ne?.value||"")}})})]}),r.jsx(Ot,{options:$,selectedOption:$.find(ne=>ne.value===m.duration),testId:"duration-select-offers",title:"Duration",onSelect:ne=>y(ne?.value||"")}),m.duration==="repeating"&&r.jsx(Ne,{title:"Duration in months",type:"number",onChange:ne=>{g(ne)}})]}),m.type==="trial"&&r.jsx(Ne,{error:!!M.amount,hint:M.amount,title:"Trial duration",type:"number",value:m.trialAmount?.toString(),onChange:ne=>{A(ne)},onKeyDown:()=>k("amount")}),r.jsx(Ne,{error:!!M.code,hint:M.code||(m.code.value!==""?r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[B,r.jsx("span",{className:"font-bold",children:m.code.value})]}),r.jsx("span",{}),r.jsx(Ue,{className:"text-xs",color:"green",label:`${Y?"Copied":"Copy"}`,size:"sm",link:!0,onClick:te})]}):null),placeholder:"black-friday",title:"Offer code",value:m.code.value,onChange:ne=>{_(ne)},onKeyDown:()=>k("code")})]})]})]})})},Qn=e=>{const[s,a,o]=e.split("-");if(!s||!a||!o)throw new Error("Invalid input format. Expected format is: id-period-currency");return{id:s,period:a,currency:o}},iE=()=>{const{siteData:e}=Qe(),s=[{title:"Discount",description:"Offer a special reduced price",value:"percent"},{title:"Free trial",description:"Give free access for a limited time",value:"trial"}],a=[{value:"once",label:"First-payment"},{value:"repeating",label:"Multiple-months"},{value:"forever",label:"Forever"}],[o,c]=D.useState(""),{updateRoute:h}=Ve(),{data:{tiers:y}={}}=Vs(),m=sl(y||[]),l=sE(m),{mutateAsync:f}=M2(),[u,d]=D.useState({tier:l[0]||{},dataset:{id:l[0]?.value?Qn(l[0]?.value).id:"",period:l[0]?.value?Qn(l[0]?.value).period:"",currency:l[0]?.value?Qn(l[0]?.value).currency:""}}),{data:{offers:g=[]}={}}=c0(),{formState:b,updateForm:_,handleSave:k,saveState:M,okProps:T,validate:A,errors:I,clearError:O}=pr({initialState:{disableBackground:!1,name:"",code:{isDirty:!1,value:""},displayTitle:{isDirty:!1,value:""},displayDescription:"",type:"percent",cadence:u?.dataset?.period||"",amount:0,duration:"once",durationInMonths:0,currency:u?.dataset?.currency||"USD",status:"active",tierId:u?.dataset?.id||"",trialAmount:7,fixedAmount:0,percentAmount:0},onSave:async()=>{const he={name:b.name,code:b.code.value,display_title:b.displayTitle.value,display_description:b.displayDescription,cadence:b.cadence,amount:Pg(b)||0,duration:b.type==="trial"?"trial":b.duration,duration_in_months:Number(b.durationInMonths),currency:b.currency,status:b.status,redemption_type:"signup",tier:{id:b.tierId},type:b.type,currency_restriction:!1},ge=await f(he);ge&&ge.offers&&ge.offers.length>0&&h(`offers/success/${ge.offers[0].id}`)},onSaveError:()=>{},onValidate:()=>{const he={};return!b.name&&b.name.length===0&&(he.name="Name is required"),!b.code.value&&b.code.value.length===0&&(he.code="Code is required"),!b.displayTitle.value&&b.displayTitle.value.length===0&&(he.displayTitle="Display title is required"),b.type==="percent"&&b.percentAmount===0&&(he.amount="Enter an amount greater than 0."),b.type==="percent"&&(b.percentAmount<0||b.percentAmount>100)&&(he.amount="Amount must be between 0 and 100%."),(b.type==="fixed"&&b.fixedAmount===0||b.type==="fixed"&&b.fixedAmount<1)&&(he.amount="Enter an amount greater than 0."),b.type==="trial"&&b.trialAmount===0&&(he.amount="Enter an amount greater than 0."),b.type==="trial"&&b.trialAmount<1&&(he.amount="Free trial must be at least 1 day."),he},savingDelay:500}),$=[{value:"percent",label:"%"},{value:"fixed",label:b.currency}],q=he=>{d({tier:he,dataset:Qn(he.value)}),_(ge=>({...ge,cadence:Qn(he.value).period,currency:Qn(he.value).currency,tierId:Qn(he.value).id}))},R=he=>{_(ge=>({...ge,type:he}))},K=he=>{_(ge=>({...ge,type:he==="percent"?"percent":"fixed"}))},X=he=>{const ge=he.target;b.type==="fixed"?_(U=>({...U,fixedAmount:Number(ge.value)})):b.type==="percent"?_(U=>({...U,percentAmount:Number(ge.value)})):_(U=>({...U,amount:Number(ge.value)}))},Y=he=>{const ge=he.target;_(U=>({...U,durationInMonths:Number(ge.value)}))},L=he=>{const ge=he.target.value;_(U=>{let P={...U};return P.name=ge,U.code.isDirty||(O("code"),P.code={...U.code,value:aE(ge)}),U.displayTitle.isDirty||(O("displayTitle"),P.displayTitle={...U.displayTitle,value:ge}),P})},B=he=>{const ge=he.target;_(U=>({...U,displayTitle:{...U.displayTitle,isDirty:!0,value:ge.value}}))},J=he=>{const ge=he.target;_(U=>({...U,displayDescription:ge.value}))},te=he=>{const ge=he.target;_(U=>({...U,trialAmount:Number(ge.value)}))},ne=he=>{_(ge=>({...ge,duration:he}))},Q=he=>{const ge=he.target;_(U=>({...U,code:{...U.code,isDirty:!0,value:ge.value}}))},se=()=>{g.length>0?h("offers/edit"):h("offers")},be=D.useMemo(()=>({name:b.name||"",code:b.code.value||"",displayTitle:b.displayTitle.value||"",displayDescription:b.displayDescription||"",type:b.type||"percent",cadence:b.cadence||"month",amount:Pg(b)||0,duration:b.type==="trial"?"trial":b.duration||"once",durationInMonths:b.durationInMonths||0,currency:b.currency||"USD",status:b.status||"active",tierId:b.tierId||m[0]?.id}),[b,m]);D.useEffect(()=>{const he=Cx(be,e.url);c(he)},[b,e.url,b.type,be]);const je=r.jsx(oE,{amountOptions:$,clearError:O,durationOptions:a,errors:I,handleAmountInput:X,handleAmountTypeChange:K,handleCodeInput:Q,handleDisplayTitleInput:B,handleDurationChange:ne,handleDurationInMonthsInput:Y,handleNameInput:L,handleTextAreaInput:J,handleTierChange:q,handleTrialAmountInput:te,handleTypeChange:R,overrides:b,selectedTier:u.tier,testId:"add-offer-sidebar",tierOptions:l,typeOptions:s,validate:A}),W=r.jsx(Qi,{href:o||"",portalParent:"offers"});return r.jsx(as,{afterClose:()=>{h("offers")},backDropClick:!1,cancelLabel:"Cancel",deviceSelector:!1,dirty:M==="unsaved",height:"full",okColor:T.color,okLabel:"Publish",preview:W,previewToolbar:!1,sidebar:je,size:"lg",testId:"add-offer-modal",title:"Offer",width:1140,onCancel:se,onOk:async()=>{if(A(),!Object.values(I).every(ge=>!ge)){Qa.remove(),mt({title:"Can't save offer",type:"info",message:"Make sure you filled all required fields"});return}try{if(await k({force:!0}))return}catch(ge){let U;ge instanceof ts&&ge.data&&ge.data.errors[0]&&(U=ge.data.errors[0].context||ge.data.errors[0].message),Qa.remove(),U&&mt({title:"Can't save offer",type:"error",message:U||"Please try again later"})}}})};function Fg(e){return new Date(e).toLocaleDateString("default",{year:"numeric",month:"short",day:"2-digit"})}const lE=({clearError:e,errors:s,offer:a,updateOffer:o})=>{const{siteData:c}=Qe(),[h,y]=D.useState(!1),m=it(),{mutateAsync:l}=u0(),[f,u]=D.useState(a?.name.length||0),d=f>40?"text-red":"text-green",{updateRoute:g}=Ve();D.useEffect(()=>{a?.name&&u(a?.name.length)},[a?.name]);const b=Xr(c),_=`${b}${a?.code}`,k=async()=>{await navigator.clipboard.writeText(_),y(!0),setTimeout(()=>y(!1),2e3)},M=async()=>{a?.status==="active"?ye.show(Et,{title:"Archive offer",prompt:r.jsxs(r.Fragment,{children:[r.jsx("p",{children:"New members will no longer be able to subscribe using this offer."}),r.jsxs("p",{children:["All members that previously redeemed ",r.jsx("strong",{children:a?.name})," will remain unchanged."]})]}),okLabel:"Archive",okColor:"red",onOk:async T=>{try{await l({...a,status:"archived"}),T?.remove(),mt({type:"success",title:"Offer archived"}),g("offers/edit")}catch(A){m(A)}}}):ye.show(Et,{title:"Reactivate offer",prompt:r.jsx(r.Fragment,{children:r.jsxs("p",{children:["Reactivating ",r.jsx("strong",{children:a?.name})," will allow new members to subscribe using this offer. Existing members will remain unchanged."]})}),okLabel:"Reactivate",onOk:async T=>{try{await l({...a,status:"active"}),T?.remove(),mt({type:"success",title:"Offer reactivated"}),g("offers/edit")}catch(A){m(A)}}})};return r.jsxs("div",{className:"flex grow flex-col pt-2",children:[r.jsxs(et,{className:" grow",children:[r.jsx("section",{children:r.jsxs("div",{className:"flex flex-col gap-5 rounded-md border border-grey-300 p-4 pb-3.5 dark:border-grey-800",children:[r.jsxs("div",{className:"flex flex-col gap-1.5",children:[r.jsx("span",{className:"text-xs font-semibold leading-none text-grey-700",children:"Created on"}),r.jsx("span",{children:Fg(a?.created_at?a.created_at:"")})]}),r.jsxs("div",{className:"flex items-end justify-between",children:[r.jsxs("div",{className:"flex flex-col gap-5",children:[r.jsxs("div",{className:"flex flex-col gap-1.5",children:[r.jsx("span",{className:"text-xs font-semibold leading-none text-grey-700",children:"Performance"}),r.jsxs("span",{children:[a?.redemption_count," ",a?.redemption_count===1?"redemption":"redemptions"]})]}),a?.redemption_count>0&&a?.last_redeemed?r.jsxs("div",{className:"flex flex-col gap-1.5",children:[r.jsx("span",{className:"text-xs font-semibold leading-none text-grey-700",children:"Last redemption"}),r.jsx("span",{children:Fg(a?.last_redeemed)})]}):null]}),a?.redemption_count>0?r.jsx("a",{className:"font-semibold text-green",href:j2(a?.id),children:"See members →"}):null]})]})}),r.jsxs("section",{className:"mt-4",children:[r.jsx("h2",{className:"mb-4 text-lg",children:"General"}),r.jsxs("div",{className:"flex flex-col gap-6",children:[r.jsx(Ne,{error:!!s.name,hint:s.name||r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{children:"Visible to members on Stripe Checkout page"}),r.jsxs("strong",{children:[r.jsx("span",{className:`${d}`,children:f})," / 40"]})]}),maxLength:40,placeholder:"Black Friday",title:"Offer name",value:a?.name,onChange:T=>{u(T.target.value.length),o({name:T.target.value})},onKeyDown:()=>e("name")}),r.jsx(Ne,{error:!!s.displayTitle,hint:s.displayTitle,placeholder:"Black Friday Special",title:"Display title",value:a?.display_title,onChange:T=>o({display_title:T.target.value}),onKeyDown:()=>e("displayTitle")}),r.jsx(dn,{placeholder:"Take advantage of this limited-time offer.",title:"Display description",value:a?.display_description,onChange:T=>o({display_description:T.target.value})}),r.jsx(Ne,{error:!!s.code,hint:s.code||(a?.code!==""?r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[b,r.jsx("span",{className:"font-bold",children:a?.code})]}),r.jsx("span",{}),r.jsx(Ue,{className:"text-xs",color:"green",label:`${h?"Copied":"Copy"}`,size:"sm",link:!0,onClick:k})]}):null),placeholder:"black-friday",title:"Offer code",value:a?.code,onChange:T=>o({code:T.target.value}),onKeyDown:()=>e("code")})]})]})]}),r.jsx("div",{className:"mb-2",children:a?.status==="active"?r.jsx(Ue,{color:"red",label:"Archive offer",link:!0,onClick:M}):r.jsx(Ue,{color:"green",label:"Reactivate offer",link:!0,onClick:M})})]})},cE=({id:e})=>{const{siteData:s}=Qe(),{updateRoute:a}=Ve(),o=it(),{mutateAsync:c}=u0(),[h,y]=D.useState(""),{data:{offers:m=[]}={}}=l0(e||""),{formState:l,saveState:f,updateForm:u,setFormState:d,handleSave:g,validate:b,errors:_,clearError:k,okProps:M}=pr({initialState:m[0],savingDelay:500,onSave:async()=>{await c(l)},onSaveError:o,onValidate:()=>{const O={};return l?.name||(O.name="Name is required"),l?.display_title||(O.displayTitle="Display title is required"),l?.code||(O.code="Please enter a code"),O}});D.useEffect(()=>{d(()=>m[0])},[d,m]);const T=O=>{u($=>({...$,...O}))},A=r.jsx(lE,{clearError:k,errors:_,offer:l,updateOffer:T,validate:b});D.useEffect(()=>{const O={name:l?.name||"",code:l?.code||"",displayTitle:l?.display_title||"",displayDescription:l?.display_description||"",type:l?.type||"",cadence:l?.cadence||"",amount:l?.amount,duration:l?.duration||"",durationInMonths:l?.duration_in_months||0,currency:l?.currency||"",status:l?.status||"",tierId:l?.tier?.id||""},$=Cx(O,s.url);y($)},[l,s]);const I=r.jsx(Qi,{href:h||"",portalParent:"offers"});return m?r.jsx(as,{afterClose:()=>{a("offers")},backDropClick:!1,cancelLabel:"Cancel",deviceSelector:!1,dirty:f==="unsaved",height:"full",okColor:M.color,okLabel:M.label||"Save",preview:I,previewToolbar:!1,sidebar:A,size:"lg",testId:"offer-update-modal",title:"Offer",width:1140,onCancel:()=>{sessionStorage.getItem("editOfferPageSource")==="offers"?(sessionStorage.removeItem("editOfferPageSource"),a("offers")):(sessionStorage.removeItem("editOfferPageSource"),a("offers/edit"))},onOk:async()=>{try{if(await g({force:!0}))return}catch(O){let $;O instanceof ts&&O.data&&O.data.errors[0]&&($=O.data.errors[0].context||O.data.errors[0].message),Qa.remove(),$&&mt({title:"Can't save offer",type:"error",message:"Please try again later"})}}}):null},Ug=[{title:"Percentage discount",description:"Offer a special reduced price"},{title:"Free month(s)",description:"Give free access for a limited time"}],zg=[{value:"once",label:"First-payment"},{value:"repeating",label:"Multiple-months"},{value:"forever",label:"Forever"}],uE=e=>e==="monthly"?{enabled:!0,displayTitle:"",displayDescription:"",type:"percent",percentAmount:20,duration:"once",durationInMonths:1,freeMonths:1}:{enabled:!1,displayTitle:"",displayDescription:"",type:"percent",percentAmount:0,duration:"once",durationInMonths:1,freeMonths:1},fE=({formState:e,updateForm:s,cadence:a})=>r.jsx("div",{className:"flex grow flex-col pt-2",children:r.jsxs(et,{className:"grow",children:[r.jsx("section",{children:r.jsx("div",{className:"flex flex-col gap-5 rounded-md border border-grey-300 p-4 pb-3.5 dark:border-grey-800",children:r.jsxs("div",{className:"flex flex-col gap-1.5",children:[r.jsx("span",{className:"text-xs font-semibold leading-none text-grey-700",children:"Performance"}),r.jsx("span",{children:"0 redemptions"})]})})}),r.jsx("section",{className:"mt-4",children:r.jsx(st,{checked:e.enabled,direction:"rtl",hint:a==="monthly"?"Applied to monthly plans":"Applied to annual plans",label:`Enable ${a} retention`,onChange:o=>{s(c=>({...c,enabled:o.target.checked}))}})}),e.enabled&&r.jsxs(r.Fragment,{children:[r.jsxs("section",{className:"mt-4",children:[r.jsx("h2",{className:"mb-4 text-lg",children:"General"}),r.jsxs("div",{className:"flex flex-col gap-6",children:[r.jsx(Ne,{placeholder:"Before you go...",title:"Display title",value:e.displayTitle,onChange:o=>{s(c=>({...c,displayTitle:o.target.value}))}}),r.jsx(dn,{placeholder:"We'd hate to see you go! How about a special offer to stay?",title:"Display description",value:e.displayDescription,onChange:o=>{s(c=>({...c,displayDescription:o.target.value}))}})]})]}),r.jsxs("section",{className:"mt-4",children:[r.jsx("h2",{className:"mb-4 text-lg",children:"Details"}),r.jsxs("div",{className:"flex flex-col gap-6",children:[r.jsxs("div",{className:"flex flex-col gap-4 rounded-md border border-grey-200 p-4 dark:border-grey-800",children:[r.jsx(Ji,{checked:e.type==="percent",type:Ug[0],onClick:()=>{s(o=>({...o,type:"percent"}))}}),r.jsx(Ji,{checked:e.type==="trial",type:Ug[1],onClick:()=>{s(o=>({...o,type:"trial"}))}})]}),e.type==="percent"&&r.jsxs(r.Fragment,{children:[r.jsx(Ne,{rightPlaceholder:"%",title:"Amount off",type:"number",value:e.percentAmount===0?"":String(e.percentAmount),onChange:o=>{s(c=>({...c,percentAmount:Number(o.target.value)}))}}),r.jsx(Ot,{options:zg,selectedOption:zg.find(o=>o.value===e.duration),title:"Duration",onSelect:o=>{o&&s(c=>({...c,duration:o.value}))}}),e.duration==="repeating"&&r.jsx(Ne,{rightPlaceholder:`${e.durationInMonths===1?"month":"months"}`,title:"Duration in months",type:"number",value:e.durationInMonths===0?"":String(e.durationInMonths),onChange:o=>{s(c=>({...c,durationInMonths:Number(o.target.value)}))}})]}),e.type==="trial"&&r.jsx(Ne,{rightPlaceholder:`${e.freeMonths===1?"month":"months"}`,title:"Free months",type:"number",value:e.freeMonths===0?"":String(e.freeMonths),onChange:o=>{s(c=>({...c,freeMonths:Number(o.target.value)}))}})]})]})]})]})}),dE=({id:e})=>{const{updateRoute:s}=Ve(),a=e==="monthly"?"monthly":"yearly",o=a==="monthly"?"Monthly retention":"Yearly retention",{formState:c,updateForm:h,saveState:y,okProps:m}=pr({initialState:uE(e),savingDelay:500,onSave:async()=>{},onSaveError:()=>{},onValidate:()=>({})}),l=()=>{s("offers/edit/retention")},f=r.jsx(fE,{cadence:a,formState:c,updateForm:h}),u=r.jsx("div",{className:"flex h-full items-center justify-center text-sm text-grey-400"});return r.jsx(as,{afterClose:()=>s("offers"),backDropClick:!1,cancelLabel:"Cancel",deviceSelector:!1,dirty:y==="unsaved",height:"full",okColor:m.color,okLabel:m.label||"Save",preview:u,previewToolbarBreadcrumbs:[{label:"Offers",onClick:l},{label:o}],sidebar:f,size:"lg",testId:"retention-offer-modal",title:"Offer",width:1140,onBreadcrumbsBack:l,onCancel:l,onOk:async()=>{}})},pE=[{id:"monthly",name:"Monthly retention",description:"Applied to monthly plans",terms:"50% OFF",termsDetail:"Next payment",redemptions:3,status:"active"},{id:"yearly",name:"Yearly retention",description:"Applied to annual plans",terms:null,termsDetail:null,redemptions:0,status:"inactive"}],hE=()=>{const{updateRoute:e}=Ve(),s=a=>{e(`offers/edit/retention/${a}`)};return r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"m-0 w-full table-fixed",children:[r.jsxs("colgroup",{children:[r.jsx("col",{}),r.jsx("col",{className:"w-[220px]"}),r.jsx("col",{className:"w-[220px]"}),r.jsx("col",{className:"w-[220px]"}),r.jsx("col",{className:"w-[80px]"})]}),pE.map(a=>r.jsxs("tr",{className:"group relative scale-100 border-b border-b-grey-200 dark:border-grey-800","data-testid":"retention-offer-item",children:[r.jsx("td",{className:"p-0",children:r.jsxs("a",{className:"block cursor-pointer p-5 pl-0",onClick:()=>s(a.id),children:[r.jsx("span",{className:"font-semibold",children:a.name}),r.jsx("br",{}),r.jsx("span",{className:"text-sm text-grey-700",children:a.description})]})}),r.jsx("td",{className:"whitespace-nowrap p-0 text-sm",children:r.jsx("a",{className:"block cursor-pointer p-5",onClick:()=>s(a.id),children:a.terms?r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"text-[1.3rem] font-medium uppercase",children:a.terms}),r.jsx("br",{}),r.jsx("span",{className:"text-grey-700",children:a.termsDetail})]}):r.jsx("span",{className:"text-grey-700",children:"–"})})}),r.jsx("td",{className:"whitespace-nowrap p-0 text-sm",children:r.jsx("a",{className:"block cursor-pointer p-5",onClick:()=>s(a.id),children:a.redemptions})}),r.jsx("td",{className:"whitespace-nowrap p-0 text-sm",children:r.jsx("a",{className:"block cursor-pointer p-5",onClick:()=>s(a.id),children:a.status==="active"?r.jsx("span",{className:"text-sm font-semibold text-green",children:"Active"}):r.jsx("span",{className:"text-sm text-grey-700",children:"Inactive"})})}),r.jsx("td",{className:"w-[80px] p-0"})]},a.id))]})})},mE=e=>{const s="/ghost/#/members",a=`offer_redemptions:[${e}]`;return`${s}?filter=${encodeURIComponent(a)}`},gE=e=>e==="month"?"monthly":"yearly",xE=e=>e==="once"?"First payment":e==="repeating"?"Repeating":"Forever",bE=(e,s,a,o,c)=>{let h="",y="";const m=a==="month"?c?.monthly_price??0:c?.yearly_price??0;let l=m;const f=g=>parseFloat(g.toFixed(2));let u=vh(o)+Ka(f(Hi(m)));switch(e){case"percent":h="text-green",y=s+"% off",l=m-m*s/100;break;case"fixed":h="text-blue",y=Ka(f(Hi(s)))+" "+o+" off",l=m-s;break;case"trial":h="text-pink",y=s+" days free",u="";break}l<0&&(l=0);const d=vh(o)+Ka(f(Hi(l)));return{discountColor:h,discountOffer:y,originalPriceWithCurrency:u,updatedPriceWithCurrency:d}},vE=({offerCode:e})=>{const[s,a]=D.useState(!1),{siteData:o}=Qe(),c=h=>{h?.stopPropagation();const y=`${Xr(o)}${e}`;navigator.clipboard.writeText(y),a(!0),setTimeout(()=>a(!1),2e3)};return r.jsx(T2,{containerClassName:"group-hover:opacity-100 opacity-0 inline-flex items-center -mr-1 justify-center leading-none w-5 h-5",content:s?"Copied":"Copy link",size:"sm",children:r.jsx(Ue,{color:"clear",hideLabel:!0,icon:s?"check-circle":"hyperlink-circle",iconColorClass:s?"text-green w-[14px] h-[14px]":"w-[14px] h-[14px]",label:s?"Copied":"Copy",unstyled:!0,onClick:c})})},Hg=({title:e="No offers found",description:s,buttonAction:a,buttonLabel:o})=>r.jsxs("div",{className:"flex h-full grow flex-col items-center justify-center text-center",children:[r.jsx(rt,{className:"-mt-14",colorClass:"text-grey-700 -mt-6",name:"tags-block",size:"lg"}),r.jsx("h1",{className:"mt-4 text-xl",children:e}),r.jsx("p",{className:"mt-1.5 max-w-[420px]",children:s}),r.jsx(Ue,{className:"mt-6",color:"grey",label:o,onClick:a})]}),Bg=({statusFilter:e,setStatusFilter:s,sortOption:a,sortDirection:o,onSortChange:c,onDirectionChange:h})=>r.jsx(rd,{position:"end",trigger:r.jsx("button",{className:"flex cursor-pointer items-center justify-center rounded p-1 hover:bg-grey-100 dark:hover:bg-grey-800",type:"button",children:r.jsx(F2,{className:"text-grey-700",size:16,strokeWidth:1.5})}),children:r.jsxs("div",{className:"flex min-w-[220px] flex-col",children:[r.jsx("div",{className:"cursor-default select-none border-b border-b-grey-200 p-2 pl-3 text-xs font-semibold uppercase tracking-wide text-grey-700 dark:border-b-grey-800",children:"Status"}),r.jsx("div",{className:"flex flex-col py-1",children:["active","archived"].map(y=>r.jsxs("button",{className:"group relative mx-1 flex cursor-pointer items-center rounded-[2.5px] px-8 py-1.5 text-left text-sm hover:bg-grey-100 dark:hover:bg-grey-800",type:"button",onClick:()=>s(y),children:[e===y&&r.jsx(rt,{className:"absolute left-2",name:"check",size:"xs"}),y.charAt(0).toUpperCase()+y.slice(1)]},y))}),r.jsx("div",{className:"cursor-default select-none border-y border-y-grey-200 p-2 pl-3 text-xs font-semibold uppercase tracking-wide text-grey-700 dark:border-grey-800",children:"Sort by"}),r.jsx("div",{className:"flex flex-col py-1",children:[{id:"date-added",label:"Date added"},{id:"name",label:"Name"},{id:"redemptions",label:"Redemptions"}].map(y=>r.jsxs("div",{className:"group relative mx-1 flex items-center rounded-[2.5px] hover:bg-grey-100 dark:hover:bg-grey-800",children:[r.jsxs("button",{className:"flex w-full cursor-pointer items-center px-8 py-1.5 pr-12 text-left text-sm",type:"button",onClick:()=>c(y.id),children:[a===y.id&&r.jsx(rt,{className:"absolute left-2",name:"check",size:"xs"}),y.label]}),a===y.id&&r.jsx("button",{className:"absolute right-1 flex size-6 cursor-pointer items-center justify-center rounded-full hover:bg-grey-300 dark:hover:bg-grey-700",title:o==="asc"?"Ascending":"Descending",type:"button",onClick:()=>h(),children:r.jsx(rt,{name:o==="asc"?"arrow-up":"arrow-down",size:"xs"})})]},y.id))})]})}),Wg=({defaultTab:e})=>{const s=Gt(),{updateRoute:a}=Ve(),{data:{offers:o=[]}={},isFetching:c}=c0(),{data:{tiers:h}={}}=Vs(),y=o.filter(L=>L.redemption_type==="signup"),m=y.filter(L=>{const B=h?.find(J=>J.id===L?.tier?.id);return L.status==="active"&&B&&B.active===!0}),l=y.filter(L=>{const B=h?.find(J=>J.id===L?.tier?.id);return L.status==="archived"||B&&B.active===!1});let f=[{id:"signup",title:"Signup"},{id:"retention",title:"Retention"}];const{sortingState:u,setSortingState:d}=E2(),g=u?.find(L=>L.type==="offers"),[b,_]=D.useState(e||"signup"),[k,M]=D.useState("active"),T=g?.option||"date-added",A=g?.direction||"desc",I=L=>{sessionStorage.setItem("editOfferPageSource","offersIndex"),a(`offers/edit/${L}`)},O=y.sort((L,B)=>{const J=A==="desc"?-1:1;switch(T){case"name":return J*L.name.localeCompare(B.name);case"redemptions":return J*(L.redemption_count-B.redemption_count);default:return J*((L.created_at?new Date(L.created_at).getTime():0)-(B.created_at?new Date(B.created_at).getTime():0))}}),$=sl(h||[]),q=O.filter(L=>{const B=h?.find(J=>J.id===L?.tier?.id);return k==="active"&&L.status==="active"&&B&&B.active===!0||k==="archived"&&(L.status==="archived"||B&&B.active===!1)}),R=r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"m-0 w-full table-fixed",children:[r.jsxs("colgroup",{children:[r.jsx("col",{}),r.jsx("col",{className:"w-[220px]"}),r.jsx("col",{className:"w-[220px]"}),r.jsx("col",{className:"w-[220px]"}),r.jsx("col",{className:"w-[80px]"})]}),q.map(L=>{const B=h?.find(se=>se.id===L?.tier?.id);if(!B)return null;const J=B?.active===!1,{discountOffer:te,originalPriceWithCurrency:ne,updatedPriceWithCurrency:Q}=bE(L.type,L.amount,L.cadence,L.currency||"USD",B);return r.jsxs("tr",{className:"group relative scale-100 border-b border-b-grey-200 dark:border-grey-800","data-testid":"offer-item",children:[r.jsx("td",{className:`${J?"opacity-50":""} p-0`,children:r.jsxs("a",{className:`block ${J?"cursor-default select-none":"cursor-pointer"} p-5 pl-0`,onClick:J?()=>{}:()=>I(L?.id?L.id:""),children:[r.jsx("span",{className:"font-semibold",children:L?.name}),r.jsx("br",{}),r.jsxs("span",{className:"text-sm text-grey-700",children:[B.name," ",gE(L.cadence)]})]})}),r.jsx("td",{className:`${J?"opacity-50":""} whitespace-nowrap p-0 text-sm`,children:r.jsxs("a",{className:`block ${J?"cursor-default select-none":"cursor-pointer"} p-5`,onClick:J?()=>{}:()=>I(L?.id?L.id:""),children:[r.jsx("span",{className:"text-[1.3rem] font-medium uppercase",children:te}),r.jsx("br",{}),r.jsx("span",{className:"text-grey-700",children:L.type!=="trial"?xE(L.duration):"Trial period"})]})}),r.jsx("td",{className:`${J?"opacity-50":""} whitespace-nowrap p-0 text-sm`,children:r.jsxs("a",{className:`block ${J?"cursor-default select-none":"cursor-pointer"} p-5`,onClick:J?()=>{}:()=>I(L?.id?L.id:""),children:[r.jsx("span",{className:"font-medium",children:Q})," ",L.type!=="trial"?r.jsx("span",{className:'relative text-xs text-grey-700 before:absolute before:-inset-x-0.5 before:top-1/2 before:rotate-[-20deg] before:border-t before:content-[""]',children:ne}):null]})}),r.jsx("td",{className:`${J?"opacity-50":""} w-[120px] whitespace-nowrap p-0 text-sm`,children:r.jsx("a",{className:`block ${J?"cursor-default select-none":"cursor-pointer"} p-5 ${L.redemption_count===0?"":"hover:underline"}`,href:L.redemption_count>0?mE(L.id?L.id:""):void 0,onClick:L.redemption_count===0?J?()=>{}:()=>I(L?.id?L.id:""):()=>{},children:L.redemption_count})}),r.jsx("td",{className:`${J?"opacity-50":""} w-[120px] whitespace-nowrap p-5 pr-8 text-right text-sm leading-none`,children:J?null:r.jsx(vE,{offerCode:L.code})}),J?r.jsxs("div",{className:"absolute right-0 top-[11px] whitespace-nowrap rounded-sm bg-black px-2 py-0.5 text-xs leading-normal text-white opacity-0 transition-all group-hover:opacity-100 dark:bg-grey-950",children:["This offer is disabled, because ",r.jsx("br",{})," it is tied to an archived tier."]}):null]})})]})}),K=L=>{d?.([{type:"offers",option:L,direction:A}])},X=()=>{d?.([{type:"offers",option:T,direction:A==="asc"?"desc":"asc"}])},Y=[{key:"cancel-modal",label:"Close",onClick:()=>{s.remove(),a("offers")}},...b==="signup"?[{key:"new-offer",icon:"add",label:"New offer",color:"green",onClick:()=>{$.length===0?mt({type:"info",title:"You must have an active tier to create an offer."}):a("offers/new")}}]:[]];return r.jsx(vt,{afterClose:()=>{a("offers")},animate:!1,backDropClick:!1,cancelLabel:"",footer:!1,height:"full",size:"lg",testId:"offers-modal",title:"Offers",topRightContent:r.jsx(Gr,{buttons:Y}),width:1140,children:r.jsxs("div",{className:"flex h-full flex-col pt-8",children:[r.jsx("header",{children:r.jsx(fn,{selectedTab:b,tabs:f,topRightContent:b==="signup"&&q.length>0?r.jsxs("div",{className:"flex items-center",children:[r.jsx("span",{className:"w-[220px] px-5 text-xs uppercase text-grey-700",children:"Terms"}),r.jsx("span",{className:"w-[220px] px-5 text-xs uppercase text-grey-700",children:"Price"}),r.jsx("span",{className:"w-[220px] px-5 text-xs uppercase text-grey-700",children:"Redemptions"}),r.jsx("span",{className:"flex w-[80px] items-center justify-end",children:r.jsx(Bg,{setStatusFilter:M,sortDirection:A,sortOption:T,statusFilter:k,onDirectionChange:X,onSortChange:K})})]}):b==="signup"?r.jsx("div",{className:"flex items-center",children:r.jsx(Bg,{setStatusFilter:M,sortDirection:A,sortOption:T,statusFilter:k,onDirectionChange:X,onSortChange:K})}):b==="retention"?r.jsxs("div",{className:"flex items-center pt-[3px]",children:[r.jsx("span",{className:"w-[220px] px-5 text-xs uppercase text-grey-700",children:"Terms"}),r.jsx("span",{className:"w-[220px] px-5 text-xs uppercase text-grey-700",children:"Redemptions"}),r.jsx("span",{className:"w-[220px] px-5 text-xs uppercase text-grey-700",children:"Status"}),r.jsx("span",{className:"w-[80px]"})]}):null,onTabChange:L=>{_(L),a(L==="retention"?"offers/edit/retention":"offers/edit")}})}),b==="signup"&&k==="active"&&m.length===0&&!c?r.jsx(Hg,{buttonAction:()=>a("offers/new"),buttonLabel:"Create an offer",description:"Grow your audience with discounts or free trials."}):null,b==="signup"&&k==="archived"&&l.length===0&&!c?r.jsx(Hg,{buttonAction:()=>M("active"),buttonLabel:"Back to active",description:"All archived offers will be shown here."}):null,b==="retention"&&r.jsx(hE,{}),b==="signup"&&R]})})},wE=({route:e})=>{const s=f0("retentionOffers");if(e==="offers/new")return r.jsx(iE,{});if(s&&e.startsWith("offers/edit/retention/")&&e.length>22){const a=e.split("/").pop();return r.jsx(dE,{id:a||""})}else{if(s&&e==="offers/edit/retention")return r.jsx(Wg,{defaultTab:"retention"});if(!s&&e.startsWith("offers/edit/retention"))return r.jsx(wh,{});if(e.startsWith("offers/edit/")&&e.length>12){const a=e.split("/").pop();return r.jsx(cE,{id:a||""})}else if(e.startsWith("offers/success/")&&e.length>15){const a=e.split("/").pop();return r.jsx(Ax,{id:a||""})}else if(e==="offers/edit")return s?r.jsx(Wg,{}):r.jsx(wh,{})}},yE=()=>{const{route:e}=Ve();return r.jsx(wE,{route:e})},_E=ye.create(yE),kE=""+new URL("pintura-screenshot-1gRQGS4m.png",import.meta.url).href,ME=ns({method:"POST",path:()=>"/files/upload/",body:({file:e})=>{const s=new FormData;return s.append("file",e),s}}),jE=ye.create(()=>{const{updateRoute:e}=Ve(),[s,a]=D.useState({js:!1,css:!1}),{settings:o,config:c}=Qe(),[h]=xt(o,["pintura"]),{mutateAsync:y}=On(),{mutateAsync:m}=ME(),l=it();D.useEffect(()=>{g(h||!1)},[h]);const[f,u]=D.useState("Save"),[d,g]=D.useState(!!h),b=async()=>{const I=[{key:"pintura",value:d}];try{u("Saving..."),await Promise.all([y(I),new Promise(O=>{setTimeout(O,1e3)})]),u("Saved")}catch(O){l(O)}finally{setTimeout(()=>u("Save"),1e3)}},_=D.useRef(null),k=D.useRef(null),M=I=>{I==="js"&&_.current?.click(),I==="css"&&k.current?.click()},T=async(I,O)=>{try{a(X=>({...X,[O]:!0}));const $=I.target?.files?.[0];if(!$)return;const{files:q}=await m({file:$}),R=q[0].url,K=[{key:`pintura_${O}_url`,value:R}];await y(K),a(X=>({...X,[O]:!1})),mt({type:"success",title:`Pintura ${O} uploaded`})}catch($){a({js:!1,css:!1}),l($)}},A=d!==h;return r.jsxs(vt,{afterClose:()=>{e("integrations")},cancelLabel:"Close",dirty:A,okColor:f==="Saved"?"green":"black",okLabel:f,testId:"pintura-modal",title:"",onOk:b,children:[r.jsx(Js,{detail:"Advanced image editing",icon:r.jsx(rt,{name:"pintura",size:48}),title:"Pintura"}),r.jsxs("div",{className:"mt-7",children:[!c.pintura&&r.jsxs("div",{className:"mb-7 flex flex-col items-stretch justify-between gap-4 rounded-sm bg-grey-75 p-4 md:flex-row md:p-7 dark:bg-grey-950",children:[r.jsxs("div",{className:"md:basis-1/2",children:[r.jsx("p",{className:"mb-4 font-bold",children:"Add advanced image editing to Ghost, with Pintura"}),r.jsx("p",{className:"mb-4 text-sm",children:"Pintura is a powerful JavaScript image editor that allows you to crop, rotate, annotate and modify images directly inside Ghost."}),r.jsx("p",{className:"text-sm",children:"Try a demo, purchase a license, and download the required CSS/JS files from pqina.nl/pintura/ to activate this feature."})]}),r.jsxs("div",{className:"flex grow flex-col items-end justify-between gap-2 md:basis-1/2 md:gap-0",children:[r.jsx("img",{alt:"Pintura screenshot",src:kE}),r.jsx("a",{className:"-mb-1 text-sm font-bold text-green",href:"https://pqina.nl/pintura/ghost/?ref=ghost.org",rel:"noopener noreferrer",target:"_blank",children:"Find out more →"})]})]}),r.jsxs(et,{marginBottom:!1,title:"Pintura configuration",grouped:!0,children:[r.jsx(st,{checked:d,direction:"rtl",hint:r.jsxs(r.Fragment,{children:["Enable ",r.jsx("a",{className:"text-green",href:"https://pqina.nl/pintura/ghost/?ref=ghost.org",rel:"noopener noreferrer",target:"_blank",children:"Pintura"})," for editing your images in Ghost"]}),label:"Enable Pintura",onChange:I=>{g(I.target.checked)}}),d&&!c.pintura&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex flex-col justify-between gap-1 md:flex-row md:items-center",children:[r.jsxs("div",{children:[r.jsx("div",{children:"Upload Pintura script"}),r.jsxs("div",{className:"text-xs text-grey-600",children:["Upload the ",r.jsx("code",{children:"pintura-umd.js"})," file from the Pintura package"]})]}),r.jsx("input",{ref:_,accept:".js",type:"file",hidden:!0,onChange:async I=>{await T(I,"js")}}),r.jsx(Ue,{color:"outline",disabled:s.js,label:"Upload",onClick:()=>{M("js")}})]}),r.jsxs("div",{className:"flex flex-col justify-between gap-1 md:flex-row md:items-center",children:[r.jsxs("div",{children:[r.jsx("div",{children:"Upload Pintura styles"}),r.jsxs("div",{className:"text-xs text-grey-600",children:["Upload the ",r.jsx("code",{children:"pintura.css"})," file from the Pintura package"]})]}),r.jsx("input",{ref:k,accept:".css",type:"file",hidden:!0,onChange:async I=>{await T(I,"css")}}),r.jsx(Ue,{color:"outline",disabled:s.css,label:"Upload",onClick:()=>{M("css")}})]})]})]})]})]})}),EE=({updateSetting:e,errors:s,setError:a})=>{const{siteData:o,settings:c,config:h}=Qe(),[y,m]=xt(c,["members_support_address","support_email_address"]),l=m?.toString()||Df(y?.toString()||"",o,h),f=I_(o,h),[u,d]=D.useState(l),g=b=>{let _=b.target.value;_?St.isEmail(_)?a("members_support_address",""):a("members_support_address","Enter a valid email address"):a("members_support_address","Enter an email address");let k=f&&_===`noreply@${f}`?"noreply":_;e("members_support_address",k),d(Df(k,o,h))};return D.useEffect(()=>{d(l)},[l]),r.jsx("div",{className:"mt-7",children:r.jsx(et,{children:r.jsx(Ne,{error:!!s.members_support_address,hint:s.members_support_address,title:"Support email address",value:u,onBlur:g,onChange:b=>d(b.target.value)})})})},Cf=[{icon:"portal-icon-1",value:"icon-1"},{icon:"portal-icon-2",value:"icon-2"},{icon:"portal-icon-3",value:"icon-3"},{icon:"portal-icon-4",value:"icon-4"},{icon:"portal-icon-5",value:"icon-5"}],TE=({localSettings:e,updateSetting:s})=>{const{mutateAsync:a}=Ks(),o=it(),[c,h,y,m]=xt(e,["portal_button","portal_button_style","portal_button_icon","portal_button_signup_text"]),l=y||Cf[0].value,f=Cf.map(({value:k})=>k).includes(l),[u,d]=D.useState(f?void 0:l),g=async k=>{try{const M=ln(await a({file:k}));s("portal_button_icon",M),d(M)}catch(M){const T=M;T.response.status===415&&(T.message="Unsupported file type"),o(T)}},b=()=>{s("portal_button_icon",null),d(void 0)},_=[{value:"icon-and-text",label:"Icon and text"},{value:"icon-only",label:"Icon only"},{value:"text-only",label:"Text only"}];return r.jsx("div",{className:"mt-7",children:r.jsxs(et,{children:[r.jsx(st,{checked:!!c,direction:"rtl",label:"Show portal button",onChange:k=>s("portal_button",k.target.checked)}),c&&r.jsxs(r.Fragment,{children:[r.jsx(Ot,{options:_,selectedOption:_.find(k=>k.value===h),title:"Button style",onSelect:k=>s("portal_button_style",k?.value||null)}),h?.toString()?.includes("icon")&&r.jsxs("div",{className:"flex flex-col gap-2",children:[r.jsx(bt,{level:6,grey:!0,children:"Icon"}),r.jsxs("div",{className:"flex justify-between",children:[Cf.map(k=>r.jsx("button",{className:we("border p-3",l===k.value?"border-green":"border-transparent"),type:"button",onClick:()=>s("portal_button_icon",k.value),children:r.jsx(rt,{className:`size-5 ${l===k.value?"text-green":"text-black opacity-70 transition-all hover:opacity-100 dark:text-white"}`,name:k.icon})},k.value)),r.jsx("div",{className:we("relative w-[46px] border",l===u?"border-green":"border-transparent"),children:r.jsx(un,{deleteButtonClassName:"invisible absolute -right-2 -top-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-full bg-[rgba(0,0,0,0.75)] text-white hover:bg-black group-hover:!visible",deleteButtonContent:r.jsx(rt,{colorClass:"text-white",name:"trash",size:"sm"}),height:"46px",id:"test",imageClassName:"cursor-pointer",imageURL:u,width:"46px",deleteButtonUnstyled:!0,onDelete:b,onImageClick:()=>u&&s("portal_button_icon",u),onUpload:g,children:r.jsx(rt,{className:"dark:text-white",name:"upload",size:"md"})})})]})]}),h?.toString()?.includes("text")&&r.jsx(Ne,{title:"Signup button text",value:m,onChange:k=>s("portal_button_signup_text",k.target.value)})]})]})})},Lr=({name:e,value:s})=>{const a=D.useId();return r.jsx($n,{action:r.jsx(Ue,{color:"black",label:"Copy",link:!0,onClick:o=>{navigator.clipboard.writeText(s);const c=o?.target;c.innerText="Copied",setTimeout(()=>{c.innerText="Copy"},1e3)}}),separator:!0,children:r.jsxs("div",{className:"flex w-full grow flex-col py-3 lg:flex-row lg:items-center lg:gap-5",children:[r.jsxs("label",{className:"inline-block whitespace-nowrap lg:w-[180px] lg:min-w-[180px]",htmlFor:a,children:[e,":"]}),r.jsx(Ne,{className:"border-b-500 grow bg-transparent py-1 text-grey-700 lg:p-1",id:a,value:s,disabled:!0,unstyled:!0})]})})},NE=()=>{const[e,s]=D.useState(!1),[a,o]=D.useState(""),{siteData:c}=Qe(),{data:{tiers:h}={}}=Vs(),y=sl(h||[]),m=()=>{s(!e)};D.useEffect(()=>{y?.length&&!a&&o(y[0].id)},[y,a]);const l=y?.map(u=>({label:u.name,value:u.id})),f=Xr(c);return r.jsxs(hd,{className:"max-w-[920px] text-base text-black dark:text-white",heading:"Links",children:[r.jsxs("p",{className:"-mt-6 mb-16",children:["Use these ",e?"data attributes":"links"," in your theme to show pages of Portal."]}),r.jsxs(cn,{actions:r.jsx(Ue,{color:"green",label:e?"Links":"Data attributes",link:!0,onClick:m}),title:"Generic",titleSize:"lg",children:[r.jsx(Lr,{name:"Default",value:e?"data-portal":`${f}#/portal`}),r.jsx(Lr,{name:"Sign in",value:e?'data-portal="signin"':`${f}#/portal/signin`}),r.jsx(Lr,{name:"Sign up",value:e?'data-portal="signup"':`${f}#/portal/signup`})]}),r.jsxs(cn,{className:"mt-14",title:"Tiers",titleSize:"lg",children:[r.jsx($n,{hideActions:!0,separator:!0,children:r.jsxs("div",{className:"flex w-full items-center gap-2 py-2",children:[r.jsx("span",{className:"inline-block w-[180px] min-w-[180px] shrink-0",children:"Tier:"}),r.jsx(Ot,{options:l,selectedOption:l.find(u=>u.value===a),onSelect:u=>{u&&o(u?.value)}})]})}),r.jsx(Lr,{name:"Signup / Monthly",value:e?`data-portal="signup/${a}/monthly"`:`${f}#/portal/signup/${a}/monthly`}),r.jsx(Lr,{name:"Signup / Yearly",value:e?`data-portal="signup/${a}/yearly"`:`${f}#/portal/signup/${a}/yearly`}),r.jsx(Lr,{name:"Signup / Free",value:e?'data-portal="signup/free"':`${f}#/portal/signup/free`})]}),r.jsxs(cn,{className:"mt-14",title:"Account",titleSize:"lg",children:[r.jsx(Lr,{name:"Account",value:e?'data-portal="account"':`${f}#/portal/account`}),r.jsx(Lr,{name:"Account / Plans",value:e?'data-portal="account/plans"':`${f}#/portal/account/plans`}),r.jsx(Lr,{name:"Account / Profile",value:e?'data-portal="account/profile"':`${f}#/portal/account/profile`}),r.jsx(Lr,{name:"Account / Newsletters",value:e?'data-portal="account/newsletters"':`${f}#/portal/account/newsletters`}),r.jsx(Lr,{name:"Account / Newsletter help",value:e?'data-portal="account/newsletters/help"':`${f}#/portal/account/newsletters/help`})]})]})},SE=({settings:e,config:s,tiers:a,siteData:o,selectedTab:c})=>{if(!o?.url)return null;let h=a.filter(b=>b.visibility==="public"&&b.type==="paid").map(b=>b.id);const y=o.url.replace(/\/$/,""),m="/?v=modal-portal-settings#/portal/preview",l=JSON.parse(dr(e,"portal_plans")||""),f=new URLSearchParams;f.append("button",dr(e,"portal_button")?"true":"false"),f.append("name",dr(e,"portal_name")?"true":"false"),f.append("isFree",l.includes("free")?"true":"false"),f.append("isMonthly",qs(e,s)&&l.includes("monthly")?"true":"false"),f.append("isYearly",qs(e,s)&&l.includes("yearly")?"true":"false"),f.append("page",c==="account"?"accountHome":"signup"),f.append("buttonIcon",encodeURIComponent(dr(e,"portal_button_icon")||"icon-1")),f.append("signupButtonText",encodeURIComponent(dr(e,"portal_button_signup_text")||"")),f.append("membersSignupAccess",dr(e,"members_signup_access")||"all"),f.append("allowSelfSignup",dr(e,"allow_self_signup")||"false"),f.append("signupTermsHtml",dr(e,"portal_signup_terms_html")||""),f.append("signupCheckboxRequired",dr(e,"portal_signup_checkbox_required")?"true":"false"),f.append("portalProducts",h.join(","));const u=dr(e,"portal_default_plan");u&&f.append("portalDefaultPlan",u),l&&l.length&&f.append("portalPrices",encodeURIComponent(l.join(",")));const d=dr(e,"accent_color");d!=null&&f.append("accentColor",encodeURIComponent(d));const g=dr(e,"portal_button_style");return g&&f.append("buttonStyle",encodeURIComponent(g)),f.append("disableBackground","false"),`${y}${m}?${f.toString()}`},AE=({selectedTab:e="signup",localSettings:s,localTiers:a})=>{const{siteData:o,config:c}=Qe(),h=SE({settings:s,tiers:a,selectedTab:e,siteData:o,config:c});let y=r.jsx(r.Fragment,{});switch(e){case"account":y=r.jsx(r.Fragment,{children:r.jsx(Qi,{href:h||"",portalParent:"preview",selectedTab:e})});break;case"links":y=r.jsx(NE,{});break;default:y=r.jsx(r.Fragment,{children:r.jsx(Qi,{href:h||"",portalParent:"preview",selectedTab:e})});break}return y},CE=({localSettings:e,updateSetting:s,localTiers:a,updateTier:o,errors:c,setError:h})=>{const{config:y}=Qe(),[m,l,f,u,d,g]=xt(e,["members_signup_access","portal_name","portal_signup_terms_html","portal_signup_checkbox_required","portal_plans","portal_default_plan"]),b=JSON.parse(d?.toString()||"[]"),_=115,k=D.useMemo(()=>{const X=document.createElement("div");return X.innerHTML=f?.toString()||"",X.innerText.length},[f]),M=D.useCallback((X,Y)=>{h(X,Y)},[]);D.useEffect(()=>{k>_?M("portal_signup_terms_html","Signup notice is too long"):M("portal_signup_terms_html",void 0)},[k,M]);const T=X=>{const Y=b.indexOf(X);Y===-1?b.push(X):b.splice(Y,1),s("portal_plans",JSON.stringify(b)),g==="yearly"?!b.includes("yearly")&&b.includes("monthly")&&s("portal_default_plan","monthly"):g==="monthly"&&(b.includes("monthly")||s("portal_default_plan","yearly"))},A=m==="all"||m==="paid",I=m==="all",O=qs(e,y);let $=[];a&&a.forEach(X=>{X.type==="free"&&I&&$.push({checked:b.includes("free"),disabled:!A,label:X.name,value:"free",testId:"free-tier-checkbox",onChange:Y=>{b.includes("free")&&!Y&&b.splice(b.indexOf("free"),1),!b.includes("free")&&Y&&b.push("free"),s("portal_plans",JSON.stringify(b)),o({...X,visibility:Y?"public":"none"})}})});const q=sl(a)||[],R=[{value:"yearly",label:"Yearly"},{value:"monthly",label:"Monthly"}];O&&q.length>0&&q.forEach(X=>{$.push({checked:X.visibility==="public",label:X.name,value:X.id,onChange:(Y=>o({...X,visibility:Y?"public":"none"}))})});const K=O&&q.length>0&&q.some(X=>X.visibility==="public");return r.jsx("div",{className:"mt-7",children:r.jsxs(et,{children:[r.jsx(st,{checked:!!l,direction:"rtl",disabled:!A,label:"Display name in signup form",onChange:X=>s("portal_name",X.target.checked)}),r.jsx($f,{checkboxes:$,title:"Available tiers"}),K&&r.jsxs(r.Fragment,{children:[r.jsx($f,{checkboxes:[{checked:b.includes("monthly"),disabled:!A,label:"Monthly",value:"monthly",onChange:()=>{T("monthly")}},{checked:b.includes("yearly"),disabled:!A,label:"Yearly",value:"yearly",onChange:()=>{T("yearly")}}],title:"Available prices"}),b.includes("yearly")&&b.includes("monthly")&&r.jsx(Ot,{options:R,selectedOption:R.find(X=>X.value===g),title:"Default price at signup",onSelect:X=>{s("portal_default_plan",X?.value??"yearly")}})]}),r.jsx(dd,{error:!!c.portal_signup_terms_html,hint:c.portal_signup_terms_html||r.jsxs(r.Fragment,{children:["Recommended: ",r.jsx("strong",{children:"115"})," characters. You've used ",r.jsx("strong",{className:"text-green",children:k})]}),nodes:"MINIMAL_NODES",placeholder:"By signing up, I agree to receive emails from ...",title:"Display notice at signup",value:f?.toString(),onChange:X=>s("portal_signup_terms_html",X)}),f?.toString()&&r.jsx(st,{checked:!!u,disabled:!A,label:"Require agreement",labelStyle:"heading",onChange:X=>s("portal_signup_checkbox_required",X.target.checked)})]})})},IE="SettingsResponseType",DE=ns({path:()=>"/settings/verifications",method:"PUT",body:({token:e})=>({token:e}),updateQueries:{dataType:IE,emberUpdateType:"createOrUpdate",update:e=>({...e,settings:e.settings})}}),RE=({localSettings:e,updateSetting:s,localTiers:a,updateTier:o,errors:c,setError:h})=>{const[y,m]=D.useState("signupOptions"),l=[{id:"signupOptions",title:"Signup options",contents:r.jsx(CE,{errors:c,localSettings:e,localTiers:a,setError:h,updateSetting:s,updateTier:o})},{id:"lookAndFeel",title:"Look & feel",contents:r.jsx(TE,{localSettings:e,updateSetting:s})},{id:"accountPage",title:"Account page",contents:r.jsx(EE,{errors:c,setError:h,updateSetting:s})}],f=u=>{m(u)};return r.jsx("div",{className:"pt-4",children:r.jsx(fn,{selectedTab:y,tabs:l,onTabChange:f})})},OE=()=>{const{updateRoute:e}=Ve(),[s,a]=D.useState("signup"),o=it(),{settings:c,siteData:h,config:y}=Qe(),{mutateAsync:m}=On(),{data:{tiers:l}={}}=Vs(),{mutateAsync:f}=ud(),{mutateAsync:u}=DE(),{getParam:d}=n0(),g=d("verifyEmail");D.useEffect(()=>{g&&(async({token:J})=>{try{let{settings:te}=await u({token:J});const[ne]=xt(te,["members_support_address"]);ye.show(Et,{title:"Support address verified",prompt:r.jsxs(r.Fragment,{children:["Your support email address has been changed to ",r.jsx("strong",{children:ne}),"."]}),okLabel:"Close",cancelLabel:"",onOk:Q=>Q?.remove()})}catch(te){let ne="There was an error verifying your email address. Please try again.";te?.message==="Token expired"&&(ne="Verification link has expired."),ye.show(Et,{title:"Error verifying support address",prompt:ne,okLabel:"Close",cancelLabel:"",onOk:Q=>Q?.remove()}),o(te,{withToast:!1})}})({token:g})},[o,g,u]);const{formState:b,setFormState:_,saveState:k,handleSave:M,updateForm:T,okProps:A}=pr({initialState:{settings:c,tiers:l||[]},savingDelay:500,onSave:async()=>{await Promise.all(b.tiers.filter(({dirty:ne})=>ne).map(ne=>f(ne))),_(ne=>({...ne,tiers:b.tiers.map(Q=>({...Q,dirty:!1}))}));const B=b.settings.filter(ne=>ne.dirty);if(!B.length)return;const{meta:J,settings:te}=await m(B);if(_(ne=>({...ne,settings:b.settings.map(Q=>({...Q,dirty:!1}))})),J?.sent_email_verification){const ne=b.settings.find(se=>se.key==="members_support_address")?.value,Q=te.find(se=>se.key==="support_email_address")?.value||Df(te.find(se=>se.key==="members_support_address")?.value?.toString()||"noreply",h,y);ye.show(Et,{title:"Confirm email address",prompt:r.jsxs(r.Fragment,{children:["We've sent a confirmation email to ",r.jsx("strong",{children:ne}),". Until verified, your support email address will remain ",Q,"."]}),okLabel:"Close",cancelLabel:"",onOk:se=>se?.remove()})}},onSaveError:o});D.useEffect(()=>{!b.tiers.length&&l?.length&&_(B=>({...B,tiers:l}))},[l,b.tiers,_]);const[I,O]=D.useState({}),$=(B,J)=>{T(te=>({...te,settings:te.settings.map(ne=>ne.key===B?{...ne,value:J,dirty:!0}:ne)}))},q=(B,J)=>{O(te=>({...te,[B]:J}))},R=B=>{T(J=>({...J,tiers:J.tiers.map(te=>te.id===B.id?{...B,dirty:!0}:te)}))},K=B=>{a(B)},X=r.jsx(RE,{errors:I,localSettings:b.settings,localTiers:b.tiers,setError:q,updateSetting:$,updateTier:R}),Y=r.jsx(AE,{localSettings:b.settings,localTiers:b.tiers,selectedTab:s});let L=[{id:"signup",title:"Signup"},{id:"account",title:"Account page"},{id:"links",title:"Links"}];return r.jsx(as,{afterClose:()=>{e("portal")},buttonsDisabled:A.disabled,cancelLabel:"Close",deviceSelector:!1,dirty:k==="unsaved",okColor:A.color,okLabel:A.label||"Save",preview:Y,previewBgColor:s==="links"?"white":"greygradient",previewToolbarTabs:L,selectedURL:s,sidebar:X,testId:"portal-modal",title:"Portal",onOk:async()=>{Object.values(I).filter(Boolean).length||await M({force:!0})},onSelectURL:K})},$E=ye.create(OE),LE=ye.create(()=>{const{updateRoute:e}=Ve(),{localSettings:s,updateSetting:a,handleSave:o,validate:c,errors:h,clearError:y,okProps:m}=ss({onValidate:()=>{const b={};return l&&!St.isURL(l,{require_protocol:!0})&&(b.slackUrl="The URL must be in a format like https://hooks.slack.com/services/<your personal key>"),b},savingDelay:500}),[l,f]=xt(s,["slack_url","slack_username"]),{mutateAsync:u}=D_(),d=async()=>{Qa.remove(),await o()&&(await u(null),mt({title:"Check your Slack channel for the test message",type:"info"}))},g=s.some(b=>b.dirty);return r.jsxs(vt,{afterClose:()=>{e("integrations")},cancelLabel:"Close",dirty:g,okColor:m.color,okLabel:m.label||"Save",testId:"slack-modal",title:"",onOk:async()=>{Qa.remove(),await o()},children:[r.jsx(Js,{detail:"A messaging app for teams",icon:r.jsx(rt,{name:"slack",size:56}),title:"Slack"}),r.jsx("div",{className:"mt-7",children:r.jsxs(et,{marginBottom:!1,title:"Slack configuration",grouped:!0,children:[r.jsx(Ne,{error:!!h.slackUrl,hint:h.slackUrl||r.jsxs(r.Fragment,{children:["Automatically send newly published posts to a channel in Slack or any Slack-compatible service like Discord or Mattermost. Set up a new incoming webhook ",r.jsx("a",{href:"https://my.slack.com/apps/new/A0F7XDUAZ-incoming-webhooks",children:"here"}),", and grab the URL."]}),placeholder:"https://hooks.slack.com/services/...",title:"Webhook URL",value:l,onBlur:c,onChange:b=>a("slack_url",b.target.value),onKeyDown:()=>y("slackUrl")}),r.jsxs("div",{className:"flex w-full flex-col gap-2 md:flex-row md:items-center",children:[r.jsx(Ne,{containerClassName:"flex-grow",hint:"The username to display messages from",title:"Username",value:f,onChange:b=>a("slack_username",b.target.value)}),r.jsx(Ue,{color:"outline",label:"Send test notification",onClick:d})]})]})})]})}),PE=""+new URL("stripe-thumb-Cu2h4McY.jpg",import.meta.url).href,FE=""+new URL("orb-squircle-e1heFqOI.png",import.meta.url).href,UE="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20400%20400'%20style='enable-background:new%200%200%20400%20400'%20xml:space='preserve'%3e%3cpath%20style='fill-rule:evenodd;clip-rule:evenodd;fill:%23635bff'%20d='M0%200h400v400H0z'/%3e%3cpath%20d='M184.4%20155.5c0-9.4%207.7-13.1%2020.5-13.1%2018.4%200%2041.6%205.6%2060%2015.5v-56.8C244.8%2093.1%20225%2090%20205%2090c-49.1%200-81.7%2025.6-81.7%2068.4%200%2066.7%2091.9%2056.1%2091.9%2084.9%200%2011.1-9.7%2014.7-23.2%2014.7-20.1%200-45.7-8.2-66-19.3v57.5c22.5%209.7%2045.2%2013.8%2066%2013.8%2050.3%200%2084.9-24.9%2084.9-68.2-.4-72-92.5-59.2-92.5-86.3z'%20style='fill-rule:evenodd;clip-rule:evenodd;fill:%23fff'/%3e%3c/svg%3e",zE=""+new URL("stripe-verified-DM7Q8nrY.svg",import.meta.url).href,Qf=1e3,HE=15*Qf,BE=({onNext:e})=>r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx(bt,{level:3,children:"Getting paid"}),r.jsx("img",{alt:"Stripe Verified Partner Badge",src:zE})]}),r.jsxs("div",{className:"mb-7 mt-6",children:["Stripe is our exclusive direct payments partner. Ghost collects ",r.jsx("strong",{children:"no fees"})," on any payments! If you don’t have a Stripe account yet, you can ",r.jsx("a",{className:"underline",href:"https://stripe.com",rel:"noopener noreferrer",target:"_blank",children:"sign up here"}),"."]}),r.jsx(d0,{label:r.jsx(r.Fragment,{children:"I have a Stripe account, let's go →"}),onClick:e})]}),WE=()=>{const[e,s]=D.useState(!1),[a,o]=D.useState(""),[c,h]=D.useState(!1),[y,m]=D.useState(""),{refetch:l}=Vs({searchParams:{filter:"type:paid+active:true"},enabled:!1}),{mutateAsync:f}=ud(),{mutateAsync:u}=On(),d=it(),g=T=>{o(T.target.value),s(!!T.target.value)},b=async()=>{const{data:T}=await l(),A=T?.pages[0].tiers[0];if(A){A.monthly_price=500,A.yearly_price=5e3,A.currency="USD";let I=0;for(;I<HE;){await new Promise(O=>{setTimeout(O,Qf)});try{await f(A);break}catch(O){if(O instanceof ts&&O.data?.errors?.[0].code==="STRIPE_NOT_CONFIGURED"){I+=Qf;continue}else{d(O);return}}}}},_=async()=>{if(m(""),a)try{await u([{key:"stripe_connect_integration_token",value:a}]),await b(),await u([{key:"portal_plans",value:JSON.stringify(["free","monthly","yearly"])}])}catch(T){if(T instanceof ts&&T.data?.errors){m("Invalid secure key");return}else{d(T);return}}else m("Please enter a secure key")},{apiRoot:k}=ao(),M=`${k}/members/stripe_connect?mode=${c?"test":"live"}`;return r.jsxs("div",{children:[r.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[r.jsx(bt,{level:3,children:"Connect with Stripe"}),r.jsx(st,{direction:"rtl",label:"Test mode",labelClasses:`text-sm translate-y-[1px] ${c?"text-[#EC6803]":"text-grey-800"}`,toggleBg:"stripetest",onChange:T=>h(T.target.checked)})]}),r.jsxs(bt,{level:6,grey:!0,children:["Step 1 — ",r.jsx("span",{className:"text-black dark:text-white",children:"Generate secure key"})]}),r.jsxs("div",{className:"mb-4 mt-2",children:["Click on the ",r.jsx("strong",{children:"“Connect with Stripe”"})," button to generate a secure key that connects your Ghost site with Stripe."]}),r.jsx(d0,{href:M,tag:"a",target:"_blank"}),r.jsxs(bt,{className:"mb-2 mt-8",level:6,grey:!0,children:["Step 2 — ",r.jsx("span",{className:"text-black dark:text-white",children:"Paste secure key"})]}),r.jsx(dn,{error:!!y,hint:y||void 0,placeholder:"Paste your secure key here",onChange:g}),e&&r.jsx(Ue,{className:"mt-5",color:"green",label:"Save Stripe settings",onClick:_})]})},qE=({onClose:e})=>{const{settings:s}=Qe(),[a,o]=xt(s,["stripe_connect_display_name","stripe_connect_livemode"]),{refetch:c,isFetching:h}=Kg({searchParams:{filter:"status:paid",limit:"0"},enabled:!1}),{mutateAsync:y}=R_(),m=it(),l=async()=>{const{data:f}=await c(),u=!!f?.meta?.pagination.total;ye.show(Et,{title:"Disconnect Stripe",prompt:u?"Cannot disconnect while there are members with active Stripe subscriptions.":r.jsxs(r.Fragment,{children:["You‘re about to disconnect your Stripe account ",a," from this site. This will automatically turn off paid memberships on this site."]}),okLabel:u?"":"Disconnect",onOk:async d=>{try{await y(null),d?.remove(),e?.()}catch(g){m(g)}}})};return r.jsxs("section",{children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx(Ue,{color:"red",disabled:h,icon:"link-broken",iconColorClass:"text-red",label:"Disconnect",link:!0,onClick:l}),r.jsx(Ue,{icon:"close",iconColorClass:"dark:text-white",label:"Close",size:"sm",hideLabel:!0,link:!0,onClick:e})]}),r.jsxs("div",{className:"my-20 flex flex-col items-center",children:[r.jsxs("div",{className:"relative h-20 w-[200px]",children:[r.jsx("img",{alt:"Ghost Logo",className:"absolute left-10 size-16",src:FE}),r.jsx("img",{alt:"Stripe Logo",className:"absolute right-10 size-16 rounded-2xl shadow-[-1.5px_0_0_1.5px_#fff] dark:shadow-[-1.5px_0_0_1.5px_black]",src:UE})]}),r.jsxs(bt,{className:"text-center",level:3,children:["You are connected with Stripe!",o?null:" (Test mode)"]}),r.jsxs("div",{className:"mt-1",children:["Connected to ",r.jsx("strong",{children:a||"Test mode"})]})]}),r.jsxs("div",{className:"flex flex-col items-center",children:[r.jsx(bt,{level:6,children:"Read next"}),r.jsxs("a",{className:"w-100 mt-5 flex flex-col items-stretch justify-between rounded-sm border border-grey-200 transition-all hover:border-grey-400 md:flex-row dark:border-grey-900",href:"https://ghost.org/resources/managing-your-stripe-account/?ref=admin",rel:"noopener noreferrer",target:"_blank",children:[r.jsxs("div",{className:"order-2 p-4 md:order-1",children:[r.jsx("div",{className:"font-bold",children:"How to setup and manage your Stripe account"}),r.jsx("div",{className:"mt-1 text-sm text-grey-800 dark:text-grey-500",children:"Learn how to configure your Stripe account to work with Ghost, from custom branding to payment receipt emails."}),r.jsxs("div",{className:"mt-3 flex items-center gap-1 text-sm text-grey-800 dark:text-grey-500",children:[r.jsx("img",{alt:"Ghost Logo",className:"size-4",src:N2}),r.jsx("strong",{children:"Ghost Resources"}),r.jsx("span",{children:"·"}),r.jsx("span",{children:"by Kym Ellis"})]})]}),r.jsx("div",{className:"order-1 hidden w-[200px] shrink-0 items-center justify-center overflow-hidden md:!visible md:order-2 md:!flex",children:r.jsx("img",{alt:"Bookmark Thumb",className:"min-h-full min-w-full shrink-0",src:PE})})]})]})]})},YE=({onClose:e})=>{const{localSettings:s,updateSetting:a,handleSave:o,saveState:c}=ss(),[h,y]=xt(s,["stripe_publishable_key","stripe_secret_key"]),m=async()=>{try{O_.remove(),await o(),e()}catch(l){if(l instanceof ts){mt({title:"Failed to save settings",type:"error",message:"Check you copied both keys correctly"});return}throw l}};return r.jsxs("div",{children:[r.jsx(bt,{level:3,children:"Connect Stripe"}),r.jsxs(et,{marginBottom:!1,marginTop:!0,children:[r.jsx(Ne,{title:"Publishable key",value:h?.toString(),onChange:l=>a("stripe_publishable_key",l.target.value)}),r.jsx(Ne,{title:"Secure key",value:y?.toString(),onChange:l=>a("stripe_secret_key",l.target.value)}),r.jsx(Ue,{className:"mt-5",color:"green",disabled:c==="saving",label:"Save Stripe settings",onClick:m})]})]})},GE=()=>{const{config:e,settings:s}=Qe(),a=dr(s,"stripe_connect_account_id"),{updateRoute:o}=Ve(),[c,h]=D.useState("start"),y=Gt(),m=Gs(),l=qs(s,e),f=m?.isDisabled("limitStripeConnect");D.useEffect(()=>{(async()=>{if(f&&!l)try{await m?.errorIfWouldGoOverLimit("limitStripeConnect")}catch(_){_ instanceof Xs&&(y.remove(),ye.show(Vr,{prompt:_.message||"Your current plan doesn't support Stripe Connect.",onOk:()=>o({route:"/pro",isExternal:!0})}))}})()},[m,y,o,l,f]);const u=()=>{h("connect")},d=()=>{y.remove(),o("tiers")};let g;return e?.stripeDirect||qs(s||[],e||{})&&!a?g=r.jsx(YE,{onClose:d}):a?g=r.jsx(qE,{onClose:d}):c==="start"?g=r.jsx(BE,{onNext:u}):g=r.jsx(WE,{}),r.jsx(vt,{afterClose:()=>{o("tiers")},cancelLabel:"",footer:r.jsx("div",{className:"mt-8"}),testId:"stripe-modal",title:"",width:a?740:520,hideXOnMobile:!0,children:g})},XE=ye.create(GE),KE=""+new URL("ali-abdaal-C_tOLbSs.png",import.meta.url).href,VE=""+new URL("isaac-saul-DhERrV-4.png",import.meta.url).href,ZE=""+new URL("joel-warner-CHe_ZipQ.png",import.meta.url).href,QE=ye.create(()=>{const{updateRoute:e}=Ve(),s=it(),a=Gt(),{settings:o,currentUser:c,siteData:h,config:y}=Qe(),m=y.exploreTestimonialsUrl,l=h.site_uuid,[f]=xt(o,["title"]),u=c.name,d=c.email,g=c.roles[0].name,b=c.profile_image,{formState:_,updateForm:k,saveState:M,handleSave:T,errors:A,clearError:I}=pr({initialState:{content:"",prev_platform:""},onSave:async()=>{const $=["none","other",""].includes(_.prev_platform)?void 0:_.prev_platform,q={ghost_uuid:l,staff_user_email:d,content:_.content,prev_platform:$};if(!m)throw new Error("Something went wrong, please try again later.");if(!(await fetch(m,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(q)})).ok)throw new Error("Something went wrong, please try again later.");mt({message:"Thank you for your testimonial!",type:"success"}),e("explore"),a.remove()},onSaveError:s,onValidate:()=>{const $={};return _.content.trim()||($.content="This field is required"),$}}),O=[{value:"none",label:"None - This is a new site"},{value:"substack",label:"Substack"},{value:"beehiiv",label:"BeeHiiv"},{value:"wordpress",label:"WordPress"},{value:"newspack",label:"Newspack"},{value:"medium",label:"Medium"},{value:"squarespace",label:"Squarespace"},{value:"wix",label:"Wix"},{value:"patreon",label:"Patreon"},{value:"memberful",label:"Memberful"},{value:"other",label:"Other"}];return r.jsx(vt,{afterClose:()=>{e("explore")},cancelLabel:"",footer:!1,padding:!1,testId:"explore-testimonials-modal",title:"",topRightContent:"close",width:920,children:r.jsx(et,{className:"!mb-0",children:r.jsxs("div",{className:"flex items-stretch",children:[r.jsxs("div",{className:"hidden w-full flex-col justify-between bg-gradient-to-tl from-grey-100/50 to-grey-100/80 p-8 dark:from-grey-900/40 dark:to-grey-900/60 [@media(min-width:905px)]:!visible [@media(min-width:905px)]:!flex",children:[r.jsxs("div",{className:"pr-6",children:[r.jsx("div",{className:"relative rounded-xl bg-white px-3 py-2.5 italic text-grey-700 shadow-lg before:absolute before:-bottom-1.5 before:left-5 before:block before:size-3 before:rotate-45 before:bg-white dark:bg-black dark:text-grey-300 before:dark:bg-black",children:"Moving to Ghost has proven to be one of the best business decisions we’ve made as an independent media outlet."}),r.jsxs("div",{className:"ml-2 mt-[14px] flex items-center gap-2 text-sm",children:[r.jsx("div",{className:"size-9 rounded-full bg-white bg-cover bg-center opacity-90 grayscale",style:{backgroundImage:`url(${ZE})`}}),r.jsxs("div",{children:[r.jsx("div",{className:"font-medium text-black dark:text-white",children:"Joel Warner"}),r.jsx("div",{className:"-mt-0.5 text-grey-700",children:"Lever News"})]})]})]}),r.jsxs("div",{className:"ml-6 mt-8",children:[r.jsx("div",{className:"relative rounded-xl bg-white px-3 py-2.5 italic text-grey-700 shadow-lg before:absolute before:-bottom-1.5 before:right-5 before:block before:size-3 before:rotate-45 before:bg-white dark:bg-black dark:text-grey-300 before:dark:bg-black",children:"It has now been one year since I quit my full-time job to go all in on Tangle. Today, we have 50,000+ paying subscribers. That’s roughly $5M in gross yearly revenue ... it’s the best paying job I’ve ever had."}),r.jsxs("div",{className:"mr-2 mt-[14px] flex items-center justify-end gap-2 text-sm",children:[r.jsxs("div",{className:"flex flex-col items-end",children:[r.jsx("div",{className:"font-medium text-black dark:text-white",children:"Isaac Saul"}),r.jsx("div",{className:"-mt-0.5 text-grey-700",children:"Tangle"})]}),r.jsx("div",{className:"size-9 rounded-full bg-white bg-cover bg-center opacity-90 grayscale",style:{backgroundImage:`url(${VE})`}})]})]}),r.jsxs("div",{className:"mt-8 hidden pr-6 [@media(min-width:940px)]:!visible [@media(min-width:940px)]:!block",children:[r.jsx("div",{className:"relative rounded-xl bg-white px-3 py-2.5 italic text-grey-700 shadow-lg before:absolute before:-bottom-1.5 before:left-5 before:block before:size-3 before:rotate-45 before:bg-white dark:bg-black dark:text-grey-300 before:dark:bg-black",children:"You should be using Ghost because it’s absolutely amazing and I love it. It’s what I’ve been using for all my sites since 2016."}),r.jsxs("div",{className:"ml-2 mt-[14px] flex items-center gap-2 text-sm",children:[r.jsx("div",{className:"size-9 rounded-full bg-white bg-cover bg-center opacity-90 grayscale",style:{backgroundImage:`url(${KE})`}}),r.jsxs("div",{children:[r.jsx("div",{className:"font-medium text-black dark:text-white",children:"Ali Abdaal"}),r.jsx("div",{className:"-mt-0.5 text-grey-700",children:"YouTuber"})]})]})]})]}),r.jsxs("div",{className:"flex grow flex-col justify-between gap-6 p-8 [@media(min-width:905px)]:min-w-[520px] [@media(min-width:940px)]:min-w-[460px]",children:[r.jsxs("div",{children:[r.jsx("div",{className:"flex size-[60px] items-center justify-center rounded-full bg-gradient-to-t from-[#CFB0FF] to-[#B27EFF]",children:r.jsx("svg",{fill:"none",height:"26",viewBox:"0 0 32 26",width:"32",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M19.9967 26L18.1562 21.4542C23.4268 19.1176 25.7693 16.5261 26.2712 11.7255C25.5183 12.3627 24.5562 12.7026 23.3431 12.7026C20.1641 12.7026 17.4869 10.1536 17.4869 6.41503C17.4869 2.80392 20.3732 9.72736e-07 24.2634 6.32644e-07C28.2791 2.81581e-07 31.5 3.10131 31.5 8.96405C31.5 17.5458 27.4425 23.0261 19.9967 26ZM3.0098 26L1.12745 21.4543C6.43987 19.1176 8.78235 16.5261 9.24248 11.7255C8.53137 12.3627 7.56928 12.7026 6.35621 12.7026C3.17712 12.7026 0.499999 10.1536 0.499998 6.41504C0.499998 2.80393 3.38627 2.45778e-06 7.23464 2.12135e-06C11.2503 1.77028e-06 14.5131 3.10131 14.5131 8.96405C14.5131 17.5458 10.4556 23.0261 3.0098 26Z",fill:"white"})})}),r.jsxs("div",{className:"mt-6",children:[r.jsx("div",{className:"text-2xl font-semibold tracking-tight",children:"A quote about Ghost"}),r.jsx("div",{className:"mt-2 text-pretty",children:"We feature quotes from publishers to showcase their work, including a logo and a link! If you'd like to be included, share a quote we can use to highlight you."})]}),r.jsx("div",{className:"mt-8",children:r.jsx(dn,{error:!!A.content,hint:A.content,placeholder:"What changed for the better since you switched to Ghost?",rows:7,value:_.content,autoFocus:!0,onChange:$=>k(q=>({...q,content:$.target.value})),onKeyDown:()=>I("content")})}),r.jsx("div",{className:"ml-0.5 mt-4",children:r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(a0,{bgColor:i0(u||d),image:b??void 0,label:o0(u),labelColor:"white",size:"md"}),r.jsxs("div",{className:"flex flex-col",children:[r.jsxs("span",{className:"text-sm font-medium",children:["By ",u||d]}),r.jsxs("span",{className:"text-xs text-grey-700",children:[g," — ",f]})]})]})})]}),r.jsx("div",{children:r.jsxs("div",{className:"mt-2 flex items-center gap-4",children:[r.jsx("div",{className:"grow",children:r.jsx(Ot,{error:!!A.prev_platform,hint:A.prev_platform,options:O,placeholder:"Previous platform",selectedOption:O.find($=>$.value===_.prev_platform),testId:"migrated-from",onSelect:$=>{k(q=>({...q,prev_platform:$?.value||""})),I("prev_platform")}})}),r.jsx(Ue,{className:"!h-[38px] rounded-lg",color:"black",disabled:M==="saving",label:"Send testimonial",loading:M==="saving",onClick:async()=>{await T()}})]})})]})]})})})}),JE=""+new URL("ghost-transistor-BXCFhTPG.png",import.meta.url).href,eT=ye.create(()=>{const{updateRoute:e}=Ve(),{settings:s}=Qe(),{mutateAsync:a}=On(),{data:{integrations:o}={integrations:[]}}=nd(),{mutateAsync:c}=gd(),h=it(),[y,m]=D.useState(!1),[l]=xt(s,["transistor"]),[f,u]=D.useState(!!l),[d,g]=D.useState("Save");D.useEffect(()=>{u(l||!1)},[l]);const b=o.find(({slug:T})=>T==="transistor"),_=b?.api_keys?.find(T=>T.type==="admin"),k=()=>{if(!b||!_)throw new Error("Transistor integration or Admin API key not found");m(!1),ye.show(Et,{title:"Regenerate Admin API Key",prompt:"You will need to update the API key in your Transistor account settings after regenerating.",okLabel:"Regenerate Admin API Key",onOk:async T=>{try{await c({integrationId:b.id,apiKeyId:_.id}),m(!0),T?.remove()}catch(A){h(A)}}})},M=async()=>{const T=[{key:"transistor",value:f}];try{g("Saving..."),await Promise.all([a(T),new Promise(A=>{setTimeout(A,1e3)})]),g("Saved")}catch(A){h(A)}finally{setTimeout(()=>g("Save"),1e3)}};return r.jsxs(vt,{afterClose:()=>{e("integrations")},cancelLabel:"Close",dirty:f!==l,okColor:d==="Saved"?"green":"black",okLabel:d,testId:"transistor-modal",title:"",onOk:M,children:[r.jsx(Js,{detail:"Podcast hosting platform",icon:r.jsx(rt,{name:"transistor",size:56}),title:"Transistor"}),r.jsxs("div",{className:"mt-7",children:[r.jsxs(et,{marginBottom:!1,title:"Transistor configuration",grouped:!0,children:[r.jsx(st,{checked:f,direction:"rtl",hint:r.jsxs(r.Fragment,{children:["Connect your Ghost site with ",r.jsx("a",{className:"text-green",href:"https://transistor.fm",rel:"noopener noreferrer",target:"_blank",children:"Transistor.fm"})," to start offering members private podcasts."]}),label:"Enable Transistor",onChange:T=>{u(T.target.checked)}}),f&&r.jsx(cl,{keys:[{label:"Admin API key",text:_?.secret,hint:y?r.jsx("div",{className:"text-green",children:"Admin API Key was successfully regenerated"}):void 0,onRegenerate:k},{label:"API URL",text:window.location.origin+ao().subdir}]})]}),f&&r.jsx("div",{className:"mt-5 flex flex-col items-center",children:r.jsxs("a",{className:"w-100 flex flex-col items-stretch justify-between overflow-hidden rounded-md bg-grey-75 transition-all hover:border-grey-400 hover:bg-grey-100 md:flex-row",href:"https://ghost.org/integrations/transistor/",rel:"noopener noreferrer",target:"_blank",children:[r.jsxs("div",{className:"order-2 px-7 py-5 md:order-1",children:[r.jsx("div",{className:"font-semibold",children:"How to use Transistor in Ghost"}),r.jsx("div",{className:"mt-1 text-sm text-grey-800 dark:text-grey-500",children:"Learn how to connect Transistor with Ghost to offer private podcasts in Portal and embed Transistor cards in your posts and pages."})]}),r.jsx("div",{className:"order-1 hidden w-[200px] shrink-0 items-center justify-center overflow-hidden md:!visible md:order-2 md:!flex",children:r.jsx("img",{alt:"Bookmark Thumb",className:"min-h-full min-w-full shrink-0",src:JE})})]})})]})]})}),tT=ye.create(()=>{const{updateRoute:e}=Ve(),{settings:s}=Qe(),[a]=xt(s,["unsplash"]),{mutateAsync:o}=On(),c=it(),[h,y]=D.useState("Save"),[m,l]=D.useState(!!a);D.useEffect(()=>{l(a||!1)},[a]);const f=async()=>{const d=[{key:"unsplash",value:m}];try{y("Saving..."),await Promise.all([o(d),new Promise(g=>{setTimeout(g,1e3)})]),y("Saved")}catch(g){c(g)}finally{setTimeout(()=>y("Save"),1e3)}},u=m!==a;return r.jsxs(vt,{afterClose:()=>{e("integrations")},cancelLabel:"Close",dirty:u,okColor:h==="Saved"?"green":"black",okLabel:h,testId:"unsplash-modal",title:"",onOk:f,children:[r.jsx(Js,{detail:"Beautiful, free photos",icon:r.jsx(rt,{name:"unsplash",size:48}),title:"Unsplash"}),r.jsx("div",{className:"mt-7",children:r.jsx(et,{marginBottom:!1,grouped:!0,children:r.jsx(st,{checked:m,direction:"rtl",hint:r.jsxs(r.Fragment,{children:["Enable ",r.jsx("a",{className:"text-green",href:"https://unsplash.com",rel:"noopener noreferrer",target:"_blank",children:"Unsplash"})," image integration for your posts"]}),label:"Enable Unsplash",onChange:d=>{l(d.target.checked)}})})})]})}),rT=({user:e,setUserData:s})=>{const{config:a,settings:o}=Qe(),c=f0("webmentions"),h=qs(o||[],a||{});return r.jsxs(cd,{children:[r.jsx(st,{checked:e.comment_notifications,direction:"rtl",hint:"Every time a member comments on one of your posts",label:"Comments",onChange:y=>{s?.({...e,comment_notifications:y.target.checked})}}),Wi(e)&&r.jsxs(r.Fragment,{children:[c&&r.jsx(st,{checked:e.mention_notifications,direction:"rtl",hint:"Every time another site links to your work",label:"Mentions",onChange:y=>{s?.({...e,mention_notifications:y.target.checked})}}),r.jsx(st,{checked:e.recommendation_notifications,direction:"rtl",hint:"Every time another publisher recommends you to their audience",label:"Recommendations",onChange:y=>{s?.({...e,recommendation_notifications:y.target.checked})}}),r.jsx(st,{checked:e.free_member_signup_notification,direction:"rtl",hint:"Every time a new free member signs up",label:"New signups",onChange:y=>{s?.({...e,free_member_signup_notification:y.target.checked})}}),h&&r.jsxs(r.Fragment,{children:[r.jsx(st,{checked:e.paid_subscription_started_notification,direction:"rtl",hint:"Every time a member starts a new paid subscription",label:"New paid members",onChange:y=>{s?.({...e,paid_subscription_started_notification:y.target.checked})}}),r.jsx(st,{checked:e.paid_subscription_canceled_notification,direction:"rtl",hint:"Every time a member cancels their paid subscription",label:"Paid member cancellations",onChange:y=>{s?.({...e,paid_subscription_canceled_notification:y.target.checked})}})]}),r.jsx(st,{checked:e.milestone_notifications,direction:"rtl",hint:h?"Occasional summaries of your audience & revenue growth":"Occasional summaries of your audience growth",label:"Milestones",onChange:y=>{s?.({...e,milestone_notifications:y.target.checked})}}),h&&r.jsx(st,{checked:e.donation_notifications,direction:"rtl",hint:"Every time you receive a one-time payment",label:"Tips & donations",onChange:y=>{s?.({...e,donation_notifications:y.target.checked})}})]})]})},nT=({user:e,setUserData:s})=>r.jsx(ld,{border:!1,children:r.jsx(rT,{setUserData:s,user:e})}),sT=["1234567890","qwertyuiop","qwertzuiop","asdfghjkl;","abcdefghij","0987654321","1q2w3e4r5t","12345asdfg"],aT=["ghost","password","passw0rd"],oT=e=>{let s={},a,o=!0;a=e.length/2;for(let c=0;c<e.length;c+=1)s[e[c]]?s[e[c]]+=1:s[e[c]]=1;for(let c in s)if(s[c]>=a)return o=!1,o;return o},iT=({user:e})=>{const{currentUser:s,config:a,siteData:o}=Qe(),[c,h]=D.useState(!1),[y,m]=D.useState(""),[l,f]=D.useState(""),[u,d]=D.useState(""),[g,b]=D.useState(""),[_,k]=D.useState({}),M=D.useRef(null),T=D.useRef(null),A=D.useRef(null),{mutateAsync:I}=$_(),O=it(),$=e.id===s.id,q=({password:L,confirmPassword:B})=>{if($&&!y)return{oldPassword:"Your current password is required to set a new one"};if(L!==B)return{newPassword:"Your new passwords do not match",confirmNewPassword:"Your new passwords do not match"};let J=a.blogUrl||window.location.host,te=o.title,ne;if(J=J.replace(/^http(s?):\/\//,""),ne=J.match(/\/$/)?J:`${J}/`,te=te&&te.trim().toLowerCase(),L.length<10)return{newPassword:"Password must be at least 10 characters long."};L=L.toString();for(const Q of sT)if(Q===L)return{newPassword:"Sorry, you cannot use an insecure password."};if(L.toLowerCase()===e.email.toLowerCase())return{newPassword:"Sorry, you cannot use an insecure password."};for(const Q of aT)if(L.toLowerCase().indexOf(Q)>=0)return{newPassword:"Sorry, you cannot use an insecure password."};return L.toLowerCase()===te?{newPassword:"Sorry, you cannot use an insecure password."}:L.toLowerCase()===J||L.toLowerCase()===ne?{newPassword:"Sorry, you cannot use an insecure password."}:oT(L)?{}:{newPassword:"Sorry, you cannot use an insecure password."}};D.useEffect(()=>{g==="saved"&&setTimeout(()=>{b(""),h(!1)},2500)},[g]),D.useEffect(()=>{c&&setTimeout(()=>{$?A.current?.focus():M.current?.focus()},100)},[c,$]);const R=()=>{h(!0)};let K="Save password";g==="saving"?K="Saving...":g==="saved"&&(K="Saved");const X=r.jsxs(r.Fragment,{children:[$&&r.jsx(Ne,{"data-testid":"old-password",error:!!_.oldPassword,hint:_.oldPassword,inputRef:A,title:"Old password",type:"password",value:y,onChange:L=>{m(L.target.value)}}),r.jsx(Ne,{"data-testid":"new-password",error:!!_.newPassword,hint:_.newPassword,inputRef:M,title:"New password",type:"password",value:l,onChange:L=>{f(L.target.value)}}),r.jsx(Ne,{"data-testid":"confirm-password",error:!!_.confirmNewPassword,hint:_.confirmNewPassword,inputRef:T,title:"Confirm new password",type:"password",value:u,onChange:L=>{d(L.target.value)}}),r.jsxs("div",{className:"mt-1 flex items-center justify-end gap-3",children:[r.jsx(Ue,{color:"outline",label:"Cancel",onClick:()=>{h(!1),m(""),f(""),d(""),k({})}}),r.jsx(Ue,{color:"green","data-testid":"save-password-button",label:K,onClick:async()=>{b("saving");const L=q({password:l,confirmPassword:u});if(k(L),Object.keys(L).length>0){b("");return}try{await I({newPassword:l,confirmNewPassword:u,oldPassword:y,userId:e?.id}),b("saved")}catch(B){b(""),mt({type:"error",title:B instanceof L_?B.message:"Couldn't update password. Please try again."}),O(B,{withToast:!1})}}})]})]}),Y=r.jsxs("div",{className:"relative flex flex-col",children:[r.jsx(Ne,{containerClassName:"grow",disabled:!0,title:"Password",type:"password",value:"••••••••••••"}),r.jsx(Ue,{className:"absolute right-0 top-0",color:"green","data-testid":"change-password-button",label:"Change",link:!0,onClick:R})]});return r.jsx(r.Fragment,{children:c?X:Y})},lT=({user:e,setUserData:s})=>{const{data:{roles:a}={}}=Of(),{config:o}=Qe(),c=o.labs.superEditors;let h=[{hint:"Can write and edit their own posts, but cannot publish them.",label:"Contributor",value:"contributor"},{hint:"Can create, edit and publish their own posts, but can’t modify others.",label:"Author",value:"author"},{hint:"Can edit and publish any posts, and manage Authors and Contributors.",label:"Editor",value:"editor"},{hint:"Trusted user who has full access to all content, settings, and user management.",label:"Administrator",value:"administrator"}];if(c&&(h=h.map(y=>y.value==="editor"?{...y,label:"Editor (beta mode)",value:"super editor",hint:"Can invite and manage other Authors and Contributors, as well as edit and publish any posts on the site. Can manage members and moderate comments."}:y)),Rf(e)){const y={label:"Owner",value:"owner"};return r.jsx("div",{children:r.jsx(Ot,{disabled:!0,hint:r.jsxs(r.Fragment,{children:["This user is the owner of the site. ",r.jsx("a",{className:"font-medium text-grey-800 transition-colors hover:text-grey-900 dark:text-grey-500 dark:hover:text-grey-400",href:"https://ghost.org/help/transfer-publication-ownership/",rel:"noopener noreferrer",target:"_blank",children:"Transfer ownership"})," first to change their role."]}),options:[y],selectedOption:y,title:"Role",onSelect:()=>{}})})}return r.jsx(Ot,{options:h,selectedOption:h.find(y=>y.value===e.roles[0].name.toLowerCase()),testId:"role-select",title:"Role",onSelect:y=>{if(y){const m=a?.find(l=>l.name.toLowerCase()===y.value.toLowerCase());m&&s?.({...e,roles:[m]})}}})},cT="StaffTokenResponseType",uT=P_({dataType:cT,path:"/users/me/token/"}),fT=ns({path:()=>"/users/me/token/",method:"PUT"}),dT=()=>{const{refetch:e}=uT({enabled:!1}),s=it(),[a,o]=D.useState(""),{mutateAsync:c}=fT();D.useEffect(()=>{(async()=>{const m=await e();m?.data?.apiKey&&o(`${m.data.apiKey.id}:${m.data.apiKey.secret}`)})()},[e]);const h=()=>{ye.show(Et,{title:"Regenerate your Staff Access Token",prompt:"You can regenerate your Staff Access Token any time, but any scripts or applications using it will need to be updated.",okLabel:"Regenerate your Staff Access Token",okColor:"red",onOk:async y=>{try{const m=await c([]);o(`${m.apiKey.id}:${m.apiKey.secret}`),y?.remove()}catch(m){s(m)}}})};return r.jsxs("div",{children:[r.jsx(bt,{className:"mb-2",level:6,grey:!0,children:"Staff access token"}),r.jsx(cl,{hasLabel:!1,keys:[{text:a||"",onRegenerate:h}]})]})},pT=({errors:e,clearError:s,user:a,setUserData:o})=>{const{currentUser:c}=Qe();return r.jsxs(cd,{children:[r.jsx(Ne,{error:!!e?.email,hint:e?.email||"Used for notifications",maxLength:191,title:"Email",value:a.email,onChange:h=>{o({...a,email:h.target.value})},onKeyDown:()=>s("email")}),r.jsx(iT,{user:a}),Wi(c)&&r.jsx(lT,{setUserData:o,user:a}),r.jsx(Ne,{error:!!e?.name,hint:e?.name||"Use your real name so people can recognize you",maxLength:191,title:"Full name",value:a.name,onChange:h=>{o({...a,name:h.target.value})},onKeyDown:()=>s("name")}),r.jsx(Ne,{hint:`https://example.com/author/${a.slug}`,maxLength:191,title:"Slug",value:a.slug,onChange:h=>{o({...a,slug:h.target.value})}}),r.jsx(Ne,{error:!!e?.location,hint:e?.location||"Where in the world do you live?",maxLength:65535,title:"Location",value:a.location||"",onChange:h=>{o({...a,location:h.target.value})},onKeyDown:()=>s("location")}),r.jsx(dn,{error:!!e?.bio,hint:e?.bio||r.jsxs(r.Fragment,{children:["Recommended: 250 characters. You‘ve used ",r.jsx("span",{className:"font-bold",children:a.bio?.length||0})]}),maxLength:65535,title:"Bio",value:a.bio||"",onChange:h=>{o({...a,bio:h.target.value})},onKeyDown:()=>s("bio")}),a.id===c.id&&r.jsx(dT,{})]})},hT=e=>r.jsx(ld,{border:!1,children:r.jsx(pT,{...e})}),mT=({errors:e,clearError:s,validateField:a,user:o,setUserData:c})=>{const[h,y]=D.useState(o.facebook?S2(o.facebook):""),[m,l]=D.useState(o.twitter?A2(o.twitter):""),[f,u]=D.useState(o.threads?mM(o.threads):""),[d,g]=D.useState(o.bluesky?xM(o.bluesky):""),[b,_]=D.useState(o.linkedin?_M(o.linkedin):""),[k,M]=D.useState(o.instagram?MM(o.instagram):""),[T,A]=D.useState(o.youtube?EM(o.youtube):""),[I,O]=D.useState(o.tiktok?NM(o.tiktok):""),[$,q]=D.useState(o.mastodon?AM(o.mastodon):"");return r.jsxs(cd,{children:[r.jsx(Ne,{"data-testid":"website-input",error:!!e?.website,hint:e?.website,maxLength:2e3,placeholder:"https://example.com",title:"Website",value:o.website||"",onChange:R=>{c({...o,website:R.target.value})},onKeyDown:()=>s("url")}),r.jsx(Ne,{"data-testid":"x-input",error:!!e?.twitter,hint:e?.twitter,maxLength:2e3,placeholder:"https://x.com/username",title:"X",value:m,onBlur:R=>{if(a("twitter",R.target.value)){const K=p0(R.target.value);l(K),c({...o,twitter:C2(K)})}},onChange:R=>{l(R.target.value)},onKeyDown:()=>s("twitter")}),r.jsx(Ne,{"data-testid":"facebook-input",error:!!e?.facebook,hint:e?.facebook,maxLength:2e3,placeholder:"https://www.facebook.com/username",title:"Facebook",value:h,onBlur:R=>{if(a("facebook",R.target.value)){const K=h0(R.target.value);y(K),c({...o,facebook:I2(K)})}},onChange:R=>{y(R.target.value)},onKeyDown:()=>s("facebook")}),r.jsx(Ne,{"data-testid":"linkedin-input",error:!!e?.linkedin,hint:e?.linkedin,maxLength:2e3,placeholder:"https://www.linkedin.com/in/username",title:"LinkedIn",value:b,onBlur:R=>{if(a("linkedin",R.target.value)){const K=sx(R.target.value);_(K),c({...o,linkedin:kM(K)})}},onChange:R=>{_(R.target.value)},onKeyDown:()=>s("linkedin")}),r.jsx(Ne,{"data-testid":"bluesky-input",error:!!e?.bluesky,hint:e?.bluesky,maxLength:2e3,placeholder:"https://bsky.app/profile/username",title:"Bluesky",value:d,onBlur:R=>{if(a("bluesky",R.target.value)){const K=J0(R.target.value);g(K),c({...o,bluesky:bM(K)})}},onChange:R=>{g(R.target.value)},onKeyDown:()=>s("bluesky")}),r.jsx(Ne,{"data-testid":"threads-input",error:!!e?.threads,hint:e?.threads,maxLength:2e3,placeholder:"https://threads.net/@username",title:"Threads",value:f,onBlur:R=>{if(a("threads",R.target.value)){const K=Z0(R.target.value);u(K),c({...o,threads:gM(K)})}},onChange:R=>{u(R.target.value)},onKeyDown:()=>s("threads")}),r.jsx(Ne,{"data-testid":"mastodon-input",error:!!e?.mastodon,hint:e?.mastodon,maxLength:2e3,placeholder:"https://mastodon.social/@username",title:"Mastodon",value:$,onBlur:R=>{if(a("mastodon",R.target.value)){const K=lx(R.target.value);q(K),c({...o,mastodon:CM(K)})}},onChange:R=>{q(R.target.value)},onKeyDown:()=>s("mastodon")}),r.jsx(Ne,{"data-testid":"tiktok-input",error:!!e?.tiktok,hint:e?.tiktok,maxLength:2e3,placeholder:"https://www.tiktok.com/@username",title:"TikTok",value:I,onBlur:R=>{if(a("tiktok",R.target.value)){const K=ix(R.target.value);O(K),c({...o,tiktok:SM(K)})}},onChange:R=>{O(R.target.value)},onKeyDown:()=>s("tiktok")}),r.jsx(Ne,{"data-testid":"youtube-input",error:!!e?.youtube,hint:e?.youtube,maxLength:2e3,placeholder:"https://www.youtube.com/@channel",title:"YouTube",value:T,onBlur:R=>{if(a("youtube",R.target.value)){const K=ox(R.target.value);A(K),c({...o,youtube:TM(K)})}},onChange:R=>{A(R.target.value)},onKeyDown:()=>s("youtube")}),r.jsx(Ne,{"data-testid":"instagram-input",error:!!e?.instagram,hint:e?.instagram,maxLength:2e3,placeholder:"https://www.instagram.com/username",title:"Instagram",value:k,onBlur:R=>{if(a("instagram",R.target.value)){const K=ax(R.target.value);M(K),c({...o,instagram:jM(K)})}},onChange:R=>{M(R.target.value)},onKeyDown:()=>s("instagram")})]})},gT=e=>r.jsx(ld,{border:!1,children:r.jsx(mT,{...e})}),qg={name:({name:e})=>{let s="";return e||(s="Name is required"),e&&e.length>191&&(s="Name is too long"),s},email:({email:e})=>St.isEmail(e||"")?"":"Enter a valid email address",url:({url:e})=>!e||St.isURL(e,{require_tld:!1})?"":"Enter a valid URL",bio:({bio:e})=>!e||e.length<=250?"":"Bio is too long",location:({location:e})=>!e||e.length<=150?"":"Location is too long",website:({website:e})=>!e||St.isURL(e)&&e.length<=2e3?"":"Enter a valid URL",facebook:({facebook:e})=>{try{return h0(e||""),""}catch(s){return s instanceof Error?s.message:""}},twitter:({twitter:e})=>{try{return p0(e||""),""}catch(s){return s instanceof Error?s.message:""}},threads:({threads:e})=>{try{return Z0(e||""),""}catch(s){return s instanceof Error?s.message:""}},bluesky:({bluesky:e})=>{try{return J0(e||""),""}catch(s){return s instanceof Error?s.message:""}},linkedin:({linkedin:e})=>{try{return sx(e||""),""}catch(s){return s instanceof Error?s.message:""}},instagram:({instagram:e})=>{try{return ax(e||""),""}catch(s){return s instanceof Error?s.message:""}},youtube:({youtube:e})=>{try{return ox(e||""),""}catch(s){return s instanceof Error?s.message:""}},tiktok:({tiktok:e})=>{try{return ix(e||""),""}catch(s){return s instanceof Error?s.message:""}},mastodon:({mastodon:e})=>{try{return lx(e||""),""}catch(s){return s instanceof Error?s.message:""}}},xT=({user:e})=>{const{updateRoute:s,route:a}=Ve(),o=P=>{const ee=P.split("/").pop()||"";return ee==="social-links"||ee==="email-notifications"?ee:"profile"},{ownerUser:c}=D2(),{currentUser:h}=Qe(),y=it(),{formState:m,setFormState:l,saveState:f,handleSave:u,updateForm:d,errors:g,setErrors:b,clearError:_,okProps:k}=pr({initialState:e,savingDelay:500,savedDelay:500,onValidate:P=>Object.entries(qg).reduce((ee,[xe,Te])=>{const De=Te(P);return De&&(ee[xe]=De),ee},{}),onSave:async P=>{await O?.(P)},onSaveError:y}),M=P=>d(()=>P),T=(P,ee)=>{const xe=qg[P]?.({[P]:ee});return xe?(b({...g,[P]:xe}),!1):(_(P),!0)},A=Gt(),{mutateAsync:I}=Ks(),{mutateAsync:O}=U_(),{mutateAsync:$}=z_(),{mutateAsync:q}=H_(),R=Gs(),K=t0(),X=D.useCallback(()=>{Cn(h)?s("staff"):s({isExternal:!0,route:""})},[h,s]),Y=async P=>{if(P.status==="inactive"&&P.roles[0].name!=="Contributor")try{await R?.errorIfWouldGoOverLimit("staff")}catch(xe){if(xe instanceof Xs){ye.show(Vr,{formSheet:!0,prompt:xe.message||"Your current plan doesn't support more users.",onOk:()=>s({route:"/pro",isExternal:!0})});return}else throw xe}let ee="This user will no longer be able to log in but their posts will be kept.";P.status==="inactive"&&(ee="This user will be able to log in again and will have the same permissions they had previously."),ye.show(Et,{title:"Are you sure you want to suspend this user?",prompt:r.jsxs(r.Fragment,{children:[r.jsx("strong",{children:"WARNING:"})," ",ee]}),okLabel:P.status==="inactive"?"Un-suspend":"Suspend",okRunningLabel:P.status==="inactive"?"Un-suspending...":"Suspending...",okColor:"red",onOk:async xe=>{const Te={...P,status:P.status==="inactive"?"active":"inactive"};try{await O(Te),l(()=>Te),xe?.remove(),mt({title:P.status==="inactive"?"User un-suspended":"User suspended",type:"success"})}catch(De){y(De)}}})},L=(P,{owner:ee})=>{ye.show(Et,{title:"Are you sure you want to delete this user?",prompt:r.jsxs(r.Fragment,{children:[r.jsxs("p",{className:"mb-3",children:[r.jsx("span",{className:"font-bold",children:P.name||P.email})," will be permanently deleted and all their posts will be automatically assigned to the ",r.jsx("span",{className:"font-bold",children:ee.name}),"."]}),r.jsxs("p",{children:["To make these easy to find in the future, each post will be given an internal tag of ",r.jsxs("span",{className:"font-bold",children:["#",e.slug]})]})]}),okLabel:"Delete user",okColor:"red",onOk:async xe=>{try{await $(P?.id),xe?.remove(),A?.remove(),X(),mt({title:"User deleted",type:"success"})}catch(Te){y(Te)}}})},B=()=>{ye.show(Et,{title:"Transfer Ownership",prompt:"Are you sure you want to transfer the ownership of this blog? You will not be able to undo this action.",okLabel:"Yep — I'm sure",okColor:"red",onOk:async P=>{try{await q(e.id),P?.remove(),mt({title:"Ownership transferred",type:"success"})}catch(ee){y(ee)}}})},J=async(P,ee)=>{try{const xe=ln(await I({file:ee}));switch(P){case"cover_image":d(Te=>({...Te,cover_image:xe}));break;case"profile_image":d(Te=>({...Te,profile_image:xe}));break}}catch(xe){const Te=xe;Te.response.status===415&&(Te.message="Unsupported file type"),y(Te)}},te=P=>{switch(P){case"cover_image":d(ee=>({...ee,cover_image:""}));break;case"profile_image":d(ee=>({...ee,profile_image:""}));break}},ne=Wi(h)||fh(h)&&dh(e);let Q=[];if(Rf(h)&&B_(m)&&m.status!=="inactive"&&Q.push({id:"make-owner",label:"Make owner",onClick:B}),m.id!==h.id&&(Wi(h)&&!Rf(e)||fh(h)&&dh(e))){let P=m.status==="inactive"?"Un-suspend user":"Suspend user";Q.push({id:"delete-user",label:"Delete user",onClick:()=>{L(e,{owner:c})}},{id:"suspend-user",label:P,onClick:()=>{Y(m)}})}Q.push({id:"view-user-activity",label:"View user activity",onClick:()=>{A.remove(),s(`history/view/${m.id}`)}});const se="rounded text-sm flex flex-nowrap items-center justify-center px-3 h-8 transition-all cursor-pointer font-medium border border-grey-300 bg-transparent text-black dark:border-grey-800 dark:text-white",be="flex flex-nowrap items-center justify-center px-3 h-8 opacity-80 hover:opacity-100 bg-[rgba(0,0,0,0.75)] rounded text-sm text-white transition-all cursor-pointer font-medium nowrap",je=m.status==="inactive"?" (Suspended)":"",W=o(a),[he,ge]=D.useState(W),U=P=>{const ee=P==="profile"?"":`/${P}`;s(`staff/${e.slug}${ee}`),ge(P)};return r.jsx(vt,{afterClose:X,animate:Cn(h),backDrop:Cn(h),buttonsDisabled:k.disabled,cancelLabel:"Close",dirty:f==="unsaved",okColor:k.color,okLabel:k.label||"Save",size:Cn(h)?"md":"bleed",stickyFooter:!0,testId:"user-detail-modal",width:Cn(h)?600:"full",onOk:async()=>{await u({fakeWhenUnchanged:!0})},children:r.jsxs("div",{children:[r.jsx("div",{className:`relative ${Cn(h)?"-mx-8 -mt-8 rounded-t":"-mx-10 -mt-10"}`,children:r.jsx("div",{className:`flex flex-wrap items-end justify-between gap-8 p-8 ${m.cover_image?"bg-cover bg-center":""} ${!Cn(h)&&"min-h-[30vmin]"}`,style:{backgroundImage:m.cover_image?`url(${m.cover_image})`:"none"},children:r.jsxs("div",{className:"flex w-full flex-col gap-2",children:[r.jsxs("div",{className:"flex flex-nowrap items-start justify-between gap-3",children:[r.jsx("div",{children:r.jsx(un,{deleteButtonClassName:"md:invisible absolute pr-3 -right-2 -top-2 flex h-8 w-10 cursor-pointer items-center justify-end rounded-full bg-[rgba(0,0,0,0.75)] text-white group-hover:!visible",deleteButtonContent:r.jsx(rt,{colorClass:"text-white",name:"trash",size:"sm"}),editButtonClassName:"md:invisible absolute right-[22px] -top-2 flex h-8 w-8 cursor-pointer items-center justify-center text-white group-hover:!visible z-20",fileUploadClassName:"rounded-full bg-black flex items-center justify-center opacity-80 transition hover:opacity-100 -ml-2 cursor-pointer h-[80px] w-[80px]",fileUploadProps:{dragIndicatorClassName:"rounded-full"},id:"avatar",imageClassName:"w-full h-full object-cover rounded-full shrink-0",imageContainerClassName:"relative group bg-cover bg-center -ml-1 h-16 w-16 md:h-18 md:w-18 shrink-0",imageURL:m.profile_image??void 0,pintura:{isEnabled:K.isEnabled,openEditor:async()=>K.openEditor({image:m.profile_image||"",handleSave:async P=>{J("profile_image",P)}})},unstyled:!0,width:"80px",onDelete:()=>{te("profile_image")},onUpload:P=>{J("profile_image",P)},children:r.jsx(rt,{colorClass:"black",name:"user-add",size:"lg"})})}),r.jsxs("div",{className:"flex flex-nowrap items-start gap-3",children:[r.jsx(un,{buttonContainerClassName:"flex items-end gap-4 justify-end flex-nowrap",deleteButtonClassName:be,deleteButtonContent:"Delete cover image",editButtonClassName:be,fileUploadClassName:se,id:"cover-image",imageClassName:"hidden",imageURL:m.cover_image||"",pintura:{isEnabled:K.isEnabled,openEditor:async()=>K.openEditor({image:m.cover_image||"",handleSave:async P=>{J("cover_image",P)}})},unstyled:!0,onDelete:()=>{te("cover_image")},onUpload:P=>{J("cover_image",P)},children:"Upload cover image"}),ne&&r.jsx("div",{className:"z-10",children:r.jsx($0,{items:Q,position:"end",trigger:r.jsxs("button",{className:we("flex h-8 cursor-pointer items-center justify-center rounded px-3",m.cover_image?"bg-[rgba(0,0,0,0.75)] opacity-80 hover:opacity-100":"border border-grey-300 bg-transparent text-black dark:border-grey-800 dark:text-white"),type:"button",children:[r.jsx("span",{className:"sr-only",children:"Actions"}),r.jsx(rt,{colorClass:m.cover_image?"text-white":void 0,name:"ellipsis",size:"md"})]})})})]})]}),r.jsxs("div",{children:[r.jsxs(bt,{level:3,styles:we("break-words md:break-normal",m.cover_image?"text-white":"text-black dark:text-white"),children:[e.name,je]}),r.jsx("span",{className:we("text-md font-medium capitalize",m.cover_image?"text-white":"text-black dark:text-white"),children:e.roles[0].name.toLowerCase()})]})]})})}),r.jsx("div",{className:`${!Cn(h)&&"mx-auto max-w-[536px]"} mt-6 flex flex-col`,children:r.jsx(fn,{selectedTab:he,tabs:[{id:"profile",title:"Profile",contents:r.jsx(hT,{clearError:_,errors:g,setUserData:M,user:m,validateField:T})},{id:"social-links",title:"Social Links",contents:r.jsx(gT,{clearError:_,errors:g,setUserData:M,user:m,validateField:T})},{id:"email-notifications",title:"Email Notifications",contents:r.jsx(nT,{setUserData:M,user:m})}],onTabChange:U})})]})})},bT=({params:e})=>{const{currentUser:s}=Qe(),a=s.slug===e?.slug,{data:o}=F_(e?.slug||"",{enabled:!a&&!!e?.slug}),c=a?s:o?.users?.[0];return c?r.jsx(xT,{user:c}):null},vT=ye.create(bT),NT={AddIntegrationModal:qM,AddNewsletterModal:GM,AddRecommendationModal:fx,CustomIntegrationModal:dj,DesignAndThemeModal:g4,EditRecommendationModal:R2,FirstPromoterModal:I4,HistoryModal:W4,InviteUserModal:q4,NavigationModal:Y4,NewsletterDetailModal:nE,PinturaModal:jE,PortalModal:$E,SlackModal:LE,StripeConnectModal:XE,TestimonialsModal:QE,TierDetailModal:RM,TransistorModal:eT,UnsplashModal:tT,UserDetailModal:vT,ZapierModal:hM,AnnouncementBarModal:nj,EmbedSignupFormModal:C4,OffersContainerModal:_E,AboutModal:BM,OfferSuccess:Ax};export{NT as default};
|