PageSourceSearch

https://educ-ethic-animal.org/build/assets/Resources-Dsh3uixn.js

js educ-ethic-animal.org collected 2026-10-05 06:30:23 UTC 7,918 bytes, 1 lines download raw bytes

1import{d as F,a as m,o as n,e,t as f,u as r,i as L,c as z,p as H,b as i,w as p,g as U,f as x,n as k,F as h,r as w,q as I,h as R,l as T,v as P}from"./app-D_mTJ8hk.js";import{l as V,F as Q}from"./lucide-vue-next-DA3EEs6e.js";import{_ as Y,a as J}from"./App.vue_vue_type_script_setup_true_lang-B1qHK5YC.js";import{u as O}from"./useTexts-CLpachtF.js";import{_ as K}from"./Input.vue_vue_type_script_setup_true_lang-mgTdTUws.js";import{_ as M,a as W,b as X,c as Z}from"./CardTitle.vue_vue_type_script_setup_true_lang-B1R7THVI.js";import{_ as G}from"./CardFooter.vue_vue_type_script_setup_true_lang-WlWk2G7a.js";import{_ as E}from"./index-DXsvhti3.js";import{_ as ee}from"./index-BPJYhAFT.js";import{S as te}from"./search-B5ktcOOe.js";import{C as j,a as D}from"./zoom-out-CwvjKltf.js";import{C as se}from"./chevron-down-CymYdL-1.js";import{E as oe}from"./external-link-CfP39Qbw.js";import"./video-B1rppwHZ.js";import"./index-BgL-G3RI.js";import"./calendar-BmM7idyp.js";import"./chevron-right-Rc2DVs7x.js";import"./paw-print-DJ1navWn.js";import"./settings-CnQO6E2f.js";import"./check-CuKYI_hr.js";import"./chevron-up-bnOruXvE.js";import"./circle-alert-DAajd4yI.js";import"./clock-hHfcaWXq.js";import"./columns-4-B83jwKbS.js";import"./eye-off-BKUX_yIr.js";import"./eye-CcNwCd4v.js";import"./file-text-DBlW_g30.js";import"./menu-2I18SOCw.js";import"./mail-DSyeyfMW.js";import"./send-B74JKcvD.js";import"./plus-Dd_CnPIn.js";import"./rabbit-9zEYFrBY.js";import"./server-BypdWh5D.js";import"./trash-2-OsCew05p.js";import"./upload-BltQbTUs.js";import"./user-plus-zuI7aNjZ.js";import"./user-CBVq-o0n.js";import"./DialogPortal-DP3cFXGo.js";import"./useForwardExpose-RubRM0rZ.js";import"./Presence-Y-d2rawA.js";import"./Collection-CzhjSjg5.js";import"./SheetContent.vue_vue_type_script_setup_true_lang-BefhRHH5.js";import"./DialogHeader.vue_vue_type_script_setup_true_lang-Bt7ChcAK.js";import"./DialogTitle.vue_vue_type_script_setup_true_lang-DRLfjbjc.js";import"./DialogTitle-DZQCOSrF.js";const re={class:"relative bg-accent py-20 overflow-hidden"},le={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative"},ie={class:"text-5xl lg:text-6xl font-black text-accent-foreground mb-6 leading-tight"},ne={class:"text-xl text-accent-foreground/85 leading-relaxed whitespace-pre-line"},ae=F({__name:"Hero",setup(B){const{t:b}=O();return(_,v)=>(n(),m("section",re,[e("div",le,[e("h1",ie,f(r(b)("resources.hero.title")),1),e("div",ne,f(r(b)("resources.hero.description")),1)])]))}}),ce=["content"],ue={class:"py-12 bg-background min-h-screen"},de={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"},me={class:"flex flex-col lg:flex-row gap-8"},pe={class:"lg:w-96 flex-shrink-0"},fe={class:"bg-sidebar rounded-2xl shadow-lg p-6 sticky top-3"},_e={class:"mb-6"},xe={class:"relative"},ve={class:"space-y-2"},ge={class:"text-sm font-bold text-foreground uppercase tracking-wide mb-4 flex items-center"},he={class:"flex items-center"},be=["onClick"],ye={class:"flex items-center"},ke={class:"ml-4 space-y-1"},we=["onClick"],Ce={class:"flex items-center"},$e={class:"flex-1"},Le={class:"mb-8"},ze={class:"flex items-center justify-between mb-6"},Re={class:"text-2xl font-bold text-foreground"},Be={key:0,class:"text-center py-12"},Se={key:1,class:"space-y-6"},Te={class:"flex items-center gap-2 mb-2"},Ve={class:"flex flex-col"},Ee=["href"],C="all",je=F({__name:"Resources",props:{resources:{},resourceLinks:{},resourceGroups:{}},setup(B){const{t:b}=O(),_=B,v=L([]),A=z(()=>Object.keys(S.value)),g=L(C),y=L(""),S=z(()=>{const c=_.resourceGroups.filter(o=>o.parent_id===null),t=_.resourceGroups.filter(o=>o.parent_id!==null).reduce((o,a)=>{var d;return(o[d=a.parent_id]||(o[d]=[])).push(a),o},{}),l=_.resources.map(o=>({...o,urls:_.resourceLinks.filter(a=>a.resource_id===o.id)})).reduce((o,a)=>{var d;return(o[d=a.resource_group_id]||(o[d]=[])).push(a),o},{}),u={};for(const o of c){const a=V[o.icon]||j;u[o.id]={title:o.libel,icon:a,subcategories:{}};for(const d of t[o.id]||[]){const q=V[d.icon]||j;u[o.id].subcategories[d.id]={title:d.libel,icon:q,resources:l[d.id]||[]}}}return u}),$=z(()=>{let c=_.resources.map(t=>{const s=_.resourceGroups.find(u=>u.id===t.resource_group_id),l=_.resourceGroups.find(u=>u.id===(s==null?void 0:s.parent_id));return{...t,categoryId:(l==null?void 0:l.id)??null,subcategoryId:(s==null?void 0:s.id)??null,categoryTitle:(l==null?void 0:l.libel)??"",subcategoryTitle:(s==null?void 0:s.libel)??"",urls:_.resourceLinks.filter(u=>u.resource_id===t.id)}});if(g.value&&g.value!==C&&(c=c.filter(t=>String(t.subcategoryId)===g.value)),y.value){const t=y.value.toLowerCase();c=c.filter(s=>s.title.toLowerCase().includes(t)||s.description.toLowerCase().includes(t))}return c}),N=c=>{const t=v.value.indexOf(c);t>-1?v.value.splice(t,1):v.value.push(c)};return H(()=>{v.value=[...A.value]}),(c,t)=>(n(),m(h,null,[i(r(U),null,{default:p(()=>[t[2]||(t[2]=e("title",null,"Ressources",-1)),e("meta",{name:"description",content:r(b)("resources.hero.description")},null,8,ce)]),_:1,__:[2]}),i(Y,null,{default:p(()=>[i(ae),e("section",ue,[e("div",de,[e("div",me,[e("div",pe,[e("div",fe,[e("div",_e,[e("div",xe,[i(r(te),{class:"absolute left-3 top-1/2 transform -translate-y-1/2 text-foreground
1/50 size-5"}),i(r(K),{modelValue:y.value,"onUpdate:modelValue":t[0]||(t[0]=s=>y.value=s),type:"text",placeholder:"Rechercher une ressource...",class:"pl-10"},null,8,["modelValue"])])]),e("nav",ve,[e("h3",ge,[i(r(Q),{class:"size-4 mr-2"}),t[3]||(t[3]=x(" Catégories "))]),e("button",{onClick:t[1]||(t[1]=s=>g.value=C),class:k(["w-full flex items-center justify-between p-3 rounded-xl font-semibold transition-colors text-foreground hover:bg-muted",g.value===C?"bg-primary/20 text-primary":""])},[e("span",he,[i(r(D),{class:"size-4 mr-3"}),t[4]||(t[4]=x(" Toutes les ressources "))])],2),t[5]||(t[5]=e("hr",null,null,-1)),(n(!0),m(h,null,w(S.value,(s,l,u)=>(n(),m("div",{key:l},[e("button",{onClick:o=>N(l),class:k(["w-full flex items-center justify-between p-3 rounded-xl font-semibold transition-colors",u%2===0?"hover:bg-primary/10 text-primary":"hover:bg-secondary/10 text-secondary"])},[e("span",ye,[(n(),R(T(s.icon),{class:"size-4 mr-3"})),x(" "+f(s.title),1)]),i(r(se),{class:k(["size-4 transition-transform",v.value.includes(l)?"rotate-180":""])},null,8,["class"])],10,be),I(e("div",ke,[(n(!0),m(h,null,w(s.subcategories,(o,a)=>(n(),m("div",{key:a},[e("button",{onClick:d=>g.value=a,class:k(["w-full text-left p-2 rounded-lg text-sm text-foreground hover:bg-foreground
1/10 transition-colors flex items-center",{"bg-primary/20 text-primary font-semibold":g.value===a}])},[e("span",Ce,[(n(),R(T(o.icon),{class:"size-4 mr-3"})),x(" "+f(o.title),1)])],10,we)]))),128))],512),[[P,v.value.includes(l)]])]))),128))])])]),e("div",$e,[e("div",Le,[e("div",ze,[e("h2",Re,f($.value.length)+" ressource(s) trouvée(s) ",1)]),$.value.length===0?(n(),m("div",Be,[i(r(D),{class:"size-16 text-foreground mx-auto mb-4"}),t[6]||(t[6]=e("p",{class:"text-gray-500 text-lg"},"Aucune ressource trouvée pour cette recherche.",-1))])):(n(),m("div",Se,[(n(!0),m(h,null,w($.value,s=>(n(),R(r(M),{key:s.title},{default:p(()=>[i(r(W),null,{default:p(()=>[e("div",Te,[i(r(E),{class:"text-xs font-semibold px-2 py-1 rounded-full"},{default:p(()=>[x(f(s.categoryTitle),1)]),_:2},1024),i(r(E),{variant:"secondary",class:"text-xs font-medium px-2 py-1 rounded-full"},{default:p(()=>[x(f(s.subcategoryTitle),1)]),_:2},1024)]),i(r(X),{class:"text-xl"},{default:p(()=>[x(f(s.title),1)]),_:2},1024)]),_:2},1024),i(r(Z),null,{default:p(()=>[x(f(s.description),1)]),_:2},1024),i(r(G),null,{default:p(()=>[e("div",Ve,[(n(!0),m(h,null,w(s.urls,l=>(n(),m("a",{key:l.label,href:l.url,target:"_blank"},[i(r(ee),{variant:"link",class:"rounded-full p-0! h-min"},{default:p(()=>[i(r(oe),{class:"size-3"}),x(" "+f(l.label),1)]),_:2},1024)],8,Ee))),128))])]),_:2},1024)]),_:2},1024))),128))]))])])])])])]),_:1})],64))}}),Lt=J(je,[["__scopeId","data-v-fd0da2c0"]]);export{Lt 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.