PageSourceSearch

https://www.hacienda.org/_nuxt/JkzlAL5i.js

js hacienda.org collected 2026-10-02 21:58:23 UTC 27,348 bytes, 1 lines download raw bytes

1import{_ as Ie}from"./IvRjsnIF.js";import{u as He,a as Ge,b as qe,_ as Ke,C as We,c as Je,d as Qe}from"./BI6v6OYZ.js";import{_ as Te}from"./BVHw3Vj_.js";import{_ as Xe}from"./CV0EuiPi.js";import{e as be,f as ie,J as Ye,N as Ze,o as a,c as k,b as u,w as R,a as e,G as F,i as o,m as x,O as et,P as tt,p as y,T as st,r,Q as lt,t as m,j as G,v as X,R as ot,d as S,H as L,g as nt,x as at,S as it,u as rt,z as Se,B as ut,y as dt,U as Pe,V as ct,k as ge,W as pt,C as fe,F as De,D as ht,X as Ve,n as mt,_ as gt,Y as ft,Z as bt}from"./B_B-qq4U.js";import{_ as xt}from"./Cue8V1o1.js";import{_ as wt}from"./CcKjClRv.js";import{L as Le}from"./bkveXt7J.js";import{_ as vt}from"./B3I2Llql.js";import{u as yt}from"./BAf0fu1Q.js";import{u as kt}from"./D3DoELDR.js";import{F as _t,a as Ct}from"./BkmnTpyQ.js";import{F as $t}from"./BFftLY6B.js";import{R as zt}from"./BKCR7hg-.js";import{A as St,a as Pt}from"./0YuIWh7b.js";import{C as Dt}from"./D7843ZBl.js";import"./BXMfht7L.js";import"./B_PsO70r.js";import"./BunUmVui.js";import"./DfrLzOLO.js";import"./jzgrTPOL.js";import"./BDeL55xx.js";import"./grt_B6XJ.js";import"./DmHjY0Z_.js";import"./BaIHkBIn.js";const Vt={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]},Et=be(Vt);const Tt={name:"ellipsis-vertical",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],aliases:["more-vertical"]},Lt=be(Tt);const Ut={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]},Ee=be(Ut),At=["aria-expanded"],ne=4,ae=8,Mt=ie({__name:"ActionsMenu",setup(U){const p=r(!1),w=r(null),V=r(null),_=r({top:0,left:0});async function $(){const i=w.value?.getBoundingClientRect();if(!i)return;_.value={top:i.bottom+ne,left:i.right},await lt();const n=V.value;if(!n)return;const{width:M,height:c}=n.getBoundingClientRect(),v=i.bottom+ne+c<=window.innerHeight-ae?i.bottom+ne:Math.max(ae,i.top-ne-c),I=Math.min(Math.max(ae,i.right-M),window.innerWidth-M-ae);_.value={top:v,left:I}}async function A(){p.value=!p.value,p.value&&await $()}function P(){p.value=!1}function z(i){if(!p.value)return;const n=i.target;w.value?.contains(n)||V.value?.contains(n)||P()}function C(i){i.key==="Escape"&&P()}function E(){p.value&&P()}return Ye(()=>{document.addEventListener("pointerdown",z,!0),document.addEventListener("keydown",C),window.addEventListener("scroll",E,!0),window.addEventListener("resize",E)}),Ze(()=>{document.removeEventListener("pointerdown",z,!0),document.removeEventListener("keydown",C),window.removeEventListener("scroll",E,!0),window.removeEventListener("resize",E)}),(i,n)=>{const M=Te;return a(),k("div",{ref_key:"trigger",ref:w,class:"relative"},[u(M,{label:"More actions"},{default:R(()=>[e("button",{type:"button","aria-label":"More actions","aria-haspopup":"menu","aria-expanded":p.value,class:F(["rounded-lg p-2 text-white/60 transition-colors hover:bg-white/10 hover:text-white",p.value?"bg-white/10 text-white":""]),onClick:A},[u(o(Lt),{size:16,"stroke-width":2})],10,At)]),_:1}),(a(),x(st,{to:"body"},[p.value?(a(),k("div",{key:0,ref_key:"menu",ref:V,role:"menu",class:"fixed z-50 min-w-[180px] rounded-lg border border-white/10 bg-[#12141f] p-1 shadow-2xl",style:et({top:`${_.value.top}px`,left:`${_.value.left}px`}),onClick:P},[tt(i.$slots,"default")],4)):y("",!0)]))],512)}}}),Rt={class:"fixed inset-0 z-50 flex items-center justify-center bg-black/60"},Bt={class:"flex max-h-[85vh] w-full max-w-md flex-col rounded-xl border border-white/10 bg-[#12141f] shadow-2xl"},Nt={class:"flex shrink-0 items-center justify-between border-b border-white/10 px-5 py-4"},jt={class:"font-semibold text-white"},Ot={class:"space-y-4 overflow-y-auto p-5"},Ft={class:"flex items-center justify-between"},It={class:"text-xs text-white/30"},Ht={class:"flex items-center justify-between"},Gt={class:"text-xs text-white/30"},qt={class:"flex items-start gap-2.5 rounded-[10px] border border-white/10 bg-white/[0.06] p-3 shadow-sm"},Kt={class:"flex shrink-0 justify-end gap-2 border-t border-white/10 px-5 py-4"},Wt=["disabled"],Jt=ie({__name:"PageSeoDialog",props:{title:{},modelValue:{}},emits:["save","close"],setup(U,{emit:p}){const w=U,V=p,_=r(w.modelValue.metaTitle||w.title.trim().slice(0,70)),$=r(w.modelValue.metaDescription??""),A=r(w.modelValue.ogImage??""),P=r(w.modelValue.canonicalUrl??""),z=r(w.modelValue.noIndex??!1),C=r(!1);function E(){C.value=!0,V("save",{metaTitle:_.value.trim()||void 0,metaDescription:$.value.trim()||void 0,ogImage:A.value||void 0,canonicalUrl:P.value.trim()||void 0,noIndex:z.value||void 0})}return(i,n)=>{const M=wt;return a(),k("div",Rt,[e("div",Bt,[e("div",Nt,[e("h2",jt,"SEO — "+m(U.title),1),e("button",{class:"text-white/50 hover:text-white",onClick:n[0]||(n[0]=c=>V("close"))}
1,"✕")]),e("div",Ot,[e("div",null,[e("div",Ft,[n[7]||(n[7]=e("label",{class:"block text-sm font-medium text-white/70"},"Meta title",-1)),e("span",It,m(_.value.length)+"/70",1)]),G(e("input",{"onUpdate:modelValue":n[1]||(n[1]=c=>_.value=c),type:"text",maxlength:"70",placeholder:"Page title shown in search results",class:"mt-1.5 w-full rounded-[10px] border border-white/15 bg-white/[0.06] px-3.5 py-2.5 text-sm font-medium text-white placeholder-white/35 shadow-sm outline-none transition focus:border-bronze focus:bg-white/10 focus:ring-2 focus:ring-bronze/30"},null,512),[[X,_.value]]),n[8]||(n[8]=e("p",{class:"mt-1 text-xs text-white/40"},"Defaults to the page title.",-1))]),e("div",null,[e("div",Ht,[n[9]||(n[9]=e("label",{class:"block text-sm font-medium text-white/70"},"Meta description",-1)),e("span",Gt,m($.value.length)+"/200",1)]),G(e("textarea",{"onUpdate:modelValue":n[2]||(n[2]=c=>$.value=c),maxlength:"200",rows:"3",placeholder:"A short summary shown under the title in search results",class:"mt-1.5 w-full resize-none rounded-[10px] border border-white/15 bg-white/[0.06] px-3.5 py-2.5 text-sm font-medium text-white placeholder-white/35 shadow-sm outline-none transition focus:border-bronze focus:bg-white/10 focus:ring-2 focus:ring-bronze/30"},null,512),[[X,$.value]])]),e("div",null,[n[10]||(n[10]=e("label",{class:"block text-sm font-medium text-white/70"},"Social share image",-1)),n[11]||(n[11]=e("p",{class:"mb-1 text-xs text-white/40"}," Shown when this page is shared on social media (Open Graph). ",-1)),u(M,{modelValue:A.value,"onUpdate:modelValue":n[3]||(n[3]=c=>A.value=c),label:"","size-hint":{width:1200,height:630}},null,8,["modelValue"])]),e("div",null,[n[12]||(n[12]=e("label",{class:"block text-sm font-medium text-white/70"},"Canonical URL",-1)),G(e("input",{"onUpdate:modelValue":n[4]||(n[4]=c=>P.value=c),type:"text",placeholder:"https://hacienda.org/about",class:"mt-1.5 w-full rounded-[10px] border border-white/15 bg-white/[0.06] px-3.5 py-2.5 text-sm font-medium text-white placeholder-white/35 shadow-sm outline-none transition focus:border-bronze focus:bg-white/10 focus:ring-2 focus:ring-bronze/30"},null,512),[[X,P.value]]),n[13]||(n[13]=e("p",{class:"mt-1 text-xs text-white/40"}," Only needed if this page duplicates content found at another URL. ",-1))]),e("label",qt,[G(e("input",{"onUpdate:modelValue":n[5]||(n[5]=c=>z.value=c),type:"checkbox",class:"mt-0.5 h-4 w-4 rounded border-white/30 bg-white/10 accent-bronze"},null,512),[[ot,z.value]]),n[14]||(n[14]=e("span",null,[e("span",{class:"block text-sm font-medium text-white"},"Hide from search engines"),e("span",{class:"block text-xs text-white/40"},`Adds a "noindex" tag so this page won't appear in search results.`)],-1))])]),e("div",Kt,[e("button",{type:"button",class:"flex h-10 items-center rounded-[10px] px-4 text-sm font-medium text-white/70 transition hover:bg-white/5",onClick:n[6]||(n[6]=c=>V("close"))}," Cancel "),e("button",{type:"button",class:"flex h-10 items-center justify-center gap-2 rounded-[10px] bg-bronze px-4 text-sm font-semibold text-white transition hover:bg-bronze/90 active:scale-[0.99] disabled:cursor-not-allowed disabled:opacity-60 disabled:active:scale-100",disabled:C.value,onClick:E},[C.value?(a(),x(o(Le),{key:0,size:15,"stroke-width":2,class:"animate-spin"})):y("",!0),S(" "+m(C.value?"Saving…":"Save"),1)],8,Wt)])])])}}}),Qt={class:"fixed inset-0 z-50 flex items-center justify-center bg-black/60"},Xt={class:"w-full max-w-md rounded-xl border border-white/10 bg-[#12141f] shadow-2xl"},Yt={class:"flex items-center justify-between border-b border-white/10 px-5 py-4"},Zt={class:"font-semibold text-white"},es={class:"space-y-4 p-5"},ts={class:"mt-1.5 flex items-center rounded-[10px] border border-white/15 bg-white/[0.06] text-sm shadow-sm transition focus-within:border-bronze focus-within:bg-white/10 focus-within:ring-2 focus-within:ring-bronze/30"},ss={class:"pl-3.5 text-white/30"},ls=["value"],os={key:0,class:"text-sm text-accent"},ns={class:"flex justify-end gap-2 border-t border-white/10 px-5 py-4"},as=["disabled"],is=ie({__name:"NewPageDialog",props:{parentSlug:{}},emits:["create","close"],setup(U,{expose:p,emit:w}){const V=U,_=w,$=r(""),A=r(!1),P=r(""),z=r(""),C=r(!1);function E(D){return D.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}const i=L(()=>A.value?P.value:E($.value)),n=L(()=>V.parentSlug?`${V.parentSlug}/${i.value}`:i.value);function M(D){A.value=!0,P.value=E(D.target.value)}function c(){if(z.value="",!$.value.trim()||!i.value){z.value="Title and slug are both required.";return}C.value=!0,_("create",{slug:n.value,title:$.value.trim()})}return p({setError:D=>{z.value=D,C.value=!1}}),(D,v)=>(a(),k("div",Qt,[e("div",Xt,[e("div",Yt,[e("h2",Zt,m(U.parentSlug?`New subpage under /${U.parentSlug}`:"New page"),1),e("button",{class:"text-white/50 hover:text-white",onClick:v[0]||(v[0]=I=>_("close"))},"✕")]),e("div",es,[e("div",null,[v[3]||(v[3]=e("label",{class:"block text-sm font-medium text-white/70"},"Title",-1)),G(e("input",{"onUpdate:modelValue":v[1]||(v[1]=I=>
1$.value=I),type:"text",placeholder:"About the Park",class:"mt-1.5 w-full rounded-[10px] border border-white/15 bg-white/[0.06] px-3.5 py-2.5 text-sm font-medium text-white placeholder-white/35 shadow-sm outline-none transition focus:border-bronze focus:bg-white/10 focus:ring-2 focus:ring-bronze/30"},null,512),[[X,$.value]])]),e("div",null,[v[4]||(v[4]=e("label",{class:"block text-sm font-medium text-white/70"},"URL path",-1)),e("div",ts,[e("span",ss,"/"+m(U.parentSlug?`${U.parentSlug}/`:""),1),e("input",{value:i.value,type:"text",placeholder:"about-the-park",class:"w-full rounded-[10px] bg-transparent px-1 py-2.5 text-sm font-medium text-white placeholder-white/35 outline-none",onInput:M},null,40,ls)])]),z.value?(a(),k("p",os,m(z.value),1)):y("",!0)]),e("div",ns,[e("button",{type:"button",class:"flex h-10 items-center rounded-[10px] px-4 text-sm font-medium text-white/70 transition hover:bg-white/5",onClick:v[2]||(v[2]=I=>_("close"))}," Cancel "),e("button",{type:"button",class:"flex h-10 items-center justify-center gap-2 rounded-[10px] bg-bronze px-4 text-sm font-semibold text-white transition hover:bg-bronze/90 active:scale-[0.99] disabled:cursor-not-allowed disabled:opacity-60 disabled:active:scale-100",disabled:C.value,onClick:c},[C.value?(a(),x(o(Le),{key:0,size:15,"stroke-width":2,class:"animate-spin"})):y("",!0),S(" "+m(C.value?"Creating…":"Create page"),1)],8,as)])])]))}}),rs={class:"flex min-h-screen"},us={class:"flex-1"},ds={class:"px-8 py-8"},cs={class:"flex items-start justify-between gap-4"},ps={class:"mt-6 flex flex-wrap items-center gap-3"},hs={class:"relative min-w-[240px] flex-1"},ms={value:"review",class:"bg-[#12141f]"},gs={class:"mt-6 overflow-hidden rounded-xl border border-white/10"},fs={class:"w-full text-left text-sm"},bs={class:"border-b border-white/10 bg-white/[0.03] text-xs uppercase tracking-wide text-white/40"},xs={class:"px-5 py-3 font-medium"},ws={class:"flex items-center gap-3"},vs={key:0,class:"px-5 py-3 font-medium"},ys={class:"divide-y divide-white/5"},ks={key:0,class:"group transition-colors hover:bg-white/[0.05]"},_s=["colspan"],Cs={class:"flex items-stretch"},$s={class:"flex min-w-0 items-center gap-2"},zs={class:"min-w-0"},Ss={class:"truncate font-normal text-white/80"},Ps={class:"truncate text-xs text-white/40"},Ds={class:"relative border-l-2 border-transparent px-5 py-4 transition-colors group-hover:border-bronze"},Vs={class:"flex items-stretch"},Es={class:"flex min-w-0 items-center gap-2"},Ts={class:"min-w-0"},Ls={class:"truncate font-normal text-white"},Us={class:"truncate text-xs text-white/40"},As={class:"px-5 py-4"},Ms={class:"px-5 py-4"},Rs=["onClick"],Bs={key:1,class:"text-xs text-white/30"},Ns={class:"px-5 py-4"},js={key:0,class:"px-5 py-4"},Os={class:"px-5 py-4"},Fs={class:"px-5 py-4"},Is={class:"px-5 py-4"},Hs={class:"flex items-center justify-end gap-1"},Gs=["href"],qs=["onClick"],Ks=["disabled","onClick"],Ws=["onClick"],Js=["disabled","onClick"],Qs=["disabled","onClick"],Xs={key:0},Ys=["colspan"],Cl=ie({__name:"index",async setup(U){let p,w;const{listPages:V,createPage:_,updatePageStatus:$,duplicatePage:A,deletePage:P,updatePageSeo:z}=yt(),C=nt(),E=at(),i=it(),{hasPermission:n}=rt(),M=L(()=>n("pages:publish"));[p,w]=Se(()=>kt()),await p,w();const{data:c,refresh:D}=([p,w]=Se(()=>ut("admin-pages",()=>V())),p=await p,w(),p),{enabled:v,loaded:I,lookup:Ue}=He(),Y=r(!1),xe=r(null),we=r(null),q=r(""),B=r(E.query.status==="review"?"review":"all"),re=r(null),K=r(null),Z=Ge("pages"),ue=r(new Set);dt([q,B],()=>ue.value=new Set);const j=r(null),H=r(null),ee=r(null),O=qe("pages");function ve(l){return!!(l.seo?.metaTitle&&l.seo?.metaDescription)}const te=L(()=>!!q.value.trim()||B.value!=="all");function de(l){const t=q.value.trim().toLowerCase();if(B.value==="review"){if(l.review?.state!=="pending")return!1}else if(B.value==="changes"){if(l.status!=="published"||!l.hasDraftChanges)return!1}else if(B.value!=="all"&&l.status!==B.value)return!1;return t?l.title.toLowerCase().includes(t)||l.slug.toLowerCase().includes(t):!0}const ye=L(()=>{const l=new Map,t=[];function g(h){const f=l.get(h);if(f)return f;const d=h.lastIndexOf("/"),b={key:h,page:null,label:h.slice(d+1),children:[]};return l.set(h,b),d===-1?t.push(b):g(h.slice(0,d)).children.push(b),b}for(const h of c.value??[]){const f=g(h.slug);f.page=h,f.label=h.title}const T=h=>{h.sort((f,d)=>f.label.localeCompare(d.label)),h.forEach(f=>T(f.children))};return T(t),t});function W(l){return te.value?!ue.value.has(l):Z.value.has(l)}const Ae=L(()=>{const l=te.value,t=new Map;function g(d){let b=t.get(d);return b===void 0&&(b=d.page!==null&&de(d.page)||d.children.some(g),t.set(d,b)),b}const T=[];function h(d,b,le,oe){const Q=d.children.filter(g);if(T.push({key:d.key,page:d.page,label:d.label,depth:b,hasChildren:Q.length>0,lines:le,isLast:oe,dimmed:l&&!(d.page&&de(d.page))}),Q.length>0&&W(d.key)){const he=b===0?[]:[...le,!oe];Q.forEach((me,s)=>h(me,b+1,he,s===Q.length-1))}}const f=ye.value.filter(g);return f.forEach((d,b)=>h(d,0,[],b===f.length-1)),T}),Me=L(()=>(c.value??[]).filter(de).sort((l,t)=>
1l.title.localeCompare(t.title)).map(l=>({key:l.slug,page:l,label:l.title,depth:0,hasChildren:!1,lines:[],isLast:!0,dimmed:!1}))),ke=L(()=>(c.value??[]).filter(l=>l.review?.state==="pending").length),_e=L(()=>O.value==="tree"?Ae.value:Me.value),Ce=L(()=>{const l=[],t=g=>g.forEach(T=>{T.children.length&&l.push(T.key),t(T.children)});return t(ye.value),l}),ce=L(()=>Z.value.size>0);function Re(){Z.value=ce.value?new Set:new Set(Ce.value)}function J(l){return O.value==="tree"&&l.hasChildren}function se(l){const t=te.value?ue:Z,g=new Set(t.value);g.has(l)?g.delete(l):g.add(l),t.value=g}function $e(l){return`/admin/editor/${l}`}function pe(l){return l==="home"?"/":`/${l}`}function ze(l=null){xe.value=l,Y.value=!0}async function Be(l){try{await _(l),Y.value=!1,await D(),i.success(`"${l.title}" created`),await C.push($e(l.slug))}catch(t){const g=t&&typeof t=="object"&&"data"in t?t.data?.error??"Could not create page":"Could not create page";we.value?.setError(g),i.error(g)}}async function Ne(l){re.value=l.slug;try{const t=l.status==="published"?"draft":"published";await $(l.slug,t),await D(),i.success(t==="published"?"Page published":"Page unpublished")}catch{i.error("Couldn't update status — try again")}finally{re.value=null}}async function je(l){K.value=l.slug;try{await A(l.slug),await D(),i.success(`"${l.title}" duplicated`)}catch{i.error("Couldn't duplicate — try again")}finally{K.value=null}}async function Oe(){const l=j.value;if(l){K.value=l.page.slug;try{await P(l.page.slug),await D(),i.success(`"${l.page.title}" deleted`)}catch{i.error("Couldn't delete — try again")}finally{K.value=null,j.value=null}}}async function Fe(l){const t=H.value;if(t)try{await z(t.slug,l),H.value=null,await D(),i.success("SEO details saved")}catch{i.error("Couldn't save SEO details — try again")}}return(l,t)=>{const g=Ie,T=Ke,h=Je,f=Te,d=Qe,b=Xe,le=gt,oe=Mt,Q=xt,he=Jt,me=vt;return a(),k("div",rs,[u(g,{active:"pages"}),e("div",us,[t[27]||(t[27]=e("div",{class:"flex items-center border-b border-white/5 px-8 py-5"},[e("h2",{class:"text-sm font-medium text-white/60"},"Page Manager — Hacienda")],-1)),e("main",ds,[e("div",cs,[t[9]||(t[9]=e("div",null,[e("h1",{class:"text-3xl font-normal text-white"},"Pages"),e("p",{class:"mt-1 text-sm text-white/50"},"Create and manage your website pages")],-1)),e("button",{class:"flex h-10 shrink-0 items-center gap-1.5 rounded-[10px] bg-bronze px-4 text-sm font-semibold text-white transition hover:bg-bronze/90 active:scale-[0.99]",onClick:t[0]||(t[0]=s=>ze())},[u(o(Pe),{size:16,"stroke-width":2.5}),t[8]||(t[8]=S(" New Page ",-1))])]),e("div",ps,[e("div",hs,[u(o(ct),{size:16,"stroke-width":2,class:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-white/30"}),G(e("input",{"onUpdate:modelValue":t[1]||(t[1]=s=>ge(q)?q.value=s:null),type:"text",placeholder:"Search pages...",class:"w-full rounded-[10px] border border-white/15 bg-white/[0.06] py-2.5 pl-10 pr-4 text-sm font-medium text-white placeholder-white/30 shadow-sm outline-none transition focus:border-bronze focus:ring-2 focus:ring-bronze/30"},null,512),[[X,o(q)]])]),G(e("select",{"onUpdate:modelValue":t[2]||(t[2]=s=>ge(B)?B.value=s:null),"aria-label":"Status",class:"rounded-[10px] border border-white/15 bg-white/[0.06] py-2.5 pl-3.5 pr-9 text-sm font-medium text-white shadow-sm outline-none transition focus:border-bronze focus:ring-2 focus:ring-bronze/30"},[t[10]||(t[10]=e("option",{value:"all",class:"bg-[#12141f]"},"All statuses",-1)),t[11]||(t[11]=e("option",{value:"published",class:"bg-[#12141f]"},"Published",-1)),t[12]||(t[12]=e("option",{value:"draft",class:"bg-[#12141f]"},"Draft",-1)),t[13]||(t[13]=e("option",{value:"changes",class:"bg-[#12141f]"},"Unpublished changes",-1)),e("option",ms," Pending review"+m(o(ke)?` (${o(ke)})`:""),1)],512),[[pt,o(B)]]),u(T,{modelValue:o(O),"onUpdate:modelValue":t[3]||(t[3]=s=>ge(O)?O.value=s:null),class:"ml-auto"},null,8,["modelValue"])]),e("div",gs,[e("table",fs,[e("thead",bs,[e("tr",null,[e("th",xs,[e("div",ws,[t[14]||(t[14]=S(" Page Title / Slug ",-1)),o(O)==="tree"&&!o(te)&&o(Ce).length?(a(),k("button",{key:0,t
1ype:"button",class:"flex items-center gap-1 rounded-md px-1.5 py-0.5 normal-case tracking-normal text-white/40 transition hover:bg-white/10 hover:text-white",onClick:Re},[(a(),x(fe(o(ce)?o(We):o(Et)),{size:13,"stroke-width":2})),S(" "+m(o(ce)?"Collapse all":"Expand all"),1)])):y("",!0)])]),t[15]||(t[15]=e("th",{class:"px-5 py-3 font-medium"},"Status",-1)),t[16]||(t[16]=e("th",{class:"px-5 py-3 font-medium"},"Version",-1)),t[17]||(t[17]=e("th",{class:"px-5 py-3 font-medium"},"SEO",-1)),o(v)?(a(),k("th",vs,"Views")):y("",!0),t[18]||(t[18]=e("th",{class:"px-5 py-3 font-medium"},"Updated",-1)),t[19]||(t[19]=e("th",{class:"px-5 py-3 font-medium"},"Published",-1)),t[20]||(t[20]=e("th",{class:"px-5 py-3 text-right font-medium"},"Actions",-1))])]),e("tbody",ys,[(a(!0),k(De,null,ht(o(_e),s=>(a(),k(De,{key:s.key},[s.page?(a(),k("tr",{key:1,class:F(["group transition-colors hover:bg-white/[0.05]",s.dimmed?"opacity-50 hover:opacity-100":""])},[e("td",Ds,[e("div",Vs,[e("div",Es,[o(O)==="tree"?(a(),x(h,{key:0,depth:s.depth,lines:s.lines,"is-last":s.isLast,expandable:s.hasChildren,open:W(s.key),onToggle:N=>se(s.key)},null,8,["depth","lines","is-last","expandable","open","onToggle"])):y("",!0),(a(),x(fe(J(s)?"button":"div"),Ve({ref_for:!0},J(s)?{type:"button","aria-expanded":W(s.key)}:{},{class:"flex min-w-0 items-center gap-2 text-left",onClick:N=>J(s)&&se(s.key)}),{default:R(()=>[u(o($t),{size:15,"stroke-width":2,class:"shrink-0 text-white/30"}),e("div",Ts,[e("p",Ls,m(s.page.title),1),e("p",Us,"/"+m(s.page.slug),1)])]),_:2},1040,["onClick"]))])])]),e("td",As,[e("span",{class:F(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs font-semibold",s.page.status==="published"?"bg-emerald-500/15 text-emerald-400":"bg-amber-500/15 text-amber-400"])},[e("span",{class:F(["h-1.5 w-1.5 rounded-full",s.page.status==="published"?"bg-emerald-400":"bg-amber-400"])},null,2),S(" "+m(s.page.status==="published"?"Published":"Draft"),1)],2),s.page.review?(a(),x(f,{key:0,label:s.page.review.state==="pending"?`Submitted by ${s.page.review.by??"an editor"} — waiting for an admin to publish`:`Sent back by ${s.page.review.by??"an admin"}${s.page.review.note?`: ${s.page.review.note}`:""}`},{default:R(()=>[e("span",{class:F(["ml-1.5 inline-flex items-center gap-1 rounded-full px-2 py-1 text-xs font-medium",s.page.review.state==="pending"?"bg-sky-400/10 text-sky-300":"bg-amber-500/10 text-amber-300"])},[e("span",{class:F(["h-1.5 w-1.5 rounded-full",s.page.review.state==="pending"?"bg-sky-400":"bg-amber-400"])},null,2),S(" "+m(s.page.review.state==="pending"?"Pending review":"Changes requested"),1)],2)]),_:2},1032,["label"])):y("",!0),s.page.hasDraftChanges?(a(),x(f,{key:1,label:"The live page still shows the last published version"},{default:R(()=>[...t[21]||(t[21]=[e("span",{class:"ml-1.5 inline-flex items-center gap-1 rounded-full bg-amber-500/10 px-2 py-1 text-xs font-medium text-amber-400/90"},[e("span",{class:"h-1.5 w-1.5 rounded-full bg-amber-400"}),S(" Unpublished changes ")],-1)])]),_:1})):y("",!0)]),e("td",Ms,[s.page.currentVersion>0?(a(),k("button",{key:0,type:"button",class:"inline-flex items-center gap-1 rounded-full bg-white/[0.06] px-2.5 py-1 text-xs font-medium text-white/70 transition hover:bg-white/10 hover:text-white",onClick:N=>ee.value=s.page.slug},[u(o(zt),{size:11,"stroke-width":2.5}),S(" v"+m(s.page.currentVersion),1)],8,Rs)):(a(),k("span",Bs,"—"))]),e("td",Ns,[u(f,{label:ve(s.page)?"SEO complete":"Missing SEO details"},{default:R(()=>[u(o(Ee),{size:16,"stroke-width":2,class:F(ve(s.page)?"text-emerald-400":"text-white/20")},null,8,["class"])]),_:2},1032,["label"])]),o(v)?(a(),k("td",js,[u(d,{path:pe(s.page.slug),stat:o(Ue)(pe(s.page.slug)),loaded:o(I)},null,8,["path","stat","loaded"])])):y("",!0),e("td",Os,[u(b,{date:new Date(s.page.updatedAt).toLocaleDateString(),by:s.page.updatedBy},null,8,["date","by"])]),e("td",Fs,[u(b,{date:s.page.publishedAt?new Date(s.page.publishedAt).toLocaleDateString():"—",by:s.page.publishedAt?s.page.publishedBy:void 0},null,8,["date","by"])]),e("td",Is,[e("div",Hs,[u(f,{label:"View"},{default:R(()=>[e("a",{href:pe(s.page.slug),target:"_blank",rel:"noopener","aria-label":"View",class:"flex rounded-lg p-2 text-white/60 transition-colors hover:bg-white/10 hover:text-white"},[u(o(mt),{size:15,"stroke-width":2})],8,Gs)]),_:2},1024),u(f,{label:"Edit"},{default:R(()=>[u(le,{to:$e(s.page.slug),"aria-label":"Edit",class:"flex rounded-lg p-2 text-white/60 transition-colors hover:bg-white/10 hover:text-white"},{default:R(()=>[u(o(ft),{size:15,"stroke-width":2})]),_:1},8,["to"])]),_:2},1024),u(oe,null,{default:R(()=>[e("button",{type:"button",class:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-sm text-white/80 hover:bg-white/10",onClick:N=>ze(s.page.slug)},[u(o(Pe),{size:14,"stroke-width":2}),t[22]||(t[22]=S(" Add subpage ",-1))],8,qs),o(M)?(a(),k("button",{key:0,t
1ype:"button",disabled:o(re)===s.page.slug,class:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-sm text-white/80 hover:bg-white/10 disabled:opacity-40",onClick:N=>Ne(s.page)},[s.page.status==="published"?(a(),x(o(St),{key:0,size:14,"stroke-width":2})):(a(),x(o(Pt),{key:1,size:14,"stroke-width":2})),S(" "+m(s.page.status==="published"?"Unpublish":"Publish"),1)],8,Ks)):y("",!0),e("button",{type:"button",class:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-sm text-white/80 hover:bg-white/10",onClick:N=>H.value=s.page},[u(o(Ee),{size:14,"stroke-width":2}),t[23]||(t[23]=S(" Edit SEO ",-1))],8,Ws),e("button",{type:"button",disabled:o(K)===s.page.slug,class:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-sm text-white/80 hover:bg-white/10 disabled:opacity-40",onClick:N=>je(s.page)},[u(o(Dt),{size:14,"stroke-width":2}),t[24]||(t[24]=S(" Duplicate ",-1))],8,Js),t[26]||(t[26]=e("div",{class:"my-1 h-px bg-white/10"},null,-1)),e("button",{type:"button",disabled:o(K)===s.page.slug,class:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-sm text-accent hover:bg-accent/10 disabled:opacity-40",onClick:N=>j.value={page:s.page,hasChildren:s.hasChildren}},[u(o(bt),{size:14,"stroke-width":2}),t[25]||(t[25]=S(" Delete ",-1))],8,Qs)]),_:2},1024)])])],2)):(a(),k("tr",ks,[e("td",{colspan:o(v)?8:7,class:F(["relative border-l-2 border-transparent px-5 py-3 transition-colors group-hover:border-bronze",s.dimmed?"opacity-50":""])},[e("div",Cs,[e("div",$s,[o(O)==="tree"?(a(),x(h,{key:0,depth:s.depth,lines:s.lines,"is-last":s.isLast,expandable:s.hasChildren,open:W(s.key),onToggle:N=>se(s.key)},null,8,["depth","lines","is-last","expandable","open","onToggle"])):y("",!0),(a(),x(fe(J(s)?"button":"div"),Ve({ref_for:!0},J(s)?{type:"button","aria-expanded":W(s.key)}:{},{class:"flex min-w-0 items-center gap-2 text-left",onClick:N=>J(s)&&se(s.key)}),{default:R(()=>[s.hasChildren&&W(s.key)?(a(),x(o(_t),{key:0,size:15,"stroke-width":2,class:"shrink-0 text-bronze/70"})):(a(),x(o(Ct),{key:1,size:15,"stroke-width":2,class:"shrink-0 text-bronze/60"})),e("div",zs,[e("p",Ss,m(s.label),1),e("p",Ps,"/"+m(s.key)+" · no page",1)])]),_:2},1040,["onClick"]))])])],10,_s)]))],64))),128)),o(_e).length===0?(a(),k("tr",Xs,[e("td",{colspan:o(v)?8:7,class:"px-5 py-10 text-center text-sm text-white/40"},m(o(c)&&o(c).length>0?"No pages match your search.":"No pages yet — create your first one."),9,Ys)])):y("",!0)])])])])]),o(Y)?(a(),x(is,{key:0,ref_key:"newPageDialog",ref:we,"parent-slug":o(xe),onCreate:Be,onClose:t[4]||(t[4]=s=>Y.value=!1)},null,8,["parent-slug"])):y("",!0),o(j)?(a(),x(Q,{key:1,title:"Delete page",message:o(j).hasChildren?`Delete “${o(j).page.title}” and all of its subpages? This can't be undone.`:`Delete “${o(j).page.title}”? This can't be undone.`,"confirm-label":"Delete",danger:"",onConfirm:Oe,onCancel:t[5]||(t[5]=s=>j.value=null)},null,8,["message"])):y("",!0),o(H)?(a(),x(he,{key:2,title:o(H).title,"model-value":o(H).seo,onSave:Fe,onClose:t[6]||(t[6]=s=>H.value=null)},null,8,["title","model-value"])):y("",!0),o(ee)?(a(),x(me,{key:3,slug:o(ee),onClose:t[7]||(t[7]=s=>ee.value=null)},null,8,["slug"])):y("",!0)])}}});export{Cl 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.