PageSourceSearch

https://polimi-dabc.netlify.app/_nuxt/Dm-Q24Le.js

js polimi-dabc.netlify.app collected 2026-10-03 11:18:08 UTC 5,111 bytes, 23 lines download raw bytes

1import{_ as D,a as H,b as P}from"./CeR1vgCe.js";import{_ as Q,d as E,a as K,b as J,c as O}from"./qFfhjcdf.js";import{_ as W,a as X,b as Y}from"./jtoA6p-o.js";import{i as Z,u as tt,p as et,j as h,q as ot,v as nt,k as lt,e as it,w as c,l as w,o as at,a as i,d as o,s as rt}from"./CKKA5GW1.js";import{u as st}from"./C1URU_Ln.js";import"./DxDFcNyH.js";import"./Bc6IoNN4.js";const ut=`*[_type == 'user' && visible && !(_id in path("drafts.**"))]{
2    _id,
3    first_name,
4    last_name
5}`,bt={__name:"[slug]",async setup(ct){var v,V,A,k,S;let s,d;const $=Z(),{locale:C,t:T,locales:g}=tt(),U=et("client"),{showNotification:F}=st(),L=`*[_type=='researchGroup' && _id == $id && !(_id in path("drafts.**"))][0]{
6    _id,
7    title,
8    subtitle,
9    "slug": "/${T("pages.researchGroups")}/" + slug[$lang].current,
10    image {
11        asset->{
12            "_ref": _id
13        }
14    },
15    content,
16    link,
17    coordinator[]{
18         _ref
19    },
20    team[]{
21        _ref
22    },
23}`,{data:l,refresh:B}=([s,d]=h(()=>w(L,{id:$.params.slug,lang:C.value})),s=await s,d(),s),{data:y}=([s,d]=h(()=>w(ut)),s=await s,d(),s),b=a=>a.map(e=>({value:e._id,label:`${e.first_name} ${e.last_name}`})),q=()=>l.value.coordinator?l.value.coordinator.map(a=>a==null?void 0:a._ref):[],M=()=>l.value.team?l.value.team.map(a=>a==null?void 0:a._ref):[],t=ot({_id:l.value._id||"",_type:"researchgroup",content:{en:((v=l.value.content)==null?void 0:v.en)||[],it:((V=l.value.content)==null?void 0:V.it)||[],_type:"localeBlockContent"},subtitle:{en:((A=l.value.subtitle)==null?void 0:A.en)||null,it:((k=l.value.subtitle)==null?void 0:k.it)||null,_type:"localeText"},image:((S=l.value)==null?void 0:S.image)||null,link:l.value.link||null,coordinator:q(),team:M(),slug:{_type:"pageSlug",en:{_type:"slug",current:""},it:{_type:"slug",current:""}},title:{_type:"localeString",en:"",it:""}}),z=async()=>{document.querySelector('button[type="submit"]').disabled=!0;function a(r){return r.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}function e(r){let m="";const _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",u=_.length;for(let f=0;f<r;f++)m+=_.charAt(Math.floor(Math.random()*u));return m}const p={_id:t._id,title:{_type:"localeString",en:t.title.en,it:t.title.it},content:{en:t.content.en,it:t.content.it,_type:"localeBlockContent"},subtitle:{en:t.subtitle.en,it:t.subtitle.it,_type:"localeText"},link:t.link,slug:{it:{current:a(l.value.title.it)},en:{current:a(l.value.title.en)}},coordinator:t.coordinator.map(r=>({_key:e(12),_ref:r,_type:"reference"})),team:t.team.map(r=>({_key:e(12),_ref:r,_type:"reference"}))};t.image&&(p.image={_type:"image",asset:{_ref:t.image.asset._ref,_type:"reference"}}),U.patch(l.value._id).set(p,{autoGenerateArrayKeys:!0}).commit().then(r=>{B(),F(),document.querySelector('button[type="submit"]').disabled=!1})};return nt(()=>{["_type","link","slug","title","visible"].forEach(e=>{l.value[e]&&(t[e]=l.value[e])})}),lt({title:"Admin",meta:[{name:"twitter:title",content:"Admin"},{property:"og:title",content:"Admin"}]}),(a,e)=>{const p=H,r=Q,m=W,_=E,u=P,f=K,I=X,G=Y,N=J,R=O,j=D;return at(),it(j,null,{default:c(()=>{var x;return[i(p,{title:(x=o(l))==null?void 0:x.title.it},null,8,["title"]),i(R,{onSubmit:rt(z,["prevent"])},{default:c(()=>[i(u,null,{default:c(()=>[i(r,{title:"Informazioni Principali",subtitle:"Inserisci le informazioni principali del tuo gruppo di ricerca"}),i(m,{title:"Titolo",subtitle:"Inserisci il titolo del tuo gruppo di ricerca, in caso di acronimo completa con sottotitolo esplicativo",modelValue:o(t).title,"onUpdate:modelValue":e[0]||(e[0]=n=>o(t).title=n),locales:o(g).map(n=>n.code),required:!0},null,8,["modelValue","locales"]),i(_,{modelValue:o(t).link,"onUpdate:modelValue":e[1]||(e[1]=n=>o(t).link=n),title:"Link",subtitle:"Inserisci il link al sito del progetto"},null,8,["modelValue"]),i(m,{title:"Sottotitolo",modelValue:o(t).subtitle,"onUpdate:modelValue":e[2]||(e[2]=n=>o(t).subtitle=n),locales:o(g).map(n=>n.code)},null,8,["modelValue","locales"])]),_:1}),i(u,null,{default:c(()=>[i(r,{title:"Content",subtitle:"Research group description"}),i(f,{modelValue:o(t).content,"onUpdate:modelValue":e[3]||(e[3]=n=>o(t).content=n),locales:o(g).map(n=>n.code)},null,8,["modelValue","locales"])]),_:1}),i(u,null,{default:c(()=>[i(r,{title:"Persone",subtitle:"Team & Coordinators"}),i(I,{title:"Coordinators",modelValue:o(t).coordinator,"onUpdate:modelValue":e[4]||(e[4]=n=>o(t).coordinator=n),options:b(o(y)),placeholder:"Select a user"},null,8,["modelValue","options"]),i(I,{title:"Team",modelValue:o(t).team,"onUpdate:modelValue":e[5]||(e[5]=n=>o(t).team=n),options:b(o(y)),placeholder:"Select a user"},null,8,["modelValue","options"])]),_:1}),i(u,null,{default:c(()=>[i(r,{title:"Immagine",subtitle:"Immagine principale del gruppo di ricerca"}),i(G,{modelValue:o(t).image,"onUpdate:modelValue":e[6]||(e[6]=n=>o(t).image=n),documentId:o(l)._id},null,8,["modelValue","documentId"])]),_:1}),i(N,{color:"primary",type:"submit",text:"Invia"})]),_:1})]}),_:1})}}};export{bt 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.