PageSourceSearch

https://equipagesolidaire.fr/_nuxt/D7WwUTDg.js

js equipagesolidaire.fr collected 2026-10-04 12:33:05 UTC 9,096 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CBC4R_aL.js","./DMtxRCXx.js"])))=>i.map(i=>d[i]);
2import{d as Q,p as W}from"./CN2tJOOH.js";import{D as u,E as U,On as a,_ as e,b as i,bt as C,ct as F,ft as H,g as $,k as S,mt as o,nr as p,o as I,qt as l,tt as z,un as j,v as G,vn as x,y as O}from"./DJsGfdon.js";import{n as X}from"./8vuIGXLz.js";import{t as Y}from"./Bw2BqkGe.js";import{t as Z}from"./C9WxONJa.js";import{t as J}from"./BGe74o_12.js";import{t as K}from"./DCy4IW63.js";import{t as ee}from"./Cr327Bcp.js";import{t as te}from"./C_hbRtw3.js";import{t as B}from"./Bstvga7R.js";import{t as se}from"./Y7Qq3Qq-.js";import{t as ae}from"./BpEL6dbE2.js";import{t as ne}from"./C-tZILqt2.js";import{t as M}from"./CrUSt-LR.js";(function(){try{var _=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},b=new _.Error().stack;b&&(_._sentryDebugIds=_._sentryDebugIds||{},_._sentryDebugIds[b]="81213889-68ad-4898-b236-940d044cc95a",_._sentryDebugIdIdentifier="sentry-dbid-81213889-68ad-4898-b236-940d044cc95a")}catch{}})();var oe={class:"space-y-6"},le={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"},ie={class:"grid grid-cols-2 lg:grid-cols-3 gap-4 flex-1"},re={class:"text-2xl font-bold text-gray-900"},de={class:"text-2xl font-bold text-gray-900"},ue={class:"text-2xl font-bold text-gray-900"},ce={key:0,class:"text-xs text-gray-500"},pe={class:"h-64"},me={key:0,class:"text-sm text-gray-500"},_e={key:1,class:"space-y-2"},fe={class:"font-semibold"},ve={class:"grid grid-cols-1 lg:grid-cols-3 gap-6"},ge={key:0,class:"text-sm text-gray-500"},be={key:1,class:"space-y-2"},ye={class:"font-semibold"},ke={key:0,class:"text-sm text-gray-500"},xe={key:1,class:"space-y-2"},he={class:"font-semibold"},Te={key:0,class:"text-sm text-gray-500"},Ae={key:1,class:"space-y-2"},Ce={class:"font-semibold"},Ie=S({__name:"TrackedLinkStatsPanel",props:{linkId:{}},emits:["loaded"],setup(_,{emit:b}){const T=_,L=b,A=K(),{fetchStats:v}=M(),t=x(null),m=x("30d"),h=x(null);let g=null;const f=[{label:"7 derniers jours",value:"7d"},{label:"30 derniers jours",value:"30d"},{label:"90 derniers jours",value:"90d"},{label:"Depuis le début",value:"all"}],c={MOBILE:"Téléphone",TABLET:"Tablette",DESKTOP:"Ordinateur",UNKNOWN:"Inconnu"},y=n=>c[n]??n,E={instagram:"Instagram",facebook:"Facebook",tiktok:"TikTok",snapchat:"Snapchat",linkedin:"LinkedIn",twitter:"X (Twitter)",pinterest:"Pinterest",whatsapp:"WhatsApp",telegram:"Telegram",discord:"Discord",line:"LINE",google:"Google Ads",bing:"Bing Ads"},w=n=>E[n]??n,R={VOLUNTEER:"Bénévoles",BENEFICIARY:"Bénéficiaires",DONATOR_INDIVIDUAL:"Donateurs particuliers",DONATOR_MERCHANT:"Donateurs professionnels",SCHOOL:"Écoles",ADMIN:"Administrateurs"},D=n=>R[n]??n,k=$(()=>{const n=t.value?.totals.uniqueVisitors??0,s=t.value?.conversions.total??0;return!n||!s?null:`${Math.round(s/n*100)} %`}),V=$(()=>(t.value?.devices??[]).filter(n=>n.clicks>0)),P=async()=>{if(!h.value||!t.value)return;const{Chart:n,registerables:s}=await Y(async()=>{const{Chart:d,registerables:N}=await import("./CBC4R_aL.js").then(r=>r.n);return{Chart:d,registerables:N}},__vite__mapDeps([0,1]),import.meta.url);n.register(...s),g&&g.destroy(),g=new n(h.value,{type:"line",data:{labels:t.value.timeseries.map(d=>d.day),datasets:[{label:"Clics",data:t.value.timeseries.map(d=>d.clicks),borderColor:"#3b82f6",backgroundColor:"rgba(59, 130, 246, 0.15)",fill:!0,tension:.3},{label:"Visiteurs uniques",data:t.value.timeseries.map(d=>d.uniqueVisitors),borderColor:"#a855f7",backgroundColor:"rgba(168, 85, 247, 0.15)",fill:!0,tension:.3},{label:"Inscriptions",data:t.value.timeseries.map(d=>d.conversions),borderColor:"#16a34a",backgroundColor:"rgba(22, 163, 74, 0.15)",fill:!0,tension:.3}]},options:{responsive:!0,maintainAspectRatio:!1,scales:{y:{beginAtZero:!0,ticks:{precision:0}}}}})},q=async()=>{try{const n=await v(T.linkId,m.value);t.value=n.stats,L("loaded",n.link),await z(),await P()}catch(n){A.add({color:"error",title:"Statistiques indisponibles",description:n.message,icon:"i-heroicons-exclamation-triangle"})}};return F(()=>{q()}),H(()=>{g&&g.destroy()}),(n,s)=>{const d=B,N=ae;return o(),i("div",oe,[e("div",le,[e("div",ie,[u(d,{class:"p-4"},{default:l(()=>[s[2]||(s[2]=e("p",{class:"text-sm font-medium text-gray-500"},"Clics sur la période",-1)),e("p",re,p(a(t)?.totals.clicks??0),1)]),_:1}),u(d,{class:"p-4"},{default:l(()=>[s[3]||(s[3]=e("p",{class:"text-sm font-medium text-gray-500"},"Visiteurs uniques",-1)),e("p",de,p(a(t)?.totals.uniqueVisitors??0),1)]),_:1}),u(d,{class:"p-4"},{default:l(()=>[s[4]||(s[4]=e("p",{class:"text-sm font-medium text-gray-500"},"Inscriptions",-1)),e("p",ue,p(a(t)?.conversions.total??0),1),a(k)?(o(),i("p",ce,p(a(k))+" des visiteurs uniques ",1)):O("",!0)]),_:1})]),u(N,{modelValue:a(m),"onUpdate:modelValue":s[0]||(s[0]=r=>j(m)?m.value=r:null),"value-key":"value",items:f,class:"w-full sm:w-48",onCh
2ange:s[1]||(s[1]=()=>{q()})},null,8,["modelValue"])]),u(d,null,{header:l(()=>[...s[5]||(s[5]=[e("h3",{class:"font-semibold"},"Clics et inscriptions par jour",-1)])]),default:l(()=>[e("div",pe,[e("canvas",{ref_key:"canvas",ref:h},null,512)])]),_:1}),u(d,null,{header:l(()=>[...s[6]||(s[6]=[e("h3",{class:"font-semibold"},"Inscriptions par rôle",-1)])]),default:l(()=>[a(t)?.conversions.byRole.length?(o(),i("ul",_e,[(o(!0),i(I,null,C(a(t).conversions.byRole,r=>(o(),i("li",{key:r.role,class:"flex justify-between text-sm"},[e("span",null,p(D(r.role)),1),e("span",fe,p(r.count),1)]))),128))])):(o(),i("div",me," Aucune inscription ouverte depuis ce lien. Seules les destinations du site de l’association peuvent en rapporter : une destination externe n’est mesurée que jusqu’au clic. "))]),_:1}),e("div",ve,[u(d,null,{header:l(()=>[...s[7]||(s[7]=[e("h3",{class:"font-semibold"},"Appareils",-1)])]),default:l(()=>[a(V).length?(o(),i("ul",be,[(o(!0),i(I,null,C(a(V),r=>(o(),i("li",{key:r.device,class:"flex justify-between text-sm"},[e("span",null,p(y(r.device)),1),e("span",ye,p(r.clicks),1)]))),128))])):(o(),i("div",ge,"Aucun clic mesuré."))]),_:1}),u(d,null,{header:l(()=>[...s[8]||(s[8]=[e("h3",{class:"font-semibold"},"Applications",-1)])]),default:l(()=>[a(t)?.apps.length?(o(),i("ul",xe,[(o(!0),i(I,null,C(a(t).apps,r=>(o(),i("li",{key:r.app,class:"flex justify-between text-sm"},[e("span",null,p(w(r.app)),1),e("span",he,p(r.clicks),1)]))),128))])):(o(),i("div",ke," Aucun clic reconnu comme venant d’une application. "))]),_:1}),u(d,null,{header:l(()=>[...s[9]||(s[9]=[e("h3",{class:"font-semibold"},"Provenances web",-1)])]),default:l(()=>[a(t)?.referrers.length?(o(),i("ul",Ae,[(o(!0),i(I,null,C(a(t).referrers,r=>(o(),i("li",{key:r.host,class:"flex justify-between text-sm"},[e("span",null,p(r.host),1),e("span",Ce,p(r.clicks),1)]))),128))])):(o(),i("div",Te," Aucune provenance connue : les liens ouverts depuis une application n’en transmettent pas. "))]),_:1})])])}}}),Le=Object.assign(Ie,{__name:"AdminTrackedLinksTrackedLinkStatsPanel"}),Ee={class:"h-full overflow-hidden"},we={class:"flex gap-2"},Re={class:"flex-1 overflow-y-auto p-4"},De={class:"text-center"},Ne=["src"],Oe={class:"mt-3 text-sm text-gray-500 break-all"},Ve={class:"flex justify-end gap-3"},qe=S({__name:"[id]",setup(_){se({layout:"back-office",middleware:[Z(["ADMIN","VOLUNTEER"],["TRACKED_LINK_CREATE","TRACKED_LINK_VIEW_OWN","TRACKED_LINK_VIEW_SECTOR","TRACKED_LINK_VIEW_ALL","TRACKED_LINK_MANAGE_ALL"])]});const b=W(),T=K(),{fetchQrCode:L}=M(),A=String(b.params.id),v=x(null),t=x(null),m=x(!1);X({title:"Statistiques du lien - Admin"});const h=f=>{v.value=f},g=async()=>{try{t.value||(t.value=await L(A)),m.value=!0}catch(f){T.add({color:"error",title:"QR code indisponible",description:f.message,icon:"i-heroicons-exclamation-triangle"})}};return(f,c)=>{const y=J,E=ne,w=te,R=B,D=ee;return o(),i("div",Ee,[u(w,{grow:""},{default:l(()=>[u(E,{title:a(v)?.title||"Lien traqué",description:a(v)?.shortUrl},{right:l(()=>[e("div",we,[u(y,{icon:"i-heroicons-qr-code",size:"sm",variant:"outline",label:"QR code",onClick:c[0]||(c[0]=()=>{g()})}),u(y,{icon:"i-heroicons-arrow-left",size:"sm",variant:"outline",label:"Retour",onClick:c[1]||(c[1]=k=>("navigateTo"in f?f.navigateTo:a(Q))("/dashboard/admin/tracked-links"))})])]),_:1},8,["title","description"]),e("div",Re,[u(Le,{"link-id":a(A),onLoaded:h},null,8,["link-id"])])]),_:1}),u(D,{open:a(m),"onUpdate:open":c[3]||(c[3]=k=>j(m)?m.value=k:null)},{content:l(()=>[u(R,null,{header:l(()=>[...c[4]||(c[4]=[e("h3",{class:"text-lg font-semibold"},"QR code",-1)])]),footer:l(()=>[e("div",Ve,[u(y,{color:"neutral",variant:"ghost",onClick:c[2]||(c[2]=k=>m.value=!1)},{default:l(()=>[...c[5]||(c[5]=[U("Fermer",-1)])]),_:1}),a(t)?(o(),G(y,{key:0,to:a(t),download:`${a(v)?.slug}.png`,external:""},{default:l(()=>[...c[6]||(c[6]=[U(" Télécharger ",-1)])]),_:1},8,["to","download"])):O("",!0)])]),default:l(()=>[e("div",De,[a(t)?(o(),i("img",{key:0,src:a(t),alt:"QR code du lien traqué",class:"mx-auto"},null,8,Ne)):O("",!0),e("p",Oe,p(a(v)?.shortUrl),1)])]),_:1})]),_:1},8,["open"])])}}}),Xe=qe;export{Xe 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.