import{a as p,t as A,b as at,c as ke}from"../chunks/disclose-version.BfHQzUcx.js";import"../chunks/legacy.DG24rG7b.js";import{p as rt,o as st,f as O,a as it,b as t,g as e,m as h,c as o,r as s,n as Se,s as d,t as D,E as Q,e as H}from"../chunks/index-client.HYok5wSr.js";import{e as ot,s as F}from"../chunks/render.BLNanXqs.js";import{i as y,s as nt,a as lt}from"../chunks/props.DuautN8q.js";import{e as ct,i as dt,a as ut,b as vt}from"../chunks/class.0_EMInml.js";import{t as L,f as U}from"../chunks/index.BT7OjfpS.js";import{i as ft}from"../chunks/lifecycle.C79b4KUY.js";import{g as mt}from"../chunks/entry.C-LI3Ywc.js";import{g as pt}from"../chunks/gameStore.BR20ELnN.js";import{a as ht}from"../chunks/score.DEhBmwBT.js";import"../chunks/index.D5ajVCgE.js";import{F as B,t as gt,u as le,v as Me,w as _t,x as bt,y as xt,z as kt}from"../chunks/index.B5_iRLox.js";/* empty css */import{G as St,V as Mt,c as wt}from"../chunks/GameFeedbackModal.Cad0E7Up.js";import{f as K}from"../chunks/feedbackStore.BeyYM0Di.js";import{B as Ct}from"../chunks/button.CSS_lEbw.js";var qt=A('
',1),jt=A('

Testoni njohuritë tuaja për makinat

Përgjigjuni pyetjeve. Sa më shpejt përgjigjeni, aq më shumë pikë fitoni!

'),yt=A(''),Bt=A('

'),At=A('
'),$t=A('
'),Pt=A('

Quiz për makinat

',1);function Jt(we,Ce){rt(Ce,!1);const[qe,je]=nt(),R=()=>lt(K,"$feedbackStore",qe);let l=h(0),k=h(0),v=h(0),c,$=h(!1),z=h(!1),M=!1,u=h(null),w=null,g=h(0),C=0,_=h(0),q=h(!1),I=!1;const J=[{question:"Cili prodhues makinash ka 4 unaza të ndërlidhura në logon e tij?",answers:["Audi","BMW","Mercedes-Benz","Volkswagen"],correct:0},{question:"Çfarë do të thotë 'BMW'?",answers:["British Motor Works","Bayerische Motoren Werke","Berlin Motor Works","Bremen Motor Works"],correct:1},{question:"Cili është modeli më i shitur i Mercedes-Benz në Shqipëri?",answers:["C-Class","E-Class","A-Class","S-Class"],correct:1},{question:"Nga cili vend është Ferrari?",answers:["Gjermani","Francë","Itali","Spanjë"],correct:2},{question:"Cili është slogani i BMW?",answers:["Mercedes ose Asgjë","Makina Përfundimtare e Drejtimit","Teknika e Përparuar","Kënaqësia e Drejtimit"],correct:3},{question:"Çfarë kafshe shfaqet në logon e Lamborghini?",answers:["Kalë","Luan","Dem","Jaguar"],correct:2},{question:"Cila kompani automobilistike zotëron Bugatti?",answers:["Grupi Volkswagen","Grupi BMW","Grupi Mercedes-Benz","Stellantis"],correct:0},{question:"Cili është prodhuesi më i madh i pjesëve të këmbimit në Shqipëri?",answers:["AMS","Vibtex","Autoparts Albania","Euro Parts"],correct:0},{question:"Cila markë makinash është më e popullarizuar në Shqipëri?",answers:["Volkswagen","Mercedes-Benz","BMW","Audi"],correct:1},{question:"Çfarë do të thotë 'AMG' në Mercedes-AMG?",answers:["Auto Motor Group","Aufrecht, Melcher, Großaspach","Advanced Motor Gear","Active Motion Guide"],correct:1},{question:"Cili është porti kryesor në Shqipëri për importin e makinave?",answers:["Porti i Durrësit","Porti i Vlorës","Porti i Shëngjinit","Porti i Sarandës"],correct:0},{question:"Cili është modeli më i shitur i makinave në historinë botërore?",answers:["Ford Model T","Volkswagen Beetle","Toyota Corolla","Honda Civic"],correct:2},{question:"Në cilin vit u hap rruga e parë e asfaltuar në Shqipëri?",answers:["1920","1925","1930","1935"],correct:2},{question:"Cila ishte makina e parë zyrtare e qeverisë shqiptare pas viteve '90?",answers:["Mercedes-Benz S-Class","BMW Seria 7","Audi A8","Volkswagen Phaeton"],correct:0},{question:"Cili prodhues automobilistik prodhon 'Skyline GT-R'?",answers:["Toyota","Honda","Nissan","Mazda"],correct:2},{question:"Në cilin vit u hoqën kufizimet për importin e makinave në Shqipëri?",answers:["1991","1993","1995","1997"],correct:1},{question:"Cila kompani krijoi makinën e parë hibride në prodhim masiv?",answers:["Toyota","Honda","Ford","Chevrolet"],correct:0},{question:"Cili është qyteti me numrin më të madh të makinave në Shqipëri?",answers:["Durrësi","Tirana","Vlora","Shkodra"],correct:1},{question:"Cila kompani prodhon 'Land Cruiser'?",answers:["Land Rover","Toyota","Jeep","Mitsubishi"],correct:1},{question:"Cila është mosha mesatare e makinave në Shqipëri?",answers:["8 vjet","12 vjet","15 vjet","20 vjet"],correct:2}];let f=h([]);const ye=10,X=10,Be=20,Ae=1,ce=30,de=120;function $e(a){for(let r=a.length-1;r>0;r--){const i=Math.floor(Math.random()*(r+1));[a[r],a[i]]=[a[i],a[r]]}return a}function Pe(){return $e([...J]).slice(0,ye)}function Y(){t(q,!0),t(v,0),t(k,0),t(l,0),t(g,0),M=!1,t(u,null),w=null,C=0,t(_,0),t(f,Pe()),c&&clearInterval(c),c=setInterval(()=>{!M&&!I&&Q(v)},1e3)}function Te(a){e(u)===null&&(t(u,a),w=a===e(f)[e(l)].correct,w?(Q(g),C++,t(_,Math.max(e(_),C)),t(k,e(k)+X)):C=0,setTimeout(()=>{e(l)=de)return 0;const a=Math.ceil((de-e(v))*Ae);return Math.min(a,Be)}function ee(){return e(_)===J.length?ce:Math.ceil(ce*(e(_)/J.length))}function Ge(){clearInterval(c);const a=e(g)*X,r=Z(),i=ee(),n=a+r+i;ht(n),pt.addScore("trivia",n),R().currentRound===0&&setTimeout(()=>{V(),t(z,!0),t(q,!1),M=!1,t(k,0),t(v,0),t(l,0),t(g,0),C=0,t(_,0),t(u,null),w=null,c&&clearInterval(c)},2e3),K.incrementRound(),M=!0,t($,!0),Fe()}function Fe(){const r={origin:{y:.7}};function i(n,m){wt({...r,...m,particleCount:Math.floor(200*n),scalar:1.2})}i(.25,{spread:26,startVelocity:55,colors:["#FF6B00"]}),i(.2,{spread:60,colors:["#000000"]}),i(.35,{spread:100,decay:.91,scalar:.8,colors:["#FF6B00","#000000"]}),i(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2,colors:["#FF6B00"]}),i(.1,{spread:120,startVelocity:45,colors:["#000000"]})}function Re(){t($,!1),Y()}function ze(){t($,!1),Y(),R().currentRound%2===1&&!K.isFeedbackShown(R().currentRound)&&setTimeout(()=>{V(),t(z,!0),t(q,!1),M=!1,t(k,0),t(v,0),t(l,0),t(g,0),C=0,t(_,0),t(u,null),w=null,c&&clearInterval(c)},2e3)}function Ie(){t($,!1),mt("/")}function V(){I=!0,c&&clearInterval(c)}function ue(){I=!1,!c&&e(q)&&!M&&(c=setInterval(()=>{I||Q(v)},1e3))}function Ve(){t(z,!1),ue()}st(()=>{R().currentRound%2===1&&!K.isFeedbackShown(R().currentRound)&&(V(),t(z,!0),t(q,!1),M=!1,t(k,0),t(v,0),t(l,0),t(g,0),C=0,t(_,0),t(u,null),w=null,c&&clearInterval(c))}),ft();var ve=Pt(),te=O(ve),ae=o(te),re=o(ae),fe=o(re),Ee=o(fe);B(Ee,{icon:gt,class:"text-lg"}),s(fe),Se(2),s(re);var me=d(re,2),Ne=o(me);{var We=a=>{var r=qt(),i=O(r),n=o(i);B(n,{icon:le,class:"text-orange-400"});var m=d(n,2),P=o(m);s(m),s(i);var j=d(i,2),T=o(j);B(T,{icon:Me,class:"text-orange-400"});var S=d(T,2);const se=H(()=>Math.floor(e(v)/60)??""),E=H(()=>(e(v)%60).toString().padStart(2,"0")??"");var ie=o(S);D(()=>F(ie,`${e(se)}:${e(E)}`)),s(S),s(j);var N=d(j,2),b=o(N);B(b,{icon:_t,class:"text-orange-400"});var x=d(b,2),W=o(x,!0);s(x),s(N),D(()=>{F(P,`${e(g)??""}/${e(f).length??""}`),F(W,e(k))}),p(a,r)};y(Ne,a=>{e(q)&&a(We)})}s(me),s(ae);var pe=d(ae,2),Oe=o(pe);{var De=a=>{var r=jt(),i=o(r),n=o(i),m=o(n);B(m,{icon:bt,class:"text-3xl text-orange-400"}),s(n),s(i);var P=d(i,6);Ct(P,{$$events:{click:Y},children:(j,T)=>{Se();var S=at("Fillo quizin");p(j,S)},$$slots:{default:!0}}),s(r),L(1,r,()=>U),p(a,r)},Qe=a=>{var r=Bt(),i=o(r),n=o(i),m=o(n);s(n);var P=d(n,2),j=o(P);s(P),s(i);var T=d(i,2),S=o(T),se=o(S,!0);s(S);var E=d(S,2);ct(E,5,()=>e(f)[e(l)].answers,dt,(ie,N,b)=>{var x=yt(),W=o(x),ge=o(W);{var Ke=oe=>{var be=ke(),Xe=O(be);{var Ye=G=>{B(G,{icon:le,class:"text-green-500"})},Ze=G=>{var xe=ke(),et=O(xe);{var tt=ne=>{B(ne,{icon:kt,class:"text-red-500"})};y(et,ne=>{e(u)===b&&ne(tt)},!0)}p(G,xe)};y(Xe,G=>{b===e(f)[e(l)].correct?G(Ye):G(Ze,!1)})}p(oe,be)};y(ge,oe=>{e(u)!==null&&oe(Ke)})}var _e=d(ge,2),Je=o(_e,!0);s(_e),s(W),s(x),D(()=>{ut(x,`p-4 text-left rounded-lg transition-all duration-200 ${(e(u)===null?"bg-orange-500/10 hover:bg-orange-500/20":e(u)===b?b===e(f)[e(l)].correct?"bg-green-500/20 border-green-500":"bg-red-500/20 border-red-500":b===e(f)[e(l)].correct?"bg-green-500/20 border-green-500":"bg-orange-500/5")??""} ${(e(u)!==null?"cursor-default":"cursor-pointer")??""} svelte-9yd27s`),x.disabled=e(u)!==null,F(Je,e(N))}),ot("click",x,()=>Te(b)),p(ie,x)}),s(E),s(T),s(r),D(()=>{F(m,`Pyetja ${e(l)+1} nga ${e(f).length??""}`),vt(j,"style",`width: ${(e(l)+1)/e(f).length*100}%`),F(se,e(f)[e(l)].question)}),L(1,r,()=>U),p(a,r)};y(Oe,a=>{e(q)?a(Qe,!1):a(De)})}s(pe),s(te);var he=d(te,2);{var He=a=>{var r=At(),i=o(r);St(i,{show:!0,onGamePause:V,onGameResume:ue,onClose:Ve}),s(r),L(3,r,()=>U),p(a,r)};y(he,a=>{e(z)&&a(He)})}var Le=d(he,2);{var Ue=a=>{var r=$t(),i=o(r),n=H(()=>[{icon:le,label:"Përgjigje të sakta",value:`${e(g)}/${e(f).length}`,bonus:`${e(g)*X} pikë`},{icon:Me,label:"Koha",value:`${Math.floor(e(v)/60)}:${(e(v)%60).toString().padStart(2,"0")}`,bonus:`+${Z()} pikë`},{icon:xt,label:"Saktësi e vazhdueshme",value:`${e(_)}`,bonus:`+${ee()} pikë`}]),m=H(()=>e(k)+Z()+ee());Mt(i,{get show(){return e($)},get stats(){return e(n)},get totalScore(){return e(m)},onClose:Re,onPlayAgain:ze,onHome:Ie,gameTitle:"Car Trivia"}),s(r),L(3,r,()=>U),p(a,r)};y(Le,a=>{e($)&&a(Ue)})}p(we,ve),it(),je()}export{Jt as component};