1import{e as xe,du as ke,J as we,Y as Te,cq as Fe,z as Ne,f as Se,c as l,b as t,j as a,u as e,w as I,F as U,U as O,d as b,ao as Ie,aK as Ue,t as g,p as Be,x as B,m as y,a7 as De,o as n,a as Le,dv as $e,a0 as Ae,Z as Ee,dw as Ve,_ as Re}from"./B3bClFiC.js";import{u as Me}from"./CnqoS2DL.js";import{a as ze,u as qe,b as Ge,r as He}from"./BwGqREZL.js";import{S as Oe}from"./DuxH_T-I.js";import{_ as W,S as We}from"./CcGQqmLS.js";import{S as Y}from"./CHARWxaa.js";import{_ as Ye}from"./BMI0jzcS.js";import{T as je,_ as Je,S as Ke,a as Ze,b as Qe,c as Xe}from"./Dq-PEswI.js";import{u as et}from"./CBK2cEAr.js";import"./iDJUv_dd.js";import"./Bp05azVs.js";import"./8XCas8Oi.js";import"./BCLg3RSh.js";import"./BmsUmtGV.js";import"./XlzoAJ7R.js";import"./DzuUVvee.js";import"./CsLyF8zF.js";import"./jIbKWYFd.js";import"./BCjHqFXk.js";import"./C7rB0RMg.js";import"./mYJGiklu.js";import"./6hH6Y1AR.js";import"./D8waQk2U.js";import"./Bl7tguiH.js";import"./DmMzngdv.js";import"./BgQqGqFZ.js";import"./DyzLi3ym.js";import"./LiGgb9i3.js";import"./0FVkn_8f.js";import"./LEtgHfl9.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r.SENTRY_RELEASE={id:"16d86feaf6e8b56f348e0082049db0299aadb4ad"};var f=new r.Error().stack;f&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[f]="d11db384-af69-45f0-a6c2-3d83c6510eb0",r._sentryDebugIdIdentifier="sentry-dbid-d11db384-af69-45f0-a6c2-3d83c6510eb0")}catch{}})();const tt={class:"grid-layout"},at=["data-nav-style"],ot={class:"header-content"},rt={class:"logo-text"},st={key:0,class:"grid-nav"},lt={class:"header-right"},nt={key:0,class:"active-category-chip-wrapper"},it={class:"latest-posts"},ct={key:0,class:"posts-grid"},dt={key:0,class:"posts-grid-cell branding-cell"},ut={class:"branding-title"},gt={key:0,class:"branding-subtitle"},pt={class:"branding-subscribe"},ht={key:1,class:"empty-state"},mt={class:"pagination-wrapper"},vt={key:1,class:"site-footer"},bt={class:"footer-content"},ft={class:"mx-auto",style:{"max-width":"700px",width:"90%","margin-bottom":"20px"}},_t={class:"newsletter-title"},Ct={class:"newsletter-description"},yt={class:"footer-logo"},Pt={class:"logo-text"},xt={class:"copyright"},kt=xe({__name:"grid",props:{isPostsPage:{type:Boolean},currentPage:{},postsPerPage:{},activeCategoryId:{},activeCategoryName:{}},async setup(r){let f,x;Ae(o=>({v1428357f:e(h),v713840b0:e(J),v5f8cd561:e(w),v67bfe1ec:e(j),b4f9ae12:e(p),v4aa90d71:e(A),v17b23dd0:e(ae),v290319b9:e($),d491bc50:e(d),v213c1a60:e(re),c1a7e576:e(te),v8fe4e84a:e(c),v22c672ae:e(ee),v6a9ef7b0:e(E)}));const i=r,k=B(!1),{backgroundColor:p,accentColor:c,headlineFont:w,paragraphFont:h,headlineWeight:j,paragraphWeight:J,textColor:d,siteName:m,optinHeadline:K,optinSubheadline:Z,brandingText:Q,brandingSubheadline:D,logoUrl:T,brandLinkUrl:X,hasFooter:L,mutedTextColor:ee,borderColor:$,shadowColor:te,navBackgroundColor:ae,navTextColor:A,navStyle:oe,secondaryBgColor:E,hoverBgColor:re,subscribeButtonText:se}=Me(),{publishedPosts:_,isLoadingPosts:le,postsError:ne,fetchPublishedPosts:ie,totalPostsCount:F,hasFetchedPosts:V,categories:ce,fetchCategories:de}=ze(),{previewNavigationItems:R}=qe(),{watchNavigationRefresh:ue}=ke(),{apiCaller:ge}=we(),{currentTeamId:M}=Te(),{getBrandLinkUrl:pe,getCategoryUrl:he,getPostsListUrl:me,getNavigationItemUrl:ve}=et(),{currentPage:P,postsPerPage:be,paginationBasePath:fe}=Ge(()=>i),v=y(()=>He(be.value,!!i.isPostsPage)),_e=y(()=>pe(X.value)),{themeTeamId:N}=Fe(),C=B([]),S=B(!1);async function z(){if(R.value){C.value=R.value;return}if(M.value)try{S.value=!0;const o=await ge.navigation.getAll.query({teamId:M.value});C.value=o||[]}catch(o){console.error("Error fetching navigation items:",o),C.value=[]}finally{S.value=!1}}function Ce(o){return ve(o)}const ye=y(()=>Math.ceil(F.value/v.value));function q(){return ie(v.value,P.value,N.value,i.isPostsPage?i.activeCategoryId:void 0)}const Pe=y(()=>_.value.map(o=>{const u=o.publishedAt||o.date||o.createdAt;return{...o,date:u?$e(u.toString(),"monthDay"):""}})),G=y(()=>Pe.value);return[f,x]=Ne(()=>Ee(()=>`grid-theme-posts-${N.value??"none"}-${P.value}-${v.value}-${i.isPostsPage?"posts":"home"}-${i.activeCategoryId??"all"}`,async()=>V.value&&_.value.length>0&&(_.value.length===v.value||_.value.length===F.value)?!0:q(),{watch:[P,v,()=>i.isPostsPage,()=>i.activeCategoryId,N]})),await f,x(),Se(()=>{z(),de(),ue(()=>{z()})}),(o,u)=>{const H=De;return n(),l(U,null,[t("div",{style:Be({backgroundColor:e(p),color:e(d)}),class:"wrapper pd-theme-root"},[t("div",tt,[a(je,{"navigation-items":C.value},null,8,["navigation-items"]),t("header",{class:"grid-header","data-pd-nav":"","data-nav-style":e(oe)},[t("div",ot,[a(H,{to:_e.value,class:"logo"},{default:I(()=>[a(W,{alt:e(m),imageUrl:e(T),class:"logo-image"},null,8,["alt","imageUrl"]),t("span",rt,g(e(m)),1)]),_:1},8,["to"]),S.value?b("",!0):(n(),l("nav",st,[t("ul",null,[(n(!0),l(U,null,O(C.value.filter(s=>!s.children||s.children.length===0).slice(0,4),s=>(n(),l("li",{key:s.id},[a(H,{to:Ce(s)},{default:I(()=>[Le(g(s.label),1)]),_:2},1032,["to"])]))),128)),a(Je,{categories:e(ce),"get-category-url":e(he),"active-category-id":i.activeCategoryId},null,8,["categories","get-category-url","active-category-id"])])])),t("div",lt,[t("button",{class:"grid-search-btn","aria-label":"Search",onClick:u[0]||(u[0]=s=>k.value=!0)},[a(e(Ie),{size:18})]),a(Ke,{accentColor:e(c),backgroundColor:e(p),textColor:e(d),buttonText:e(se)},null,8,["accentColor","backgroundColor","textColor","buttonText"]),a(Ye,{accentColor:e(c),backgroundColor:e(p),textColor:e(A),withBlur:!0},null,8,["accentColor","backgroundColor","textColor"])])])],8,at),r.isPostsPage&&r.activeCategoryName?(n(),l("div",nt,[a(Ze,{"category-name":r.activeCategoryName,"clear-url":e(me)(),"paragraph-font":e(h),"accent-color":e(c),"text-color":e(d),"background-color":e(E),"border-color":e($)},null,8,["category-name","clear-url","paragraph-font","accent-color","text-color","background-color","border-color"])])):b("",!0),t("section",it,[a(Ue,{error:e(ne),"is-loading":e(le)&&e(_).length===0,height:"min-h-[300px]","loading-message":"Loading posts...",width:"w-full",onRetry:q},{default:I(()=>[G.value.length>0?(n(),l("div",ct,[r.isPostsPage?b("",!0):(n(),l("div",dt,[t("h1",ut,g(e(Q)||e(m)),1),e(D)?(n(),l("p",gt,g(e(D)),1)):b("",!0),t("div",pt,[a(Y,{bare:"",accentColor:e(c),backgroundColor:e(p),paragraphFont:e(h),textColor:e(d)},null,8,["accentColor","backgroundColor","paragraphFont","textColor"])])])),(n(!0),l(U,null,O(G.value,s=>(n(),l("div",{key:s.id,class:"posts-grid-cell"},[a(Oe,{accentColor:e(c),headlineFont:e(w),paragraphFont:e(h),post:s,showDescription:!0,textColor:e(d),display:"top-bottom",postMeta:"",viewType:"small"},null,8,["accentColor","headlineFont","paragraphFont","post","textColor"])]))),128))])):e(V)?(n(),l("div",ht,[...u[2]||(u[2]=[t("p",{class:"empty-message"},"No posts published yet",-1)])])):b("",!0)]),_:1},8,["error","is-loading"]),t("div",mt,[a(Qe,{"current-page":e(P),"total-pages":ye.value,"total-posts":e(F),"posts-per-page":v.value,"base-path":e(fe),"accent-color":e(c),"text-color":e(d),"paragraph-font":e(h)},null,8,["current-page","total-pages","total-posts","posts-per-page","base-path","accent-color","text-color","paragraph-font"])])]),e(L)?b("",!0):(n(),l("footer",vt,[t("div",bt,[t("div",ft,[t("h2",_t,g(e(K)),1),t("p",Ct,g(e(Z)),1),a(Y,{accentColor:e(c),backgroundColor:e(p),paragraphFont:e(h),textColor:e(d)},null,8,["accentColor","backgroundColor","paragraphFont","textColor"])]),t("div",yt,[a(W,{alt:e(m),imageUrl:e(T),class:"logo-image"},null,8,["alt","imageUrl"]),t("span",Pt,g(e(m)),1)]),t("p",xt,"© "+g(e(m))+". All rights reserved.",1)])])),a(We,{siteName:e(m),logoUrl:e(T),accentColor:e(c),backgroundColor:e(p),textColor:e(d),paragraphFont:e(h),headlineFont:e(w),hasFooter:e(L)},null,8,["siteName","logoUrl","accentColor","backgroundColor","textColor","paragraphFont","headlineFont","hasFooter"])])],4),a(Xe,{open:k.value,"onUpdate:open":u[1]||(u[1]=s=>k.value=s)},null,8,["open"]),a(Ve)],64)}}}),ta=Re(kt,[["__scopeId","data-v-c13f04cf"]]);export{ta as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.