PageSourceSearch

https://zak.edu.pl/lp/quiz/_nuxt/DcDB43cJ.js

js zak.edu.pl collected 2026-09-25 00:08:53 UTC 3,355 bytes, 1 lines download raw bytes

1import{_ as R}from"./nKeHb4Tn.js";import{_ as U}from"./BR_YHqhy.js";import{e as E,f as N,g as B,h as D,i as H,o as p,j as V,w as $,a as e,c as _,F as T,r as W,k as r,n as S,t as y,d as z,l as O,b as j,m as h,p as M,q as Q}from"./DoEk25ZC.js";const F=E("answers",()=>{const L=N();let i=[];const g=(t,l)=>{i.push({id:t,category:l})},C=()=>{i=[]},o=()=>{const t={a:0,w:0,s:0,p:0};return i.forEach(l=>{t[l.category]++}),t},b=()=>{const t="/typ-osobowosci/",l=o(),c=s(l),u={a:"organizator",w:"opiekun",s:"kreator",p:"analityk"},f=c.split("").map(m=>u[m]).join("_");return t+"?k="+f},s=t=>{let l=Math.max(...Object.values(t)),c=Object.entries(t).filter(([u,f])=>f===l).map(([u])=>u).join("");return c||"default"},v=async()=>{const t=k();console.log("RESULTS"),await $fetch(L.public.apiUrl+"/quiz/answers",{headers:{"Content-Type":"application/json"},method:"post",body:t})},k=()=>{const t=o(),l=s(t);let c=[];return i.forEach(u=>{c.push({id:u.id,cat:u.category})}),{answers:c,mostAnswers:l}};return{sendResults:v,addAnswer:g,getResults:o,reset:C,log:i,getDescription:b,prepareReportData:k}}),I={class:"quiz"},P=["onClick"],G={key:1,class:"awaiting"},J={class:"progress-bar",ref:"prog"},K=["innerHTML"],X=["onClick"],Y=["innerHTML"],Z={key:0,style:{color:"red"}},ee={class:"quiz-nav"},te=["disabled"],se=["disabled"],ne=!1,re=B({__name:"quiz",async setup(L){let i,g;const C=N(),o=h([]),b=F();o.value=([i,g]=D(()=>$fetch(C.public.apiUrl+"/quiz")),i=await i,g(),i);const s=h(0),v=M(()=>o.value[s.value]),k=d=>{o.value[s.value].answer=d},t=M(()=>s.value===o.value.length-1),l=()=>{t.value?c():s.value++},c=()=>{o.value.forEach(d=>{b.addAnswer(d.id,d.answer)}),b.sendResults(),Q(b.getDescription())},u=()=>{s.value>0&&s.value--},f=h(),m=h(),x=h();return H(()=>s.value,()=>{const d=f.value.clientWidth,w=m.value.clientWidth-d;if(w>0){const A=w*((s.value+1)/o.value.length);m.value.style.left=-1*A+"px"}else m.value.style.left=0;const q=x.value.clientWidth,n=(d-q)*((s.value+1)/o.value.length);x.value.style.left=n+"px"},{immediate:!1}),(d,a)=>{const w=R,q=U;return p(),V(q,null,{default:$(()=>[e("div",I,[e("div",{class:"indicator",ref_key:"ind",ref:f},[e("div",{class:"pagination",ref_key:"pag",ref:m},[(p(!0),_(T,null,W(r(o).length,n=>(p(),_("div",{class:S(["pagina",{active:r(s)+1==n}]),key:n},[r(o)[n-1]&&r(o)[n-1].answer?(p(),_("div",{key:0,class:"answered",onClick:A=>s.value=n-1},[e("div",null,y(n),1)],8,P)):(p(),_("div",G,[e("div",null,y(n),1)]))],2))),128))],512),a[0]||(a[0]=e("div",{class:"spc-1"},null,-1)),e("div",J,[e("div",{class:"bar",ref_key:"bar",ref:x},null,512)],512)],512),a[3]||(a[3]=e("div",{class:"spc-2"},null,-1)),e("h1",{innerHTML:r(v)?.question}
1,null,8,K),a[4]||(a[4]=e("div",{class:"spc-2"},null,-1)),(p(!0),_(T,null,W(r(v)?.display_order.split(""),n=>(p(),_("div",{key:n},[e("button",{onClick:A=>k(n),class:S(["question",{active:n===r(v).answer}])},[e("span",{innerHTML:r(v)[n]},null,8,Y),a[1]||(a[1]=z()),ne?(p(),_("span",Z,y(n.toUpperCase()),1)):O("",!0)],10,X)]))),128)),a[5]||(a[5]=e("p",null," ",-1)),e("div",ee,[e("button",{class:"btn button--outline btn-next",onClick:u,disabled:r(s)===0},[j(w,{back:!0,color:"black"}),a[2]||(a[2]=z(" Poprzednie ",-1))],8,te),e("button",{class:"btn button--red btn-next",onClick:l,disabled:!r(v).answer},[z(y(r(t)?"Wyniki":"Następne")+" ",1),j(w)],8,se)])])]),_:1})}}});export{re 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.