1import{r as m,j as e}from"./react-vendor-B85QsyED.js";import{b as U,F as c,l as y,C as N,r as C,n as $,V as M,W as V,Z as x,f as p,L as B,s as i}from"./index-Df-PK-QF.js";import{C as S,a as k,b as w,c as P}from"./card-D5anJr5u.js";import{S as G}from"./LoadingSpinner-DK9nXEMz.js";import{C as W}from"./chevron-left-eMwYCp69.js";import{C as K}from"./chevron-right-C2mFa1KA.js";import"./maps-DeNBPk8t.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const h=U("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),j=30,se=()=>{const[o,u]=m.useState(1),[s,L]=m.useState("all"),[l,I]=m.useState({articles:[],dojos:[],events:[],products:[],maestros:[],videos:[],categories:[],directoryLinks:[]}),[T,b]=m.useState(!0);m.useEffect(()=>{(async()=>{b(!0);try{const[t,r,F,q,H,R,z,O]=await Promise.all([i.from("articles").select("slug, title, created_at").eq("published",!0).order("title"),i.from("dojos").select("slug, name, city").not("slug","is",null).order("name"),i.from("events").select("slug, title, date_start").eq("published",!0).order("title"),i.from("marketplace_products").select("slug, title").eq("published",!0).eq("available",!0).order("title"),i.from("teacher_profiles").select("slug, name").not("slug","is",null).order("name"),i.from("video_gallery").select("slug, title").eq("status","published").order("title"),i.from("article_categories").select("slug, title").order("title"),i.from("directory_links").select("id, url, title").eq("published",!0).order("title").limit(100)]);I({articles:t.data||[],dojos:r.data||[],events:F.data||[],products:q.data||[],maestros:H.data||[],videos:R.data||[],categories:z.data||[],directoryLinks:O.data||[]})}catch(t){console.error("Error fetching sitemap data:",t)}finally{b(!1)}})()},[]);const E=[{url:"/",label:"Inicio"},{url:"/dojos",label:"Dojos"},{url:"/articulos",label:"ArtÃculos"},{url:"/eventos",label:"Eventos"},{url:"/tienda",label:"Tienda"},{url:"/maestros",label:"Maestros"},{url:"/videos",label:"GalerÃa de Videos"},{url:"/mapa-dojos",label:"Mapa de Dojos"},{url:"/artes-marciales",label:"Artes Marciales"},{url:"/miembros",label:"Miembros"},{url:"/premium",label:"Premium"},{url:"/faq",label:"Preguntas Frecuentes"},{url:"/directorio",label:"Red Marcial"},{url:"/dataset",label:"Dataset"},{url:"/privacidad",label:"PolÃtica de Privacidad"},{url:"/terminos",label:"Términos y Condiciones"}],f=[{id:"all",label:"Todas las Páginas",icon:h},{id:"static",label:"Páginas Principales",icon:c},{id:"articles",label:`ArtÃculos (${l.articles.length})`,icon:c},{id:"dojos",label:`Dojos (${l.dojos.length})`,icon:y},{id:"events",label:`Eventos (${l.events.length})`,icon:N},{id:"products",label:`Productos (${l.products.length})`,icon:C},{id:"maestros",label:`Maestros (${l.maestros.length})`,icon:$},{id:"videos",label:`Videos (${l.videos.length})`,icon:M},{id:"categories",label:`CategorÃas (${l.categories.length})`,icon:h},{id:"directory",label:`Red Marcial (${l.directoryLinks.length})`,icon:c}],d=(()=>{let a=[];return(s==="all"||s==="static")&&(a=[...a,...E.map(t=>({...t,type:"static"}))]),(s==="all"||s==="articles")&&(a=[...a,...l.articles.map(t=>({url:`/articulos/${t.slug}`,label:t.title,type:"article"}))]),(s==="all"||s==="dojos")&&(a=[...a,...l.dojos.map(t=>({url:`/dojos/${t.slug}`,label:`${t.name}${t.city?` - ${t.city}`:""}`,type:"dojo"}))]),(s==="all"||s==="events")&&(a=[...a,...l.events.map(t=>({url:`/eventos/${t.slug}`,label:t.title,type:"event"}))]),(s==="all"||s==="products")&&(a=[...a,...l.products.map(t=>({url:`/tienda/${t.slug}`,label:t.title,type:"product"}))]),(s==="all"||s==="maestros")&&(a=[...a,...l.maestros.map(t=>({url:`/maestros/${t.slug}`,label:t.name,type:"maestro"}))]),(s==="all"||s==="videos")&&(a=[...a,...l.videos.map(t=>({url:`/videos/${t.slug}`,label:t.title,type:"video"}))]),(s==="all"||s==="categories")&&(a=[...a,...l.categories.map(t=>({url:`/articulos?category=${t.slug}`,label:t.title,type:"category"}))]),(s==="all"||s==="directory")&&(a=[...a,...l.directoryLinks.map(t=>({url:`/directorio#${encodeURIComponent(t.title.substring(0,50))}`,label:t.title,type:"directory"}))]),a})(),n=Math.ceil(d.length/j),g=(o-1)*j,v=g+j,A=d.slice(g,v),_=a=>{L(a),u(1)},D=a=>{switch(a){case"article":return e.jsx(c,{className:"h-4 w-4"});case"dojo":return e.jsx(y,{className:"h-4 w-4"});case"event":return e.jsx(N,{className:"h-4 w-4"});case"product":return e.jsx(C,{className:"h-4 w-4"});case"maestro":return e.jsx($,{className:"h-4 w-4"});case"video":return e.jsx(M,{className:"h-4 w-4"});case"category":return e.jsx(h,{className:"h-4 w-4"});case"directory":return e.jsx(c,{className:"h-4 w-4"});default:return e.jsx(c,{className:"h-4 w-4"})}};return e.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[e.jsx(V,{title:"Mapa del Sitio HTML - Navegación Completa",description:"Mapa completo del sitio con todas las páginas, artÃculos, dojos, eventos, videos, maestros, productos y recursos de Kokusai Bujin Renmei. Navegación organizada por secciones para encontrar c
6ontenido fácilmente.",canonicalUrl:"/sitemap",ogType:"website",ogImage:"/articles/kokusai-bujin-renmei.png",structuredData:{"@context":"https://schema.org","@type":"WebPage",name:"Mapa del Sitio HTML",description:"Navegación completa de todas las páginas y contenidos del sitio",url:`${x.siteUrl}/sitemap`,provider:{"@type":"Organization",name:x.siteName,url:x.siteUrl}}}),e.jsx("main",{className:"flex-1 container mx-auto px-4 py-8",children:e.jsxs("div",{className:"max-w-7xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-4xl md:text-5xl font-bold tracking-tight mb-4",children:"Mapa del Sitio"}),e.jsx("p",{className:"text-xl text-muted-foreground max-w-2xl mx-auto",children:"Navegación completa de todas las páginas y contenidos del sitio"}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:["Total: ",d.length," páginas"]})]}),e.jsxs(S,{className:"mb-6",children:[e.jsx(k,{children:e.jsx(w,{children:"Filtrar por Sección"})}),e.jsx(P,{children:e.jsx("div",{className:"flex flex-wrap gap-2",children:f.map(a=>{const t=a.icon;return e.jsxs(p,{variant:s===a.id?"default":"outline",onClick:()=>_(a.id),className:"flex items-center gap-2",children:[e.jsx(t,{className:"h-4 w-4"}),a.label]},a.id)})})})]}),e.jsxs(S,{children:[e.jsxs(k,{children:[e.jsx(w,{children:f.find(a=>a.id===s)?.label||"Todas las Páginas"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Mostrando ",g+1," - ",Math.min(v,d.length)," de ",d.length," páginas"]})]}),e.jsx(P,{children:T?e.jsx(G,{message:"Cargando mapa del sitio..."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid gap-2",children:A.map((a,t)=>e.jsxs(B,{to:a.url,className:"flex items-center gap-3 p-3 rounded-lg hover:bg-accent transition-colors group",children:[e.jsx("span",{className:"text-muted-foreground group-hover:text-primary transition-colors",children:D(a.type)}),e.jsx("span",{className:"text-sm group-hover:text-primary transition-colors flex-1",children:a.label}),e.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity",children:a.url})]},`${a.url}-${t}`))}),n>1&&e.jsxs("div",{className:"flex items-center justify-center gap-2 mt-6 pt-6 border-t",children:[e.jsxs(p,{variant:"outline",size:"sm",onClick:()=>u(a=>Math.max(1,a-1)),disabled:o===1,children:[e.jsx(W,{className:"h-4 w-4 mr-1"}),"Anterior"]}),e.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:Math.min(5,n)},(a,t)=>{let r;return n<=5||o<=3?r=t+1:o>=n-2?r=n-4+t:r=o-2+t,e.jsx(p,{variant:o===r?"default":"outline",size:"sm",onClick:()=>u(r),className:"min-w-[40px]",children:r},r)})}),e.jsxs(p,{variant:"outline",size:"sm",onClick:()=>u(a=>Math.min(n,a+1)),disabled:o===n,children:["Siguiente",e.jsx(K,{className:"h-4 w-4 ml-1"})]})]})]})})]})]})})]})};export{se 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.