From e0a60e0f350fa04ceb464cf86684aede8b6fef64 Mon Sep 17 00:00:00 2001 From: Jakub Zych Date: Thu, 8 Oct 2026 18:14:15 +0200 Subject: [PATCH] build: rebuild the student app (phone remote) --- .../{CourseView-DA_0kxps.js => CourseView-CXI6huVv.js} | 2 +- .../{CoursesView-C67U75O8.js => CoursesView-CCyOcVSP.js} | 2 +- ...ashboardView-CQoALeJF.js => DashboardView-BYuD8Ygc.js} | 2 +- ...eadlinesView-BDipircW.js => DeadlinesView-DY301l3f.js} | 2 +- ...DeckViewer.vue_vue_type_style_index_0_lang-Dsql2yXf.js | 8 -------- ...DeckViewer.vue_vue_type_style_index_0_lang-TWCMyUu3.js | 8 ++++++++ ...veBar.vue_vue_type_script_setup_true_lang-ml4QcEZn.js} | 2 +- .../{ForgotView-BOx6Nau9.js => ForgotView-BX93XuZx.js} | 2 +- ...State.vue_vue_type_script_setup_true_lang-BYeP9cST.js} | 2 +- .../{LoginView-DAC0RwAQ.js => LoginView-BJXrPNjb.js} | 2 +- ...{MaterialView-QL0yqUg2.js => MaterialView-BU7ZdTm0.js} | 2 +- ...aterialsView-BvNKRnn6.js => MaterialsView-CSlYRC1S.js} | 2 +- .../assets/{MoreView-Cm2K6Awc.js => MoreView-B3Qn1wI_.js} | 2 +- public/assets/MyPresentationsView-2R3XisKT.js | 1 - public/assets/MyPresentationsView-Jd38nBse.js | 1 + public/assets/NotFoundView-CiR7B3dL.js | 1 + public/assets/NotFoundView-DA_P-c9x.js | 1 - ...eHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js} | 2 +- ...iew-1pAdHNma.js => PresentationPublicView-CnKQnORE.js} | 2 +- public/assets/PresentationRemoteView-D3-kZqrb.css | 1 + public/assets/PresentationRemoteView-DCKt4fp6.js | 1 + public/assets/PresentationSpeakerView-BpKWeYat.js | 2 -- public/assets/PresentationSpeakerView-CV1WMYIv.js | 2 ++ .../{ProfileView-B2CbG48x.js => ProfileView-CyRqKzB5.js} | 2 +- .../assets/{QuizView-C5E-4ich.js => QuizView-BWZffs6k.js} | 2 +- .../{QuizzesView-Bgho7mXY.js => QuizzesView-BPpiDTe0.js} | 2 +- ...gItem.vue_vue_type_script_setup_true_lang-BozrsWL2.js} | 2 +- ...{ReadingsView-CUnMjS8U.js => ReadingsView-Dwn-CoLm.js} | 2 +- ...{RegisterView-Clc4cUwL.js => RegisterView-DJ1QoVDK.js} | 2 +- .../{ResetView-BlxClKWv.js => ResetView-_AGvi3TG.js} | 2 +- ...{ScheduleView-CwxmPwjF.js => ScheduleView-BqW7gmzM.js} | 2 +- public/assets/SpeakerTools-Bho-eA9w.js | 1 + public/assets/SpeakerTools-CZrzKggt.js | 1 - public/assets/_plugin-vue_export-helper-DlAUqK2U.js | 1 + public/assets/{forms-CE5LqaKY.js => forms-Ca-hh7T4.js} | 2 +- public/assets/index-B53bcf0x.js | 7 +++++++ public/assets/{index-LFNXxSi2.js => index-CvyVvvnt.js} | 6 +++--- public/assets/presentations-B2_nwGC8.js | 1 + public/assets/presentations-W-oMAxZb.js | 1 - .../assets/{quizzes-B7pKYg3A.js => quizzes-ByhEqvvR.js} | 2 +- public/assets/realtime-DuTUbwvj.js | 1 + public/index.html | 2 +- 42 files changed, 52 insertions(+), 41 deletions(-) rename public/assets/{CourseView-DA_0kxps.js => CourseView-CXI6huVv.js} (95%) rename public/assets/{CoursesView-C67U75O8.js => CoursesView-CCyOcVSP.js} (90%) rename public/assets/{DashboardView-CQoALeJF.js => DashboardView-BYuD8Ygc.js} (95%) rename public/assets/{DeadlinesView-BDipircW.js => DeadlinesView-DY301l3f.js} (89%) delete mode 100644 public/assets/DeckViewer.vue_vue_type_style_index_0_lang-Dsql2yXf.js create mode 100644 public/assets/DeckViewer.vue_vue_type_style_index_0_lang-TWCMyUu3.js rename public/assets/{ElectiveBar.vue_vue_type_script_setup_true_lang-mMQANJpk.js => ElectiveBar.vue_vue_type_script_setup_true_lang-ml4QcEZn.js} (93%) rename public/assets/{ForgotView-BOx6Nau9.js => ForgotView-BX93XuZx.js} (92%) rename public/assets/{LoadState.vue_vue_type_script_setup_true_lang-BX6YDhEk.js => LoadState.vue_vue_type_script_setup_true_lang-BYeP9cST.js} (90%) rename public/assets/{LoginView-DAC0RwAQ.js => LoginView-BJXrPNjb.js} (94%) rename public/assets/{MaterialView-QL0yqUg2.js => MaterialView-BU7ZdTm0.js} (94%) rename public/assets/{MaterialsView-BvNKRnn6.js => MaterialsView-CSlYRC1S.js} (97%) rename public/assets/{MoreView-Cm2K6Awc.js => MoreView-B3Qn1wI_.js} (90%) delete mode 100644 public/assets/MyPresentationsView-2R3XisKT.js create mode 100644 public/assets/MyPresentationsView-Jd38nBse.js create mode 100644 public/assets/NotFoundView-CiR7B3dL.js delete mode 100644 public/assets/NotFoundView-DA_P-c9x.js rename public/assets/{PageHead.vue_vue_type_script_setup_true_lang-l9qe_URH.js => PageHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js} (84%) rename public/assets/{PresentationPublicView-1pAdHNma.js => PresentationPublicView-CnKQnORE.js} (88%) create mode 100644 public/assets/PresentationRemoteView-D3-kZqrb.css create mode 100644 public/assets/PresentationRemoteView-DCKt4fp6.js delete mode 100644 public/assets/PresentationSpeakerView-BpKWeYat.js create mode 100644 public/assets/PresentationSpeakerView-CV1WMYIv.js rename public/assets/{ProfileView-B2CbG48x.js => ProfileView-CyRqKzB5.js} (98%) rename public/assets/{QuizView-C5E-4ich.js => QuizView-BWZffs6k.js} (97%) rename public/assets/{QuizzesView-Bgho7mXY.js => QuizzesView-BPpiDTe0.js} (86%) rename public/assets/{ReadingItem.vue_vue_type_script_setup_true_lang-BpkoB79x.js => ReadingItem.vue_vue_type_script_setup_true_lang-BozrsWL2.js} (93%) rename public/assets/{ReadingsView-CUnMjS8U.js => ReadingsView-Dwn-CoLm.js} (91%) rename public/assets/{RegisterView-Clc4cUwL.js => RegisterView-DJ1QoVDK.js} (98%) rename public/assets/{ResetView-BlxClKWv.js => ResetView-_AGvi3TG.js} (97%) rename public/assets/{ScheduleView-CwxmPwjF.js => ScheduleView-BqW7gmzM.js} (94%) create mode 100644 public/assets/SpeakerTools-Bho-eA9w.js delete mode 100644 public/assets/SpeakerTools-CZrzKggt.js create mode 100644 public/assets/_plugin-vue_export-helper-DlAUqK2U.js rename public/assets/{forms-CE5LqaKY.js => forms-Ca-hh7T4.js} (85%) create mode 100644 public/assets/index-B53bcf0x.js rename public/assets/{index-LFNXxSi2.js => index-CvyVvvnt.js} (86%) create mode 100644 public/assets/presentations-B2_nwGC8.js delete mode 100644 public/assets/presentations-W-oMAxZb.js rename public/assets/{quizzes-B7pKYg3A.js => quizzes-ByhEqvvR.js} (96%) create mode 100644 public/assets/realtime-DuTUbwvj.js diff --git a/public/assets/CourseView-DA_0kxps.js b/public/assets/CourseView-CXI6huVv.js similarity index 95% rename from public/assets/CourseView-DA_0kxps.js rename to public/assets/CourseView-CXI6huVv.js index 3ae6488..be4fe83 100644 --- a/public/assets/CourseView-DA_0kxps.js +++ b/public/assets/CourseView-CXI6huVv.js @@ -1 +1 @@ -import{_ as N}from"./PageHead.vue_vue_type_script_setup_true_lang-l9qe_URH.js";import{_ as R}from"./LoadState.vue_vue_type_script_setup_true_lang-BX6YDhEk.js";import{_ as B}from"./ReadingItem.vue_vue_type_script_setup_true_lang-BpkoB79x.js";import{d as D,p as S,q as V,A as q,c as a,h as m,i as y,r as T,E as A,G as F,o as t,F as r,b as d,m as z,a as e,t as n,e as i,y as p,s as f,k as M,x as j,B as C}from"./index-LFNXxSi2.js";import{F as P,b as O,a as $,T as Z,c as G}from"./format-bcE-cYHJ.js";const K={class:"card"},W={style:{margin:"0",display:"grid","grid-template-columns":"auto 1fr",gap:"4px 16px"}},Y={style:{margin:"0"}},H={style:{margin:"0"},class:"mono small"},I={style:{margin:"0"}},J={style:{margin:"0"}},Q={key:0,style:{margin:"10px 0 0"}},U={key:1,style:{margin:"10px 0 0"}},X=["href"],ee={class:"section","aria-labelledby":"sess-h"},se={class:"section-head"},te={class:"muted small"},ae={key:0,class:"rows"},le={class:"row-main"},oe={class:"title"},ne={class:"when"},ie={class:"muted small"},re={key:0},de={key:1,class:"badge online",style:{"margin-left":"6px"}},ue={key:2,class:"badge onsite",style:{"margin-left":"6px"}},_e={key:3},ce={key:1,class:"empty"},me={class:"section","aria-labelledby":"read-h"},ye={class:"section-head"},pe={class:"muted small"},ge={class:"rows"},ve={class:"rows"},he={key:1,class:"empty"},ke={class:"section","aria-labelledby":"mat-h"},fe={class:"section-head"},be={class:"muted small"},we={key:0,class:"rows"},xe={class:"muted small"},Be={class:"badge"},Te={key:0},ze={key:1,class:"empty"},Re=D({__name:"CourseView",props:{id:{}},setup(E){const g=E,c=S(),l=T(null),v=T("");async function h(){l.value=null,v.value="";try{l.value=await A.course(Number(g.id))}catch(u){v.value=F(u)}}V(()=>{h(),c.loadReadings()}),q(()=>g.id,()=>{h()});const _=f(()=>c.allReadings.filter(u=>u.course_id===Number(g.id))),b=f(()=>_.value.filter(u=>u.is_required)),w=f(()=>_.value.filter(u=>!u.is_required)),L=Date.now();return(u,o)=>{const x=M("router-link");return t(),a("div",null,[m(R,{ready:!!l.value,error:v.value,onRetry:o[0]||(o[0]=s=>h())},{default:y(()=>[l.value?(t(),a(r,{key:0},[m(N,{eyebrow:`${d(P)[l.value.form]} · semestr ${l.value.semester}`,title:l.value.name},{default:y(()=>[m(x,{class:"btn small ghost",to:"/przedmioty"},{default:y(()=>[...o[1]||(o[1]=[z("← Przedmioty",-1)])]),_:1})]),_:1},8,["eyebrow","title"]),e("section",K,[e("dl",W,[l.value.lecturer?(t(),a(r,{key:0},[o[2]||(o[2]=e("dt",{class:"muted"},"Prowadzący",-1)),e("dd",Y,n(l.value.lecturer),1)],64)):i("",!0),l.value.code?(t(),a(r,{key:1},[o[3]||(o[3]=e("dt",{class:"muted"},"Kod",-1)),e("dd",H,n(l.value.code),1)],64)):i("",!0),l.value.ects?(t(),a(r,{key:2},[o[4]||(o[4]=e("dt",{class:"muted"},"ECTS",-1)),e("dd",I,n(l.value.ects),1)],64)):i("",!0),l.value.assessment?(t(),a(r,{key:3},[o[5]||(o[5]=e("dt",{class:"muted"},"Zaliczenie",-1)),e("dd",J,n(l.value.assessment),1)],64)):i("",!0),l.value.elective_group?(t(),a(r,{key:4},[o[6]||(o[6]=e("dt",{class:"muted"},"Wybór",-1)),o[7]||(o[7]=e("dd",{style:{margin:"0"}},[e("span",{class:"badge alert"},"do wyboru")],-1))],64)):i("",!0)]),l.value.description?(t(),a("p",Q,n(l.value.description),1)):i("",!0),l.value.syllabus_url?(t(),a("p",U,[e("a",{href:l.value.syllabus_url,target:"_blank",rel:"noopener noreferrer"},"Sylabus",8,X)])):i("",!0)]),e("section",ee,[e("div",se,[o[8]||(o[8]=e("h2",{id:"sess-h"},"Zajęcia",-1)),e("span",te,n(l.value.sessions.length),1)]),l.value.sessions.length?(t(),a("ul",ae,[(t(!0),a(r,null,p(l.value.sessions,s=>(t(),a("li",{key:s.id,class:j({past:Date.parse(s.ends_at)s.read_at).length)+"/"+n(_.value.length),1)]),_.value.length?(t(),a(r,{key:0},[b.value.length?(t(),a(r,{key:0},[o[10]||(o[10]=e("h3",{class:"subhead"},"Obowiązkowe",-1)),e("ul",ge,[(t(!0),a(r,null,p(b.value,s=>(t(),C(B,{key:s.id,reading:s,onToggle:k=>d(c).toggleReading(s.id,k)},null,8,["reading","onToggle"]))),128))])],64)):i("",!0),w.value.length?(t(),a(r,{key:1},[o[11]||(o[11]=e("h3",{class:"subhead"},"Dodatkowe",-1)),e("ul",ve,[(t(!0),a(r,null,p(w.value,s=>(t(),C(B,{key:s.id,reading:s,onToggle:k=>d(c).toggleReading(s.id,k)},null,8,["reading","onToggle"]))),128))])],64)):i("",!0)],64)):(t(),a("p",he,"Brak lektur."))]),e("section",ke,[e("div",fe,[o[12]||(o[12]=e("h2",{id:"mat-h"},"Materiały",-1)),e("span",be,n(l.value.materials.length),1)]),l.value.materials.length?(t(),a("ul",we,[(t(!0),a(r,null,p(l.value.materials,s=>(t(),a("li",{key:s.id},[m(x,{to:`/materialy/${s.id}`,class:"title"},{default:y(()=>[z(n(s.title),1)]),_:2},1032,["to"]),e("div",xe,[e("span",Be,n(d(Z)[s.type]),1),s.files_count?(t(),a("span",Te," · "+n(d(G)(s.files_count,"plik","pliki","plików")),1)):i("",!0)])]))),128))])):(t(),a("p",ze,"Brak materiałów."))])],64)):i("",!0)]),_:1},8,["ready","error"])])}}});export{Re as default}; +import{_ as N}from"./PageHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js";import{_ as R}from"./LoadState.vue_vue_type_script_setup_true_lang-BYeP9cST.js";import{_ as B}from"./ReadingItem.vue_vue_type_script_setup_true_lang-BozrsWL2.js";import{d as D,p as S,q as V,A as q,c as a,h as m,i as y,r as T,E as A,G as F,o as t,F as r,b as d,m as z,a as e,t as n,e as i,y as p,s as f,k as M,x as j,B as C}from"./index-CvyVvvnt.js";import{F as P,b as O,a as $,T as Z,c as G}from"./format-bcE-cYHJ.js";const K={class:"card"},W={style:{margin:"0",display:"grid","grid-template-columns":"auto 1fr",gap:"4px 16px"}},Y={style:{margin:"0"}},H={style:{margin:"0"},class:"mono small"},I={style:{margin:"0"}},J={style:{margin:"0"}},Q={key:0,style:{margin:"10px 0 0"}},U={key:1,style:{margin:"10px 0 0"}},X=["href"],ee={class:"section","aria-labelledby":"sess-h"},se={class:"section-head"},te={class:"muted small"},ae={key:0,class:"rows"},le={class:"row-main"},oe={class:"title"},ne={class:"when"},ie={class:"muted small"},re={key:0},de={key:1,class:"badge online",style:{"margin-left":"6px"}},ue={key:2,class:"badge onsite",style:{"margin-left":"6px"}},_e={key:3},ce={key:1,class:"empty"},me={class:"section","aria-labelledby":"read-h"},ye={class:"section-head"},pe={class:"muted small"},ge={class:"rows"},ve={class:"rows"},he={key:1,class:"empty"},ke={class:"section","aria-labelledby":"mat-h"},fe={class:"section-head"},be={class:"muted small"},we={key:0,class:"rows"},xe={class:"muted small"},Be={class:"badge"},Te={key:0},ze={key:1,class:"empty"},Re=D({__name:"CourseView",props:{id:{}},setup(E){const g=E,c=S(),l=T(null),v=T("");async function h(){l.value=null,v.value="";try{l.value=await A.course(Number(g.id))}catch(u){v.value=F(u)}}V(()=>{h(),c.loadReadings()}),q(()=>g.id,()=>{h()});const _=f(()=>c.allReadings.filter(u=>u.course_id===Number(g.id))),b=f(()=>_.value.filter(u=>u.is_required)),w=f(()=>_.value.filter(u=>!u.is_required)),L=Date.now();return(u,o)=>{const x=M("router-link");return t(),a("div",null,[m(R,{ready:!!l.value,error:v.value,onRetry:o[0]||(o[0]=s=>h())},{default:y(()=>[l.value?(t(),a(r,{key:0},[m(N,{eyebrow:`${d(P)[l.value.form]} · semestr ${l.value.semester}`,title:l.value.name},{default:y(()=>[m(x,{class:"btn small ghost",to:"/przedmioty"},{default:y(()=>[...o[1]||(o[1]=[z("← Przedmioty",-1)])]),_:1})]),_:1},8,["eyebrow","title"]),e("section",K,[e("dl",W,[l.value.lecturer?(t(),a(r,{key:0},[o[2]||(o[2]=e("dt",{class:"muted"},"Prowadzący",-1)),e("dd",Y,n(l.value.lecturer),1)],64)):i("",!0),l.value.code?(t(),a(r,{key:1},[o[3]||(o[3]=e("dt",{class:"muted"},"Kod",-1)),e("dd",H,n(l.value.code),1)],64)):i("",!0),l.value.ects?(t(),a(r,{key:2},[o[4]||(o[4]=e("dt",{class:"muted"},"ECTS",-1)),e("dd",I,n(l.value.ects),1)],64)):i("",!0),l.value.assessment?(t(),a(r,{key:3},[o[5]||(o[5]=e("dt",{class:"muted"},"Zaliczenie",-1)),e("dd",J,n(l.value.assessment),1)],64)):i("",!0),l.value.elective_group?(t(),a(r,{key:4},[o[6]||(o[6]=e("dt",{class:"muted"},"Wybór",-1)),o[7]||(o[7]=e("dd",{style:{margin:"0"}},[e("span",{class:"badge alert"},"do wyboru")],-1))],64)):i("",!0)]),l.value.description?(t(),a("p",Q,n(l.value.description),1)):i("",!0),l.value.syllabus_url?(t(),a("p",U,[e("a",{href:l.value.syllabus_url,target:"_blank",rel:"noopener noreferrer"},"Sylabus",8,X)])):i("",!0)]),e("section",ee,[e("div",se,[o[8]||(o[8]=e("h2",{id:"sess-h"},"Zajęcia",-1)),e("span",te,n(l.value.sessions.length),1)]),l.value.sessions.length?(t(),a("ul",ae,[(t(!0),a(r,null,p(l.value.sessions,s=>(t(),a("li",{key:s.id,class:j({past:Date.parse(s.ends_at)s.read_at).length)+"/"+n(_.value.length),1)]),_.value.length?(t(),a(r,{key:0},[b.value.length?(t(),a(r,{key:0},[o[10]||(o[10]=e("h3",{class:"subhead"},"Obowiązkowe",-1)),e("ul",ge,[(t(!0),a(r,null,p(b.value,s=>(t(),C(B,{key:s.id,reading:s,onToggle:k=>d(c).toggleReading(s.id,k)},null,8,["reading","onToggle"]))),128))])],64)):i("",!0),w.value.length?(t(),a(r,{key:1},[o[11]||(o[11]=e("h3",{class:"subhead"},"Dodatkowe",-1)),e("ul",ve,[(t(!0),a(r,null,p(w.value,s=>(t(),C(B,{key:s.id,reading:s,onToggle:k=>d(c).toggleReading(s.id,k)},null,8,["reading","onToggle"]))),128))])],64)):i("",!0)],64)):(t(),a("p",he,"Brak lektur."))]),e("section",ke,[e("div",fe,[o[12]||(o[12]=e("h2",{id:"mat-h"},"Materiały",-1)),e("span",be,n(l.value.materials.length),1)]),l.value.materials.length?(t(),a("ul",we,[(t(!0),a(r,null,p(l.value.materials,s=>(t(),a("li",{key:s.id},[m(x,{to:`/materialy/${s.id}`,class:"title"},{default:y(()=>[z(n(s.title),1)]),_:2},1032,["to"]),e("div",xe,[e("span",Be,n(d(Z)[s.type]),1),s.files_count?(t(),a("span",Te," · "+n(d(G)(s.files_count,"plik","pliki","plików")),1)):i("",!0)])]))),128))])):(t(),a("p",ze,"Brak materiałów."))])],64)):i("",!0)]),_:1},8,["ready","error"])])}}});export{Re as default}; diff --git a/public/assets/CoursesView-C67U75O8.js b/public/assets/CoursesView-CCyOcVSP.js similarity index 90% rename from public/assets/CoursesView-C67U75O8.js rename to public/assets/CoursesView-CCyOcVSP.js index 5d3bfea..2d1dddc 100644 --- a/public/assets/CoursesView-C67U75O8.js +++ b/public/assets/CoursesView-CCyOcVSP.js @@ -1 +1 @@ -import{_ as C}from"./PageHead.vue_vue_type_script_setup_true_lang-l9qe_URH.js";import{_ as w}from"./LoadState.vue_vue_type_script_setup_true_lang-BX6YDhEk.js";import{_ as B}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-mMQANJpk.js";import{d as z,p as $,C as x,q as S,c as t,h as m,i as k,b as r,o as s,a as o,F as c,y as v,e as n,r as V,s as h,k as E,t as a,B as F,D as N,m as _}from"./index-LFNXxSi2.js";import{F as j,c as f}from"./format-bcE-cYHJ.js";const L={key:0,class:"chips",role:"group","aria-label":"Semestr"},D=["aria-pressed"],M=["aria-pressed","onClick"],P={key:1,class:"stack",style:{"margin-top":"10px"}},R={class:"row-main"},T={class:"badge"},q={class:"muted small",style:{margin:"0 0 6px"}},A={key:0},O={key:1},U={key:2},W={class:"small",style:{margin:"0"}},G={key:0,class:"badge alert"},H={class:"muted"},I={key:2,class:"empty"},se=z({__name:"CoursesView",setup(J){const i=$(),g=x(),l=V(null);S(()=>{i.loadCourses()});const p=h(()=>[...new Set((i.courses??[]).map(u=>u.semester))].sort((u,d)=>u-d)),y=h(()=>i.visibleCourses.filter(u=>l.value===null||u.semester===l.value));return(u,d)=>{const b=E("router-link");return s(),t("div",null,[m(C,{eyebrow:"Program studiów",title:"Przedmioty"}),m(w,{ready:r(i).loaded.courses,error:r(i).error,onRetry:d[1]||(d[1]=e=>r(i).retry())},{default:k(()=>[m(B),p.value.length>1?(s(),t("div",L,[o("button",{class:"chip",type:"button","aria-pressed":l.value===null,onClick:d[0]||(d[0]=e=>l.value=null)},"Wszystkie",8,D),(s(!0),t(c,null,v(p.value,e=>(s(),t("button",{key:e,class:"chip",type:"button","aria-pressed":l.value===e,onClick:K=>l.value=e},"Semestr "+a(e),9,M))),128))])):n("",!0),y.value.length?(s(),t("div",P,[(s(!0),t(c,null,v(y.value,e=>(s(),F(b,{key:e.id,to:`/przedmioty/${e.id}`,class:"card link"},{default:k(()=>[o("div",R,[o("h3",null,a(e.name),1),o("span",T,a(r(j)[e.form]),1)]),o("p",q,[e.lecturer?(s(),t("span",A,a(e.lecturer),1)):n("",!0),e.ects?(s(),t("span",O," · "+a(e.ects)+" ECTS",1)):n("",!0),e.assessment?(s(),t("span",U," · "+a(e.assessment),1)):n("",!0)]),o("p",W,[r(N)(e,r(g).choices)?(s(),t("span",G,"do wyboru")):n("",!0),o("span",H,[_(a(r(f)(e.counts.sessions,"zajęcia","zajęcia","zajęć")),1),e.counts.readings?(s(),t(c,{key:0},[_(" · lektury "+a(e.counts.readings_read)+"/"+a(e.counts.readings),1)],64)):n("",!0),e.counts.materials?(s(),t(c,{key:1},[_(" · "+a(r(f)(e.counts.materials,"materiał","materiały","materiałów")),1)],64)):n("",!0)])])]),_:2},1032,["to"]))),128))])):(s(),t("p",I,"Brak przedmiotów."))]),_:1},8,["ready","error"])])}}});export{se as default}; +import{_ as C}from"./PageHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js";import{_ as w}from"./LoadState.vue_vue_type_script_setup_true_lang-BYeP9cST.js";import{_ as B}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-ml4QcEZn.js";import{d as z,p as $,C as x,q as S,c as t,h as m,i as k,b as r,o as s,a as o,F as c,y as v,e as n,r as V,s as h,k as E,t as a,B as F,D as N,m as _}from"./index-CvyVvvnt.js";import{F as j,c as f}from"./format-bcE-cYHJ.js";const L={key:0,class:"chips",role:"group","aria-label":"Semestr"},D=["aria-pressed"],M=["aria-pressed","onClick"],P={key:1,class:"stack",style:{"margin-top":"10px"}},R={class:"row-main"},T={class:"badge"},q={class:"muted small",style:{margin:"0 0 6px"}},A={key:0},O={key:1},U={key:2},W={class:"small",style:{margin:"0"}},G={key:0,class:"badge alert"},H={class:"muted"},I={key:2,class:"empty"},se=z({__name:"CoursesView",setup(J){const i=$(),g=x(),l=V(null);S(()=>{i.loadCourses()});const p=h(()=>[...new Set((i.courses??[]).map(u=>u.semester))].sort((u,d)=>u-d)),y=h(()=>i.visibleCourses.filter(u=>l.value===null||u.semester===l.value));return(u,d)=>{const b=E("router-link");return s(),t("div",null,[m(C,{eyebrow:"Program studiów",title:"Przedmioty"}),m(w,{ready:r(i).loaded.courses,error:r(i).error,onRetry:d[1]||(d[1]=e=>r(i).retry())},{default:k(()=>[m(B),p.value.length>1?(s(),t("div",L,[o("button",{class:"chip",type:"button","aria-pressed":l.value===null,onClick:d[0]||(d[0]=e=>l.value=null)},"Wszystkie",8,D),(s(!0),t(c,null,v(p.value,e=>(s(),t("button",{key:e,class:"chip",type:"button","aria-pressed":l.value===e,onClick:K=>l.value=e},"Semestr "+a(e),9,M))),128))])):n("",!0),y.value.length?(s(),t("div",P,[(s(!0),t(c,null,v(y.value,e=>(s(),F(b,{key:e.id,to:`/przedmioty/${e.id}`,class:"card link"},{default:k(()=>[o("div",R,[o("h3",null,a(e.name),1),o("span",T,a(r(j)[e.form]),1)]),o("p",q,[e.lecturer?(s(),t("span",A,a(e.lecturer),1)):n("",!0),e.ects?(s(),t("span",O," · "+a(e.ects)+" ECTS",1)):n("",!0),e.assessment?(s(),t("span",U," · "+a(e.assessment),1)):n("",!0)]),o("p",W,[r(N)(e,r(g).choices)?(s(),t("span",G,"do wyboru")):n("",!0),o("span",H,[_(a(r(f)(e.counts.sessions,"zajęcia","zajęcia","zajęć")),1),e.counts.readings?(s(),t(c,{key:0},[_(" · lektury "+a(e.counts.readings_read)+"/"+a(e.counts.readings),1)],64)):n("",!0),e.counts.materials?(s(),t(c,{key:1},[_(" · "+a(r(f)(e.counts.materials,"materiał","materiały","materiałów")),1)],64)):n("",!0)])])]),_:2},1032,["to"]))),128))])):(s(),t("p",I,"Brak przedmiotów."))]),_:1},8,["ready","error"])])}}});export{se as default}; diff --git a/public/assets/DashboardView-CQoALeJF.js b/public/assets/DashboardView-BYuD8Ygc.js similarity index 95% rename from public/assets/DashboardView-CQoALeJF.js rename to public/assets/DashboardView-BYuD8Ygc.js index 93eacef..773fd76 100644 --- a/public/assets/DashboardView-CQoALeJF.js +++ b/public/assets/DashboardView-BYuD8Ygc.js @@ -1 +1 @@ -import{_ as S}from"./PageHead.vue_vue_type_script_setup_true_lang-l9qe_URH.js";import{_ as R}from"./LoadState.vue_vue_type_script_setup_true_lang-BX6YDhEk.js";import{_ as $}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-mMQANJpk.js";import{d as F,u as P,p as V,q as E,c as o,h as u,i as p,b as i,r as M,s as d,o as n,x as b,a as e,t as a,m,e as v,F as j,y as D,z as A,k as Z}from"./index-LFNXxSi2.js";import{f as I,m as T,r as q,c as C,a as N,b as K,F as O,d as Q,e as U,K as W,g as G}from"./format-bcE-cYHJ.js";const H={class:"eyebrow"},J={id:"meeting-h",style:{margin:"4px 0 6px"}},X={style:{margin:"0 0 6px"}},Y={key:0,class:"muted small",style:{margin:"0 0 6px"}},ee={key:1,class:"muted small",style:{margin:"0 0 8px"}},se={key:1,class:"card"},ae={class:"grid-2 section"},te={"aria-labelledby":"next-h"},le={class:"section-head"},oe={key:0,class:"rows"},ne={class:"row-main"},ie={class:"title"},re={class:"when"},de={class:"muted small"},ue={key:0,class:"badge online"},me={key:1,class:"badge onsite"},ce={key:1,class:"empty"},_e={"aria-labelledby":"dl-h"},pe={class:"section-head"},ye={key:0,class:"rows"},ve={class:"row-main"},he={class:"title"},ze={class:"muted small"},ge={key:0},be={key:1,class:"empty"},ke={class:"grid-2 section"},we={class:"card","aria-labelledby":"read-h"},fe={style:{margin:"0 0 8px"}},xe={class:"big-num"},je={class:"muted"},De=["aria-valuenow"],Te={class:"muted small",style:{margin:"8px 0 10px"}},qe={class:"card","aria-labelledby":"quiz-h"},$e=F({__name:"DashboardView",setup(Ce){const k=P(),l=V(),_=M(new Date);E(()=>{_.value=new Date,Promise.all([l.loadDashboard(),l.loadCourses(),l.loadSchedule(),l.loadDeadlines(),l.loadReadings()])});const B=d(()=>l.loaded.schedule&&l.loaded.courses&&l.loaded.readings&&l.loaded.deadlines&&l.loaded.dashboard),r=d(()=>l.dashboard?.current_meeting??l.dashboard?.next_meeting??null),z=d(()=>!!l.dashboard?.current_meeting),g=d(()=>G(r.value?.notes)),w=d(()=>l.schedule.filter(h=>Date.parse(h.ends_at)>_.value.getTime()).slice(0,5)),f=d(()=>l.deadlines.filter(h=>Date.parse(h.due_at)>=_.value.getTime()).slice(0,5)),c=d(()=>l.readingStats),x=d(()=>c.value.requiredTotal?Math.round(c.value.requiredRead/c.value.requiredTotal*100):0),L=d(()=>k.user?.name?`Cześć, ${k.user.name}`:"Pulpit");return(h,s)=>{const y=Z("router-link");return n(),o("div",null,[u(S,{eyebrow:"Pulpit",title:L.value},null,8,["title"]),u(R,{ready:B.value,error:i(l).error,onRetry:s[0]||(s[0]=t=>i(l).retry())},{default:p(()=>[u($),r.value?(n(),o("section",{key:0,class:b(["card accent",{hl:z.value}]),"aria-labelledby":"meeting-h"},[e("span",H,a(z.value?"Trwa zjazd":"Najbliższy zjazd"),1),e("h2",J,"Zjazd "+a(r.value.number),1),e("p",X,[m(a(i(I)(r.value.starts_on,r.value.ends_on))+" ",1),g.value?(n(),o("span",{key:0,class:b(["badge",g.value==="online"?"online":"onsite"]),style:{"margin-left":"6px"}},a(g.value),3)):v("",!0)]),i(T)(r.value.notes)?(n(),o("p",Y,a(i(T)(r.value.notes)),1)):v("",!0),z.value?v("",!0):(n(),o("p",ee,a(i(q)(`${r.value.starts_on}T12:00:00+02:00`,_.value))+" · "+a(i(C)(r.value.sessions_count,"zajęcia","zajęcia","zajęć")),1)),u(y,{class:"btn small",to:{name:"schedule",query:{zjazd:r.value.number}}},{default:p(()=>[...s[1]||(s[1]=[m("Zobacz plan zjazdu",-1)])]),_:1},8,["to"])],2)):(n(),o("section",se,[...s[2]||(s[2]=[e("p",{class:"muted",style:{margin:"0"}},"Brak zaplanowanych zjazdów.",-1)])])),e("div",ae,[e("section",te,[e("div",le,[s[4]||(s[4]=e("h2",{id:"next-h"},"Najbliższe zajęcia",-1)),u(y,{to:"/plan",class:"small"},{default:p(()=>[...s[3]||(s[3]=[m("Cały plan",-1)])]),_:1})]),w.value.length?(n(),o("ul",oe,[(n(!0),o(j,null,D(w.value,t=>(n(),o("li",{key:t.id},[e("div",ne,[e("span",ie,a(t.course.name),1),e("span",re,a(i(N)(t.starts_at))+"–"+a(i(N)(t.ends_at)),1)]),e("div",de,[m(a(i(K)(t.starts_at))+" · "+a(i(O)[t.course.form])+" ",1),t.is_online?(n(),o("span",ue,"online")):t.room?(n(),o("span",me,"sala "+a(t.room),1)):v("",!0)])]))),128))])):(n(),o("p",ce,"Nie ma już zaplanowanych zajęć."))]),e("section",_e,[e("div",pe,[s[6]||(s[6]=e("h2",{id:"dl-h"},"Terminy",-1)),u(y,{to:"/terminarz",class:"small"},{default:p(()=>[...s[5]||(s[5]=[m("Terminarz",-1)])]),_:1})]),f.value.length?(n(),o("ul",ye,[(n(!0),o(j,null,D(f.value,t=>(n(),o("li",{key:t.id},[e("div",ve,[e("span",he,a(t.title),1),e("span",{class:b(["badge",{alert:i(Q)(t.due_at,_.value)<=3}])},a(i(q)(t.due_at,_.value)),3)]),e("div",ze,[m(a(i(U)(t.due_at))+" · "+a(i(W)[t.kind]),1),t.course?(n(),o("span",ge," · "+a(t.course.name),1)):v("",!0)])]))),128))])):(n(),o("p",be,"Brak nadchodzących terminów."))])]),e("div",ke,[e("section",we,[s[8]||(s[8]=e("span",{class:"eyebrow"},"Lektury",-1)),s[9]||(s[9]=e("h2",{id:"read-h",style:{margin:"4px 0 8px"}},"Postęp czytania",-1)),e("p",fe,[e("span",xe,a(c.value.requiredRead),1),e("span",je," z "+a(c.value.requiredTotal)+" obowiązkowych",1)]),e("div",{class:"progress-bar",role:"progressbar","aria-valuenow":x.value,"aria-valuemin":"0","aria-valuemax":"100","aria-label":"Przeczytane lektury obowiązkowe"},[e("span",{style:A({width:x.value+"%"})},null,4)],8,De),e("p",Te,"Łącznie przeczytano "+a(c.value.read)+" z "+a(i(C)(c.value.total,"lektury","lektur","lektur"))+".",1),u(y,{class:"btn small",to:"/lektury"},{default:p(()=>[...s[7]||(s[7]=[m("Lista lektur",-1)])]),_:1})]),e("section",qe,[s[11]||(s[11]=e("span",{class:"eyebrow"},"Quizy",-1)),s[12]||(s[12]=e("h2",{id:"quiz-h",style:{margin:"4px 0 8px"}},"Sprawdź się",-1)),s[13]||(s[13]=e("p",{class:"muted",style:{margin:"0 0 12px"}},"Fiszki z powtórki: losuj po 5 pytań, oznaczaj Wiem / Nie wiem i wracaj do tych, których nie znasz.",-1)),u(y,{class:"btn primary small",to:"/quizy"},{default:p(()=>[...s[10]||(s[10]=[m("Zacznij quiz",-1)])]),_:1})])])]),_:1},8,["ready","error"])])}}});export{$e as default}; +import{_ as S}from"./PageHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js";import{_ as R}from"./LoadState.vue_vue_type_script_setup_true_lang-BYeP9cST.js";import{_ as $}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-ml4QcEZn.js";import{d as F,u as P,p as V,q as E,c as o,h as u,i as p,b as i,r as M,s as d,o as n,x as b,a as e,t as a,m,e as v,F as j,y as D,z as A,k as Z}from"./index-CvyVvvnt.js";import{f as I,m as T,r as q,c as C,a as N,b as K,F as O,d as Q,e as U,K as W,g as G}from"./format-bcE-cYHJ.js";const H={class:"eyebrow"},J={id:"meeting-h",style:{margin:"4px 0 6px"}},X={style:{margin:"0 0 6px"}},Y={key:0,class:"muted small",style:{margin:"0 0 6px"}},ee={key:1,class:"muted small",style:{margin:"0 0 8px"}},se={key:1,class:"card"},ae={class:"grid-2 section"},te={"aria-labelledby":"next-h"},le={class:"section-head"},oe={key:0,class:"rows"},ne={class:"row-main"},ie={class:"title"},re={class:"when"},de={class:"muted small"},ue={key:0,class:"badge online"},me={key:1,class:"badge onsite"},ce={key:1,class:"empty"},_e={"aria-labelledby":"dl-h"},pe={class:"section-head"},ye={key:0,class:"rows"},ve={class:"row-main"},he={class:"title"},ze={class:"muted small"},ge={key:0},be={key:1,class:"empty"},ke={class:"grid-2 section"},we={class:"card","aria-labelledby":"read-h"},fe={style:{margin:"0 0 8px"}},xe={class:"big-num"},je={class:"muted"},De=["aria-valuenow"],Te={class:"muted small",style:{margin:"8px 0 10px"}},qe={class:"card","aria-labelledby":"quiz-h"},$e=F({__name:"DashboardView",setup(Ce){const k=P(),l=V(),_=M(new Date);E(()=>{_.value=new Date,Promise.all([l.loadDashboard(),l.loadCourses(),l.loadSchedule(),l.loadDeadlines(),l.loadReadings()])});const B=d(()=>l.loaded.schedule&&l.loaded.courses&&l.loaded.readings&&l.loaded.deadlines&&l.loaded.dashboard),r=d(()=>l.dashboard?.current_meeting??l.dashboard?.next_meeting??null),z=d(()=>!!l.dashboard?.current_meeting),g=d(()=>G(r.value?.notes)),w=d(()=>l.schedule.filter(h=>Date.parse(h.ends_at)>_.value.getTime()).slice(0,5)),f=d(()=>l.deadlines.filter(h=>Date.parse(h.due_at)>=_.value.getTime()).slice(0,5)),c=d(()=>l.readingStats),x=d(()=>c.value.requiredTotal?Math.round(c.value.requiredRead/c.value.requiredTotal*100):0),L=d(()=>k.user?.name?`Cześć, ${k.user.name}`:"Pulpit");return(h,s)=>{const y=Z("router-link");return n(),o("div",null,[u(S,{eyebrow:"Pulpit",title:L.value},null,8,["title"]),u(R,{ready:B.value,error:i(l).error,onRetry:s[0]||(s[0]=t=>i(l).retry())},{default:p(()=>[u($),r.value?(n(),o("section",{key:0,class:b(["card accent",{hl:z.value}]),"aria-labelledby":"meeting-h"},[e("span",H,a(z.value?"Trwa zjazd":"Najbliższy zjazd"),1),e("h2",J,"Zjazd "+a(r.value.number),1),e("p",X,[m(a(i(I)(r.value.starts_on,r.value.ends_on))+" ",1),g.value?(n(),o("span",{key:0,class:b(["badge",g.value==="online"?"online":"onsite"]),style:{"margin-left":"6px"}},a(g.value),3)):v("",!0)]),i(T)(r.value.notes)?(n(),o("p",Y,a(i(T)(r.value.notes)),1)):v("",!0),z.value?v("",!0):(n(),o("p",ee,a(i(q)(`${r.value.starts_on}T12:00:00+02:00`,_.value))+" · "+a(i(C)(r.value.sessions_count,"zajęcia","zajęcia","zajęć")),1)),u(y,{class:"btn small",to:{name:"schedule",query:{zjazd:r.value.number}}},{default:p(()=>[...s[1]||(s[1]=[m("Zobacz plan zjazdu",-1)])]),_:1},8,["to"])],2)):(n(),o("section",se,[...s[2]||(s[2]=[e("p",{class:"muted",style:{margin:"0"}},"Brak zaplanowanych zjazdów.",-1)])])),e("div",ae,[e("section",te,[e("div",le,[s[4]||(s[4]=e("h2",{id:"next-h"},"Najbliższe zajęcia",-1)),u(y,{to:"/plan",class:"small"},{default:p(()=>[...s[3]||(s[3]=[m("Cały plan",-1)])]),_:1})]),w.value.length?(n(),o("ul",oe,[(n(!0),o(j,null,D(w.value,t=>(n(),o("li",{key:t.id},[e("div",ne,[e("span",ie,a(t.course.name),1),e("span",re,a(i(N)(t.starts_at))+"–"+a(i(N)(t.ends_at)),1)]),e("div",de,[m(a(i(K)(t.starts_at))+" · "+a(i(O)[t.course.form])+" ",1),t.is_online?(n(),o("span",ue,"online")):t.room?(n(),o("span",me,"sala "+a(t.room),1)):v("",!0)])]))),128))])):(n(),o("p",ce,"Nie ma już zaplanowanych zajęć."))]),e("section",_e,[e("div",pe,[s[6]||(s[6]=e("h2",{id:"dl-h"},"Terminy",-1)),u(y,{to:"/terminarz",class:"small"},{default:p(()=>[...s[5]||(s[5]=[m("Terminarz",-1)])]),_:1})]),f.value.length?(n(),o("ul",ye,[(n(!0),o(j,null,D(f.value,t=>(n(),o("li",{key:t.id},[e("div",ve,[e("span",he,a(t.title),1),e("span",{class:b(["badge",{alert:i(Q)(t.due_at,_.value)<=3}])},a(i(q)(t.due_at,_.value)),3)]),e("div",ze,[m(a(i(U)(t.due_at))+" · "+a(i(W)[t.kind]),1),t.course?(n(),o("span",ge," · "+a(t.course.name),1)):v("",!0)])]))),128))])):(n(),o("p",be,"Brak nadchodzących terminów."))])]),e("div",ke,[e("section",we,[s[8]||(s[8]=e("span",{class:"eyebrow"},"Lektury",-1)),s[9]||(s[9]=e("h2",{id:"read-h",style:{margin:"4px 0 8px"}},"Postęp czytania",-1)),e("p",fe,[e("span",xe,a(c.value.requiredRead),1),e("span",je," z "+a(c.value.requiredTotal)+" obowiązkowych",1)]),e("div",{class:"progress-bar",role:"progressbar","aria-valuenow":x.value,"aria-valuemin":"0","aria-valuemax":"100","aria-label":"Przeczytane lektury obowiązkowe"},[e("span",{style:A({width:x.value+"%"})},null,4)],8,De),e("p",Te,"Łącznie przeczytano "+a(c.value.read)+" z "+a(i(C)(c.value.total,"lektury","lektur","lektur"))+".",1),u(y,{class:"btn small",to:"/lektury"},{default:p(()=>[...s[7]||(s[7]=[m("Lista lektur",-1)])]),_:1})]),e("section",qe,[s[11]||(s[11]=e("span",{class:"eyebrow"},"Quizy",-1)),s[12]||(s[12]=e("h2",{id:"quiz-h",style:{margin:"4px 0 8px"}},"Sprawdź się",-1)),s[13]||(s[13]=e("p",{class:"muted",style:{margin:"0 0 12px"}},"Fiszki z powtórki: losuj po 5 pytań, oznaczaj Wiem / Nie wiem i wracaj do tych, których nie znasz.",-1)),u(y,{class:"btn primary small",to:"/quizy"},{default:p(()=>[...s[10]||(s[10]=[m("Zacznij quiz",-1)])]),_:1})])])]),_:1},8,["ready","error"])])}}});export{$e as default}; diff --git a/public/assets/DeadlinesView-BDipircW.js b/public/assets/DeadlinesView-DY301l3f.js similarity index 89% rename from public/assets/DeadlinesView-BDipircW.js rename to public/assets/DeadlinesView-DY301l3f.js index a316fb0..b28cebe 100644 --- a/public/assets/DeadlinesView-BDipircW.js +++ b/public/assets/DeadlinesView-DY301l3f.js @@ -1 +1 @@ -import{_ as B}from"./PageHead.vue_vue_type_script_setup_true_lang-l9qe_URH.js";import{_ as x}from"./LoadState.vue_vue_type_script_setup_true_lang-BX6YDhEk.js";import{_ as C}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-mMQANJpk.js";import{d as $,p as N,q as T,c as o,h as m,i as v,b as s,r as y,o as t,F as h,y as f,a as n,t as a,e as u,s as k,k as V,x as L,m as g,B as M}from"./index-LFNXxSi2.js";import{d as w,r as E,b as D,a as F,K as b,c as K}from"./format-bcE-cYHJ.js";const P={key:0,class:"rows card"},S={class:"row-main"},j={class:"title"},q={class:"muted small"},A={class:"badge"},I={key:0,class:"small",style:{margin:"6px 0 0"}},R={key:1,class:"empty"},U={key:2,class:"section"},Z=["aria-pressed"],G={key:0,class:"rows card past",style:{"margin-top":"10px"}},H={class:"row-main"},J={class:"title"},O={class:"when"},Q={class:"muted small"},te=$({__name:"DeadlinesView",setup(W){const r=N(),i=y(new Date),l=y(!1);T(()=>{i.value=new Date,Promise.all([r.loadDeadlines(),r.loadCourses()])});const p=k(()=>r.deadlines.filter(c=>Date.parse(c.due_at)>=i.value.getTime())),_=k(()=>r.deadlines.filter(c=>Date.parse(c.due_at){const z=V("router-link");return t(),o("div",null,[m(B,{eyebrow:"Zaliczenia, egzaminy, sprawy organizacyjne",title:"Terminarz"}),m(x,{ready:s(r).loaded.deadlines&&s(r).loaded.courses,error:s(r).error,onRetry:d[1]||(d[1]=e=>s(r).retry())},{default:v(()=>[m(C),p.value.length?(t(),o("ul",P,[(t(!0),o(h,null,f(p.value,e=>(t(),o("li",{key:e.id},[n("div",S,[n("span",j,a(e.title),1),n("span",{class:L(["badge",{alert:s(w)(e.due_at,i.value)<=3}])},a(s(E)(e.due_at,i.value)),3)]),n("div",q,[g(a(s(D)(e.due_at))+", "+a(s(F)(e.due_at))+" · ",1),n("span",A,a(s(b)[e.kind]),1),e.course?(t(),M(z,{key:0,to:`/przedmioty/${e.course.id}`},{default:v(()=>[g(" · "+a(e.course.name),1)]),_:2},1032,["to"])):u("",!0)]),e.description?(t(),o("p",I,a(e.description),1)):u("",!0)]))),128))])):(t(),o("p",R,"Brak nadchodzących terminów.")),_.value.length?(t(),o("div",U,[n("button",{class:"chip",type:"button","aria-pressed":l.value,onClick:d[0]||(d[0]=e=>l.value=!l.value)},"Minione ("+a(_.value.length)+")",9,Z),l.value?(t(),o("ul",G,[(t(!0),o(h,null,f(_.value,e=>(t(),o("li",{key:e.id},[n("div",H,[n("span",J,a(e.title),1),n("span",O,a(s(K)(Math.abs(s(w)(e.due_at,i.value)),"dzień","dni","dni"))+" temu",1)]),n("div",Q,a(s(D)(e.due_at))+" · "+a(s(b)[e.kind]),1)]))),128))])):u("",!0)])):u("",!0)]),_:1},8,["ready","error"])])}}});export{te as default}; +import{_ as B}from"./PageHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js";import{_ as x}from"./LoadState.vue_vue_type_script_setup_true_lang-BYeP9cST.js";import{_ as C}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-ml4QcEZn.js";import{d as $,p as N,q as T,c as o,h as m,i as v,b as s,r as y,o as t,F as h,y as f,a as n,t as a,e as u,s as k,k as V,x as L,m as g,B as M}from"./index-CvyVvvnt.js";import{d as w,r as E,b as D,a as F,K as b,c as K}from"./format-bcE-cYHJ.js";const P={key:0,class:"rows card"},S={class:"row-main"},j={class:"title"},q={class:"muted small"},A={class:"badge"},I={key:0,class:"small",style:{margin:"6px 0 0"}},R={key:1,class:"empty"},U={key:2,class:"section"},Z=["aria-pressed"],G={key:0,class:"rows card past",style:{"margin-top":"10px"}},H={class:"row-main"},J={class:"title"},O={class:"when"},Q={class:"muted small"},te=$({__name:"DeadlinesView",setup(W){const r=N(),i=y(new Date),l=y(!1);T(()=>{i.value=new Date,Promise.all([r.loadDeadlines(),r.loadCourses()])});const p=k(()=>r.deadlines.filter(c=>Date.parse(c.due_at)>=i.value.getTime())),_=k(()=>r.deadlines.filter(c=>Date.parse(c.due_at){const z=V("router-link");return t(),o("div",null,[m(B,{eyebrow:"Zaliczenia, egzaminy, sprawy organizacyjne",title:"Terminarz"}),m(x,{ready:s(r).loaded.deadlines&&s(r).loaded.courses,error:s(r).error,onRetry:d[1]||(d[1]=e=>s(r).retry())},{default:v(()=>[m(C),p.value.length?(t(),o("ul",P,[(t(!0),o(h,null,f(p.value,e=>(t(),o("li",{key:e.id},[n("div",S,[n("span",j,a(e.title),1),n("span",{class:L(["badge",{alert:s(w)(e.due_at,i.value)<=3}])},a(s(E)(e.due_at,i.value)),3)]),n("div",q,[g(a(s(D)(e.due_at))+", "+a(s(F)(e.due_at))+" · ",1),n("span",A,a(s(b)[e.kind]),1),e.course?(t(),M(z,{key:0,to:`/przedmioty/${e.course.id}`},{default:v(()=>[g(" · "+a(e.course.name),1)]),_:2},1032,["to"])):u("",!0)]),e.description?(t(),o("p",I,a(e.description),1)):u("",!0)]))),128))])):(t(),o("p",R,"Brak nadchodzących terminów.")),_.value.length?(t(),o("div",U,[n("button",{class:"chip",type:"button","aria-pressed":l.value,onClick:d[0]||(d[0]=e=>l.value=!l.value)},"Minione ("+a(_.value.length)+")",9,Z),l.value?(t(),o("ul",G,[(t(!0),o(h,null,f(_.value,e=>(t(),o("li",{key:e.id},[n("div",H,[n("span",J,a(e.title),1),n("span",O,a(s(K)(Math.abs(s(w)(e.due_at,i.value)),"dzień","dni","dni"))+" temu",1)]),n("div",Q,a(s(D)(e.due_at))+" · "+a(s(b)[e.kind]),1)]))),128))])):u("",!0)])):u("",!0)]),_:1},8,["ready","error"])])}}});export{te as default}; diff --git a/public/assets/DeckViewer.vue_vue_type_style_index_0_lang-Dsql2yXf.js b/public/assets/DeckViewer.vue_vue_type_style_index_0_lang-Dsql2yXf.js deleted file mode 100644 index f7cab56..0000000 --- a/public/assets/DeckViewer.vue_vue_type_style_index_0_lang-Dsql2yXf.js +++ /dev/null @@ -1,8 +0,0 @@ -import{d as Fe,A as O,q as Ue,K as Q,S as Oe,c as x,B as _e,V as Ve,R as xe,e as w,F as ye,a as h,m as N,x as we,t as _,y as We,z as Ze,r as T,s as Y,o as v,b as Xe}from"./index-LFNXxSi2.js";const Ge=':host{color-scheme:light dark;--deck-paper: #e9ebe3;--deck-paper-2: #dfe2d8;--deck-ink: #16201f;--deck-ink-2: #4b5551;--deck-rule: #b9beb3;--deck-empire: #b5302c;--deck-khaki: #7f7047;--deck-display: "Libre Caslon Display", "Times New Roman", Georgia, serif;--deck-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;--deck-mono: "Courier Prime", "Courier New", Courier, monospace}@media(prefers-color-scheme:dark){:host:not([data-theme=light]){--deck-paper: #141a18;--deck-paper-2: #1c2421;--deck-ink: #e4e4da;--deck-ink-2: #a7ada4;--deck-rule: #3a443f;--deck-empire: #e0675f;--deck-khaki: #c2ad72;color-scheme:dark}}:host[data-theme=dark]{--deck-paper: #141a18;--deck-paper-2: #1c2421;--deck-ink: #e4e4da;--deck-ink-2: #a7ada4;--deck-rule: #3a443f;--deck-empire: #e0675f;--deck-khaki: #c2ad72;color-scheme:dark}*{box-sizing:border-box}:host,.deck{height:100%;margin:0}.deck{position:relative;background:var(--deck-paper);color:var(--deck-ink);font-family:var(--deck-body);font-size:24px;line-height:1.4;overflow:hidden}h1,h2,h3{font-family:var(--deck-display);font-weight:400;margin:0;text-wrap:balance;line-height:1.08}p{margin:0}ul{margin:0;padding-left:1.1em}li{margin-block:.25em}li::marker{color:var(--deck-empire)}em{font-style:italic}strong{font-weight:600}a{color:inherit}.k{font-family:var(--deck-mono);font-size:.72em;letter-spacing:.08em;text-transform:uppercase;color:var(--deck-khaki)}.red{color:var(--deck-empire)}.muted{color:var(--deck-ink-2)}.small{font-size:.78em;line-height:1.35}.bib{font-size:17px;line-height:1.3;gap:36px}.bib li{margin-block:.2em}.bib .k{font-size:13px;margin-bottom:6px}#stage{position:absolute;left:50%;top:50%;width:1280px;height:720px;transform-origin:0 0}.slide{position:absolute;inset:0;display:none;padding:64px 88px 72px;background:var(--deck-paper);grid-template-rows:auto 1fr;gap:28px;overflow:hidden}[hidden]{display:none!important}.slide.on{display:grid}.slide.special{border-top:6px solid var(--deck-khaki)}.sp-close{position:absolute;top:18px;right:22px;width:44px;height:44px;border:1px solid var(--deck-rule);background:transparent;color:var(--deck-ink-2);font-size:28px;line-height:1;cursor:pointer}.sp-link{border-bottom:2px dotted var(--deck-empire);cursor:pointer}.slide>header{display:grid;gap:10px}.slide>header h2{font-size:50px}.slide .body{min-height:0;display:grid;gap:22px;align-content:start}.cols{display:grid;grid-template-columns:1fr 1fr;gap:44px;align-items:start}.cols>*{min-width:0}.cols.w{grid-template-columns:1.3fr 1fr}.rule-top{border-top:1px solid var(--deck-rule);padding-top:16px}.note{font-size:20px;color:var(--deck-ink-2);border-left:3px solid var(--deck-empire);padding-left:14px}.quote{font-family:var(--deck-display);font-size:34px;line-height:1.25}.quote+.k{margin-top:6px}.slide.sec{grid-template-rows:1fr;align-content:center;background:var(--deck-paper-2)}.slide.sec .k{font-size:20px}.slide.sec h2{font-size:72px;max-width:18ch;margin-top:12px}.slide.sec p{font-size:26px;color:var(--deck-ink-2);max-width:44ch;margin-top:22px}.slide.title{grid-template-rows:1fr auto;background:var(--deck-paper-2)}.slide.title h1{font-size:86px;max-width:14ch}.slide.title .sub{font-size:30px;color:var(--deck-ink-2);margin-top:20px;font-family:var(--deck-display)}.slide.title footer{display:flex;justify-content:space-between;align-items:end;border-top:1px solid var(--deck-rule);padding-top:18px;font-size:20px}.tl{display:grid;grid-template-columns:max-content 1fr;column-gap:26px;row-gap:8px;font-size:22px;align-content:start}.tl .y{font-family:var(--deck-mono);color:var(--deck-empire);font-variant-numeric:tabular-nums}.tl.compact{font-size:20px;row-gap:6px}table{border-collapse:collapse;width:100%;font-size:21px}th,td{text-align:left;vertical-align:top;padding:8px 12px 8px 0;border-bottom:1px solid var(--deck-rule)}th{font-family:var(--deck-mono);font-weight:400;font-size:16px;letter-spacing:.08em;text-transform:uppercase;color:var(--deck-khaki)}.people{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.p{border-top:2px solid var(--deck-empire);padding-top:10px;font-size:20px;line-height:1.35;min-width:0}.p b{display:block;font-family:var(--deck-display);font-weight:400;font-size:26px;margin-bottom:4px}.theses{display:grid;gap:18px;counter-reset:t}.theses>div{display:grid;grid-template-columns:56px 1fr;gap:14px;align-items:start}.theses>div:before{counter-increment:t;content:counter(t);font-family:var(--deck-display);font-size:48px;line-height:1;color:var(--deck-empire)}.theses b{font-weight:600}.body.v2{grid-template-rows:1fr;align-content:stretch;gap:20px}.body.v2>:first-child{align-self:start}.body.v2>.people+.cols{align-self:start}.pts{font-size:28px;line-height:1.3}.pts li{margin-block:.4em}.tl.big{font-size:26px;row-gap:10px}table.big{font-size:24px}.sum{font-family:var(--deck-display);font-size:30px;line-height:1.25;border-top:2px solid var(--deck-empire);padding-top:14px;align-self:end;text-wrap:balance}.body.v2 .p{font-size:22px}.body.v2 .theses{font-size:30px;gap:26px}.body.v2 .theses>div{align-items:center}.notes .full{opacity:.9}@media(max-width:900px)and (orientation:portrait){.pts{font-size:17px}.tl.big{font-size:16px}table.big{font-size:15px}.sum{font-size:20px}.body.v2 .p{font-size:16px}}#bar{position:fixed;left:0;right:0;bottom:0;height:4px;background:var(--deck-rule)}#bar i{display:block;height:100%;width:0;background:var(--deck-empire);transition:width .25s}#meta{position:fixed;right:20px;bottom:12px;font-family:var(--deck-mono);font-size:14px;color:var(--deck-ink-2);letter-spacing:.06em}#meta b{font-weight:400;color:var(--deck-ink)}#sect{position:fixed;left:20px;bottom:12px;font-family:var(--deck-mono);font-size:14px;color:var(--deck-ink-2);letter-spacing:.08em;text-transform:uppercase}.notes,.srcs{display:none}.deck.notes-on .notes,.deck.srcs-on .srcs{display:block;position:absolute;left:0;right:0;bottom:0;max-height:46%;overflow:auto;background:var(--deck-ink);color:var(--deck-paper);padding:18px 88px;font-size:19px;line-height:1.45}.notes:before,.srcs:before{display:block;font-family:var(--deck-mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;margin-bottom:6px;opacity:.7}.notes:before{content:"Komentarz · N"}.srcs:before{content:"Źródła · Z"}.srcs ul{margin:0;padding-left:1.1em}.srcs li+li{margin-top:.35em}.deck.notes-on .notes p+p{margin-top:.5em}.deck.notes-on #nav,.deck.srcs-on #nav{bottom:50%}#nav{position:fixed;inset:0;display:grid;grid-template-columns:1fr 2fr 1fr;overflow:hidden}#nav button{background:transparent;border:0;cursor:pointer;opacity:0;font-size:0;outline:none}#nav button:focus,#nav button:focus-visible{outline:none}#nav button:focus-visible{opacity:1;box-shadow:inset 4px 0 0 var(--deck-empire)}#nav button:last-of-type:focus-visible{box-shadow:inset -4px 0 0 var(--deck-empire)}#nav .mid{pointer-events:none}.status-retry{margin-top:28px;font:16px var(--deck-mono);letter-spacing:.04em;color:var(--deck-ink);background:var(--deck-paper);border:1px solid var(--deck-rule);min-height:44px;padding:8px 16px;cursor:pointer}.status-retry:focus-visible{outline:3px solid var(--deck-empire)}@media(max-width:900px)and (orientation:portrait){.deck{overflow:auto;font-size:17px}#stage{position:static;width:auto;height:auto;transform:none!important;padding:0 16px;padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}.slide{position:static;display:grid!important;padding:28px 0;border-bottom:1px solid var(--deck-rule);gap:16px}.slide>header h2{font-size:30px}.slide.sec h2{font-size:36px}.slide.sec p{font-size:18px}.slide.title h1{font-size:40px}.slide.title .sub{font-size:20px}.slide.title footer{flex-direction:column;align-items:start;gap:6px;font-size:15px}.cols,.cols.w{grid-template-columns:1fr;gap:16px}.people{grid-template-columns:1fr}.tl,.tl.compact{font-size:16px}table{font-size:15px}.quote{font-size:22px}.note,.p{font-size:16px}.p b{font-size:20px}.theses>div{grid-template-columns:36px 1fr}.theses>div:before{font-size:30px}.notes,.srcs{display:block;margin-top:10px;padding:12px 14px;background:var(--deck-paper-2);font-size:15px;color:var(--deck-ink-2);border-left:3px solid var(--deck-khaki);position:static;max-height:none}.notes p+p{margin-top:.5em}.notes.is-empty,.srcs.is-empty{display:none}.slide{overflow:visible}#bar,#meta,#sect,#nav,.sp-close,.tools,.tools-show{display:none}}@media print{.deck{overflow:visible;background:#fff;color:#000}.deck,.slide,.slide *{color:#000}.deck,.slide{background:#fff}#stage{position:static;width:auto;height:auto;transform:none!important}.slide{position:static;display:grid!important;page-break-after:always;break-after:page;height:100vh;overflow:visible}#bar,#meta,#sect,#nav,.notes,.srcs,.sp-close,.tools,.tools-show{display:none!important}}@media(prefers-reduced-motion:reduce){#bar i,.tools-show{transition:none}}.tools{position:fixed;z-index:6;top:0;left:0;right:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px 24px;min-height:56px;padding:8px 16px;background:var(--deck-paper-2);border-bottom:1px solid var(--deck-rule)}.tools-group{display:flex;align-items:center;gap:8px}.tools-end{margin-left:auto}.tools button,.tools-show{font:14px/1 var(--deck-mono);letter-spacing:.04em;color:var(--deck-ink);background:var(--deck-paper);border:1px solid var(--deck-ink-2);border-radius:0;min-height:40px;padding:0 16px;display:inline-flex;align-items:center;gap:8px;cursor:pointer}.tools kbd,.tools-show kbd{font:inherit;color:var(--deck-empire)}.tools button:hover{border-color:var(--deck-empire)}.tools button:focus-visible,.tools-show:focus-visible,.sp-close:focus-visible{outline:3px solid var(--deck-empire);outline-offset:2px}.tools button[aria-pressed=true]{background:var(--deck-ink);border-color:var(--deck-ink);color:var(--deck-paper)}.tools button[aria-pressed=true] kbd{color:inherit}.tools button:disabled{opacity:.4;cursor:default}.tool-s.unavailable{visibility:hidden}.tools-show{position:fixed;z-index:6;top:8px;left:50%;transform:translate(-50%);min-height:32px;padding:0 8px;background:var(--deck-paper-2);border:1px solid var(--deck-rule);opacity:.55;transition:opacity .15s}.tools-show:hover,.tools-show:focus,.tools-show:focus-visible{opacity:1}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.deck.notes-on .notes.is-empty:after{content:"Brak komentarza do tego slajdu.";opacity:.7}.deck.srcs-on .srcs.is-empty:after{content:"Brak źródeł do tego slajdu.";opacity:.7}@media(max-height:480px){.tools{flex-wrap:nowrap;overflow-x:auto;min-height:40px;padding:4px 16px}.tools-group{flex-wrap:nowrap}.tools button{min-height:32px;padding:0 8px;white-space:nowrap}}',Qe=/^[a-z][a-z0-9-]*$/;function Ye(e){return`${e.special?'':""}${e.body_html}`}function Je(e,t={}){const n=["slide"];for(const r of e.split(/\s+/))Qe.test(r)&&n.push(r);return t.special&&n.push("special"),t.on&&n.push("on"),n.join(" ")}const et=["@import","expression(","url(","javascript:","vbscript:","data:","http:","https:","ftp:","file:"],tt=new Set(["@font-face","@page","@counter-style","@font-palette-values","@property","@color-profile","@font-feature-values"]);function Le(e){return e===" "||e===" "||e===` -`||e==="\r"||e==="\f"}function nt(e){return e?e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F":!1}function J(e){return e?e>="A"&&e<="Z"||e>="a"&&e<="z"||e>="0"&&e<="9"||e==="_"||e==="-"||e.charCodeAt(0)>=128:!1}function B(e,t){return e[t]==="/"&&e[t+1]==="*"}function R(e,t){for(t+=2;t+1e.length)break;n=r;continue}t+=e[n],n++}return t}function rt(e){let t="";for(let n=0;n=e.length)break;const s=e[n+1];if(s===` -`){n++;continue}if(s==="\r"){n++,e[n+1]===` -`&&n++;continue}let a=n+1,m=0;for(;a0){t+=String.fromCodePoint(Number.parseInt(e.slice(n+1,a),16)),Le(e[a])&&(e[a]==="\r"&&e[a+1]===` -`?a+=2:a++),n=a-1;continue}t+=s,n++}return t}function ne(e){const t=rt(ot(e)).toLowerCase();let n="";for(const r of t)r<=" "||r.charCodeAt(0)<32||(n+=r);return n}function V(e){const t=ne(e);if(!t)return!1;for(const n of et)if(t.includes(n))return!0;return t.includes("//")}function Ae(e){let t="",n=0,r=0;for(;re.length)return!0;r=a;continue}const s=e[r];if(t){if(s==="\\"&&r+1="a"&&t[n]<="z"||t[n]>="0"&&t[n]<="9");)n++;return t.slice(0,n)}function oe(e){return tt.has(q(e))}function it(e,t){const n=t;let r="",s=1;for(;te.length)return null;continue}const a=e[t];if(r){if(a==="\\"&&t+1e.length)return null;continue}const a=e[t];if(r){if(a==="\\"&&t+10){s--,t++;continue}if(s===0&&a==="{"){const m=it(e,t+1);return m?{item:{prelude:e.slice(n,t),block:m.block,braced:!0},next:m.end}:null}if(s===0&&a===";")return{item:{prelude:e.slice(n,t),block:"",braced:!1},next:t+1};t++}return null}function re(e){const t=[];let n=0;for(;n=e.length)break;const r=st(e,n);if(!r)break;t.push(r.item),n=r.next}return t}function at(e){const t=[];let n="",r="",s=0,a=0;for(;ae.length){n+=e.slice(a);break}n+=e.slice(a,b),a=b;continue}const m=e[a];if(r){if(n+=m,m==="\\"&&a+10){s--,n+=m,a++;continue}if(m===";"&&s===0){t.push(n),n="",a++;continue}n+=m,a++}return n&&t.push(n),t}function Se(e){const t=[];for(const n of at(e)){const r=n.trim();r&&(Ae(n)||V(n)||t.push(r))}return t.length===0?"":`${t.join("; ")};`}function lt(e){const t=e.prelude.trim();if(!t&&!e.braced||V(t)||q(t)==="@import")return"";if(!e.braced)return V(e.prelude)?"":`${t};`;if(Ae(e.block)&&V(e.block))return"";let n="";return oe(t)?n=Se(e.block):q(t).startsWith("@")?n=$e(e.block):n=Se(e.block),n.trim()?`${t} { ${n.trim()} }`:""}function $e(e){const t=[];for(const n of re(e)){const r=lt(n);r&&t.push(r)}return t.join(` -`)}function Te(e,t){const n=e[t];let r=n;for(t++;te.length){t+=e.slice(n);break}t+=e.slice(n,s),n=s;continue}const r=e[n];if(r==='"'||r==="'"){const s=Te(e,n);t+=s.text,n=s.next;continue}if(r==="["){const s=ct(e,n);t+=s.text,n=s.next;continue}if(e.slice(n,n+5).toLowerCase()===":root"&&!J(e[n+5])){t+=":host",n+=5;continue}if(e.slice(n,n+4).toLowerCase()==="body"&&!J(e[n+4])){const s=n===0?"":e[n-1];if(!J(s)&&s!=="."&&s!=="#"&&s!==":"&&s!=="@"){t+=".deck",n+=4;continue}}t+=r,n++}return t}function ut(e){const t=e.prelude.trim();if(!e.braced)return t?`${t};`:"";const n=q(t);let r=t,s=e.block;return n.startsWith("@")?oe(t)||(s=He(e.block)):r=dt(t),`${r} { ${s.trim()} }`}function He(e){const t=[];for(const n of re(e)){const r=ut(n);r&&t.push(r)}return t.join(` -`)}function pt(e){const t=ne(e);if(!t.startsWith("@media"))return null;const n=t.includes("prefers-color-scheme:dark"),r=t.includes("prefers-color-scheme:light");return n&&!r?"dark":r&&!n?"light":null}function te(e,t){const n=[];for(const r of re(e)){const s=r.prelude.trim(),a=pt(s);if(a){if(a===t&&r.braced){const b=te(r.block,t).trim();b&&n.push(b)}continue}if(!r.braced){s&&n.push(`${s};`);continue}if(q(s).startsWith("@")&&!oe(s)){const b=te(r.block,t).trim();b&&n.push(`${s} { ${b} }`);continue}n.push(`${s} { ${r.block.trim()} }`)}return n.join(` -`)}function ze(e,t){return!e.trim()||t==="auto"?e.trim():te(e,t).trim()}const ft=[":host {","--paper: #141a18; --paper-2: #1c2421; --ink: #e4e4da; --ink-2: #a7ada4;","--rule: #3a443f; --empire: #e0675f; --khaki: #c2ad72;","--deck-paper: #141a18; --deck-paper-2: #1c2421; --deck-ink: #e4e4da; --deck-ink-2: #a7ada4;","--deck-rule: #3a443f; --deck-empire: #e0675f; --deck-khaki: #c2ad72;","color-scheme: dark;","}",".deck { background: var(--paper); color: var(--ink); }","#nav button:focus, #nav button:focus-visible { outline: none; }","#nav button:focus-visible { box-shadow: inset 4px 0 0 var(--empire, var(--deck-empire)); }","#nav button:last-of-type:focus-visible { box-shadow: inset -4px 0 0 var(--empire, var(--deck-empire)); }"].join(" ");function mt(e){if(!e.trim())return"";const t=$e(e).trim();return t?He(t).trim():""}const ht=new Set(["ArrowUp","ArrowDown","PageUp","PageDown"," ","Home","End"]);function ee(e){const t=/^#(\d+)(s)?$/.exec(e);return t?{number:Number(t[1]),special:t[2]==="s"}:{number:null,special:!1}}function kt(e){const t=e.slides,n=t.length,r=e.mode==="speaker";let s=0,a=!1,m=null,b=!1;function H(d){return n===0?0:Math.max(0,Math.min(n-1,d))}function j(d){const c=t.findIndex(k=>k.number===d);return c>=0?c:d>=1&&d<=n?d-1:0}function P(){const d=t[s];d&&e.history.replaceState(e.history.state,"","#"+d.number)}function C(){e.onChange?.()}function p(d){n!==0&&(s=H(d),a=!1,P(),e.onNavigate?.(s),C())}function S(d){a=!!t[s]?.hasSpecial&&d,C()}const K=ee(e.hash??"");K.number!=null&&n>0&&(s=j(K.number),a=K.special&&!!t[s]?.hasSpecial),n>0&&P();function I(){const d=t[s],c=d?.number??0,k=!!d?.hasSpecial,z=a&&k,F=z?`${c} S`:String(c),U=k&&!z?" · S":"",E=d?String(c):"";return{index:s,number:c,total:n,special:z,hasSpecial:k,on:E?[z?`${E}s`:E]:[],metaText:n===0?"":`${F} / ${n}${U}`,metaHTML:n===0?"":`${F} / ${n}${U}`,panel:m,hash:E?`#${c}`:"",toolbarHidden:b,progress:n===0?0:(s+1)/n*100}}function A(d){m=m===d?null:d,C()}function D(d){if(d.ctrlKey||d.metaKey||d.altKey||d.reading)return"ignored";const c=d.key;if(d.targetIsButton&&(c===" "||c==="Enter")||d.targetIsPanel&&ht.has(c)||n===0)return"ignored";if(c==="ArrowRight"||c==="ArrowDown"||c==="PageDown"||c===" ")return p(s+1),"handled";if(c==="ArrowLeft"||c==="ArrowUp"||c==="PageUp")return a?S(!1):p(s-1),"handled";if(c==="Home")return p(0),"handled";if(c==="End")return p(n-1),"handled";if(c==="Escape")return a?(S(!1),"handled"):"ignored";const k=c.length===1?c.toLowerCase():"";return k==="n"?(A("notes"),"handled"):k==="z"?(A("srcs"),"handled"):k==="s"?(S(!a),"handled"):k==="h"?(b=!b,C(),"handled"):k==="f"?"fullscreen":r&&k==="p"?(A("say"),"handled"):r&&k==="t"?"pause":r&&k==="c"?"clock":r&&k==="r"?"reset":"ignored"}return{snapshot:I,applyKey:D,go:p,next:()=>p(s+1),previous:()=>{a?S(!1):p(s-1)},togglePanel:A,toggleSpecial:()=>S(!a),closeSpecial:()=>S(!1),openSpecial:()=>S(!0),toggleToolbar:()=>{b=!b,C()},onScroll:()=>{},swipe:(d,c)=>c||n===0||Math.abs(d)<=50?!1:(p(s+(d<0?1:-1)),!0),followHash:d=>{const c=ee(d);if(c.number==null||n===0)return;const k=j(c.number),z=c.special&&!!t[k]?.hasSpecial;k===s&&z===a||(s=k,a=z,C())},showId:d=>{const c=ee("#"+d);if(c.number==null||n===0)return;const k=j(c.number),z=c.special&&!!t[k]?.hasSpecial;k===s&&z===a||(s=k,a=z,P(),C())}}}function gt(e,t){return e.applyKey(t)}const je="(max-width: 900px) and (orientation: portrait)";function bt(e){return e(je).matches}function Ee(e,t,n){if(e==="reading")return t;for(const r of n)if(r.bottom>0)return r.id;return t}function vt(e){return e.complete?Promise.resolve():new Promise(t=>{const n=()=>t();e.addEventListener("load",n,{once:!0}),e.addEventListener("error",n,{once:!0})})}async function Ce(e,t){t.scrollTo(e),await Promise.all(t.imagesBefore(e).map(vt)),t.scrollTo(e)}const xt=["data-theme","aria-busy"],yt={key:0,class:"tools",role:"group","aria-label":"Sterowanie prezentacją"},wt={class:"tools-group"},St=["aria-pressed"],zt=["aria-pressed"],Et=["aria-pressed"],Ct={class:"tools-group tools-end"},Lt=["aria-pressed"],At={id:"stage"},$t={key:1,class:"slide sec on","aria-busy":"true"},Tt={key:2,class:"slide sec on"},Ht={key:3,class:"slide sec on"},jt={key:4,class:"slide sec on"},Pt=["id","innerHTML"],Kt={key:2,id:"bar"},Dt=["innerHTML"],Mt={key:4,id:"sect"},It={key:5,id:"nav"},Nt={key:6,class:"sr-only","aria-live":"polite"},Rt=Fe({__name:"DeckViewer",props:{phase:{},deck:{},error:{},mode:{},compose:{type:Function},labels:{},announce:{type:Function},extraCss:{},images:{}},emits:["retry","position","navigate","clock"],setup(e,{emit:t}){const n=e,r=t,s=T(null),a=T(null),m=T(null),b=T(0),H=T(""),j=T(!1),P=T(!1),C=T(!0);let p=null,S=null,K=null,I=null,A=null,D=null,d=[],c="";const k={"--paper":"#141a18","--paper-2":"#1c2421","--ink":"#e4e4da","--ink-2":"#a7ada4","--rule":"#3a443f","--empire":"#e0675f","--khaki":"#c2ad72","--deck-paper":"#141a18","--deck-paper-2":"#1c2421","--deck-ink":"#e4e4da","--deck-ink-2":"#a7ada4","--deck-rule":"#3a443f","--deck-empire":"#e0675f","--deck-khaki":"#c2ad72"},z=new Set(["ArrowUp","ArrowDown","PageUp","PageDown"," ","Home","End"]);function F(o){return{body_html:o.body_html,sources_html:o.sources_html,comment_html:"comment_html"in o?o.comment_html:"",say_html:"say_html"in o?o.say_html:"",notes_html:"notes_html"in o?o.notes_html:""}}function U(o,i){const l=F(o);return n.compose?n.compose(l,i):Ye({body_html:l.body_html,comment_html:l.comment_html??"",sources_html:l.sources_html,special:i})}function E(){return bt(o=>window.matchMedia(o))}O(()=>[n.phase,n.deck],()=>{if(c="",d=[],n.phase!=="ready"||!n.deck||n.deck.slides.length===0){p=null,b.value++;return}p=kt({slides:n.deck.slides.map(o=>({number:o.number,hasSpecial:o.special!=null})),history:window.history,hash:window.location.hash,mode:n.mode==="speaker"?"speaker":"public",onChange:()=>{b.value++},onNavigate:o=>{r("navigate",o)}}),r("position",p.snapshot().index),b.value++},{immediate:!0});const g=Y(()=>(b.value,p?.snapshot()??null)),ie=Y(()=>{const o=n.deck?.slides??[],i=new Set(g.value?.on??[]),l=[];for(const u of o){const f=String(u.number);if(l.push({id:f,slide:u,special:!1,on:i.has(f)}),u.special){const y=`${u.number}s`;l.push({id:y,slide:u.special,special:!0,on:i.has(y)})}}return l}),Pe=Y(()=>{const o=g.value,i=n.deck?.slides;if(!o||!i)return"";const l=i[o.index];return l?o.special&&l.special?l.special.section_label:l.section_label:""});function Ke(){const o=n.extraCss,i=Array.isArray(o)?o:o?[o]:[],l=[];for(const u of i){if(!u)continue;const f=ze(mt(u),"dark");f&&l.push(f)}return l}function se(o){const i=[ze(Ge,"dark"),...Ke(),ft].filter(l=>!!l);try{o.adoptedStyleSheets=i.map(l=>{const u=new CSSStyleSheet;return u.replaceSync(l),u})}catch{o.querySelectorAll("style[data-deck-style]").forEach(l=>l.remove());for(const l of i){const u=document.createElement("style");u.dataset.deckStyle="1",u.textContent=l,o.appendChild(u)}}}function ae(){const o=s.value;if(o){for(const[i,l]of Object.entries(k))o.style.setProperty(i,l);o.style.colorScheme="dark",o.dataset.theme="dark",document.documentElement.dataset.theme="dark",document.documentElement.style.colorScheme="dark"}}function L(){const o=a.value?.getElementById("stage"),i=s.value;if(!o||!i)return;const l=a.value?.getElementById("nav");if(E()){o.style.transform="",l&&(l.style.top="");return}const u=a.value?.querySelector(".tools"),f=u instanceof HTMLElement?u.getBoundingClientRect().height:0,y=Math.max(0,window.innerHeight-f),$=Math.min(window.innerWidth/1280,y/720),qe=f/2;o.style.transform=`translate(${-640*$}px, ${-360*$+qe}px) scale(${$})`,l&&(l.style.top=`${f}px`)}function W(){I?.disconnect();const o=a.value?.querySelector(".tools");o&&I?.observe(o)}function De(){const o=a.value;if(!o)return;const i=n.images;o.querySelectorAll("img[data-deck-image]").forEach(l=>{if(!(l instanceof HTMLImageElement))return;const u=l.getAttribute("data-deck-image")??"",f=u&&i?i[u]:void 0;if(!f){l.removeAttribute("src");return}l.getAttribute("src")!==f&&l.setAttribute("src",f)})}function le(){const o=a.value,i=m.value;if(!o||!i)return;const l=p?.snapshot().panel??null;if(i.classList.toggle("speaker",n.mode==="speaker"),i.classList.toggle("notes-on",l==="notes"),i.classList.toggle("srcs-on",l==="srcs"),i.classList.toggle("speak-on",l==="say"),o.querySelectorAll("aside.notes, aside.srcs, aside.speak").forEach(f=>{const y=(f.textContent??"").replace(/\u00a0/g," ").trim()==="";f.classList.toggle("is-empty",y),f.removeAttribute("tabindex"),f.removeAttribute("role"),f.removeAttribute("aria-label")}),l){const f=l==="notes"?"notes":l==="srcs"?"srcs":"speak",y=l==="notes"?n.labels?.notes??"Komentarz":l==="srcs"?n.labels?.sources??"Źródła":n.labels?.say??"",$=o.querySelector(`.slide.on aside.${f}`);$&&($.setAttribute("tabindex","0"),$.setAttribute("role","region"),$.setAttribute("aria-label",y))}const u=n.labels?.specialLink??"Slajd dodatkowy (S)";o.querySelectorAll(".sp-link").forEach(f=>{f.setAttribute("title",u)})}function ce(){return a.value?.activeElement??document.activeElement}function Me(){const i=ce()?.closest?.(".notes, .srcs, .speak");return i instanceof HTMLElement?i:null}function Ie(o,i){const u=o.clientHeight;i==="ArrowDown"?o.scrollTop+=40:i==="ArrowUp"?o.scrollTop-=40:i==="PageDown"||i===" "?o.scrollTop+=u:i==="PageUp"?o.scrollTop-=u:i==="Home"?o.scrollTop=0:i==="End"&&(o.scrollTop=o.scrollHeight)}function Z(){document.fullscreenEnabled&&(document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()?.catch(()=>{}))}function de(o){if(!p||n.phase!=="ready")return;const l=!!ce()?.closest("button"),u=Me(),f=gt(p,{key:o.key,ctrlKey:o.ctrlKey,metaKey:o.metaKey,altKey:o.altKey,targetIsButton:l,targetIsPanel:!!u,reading:E()});if(f==="fullscreen"){o.preventDefault(),Z();return}if(f==="pause"||f==="clock"||f==="reset"){o.preventDefault(),r("clock",f);return}if(f==="ignored"){if(l&&(o.key===" "||o.key==="Enter"))return;u&&z.has(o.key)&&!o.ctrlKey&&!o.metaKey&&!o.altKey&&!E()&&(o.preventDefault(),Ie(u,o.key));return}o.preventDefault()}function ue(){p&&window.location.hash!==p.snapshot().hash&&p.followHash(window.location.hash)}function pe(){P.value=document.fullscreenElement!=null,L()}function Ne(o){if(!(o instanceof MouseEvent)||!p||E())return;const i=o.target instanceof Element?o.target:null;if(o.detail>0){const u=i?.closest("#nav button");u instanceof HTMLElement&&u.blur()}if(i?.closest(".tools, .tools-show, #speaker-clock"))return;const l=a.value;if(l){for(const u of l.elementsFromPoint(o.clientX,o.clientY))if(u instanceof Element){if(u.classList.contains("sp-link")){o.preventDefault(),o.stopPropagation(),p.openSpecial();return}if(u.classList.contains("sp-close")){o.preventDefault(),o.stopPropagation(),p.closeSpecial();return}}}}function fe(o){S=o.touches[0]?.clientX??null}function me(o){if(S==null||!p)return;const i=S;S=null;const l=o.changedTouches[0]?.clientX;l!=null&&p.swipe(l-i,E())}function X(o){p?.togglePanel(o)}function he(){p?.toggleSpecial()}function G(){p?.toggleToolbar()}function Be(){p?.previous()}function Re(){p?.next()}function ke(){const o=a.value;return o?[...o.querySelectorAll("section.slide")].flatMap(i=>!(i instanceof HTMLElement)||!i.id?[]:[{id:i.id,bottom:i.getBoundingClientRect().bottom}]):[]}function M(){if(!E())return;const o=ke();o.length&&(d=o)}const ge={scrollTo(o){a.value?.getElementById(o)?.scrollIntoView({block:"start"})},imagesBefore(o){const i=a.value;if(!i)return[];const l=[...i.querySelectorAll("section.slide")],u=l.findIndex(y=>y.id===o);if(u<=0)return[];const f=[];for(let y=0;yM()))}function ve(){if(!p||n.phase!=="ready"||!D)return;const o=p.snapshot().on[0]??"";if(!o)return;if(D.matches){const l=Ee("reading",o,d);c="",Q(()=>{M(),c=l,Ce(l,ge).then(()=>M())});return}const i=Ee("slide",o,d.length?d:ke());c="",p.showId(i),L()}return Ue(()=>{const o=s.value;if(!o)return;j.value=document.fullscreenEnabled;const i=o.attachShadow({mode:"open"});a.value=i,ae(),se(i);const l=document.createElement("div");l.className="deck",i.appendChild(l),m.value=l,i.addEventListener("click",Ne,!0),window.addEventListener("hashchange",ue),window.addEventListener("keydown",de),window.addEventListener("resize",L),window.addEventListener("scroll",M,!0),window.addEventListener("touchstart",fe,{passive:!0}),window.addEventListener("touchend",me,{passive:!0}),document.addEventListener("fullscreenchange",pe),D=window.matchMedia(je),D.addEventListener("change",ve),K=new ResizeObserver(()=>L()),K.observe(o),I=new ResizeObserver(()=>L()),A=new MutationObserver(()=>{W(),L()}),A.observe(l,{childList:!0,subtree:!0}),Q(()=>{le(),W(),L(),M(),be()})}),Oe(()=>{window.removeEventListener("hashchange",ue),window.removeEventListener("keydown",de),window.removeEventListener("resize",L),window.removeEventListener("scroll",M,!0),window.removeEventListener("touchstart",fe),window.removeEventListener("touchend",me),document.removeEventListener("fullscreenchange",pe),D?.removeEventListener("change",ve),K?.disconnect(),I?.disconnect(),A?.disconnect();const o=document.documentElement;delete o.dataset.theme,o.style.removeProperty("color-scheme")}),O(()=>n.extraCss,()=>{ae(),a.value&&se(a.value)}),O(g,(o,i)=>{if(!o){H.value="";return}if(!i||o.number!==i.number||o.special!==i.special){if(n.announce){H.value=n.announce({number:o.number,total:o.total,special:o.special});return}o.special&&!i?.special?H.value=`Slajd dodatkowy do slajdu ${o.number}`:H.value=`Slajd ${o.number} z ${o.total}`}},{immediate:!0}),O([()=>n.phase,ie,g,()=>n.images],()=>{Q(()=>{le(),De(),W(),L();const o=p?.snapshot().on[0]??"";o&&o!==c?be():M()})}),(o,i)=>(v(),x("div",{ref_key:"host",ref:s,class:"deck-host","data-theme":C.value?"dark":void 0,"aria-busy":e.phase==="loading"?"true":void 0},[m.value?(v(),_e(Ve,{key:0,to:m.value},[e.phase==="ready"&&g.value&&e.mode==="speaker"?xe(o.$slots,"tools",{panel:g.value.panel,special:g.value.special,hasSpecial:g.value.hasSpecial,fullscreenEnabled:j.value,fullscreenOn:P.value,toolbarHidden:g.value.toolbarHidden,togglePanel:X,toggleSpecial:he,toggleToolbar:G,toggleFullscreen:Z},void 0,void 0,0):w("",!0),e.phase==="ready"&&g.value&&e.mode!=="speaker"?(v(),x(ye,{key:1},[g.value.toolbarHidden?w("",!0):(v(),x("div",yt,[h("div",wt,[h("button",{type:"button","aria-pressed":g.value.panel==="notes","aria-keyshortcuts":"N",onClick:i[0]||(i[0]=l=>X("notes"))},[...i[3]||(i[3]=[N(" Komentarz ",-1),h("kbd",null,"N",-1)])],8,St),h("button",{type:"button","aria-pressed":g.value.panel==="srcs","aria-keyshortcuts":"Z",onClick:i[1]||(i[1]=l=>X("srcs"))},[...i[4]||(i[4]=[N(" Źródła ",-1),h("kbd",null,"Z",-1)])],8,zt),h("button",{type:"button",class:we(["tool-s",{unavailable:!g.value.hasSpecial}]),"aria-pressed":g.value.special,"aria-keyshortcuts":"S",onClick:he},[...i[5]||(i[5]=[N(" Slajd dodatkowy ",-1),h("kbd",null,"S",-1)])],10,Et)]),h("div",Ct,[j.value?(v(),x("button",{key:0,type:"button","aria-pressed":P.value,"aria-keyshortcuts":"F",onClick:Z},[...i[6]||(i[6]=[N(" Pełny ekran ",-1),h("kbd",null,"F",-1)])],8,Lt)):w("",!0),h("button",{type:"button","aria-keyshortcuts":"H",onClick:G},[...i[7]||(i[7]=[N(" Ukryj pasek ",-1),h("kbd",null,"H",-1)])])])])),g.value.toolbarHidden?(v(),x("button",{key:1,type:"button",class:"tools-show","aria-keyshortcuts":"H",onClick:G},[...i[8]||(i[8]=[N(" Pokaż pasek ",-1),h("kbd",null,"H",-1)])])):w("",!0)],64)):w("",!0),h("div",At,[e.mode==="speaker"&&e.phase==="ready"?xe(o.$slots,"reading-close",{},void 0,void 0,0):w("",!0),e.phase==="loading"?(v(),x("section",$t,[...i[9]||(i[9]=[h("div",null,[h("p",{class:"k"},"Wczytywanie prezentacji…")],-1)])])):e.phase==="notfound"?(v(),x("section",Tt,[...i[10]||(i[10]=[h("div",null,[h("p",{class:"k"},"404"),h("h2",null,"Nie ma takiej prezentacji"),h("p",null,"Link jest nieaktualny albo prezentacja nie jest już udostępniona.")],-1)])])):e.phase==="error"?(v(),x("section",Ht,[h("div",null,[i[11]||(i[11]=h("p",{class:"k"},"Błąd",-1)),i[12]||(i[12]=h("h2",null,"Nie udało się wczytać prezentacji",-1)),h("p",null,_(e.error),1),h("button",{type:"button",class:"status-retry",onClick:i[2]||(i[2]=l=>r("retry"))},"Spróbuj ponownie")])])):e.phase==="empty"?(v(),x("section",jt,[h("div",null,[h("h2",null,_(e.deck?.title),1),i[13]||(i[13]=h("p",null,"Ta prezentacja nie ma jeszcze slajdów.",-1))])])):e.phase==="ready"?(v(!0),x(ye,{key:5},We(ie.value,l=>(v(),x("section",{id:l.id,key:l.id,class:we(Xe(Je)(l.slide.css_class,{special:l.special,on:l.on})),innerHTML:U(l.slide,l.special)},null,10,Pt))),128)):w("",!0)]),e.phase==="ready"&&g.value?(v(),x("div",Kt,[h("i",{style:Ze({width:g.value.progress+"%"})},null,4)])):w("",!0),e.phase==="ready"&&g.value?(v(),x("div",{key:3,id:"meta",innerHTML:g.value.metaHTML},null,8,Dt)):w("",!0),e.phase==="ready"&&g.value?(v(),x("div",Mt,_(Pe.value),1)):w("",!0),e.phase==="ready"?(v(),x("div",It,[h("button",{type:"button","aria-label":"Poprzedni slajd",onClick:Be}),i[14]||(i[14]=h("div",{class:"mid"},null,-1)),h("button",{type:"button","aria-label":"Następny slajd",onClick:Re})])):w("",!0),e.phase==="ready"?(v(),x("div",Nt,_(H.value),1)):w("",!0)],8,["to"])):w("",!0)],8,xt))}});export{Rt as _}; diff --git a/public/assets/DeckViewer.vue_vue_type_style_index_0_lang-TWCMyUu3.js b/public/assets/DeckViewer.vue_vue_type_style_index_0_lang-TWCMyUu3.js new file mode 100644 index 0000000..497def2 --- /dev/null +++ b/public/assets/DeckViewer.vue_vue_type_style_index_0_lang-TWCMyUu3.js @@ -0,0 +1,8 @@ +import{d as We,A as F,q as Ze,K as Y,S as Xe,c as x,B as Ge,V as Qe,R as we,e as w,F as Se,a as h,m as I,x as ze,t as V,y as Ye,z as Je,r as j,s as J,o as v,b as et}from"./index-CvyVvvnt.js";const tt=':host{color-scheme:light dark;--deck-paper: #e9ebe3;--deck-paper-2: #dfe2d8;--deck-ink: #16201f;--deck-ink-2: #4b5551;--deck-rule: #b9beb3;--deck-empire: #b5302c;--deck-khaki: #7f7047;--deck-display: "Libre Caslon Display", "Times New Roman", Georgia, serif;--deck-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;--deck-mono: "Courier Prime", "Courier New", Courier, monospace}@media(prefers-color-scheme:dark){:host:not([data-theme=light]){--deck-paper: #141a18;--deck-paper-2: #1c2421;--deck-ink: #e4e4da;--deck-ink-2: #a7ada4;--deck-rule: #3a443f;--deck-empire: #e0675f;--deck-khaki: #c2ad72;color-scheme:dark}}:host[data-theme=dark]{--deck-paper: #141a18;--deck-paper-2: #1c2421;--deck-ink: #e4e4da;--deck-ink-2: #a7ada4;--deck-rule: #3a443f;--deck-empire: #e0675f;--deck-khaki: #c2ad72;color-scheme:dark}*{box-sizing:border-box}:host,.deck{height:100%;margin:0}.deck{position:relative;background:var(--deck-paper);color:var(--deck-ink);font-family:var(--deck-body);font-size:24px;line-height:1.4;overflow:hidden}h1,h2,h3{font-family:var(--deck-display);font-weight:400;margin:0;text-wrap:balance;line-height:1.08}p{margin:0}ul{margin:0;padding-left:1.1em}li{margin-block:.25em}li::marker{color:var(--deck-empire)}em{font-style:italic}strong{font-weight:600}a{color:inherit}.k{font-family:var(--deck-mono);font-size:.72em;letter-spacing:.08em;text-transform:uppercase;color:var(--deck-khaki)}.red{color:var(--deck-empire)}.muted{color:var(--deck-ink-2)}.small{font-size:.78em;line-height:1.35}.bib{font-size:17px;line-height:1.3;gap:36px}.bib li{margin-block:.2em}.bib .k{font-size:13px;margin-bottom:6px}#stage{position:absolute;left:50%;top:50%;width:1280px;height:720px;transform-origin:0 0}.slide{position:absolute;inset:0;display:none;padding:64px 88px 72px;background:var(--deck-paper);grid-template-rows:auto 1fr;gap:28px;overflow:hidden}[hidden]{display:none!important}.slide.on{display:grid}.slide.special{border-top:6px solid var(--deck-khaki)}.sp-close{position:absolute;top:18px;right:22px;width:44px;height:44px;border:1px solid var(--deck-rule);background:transparent;color:var(--deck-ink-2);font-size:28px;line-height:1;cursor:pointer}.sp-link{border-bottom:2px dotted var(--deck-empire);cursor:pointer}.slide>header{display:grid;gap:10px}.slide>header h2{font-size:50px}.slide .body{min-height:0;display:grid;gap:22px;align-content:start}.cols{display:grid;grid-template-columns:1fr 1fr;gap:44px;align-items:start}.cols>*{min-width:0}.cols.w{grid-template-columns:1.3fr 1fr}.rule-top{border-top:1px solid var(--deck-rule);padding-top:16px}.note{font-size:20px;color:var(--deck-ink-2);border-left:3px solid var(--deck-empire);padding-left:14px}.quote{font-family:var(--deck-display);font-size:34px;line-height:1.25}.quote+.k{margin-top:6px}.slide.sec{grid-template-rows:1fr;align-content:center;background:var(--deck-paper-2)}.slide.sec .k{font-size:20px}.slide.sec h2{font-size:72px;max-width:18ch;margin-top:12px}.slide.sec p{font-size:26px;color:var(--deck-ink-2);max-width:44ch;margin-top:22px}.slide.title{grid-template-rows:1fr auto;background:var(--deck-paper-2)}.slide.title h1{font-size:86px;max-width:14ch}.slide.title .sub{font-size:30px;color:var(--deck-ink-2);margin-top:20px;font-family:var(--deck-display)}.slide.title footer{display:flex;justify-content:space-between;align-items:end;border-top:1px solid var(--deck-rule);padding-top:18px;font-size:20px}.tl{display:grid;grid-template-columns:max-content 1fr;column-gap:26px;row-gap:8px;font-size:22px;align-content:start}.tl .y{font-family:var(--deck-mono);color:var(--deck-empire);font-variant-numeric:tabular-nums}.tl.compact{font-size:20px;row-gap:6px}table{border-collapse:collapse;width:100%;font-size:21px}th,td{text-align:left;vertical-align:top;padding:8px 12px 8px 0;border-bottom:1px solid var(--deck-rule)}th{font-family:var(--deck-mono);font-weight:400;font-size:16px;letter-spacing:.08em;text-transform:uppercase;color:var(--deck-khaki)}.people{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.p{border-top:2px solid var(--deck-empire);padding-top:10px;font-size:20px;line-height:1.35;min-width:0}.p b{display:block;font-family:var(--deck-display);font-weight:400;font-size:26px;margin-bottom:4px}.theses{display:grid;gap:18px;counter-reset:t}.theses>div{display:grid;grid-template-columns:56px 1fr;gap:14px;align-items:start}.theses>div:before{counter-increment:t;content:counter(t);font-family:var(--deck-display);font-size:48px;line-height:1;color:var(--deck-empire)}.theses b{font-weight:600}.body.v2{grid-template-rows:1fr;align-content:stretch;gap:20px}.body.v2>:first-child{align-self:start}.body.v2>.people+.cols{align-self:start}.pts{font-size:28px;line-height:1.3}.pts li{margin-block:.4em}.tl.big{font-size:26px;row-gap:10px}table.big{font-size:24px}.sum{font-family:var(--deck-display);font-size:30px;line-height:1.25;border-top:2px solid var(--deck-empire);padding-top:14px;align-self:end;text-wrap:balance}.body.v2 .p{font-size:22px}.body.v2 .theses{font-size:30px;gap:26px}.body.v2 .theses>div{align-items:center}.notes .full{opacity:.9}@media(max-width:900px)and (orientation:portrait){.pts{font-size:17px}.tl.big{font-size:16px}table.big{font-size:15px}.sum{font-size:20px}.body.v2 .p{font-size:16px}}#bar{position:fixed;left:0;right:0;bottom:0;height:4px;background:var(--deck-rule)}#bar i{display:block;height:100%;width:0;background:var(--deck-empire);transition:width .25s}#meta{position:fixed;right:20px;bottom:12px;font-family:var(--deck-mono);font-size:14px;color:var(--deck-ink-2);letter-spacing:.06em}#meta b{font-weight:400;color:var(--deck-ink)}#sect{position:fixed;left:20px;bottom:12px;font-family:var(--deck-mono);font-size:14px;color:var(--deck-ink-2);letter-spacing:.08em;text-transform:uppercase}.notes,.srcs{display:none}.deck.notes-on .notes,.deck.srcs-on .srcs{display:block;position:absolute;left:0;right:0;bottom:0;max-height:46%;overflow:auto;background:var(--deck-ink);color:var(--deck-paper);padding:18px 88px;font-size:19px;line-height:1.45}.notes:before,.srcs:before{display:block;font-family:var(--deck-mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;margin-bottom:6px;opacity:.7}.notes:before{content:"Komentarz · N"}.srcs:before{content:"Źródła · Z"}.srcs ul{margin:0;padding-left:1.1em}.srcs li+li{margin-top:.35em}.deck.notes-on .notes p+p{margin-top:.5em}.deck.notes-on #nav,.deck.srcs-on #nav{bottom:50%}#nav{position:fixed;inset:0;display:grid;grid-template-columns:1fr 2fr 1fr;overflow:hidden}#nav button{background:transparent;border:0;cursor:pointer;opacity:0;font-size:0;outline:none}#nav button:focus,#nav button:focus-visible{outline:none}#nav button:focus-visible{opacity:1;box-shadow:inset 4px 0 0 var(--deck-empire)}#nav button:last-of-type:focus-visible{box-shadow:inset -4px 0 0 var(--deck-empire)}#nav .mid{pointer-events:none}.status-retry{margin-top:28px;font:16px var(--deck-mono);letter-spacing:.04em;color:var(--deck-ink);background:var(--deck-paper);border:1px solid var(--deck-rule);min-height:44px;padding:8px 16px;cursor:pointer}.status-retry:focus-visible{outline:3px solid var(--deck-empire)}@media(max-width:900px)and (orientation:portrait){.deck{overflow:auto;font-size:17px}#stage{position:static;width:auto;height:auto;transform:none!important;padding:0 16px;padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}.slide{position:static;display:grid!important;padding:28px 0;border-bottom:1px solid var(--deck-rule);gap:16px}.slide>header h2{font-size:30px}.slide.sec h2{font-size:36px}.slide.sec p{font-size:18px}.slide.title h1{font-size:40px}.slide.title .sub{font-size:20px}.slide.title footer{flex-direction:column;align-items:start;gap:6px;font-size:15px}.cols,.cols.w{grid-template-columns:1fr;gap:16px}.people{grid-template-columns:1fr}.tl,.tl.compact{font-size:16px}table{font-size:15px}.quote{font-size:22px}.note,.p{font-size:16px}.p b{font-size:20px}.theses>div{grid-template-columns:36px 1fr}.theses>div:before{font-size:30px}.notes,.srcs{display:block;margin-top:10px;padding:12px 14px;background:var(--deck-paper-2);font-size:15px;color:var(--deck-ink-2);border-left:3px solid var(--deck-khaki);position:static;max-height:none}.notes p+p{margin-top:.5em}.notes.is-empty,.srcs.is-empty{display:none}.slide{overflow:visible}#bar,#meta,#sect,#nav,.sp-close,.tools,.tools-show{display:none}}@media print{.deck{overflow:visible;background:#fff;color:#000}.deck,.slide,.slide *{color:#000}.deck,.slide{background:#fff}#stage{position:static;width:auto;height:auto;transform:none!important}.slide{position:static;display:grid!important;page-break-after:always;break-after:page;height:100vh;overflow:visible}#bar,#meta,#sect,#nav,.notes,.srcs,.sp-close,.tools,.tools-show{display:none!important}}@media(prefers-reduced-motion:reduce){#bar i,.tools-show{transition:none}}.tools{position:fixed;z-index:6;top:0;left:0;right:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px 24px;min-height:56px;padding:8px 16px;background:var(--deck-paper-2);border-bottom:1px solid var(--deck-rule)}.tools-group{display:flex;align-items:center;gap:8px}.tools-end{margin-left:auto}.tools button,.tools-show{font:14px/1 var(--deck-mono);letter-spacing:.04em;color:var(--deck-ink);background:var(--deck-paper);border:1px solid var(--deck-ink-2);border-radius:0;min-height:40px;padding:0 16px;display:inline-flex;align-items:center;gap:8px;cursor:pointer}.tools kbd,.tools-show kbd{font:inherit;color:var(--deck-empire)}.tools button:hover{border-color:var(--deck-empire)}.tools button:focus-visible,.tools-show:focus-visible,.sp-close:focus-visible{outline:3px solid var(--deck-empire);outline-offset:2px}.tools button[aria-pressed=true]{background:var(--deck-ink);border-color:var(--deck-ink);color:var(--deck-paper)}.tools button[aria-pressed=true] kbd{color:inherit}.tools button:disabled{opacity:.4;cursor:default}.tool-s.unavailable{visibility:hidden}.tools-show{position:fixed;z-index:6;top:8px;left:50%;transform:translate(-50%);min-height:32px;padding:0 8px;background:var(--deck-paper-2);border:1px solid var(--deck-rule);opacity:.55;transition:opacity .15s}.tools-show:hover,.tools-show:focus,.tools-show:focus-visible{opacity:1}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.deck.notes-on .notes.is-empty:after{content:"Brak komentarza do tego slajdu.";opacity:.7}.deck.srcs-on .srcs.is-empty:after{content:"Brak źródeł do tego slajdu.";opacity:.7}@media(max-height:480px){.tools{flex-wrap:nowrap;overflow-x:auto;min-height:40px;padding:4px 16px}.tools-group{flex-wrap:nowrap}.tools button{min-height:32px;padding:0 8px;white-space:nowrap}}',nt=/^[a-z][a-z0-9-]*$/;function ot(e){return`${e.special?'':""}${e.body_html}`}function rt(e,t={}){const n=["slide"];for(const r of e.split(/\s+/))nt.test(r)&&n.push(r);return t.special&&n.push("special"),t.on&&n.push("on"),n.join(" ")}const it=["@import","expression(","url(","javascript:","vbscript:","data:","http:","https:","ftp:","file:"],st=new Set(["@font-face","@page","@counter-style","@font-palette-values","@property","@color-profile","@font-feature-values"]);function $e(e){return e===" "||e===" "||e===` +`||e==="\r"||e==="\f"}function at(e){return e?e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F":!1}function ee(e){return e?e>="A"&&e<="Z"||e>="a"&&e<="z"||e>="0"&&e<="9"||e==="_"||e==="-"||e.charCodeAt(0)>=128:!1}function N(e,t){return e[t]==="/"&&e[t+1]==="*"}function B(e,t){for(t+=2;t+1e.length)break;n=r;continue}t+=e[n],n++}return t}function ct(e){let t="";for(let n=0;n=e.length)break;const s=e[n+1];if(s===` +`){n++;continue}if(s==="\r"){n++,e[n+1]===` +`&&n++;continue}let l=n+1,c=0;for(;l0){t+=String.fromCodePoint(Number.parseInt(e.slice(n+1,l),16)),$e(e[l])&&(e[l]==="\r"&&e[l+1]===` +`?l+=2:l++),n=l-1;continue}t+=s,n++}return t}function oe(e){const t=ct(lt(e)).toLowerCase();let n="";for(const r of t)r<=" "||r.charCodeAt(0)<32||(n+=r);return n}function W(e){const t=oe(e);if(!t)return!1;for(const n of it)if(t.includes(n))return!0;return t.includes("//")}function He(e){let t="",n=0,r=0;for(;re.length)return!0;r=l;continue}const s=e[r];if(t){if(s==="\\"&&r+1="a"&&t[n]<="z"||t[n]>="0"&&t[n]<="9");)n++;return t.slice(0,n)}function re(e){return st.has(U(e))}function dt(e,t){const n=t;let r="",s=1;for(;te.length)return null;continue}const l=e[t];if(r){if(l==="\\"&&t+1e.length)return null;continue}const l=e[t];if(r){if(l==="\\"&&t+10){s--,t++;continue}if(s===0&&l==="{"){const c=dt(e,t+1);return c?{item:{prelude:e.slice(n,t),block:c.block,braced:!0},next:c.end}:null}if(s===0&&l===";")return{item:{prelude:e.slice(n,t),block:"",braced:!1},next:t+1};t++}return null}function ie(e){const t=[];let n=0;for(;n=e.length)break;const r=ut(e,n);if(!r)break;t.push(r.item),n=r.next}return t}function pt(e){const t=[];let n="",r="",s=0,l=0;for(;le.length){n+=e.slice(l);break}n+=e.slice(l,b),l=b;continue}const c=e[l];if(r){if(n+=c,c==="\\"&&l+10){s--,n+=c,l++;continue}if(c===";"&&s===0){t.push(n),n="",l++;continue}n+=c,l++}return n&&t.push(n),t}function Ee(e){const t=[];for(const n of pt(e)){const r=n.trim();r&&(He(n)||W(n)||t.push(r))}return t.length===0?"":`${t.join("; ")};`}function ft(e){const t=e.prelude.trim();if(!t&&!e.braced||W(t)||U(t)==="@import")return"";if(!e.braced)return W(e.prelude)?"":`${t};`;if(He(e.block)&&W(e.block))return"";let n="";return re(t)?n=Ee(e.block):U(t).startsWith("@")?n=je(e.block):n=Ee(e.block),n.trim()?`${t} { ${n.trim()} }`:""}function je(e){const t=[];for(const n of ie(e)){const r=ft(n);r&&t.push(r)}return t.join(` +`)}function Pe(e,t){const n=e[t];let r=n;for(t++;te.length){t+=e.slice(n);break}t+=e.slice(n,s),n=s;continue}const r=e[n];if(r==='"'||r==="'"){const s=Pe(e,n);t+=s.text,n=s.next;continue}if(r==="["){const s=mt(e,n);t+=s.text,n=s.next;continue}if(e.slice(n,n+5).toLowerCase()===":root"&&!ee(e[n+5])){t+=":host",n+=5;continue}if(e.slice(n,n+4).toLowerCase()==="body"&&!ee(e[n+4])){const s=n===0?"":e[n-1];if(!ee(s)&&s!=="."&&s!=="#"&&s!==":"&&s!=="@"){t+=".deck",n+=4;continue}}t+=r,n++}return t}function kt(e){const t=e.prelude.trim();if(!e.braced)return t?`${t};`:"";const n=U(t);let r=t,s=e.block;return n.startsWith("@")?re(t)||(s=Ke(e.block)):r=ht(t),`${r} { ${s.trim()} }`}function Ke(e){const t=[];for(const n of ie(e)){const r=kt(n);r&&t.push(r)}return t.join(` +`)}function gt(e){const t=oe(e);if(!t.startsWith("@media"))return null;const n=t.includes("prefers-color-scheme:dark"),r=t.includes("prefers-color-scheme:light");return n&&!r?"dark":r&&!n?"light":null}function ne(e,t){const n=[];for(const r of ie(e)){const s=r.prelude.trim(),l=gt(s);if(l){if(l===t&&r.braced){const b=ne(r.block,t).trim();b&&n.push(b)}continue}if(!r.braced){s&&n.push(`${s};`);continue}if(U(s).startsWith("@")&&!re(s)){const b=ne(r.block,t).trim();b&&n.push(`${s} { ${b} }`);continue}n.push(`${s} { ${r.block.trim()} }`)}return n.join(` +`)}function Ce(e,t){return!e.trim()||t==="auto"?e.trim():ne(e,t).trim()}const bt=[":host {","--paper: #141a18; --paper-2: #1c2421; --ink: #e4e4da; --ink-2: #a7ada4;","--rule: #3a443f; --empire: #e0675f; --khaki: #c2ad72;","--deck-paper: #141a18; --deck-paper-2: #1c2421; --deck-ink: #e4e4da; --deck-ink-2: #a7ada4;","--deck-rule: #3a443f; --deck-empire: #e0675f; --deck-khaki: #c2ad72;","color-scheme: dark;","}",".deck { background: var(--paper); color: var(--ink); }","#nav button:focus, #nav button:focus-visible { outline: none; }","#nav button:focus-visible { box-shadow: inset 4px 0 0 var(--empire, var(--deck-empire)); }","#nav button:last-of-type:focus-visible { box-shadow: inset -4px 0 0 var(--empire, var(--deck-empire)); }"].join(" ");function vt(e){if(!e.trim())return"";const t=je(e).trim();return t?Ke(t).trim():""}const xt=new Set(["ArrowUp","ArrowDown","PageUp","PageDown"," ","Home","End"]);function te(e){const t=/^#(\d+)(s)?$/.exec(e);return t?{number:Number(t[1]),special:t[2]==="s"}:{number:null,special:!1}}function yt(e){const t=e.slides,n=t.length,r=e.mode==="speaker";let s=0,l=!1,c=null,b=!1;function D(d){return n===0?0:Math.max(0,Math.min(n-1,d))}function C(d){const u=t.findIndex(m=>m.number===d);return u>=0?u:d>=1&&d<=n?d-1:0}function P(){const d=t[s];d&&e.history.replaceState(e.history.state,"","#"+d.number)}function z(){e.onChange?.()}function E(d){n!==0&&(s=D(d),l=!1,P(),e.onNavigate?.(s),z())}function f(d){l=!!t[s]?.hasSpecial&&d,z()}const $=te(e.hash??"");$.number!=null&&n>0&&(s=C($.number),l=$.special&&!!t[s]?.hasSpecial),n>0&&P();function R(){const d=t[s],u=d?.number??0,m=!!d?.hasSpecial,S=l&&m,O=S?`${u} S`:String(u),_=m&&!S?" · S":"",M=d?String(u):"";return{index:s,number:u,total:n,special:S,hasSpecial:m,on:M?[S?`${M}s`:M]:[],metaText:n===0?"":`${O} / ${n}${_}`,metaHTML:n===0?"":`${O} / ${n}${_}`,panel:c,hash:M?`#${u}`:"",toolbarHidden:b,progress:n===0?0:(s+1)/n*100}}function L(d){c=c===d?null:d,z()}function q(d){if(d.ctrlKey||d.metaKey||d.altKey||d.reading)return"ignored";const u=d.key;if(d.targetIsButton&&(u===" "||u==="Enter")||d.targetIsPanel&&xt.has(u)||n===0)return"ignored";if(u==="ArrowRight"||u==="ArrowDown"||u==="PageDown"||u===" ")return E(s+1),"handled";if(u==="ArrowLeft"||u==="ArrowUp"||u==="PageUp")return l?f(!1):E(s-1),"handled";if(u==="Home")return E(0),"handled";if(u==="End")return E(n-1),"handled";if(u==="Escape")return l?(f(!1),"handled"):"ignored";const m=u.length===1?u.toLowerCase():"";return m==="n"?(L("notes"),"handled"):m==="z"?(L("srcs"),"handled"):m==="s"?(f(!l),"handled"):m==="h"?(b=!b,z(),"handled"):m==="f"?"fullscreen":r&&m==="p"?(L("say"),"handled"):r&&m==="t"?"pause":r&&m==="c"?"clock":r&&m==="r"?"reset":"ignored"}return{snapshot:R,applyKey:q,go:E,next:()=>E(s+1),previous:()=>{l?f(!1):E(s-1)},togglePanel:L,toggleSpecial:()=>f(!l),closeSpecial:()=>f(!1),openSpecial:()=>f(!0),toggleToolbar:()=>{b=!b,z()},onScroll:()=>{},swipe:(d,u)=>u||n===0||Math.abs(d)<=50?!1:(E(s+(d<0?1:-1)),!0),followHash:d=>{const u=te(d);if(u.number==null||n===0)return;const m=C(u.number),S=u.special&&!!t[m]?.hasSpecial;m===s&&S===l||(s=m,l=S,z())},showId:d=>{const u=te("#"+d);if(u.number==null||n===0)return;const m=C(u.number),S=u.special&&!!t[m]?.hasSpecial;m===s&&S===l||(s=m,l=S,P(),z())}}}function Le(e,t){return e.applyKey(t)}const De="(max-width: 900px) and (orientation: portrait)";function wt(e){return e(De).matches}function Ae(e,t,n){if(e==="reading")return t;for(const r of n)if(r.bottom>0)return r.id;return t}function St(e){return e.complete?Promise.resolve():new Promise(t=>{const n=()=>t();e.addEventListener("load",n,{once:!0}),e.addEventListener("error",n,{once:!0})})}async function Te(e,t){t.scrollTo(e),await Promise.all(t.imagesBefore(e).map(St)),t.scrollTo(e)}const zt=["data-theme","aria-busy"],Et={key:0,class:"tools",role:"group","aria-label":"Sterowanie prezentacją"},Ct={class:"tools-group"},Lt=["aria-pressed"],At=["aria-pressed"],Tt=["aria-pressed"],$t={class:"tools-group tools-end"},Ht=["aria-pressed"],jt={id:"stage"},Pt={key:1,class:"slide sec on","aria-busy":"true"},Kt={key:2,class:"slide sec on"},Dt={key:3,class:"slide sec on"},Mt={key:4,class:"slide sec on"},It=["id","innerHTML"],Nt={key:2,id:"bar"},Bt=["innerHTML"],Rt={key:4,id:"sect"},qt={key:5,id:"nav"},Ft={key:6,class:"sr-only","aria-live":"polite"},Ot=We({__name:"DeckViewer",props:{phase:{},deck:{},error:{},mode:{},compose:{type:Function},labels:{},announce:{type:Function},extraCss:{},images:{}},emits:["retry","position","navigate","clock","snapshot"],setup(e,{expose:t,emit:n}){const r=e,s=n,l=j(null),c=j(null),b=j(null),D=j(0),C=j(""),P=j(!1),z=j(!1),E=j(!0);let f=null,$=null,R=null,L=null,q=null,d=null,u=[],m="";const S={"--paper":"#141a18","--paper-2":"#1c2421","--ink":"#e4e4da","--ink-2":"#a7ada4","--rule":"#3a443f","--empire":"#e0675f","--khaki":"#c2ad72","--deck-paper":"#141a18","--deck-paper-2":"#1c2421","--deck-ink":"#e4e4da","--deck-ink-2":"#a7ada4","--deck-rule":"#3a443f","--deck-empire":"#e0675f","--deck-khaki":"#c2ad72"},O=new Set(["ArrowUp","ArrowDown","PageUp","PageDown"," ","Home","End"]);function _(o){return{body_html:o.body_html,sources_html:o.sources_html,comment_html:"comment_html"in o?o.comment_html:"",say_html:"say_html"in o?o.say_html:"",notes_html:"notes_html"in o?o.notes_html:""}}function M(o,i){const a=_(o);return r.compose?r.compose(a,i):ot({body_html:a.body_html,comment_html:a.comment_html??"",sources_html:a.sources_html,special:i})}function A(){return wt(o=>window.matchMedia(o))}F(()=>[r.phase,r.deck],()=>{if(m="",u=[],r.phase!=="ready"||!r.deck||r.deck.slides.length===0){f=null,D.value++;return}f=yt({slides:r.deck.slides.map(o=>({number:o.number,hasSpecial:o.special!=null})),history:window.history,hash:window.location.hash,mode:r.mode==="speaker"?"speaker":"public",onChange:()=>{D.value++},onNavigate:o=>{s("navigate",o)}}),s("position",f.snapshot().index),D.value++},{immediate:!0});const g=J(()=>(D.value,f?.snapshot()??null)),se=J(()=>{const o=r.deck?.slides??[],i=new Set(g.value?.on??[]),a=[];for(const p of o){const k=String(p.number);if(a.push({id:k,slide:p,special:!1,on:i.has(k)}),p.special){const y=`${p.number}s`;a.push({id:y,slide:p.special,special:!0,on:i.has(y)})}}return a}),Me=J(()=>{const o=g.value,i=r.deck?.slides;if(!o||!i)return"";const a=i[o.index];return a?o.special&&a.special?a.special.section_label:a.section_label:""});function Ie(){const o=r.extraCss,i=Array.isArray(o)?o:o?[o]:[],a=[];for(const p of i){if(!p)continue;const k=Ce(vt(p),"dark");k&&a.push(k)}return a}function ae(o){const i=[Ce(tt,"dark"),...Ie(),bt].filter(a=>!!a);try{o.adoptedStyleSheets=i.map(a=>{const p=new CSSStyleSheet;return p.replaceSync(a),p})}catch{o.querySelectorAll("style[data-deck-style]").forEach(a=>a.remove());for(const a of i){const p=document.createElement("style");p.dataset.deckStyle="1",p.textContent=a,o.appendChild(p)}}}function le(){const o=l.value;if(o){for(const[i,a]of Object.entries(S))o.style.setProperty(i,a);o.style.colorScheme="dark",o.dataset.theme="dark",document.documentElement.dataset.theme="dark",document.documentElement.style.colorScheme="dark"}}function T(){const o=c.value?.getElementById("stage"),i=l.value;if(!o||!i)return;const a=c.value?.getElementById("nav");if(A()){o.style.transform="",a&&(a.style.top="");return}const p=c.value?.querySelector(".tools"),k=p instanceof HTMLElement?p.getBoundingClientRect().height:0,y=Math.max(0,window.innerHeight-k),H=Math.min(window.innerWidth/1280,y/720),Ve=k/2;o.style.transform=`translate(${-640*H}px, ${-360*H+Ve}px) scale(${H})`,a&&(a.style.top=`${k}px`)}function Z(){L?.disconnect();const o=c.value?.querySelector(".tools");o&&L?.observe(o)}function Ne(){const o=c.value;if(!o)return;const i=r.images;o.querySelectorAll("img[data-deck-image]").forEach(a=>{if(!(a instanceof HTMLImageElement))return;const p=a.getAttribute("data-deck-image")??"",k=p&&i?i[p]:void 0;if(!k){a.removeAttribute("src");return}a.getAttribute("src")!==k&&a.setAttribute("src",k)})}function ce(){const o=c.value,i=b.value;if(!o||!i)return;const a=f?.snapshot().panel??null;if(i.classList.toggle("speaker",r.mode==="speaker"),i.classList.toggle("notes-on",a==="notes"),i.classList.toggle("srcs-on",a==="srcs"),i.classList.toggle("speak-on",a==="say"),o.querySelectorAll("aside.notes, aside.srcs, aside.speak").forEach(k=>{const y=(k.textContent??"").replace(/\u00a0/g," ").trim()==="";k.classList.toggle("is-empty",y),k.removeAttribute("tabindex"),k.removeAttribute("role"),k.removeAttribute("aria-label")}),a){const k=a==="notes"?"notes":a==="srcs"?"srcs":"speak",y=a==="notes"?r.labels?.notes??"Komentarz":a==="srcs"?r.labels?.sources??"Źródła":r.labels?.say??"",H=o.querySelector(`.slide.on aside.${k}`);H&&(H.setAttribute("tabindex","0"),H.setAttribute("role","region"),H.setAttribute("aria-label",y))}const p=r.labels?.specialLink??"Slajd dodatkowy (S)";o.querySelectorAll(".sp-link").forEach(k=>{k.setAttribute("title",p)})}function de(){return c.value?.activeElement??document.activeElement}function Be(){const i=de()?.closest?.(".notes, .srcs, .speak");return i instanceof HTMLElement?i:null}function Re(o,i){const p=o.clientHeight;i==="ArrowDown"?o.scrollTop+=40:i==="ArrowUp"?o.scrollTop-=40:i==="PageDown"||i===" "?o.scrollTop+=p:i==="PageUp"?o.scrollTop-=p:i==="Home"?o.scrollTop=0:i==="End"&&(o.scrollTop=o.scrollHeight)}function X(){document.fullscreenEnabled&&(document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()?.catch(()=>{}))}function ue(o){return o!=="pause"&&o!=="clock"&&o!=="reset"?!1:(s("clock",o),!0)}function pe(o){if(!f||r.phase!=="ready")return;const a=!!de()?.closest("button"),p=Be(),k=Le(f,{key:o.key,ctrlKey:o.ctrlKey,metaKey:o.metaKey,altKey:o.altKey,targetIsButton:a,targetIsPanel:!!p,reading:A()});if(k==="fullscreen"){o.preventDefault(),X();return}if(ue(k)){o.preventDefault();return}if(k==="ignored"){if(a&&(o.key===" "||o.key==="Enter"))return;p&&O.has(o.key)&&!o.ctrlKey&&!o.metaKey&&!o.altKey&&!A()&&(o.preventDefault(),Re(p,o.key));return}o.preventDefault()}function qe(o){if(!f||r.phase!=="ready"||r.mode!=="speaker"||o.toLowerCase()==="f")return"ignored";const i=Le(f,{key:o,reading:A()});return i==="fullscreen"?"ignored":(ue(i),i)}function Fe(o){if(!f||r.phase!=="ready"||r.mode!=="speaker"||!r.deck||A())return!1;const i=r.deck.slides.findIndex(a=>a.number===o);return i<0?!1:(f.go(i),!0)}t({runKey:qe,goToNumber:Fe});function fe(){f&&window.location.hash!==f.snapshot().hash&&f.followHash(window.location.hash)}function me(){z.value=document.fullscreenElement!=null,T()}function Ue(o){if(!(o instanceof MouseEvent)||!f||A())return;const i=o.target instanceof Element?o.target:null;if(o.detail>0){const p=i?.closest("#nav button");p instanceof HTMLElement&&p.blur()}if(i?.closest(".tools, .tools-show, #speaker-clock"))return;const a=c.value;if(a){for(const p of a.elementsFromPoint(o.clientX,o.clientY))if(p instanceof Element){if(p.classList.contains("sp-link")){o.preventDefault(),o.stopPropagation(),f.openSpecial();return}if(p.classList.contains("sp-close")){o.preventDefault(),o.stopPropagation(),f.closeSpecial();return}}}}function he(o){$=o.touches[0]?.clientX??null}function ke(o){if($==null||!f)return;const i=$;$=null;const a=o.changedTouches[0]?.clientX;a!=null&&f.swipe(a-i,A())}function G(o){f?.togglePanel(o)}function ge(){f?.toggleSpecial()}function Q(){f?.toggleToolbar()}function Oe(){f?.previous()}function _e(){f?.next()}function be(){const o=c.value;return o?[...o.querySelectorAll("section.slide")].flatMap(i=>!(i instanceof HTMLElement)||!i.id?[]:[{id:i.id,bottom:i.getBoundingClientRect().bottom}]):[]}function K(){if(!A())return;const o=be();o.length&&(u=o)}const ve={scrollTo(o){c.value?.getElementById(o)?.scrollIntoView({block:"start"})},imagesBefore(o){const i=c.value;if(!i)return[];const a=[...i.querySelectorAll("section.slide")],p=a.findIndex(y=>y.id===o);if(p<=0)return[];const k=[];for(let y=0;yK()))}function ye(){if(!f||r.phase!=="ready"||!d)return;const o=f.snapshot().on[0]??"";if(!o)return;if(d.matches){const a=Ae("reading",o,u);m="",Y(()=>{K(),m=a,Te(a,ve).then(()=>K())});return}const i=Ae("slide",o,u.length?u:be());m="",f.showId(i),T()}return Ze(()=>{const o=l.value;if(!o)return;P.value=document.fullscreenEnabled;const i=o.attachShadow({mode:"open"});c.value=i,le(),ae(i);const a=document.createElement("div");a.className="deck",i.appendChild(a),b.value=a,i.addEventListener("click",Ue,!0),window.addEventListener("hashchange",fe),window.addEventListener("keydown",pe),window.addEventListener("resize",T),window.addEventListener("scroll",K,!0),window.addEventListener("touchstart",he,{passive:!0}),window.addEventListener("touchend",ke,{passive:!0}),document.addEventListener("fullscreenchange",me),d=window.matchMedia(De),d.addEventListener("change",ye),R=new ResizeObserver(()=>T()),R.observe(o),L=new ResizeObserver(()=>T()),q=new MutationObserver(()=>{Z(),T()}),q.observe(a,{childList:!0,subtree:!0}),Y(()=>{ce(),Z(),T(),K(),xe()})}),Xe(()=>{window.removeEventListener("hashchange",fe),window.removeEventListener("keydown",pe),window.removeEventListener("resize",T),window.removeEventListener("scroll",K,!0),window.removeEventListener("touchstart",he),window.removeEventListener("touchend",ke),document.removeEventListener("fullscreenchange",me),d?.removeEventListener("change",ye),R?.disconnect(),L?.disconnect(),q?.disconnect();const o=document.documentElement;delete o.dataset.theme,o.style.removeProperty("color-scheme")}),F(()=>r.extraCss,()=>{le(),c.value&&ae(c.value)}),F(g,o=>{o&&s("snapshot",o)}),F(g,(o,i)=>{if(!o){C.value="";return}if(!i||o.number!==i.number||o.special!==i.special){if(r.announce){C.value=r.announce({number:o.number,total:o.total,special:o.special});return}o.special&&!i?.special?C.value=`Slajd dodatkowy do slajdu ${o.number}`:C.value=`Slajd ${o.number} z ${o.total}`}},{immediate:!0}),F([()=>r.phase,se,g,()=>r.images],()=>{Y(()=>{ce(),Ne(),Z(),T();const o=f?.snapshot().on[0]??"";o&&o!==m?xe():K()})}),(o,i)=>(v(),x("div",{ref_key:"host",ref:l,class:"deck-host","data-theme":E.value?"dark":void 0,"aria-busy":e.phase==="loading"?"true":void 0},[b.value?(v(),Ge(Qe,{key:0,to:b.value},[e.phase==="ready"&&g.value&&e.mode==="speaker"?we(o.$slots,"tools",{panel:g.value.panel,special:g.value.special,hasSpecial:g.value.hasSpecial,fullscreenEnabled:P.value,fullscreenOn:z.value,toolbarHidden:g.value.toolbarHidden,togglePanel:G,toggleSpecial:ge,toggleToolbar:Q,toggleFullscreen:X},void 0,void 0,0):w("",!0),e.phase==="ready"&&g.value&&e.mode!=="speaker"?(v(),x(Se,{key:1},[g.value.toolbarHidden?w("",!0):(v(),x("div",Et,[h("div",Ct,[h("button",{type:"button","aria-pressed":g.value.panel==="notes","aria-keyshortcuts":"N",onClick:i[0]||(i[0]=a=>G("notes"))},[...i[3]||(i[3]=[I(" Komentarz ",-1),h("kbd",null,"N",-1)])],8,Lt),h("button",{type:"button","aria-pressed":g.value.panel==="srcs","aria-keyshortcuts":"Z",onClick:i[1]||(i[1]=a=>G("srcs"))},[...i[4]||(i[4]=[I(" Źródła ",-1),h("kbd",null,"Z",-1)])],8,At),h("button",{type:"button",class:ze(["tool-s",{unavailable:!g.value.hasSpecial}]),"aria-pressed":g.value.special,"aria-keyshortcuts":"S",onClick:ge},[...i[5]||(i[5]=[I(" Slajd dodatkowy ",-1),h("kbd",null,"S",-1)])],10,Tt)]),h("div",$t,[P.value?(v(),x("button",{key:0,type:"button","aria-pressed":z.value,"aria-keyshortcuts":"F",onClick:X},[...i[6]||(i[6]=[I(" Pełny ekran ",-1),h("kbd",null,"F",-1)])],8,Ht)):w("",!0),h("button",{type:"button","aria-keyshortcuts":"H",onClick:Q},[...i[7]||(i[7]=[I(" Ukryj pasek ",-1),h("kbd",null,"H",-1)])])])])),g.value.toolbarHidden?(v(),x("button",{key:1,type:"button",class:"tools-show","aria-keyshortcuts":"H",onClick:Q},[...i[8]||(i[8]=[I(" Pokaż pasek ",-1),h("kbd",null,"H",-1)])])):w("",!0)],64)):w("",!0),h("div",jt,[e.mode==="speaker"&&e.phase==="ready"?we(o.$slots,"reading-close",{},void 0,void 0,0):w("",!0),e.phase==="loading"?(v(),x("section",Pt,[...i[9]||(i[9]=[h("div",null,[h("p",{class:"k"},"Wczytywanie prezentacji…")],-1)])])):e.phase==="notfound"?(v(),x("section",Kt,[...i[10]||(i[10]=[h("div",null,[h("p",{class:"k"},"404"),h("h2",null,"Nie ma takiej prezentacji"),h("p",null,"Link jest nieaktualny albo prezentacja nie jest już udostępniona.")],-1)])])):e.phase==="error"?(v(),x("section",Dt,[h("div",null,[i[11]||(i[11]=h("p",{class:"k"},"Błąd",-1)),i[12]||(i[12]=h("h2",null,"Nie udało się wczytać prezentacji",-1)),h("p",null,V(e.error),1),h("button",{type:"button",class:"status-retry",onClick:i[2]||(i[2]=a=>s("retry"))},"Spróbuj ponownie")])])):e.phase==="empty"?(v(),x("section",Mt,[h("div",null,[h("h2",null,V(e.deck?.title),1),i[13]||(i[13]=h("p",null,"Ta prezentacja nie ma jeszcze slajdów.",-1))])])):e.phase==="ready"?(v(!0),x(Se,{key:5},Ye(se.value,a=>(v(),x("section",{id:a.id,key:a.id,class:ze(et(rt)(a.slide.css_class,{special:a.special,on:a.on})),innerHTML:M(a.slide,a.special)},null,10,It))),128)):w("",!0)]),e.phase==="ready"&&g.value?(v(),x("div",Nt,[h("i",{style:Je({width:g.value.progress+"%"})},null,4)])):w("",!0),e.phase==="ready"&&g.value?(v(),x("div",{key:3,id:"meta",innerHTML:g.value.metaHTML},null,8,Bt)):w("",!0),e.phase==="ready"&&g.value?(v(),x("div",Rt,V(Me.value),1)):w("",!0),e.phase==="ready"?(v(),x("div",qt,[h("button",{type:"button","aria-label":"Poprzedni slajd",onClick:Oe}),i[14]||(i[14]=h("div",{class:"mid"},null,-1)),h("button",{type:"button","aria-label":"Następny slajd",onClick:_e})])):w("",!0),e.phase==="ready"?(v(),x("div",Ft,V(C.value),1)):w("",!0)],8,["to"])):w("",!0)],8,zt))}});export{Ot as _,wt as r}; diff --git a/public/assets/ElectiveBar.vue_vue_type_script_setup_true_lang-mMQANJpk.js b/public/assets/ElectiveBar.vue_vue_type_script_setup_true_lang-ml4QcEZn.js similarity index 93% rename from public/assets/ElectiveBar.vue_vue_type_script_setup_true_lang-mMQANJpk.js rename to public/assets/ElectiveBar.vue_vue_type_script_setup_true_lang-ml4QcEZn.js index 305c871..cba149b 100644 --- a/public/assets/ElectiveBar.vue_vue_type_script_setup_true_lang-mMQANJpk.js +++ b/public/assets/ElectiveBar.vue_vue_type_script_setup_true_lang-ml4QcEZn.js @@ -1 +1 @@ -import{d as l,C as d,p as u,b as e,o as a,c as r,m as i,t as m,h as y,i as w,e as n,a as h,s as _,k}from"./index-LFNXxSi2.js";import{c as b}from"./format-bcE-cYHJ.js";const g={key:0,class:"stack",style:{"margin-bottom":"16px"}},v={key:0,class:"notice"},z={key:1,class:"chips wrap"},C=["aria-pressed"],V=l({__name:"ElectiveBar",setup(f){const t=d(),o=u(),c=_(()=>b(o.pendingElectives.length,"grupa przedmiotów do wyboru","grupy przedmiotów do wyboru","grup przedmiotów do wyboru"));return(x,s)=>{const p=k("router-link");return e(o).pendingElectives.length||e(t).hasChoices?(a(),r("div",g,[e(o).pendingElectives.length?(a(),r("p",v,[i(" Masz "+m(c.value)+". Do czasu wyboru widać wszystkie alternatywy. ",1),y(p,{to:{name:"profile",hash:"#wybor"}},{default:w(()=>[...s[1]||(s[1]=[i("Wybierz",-1)])]),_:1})])):n("",!0),e(t).hasChoices?(a(),r("div",z,[h("button",{class:"chip",type:"button","aria-pressed":e(t).showAll,onClick:s[0]||(s[0]=E=>e(t).setShowAll(!e(t).showAll))},"Pokaż wszystkie przedmioty do wyboru",8,C)])):n("",!0)])):n("",!0)}}});export{V as _}; +import{d as l,C as d,p as u,b as e,o as a,c as r,m as i,t as m,h as y,i as w,e as n,a as h,s as _,k}from"./index-CvyVvvnt.js";import{c as b}from"./format-bcE-cYHJ.js";const g={key:0,class:"stack",style:{"margin-bottom":"16px"}},v={key:0,class:"notice"},z={key:1,class:"chips wrap"},C=["aria-pressed"],V=l({__name:"ElectiveBar",setup(f){const t=d(),o=u(),c=_(()=>b(o.pendingElectives.length,"grupa przedmiotów do wyboru","grupy przedmiotów do wyboru","grup przedmiotów do wyboru"));return(x,s)=>{const p=k("router-link");return e(o).pendingElectives.length||e(t).hasChoices?(a(),r("div",g,[e(o).pendingElectives.length?(a(),r("p",v,[i(" Masz "+m(c.value)+". Do czasu wyboru widać wszystkie alternatywy. ",1),y(p,{to:{name:"profile",hash:"#wybor"}},{default:w(()=>[...s[1]||(s[1]=[i("Wybierz",-1)])]),_:1})])):n("",!0),e(t).hasChoices?(a(),r("div",z,[h("button",{class:"chip",type:"button","aria-pressed":e(t).showAll,onClick:s[0]||(s[0]=E=>e(t).setShowAll(!e(t).showAll))},"Pokaż wszystkie przedmioty do wyboru",8,C)])):n("",!0)])):n("",!0)}}});export{V as _}; diff --git a/public/assets/ForgotView-BOx6Nau9.js b/public/assets/ForgotView-BX93XuZx.js similarity index 92% rename from public/assets/ForgotView-BOx6Nau9.js rename to public/assets/ForgotView-BX93XuZx.js index edae809..81b5277 100644 --- a/public/assets/ForgotView-BOx6Nau9.js +++ b/public/assets/ForgotView-BX93XuZx.js @@ -1 +1 @@ -import{d as f,c as t,a,g as y,t as n,e as m,w as _,v as k,h as w,i as b,r,k as h,o,m as g,n as x}from"./index-LFNXxSi2.js";import{f as V}from"./forms-CE5LqaKY.js";const B={class:"auth"},C={key:0,class:"notice",role:"status"},N={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},W={class:"field"},j={key:0,class:"error-text"},M=["disabled"],z={class:"auth-links"},I=f({__name:"ForgotView",setup(A){const l=r(""),i=r(!1),u=r(!1),s=r(null);async function c(){i.value=!0,s.value=null;try{await x.forgotPassword(l.value.trim()),u.value=!0}catch(d){s.value=V(d)}finally{i.value=!1}}return(d,e)=>{const p=h("router-link");return o(),t("div",B,[e[3]||(e[3]=a("header",{class:"page-head"},[a("span",{class:"eyebrow"},"BM II° · UWr"),a("h1",null,"Przypomnij hasło")],-1)),u.value?(o(),t("p",C,"Jeśli konto o tym adresie istnieje, wysłaliśmy na nie wiadomość z linkiem do ustawienia nowego hasła.")):(o(),t("form",{key:1,onSubmit:y(c,["prevent"]),novalidate:""},[s.value?.message?(o(),t("div",N,n(s.value.message),1)):m("",!0),a("div",W,[e[1]||(e[1]=a("label",{for:"email"},"Adres e-mail",-1)),_(a("input",{id:"email","onUpdate:modelValue":e[0]||(e[0]=v=>l.value=v),type:"email",autocomplete:"email",inputmode:"email",required:"",autofocus:""},null,512),[[k,l.value]]),s.value?.fields.email?(o(),t("p",j,n(s.value.fields.email),1)):m("",!0)]),a("button",{class:"btn primary block",type:"submit",disabled:i.value||!l.value},n(i.value?"Wysyłanie…":"Wyślij link"),9,M)],32)),a("div",z,[w(p,{to:"/logowanie"},{default:b(()=>[...e[2]||(e[2]=[g("Wróć do logowania",-1)])]),_:1})])])}}});export{I as default}; +import{d as f,c as t,a,g as y,t as n,e as m,w as _,v as k,h as w,i as b,r,k as h,o,m as g,n as x}from"./index-CvyVvvnt.js";import{f as V}from"./forms-Ca-hh7T4.js";const B={class:"auth"},C={key:0,class:"notice",role:"status"},N={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},W={class:"field"},j={key:0,class:"error-text"},M=["disabled"],z={class:"auth-links"},I=f({__name:"ForgotView",setup(A){const l=r(""),i=r(!1),u=r(!1),s=r(null);async function c(){i.value=!0,s.value=null;try{await x.forgotPassword(l.value.trim()),u.value=!0}catch(d){s.value=V(d)}finally{i.value=!1}}return(d,e)=>{const p=h("router-link");return o(),t("div",B,[e[3]||(e[3]=a("header",{class:"page-head"},[a("span",{class:"eyebrow"},"BM II° · UWr"),a("h1",null,"Przypomnij hasło")],-1)),u.value?(o(),t("p",C,"Jeśli konto o tym adresie istnieje, wysłaliśmy na nie wiadomość z linkiem do ustawienia nowego hasła.")):(o(),t("form",{key:1,onSubmit:y(c,["prevent"]),novalidate:""},[s.value?.message?(o(),t("div",N,n(s.value.message),1)):m("",!0),a("div",W,[e[1]||(e[1]=a("label",{for:"email"},"Adres e-mail",-1)),_(a("input",{id:"email","onUpdate:modelValue":e[0]||(e[0]=v=>l.value=v),type:"email",autocomplete:"email",inputmode:"email",required:"",autofocus:""},null,512),[[k,l.value]]),s.value?.fields.email?(o(),t("p",j,n(s.value.fields.email),1)):m("",!0)]),a("button",{class:"btn primary block",type:"submit",disabled:i.value||!l.value},n(i.value?"Wysyłanie…":"Wyślij link"),9,M)],32)),a("div",z,[w(p,{to:"/logowanie"},{default:b(()=>[...e[2]||(e[2]=[g("Wróć do logowania",-1)])]),_:1})])])}}});export{I as default}; diff --git a/public/assets/LoadState.vue_vue_type_script_setup_true_lang-BX6YDhEk.js b/public/assets/LoadState.vue_vue_type_script_setup_true_lang-BYeP9cST.js similarity index 90% rename from public/assets/LoadState.vue_vue_type_script_setup_true_lang-BX6YDhEk.js rename to public/assets/LoadState.vue_vue_type_script_setup_true_lang-BYeP9cST.js index 23903a9..7bd8038 100644 --- a/public/assets/LoadState.vue_vue_type_script_setup_true_lang-BX6YDhEk.js +++ b/public/assets/LoadState.vue_vue_type_script_setup_true_lang-BYeP9cST.js @@ -1 +1 @@ -import{d as n,c as r,m as l,t as i,a as o,R as d,o as s}from"./index-LFNXxSi2.js";const y={key:0,class:"notice error",role:"alert"},c={key:1,class:"stack","aria-busy":"true","aria-label":"Wczytywanie"},m=n({__name:"LoadState",props:{loading:{type:Boolean},error:{},ready:{type:Boolean}},emits:["retry"],setup(e){return(a,t)=>e.error&&!e.ready?(s(),r("div",y,[l(i(e.error)+" ",1),o("button",{class:"linkish",type:"button",onClick:t[0]||(t[0]=u=>a.$emit("retry"))},"Spróbuj ponownie")])):e.ready?d(a.$slots,"default",{},void 0,void 0,2):(s(),r("div",c,[...t[1]||(t[1]=[o("div",{class:"skeleton"},null,-1),o("div",{class:"skeleton"},null,-1),o("div",{class:"skeleton"},null,-1)])]))}});export{m as _}; +import{d as n,c as r,m as l,t as i,a as o,R as d,o as s}from"./index-CvyVvvnt.js";const y={key:0,class:"notice error",role:"alert"},c={key:1,class:"stack","aria-busy":"true","aria-label":"Wczytywanie"},m=n({__name:"LoadState",props:{loading:{type:Boolean},error:{},ready:{type:Boolean}},emits:["retry"],setup(e){return(a,t)=>e.error&&!e.ready?(s(),r("div",y,[l(i(e.error)+" ",1),o("button",{class:"linkish",type:"button",onClick:t[0]||(t[0]=u=>a.$emit("retry"))},"Spróbuj ponownie")])):e.ready?d(a.$slots,"default",{},void 0,void 0,2):(s(),r("div",c,[...t[1]||(t[1]=[o("div",{class:"skeleton"},null,-1),o("div",{class:"skeleton"},null,-1),o("div",{class:"skeleton"},null,-1)])]))}});export{m as _}; diff --git a/public/assets/LoginView-DAC0RwAQ.js b/public/assets/LoginView-BJXrPNjb.js similarity index 94% rename from public/assets/LoginView-DAC0RwAQ.js rename to public/assets/LoginView-BJXrPNjb.js index 9bb3fff..dfb2b25 100644 --- a/public/assets/LoginView-DAC0RwAQ.js +++ b/public/assets/LoginView-BJXrPNjb.js @@ -1 +1 @@ -import{d as j,u as V,c as o,a as s,b as C,e as d,t as m,w as v,v as b,f as N,g as q,h as w,i as k,j as B,r as l,k as M,l as U,o as r,m as _}from"./index-LFNXxSi2.js";import{s as Z,f as z}from"./forms-CE5LqaKY.js";const R={class:"auth"},S={key:0,class:"notice",role:"status"},A={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},D={class:"field"},E={key:0,class:"error-text"},I={class:"field"},L={key:0,class:"error-text"},T={class:"check",style:{"margin-bottom":"16px"}},H=["disabled"],P={class:"auth-links"},J=j({__name:"LoginView",setup(W){const g=V(),c=B(),x=U(),i=l(""),u=l(""),p=l(!0),n=l(!1),t=l(null);async function h(){n.value=!0,t.value=null;try{await g.login(i.value.trim(),u.value,p.value),await x.replace(Z(c.query.redirect))}catch(f){t.value=z(f)}finally{n.value=!1}}return(f,e)=>{const y=M("router-link");return r(),o("div",R,[e[8]||(e[8]=s("header",{class:"page-head"},[s("span",{class:"eyebrow"},"BM II° · UWr"),s("h1",null,"Zaloguj się")],-1)),C(c).query.expired?(r(),o("p",S,"Sesja wygasła. Zaloguj się ponownie.")):d("",!0),s("form",{onSubmit:q(h,["prevent"]),novalidate:""},[t.value?.message?(r(),o("div",A,m(t.value.message),1)):d("",!0),s("div",D,[e[3]||(e[3]=s("label",{for:"email"},"Adres e-mail",-1)),v(s("input",{id:"email","onUpdate:modelValue":e[0]||(e[0]=a=>i.value=a),type:"email",autocomplete:"username",inputmode:"email",required:"",autofocus:""},null,512),[[b,i.value]]),t.value?.fields.email?(r(),o("p",E,m(t.value.fields.email),1)):d("",!0)]),s("div",I,[e[4]||(e[4]=s("label",{for:"password"},"Hasło",-1)),v(s("input",{id:"password","onUpdate:modelValue":e[1]||(e[1]=a=>u.value=a),type:"password",autocomplete:"current-password",required:""},null,512),[[b,u.value]]),t.value?.fields.password?(r(),o("p",L,m(t.value.fields.password),1)):d("",!0)]),s("label",T,[v(s("input",{"onUpdate:modelValue":e[2]||(e[2]=a=>p.value=a),type:"checkbox"},null,512),[[N,p.value]]),e[5]||(e[5]=s("span",null,"Pamiętaj mnie na tym urządzeniu",-1))]),s("button",{class:"btn primary block",type:"submit",disabled:n.value||!i.value||!u.value},m(n.value?"Logowanie…":"Zaloguj się"),9,H)],32),s("div",P,[w(y,{to:"/przypomnij-haslo"},{default:k(()=>[...e[6]||(e[6]=[_("Nie pamiętam hasła",-1)])]),_:1}),w(y,{to:"/rejestracja"},{default:k(()=>[...e[7]||(e[7]=[_("Załóż konto",-1)])]),_:1})])])}}});export{J as default}; +import{d as j,u as V,c as o,a as s,b as C,e as d,t as m,w as v,v as b,f as N,g as q,h as w,i as k,j as B,r as l,k as M,l as U,o as r,m as _}from"./index-CvyVvvnt.js";import{s as Z,f as z}from"./forms-Ca-hh7T4.js";const R={class:"auth"},S={key:0,class:"notice",role:"status"},A={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},D={class:"field"},E={key:0,class:"error-text"},I={class:"field"},L={key:0,class:"error-text"},T={class:"check",style:{"margin-bottom":"16px"}},H=["disabled"],P={class:"auth-links"},J=j({__name:"LoginView",setup(W){const g=V(),c=B(),x=U(),i=l(""),u=l(""),p=l(!0),n=l(!1),t=l(null);async function h(){n.value=!0,t.value=null;try{await g.login(i.value.trim(),u.value,p.value),await x.replace(Z(c.query.redirect))}catch(f){t.value=z(f)}finally{n.value=!1}}return(f,e)=>{const y=M("router-link");return r(),o("div",R,[e[8]||(e[8]=s("header",{class:"page-head"},[s("span",{class:"eyebrow"},"BM II° · UWr"),s("h1",null,"Zaloguj się")],-1)),C(c).query.expired?(r(),o("p",S,"Sesja wygasła. Zaloguj się ponownie.")):d("",!0),s("form",{onSubmit:q(h,["prevent"]),novalidate:""},[t.value?.message?(r(),o("div",A,m(t.value.message),1)):d("",!0),s("div",D,[e[3]||(e[3]=s("label",{for:"email"},"Adres e-mail",-1)),v(s("input",{id:"email","onUpdate:modelValue":e[0]||(e[0]=a=>i.value=a),type:"email",autocomplete:"username",inputmode:"email",required:"",autofocus:""},null,512),[[b,i.value]]),t.value?.fields.email?(r(),o("p",E,m(t.value.fields.email),1)):d("",!0)]),s("div",I,[e[4]||(e[4]=s("label",{for:"password"},"Hasło",-1)),v(s("input",{id:"password","onUpdate:modelValue":e[1]||(e[1]=a=>u.value=a),type:"password",autocomplete:"current-password",required:""},null,512),[[b,u.value]]),t.value?.fields.password?(r(),o("p",L,m(t.value.fields.password),1)):d("",!0)]),s("label",T,[v(s("input",{"onUpdate:modelValue":e[2]||(e[2]=a=>p.value=a),type:"checkbox"},null,512),[[N,p.value]]),e[5]||(e[5]=s("span",null,"Pamiętaj mnie na tym urządzeniu",-1))]),s("button",{class:"btn primary block",type:"submit",disabled:n.value||!i.value||!u.value},m(n.value?"Logowanie…":"Zaloguj się"),9,H)],32),s("div",P,[w(y,{to:"/przypomnij-haslo"},{default:k(()=>[...e[6]||(e[6]=[_("Nie pamiętam hasła",-1)])]),_:1}),w(y,{to:"/rejestracja"},{default:k(()=>[...e[7]||(e[7]=[_("Załóż konto",-1)])]),_:1})])])}}});export{J as default}; diff --git a/public/assets/MaterialView-QL0yqUg2.js b/public/assets/MaterialView-BU7ZdTm0.js similarity index 94% rename from public/assets/MaterialView-QL0yqUg2.js rename to public/assets/MaterialView-BU7ZdTm0.js index cf975ec..a1ba59b 100644 --- a/public/assets/MaterialView-QL0yqUg2.js +++ b/public/assets/MaterialView-BU7ZdTm0.js @@ -1,4 +1,4 @@ -import{_ as C}from"./PageHead.vue_vue_type_script_setup_true_lang-l9qe_URH.js";import{_ as E}from"./LoadState.vue_vue_type_script_setup_true_lang-BX6YDhEk.js";import{d as L,q as V,A as z,c as u,h as k,i as g,r as B,E as A,G as H,o as l,F as y,b,m as j,a as d,B as W,t as f,e as h,y as M,s as N,k as D}from"./index-LFNXxSi2.js";import{T as F,i as P,j as G}from"./format-bcE-cYHJ.js";const O={"&":"&","<":"<",">":">",'"':""","'":"'"};function _(o){return o.replace(/[&<>"']/g,t=>O[t])}function T(o){const t=o.trim().replace(/[\u0000-\u001f\u007f\s]+/g,"");return/^https?:\/\/[^/]/i.test(t)||/^mailto:[^\s]+$/i.test(t)||t.startsWith("/")&&!t.startsWith("//")||t.startsWith("#")?t:null}function w(o){const t=[],s=i=>`\0${t.push(i)-1}\0`;let e=o.replace(/\u0000/g,"");return e=e.replace(/`([^`\n]+)`/g,(i,c)=>s(`${_(c)}`)),e=e.replace(/\[([^\]\n]+)\]\(([^()\s]*(?:\([^()\s]*\)[^()\s]*)*)\)/g,(i,c,r)=>{const p=T(r),a=S(_(c));if(!p)return s(a);const n=/^https?:/i.test(p)?' target="_blank" rel="noopener noreferrer nofollow"':"";return s(`${a}`)}),e=S(_(e)),e.replace(/\u0000(\d+)\u0000/g,(i,c)=>t[Number(c)]??"")}function S(o){return o.replace(/\*\*([^*\n]+)\*\*/g,"$1").replace(/(^|[\s(])\*([^*\n]+)\*(?=$|[\s).,;:!?])/g,"$1$2").replace(/(^|[\s(])_([^_\n]+)_(?=$|[\s).,;:!?])/g,"$1$2")}function q(o){if(!o)return"";const t=o.replace(/\r\n?/g,` +import{_ as C}from"./PageHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js";import{_ as E}from"./LoadState.vue_vue_type_script_setup_true_lang-BYeP9cST.js";import{d as L,q as V,A as z,c as u,h as k,i as g,r as B,E as A,G as H,o as l,F as y,b,m as j,a as d,B as W,t as f,e as h,y as M,s as N,k as D}from"./index-CvyVvvnt.js";import{T as F,i as P,j as G}from"./format-bcE-cYHJ.js";const O={"&":"&","<":"<",">":">",'"':""","'":"'"};function _(o){return o.replace(/[&<>"']/g,t=>O[t])}function T(o){const t=o.trim().replace(/[\u0000-\u001f\u007f\s]+/g,"");return/^https?:\/\/[^/]/i.test(t)||/^mailto:[^\s]+$/i.test(t)||t.startsWith("/")&&!t.startsWith("//")||t.startsWith("#")?t:null}function w(o){const t=[],s=i=>`\0${t.push(i)-1}\0`;let e=o.replace(/\u0000/g,"");return e=e.replace(/`([^`\n]+)`/g,(i,c)=>s(`${_(c)}`)),e=e.replace(/\[([^\]\n]+)\]\(([^()\s]*(?:\([^()\s]*\)[^()\s]*)*)\)/g,(i,c,r)=>{const p=T(r),a=S(_(c));if(!p)return s(a);const n=/^https?:/i.test(p)?' target="_blank" rel="noopener noreferrer nofollow"':"";return s(`${a}`)}),e=S(_(e)),e.replace(/\u0000(\d+)\u0000/g,(i,c)=>t[Number(c)]??"")}function S(o){return o.replace(/\*\*([^*\n]+)\*\*/g,"$1").replace(/(^|[\s(])\*([^*\n]+)\*(?=$|[\s).,;:!?])/g,"$1$2").replace(/(^|[\s(])_([^_\n]+)_(?=$|[\s).,;:!?])/g,"$1$2")}function q(o){if(!o)return"";const t=o.replace(/\r\n?/g,` `).split(` `),s=[];let e=0;const i=r=>r.trim()==="",c=r=>/^(#{1,6})\s/.test(r)||/^```/.test(r)||/^>\s?/.test(r)||/^\s*([-*+]|\d+[.)])\s+/.test(r)||/^(-{3,}|\*{3,}|_{3,})\s*$/.test(r);for(;e${_(n.join(` `))}`);continue}const p=/^(#{1,6})\s+(.*?)\s*#*\s*$/.exec(r);if(p){const n=Math.min(p[1].length+1,6);s.push(`${w(p[2])}`),e++;continue}if(/^(-{3,}|\*{3,}|_{3,})\s*$/.test(r)){s.push("
"),e++;continue}if(/^>\s?/.test(r)){const n=[];for(;e\s?/.test(t[e]);)n.push(t[e++].replace(/^>\s?/,""));s.push(`
${q(n.join(` diff --git a/public/assets/MaterialsView-BvNKRnn6.js b/public/assets/MaterialsView-CSlYRC1S.js similarity index 97% rename from public/assets/MaterialsView-BvNKRnn6.js rename to public/assets/MaterialsView-CSlYRC1S.js index f965f87..dae554c 100644 --- a/public/assets/MaterialsView-BvNKRnn6.js +++ b/public/assets/MaterialsView-CSlYRC1S.js @@ -1 +1 @@ -import{d as V,p as j,q as $,E as D,G as E,A as P,c as a,h as A,a as l,w as N,H as B,F as c,y as v,b as y,g as F,e as d,m as L,t as n,I as W,r as m,s as M,o as s,k as q,B as U,i as G}from"./index-LFNXxSi2.js";import{_ as H}from"./PageHead.vue_vue_type_script_setup_true_lang-l9qe_URH.js";import{T as S,i as I,c as O}from"./format-bcE-cYHJ.js";const R={class:"field"},Y=["value"],J={class:"field"},K=["value"],Q={key:0,class:"chips wrap",role:"group","aria-label":"Tagi",style:{"margin-bottom":"12px"}},X=["aria-pressed","onClick"],Z={key:2,class:"notice error",role:"alert"},ee={key:3,class:"stack","aria-busy":"true"},te=["aria-busy"],se={class:"row-main"},ae={class:"badge"},le={class:"muted small",style:{margin:"0"}},oe={key:0},ne={key:1},ie={key:2},re={key:0,style:{margin:"6px 0 0"}},ue={key:1,class:"empty",style:{"margin-top":"12px"}},de={key:2,class:"btn-row",style:{"margin-top":"16px","justify-content":"space-between","align-items":"center"},"aria-label":"Strony"},pe=["disabled"],ce={class:"muted small nums"},ve=["disabled"],fe=V({__name:"MaterialsView",setup(ye){const h=j(),o=W({course:"",type:"",tag:""}),i=m(1),u=m(null),b=m(!1),g=m(""),k=m(new Map);$(()=>{h.loadCourses(),_()});let f=0;async function _(){const r=++f;b.value=!0,g.value="";try{const t=await D.materials({course:o.course?Number(o.course):null,type:o.type||null,tag:o.tag||null,page:i.value});if(r!==f)return;u.value=t;for(const w of t.data)for(const e of w.tags)k.value.set(e.slug,e);k.value=new Map(k.value)}catch(t){r===f&&(g.value=E(t))}finally{r===f&&(b.value=!1)}}P(o,()=>{i.value=1,_()});function C(r){i.value=r,_(),window.scrollTo({top:0})}const x=M(()=>[...k.value.values()].sort((r,t)=>r.name.localeCompare(t.name,"pl"))),z=M(()=>!!(o.course||o.type||o.tag)),T=()=>Object.assign(o,{course:"",type:"",tag:""});return(r,t)=>{const w=q("router-link");return s(),a("div",null,[A(H,{eyebrow:"Notatki, PDF-y, linki",title:"Materiały"}),l("form",{class:"grid-2",style:{"margin-bottom":"8px"},onSubmit:t[2]||(t[2]=F(()=>{},["prevent"]))},[l("div",R,[t[7]||(t[7]=l("label",{for:"f-course"},"Przedmiot",-1)),N(l("select",{id:"f-course","onUpdate:modelValue":t[0]||(t[0]=e=>o.course=e)},[t[6]||(t[6]=l("option",{value:""},"Wszystkie",-1)),(s(!0),a(c,null,v(y(h).visibleCourses,e=>(s(),a("option",{key:e.id,value:String(e.id)},n(e.name)+" ("+n(e.form==="wyklad"?"wykład":e.form==="cwiczenia"?"ćwiczenia":e.form)+")",9,Y))),128))],512),[[B,o.course]])]),l("div",J,[t[9]||(t[9]=l("label",{for:"f-type"},"Rodzaj",-1)),N(l("select",{id:"f-type","onUpdate:modelValue":t[1]||(t[1]=e=>o.type=e)},[t[8]||(t[8]=l("option",{value:""},"Wszystkie",-1)),(s(!0),a(c,null,v(y(S),(e,p)=>(s(),a("option",{key:p,value:p},n(e),9,K))),128))],512),[[B,o.type]])])],32),x.value.length?(s(),a("div",Q,[(s(!0),a(c,null,v(x.value,e=>(s(),a("button",{key:e.slug,class:"chip",type:"button","aria-pressed":o.tag===e.slug,onClick:p=>o.tag=o.tag===e.slug?"":e.slug},n(e.name),9,X))),128))])):d("",!0),z.value?(s(),a("button",{key:1,class:"linkish small",type:"button",onClick:T},"Wyczyść filtry")):d("",!0),g.value?(s(),a("div",Z,[L(n(g.value)+" ",1),l("button",{class:"linkish",type:"button",onClick:t[3]||(t[3]=e=>_())},"Spróbuj ponownie")])):u.value?(s(),a(c,{key:4},[u.value.data.length?(s(),a("div",{key:0,class:"stack",style:{"margin-top":"12px"},"aria-busy":b.value},[(s(!0),a(c,null,v(u.value.data,e=>(s(),U(w,{key:e.id,to:`/materialy/${e.id}`,class:"card link"},{default:G(()=>[l("div",se,[l("h3",null,n(e.title),1),l("span",ae,n(y(S)[e.type]),1)]),l("p",le,[e.course?(s(),a("span",oe,n(e.course.name),1)):d("",!0),e.published_at?(s(),a("span",ne," · "+n(y(I)(e.published_at)),1)):d("",!0),e.files_count?(s(),a("span",ie," · "+n(y(O)(e.files_count,"plik","pliki","plików")),1)):d("",!0)]),e.tags.length?(s(),a("p",re,[(s(!0),a(c,null,v(e.tags,p=>(s(),a("span",{key:p.id,class:"badge",style:{"margin-right":"4px"}},n(p.name),1))),128))])):d("",!0)]),_:2},1032,["to"]))),128))],8,te)):(s(),a("p",ue,n(z.value?"Nic nie pasuje do filtrów.":"Nie ma jeszcze żadnych materiałów."),1)),u.value.meta.last_page>1?(s(),a("nav",de,[l("button",{class:"btn small",type:"button",disabled:i.value<=1,onClick:t[4]||(t[4]=e=>C(i.value-1))},"← Poprzednia",8,pe),l("span",ce,n(i.value)+" / "+n(u.value.meta.last_page),1),l("button",{class:"btn small",type:"button",disabled:i.value>=u.value.meta.last_page,onClick:t[5]||(t[5]=e=>C(i.value+1))},"Następna →",8,ve)])):d("",!0)],64)):(s(),a("div",ee,[...t[10]||(t[10]=[l("div",{class:"skeleton"},null,-1),l("div",{class:"skeleton"},null,-1)])]))])}}});export{fe as default}; +import{d as V,p as j,q as $,E as D,G as E,A as P,c as a,h as A,a as l,w as N,H as B,F as c,y as v,b as y,g as F,e as d,m as L,t as n,I as W,r as m,s as M,o as s,k as q,B as U,i as G}from"./index-CvyVvvnt.js";import{_ as H}from"./PageHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js";import{T as S,i as I,c as O}from"./format-bcE-cYHJ.js";const R={class:"field"},Y=["value"],J={class:"field"},K=["value"],Q={key:0,class:"chips wrap",role:"group","aria-label":"Tagi",style:{"margin-bottom":"12px"}},X=["aria-pressed","onClick"],Z={key:2,class:"notice error",role:"alert"},ee={key:3,class:"stack","aria-busy":"true"},te=["aria-busy"],se={class:"row-main"},ae={class:"badge"},le={class:"muted small",style:{margin:"0"}},oe={key:0},ne={key:1},ie={key:2},re={key:0,style:{margin:"6px 0 0"}},ue={key:1,class:"empty",style:{"margin-top":"12px"}},de={key:2,class:"btn-row",style:{"margin-top":"16px","justify-content":"space-between","align-items":"center"},"aria-label":"Strony"},pe=["disabled"],ce={class:"muted small nums"},ve=["disabled"],fe=V({__name:"MaterialsView",setup(ye){const h=j(),o=W({course:"",type:"",tag:""}),i=m(1),u=m(null),b=m(!1),g=m(""),k=m(new Map);$(()=>{h.loadCourses(),_()});let f=0;async function _(){const r=++f;b.value=!0,g.value="";try{const t=await D.materials({course:o.course?Number(o.course):null,type:o.type||null,tag:o.tag||null,page:i.value});if(r!==f)return;u.value=t;for(const w of t.data)for(const e of w.tags)k.value.set(e.slug,e);k.value=new Map(k.value)}catch(t){r===f&&(g.value=E(t))}finally{r===f&&(b.value=!1)}}P(o,()=>{i.value=1,_()});function C(r){i.value=r,_(),window.scrollTo({top:0})}const x=M(()=>[...k.value.values()].sort((r,t)=>r.name.localeCompare(t.name,"pl"))),z=M(()=>!!(o.course||o.type||o.tag)),T=()=>Object.assign(o,{course:"",type:"",tag:""});return(r,t)=>{const w=q("router-link");return s(),a("div",null,[A(H,{eyebrow:"Notatki, PDF-y, linki",title:"Materiały"}),l("form",{class:"grid-2",style:{"margin-bottom":"8px"},onSubmit:t[2]||(t[2]=F(()=>{},["prevent"]))},[l("div",R,[t[7]||(t[7]=l("label",{for:"f-course"},"Przedmiot",-1)),N(l("select",{id:"f-course","onUpdate:modelValue":t[0]||(t[0]=e=>o.course=e)},[t[6]||(t[6]=l("option",{value:""},"Wszystkie",-1)),(s(!0),a(c,null,v(y(h).visibleCourses,e=>(s(),a("option",{key:e.id,value:String(e.id)},n(e.name)+" ("+n(e.form==="wyklad"?"wykład":e.form==="cwiczenia"?"ćwiczenia":e.form)+")",9,Y))),128))],512),[[B,o.course]])]),l("div",J,[t[9]||(t[9]=l("label",{for:"f-type"},"Rodzaj",-1)),N(l("select",{id:"f-type","onUpdate:modelValue":t[1]||(t[1]=e=>o.type=e)},[t[8]||(t[8]=l("option",{value:""},"Wszystkie",-1)),(s(!0),a(c,null,v(y(S),(e,p)=>(s(),a("option",{key:p,value:p},n(e),9,K))),128))],512),[[B,o.type]])])],32),x.value.length?(s(),a("div",Q,[(s(!0),a(c,null,v(x.value,e=>(s(),a("button",{key:e.slug,class:"chip",type:"button","aria-pressed":o.tag===e.slug,onClick:p=>o.tag=o.tag===e.slug?"":e.slug},n(e.name),9,X))),128))])):d("",!0),z.value?(s(),a("button",{key:1,class:"linkish small",type:"button",onClick:T},"Wyczyść filtry")):d("",!0),g.value?(s(),a("div",Z,[L(n(g.value)+" ",1),l("button",{class:"linkish",type:"button",onClick:t[3]||(t[3]=e=>_())},"Spróbuj ponownie")])):u.value?(s(),a(c,{key:4},[u.value.data.length?(s(),a("div",{key:0,class:"stack",style:{"margin-top":"12px"},"aria-busy":b.value},[(s(!0),a(c,null,v(u.value.data,e=>(s(),U(w,{key:e.id,to:`/materialy/${e.id}`,class:"card link"},{default:G(()=>[l("div",se,[l("h3",null,n(e.title),1),l("span",ae,n(y(S)[e.type]),1)]),l("p",le,[e.course?(s(),a("span",oe,n(e.course.name),1)):d("",!0),e.published_at?(s(),a("span",ne," · "+n(y(I)(e.published_at)),1)):d("",!0),e.files_count?(s(),a("span",ie," · "+n(y(O)(e.files_count,"plik","pliki","plików")),1)):d("",!0)]),e.tags.length?(s(),a("p",re,[(s(!0),a(c,null,v(e.tags,p=>(s(),a("span",{key:p.id,class:"badge",style:{"margin-right":"4px"}},n(p.name),1))),128))])):d("",!0)]),_:2},1032,["to"]))),128))],8,te)):(s(),a("p",ue,n(z.value?"Nic nie pasuje do filtrów.":"Nie ma jeszcze żadnych materiałów."),1)),u.value.meta.last_page>1?(s(),a("nav",de,[l("button",{class:"btn small",type:"button",disabled:i.value<=1,onClick:t[4]||(t[4]=e=>C(i.value-1))},"← Poprzednia",8,pe),l("span",ce,n(i.value)+" / "+n(u.value.meta.last_page),1),l("button",{class:"btn small",type:"button",disabled:i.value>=u.value.meta.last_page,onClick:t[5]||(t[5]=e=>C(i.value+1))},"Następna →",8,ve)])):d("",!0)],64)):(s(),a("div",ee,[...t[10]||(t[10]=[l("div",{class:"skeleton"},null,-1),l("div",{class:"skeleton"},null,-1)])]))])}}});export{fe as default}; diff --git a/public/assets/MoreView-Cm2K6Awc.js b/public/assets/MoreView-B3Qn1wI_.js similarity index 90% rename from public/assets/MoreView-Cm2K6Awc.js rename to public/assets/MoreView-B3Qn1wI_.js index 465f3cb..65f4314 100644 --- a/public/assets/MoreView-Cm2K6Awc.js +++ b/public/assets/MoreView-B3Qn1wI_.js @@ -1 +1 @@ -import{_ as d}from"./PageHead.vue_vue_type_script_setup_true_lang-l9qe_URH.js";import{d as p,u,c as s,h as a,a as e,F as _,y,b as l,t as o,o as r,i as h,_ as b,k as f}from"./index-LFNXxSi2.js";const z={class:"stack"},g={class:"row-main",style:{"align-items":"center"}},k={class:"muted small"},P=p({__name:"MoreView",setup(w){const n=u(),c=[{to:"/terminarz",label:"Terminarz",hint:"Zaliczenia, egzaminy, sprawy organizacyjne",icon:"flag"},{to:"/przedmioty",label:"Przedmioty",hint:"Program studiów, prowadzący, materiały",icon:"grad"},{to:"/materialy",label:"Materiały",hint:"Notatki, PDF-y, linki",icon:"file"},{to:"/moje-prezentacje",label:"Moje prezentacje",hint:"Wersje prelegenta i linki publiczne",icon:"slides"},{to:"/profil",label:"Profil",hint:"Dane, hasło, wybór przedmiotów",icon:"user"}];return(j,i)=>{const m=f("router-link");return r(),s("div",null,[a(d,{eyebrow:"Pozostałe",title:"Więcej"}),e("div",z,[(r(),s(_,null,y(c,t=>a(m,{key:t.to,to:t.to,class:"card link"},{default:h(()=>[e("div",g,[e("div",null,[e("h3",null,o(t.label),1),e("span",k,o(t.hint),1)]),a(b,{name:"chevron",style:{width:"20px",height:"20px"}})])]),_:2},1032,["to"])),64)),e("button",{class:"btn miss",type:"button",onClick:i[0]||(i[0]=t=>l(n).logout())},"Wyloguj ("+o(l(n).displayName)+")",1)])])}}});export{P as default}; +import{_ as d}from"./PageHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js";import{d as p,u,c as s,h as a,a as e,F as _,y,b as l,t as o,o as r,i as h,_ as b,k as f}from"./index-CvyVvvnt.js";const z={class:"stack"},g={class:"row-main",style:{"align-items":"center"}},k={class:"muted small"},P=p({__name:"MoreView",setup(w){const n=u(),c=[{to:"/terminarz",label:"Terminarz",hint:"Zaliczenia, egzaminy, sprawy organizacyjne",icon:"flag"},{to:"/przedmioty",label:"Przedmioty",hint:"Program studiów, prowadzący, materiały",icon:"grad"},{to:"/materialy",label:"Materiały",hint:"Notatki, PDF-y, linki",icon:"file"},{to:"/moje-prezentacje",label:"Moje prezentacje",hint:"Wersje prelegenta i linki publiczne",icon:"slides"},{to:"/profil",label:"Profil",hint:"Dane, hasło, wybór przedmiotów",icon:"user"}];return(j,i)=>{const m=f("router-link");return r(),s("div",null,[a(d,{eyebrow:"Pozostałe",title:"Więcej"}),e("div",z,[(r(),s(_,null,y(c,t=>a(m,{key:t.to,to:t.to,class:"card link"},{default:h(()=>[e("div",g,[e("div",null,[e("h3",null,o(t.label),1),e("span",k,o(t.hint),1)]),a(b,{name:"chevron",style:{width:"20px",height:"20px"}})])]),_:2},1032,["to"])),64)),e("button",{class:"btn miss",type:"button",onClick:i[0]||(i[0]=t=>l(n).logout())},"Wyloguj ("+o(l(n).displayName)+")",1)])])}}});export{P as default}; diff --git a/public/assets/MyPresentationsView-2R3XisKT.js b/public/assets/MyPresentationsView-2R3XisKT.js deleted file mode 100644 index db96f04..0000000 --- a/public/assets/MyPresentationsView-2R3XisKT.js +++ /dev/null @@ -1 +0,0 @@ -import{d as w,q as z,c as a,h as m,e as y,i as g,j as b,l as h,r as i,G as v,o as n,F as x,y as N,a as o,t as _,m as p}from"./index-LFNXxSi2.js";import{_ as $}from"./PageHead.vue_vue_type_script_setup_true_lang-l9qe_URH.js";import{_ as V}from"./LoadState.vue_vue_type_script_setup_true_lang-BX6YDhEk.js";import{p as q}from"./presentations-W-oMAxZb.js";import{c as C}from"./format-bcE-cYHJ.js";const M={key:0,class:"notice error",role:"alert"},R={key:0,class:"stack"},T={class:"small muted",style:{display:"flex","flex-wrap":"wrap","align-items":"center",gap:"8px",margin:"4px 0 0"}},B={key:0,class:"badge online"},O={key:1,class:"badge"},P={style:{display:"flex","flex-wrap":"wrap",gap:"8px","margin-top":"14px"}},D=["href"],F=["href"],L={key:1,class:"muted small",style:{margin:"0"}},A={key:1,class:"empty"},J=w({__name:"MyPresentationsView",setup(E){const u=b(),f=h(),r=i(null),l=i(""),c=i(!1);function j(e){const t=C(e.slide_count,"slajd","slajdy","slajdów");return e.total_seconds===0?t:`${t} · ${Math.round(e.total_seconds/60)} min`}function k(e){return`/moje-prezentacje/${encodeURIComponent(e)}`}async function d(){l.value="";try{r.value=await q.mine()}catch(e){r.value=null,l.value=v(e)}}return z(()=>{if(u.query.denied==="1"){c.value=!0;const e={...u.query};delete e.denied,f.replace({name:"my-presentations",query:e})}d()}),(e,t)=>(n(),a("div",null,[m($,{eyebrow:"Dla prelegenta",title:"Moje prezentacje"}),c.value?(n(),a("p",M," Nie masz dostępu do tej prezentacji albo taka prezentacja nie istnieje. Poniżej są prezentacje przypisane do Twojego konta. ")):y("",!0),m(V,{ready:r.value!==null,error:l.value,onRetry:t[0]||(t[0]=s=>d())},{default:g(()=>[r.value?.length?(n(),a("div",R,[(n(!0),a(x,null,N(r.value,s=>(n(),a("article",{key:s.slug,class:"card accent"},[o("h3",null,_(s.title),1),o("p",T,[o("span",null,_(j(s)),1),s.is_published?(n(),a("span",B,"Opublikowana")):(n(),a("span",O,"Nieopublikowana"))]),o("div",P,[o("a",{class:"btn primary",href:k(s.slug),target:"_blank",rel:"opener"},[...t[1]||(t[1]=[p(" Otwórz wersję prelegenta ",-1),o("span",{class:"sr-only"},"(otwiera się w nowej karcie)",-1)])],8,D),s.is_published&&s.public_path?(n(),a("a",{key:0,class:"btn",href:s.public_path,target:"_blank",rel:"noopener noreferrer"},[...t[2]||(t[2]=[p(" Otwórz wersję publiczną ",-1),o("span",{class:"sr-only"},"(otwiera się w nowej karcie)",-1)])],8,F)):s.is_published?y("",!0):(n(),a("p",L,"Link publiczny zacznie działać po opublikowaniu prezentacji."))])]))),128))])):(n(),a("p",A,[...t[3]||(t[3]=[o("span",{class:"title",style:{display:"block",color:"var(--ink)"}},"Nie masz jeszcze żadnych prezentacji.",-1),p(" Pojawią się tutaj, gdy administrator przypisze prezentację do Twojego konta. ",-1)])]))]),_:1},8,["ready","error"])]))}});export{J as default}; diff --git a/public/assets/MyPresentationsView-Jd38nBse.js b/public/assets/MyPresentationsView-Jd38nBse.js new file mode 100644 index 0000000..0922854 --- /dev/null +++ b/public/assets/MyPresentationsView-Jd38nBse.js @@ -0,0 +1 @@ +import{d as g,q as b,c as a,h as p,e as y,i as _,j as v,l as h,r as u,G as x,o as n,F as N,y as $,a as o,t as f,m as l,k as C}from"./index-CvyVvvnt.js";import{_ as V}from"./PageHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js";import{_ as q}from"./LoadState.vue_vue_type_script_setup_true_lang-BYeP9cST.js";import{p as M}from"./presentations-B2_nwGC8.js";import{c as P}from"./format-bcE-cYHJ.js";const R={key:0,class:"notice error",role:"alert"},T={key:0,class:"stack"},B={class:"small muted",style:{display:"flex","flex-wrap":"wrap","align-items":"center",gap:"8px",margin:"4px 0 0"}},O={key:0,class:"badge online"},D={key:1,class:"badge"},F={style:{display:"flex","flex-wrap":"wrap",gap:"8px","margin-top":"14px"}},L=["href"],A=["href"],E={key:1,class:"muted small",style:{margin:"0"}},G={key:1,class:"empty"},Q=g({__name:"MyPresentationsView",setup(H){const c=v(),k=h(),r=u(null),i=u(""),d=u(!1);function j(t){const e=P(t.slide_count,"slajd","slajdy","slajdów");return t.total_seconds===0?e:`${e} · ${Math.round(t.total_seconds/60)} min`}function w(t){return`/moje-prezentacje/${encodeURIComponent(t)}`}async function m(){i.value="";try{r.value=await M.mine()}catch(t){r.value=null,i.value=x(t)}}return b(()=>{if(c.query.denied==="1"){d.value=!0;const t={...c.query};delete t.denied,k.replace({name:"my-presentations",query:t})}m()}),(t,e)=>{const z=C("router-link");return n(),a("div",null,[p(V,{eyebrow:"Dla prelegenta",title:"Moje prezentacje"}),d.value?(n(),a("p",R," Nie masz dostępu do tej prezentacji albo taka prezentacja nie istnieje. Poniżej są prezentacje przypisane do Twojego konta. ")):y("",!0),p(q,{ready:r.value!==null,error:i.value,onRetry:e[0]||(e[0]=s=>m())},{default:_(()=>[r.value?.length?(n(),a("div",T,[(n(!0),a(N,null,$(r.value,s=>(n(),a("article",{key:s.slug,class:"card accent"},[o("h3",null,f(s.title),1),o("p",B,[o("span",null,f(j(s)),1),s.is_published?(n(),a("span",O,"Opublikowana")):(n(),a("span",D,"Nieopublikowana"))]),o("div",F,[o("a",{class:"btn primary",href:w(s.slug),target:"_blank",rel:"opener"},[...e[1]||(e[1]=[l(" Otwórz wersję prelegenta ",-1),o("span",{class:"sr-only"},"(otwiera się w nowej karcie)",-1)])],8,L),s.is_published&&s.public_path?(n(),a("a",{key:0,class:"btn",href:s.public_path,target:"_blank",rel:"noopener noreferrer"},[...e[2]||(e[2]=[l(" Otwórz wersję publiczną ",-1),o("span",{class:"sr-only"},"(otwiera się w nowej karcie)",-1)])],8,A)):s.is_published?y("",!0):(n(),a("p",E,"Link publiczny zacznie działać po opublikowaniu prezentacji.")),p(z,{class:"btn",to:{name:"presentation-remote",params:{slug:s.slug}}},{default:_(()=>[...e[3]||(e[3]=[l(" Pilot ",-1),o("span",{class:"sr-only"},"(otwórz na telefonie)",-1)])]),_:1},8,["to"])])]))),128))])):(n(),a("p",G,[...e[4]||(e[4]=[o("span",{class:"title",style:{display:"block",color:"var(--ink)"}},"Nie masz jeszcze żadnych prezentacji.",-1),l(" Pojawią się tutaj, gdy administrator przypisze prezentację do Twojego konta. ",-1)])]))]),_:1},8,["ready","error"])])}}});export{Q as default}; diff --git a/public/assets/NotFoundView-CiR7B3dL.js b/public/assets/NotFoundView-CiR7B3dL.js new file mode 100644 index 0000000..149dfa2 --- /dev/null +++ b/public/assets/NotFoundView-CiR7B3dL.js @@ -0,0 +1 @@ +import{_ as s}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{o as a,c as r,a as t,h as n,i as l,m as c,k as i}from"./index-CvyVvvnt.js";const d={},p={class:"stack"};function _(m,e){const o=i("router-link");return a(),r("div",p,[e[1]||(e[1]=t("header",{class:"page-head"},[t("span",{class:"eyebrow"},"404"),t("h1",null,"Nie ma takiej strony")],-1)),t("p",null,[n(o,{to:"/"},{default:l(()=>[...e[0]||(e[0]=[c("Wróć na pulpit",-1)])]),_:1})])])}const k=s(d,[["render",_]]);export{k as default}; diff --git a/public/assets/NotFoundView-DA_P-c9x.js b/public/assets/NotFoundView-DA_P-c9x.js deleted file mode 100644 index 8a9e827..0000000 --- a/public/assets/NotFoundView-DA_P-c9x.js +++ /dev/null @@ -1 +0,0 @@ -import{o as r,c,a as o,h as l,i,m as d,k as p}from"./index-LFNXxSi2.js";const _=(s,e)=>{const t=s.__vccOpts||s;for(const[n,a]of e)t[n]=a;return t},u={},f={class:"stack"};function k(s,e){const t=p("router-link");return r(),c("div",f,[e[1]||(e[1]=o("header",{class:"page-head"},[o("span",{class:"eyebrow"},"404"),o("h1",null,"Nie ma takiej strony")],-1)),o("p",null,[l(t,{to:"/"},{default:i(()=>[...e[0]||(e[0]=[d("Wróć na pulpit",-1)])]),_:1})])])}const x=_(u,[["render",k]]);export{x as default}; diff --git a/public/assets/PageHead.vue_vue_type_script_setup_true_lang-l9qe_URH.js b/public/assets/PageHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js similarity index 84% rename from public/assets/PageHead.vue_vue_type_script_setup_true_lang-l9qe_URH.js rename to public/assets/PageHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js index 44afc69..2a930fb 100644 --- a/public/assets/PageHead.vue_vue_type_script_setup_true_lang-l9qe_URH.js +++ b/public/assets/PageHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js @@ -1 +1 @@ -import{d as r,c as s,t as o,e as c,a as t,R as d,o as a}from"./index-LFNXxSi2.js";const l={class:"page-head"},i={key:0,class:"eyebrow"},_={class:"row"},h={class:"btn-row"},u=r({__name:"PageHead",props:{eyebrow:{},title:{}},setup(e){return(n,m)=>(a(),s("header",l,[e.eyebrow?(a(),s("span",i,o(e.eyebrow),1)):c("",!0),t("div",_,[t("h1",null,o(e.title),1),t("div",h,[d(n.$slots,"default")])])]))}});export{u as _}; +import{d as r,c as s,t as o,e as c,a as t,R as d,o as a}from"./index-CvyVvvnt.js";const l={class:"page-head"},i={key:0,class:"eyebrow"},_={class:"row"},h={class:"btn-row"},u=r({__name:"PageHead",props:{eyebrow:{},title:{}},setup(e){return(n,m)=>(a(),s("header",l,[e.eyebrow?(a(),s("span",i,o(e.eyebrow),1)):c("",!0),t("div",_,[t("h1",null,o(e.title),1),t("div",h,[d(n.$slots,"default")])])]))}});export{u as _}; diff --git a/public/assets/PresentationPublicView-1pAdHNma.js b/public/assets/PresentationPublicView-CnKQnORE.js similarity index 88% rename from public/assets/PresentationPublicView-1pAdHNma.js rename to public/assets/PresentationPublicView-CnKQnORE.js index 3b4ed29..058838b 100644 --- a/public/assets/PresentationPublicView-1pAdHNma.js +++ b/public/assets/PresentationPublicView-CnKQnORE.js @@ -1 +1 @@ -import{d as k,A as h,q as b,S as g,B as w,r as u,o as _,Q as l}from"./index-LFNXxSi2.js";import{p as y}from"./presentations-W-oMAxZb.js";import{_ as E}from"./DeckViewer.vue_vue_type_style_index_0_lang-Dsql2yXf.js";const x="Sprawdź połączenie z internetem i spróbuj ponownie.",z="Za dużo żądań w krótkim czasie. Odczekaj minutę i spróbuj ponownie.",j="Prezentacja · BM II°",S=k({__name:"PresentationPublicView",props:{slugHash:{}},setup(f){const d=f,n=u("pending"),r=u(null),a=u("");let s=0,o=0;function c(){s&&window.clearTimeout(s),s=0}async function m(t){const i=++o;c(),document.title=j,n.value="pending",r.value=null,a.value="",s=window.setTimeout(()=>{i===o&&n.value==="pending"&&(n.value="loading")},200);try{const e=await y.publicDeck(t);if(i!==o)return;c();const p=e.slides??[];r.value={...e,slides:p},e.title&&(document.title=e.title),n.value=p.length===0?"empty":"ready"}catch(e){if(i!==o)return;if(c(),e instanceof l&&e.status===404){n.value="notfound";return}e instanceof l&&e.status===429?a.value=z:e instanceof l&&e.message?a.value=e.message:a.value=x,n.value="error"}}function v(){m(d.slugHash)}return h(()=>d.slugHash,t=>{m(t)},{immediate:!0}),b(()=>{if(document.documentElement.classList.add("deck-public"),!document.querySelector('meta[data-deck-public="1"]')){const t=document.createElement("meta");t.name="robots",t.content="noindex",t.dataset.deckPublic="1",document.head.appendChild(t)}}),g(()=>{o+=1,c(),document.documentElement.classList.remove("deck-public"),document.querySelector('meta[data-deck-public="1"]')?.remove()}),(t,i)=>(_(),w(E,{phase:n.value,deck:r.value,error:a.value,"extra-css":r.value?.css,onRetry:v},null,8,["phase","deck","error","extra-css"]))}});export{S as default}; +import{d as k,A as h,q as b,S as g,B as w,r as u,o as _,Q as l}from"./index-CvyVvvnt.js";import{p as y}from"./presentations-B2_nwGC8.js";import{_ as E}from"./DeckViewer.vue_vue_type_style_index_0_lang-TWCMyUu3.js";const x="Sprawdź połączenie z internetem i spróbuj ponownie.",z="Za dużo żądań w krótkim czasie. Odczekaj minutę i spróbuj ponownie.",j="Prezentacja · BM II°",S=k({__name:"PresentationPublicView",props:{slugHash:{}},setup(f){const d=f,n=u("pending"),r=u(null),a=u("");let s=0,o=0;function c(){s&&window.clearTimeout(s),s=0}async function m(t){const i=++o;c(),document.title=j,n.value="pending",r.value=null,a.value="",s=window.setTimeout(()=>{i===o&&n.value==="pending"&&(n.value="loading")},200);try{const e=await y.publicDeck(t);if(i!==o)return;c();const p=e.slides??[];r.value={...e,slides:p},e.title&&(document.title=e.title),n.value=p.length===0?"empty":"ready"}catch(e){if(i!==o)return;if(c(),e instanceof l&&e.status===404){n.value="notfound";return}e instanceof l&&e.status===429?a.value=z:e instanceof l&&e.message?a.value=e.message:a.value=x,n.value="error"}}function v(){m(d.slugHash)}return h(()=>d.slugHash,t=>{m(t)},{immediate:!0}),b(()=>{if(document.documentElement.classList.add("deck-public"),!document.querySelector('meta[data-deck-public="1"]')){const t=document.createElement("meta");t.name="robots",t.content="noindex",t.dataset.deckPublic="1",document.head.appendChild(t)}}),g(()=>{o+=1,c(),document.documentElement.classList.remove("deck-public"),document.querySelector('meta[data-deck-public="1"]')?.remove()}),(t,i)=>(_(),w(E,{phase:n.value,deck:r.value,error:a.value,"extra-css":r.value?.css,onRetry:v},null,8,["phase","deck","error","extra-css"]))}});export{S as default}; diff --git a/public/assets/PresentationRemoteView-D3-kZqrb.css b/public/assets/PresentationRemoteView-D3-kZqrb.css new file mode 100644 index 0000000..4234dcc --- /dev/null +++ b/public/assets/PresentationRemoteView-D3-kZqrb.css @@ -0,0 +1 @@ +html.deck-remote,html.deck-remote body{margin:0;background:#141a18;color-scheme:dark}.remote[data-v-c232a88e]{--r-paper: #141a18;--r-paper-2: #1c2421;--r-ink: #e4e4da;--r-ink-2: #a7ada4;--r-rule: #3a443f;--r-empire: #e0675f;--r-error-bg: #35221b;position:relative;min-height:100dvh;background:var(--r-paper);color:var(--r-ink);font-family:Courier Prime,ui-monospace,monospace}.remote-status[data-v-c232a88e]{padding:32px 16px;text-align:center}.remote-muted[data-v-c232a88e]{color:var(--r-ink-2)}.remote-top[data-v-c232a88e]{padding:8px 16px;background:var(--r-paper-2)}.remote-title[data-v-c232a88e]{margin:0;font-size:12px;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.remote-counter[data-v-c232a88e]{margin:4px 0 0;font-size:28px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums}.remote-offline[data-v-c232a88e]{margin:16px 16px 0;padding:32px 16px;border:1px dashed var(--r-rule);text-align:center}.remote-offline p[data-v-c232a88e]{margin:0}.remote-offline .remote-offline-head[data-v-c232a88e]{margin-bottom:8px}.remote-alert[data-v-c232a88e]{margin:0;padding:8px 16px;background:var(--r-error-bg);border-left:3px solid var(--r-empire)}.remote-keys[data-v-c232a88e]{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;padding:16px}.remote-key[data-v-c232a88e],.remote-retry[data-v-c232a88e]{min-height:48px;border:1px solid var(--r-ink-2);border-radius:0;background:var(--r-paper-2);color:var(--r-ink);font:inherit;font-size:16px;touch-action:manipulation}.remote-key[data-v-c232a88e]{grid-column:span 2;min-height:96px}.remote-next[data-v-c232a88e]{grid-column:span 4;border:2px solid var(--r-ink)}.remote-key[data-v-c232a88e]:active{background:var(--r-rule)}.remote-key[data-v-c232a88e]:disabled{opacity:.4;cursor:default}.remote-key[data-v-c232a88e]:focus-visible,.remote-retry[data-v-c232a88e]:focus-visible{outline:3px solid var(--r-empire);outline-offset:2px}@media(max-height:480px){.remote-key[data-v-c232a88e]{min-height:64px}} diff --git a/public/assets/PresentationRemoteView-DCKt4fp6.js b/public/assets/PresentationRemoteView-DCKt4fp6.js new file mode 100644 index 0000000..d9a214f --- /dev/null +++ b/public/assets/PresentationRemoteView-DCKt4fp6.js @@ -0,0 +1 @@ +import{d as H,A,q as J,S as X,c as s,a as o,t as h,F as ee,e as N,r as u,s as te,o as l,Q as _,l as ne}from"./index-CvyVvvnt.js";import{p as P}from"./presentations-B2_nwGC8.js";import{e as oe,f as L,o as ae,b as ie,R as re}from"./realtime-DuTUbwvj.js";import{_ as se}from"./_plugin-vue_export-helper-DlAUqK2U.js";const le={class:"remote"},ce={key:0,class:"remote-status"},ue={key:1,class:"remote-status"},de={key:2,class:"remote-status"},me={class:"remote-top"},pe={class:"remote-title"},ve={class:"remote-counter","aria-live":"polite"},fe={key:0,class:"remote-alert",role:"alert"},we={key:1,class:"remote-offline"},ye={class:"remote-keys","aria-label":"Klawisze na komputerze"},be=["disabled"],ke=["disabled"],he="Nie udało się wczytać prezentacji. Sprawdź połączenie z internetem i spróbuj ponownie.",_e="Za dużo żądań w krótkim czasie. Odczekaj minutę i spróbuj ponownie.",ze=H({__name:"PresentationRemoteView",props:{slug:{}},setup(B){const w=B,M=ne(),a=u("pending"),i=u(null),z=u(""),d=u("");let y=0,m=0,r=0,j=null,E="",b=0,p=!1,q=0,x=0,v=L();const g=u(null),c=u(!1),O=te(()=>{const e=i.value?.slides.length??0,t=g.value;return c.value&&t?`${t.number} / ${t.total}`:`— / ${e}`});function S(){c.value=v.live(Date.now())}function F(e){const t=ie(e);!t||t.event!==re||v.observe(t.payload,Date.now())&&(g.value=v.current(),S())}function k(){y&&window.clearTimeout(y),y=0}function K(e){const t=e instanceof _?e.status:-1;return t===0?"Nie wysłano: brak połączenia z internetem. Naciśnij ponownie.":t===429?"Za dużo naciśnięć naraz. Odczekaj chwilę i naciśnij ponownie.":t===503?"Pilot jest teraz niedostępny. Steruj klawiaturą na komputerze.":"Nie wysłano polecenia. Naciśnij ponownie."}function W(e){d.value=e,r&&window.clearTimeout(r),r=window.setTimeout(()=>{d.value="",r=0},4e3)}function D(){r&&window.clearTimeout(r),r=0,d.value=""}async function Z(e){try{await P.remote(w.slug,{action:e,tab:v.actionTab()}),D()}catch(t){W(K(t))}}function T(){p&&P.remote(w.slug,{action:"sync",tab:""}).catch(()=>{})}function Q(){p=!0,T()}function I(){document.visibilityState==="visible"&&T()}function V(e){c.value&&(navigator.vibrate?.(15),Z(e))}function R(){b+=1,j?.close(),j=null,E="",p=!1,v=L(),g.value=null,S()}async function U(e){R();const t=b;E=e;try{const n=()=>t===b,f=await ae(e,{onPublication:C=>{n()&&F(C)},onSubscribed:()=>{n()&&Q()},onConnection:C=>{n()&&C!=="connected"&&(p=!1)},onDenied:()=>{n()&&(p=!1)}});if(t!==b){f.close();return}j=f}catch{}}function Y(){const e=a.value==="ready"?i.value?.remote_channel??"":"";if(e!==E){if(!e){R();return}U(e)}}async function $(e){const t=++m;k(),a.value="pending",i.value=null,z.value="",y=window.setTimeout(()=>{t===m&&a.value==="pending"&&(a.value="loading")},200);try{const n=await P.speaker(e);if(t!==m)return;k();const f=n.slides??[];i.value={...n,slides:f},document.title=n.title?`Pilot · ${n.title}`:"Pilot · BM II°",a.value=f.length===0?"empty":"ready"}catch(n){if(t!==m)return;if(k(),n instanceof _&&n.status===404){await M.replace({name:"my-presentations",query:{denied:"1"}});return}if(n instanceof _&&n.status===401)return;z.value=n instanceof _&&n.status===429?_e:he,a.value="error"}}function G(){$(w.slug)}return A(()=>w.slug,e=>{$(e)},{immediate:!0}),A([i,a],()=>{Y()}),J(()=>{if(document.documentElement.classList.add("deck-remote"),!document.querySelector('meta[data-deck-remote="robots"]')){const e=document.createElement("meta");e.name="robots",e.content="noindex",e.dataset.deckRemote="robots",document.head.appendChild(e)}if(!document.querySelector('meta[data-deck-remote="theme"]')){const e=document.createElement("meta");e.name="theme-color",e.content="#141a18",e.dataset.deckRemote="theme",document.head.appendChild(e)}document.addEventListener("visibilitychange",I),q=window.setInterval(()=>{document.visibilityState==="visible"&&T()},oe),x=window.setInterval(S,1e3)}),X(()=>{m+=1,k(),D(),R(),window.clearInterval(q),window.clearInterval(x),document.removeEventListener("visibilitychange",I),document.documentElement.classList.remove("deck-remote"),document.querySelectorAll("meta[data-deck-remote]").forEach(e=>e.remove())}),(e,t)=>(l(),s("main",le,[a.value==="loading"?(l(),s("p",ce,"Wczytywanie pilota…")):a.value==="error"?(l(),s("div",ue,[o("p",null,h(z.value),1),o("button",{type:"button",class:"remote-retry",onClick:G},"Spróbuj ponownie")])):a.value==="empty"?(l(),s("div",de,[...t[2]||(t[2]=[o("p",null,"Ta prezentacja nie ma jeszcze slajdów.",-1),o("p",{class:"remote-muted"},"Dodaj slajdy w panelu administracyjnym i otwórz pilota ponownie.",-1)])])):a.value==="ready"&&i.value?(l(),s(ee,{key:3},[o("header",me,[o("p",pe,h(i.value.title),1),o("p",ve,h(O.value),1)]),d.value?(l(),s("p",fe,h(d.value),1)):N("",!0),c.value?N("",!0):(l(),s("div",we,[...t[3]||(t[3]=[o("p",{class:"remote-offline-head"},"Otwórz wersję mówcy na komputerze",-1),o("p",{class:"remote-muted"},"Klawisze zadziałają, gdy wersja mówcy tej prezentacji będzie otwarta na komputerze.",-1)])])),o("section",ye,[o("button",{type:"button",class:"remote-key",disabled:!c.value,onClick:t[0]||(t[0]=n=>V("prev"))},"Wstecz",8,be),o("button",{type:"button",class:"remote-key remote-next",disabled:!c.value,onClick:t[1]||(t[1]=n=>V("next"))},"Dalej",8,ke)])],64)):N("",!0)]))}}),Te=se(ze,[["__scopeId","data-v-c232a88e"]]);export{Te as default}; diff --git a/public/assets/PresentationSpeakerView-BpKWeYat.js b/public/assets/PresentationSpeakerView-BpKWeYat.js deleted file mode 100644 index 1c8193b..0000000 --- a/public/assets/PresentationSpeakerView-BpKWeYat.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SpeakerTools-CZrzKggt.js","assets/index-LFNXxSi2.js","assets/index-iQcTjyfL.css"])))=>i.map(i=>d[i]); -import{d as G,A as N,q as J,S as K,B as O,i as q,r as z,s as W,Q as U,o as A,a as V,b as X,e as Y,T as ee,l as te,U as ne}from"./index-LFNXxSi2.js";import{p as H}from"./presentations-W-oMAxZb.js";import{_ as oe}from"./DeckViewer.vue_vue_type_style_index_0_lang-Dsql2yXf.js";function B(d){const p=d<0,g=Math.abs(Math.round(d)),v=Math.floor(g/60),s=g%60;return(p?"−":"")+v+":"+(s<10?"0":"")+s}function ae(d){const p=d.budgets.map(n=>Number.isFinite(n)&&n>0?n:0),g=p.reduce((n,m)=>n+m,0),v=d.targetSeconds>0?d.targetSeconds:g,s=p.map(()=>0);let r=0,a=0,u=0,k=!1;function L(n){return p.length===0?0:Math.max(0,Math.min(p.length-1,n))}function C(){return a===0&&r===0}function y(){const n=p[u]??0,m=s[u]??0,$=n-m;let E="",b=!1;if(!C()){let _=Math.min(m,n);for(let x=0;x=0?"zapas "+B(f):"opóźnienie "+B(-f)}return{slide:n?B($):"—",total:B(v-r),pace:E,slideOver:n>0&&$<0,totalOver:r>v,late:b,idle:C(),paused:a===0&&r>0,hidden:k}}function h(){if(!a)return;const n=d.now(),m=(n-a)/1e3;a=n,p.length>0&&(s[u]+=m),r+=m}function l(n){u=L(n),a===0&&r===0&&(a=d.now())}function R(n){u=L(n)}function w(){!r&&!a||(h(),a=a?0:d.now())}function S(){for(let n=0;nne(()=>import("./SpeakerTools-CZrzKggt.js"),__vite__mapDeps([0,1,2]))),g=d,v=te(),s=z("pending"),r=z(null),a=z("");let u=0,k=0;const L=W(()=>[r.value?.css??"",se]),C={notes:"Notatki",say:"Powiedz",sources:"Źródła",specialLink:"Slajd specjalny (S)"},y=z(null),h=z({});let l=null,R=0,w=0;const S=[];function n(){y.value=l?.view()??null}function m(t,o){if(!t||!o){l=null,y.value=null;return}l=ae({budgets:t.slides.map(e=>e.seconds),targetSeconds:t.target_seconds,now:()=>Date.now()}),n()}function $(t){l?.seek(t),n()}function E(t){l?.go(t),n()}function b(t){l&&(t==="pause"?l.pause():t==="clock"?l.toggleHidden():l.reset(),n())}function _(){window.close(),v.replace("/moje-prezentacje")}function f(){u&&window.clearTimeout(u),u=0}function x(){for(const t of S)URL.revokeObjectURL(t);S.length=0,h.value={}}function Z(t){const o=new Set,e=c=>{const j=/data-deck-image="([^"]+)"/g;for(let T=j.exec(c);T;T=j.exec(c))o.add(T[1])},i=c=>{e(c.body_html),e(c.say_html),e(c.notes_html),e(c.sources_html),c.special&&i(c.special)};for(const c of t.slides)i(c);return[...o]}async function P(t,o,e){await Promise.all(Z(t).map(async i=>{try{const c=await H.speakerImage(o,i);if(e!==w)return;const j=URL.createObjectURL(c);if(e!==w){URL.revokeObjectURL(j);return}S.push(j),h.value={...h.value,[i]:j}}catch{}}))}function D(t,o){const e=t;return`${o?'':""}${e.body_html}`}function F(t){return t.special?`Slajd specjalny do slajdu ${t.number}`:`Slajd ${t.number} z ${t.total}`}async function M(t){const o=++k;w=o,x(),f(),s.value="pending",r.value=null,a.value="",u=window.setTimeout(()=>{o===k&&s.value==="pending"&&(s.value="loading")},200);try{const e=await H.speaker(t);if(o!==k)return;f();const i=e.slides??[],c={...e,slides:i};r.value=c,document.title=e.title?`${e.title} · wersja prelegenta`:"Prezentacja · BM II°",s.value=i.length===0?"empty":"ready",i.length>0&&P(c,t,o)}catch(e){if(o!==k)return;if(f(),e instanceof U&&e.status===404){await v.replace({name:"my-presentations",query:{denied:"1"}});return}if(e instanceof U&&e.status===401)return;e instanceof U&&e.status===429?a.value=ce:e instanceof U&&e.message?a.value=e.message:a.value=re,s.value="error"}}function Q(){M(g.slug)}function I(t){t.persisted&&M(g.slug)}return N(()=>g.slug,t=>{M(t)},{immediate:!0}),N([r,s],()=>{m(r.value,s.value==="ready")}),J(()=>{if(document.documentElement.classList.add("deck-speaker"),!document.querySelector('meta[data-deck-speaker="1"]')){const t=document.createElement("meta");t.name="robots",t.content="noindex",t.dataset.deckSpeaker="1",document.head.appendChild(t)}window.addEventListener("pageshow",I),R=window.setInterval(()=>{l?.tick(),n()},250)}),K(()=>{k+=1,w=k,x(),f(),window.clearInterval(R),window.removeEventListener("pageshow",I),document.documentElement.classList.remove("deck-speaker"),document.querySelector('meta[data-deck-speaker="1"]')?.remove()}),(t,o)=>(A(),O(oe,{mode:"speaker",phase:s.value,deck:r.value,error:a.value,compose:D,labels:C,announce:F,"extra-css":L.value,images:h.value,onRetry:Q,onPosition:$,onNavigate:E,onClock:b},{tools:q(e=>[y.value?(A(),O(X(p),{key:0,clock:y.value,panel:e.panel,special:e.special,"has-special":e.hasSpecial,"fullscreen-enabled":e.fullscreenEnabled,"fullscreen-on":e.fullscreenOn,"toolbar-hidden":e.toolbarHidden,"toggle-panel":e.togglePanel,"toggle-special":e.toggleSpecial,"toggle-toolbar":e.toggleToolbar,"toggle-fullscreen":e.toggleFullscreen,onPause:o[0]||(o[0]=i=>b("pause")),onReset:o[1]||(o[1]=i=>b("reset")),onToggleHidden:o[2]||(o[2]=i=>b("clock")),onClose:_},null,8,["clock","panel","special","has-special","fullscreen-enabled","fullscreen-on","toolbar-hidden","toggle-panel","toggle-special","toggle-toolbar","toggle-fullscreen"])):Y("",!0)]),"reading-close":q(()=>[V("div",{class:"reading-close"},[V("button",{type:"button",onClick:_},"Zamknij")])]),_:1},8,["phase","deck","error","extra-css","images"]))}});export{pe as default}; diff --git a/public/assets/PresentationSpeakerView-CV1WMYIv.js b/public/assets/PresentationSpeakerView-CV1WMYIv.js new file mode 100644 index 0000000..5602d94 --- /dev/null +++ b/public/assets/PresentationSpeakerView-CV1WMYIv.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SpeakerTools-Bho-eA9w.js","assets/index-CvyVvvnt.js","assets/index-iQcTjyfL.css"])))=>i.map(i=>d[i]); +import{d as Ce,A as le,q as Be,S as Ne,B as ce,i as de,r as E,s as $e,Q as I,o as ue,a as pe,b as De,e as Oe,T as Ue,l as Ie,U as Pe}from"./index-CvyVvvnt.js";import{p as P}from"./presentations-B2_nwGC8.js";import{_ as He,r as Ve}from"./DeckViewer.vue_vue_type_style_index_0_lang-TWCMyUu3.js";import{n as qe,C as Ze,c as fe,a as Fe,p as me,S as Ke,o as Ye,D as Ge,H as ke,b as Qe,R as Je,r as We,d as Xe}from"./realtime-DuTUbwvj.js";function H(o){const s=o<0,c=Math.abs(Math.round(o)),d=Math.floor(c/60),a=c%60;return(s?"−":"")+d+":"+(a<10?"0":"")+a}function he(o){return o.map(s=>Number.isFinite(s)&&s>0?s:0)}function ge(o){return Number.isFinite(o)&&o>0?o:0}function et(o){const s=he(o.budgets),c=s.reduce((y,f)=>y+f,0),d=o.targetSeconds>0?o.targetSeconds:c,a=s.length===0?0:Math.max(0,Math.min(s.length-1,Math.trunc(o.index)||0)),r=ge(o.elapsed),p=ge(o.slideElapsed),h=s[a]??0,w=h-p;let g="",S=!1;if(!o.idle){let y=Math.min(p,h);for(let v=0;v=0?"zapas "+H(f):"opóźnienie "+H(-f)}return{slide:h?H(w):"—",total:H(d-r),pace:g,slideOver:h>0&&w<0,totalOver:r>d,late:S,idle:o.idle,paused:o.paused,hidden:o.hidden,elapsed:Math.floor(r),slideElapsed:Math.floor(p)}}function tt(o){const s=he(o.budgets),c=s.map(()=>0);let d=0,a=0,r=0,p=!1;function h(u){return s.length===0?0:Math.max(0,Math.min(s.length-1,u))}function w(){return a===0&&d===0}function g(){return et({budgets:s,targetSeconds:o.targetSeconds,index:r,slideElapsed:c[r]??0,elapsed:d,idle:w(),paused:a===0&&d>0,hidden:p})}function S(){if(!a)return;const u=o.now(),T=(u-a)/1e3;a=u,s.length>0&&(c[r]+=T),d+=T}function y(u){r=h(u),a===0&&d===0&&(a=o.now())}function f(u){r=h(u)}function v(){!d&&!a||(S(),a=a?0:o.now())}function m(){for(let u=0;uPe(()=>import("./SpeakerTools-Bho-eA9w.js"),__vite__mapDeps([0,1,2]))),c=o,d=Ie(),a=E("pending"),r=E(null),p=E(""),h=E(null);let w=0,g=0;const S=$e(()=>[r.value?.css??"",nt]),y={notes:"Notatki",say:"Powiedz",sources:"Źródła",specialLink:"Slajd specjalny (S)"},f=E(null),v=E({});let m=null,u=0,T=0;const V=[];function j(){f.value=m?.view()??null}function ve(e,n){if(!e||!n){m=null,f.value=null;return}m=tt({budgets:e.slides.map(t=>t.seconds),targetSeconds:e.target_seconds,now:()=>Date.now()}),j()}function be(e){m?.seek(e),j()}function we(e){m?.go(e),j()}function M(e){m&&(e==="pause"?m.pause():e==="clock"?m.toggleHidden():m.reset(),j(),oe())}const z=qe(),q=E(null);let C=null,Z="",F=0,b=fe(z),k=!1,K=!1,B=!1,te=0,N=0,Y=!1,R=0,A=0,G=null;const L=Fe(ye,Ke);function $(){return Ve(e=>window.matchMedia(e))}function Q(e){return G?Xe(G,m?.view()??null,z,e):null}function ne(e){P.remoteState(c.slug,e).catch(()=>{})}function ye(){if(!k||!b.isActive()||$())return;const e=Q();e&&ne(e)}function oe(){k&&b.isActive()&&L.call()}function D(){if(!k||$())return;const e=Q({claim:!0});if(!e){B=!0;return}B=!1,te=Date.now(),L.cancel(),ne(e)}function x(){const e=k?b.activeTab():null;let n=null;e===z?n=me(N,Date.now())?"active":null:e&&(n="elsewhere"),q.value!==n&&(q.value=n)}function xe(e){G=e,B?D():oe()}function Se(e){const n=h.value;if(!n)return;if(e.action==="goto"){e.number!=null&&n.goToNumber(e.number);return}const t=We(e.action);t&&n.runKey(t)}function Te(e){const n=Qe(e);if(n){if(n.event===Je){b.observe(n.payload),x();return}if(N=Date.now(),x(),!($()||!b.shouldApply(n.payload))){if(n.payload.action==="sync"){L.flush();return}Se(n.payload)}}}function Ee(){k=!0,K?b.isActive()&&D():(K=!0,D()),x()}function O(){!k||b.isActive()||$()||Date.now()-ten===F;try{const l=await Ye(e,{onPublication:i=>{t()&&Te(i)},onSubscribed:()=>{t()&&Ee()},onConnection:i=>{!t()||i==="connected"||(k=!1,x())},onDenied:i=>{t()&&(k=!1,x(),!(i!==403||Y)&&(Y=!0,R=window.setTimeout(()=>{R=0,t()&&C?.resubscribe()},Ge)))},onUnavailable:()=>{t()&&(k=!1,x())}});if(!t()){l.close();return}C=l,A=window.setTimeout(ae,ke)}catch{}}function je(){const e=a.value==="ready"?r.value?.remote_channel??"":"";if(e!==Z){if(!e){W();return}_e(e)}}function ie(){window.close(),d.replace("/moje-prezentacje")}function U(){w&&window.clearTimeout(w),w=0}function se(){for(const e of V)URL.revokeObjectURL(e);V.length=0,v.value={}}function Re(e){const n=new Set,t=i=>{const _=/data-deck-image="([^"]+)"/g;for(let ee=_.exec(i);ee;ee=_.exec(i))n.add(ee[1])},l=i=>{t(i.body_html),t(i.say_html),t(i.notes_html),t(i.sources_html),i.special&&l(i.special)};for(const i of e.slides)l(i);return[...n]}async function Ae(e,n,t){await Promise.all(Re(e).map(async l=>{try{const i=await P.speakerImage(n,l);if(t!==T)return;const _=URL.createObjectURL(i);if(t!==T){URL.revokeObjectURL(_);return}V.push(_),v.value={...v.value,[l]:_}}catch{}}))}function Le(e,n){const t=e;return`${n?'':""}${t.body_html}`}function Me(e){return e.special?`Slajd specjalny do slajdu ${e.number}`:`Slajd ${e.number} z ${e.total}`}async function X(e){const n=++g;T=n,se(),U(),a.value="pending",r.value=null,p.value="",w=window.setTimeout(()=>{n===g&&a.value==="pending"&&(a.value="loading")},200);try{const t=await P.speaker(e);if(n!==g)return;U();const l=t.slides??[],i={...t,slides:l};r.value=i,document.title=t.title?`${t.title} · wersja prelegenta`:"Prezentacja · BM II°",a.value=l.length===0?"empty":"ready",l.length>0&&Ae(i,e,n)}catch(t){if(n!==g)return;if(U(),t instanceof I&&t.status===404){await d.replace({name:"my-presentations",query:{denied:"1"}});return}if(t instanceof I&&t.status===401)return;t instanceof I&&t.status===429?p.value=at:t instanceof I&&t.message?p.value=t.message:p.value=ot,a.value="error"}}function ze(){X(c.slug)}function re(e){e.persisted&&X(c.slug)}return le(()=>c.slug,e=>{X(e)},{immediate:!0}),le([r,a],()=>{ve(r.value,a.value==="ready"),je()}),Be(()=>{if(document.documentElement.classList.add("deck-speaker"),!document.querySelector('meta[data-deck-speaker="1"]')){const e=document.createElement("meta");e.name="robots",e.content="noindex",e.dataset.deckSpeaker="1",document.head.appendChild(e)}window.addEventListener("pageshow",re),window.addEventListener("pagehide",J),window.addEventListener("keydown",O,!0),window.addEventListener("pointerdown",O,!0),u=window.setInterval(()=>{m?.tick(),j(),x()},250)}),Ne(()=>{g+=1,T=g,se(),U(),J(),W(),window.clearInterval(u),window.removeEventListener("pageshow",re),window.removeEventListener("pagehide",J),window.removeEventListener("keydown",O,!0),window.removeEventListener("pointerdown",O,!0),document.documentElement.classList.remove("deck-speaker"),document.querySelector('meta[data-deck-speaker="1"]')?.remove()}),(e,n)=>(ue(),ce(He,{ref_key:"viewer",ref:h,mode:"speaker",phase:a.value,deck:r.value,error:p.value,compose:Le,labels:y,announce:Me,"extra-css":S.value,images:v.value,onRetry:ze,onPosition:be,onNavigate:we,onClock:M,onSnapshot:xe},{tools:de(t=>[f.value?(ue(),ce(De(s),{key:0,clock:f.value,panel:t.panel,special:t.special,"has-special":t.hasSpecial,"fullscreen-enabled":t.fullscreenEnabled,"fullscreen-on":t.fullscreenOn,"toolbar-hidden":t.toolbarHidden,"toggle-panel":t.togglePanel,"toggle-special":t.toggleSpecial,"toggle-toolbar":t.toggleToolbar,"toggle-fullscreen":t.toggleFullscreen,pilot:q.value,onPause:n[0]||(n[0]=l=>M("pause")),onReset:n[1]||(n[1]=l=>M("reset")),onToggleHidden:n[2]||(n[2]=l=>M("clock")),onClose:ie},null,8,["clock","panel","special","has-special","fullscreen-enabled","fullscreen-on","toolbar-hidden","toggle-panel","toggle-special","toggle-toolbar","toggle-fullscreen","pilot"])):Oe("",!0)]),"reading-close":de(()=>[pe("div",{class:"reading-close"},[pe("button",{type:"button",onClick:ie},"Zamknij")])]),_:1},8,["phase","deck","error","extra-css","images"]))}});export{ct as default}; diff --git a/public/assets/ProfileView-B2CbG48x.js b/public/assets/ProfileView-CyRqKzB5.js similarity index 98% rename from public/assets/ProfileView-B2CbG48x.js rename to public/assets/ProfileView-CyRqKzB5.js index 1a799ae..02250a2 100644 --- a/public/assets/ProfileView-B2CbG48x.js +++ b/public/assets/ProfileView-CyRqKzB5.js @@ -1 +1 @@ -import{d as L,u as O,p as S,C as $,M as E,N as W,q as A,I as U,c as l,h as M,a as e,g as V,t as i,e as r,w as b,v as k,b as o,F as j,y as N,m as D,r as y,O as J,o as n,P as q,n as H}from"./index-LFNXxSi2.js";import{_ as R}from"./PageHead.vue_vue_type_script_setup_true_lang-l9qe_URH.js";import{f as Z}from"./forms-CE5LqaKY.js";const Q={class:"card","aria-labelledby":"dane-h"},X={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"12px"}},Y={key:1,class:"notice",role:"status",style:{"margin-bottom":"12px"}},ee={class:"grid-2"},se={class:"field"},oe={key:0,class:"error-text"},ae={class:"field"},te={key:0,class:"error-text"},le={class:"field"},ne={key:0,class:"error-text"},ie=["disabled"],re={id:"wybor",class:"card section","aria-labelledby":"wybor-h"},de={key:0,class:"skeleton"},ue={key:1,class:"muted"},pe={class:"eyebrow",style:{padding:"0","margin-bottom":"6px"}},me=["name","value","checked","onChange"],ce={key:0,class:"muted small",style:{margin:"4px 0 0"}},ye=["onClick"],we={id:"kalendarz",class:"card section","aria-labelledby":"kalendarz-h"},be={key:0,class:"notice error",role:"alert",style:{margin:"12px 0"}},ke={key:1,class:"skeleton",style:{"margin-top":"12px"}},fe={key:2,style:{"margin-top":"12px"}},ze=["disabled"],ve={class:"field",style:{"margin-top":"12px"}},ge={style:{display:"flex",gap:"8px"}},_e=["value"],he={key:0,class:"muted small",style:{margin:"0"}},xe={class:"check"},je=["checked","disabled"],Ce={class:"check"},Pe=["checked","disabled"],Ue={class:"btn-row",style:{"margin-top":"12px"}},Ve=["disabled"],Ne=["disabled"],De={class:"card section","aria-labelledby":"haslo-h"},Ze={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"12px"}},Fe={key:1,class:"notice",role:"status",style:{"margin-bottom":"12px"}},Ke={class:"field"},Te={key:0,class:"error-text"},Ge={class:"field"},Be={key:0,class:"error-text"},Ie={class:"field"},Le=["disabled"],Oe={class:"section"},Me=L({__name:"ProfileView",setup(Se){const f=O(),z=S(),v=$(),t=E(),C=W();A(()=>{z.loadCourses(),t.load()});const P=y(null);async function F(){const m=t.feed?.url;m&&(await J(m)?C.show("Skopiowano link do schowka."):(P.value?.select(),C.show("Nie udało się skopiować. Link jest zaznaczony: skopiuj go ręcznie.")))}function K(){window.confirm("Wygenerować nowy link? Stary przestanie działać i kalendarze, które go subskrybują, trzeba będzie dodać od nowa.")&&t.rotate()}function T(){window.confirm("Usunąć link do kalendarza? Kalendarze, które go subskrybują, przestaną się aktualizować.")&&t.remove()}function G(m){return new Date(m).toLocaleString("pl-PL",{day:"numeric",month:"long",hour:"2-digit",minute:"2-digit"})}const p=U({name:f.user?.name??"",surname:f.user?.surname??"",email:f.user?.email??""}),g=y(!1),d=y(null),h=y(!1);async function B(){g.value=!0,d.value=null,h.value=!1;try{await f.updateProfile({name:p.name.trim(),surname:p.surname.trim(),email:p.email.trim()}),h.value=!0}catch(m){d.value=Z(m)}finally{g.value=!1}}const u=U({current_password:"",password:"",password_confirmation:""}),_=y(!1),c=y(null),x=y(!1);async function I(){_.value=!0,c.value=null,x.value=!1;try{await H.changePassword({...u}),x.value=!0,Object.assign(u,{current_password:"",password:"",password_confirmation:""})}catch(m){c.value=Z(m)}finally{_.value=!1}}return(m,s)=>(n(),l("div",null,[M(R,{eyebrow:"Konto",title:"Profil"}),e("section",Q,[s[14]||(s[14]=e("h2",{id:"dane-h",style:{"margin-bottom":"12px"}},"Dane",-1)),e("form",{onSubmit:V(B,["prevent"]),novalidate:""},[d.value?.message?(n(),l("p",X,i(d.value.message),1)):r("",!0),h.value?(n(),l("p",Y,"Zapisano.")):r("",!0),e("div",ee,[e("div",se,[s[11]||(s[11]=e("label",{for:"p-name"},"Imię",-1)),b(e("input",{id:"p-name","onUpdate:modelValue":s[0]||(s[0]=a=>p.name=a),type:"text",autocomplete:"given-name"},null,512),[[k,p.name]]),d.value?.fields.name?(n(),l("p",oe,i(d.value.fields.name),1)):r("",!0)]),e("div",ae,[s[12]||(s[12]=e("label",{for:"p-surname"},"Nazwisko",-1)),b(e("input",{id:"p-surname","onUpdate:modelValue":s[1]||(s[1]=a=>p.surname=a),type:"text",autocomplete:"family-name"},null,512),[[k,p.surname]]),d.value?.fields.surname?(n(),l("p",te,i(d.value.fields.surname),1)):r("",!0)])]),e("div",le,[s[13]||(s[13]=e("label",{for:"p-email"},"Adres e-mail",-1)),b(e("input",{id:"p-email","onUpdate:modelValue":s[2]||(s[2]=a=>p.email=a),type:"email",autocomplete:"email",inputmode:"email"},null,512),[[k,p.email]]),d.value?.fields.email?(n(),l("p",ne,i(d.value.fields.email),1)):r("",!0)]),e("button",{class:"btn primary",type:"submit",disabled:g.value},i(g.value?"Zapisywanie…":"Zapisz dane"),9,ie)],32)]),e("section",re,[s[15]||(s[15]=e("h2",{id:"wybor-h",style:{"margin-bottom":"6px"}},"Przedmioty do wyboru",-1)),s[16]||(s[16]=e("p",{class:"muted small"},"Z każdej grupy wybierasz jeden przedmiot. Pozostałe znikną z planu, pulpitu i list (można je pokazać przełącznikiem „Pokaż wszystkie”). Wybór zapamiętuje to urządzenie.",-1)),o(z).loaded.courses?o(z).electiveGroups.length?r("",!0):(n(),l("p",ue,"Nie ma teraz przedmiotów do wyboru.")):(n(),l("div",de)),(n(!0),l(j,null,N(o(z).electiveGroups,a=>(n(),l("fieldset",{key:a.code,style:{border:"0",padding:"0",margin:"14px 0 0"}},[e("legend",pe,i(o(q)(a.code)),1),(n(!0),l(j,null,N(a.options,w=>(n(),l("label",{key:w,class:"check"},[e("input",{type:"radio",name:`g-${a.code}`,value:w,checked:o(v).choices[a.code]===w,onChange:$e=>o(v).choose(a.code,w)},null,40,me),e("span",null,i(w),1)]))),128)),o(v).choices[a.code]?(n(),l("button",{key:1,class:"linkish small",type:"button",onClick:w=>o(v).choose(a.code,null)},"Wyczyść wybór",8,ye)):(n(),l("p",ce,"Jeszcze nie wybrano. Do tego czasu widać wszystkie alternatywy."))]))),128))]),e("section",we,[s[23]||(s[23]=e("h2",{id:"kalendarz-h",style:{"margin-bottom":"6px"}},"Kalendarz Google / telefon",-1)),s[24]||(s[24]=e("p",{class:"muted small"}," Prywatny link do planu zajęć w formacie iCalendar. Dodaj go w Kalendarzu Google albo w telefonie, a zajęcia pojawią się obok Twoich wydarzeń. Plan uwzględnia przedmioty do wyboru wybrane wyżej. ",-1)),o(t).error?(n(),l("p",be,i(o(t).error),1)):r("",!0),o(t).feed===void 0&&(o(t).loading||!o(t).error)?(n(),l("div",ke)):o(t).feed?(n(),l(j,{key:3},[e("div",ve,[s[17]||(s[17]=e("label",{for:"cal-url"},"Twój link (nie udostępniaj go)",-1)),e("div",ge,[e("input",{id:"cal-url",ref_key:"urlInput",ref:P,class:"mono",type:"text",readonly:"",value:o(t).feed.url,style:{"font-size":"14px","min-width":"0"},onFocus:s[4]||(s[4]=a=>a.target.select())},null,40,_e),e("button",{class:"btn",type:"button",onClick:F},"Kopiuj")]),o(t).feed.last_fetched_at?(n(),l("p",he,"Ostatnio pobrany przez kalendarz: "+i(G(o(t).feed.last_fetched_at))+".",1)):r("",!0)]),e("label",xe,[e("input",{type:"checkbox",checked:o(t).feed.include_meetings,disabled:o(t).busy,onChange:s[5]||(s[5]=a=>o(t).save({include_meetings:a.target.checked}))},null,40,je),s[18]||(s[18]=e("span",null,"Zjazdy jako wydarzenia całodniowe",-1))]),e("label",Ce,[e("input",{type:"checkbox",checked:o(t).feed.include_deadlines,disabled:o(t).busy,onChange:s[6]||(s[6]=a=>o(t).save({include_deadlines:a.target.checked}))},null,40,Pe),s[19]||(s[19]=e("span",null,"Terminy z terminarza",-1))]),e("div",Ue,[e("button",{class:"btn small ghost",type:"button",disabled:o(t).busy,onClick:K},"Wygeneruj nowy link",8,Ve),e("button",{class:"btn small miss",type:"button",disabled:o(t).busy,onClick:T},"Usuń link",8,Ne)]),s[20]||(s[20]=e("h3",{class:"eyebrow",style:{margin:"18px 0 6px"}},"Jak dodać",-1)),s[21]||(s[21]=e("ol",{class:"small",style:{margin:"0","padding-left":"20px",display:"grid",gap:"6px"}},[e("li",null,[e("b",null,"Kalendarz Google"),D(" (na komputerze, calendar.google.com): po lewej przy „Inne kalendarze” kliknij „+”, wybierz „Z adresu URL”, wklej link i kliknij „Dodaj kalendarz”. Na telefonie z Androidem kalendarz pojawi się sam po synchronizacji konta Google. ")]),e("li",null,[e("b",null,"iPhone / iPad"),D(": Ustawienia → Kalendarz → Konta → Dodaj konto → Inne → Dodaj subskrybowany kalendarz, wklej link i zapisz. ")])],-1)),s[22]||(s[22]=e("p",{class:"muted small",style:{margin:"10px 0 0"}}," Google odświeża subskrybowane kalendarze co kilka godzin, nie od razu: zmiana planu albo wyboru przedmiotów pojawi się w kalendarzu z opóźnieniem. ",-1))],64)):(n(),l("div",fe,[e("button",{class:"btn primary",type:"button",disabled:o(t).busy,onClick:s[3]||(s[3]=a=>o(t).create())},i(o(t).busy?"Tworzenie…":"Utwórz link do kalendarza"),9,ze)]))]),e("section",De,[s[28]||(s[28]=e("h2",{id:"haslo-h",style:{"margin-bottom":"12px"}},"Zmiana hasła",-1)),e("form",{onSubmit:V(I,["prevent"]),novalidate:""},[c.value?.message?(n(),l("p",Ze,i(c.value.message),1)):r("",!0),x.value?(n(),l("p",Fe,"Hasło zostało zmienione.")):r("",!0),e("div",Ke,[s[25]||(s[25]=e("label",{for:"pw-current"},"Obecne hasło",-1)),b(e("input",{id:"pw-current","onUpdate:modelValue":s[7]||(s[7]=a=>u.current_password=a),type:"password",autocomplete:"current-password"},null,512),[[k,u.current_password]]),c.value?.fields.current_password?(n(),l("p",Te,i(c.value.fields.current_password),1)):r("",!0)]),e("div",Ge,[s[26]||(s[26]=e("label",{for:"pw-new"},"Nowe hasło (min. 8 znaków)",-1)),b(e("input",{id:"pw-new","onUpdate:modelValue":s[8]||(s[8]=a=>u.password=a),type:"password",autocomplete:"new-password"},null,512),[[k,u.password]]),c.value?.fields.password?(n(),l("p",Be,i(c.value.fields.password),1)):r("",!0)]),e("div",Ie,[s[27]||(s[27]=e("label",{for:"pw-confirm"},"Powtórz nowe hasło",-1)),b(e("input",{id:"pw-confirm","onUpdate:modelValue":s[9]||(s[9]=a=>u.password_confirmation=a),type:"password",autocomplete:"new-password"},null,512),[[k,u.password_confirmation]])]),e("button",{class:"btn primary",type:"submit",disabled:_.value||!u.current_password||!u.password},i(_.value?"Zapisywanie…":"Zmień hasło"),9,Le)],32)]),e("section",Oe,[e("button",{class:"btn miss",type:"button",onClick:s[10]||(s[10]=a=>o(f).logout())},"Wyloguj się")])]))}});export{Me as default}; +import{d as L,u as O,p as S,C as $,M as E,N as W,q as A,I as U,c as l,h as M,a as e,g as V,t as i,e as r,w as b,v as k,b as o,F as j,y as N,m as D,r as y,O as J,o as n,P as q,n as H}from"./index-CvyVvvnt.js";import{_ as R}from"./PageHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js";import{f as Z}from"./forms-Ca-hh7T4.js";const Q={class:"card","aria-labelledby":"dane-h"},X={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"12px"}},Y={key:1,class:"notice",role:"status",style:{"margin-bottom":"12px"}},ee={class:"grid-2"},se={class:"field"},oe={key:0,class:"error-text"},ae={class:"field"},te={key:0,class:"error-text"},le={class:"field"},ne={key:0,class:"error-text"},ie=["disabled"],re={id:"wybor",class:"card section","aria-labelledby":"wybor-h"},de={key:0,class:"skeleton"},ue={key:1,class:"muted"},pe={class:"eyebrow",style:{padding:"0","margin-bottom":"6px"}},me=["name","value","checked","onChange"],ce={key:0,class:"muted small",style:{margin:"4px 0 0"}},ye=["onClick"],we={id:"kalendarz",class:"card section","aria-labelledby":"kalendarz-h"},be={key:0,class:"notice error",role:"alert",style:{margin:"12px 0"}},ke={key:1,class:"skeleton",style:{"margin-top":"12px"}},fe={key:2,style:{"margin-top":"12px"}},ze=["disabled"],ve={class:"field",style:{"margin-top":"12px"}},ge={style:{display:"flex",gap:"8px"}},_e=["value"],he={key:0,class:"muted small",style:{margin:"0"}},xe={class:"check"},je=["checked","disabled"],Ce={class:"check"},Pe=["checked","disabled"],Ue={class:"btn-row",style:{"margin-top":"12px"}},Ve=["disabled"],Ne=["disabled"],De={class:"card section","aria-labelledby":"haslo-h"},Ze={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"12px"}},Fe={key:1,class:"notice",role:"status",style:{"margin-bottom":"12px"}},Ke={class:"field"},Te={key:0,class:"error-text"},Ge={class:"field"},Be={key:0,class:"error-text"},Ie={class:"field"},Le=["disabled"],Oe={class:"section"},Me=L({__name:"ProfileView",setup(Se){const f=O(),z=S(),v=$(),t=E(),C=W();A(()=>{z.loadCourses(),t.load()});const P=y(null);async function F(){const m=t.feed?.url;m&&(await J(m)?C.show("Skopiowano link do schowka."):(P.value?.select(),C.show("Nie udało się skopiować. Link jest zaznaczony: skopiuj go ręcznie.")))}function K(){window.confirm("Wygenerować nowy link? Stary przestanie działać i kalendarze, które go subskrybują, trzeba będzie dodać od nowa.")&&t.rotate()}function T(){window.confirm("Usunąć link do kalendarza? Kalendarze, które go subskrybują, przestaną się aktualizować.")&&t.remove()}function G(m){return new Date(m).toLocaleString("pl-PL",{day:"numeric",month:"long",hour:"2-digit",minute:"2-digit"})}const p=U({name:f.user?.name??"",surname:f.user?.surname??"",email:f.user?.email??""}),g=y(!1),d=y(null),h=y(!1);async function B(){g.value=!0,d.value=null,h.value=!1;try{await f.updateProfile({name:p.name.trim(),surname:p.surname.trim(),email:p.email.trim()}),h.value=!0}catch(m){d.value=Z(m)}finally{g.value=!1}}const u=U({current_password:"",password:"",password_confirmation:""}),_=y(!1),c=y(null),x=y(!1);async function I(){_.value=!0,c.value=null,x.value=!1;try{await H.changePassword({...u}),x.value=!0,Object.assign(u,{current_password:"",password:"",password_confirmation:""})}catch(m){c.value=Z(m)}finally{_.value=!1}}return(m,s)=>(n(),l("div",null,[M(R,{eyebrow:"Konto",title:"Profil"}),e("section",Q,[s[14]||(s[14]=e("h2",{id:"dane-h",style:{"margin-bottom":"12px"}},"Dane",-1)),e("form",{onSubmit:V(B,["prevent"]),novalidate:""},[d.value?.message?(n(),l("p",X,i(d.value.message),1)):r("",!0),h.value?(n(),l("p",Y,"Zapisano.")):r("",!0),e("div",ee,[e("div",se,[s[11]||(s[11]=e("label",{for:"p-name"},"Imię",-1)),b(e("input",{id:"p-name","onUpdate:modelValue":s[0]||(s[0]=a=>p.name=a),type:"text",autocomplete:"given-name"},null,512),[[k,p.name]]),d.value?.fields.name?(n(),l("p",oe,i(d.value.fields.name),1)):r("",!0)]),e("div",ae,[s[12]||(s[12]=e("label",{for:"p-surname"},"Nazwisko",-1)),b(e("input",{id:"p-surname","onUpdate:modelValue":s[1]||(s[1]=a=>p.surname=a),type:"text",autocomplete:"family-name"},null,512),[[k,p.surname]]),d.value?.fields.surname?(n(),l("p",te,i(d.value.fields.surname),1)):r("",!0)])]),e("div",le,[s[13]||(s[13]=e("label",{for:"p-email"},"Adres e-mail",-1)),b(e("input",{id:"p-email","onUpdate:modelValue":s[2]||(s[2]=a=>p.email=a),type:"email",autocomplete:"email",inputmode:"email"},null,512),[[k,p.email]]),d.value?.fields.email?(n(),l("p",ne,i(d.value.fields.email),1)):r("",!0)]),e("button",{class:"btn primary",type:"submit",disabled:g.value},i(g.value?"Zapisywanie…":"Zapisz dane"),9,ie)],32)]),e("section",re,[s[15]||(s[15]=e("h2",{id:"wybor-h",style:{"margin-bottom":"6px"}},"Przedmioty do wyboru",-1)),s[16]||(s[16]=e("p",{class:"muted small"},"Z każdej grupy wybierasz jeden przedmiot. Pozostałe znikną z planu, pulpitu i list (można je pokazać przełącznikiem „Pokaż wszystkie”). Wybór zapamiętuje to urządzenie.",-1)),o(z).loaded.courses?o(z).electiveGroups.length?r("",!0):(n(),l("p",ue,"Nie ma teraz przedmiotów do wyboru.")):(n(),l("div",de)),(n(!0),l(j,null,N(o(z).electiveGroups,a=>(n(),l("fieldset",{key:a.code,style:{border:"0",padding:"0",margin:"14px 0 0"}},[e("legend",pe,i(o(q)(a.code)),1),(n(!0),l(j,null,N(a.options,w=>(n(),l("label",{key:w,class:"check"},[e("input",{type:"radio",name:`g-${a.code}`,value:w,checked:o(v).choices[a.code]===w,onChange:$e=>o(v).choose(a.code,w)},null,40,me),e("span",null,i(w),1)]))),128)),o(v).choices[a.code]?(n(),l("button",{key:1,class:"linkish small",type:"button",onClick:w=>o(v).choose(a.code,null)},"Wyczyść wybór",8,ye)):(n(),l("p",ce,"Jeszcze nie wybrano. Do tego czasu widać wszystkie alternatywy."))]))),128))]),e("section",we,[s[23]||(s[23]=e("h2",{id:"kalendarz-h",style:{"margin-bottom":"6px"}},"Kalendarz Google / telefon",-1)),s[24]||(s[24]=e("p",{class:"muted small"}," Prywatny link do planu zajęć w formacie iCalendar. Dodaj go w Kalendarzu Google albo w telefonie, a zajęcia pojawią się obok Twoich wydarzeń. Plan uwzględnia przedmioty do wyboru wybrane wyżej. ",-1)),o(t).error?(n(),l("p",be,i(o(t).error),1)):r("",!0),o(t).feed===void 0&&(o(t).loading||!o(t).error)?(n(),l("div",ke)):o(t).feed?(n(),l(j,{key:3},[e("div",ve,[s[17]||(s[17]=e("label",{for:"cal-url"},"Twój link (nie udostępniaj go)",-1)),e("div",ge,[e("input",{id:"cal-url",ref_key:"urlInput",ref:P,class:"mono",type:"text",readonly:"",value:o(t).feed.url,style:{"font-size":"14px","min-width":"0"},onFocus:s[4]||(s[4]=a=>a.target.select())},null,40,_e),e("button",{class:"btn",type:"button",onClick:F},"Kopiuj")]),o(t).feed.last_fetched_at?(n(),l("p",he,"Ostatnio pobrany przez kalendarz: "+i(G(o(t).feed.last_fetched_at))+".",1)):r("",!0)]),e("label",xe,[e("input",{type:"checkbox",checked:o(t).feed.include_meetings,disabled:o(t).busy,onChange:s[5]||(s[5]=a=>o(t).save({include_meetings:a.target.checked}))},null,40,je),s[18]||(s[18]=e("span",null,"Zjazdy jako wydarzenia całodniowe",-1))]),e("label",Ce,[e("input",{type:"checkbox",checked:o(t).feed.include_deadlines,disabled:o(t).busy,onChange:s[6]||(s[6]=a=>o(t).save({include_deadlines:a.target.checked}))},null,40,Pe),s[19]||(s[19]=e("span",null,"Terminy z terminarza",-1))]),e("div",Ue,[e("button",{class:"btn small ghost",type:"button",disabled:o(t).busy,onClick:K},"Wygeneruj nowy link",8,Ve),e("button",{class:"btn small miss",type:"button",disabled:o(t).busy,onClick:T},"Usuń link",8,Ne)]),s[20]||(s[20]=e("h3",{class:"eyebrow",style:{margin:"18px 0 6px"}},"Jak dodać",-1)),s[21]||(s[21]=e("ol",{class:"small",style:{margin:"0","padding-left":"20px",display:"grid",gap:"6px"}},[e("li",null,[e("b",null,"Kalendarz Google"),D(" (na komputerze, calendar.google.com): po lewej przy „Inne kalendarze” kliknij „+”, wybierz „Z adresu URL”, wklej link i kliknij „Dodaj kalendarz”. Na telefonie z Androidem kalendarz pojawi się sam po synchronizacji konta Google. ")]),e("li",null,[e("b",null,"iPhone / iPad"),D(": Ustawienia → Kalendarz → Konta → Dodaj konto → Inne → Dodaj subskrybowany kalendarz, wklej link i zapisz. ")])],-1)),s[22]||(s[22]=e("p",{class:"muted small",style:{margin:"10px 0 0"}}," Google odświeża subskrybowane kalendarze co kilka godzin, nie od razu: zmiana planu albo wyboru przedmiotów pojawi się w kalendarzu z opóźnieniem. ",-1))],64)):(n(),l("div",fe,[e("button",{class:"btn primary",type:"button",disabled:o(t).busy,onClick:s[3]||(s[3]=a=>o(t).create())},i(o(t).busy?"Tworzenie…":"Utwórz link do kalendarza"),9,ze)]))]),e("section",De,[s[28]||(s[28]=e("h2",{id:"haslo-h",style:{"margin-bottom":"12px"}},"Zmiana hasła",-1)),e("form",{onSubmit:V(I,["prevent"]),novalidate:""},[c.value?.message?(n(),l("p",Ze,i(c.value.message),1)):r("",!0),x.value?(n(),l("p",Fe,"Hasło zostało zmienione.")):r("",!0),e("div",Ke,[s[25]||(s[25]=e("label",{for:"pw-current"},"Obecne hasło",-1)),b(e("input",{id:"pw-current","onUpdate:modelValue":s[7]||(s[7]=a=>u.current_password=a),type:"password",autocomplete:"current-password"},null,512),[[k,u.current_password]]),c.value?.fields.current_password?(n(),l("p",Te,i(c.value.fields.current_password),1)):r("",!0)]),e("div",Ge,[s[26]||(s[26]=e("label",{for:"pw-new"},"Nowe hasło (min. 8 znaków)",-1)),b(e("input",{id:"pw-new","onUpdate:modelValue":s[8]||(s[8]=a=>u.password=a),type:"password",autocomplete:"new-password"},null,512),[[k,u.password]]),c.value?.fields.password?(n(),l("p",Be,i(c.value.fields.password),1)):r("",!0)]),e("div",Ie,[s[27]||(s[27]=e("label",{for:"pw-confirm"},"Powtórz nowe hasło",-1)),b(e("input",{id:"pw-confirm","onUpdate:modelValue":s[9]||(s[9]=a=>u.password_confirmation=a),type:"password",autocomplete:"new-password"},null,512),[[k,u.password_confirmation]])]),e("button",{class:"btn primary",type:"submit",disabled:_.value||!u.current_password||!u.password},i(_.value?"Zapisywanie…":"Zmień hasło"),9,Le)],32)]),e("section",Oe,[e("button",{class:"btn miss",type:"button",onClick:s[10]||(s[10]=a=>o(f).logout())},"Wyloguj się")])]))}});export{Me as default}; diff --git a/public/assets/QuizView-C5E-4ich.js b/public/assets/QuizView-BWZffs6k.js similarity index 97% rename from public/assets/QuizView-C5E-4ich.js rename to public/assets/QuizView-BWZffs6k.js index 564f5f3..3048ca3 100644 --- a/public/assets/QuizView-C5E-4ich.js +++ b/public/assets/QuizView-BWZffs6k.js @@ -1 +1 @@ -var ne=Object.defineProperty;var le=(m,o,n)=>o in m?ne(m,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):m[o]=n;var c=(m,o,n)=>le(m,typeof o!="symbol"?o+"":o,n);import{_ as oe}from"./PageHead.vue_vue_type_script_setup_true_lang-l9qe_URH.js";import{_ as ie}from"./LoadState.vue_vue_type_script_setup_true_lang-BX6YDhEk.js";import{q as j,_ as re}from"./quizzes-B7pKYg3A.js";import{d as ue,q as de,J as ce,c as i,h as S,i as P,r as v,G as I,o as r,F as k,m as _,t as l,e as h,a as e,y as R,z as ve,x as Z,s as x,K as he,k as pe}from"./index-LFNXxSi2.js";import{c as ye}from"./format-bcE-cYHJ.js";function me(m,o=Math.random){const n=m.slice();for(let p=n.length-1;p>0;p--){const f=Math.floor(o()*(p+1));[n[p],n[f]]=[n[f],n[p]]}return n}class fe{constructor(o,n=5,p=Math.random){c(this,"cards");c(this,"roundSize");c(this,"rng");c(this,"pool",[]);c(this,"round",[]);c(this,"cur",0);c(this,"roundMarks",[]);c(this,"marks",{});c(this,"order",[]);c(this,"review",!1);c(this,"phase","card");this.cards=new Map(o.map(f=>[f.id,f])),this.roundSize=Math.max(1,n),this.rng=p,this.reset()}reset(){this.marks={},this.order=[],this.pool=[...this.cards.keys()],this.draw()}draw(){if(this.review=!1,this.pool.length===0){this.round=[],this.roundMarks=[],this.cur=0,this.phase="final";return}const o=[];for(;o.lengthnull),this.cur=0,this.phase="card"}get current(){const o=this.round[this.cur];return o===void 0?null:this.cards.get(o)??null}get isLastInRound(){return this.cur===this.round.length-1}get answeredCount(){return this.order.length}get remaining(){return this.pool.length}get total(){return this.cards.size}mark(o){const n=this.round[this.cur];n===void 0||this.phase!=="card"||(this.roundMarks[this.cur]=o,n in this.marks||this.order.push(n),this.marks[n]=o)}next(){this.phase==="card"&&(this.cur++,this.cur>=this.round.length&&(this.phase=this.review||this.pool.length===0?"final":"round"))}finish(){this.phase="final"}ids(o){return this.order.filter(n=>this.marks[n]===o)}get missed(){return this.ids("n")}get known(){return this.ids("y")}get tally(){return{y:this.known.length,n:this.missed.length}}startReview(){const o=this.missed;o.length!==0&&(this.review=!0,this.startRound(me(o,this.rng)))}}const ge={key:0,class:"muted"},ke={class:"card accent","aria-labelledby":"start-h"},_e={class:"small muted"},we={key:0,class:"chips wrap",role:"group","aria-label":"Kategoria"},be=["aria-pressed"],ze=["aria-pressed","onClick"],xe={class:"btn-row",style:{"margin-top":"12px"}},Ce=["disabled"],Me={key:1,class:"section","aria-labelledby":"hist-h"},qe={class:"card"},je={class:"quiz-bar"},Ne={class:"score"},$e={class:"y"},We={class:"n"},Re={class:"count"},Se={class:"btn-row"},Le=["disabled"],Be=["disabled"],Pe={class:"step","aria-live":"polite"},Ze={key:0},Ke={key:1,class:"qcard"},Te={class:"q"},Ve={key:1,class:"answer","aria-live":"polite"},De={class:"qactions"},Qe=["aria-pressed","disabled"],Ee=["aria-pressed","disabled"],Ae=["disabled"],Fe={key:2,class:"error-text",role:"alert"},He={key:2,class:"qcard sum"},Ie={class:"tag"},Oe={class:"qactions"},Ge={key:3,class:"qcard sum"},Je={class:"qactions",style:{margin:"0 0 18px"}},Ue={key:0,class:"grp miss"},Xe={class:"tag"},Ye={key:1,class:"grp ok"},et={class:"tag"},tt={key:2,class:"muted small mono",style:{margin:"14px 0 0"}},ut=ue({__name:"QuizView",props:{slug:{}},setup(m){const o=m,n=v(null),p=v(""),f=v([]),y=v(null),d=v(null),g=v(null),w=v(!1),N=v({}),C=v(!1),$=v(""),b=v(null),K=v(null);async function T(){p.value="";try{n.value=await j.quiz(o.slug),V()}catch(t){p.value=I(t)}}async function V(){try{f.value=(await j.attempts(o.slug)).data}catch{}}de(T),ce(()=>{g.value&&!w.value&&d.value?.answeredCount&&j.finish(g.value.id).catch(()=>{})});const D=x(()=>{const t=new Map;for(const a of n.value?.questions??[])a.category&&t.set(a.category,(t.get(a.category)??0)+1);return[...t].sort(([a],[M])=>a.localeCompare(M,"pl"))}),Q=x(()=>(n.value?.questions??[]).filter(t=>!y.value||t.category===y.value).length);function O(){const t=(n.value?.questions??[]).filter(a=>a.type==="self_check"&&(!y.value||a.category===y.value)).map(a=>({id:a.id,text:a.text,category:a.category,answer:a.answer_text??""}));d.value=new fe(t,n.value?.round_size??5),g.value=null,w.value=!1,N.value={},$.value="",b.value=null}async function G(){return g.value||(g.value=await j.start(o.slug,y.value),w.value=!1),g.value}async function E(t){const a=d.value,M=a?.current;if(!(!a||!M||C.value)){C.value=!0,$.value="";try{const u=await G();await j.answer(u.id,{question_id:M.id,known:t==="y"}),a.mark(t),await he(),K.value?.focus()}catch(u){$.value=`Nie udało się zapisać odpowiedzi. ${I(u)}`}finally{C.value=!1}}}function J(){const t=d.value?.current?.id;t!==void 0&&(N.value={...N.value,[t]:!0})}function U(){const t=d.value;t&&(t.next(),t.phase==="final"&&W())}function A(){d.value?.draw(),d.value?.phase==="final"&&W()}function F(){d.value?.finish(),W()}async function W(){const t=g.value;if(!(!t||w.value)){w.value=!0;try{b.value=await j.finish(t.id)}catch{}V()}}function X(){const t=d.value;t&&(t.startReview(),g.value=null,w.value=!1,b.value=null)}function Y(){d.value?.reset(),g.value=null,w.value=!1,N.value={},b.value=null,d.value?.phase==="final"&&W()}function ee(){W(),d.value=null}const s=x(()=>d.value),z=x(()=>s.value?.current??null),L=x(()=>z.value?s.value?.roundMarks[s.value.cur]??null:null),H=t=>s.value?.cards.get(t)?.answer??"",te=t=>s.value?.roundMarks[t]??(t===s.value?.cur?"cur":""),se=x(()=>{const t=s.value;return t?t.isLastInRound?t.review?"Wynik powtórki":t.remaining?"Koniec rundy":"Podsumowanie":"Dalej":""}),B=t=>ye(t,"pytanie","pytania","pytań"),ae=x(()=>{const t=s.value;return t?t.phase==="round"?"Koniec rundy":t.phase==="final"?t.review?"Wynik po powtórce":t.remaining?"Podsumowanie sesji":"Cała pula za Tobą":`${t.review?"Powtórka · ":""}Pytanie ${t.cur+1} z ${t.round.length}`:""});return(t,a)=>{const M=pe("router-link");return r(),i("div",null,[S(ie,{ready:!!n.value,error:p.value,onRetry:a[3]||(a[3]=u=>T())},{default:P(()=>[n.value?(r(),i(k,{key:0},[S(oe,{eyebrow:"Quiz",title:n.value.title},{default:P(()=>[S(M,{class:"btn small ghost",to:"/quizy"},{default:P(()=>[...a[4]||(a[4]=[_("← Quizy",-1)])]),_:1})]),_:1},8,["title"]),s.value?(r(),i(k,{key:1},[e("div",je,[e("div",null,[e("div",Ne,[e("span",$e,[a[7]||(a[7]=_("Wiem ",-1)),e("b",null,l(s.value.tally.y),1)]),e("span",We,[a[8]||(a[8]=_("Nie wiem ",-1)),e("b",null,l(s.value.tally.n),1)])]),e("span",Re,[_(l(B(s.value.total))+" w puli · "+l(s.value.remaining)+" jeszcze nie padło",1),y.value?(r(),i(k,{key:0},[_(" · "+l(y.value),1)],64)):h("",!0)])]),e("div",Se,[e("button",{class:"btn small",type:"button",disabled:s.value.phase==="final",onClick:A},"Losuj "+l(n.value.round_size??5)+" nowych",9,Le),e("button",{class:"btn small primary",type:"button",disabled:s.value.answeredCount===0||s.value.phase==="final",onClick:F},"Zakończ",8,Be)])]),s.value.phase!=="final"?(r(),i("div",{key:0,class:"round-progress",style:ve({gridTemplateColumns:`repeat(${s.value.round.length}, 1fr)`}),"aria-hidden":"true"},[(r(!0),i(k,null,R(s.value.round,(u,q)=>(r(),i("span",{key:q,class:Z(te(q))},null,2))),128))],4)):h("",!0),e("div",Pe,[e("span",null,l(ae.value),1),s.value.phase==="card"&&z.value?.category?(r(),i("span",Ze,l(z.value.category),1)):h("",!0)]),s.value.phase==="card"&&z.value?(r(),i("div",Ke,[e("p",Te,l(z.value.text),1),N.value[z.value.id]?(r(),i("div",Ve,[a[9]||(a[9]=e("span",{class:"tag"},"Odpowiedź",-1)),_(" "+l(z.value.answer),1)])):(r(),i("button",{key:0,class:"reveal",type:"button",onClick:J},"odpowiedź")),e("div",De,[e("button",{class:"btn yes",type:"button","aria-pressed":L.value==="y",disabled:C.value,onClick:a[1]||(a[1]=u=>E("y"))},"Wiem!",8,Qe),e("button",{class:"btn no",type:"button","aria-pressed":L.value==="n",disabled:C.value,onClick:a[2]||(a[2]=u=>E("n"))},"Nie wiem",8,Ee),e("button",{ref_key:"nextBtn",ref:K,class:"btn primary next",type:"button",disabled:!L.value||C.value,onClick:U},l(se.value),9,Ae)]),$.value?(r(),i("p",Fe,l($.value),1)):h("",!0)])):s.value.phase==="round"?(r(),i("div",He,[e("h2",null,"Wiem "+l(s.value.roundMarks.filter(u=>u==="y").length)+" z "+l(s.value.round.length),1),a[10]||(a[10]=e("p",null,"Pytania „Nie wiem” trafiają do powtórki. Zbierzesz je przyciskiem „Zakończ”.",-1)),e("ol",null,[(r(!0),i(k,null,R(s.value.round,(u,q)=>(r(),i("li",{key:u,class:Z(s.value.roundMarks[q])},[e("span",Ie,l(s.value.cards.get(u)?.category),1),_(" "+l(s.value.cards.get(u)?.text)+" ",1),e("small",null,l(H(u)),1)],2))),128))]),e("div",Oe,[e("button",{class:"btn primary",type:"button",onClick:A},"Losuj "+l(n.value.round_size??5)+" nowych",1),e("button",{class:"btn",type:"button",onClick:F},"Zakończ")])])):(r(),i("div",Ge,[e("h2",null,"Wiem "+l(s.value.known.length)+" z "+l(s.value.answeredCount),1),e("p",null,l(s.value.missed.length?`Do powtórki: ${s.value.missed.length}.`:s.value.answeredCount?"Wszystko umiesz. Nie ma nic do powtórki.":"Nie udzielono żadnej odpowiedzi."),1),e("div",Je,[s.value.missed.length?(r(),i("button",{key:0,class:"btn primary",type:"button",onClick:X},"Powtórz "+l(B(s.value.missed.length)),1)):h("",!0),e("button",{class:Z(["btn",{primary:!s.value.missed.length}]),type:"button",onClick:Y},"Nowa sesja",2),e("button",{class:"btn ghost",type:"button",onClick:ee},"Wróć do quizu")]),s.value.missed.length?(r(),i("div",Ue,[a[11]||(a[11]=e("h3",null,"Nie wiem",-1)),e("ol",null,[(r(!0),i(k,null,R(s.value.missed,u=>(r(),i("li",{key:u,class:"n"},[e("span",Xe,l(s.value.cards.get(u)?.category),1),_(" "+l(s.value.cards.get(u)?.text)+" ",1),e("small",null,l(H(u)),1)]))),128))])])):h("",!0),s.value.known.length?(r(),i("div",Ye,[a[12]||(a[12]=e("h3",null,"Wiem",-1)),e("ol",null,[(r(!0),i(k,null,R(s.value.known,u=>(r(),i("li",{key:u,class:"y"},[e("span",et,l(s.value.cards.get(u)?.category),1),_(" "+l(s.value.cards.get(u)?.text),1)]))),128))])])):h("",!0),b.value?(r(),i("p",tt,"Zapisano w historii: "+l(Math.round(b.value.score_points))+"/"+l(Math.round(b.value.max_points)),1)):h("",!0)]))],64)):(r(),i(k,{key:0},[n.value.description?(r(),i("p",ge,l(n.value.description),1)):h("",!0),e("section",ke,[a[5]||(a[5]=e("h2",{id:"start-h",style:{"margin-bottom":"8px"}},"Nowa sesja",-1)),e("p",_e,"Rundy po "+l(n.value.round_size??5)+" losowych pytań, które jeszcze nie padły. Każdą odpowiedź zapisujemy na koncie.",1),D.value.length?(r(),i("div",we,[e("button",{class:"chip",type:"button","aria-pressed":y.value===null,onClick:a[0]||(a[0]=u=>y.value=null)},"Wszystkie",8,be),(r(!0),i(k,null,R(D.value,([u,q])=>(r(),i("button",{key:u,class:"chip",type:"button","aria-pressed":y.value===u,onClick:st=>y.value=u},l(u)+" · "+l(q),9,ze))),128))])):h("",!0),e("div",xe,[e("button",{class:"btn primary",type:"button",disabled:Q.value===0,onClick:O},"Zacznij · "+l(B(Q.value)),9,Ce)])]),f.value.length?(r(),i("section",Me,[a[6]||(a[6]=e("div",{class:"section-head"},[e("h2",{id:"hist-h"},"Historia podejść")],-1)),e("div",qe,[S(re,{attempts:f.value},null,8,["attempts"])])])):h("",!0)],64))],64)):h("",!0)]),_:1},8,["ready","error"])])}}});export{ut as default}; +var ne=Object.defineProperty;var le=(m,o,n)=>o in m?ne(m,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):m[o]=n;var c=(m,o,n)=>le(m,typeof o!="symbol"?o+"":o,n);import{_ as oe}from"./PageHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js";import{_ as ie}from"./LoadState.vue_vue_type_script_setup_true_lang-BYeP9cST.js";import{q as j,_ as re}from"./quizzes-ByhEqvvR.js";import{d as ue,q as de,J as ce,c as i,h as S,i as P,r as v,G as I,o as r,F as k,m as _,t as l,e as h,a as e,y as R,z as ve,x as Z,s as x,K as he,k as pe}from"./index-CvyVvvnt.js";import{c as ye}from"./format-bcE-cYHJ.js";function me(m,o=Math.random){const n=m.slice();for(let p=n.length-1;p>0;p--){const f=Math.floor(o()*(p+1));[n[p],n[f]]=[n[f],n[p]]}return n}class fe{constructor(o,n=5,p=Math.random){c(this,"cards");c(this,"roundSize");c(this,"rng");c(this,"pool",[]);c(this,"round",[]);c(this,"cur",0);c(this,"roundMarks",[]);c(this,"marks",{});c(this,"order",[]);c(this,"review",!1);c(this,"phase","card");this.cards=new Map(o.map(f=>[f.id,f])),this.roundSize=Math.max(1,n),this.rng=p,this.reset()}reset(){this.marks={},this.order=[],this.pool=[...this.cards.keys()],this.draw()}draw(){if(this.review=!1,this.pool.length===0){this.round=[],this.roundMarks=[],this.cur=0,this.phase="final";return}const o=[];for(;o.lengthnull),this.cur=0,this.phase="card"}get current(){const o=this.round[this.cur];return o===void 0?null:this.cards.get(o)??null}get isLastInRound(){return this.cur===this.round.length-1}get answeredCount(){return this.order.length}get remaining(){return this.pool.length}get total(){return this.cards.size}mark(o){const n=this.round[this.cur];n===void 0||this.phase!=="card"||(this.roundMarks[this.cur]=o,n in this.marks||this.order.push(n),this.marks[n]=o)}next(){this.phase==="card"&&(this.cur++,this.cur>=this.round.length&&(this.phase=this.review||this.pool.length===0?"final":"round"))}finish(){this.phase="final"}ids(o){return this.order.filter(n=>this.marks[n]===o)}get missed(){return this.ids("n")}get known(){return this.ids("y")}get tally(){return{y:this.known.length,n:this.missed.length}}startReview(){const o=this.missed;o.length!==0&&(this.review=!0,this.startRound(me(o,this.rng)))}}const ge={key:0,class:"muted"},ke={class:"card accent","aria-labelledby":"start-h"},_e={class:"small muted"},we={key:0,class:"chips wrap",role:"group","aria-label":"Kategoria"},be=["aria-pressed"],ze=["aria-pressed","onClick"],xe={class:"btn-row",style:{"margin-top":"12px"}},Ce=["disabled"],Me={key:1,class:"section","aria-labelledby":"hist-h"},qe={class:"card"},je={class:"quiz-bar"},Ne={class:"score"},$e={class:"y"},We={class:"n"},Re={class:"count"},Se={class:"btn-row"},Le=["disabled"],Be=["disabled"],Pe={class:"step","aria-live":"polite"},Ze={key:0},Ke={key:1,class:"qcard"},Te={class:"q"},Ve={key:1,class:"answer","aria-live":"polite"},De={class:"qactions"},Qe=["aria-pressed","disabled"],Ee=["aria-pressed","disabled"],Ae=["disabled"],Fe={key:2,class:"error-text",role:"alert"},He={key:2,class:"qcard sum"},Ie={class:"tag"},Oe={class:"qactions"},Ge={key:3,class:"qcard sum"},Je={class:"qactions",style:{margin:"0 0 18px"}},Ue={key:0,class:"grp miss"},Xe={class:"tag"},Ye={key:1,class:"grp ok"},et={class:"tag"},tt={key:2,class:"muted small mono",style:{margin:"14px 0 0"}},ut=ue({__name:"QuizView",props:{slug:{}},setup(m){const o=m,n=v(null),p=v(""),f=v([]),y=v(null),d=v(null),g=v(null),w=v(!1),N=v({}),C=v(!1),$=v(""),b=v(null),K=v(null);async function T(){p.value="";try{n.value=await j.quiz(o.slug),V()}catch(t){p.value=I(t)}}async function V(){try{f.value=(await j.attempts(o.slug)).data}catch{}}de(T),ce(()=>{g.value&&!w.value&&d.value?.answeredCount&&j.finish(g.value.id).catch(()=>{})});const D=x(()=>{const t=new Map;for(const a of n.value?.questions??[])a.category&&t.set(a.category,(t.get(a.category)??0)+1);return[...t].sort(([a],[M])=>a.localeCompare(M,"pl"))}),Q=x(()=>(n.value?.questions??[]).filter(t=>!y.value||t.category===y.value).length);function O(){const t=(n.value?.questions??[]).filter(a=>a.type==="self_check"&&(!y.value||a.category===y.value)).map(a=>({id:a.id,text:a.text,category:a.category,answer:a.answer_text??""}));d.value=new fe(t,n.value?.round_size??5),g.value=null,w.value=!1,N.value={},$.value="",b.value=null}async function G(){return g.value||(g.value=await j.start(o.slug,y.value),w.value=!1),g.value}async function E(t){const a=d.value,M=a?.current;if(!(!a||!M||C.value)){C.value=!0,$.value="";try{const u=await G();await j.answer(u.id,{question_id:M.id,known:t==="y"}),a.mark(t),await he(),K.value?.focus()}catch(u){$.value=`Nie udało się zapisać odpowiedzi. ${I(u)}`}finally{C.value=!1}}}function J(){const t=d.value?.current?.id;t!==void 0&&(N.value={...N.value,[t]:!0})}function U(){const t=d.value;t&&(t.next(),t.phase==="final"&&W())}function A(){d.value?.draw(),d.value?.phase==="final"&&W()}function F(){d.value?.finish(),W()}async function W(){const t=g.value;if(!(!t||w.value)){w.value=!0;try{b.value=await j.finish(t.id)}catch{}V()}}function X(){const t=d.value;t&&(t.startReview(),g.value=null,w.value=!1,b.value=null)}function Y(){d.value?.reset(),g.value=null,w.value=!1,N.value={},b.value=null,d.value?.phase==="final"&&W()}function ee(){W(),d.value=null}const s=x(()=>d.value),z=x(()=>s.value?.current??null),L=x(()=>z.value?s.value?.roundMarks[s.value.cur]??null:null),H=t=>s.value?.cards.get(t)?.answer??"",te=t=>s.value?.roundMarks[t]??(t===s.value?.cur?"cur":""),se=x(()=>{const t=s.value;return t?t.isLastInRound?t.review?"Wynik powtórki":t.remaining?"Koniec rundy":"Podsumowanie":"Dalej":""}),B=t=>ye(t,"pytanie","pytania","pytań"),ae=x(()=>{const t=s.value;return t?t.phase==="round"?"Koniec rundy":t.phase==="final"?t.review?"Wynik po powtórce":t.remaining?"Podsumowanie sesji":"Cała pula za Tobą":`${t.review?"Powtórka · ":""}Pytanie ${t.cur+1} z ${t.round.length}`:""});return(t,a)=>{const M=pe("router-link");return r(),i("div",null,[S(ie,{ready:!!n.value,error:p.value,onRetry:a[3]||(a[3]=u=>T())},{default:P(()=>[n.value?(r(),i(k,{key:0},[S(oe,{eyebrow:"Quiz",title:n.value.title},{default:P(()=>[S(M,{class:"btn small ghost",to:"/quizy"},{default:P(()=>[...a[4]||(a[4]=[_("← Quizy",-1)])]),_:1})]),_:1},8,["title"]),s.value?(r(),i(k,{key:1},[e("div",je,[e("div",null,[e("div",Ne,[e("span",$e,[a[7]||(a[7]=_("Wiem ",-1)),e("b",null,l(s.value.tally.y),1)]),e("span",We,[a[8]||(a[8]=_("Nie wiem ",-1)),e("b",null,l(s.value.tally.n),1)])]),e("span",Re,[_(l(B(s.value.total))+" w puli · "+l(s.value.remaining)+" jeszcze nie padło",1),y.value?(r(),i(k,{key:0},[_(" · "+l(y.value),1)],64)):h("",!0)])]),e("div",Se,[e("button",{class:"btn small",type:"button",disabled:s.value.phase==="final",onClick:A},"Losuj "+l(n.value.round_size??5)+" nowych",9,Le),e("button",{class:"btn small primary",type:"button",disabled:s.value.answeredCount===0||s.value.phase==="final",onClick:F},"Zakończ",8,Be)])]),s.value.phase!=="final"?(r(),i("div",{key:0,class:"round-progress",style:ve({gridTemplateColumns:`repeat(${s.value.round.length}, 1fr)`}),"aria-hidden":"true"},[(r(!0),i(k,null,R(s.value.round,(u,q)=>(r(),i("span",{key:q,class:Z(te(q))},null,2))),128))],4)):h("",!0),e("div",Pe,[e("span",null,l(ae.value),1),s.value.phase==="card"&&z.value?.category?(r(),i("span",Ze,l(z.value.category),1)):h("",!0)]),s.value.phase==="card"&&z.value?(r(),i("div",Ke,[e("p",Te,l(z.value.text),1),N.value[z.value.id]?(r(),i("div",Ve,[a[9]||(a[9]=e("span",{class:"tag"},"Odpowiedź",-1)),_(" "+l(z.value.answer),1)])):(r(),i("button",{key:0,class:"reveal",type:"button",onClick:J},"odpowiedź")),e("div",De,[e("button",{class:"btn yes",type:"button","aria-pressed":L.value==="y",disabled:C.value,onClick:a[1]||(a[1]=u=>E("y"))},"Wiem!",8,Qe),e("button",{class:"btn no",type:"button","aria-pressed":L.value==="n",disabled:C.value,onClick:a[2]||(a[2]=u=>E("n"))},"Nie wiem",8,Ee),e("button",{ref_key:"nextBtn",ref:K,class:"btn primary next",type:"button",disabled:!L.value||C.value,onClick:U},l(se.value),9,Ae)]),$.value?(r(),i("p",Fe,l($.value),1)):h("",!0)])):s.value.phase==="round"?(r(),i("div",He,[e("h2",null,"Wiem "+l(s.value.roundMarks.filter(u=>u==="y").length)+" z "+l(s.value.round.length),1),a[10]||(a[10]=e("p",null,"Pytania „Nie wiem” trafiają do powtórki. Zbierzesz je przyciskiem „Zakończ”.",-1)),e("ol",null,[(r(!0),i(k,null,R(s.value.round,(u,q)=>(r(),i("li",{key:u,class:Z(s.value.roundMarks[q])},[e("span",Ie,l(s.value.cards.get(u)?.category),1),_(" "+l(s.value.cards.get(u)?.text)+" ",1),e("small",null,l(H(u)),1)],2))),128))]),e("div",Oe,[e("button",{class:"btn primary",type:"button",onClick:A},"Losuj "+l(n.value.round_size??5)+" nowych",1),e("button",{class:"btn",type:"button",onClick:F},"Zakończ")])])):(r(),i("div",Ge,[e("h2",null,"Wiem "+l(s.value.known.length)+" z "+l(s.value.answeredCount),1),e("p",null,l(s.value.missed.length?`Do powtórki: ${s.value.missed.length}.`:s.value.answeredCount?"Wszystko umiesz. Nie ma nic do powtórki.":"Nie udzielono żadnej odpowiedzi."),1),e("div",Je,[s.value.missed.length?(r(),i("button",{key:0,class:"btn primary",type:"button",onClick:X},"Powtórz "+l(B(s.value.missed.length)),1)):h("",!0),e("button",{class:Z(["btn",{primary:!s.value.missed.length}]),type:"button",onClick:Y},"Nowa sesja",2),e("button",{class:"btn ghost",type:"button",onClick:ee},"Wróć do quizu")]),s.value.missed.length?(r(),i("div",Ue,[a[11]||(a[11]=e("h3",null,"Nie wiem",-1)),e("ol",null,[(r(!0),i(k,null,R(s.value.missed,u=>(r(),i("li",{key:u,class:"n"},[e("span",Xe,l(s.value.cards.get(u)?.category),1),_(" "+l(s.value.cards.get(u)?.text)+" ",1),e("small",null,l(H(u)),1)]))),128))])])):h("",!0),s.value.known.length?(r(),i("div",Ye,[a[12]||(a[12]=e("h3",null,"Wiem",-1)),e("ol",null,[(r(!0),i(k,null,R(s.value.known,u=>(r(),i("li",{key:u,class:"y"},[e("span",et,l(s.value.cards.get(u)?.category),1),_(" "+l(s.value.cards.get(u)?.text),1)]))),128))])])):h("",!0),b.value?(r(),i("p",tt,"Zapisano w historii: "+l(Math.round(b.value.score_points))+"/"+l(Math.round(b.value.max_points)),1)):h("",!0)]))],64)):(r(),i(k,{key:0},[n.value.description?(r(),i("p",ge,l(n.value.description),1)):h("",!0),e("section",ke,[a[5]||(a[5]=e("h2",{id:"start-h",style:{"margin-bottom":"8px"}},"Nowa sesja",-1)),e("p",_e,"Rundy po "+l(n.value.round_size??5)+" losowych pytań, które jeszcze nie padły. Każdą odpowiedź zapisujemy na koncie.",1),D.value.length?(r(),i("div",we,[e("button",{class:"chip",type:"button","aria-pressed":y.value===null,onClick:a[0]||(a[0]=u=>y.value=null)},"Wszystkie",8,be),(r(!0),i(k,null,R(D.value,([u,q])=>(r(),i("button",{key:u,class:"chip",type:"button","aria-pressed":y.value===u,onClick:st=>y.value=u},l(u)+" · "+l(q),9,ze))),128))])):h("",!0),e("div",xe,[e("button",{class:"btn primary",type:"button",disabled:Q.value===0,onClick:O},"Zacznij · "+l(B(Q.value)),9,Ce)])]),f.value.length?(r(),i("section",Me,[a[6]||(a[6]=e("div",{class:"section-head"},[e("h2",{id:"hist-h"},"Historia podejść")],-1)),e("div",qe,[S(re,{attempts:f.value},null,8,["attempts"])])])):h("",!0)],64))],64)):h("",!0)]),_:1},8,["ready","error"])])}}});export{ut as default}; diff --git a/public/assets/QuizzesView-Bgho7mXY.js b/public/assets/QuizzesView-BPpiDTe0.js similarity index 86% rename from public/assets/QuizzesView-Bgho7mXY.js rename to public/assets/QuizzesView-BPpiDTe0.js index afda8e1..4f8c432 100644 --- a/public/assets/QuizzesView-Bgho7mXY.js +++ b/public/assets/QuizzesView-BPpiDTe0.js @@ -1 +1 @@ -import{_ as g}from"./PageHead.vue_vue_type_script_setup_true_lang-l9qe_URH.js";import{_ as w}from"./LoadState.vue_vue_type_script_setup_true_lang-BX6YDhEk.js";import{q as z,_ as x}from"./quizzes-B7pKYg3A.js";import{d as j,q as B,c as s,h as d,i as k,r as m,G as N,o as t,F as p,y as V,B as $,a as o,t as n,e as l,m as _,b as h,k as b}from"./index-LFNXxSi2.js";import{c as f}from"./format-bcE-cYHJ.js";const C={key:0,class:"stack"},F={key:0,class:"muted small",style:{margin:"0 0 8px"}},Q={class:"small",style:{margin:"0"}},T={key:1,class:"empty"},A={key:2,class:"section","aria-labelledby":"hist-h"},D={class:"card"},R=j({__name:"QuizzesView",setup(E){const i=m(null),c=m([]),u=m("");async function y(){u.value="";try{const[r,a]=await Promise.all([z.list(),z.attempts()]);i.value=r,c.value=a.data}catch(r){u.value=N(r)}}return B(y),(r,a)=>{const v=b("router-link");return t(),s("div",null,[d(g,{eyebrow:"Fiszki i testy",title:"Quizy"}),d(w,{ready:i.value!==null,error:u.value,onRetry:a[0]||(a[0]=e=>y())},{default:k(()=>[i.value?.length?(t(),s("div",C,[(t(!0),s(p,null,V(i.value,e=>(t(),$(v,{key:e.id,to:`/quizy/${e.slug}`,class:"card link accent"},{default:k(()=>[o("h3",null,n(e.title),1),e.description?(t(),s("p",F,n(e.description),1)):l("",!0),o("p",Q,[_(n(h(f)(e.question_count,"pytanie","pytania","pytań")),1),e.round_size?(t(),s(p,{key:0},[_(" · rundy po "+n(e.round_size),1)],64)):l("",!0),e.attempts_count?(t(),s(p,{key:1},[_(" · "+n(h(f)(e.attempts_count,"zakończone podejście","zakończone podejścia","zakończonych podejść")),1)],64)):l("",!0)])]),_:2},1032,["to"]))),128))])):(t(),s("p",T,"Nie ma jeszcze żadnych quizów.")),c.value.length?(t(),s("section",A,[a[1]||(a[1]=o("div",{class:"section-head"},[o("h2",{id:"hist-h"},"Historia podejść")],-1)),o("div",D,[d(x,{attempts:c.value,"show-quiz":""},null,8,["attempts"])])])):l("",!0)]),_:1},8,["ready","error"])])}}});export{R as default}; +import{_ as g}from"./PageHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js";import{_ as w}from"./LoadState.vue_vue_type_script_setup_true_lang-BYeP9cST.js";import{q as z,_ as x}from"./quizzes-ByhEqvvR.js";import{d as j,q as B,c as s,h as d,i as k,r as m,G as N,o as t,F as p,y as V,B as $,a as o,t as n,e as l,m as _,b as h,k as b}from"./index-CvyVvvnt.js";import{c as f}from"./format-bcE-cYHJ.js";const C={key:0,class:"stack"},F={key:0,class:"muted small",style:{margin:"0 0 8px"}},Q={class:"small",style:{margin:"0"}},T={key:1,class:"empty"},A={key:2,class:"section","aria-labelledby":"hist-h"},D={class:"card"},R=j({__name:"QuizzesView",setup(E){const i=m(null),c=m([]),u=m("");async function y(){u.value="";try{const[r,a]=await Promise.all([z.list(),z.attempts()]);i.value=r,c.value=a.data}catch(r){u.value=N(r)}}return B(y),(r,a)=>{const v=b("router-link");return t(),s("div",null,[d(g,{eyebrow:"Fiszki i testy",title:"Quizy"}),d(w,{ready:i.value!==null,error:u.value,onRetry:a[0]||(a[0]=e=>y())},{default:k(()=>[i.value?.length?(t(),s("div",C,[(t(!0),s(p,null,V(i.value,e=>(t(),$(v,{key:e.id,to:`/quizy/${e.slug}`,class:"card link accent"},{default:k(()=>[o("h3",null,n(e.title),1),e.description?(t(),s("p",F,n(e.description),1)):l("",!0),o("p",Q,[_(n(h(f)(e.question_count,"pytanie","pytania","pytań")),1),e.round_size?(t(),s(p,{key:0},[_(" · rundy po "+n(e.round_size),1)],64)):l("",!0),e.attempts_count?(t(),s(p,{key:1},[_(" · "+n(h(f)(e.attempts_count,"zakończone podejście","zakończone podejścia","zakończonych podejść")),1)],64)):l("",!0)])]),_:2},1032,["to"]))),128))])):(t(),s("p",T,"Nie ma jeszcze żadnych quizów.")),c.value.length?(t(),s("section",A,[a[1]||(a[1]=o("div",{class:"section-head"},[o("h2",{id:"hist-h"},"Historia podejść")],-1)),o("div",D,[d(x,{attempts:c.value,"show-quiz":""},null,8,["attempts"])])])):l("",!0)]),_:1},8,["ready","error"])])}}});export{R as default}; diff --git a/public/assets/ReadingItem.vue_vue_type_script_setup_true_lang-BpkoB79x.js b/public/assets/ReadingItem.vue_vue_type_script_setup_true_lang-BozrsWL2.js similarity index 93% rename from public/assets/ReadingItem.vue_vue_type_script_setup_true_lang-BpkoB79x.js rename to public/assets/ReadingItem.vue_vue_type_script_setup_true_lang-BozrsWL2.js index 342aeed..2b4c0d7 100644 --- a/public/assets/ReadingItem.vue_vue_type_script_setup_true_lang-BpkoB79x.js +++ b/public/assets/ReadingItem.vue_vue_type_script_setup_true_lang-BozrsWL2.js @@ -1 +1 @@ -import{i as d}from"./format-bcE-cYHJ.js";import{d as c,o as a,c as t,a as n,m as g,t as r,e as i,b as m}from"./index-LFNXxSi2.js";const u={class:"reading"},h=["checked"],k={class:"text"},f={key:0,class:"muted"},b={key:1,class:"muted mono"},y=["href","aria-label"],z=c({__name:"ReadingItem",props:{reading:{}},emits:["toggle"],setup(e){return(o,l)=>(a(),t("li",u,[n("label",null,[n("input",{type:"checkbox",checked:!!e.reading.read_at,onChange:l[0]||(l[0]=s=>o.$emit("toggle",s.target.checked))},null,40,h),n("span",k,[g(r(e.reading.title)+" ",1),e.reading.author||e.reading.source?(a(),t("small",f," · "+r([e.reading.author,e.reading.source].filter(Boolean).join(", ")),1)):i("",!0),e.reading.read_at?(a(),t("small",b," · przeczytano "+r(m(d)(e.reading.read_at)),1)):i("",!0)])]),e.reading.url?(a(),t("a",{key:0,href:e.reading.url,target:"_blank",rel:"noopener noreferrer",class:"small","aria-label":`Otwórz: ${e.reading.title}`},"link",8,y)):i("",!0)]))}});export{z as _}; +import{i as d}from"./format-bcE-cYHJ.js";import{d as c,o as a,c as t,a as n,m as g,t as r,e as i,b as m}from"./index-CvyVvvnt.js";const u={class:"reading"},h=["checked"],k={class:"text"},f={key:0,class:"muted"},b={key:1,class:"muted mono"},y=["href","aria-label"],z=c({__name:"ReadingItem",props:{reading:{}},emits:["toggle"],setup(e){return(o,l)=>(a(),t("li",u,[n("label",null,[n("input",{type:"checkbox",checked:!!e.reading.read_at,onChange:l[0]||(l[0]=s=>o.$emit("toggle",s.target.checked))},null,40,h),n("span",k,[g(r(e.reading.title)+" ",1),e.reading.author||e.reading.source?(a(),t("small",f," · "+r([e.reading.author,e.reading.source].filter(Boolean).join(", ")),1)):i("",!0),e.reading.read_at?(a(),t("small",b," · przeczytano "+r(m(d)(e.reading.read_at)),1)):i("",!0)])]),e.reading.url?(a(),t("a",{key:0,href:e.reading.url,target:"_blank",rel:"noopener noreferrer",class:"small","aria-label":`Otwórz: ${e.reading.title}`},"link",8,y)):i("",!0)]))}});export{z as _}; diff --git a/public/assets/ReadingsView-CUnMjS8U.js b/public/assets/ReadingsView-Dwn-CoLm.js similarity index 91% rename from public/assets/ReadingsView-CUnMjS8U.js rename to public/assets/ReadingsView-Dwn-CoLm.js index 6410d5b..c381c6b 100644 --- a/public/assets/ReadingsView-CUnMjS8U.js +++ b/public/assets/ReadingsView-Dwn-CoLm.js @@ -1 +1 @@ -import{_ as q}from"./PageHead.vue_vue_type_script_setup_true_lang-l9qe_URH.js";import{_ as x}from"./LoadState.vue_vue_type_script_setup_true_lang-BX6YDhEk.js";import{_ as T}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-mMQANJpk.js";import{_ as b}from"./ReadingItem.vue_vue_type_script_setup_true_lang-BpkoB79x.js";import{d as $,p as B,q as R,c as l,h as m,i as w,b as i,o as n,a as t,t as r,z as C,F as _,y as h,e as g,r as V,s as v,k as F,m as L,B as z}from"./index-LFNXxSi2.js";import{c as M,F as N}from"./format-bcE-cYHJ.js";const S={class:"card","aria-label":"Postęp czytania"},D={style:{margin:"0 0 8px"}},P={class:"big-num nums"},E={class:"muted"},O={class:"muted small"},j=["aria-valuenow"],A={class:"chips wrap",style:{"margin-top":"12px"}},G=["aria-pressed"],I=["aria-labelledby"],U={class:"section-head"},W=["id"],H={class:"badge",style:{"margin-left":"8px"}},J={class:"muted small nums"},K={class:"subhead"},Q={class:"rows"},X={class:"subhead"},Y={class:"rows"},Z={key:0,class:"empty",style:{"margin-top":"16px"}},le=$({__name:"ReadingsView",setup(ee){const s=B(),c=V(!1);R(()=>{Promise.all([s.loadReadings(),s.loadCourses()])});const f=v(()=>{const p=new Map;for(const o of s.readings)p.set(o.course_id,[...p.get(o.course_id)??[],o]);const u=o=>s.courseById.get(o)?.sort_order??0;return[...p].sort(([o],[e])=>u(o)-u(e)).map(([,o])=>{const e=c.value?o.filter(a=>!a.read_at):o;return{course:o[0].course,required:e.filter(a=>a.is_required),optional:e.filter(a=>!a.is_required),read:o.filter(a=>a.read_at).length,total:o.length}}).filter(o=>o.required.length+o.optional.length>0)}),d=v(()=>s.readingStats),k=v(()=>d.value.requiredTotal?Math.round(d.value.requiredRead/d.value.requiredTotal*100):0);return(p,u)=>{const o=F("router-link");return n(),l("div",null,[m(q,{eyebrow:"Do przeczytania",title:"Lektury"}),m(x,{ready:i(s).loaded.readings&&i(s).loaded.courses,error:i(s).error,onRetry:u[1]||(u[1]=e=>i(s).retry())},{default:w(()=>[m(T),t("section",S,[t("p",D,[t("span",P,r(d.value.requiredRead),1),t("span",E," z "+r(d.value.requiredTotal)+" obowiązkowych",1),t("span",O," · łącznie "+r(d.value.read)+" z "+r(d.value.total),1)]),t("div",{class:"progress-bar",role:"progressbar","aria-valuenow":k.value,"aria-valuemin":"0","aria-valuemax":"100","aria-label":"Przeczytane lektury obowiązkowe"},[t("span",{style:C({width:k.value+"%"})},null,4)],8,j)]),t("div",A,[t("button",{class:"chip",type:"button","aria-pressed":c.value,onClick:u[0]||(u[0]=e=>c.value=!c.value)},"Tylko nieprzeczytane",8,G)]),(n(!0),l(_,null,h(f.value,e=>(n(),l("section",{key:e.course.id,class:"section","aria-labelledby":`c${e.course.id}`},[t("div",U,[t("h2",{id:`c${e.course.id}`},[m(o,{to:`/przedmioty/${e.course.id}`,style:{color:"inherit","text-decoration":"none"}},{default:w(()=>[L(r(e.course.name),1)]),_:2},1032,["to"]),t("span",H,r(i(N)[e.course.form]),1)],8,W),t("span",J,r(e.read)+"/"+r(e.total),1)]),e.required.length?(n(),l(_,{key:0},[t("h3",K,"Obowiązkowe · "+r(e.required.length),1),t("ul",Q,[(n(!0),l(_,null,h(e.required,a=>(n(),z(b,{key:a.id,reading:a,onToggle:y=>i(s).toggleReading(a.id,y)},null,8,["reading","onToggle"]))),128))])],64)):g("",!0),e.optional.length?(n(),l(_,{key:1},[t("h3",X,"Dodatkowe · "+r(e.optional.length),1),t("ul",Y,[(n(!0),l(_,null,h(e.optional,a=>(n(),z(b,{key:a.id,reading:a,onToggle:y=>i(s).toggleReading(a.id,y)},null,8,["reading","onToggle"]))),128))])],64)):g("",!0)],8,I))),128)),f.value.length?g("",!0):(n(),l("p",Z,r(c.value?"Wszystko przeczytane. Gratulacje!":i(M)(0,"lektura","lektury","lektur")+" do wyświetlenia."),1))]),_:1},8,["ready","error"])])}}});export{le as default}; +import{_ as q}from"./PageHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js";import{_ as x}from"./LoadState.vue_vue_type_script_setup_true_lang-BYeP9cST.js";import{_ as T}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-ml4QcEZn.js";import{_ as b}from"./ReadingItem.vue_vue_type_script_setup_true_lang-BozrsWL2.js";import{d as $,p as B,q as R,c as l,h as m,i as w,b as i,o as n,a as t,t as r,z as C,F as _,y as h,e as g,r as V,s as v,k as F,m as L,B as z}from"./index-CvyVvvnt.js";import{c as M,F as N}from"./format-bcE-cYHJ.js";const S={class:"card","aria-label":"Postęp czytania"},D={style:{margin:"0 0 8px"}},P={class:"big-num nums"},E={class:"muted"},O={class:"muted small"},j=["aria-valuenow"],A={class:"chips wrap",style:{"margin-top":"12px"}},G=["aria-pressed"],I=["aria-labelledby"],U={class:"section-head"},W=["id"],H={class:"badge",style:{"margin-left":"8px"}},J={class:"muted small nums"},K={class:"subhead"},Q={class:"rows"},X={class:"subhead"},Y={class:"rows"},Z={key:0,class:"empty",style:{"margin-top":"16px"}},le=$({__name:"ReadingsView",setup(ee){const s=B(),c=V(!1);R(()=>{Promise.all([s.loadReadings(),s.loadCourses()])});const f=v(()=>{const p=new Map;for(const o of s.readings)p.set(o.course_id,[...p.get(o.course_id)??[],o]);const u=o=>s.courseById.get(o)?.sort_order??0;return[...p].sort(([o],[e])=>u(o)-u(e)).map(([,o])=>{const e=c.value?o.filter(a=>!a.read_at):o;return{course:o[0].course,required:e.filter(a=>a.is_required),optional:e.filter(a=>!a.is_required),read:o.filter(a=>a.read_at).length,total:o.length}}).filter(o=>o.required.length+o.optional.length>0)}),d=v(()=>s.readingStats),k=v(()=>d.value.requiredTotal?Math.round(d.value.requiredRead/d.value.requiredTotal*100):0);return(p,u)=>{const o=F("router-link");return n(),l("div",null,[m(q,{eyebrow:"Do przeczytania",title:"Lektury"}),m(x,{ready:i(s).loaded.readings&&i(s).loaded.courses,error:i(s).error,onRetry:u[1]||(u[1]=e=>i(s).retry())},{default:w(()=>[m(T),t("section",S,[t("p",D,[t("span",P,r(d.value.requiredRead),1),t("span",E," z "+r(d.value.requiredTotal)+" obowiązkowych",1),t("span",O," · łącznie "+r(d.value.read)+" z "+r(d.value.total),1)]),t("div",{class:"progress-bar",role:"progressbar","aria-valuenow":k.value,"aria-valuemin":"0","aria-valuemax":"100","aria-label":"Przeczytane lektury obowiązkowe"},[t("span",{style:C({width:k.value+"%"})},null,4)],8,j)]),t("div",A,[t("button",{class:"chip",type:"button","aria-pressed":c.value,onClick:u[0]||(u[0]=e=>c.value=!c.value)},"Tylko nieprzeczytane",8,G)]),(n(!0),l(_,null,h(f.value,e=>(n(),l("section",{key:e.course.id,class:"section","aria-labelledby":`c${e.course.id}`},[t("div",U,[t("h2",{id:`c${e.course.id}`},[m(o,{to:`/przedmioty/${e.course.id}`,style:{color:"inherit","text-decoration":"none"}},{default:w(()=>[L(r(e.course.name),1)]),_:2},1032,["to"]),t("span",H,r(i(N)[e.course.form]),1)],8,W),t("span",J,r(e.read)+"/"+r(e.total),1)]),e.required.length?(n(),l(_,{key:0},[t("h3",K,"Obowiązkowe · "+r(e.required.length),1),t("ul",Q,[(n(!0),l(_,null,h(e.required,a=>(n(),z(b,{key:a.id,reading:a,onToggle:y=>i(s).toggleReading(a.id,y)},null,8,["reading","onToggle"]))),128))])],64)):g("",!0),e.optional.length?(n(),l(_,{key:1},[t("h3",X,"Dodatkowe · "+r(e.optional.length),1),t("ul",Y,[(n(!0),l(_,null,h(e.optional,a=>(n(),z(b,{key:a.id,reading:a,onToggle:y=>i(s).toggleReading(a.id,y)},null,8,["reading","onToggle"]))),128))])],64)):g("",!0)],8,I))),128)),f.value.length?g("",!0):(n(),l("p",Z,r(c.value?"Wszystko przeczytane. Gratulacje!":i(M)(0,"lektura","lektury","lektur")+" do wyświetlenia."),1))]),_:1},8,["ready","error"])])}}});export{le as default}; diff --git a/public/assets/RegisterView-Clc4cUwL.js b/public/assets/RegisterView-DJ1QoVDK.js similarity index 98% rename from public/assets/RegisterView-Clc4cUwL.js rename to public/assets/RegisterView-DJ1QoVDK.js index 409282b..fd62999 100644 --- a/public/assets/RegisterView-Clc4cUwL.js +++ b/public/assets/RegisterView-DJ1QoVDK.js @@ -1 +1 @@ -import{d as q,u as N,c as o,a as s,t as n,h as _,i as g,g as B,e as u,w as d,v as m,r as l,k as C,o as i,m as x,l as I}from"./index-LFNXxSi2.js";import{f as M}from"./forms-CE5LqaKY.js";const h={class:"auth"},j={key:0,class:"stack"},S={class:"notice",role:"status"},Z={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},A={class:"field"},D={key:0,class:"error-text"},E={class:"field"},P={key:0,class:"error-text"},R={class:"field"},T={key:0,class:"error-text"},H={class:"field"},K={key:0,class:"error-text"},W={class:"field"},F=["disabled"],G={class:"auth-links"},Q=q({__name:"RegisterView",setup(J){const V=N(),z=I(),v=l(""),f=l(""),w=l(""),c=l(""),y=l(""),p=l(!1),t=l(null),k=l("");async function U(){p.value=!0,t.value=null;try{const r=await V.register({name:v.value.trim(),surname:f.value.trim(),email:w.value.trim(),password:c.value,password_confirmation:y.value},!0);r.signedIn?await z.replace("/"):k.value=r.message||"Konto zostało utworzone. Sprawdź pocztę, aby je aktywować."}catch(r){t.value=M(r)}finally{p.value=!1}}return(r,e)=>{const b=C("router-link");return i(),o("div",h,[e[12]||(e[12]=s("header",{class:"page-head"},[s("span",{class:"eyebrow"},"BM II° · UWr"),s("h1",null,"Załóż konto")],-1)),k.value?(i(),o("div",j,[s("p",S,n(k.value),1),_(b,{class:"btn",to:"/logowanie"},{default:g(()=>[...e[5]||(e[5]=[x("Przejdź do logowania",-1)])]),_:1})])):(i(),o("form",{key:1,onSubmit:B(U,["prevent"]),novalidate:""},[t.value?.message?(i(),o("div",Z,n(t.value.message),1)):u("",!0),s("div",A,[e[6]||(e[6]=s("label",{for:"name"},"Imię",-1)),d(s("input",{id:"name","onUpdate:modelValue":e[0]||(e[0]=a=>v.value=a),type:"text",autocomplete:"given-name",required:""},null,512),[[m,v.value]]),t.value?.fields.name?(i(),o("p",D,n(t.value.fields.name),1)):u("",!0)]),s("div",E,[e[7]||(e[7]=s("label",{for:"surname"},"Nazwisko",-1)),d(s("input",{id:"surname","onUpdate:modelValue":e[1]||(e[1]=a=>f.value=a),type:"text",autocomplete:"family-name",required:""},null,512),[[m,f.value]]),t.value?.fields.surname?(i(),o("p",P,n(t.value.fields.surname),1)):u("",!0)]),s("div",R,[e[8]||(e[8]=s("label",{for:"email"},"Adres e-mail",-1)),d(s("input",{id:"email","onUpdate:modelValue":e[2]||(e[2]=a=>w.value=a),type:"email",autocomplete:"email",inputmode:"email",required:""},null,512),[[m,w.value]]),t.value?.fields.email?(i(),o("p",T,n(t.value.fields.email),1)):u("",!0)]),s("div",H,[e[9]||(e[9]=s("label",{for:"password"},"Hasło (min. 8 znaków)",-1)),d(s("input",{id:"password","onUpdate:modelValue":e[3]||(e[3]=a=>c.value=a),type:"password",autocomplete:"new-password",required:""},null,512),[[m,c.value]]),t.value?.fields.password?(i(),o("p",K,n(t.value.fields.password),1)):u("",!0)]),s("div",W,[e[10]||(e[10]=s("label",{for:"confirmation"},"Powtórz hasło",-1)),d(s("input",{id:"confirmation","onUpdate:modelValue":e[4]||(e[4]=a=>y.value=a),type:"password",autocomplete:"new-password",required:""},null,512),[[m,y.value]])]),s("button",{class:"btn primary block",type:"submit",disabled:p.value},n(p.value?"Zakładanie…":"Załóż konto"),9,F)],32)),s("div",G,[_(b,{to:"/logowanie"},{default:g(()=>[...e[11]||(e[11]=[x("Mam już konto",-1)])]),_:1})])])}}});export{Q as default}; +import{d as q,u as N,c as o,a as s,t as n,h as _,i as g,g as B,e as u,w as d,v as m,r as l,k as C,o as i,m as x,l as I}from"./index-CvyVvvnt.js";import{f as M}from"./forms-Ca-hh7T4.js";const h={class:"auth"},j={key:0,class:"stack"},S={class:"notice",role:"status"},Z={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},A={class:"field"},D={key:0,class:"error-text"},E={class:"field"},P={key:0,class:"error-text"},R={class:"field"},T={key:0,class:"error-text"},H={class:"field"},K={key:0,class:"error-text"},W={class:"field"},F=["disabled"],G={class:"auth-links"},Q=q({__name:"RegisterView",setup(J){const V=N(),z=I(),v=l(""),f=l(""),w=l(""),c=l(""),y=l(""),p=l(!1),t=l(null),k=l("");async function U(){p.value=!0,t.value=null;try{const r=await V.register({name:v.value.trim(),surname:f.value.trim(),email:w.value.trim(),password:c.value,password_confirmation:y.value},!0);r.signedIn?await z.replace("/"):k.value=r.message||"Konto zostało utworzone. Sprawdź pocztę, aby je aktywować."}catch(r){t.value=M(r)}finally{p.value=!1}}return(r,e)=>{const b=C("router-link");return i(),o("div",h,[e[12]||(e[12]=s("header",{class:"page-head"},[s("span",{class:"eyebrow"},"BM II° · UWr"),s("h1",null,"Załóż konto")],-1)),k.value?(i(),o("div",j,[s("p",S,n(k.value),1),_(b,{class:"btn",to:"/logowanie"},{default:g(()=>[...e[5]||(e[5]=[x("Przejdź do logowania",-1)])]),_:1})])):(i(),o("form",{key:1,onSubmit:B(U,["prevent"]),novalidate:""},[t.value?.message?(i(),o("div",Z,n(t.value.message),1)):u("",!0),s("div",A,[e[6]||(e[6]=s("label",{for:"name"},"Imię",-1)),d(s("input",{id:"name","onUpdate:modelValue":e[0]||(e[0]=a=>v.value=a),type:"text",autocomplete:"given-name",required:""},null,512),[[m,v.value]]),t.value?.fields.name?(i(),o("p",D,n(t.value.fields.name),1)):u("",!0)]),s("div",E,[e[7]||(e[7]=s("label",{for:"surname"},"Nazwisko",-1)),d(s("input",{id:"surname","onUpdate:modelValue":e[1]||(e[1]=a=>f.value=a),type:"text",autocomplete:"family-name",required:""},null,512),[[m,f.value]]),t.value?.fields.surname?(i(),o("p",P,n(t.value.fields.surname),1)):u("",!0)]),s("div",R,[e[8]||(e[8]=s("label",{for:"email"},"Adres e-mail",-1)),d(s("input",{id:"email","onUpdate:modelValue":e[2]||(e[2]=a=>w.value=a),type:"email",autocomplete:"email",inputmode:"email",required:""},null,512),[[m,w.value]]),t.value?.fields.email?(i(),o("p",T,n(t.value.fields.email),1)):u("",!0)]),s("div",H,[e[9]||(e[9]=s("label",{for:"password"},"Hasło (min. 8 znaków)",-1)),d(s("input",{id:"password","onUpdate:modelValue":e[3]||(e[3]=a=>c.value=a),type:"password",autocomplete:"new-password",required:""},null,512),[[m,c.value]]),t.value?.fields.password?(i(),o("p",K,n(t.value.fields.password),1)):u("",!0)]),s("div",W,[e[10]||(e[10]=s("label",{for:"confirmation"},"Powtórz hasło",-1)),d(s("input",{id:"confirmation","onUpdate:modelValue":e[4]||(e[4]=a=>y.value=a),type:"password",autocomplete:"new-password",required:""},null,512),[[m,y.value]])]),s("button",{class:"btn primary block",type:"submit",disabled:p.value},n(p.value?"Zakładanie…":"Załóż konto"),9,F)],32)),s("div",G,[_(b,{to:"/logowanie"},{default:g(()=>[...e[11]||(e[11]=[x("Mam już konto",-1)])]),_:1})])])}}});export{Q as default}; diff --git a/public/assets/ResetView-BlxClKWv.js b/public/assets/ResetView-_AGvi3TG.js similarity index 97% rename from public/assets/ResetView-BlxClKWv.js rename to public/assets/ResetView-_AGvi3TG.js index 14a2586..0d58f18 100644 --- a/public/assets/ResetView-BlxClKWv.js +++ b/public/assets/ResetView-_AGvi3TG.js @@ -1 +1 @@ -import{d as _,r as t,c as a,a as o,h as g,i as x,g as V,t as m,e as v,b as q,w as c,v as f,j as z,k as N,o as l,m as h,n as B}from"./index-LFNXxSi2.js";import{f as C}from"./forms-CE5LqaKY.js";const U={class:"auth"},M={key:0,class:"stack"},Z={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},j={key:1,class:"field"},D={class:"field"},E={key:0,class:"error-text"},I={class:"field"},P=["disabled"],A=_({__name:"ResetView",setup(R){const u=z(),i=t(typeof u.query.code=="string"?u.query.code:""),n=t(""),p=t(""),d=t(!1),w=t(!1),s=t(null);async function b(){d.value=!0,s.value=null;try{await B.resetPassword({code:i.value.trim(),password:n.value,password_confirmation:p.value}),w.value=!0}catch(y){s.value=C(y)}finally{d.value=!1}}return(y,e)=>{const k=N("router-link");return l(),a("div",U,[e[8]||(e[8]=o("header",{class:"page-head"},[o("span",{class:"eyebrow"},"BM II° · UWr"),o("h1",null,"Nowe hasło")],-1)),w.value?(l(),a("div",M,[e[4]||(e[4]=o("p",{class:"notice",role:"status"},"Hasło zostało zmienione.",-1)),g(k,{class:"btn primary",to:"/logowanie"},{default:x(()=>[...e[3]||(e[3]=[h("Zaloguj się",-1)])]),_:1})])):(l(),a("form",{key:1,onSubmit:V(b,["prevent"]),novalidate:""},[s.value?.message?(l(),a("div",Z,m(s.value.message),1)):v("",!0),q(u).query.code?v("",!0):(l(),a("div",j,[e[5]||(e[5]=o("label",{for:"code"},"Kod z wiadomości",-1)),c(o("input",{id:"code","onUpdate:modelValue":e[0]||(e[0]=r=>i.value=r),type:"text",autocomplete:"one-time-code",required:""},null,512),[[f,i.value]])])),o("div",D,[e[6]||(e[6]=o("label",{for:"password"},"Nowe hasło (min. 8 znaków)",-1)),c(o("input",{id:"password","onUpdate:modelValue":e[1]||(e[1]=r=>n.value=r),type:"password",autocomplete:"new-password",required:""},null,512),[[f,n.value]]),s.value?.fields.password?(l(),a("p",E,m(s.value.fields.password),1)):v("",!0)]),o("div",I,[e[7]||(e[7]=o("label",{for:"confirmation"},"Powtórz hasło",-1)),c(o("input",{id:"confirmation","onUpdate:modelValue":e[2]||(e[2]=r=>p.value=r),type:"password",autocomplete:"new-password",required:""},null,512),[[f,p.value]])]),o("button",{class:"btn primary block",type:"submit",disabled:d.value||!i.value||!n.value},m(d.value?"Zapisywanie…":"Zapisz hasło"),9,P)],32))])}}});export{A as default}; +import{d as _,r as t,c as a,a as o,h as g,i as x,g as V,t as m,e as v,b as q,w as c,v as f,j as z,k as N,o as l,m as h,n as B}from"./index-CvyVvvnt.js";import{f as C}from"./forms-Ca-hh7T4.js";const U={class:"auth"},M={key:0,class:"stack"},Z={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},j={key:1,class:"field"},D={class:"field"},E={key:0,class:"error-text"},I={class:"field"},P=["disabled"],A=_({__name:"ResetView",setup(R){const u=z(),i=t(typeof u.query.code=="string"?u.query.code:""),n=t(""),p=t(""),d=t(!1),w=t(!1),s=t(null);async function b(){d.value=!0,s.value=null;try{await B.resetPassword({code:i.value.trim(),password:n.value,password_confirmation:p.value}),w.value=!0}catch(y){s.value=C(y)}finally{d.value=!1}}return(y,e)=>{const k=N("router-link");return l(),a("div",U,[e[8]||(e[8]=o("header",{class:"page-head"},[o("span",{class:"eyebrow"},"BM II° · UWr"),o("h1",null,"Nowe hasło")],-1)),w.value?(l(),a("div",M,[e[4]||(e[4]=o("p",{class:"notice",role:"status"},"Hasło zostało zmienione.",-1)),g(k,{class:"btn primary",to:"/logowanie"},{default:x(()=>[...e[3]||(e[3]=[h("Zaloguj się",-1)])]),_:1})])):(l(),a("form",{key:1,onSubmit:V(b,["prevent"]),novalidate:""},[s.value?.message?(l(),a("div",Z,m(s.value.message),1)):v("",!0),q(u).query.code?v("",!0):(l(),a("div",j,[e[5]||(e[5]=o("label",{for:"code"},"Kod z wiadomości",-1)),c(o("input",{id:"code","onUpdate:modelValue":e[0]||(e[0]=r=>i.value=r),type:"text",autocomplete:"one-time-code",required:""},null,512),[[f,i.value]])])),o("div",D,[e[6]||(e[6]=o("label",{for:"password"},"Nowe hasło (min. 8 znaków)",-1)),c(o("input",{id:"password","onUpdate:modelValue":e[1]||(e[1]=r=>n.value=r),type:"password",autocomplete:"new-password",required:""},null,512),[[f,n.value]]),s.value?.fields.password?(l(),a("p",E,m(s.value.fields.password),1)):v("",!0)]),o("div",I,[e[7]||(e[7]=o("label",{for:"confirmation"},"Powtórz hasło",-1)),c(o("input",{id:"confirmation","onUpdate:modelValue":e[2]||(e[2]=r=>p.value=r),type:"password",autocomplete:"new-password",required:""},null,512),[[f,p.value]])]),o("button",{class:"btn primary block",type:"submit",disabled:d.value||!i.value||!n.value},m(d.value?"Zapisywanie…":"Zapisz hasło"),9,P)],32))])}}});export{A as default}; diff --git a/public/assets/ScheduleView-CwxmPwjF.js b/public/assets/ScheduleView-BqW7gmzM.js similarity index 94% rename from public/assets/ScheduleView-CwxmPwjF.js rename to public/assets/ScheduleView-BqW7gmzM.js index 88a4469..5c9c5ca 100644 --- a/public/assets/ScheduleView-CwxmPwjF.js +++ b/public/assets/ScheduleView-BqW7gmzM.js @@ -1 +1 @@ -import{d as F,k as L,o as s,c as t,x as B,a,m as N,t as i,b as l,h as p,i as E,e as y,p as P,q as A,r as K,A as T,j as Z,F as f,y as C,s as v,l as I,B as O}from"./index-LFNXxSi2.js";import{_ as W}from"./PageHead.vue_vue_type_script_setup_true_lang-l9qe_URH.js";import{_ as G}from"./LoadState.vue_vue_type_script_setup_true_lang-BX6YDhEk.js";import{_ as H}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-mMQANJpk.js";import{a as D,F as J,t as Q,f as M,m as R,b as V,c as U,h as X,g as Y}from"./format-bcE-cYHJ.js";const ee={class:"time"},se={class:"name"},te={class:"meta"},ne={key:0},ae={key:1,class:"badge online"},oe={key:2,class:"badge onsite"},le={key:3,class:"mono"},ie={key:0,class:"note"},re=F({__name:"SessionCard",props:{session:{},showDay:{}},setup(o){return(u,h)=>{const z=L("router-link");return s(),t("article",{class:B(["session",{online:o.session.is_online}])},[a("div",ee,[N(i(l(D)(o.session.starts_at))+" ",1),a("span",null,i(l(D)(o.session.ends_at)),1)]),a("div",null,[a("div",se,[p(z,{to:`/przedmioty/${o.session.course_id}`,style:{color:"inherit","text-decoration":"none"}},{default:E(()=>[N(i(o.session.course.name),1)]),_:1},8,["to"])]),a("div",te,[a("span",null,i(l(J)[o.session.course.form]),1),o.session.kind?(s(),t("span",ne,"· "+i(o.session.kind),1)):y("",!0),o.session.is_online?(s(),t("span",ae,"online")):o.session.room?(s(),t("span",oe,"sala "+i(o.session.room),1)):y("",!0),o.showDay?(s(),t("span",le,i(o.showDay),1)):y("",!0)]),o.session.notes?(s(),t("div",ie,i(o.session.notes),1)):y("",!0)])],2)}}}),ue={"aria-label":"Wybór zjazdu"},ce={class:"chips"},de=["aria-pressed","aria-current","title","onClick"],me=["aria-label"],ve={class:"meeting-bar","aria-live":"polite"},ye={key:1,class:"badge solid"},_e={key:2,class:"badge alert"},be={key:0,class:"notice",style:{"margin-bottom":"16px"}},he=["aria-label"],ke={class:"day-head"},fe={key:2,class:"empty"},pe={class:"btn-row",style:{"margin-top":"18px","justify-content":"space-between"}},ze=["disabled"],ge=["disabled"],je={key:1,class:"empty"},Ne=F({__name:"ScheduleView",setup(o){const u=P(),h=Z(),z=I();A(()=>{Promise.all([u.loadMeetings(),u.loadSchedule(),u.loadCourses()])});const m=v(()=>u.meetings??[]),g=Q(),S=v(()=>m.value.find(n=>n.starts_on<=g&&g<=n.ends_on)??null),q=v(()=>m.value.find(n=>n.starts_on>g)??null),k=K(Number(h.query.zjazd)||null),j=v(()=>k.value??S.value?.number??q.value?.number??m.value.at(-1)?.number??null),c=v(()=>m.value.find(n=>n.number===j.value)??null),_=v(()=>m.value.findIndex(n=>n.number===j.value));function $(n){k.value=n,z.replace({query:{...h.query,zjazd:String(n)}})}T(()=>h.query.zjazd,n=>{const r=Number(n);r&&r!==k.value&&(k.value=r)});const w=v(()=>{const n=c.value;if(!n)return[];const r=new Map;for(const e of u.schedule){if(e.meeting_id!==n.id)continue;const d=X(e.starts_at);r.set(d,[...r.get(d)??[],e])}return[...r].sort(([e],[d])=>e.localeCompare(d)).map(([e,d])=>({key:e,sessions:d}))}),x=v(()=>Y(c.value?.notes)),b=n=>S.value?.number===n?"current":q.value?.number===n?"next":"";return(n,r)=>(s(),t("div",null,[p(W,{eyebrow:"Zjazdy",title:"Plan zajęć"}),p(G,{ready:l(u).loaded.meetings&&l(u).loaded.schedule&&l(u).loaded.courses,error:l(u).error,onRetry:r[2]||(r[2]=e=>l(u).retry())},{default:E(()=>[p(H),a("nav",ue,[a("div",ce,[(s(!0),t(f,null,C(m.value,e=>(s(),t("button",{key:e.id,class:"chip",type:"button","aria-pressed":e.number===j.value,"aria-current":b(e.number)==="current"?"date":void 0,title:l(M)(e.starts_on,e.ends_on),onClick:d=>$(e.number)},[N(i(e.number),1),b(e.number)?(s(),t("span",{key:0,class:"dot","aria-label":b(e.number)==="current"?"trwa":"najbliższy"},null,8,me)):y("",!0)],8,de))),128))])]),c.value?(s(),t(f,{key:0},[a("section",ve,[a("h2",null,"Zjazd "+i(c.value.number),1),a("span",null,i(l(M)(c.value.starts_on,c.value.ends_on)),1),x.value?(s(),t("span",{key:0,class:B(["badge",x.value==="online"?"online":"onsite"])},i(x.value),3)):y("",!0),b(c.value.number)==="current"?(s(),t("span",ye,"trwa teraz")):b(c.value.number)==="next"?(s(),t("span",_e,"najbliższy")):y("",!0)]),l(R)(c.value.notes)?(s(),t("p",be,i(l(R)(c.value.notes)),1)):y("",!0),w.value.length?(s(),t("div",{key:1,class:B(["days",{two:w.value.length===2}])},[(s(!0),t(f,null,C(w.value,e=>(s(),t("section",{key:e.key,"aria-label":l(V)(e.sessions[0].starts_at)},[a("div",ke,[a("span",null,i(l(V)(e.sessions[0].starts_at)),1),a("span",null,i(l(U)(e.sessions.length,"zajęcia","zajęcia","zajęć")),1)]),(s(!0),t(f,null,C(e.sessions,d=>(s(),O(re,{key:d.id,session:d},null,8,["session"]))),128))],8,he))),128))],2)):(s(),t("p",fe,"Brak zajęć w tym zjeździe (może należą do ukrytych alternatyw).")),a("div",pe,[a("button",{class:"btn small",type:"button",disabled:_.value<=0,onClick:r[0]||(r[0]=e=>$(m.value[_.value-1].number))},"← Poprzedni zjazd",8,ze),a("button",{class:"btn small",type:"button",disabled:_.value<0||_.value>=m.value.length-1,onClick:r[1]||(r[1]=e=>$(m.value[_.value+1].number))},"Następny zjazd →",8,ge)])],64)):(s(),t("p",je,"Brak zjazdów."))]),_:1},8,["ready","error"])]))}});export{Ne as default}; +import{d as F,k as L,o as s,c as t,x as B,a,m as N,t as i,b as l,h as p,i as E,e as y,p as P,q as A,r as K,A as T,j as Z,F as f,y as C,s as v,l as I,B as O}from"./index-CvyVvvnt.js";import{_ as W}from"./PageHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js";import{_ as G}from"./LoadState.vue_vue_type_script_setup_true_lang-BYeP9cST.js";import{_ as H}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-ml4QcEZn.js";import{a as D,F as J,t as Q,f as M,m as R,b as V,c as U,h as X,g as Y}from"./format-bcE-cYHJ.js";const ee={class:"time"},se={class:"name"},te={class:"meta"},ne={key:0},ae={key:1,class:"badge online"},oe={key:2,class:"badge onsite"},le={key:3,class:"mono"},ie={key:0,class:"note"},re=F({__name:"SessionCard",props:{session:{},showDay:{}},setup(o){return(u,h)=>{const z=L("router-link");return s(),t("article",{class:B(["session",{online:o.session.is_online}])},[a("div",ee,[N(i(l(D)(o.session.starts_at))+" ",1),a("span",null,i(l(D)(o.session.ends_at)),1)]),a("div",null,[a("div",se,[p(z,{to:`/przedmioty/${o.session.course_id}`,style:{color:"inherit","text-decoration":"none"}},{default:E(()=>[N(i(o.session.course.name),1)]),_:1},8,["to"])]),a("div",te,[a("span",null,i(l(J)[o.session.course.form]),1),o.session.kind?(s(),t("span",ne,"· "+i(o.session.kind),1)):y("",!0),o.session.is_online?(s(),t("span",ae,"online")):o.session.room?(s(),t("span",oe,"sala "+i(o.session.room),1)):y("",!0),o.showDay?(s(),t("span",le,i(o.showDay),1)):y("",!0)]),o.session.notes?(s(),t("div",ie,i(o.session.notes),1)):y("",!0)])],2)}}}),ue={"aria-label":"Wybór zjazdu"},ce={class:"chips"},de=["aria-pressed","aria-current","title","onClick"],me=["aria-label"],ve={class:"meeting-bar","aria-live":"polite"},ye={key:1,class:"badge solid"},_e={key:2,class:"badge alert"},be={key:0,class:"notice",style:{"margin-bottom":"16px"}},he=["aria-label"],ke={class:"day-head"},fe={key:2,class:"empty"},pe={class:"btn-row",style:{"margin-top":"18px","justify-content":"space-between"}},ze=["disabled"],ge=["disabled"],je={key:1,class:"empty"},Ne=F({__name:"ScheduleView",setup(o){const u=P(),h=Z(),z=I();A(()=>{Promise.all([u.loadMeetings(),u.loadSchedule(),u.loadCourses()])});const m=v(()=>u.meetings??[]),g=Q(),S=v(()=>m.value.find(n=>n.starts_on<=g&&g<=n.ends_on)??null),q=v(()=>m.value.find(n=>n.starts_on>g)??null),k=K(Number(h.query.zjazd)||null),j=v(()=>k.value??S.value?.number??q.value?.number??m.value.at(-1)?.number??null),c=v(()=>m.value.find(n=>n.number===j.value)??null),_=v(()=>m.value.findIndex(n=>n.number===j.value));function $(n){k.value=n,z.replace({query:{...h.query,zjazd:String(n)}})}T(()=>h.query.zjazd,n=>{const r=Number(n);r&&r!==k.value&&(k.value=r)});const w=v(()=>{const n=c.value;if(!n)return[];const r=new Map;for(const e of u.schedule){if(e.meeting_id!==n.id)continue;const d=X(e.starts_at);r.set(d,[...r.get(d)??[],e])}return[...r].sort(([e],[d])=>e.localeCompare(d)).map(([e,d])=>({key:e,sessions:d}))}),x=v(()=>Y(c.value?.notes)),b=n=>S.value?.number===n?"current":q.value?.number===n?"next":"";return(n,r)=>(s(),t("div",null,[p(W,{eyebrow:"Zjazdy",title:"Plan zajęć"}),p(G,{ready:l(u).loaded.meetings&&l(u).loaded.schedule&&l(u).loaded.courses,error:l(u).error,onRetry:r[2]||(r[2]=e=>l(u).retry())},{default:E(()=>[p(H),a("nav",ue,[a("div",ce,[(s(!0),t(f,null,C(m.value,e=>(s(),t("button",{key:e.id,class:"chip",type:"button","aria-pressed":e.number===j.value,"aria-current":b(e.number)==="current"?"date":void 0,title:l(M)(e.starts_on,e.ends_on),onClick:d=>$(e.number)},[N(i(e.number),1),b(e.number)?(s(),t("span",{key:0,class:"dot","aria-label":b(e.number)==="current"?"trwa":"najbliższy"},null,8,me)):y("",!0)],8,de))),128))])]),c.value?(s(),t(f,{key:0},[a("section",ve,[a("h2",null,"Zjazd "+i(c.value.number),1),a("span",null,i(l(M)(c.value.starts_on,c.value.ends_on)),1),x.value?(s(),t("span",{key:0,class:B(["badge",x.value==="online"?"online":"onsite"])},i(x.value),3)):y("",!0),b(c.value.number)==="current"?(s(),t("span",ye,"trwa teraz")):b(c.value.number)==="next"?(s(),t("span",_e,"najbliższy")):y("",!0)]),l(R)(c.value.notes)?(s(),t("p",be,i(l(R)(c.value.notes)),1)):y("",!0),w.value.length?(s(),t("div",{key:1,class:B(["days",{two:w.value.length===2}])},[(s(!0),t(f,null,C(w.value,e=>(s(),t("section",{key:e.key,"aria-label":l(V)(e.sessions[0].starts_at)},[a("div",ke,[a("span",null,i(l(V)(e.sessions[0].starts_at)),1),a("span",null,i(l(U)(e.sessions.length,"zajęcia","zajęcia","zajęć")),1)]),(s(!0),t(f,null,C(e.sessions,d=>(s(),O(re,{key:d.id,session:d},null,8,["session"]))),128))],8,he))),128))],2)):(s(),t("p",fe,"Brak zajęć w tym zjeździe (może należą do ukrytych alternatyw).")),a("div",pe,[a("button",{class:"btn small",type:"button",disabled:_.value<=0,onClick:r[0]||(r[0]=e=>$(m.value[_.value-1].number))},"← Poprzedni zjazd",8,ze),a("button",{class:"btn small",type:"button",disabled:_.value<0||_.value>=m.value.length-1,onClick:r[1]||(r[1]=e=>$(m.value[_.value+1].number))},"Następny zjazd →",8,ge)])],64)):(s(),t("p",je,"Brak zjazdów."))]),_:1},8,["ready","error"])]))}});export{Ne as default}; diff --git a/public/assets/SpeakerTools-Bho-eA9w.js b/public/assets/SpeakerTools-Bho-eA9w.js new file mode 100644 index 0000000..e652375 --- /dev/null +++ b/public/assets/SpeakerTools-Bho-eA9w.js @@ -0,0 +1 @@ +import{d as y,o as i,c as u,a as l,w as c,X as g,x as s,t as a,m as n,e as k,F as v}from"./index-CvyVvvnt.js";const p={key:0,class:"tools",role:"group","aria-label":"Sterowanie prezentacją"},C={class:"tools-group"},j=["disabled","title"],m={class:"tools-group"},z=["aria-pressed"],P=["aria-pressed"],$=["aria-pressed"],w=["aria-pressed"],S={class:"tools-group tools-end"},T={key:0,class:"tools-pilot",role:"status",title:"Telefon steruje tą kartą"},f={key:1,class:"tools-pilot elsewhere",role:"status",title:"Kliknij tę kartę albo naciśnij klawisz, aby przejąć pilota"},F=["aria-pressed"],H="Zegar ruszy przy pierwszej zmianie slajdu",r="Klik lub T: pauza · R: zeruj · C: schowaj",N=y({__name:"SpeakerTools",props:{clock:{},panel:{},special:{type:Boolean},hasSpecial:{type:Boolean},fullscreenEnabled:{type:Boolean},fullscreenOn:{type:Boolean},toolbarHidden:{type:Boolean},togglePanel:{type:Function},toggleSpecial:{type:Function},toggleToolbar:{type:Function},toggleFullscreen:{type:Function},pilot:{}},emits:["pause","reset","toggleHidden","close"],setup(e,{emit:b}){const d=b;return(B,t)=>(i(),u(v,null,[e.toolbarHidden?k("",!0):(i(),u("div",p,[l("div",C,[c(l("button",{id:"speaker-clock",type:"button",class:s(["docked",{paused:e.clock.paused}]),title:r,"aria-label":"Zegar prelegenta",onClick:t[0]||(t[0]=o=>d("pause"))},[t[13]||(t[13]=l("span",null,"slajd",-1)),l("b",{class:s(["clk-slide",{over:e.clock.slideOver}])},a(e.clock.slide),3),t[14]||(t[14]=l("span",null,"całość",-1)),l("b",{class:s(["clk-total",{over:e.clock.totalOver}])},a(e.clock.total),3),l("span",{class:s(["clk-pace",{late:e.clock.late}])},a(e.clock.pace),3)],2),[[g,!e.clock.hidden]]),l("button",{type:"button","aria-keyshortcuts":"T",disabled:e.clock.idle,title:e.clock.idle?H:void 0,onClick:t[1]||(t[1]=o=>d("pause"))},[n(a(e.clock.paused?"Wznów":"Pauza")+" ",1),t[15]||(t[15]=l("kbd",null,"T",-1))],8,j),l("button",{type:"button","aria-keyshortcuts":"R",onClick:t[2]||(t[2]=o=>d("reset"))},[...t[16]||(t[16]=[n(" Zeruj ",-1),l("kbd",null,"R",-1)])]),l("button",{type:"button","aria-keyshortcuts":"C",onClick:t[3]||(t[3]=o=>d("toggleHidden"))},[n(a(e.clock.hidden?"Pokaż zegar":"Ukryj zegar")+" ",1),t[17]||(t[17]=l("kbd",null,"C",-1))])]),l("div",m,[l("button",{type:"button","aria-pressed":e.panel==="say","aria-keyshortcuts":"P",onClick:t[4]||(t[4]=o=>e.togglePanel("say"))},[...t[18]||(t[18]=[n(" Powiedz ",-1),l("kbd",null,"P",-1)])],8,z),l("button",{type:"button","aria-pressed":e.panel==="notes","aria-keyshortcuts":"N",onClick:t[5]||(t[5]=o=>e.togglePanel("notes"))},[...t[19]||(t[19]=[n(" Notatki ",-1),l("kbd",null,"N",-1)])],8,P),l("button",{type:"button","aria-pressed":e.panel==="srcs","aria-keyshortcuts":"Z",onClick:t[6]||(t[6]=o=>e.togglePanel("srcs"))},[...t[20]||(t[20]=[n(" Źródła ",-1),l("kbd",null,"Z",-1)])],8,$),l("button",{type:"button",class:s(["tool-s",{unavailable:!e.hasSpecial}]),"aria-pressed":e.special,"aria-keyshortcuts":"S",onClick:t[7]||(t[7]=o=>e.toggleSpecial())},[...t[21]||(t[21]=[n(" Slajd specjalny ",-1),l("kbd",null,"S",-1)])],10,w)]),l("div",S,[e.pilot==="active"?(i(),u("span",T,[...t[22]||(t[22]=[l("i",{class:"tools-pilot-dot","aria-hidden":"true"},null,-1),n("Pilot",-1)])])):e.pilot==="elsewhere"?(i(),u("span",f,"Pilot steruje inną kartą")):k("",!0),e.fullscreenEnabled?(i(),u("button",{key:2,type:"button","aria-pressed":e.fullscreenOn,"aria-keyshortcuts":"F",onClick:t[8]||(t[8]=o=>e.toggleFullscreen())},[...t[23]||(t[23]=[n(" Pełny ekran ",-1),l("kbd",null,"F",-1)])],8,F)):k("",!0),l("button",{type:"button","aria-keyshortcuts":"H",onClick:t[9]||(t[9]=o=>e.toggleToolbar())},[...t[24]||(t[24]=[n(" Ukryj pasek ",-1),l("kbd",null,"H",-1)])]),l("button",{type:"button",onClick:t[10]||(t[10]=o=>d("close"))},"Zamknij")])])),e.toolbarHidden&&!e.clock.hidden?(i(),u("button",{key:1,id:"speaker-clock",type:"button",class:s(["floating",{paused:e.clock.paused}]),title:r,"aria-label":"Zegar prelegenta",onClick:t[11]||(t[11]=o=>d("pause"))},[t[25]||(t[25]=l("span",null,"slajd",-1)),l("b",{class:s(["clk-slide",{over:e.clock.slideOver}])},a(e.clock.slide),3),t[26]||(t[26]=l("span",null,"całość",-1)),l("b",{class:s(["clk-total",{over:e.clock.totalOver}])},a(e.clock.total),3),l("span",{class:s(["clk-pace",{late:e.clock.late}])},a(e.clock.pace),3)],2)):k("",!0),e.toolbarHidden?(i(),u("button",{key:2,type:"button",class:"tools-show","aria-keyshortcuts":"H",onClick:t[12]||(t[12]=o=>e.toggleToolbar())},[...t[27]||(t[27]=[n(" Pokaż pasek ",-1),l("kbd",null,"H",-1)])])):k("",!0)],64))}});export{N as default}; diff --git a/public/assets/SpeakerTools-CZrzKggt.js b/public/assets/SpeakerTools-CZrzKggt.js deleted file mode 100644 index 5377ca3..0000000 --- a/public/assets/SpeakerTools-CZrzKggt.js +++ /dev/null @@ -1 +0,0 @@ -import{d as y,o as d,c as u,a as l,w as g,W as c,x as s,t as a,m as n,e as k,F as v}from"./index-LFNXxSi2.js";const C={key:0,class:"tools",role:"group","aria-label":"Sterowanie prezentacją"},m={class:"tools-group"},j=["disabled","title"],p={class:"tools-group"},z=["aria-pressed"],$=["aria-pressed"],P=["aria-pressed"],S=["aria-pressed"],F={class:"tools-group tools-end"},H=["aria-pressed"],T="Zegar ruszy przy pierwszej zmianie slajdu",r="Klik lub T: pauza · R: zeruj · C: schowaj",B=y({__name:"SpeakerTools",props:{clock:{},panel:{},special:{type:Boolean},hasSpecial:{type:Boolean},fullscreenEnabled:{type:Boolean},fullscreenOn:{type:Boolean},toolbarHidden:{type:Boolean},togglePanel:{type:Function},toggleSpecial:{type:Function},toggleToolbar:{type:Function},toggleFullscreen:{type:Function}},emits:["pause","reset","toggleHidden","close"],setup(e,{emit:b}){const i=b;return(f,t)=>(d(),u(v,null,[e.toolbarHidden?k("",!0):(d(),u("div",C,[l("div",m,[g(l("button",{id:"speaker-clock",type:"button",class:s(["docked",{paused:e.clock.paused}]),title:r,"aria-label":"Zegar prelegenta",onClick:t[0]||(t[0]=o=>i("pause"))},[t[13]||(t[13]=l("span",null,"slajd",-1)),l("b",{class:s(["clk-slide",{over:e.clock.slideOver}])},a(e.clock.slide),3),t[14]||(t[14]=l("span",null,"całość",-1)),l("b",{class:s(["clk-total",{over:e.clock.totalOver}])},a(e.clock.total),3),l("span",{class:s(["clk-pace",{late:e.clock.late}])},a(e.clock.pace),3)],2),[[c,!e.clock.hidden]]),l("button",{type:"button","aria-keyshortcuts":"T",disabled:e.clock.idle,title:e.clock.idle?T:void 0,onClick:t[1]||(t[1]=o=>i("pause"))},[n(a(e.clock.paused?"Wznów":"Pauza")+" ",1),t[15]||(t[15]=l("kbd",null,"T",-1))],8,j),l("button",{type:"button","aria-keyshortcuts":"R",onClick:t[2]||(t[2]=o=>i("reset"))},[...t[16]||(t[16]=[n(" Zeruj ",-1),l("kbd",null,"R",-1)])]),l("button",{type:"button","aria-keyshortcuts":"C",onClick:t[3]||(t[3]=o=>i("toggleHidden"))},[n(a(e.clock.hidden?"Pokaż zegar":"Ukryj zegar")+" ",1),t[17]||(t[17]=l("kbd",null,"C",-1))])]),l("div",p,[l("button",{type:"button","aria-pressed":e.panel==="say","aria-keyshortcuts":"P",onClick:t[4]||(t[4]=o=>e.togglePanel("say"))},[...t[18]||(t[18]=[n(" Powiedz ",-1),l("kbd",null,"P",-1)])],8,z),l("button",{type:"button","aria-pressed":e.panel==="notes","aria-keyshortcuts":"N",onClick:t[5]||(t[5]=o=>e.togglePanel("notes"))},[...t[19]||(t[19]=[n(" Notatki ",-1),l("kbd",null,"N",-1)])],8,$),l("button",{type:"button","aria-pressed":e.panel==="srcs","aria-keyshortcuts":"Z",onClick:t[6]||(t[6]=o=>e.togglePanel("srcs"))},[...t[20]||(t[20]=[n(" Źródła ",-1),l("kbd",null,"Z",-1)])],8,P),l("button",{type:"button",class:s(["tool-s",{unavailable:!e.hasSpecial}]),"aria-pressed":e.special,"aria-keyshortcuts":"S",onClick:t[7]||(t[7]=o=>e.toggleSpecial())},[...t[21]||(t[21]=[n(" Slajd specjalny ",-1),l("kbd",null,"S",-1)])],10,S)]),l("div",F,[e.fullscreenEnabled?(d(),u("button",{key:0,type:"button","aria-pressed":e.fullscreenOn,"aria-keyshortcuts":"F",onClick:t[8]||(t[8]=o=>e.toggleFullscreen())},[...t[22]||(t[22]=[n(" Pełny ekran ",-1),l("kbd",null,"F",-1)])],8,H)):k("",!0),l("button",{type:"button","aria-keyshortcuts":"H",onClick:t[9]||(t[9]=o=>e.toggleToolbar())},[...t[23]||(t[23]=[n(" Ukryj pasek ",-1),l("kbd",null,"H",-1)])]),l("button",{type:"button",onClick:t[10]||(t[10]=o=>i("close"))},"Zamknij")])])),e.toolbarHidden&&!e.clock.hidden?(d(),u("button",{key:1,id:"speaker-clock",type:"button",class:s(["floating",{paused:e.clock.paused}]),title:r,"aria-label":"Zegar prelegenta",onClick:t[11]||(t[11]=o=>i("pause"))},[t[24]||(t[24]=l("span",null,"slajd",-1)),l("b",{class:s(["clk-slide",{over:e.clock.slideOver}])},a(e.clock.slide),3),t[25]||(t[25]=l("span",null,"całość",-1)),l("b",{class:s(["clk-total",{over:e.clock.totalOver}])},a(e.clock.total),3),l("span",{class:s(["clk-pace",{late:e.clock.late}])},a(e.clock.pace),3)],2)):k("",!0),e.toolbarHidden?(d(),u("button",{key:2,type:"button",class:"tools-show","aria-keyshortcuts":"H",onClick:t[12]||(t[12]=o=>e.toggleToolbar())},[...t[26]||(t[26]=[n(" Pokaż pasek ",-1),l("kbd",null,"H",-1)])])):k("",!0)],64))}});export{B as default}; diff --git a/public/assets/_plugin-vue_export-helper-DlAUqK2U.js b/public/assets/_plugin-vue_export-helper-DlAUqK2U.js new file mode 100644 index 0000000..718edd3 --- /dev/null +++ b/public/assets/_plugin-vue_export-helper-DlAUqK2U.js @@ -0,0 +1 @@ +const s=(t,r)=>{const o=t.__vccOpts||t;for(const[c,e]of r)o[c]=e;return o};export{s as _}; diff --git a/public/assets/forms-CE5LqaKY.js b/public/assets/forms-Ca-hh7T4.js similarity index 85% rename from public/assets/forms-CE5LqaKY.js rename to public/assets/forms-Ca-hh7T4.js index 8a72d08..82d9802 100644 --- a/public/assets/forms-CE5LqaKY.js +++ b/public/assets/forms-Ca-hh7T4.js @@ -1 +1 @@ -import{Q as o}from"./index-LFNXxSi2.js";function a(s){if(s instanceof o){const e={};for(const[r,t]of Object.entries(s.errors))t.length&&(e[r]=t[0]);return{message:Object.keys(e).length&&Object.values(e).includes(s.message)?"":s.message,fields:e}}return{message:"Coś poszło nie tak. Spróbuj ponownie.",fields:{}}}function f(s){return typeof s=="string"&&s.startsWith("/")&&!s.startsWith("//")&&!s.startsWith("/\\")?s:"/"}export{a as f,f as s}; +import{Q as o}from"./index-CvyVvvnt.js";function a(s){if(s instanceof o){const e={};for(const[r,t]of Object.entries(s.errors))t.length&&(e[r]=t[0]);return{message:Object.keys(e).length&&Object.values(e).includes(s.message)?"":s.message,fields:e}}return{message:"Coś poszło nie tak. Spróbuj ponownie.",fields:{}}}function f(s){return typeof s=="string"&&s.startsWith("/")&&!s.startsWith("//")&&!s.startsWith("/\\")?s:"/"}export{a as f,f as s}; diff --git a/public/assets/index-B53bcf0x.js b/public/assets/index-B53bcf0x.js new file mode 100644 index 0000000..c8a58a2 --- /dev/null +++ b/public/assets/index-B53bcf0x.js @@ -0,0 +1,7 @@ +function w(o,e,t,s){function i(n){return n instanceof t?n:new t(function(r){r(n)})}return new(t||(t=Promise))(function(n,r){function h(f){try{d(s.next(f))}catch(P){r(P)}}function a(f){try{d(s.throw(f))}catch(P){r(P)}}function d(f){f.done?n(f.value):i(f.value).then(h,a)}d((s=s.apply(o,[])).next())})}function Z(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var A={exports:{}},K;function ee(){if(K)return A.exports;K=1;var o=typeof Reflect=="object"?Reflect:null,e=o&&typeof o.apply=="function"?o.apply:function(c,u,_){return Function.prototype.apply.call(c,u,_)},t;o&&typeof o.ownKeys=="function"?t=o.ownKeys:Object.getOwnPropertySymbols?t=function(c){return Object.getOwnPropertyNames(c).concat(Object.getOwnPropertySymbols(c))}:t=function(c){return Object.getOwnPropertyNames(c)};function s(l){console&&console.warn&&console.warn(l)}var i=Number.isNaN||function(c){return c!==c};function n(){n.init.call(this)}A.exports=n,A.exports.once=I,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._eventsCount=0,n.prototype._maxListeners=void 0;var r=10;function h(l){if(typeof l!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof l)}Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:function(){return r},set:function(l){if(typeof l!="number"||l<0||i(l))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+l+".");r=l}}),n.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},n.prototype.setMaxListeners=function(c){if(typeof c!="number"||c<0||i(c))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+c+".");return this._maxListeners=c,this};function a(l){return l._maxListeners===void 0?n.defaultMaxListeners:l._maxListeners}n.prototype.getMaxListeners=function(){return a(this)},n.prototype.emit=function(c){for(var u=[],_=1;_0&&(m=u[0]),m instanceof Error)throw m;var x=new Error("Unhandled error."+(m?" ("+m.message+")":""));throw x.context=m,x}var U=S[c];if(U===void 0)return!1;if(typeof U=="function")e(U,this,u);else for(var J=U.length,Y=v(U,J),_=0;_0&&m.length>p&&!m.warned){m.warned=!0;var x=new Error("Possible EventEmitter memory leak detected. "+m.length+" "+String(c)+" listeners added. Use emitter.setMaxListeners() to increase limit");x.name="MaxListenersExceededWarning",x.emitter=l,x.type=c,x.count=m.length,s(x)}return l}n.prototype.addListener=function(c,u){return d(this,c,u,!1)},n.prototype.on=n.prototype.addListener,n.prototype.prependListener=function(c,u){return d(this,c,u,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function P(l,c,u){var _={fired:!1,wrapFn:void 0,target:l,type:c,listener:u},p=f.bind(_);return p.listener=u,_.wrapFn=p,p}n.prototype.once=function(c,u){return h(u),this.on(c,P(this,c,u)),this},n.prototype.prependOnceListener=function(c,u){return h(u),this.prependListener(c,P(this,c,u)),this},n.prototype.removeListener=function(c,u){var _,p,S,m,x;if(h(u),p=this._events,p===void 0)return this;if(_=p[c],_===void 0)return this;if(_===u||_.listener===u)--this._eventsCount===0?this._events=Object.create(null):(delete p[c],p.removeListener&&this.emit("removeListener",c,_.listener||u));else if(typeof _!="function"){for(S=-1,m=_.length-1;m>=0;m--)if(_[m]===u||_[m].listener===u){x=_[m].listener,S=m;break}if(S<0)return this;S===0?_.shift():y(_,S),_.length===1&&(p[c]=_[0]),p.removeListener!==void 0&&this.emit("removeListener",c,x||u)}return this},n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=function(c){var u,_,p;if(_=this._events,_===void 0)return this;if(_.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):_[c]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete _[c]),this;if(arguments.length===0){var S=Object.keys(_),m;for(p=0;p=0;p--)this.removeListener(c,u[p]);return this};function R(l,c,u){var _=l._events;if(_===void 0)return[];var p=_[c];return p===void 0?[]:typeof p=="function"?u?[p.listener||p]:[p]:u?T(p):v(p,p.length)}n.prototype.listeners=function(c){return R(this,c,!0)},n.prototype.rawListeners=function(c){return R(this,c,!1)},n.listenerCount=function(l,c){return typeof l.listenerCount=="function"?l.listenerCount(c):g.call(l,c)},n.prototype.listenerCount=g;function g(l){var c=this._events;if(c!==void 0){var u=c[l];if(typeof u=="function")return 1;if(u!==void 0)return u.length}return 0}n.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function v(l,c){for(var u=new Array(c),_=0;_31&&(o=31);const s=ne(0,Math.min(t,e*Math.pow(2,o)));return Math.min(t,e+s)}function re(o){return"error"in o&&o.error!==null}function j(o){return Math.min(o*1e3,2147483647)}function oe(o){try{return typeof localStorage>"u"||localStorage===null||!q(localStorage.getItem)?null:localStorage.getItem(o)}catch{return null}}var C;(function(o){o[o.Live=0]="Live",o[o.Stream=1]="Stream",o[o.State=2]="State"})(C||(C={}));class W extends Q{constructor(e,t,s){super(),this._resubscribeTimeout=null,this._refreshTimeout=null,this._getState=null,this._map=!1,this._mapPresenceType=1,this._mapPhase=null,this._mapStateBuffer=[],this._mapStreamBuffer=[],this._mapCursor="",this._mapPageSize=0,this._mapUnrecoverableStrategy="from_scratch",this._debounceMs=0,this._debouncePending=new Map,this._sharedPoll=!1,this._sharedPollEpoch="",this._sharedPollTrackedItems=new Map,this._sharedPollGetSignature=null,this._sharedPollSignatureRefreshTimeout=null,this._sharedPollSignatureRefreshAttempts=0,this._sharedPollTrackRetryTimeout=null,this._sharedPollTrackRetryAttempts=0,this._sharedPollReplayRetryTimeout=null,this._sharedPollReplayRetryAttempts=0,this._sharedPollSignatures=[],this._sharedPollSignatureRefreshTargetMs=null,this._sharedPollSignatureRefreshInFlight=!1,this.channel=t,this.state=E.Unsubscribed,this._centrifuge=e,this._token="",this._getToken=null,this._data=null,this._getData=null,this._recover=!1,this._offset=null,this._epoch=null,this._id=0,this._recoverable=!1,this._positioned=!1,this._joinLeave=!1,this._minResubscribeDelay=500,this._maxResubscribeDelay=2e4,this._resubscribeTimeout=null,this._resubscribeAttempts=0,this._promises={},this._promiseId=0,this._inflight=!1,this._refreshTimeout=null,this._delta="",this._delta_negotiated=!1,this._tagsFilter=null,this._prevValueMap=new Map,this._unsubPromise=Promise.resolve(),this._deltaNumPubs=0,this._deltaNumFull=0,this._deltaNumDelta=0,this._deltaBytesReceived=0,this._deltaBytesDecoded=0,this._setOptions(s),this.type=this._sharedPoll?"shared_poll":this._map?"map":"stream",this._centrifuge._debugEnabled?(this.on("state",i=>{this._debug("subscription state",t,i.oldState,"->",i.newState)}),this.on("error",i=>{this._debug("subscription error",t,i)})):this.on("error",function(){Function.prototype()})}ready(e){return this.state===E.Unsubscribed?Promise.reject({code:b.subscriptionUnsubscribed,message:this.state}):this.state===E.Subscribed?Promise.resolve():new Promise((t,s)=>{const i={resolve:t,reject:s};e&&(i.timeout=setTimeout(function(){s({code:b.timeout,message:"timeout"})},e)),this._promises[this._nextPromiseId()]=i})}subscribe(){this._isSubscribed()||(this._resubscribeAttempts=0,this._setSubscribing(N.subscribeCalled,"subscribe called"))}unsubscribe(){this._unsubPromise=this._setUnsubscribed(z.unsubscribeCalled,"unsubscribe called",!0)}_debouncedPublish(e,t,s){const i=this._debouncePending.get(e);if(i)return i.data=t,i.dirty=!0,Promise.resolve({});const n={data:t,dirty:!1,timer:null};return n.timer=setTimeout(()=>{const h=this._debouncePending.get(e);if(!h||!h.dirty){this._debouncePending.delete(e);return}h.dirty=!1;const a=h.data;(s?this._centrifuge.mapPublish(this.channel,e,a):this._centrifuge.publish(this.channel,a)).catch(()=>{}),h.timer=setTimeout(()=>{const f=this._debouncePending.get(e);if(!f||!f.dirty){this._debouncePending.delete(e);return}this._debouncePending.delete(e),this._debouncedPublish(e,f.data,s)},this._debounceMs)},this._debounceMs),this._debouncePending.set(e,n),s?this._centrifuge.mapPublish(this.channel,e,t):this._centrifuge.publish(this.channel,t)}_cancelDebounce(e){const t=this._debouncePending.get(e);t&&(clearTimeout(t.timer),this._debouncePending.delete(e))}_cancelAllDebounce(){for(const[,e]of this._debouncePending)clearTimeout(e.timer);this._debouncePending.clear()}presence(){return w(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.presence(this.channel)})}presenceStats(){return w(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.presenceStats(this.channel)})}setTagsFilter(e){if(e&&this._delta)throw new Error("cannot use delta and tagsFilter together");this._tagsFilter=e,this._map&&(this._recover=!1,this._offset=null,this._epoch=null)}setData(e){this._data=e}deltaStats(){const e=this._deltaBytesDecoded;return{numPublications:this._deltaNumPubs,numFullPayloads:this._deltaNumFull,numDeltaPayloads:this._deltaNumDelta,bytesReceived:this._deltaBytesReceived,bytesDecoded:e,compressionRatio:e>0?1-this._deltaBytesReceived/e:0}}_methodCall(){return this._isSubscribed()?Promise.resolve():this._isUnsubscribed()?Promise.reject({code:b.subscriptionUnsubscribed,message:this.state}):new Promise((e,t)=>{const s=this._centrifuge._config.timeout,i=setTimeout(()=>{t({code:b.timeout,message:"timeout"})},s);this._promises[this._nextPromiseId()]={timeout:i,resolve:e,reject:t}})}_nextPromiseId(){return++this._promiseId}_needRecover(){return this._recover===!0}_isUnsubscribed(){return this.state===E.Unsubscribed}_isSubscribing(){return this.state===E.Subscribing}_isSubscribed(){return this.state===E.Subscribed}_setState(e){if(this.state!==e){const t=this.state;return this.state=e,this.emit("state",{newState:e,oldState:t,channel:this.channel}),!0}return!1}_usesToken(){return this._token!==""||this._getToken!==null}_clearSubscribingState(){this._resubscribeAttempts=0,this._clearResubscribeTimeout()}_clearSubscribedState(){this._clearRefreshTimeout(),this._cancelAllDebounce(),this._clearSharedPollSignatureRefresh(),this._clearSharedPollTrackRetry(),this._clearSharedPollReplayRetry(),this._sharedPollSignatureRefreshTargetMs=null,this._sharedPollSignatureRefreshInFlight=!1}_invalidateState(){this._token="",this._prevValueMap=new Map,this._map?(this._offset=null,this._epoch=null,this._recover=!1,this._mapStateBuffer=[],this._mapStreamBuffer=[],this._mapCursor="",this._mapPhase=null):(this._offset=0,this._epoch="_")}_setSubscribed(e){if(!this._isSubscribing())return;if(this._clearSubscribingState(),e.id&&(this._id=e.id),e.recoverable&&(this._recover=!0,this._offset=e.offset||0,this._epoch=e.epoch||""),e.delta?this._delta_negotiated=!0:this._delta_negotiated=!1,e.publish_debounce&&(this._debounceMs=e.publish_debounce),this._sharedPoll){const i=e.epoch||"";if(this._sharedPollEpoch!==""&&this._sharedPollEpoch!==i)for(const n of this._sharedPollTrackedItems.keys())this._sharedPollTrackedItems.set(n,0);this._sharedPollEpoch=i}this._setState(E.Subscribed);const t=this._centrifuge._getSubscribeContext(this.channel,e);this.emit("subscribed",t),this._resolvePromises();const s=e.publications;if(s&&s.length>0)for(const i in s)s.hasOwnProperty(i)&&this._handlePublication(s[i]);e.expires===!0&&(this._refreshTimeout=setTimeout(()=>this._refresh(),j(e.ttl)))}_setSubscribing(e,t){return w(this,void 0,void 0,function*(){this._isSubscribing()||(this._isSubscribed()&&this._clearSubscribedState(),this._id=0,this._setState(E.Subscribing)&&this.emit("subscribing",{channel:this.channel,code:e,reason:t}),this._centrifuge._transport&&this._centrifuge._transport.emulation()&&(yield this._unsubPromise),this._isSubscribing()&&this._subscribe())})}_subscribe(){return this._debug("subscribing on",this.channel),this._isTransportOpen()?this._inflight?null:(this._inflight=!0,this._map?(this._mapSubscribe(),null):this._getState&&this._offset===null?(this._loadStreamState(),null):this._canSubscribeWithoutGettingToken()?this._subscribeWithoutToken():(this._getSubscriptionToken().then(e=>this._handleTokenResponse(e)).catch(e=>this._handleTokenError(e)),null)):(this._debug("delay subscribe on",this.channel,"till connected"),null)}_isTransportOpen(){return this._centrifuge._transportIsOpen}_canSubscribeWithoutGettingToken(){return!this._usesToken()||!!this._token}_subscribeWithoutToken(){return this._getData?(this._getDataAndSubscribe(this._token),null):this._sendSubscribe(this._token)}_loadStreamState(){if(!this._isSubscribing()){this._inflight=!1;return}this._getState().then(e=>{if(!this._isSubscribing()){this._inflight=!1;return}this._offset=e.offset,this._epoch=e.epoch,this._recover=!0,this._canSubscribeWithoutGettingToken()?this._subscribeWithoutToken():this._getSubscriptionToken().then(t=>this._handleTokenResponse(t)).catch(t=>this._handleTokenError(t))}).catch(e=>{if(!this._isSubscribing()){this._inflight=!1;return}this._inflight=!1,this._subscribeError({code:b.subscriptionGetState,message:e?.toString()||"getState failed",temporary:!0})})}_getDataAndSubscribe(e){if(!this._getData){this._inflight=!1;return}this._getData({channel:this.channel}).then(t=>{if(!this._isSubscribing()){this._inflight=!1;return}this._data=t,this._sendSubscribe(e)}).catch(t=>this._handleGetDataError(t))}_handleGetDataError(e){if(!this._isSubscribing()){this._inflight=!1;return}if(e instanceof O){this._inflight=!1,this._failUnauthorized();return}this.emit("error",{type:"subscribeData",channel:this.channel,error:{code:b.badConfiguration,message:e?.toString()||""}}),this._inflight=!1,this._scheduleResubscribe()}_handleTokenResponse(e){if(!this._isSubscribing()){this._inflight=!1;return}if(!e){this._inflight=!1,this._failUnauthorized();return}this._token=e,this._getData?this._getDataAndSubscribe(e):this._sendSubscribe(e)}_handleTokenError(e){if(!this._isSubscribing()){this._inflight=!1;return}if(e instanceof O){this._inflight=!1,this._failUnauthorized();return}this.emit("error",{type:"subscribeToken",channel:this.channel,error:{code:b.subscriptionSubscribeToken,message:e?.toString()||""}}),this._inflight=!1,this._scheduleResubscribe()}_sendSubscribe(e){if(!this._isTransportOpen())return this._inflight=!1,null;const t=this._buildSubscribeCommand(e);return this._centrifuge._call(t).then(s=>{this._inflight=!1;const i=s.reply.subscribe;this._handleSubscribeResponse(i),s.next&&s.next()},s=>{this._inflight=!1,this._handleSubscribeError(s.error),s.next&&s.next()}),t}_buildSubscribeCommand(e){const t={channel:this.channel};if(e&&(t.token=e),this._data&&(t.data=this._data),this._sharedPoll)return t.type=4,this._delta&&(t.delta=this._delta),{subscribe:t};if(this._positioned&&(t.positioned=!0),this._recoverable&&(t.recoverable=!0),this._joinLeave&&(t.join_leave=!0),t.flag=B.channelCompaction,this._getState&&(t.flag|=B.rejectUnrecovered),this._needRecover()){t.recover=!0;const s=this._getOffset();s&&(t.offset=s);const i=this._getEpoch();i&&(t.epoch=i)}return this._delta&&(t.delta=this._delta),this._tagsFilter&&(t.tf=this._tagsFilter),{subscribe:t}}_debug(...e){this._centrifuge._debug(...e)}_handleSubscribeError(e){if(this._isSubscribing()){if(e.code===b.timeout){this._centrifuge._disconnect(D.subscribeTimeout,"subscribe timeout",!0);return}if(e.code===112&&this._getState){this._offset=null,this._epoch=null,this._recover=!1,this._prevValueMap=new Map,this._scheduleResubscribe();return}this._subscribeError(e)}}_handleSubscribeResponse(e){this._isSubscribing()&&(this._setSubscribed(e),this._sharedPoll&&this._sharedPollReplayTrack())}_setUnsubscribed(e,t,s){if(this._isUnsubscribed())return Promise.resolve();let i=Promise.resolve();return this._isSubscribed()?(s&&(i=this._centrifuge._unsubscribe(this)),this._clearSubscribedState()):this._isSubscribing()&&(this._inflight&&s&&(i=this._centrifuge._unsubscribe(this)),this._clearSubscribingState()),this._inflight=!1,this._id=0,this._sharedPollEpoch="",this._sharedPollSignatures=[],this._sharedPollTrackedItems.clear(),this._sharedPollSignatureRefreshInFlight=!1,this._sharedPollSignatureRefreshTargetMs=null,this._cancelAllDebounce(),this._setState(E.Unsubscribed)&&this.emit("unsubscribed",{channel:this.channel,code:e,reason:t}),this._rejectPromises({code:b.subscriptionUnsubscribed,message:this.state}),i}_handlePublication(e){if(this._delta&&this._delta_negotiated){const s=(this._map||this._sharedPoll)&&e.key||"",{newData:i,newPrevValue:n,isDelta:r,wireBytes:h,fullBytes:a}=this._centrifuge._codec.applyDeltaIfNeeded(e,this._prevValueMap.get(s));e.data=i,this._deltaNumPubs++,this._deltaBytesReceived+=h,this._deltaBytesDecoded+=a,r?this._deltaNumDelta++:this._deltaNumFull++,e.removed?this._prevValueMap.delete(s):this._prevValueMap.set(s,n)}let t;if(this._sharedPoll){if(e.key&&!this._sharedPollTrackedItems.has(e.key))return;e.key&&(e.removed?this._sharedPollTrackedItems.delete(e.key):e.version&&this._sharedPollTrackedItems.set(e.key,e.version)),t=this._getSharedPollUpdateContext(e)}else this._map?t=this._getMapUpdateContext(e):t=this._centrifuge._getPublicationContext(this.channel,e);this.emit("publication",t),(this._map||this._sharedPoll)&&this.emit("update",t),e.offset&&(this._offset=e.offset),e.epoch&&(this._epoch=e.epoch)}_seedDeltaTracking(e){if(!(!this._delta||!e.key)){if(typeof e.data=="string"){const t=e.data,s=new TextEncoder().encode(t);e.removed?this._prevValueMap.delete(e.key):this._prevValueMap.set(e.key,s);const i=s.length;this._deltaNumPubs++,this._deltaNumFull++,this._deltaBytesReceived+=i,this._deltaBytesDecoded+=i,e.data=JSON.parse(t)}else if(e.data instanceof Uint8Array){e.removed?this._prevValueMap.delete(e.key):this._prevValueMap.set(e.key,e.data);const t=e.data.length;this._deltaNumPubs++,this._deltaNumFull++,this._deltaBytesReceived+=t,this._deltaBytesDecoded+=t}}}_handleJoin(e){const t=this._centrifuge._getJoinLeaveContext(e.info);this.emit("join",{channel:this.channel,info:t})}_handleLeave(e){const t=this._centrifuge._getJoinLeaveContext(e.info);this.emit("leave",{channel:this.channel,info:t})}_resolvePromises(){for(const e in this._promises)this._promises.hasOwnProperty(e)&&(this._promises[e].timeout&&clearTimeout(this._promises[e].timeout),this._promises[e].resolve(),delete this._promises[e])}_rejectPromises(e){for(const t in this._promises)this._promises.hasOwnProperty(t)&&(this._promises[t].timeout&&clearTimeout(this._promises[t].timeout),this._promises[t].reject(e),delete this._promises[t])}_scheduleResubscribe(){if(!this._isSubscribing()){this._debug("not in subscribing state, skip resubscribe scheduling",this.channel);return}const e=this,t=this._getResubscribeDelay();this._resubscribeTimeout=setTimeout(function(){e._isSubscribing()&&e._subscribe()},t),this._debug("resubscribe scheduled after "+t,this.channel)}_subscribeError(e){if(this._isSubscribing())if(e.code<100||e.code===109||e.temporary===!0){e.code===109&&(this._token="");const t={channel:this.channel,type:"subscribe",error:e};this._centrifuge.state===k.Connected&&this.emit("error",t),this._scheduleResubscribe()}else this._setUnsubscribed(e.code,e.message,!1)}_getResubscribeDelay(){const e=L(this._resubscribeAttempts,this._minResubscribeDelay,this._maxResubscribeDelay);return this._resubscribeAttempts++,e}_setOptions(e){if(e){if(e.since&&(this._offset=e.since.offset||0,this._epoch=e.since.epoch||"",this._recover=!0),e.data&&(this._data=e.data),e.getData&&(this._getData=e.getData),e.minResubscribeDelay!==void 0&&(this._minResubscribeDelay=e.minResubscribeDelay),e.maxResubscribeDelay!==void 0&&(this._maxResubscribeDelay=e.maxResubscribeDelay),e.token&&(this._token=e.token),e.getToken&&(this._getToken=e.getToken),e.positioned===!0&&(this._positioned=!0),e.recoverable===!0&&(this._recoverable=!0),e.joinLeave===!0&&(this._joinLeave=!0),e.delta){if(e.delta!=="fossil")throw new Error("unsupported delta format");this._delta=e.delta}if(e.tagsFilter&&(this._tagsFilter=e.tagsFilter),this._tagsFilter&&this._delta)throw new Error("cannot use delta and tagsFilter together");e.getState&&(this._getState=e.getState,this._recover=!0),e.map===!0&&(this._map=!0),e.mapPageSize!==void 0&&(this._mapPageSize=e.mapPageSize),e.mapPresenceType!==void 0&&(this._mapPresenceType=e.mapPresenceType,this._map=!0),e.mapUnrecoverableStrategy&&(this._mapUnrecoverableStrategy=e.mapUnrecoverableStrategy),e.sharedPoll===!0&&(this._sharedPoll=!0),e.sharedPollGetSignature&&(this._sharedPollGetSignature=e.sharedPollGetSignature)}}_getOffset(){const e=this._offset;return e!==null?e:0}_getEpoch(){const e=this._epoch;return e!==null?e:""}_clearRefreshTimeout(){this._refreshTimeout!==null&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null)}_clearResubscribeTimeout(){this._resubscribeTimeout!==null&&(clearTimeout(this._resubscribeTimeout),this._resubscribeTimeout=null)}_getSubscriptionToken(){this._debug("get subscription token for channel",this.channel);const e={channel:this.channel},t=this._getToken;return t===null?(this.emit("error",{type:"configuration",channel:this.channel,error:{code:b.badConfiguration,message:"provide a function to get channel subscription token"}}),Promise.reject(new O(""))):t(e)}_refresh(){this._clearRefreshTimeout();const e=this;this._getSubscriptionToken().then(function(t){if(!e._isSubscribed())return;if(!t){e._failUnauthorized();return}e._token=t;const i={sub_refresh:{channel:e.channel,token:t}};e._centrifuge._call(i).then(n=>{const r=n.reply.sub_refresh;e._refreshResponse(r),n.next&&n.next()},n=>{e._refreshError(n.error),n.next&&n.next()})}).catch(function(t){if(t instanceof O){e._failUnauthorized();return}e.emit("error",{type:"refreshToken",channel:e.channel,error:{code:b.subscriptionRefreshToken,message:t!==void 0?t.toString():""}}),e._refreshTimeout=setTimeout(()=>e._refresh(),e._getRefreshRetryDelay())})}_refreshResponse(e){this._isSubscribed()&&(this._debug("subscription token refreshed, channel",this.channel),this._clearRefreshTimeout(),e.expires===!0&&(this._refreshTimeout=setTimeout(()=>this._refresh(),j(e.ttl))))}_refreshError(e){this._isSubscribed()&&(e.code<100||e.temporary===!0?(this.emit("error",{type:"refresh",channel:this.channel,error:e}),this._refreshTimeout=setTimeout(()=>this._refresh(),this._getRefreshRetryDelay())):this._setUnsubscribed(e.code,e.message,!0))}_getRefreshRetryDelay(){return L(0,1e4,2e4)}_failUnauthorized(){this._setUnsubscribed(z.unauthorized,"unauthorized",!0)}_sendTrackRequest(e,t){if(e.length===0)return Promise.resolve();const s=6e4,i=[];let n=[],r=100;if(t&&t.length>0)for(const a of t)r+=a.length+4;for(const a of e){let d=100;for(const f of a.items)d+=f.key.length+16;n.length>0&&r+d>s&&(i.push(n),n=[],r=100),n.push(a),r+=d}n.length>0&&i.push(n);const h=(a,d)=>new Promise((f,P)=>{const R={channel:this.channel,type:1,track:a.map(v=>({signature:v.signature,items:v.items.map(y=>y.version>0?y:{key:y.key})}))};d&&d.length>0&&(R.untrack=d);const g={sub_refresh:R};this._centrifuge._call(g).then(v=>{this._handleTrackResponse(v.reply.sub_refresh),v.next&&v.next(),f()},v=>{v.next&&v.next(),P(v.error)})});return i.reduce((a,d,f)=>a.then(()=>h(d,f===0?t:void 0)),Promise.resolve())}_sendUntrackRequest(e){return new Promise((t,s)=>{const n={sub_refresh:{channel:this.channel,type:2,untrack:e}};this._centrifuge._call(n).then(r=>{r.next&&r.next(),t()},r=>{r.next&&r.next(),s(r.error)})})}_handleTrackResponse(e){if(this._clearSharedPollTrackRetry(),e&&e.items&&e.items.length>0)for(const t of e.items)this._handlePublication(t);if(e&&e.expires===!0&&e.ttl>0){const t=Date.now()+e.ttl*1e3;this._maybeScheduleSharedPollSignatureRefresh(t)}}_maybeScheduleSharedPollSignatureRefresh(e){if(e===null){this._sharedPollSignatureRefreshTargetMs=null,this._clearSharedPollSignatureRefresh();return}this._isSubscribed()&&(this._sharedPollSignatureRefreshTargetMs!==null&&e>=this._sharedPollSignatureRefreshTargetMs||(this._sharedPollSignatureRefreshTargetMs=e,this._clearSharedPollSignatureRefresh(),this._sharedPollSignatureRefreshTimeout=setTimeout(()=>this._sharedPollRefreshSignature(),Math.max(0,e-Date.now()))))}_clearSharedPollSignatureRefresh(){this._sharedPollSignatureRefreshTimeout!==null&&(clearTimeout(this._sharedPollSignatureRefreshTimeout),this._sharedPollSignatureRefreshTimeout=null),this._sharedPollSignatureRefreshAttempts=0}_clearSharedPollTrackRetry(){this._sharedPollTrackRetryTimeout!==null&&(clearTimeout(this._sharedPollTrackRetryTimeout),this._sharedPollTrackRetryTimeout=null),this._sharedPollTrackRetryAttempts=0}_clearSharedPollReplayRetry(){this._sharedPollReplayRetryTimeout!==null&&(clearTimeout(this._sharedPollReplayRetryTimeout),this._sharedPollReplayRetryTimeout=null),this._sharedPollReplayRetryAttempts=0}_handleTrackError(e){if(this._isSubscribed()){if(this.emit("error",{type:"track",channel:this.channel,error:e}),e.code===109){this._sharedPollRefreshSignature();return}(e.code<100||e.temporary===!0)&&(this._sharedPollTrackRetryTimeout=setTimeout(()=>this._sharedPollReplayTrack(),L(this._sharedPollTrackRetryAttempts++,1e3,15e3)))}}_sharedPollRefreshSignature(){if(this._clearSharedPollSignatureRefresh(),!this._isSubscribed()||!this._sharedPollGetSignature||this._sharedPollTrackedItems.size===0||this._sharedPollSignatureRefreshInFlight)return;this._sharedPollSignatureRefreshTargetMs=null,this._sharedPollSignatureRefreshInFlight=!0;const e=Array.from(this._sharedPollTrackedItems.keys()),t=this;this._sharedPollGetSignature({keys:e}).then(s=>{if(t._sharedPollSignatureRefreshInFlight=!1,!t._isSubscribed())return;t._sharedPollSignatureRefreshAttempts=0;const i=new Set(s.keys),n=[];for(const d of e)i.has(d)||(t._sharedPollTrackedItems.delete(d),n.push(d),t.emit("update",{channel:t.channel,key:d,data:null,removed:!0}));n.length>0&&t._sendUntrackRequest(n).catch(d=>{t.emit("error",{type:"untrack",channel:t.channel,error:d})});const r=[];for(const d of s.keys){const f=t._sharedPollTrackedItems.get(d);f!==void 0&&r.push({key:d,version:f})}const h=new Set(s.keys),a=t._sharedPollSignatures.filter(d=>d.keys.some(f=>t._sharedPollTrackedItems.has(f)&&!h.has(f)));t._sharedPollSignatures=r.length>0?[{keys:s.keys,signature:s.signature},...a]:a,r.length!==0&&t._sendTrackRequest([{items:r,signature:s.signature}]).catch(d=>{t._handleTrackError(d)})}).catch(s=>{t._sharedPollSignatureRefreshInFlight=!1,t.emit("error",{type:"signatureRefresh",channel:t.channel,error:{code:b.sharedPollGetSignature,message:s!==void 0?s.toString():""}}),t._sharedPollSignatureRefreshTimeout=setTimeout(()=>t._sharedPollRefreshSignature(),L(t._sharedPollSignatureRefreshAttempts++,5e3,3e4))})}_sharedPollReplayTrack(){if(!this._isSubscribed()||this._sharedPollTrackedItems.size===0&&this._sharedPollSignatures.length===0)return;const e=new Set,t=[],s=[];for(const r of this._sharedPollSignatures){const h=r.keys.map(a=>{var d;return{key:a,version:(d=this._sharedPollTrackedItems.get(a))!==null&&d!==void 0?d:0}});t.push({items:h,signature:r.signature});for(const a of r.keys)this._sharedPollTrackedItems.has(a)?e.add(a):s.push(a)}t.length>0&&this._sendTrackRequest(t,s).catch(r=>{this._handleTrackError(r)});const i=[];for(const r of this._sharedPollTrackedItems.keys())e.has(r)||i.push(r);if(i.length===0)return;if(!this._sharedPollGetSignature){this.emit("error",{type:"track",channel:this.channel,error:{code:b.sharedPollGetSignature,message:"getSignature callback required for tracked keys without an explicit signature"}});return}const n=this;this._sharedPollGetSignature({keys:i}).then(r=>{if(!n._isSubscribed())return;n._clearSharedPollReplayRetry();const h=new Set(r.keys),a=[];for(const f of i)h.has(f)||(n._sharedPollTrackedItems.delete(f),a.push(f),n.emit("update",{channel:n.channel,key:f,data:null,removed:!0}));a.length>0&&n._sendUntrackRequest(a).catch(f=>{n.emit("error",{type:"untrack",channel:n.channel,error:f})});const d=[];for(const f of r.keys){const P=n._sharedPollTrackedItems.get(f);P!==void 0&&d.push({key:f,version:P})}d.length!==0&&(n._sharedPollSignatures.push({keys:r.keys,signature:r.signature}),n._sendTrackRequest([{items:d,signature:r.signature}]).catch(f=>{n._handleTrackError(f)}))}).catch(r=>{n.emit("error",{type:"signatureRefresh",channel:n.channel,error:{code:b.sharedPollGetSignature,message:r!==void 0?r.toString():""}}),n._sharedPollReplayRetryTimeout=setTimeout(()=>n._sharedPollReplayTrack(),L(n._sharedPollReplayRetryAttempts++,5e3,3e4))})}_mapSubscribe(){if(this._debug("starting map subscribe on",this.channel),this._mapStateBuffer=[],this._mapStreamBuffer=[],this._mapCursor="",this._recover&&this._offset!==null&&this._epoch!==null||(this._prevValueMap=new Map),this._mapPhase=C.State,this._recover&&this._offset!==null&&this._epoch!==null){this._debug("map subscribe: recovering from position, skipping to stream phase"),this._mapPhase=C.Stream,this._fetchStream();return}this._canSubscribeWithoutGettingToken()?this._fetchSnapshot():this._getSubscriptionToken().then(e=>{if(!this._isSubscribing()){this._inflight=!1;return}if(!e){this._inflight=!1,this._failUnauthorized();return}this._token=e,this._fetchSnapshot()}).catch(e=>this._handleTokenError(e))}_fetchSnapshot(e){if(!this._isSubscribing()||!this._isTransportOpen()){this._inflight=!1;return}const t=this._buildMapSubscribeCommand(C.State,e);this._debug("map subscribe: fetching snapshot page",e?`cursor=${e}`:"initial"),this._centrifuge._call(t).then(s=>{const i=s.reply.subscribe;this._handleMapStateResponse(i),s.next&&s.next()},s=>{this._handleMapSubscribeError(s.error),s.next&&s.next()})}_handleMapStateResponse(e){if(!this._isSubscribing()){this._inflight=!1;return}if(!e.phase){this._debug("map subscribe: server forced LIVE transition during state pagination"),this._handleMapLiveResponse(e);return}if(!this._epoch&&e.epoch&&(this._epoch=e.epoch,this._offset=e.offset||0),this._epoch&&e.epoch&&this._epoch!==e.epoch){this._debug("map subscribe: epoch changed during snapshot pagination, restarting"),this._mapStateBuffer=[],this._mapCursor="",this._epoch=null,this._offset=null,this._prevValueMap=new Map,this._fetchSnapshot();return}if(e.state&&e.state.length>0)for(const t of e.state)this._seedDeltaTracking(t),this._mapStateBuffer.push(this._getMapUpdateContext(t));if(e.cursor){this._mapCursor=e.cursor,this._fetchSnapshot(this._mapCursor);return}this._transitionFromSnapshot()}_transitionFromSnapshot(){this._debug("map subscribe: snapshot complete, transitioning to stream phase"),this._mapPhase=C.Stream,this._fetchStream()}_fetchStream(){if(!this._isSubscribing()||!this._isTransportOpen()){this._inflight=!1;return}const e=this._buildMapSubscribeCommand(C.Stream);this._debug("map subscribe: fetching stream from offset",this._offset),this._centrifuge._call(e).then(t=>{const s=t.reply.subscribe;this._handleMapStreamResponse(s),t.next&&t.next()},t=>{this._handleMapSubscribeError(t.error),t.next&&t.next()})}_handleMapStreamResponse(e){if(!this._isSubscribing()){this._inflight=!1;return}if(!e.phase){this._debug("map subscribe: server forced LIVE transition during stream"),this._handleMapLiveResponse(e);return}if(this._epoch&&e.epoch&&this._epoch!==e.epoch){this._debug("map subscribe: epoch changed during stream, restarting"),this._mapStateBuffer=[],this._mapStreamBuffer=[],this._epoch=null,this._offset=null,this._prevValueMap=new Map,this._mapPhase=C.State,this._fetchSnapshot();return}if(e.publications&&e.publications.length>0)for(const t of e.publications)this._seedDeltaTracking(t),this._mapStreamBuffer.push(this._getMapUpdateContext(t));e.offset!==void 0&&(this._offset=e.offset),this._fetchStream()}_handleMapLiveResponse(e){if(!this._isSubscribing()){this._inflight=!1;return}if(this._inflight=!1,this._epoch&&e.epoch&&this._epoch!==e.epoch){this._debug("map subscribe: epoch changed during live transition, restarting"),this._mapStateBuffer=[],this._mapStreamBuffer=[],this._epoch=null,this._offset=null,this._prevValueMap=new Map,this._inflight=!0,this._mapPhase=C.State,this._fetchSnapshot();return}if(e.state&&e.state.length>0)for(const s of e.state)this._seedDeltaTracking(s),this._mapStateBuffer.push(this._getMapUpdateContext(s));if(e.publications&&e.publications.length>0)for(const s of e.publications){if(this._delta&&e.delta){const i=s.key||"",{newData:n,newPrevValue:r,isDelta:h,wireBytes:a,fullBytes:d}=this._centrifuge._codec.applyDeltaIfNeeded(s,this._prevValueMap.get(i));s.data=n,this._deltaNumPubs++,this._deltaBytesReceived+=a,this._deltaBytesDecoded+=d,h?this._deltaNumDelta++:this._deltaNumFull++,s.removed?this._prevValueMap.delete(i):this._prevValueMap.set(i,r)}else this._delta&&s.key&&(s.removed?this._prevValueMap.delete(s.key):this._prevValueMap.set(s.key,s.data));this._mapStreamBuffer.push(this._getMapUpdateContext(s))}this._offset=e.offset||0,this._epoch=e.epoch||"",this._clearSubscribingState(),e.id&&(this._id=e.id),this._recover=e.recoverable===!0,e.delta?this._delta_negotiated=!0:this._delta_negotiated=!1,e.publish_debounce&&(this._debounceMs=e.publish_debounce),this._setState(E.Subscribed);const t=this._centrifuge._getSubscribeContext(this.channel,e);if(t.state=this._mapStateBuffer,this.emit("subscribed",t),this._resolvePromises(),!t.recovered){if(this._mapStreamBuffer.length>0){const s=new Map;for(const i of this._mapStateBuffer)s.set(i.key,i);for(const i of this._mapStreamBuffer)i.removed?s.delete(i.key):s.set(i.key,i);this._mapStateBuffer=Array.from(s.values()),this._mapStreamBuffer=[]}this.emit("sync",{entries:this._mapStateBuffer})}for(const s of this._mapStreamBuffer)this.emit("publication",s),this.emit("update",s);this._mapStateBuffer=[],this._mapStreamBuffer=[],this._mapPhase=null,e.expires===!0&&(this._refreshTimeout=setTimeout(()=>this._refresh(),j(e.ttl)))}_handleMapSubscribeError(e){if(this._inflight=!1,!!this._isSubscribing()){if(e.code===b.timeout){this._centrifuge._disconnect(D.subscribeTimeout,"subscribe timeout",!0);return}if(this._mapStateBuffer=[],this._mapStreamBuffer=[],this._mapPhase=null,this._prevValueMap=new Map,e.code===112&&this._mapUnrecoverableStrategy==="from_scratch"){this._debug("map subscribe: unrecoverable position, restarting from scratch"),this._offset=null,this._epoch=null,this._recover=!1,this._scheduleResubscribe();return}this._subscribeError(e)}}_buildMapSubscribeCommand(e,t){const s={channel:this.channel,type:this._mapPresenceType||1,phase:e};return this._token&&(s.token=this._token),this._tagsFilter&&(s.tf=this._tagsFilter),this._delta&&(s.delta=this._delta),s.flag=B.channelCompaction,e===C.State&&(this._mapPageSize>0&&(s.limit=this._mapPageSize),t&&(s.cursor=t),this._epoch?(s.offset=this._offset,s.epoch=this._epoch):this._data&&(s.data=this._data)),e===C.Stream&&(this._mapPageSize>0&&(s.limit=this._mapPageSize),s.offset=this._offset,s.epoch=this._epoch,this._recover&&(s.recover=!0,this._mapStreamBuffer.length===0&&this._data&&(s.data=this._data))),{subscribe:s}}_getMapUpdateContext(e){const t={channel:this.channel,data:e.data,key:e.key||""};return e.removed===!0&&(t.removed=!0),e.offset!==void 0&&(t.offset=e.offset),e.info&&(t.info=this._centrifuge._getJoinLeaveContext(e.info)),e.tags&&(t.tags=e.tags),t}_getSharedPollUpdateContext(e){const t={channel:this.channel,key:e.key||"",data:e.data};return e.removed===!0&&(t.removed=!0),e.version!==void 0&&(t.version=e.version),t}}class ae extends W{publish(e){return w(this,void 0,void 0,function*(){return yield this._methodCall(),this._debounceMs>0?this._debouncedPublish("",e,!1):this._centrifuge.publish(this.channel,e)})}history(e){return w(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.history(this.channel,e)})}}class F extends W{publish(e,t){return w(this,void 0,void 0,function*(){return yield this._methodCall(),this._debounceMs>0?this._debouncedPublish(e,t,!0):this._centrifuge.mapPublish(this.channel,e,t)})}remove(e){return w(this,void 0,void 0,function*(){return yield this._methodCall(),this._cancelDebounce(e),this._centrifuge.mapRemove(this.channel,e)})}}class he extends W{track(e,t){if(e.length===0)return;let s;const i=t;typeof e[0]=="string"?s=e.map(h=>({key:h,version:0})):s=e;for(const r of s){const h=this._sharedPollTrackedItems.get(r.key);(h===void 0||r.version>h)&&this._sharedPollTrackedItems.set(r.key,r.version)}if(i!==void 0){this._sharedPollSignatures.push({keys:s.map(r=>r.key),signature:i}),this._isSubscribed()&&this._sendTrackRequest([{items:s,signature:i}]).catch(r=>{this._handleTrackError(r)});return}if(!this._sharedPollGetSignature){this.emit("error",{type:"track",channel:this.channel,error:{code:b.sharedPollGetSignature,message:"getSignature callback required for track(keys)"}});return}if(!this._isSubscribed())return;const n=s.map(r=>r.key);this._sharedPollGetSignature({keys:n}).then(r=>{if(!this._isSubscribed())return;const h=new Set(r.keys),a=[];for(const f of n)h.has(f)||(this._sharedPollTrackedItems.delete(f),a.push(f),this.emit("update",{channel:this.channel,key:f,data:null,removed:!0}));a.length>0&&this._sendUntrackRequest(a).catch(f=>{this.emit("error",{type:"untrack",channel:this.channel,error:f})});const d=[];for(const f of r.keys){const P=this._sharedPollTrackedItems.get(f);P!==void 0&&d.push({key:f,version:P})}d.length!==0&&(this._sharedPollSignatures.push({keys:r.keys,signature:r.signature}),this._sendTrackRequest([{items:d,signature:r.signature}]).catch(f=>{this._handleTrackError(f)}))}).catch(r=>{this.emit("error",{type:"track",channel:this.channel,error:{code:b.sharedPollGetSignature,message:r!==void 0?r.toString():"getSignature failed"}})})}untrack(e){for(const t of e)this._sharedPollTrackedItems.delete(t);this._sharedPollSignatures=this._sharedPollSignatures.filter(t=>t.keys.some(s=>this._sharedPollTrackedItems.has(s))),this._isSubscribed()&&this._sendUntrackRequest(e).catch(t=>{this.emit("error",{type:"untrack",channel:this.channel,error:t})})}trackedKeys(){return new Set(this._sharedPollTrackedItems.keys())}}class ce{constructor(e,t){this.endpoint=e,this.options=t,this._transport=null}name(){return"sockjs"}subName(){return"sockjs-"+this._transport.transport}emulation(){return!1}supported(){return this.options.sockjs!==null}initialize(e,t){this._transport=new this.options.sockjs(this.endpoint,null,this.options.sockjsOptions),this._transport.onopen=()=>{t.onOpen()},this._transport.onerror=s=>{t.onError(s)},this._transport.onclose=s=>{t.onClose(s)},this._transport.onmessage=s=>{t.onMessage(s.data)}}close(){this._transport.close()}send(e){this._transport.send(e)}}class H{constructor(e,t){this.endpoint=e,this.options=t,this._transport=null}name(){return"websocket"}subName(){return"websocket"}emulation(){return!1}supported(){return this.options.websocket!==void 0&&this.options.websocket!==null}initialize(e,t){let s="";e==="protobuf"&&(s="centrifuge-protobuf"),s!==""?this._transport=new this.options.websocket(this.endpoint,s):this._transport=new this.options.websocket(this.endpoint),e==="protobuf"&&(this._transport.binaryType="arraybuffer"),this._transport.onopen=()=>{t.onOpen()},this._transport.onerror=i=>{t.onError(i)},this._transport.onclose=i=>{t.onClose(i)},this._transport.onmessage=i=>{t.onMessage(i.data)}}close(){this._transport.close()}send(e){this._transport.send(e)}}class le{constructor(e,t){this.endpoint=e,this.options=t,this._abortController=null,this._utf8decoder=new TextDecoder,this._protocol="json"}name(){return"http_stream"}subName(){return"http_stream"}emulation(){return!0}_handleErrors(e){if(!e.ok)throw new Error(e.status);return e}_fetchEventTarget(e,t,s){const i=new EventTarget,n=e.options.fetch;return n(t,s).then(e._handleErrors).then(r=>{i.dispatchEvent(new Event("open"));let h="",a=0,d=new Uint8Array;const f=r.body.getReader();return new e.options.readableStream({start(P){function R(){return f.read().then(({done:g,value:v})=>{if(g){i.dispatchEvent(new Event("close")),P.close();return}try{if(e._protocol==="json")for(h+=e._utf8decoder.decode(v);a{i.dispatchEvent(new Event("error",{detail:r})),i.dispatchEvent(new Event("close"))}),i}supported(){return this.options.fetch!==null&&this.options.readableStream!==null&&typeof TextDecoder<"u"&&typeof AbortController<"u"&&typeof EventTarget<"u"&&typeof Event<"u"&&typeof MessageEvent<"u"&&typeof Error<"u"}initialize(e,t,s){this._protocol=e,this._abortController=new AbortController;let i,n;e==="json"?(i={Accept:"application/json","Content-Type":"application/json"},n=s):(i={Accept:"application/octet-stream","Content-Type":"application/octet-stream"},n=s);const r={method:"POST",headers:i,body:n,mode:"cors",credentials:"same-origin",signal:this._abortController.signal},h=this._fetchEventTarget(this,this.endpoint,r);h.addEventListener("open",()=>{t.onOpen()}),h.addEventListener("error",a=>{this._abortController.abort(),t.onError(a)}),h.addEventListener("close",()=>{this._abortController.abort(),t.onClose({code:4,reason:"connection closed"})}),h.addEventListener("message",a=>{t.onMessage(a.data)})}close(){this._abortController.abort()}send(e,t,s){let i,n;const r={session:t,node:s,data:e};this._protocol==="json"?(i={"Content-Type":"application/json"},n=JSON.stringify(r)):(i={"Content-Type":"application/octet-stream"},n=this.options.encoder.encodeEmulationRequest(r));const h=this.options.fetch,a={method:"POST",headers:i,body:n,mode:"cors",credentials:"same-origin"};h(this.options.emulationEndpoint,a)}}class ue{constructor(e,t){this.endpoint=e,this.options=t,this._protocol="json",this._transport=null,this._onClose=null}name(){return"sse"}subName(){return"sse"}emulation(){return!0}supported(){return this.options.eventsource!==null&&this.options.fetch!==null}initialize(e,t,s){let i;globalThis&&globalThis.document&&globalThis.document.baseURI?i=new URL(this.endpoint,globalThis.document.baseURI):i=new URL(this.endpoint),i.searchParams.append("cf_connect",s);const n={},r=new this.options.eventsource(i.toString(),n);this._transport=r;const h=this;r.onopen=function(){t.onOpen()},r.onerror=function(a){r.close(),t.onError(a),t.onClose({code:4,reason:"connection closed"})},r.onmessage=function(a){t.onMessage(a.data)},h._onClose=function(){t.onClose({code:4,reason:"connection closed"})}}close(){this._transport.close(),this._onClose!==null&&this._onClose()}send(e,t,s){const i={session:t,node:s,data:e},n={"Content-Type":"application/json"},r=JSON.stringify(i),h=this.options.fetch,a={method:"POST",headers:n,body:r,mode:"cors",credentials:"same-origin"};h(this.options.emulationEndpoint,a)}}class de{constructor(e,t){this.endpoint=e,this.options=t,this._transport=null,this._stream=null,this._writer=null,this._utf8decoder=new TextDecoder,this._protocol="json"}name(){return"webtransport"}subName(){return"webtransport"}emulation(){return!1}supported(){return this.options.webtransport!==void 0&&this.options.webtransport!==null}initialize(e,t){return w(this,void 0,void 0,function*(){let s;globalThis&&globalThis.document&&globalThis.document.baseURI?s=new URL(this.endpoint,globalThis.document.baseURI):s=new URL(this.endpoint),e==="protobuf"&&s.searchParams.append("cf_protocol","protobuf"),this._protocol=e;const i=new EventTarget;this._transport=new this.options.webtransport(s.toString()),this._transport.closed.then(()=>{t.onClose({code:4,reason:"connection closed"})}).catch(()=>{t.onClose({code:4,reason:"connection closed"})});try{yield this._transport.ready}catch{this.close();return}let n;try{n=yield this._transport.createBidirectionalStream()}catch{this.close();return}this._stream=n,this._writer=this._stream.writable.getWriter(),i.addEventListener("close",()=>{t.onClose({code:4,reason:"connection closed"})}),i.addEventListener("message",r=>{t.onMessage(r.data)}),this._startReading(i),t.onOpen()})}_startReading(e){return w(this,void 0,void 0,function*(){const t=this._stream.readable.getReader();let s="",i=0,n=new Uint8Array;try{for(;;){const{done:r,value:h}=yield t.read();if(h&&h.length>0)if(this._protocol==="json")for(s+=this._utf8decoder.decode(h);ithis.a.length)throw new RangeError("out of bounds");return e}getChar(){return String.fromCharCode(this.getByte())}getInt(){let e=0,t;for(;this.haveBytes()&&(t=fe[127&this.getByte()])>=0;)e=(e<<6)+t;return this.pos--,e>>>0}}class pe{constructor(){this.a=[]}toByteArray(e){return Array.isArray(e)?this.a:new Uint8Array(this.a)}putArray(e,t,s){for(let i=t;i=16;)e=e+o[n+0]|0,t=t+o[n+1]|0,s=s+o[n+2]|0,i=i+o[n+3]|0,e=e+o[n+4]|0,t=t+o[n+5]|0,s=s+o[n+6]|0,i=i+o[n+7]|0,e=e+o[n+8]|0,t=t+o[n+9]|0,s=s+o[n+10]|0,i=i+o[n+11]|0,e=e+o[n+12]|0,t=t+o[n+13]|0,s=s+o[n+14]|0,i=i+o[n+15]|0,n+=16,r-=16;for(;r>=4;)e=e+o[n+0]|0,t=t+o[n+1]|0,s=s+o[n+2]|0,i=i+o[n+3]|0,n+=4,r-=4;switch(i=((i+(s<<8)|0)+(t<<16)|0)+(e<<24)|0,r){case 3:i=i+(o[n+2]<<8)|0;case 2:i=i+(o[n+1]<<16)|0;case 1:i=i+(o[n+0]<<24)|0}return i>>>0}function be(o,e){let t=0;const s=new _e(e),i=o.length,n=e.length,r=s.getInt();if(s.getChar()!==` +`)throw new Error("size integer not terminated by '\\n'");const h=new pe;for(;s.haveBytes();){const a=s.getInt();let d;switch(s.getChar()){case"@":if(d=s.getInt(),s.haveBytes()&&s.getChar()!==",")throw new Error("copy command not terminated by ','");if(t+=a,t>r)throw new Error("copy exceeds output file size");if(d+a>i)throw new Error("copy extends past end of input");h.putArray(o,d,d+a);break;case":":if(t+=a,t>r)throw new Error("insert command gives an output larger than predicted");if(a>n)throw new Error("insert count exceeds size of delta");h.putArray(s.a,s.pos,s.pos+a),s.pos+=a;break;case";":{const f=h.toByteArray(o);if(a!==me(f))throw new Error("bad checksum");if(t!==r)throw new Error("generated size does not match predicted size");return f}default:throw new Error("unknown delta operator")}}throw new Error("unterminated delta")}class ${name(){return"json"}encodeCommands(e){return e.map(t=>JSON.stringify(t)).join(` +`)}decodeReplies(e){return e.trim().split(` +`).map(t=>JSON.parse(t))}applyDeltaIfNeeded(e,t){let s,i,n,r;if(e.delta){r=!0;const h=new TextEncoder().encode(e.data),a=be(t,h);s=JSON.parse(new TextDecoder().decode(a)),i=a,n=h.length}else r=!1,s=JSON.parse(e.data),i=new TextEncoder().encode(e.data),n=i.length;return{newData:s,newPrevValue:i,isDelta:r,wireBytes:n,fullBytes:i.length}}}const ge={headers:{},token:"",getToken:null,data:null,getData:null,debug:!1,name:"js",version:"",fetch:null,readableStream:null,websocket:null,eventsource:null,sockjs:null,sockjsOptions:{},emulationEndpoint:"/emulation",minReconnectDelay:500,maxReconnectDelay:2e4,timeout:5e3,maxServerPingDelay:1e4,networkEventTarget:null};class O extends Error{constructor(e){super(e),this.name=this.constructor.name}}class G extends Q{constructor(e,t){super(),this._reconnectTimeout=null,this._refreshTimeout=null,this._serverPingTimeout=null,this.state=k.Disconnected,this._transportIsOpen=!1,this._endpoint=e,this._emulation=!1,this._transports=[],this._currentTransportIndex=0,this._triedAllTransports=!1,this._transportWasOpen=!1,this._transport=null,this._transportId=0,this._deviceWentOffline=!1,this._transportClosed=!0,this._codec=new $,this._reconnecting=!1,this._reconnectTimeout=null,this._reconnectAttempts=0,this._client=null,this._session="",this._node="",this._subs={},this._serverSubs={},this._commandId=0,this._commands=[],this._batching=!1,this._refreshRequired=!1,this._refreshTimeout=null,this._callbacks={},this._token="",this._data=null,this._dispatchPromise=Promise.resolve(),this._serverPing=0,this._serverPingTimeout=null,this._sendPong=!1,this._promises={},this._promiseId=0,this._debugEnabled=!1,this._networkEventsSet=!1,this._config=Object.assign(Object.assign({},ge),t),this._configure(),this._debugEnabled?(this.on("state",s=>{this._debug("client state",s.oldState,"->",s.newState)}),this.on("error",s=>{this._debug("client error",s)})):this.on("error",function(){Function.prototype()})}newSubscription(e,t){if(this.getSubscription(e)!==null)throw new Error("Subscription to the channel "+e+" already exists");const s=new ae(this,e,t);return this._subs[e]=s,s}newMapSubscription(e,t){if(this.getSubscription(e)!==null)throw new Error("Subscription to the channel "+e+" already exists");const s=new F(this,e,{token:t?.token,getToken:t?.getToken,data:t?.data,minResubscribeDelay:t?.minResubscribeDelay,maxResubscribeDelay:t?.maxResubscribeDelay,delta:t?.delta,tagsFilter:t?.tagsFilter,map:!0,mapPageSize:t?.pageSize,mapUnrecoverableStrategy:t?.unrecoverableStrategy});return this._subs[e]=s,s}newMapClientsSubscription(e,t){if(this.getSubscription(e)!==null)throw new Error("Subscription to the channel "+e+" already exists");const s=new F(this,e,{token:t?.token,getToken:t?.getToken,data:t?.data,minResubscribeDelay:t?.minResubscribeDelay,maxResubscribeDelay:t?.maxResubscribeDelay,delta:t?.delta,tagsFilter:t?.tagsFilter,map:!0,mapPresenceType:2,mapPageSize:t?.pageSize,mapUnrecoverableStrategy:t?.unrecoverableStrategy});return this._subs[e]=s,s}newMapUsersSubscription(e,t){if(this.getSubscription(e)!==null)throw new Error("Subscription to the channel "+e+" already exists");const s=new F(this,e,{token:t?.token,getToken:t?.getToken,data:t?.data,minResubscribeDelay:t?.minResubscribeDelay,maxResubscribeDelay:t?.maxResubscribeDelay,delta:t?.delta,tagsFilter:t?.tagsFilter,map:!0,mapPresenceType:3,mapPageSize:t?.pageSize,mapUnrecoverableStrategy:t?.unrecoverableStrategy});return this._subs[e]=s,s}newSharedPollSubscription(e,t){if(this.getSubscription(e)!==null)throw new Error("Subscription to the channel "+e+" already exists");const s=new he(this,e,{token:t?.token,getToken:t?.getToken,data:t?.data,minResubscribeDelay:t?.minResubscribeDelay,maxResubscribeDelay:t?.maxResubscribeDelay,delta:t?.delta,sharedPoll:!0,sharedPollGetSignature:t?.getSignature});return this._subs[e]=s,s}getSubscription(e){return this._getSub(e)}getMapSubscription(e){return this._getSub(e)}getSharedPollSubscription(e){return this._getSub(e)}removeSubscription(e){e&&(e.state!==E.Unsubscribed&&e.unsubscribe(),this._removeSubscription(e))}removeMapSubscription(e){this.removeSubscription(e)}removeSharedPollSubscription(e){this.removeSubscription(e)}subscriptions(){return this._subs}mapSubscriptions(){const e={};for(const[t,s]of Object.entries(this._subs))s.type==="map"&&(e[t]=s);return e}sharedPollSubscriptions(){const e={};for(const[t,s]of Object.entries(this._subs))s.type==="shared_poll"&&(e[t]=s);return e}ready(e){return w(this,void 0,void 0,function*(){switch(this.state){case k.Disconnected:throw{code:b.clientDisconnected,message:"client disconnected"};case k.Connected:return;default:return new Promise((t,s)=>{const i={resolve:t,reject:s};e&&(i.timeout=setTimeout(()=>{s({code:b.timeout,message:"timeout"})},e)),this._promises[this._nextPromiseId()]=i})}})}connect(){if(this._isConnected()){this._debug("connect called when already connected");return}if(this._isConnecting()){this._debug("connect called when already connecting");return}this._debug("connect called"),this._reconnectAttempts=0,this._startConnecting()}disconnect(){this._disconnect(M.disconnectCalled,"disconnect called",!1)}setToken(e){this._token=e}setData(e){this._data=e}setHeaders(e){this._config.headers=e}send(e){return w(this,void 0,void 0,function*(){const t={send:{data:e}};if(yield this._methodCall(),!this._transportSendCommands([t]))throw this._createErrorObject(b.transportWriteError,"transport write error")})}rpc(e,t){return w(this,void 0,void 0,function*(){const s={rpc:{method:e,data:t}};return yield this._methodCall(),{data:(yield this._callPromise(s,n=>n.rpc)).data}})}publish(e,t){return w(this,void 0,void 0,function*(){const s={publish:{channel:e,data:t}};return yield this._methodCall(),yield this._callPromise(s,()=>({})),{}})}mapPublish(e,t,s){return w(this,void 0,void 0,function*(){const i={publish:{channel:e,type:1,key:t,data:s}};return yield this._methodCall(),yield this._callPromise(i,()=>({})),{}})}mapRemove(e,t){return w(this,void 0,void 0,function*(){const s={publish:{channel:e,type:1,key:t,removed:!0}};return yield this._methodCall(),yield this._callPromise(s,()=>({})),{}})}history(e,t){return w(this,void 0,void 0,function*(){const s={history:this._getHistoryRequest(e,t)};yield this._methodCall();const i=yield this._callPromise(s,r=>r.history),n=[];if(i.publications)for(let r=0;rn.presence)).presence;for(const n in i)if(Object.prototype.hasOwnProperty.call(i,n)){const r=i[n],h=r.conn_info,a=r.chan_info;h&&(r.connInfo=h),a&&(r.chanInfo=a)}return{clients:i}})}presenceStats(e){return w(this,void 0,void 0,function*(){const t={presence_stats:{channel:e}};yield this._methodCall();const s=yield this._callPromise(t,i=>i.presence_stats);return{numUsers:s.num_users,numClients:s.num_clients}})}startBatching(){this._batching=!0}stopBatching(){const e=this;Promise.resolve().then(function(){Promise.resolve().then(function(){e._batching=!1,e._flush()})})}_debug(...e){this._debugEnabled&&ie("debug",e)}_codecName(){return this._codec.name()}_formatOverride(){}_configure(){if(!("Promise"in globalThis))throw new Error("Promise polyfill required");if(!this._endpoint)throw new Error("endpoint configuration required");if(this._config.token!==null&&(this._token=this._config.token),this._config.data!==null&&(this._data=this._config.data),this._codec=new $,this._formatOverride(),(this._config.debug===!0||oe("centrifuge.debug"))&&(this._debugEnabled=!0),this._debug("config",this._config),typeof this._endpoint!="string")if(Array.isArray(this._endpoint)){this._transports=this._endpoint,this._emulation=!0;for(const e in this._transports)if(this._transports.hasOwnProperty(e)){const t=this._transports[e];if(!t.endpoint||!t.transport)throw new Error("malformed transport configuration");const s=t.transport;if(["websocket","http_stream","sse","sockjs","webtransport"].indexOf(s)<0)throw new Error("unsupported transport name: "+s)}}else throw new Error("unsupported url configuration type: only string or array of objects are supported")}_setState(e){if(this.state!==e){this._reconnecting=!1;const t=this.state;return this.state=e,this.emit("state",{newState:e,oldState:t}),!0}return!1}_isDisconnected(){return this.state===k.Disconnected}_isConnecting(){return this.state===k.Connecting}_isConnected(){return this.state===k.Connected}_nextCommandId(){return++this._commandId}_setNetworkEvents(){if(this._networkEventsSet)return;let e=null;this._config.networkEventTarget!==null?e=this._config.networkEventTarget:typeof globalThis.addEventListener<"u"&&(e=globalThis),e&&(e.addEventListener("offline",()=>{this._debug("offline event triggered"),(this.state===k.Connected||this.state===k.Connecting)&&(this._disconnect(D.transportClosed,"transport closed",!0),this._deviceWentOffline=!0)}),e.addEventListener("online",()=>{this._debug("online event triggered"),this.state===k.Connecting&&(this._deviceWentOffline&&!this._transportClosed&&(this._deviceWentOffline=!1,this._transportClosed=!0),this._clearReconnectTimeout(),this._startReconnecting())}),this._networkEventsSet=!0)}_getReconnectDelay(){const e=L(this._reconnectAttempts,this._config.minReconnectDelay,this._config.maxReconnectDelay);return this._reconnectAttempts+=1,e}_clearOutgoingRequests(){for(const e in this._callbacks)if(this._callbacks.hasOwnProperty(e)){const t=this._callbacks[e];clearTimeout(t.timeout);const s=t.errback;if(!s)continue;s({error:this._createErrorObject(b.connectionClosed,"connection closed")})}this._callbacks={}}_clearConnectedState(){this._client=null,this._clearServerPingTimeout(),this._clearRefreshTimeout();for(const e in this._subs){if(!this._subs.hasOwnProperty(e))continue;const t=this._subs[e];t.state===E.Subscribed&&t._setSubscribing(N.transportClosed,"transport closed")}for(const e in this._serverSubs)this._serverSubs.hasOwnProperty(e)&&this.emit("subscribing",{channel:e})}_handleWriteError(e){for(const t of e){const s=t.id;if(!(s in this._callbacks))continue;const i=this._callbacks[s];clearTimeout(this._callbacks[s].timeout),delete this._callbacks[s];const n=i.errback;n({error:this._createErrorObject(b.transportWriteError,"transport write error")})}}_transportSendCommands(e){if(!e.length)return!0;if(!this._transport)return!1;try{this._transport.send(this._codec.encodeCommands(e),this._session,this._node)}catch(t){return this._debug("error writing commands",t),this._handleWriteError(e),!1}return!0}_advanceTransportIndex(){this._currentTransportIndex++,this._currentTransportIndex>=this._transports.length&&(this._triedAllTransports=!0,this._currentTransportIndex=0)}_initializeTransport(){let e;this._config.websocket!==null?e=this._config.websocket:typeof globalThis.WebSocket!="function"&&typeof globalThis.WebSocket!="object"||(e=globalThis.WebSocket);let t=null;this._config.sockjs!==null?t=this._config.sockjs:typeof globalThis.SockJS<"u"&&(t=globalThis.SockJS);let s=null;this._config.eventsource!==null?s=this._config.eventsource:typeof globalThis.EventSource<"u"&&(s=globalThis.EventSource);let i=null;this._config.fetch!==null?i=this._config.fetch:typeof globalThis.fetch<"u"&&(i=globalThis.fetch);let n=null;if(this._config.readableStream!==null?n=this._config.readableStream:typeof globalThis.ReadableStream<"u"&&(n=globalThis.ReadableStream),this._emulation){this._currentTransportIndex>=this._transports.length&&(this._triedAllTransports=!0,this._currentTransportIndex=0);let g=0;for(;;){if(g>=this._transports.length)throw new Error("no supported transport found");const v=this._transports[this._currentTransportIndex],y=v.transport,T=v.endpoint;if(y==="websocket"){if(this._debug("trying websocket transport"),this._transport=new H(T,{websocket:e}),!this._transport.supported()){this._debug("websocket transport not available"),this._advanceTransportIndex(),g++;continue}}else if(y==="webtransport"){if(this._debug("trying webtransport transport"),this._transport=new de(T,{webtransport:globalThis.WebTransport,decoder:this._codec,encoder:this._codec}),!this._transport.supported()){this._debug("webtransport transport not available"),this._advanceTransportIndex(),g++;continue}}else if(y==="http_stream"){if(this._debug("trying http_stream transport"),this._transport=new le(T,{fetch:i,readableStream:n,emulationEndpoint:this._config.emulationEndpoint,decoder:this._codec,encoder:this._codec}),!this._transport.supported()){this._debug("http_stream transport not available"),this._advanceTransportIndex(),g++;continue}}else if(y==="sse"){if(this._debug("trying sse transport"),this._transport=new ue(T,{eventsource:s,fetch:i,emulationEndpoint:this._config.emulationEndpoint}),!this._transport.supported()){this._debug("sse transport not available"),this._advanceTransportIndex(),g++;continue}}else if(y==="sockjs"){if(this._debug("trying sockjs"),this._transport=new ce(T,{sockjs:t,sockjsOptions:this._config.sockjsOptions}),!this._transport.supported()){this._debug("sockjs transport not available"),this._advanceTransportIndex(),g++;continue}}else throw new Error("unknown transport "+y);break}}else{if(se(this._endpoint,"http"))throw new Error("Provide explicit transport endpoints configuration in case of using HTTP (i.e. using array of TransportEndpoint instead of a single string), or use ws(s):// scheme in an endpoint if you aimed using WebSocket transport");if(this._debug("client will use websocket"),this._transport=new H(this._endpoint,{websocket:e}),!this._transport.supported())throw new Error("WebSocket constructor not found, make sure it is available globally or passed as a dependency in Centrifuge options")}const r=this,h=this._transport,a=this._nextTransportId();r._debug("id of transport",a);let d=!1;const f=[];if(this._transport.emulation()){const g=r._sendConnect(!0);f.push(g)}this._setNetworkEvents();const P=this._codec.encodeCommands(f);this._transportClosed=!1;let R;R=setTimeout(function(){h.close()},this._config.timeout),this._transport.initialize(this._codecName(),{onOpen:function(){if(R&&(clearTimeout(R),R=null),r._transportId!=a){r._debug("open callback from non-actual transport"),h.close();return}d=!0,r._debug(h.subName(),"transport open"),!h.emulation()&&(r._transportIsOpen=!0,r._transportWasOpen=!0,r.startBatching(),r._sendConnect(!1),r._sendSubscribeCommands(),r.stopBatching(),r.emit("__centrifuge_debug:connect_frame_sent",{}))},onError:function(g){if(r._transportId!=a){r._debug("error callback from non-actual transport");return}r._debug("transport level error",g)},onClose:function(g){if(R&&(clearTimeout(R),R=null),r._transportId!=a){r._debug("close callback from non-actual transport");return}r._debug(h.subName(),"transport closed"),r._transportClosed=!0,r._transportIsOpen=!1;let v="connection closed",y=!0,T=0;if(g&&"code"in g&&g.code&&(T=g.code),g&&g.reason)try{const I=JSON.parse(g.reason);v=I.reason,y=I.reconnect}catch{v=g.reason,(T>=3500&&T<4e3||T>=4500&&T<5e3)&&(y=!1)}T<3e3?(T===1009?(T=M.messageSizeLimit,v="message size limit exceeded",y=!1):(T=D.transportClosed,v="transport closed"),r._emulation&&!r._transportWasOpen&&r._advanceTransportIndex()):r._transportWasOpen=!0,r._isConnecting()&&!d&&r.emit("error",{type:"transport",error:{code:b.transportClosed,message:"transport closed"},transport:h.name()}),r._reconnecting=!1,r._disconnect(T,v,y)},onMessage:function(g){r._dataReceived(g)}},P),r.emit("__centrifuge_debug:transport_initialized",{})}_sendConnect(e){const t=this._constructConnectCommand(),s=this;return this._call(t,e).then(i=>{const n=i.reply.connect;s._connectResponse(n),i.next&&i.next()},i=>{s._connectError(i.error),i.next&&i.next()}),t}_startReconnecting(){if(this._debug("start reconnecting"),!this._isConnecting()){this._debug("stop reconnecting: client not in connecting state");return}if(this._reconnecting){this._debug("reconnect already in progress, return from reconnect routine");return}if(this._transportClosed===!1){this._debug("waiting for transport close");return}this._reconnecting=!0;const e=this._token==="";if(!(this._refreshRequired||e&&this._config.getToken!==null)){this._config.getData?this._config.getData().then(i=>{this._isConnecting()&&(this._data=i,this._initializeTransport())}).catch(i=>this._handleGetDataError(i)):this._initializeTransport();return}const s=this;this._getToken().then(function(i){if(s._isConnecting()){if(i==null||i==null){s._failUnauthorized();return}s._token=i,s._debug("connection token refreshed"),s._config.getData?s._config.getData().then(function(n){s._isConnecting()&&(s._data=n,s._initializeTransport())}).catch(n=>s._handleGetDataError(n)):s._initializeTransport()}}).catch(function(i){if(!s._isConnecting())return;if(i instanceof O){s._failUnauthorized();return}s.emit("error",{type:"connectToken",error:{code:b.clientConnectToken,message:i!==void 0?i.toString():""}});const n=s._getReconnectDelay();s._debug("error on getting connection token, reconnect after "+n+" milliseconds",i),s._reconnecting=!1,s._reconnectTimeout=setTimeout(()=>{s._startReconnecting()},n)})}_handleGetDataError(e){if(e instanceof O){this._failUnauthorized();return}this.emit("error",{type:"connectData",error:{code:b.badConfiguration,message:e?.toString()||""}});const t=this._getReconnectDelay();this._debug("error on getting connect data, reconnect after "+t+" milliseconds",e),this._reconnecting=!1,this._reconnectTimeout=setTimeout(()=>{this._startReconnecting()},t)}_connectError(e){this.state===k.Connecting&&(e.code===109&&(this._refreshRequired=!0),e.code<100||e.temporary===!0||e.code===109?(this.emit("error",{type:"connect",error:e}),this._debug("closing transport due to connect error"),this._disconnect(e.code,e.message,!0)):this._disconnect(e.code,e.message,!1))}_scheduleReconnect(){if(!this._isConnecting())return;let e=!1;this._emulation&&!this._transportWasOpen&&!this._triedAllTransports&&(e=!0);let t=this._getReconnectDelay();e&&(t=0),this._debug("reconnect after "+t+" milliseconds"),this._clearReconnectTimeout(),this._reconnectTimeout=setTimeout(()=>{this._startReconnecting()},t)}_constructConnectCommand(){const e={};this._token&&(e.token=this._token),this._data&&(e.data=this._data),this._config.name&&(e.name=this._config.name),this._config.version&&(e.version=this._config.version),Object.keys(this._config.headers).length>0&&(e.headers=this._config.headers);const t={};let s=!1;for(const i in this._serverSubs)if(this._serverSubs.hasOwnProperty(i)&&this._serverSubs[i].recoverable){s=!0;const n={recover:!0};this._serverSubs[i].offset&&(n.offset=this._serverSubs[i].offset),this._serverSubs[i].epoch&&(n.epoch=this._serverSubs[i].epoch),t[i]=n}return s&&(e.subs=t),{connect:e}}_getHistoryRequest(e,t){const s={channel:e};return t!==void 0&&(t.since&&(s.since={offset:t.since.offset},t.since.epoch&&(s.since.epoch=t.since.epoch)),t.limit!==void 0&&(s.limit=t.limit),t.reverse===!0&&(s.reverse=!0)),s}_methodCall(){return this._isConnected()?Promise.resolve():new Promise((e,t)=>{const s=setTimeout(function(){t({code:b.timeout,message:"timeout"})},this._config.timeout);this._promises[this._nextPromiseId()]={timeout:s,resolve:e,reject:t}})}_callPromise(e,t){return new Promise((s,i)=>{this._call(e,!1).then(n=>{var r;const h=t(n.reply);s(h),(r=n.next)===null||r===void 0||r.call(n)},n=>{var r;i(n.error),(r=n.next)===null||r===void 0||r.call(n)})})}_dataReceived(e){this._serverPing>0&&this._waitServerPing();const t=this._codec.decodeReplies(e);this._dispatchPromise=this._dispatchPromise.then(()=>{let s;this._dispatchPromise=new Promise(i=>{s=i}),this._dispatchSynchronized(t,s)})}_dispatchSynchronized(e,t){let s=Promise.resolve();for(const i in e)e.hasOwnProperty(i)&&(s=s.then(()=>this._dispatchReply(e[i])));s.then(()=>{t()})}_dispatchReply(e){let t;const s=new Promise(n=>{t=n});if(e==null)return this._debug("dispatch: got undefined or null reply"),t(),s;const i=e.id;return i&&i>0?this._handleReply(e,t):e.push?this._handlePush(e.push,t):this._handleServerPing(t),s}_call(e,t){return new Promise((s,i)=>{e.id=this._nextCommandId(),this._registerCall(e.id,s,i),t||this._addCommand(e)})}_startConnecting(){this._debug("start connecting"),this._setState(k.Connecting)&&this.emit("connecting",{code:D.connectCalled,reason:"connect called"}),this._client=null,this._startReconnecting()}_disconnect(e,t,s){if(e===M.stateInvalidated){this._token="",this._refreshRequired=!0;for(const h in this._subs)this._subs.hasOwnProperty(h)&&this._subs[h]._invalidateState();for(const h in this._serverSubs)this._serverSubs.hasOwnProperty(h)&&(this._serverSubs[h].offset=0,this._serverSubs[h].epoch="_")}if(this._isDisconnected())return;this._transportIsOpen=!1;const i=this.state;this._reconnecting=!1;const n={code:e,reason:t};let r;if(s?r=this._setState(k.Connecting):(r=this._setState(k.Disconnected),this._rejectPromises({code:b.clientDisconnected,message:"disconnected"})),this._clearOutgoingRequests(),i===k.Connecting&&this._clearReconnectTimeout(),i===k.Connected&&this._clearConnectedState(),r&&(this._isConnecting()?this.emit("connecting",n):this.emit("disconnected",n)),this._transport){this._debug("closing existing transport");const h=this._transport;this._transport=null,h.close(),this._transportClosed=!0,this._nextTransportId()}else this._debug("no transport to close");this._scheduleReconnect()}_failUnauthorized(){this._disconnect(M.unauthorized,"unauthorized",!1)}_getToken(){return this._debug("get connection token"),this._config.getToken?this._config.getToken({}):(this.emit("error",{type:"configuration",error:{code:b.badConfiguration,message:"token expired but no getToken function set in the configuration"}}),Promise.reject(new O("")))}_refresh(){const e=this._client,t=this;this._getToken().then(function(s){if(e!==t._client)return;if(!s){t._failUnauthorized();return}if(t._token=s,t._debug("connection token refreshed"),!t._isConnected())return;const i={refresh:{token:t._token}};t._call(i,!1).then(n=>{const r=n.reply.refresh;t._refreshResponse(r),n.next&&n.next()},n=>{t._refreshError(n.error),n.next&&n.next()})}).catch(function(s){if(t._isConnected()){if(s instanceof O){t._failUnauthorized();return}t.emit("error",{type:"refreshToken",error:{code:b.clientRefreshToken,message:s!==void 0?s.toString():""}}),t._refreshTimeout=setTimeout(()=>t._refresh(),t._getRefreshRetryDelay())}})}_refreshError(e){e.code<100||e.temporary===!0?(this.emit("error",{type:"refresh",error:e}),this._refreshTimeout=setTimeout(()=>this._refresh(),this._getRefreshRetryDelay())):this._disconnect(e.code,e.message,!1)}_getRefreshRetryDelay(){return L(0,5e3,1e4)}_refreshResponse(e){this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null),e.expires&&(this._client=e.client,this._refreshTimeout=setTimeout(()=>this._refresh(),j(e.ttl)))}_removeSubscription(e){e!==null&&delete this._subs[e.channel]}_unsubscribe(e){if(!this._transportIsOpen)return Promise.resolve();const s={unsubscribe:{channel:e.channel}},i=this;return new Promise((r,h)=>{this._call(s,!1).then(a=>{r(),a.next&&a.next()},a=>{r(),a.next&&a.next(),i._disconnect(D.unsubscribeError,"unsubscribe error",!0)})})}_getSub(e,t){if(t&&t>0){for(const i in this._subs)if(this._subs.hasOwnProperty(i)){const n=this._subs[i];if(n._id===t)return n}return null}const s=this._subs[e];return s||null}_isServerSub(e){return this._serverSubs[e]!==void 0}_sendSubscribeCommands(){const e=[];for(const t in this._subs){if(!this._subs.hasOwnProperty(t))continue;const s=this._subs[t];if(s._inflight!==!0&&s.state===E.Subscribing){const i=s._subscribe();i&&e.push(i)}}return e}_connectResponse(e){if(this._transportIsOpen=!0,this._transportWasOpen=!0,this._reconnectAttempts=0,this._refreshRequired=!1,this._isConnected())return;this._client=e.client,this._setState(k.Connected),this._refreshTimeout&&clearTimeout(this._refreshTimeout),e.expires&&(this._refreshTimeout=setTimeout(()=>this._refresh(),j(e.ttl))),this._session=e.session,this._node=e.node,this.startBatching(),this._sendSubscribeCommands(),this.stopBatching();const t={client:e.client,transport:this._transport.subName()};e.data&&(t.data=e.data),this.emit("connected",t),this._resolvePromises(),this._processServerSubs(e.subs||{}),e.ping&&e.ping>0?(this._serverPing=e.ping*1e3,this._sendPong=e.pong===!0,this._waitServerPing()):this._serverPing=0}_processServerSubs(e){for(const t in e){if(!e.hasOwnProperty(t))continue;const s=e[t];this._serverSubs[t]={offset:s.offset,epoch:s.epoch,recoverable:s.recoverable||!1};const i=this._getSubscribeContext(t,s);this.emit("subscribed",i)}for(const t in e){if(!e.hasOwnProperty(t))continue;const s=e[t];if(s.recovered){const i=s.publications;if(i&&i.length>0)for(const n in i)i.hasOwnProperty(n)&&this._handlePublication(t,i[n])}}for(const t in this._serverSubs)this._serverSubs.hasOwnProperty(t)&&(e[t]||(this.emit("unsubscribed",{channel:t}),delete this._serverSubs[t]))}_clearRefreshTimeout(){this._refreshTimeout!==null&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null)}_clearReconnectTimeout(){this._reconnectTimeout!==null&&(clearTimeout(this._reconnectTimeout),this._reconnectTimeout=null)}_clearServerPingTimeout(){this._serverPingTimeout!==null&&(clearTimeout(this._serverPingTimeout),this._serverPingTimeout=null)}_waitServerPing(){this._config.maxServerPingDelay!==0&&this._isConnected()&&(this._clearServerPingTimeout(),this._serverPingTimeout=setTimeout(()=>{this._isConnected()&&this._disconnect(D.noPing,"no ping",!0)},this._serverPing+this._config.maxServerPingDelay))}_getSubscribeContext(e,t){const s={channel:e,positioned:!1,recoverable:!1,wasRecovering:!1,recovered:!1,hasRecoveredPublications:!1};t.recovered&&(s.recovered=!0),t.positioned&&(s.positioned=!0),t.recoverable&&(s.recoverable=!0),t.was_recovering&&(s.wasRecovering=!0);let i="";"epoch"in t&&(i=t.epoch);let n=0;return"offset"in t&&(n=t.offset),(s.positioned||s.recoverable)&&(s.streamPosition={offset:n,epoch:i}),Array.isArray(t.publications)&&t.publications.length>0&&(s.hasRecoveredPublications=!0),t.data&&(s.data=t.data),s}_handleReply(e,t){const s=e.id;if(!(s in this._callbacks)){t();return}const i=this._callbacks[s];if(clearTimeout(this._callbacks[s].timeout),delete this._callbacks[s],re(e)){const n=i.errback;if(!n){t();return}const r={code:e.error.code,message:e.error.message||"",temporary:e.error.temporary||!1};n({error:r,next:t})}else{const n=i.callback;if(!n)return;n({reply:e,next:t})}}_handleJoin(e,t,s){const i=this._getSub(e,s);if(!i){if(e&&this._isServerSub(e)){const n={channel:e,info:this._getJoinLeaveContext(t.info)};this.emit("join",n)}return}i._handleJoin(t)}_handleLeave(e,t,s){const i=this._getSub(e,s);if(!i){if(e&&this._isServerSub(e)){const n={channel:e,info:this._getJoinLeaveContext(t.info)};this.emit("leave",n)}return}i._handleLeave(t)}_handleUnsubscribe(e,t){const s=this._getSub(e,0);if(!s&&e){this._isServerSub(e)&&(delete this._serverSubs[e],this.emit("unsubscribed",{channel:e}));return}t.code<2500?s._setUnsubscribed(t.code,t.reason,!1):(t.code===z.stateInvalidated&&s._invalidateState(),s._setSubscribing(t.code,t.reason))}_handleSubscribe(e,t){this._serverSubs[e]={offset:t.offset,epoch:t.epoch,recoverable:t.recoverable||!1},this.emit("subscribed",this._getSubscribeContext(e,t))}_handleDisconnect(e){const t=e.code;let s=!0;(t>=3500&&t<4e3||t>=4500&&t<5e3)&&(s=!1),this._disconnect(t,e.reason,s)}_getPublicationContext(e,t){const s={channel:e,data:t.data};return t.offset&&(s.offset=t.offset),t.info&&(s.info=this._getJoinLeaveContext(t.info)),t.tags&&(s.tags=t.tags),s}_getJoinLeaveContext(e){const t={client:e.client,user:e.user},s=e.conn_info;s&&(t.connInfo=s);const i=e.chan_info;return i&&(t.chanInfo=i),t}_handlePublication(e,t,s){const i=this._getSub(e,s);if(!i){if(e&&this._isServerSub(e)){const n=this._getPublicationContext(e,t);this.emit("publication",n),t.offset!==void 0&&(this._serverSubs[e].offset=t.offset)}return}i._handlePublication(t)}_handleMessage(e){this.emit("message",{data:e.data})}_handleServerPing(e){if(this._sendPong){const t={};this._transportSendCommands([t])}e()}_handlePush(e,t){const s=e.channel,i=e.id;e.pub?this._handlePublication(s,e.pub,i):e.message?this._handleMessage(e.message):e.join?this._handleJoin(s,e.join,i):e.leave?this._handleLeave(s,e.leave,i):e.unsubscribe?this._handleUnsubscribe(s,e.unsubscribe):e.subscribe?this._handleSubscribe(s,e.subscribe):e.disconnect&&this._handleDisconnect(e.disconnect),t()}_flush(){const e=this._commands.slice(0);this._commands=[],this._transportSendCommands(e)}_createErrorObject(e,t,s){const i={code:e,message:t};return s&&(i.temporary=!0),i}_registerCall(e,t,s){this._callbacks[e]={callback:t,errback:s,timeout:null},this._callbacks[e].timeout=setTimeout(()=>{delete this._callbacks[e],q(s)&&s({error:this._createErrorObject(b.timeout,"timeout")})},this._config.timeout)}_addCommand(e){this._batching?this._commands.push(e):this._transportSendCommands([e])}_nextPromiseId(){return++this._promiseId}_nextTransportId(){return++this._transportId}_resolvePromises(){for(const e in this._promises)this._promises.hasOwnProperty(e)&&(this._promises[e].timeout&&clearTimeout(this._promises[e].timeout),this._promises[e].resolve(),delete this._promises[e])}_rejectPromises(e){for(const t in this._promises)this._promises.hasOwnProperty(t)&&(this._promises[t].timeout&&clearTimeout(this._promises[t].timeout),this._promises[t].reject(e),delete this._promises[t])}}G.SubscriptionState=E;G.State=k;G.UnauthorizedError=O;export{G as Centrifuge,k as State,ae as Subscription,E as SubscriptionState,O as UnauthorizedError,D as connectingCodes,M as disconnectedCodes,b as errorCodes,N as subscribingCodes,B as subscriptionFlags,z as unsubscribedCodes}; diff --git a/public/assets/index-LFNXxSi2.js b/public/assets/index-CvyVvvnt.js similarity index 86% rename from public/assets/index-LFNXxSi2.js rename to public/assets/index-CvyVvvnt.js index fa5f45e..9fa45b0 100644 --- a/public/assets/index-LFNXxSi2.js +++ b/public/assets/index-CvyVvvnt.js @@ -1,3 +1,3 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginView-DAC0RwAQ.js","assets/forms-CE5LqaKY.js","assets/RegisterView-Clc4cUwL.js","assets/ForgotView-BOx6Nau9.js","assets/ResetView-BlxClKWv.js","assets/DashboardView-CQoALeJF.js","assets/PageHead.vue_vue_type_script_setup_true_lang-l9qe_URH.js","assets/LoadState.vue_vue_type_script_setup_true_lang-BX6YDhEk.js","assets/ElectiveBar.vue_vue_type_script_setup_true_lang-mMQANJpk.js","assets/format-bcE-cYHJ.js","assets/ScheduleView-CwxmPwjF.js","assets/DeadlinesView-BDipircW.js","assets/CoursesView-C67U75O8.js","assets/CourseView-DA_0kxps.js","assets/ReadingItem.vue_vue_type_script_setup_true_lang-BpkoB79x.js","assets/ReadingsView-CUnMjS8U.js","assets/MaterialsView-BvNKRnn6.js","assets/MaterialView-QL0yqUg2.js","assets/QuizzesView-Bgho7mXY.js","assets/quizzes-B7pKYg3A.js","assets/QuizView-C5E-4ich.js","assets/MoreView-Cm2K6Awc.js","assets/ProfileView-B2CbG48x.js","assets/MyPresentationsView-2R3XisKT.js","assets/presentations-W-oMAxZb.js","assets/PresentationSpeakerView-BpKWeYat.js","assets/DeckViewer.vue_vue_type_style_index_0_lang-Dsql2yXf.js","assets/DeckViewer-CR8xWjLR.css","assets/PresentationSpeakerView-B17W5L2w.css","assets/PresentationPublicView-1pAdHNma.js","assets/PresentationPublicView-BfVrlmS5.css"])))=>i.map(i=>d[i]); -var Ol=Object.defineProperty;var Tl=(e,t,n)=>t in e?Ol(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Kt=(e,t,n)=>Tl(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();function gr(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const oe={},Ft=[],ot=()=>{},Jo=()=>!1,ds=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),hs=e=>e.startsWith("onUpdate:"),Ee=Object.assign,mr=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Il=Object.prototype.hasOwnProperty,te=(e,t)=>Il.call(e,t),H=Array.isArray,It=e=>Fn(e)==="[object Map]",_t=e=>Fn(e)==="[object Set]",Br=e=>Fn(e)==="[object Date]",K=e=>typeof e=="function",ue=e=>typeof e=="string",He=e=>typeof e=="symbol",ne=e=>e!==null&&typeof e=="object",Qo=e=>(ne(e)||K(e))&&K(e.then)&&K(e.catch),Yo=Object.prototype.toString,Fn=e=>Yo.call(e),Ml=e=>Fn(e).slice(8,-1),Xo=e=>Fn(e)==="[object Object]",ps=e=>ue(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,yn=gr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),gs=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Nl=/-\w/g,Me=gs(e=>e.replace(Nl,t=>t.slice(1).toUpperCase())),Dl=/\B([A-Z])/g,qt=gs(e=>e.replace(Dl,"-$1").toLowerCase()),ms=gs(e=>e.charAt(0).toUpperCase()+e.slice(1)),Is=gs(e=>e?`on${ms(e)}`:""),st=(e,t)=>!Object.is(e,t),Yn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},_s=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Ur;const ys=()=>Ur||(Ur=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function _r(e){if(H(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(jl).forEach(n=>{if(n){const s=n.split(Ll);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Pn(e){let t="";if(ue(e))t=e;else if(H(e))for(let n=0;nyt(n,t))}const ti=e=>!!(e&&e.__v_isRef===!0),pn=e=>ue(e)?e:e==null?"":H(e)||ne(e)&&(e.toString===Yo||!K(e.toString))?ti(e)?pn(e.value):JSON.stringify(e,ni,2):String(e),ni=(e,t)=>ti(t)?ni(e,t.value):It(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[Ms(s,o)+" =>"]=r,n),{})}:_t(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ms(n))}:He(t)?Ms(t):ne(t)&&!H(t)&&!Xo(t)?String(t):t,Ms=(e,t="")=>{var n;return He(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let ve;class si{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&ve&&(ve.active?(this.parent=ve,this.index=(ve.scopes||(ve.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t0&&--this._on===0){if(ve===this)ve=this.prevScope;else{let t=ve;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(bn){let t=bn;for(bn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;vn;){let t=vn;for(vn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function ai(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ui(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),Er(s),zl(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Ys(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(fi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function fi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===On)||(e.globalVersion=On,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ys(e))))return;e.flags|=2;const t=e.dep,n=le,s=Ke;le=e,Ke=!0;try{ai(e);const r=e.fn(e._value);(t.version===0||st(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{le=n,Ke=s,ui(e),e.flags&=-3}}function Er(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)Er(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function zl(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ke=!0;const di=[];function vt(){di.push(Ke),Ke=!1}function bt(){const e=di.pop();Ke=e===void 0?!0:e}function $r(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=le;le=void 0;try{t()}finally{le=n}}}let On=0;class $l{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class wr{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!le||!Ke||le===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==le)n=this.activeLink=new $l(le,this),le.deps?(n.prevDep=le.depsTail,le.depsTail.nextDep=n,le.depsTail=n):le.deps=le.depsTail=n,hi(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=le.depsTail,n.nextDep=void 0,le.depsTail.nextDep=n,le.depsTail=n,le.deps===n&&(le.deps=s)}return n}trigger(t){this.version++,On++,this.notify(t)}notify(t){vr();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{br()}}}function hi(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)hi(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ns=new WeakMap,Bt=Symbol(""),Xs=Symbol(""),Tn=Symbol("");function Re(e,t,n){if(Ke&&le){let s=ns.get(e);s||ns.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new wr),r.map=s,r.key=n),r.track()}}function ht(e,t,n,s,r,o){const i=ns.get(e);if(!i){On++;return}const l=c=>{c&&c.trigger()};if(vr(),t==="clear")i.forEach(l);else{const c=H(e),a=c&&ps(n);if(c&&n==="length"){const u=Number(s);i.forEach((f,g)=>{(g==="length"||g===Tn||!He(g)&&g>=u)&&l(f)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),a&&l(i.get(Tn)),t){case"add":c?a&&l(i.get("length")):(l(i.get(Bt)),It(e)&&l(i.get(Xs)));break;case"delete":c||(l(i.get(Bt)),It(e)&&l(i.get(Xs)));break;case"set":It(e)&&l(i.get(Bt));break}}br()}function Kl(e,t){const n=ns.get(e);return n&&n.get(t)}function Gt(e){const t=Y(e);return t===e||(Re(t,"iterate",Tn),ke(e))?t:lt(e)?it(e)?t.map(n=>Mt(qe(n))):t.map(Mt):t.map(qe)}function vs(e){return Re(e=Y(e),"iterate",Tn),e}function tt(e,t){return lt(e)?Mt(it(e)?qe(t):t):qe(t)}const Gl={__proto__:null,[Symbol.iterator](){return Ds(this,Symbol.iterator,e=>tt(this,e))},concat(...e){return Gt(this).concat(...e.map(t=>H(t)?Gt(t):t))},entries(){return Ds(this,"entries",e=>(e[1]=tt(this,e[1]),e))},every(e,t){return at(this,"every",e,t,void 0,arguments)},filter(e,t){return at(this,"filter",e,t,n=>n.map(s=>tt(this,s)),arguments)},find(e,t){return at(this,"find",e,t,n=>tt(this,n),arguments)},findIndex(e,t){return at(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return at(this,"findLast",e,t,n=>tt(this,n),arguments)},findLastIndex(e,t){return at(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return at(this,"forEach",e,t,void 0,arguments)},includes(...e){return js(this,"includes",e)},indexOf(...e){return js(this,"indexOf",e)},join(e){return Gt(this).join(e)},lastIndexOf(...e){return js(this,"lastIndexOf",e)},map(e,t){return at(this,"map",e,t,void 0,arguments)},pop(){return an(this,"pop")},push(...e){return an(this,"push",e)},reduce(e,...t){return Kr(this,"reduce",e,t)},reduceRight(e,...t){return Kr(this,"reduceRight",e,t)},shift(){return an(this,"shift")},some(e,t){return at(this,"some",e,t,void 0,arguments)},splice(...e){return an(this,"splice",e)},toReversed(){return Gt(this).toReversed()},toSorted(e){return Gt(this).toSorted(e)},toSpliced(...e){return Gt(this).toSpliced(...e)},unshift(...e){return an(this,"unshift",e)},values(){return Ds(this,"values",e=>tt(this,e))}};function Ds(e,t,n){const s=vs(e),r=s[t]();return s!==e&&!ke(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const Wl=Array.prototype;function at(e,t,n,s,r,o){const i=vs(e),l=i!==e&&!ke(e),c=i[t];if(c!==Wl[t]){const f=c.apply(e,o);return l?qe(f):f}let a=n;i!==e&&(l?a=function(f,g){return n.call(this,tt(e,f),g,e)}:n.length>2&&(a=function(f,g){return n.call(this,f,g,e)}));const u=c.call(i,a,s);return l&&r?r(u):u}function Kr(e,t,n,s){const r=vs(e),o=r!==e&&!ke(e);let i=n,l=!1;r!==e&&(o?(l=s.length===0,i=function(a,u,f){return l&&(l=!1,a=tt(e,a)),n.call(this,a,tt(e,u),f,e)}):n.length>3&&(i=function(a,u,f){return n.call(this,a,u,f,e)}));const c=r[t](i,...s);return l?tt(e,c):c}function js(e,t,n){const s=Y(e);Re(s,"iterate",Tn);const r=s[t](...n);return(r===-1||r===!1)&&bs(n[0])?(n[0]=Y(n[0]),s[t](...n)):r}function an(e,t,n=[]){vt(),vr();const s=Y(e)[t].apply(e,n);return br(),bt(),s}const Jl=gr("__proto__,__v_isRef,__isVue"),pi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(He));function Ql(e){He(e)||(e=String(e));const t=Y(this);return Re(t,"has",e),t.hasOwnProperty(e)}class gi{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?ic:vi:o?yi:_i).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=H(t);if(!r){let c;if(i&&(c=Gl[n]))return c;if(n==="hasOwnProperty")return Ql}const l=Reflect.get(t,n,pe(t)?t:s);if((He(n)?pi.has(n):Jl(n))||(r||Re(t,"get",n),o))return l;if(pe(l)){const c=i&&ps(n)?l:l.value;return r&&ne(c)?er(c):c}return ne(l)?r?er(l):kn(l):l}}class mi extends gi{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];const i=H(t)&&ps(n);if(!this._isShallow){const a=lt(o);if(!ke(s)&&!lt(s)&&(o=Y(o),s=Y(s)),!i&&pe(o)&&!pe(s))return a||(o.value=s),!0}const l=i?Number(n)e,zn=e=>Reflect.getPrototypeOf(e);function tc(e,t,n){return function(...s){const r=this.__v_raw,o=Y(r),i=It(o),l=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,a=r[e](...s),u=n?Zs:t?Mt:qe;return!t&&Re(o,"iterate",c?Xs:Bt),Ee(Object.create(a),{next(){const{value:f,done:g}=a.next();return g?{value:f,done:g}:{value:l?[u(f[0]),u(f[1])]:u(f),done:g}}})}}function $n(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function nc(e,t){const n={get(r){const o=this.__v_raw,i=Y(o),l=Y(r);e||(st(r,l)&&Re(i,"get",r),Re(i,"get",l));const{has:c}=zn(i),a=t?Zs:e?Mt:qe;if(c.call(i,r))return a(o.get(r));if(c.call(i,l))return a(o.get(l));o!==i&&o.get(r)},get size(){const r=this.__v_raw;return!e&&Re(Y(r),"iterate",Bt),r.size},has(r){const o=this.__v_raw,i=Y(o),l=Y(r);return e||(st(r,l)&&Re(i,"has",r),Re(i,"has",l)),r===l?o.has(r):o.has(r)||o.has(l)},forEach(r,o){const i=this,l=i.__v_raw,c=Y(l),a=t?Zs:e?Mt:qe;return!e&&Re(c,"iterate",Bt),l.forEach((u,f)=>r.call(o,a(u),a(f),i))}};return Ee(n,e?{add:$n("add"),set:$n("set"),delete:$n("delete"),clear:$n("clear")}:{add(r){const o=Y(this),i=zn(o),l=Y(r),c=!t&&!ke(r)&&!lt(r)?l:r;return i.has.call(o,c)||st(r,c)&&i.has.call(o,r)||st(l,c)&&i.has.call(o,l)||(o.add(c),ht(o,"add",c,c)),this},set(r,o){!t&&!ke(o)&&!lt(o)&&(o=Y(o));const i=Y(this),{has:l,get:c}=zn(i);let a=l.call(i,r);a||(r=Y(r),a=l.call(i,r));const u=c.call(i,r);return i.set(r,o),a?st(o,u)&&ht(i,"set",r,o):ht(i,"add",r,o),this},delete(r){const o=Y(this),{has:i,get:l}=zn(o);let c=i.call(o,r);c||(r=Y(r),c=i.call(o,r)),l&&l.call(o,r);const a=o.delete(r);return c&&ht(o,"delete",r,void 0),a},clear(){const r=Y(this),o=r.size!==0,i=r.clear();return o&&ht(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=tc(r,e,t)}),n}function Sr(e,t){const n=nc(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(te(n,r)&&r in s?n:s,r,o)}const sc={get:Sr(!1,!1)},rc={get:Sr(!1,!0)},oc={get:Sr(!0,!1)};const _i=new WeakMap,yi=new WeakMap,vi=new WeakMap,ic=new WeakMap;function lc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function kn(e){return lt(e)?e:Ar(e,!1,Xl,sc,_i)}function bi(e){return Ar(e,!1,ec,rc,yi)}function er(e){return Ar(e,!0,Zl,oc,vi)}function Ar(e,t,n,s,r){if(!ne(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=r.get(e);if(o)return o;const i=lc(Ml(e));if(i===0)return e;const l=new Proxy(e,i===2?s:n);return r.set(e,l),l}function it(e){return lt(e)?it(e.__v_raw):!!(e&&e.__v_isReactive)}function lt(e){return!!(e&&e.__v_isReadonly)}function ke(e){return!!(e&&e.__v_isShallow)}function bs(e){return e?!!e.__v_raw:!1}function Y(e){const t=e&&e.__v_raw;return t?Y(t):e}function Rr(e){return!te(e,"__v_skip")&&Object.isExtensible(e)&&Zo(e,"__v_skip",!0),e}const qe=e=>ne(e)?kn(e):e,Mt=e=>ne(e)?er(e):e;function pe(e){return e?e.__v_isRef===!0:!1}function be(e){return wi(e,!1)}function Ei(e){return wi(e,!0)}function wi(e,t){return pe(e)?e:new cc(e,t)}class cc{constructor(t,n){this.dep=new wr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Y(t),this._value=n?t:qe(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||ke(t)||lt(t);t=s?t:Y(t),st(t,n)&&(this._rawValue=t,this._value=s?t:qe(t),this.dep.trigger())}}function $e(e){return pe(e)?e.value:e}const ac={get:(e,t,n)=>t==="__v_raw"?e:$e(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return pe(r)&&!pe(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Si(e){return it(e)?e:new Proxy(e,ac)}function uc(e){const t=H(e)?new Array(e.length):{};for(const n in e)t[n]=dc(e,n);return t}class fc{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=He(n)?n:String(n),this._raw=Y(t);let r=!0,o=t;if(!H(t)||He(this._key)||!ps(this._key))do r=!bs(o)||ke(o);while(r&&(o=o.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=$e(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&pe(this._raw[this._key])){const n=this._object[this._key];if(pe(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Kl(this._raw,this._key)}}function dc(e,t,n){return new fc(e,t,n)}class hc{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new wr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=On-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&le!==this)return ci(this,!0),!0}get value(){const t=this.dep.track();return fi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function pc(e,t,n=!1){let s,r;return K(e)?s=e:(s=e.get,r=e.set),new hc(s,r,n)}const Kn={},ss=new WeakMap;let Lt;function gc(e,t=!1,n=Lt){if(n){let s=ss.get(n);s||ss.set(n,s=[]),s.push(e)}}function mc(e,t,n=oe){const{immediate:s,deep:r,once:o,scheduler:i,augmentJob:l,call:c}=n,a=T=>r?T:ke(T)||r===!1||r===0?pt(T,1):pt(T);let u,f,g,p,y=!1,_=!1;if(pe(e)?(f=()=>e.value,y=ke(e)):it(e)?(f=()=>a(e),y=!0):H(e)?(_=!0,y=e.some(T=>it(T)||ke(T)),f=()=>e.map(T=>{if(pe(T))return T.value;if(it(T))return a(T);if(K(T))return c?c(T,2):T()})):K(e)?t?f=c?()=>c(e,2):e:f=()=>{if(g){vt();try{g()}finally{bt()}}const T=Lt;Lt=u;try{return c?c(e,3,[p]):e(p)}finally{Lt=T}}:f=ot,t&&r){const T=f,j=r===!0?1/0:r;f=()=>pt(T(),j)}const x=oi(),R=()=>{u.stop(),x&&x.active&&mr(x.effects,u)};if(o&&t){const T=t;t=(...j)=>{const X=T(...j);return R(),X}}let S=_?new Array(e.length).fill(Kn):Kn;const I=T=>{if(!(!(u.flags&1)||!u.dirty&&!T))if(t){const j=u.run();if(T||r||y||(_?j.some((X,L)=>st(X,S[L])):st(j,S))){g&&g();const X=Lt;Lt=u;try{const L=[j,S===Kn?void 0:_&&S[0]===Kn?[]:S,p];S=j,c?c(t,3,L):t(...L)}finally{Lt=X}}}else u.run()};return l&&l(I),u=new ii(f),u.scheduler=i?()=>i(I,!1):I,p=T=>gc(T,!1,u),g=u.onStop=()=>{const T=ss.get(u);if(T){if(c)c(T,4);else for(const j of T)j();ss.delete(u)}},t?s?I(!0):S=u.run():i?i(I.bind(null,!0),!0):u.run(),R.pause=u.pause.bind(u),R.resume=u.resume.bind(u),R.stop=R,R}function pt(e,t=1/0,n){if(t<=0||!ne(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,pe(e))pt(e.value,t,n);else if(H(e))for(let s=0;s{pt(s,t,n)});else if(Xo(e)){for(const s in e)pt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&pt(e[s],t,n)}return e}function Hn(e,t,n,s){try{return s?e(...s):e()}catch(r){Bn(r,t,n)}}function Ge(e,t,n,s){if(K(e)){const r=Hn(e,t,n,s);return r&&Qo(r)&&r.catch(o=>{Bn(o,t,n)}),r}if(H(e)){const r=[];for(let o=0;o>>1,r=Ie[s],o=In(r);o=In(n)?Ie.push(e):Ie.splice(yc(t),0,e),e.flags|=1,Ri()}}function Ri(){rs||(rs=Ai.then(Ci))}function vc(e){if(!H(e))Pt&&e.id===-1?Pt.splice(Qt+1,0,e):e.flags&1||(Xt.push(e),e.flags|=1);else for(let t=0;tIn(n)-In(s));if(Xt.length=0,Pt){for(let n=0;ne.id==null?e.flags&2?-1:1/0:e.id;function Ci(e){try{for(et=0;et{s._d&&cs(-1);const o=os(t),i=gt.length;let l;try{l=e(...r)}finally{for(let c=gt.length;c>i;c--)Nr();os(o),s._d&&cs(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function bc(e,t){if(Ae===null)return e;const n=Cs(Ae),s=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&K(t)?t.call(s&&s.proxy):t}}function Ec(){return!!(el()||Ut)}const wc=Symbol.for("v-scx"),Sc=()=>Ue(wc);function Zt(e,t,n){return Oi(e,t,n)}function Oi(e,t,n=oe){const{immediate:s,deep:r,flush:o,once:i}=n,l=Ee({},n),c=t&&s||!t&&o!=="post";let a;if(nn){if(o==="sync"){const p=Sc();a=p.__watcherHandles||(p.__watcherHandles=[])}else if(!c){const p=()=>{};return p.stop=ot,p.resume=ot,p.pause=ot,p}}const u=Se;l.call=(p,y,_)=>Ge(p,u,y,_);let f=!1;o==="post"?l.scheduler=p=>{Oe(p,u&&u.suspense)}:o!=="sync"&&(f=!0,l.scheduler=(p,y)=>{y?p():xr(p)}),l.augmentJob=p=>{t&&(p.flags|=4),f&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const g=mc(e,t,l);return nn&&(a?a.push(g):c&&g()),g}function Ac(e,t,n){const s=this.proxy,r=ue(e)?e.includes(".")?Ti(s,e):()=>s[e]:e.bind(s,s);let o;K(t)?o=t:(o=t.handler,n=t);const i=Un(this),l=Oi(r,o.bind(s),n);return i(),l}function Ti(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;re.__isTeleport,Vt=e=>e&&(e.disabled||e.disabled===""),Rc=e=>e&&(e.defer||e.defer===""),Wr=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Jr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,tr=(e,t)=>{const n=e&&e.to;return ue(n)?t?t(n):null:n},xc={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,i,l,c,a){const{mc:u,pc:f,pbc:g,o:{insert:p,querySelector:y,createText:_,createComment:x,parentNode:R}}=a,S=Vt(t.props);let{dynamicChildren:I}=t;const T=(L,B,V)=>{L.shapeFlag&16&&u(L.children,B,V,r,o,i,l,c)},j=(L=t)=>{const B=Vt(L.props),V=L.target=tr(L.props,y),Z=nr(V,L,_,p);V&&(i!=="svg"&&Wr(V)?i="svg":i!=="mathml"&&Jr(V)&&(i="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(V),B||(T(L,V,Z),gn(L,!1)))},X=L=>{const B=()=>{if(Rt.get(L)===B){if(Rt.delete(L),Vt(L.props)){const V=R(L.el)||n;T(L,V,L.anchor),gn(L,!0)}j(L)}};Rt.set(L,B),Oe(B,o)};if(e==null){const L=t.el=_(""),B=t.anchor=_("");if(p(L,n,s),p(B,n,s),Rc(t.props)||o&&o.pendingBranch){X(t);return}S&&(T(t,n,B),gn(t,!0)),j()}else{t.el=e.el;const L=t.anchor=e.anchor,B=Rt.get(e);if(B){B.flags|=8,Rt.delete(e),X(t);return}t.targetStart=e.targetStart;const V=t.target=e.target,Z=t.targetAnchor=e.targetAnchor,fe=Vt(e.props),U=fe?n:V,de=fe?L:Z;if(i==="svg"||Wr(V)?i="svg":(i==="mathml"||Jr(V))&&(i="mathml"),I?(g(e.dynamicChildren,I,U,r,o,i,l),Mr(e,t,!0)):c||f(e,t,U,de,r,o,i,l,!1),S)fe?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Gn(t,n,L,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const ge=tr(t.props,y);ge&&(t.target=ge,Gn(t,ge,null,a,0))}else fe&&Gn(t,V,Z,a,1);gn(t,S)}},remove(e,t,n,{um:s,o:{remove:r}},o){const{shapeFlag:i,children:l,anchor:c,targetStart:a,targetAnchor:u,target:f,props:g}=e,p=Vt(g),y=o||!p,_=Rt.get(e);if(_&&(_.flags|=8,Rt.delete(e)),f&&(r(a),r(u)),o&&r(c),!_&&(p||f)&&i&16)for(let x=0;x1){for(const n of e)if(n.type!==ct){t=n;break}}return t}function Mi(e){if(!Ss(e))return ws(e.type)&&e.children?Pc(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&K(n.default))return n.default()}}function Cr(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;Cr(ws(n.type)&&Mi(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ln(e,t){return K(e)?Ee({name:e.name},t,{setup:e}):e}function Pr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Qr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const is=new WeakMap;function wn(e,t,n,s,r=!1){if(H(e)){e.forEach((_,x)=>wn(_,t&&(H(t)?t[x]:t),n,s,r));return}if(en(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&wn(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?Cs(s.component):s.el,i=r?null:o,{i:l,r:c}=e,a=t&&t.r,u=l.refs===oe?l.refs={}:l.refs,f=l.setupState,g=Y(f),p=f===oe?Jo:_=>Qr(u,_)?!1:te(g,_),y=(_,x)=>!(x&&Qr(u,x));if(a!=null&&a!==c){if(Yr(t),ue(a))u[a]=null,p(a)&&(f[a]=null);else if(pe(a)){const _=t;y(a,_.k)&&(a.value=null),_.k&&(u[_.k]=null)}}if(K(c))Hn(c,l,12,[i,u]);else{const _=ue(c),x=pe(c);if(_||x){const R=()=>{if(e.f){const S=_?p(c)?f[c]:u[c]:y()||!e.k?c.value:u[e.k];if(r)H(S)&&mr(S,o);else if(H(S))S.includes(o)||S.push(o);else if(_)u[c]=[o],p(c)&&(f[c]=u[c]);else{const I=[o];y(c,e.k)&&(c.value=I),e.k&&(u[e.k]=I)}}else _?(u[c]=i,p(c)&&(f[c]=i)):x&&(y(c,e.k)&&(c.value=i),e.k&&(u[e.k]=i))};if(i){const S=()=>{R(),is.delete(e)};S.id=-1,is.set(e,S),Oe(S,n)}else Yr(e),R()}}}function Yr(e){const t=is.get(e);t&&(t.flags|=8,is.delete(e))}const Xr=e=>e.nodeType===8;ys().requestIdleCallback;ys().cancelIdleCallback;function Oc(e,t){if(Xr(e)&&e.data==="["){let n=1,s=e.nextSibling;for(;s;){if(s.nodeType===1){if(t(s)===!1)break}else if(Xr(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else t(e)}const en=e=>!!e.type.__asyncLoader;function $f(e){K(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,hydrate:o,timeout:i,suspensible:l=!0,onError:c}=e;let a=null,u,f=0;const g=()=>(f++,a=null,p()),p=()=>{let y;return a||(y=a=t().catch(_=>{if(_=_ instanceof Error?_:new Error(String(_)),c)return new Promise((x,R)=>{c(_,()=>x(g()),()=>R(_),f+1)});throw _}).then(_=>y!==a&&a?a:(_&&(_.__esModule||_[Symbol.toStringTag]==="Module")&&(_=_.default),u=_,_)))};return ln({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(y,_,x){const R=y.isConnected;let S=!1;(_.bu||(_.bu=[])).push(()=>S=!0);const I=()=>{S||!y.parentNode||R&&!y.isConnected||x()},T=o?()=>{const j=o(I,X=>Oc(y,X));j&&(_.bum||(_.bum=[])).push(j)}:I;u?T():p().then(()=>!_.isUnmounted&&T())},get __asyncResolved(){return u},setup(){const y=Se;if(Pr(y),u)return()=>Wn(u,y);const _=j=>{a=null,Bn(j,y,13,!s)};if(l&&y.suspense||nn)return p().then(j=>()=>Wn(j,y)).catch(j=>(_(j),()=>s?ae(s,{error:j}):null));const x=be(!1),R=be(),S=be(!!r);let I,T;return Or(()=>{I!=null&&clearTimeout(I),T!=null&&clearTimeout(T)}),r&&(T=setTimeout(()=>{y.isUnmounted||(S.value=!1)},r)),i!=null&&(I=setTimeout(()=>{if(!y.isUnmounted&&!x.value&&!R.value){const j=new Error(`Async component timed out after ${i}ms.`);_(j),R.value=j}},i)),p().then(()=>{y.isUnmounted||(x.value=!0,y.parent&&Ss(y.parent.vnode)&&y.parent.update())}).catch(j=>{if(y.isUnmounted){a=null;return}_(j),R.value=j}),()=>{if(x.value&&u)return Wn(u,y);if(R.value&&s)return ae(s,{error:R.value});if(n&&!S.value)return Wn(n,y)}}})}function Wn(e,t){const{ref:n,props:s,children:r,ce:o}=t.vnode,i=ae(e,s,r);return i.ref=n,i.ce=o,delete t.vnode.ce,i}const Ss=e=>e.type.__isKeepAlive;function Tc(e,t){Ni(e,"a",t)}function Ic(e,t){Ni(e,"da",t)}function Ni(e,t,n=Se){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(As(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Ss(r.parent.vnode)&&Mc(s,t,n,r),r=r.parent}}function Mc(e,t,n,s){const r=As(t,e,s,!0);Or(()=>{mr(s[t],r)},n)}function As(e,t,n=Se,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{vt();const l=Un(n),c=Ge(t,n,e,i);return l(),bt(),c});return s?r.unshift(o):r.push(o),o}}const Et=e=>(t,n=Se)=>{(!nn||e==="sp")&&As(e,(...s)=>t(...s),n)},Nc=Et("bm"),Dc=Et("m"),jc=Et("bu"),Lc=Et("u"),Vc=Et("bum"),Or=Et("um"),Fc=Et("sp"),kc=Et("rtg"),Hc=Et("rtc");function Bc(e,t=Se){As("ec",e,t)}const Uc="components";function Di(e,t){return zc(Uc,e,!0,t)||e}const qc=Symbol.for("v-ndc");function zc(e,t,n=!0,s=!1){const r=Ae||Se;if(r){const o=r.type;{const l=Pa(o,!1);if(l&&(l===t||l===Me(t)||l===ms(Me(t))))return o}const i=Zr(r[e]||o[e],t)||Zr(r.appContext[e],t);return!i&&s?o:i}}function Zr(e,t){return e&&(e[t]||e[Me(t)]||e[ms(Me(t))])}function eo(e,t,n,s){let r;const o=n,i=H(e);if(i||ue(e)){const l=i&&it(e);let c=!1,a=!1;l&&(c=!ke(e),a=lt(e),e=vs(e)),r=new Array(e.length);for(let u=0,f=e.length;ut(l,c,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,a=l.length;c0;return t!=="default"&&(a.name=t),mt(),Nn(De,null,[ae("slot",a,s)],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const l=gt.length;mt();let c;try{const a=i&&ji(i(n)),u=n.key||o||a&&a.key;c=Nn(De,{key:(u&&!He(u)?u:`_${t}`)+(!a&&s?"_fb":"")},a||(s?s():[]),a&&e._===1?64:-2)}catch(a){for(let u=gt.length;u>l;u--)Nr();throw a}finally{i&&i._c&&(i._d=!0)}return c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),c}function ji(e){return e.some(t=>Dn(t)?!(t.type===ct||t.type===De&&!ji(t.children)):!0)?e:null}const sr=e=>e?tl(e)?Cs(e):sr(e.parent):null,Sn=Ee(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>sr(e.parent),$root:e=>sr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Vi(e),$forceUpdate:e=>e.f||(e.f=()=>{xr(e.update)}),$nextTick:e=>e.n||(e.n=Es.bind(e.proxy)),$watch:e=>Ac.bind(e)}),Vs=(e,t)=>e!==oe&&!e.__isScriptSetup&&te(e,t),Kc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:c}=e;if(t[0]!=="$"){const g=i[t];if(g!==void 0)switch(g){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(Vs(s,t))return i[t]=1,s[t];if(r!==oe&&te(r,t))return i[t]=2,r[t];if(te(o,t))return i[t]=3,o[t];if(n!==oe&&te(n,t))return i[t]=4,n[t];rr&&(i[t]=0)}}const a=Sn[t];let u,f;if(a)return t==="$attrs"&&Re(e.attrs,"get",""),a(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==oe&&te(n,t))return i[t]=4,n[t];if(f=c.config.globalProperties,te(f,t))return f[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return Vs(r,t)?(r[t]=n,!0):s!==oe&&te(s,t)?(s[t]=n,!0):te(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:o,type:i}},l){let c;return!!(n[l]||e!==oe&&l[0]!=="$"&&te(e,l)||Vs(t,l)||te(o,l)||te(s,l)||te(Sn,l)||te(r.config.globalProperties,l)||(c=i.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:te(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function to(e){return H(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let rr=!0;function Gc(e){const t=Vi(e),n=e.proxy,s=e.ctx;rr=!1,t.beforeCreate&&no(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:c,inject:a,created:u,beforeMount:f,mounted:g,beforeUpdate:p,updated:y,activated:_,deactivated:x,beforeDestroy:R,beforeUnmount:S,destroyed:I,unmounted:T,render:j,renderTracked:X,renderTriggered:L,errorCaptured:B,serverPrefetch:V,expose:Z,inheritAttrs:fe,components:U,directives:de,filters:ge}=t;if(a&&Wc(a,s,null),i)for(const $ in i){const G=i[$];K(G)&&(s[$]=G.bind(n))}if(r){const $=r.call(n,n);ne($)&&(e.data=kn($))}if(rr=!0,o)for(const $ in o){const G=o[$],je=K(G)?G.bind(n,n):K(G.get)?G.get.bind(n,n):ot,wt=!K(G)&&K(G.set)?G.set.bind(n):ot,Je=Q({get:je,set:wt});Object.defineProperty(s,$,{enumerable:!0,configurable:!0,get:()=>Je.value,set:xe=>Je.value=xe})}if(l)for(const $ in l)Li(l[$],s,n,$);if(c){const $=K(c)?c.call(n):c;Reflect.ownKeys($).forEach(G=>{Xn(G,$[G])})}u&&no(u,e,"c");function ie($,G){H(G)?G.forEach(je=>$(je.bind(n))):G&&$(G.bind(n))}if(ie(Nc,f),ie(Dc,g),ie(jc,p),ie(Lc,y),ie(Tc,_),ie(Ic,x),ie(Bc,B),ie(Hc,X),ie(kc,L),ie(Vc,S),ie(Or,T),ie(Fc,V),H(Z))if(Z.length){const $=e.exposed||(e.exposed={});Z.forEach(G=>{Object.defineProperty($,G,{get:()=>n[G],set:je=>n[G]=je,enumerable:!0})})}else e.exposed||(e.exposed={});j&&e.render===ot&&(e.render=j),fe!=null&&(e.inheritAttrs=fe),U&&(e.components=U),de&&(e.directives=de),V&&Pr(e)}function Wc(e,t,n=ot){H(e)&&(e=or(e));for(const s in e){const r=e[s];let o;ne(r)?"default"in r?o=Ue(r.from||s,r.default,!0):o=Ue(r.from||s):o=Ue(r),pe(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function no(e,t,n){Ge(H(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Li(e,t,n,s){let r=s.includes(".")?Ti(n,s):()=>n[s];if(ue(e)){const o=t[e];K(o)&&Zt(r,o)}else if(K(e))Zt(r,e.bind(n));else if(ne(e))if(H(e))e.forEach(o=>Li(o,t,n,s));else{const o=K(e.handler)?e.handler.bind(n):t[e.handler];K(o)&&Zt(r,o,e)}}function Vi(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(a=>ls(c,a,i,!0)),ls(c,t,i)),ne(t)&&o.set(t,c),c}function ls(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&ls(e,o,n,!0),r&&r.forEach(i=>ls(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=Jc[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Jc={data:so,props:ro,emits:ro,methods:mn,computed:mn,beforeCreate:Pe,created:Pe,beforeMount:Pe,mounted:Pe,beforeUpdate:Pe,updated:Pe,beforeDestroy:Pe,beforeUnmount:Pe,destroyed:Pe,unmounted:Pe,activated:Pe,deactivated:Pe,errorCaptured:Pe,serverPrefetch:Pe,components:mn,directives:mn,watch:Yc,provide:so,inject:Qc};function so(e,t){return t?e?function(){return Ee(K(e)?e.call(this,this):e,K(t)?t.call(this,this):t)}:t:e}function Qc(e,t){return mn(or(e),or(t))}function or(e){if(H(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Me(t)}Modifiers`]||e[`${qt(t)}Modifiers`];function ta(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||oe;let r=n;const o=t.startsWith("update:"),i=o&&ea(s,t.slice(7));i&&(i.trim&&(r=n.map(u=>ue(u)?u.trim():u)),i.number&&(r=r.map(_s)));let l,c=s[l=Is(t)]||s[l=Is(Me(t))];!c&&o&&(c=s[l=Is(qt(t))]),c&&Ge(c,e,6,r);const a=s[l+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Ge(a,e,6,r)}}const na=new WeakMap;function ki(e,t,n=!1){const s=n?na:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!K(e)){const c=a=>{const u=ki(a,t,!0);u&&(l=!0,Ee(i,u))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(ne(e)&&s.set(e,null),null):(H(o)?o.forEach(c=>i[c]=null):Ee(i,o),ne(e)&&s.set(e,i),i)}function Rs(e,t){return!e||!ds(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),te(e,t[0].toLowerCase()+t.slice(1))||te(e,qt(t))||te(e,t))}function oo(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:c,render:a,renderCache:u,props:f,data:g,setupState:p,ctx:y,inheritAttrs:_}=e,x=os(e);let R,S;try{if(n.shapeFlag&4){const T=r||s,j=T;R=nt(a.call(j,T,u,f,p,g,y)),S=l}else{const T=t;R=nt(T.length>1?T(f,{attrs:l,slots:i,emit:c}):T(f,null)),S=t.props?l:sa(l)}}catch(T){gt.length=0,Bn(T,e,1),R=ae(ct)}let I=R;if(S&&_!==!1){const T=Object.keys(S),{shapeFlag:j}=I;T.length&&j&7&&(o&&T.some(hs)&&(S=ra(S,o)),I=tn(I,S,!1,!0))}if(n.dirs&&(I=tn(I,null,!1,!0),I.dirs=I.dirs?I.dirs.concat(n.dirs):n.dirs),n.transition){const T=ws(I.type)&&Mi(I)||I;Cr(T,n.transition)}return R=I,os(x),R}const sa=e=>{let t;for(const n in e)(n==="class"||n==="style"||ds(n))&&((t||(t={}))[n]=e[n]);return t},ra=(e,t)=>{const n={};for(const s in e)(!hs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function oa(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:l,patchFlag:c}=t,a=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?io(s,i,a):!!i;if(c&8){const u=t.dynamicProps;for(let f=0;fObject.create(Bi),qi=e=>Object.getPrototypeOf(e)===Bi;function la(e,t,n,s=!1){const r={},o=Ui();e.propsDefaults=Object.create(null),zi(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:bi(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function ca(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=Y(r),[c]=e.propsOptions;let a=!1;if((s||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f{c=!0;const[g,p]=$i(f,t,!0);Ee(i,g),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!c)return ne(e)&&s.set(e,Ft),Ft;if(H(o))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",Ir=e=>H(e)?e.map(nt):[nt(e)],ua=(e,t,n)=>{if(t._n)return t;const s=En((...r)=>Ir(t(...r)),n);return s._c=!1,s},Ki=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Tr(r))continue;const o=e[r];if(K(o))t[r]=ua(r,o,s);else if(o!=null){const i=Ir(o);t[r]=()=>i}}},Gi=(e,t)=>{const n=Ir(t);e.slots.default=()=>n},Wi=(e,t,n)=>{for(const s in t)(n||!Tr(s))&&(e[s]=t[s])},fa=(e,t,n)=>{const s=e.slots=Ui();if(e.vnode.shapeFlag&32){const r=t._;r?(Wi(s,t,n),n&&Zo(s,"_",r,!0)):Ki(t,s)}else t&&Gi(e,t)},da=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=oe;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:Wi(r,t,n):(o=!t.$stable,Ki(t,r)),i=t}else t&&(Gi(e,t),i={default:1});if(o)for(const l in r)!Tr(l)&&i[l]==null&&delete r[l]},Oe=_a;function ha(e){return pa(e)}function pa(e,t){const n=ys();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:c,setText:a,setElementText:u,parentNode:f,nextSibling:g,setScopeId:p=ot,insertStaticContent:y}=e,_=(d,h,m,b=null,w=null,v=null,O=void 0,P=null,C=!!h.dynamicChildren)=>{if(d===h)return;d&&!un(d,h)&&(b=E(d),xe(d,w,v,!0),d=null),h.patchFlag===-2&&(C=!1,h.dynamicChildren=null),h.dynamicChildren&&d&&d.dynamicChildren&&d.dynamicChildren.hasOnce&&(h.dynamicChildren===Ft&&(h.dynamicChildren=[]),h.dynamicChildren.hasOnce=!0);const{type:A,ref:q,shapeFlag:N}=h;switch(A){case xs:x(d,h,m,b);break;case ct:R(d,h,m,b);break;case ks:d==null&&S(h,m,b,O);break;case De:U(d,h,m,b,w,v,O,P,C);break;default:N&1?j(d,h,m,b,w,v,O,P,C):N&6?de(d,h,m,b,w,v,O,P,C):(N&64||N&128)&&A.process(d,h,m,b,w,v,O,P,C,F)}q!=null&&w?wn(q,d&&d.ref,v,h||d,!h):q==null&&d&&d.ref!=null&&wn(d.ref,null,v,d,!0)},x=(d,h,m,b)=>{if(d==null)s(h.el=l(h.children),m,b);else{const w=h.el=d.el;h.children!==d.children&&a(w,h.children)}},R=(d,h,m,b)=>{d==null?s(h.el=c(h.children||""),m,b):h.el=d.el},S=(d,h,m,b)=>{[d.el,d.anchor]=y(d.children,h,m,b,d.el,d.anchor)},I=({el:d,anchor:h},m,b)=>{let w;for(;d&&d!==h;)w=g(d),s(d,m,b),d=w;s(h,m,b)},T=({el:d,anchor:h})=>{let m;for(;d&&d!==h;)m=g(d),r(d),d=m;r(h)},j=(d,h,m,b,w,v,O,P,C)=>{if(h.type==="svg"?O="svg":h.type==="math"&&(O="mathml"),d==null)X(h,m,b,w,v,O,P,C);else{const A=d.el&&d.el._isVueCE?d.el:null;try{A&&A._beginPatch(),V(d,h,w,v,O,P,C)}finally{A&&A._endPatch()}}},X=(d,h,m,b,w,v,O,P)=>{let C,A;const{props:q,shapeFlag:N,transition:k,dirs:z}=d;if(C=d.el=i(d.type,v,q&&q.is,q),N&8?u(C,d.children):N&16&&B(d.children,C,null,b,w,Fs(d,v),O,P),z&&Dt(d,null,b,"created"),L(C,d,d.scopeId,O,b),q){for(const re in q)re!=="value"&&!yn(re)&&o(C,re,null,q[re],v,b);"value"in q&&o(C,"value",null,q.value,v),(A=q.onVnodeBeforeMount)&&Ze(A,b,d)}z&&Dt(d,null,b,"beforeMount");const J=ga(w,k);J&&k.beforeEnter(C),s(C,h,m),((A=q&&q.onVnodeMounted)||J||z)&&Oe(()=>{A&&Ze(A,b,d),J&&k.enter(C),z&&Dt(d,null,b,"mounted")},w)},L=(d,h,m,b,w)=>{if(m&&p(d,m),b)for(let v=0;v{for(let A=C;A{const P=h.el=d.el;let{patchFlag:C,dynamicChildren:A,dirs:q}=h;C|=d.patchFlag&16;const N=d.props||oe,k=h.props||oe;let z;if(m&&jt(m,!1),(z=k.onVnodeBeforeUpdate)&&Ze(z,m,h,d),q&&Dt(h,d,m,"beforeUpdate"),m&&jt(m,!0),A&&(!d.dynamicChildren||d.dynamicChildren.length!==A.length)&&(C=0,O=!1,A=null),(N.innerHTML&&k.innerHTML==null||N.textContent&&k.textContent==null)&&u(P,""),A?Z(d.dynamicChildren,A,P,m,b,Fs(h,w),v):O||G(d,h,P,null,m,b,Fs(h,w),v,!1),C>0){if(C&16)fe(P,N,k,m,w);else if(C&2&&N.class!==k.class&&o(P,"class",null,k.class,w),C&4&&o(P,"style",N.style,k.style,w),C&8){const J=h.dynamicProps;for(let re=0;re{z&&Ze(z,m,h,d),q&&Dt(h,d,m,"updated")},b)},Z=(d,h,m,b,w,v,O)=>{for(let P=0;P{if(h!==m){if(h!==oe)for(const v in h)!yn(v)&&!(v in m)&&o(d,v,h[v],null,w,b);for(const v in m){if(yn(v))continue;const O=m[v],P=h[v];O!==P&&v!=="value"&&o(d,v,P,O,w,b)}"value"in m&&o(d,"value",h.value,m.value,w)}},U=(d,h,m,b,w,v,O,P,C)=>{const A=h.el=d?d.el:l(""),q=h.anchor=d?d.anchor:l("");let{patchFlag:N,dynamicChildren:k,slotScopeIds:z}=h;z&&(P=P?P.concat(z):z),d==null?(s(A,m,b),s(q,m,b),B(h.children||[],m,q,w,v,O,P,C)):N>0&&N&64&&k&&d.dynamicChildren&&d.dynamicChildren.length===k.length?(Z(d.dynamicChildren,k,m,w,v,O,P),(h.key!=null||w&&h===w.subTree)&&Mr(d,h,!0)):G(d,h,m,q,w,v,O,P,C)},de=(d,h,m,b,w,v,O,P,C)=>{h.slotScopeIds=P,d==null?h.shapeFlag&512?w.ctx.activate(h,m,b,O,C):ge(h,m,b,w,v,O,C):ze(d,h,C)},ge=(d,h,m,b,w,v,O)=>{const P=d.component=Sa(d,b,w);if(Ss(d)&&(P.ctx.renderer=F),Aa(P,!1,O),P.asyncDep){if(w&&w.registerDep(P,ie,O),!d.el){const C=P.subTree=ae(ct);R(null,C,h,m),d.placeholder=C.el}}else ie(P,d,h,m,w,v,O)},ze=(d,h,m)=>{const b=h.component=d.component;if(oa(d,h,m))if(b.asyncDep&&!b.asyncResolved){h.el=d.el,$(b,h,m);return}else b.next=h,b.update();else h.el=d.el,b.vnode=h},ie=(d,h,m,b,w,v,O)=>{const P=()=>{if(d.isMounted){let{next:N,bu:k,u:z,parent:J,vnode:re}=d;{const Ye=Ji(d);if(Ye){N&&(N.el=re.el,$(d,N,O)),Ye.asyncDep.then(()=>{Oe(()=>{d.isUnmounted||A()},w)});return}}let se=N,me;jt(d,!1),N?(N.el=re.el,$(d,N,O)):N=re,k&&Yn(k),(me=N.props&&N.props.onVnodeBeforeUpdate)&&Ze(me,J,N,re),jt(d,!0);const we=oo(d),Qe=d.subTree;d.subTree=we,_(Qe,we,f(Qe.el),E(Qe),d,w,v),N.el=we.el,se===null&&ia(d,we.el),z&&Oe(z,w),(me=N.props&&N.props.onVnodeUpdated)&&Oe(()=>Ze(me,J,N,re),w)}else{let N;const{el:k,props:z}=h,{bm:J,m:re,parent:se,root:me,type:we}=d,Qe=en(h);jt(d,!1),J&&Yn(J),!Qe&&(N=z&&z.onVnodeBeforeMount)&&Ze(N,se,h),jt(d,!0);{me.ce&&me.ce._hasShadowRoot()&&me.ce._injectChildStyle(we,d.parent?d.parent.type:void 0);const Ye=d.subTree=oo(d);_(null,Ye,m,b,d,w,v),h.el=Ye.el}if(re&&Oe(re,w),!Qe&&(N=z&&z.onVnodeMounted)){const Ye=h;Oe(()=>Ze(N,se,Ye),w)}(h.shapeFlag&256||se&&en(se.vnode)&&se.vnode.shapeFlag&256)&&d.a&&Oe(d.a,w),d.isMounted=!0,h=m=b=null}};d.scope.on();const C=d.effect=new ii(P);d.scope.off();const A=d.update=C.run.bind(C),q=d.job=C.runIfDirty.bind(C);q.i=d,q.id=d.uid,C.scheduler=()=>xr(q),jt(d,!0),A()},$=(d,h,m)=>{h.component=d;const b=d.vnode.props;d.vnode=h,d.next=null,ca(d,h.props,b,m),da(d,h.children,m),vt(),Gr(d),bt()},G=(d,h,m,b,w,v,O,P,C=!1)=>{const A=d&&d.children,q=d?d.shapeFlag:0,N=h.children,{patchFlag:k,shapeFlag:z}=h;if(k>0){if(k&128){wt(A,N,m,b,w,v,O,P,C);return}else if(k&256){je(A,N,m,b,w,v,O,P,C);return}}z&8?(q&16&&Be(A,w,v),N!==A&&u(m,N)):q&16?z&16?wt(A,N,m,b,w,v,O,P,C):Be(A,w,v,!0):(q&8&&u(m,""),z&16&&B(N,m,b,w,v,O,P,C))},je=(d,h,m,b,w,v,O,P,C)=>{d=d||Ft,h=h||Ft;const A=d.length,q=h.length,N=Math.min(A,q);let k;for(k=0;kq?Be(d,w,v,!0,!1,N):B(h,m,b,w,v,O,P,C,N)},wt=(d,h,m,b,w,v,O,P,C)=>{let A=0;const q=h.length;let N=d.length-1,k=q-1;for(;A<=N&&A<=k;){const z=d[A],J=h[A]=C?dt(h[A]):nt(h[A]);if(un(z,J))_(z,J,m,null,w,v,O,P,C);else break;A++}for(;A<=N&&A<=k;){const z=d[N],J=h[k]=C?dt(h[k]):nt(h[k]);if(un(z,J))_(z,J,m,null,w,v,O,P,C);else break;N--,k--}if(A>N){if(A<=k){const z=k+1,J=zk)for(;A<=N;)xe(d[A],w,v,!0),A++;else{const z=A,J=A,re=new Map;for(A=J;A<=k;A++){const Le=h[A]=C?dt(h[A]):nt(h[A]);Le.key!=null&&re.set(Le.key,A)}let se,me=0;const we=k-J+1;let Qe=!1,Ye=0;const cn=new Array(we);for(A=0;A=we){xe(Le,w,v,!0);continue}let Xe;if(Le.key!=null)Xe=re.get(Le.key);else for(se=J;se<=k;se++)if(cn[se-J]===0&&un(Le,h[se])){Xe=se;break}Xe===void 0?xe(Le,w,v,!0):(cn[Xe-J]=A+1,Xe>=Ye?Ye=Xe:Qe=!0,_(Le,h[Xe],m,null,w,v,O,P,C),me++)}const Fr=Qe?ma(cn):Ft;for(se=Fr.length-1,A=we-1;A>=0;A--){const Le=J+A,Xe=h[Le],kr=h[Le+1],Hr=Le+1{const{el:v,type:O,transition:P,children:C,shapeFlag:A}=d;if(A&6){Je(d.component.subTree,h,m,b);return}if(A&128){d.suspense.move(h,m,b);return}if(A&64){O.move(d,h,m,F);return}if(O===De){s(v,h,m);for(let N=0;NP.enter(v),w));else{const{leave:N,delayLeave:k,afterLeave:z}=P,J=()=>{d.ctx.isUnmounted?r(v):s(v,h,m)},re=()=>{const se=v._isLeaving||!!v[Ls];v._isLeaving&&v[Ls](!0),P.persisted&&!se?J():N(v,()=>{J(),z&&z()})};k?k(v,J,re):re()}else s(v,h,m)},xe=(d,h,m,b=!1,w=!1)=>{const{type:v,props:O,ref:P,children:C,dynamicChildren:A,shapeFlag:q,patchFlag:N,dirs:k,cacheIndex:z,memo:J}=d;if((N===-2||A&&A.hasOnce)&&(w=!1),P!=null&&(vt(),wn(P,null,m,d,!0),bt()),z!=null&&(!d.ctx||d.ctx===h)&&(h.renderCache[z]=void 0),q&256){h.ctx.deactivate(d);return}const re=q&1&&k,se=!en(d);let me;if(se&&(me=O&&O.onVnodeBeforeUnmount)&&Ze(me,h,d),q&6)Nt(d.component,m,b);else{if(q&128){d.suspense.unmount(m,b);return}re&&Dt(d,null,h,"beforeUnmount"),q&64?d.type.remove(d,h,m,F,b):A&&!A.hasOnce&&(v!==De||N>0&&N&64)?Be(A,h,m,!1,!0):(v===De&&N&384||!w&&q&16)&&Be(C,h,m),b&&zt(d)}const we=J!=null&&z==null;(se&&(me=O&&O.onVnodeUnmounted)||re||we)&&Oe(()=>{me&&Ze(me,h,d),re&&Dt(d,null,h,"unmounted"),we&&(d.el=null)},m)},zt=d=>{const{type:h,el:m,anchor:b,transition:w}=d;if(h===De){$t(m,b);return}if(h===ks){T(d),w&&!w.persisted&&w.afterLeave&&w.afterLeave();return}const v=()=>{r(m),w&&!w.persisted&&w.afterLeave&&w.afterLeave()};if(d.shapeFlag&1&&w&&!w.persisted){const{leave:O,delayLeave:P}=w,C=()=>O(m,v);P?P(d.el,v,C):C()}else v()},$t=(d,h)=>{let m;for(;d!==h;)m=g(d),r(d),d=m;r(h)},Nt=(d,h,m)=>{const{bum:b,scope:w,job:v,subTree:O,um:P,m:C,a:A}=d;co(C),co(A),b&&Yn(b),w.stop(),v?(v.flags|=8,xe(O,d,h,m)):d.vnode.el&&O&&(O.transition=d.vnode.transition,xe(O,d,h,m)),P&&Oe(P,h),Oe(()=>{d.isUnmounted=!0},h)},Be=(d,h,m,b=!1,w=!1,v=0)=>{for(let O=v;O{if(d.shapeFlag&6)return E(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const h=g(d.anchor||d.el),m=h&&h[Ii];return m?g(m):h};let D=!1;const M=(d,h,m)=>{let b;d==null?h._vnode&&(xe(h._vnode,null,null,!0),b=h._vnode.component):_(h._vnode||null,d,h,null,null,null,m),h._vnode=d,D||(D=!0,Gr(b),xi(),D=!1)},F={p:_,um:xe,m:Je,r:zt,mt:ge,mc:B,pc:G,pbc:Z,n:E,o:e};return{render:M,hydrate:void 0,createApp:Zc(M)}}function Fs({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function jt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ga(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Mr(e,t,n=!1){const s=e.children,r=t.children;if(H(s)&&H(r))for(let o=0;o>1,e[n[l]]0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function Ji(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ji(t)}function co(e){if(e)for(let t=0;te.__isSuspense;function _a(e,t){t&&t.pendingBranch?H(e)?t.effects.push(...e):t.effects.push(e):vc(e)}const De=Symbol.for("v-fgt"),xs=Symbol.for("v-txt"),ct=Symbol.for("v-cmt"),ks=Symbol.for("v-stc"),gt=[];let Fe=null;function mt(e=!1){gt.push(Fe=e?null:[])}function Nr(){gt.pop(),Fe=gt[gt.length-1]||null}let Mn=1;function cs(e,t=!1){Mn+=e,e<0&&Fe&&t&&(Fe.hasOnce=!0)}function Xi(e){return e.dynamicChildren=Mn>0?Fe||Ft:null,Nr(),Mn>0&&Fe&&Fe.push(e),e}function Zn(e,t,n,s,r,o){return Xi(Ve(e,t,n,s,r,o,!0))}function Nn(e,t,n,s,r){return Xi(ae(e,t,n,s,r,!0))}function Dn(e){return e?e.__v_isVNode===!0:!1}function un(e,t){return e.type===t.type&&e.key===t.key}const Zi=({key:e})=>e??null,es=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ue(e)||pe(e)||K(e)?{i:Ae,r:e,k:t,f:!!n}:e:null);function Ve(e,t=null,n=null,s=0,r=null,o=e===De?0:1,i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Zi(t),ref:t&&es(t),scopeId:Pi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Ae};return l?(as(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=ue(n)?8:16),Mn>0&&!i&&Fe&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&Fe.push(c),c}const ae=ya;function ya(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===qc)&&(e=ct),Dn(e)){const l=tn(e,t,!0);return n&&as(l,n),Mn>0&&!o&&Fe&&(l.shapeFlag&6?Fe[Fe.indexOf(e)]=l:Fe.push(l)),l.patchFlag=-2,l}if(Oa(e)&&(e=e.__vccOpts),t){t=va(t);let{class:l,style:c}=t;l&&!ue(l)&&(t.class=Pn(l)),ne(c)&&(bs(c)&&!H(c)&&(c=Ee({},c)),t.style=_r(c))}const i=ue(e)?1:Yi(e)?128:ws(e)?64:ne(e)?4:K(e)?2:0;return Ve(e,t,n,s,r,i,o,!0)}function va(e){return e?bs(e)||qi(e)?Ee({},e):e:null}function tn(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:c}=e,a=t?ba(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&Zi(a),ref:t&&t.ref?n&&o?H(o)?o.concat(es(t)):[o,es(t)]:es(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==De?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&tn(e.ssContent),ssFallback:e.ssFallback&&tn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&s&&Cr(u,c.clone(u)),u}function lr(e=" ",t=0){return ae(xs,null,e,t)}function Kf(e="",t=!1){return t?(mt(),Nn(ct,null,e)):ae(ct,null,e)}function nt(e){return e==null||typeof e=="boolean"?ae(ct):H(e)?ae(De,null,e.slice()):Dn(e)?dt(e):ae(xs,null,String(e))}function dt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:tn(e)}function as(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(H(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),as(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!qi(t)?t._ctx=Ae:r===3&&Ae&&(Ae.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(K(t)){if(s&65){as(e,{default:t});return}t={default:t,_ctx:Ae},n=32}else t=String(t),s&64?(n=16,t=[lr(t)]):n=8;e.children=t,e.shapeFlag|=n}function ba(...e){const t={};for(let n=0;nSe||Ae;let us,jn;{const e=ys(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};us=t("__VUE_INSTANCE_SETTERS__",n=>Se=n),jn=t("__VUE_SSR_SETTERS__",n=>nn=n)}const Un=e=>{const t=Se;return us(e),e.scope.on(),()=>{e.scope.off(),us(t)}},ao=()=>{Se&&Se.scope.off(),us(null)};function tl(e){return e.vnode.shapeFlag&4}let nn=!1;function Aa(e,t=!1,n=!1){t&&jn(t);const{props:s,children:r}=e.vnode,o=tl(e);la(e,s,o,t),fa(e,r,n||t);const i=o?Ra(e,t):void 0;return t&&jn(!1),i}function Ra(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Kc);const{setup:s}=n;if(s){vt();const r=e.setupContext=s.length>1?Ca(e):null,o=Un(e),i=Hn(s,e,0,[e.props,r]),l=Qo(i);if(bt(),o(),(l||e.sp)&&!en(e)&&Pr(e),l){if(i.then(ao,ao),t)return i.then(c=>{jn(!0);try{uo(e,c,t)}finally{jn(!1)}}).catch(c=>{Bn(c,e,0)});e.asyncDep=i}else uo(e,i)}else nl(e)}function uo(e,t,n){K(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ne(t)&&(e.setupState=Si(t)),nl(e)}function nl(e,t,n){const s=e.type;e.render||(e.render=s.render||ot);{const r=Un(e);vt();try{Gc(e)}finally{bt(),r()}}}const xa={get(e,t){return Re(e,"get",""),e[t]}};function Ca(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,xa),slots:e.slots,emit:e.emit,expose:t}}function Cs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Si(Rr(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Sn)return Sn[n](e)},has(t,n){return n in t||n in Sn}})):e.proxy}function Pa(e,t=!0){return K(e)?e.displayName||e.name:e.name||t&&e.__name}function Oa(e){return K(e)&&"__vccOpts"in e}const Q=(e,t)=>pc(e,t,nn);function sl(e,t,n){try{cs(-1);const s=arguments.length;return s===2?ne(t)&&!H(t)?Dn(t)?ae(e,null,[t]):ae(e,t):ae(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Dn(n)&&(n=[n]),ae(e,t,n))}finally{cs(1)}}const Ta="3.5.43";let cr;const fo=typeof window<"u"&&window.trustedTypes;if(fo)try{cr=fo.createPolicy("vue",{createHTML:e=>e})}catch{}const rl=cr?e=>cr.createHTML(e):e=>e,Ia="http://www.w3.org/2000/svg",Ma="http://www.w3.org/1998/Math/MathML",ft=typeof document<"u"?document:null,ho=ft&&ft.createElement("template"),Na={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?ft.createElementNS(Ia,e):t==="mathml"?ft.createElementNS(Ma,e):n?ft.createElement(e,{is:n}):ft.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>ft.createTextNode(e),createComment:e=>ft.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ft.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{ho.innerHTML=rl(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=ho.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Da=Symbol("_vtc");function ja(e,t,n){const s=e[Da];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const fs=Symbol("_vod"),ol=Symbol("_vsh"),La={name:"show",beforeMount(e,{value:t},{transition:n}){e[fs]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):fn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),fn(e,!0),s.enter(e)):s.leave(e,()=>{fn(e,!1)}):fn(e,t))},beforeUnmount(e,{value:t}){fn(e,t)}};function fn(e,t){e.style.display=t?e[fs]:"none",e[ol]=!t}const Va=Symbol(""),Fa=/(?:^|;)\s*display\s*:/;function ka(e,t,n){const s=e.style,r=ue(n);let o=!1;if(n&&!r){if(t)if(ue(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&_n(s,l,"")}else for(const i in t)n[i]==null&&_n(s,i,"");for(const i in n){i==="display"&&(o=!0);const l=n[i];l!=null?Ba(e,i,!ue(t)&&t?t[i]:void 0,l)||_n(s,i,l):_n(s,i,"")}}else if(r){if(t!==n){const i=s[Va];i&&(n+=";"+i),s.cssText=n,o=Fa.test(n)}}else t&&e.removeAttribute("style");fs in e&&(e[fs]=o?s.display:"",e[ol]&&(s.display="none"))}const Jn=/\s*!important$/;function _n(e,t,n){if(H(n))n.forEach(s=>_n(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))Jn.test(n)?e.setProperty(t,n.replace(Jn,""),"important"):e.setProperty(t,n);else{const s=Ha(e,t);Jn.test(n)?e.setProperty(qt(s),n.replace(Jn,""),"important"):e[s]=n}}const po=["Webkit","Moz","ms"],Hs={};function Ha(e,t){const n=Hs[t];if(n)return n;let s=Me(t);if(s!=="filter"&&s in e)return Hs[t]=s;s=ms(s);for(let r=0;rBs||(Ga.then(()=>Bs=0),Bs=Date.now());function Ja(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(H(r)){const o=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{o.call(s),s._stopped=!0};const i=r.slice(),l=[s];for(let c=0;ce.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Qa=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?ja(e,s,i):t==="style"?ka(e,n,s):ds(t)?hs(t)||qa(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ya(e,t,s,i))?(_o(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&mo(e,t,s,i,o,t!=="value")):e._isVueCE&&(Xa(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ue(s)))?_o(e,Me(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),mo(e,t,s,i))};function Ya(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&vo(t)&&K(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return vo(t)&&ue(n)?!1:t in e}function Xa(e,t){const n=e._def.props;if(!n)return!1;const s=Me(t);return Array.isArray(n)?n.some(r=>Me(r)===s):Object.keys(n).some(r=>Me(r)===s)}const sn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return H(t)?n=>Yn(t,n):t};function Za(e){e.target.composing=!0}function bo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const rt=Symbol("_assign"),Qn=Symbol("_initialValue");function Us(e,t,n){return t&&(e=e.trim()),n&&(e=_s(e)),e}const Gf={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e.parentNode&&(e.type==="text"?e[Qn]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Qn]=e.defaultValue.replace(/\r\n?/g,` -`))),e[rt]=sn(r);const o=s||r.props&&r.props.type==="number";Tt(e,t?"change":"input",i=>{i.target.composing||e[rt](Us(e.value,n,o))}),(n||o)&&Tt(e,"change",()=>{e.value=Us(e.value,n,o)}),t||(Tt(e,"compositionstart",Za),Tt(e,"compositionend",bo),Tt(e,"change",bo))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const r=t??"",o=e[Qn];delete e[Qn],o!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==o?e[rt](Us(e.value,n,s)):e.value=r},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},i){if(e[rt]=sn(i),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?_s(e.value):e.value,c=t??"";if(l===c)return;const a=e.getRootNode();(a instanceof Document||a instanceof ShadowRoot)&&a.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c)}},Wf={deep:!0,created(e,t,n){e[rt]=sn(n),Tt(e,"change",()=>{const s=e._modelValue,r=Ln(e),o=e.checked,i=e[rt];if(H(s)){const l=yr(s,r),c=l!==-1;if(o&&!c)i(s.concat(r));else if(!o&&c){const a=[...s];a.splice(l,1),i(a)}}else if(_t(s)){const l=new Set(s);o?l.add(r):l.delete(r),i(l)}else i(il(e,o))})},mounted:Eo,beforeUpdate(e,t,n){e[rt]=sn(n),Eo(e,t,n)}};function Eo(e,{value:t,oldValue:n},s){e._modelValue=t;let r;if(H(t))r=yr(t,s.props.value)>-1;else if(_t(t))r=t.has(s.props.value);else{if(t===n)return;r=yt(t,il(e,!0))}e.checked!==r&&(e.checked=r)}const Jf={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,Tt(e,"change",()=>{const r=Array.prototype.filter.call(e.options,c=>c.selected).map(c=>n?_s(Ln(c)):Ln(c)),o=e.multiple,i=o?_t(e._modelValue)?new Set(r):r:r[0],l=e._pendingValue=[o,o?H(i)?r.slice():r:i];try{e[rt](i)}finally{Es(()=>{e._pendingValue===l&&(e._pendingValue=void 0)})}}),e[rt]=sn(s)},mounted(e,{value:t}){wo(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[rt]=sn(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!eu(t,n[1],n[0]))&&wo(e,t)}};function eu(e,t,n){if(!n||H(e))return yt(e,t);if(_t(e)){if(e.size!==t.length)return!1;for(const s of t)if(!e.has(s))return!1;return!0}return!1}function wo(e,t){const n=e.multiple,s=H(t);if(!(n&&!s&&!_t(t))){for(let r=0,o=e.options.length;rString(a)===String(l)):i.selected=yr(t,l)>-1}else i.selected=t.has(l);else if(yt(Ln(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ln(e){return"_value"in e?e._value:e.value}function il(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const tu=["ctrl","shift","alt","meta"],nu={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>tu.some(n=>e[`${n}Key`]&&!t.includes(n))},Qf=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((r,...o)=>{for(let i=0;i{const t=ru().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=lu(s);if(!r)return;const o=t._component;!K(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=n(r,!1,iu(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t});function iu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function lu(e){return ue(e)?document.querySelector(e):e}let ll;const Ps=e=>ll=e,cl=Symbol();function ar(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var An;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(An||(An={}));function cu(){const e=ri(!0),t=e.run(()=>be({}));let n=[],s=[];const r=Rr({install(o){Ps(r),r._a=o,o.provide(cl,r),o.config.globalProperties.$pinia=r,s.forEach(i=>n.push(i)),s=[]},use(o){return this._a?n.push(o):s.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const al=()=>{};function Ao(e,t,n,s=al){e.add(t);const r=()=>{e.delete(t)&&s()};return!n&&oi()&&ql(r),r}function Wt(e,...t){e.forEach(n=>{n(...t)})}const au=e=>e(),Ro=Symbol(),qs=Symbol();function ur(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];ar(r)&&ar(s)&&e.hasOwnProperty(n)&&!pe(s)&&!it(s)?e[n]=ur(r,s):e[n]=s}return e}const uu=Symbol();function fu(e){return!ar(e)||!Object.prototype.hasOwnProperty.call(e,uu)}const{assign:xt}=Object;function du(e){return!!(pe(e)&&e.effect)}function hu(e,t,n,s){const{state:r,actions:o,getters:i}=t,l=n.state.value[e];let c;function a(){l||(n.state.value[e]=r?r():{});const u=uc(n.state.value[e]);return xt(u,o,Object.keys(i||{}).reduce((f,g)=>(f[g]=Rr(Q(()=>{Ps(n);const p=n._s.get(e);return i[g].call(p,p)})),f),{}))}return c=ul(e,a,t,n,s,!0),c}function ul(e,t,n={},s,r,o){let i;const l=xt({actions:{}},n),c={deep:!0};let a,u,f=new Set,g=new Set,p;const y=s.state.value[e];!o&&!y&&(s.state.value[e]={});let _;function x(B){let V;a=u=!1,typeof B=="function"?(B(s.state.value[e]),V={type:An.patchFunction,storeId:e,events:p}):(ur(s.state.value[e],B),V={type:An.patchObject,payload:B,storeId:e,events:p});const Z=_=Symbol();Es().then(()=>{_===Z&&(a=!0)}),u=!0,Wt(f,V,s.state.value[e])}const R=o?function(){const{state:V}=n,Z=V?V():{};this.$patch(fe=>{xt(fe,Z)})}:al;function S(){i.stop(),f.clear(),g.clear(),s._s.delete(e)}const I=(B,V="")=>{if(Ro in B)return B[qs]=V,B;const Z=function(){Ps(s);const fe=Array.from(arguments),U=new Set,de=new Set;function ge($){U.add($)}function ze($){de.add($)}Wt(g,{args:fe,name:Z[qs],store:j,after:ge,onError:ze});let ie;try{ie=B.apply(this&&this.$id===e?this:j,fe)}catch($){throw Wt(de,$),$}return ie instanceof Promise?ie.then($=>(Wt(U,$),$)).catch($=>(Wt(de,$),Promise.reject($))):(Wt(U,ie),ie)};return Z[Ro]=!0,Z[qs]=V,Z},T={_p:s,$id:e,$onAction:Ao.bind(null,g),$patch:x,$reset:R,$subscribe(B,V={}){const Z=Ao(f,B,V.detached,()=>fe()),fe=i.run(()=>Zt(()=>s.state.value[e],U=>{(V.flush==="sync"?u:a)&&B({storeId:e,type:An.direct,events:p},U)},xt({},c,V)));return Z},$dispose:S},j=kn(T);s._s.set(e,j);const L=(s._a&&s._a.runWithContext||au)(()=>s._e.run(()=>(i=ri()).run(()=>t({action:I}))));for(const B in L){const V=L[B];if(pe(V)&&!du(V)||it(V))o||(y&&fu(V)&&(pe(V)?V.value=y[B]:ur(V,y[B])),s.state.value[e][B]=V);else if(typeof V=="function"){const Z=I(V,B);L[B]=Z,l.actions[B]=V}}return xt(j,L),xt(Y(j),L),Object.defineProperty(j,"$state",{get:()=>s.state.value[e],set:B=>{x(V=>{xt(V,B)})}}),s._p.forEach(B=>{xt(j,i.run(()=>B({store:j,app:s._a,pinia:s,options:l})))}),y&&o&&n.hydrate&&n.hydrate(j.$state,y),a=!0,u=!0,j}function qn(e,t,n){let s;const r=typeof t=="function";s=r?n:t;function o(i,l){const c=Ec();return i=i||(c?Ue(cl,null):null),i&&Ps(i),i=ll,i._s.has(e)||(r?ul(e,t,s,i):hu(e,s,i)),i._s.get(e)}return o.$id=e,o}const Yt=typeof document<"u";function fl(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function pu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&fl(e.default)}const ee=Object.assign;function zs(e,t){const n={};for(const s in t){const r=t[s];n[s]=We(r)?r.map(e):e(r)}return n}const Rn=()=>{},We=Array.isArray;function xo(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const dl=/#/g,gu=/&/g,mu=/\//g,_u=/=/g,yu=/\?/g,hl=/\+/g,vu=/%5B/g,bu=/%5D/g,pl=/%5E/g,Eu=/%60/g,gl=/%7B/g,wu=/%7C/g,ml=/%7D/g,Su=/%20/g;function Dr(e){return e==null?"":encodeURI(""+e).replace(wu,"|").replace(vu,"[").replace(bu,"]")}function Au(e){return Dr(e).replace(gl,"{").replace(ml,"}").replace(pl,"^")}function fr(e){return Dr(e).replace(hl,"%2B").replace(Su,"+").replace(dl,"%23").replace(gu,"%26").replace(Eu,"`").replace(gl,"{").replace(ml,"}").replace(pl,"^")}function Ru(e){return fr(e).replace(_u,"%3D")}function xu(e){return Dr(e).replace(dl,"%23").replace(yu,"%3F")}function Cu(e){return xu(e).replace(mu,"%2F")}function Vn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Pu=/\/$/,Ou=e=>e.replace(Pu,"");function $s(e,t,n="/"){let s,r={},o="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return c=l>=0&&c>l?-1:c,c>=0&&(s=t.slice(0,c),o=t.slice(c,l>0?l:t.length),r=e(o.slice(1))),l>=0&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=Nu(s??t,n),{fullPath:s+o+i,path:s,query:r,hash:Vn(i)}}function Tu(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Co(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Iu(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&rn(t.matched[s],n.matched[r])&&_l(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function rn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function _l(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Mu(e[n],t[n]))return!1;return!0}function Mu(e,t){return We(e)?Po(e,t):We(t)?Po(t,e):e?.valueOf()===t?.valueOf()}function Po(e,t){return We(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Nu(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,i,l;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(i).join("/")}const St={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let dr=(function(e){return e.pop="pop",e.push="push",e})({}),Ks=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Du(e){if(!e)if(Yt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Ou(e)}const ju=/^[^#]+#/;function Lu(e,t){return e.replace(ju,"#")+t}function Vu(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Os=()=>({left:window.scrollX,top:window.scrollY});function Fu(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Vu(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Oo(e,t){return(history.state?history.state.position-t:-1)+e}const hr=new Map;function ku(e,t){hr.set(e,t)}function Hu(e){const t=hr.get(e);return hr.delete(e),t}function Bu(e){return typeof e=="string"||e&&typeof e=="object"}function yl(e){return typeof e=="string"||typeof e=="symbol"}let he=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const vl=Symbol("");he.MATCHER_NOT_FOUND+"",he.NAVIGATION_GUARD_REDIRECT+"",he.NAVIGATION_ABORTED+"",he.NAVIGATION_CANCELLED+"",he.NAVIGATION_DUPLICATED+"";function on(e,t){return ee(new Error,{type:e,[vl]:!0},t)}function ut(e,t){return e instanceof Error&&vl in e&&(t==null||!!(e.type&t))}const Uu=["params","query","hash"];function qu(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Uu)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function zu(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;sr&&fr(r)):[s&&fr(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function $u(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=We(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const Ku=Symbol(""),Io=Symbol(""),Ts=Symbol(""),jr=Symbol(""),pr=Symbol("");function dn(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Ot(e,t,n,s,r,o=i=>i()){const i=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((l,c)=>{const a=g=>{g===!1?c(on(he.NAVIGATION_ABORTED,{from:n,to:t})):g instanceof Error?c(g):Bu(g)?c(on(he.NAVIGATION_GUARD_REDIRECT,{from:t,to:g})):(i&&s.enterCallbacks[r]===i&&typeof g=="function"&&i.push(g),l())},u=o(()=>e.call(s&&s.instances[r],t,n,a));let f=Promise.resolve(u);e.length<3&&(f=f.then(a)),f.catch(g=>c(g))})}function Gs(e,t,n,s,r=o=>o()){const o=[];for(const i of e)for(const l in i.components){let c=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(fl(c)){const a=(c.__vccOpts||c)[t];a&&o.push(Ot(a,n,s,i,l,r))}else{let a=c();o.push(()=>a.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${l}" at "${i.path}"`);const f=pu(u)?u.default:u;i.mods[l]=u,i.components[l]=f;const g=(f.__vccOpts||f)[t];return g&&Ot(g,n,s,i,l,r)()}))}}return o}function Gu(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;irn(a,l))?s.push(l):n.push(l));const c=e.matched[i];c&&(t.matched.find(a=>rn(a,c))||r.push(c))}return[n,s,r]}let Wu=()=>location.protocol+"//"+location.host;function bl(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let i=r.includes(e.slice(o))?e.slice(o).length:1,l=r.slice(i);return l[0]!=="/"&&(l="/"+l),Co(l,"")}return Co(n,e)+s+r}function Ju(e,t,n,s){let r=[],o=[],i=null;const l=({state:g})=>{const p=bl(e,location),y=n.value,_=t.value;let x=0;if(g){if(n.value=p,t.value=g,i&&i===y){i=null;return}x=_?g.position-_.position:0}else s(p);r.forEach(R=>{R(n.value,y,{delta:x,type:dr.pop,direction:x?x>0?Ks.forward:Ks.back:Ks.unknown})})};function c(){i=n.value}function a(g){r.push(g);const p=()=>{const y=r.indexOf(g);y>-1&&r.splice(y,1)};return o.push(p),p}function u(){if(document.visibilityState==="hidden"){const{history:g}=window;if(!g.state)return;g.replaceState(ee({},g.state,{scroll:Os()}),"")}}function f(){for(const g of o)g();o=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:c,listen:a,destroy:f}}function Mo(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?Os():null}}function Qu(e){const{history:t,location:n}=window,s={value:bl(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(c,a,u){const f=e.indexOf("#"),g=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+c:Wu()+e+c;try{t[u?"replaceState":"pushState"](a,"",g),r.value=a}catch(p){console.error(p),n[u?"replace":"assign"](g)}}function i(c,a){o(c,ee({},t.state,Mo(r.value.back,c,r.value.forward,!0),a,{position:r.value.position}),!0),s.value=c}function l(c,a){const u=ee({},r.value,t.state,{forward:c,scroll:Os()});o(u.current,u,!0),o(c,ee({},Mo(s.value,c,null),{position:u.position+1},a),!1),s.value=c}return{location:s,state:r,push:l,replace:i}}function Yu(e){e=Du(e);const t=Qu(e),n=Ju(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=ee({location:"",base:e,go:s,createHref:Lu.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let kt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var ye=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(ye||{});const Xu={type:kt.Static,value:""},Zu=/[a-zA-Z0-9_]/;function ef(e){if(!e)return[[]];if(e==="/")return[[Xu]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${a}": ${p}`)}let n=ye.Static,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let l=0,c,a="",u="";function f(){a&&(n===ye.Static?o.push({type:kt.Static,value:a}):n===ye.Param||n===ye.ParamRegExp||n===ye.ParamRegExpEnd?(o.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),o.push({type:kt.Param,value:a,regexp:u,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),a="")}function g(){a+=c}for(;lt.length?t.length===1&&t[0]===Te.Static+Te.Segment?1:-1:0}function El(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const of={strict:!1,end:!0,sensitive:!1};function lf(e,t,n){const s=sf(ef(e.path),n),r=ee(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function cf(e,t){const n=[],s=new Map;t=xo(of,t);function r(f){return s.get(f)}function o(f,g,p){const y=!p,_=Lo(f);_.aliasOf=p&&p.record;const x=xo(t,f),R=[_];if("alias"in f){const T=typeof f.alias=="string"?[f.alias]:f.alias;for(const j of T)R.push(Lo(ee({},_,{components:p?p.record.components:_.components,path:j,aliasOf:p?p.record:_})))}let S,I;for(const T of R){const{path:j}=T;if(g&&j[0]!=="/"){const X=g.record.path,L=X[X.length-1]==="/"?"":"/";T.path=g.record.path+(j&&L+j)}if(S=lf(T,g,x),p?p.alias.push(S):(I=I||S,I!==S&&I.alias.push(S),y&&f.name&&!Vo(S)&&i(f.name)),wl(S)&&c(S),_.children){const X=_.children;for(let L=0;L{i(I)}:Rn}function i(f){if(yl(f)){const g=s.get(f);g&&(s.delete(f),n.splice(n.indexOf(g),1),g.children.forEach(i),g.alias.forEach(i))}else{const g=n.indexOf(f);g>-1&&(n.splice(g,1),f.record.name&&s.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function l(){return n}function c(f){const g=ff(f,n);n.splice(g,0,f),f.record.name&&!Vo(f)&&s.set(f.record.name,f)}function a(f,g){let p,y={},_,x;if("name"in f&&f.name){if(p=s.get(f.name),!p)throw on(he.MATCHER_NOT_FOUND,{location:f});x=p.record.name,y=ee(jo(g.params,p.keys.filter(I=>!I.optional).concat(p.parent?p.parent.keys.filter(I=>I.optional):[]).map(I=>I.name)),f.params&&jo(f.params,p.keys.map(I=>I.name))),_=p.stringify(y)}else if(f.path!=null)_=f.path,p=n.find(I=>I.re.test(_)),p&&(y=p.parse(_),x=p.record.name);else{if(p=g.name?s.get(g.name):n.find(I=>I.re.test(g.path)),!p)throw on(he.MATCHER_NOT_FOUND,{location:f,currentLocation:g});x=p.record.name,y=ee({},g.params,f.params),_=p.stringify(y)}const R=[];let S=p;for(;S;)R.unshift(S.record),S=S.parent;return{name:x,path:_,params:y,matched:R,meta:uf(R)}}e.forEach(f=>o(f));function u(){n.length=0,s.clear()}return{addRoute:o,resolve:a,removeRoute:i,clearRoutes:u,getRoutes:l,getRecordMatcher:r}}function jo(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Lo(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:af(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function af(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function Vo(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function uf(e){return e.reduce((t,n)=>ee(t,n.meta),{})}function ff(e,t){let n=0,s=t.length;for(;n!==s;){const o=n+s>>1;El(e,t[o])<0?s=o:n=o+1}const r=df(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function df(e){let t=e;for(;t=t.parent;)if(wl(t)&&El(e,t)===0)return t}function wl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Fo(e){const t=Ue(Ts),n=Ue(jr),s=Q(()=>{const c=$e(e.to);return t.resolve(c)}),r=Q(()=>{const{matched:c}=s.value,{length:a}=c,u=c[a-1],f=n.matched;if(!u||!f.length)return-1;const g=f.findIndex(rn.bind(null,u));if(g>-1)return g;const p=ko(c[a-2]);return a>1&&ko(u)===p&&f[f.length-1].path!==p?f.findIndex(rn.bind(null,c[a-2])):g}),o=Q(()=>r.value>-1&&_f(n.params,s.value.params)),i=Q(()=>r.value>-1&&r.value===n.matched.length-1&&_l(n.params,s.value.params));function l(c={}){if(mf(c)){const a=t[$e(e.replace)?"replace":"push"]($e(e.to)).catch(Rn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>a),a}return Promise.resolve()}return{route:s,href:Q(()=>s.value.href),isActive:o,isExactActive:i,navigate:l}}function hf(e){return e.length===1?e[0]:e}const pf=ln({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Fo,setup(e,{slots:t}){const n=kn(Fo(e)),{options:s}=Ue(Ts),r=Q(()=>({[Ho(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Ho(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&hf(t.default(n));return e.custom?o:sl("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),gf=pf;function mf(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function _f(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!We(r)||r.length!==s.length||s.some((o,i)=>o.valueOf()!==r[i].valueOf()))return!1}return!0}function ko(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ho=(e,t,n)=>e??t??n,yf=ln({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=Ue(pr),r=Q(()=>e.route||s.value),o=Ue(Io,0),i=Q(()=>{let a=$e(o);const{matched:u}=r.value;let f;for(;(f=u[a])&&!f.components;)a++;return a}),l=Q(()=>r.value.matched[i.value]);Xn(Io,Q(()=>i.value+1)),Xn(Ku,l),Xn(pr,r);const c=be();return Zt(()=>[c.value,l.value,e.name],([a,u,f],[g,p,y])=>{u&&(u.instances[f]=a,p&&p!==u&&a&&a===g&&(u.leaveGuards.size||(u.leaveGuards=p.leaveGuards),u.updateGuards.size||(u.updateGuards=p.updateGuards))),a&&u&&(!p||!rn(u,p)||!g)&&(u.enterCallbacks[f]||[]).forEach(_=>_(a))},{flush:"post"}),()=>{const a=r.value,u=e.name,f=l.value,g=f&&f.components[u];if(!g)return Bo(n.default,{Component:g,route:a});const p=f.props[u],y=p?p===!0?a.params:typeof p=="function"?p(a):p:null,x=sl(g,ee({},y,t,{onVnodeUnmounted:R=>{R.component.isUnmounted&&(f.instances[u]=null)},ref:c}));return Bo(n.default,{Component:x,route:a})||x}}});function Bo(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const vf=yf;function bf(e){const t=cf(e.routes,e),n=e.parseQuery||zu,s=e.stringifyQuery||To,r=e.history,o=dn(),i=dn(),l=dn(),c=Ei(St);let a=St;Yt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=zs.bind(null,E=>""+E),f=zs.bind(null,Cu),g=zs.bind(null,Vn);function p(E,D){let M,F;return yl(E)?(M=t.getRecordMatcher(E),F=D):F=E,t.addRoute(F,M)}function y(E){const D=t.getRecordMatcher(E);D&&t.removeRoute(D)}function _(){return t.getRoutes().map(E=>E.record)}function x(E){return!!t.getRecordMatcher(E)}function R(E,D){if(D=ee({},D||c.value),typeof E=="string"){const m=$s(n,E,D.path),b=t.resolve({path:m.path},D),w=r.createHref(m.fullPath);return ee(m,b,{params:g(b.params),hash:Vn(m.hash),redirectedFrom:void 0,href:w})}let M;if(E.path!=null)M=ee({},E,{path:$s(n,E.path,D.path).path});else{const m=ee({},E.params);for(const b in m)m[b]==null&&delete m[b];M=ee({},E,{params:f(m)}),D.params=f(D.params)}const F=t.resolve(M,D),W=E.hash||"";F.params=u(g(F.params));const d=Tu(s,ee({},E,{hash:Au(W),path:F.path})),h=r.createHref(d);return ee({fullPath:d,hash:W,query:s===To?$u(E.query):E.query||{}},F,{redirectedFrom:void 0,href:h})}function S(E){return typeof E=="string"?$s(n,E,c.value.path):ee({},E)}function I(E,D){if(a!==E)return on(he.NAVIGATION_CANCELLED,{from:D,to:E})}function T(E){return L(E)}function j(E){return T(ee(S(E),{replace:!0}))}function X(E,D){const M=E.matched[E.matched.length-1];if(M&&M.redirect){const{redirect:F}=M;let W=typeof F=="function"?F(E,D):F;return typeof W=="string"&&(W=W.includes("?")||W.includes("#")?W=S(W):{path:W},W.params={}),ee({query:E.query,hash:E.hash,params:W.path!=null?{}:E.params},W)}}function L(E,D){const M=a=R(E),F=c.value,W=E.state,d=E.force,h=E.replace===!0,m=X(M,F);if(m)return L(ee(S(m),{state:typeof m=="object"?ee({},W,m.state):W,force:d,replace:h}),D||M);const b=M;b.redirectedFrom=D;let w;return!d&&Iu(s,F,M)&&(w=on(he.NAVIGATION_DUPLICATED,{to:b,from:F}),Je(F,F,!0,!1)),(w?Promise.resolve(w):Z(b,F)).catch(v=>ut(v)?ut(v,he.NAVIGATION_GUARD_REDIRECT)?v:wt(v):G(v,b,F)).then(v=>{if(v){if(ut(v,he.NAVIGATION_GUARD_REDIRECT))return L(ee({replace:h},S(v.to),{state:typeof v.to=="object"?ee({},W,v.to.state):W,force:d}),D||b)}else v=U(b,F,!0,h,W);return fe(b,F,v),v})}function B(E,D){const M=I(E,D);return M?Promise.reject(M):Promise.resolve()}function V(E){const D=$t.values().next().value;return D&&typeof D.runWithContext=="function"?D.runWithContext(E):E()}function Z(E,D){let M;const[F,W,d]=Gu(E,D);M=Gs(F.reverse(),"beforeRouteLeave",E,D);for(const m of F)m.leaveGuards.forEach(b=>{M.push(Ot(b,E,D))});const h=B.bind(null,E,D);return M.push(h),Be(M).then(()=>{M=[];for(const m of o.list())M.push(Ot(m,E,D));return M.push(h),Be(M)}).then(()=>{M=Gs(W,"beforeRouteUpdate",E,D);for(const m of W)m.updateGuards.forEach(b=>{M.push(Ot(b,E,D))});return M.push(h),Be(M)}).then(()=>{M=[];for(const m of d)if(m.beforeEnter)if(We(m.beforeEnter))for(const b of m.beforeEnter)M.push(Ot(b,E,D));else M.push(Ot(m.beforeEnter,E,D));return M.push(h),Be(M)}).then(()=>(E.matched.forEach(m=>m.enterCallbacks={}),M=Gs(d,"beforeRouteEnter",E,D,V),M.push(h),Be(M))).then(()=>{M=[];for(const m of i.list())M.push(Ot(m,E,D));return M.push(h),Be(M)}).catch(m=>ut(m,he.NAVIGATION_CANCELLED)?m:Promise.reject(m))}function fe(E,D,M){l.list().forEach(F=>V(()=>F(E,D,M)))}function U(E,D,M,F,W){const d=I(E,D);if(d)return d;const h=D===St,m=Yt?history.state:{};M&&(F||h?r.replace(E.fullPath,ee({scroll:h&&m&&m.scroll},W)):r.push(E.fullPath,W)),c.value=E,Je(E,D,M,h),wt()}let de;function ge(){de||(de=r.listen((E,D,M)=>{if(!Nt.listening)return;const F=R(E),W=X(F,Nt.currentRoute.value);if(W){L(ee(W,{replace:!0,force:!0}),F).catch(Rn);return}a=F;const d=c.value;Yt&&ku(Oo(d.fullPath,M.delta),Os()),Z(F,d).catch(h=>ut(h,he.NAVIGATION_ABORTED|he.NAVIGATION_CANCELLED)?h:ut(h,he.NAVIGATION_GUARD_REDIRECT)?(L(ee(S(h.to),{force:!0}),F).then(m=>{ut(m,he.NAVIGATION_ABORTED|he.NAVIGATION_DUPLICATED)&&!M.delta&&M.type===dr.pop&&r.go(-1,!1)}).catch(Rn),Promise.reject()):(M.delta&&r.go(-M.delta,!1),G(h,F,d))).then(h=>{h=h||U(F,d,!1),h&&(M.delta&&!ut(h,he.NAVIGATION_CANCELLED)?r.go(-M.delta,!1):M.type===dr.pop&&ut(h,he.NAVIGATION_ABORTED|he.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),fe(F,d,h)}).catch(Rn)}))}let ze=dn(),ie=dn(),$;function G(E,D,M){wt(E);const F=ie.list();return F.length?F.forEach(W=>W(E,D,M)):console.error(E),Promise.reject(E)}function je(){return $&&c.value!==St?Promise.resolve():new Promise((E,D)=>{ze.add([E,D])})}function wt(E){return $||($=!E,ge(),ze.list().forEach(([D,M])=>E?M(E):D()),ze.reset()),E}function Je(E,D,M,F){const{scrollBehavior:W}=e;if(!Yt||!W)return Promise.resolve();const d=!M&&Hu(Oo(E.fullPath,0))||(F||!M)&&history.state&&history.state.scroll||null;return Es().then(()=>W(E,D,d)).then(h=>h&&Fu(h)).catch(h=>G(h,E,D))}const xe=E=>r.go(E);let zt;const $t=new Set,Nt={currentRoute:c,listening:!0,addRoute:p,removeRoute:y,clearRoutes:t.clearRoutes,hasRoute:x,getRoutes:_,resolve:R,options:e,push:T,replace:j,go:xe,back:()=>xe(-1),forward:()=>xe(1),beforeEach:o.add,beforeResolve:i.add,afterEach:l.add,onError:ie.add,isReady:je,install(E){E.component("RouterLink",gf),E.component("RouterView",vf),E.config.globalProperties.$router=Nt,Object.defineProperty(E.config.globalProperties,"$route",{enumerable:!0,get:()=>$e(c)}),Yt&&!zt&&c.value===St&&(zt=!0,T(r.location).catch(F=>{}));const D={};for(const F in St)Object.defineProperty(D,F,{get:()=>c.value[F],enumerable:!0});E.provide(Ts,Nt),E.provide(jr,bi(D)),E.provide(pr,c);const M=E.unmount;$t.add(E),E.unmount=function(){$t.delete(E),$t.size<1&&(a=St,de&&de(),de=null,c.value=St,zt=!1,$=!1),M()}}};function Be(E){return E.reduce((D,M)=>D.then(()=>V(M)),Promise.resolve())}return Nt}function Yf(){return Ue(Ts)}function Sl(e){return Ue(jr)}const Ef={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},wf=["d"],Uo=ln({__name:"Icon",props:{name:{}},setup(e){const t=e,n={home:"M3 11l9-8 9 8M5 10v10h5v-6h4v6h5V10",calendar:"M4 6h16v14H4zM4 10h16M8 3v5M16 3v5",book:"M5 4h10a3 3 0 013 3v13H8a3 3 0 01-3-3zM5 17a3 3 0 013-3h10",quiz:"M12 21a9 9 0 100-18 9 9 0 000 18zM9.5 9.5a2.5 2.5 0 114 2c-.9.6-1.5 1-1.5 2M12 17h.01",more:"M5 12h.01M12 12h.01M19 12h.01",flag:"M5 21V4M5 4h11l-2 4 2 4H5",grad:"M2 9l10-5 10 5-10 5zM6 11.5V16c0 1.5 3 3 6 3s6-1.5 6-3v-4.5",file:"M7 3h7l5 5v13H7zM14 3v5h5M10 13h6M10 17h6",slides:"M3 4h18v12H3zM12 16v4M8 20h8",user:"M12 12a4 4 0 100-8 4 4 0 000 8zM4 21c0-4 4-6 8-6s8 2 8 6",out:"M10 4H5v16h5M15 8l4 4-4 4M19 12H9",chevron:"M9 6l6 6-6 6"};return(s,r)=>(mt(),Zn("svg",Ef,[Ve("path",{d:n[t.name]??""},null,8,wf)]))}});class ts extends Error{constructor(n,s,r={}){super(s);Kt(this,"status");Kt(this,"errors");this.name="ApiError",this.status=n,this.errors=r}}const Ws="bm.token";class Sf{constructor(t,n){Kt(this,"local");Kt(this,"session");Kt(this,"memory",null);this.local=t,this.session=n}read(t){try{return t?.getItem(Ws)??null}catch{return null}}get(){return this.read(this.local)??this.read(this.session)??this.memory}get remembered(){return this.read(this.local)!==null}set(t,n){this.clear();try{(n?this.local:this.session)?.setItem(Ws,t)}catch{}this.get()===null&&(this.memory=t)}replace(t){this.set(t,this.remembered)}clear(){this.memory=null;for(const t of[this.local,this.session])try{t?.removeItem(Ws)}catch{}}}function Af(e){const t=e.fetch??((...p)=>fetch(...p)),{tokens:n}=e;let s=null;function r(p,y){if(!y)return p;const _=new URLSearchParams;for(const[R,S]of Object.entries(y))S!=null&&S!==""&&_.set(R,String(S));const x=_.toString();return x?`${p}?${x}`:p}async function o(p,y){const _={Accept:"application/json"},x=n.get();y.auth!==!1&&x&&(_.Authorization=`Bearer ${x}`);let R;return y.body!==void 0&&(_["Content-Type"]="application/json",R=JSON.stringify(y.body)),t(r(p,y.query),{method:y.method??"GET",headers:_,body:R})}function i(){return s||(s=(async()=>{try{const p=await o("/_user/api/v1/refresh",{method:"POST"});if(!p.ok)return!1;const y=await p.json(),_=y.token??y.data?.token;return _?(n.replace(_),!0):!1}catch{return!1}finally{queueMicrotask(()=>{s=null})}})()),s}async function l(p){const y=await p.text();if(!y)return null;try{return JSON.parse(y)}catch{return null}}function c(p,y){const _=y??{},x=typeof _.error=="string"&&_.error||typeof _.message=="string"&&_.message||(p.status>=500?"Błąd serwera. Spróbuj ponownie za chwilę.":`Błąd ${p.status}`);return new ts(p.status,x,_.errors??{})}async function a(p,y){let _;const x=n.get();try{_=await o(p,y)}catch{throw new ts(0,"Brak połączenia z serwerem.")}if(_.status===401&&y.auth!==!1&&x){const R=n.get();if(R!==null&&R!==x?!0:await i())try{_=await o(p,y)}catch{throw new ts(0,"Brak połączenia z serwerem.")}_.status===401&&(n.clear(),e.onUnauthorized?.())}return _}async function u(p,y={}){const _=await a(p,y),x=await l(_);if(!_.ok)throw c(_,x);return x}async function f(p,y={}){const _=await a(p,y);if(!_.ok){const x=await l(_);throw c(_,x)}return _.blob()}async function g(p,y={}){const _=await u(p,y);return _&&typeof _=="object"&&"data"in _?_.data:_}return{request:g,raw:u,blob:f}}function qo(e){try{return e()}catch{return null}}const Ct=new Sf(qo(()=>window.localStorage),qo(()=>window.sessionStorage));let Al=()=>{};function Rf(e){Al=e}const ce=Af({tokens:Ct,onUnauthorized:()=>Al()}),At="/_user/api/v1",hn={login:e=>ce.request(`${At}/login`,{method:"POST",body:e,auth:!1}),register:e=>ce.request(`${At}/register`,{method:"POST",body:e,auth:!1}),fetch:()=>ce.request(`${At}/fetch`),logout:()=>ce.request(`${At}/logout`,{method:"POST"}),forgotPassword:e=>ce.request(`${At}/forgot-password`,{method:"POST",body:{email:e},auth:!1}),resetPassword:e=>ce.request(`${At}/reset-password`,{method:"POST",body:e,auth:!1}),update:e=>ce.request(`${At}/update`,{method:"POST",body:e}),changePassword:e=>ce.request(`${At}/change-password`,{method:"POST",body:e})},xf="modulepreload",Cf=function(e){return"/"+e},zo={},_e=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){let c=function(a){return Promise.all(a.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=i?.nonce||i?.getAttribute("nonce");r=c(n.map(a=>{if(a=Cf(a),a in zo)return;zo[a]=!0;const u=a.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${f}`))return;const g=document.createElement("link");if(g.rel=u?"stylesheet":xf,u||(g.as="script"),g.crossOrigin="",g.href=a,l&&g.setAttribute("nonce",l),document.head.appendChild(g),u)return new Promise((p,y)=>{g.addEventListener("load",p),g.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${a}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return r.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},Ht=bf({history:Yu("/"),scrollBehavior:(e,t,n)=>e.meta.bare?!1:n??(e.hash?{el:e.hash,top:12}:e.path===t.path?void 0:{top:0}),routes:[{path:"/logowanie",name:"login",component:()=>_e(()=>import("./LoginView-DAC0RwAQ.js"),__vite__mapDeps([0,1])),meta:{public:!0,guest:!0,title:"Logowanie"}},{path:"/rejestracja",name:"register",component:()=>_e(()=>import("./RegisterView-Clc4cUwL.js"),__vite__mapDeps([2,1])),meta:{public:!0,guest:!0,title:"Rejestracja"}},{path:"/przypomnij-haslo",name:"forgot",component:()=>_e(()=>import("./ForgotView-BOx6Nau9.js"),__vite__mapDeps([3,1])),meta:{public:!0,title:"Przypomnienie hasła"}},{path:"/reset-password",alias:"/reset-hasla",name:"reset",component:()=>_e(()=>import("./ResetView-BlxClKWv.js"),__vite__mapDeps([4,1])),meta:{public:!0,title:"Nowe hasło"}},{path:"/",name:"dashboard",component:()=>_e(()=>import("./DashboardView-CQoALeJF.js"),__vite__mapDeps([5,6,7,8,9])),meta:{title:"Pulpit"}},{path:"/plan",name:"schedule",component:()=>_e(()=>import("./ScheduleView-CwxmPwjF.js"),__vite__mapDeps([10,6,7,8,9])),meta:{title:"Plan zajęć"}},{path:"/terminarz",name:"deadlines",component:()=>_e(()=>import("./DeadlinesView-BDipircW.js"),__vite__mapDeps([11,6,7,8,9])),meta:{title:"Terminarz"}},{path:"/przedmioty",name:"courses",component:()=>_e(()=>import("./CoursesView-C67U75O8.js"),__vite__mapDeps([12,6,7,8,9])),meta:{title:"Przedmioty"}},{path:"/przedmioty/:id(\\d+)",name:"course",component:()=>_e(()=>import("./CourseView-DA_0kxps.js"),__vite__mapDeps([13,6,7,14,9])),props:!0,meta:{title:"Przedmiot"}},{path:"/lektury",name:"readings",component:()=>_e(()=>import("./ReadingsView-CUnMjS8U.js"),__vite__mapDeps([15,6,7,8,9,14])),meta:{title:"Lektury"}},{path:"/materialy",name:"materials",component:()=>_e(()=>import("./MaterialsView-BvNKRnn6.js"),__vite__mapDeps([16,6,9])),meta:{title:"Materiały"}},{path:"/materialy/:id(\\d+)",name:"material",component:()=>_e(()=>import("./MaterialView-QL0yqUg2.js"),__vite__mapDeps([17,6,7,9])),props:!0,meta:{title:"Materiał"}},{path:"/quiz",redirect:"/quizy/powtorka-1-zjazd"},{path:"/quizy",name:"quizzes",component:()=>_e(()=>import("./QuizzesView-Bgho7mXY.js"),__vite__mapDeps([18,6,7,19,9])),meta:{title:"Quizy"}},{path:"/quizy/:slug",name:"quiz",component:()=>_e(()=>import("./QuizView-C5E-4ich.js"),__vite__mapDeps([20,6,7,19,9])),props:!0,meta:{title:"Quiz"}},{path:"/wiecej",name:"more",component:()=>_e(()=>import("./MoreView-Cm2K6Awc.js"),__vite__mapDeps([21,6])),meta:{title:"Więcej"}},{path:"/profil",name:"profile",component:()=>_e(()=>import("./ProfileView-B2CbG48x.js"),__vite__mapDeps([22,6,1])),meta:{title:"Profil"}},{path:"/moje-prezentacje",name:"my-presentations",component:()=>_e(()=>import("./MyPresentationsView-2R3XisKT.js"),__vite__mapDeps([23,6,7,24,9])),meta:{title:"Moje prezentacje"}},{path:"/moje-prezentacje/:slug",name:"presentation-speaker",component:()=>_e(()=>import("./PresentationSpeakerView-BpKWeYat.js"),__vite__mapDeps([25,24,26,27,28])),props:!0,meta:{bare:!0,title:"Prezentacja"}},{path:"/prezentacje/:slugHash",name:"presentation-public",component:()=>_e(()=>import("./PresentationPublicView-1pAdHNma.js"),__vite__mapDeps([29,24,26,27,30])),props:!0,meta:{public:!0,bare:!0,title:"Prezentacja"}},{path:"/:rest(.*)*",name:"notfound",component:()=>_e(()=>import("./NotFoundView-DA_P-c9x.js"),[]),meta:{title:"Nie znaleziono"}}]});Ht.beforeEach(async e=>{const t=Pl();return t.ready||await t.restore(e),!e.meta.public&&!t.loggedIn?{name:"login",query:e.fullPath==="/"?{}:{redirect:e.fullPath}}:e.meta.guest&&t.loggedIn?{name:"dashboard"}:!0});Ht.afterEach(e=>{const t=e.meta.title;document.title=t?`${t} · BM II°`:"BM II°"});const Ce="/_bm/api/v1",Ne={dashboard:()=>ce.request(`${Ce}/dashboard`),courses:e=>ce.request(`${Ce}/courses`,{query:{semester:e}}),course:e=>ce.request(`${Ce}/courses/${e}`),schedule:(e,t)=>ce.request(`${Ce}/schedule`,{query:{from:e,to:t}}),meetings:()=>ce.request(`${Ce}/meetings`),deadlines:(e,t)=>ce.request(`${Ce}/deadlines`,{query:{from:e,to:t}}),readings:e=>ce.request(`${Ce}/readings`,{query:{course:e}}),markRead:e=>ce.request(`${Ce}/readings/${e}/progress`,{method:"PUT"}),unmarkRead:e=>ce.request(`${Ce}/readings/${e}/progress`,{method:"DELETE"}),materials:(e={})=>ce.raw(`${Ce}/materials`,{query:{...e}}),material:e=>ce.request(`${Ce}/materials/${e}`),calendarFeed:()=>ce.request(`${Ce}/calendar-feed`),saveCalendarFeed:e=>ce.request(`${Ce}/calendar-feed`,{method:"PUT",body:e}),rotateCalendarFeed:()=>ce.request(`${Ce}/calendar-feed/rotate`,{method:"POST"}),deleteCalendarFeed:()=>ce.request(`${Ce}/calendar-feed`,{method:"DELETE"})},Pf={"historia-koncepcje":"Historia / koncepcje wojny i pokoju",specjalnosc:"Specjalność"};function Xf(e){return Pf[e]??e}function Lr(e){const t=new Map;for(const n of e){if(!n.elective_group)continue;const s=t.get(n.elective_group)??[];s.includes(n.name)||s.push(n.name),t.set(n.elective_group,s)}return[...t].map(([n,s])=>({code:n,options:s}))}function Of(e,t){const n={};for(const s of Lr(e)){const r=t[s.code];r&&s.options.includes(r)&&(n[s.code]=r)}return n}function Tf(e,t){if(!e.elective_group)return!1;const n=t[e.elective_group];return n!==void 0&&n!==e.name}function Rl(e,t,n=!1){const s=new Set;if(n)return s;for(const r of e)Tf(r,t)&&s.add(r.id);return s}function Js(e,t){return t.size===0?e:e.filter(n=>n.course_id===null||!t.has(n.course_id))}function If(e,t){return Lr(e).filter(n=>n.options.length>1&&!t[n.code])}function Zf(e,t){return!!e.elective_group&&!t[e.elective_group]}const $o="bm.showAllElectives";function Ko(e){try{return localStorage.getItem(e)}catch{return null}}function Go(e,t){try{localStorage.setItem(e,t)}catch{}}const xn=qn("electives",()=>{const e=be({}),t=be(Ko($o)==="1"),n=be(null),s=()=>n.value===null?null:`bm.electives.${n.value}`,r=()=>{const f=s();f&&Go(f,JSON.stringify(e.value))};function o(f){n.value=f;try{const g=JSON.parse(Ko(`bm.electives.${f}`)??"{}");e.value=g&&typeof g=="object"?g:{}}catch{e.value={}}}const i=Q(()=>Object.keys(e.value).length>0);function l(f,g){const p={...e.value};g===null?delete p[f]:p[f]=g,e.value=p,r()}function c(f){t.value=f,Go($o,f?"1":"0")}function a(f){const g=Of(f,e.value);Object.keys(g).length!==Object.keys(e.value).length&&(e.value=g,r())}function u(){e.value={},n.value=null}return{choices:e,showAll:t,userId:n,hasChoices:i,load:o,choose:l,setShowAll:c,prune:a,reset:u}}),Vr=qn("toast",()=>{const e=be("");let t;function n(r,o=4e3){e.value=r,clearTimeout(t),t=setTimeout(()=>e.value="",o)}function s(){e.value=""}return{message:e,show:n,clear:s}});function Cn(e){return e instanceof ts?e.message:"Nie udało się wczytać danych."}function Jt(e){const t=Ei(null),n=be(!1),s=be("");let r=null;function o(l=!1){return r||(t.value!==null&&!l?Promise.resolve():(n.value=!0,s.value="",r=e().then(c=>{t.value=c}).catch(c=>{s.value=Cn(c)}).finally(()=>{n.value=!1,r=null}),r))}function i(){t.value=null,s.value="",n.value=!1,r=null}return{data:t,loading:n,error:s,load:o,reset:i}}const Wo="2000-01-01",xl=qn("bm",()=>{const e=Jt(()=>Ne.courses()),t=Jt(()=>Ne.meetings()),n=Jt(()=>Ne.schedule(Wo)),s=Jt(()=>Ne.deadlines(Wo)),r=Jt(()=>Ne.readings()),o=Jt(()=>Ne.dashboard()),i=Q(()=>e.data.value),l=Q(()=>t.data.value),c=Q(()=>o.data.value),a=xn(),u=Q(()=>Lr(i.value??[])),f=Q(()=>If(i.value??[],a.choices)),g=Q(()=>Rl(i.value??[],a.choices,a.showAll)),p=Q(()=>Js(n.data.value??[],g.value)),y=Q(()=>Js(s.data.value??[],g.value)),_=Q(()=>Js(r.data.value??[],g.value)),x=Q(()=>r.data.value??[]),R=Q(()=>(i.value??[]).filter(U=>!g.value.has(U.id))),S=Q(()=>{const U=_.value,de=U.filter(ge=>ge.is_required);return{total:U.length,read:U.filter(ge=>ge.read_at).length,requiredTotal:de.length,requiredRead:de.filter(ge=>ge.read_at).length}}),I=Q(()=>new Map((i.value??[]).map(U=>[U.id,U])));async function T(U=!1){await e.load(U),e.data.value&&a.prune(e.data.value)}async function j(U,de){const ge=r.data.value,ze=ge?.find(G=>G.id===U);if(!ge||!ze)return;const ie=ze.read_at,$=G=>{r.data.value=ge.map(je=>je.id===U?{...je,read_at:G}:je)};$(de?new Date().toISOString():null);try{const G=de?await Ne.markRead(U):await Ne.unmarkRead(U);$(G.read_at)}catch(G){$(ie),Vr().show(`Nie udało się zapisać zmiany. ${Cn(G)}`)}}const X=[e,t,n,s,r,o],L=Q(()=>X.some(U=>U.loading.value)),B=Q(()=>X.find(U=>U.error.value)?.error.value??""),V=Q(()=>({courses:e.data.value!==null,meetings:t.data.value!==null,schedule:n.data.value!==null,deadlines:s.data.value!==null,readings:r.data.value!==null,dashboard:o.data.value!==null}));function Z(){for(const U of X)U.error.value&&U.load(!0)}function fe(){for(const U of X)U.reset()}return{courses:i,electiveGroups:u,pendingElectives:f,hidden:g,meetings:l,dashboard:c,schedule:p,deadlines:y,readings:_,allReadings:x,visibleCourses:R,readingStats:S,courseById:I,loading:L,error:B,loaded:V,retry:Z,loadCourses:T,loadMeetings:(U=!1)=>t.load(U),loadSchedule:(U=!1)=>n.load(U),loadDeadlines:(U=!1)=>s.load(U),loadReadings:(U=!1)=>r.load(U),loadDashboard:(U=!1)=>o.load(U),toggleReading:j,reset:fe}});function Mf(e,t){return[...Rl(e,t,!1)].sort((n,s)=>n-s)}function Nf(e,t){if(e.length!==t.length)return!1;const n=[...e].sort((r,o)=>r-o),s=[...t].sort((r,o)=>r-o);return n.every((r,o)=>r===s[o])}async function ed(e){try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0}catch{}try{const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-1000px",document.body.appendChild(t),t.select();const n=document.execCommand("copy");return document.body.removeChild(t),n}catch{return!1}}const Cl=qn("calendarFeed",()=>{const e=be(void 0),t=be(!1),n=be(!1),s=be(""),r=xl(),o=xn();let i=Promise.resolve();function l(R){const S=i.then(R,R);return i=S.catch(()=>{}),S}async function c(R=!1){if(!(e.value!==void 0&&!R)){t.value=!0,s.value="";try{e.value=await Ne.calendarFeed()}catch(S){s.value=Cn(S)}finally{t.value=!1}}}async function a(){await r.loadCourses();const R=r.courses;return R?Mf(R,o.choices):null}async function u(R){n.value=!0,s.value="";try{await l(R)}catch(S){s.value=Cn(S)}finally{n.value=!1}}function f(){return u(async()=>{const R=await a();e.value=await Ne.saveCalendarFeed(R?{excluded_course_ids:R}:{})})}function g(R){return u(async()=>{e.value=await Ne.saveCalendarFeed(R)})}function p(){return u(async()=>{e.value=await Ne.rotateCalendarFeed()})}function y(){return u(async()=>{await Ne.deleteCalendarFeed(),e.value=null})}function _(){return l(async()=>{e.value===void 0&&await c();const R=e.value;if(!R)return;const S=await a();if(!(!S||Nf(S,R.excluded_course_ids)))try{e.value=await Ne.saveCalendarFeed({excluded_course_ids:S})}catch(I){Vr().show(`Nie udało się zaktualizować kalendarza. ${Cn(I)}`)}})}Zt(()=>o.choices,()=>{o.userId!==null&&_()});function x(){e.value=void 0,s.value="",t.value=!1,n.value=!1}return{feed:e,loading:t,busy:n,error:s,load:c,create:f,save:g,rotate:p,remove:y,sync:_,reset:x}});let Qs=null;const Pl=qn("auth",()=>{const e=be(null),t=be(Ct.get()),n=be(!1),s=Q(()=>t.value!==null),r=Q(()=>{const p=e.value;return p?[p.name,p.surname].filter(Boolean).join(" ")||p.email:""});function o(p,y,_){Ct.set(p,_),t.value=Ct.get(),y&&(e.value=y,xn().load(y.id))}function i(){Ct.clear(),t.value=null,e.value=null,xl().reset(),xn().reset(),Cl().reset()}async function l(p){p&&(Qs={public:p.meta.public===!0,fullPath:p.fullPath});try{if(Ct.get())try{const y=await hn.fetch();e.value=y.user,t.value=Ct.get(),xn().load(y.user.id)}catch{Ct.get()||i()}n.value=!0}finally{Qs=null}}async function c(p,y,_){const x=await hn.login({email:p,password:y});o(x.token,x.user,_)}async function a(p,y){const _=await hn.register(p);return _.token?(o(_.token,_.user,y),{signedIn:!0,message:""}):{signedIn:!1,message:_.message??""}}async function u(){try{await hn.logout()}catch{}i(),await Ht.push({name:"login"})}async function f(p){const y=await hn.update(p);e.value=y.user}function g(){const p=Qs??{public:Ht.currentRoute.value.meta.public===!0,fullPath:Ht.currentRoute.value.fullPath},y=s.value||e.value!==null;i(),y&&!p.public&&Ht.push({name:"login",query:{redirect:p.fullPath,expired:"1"}})}return Rf(g),{user:e,token:t,ready:n,loggedIn:s,displayName:r,restore:l,login:c,register:a,logout:u,updateProfile:f}}),Df={class:"shell"},jf={class:"sidebar"},Lf={"aria-label":"Główna nawigacja"},Vf={class:"who"},Ff={class:"muted"},kf={class:"main",id:"main"},Hf={class:"tabbar","aria-label":"Nawigacja"},Bf=ln({__name:"AppShell",setup(e){const t=Pl(),n=Vr(),s=Sl();Cl();const r=[{to:"/",label:"Pulpit",icon:"home",match:["dashboard"]},{to:"/plan",label:"Plan zajęć",icon:"calendar",match:["schedule"]},{to:"/terminarz",label:"Terminarz",icon:"flag",match:["deadlines"]},{to:"/przedmioty",label:"Przedmioty",icon:"grad",match:["courses","course"]},{to:"/lektury",label:"Lektury",icon:"book",match:["readings"]},{to:"/materialy",label:"Materiały",icon:"file",match:["materials","material"]},{to:"/quizy",label:"Quizy",icon:"quiz",match:["quizzes","quiz"]},{to:"/moje-prezentacje",label:"Moje prezentacje",icon:"slides",match:["my-presentations"]},{to:"/profil",label:"Profil",icon:"user",match:["profile"]}],o=[{to:"/",label:"Pulpit",icon:"home",match:["dashboard"]},{to:"/plan",label:"Plan",icon:"calendar",match:["schedule"]},{to:"/lektury",label:"Lektury",icon:"book",match:["readings"]},{to:"/quizy",label:"Quizy",icon:"quiz",match:["quizzes","quiz"]},{to:"/wiecej",label:"Więcej",icon:"more",match:["more","deadlines","courses","course","materials","material","my-presentations","profile"]}],i=Q(()=>String(s.name??"")),l=c=>c.includes(i.value);return(c,a)=>{const u=Di("router-link");return mt(),Zn("div",Df,[Ve("aside",jf,[ae(u,{to:"/",class:"brand"},{default:En(()=>[...a[1]||(a[1]=[Ve("span",{class:"eyebrow"},"UWr · ISMiB",-1),Ve("b",null,"BM II°",-1)])]),_:1}),Ve("nav",Lf,[(mt(),Zn(De,null,eo(r,f=>ae(u,{key:f.to,to:f.to,class:Pn({active:l(f.match)}),"aria-current":l(f.match)?"page":void 0},{default:En(()=>[ae(Uo,{name:f.icon},null,8,["name"]),lr(pn(f.label),1)]),_:2},1032,["to","class","aria-current"])),64))]),Ve("div",Vf,[Ve("span",Ff,pn($e(t).displayName),1),Ve("button",{class:"btn small ghost",type:"button",onClick:a[0]||(a[0]=f=>$e(t).logout())},"Wyloguj")])]),Ve("main",kf,[$c(c.$slots,"default")]),Ve("nav",Hf,[(mt(),Zn(De,null,eo(o,f=>ae(u,{key:f.to,to:f.to,class:Pn({active:l(f.match)}),"aria-current":l(f.match)?"page":void 0},{default:En(()=>[ae(Uo,{name:f.icon},null,8,["name"]),lr(pn(f.label),1)]),_:2},1032,["to","class","aria-current"])),64))]),bc(Ve("div",{class:"toast",role:"status","aria-live":"polite"},pn($e(n).message),513),[[La,$e(n).message]])])}}}),Uf=ln({__name:"App",setup(e){const t=Sl(),n=Q(()=>t.meta.public===!0||t.meta.bare===!0);return(s,r)=>{const o=Di("router-view");return n.value?(mt(),Nn(o,{key:0})):(mt(),Nn(Bf,{key:1},{default:En(()=>[ae(o)]),_:1}))}}});ou(Uf).use(cu()).use(Ht).mount("#app");export{Zt as A,Nn as B,xn as C,Zf as D,Ne as E,De as F,Cn as G,Jf as H,kn as I,Vc as J,Es as K,ce as L,Cl as M,Vr as N,ed as O,Xf as P,ts as Q,$c as R,Or as S,$f as T,_e as U,zf as V,La as W,Uo as _,Ve as a,$e as b,Zn as c,ln as d,Kf as e,Wf as f,Qf as g,ae as h,En as i,Sl as j,Di as k,Yf as l,lr as m,hn as n,mt as o,xl as p,Dc as q,be as r,Q as s,pn as t,Pl as u,Gf as v,bc as w,Pn as x,eo as y,_r as z}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginView-BJXrPNjb.js","assets/forms-Ca-hh7T4.js","assets/RegisterView-DJ1QoVDK.js","assets/ForgotView-BX93XuZx.js","assets/ResetView-_AGvi3TG.js","assets/DashboardView-BYuD8Ygc.js","assets/PageHead.vue_vue_type_script_setup_true_lang-BUEjDudf.js","assets/LoadState.vue_vue_type_script_setup_true_lang-BYeP9cST.js","assets/ElectiveBar.vue_vue_type_script_setup_true_lang-ml4QcEZn.js","assets/format-bcE-cYHJ.js","assets/ScheduleView-BqW7gmzM.js","assets/DeadlinesView-DY301l3f.js","assets/CoursesView-CCyOcVSP.js","assets/CourseView-CXI6huVv.js","assets/ReadingItem.vue_vue_type_script_setup_true_lang-BozrsWL2.js","assets/ReadingsView-Dwn-CoLm.js","assets/MaterialsView-CSlYRC1S.js","assets/MaterialView-BU7ZdTm0.js","assets/QuizzesView-BPpiDTe0.js","assets/quizzes-ByhEqvvR.js","assets/QuizView-BWZffs6k.js","assets/MoreView-B3Qn1wI_.js","assets/ProfileView-CyRqKzB5.js","assets/MyPresentationsView-Jd38nBse.js","assets/presentations-B2_nwGC8.js","assets/PresentationSpeakerView-CV1WMYIv.js","assets/DeckViewer.vue_vue_type_style_index_0_lang-TWCMyUu3.js","assets/DeckViewer-CR8xWjLR.css","assets/realtime-DuTUbwvj.js","assets/PresentationSpeakerView-B17W5L2w.css","assets/PresentationRemoteView-DCKt4fp6.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/PresentationRemoteView-D3-kZqrb.css","assets/PresentationPublicView-CnKQnORE.js","assets/PresentationPublicView-BfVrlmS5.css","assets/NotFoundView-CiR7B3dL.js"])))=>i.map(i=>d[i]); +var Ol=Object.defineProperty;var Tl=(e,t,n)=>t in e?Ol(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Kt=(e,t,n)=>Tl(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();function gr(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const oe={},Ft=[],ot=()=>{},Jo=()=>!1,ds=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),hs=e=>e.startsWith("onUpdate:"),Ee=Object.assign,mr=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Il=Object.prototype.hasOwnProperty,te=(e,t)=>Il.call(e,t),H=Array.isArray,It=e=>Fn(e)==="[object Map]",_t=e=>Fn(e)==="[object Set]",Br=e=>Fn(e)==="[object Date]",K=e=>typeof e=="function",ue=e=>typeof e=="string",He=e=>typeof e=="symbol",ne=e=>e!==null&&typeof e=="object",Qo=e=>(ne(e)||K(e))&&K(e.then)&&K(e.catch),Yo=Object.prototype.toString,Fn=e=>Yo.call(e),Ml=e=>Fn(e).slice(8,-1),Xo=e=>Fn(e)==="[object Object]",ps=e=>ue(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,yn=gr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),gs=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Nl=/-\w/g,Me=gs(e=>e.replace(Nl,t=>t.slice(1).toUpperCase())),Dl=/\B([A-Z])/g,qt=gs(e=>e.replace(Dl,"-$1").toLowerCase()),ms=gs(e=>e.charAt(0).toUpperCase()+e.slice(1)),Is=gs(e=>e?`on${ms(e)}`:""),st=(e,t)=>!Object.is(e,t),Yn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},_s=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Ur;const ys=()=>Ur||(Ur=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function _r(e){if(H(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(jl).forEach(n=>{if(n){const s=n.split(Ll);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Pn(e){let t="";if(ue(e))t=e;else if(H(e))for(let n=0;nyt(n,t))}const ti=e=>!!(e&&e.__v_isRef===!0),pn=e=>ue(e)?e:e==null?"":H(e)||ne(e)&&(e.toString===Yo||!K(e.toString))?ti(e)?pn(e.value):JSON.stringify(e,ni,2):String(e),ni=(e,t)=>ti(t)?ni(e,t.value):It(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[Ms(s,o)+" =>"]=r,n),{})}:_t(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ms(n))}:He(t)?Ms(t):ne(t)&&!H(t)&&!Xo(t)?String(t):t,Ms=(e,t="")=>{var n;return He(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let ve;class si{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&ve&&(ve.active?(this.parent=ve,this.index=(ve.scopes||(ve.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t0&&--this._on===0){if(ve===this)ve=this.prevScope;else{let t=ve;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(bn){let t=bn;for(bn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;vn;){let t=vn;for(vn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function ai(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ui(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),Er(s),zl(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Ys(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(fi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function fi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===On)||(e.globalVersion=On,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ys(e))))return;e.flags|=2;const t=e.dep,n=le,s=Ke;le=e,Ke=!0;try{ai(e);const r=e.fn(e._value);(t.version===0||st(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{le=n,Ke=s,ui(e),e.flags&=-3}}function Er(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)Er(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function zl(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ke=!0;const di=[];function vt(){di.push(Ke),Ke=!1}function bt(){const e=di.pop();Ke=e===void 0?!0:e}function $r(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=le;le=void 0;try{t()}finally{le=n}}}let On=0;class $l{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class wr{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!le||!Ke||le===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==le)n=this.activeLink=new $l(le,this),le.deps?(n.prevDep=le.depsTail,le.depsTail.nextDep=n,le.depsTail=n):le.deps=le.depsTail=n,hi(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=le.depsTail,n.nextDep=void 0,le.depsTail.nextDep=n,le.depsTail=n,le.deps===n&&(le.deps=s)}return n}trigger(t){this.version++,On++,this.notify(t)}notify(t){vr();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{br()}}}function hi(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)hi(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ns=new WeakMap,Bt=Symbol(""),Xs=Symbol(""),Tn=Symbol("");function Re(e,t,n){if(Ke&&le){let s=ns.get(e);s||ns.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new wr),r.map=s,r.key=n),r.track()}}function ht(e,t,n,s,r,o){const i=ns.get(e);if(!i){On++;return}const l=c=>{c&&c.trigger()};if(vr(),t==="clear")i.forEach(l);else{const c=H(e),a=c&&ps(n);if(c&&n==="length"){const u=Number(s);i.forEach((f,g)=>{(g==="length"||g===Tn||!He(g)&&g>=u)&&l(f)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),a&&l(i.get(Tn)),t){case"add":c?a&&l(i.get("length")):(l(i.get(Bt)),It(e)&&l(i.get(Xs)));break;case"delete":c||(l(i.get(Bt)),It(e)&&l(i.get(Xs)));break;case"set":It(e)&&l(i.get(Bt));break}}br()}function Kl(e,t){const n=ns.get(e);return n&&n.get(t)}function Gt(e){const t=Y(e);return t===e||(Re(t,"iterate",Tn),ke(e))?t:lt(e)?it(e)?t.map(n=>Mt(qe(n))):t.map(Mt):t.map(qe)}function vs(e){return Re(e=Y(e),"iterate",Tn),e}function tt(e,t){return lt(e)?Mt(it(e)?qe(t):t):qe(t)}const Gl={__proto__:null,[Symbol.iterator](){return Ds(this,Symbol.iterator,e=>tt(this,e))},concat(...e){return Gt(this).concat(...e.map(t=>H(t)?Gt(t):t))},entries(){return Ds(this,"entries",e=>(e[1]=tt(this,e[1]),e))},every(e,t){return at(this,"every",e,t,void 0,arguments)},filter(e,t){return at(this,"filter",e,t,n=>n.map(s=>tt(this,s)),arguments)},find(e,t){return at(this,"find",e,t,n=>tt(this,n),arguments)},findIndex(e,t){return at(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return at(this,"findLast",e,t,n=>tt(this,n),arguments)},findLastIndex(e,t){return at(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return at(this,"forEach",e,t,void 0,arguments)},includes(...e){return js(this,"includes",e)},indexOf(...e){return js(this,"indexOf",e)},join(e){return Gt(this).join(e)},lastIndexOf(...e){return js(this,"lastIndexOf",e)},map(e,t){return at(this,"map",e,t,void 0,arguments)},pop(){return an(this,"pop")},push(...e){return an(this,"push",e)},reduce(e,...t){return Kr(this,"reduce",e,t)},reduceRight(e,...t){return Kr(this,"reduceRight",e,t)},shift(){return an(this,"shift")},some(e,t){return at(this,"some",e,t,void 0,arguments)},splice(...e){return an(this,"splice",e)},toReversed(){return Gt(this).toReversed()},toSorted(e){return Gt(this).toSorted(e)},toSpliced(...e){return Gt(this).toSpliced(...e)},unshift(...e){return an(this,"unshift",e)},values(){return Ds(this,"values",e=>tt(this,e))}};function Ds(e,t,n){const s=vs(e),r=s[t]();return s!==e&&!ke(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const Wl=Array.prototype;function at(e,t,n,s,r,o){const i=vs(e),l=i!==e&&!ke(e),c=i[t];if(c!==Wl[t]){const f=c.apply(e,o);return l?qe(f):f}let a=n;i!==e&&(l?a=function(f,g){return n.call(this,tt(e,f),g,e)}:n.length>2&&(a=function(f,g){return n.call(this,f,g,e)}));const u=c.call(i,a,s);return l&&r?r(u):u}function Kr(e,t,n,s){const r=vs(e),o=r!==e&&!ke(e);let i=n,l=!1;r!==e&&(o?(l=s.length===0,i=function(a,u,f){return l&&(l=!1,a=tt(e,a)),n.call(this,a,tt(e,u),f,e)}):n.length>3&&(i=function(a,u,f){return n.call(this,a,u,f,e)}));const c=r[t](i,...s);return l?tt(e,c):c}function js(e,t,n){const s=Y(e);Re(s,"iterate",Tn);const r=s[t](...n);return(r===-1||r===!1)&&bs(n[0])?(n[0]=Y(n[0]),s[t](...n)):r}function an(e,t,n=[]){vt(),vr();const s=Y(e)[t].apply(e,n);return br(),bt(),s}const Jl=gr("__proto__,__v_isRef,__isVue"),pi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(He));function Ql(e){He(e)||(e=String(e));const t=Y(this);return Re(t,"has",e),t.hasOwnProperty(e)}class gi{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?ic:vi:o?yi:_i).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=H(t);if(!r){let c;if(i&&(c=Gl[n]))return c;if(n==="hasOwnProperty")return Ql}const l=Reflect.get(t,n,pe(t)?t:s);if((He(n)?pi.has(n):Jl(n))||(r||Re(t,"get",n),o))return l;if(pe(l)){const c=i&&ps(n)?l:l.value;return r&&ne(c)?er(c):c}return ne(l)?r?er(l):kn(l):l}}class mi extends gi{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];const i=H(t)&&ps(n);if(!this._isShallow){const a=lt(o);if(!ke(s)&&!lt(s)&&(o=Y(o),s=Y(s)),!i&&pe(o)&&!pe(s))return a||(o.value=s),!0}const l=i?Number(n)e,zn=e=>Reflect.getPrototypeOf(e);function tc(e,t,n){return function(...s){const r=this.__v_raw,o=Y(r),i=It(o),l=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,a=r[e](...s),u=n?Zs:t?Mt:qe;return!t&&Re(o,"iterate",c?Xs:Bt),Ee(Object.create(a),{next(){const{value:f,done:g}=a.next();return g?{value:f,done:g}:{value:l?[u(f[0]),u(f[1])]:u(f),done:g}}})}}function $n(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function nc(e,t){const n={get(r){const o=this.__v_raw,i=Y(o),l=Y(r);e||(st(r,l)&&Re(i,"get",r),Re(i,"get",l));const{has:c}=zn(i),a=t?Zs:e?Mt:qe;if(c.call(i,r))return a(o.get(r));if(c.call(i,l))return a(o.get(l));o!==i&&o.get(r)},get size(){const r=this.__v_raw;return!e&&Re(Y(r),"iterate",Bt),r.size},has(r){const o=this.__v_raw,i=Y(o),l=Y(r);return e||(st(r,l)&&Re(i,"has",r),Re(i,"has",l)),r===l?o.has(r):o.has(r)||o.has(l)},forEach(r,o){const i=this,l=i.__v_raw,c=Y(l),a=t?Zs:e?Mt:qe;return!e&&Re(c,"iterate",Bt),l.forEach((u,f)=>r.call(o,a(u),a(f),i))}};return Ee(n,e?{add:$n("add"),set:$n("set"),delete:$n("delete"),clear:$n("clear")}:{add(r){const o=Y(this),i=zn(o),l=Y(r),c=!t&&!ke(r)&&!lt(r)?l:r;return i.has.call(o,c)||st(r,c)&&i.has.call(o,r)||st(l,c)&&i.has.call(o,l)||(o.add(c),ht(o,"add",c,c)),this},set(r,o){!t&&!ke(o)&&!lt(o)&&(o=Y(o));const i=Y(this),{has:l,get:c}=zn(i);let a=l.call(i,r);a||(r=Y(r),a=l.call(i,r));const u=c.call(i,r);return i.set(r,o),a?st(o,u)&&ht(i,"set",r,o):ht(i,"add",r,o),this},delete(r){const o=Y(this),{has:i,get:l}=zn(o);let c=i.call(o,r);c||(r=Y(r),c=i.call(o,r)),l&&l.call(o,r);const a=o.delete(r);return c&&ht(o,"delete",r,void 0),a},clear(){const r=Y(this),o=r.size!==0,i=r.clear();return o&&ht(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=tc(r,e,t)}),n}function Sr(e,t){const n=nc(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(te(n,r)&&r in s?n:s,r,o)}const sc={get:Sr(!1,!1)},rc={get:Sr(!1,!0)},oc={get:Sr(!0,!1)};const _i=new WeakMap,yi=new WeakMap,vi=new WeakMap,ic=new WeakMap;function lc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function kn(e){return lt(e)?e:Ar(e,!1,Xl,sc,_i)}function bi(e){return Ar(e,!1,ec,rc,yi)}function er(e){return Ar(e,!0,Zl,oc,vi)}function Ar(e,t,n,s,r){if(!ne(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=r.get(e);if(o)return o;const i=lc(Ml(e));if(i===0)return e;const l=new Proxy(e,i===2?s:n);return r.set(e,l),l}function it(e){return lt(e)?it(e.__v_raw):!!(e&&e.__v_isReactive)}function lt(e){return!!(e&&e.__v_isReadonly)}function ke(e){return!!(e&&e.__v_isShallow)}function bs(e){return e?!!e.__v_raw:!1}function Y(e){const t=e&&e.__v_raw;return t?Y(t):e}function Rr(e){return!te(e,"__v_skip")&&Object.isExtensible(e)&&Zo(e,"__v_skip",!0),e}const qe=e=>ne(e)?kn(e):e,Mt=e=>ne(e)?er(e):e;function pe(e){return e?e.__v_isRef===!0:!1}function be(e){return wi(e,!1)}function Ei(e){return wi(e,!0)}function wi(e,t){return pe(e)?e:new cc(e,t)}class cc{constructor(t,n){this.dep=new wr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Y(t),this._value=n?t:qe(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||ke(t)||lt(t);t=s?t:Y(t),st(t,n)&&(this._rawValue=t,this._value=s?t:qe(t),this.dep.trigger())}}function $e(e){return pe(e)?e.value:e}const ac={get:(e,t,n)=>t==="__v_raw"?e:$e(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return pe(r)&&!pe(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Si(e){return it(e)?e:new Proxy(e,ac)}function uc(e){const t=H(e)?new Array(e.length):{};for(const n in e)t[n]=dc(e,n);return t}class fc{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=He(n)?n:String(n),this._raw=Y(t);let r=!0,o=t;if(!H(t)||He(this._key)||!ps(this._key))do r=!bs(o)||ke(o);while(r&&(o=o.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=$e(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&pe(this._raw[this._key])){const n=this._object[this._key];if(pe(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Kl(this._raw,this._key)}}function dc(e,t,n){return new fc(e,t,n)}class hc{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new wr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=On-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&le!==this)return ci(this,!0),!0}get value(){const t=this.dep.track();return fi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function pc(e,t,n=!1){let s,r;return K(e)?s=e:(s=e.get,r=e.set),new hc(s,r,n)}const Kn={},ss=new WeakMap;let Lt;function gc(e,t=!1,n=Lt){if(n){let s=ss.get(n);s||ss.set(n,s=[]),s.push(e)}}function mc(e,t,n=oe){const{immediate:s,deep:r,once:o,scheduler:i,augmentJob:l,call:c}=n,a=T=>r?T:ke(T)||r===!1||r===0?pt(T,1):pt(T);let u,f,g,p,y=!1,_=!1;if(pe(e)?(f=()=>e.value,y=ke(e)):it(e)?(f=()=>a(e),y=!0):H(e)?(_=!0,y=e.some(T=>it(T)||ke(T)),f=()=>e.map(T=>{if(pe(T))return T.value;if(it(T))return a(T);if(K(T))return c?c(T,2):T()})):K(e)?t?f=c?()=>c(e,2):e:f=()=>{if(g){vt();try{g()}finally{bt()}}const T=Lt;Lt=u;try{return c?c(e,3,[p]):e(p)}finally{Lt=T}}:f=ot,t&&r){const T=f,j=r===!0?1/0:r;f=()=>pt(T(),j)}const x=oi(),R=()=>{u.stop(),x&&x.active&&mr(x.effects,u)};if(o&&t){const T=t;t=(...j)=>{const X=T(...j);return R(),X}}let S=_?new Array(e.length).fill(Kn):Kn;const I=T=>{if(!(!(u.flags&1)||!u.dirty&&!T))if(t){const j=u.run();if(T||r||y||(_?j.some((X,L)=>st(X,S[L])):st(j,S))){g&&g();const X=Lt;Lt=u;try{const L=[j,S===Kn?void 0:_&&S[0]===Kn?[]:S,p];S=j,c?c(t,3,L):t(...L)}finally{Lt=X}}}else u.run()};return l&&l(I),u=new ii(f),u.scheduler=i?()=>i(I,!1):I,p=T=>gc(T,!1,u),g=u.onStop=()=>{const T=ss.get(u);if(T){if(c)c(T,4);else for(const j of T)j();ss.delete(u)}},t?s?I(!0):S=u.run():i?i(I.bind(null,!0),!0):u.run(),R.pause=u.pause.bind(u),R.resume=u.resume.bind(u),R.stop=R,R}function pt(e,t=1/0,n){if(t<=0||!ne(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,pe(e))pt(e.value,t,n);else if(H(e))for(let s=0;s{pt(s,t,n)});else if(Xo(e)){for(const s in e)pt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&pt(e[s],t,n)}return e}function Hn(e,t,n,s){try{return s?e(...s):e()}catch(r){Bn(r,t,n)}}function Ge(e,t,n,s){if(K(e)){const r=Hn(e,t,n,s);return r&&Qo(r)&&r.catch(o=>{Bn(o,t,n)}),r}if(H(e)){const r=[];for(let o=0;o>>1,r=Ie[s],o=In(r);o=In(n)?Ie.push(e):Ie.splice(yc(t),0,e),e.flags|=1,Ri()}}function Ri(){rs||(rs=Ai.then(Ci))}function vc(e){if(!H(e))Pt&&e.id===-1?Pt.splice(Qt+1,0,e):e.flags&1||(Xt.push(e),e.flags|=1);else for(let t=0;tIn(n)-In(s));if(Xt.length=0,Pt){for(let n=0;ne.id==null?e.flags&2?-1:1/0:e.id;function Ci(e){try{for(et=0;et{s._d&&cs(-1);const o=os(t),i=gt.length;let l;try{l=e(...r)}finally{for(let c=gt.length;c>i;c--)Nr();os(o),s._d&&cs(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function bc(e,t){if(Ae===null)return e;const n=Cs(Ae),s=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&K(t)?t.call(s&&s.proxy):t}}function Ec(){return!!(el()||Ut)}const wc=Symbol.for("v-scx"),Sc=()=>Ue(wc);function Zt(e,t,n){return Oi(e,t,n)}function Oi(e,t,n=oe){const{immediate:s,deep:r,flush:o,once:i}=n,l=Ee({},n),c=t&&s||!t&&o!=="post";let a;if(nn){if(o==="sync"){const p=Sc();a=p.__watcherHandles||(p.__watcherHandles=[])}else if(!c){const p=()=>{};return p.stop=ot,p.resume=ot,p.pause=ot,p}}const u=Se;l.call=(p,y,_)=>Ge(p,u,y,_);let f=!1;o==="post"?l.scheduler=p=>{Oe(p,u&&u.suspense)}:o!=="sync"&&(f=!0,l.scheduler=(p,y)=>{y?p():xr(p)}),l.augmentJob=p=>{t&&(p.flags|=4),f&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const g=mc(e,t,l);return nn&&(a?a.push(g):c&&g()),g}function Ac(e,t,n){const s=this.proxy,r=ue(e)?e.includes(".")?Ti(s,e):()=>s[e]:e.bind(s,s);let o;K(t)?o=t:(o=t.handler,n=t);const i=Un(this),l=Oi(r,o.bind(s),n);return i(),l}function Ti(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;re.__isTeleport,Vt=e=>e&&(e.disabled||e.disabled===""),Rc=e=>e&&(e.defer||e.defer===""),Wr=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Jr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,tr=(e,t)=>{const n=e&&e.to;return ue(n)?t?t(n):null:n},xc={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,i,l,c,a){const{mc:u,pc:f,pbc:g,o:{insert:p,querySelector:y,createText:_,createComment:x,parentNode:R}}=a,S=Vt(t.props);let{dynamicChildren:I}=t;const T=(L,B,V)=>{L.shapeFlag&16&&u(L.children,B,V,r,o,i,l,c)},j=(L=t)=>{const B=Vt(L.props),V=L.target=tr(L.props,y),Z=nr(V,L,_,p);V&&(i!=="svg"&&Wr(V)?i="svg":i!=="mathml"&&Jr(V)&&(i="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(V),B||(T(L,V,Z),gn(L,!1)))},X=L=>{const B=()=>{if(Rt.get(L)===B){if(Rt.delete(L),Vt(L.props)){const V=R(L.el)||n;T(L,V,L.anchor),gn(L,!0)}j(L)}};Rt.set(L,B),Oe(B,o)};if(e==null){const L=t.el=_(""),B=t.anchor=_("");if(p(L,n,s),p(B,n,s),Rc(t.props)||o&&o.pendingBranch){X(t);return}S&&(T(t,n,B),gn(t,!0)),j()}else{t.el=e.el;const L=t.anchor=e.anchor,B=Rt.get(e);if(B){B.flags|=8,Rt.delete(e),X(t);return}t.targetStart=e.targetStart;const V=t.target=e.target,Z=t.targetAnchor=e.targetAnchor,fe=Vt(e.props),U=fe?n:V,de=fe?L:Z;if(i==="svg"||Wr(V)?i="svg":(i==="mathml"||Jr(V))&&(i="mathml"),I?(g(e.dynamicChildren,I,U,r,o,i,l),Mr(e,t,!0)):c||f(e,t,U,de,r,o,i,l,!1),S)fe?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Gn(t,n,L,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const ge=tr(t.props,y);ge&&(t.target=ge,Gn(t,ge,null,a,0))}else fe&&Gn(t,V,Z,a,1);gn(t,S)}},remove(e,t,n,{um:s,o:{remove:r}},o){const{shapeFlag:i,children:l,anchor:c,targetStart:a,targetAnchor:u,target:f,props:g}=e,p=Vt(g),y=o||!p,_=Rt.get(e);if(_&&(_.flags|=8,Rt.delete(e)),f&&(r(a),r(u)),o&&r(c),!_&&(p||f)&&i&16)for(let x=0;x1){for(const n of e)if(n.type!==ct){t=n;break}}return t}function Mi(e){if(!Ss(e))return ws(e.type)&&e.children?Pc(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&K(n.default))return n.default()}}function Cr(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;Cr(ws(n.type)&&Mi(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ln(e,t){return K(e)?Ee({name:e.name},t,{setup:e}):e}function Pr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Qr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const is=new WeakMap;function wn(e,t,n,s,r=!1){if(H(e)){e.forEach((_,x)=>wn(_,t&&(H(t)?t[x]:t),n,s,r));return}if(en(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&wn(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?Cs(s.component):s.el,i=r?null:o,{i:l,r:c}=e,a=t&&t.r,u=l.refs===oe?l.refs={}:l.refs,f=l.setupState,g=Y(f),p=f===oe?Jo:_=>Qr(u,_)?!1:te(g,_),y=(_,x)=>!(x&&Qr(u,x));if(a!=null&&a!==c){if(Yr(t),ue(a))u[a]=null,p(a)&&(f[a]=null);else if(pe(a)){const _=t;y(a,_.k)&&(a.value=null),_.k&&(u[_.k]=null)}}if(K(c))Hn(c,l,12,[i,u]);else{const _=ue(c),x=pe(c);if(_||x){const R=()=>{if(e.f){const S=_?p(c)?f[c]:u[c]:y()||!e.k?c.value:u[e.k];if(r)H(S)&&mr(S,o);else if(H(S))S.includes(o)||S.push(o);else if(_)u[c]=[o],p(c)&&(f[c]=u[c]);else{const I=[o];y(c,e.k)&&(c.value=I),e.k&&(u[e.k]=I)}}else _?(u[c]=i,p(c)&&(f[c]=i)):x&&(y(c,e.k)&&(c.value=i),e.k&&(u[e.k]=i))};if(i){const S=()=>{R(),is.delete(e)};S.id=-1,is.set(e,S),Oe(S,n)}else Yr(e),R()}}}function Yr(e){const t=is.get(e);t&&(t.flags|=8,is.delete(e))}const Xr=e=>e.nodeType===8;ys().requestIdleCallback;ys().cancelIdleCallback;function Oc(e,t){if(Xr(e)&&e.data==="["){let n=1,s=e.nextSibling;for(;s;){if(s.nodeType===1){if(t(s)===!1)break}else if(Xr(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else t(e)}const en=e=>!!e.type.__asyncLoader;function $f(e){K(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,hydrate:o,timeout:i,suspensible:l=!0,onError:c}=e;let a=null,u,f=0;const g=()=>(f++,a=null,p()),p=()=>{let y;return a||(y=a=t().catch(_=>{if(_=_ instanceof Error?_:new Error(String(_)),c)return new Promise((x,R)=>{c(_,()=>x(g()),()=>R(_),f+1)});throw _}).then(_=>y!==a&&a?a:(_&&(_.__esModule||_[Symbol.toStringTag]==="Module")&&(_=_.default),u=_,_)))};return ln({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(y,_,x){const R=y.isConnected;let S=!1;(_.bu||(_.bu=[])).push(()=>S=!0);const I=()=>{S||!y.parentNode||R&&!y.isConnected||x()},T=o?()=>{const j=o(I,X=>Oc(y,X));j&&(_.bum||(_.bum=[])).push(j)}:I;u?T():p().then(()=>!_.isUnmounted&&T())},get __asyncResolved(){return u},setup(){const y=Se;if(Pr(y),u)return()=>Wn(u,y);const _=j=>{a=null,Bn(j,y,13,!s)};if(l&&y.suspense||nn)return p().then(j=>()=>Wn(j,y)).catch(j=>(_(j),()=>s?ae(s,{error:j}):null));const x=be(!1),R=be(),S=be(!!r);let I,T;return Or(()=>{I!=null&&clearTimeout(I),T!=null&&clearTimeout(T)}),r&&(T=setTimeout(()=>{y.isUnmounted||(S.value=!1)},r)),i!=null&&(I=setTimeout(()=>{if(!y.isUnmounted&&!x.value&&!R.value){const j=new Error(`Async component timed out after ${i}ms.`);_(j),R.value=j}},i)),p().then(()=>{y.isUnmounted||(x.value=!0,y.parent&&Ss(y.parent.vnode)&&y.parent.update())}).catch(j=>{if(y.isUnmounted){a=null;return}_(j),R.value=j}),()=>{if(x.value&&u)return Wn(u,y);if(R.value&&s)return ae(s,{error:R.value});if(n&&!S.value)return Wn(n,y)}}})}function Wn(e,t){const{ref:n,props:s,children:r,ce:o}=t.vnode,i=ae(e,s,r);return i.ref=n,i.ce=o,delete t.vnode.ce,i}const Ss=e=>e.type.__isKeepAlive;function Tc(e,t){Ni(e,"a",t)}function Ic(e,t){Ni(e,"da",t)}function Ni(e,t,n=Se){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(As(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Ss(r.parent.vnode)&&Mc(s,t,n,r),r=r.parent}}function Mc(e,t,n,s){const r=As(t,e,s,!0);Or(()=>{mr(s[t],r)},n)}function As(e,t,n=Se,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{vt();const l=Un(n),c=Ge(t,n,e,i);return l(),bt(),c});return s?r.unshift(o):r.push(o),o}}const Et=e=>(t,n=Se)=>{(!nn||e==="sp")&&As(e,(...s)=>t(...s),n)},Nc=Et("bm"),Dc=Et("m"),jc=Et("bu"),Lc=Et("u"),Vc=Et("bum"),Or=Et("um"),Fc=Et("sp"),kc=Et("rtg"),Hc=Et("rtc");function Bc(e,t=Se){As("ec",e,t)}const Uc="components";function Di(e,t){return zc(Uc,e,!0,t)||e}const qc=Symbol.for("v-ndc");function zc(e,t,n=!0,s=!1){const r=Ae||Se;if(r){const o=r.type;{const l=Pa(o,!1);if(l&&(l===t||l===Me(t)||l===ms(Me(t))))return o}const i=Zr(r[e]||o[e],t)||Zr(r.appContext[e],t);return!i&&s?o:i}}function Zr(e,t){return e&&(e[t]||e[Me(t)]||e[ms(Me(t))])}function eo(e,t,n,s){let r;const o=n,i=H(e);if(i||ue(e)){const l=i&&it(e);let c=!1,a=!1;l&&(c=!ke(e),a=lt(e),e=vs(e)),r=new Array(e.length);for(let u=0,f=e.length;ut(l,c,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,a=l.length;c0;return t!=="default"&&(a.name=t),mt(),Nn(De,null,[ae("slot",a,s)],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const l=gt.length;mt();let c;try{const a=i&&ji(i(n)),u=n.key||o||a&&a.key;c=Nn(De,{key:(u&&!He(u)?u:`_${t}`)+(!a&&s?"_fb":"")},a||(s?s():[]),a&&e._===1?64:-2)}catch(a){for(let u=gt.length;u>l;u--)Nr();throw a}finally{i&&i._c&&(i._d=!0)}return c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),c}function ji(e){return e.some(t=>Dn(t)?!(t.type===ct||t.type===De&&!ji(t.children)):!0)?e:null}const sr=e=>e?tl(e)?Cs(e):sr(e.parent):null,Sn=Ee(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>sr(e.parent),$root:e=>sr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Vi(e),$forceUpdate:e=>e.f||(e.f=()=>{xr(e.update)}),$nextTick:e=>e.n||(e.n=Es.bind(e.proxy)),$watch:e=>Ac.bind(e)}),Vs=(e,t)=>e!==oe&&!e.__isScriptSetup&&te(e,t),Kc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:c}=e;if(t[0]!=="$"){const g=i[t];if(g!==void 0)switch(g){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(Vs(s,t))return i[t]=1,s[t];if(r!==oe&&te(r,t))return i[t]=2,r[t];if(te(o,t))return i[t]=3,o[t];if(n!==oe&&te(n,t))return i[t]=4,n[t];rr&&(i[t]=0)}}const a=Sn[t];let u,f;if(a)return t==="$attrs"&&Re(e.attrs,"get",""),a(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==oe&&te(n,t))return i[t]=4,n[t];if(f=c.config.globalProperties,te(f,t))return f[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return Vs(r,t)?(r[t]=n,!0):s!==oe&&te(s,t)?(s[t]=n,!0):te(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:o,type:i}},l){let c;return!!(n[l]||e!==oe&&l[0]!=="$"&&te(e,l)||Vs(t,l)||te(o,l)||te(s,l)||te(Sn,l)||te(r.config.globalProperties,l)||(c=i.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:te(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function to(e){return H(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let rr=!0;function Gc(e){const t=Vi(e),n=e.proxy,s=e.ctx;rr=!1,t.beforeCreate&&no(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:c,inject:a,created:u,beforeMount:f,mounted:g,beforeUpdate:p,updated:y,activated:_,deactivated:x,beforeDestroy:R,beforeUnmount:S,destroyed:I,unmounted:T,render:j,renderTracked:X,renderTriggered:L,errorCaptured:B,serverPrefetch:V,expose:Z,inheritAttrs:fe,components:U,directives:de,filters:ge}=t;if(a&&Wc(a,s,null),i)for(const $ in i){const G=i[$];K(G)&&(s[$]=G.bind(n))}if(r){const $=r.call(n,n);ne($)&&(e.data=kn($))}if(rr=!0,o)for(const $ in o){const G=o[$],je=K(G)?G.bind(n,n):K(G.get)?G.get.bind(n,n):ot,wt=!K(G)&&K(G.set)?G.set.bind(n):ot,Je=Q({get:je,set:wt});Object.defineProperty(s,$,{enumerable:!0,configurable:!0,get:()=>Je.value,set:xe=>Je.value=xe})}if(l)for(const $ in l)Li(l[$],s,n,$);if(c){const $=K(c)?c.call(n):c;Reflect.ownKeys($).forEach(G=>{Xn(G,$[G])})}u&&no(u,e,"c");function ie($,G){H(G)?G.forEach(je=>$(je.bind(n))):G&&$(G.bind(n))}if(ie(Nc,f),ie(Dc,g),ie(jc,p),ie(Lc,y),ie(Tc,_),ie(Ic,x),ie(Bc,B),ie(Hc,X),ie(kc,L),ie(Vc,S),ie(Or,T),ie(Fc,V),H(Z))if(Z.length){const $=e.exposed||(e.exposed={});Z.forEach(G=>{Object.defineProperty($,G,{get:()=>n[G],set:je=>n[G]=je,enumerable:!0})})}else e.exposed||(e.exposed={});j&&e.render===ot&&(e.render=j),fe!=null&&(e.inheritAttrs=fe),U&&(e.components=U),de&&(e.directives=de),V&&Pr(e)}function Wc(e,t,n=ot){H(e)&&(e=or(e));for(const s in e){const r=e[s];let o;ne(r)?"default"in r?o=Ue(r.from||s,r.default,!0):o=Ue(r.from||s):o=Ue(r),pe(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function no(e,t,n){Ge(H(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Li(e,t,n,s){let r=s.includes(".")?Ti(n,s):()=>n[s];if(ue(e)){const o=t[e];K(o)&&Zt(r,o)}else if(K(e))Zt(r,e.bind(n));else if(ne(e))if(H(e))e.forEach(o=>Li(o,t,n,s));else{const o=K(e.handler)?e.handler.bind(n):t[e.handler];K(o)&&Zt(r,o,e)}}function Vi(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(a=>ls(c,a,i,!0)),ls(c,t,i)),ne(t)&&o.set(t,c),c}function ls(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&ls(e,o,n,!0),r&&r.forEach(i=>ls(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=Jc[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Jc={data:so,props:ro,emits:ro,methods:mn,computed:mn,beforeCreate:Pe,created:Pe,beforeMount:Pe,mounted:Pe,beforeUpdate:Pe,updated:Pe,beforeDestroy:Pe,beforeUnmount:Pe,destroyed:Pe,unmounted:Pe,activated:Pe,deactivated:Pe,errorCaptured:Pe,serverPrefetch:Pe,components:mn,directives:mn,watch:Yc,provide:so,inject:Qc};function so(e,t){return t?e?function(){return Ee(K(e)?e.call(this,this):e,K(t)?t.call(this,this):t)}:t:e}function Qc(e,t){return mn(or(e),or(t))}function or(e){if(H(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Me(t)}Modifiers`]||e[`${qt(t)}Modifiers`];function ta(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||oe;let r=n;const o=t.startsWith("update:"),i=o&&ea(s,t.slice(7));i&&(i.trim&&(r=n.map(u=>ue(u)?u.trim():u)),i.number&&(r=r.map(_s)));let l,c=s[l=Is(t)]||s[l=Is(Me(t))];!c&&o&&(c=s[l=Is(qt(t))]),c&&Ge(c,e,6,r);const a=s[l+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Ge(a,e,6,r)}}const na=new WeakMap;function ki(e,t,n=!1){const s=n?na:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!K(e)){const c=a=>{const u=ki(a,t,!0);u&&(l=!0,Ee(i,u))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(ne(e)&&s.set(e,null),null):(H(o)?o.forEach(c=>i[c]=null):Ee(i,o),ne(e)&&s.set(e,i),i)}function Rs(e,t){return!e||!ds(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),te(e,t[0].toLowerCase()+t.slice(1))||te(e,qt(t))||te(e,t))}function oo(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:c,render:a,renderCache:u,props:f,data:g,setupState:p,ctx:y,inheritAttrs:_}=e,x=os(e);let R,S;try{if(n.shapeFlag&4){const T=r||s,j=T;R=nt(a.call(j,T,u,f,p,g,y)),S=l}else{const T=t;R=nt(T.length>1?T(f,{attrs:l,slots:i,emit:c}):T(f,null)),S=t.props?l:sa(l)}}catch(T){gt.length=0,Bn(T,e,1),R=ae(ct)}let I=R;if(S&&_!==!1){const T=Object.keys(S),{shapeFlag:j}=I;T.length&&j&7&&(o&&T.some(hs)&&(S=ra(S,o)),I=tn(I,S,!1,!0))}if(n.dirs&&(I=tn(I,null,!1,!0),I.dirs=I.dirs?I.dirs.concat(n.dirs):n.dirs),n.transition){const T=ws(I.type)&&Mi(I)||I;Cr(T,n.transition)}return R=I,os(x),R}const sa=e=>{let t;for(const n in e)(n==="class"||n==="style"||ds(n))&&((t||(t={}))[n]=e[n]);return t},ra=(e,t)=>{const n={};for(const s in e)(!hs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function oa(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:l,patchFlag:c}=t,a=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?io(s,i,a):!!i;if(c&8){const u=t.dynamicProps;for(let f=0;fObject.create(Bi),qi=e=>Object.getPrototypeOf(e)===Bi;function la(e,t,n,s=!1){const r={},o=Ui();e.propsDefaults=Object.create(null),zi(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:bi(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function ca(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=Y(r),[c]=e.propsOptions;let a=!1;if((s||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f{c=!0;const[g,p]=$i(f,t,!0);Ee(i,g),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!c)return ne(e)&&s.set(e,Ft),Ft;if(H(o))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",Ir=e=>H(e)?e.map(nt):[nt(e)],ua=(e,t,n)=>{if(t._n)return t;const s=En((...r)=>Ir(t(...r)),n);return s._c=!1,s},Ki=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Tr(r))continue;const o=e[r];if(K(o))t[r]=ua(r,o,s);else if(o!=null){const i=Ir(o);t[r]=()=>i}}},Gi=(e,t)=>{const n=Ir(t);e.slots.default=()=>n},Wi=(e,t,n)=>{for(const s in t)(n||!Tr(s))&&(e[s]=t[s])},fa=(e,t,n)=>{const s=e.slots=Ui();if(e.vnode.shapeFlag&32){const r=t._;r?(Wi(s,t,n),n&&Zo(s,"_",r,!0)):Ki(t,s)}else t&&Gi(e,t)},da=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=oe;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:Wi(r,t,n):(o=!t.$stable,Ki(t,r)),i=t}else t&&(Gi(e,t),i={default:1});if(o)for(const l in r)!Tr(l)&&i[l]==null&&delete r[l]},Oe=_a;function ha(e){return pa(e)}function pa(e,t){const n=ys();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:c,setText:a,setElementText:u,parentNode:f,nextSibling:g,setScopeId:p=ot,insertStaticContent:y}=e,_=(d,h,m,b=null,w=null,v=null,O=void 0,P=null,C=!!h.dynamicChildren)=>{if(d===h)return;d&&!un(d,h)&&(b=E(d),xe(d,w,v,!0),d=null),h.patchFlag===-2&&(C=!1,h.dynamicChildren=null),h.dynamicChildren&&d&&d.dynamicChildren&&d.dynamicChildren.hasOnce&&(h.dynamicChildren===Ft&&(h.dynamicChildren=[]),h.dynamicChildren.hasOnce=!0);const{type:A,ref:q,shapeFlag:N}=h;switch(A){case xs:x(d,h,m,b);break;case ct:R(d,h,m,b);break;case ks:d==null&&S(h,m,b,O);break;case De:U(d,h,m,b,w,v,O,P,C);break;default:N&1?j(d,h,m,b,w,v,O,P,C):N&6?de(d,h,m,b,w,v,O,P,C):(N&64||N&128)&&A.process(d,h,m,b,w,v,O,P,C,F)}q!=null&&w?wn(q,d&&d.ref,v,h||d,!h):q==null&&d&&d.ref!=null&&wn(d.ref,null,v,d,!0)},x=(d,h,m,b)=>{if(d==null)s(h.el=l(h.children),m,b);else{const w=h.el=d.el;h.children!==d.children&&a(w,h.children)}},R=(d,h,m,b)=>{d==null?s(h.el=c(h.children||""),m,b):h.el=d.el},S=(d,h,m,b)=>{[d.el,d.anchor]=y(d.children,h,m,b,d.el,d.anchor)},I=({el:d,anchor:h},m,b)=>{let w;for(;d&&d!==h;)w=g(d),s(d,m,b),d=w;s(h,m,b)},T=({el:d,anchor:h})=>{let m;for(;d&&d!==h;)m=g(d),r(d),d=m;r(h)},j=(d,h,m,b,w,v,O,P,C)=>{if(h.type==="svg"?O="svg":h.type==="math"&&(O="mathml"),d==null)X(h,m,b,w,v,O,P,C);else{const A=d.el&&d.el._isVueCE?d.el:null;try{A&&A._beginPatch(),V(d,h,w,v,O,P,C)}finally{A&&A._endPatch()}}},X=(d,h,m,b,w,v,O,P)=>{let C,A;const{props:q,shapeFlag:N,transition:k,dirs:z}=d;if(C=d.el=i(d.type,v,q&&q.is,q),N&8?u(C,d.children):N&16&&B(d.children,C,null,b,w,Fs(d,v),O,P),z&&Dt(d,null,b,"created"),L(C,d,d.scopeId,O,b),q){for(const re in q)re!=="value"&&!yn(re)&&o(C,re,null,q[re],v,b);"value"in q&&o(C,"value",null,q.value,v),(A=q.onVnodeBeforeMount)&&Ze(A,b,d)}z&&Dt(d,null,b,"beforeMount");const J=ga(w,k);J&&k.beforeEnter(C),s(C,h,m),((A=q&&q.onVnodeMounted)||J||z)&&Oe(()=>{A&&Ze(A,b,d),J&&k.enter(C),z&&Dt(d,null,b,"mounted")},w)},L=(d,h,m,b,w)=>{if(m&&p(d,m),b)for(let v=0;v{for(let A=C;A{const P=h.el=d.el;let{patchFlag:C,dynamicChildren:A,dirs:q}=h;C|=d.patchFlag&16;const N=d.props||oe,k=h.props||oe;let z;if(m&&jt(m,!1),(z=k.onVnodeBeforeUpdate)&&Ze(z,m,h,d),q&&Dt(h,d,m,"beforeUpdate"),m&&jt(m,!0),A&&(!d.dynamicChildren||d.dynamicChildren.length!==A.length)&&(C=0,O=!1,A=null),(N.innerHTML&&k.innerHTML==null||N.textContent&&k.textContent==null)&&u(P,""),A?Z(d.dynamicChildren,A,P,m,b,Fs(h,w),v):O||G(d,h,P,null,m,b,Fs(h,w),v,!1),C>0){if(C&16)fe(P,N,k,m,w);else if(C&2&&N.class!==k.class&&o(P,"class",null,k.class,w),C&4&&o(P,"style",N.style,k.style,w),C&8){const J=h.dynamicProps;for(let re=0;re{z&&Ze(z,m,h,d),q&&Dt(h,d,m,"updated")},b)},Z=(d,h,m,b,w,v,O)=>{for(let P=0;P{if(h!==m){if(h!==oe)for(const v in h)!yn(v)&&!(v in m)&&o(d,v,h[v],null,w,b);for(const v in m){if(yn(v))continue;const O=m[v],P=h[v];O!==P&&v!=="value"&&o(d,v,P,O,w,b)}"value"in m&&o(d,"value",h.value,m.value,w)}},U=(d,h,m,b,w,v,O,P,C)=>{const A=h.el=d?d.el:l(""),q=h.anchor=d?d.anchor:l("");let{patchFlag:N,dynamicChildren:k,slotScopeIds:z}=h;z&&(P=P?P.concat(z):z),d==null?(s(A,m,b),s(q,m,b),B(h.children||[],m,q,w,v,O,P,C)):N>0&&N&64&&k&&d.dynamicChildren&&d.dynamicChildren.length===k.length?(Z(d.dynamicChildren,k,m,w,v,O,P),(h.key!=null||w&&h===w.subTree)&&Mr(d,h,!0)):G(d,h,m,q,w,v,O,P,C)},de=(d,h,m,b,w,v,O,P,C)=>{h.slotScopeIds=P,d==null?h.shapeFlag&512?w.ctx.activate(h,m,b,O,C):ge(h,m,b,w,v,O,C):ze(d,h,C)},ge=(d,h,m,b,w,v,O)=>{const P=d.component=Sa(d,b,w);if(Ss(d)&&(P.ctx.renderer=F),Aa(P,!1,O),P.asyncDep){if(w&&w.registerDep(P,ie,O),!d.el){const C=P.subTree=ae(ct);R(null,C,h,m),d.placeholder=C.el}}else ie(P,d,h,m,w,v,O)},ze=(d,h,m)=>{const b=h.component=d.component;if(oa(d,h,m))if(b.asyncDep&&!b.asyncResolved){h.el=d.el,$(b,h,m);return}else b.next=h,b.update();else h.el=d.el,b.vnode=h},ie=(d,h,m,b,w,v,O)=>{const P=()=>{if(d.isMounted){let{next:N,bu:k,u:z,parent:J,vnode:re}=d;{const Ye=Ji(d);if(Ye){N&&(N.el=re.el,$(d,N,O)),Ye.asyncDep.then(()=>{Oe(()=>{d.isUnmounted||A()},w)});return}}let se=N,_e;jt(d,!1),N?(N.el=re.el,$(d,N,O)):N=re,k&&Yn(k),(_e=N.props&&N.props.onVnodeBeforeUpdate)&&Ze(_e,J,N,re),jt(d,!0);const we=oo(d),Qe=d.subTree;d.subTree=we,_(Qe,we,f(Qe.el),E(Qe),d,w,v),N.el=we.el,se===null&&ia(d,we.el),z&&Oe(z,w),(_e=N.props&&N.props.onVnodeUpdated)&&Oe(()=>Ze(_e,J,N,re),w)}else{let N;const{el:k,props:z}=h,{bm:J,m:re,parent:se,root:_e,type:we}=d,Qe=en(h);jt(d,!1),J&&Yn(J),!Qe&&(N=z&&z.onVnodeBeforeMount)&&Ze(N,se,h),jt(d,!0);{_e.ce&&_e.ce._hasShadowRoot()&&_e.ce._injectChildStyle(we,d.parent?d.parent.type:void 0);const Ye=d.subTree=oo(d);_(null,Ye,m,b,d,w,v),h.el=Ye.el}if(re&&Oe(re,w),!Qe&&(N=z&&z.onVnodeMounted)){const Ye=h;Oe(()=>Ze(N,se,Ye),w)}(h.shapeFlag&256||se&&en(se.vnode)&&se.vnode.shapeFlag&256)&&d.a&&Oe(d.a,w),d.isMounted=!0,h=m=b=null}};d.scope.on();const C=d.effect=new ii(P);d.scope.off();const A=d.update=C.run.bind(C),q=d.job=C.runIfDirty.bind(C);q.i=d,q.id=d.uid,C.scheduler=()=>xr(q),jt(d,!0),A()},$=(d,h,m)=>{h.component=d;const b=d.vnode.props;d.vnode=h,d.next=null,ca(d,h.props,b,m),da(d,h.children,m),vt(),Gr(d),bt()},G=(d,h,m,b,w,v,O,P,C=!1)=>{const A=d&&d.children,q=d?d.shapeFlag:0,N=h.children,{patchFlag:k,shapeFlag:z}=h;if(k>0){if(k&128){wt(A,N,m,b,w,v,O,P,C);return}else if(k&256){je(A,N,m,b,w,v,O,P,C);return}}z&8?(q&16&&Be(A,w,v),N!==A&&u(m,N)):q&16?z&16?wt(A,N,m,b,w,v,O,P,C):Be(A,w,v,!0):(q&8&&u(m,""),z&16&&B(N,m,b,w,v,O,P,C))},je=(d,h,m,b,w,v,O,P,C)=>{d=d||Ft,h=h||Ft;const A=d.length,q=h.length,N=Math.min(A,q);let k;for(k=0;kq?Be(d,w,v,!0,!1,N):B(h,m,b,w,v,O,P,C,N)},wt=(d,h,m,b,w,v,O,P,C)=>{let A=0;const q=h.length;let N=d.length-1,k=q-1;for(;A<=N&&A<=k;){const z=d[A],J=h[A]=C?dt(h[A]):nt(h[A]);if(un(z,J))_(z,J,m,null,w,v,O,P,C);else break;A++}for(;A<=N&&A<=k;){const z=d[N],J=h[k]=C?dt(h[k]):nt(h[k]);if(un(z,J))_(z,J,m,null,w,v,O,P,C);else break;N--,k--}if(A>N){if(A<=k){const z=k+1,J=zk)for(;A<=N;)xe(d[A],w,v,!0),A++;else{const z=A,J=A,re=new Map;for(A=J;A<=k;A++){const Le=h[A]=C?dt(h[A]):nt(h[A]);Le.key!=null&&re.set(Le.key,A)}let se,_e=0;const we=k-J+1;let Qe=!1,Ye=0;const cn=new Array(we);for(A=0;A=we){xe(Le,w,v,!0);continue}let Xe;if(Le.key!=null)Xe=re.get(Le.key);else for(se=J;se<=k;se++)if(cn[se-J]===0&&un(Le,h[se])){Xe=se;break}Xe===void 0?xe(Le,w,v,!0):(cn[Xe-J]=A+1,Xe>=Ye?Ye=Xe:Qe=!0,_(Le,h[Xe],m,null,w,v,O,P,C),_e++)}const Fr=Qe?ma(cn):Ft;for(se=Fr.length-1,A=we-1;A>=0;A--){const Le=J+A,Xe=h[Le],kr=h[Le+1],Hr=Le+1{const{el:v,type:O,transition:P,children:C,shapeFlag:A}=d;if(A&6){Je(d.component.subTree,h,m,b);return}if(A&128){d.suspense.move(h,m,b);return}if(A&64){O.move(d,h,m,F);return}if(O===De){s(v,h,m);for(let N=0;NP.enter(v),w));else{const{leave:N,delayLeave:k,afterLeave:z}=P,J=()=>{d.ctx.isUnmounted?r(v):s(v,h,m)},re=()=>{const se=v._isLeaving||!!v[Ls];v._isLeaving&&v[Ls](!0),P.persisted&&!se?J():N(v,()=>{J(),z&&z()})};k?k(v,J,re):re()}else s(v,h,m)},xe=(d,h,m,b=!1,w=!1)=>{const{type:v,props:O,ref:P,children:C,dynamicChildren:A,shapeFlag:q,patchFlag:N,dirs:k,cacheIndex:z,memo:J}=d;if((N===-2||A&&A.hasOnce)&&(w=!1),P!=null&&(vt(),wn(P,null,m,d,!0),bt()),z!=null&&(!d.ctx||d.ctx===h)&&(h.renderCache[z]=void 0),q&256){h.ctx.deactivate(d);return}const re=q&1&&k,se=!en(d);let _e;if(se&&(_e=O&&O.onVnodeBeforeUnmount)&&Ze(_e,h,d),q&6)Nt(d.component,m,b);else{if(q&128){d.suspense.unmount(m,b);return}re&&Dt(d,null,h,"beforeUnmount"),q&64?d.type.remove(d,h,m,F,b):A&&!A.hasOnce&&(v!==De||N>0&&N&64)?Be(A,h,m,!1,!0):(v===De&&N&384||!w&&q&16)&&Be(C,h,m),b&&zt(d)}const we=J!=null&&z==null;(se&&(_e=O&&O.onVnodeUnmounted)||re||we)&&Oe(()=>{_e&&Ze(_e,h,d),re&&Dt(d,null,h,"unmounted"),we&&(d.el=null)},m)},zt=d=>{const{type:h,el:m,anchor:b,transition:w}=d;if(h===De){$t(m,b);return}if(h===ks){T(d),w&&!w.persisted&&w.afterLeave&&w.afterLeave();return}const v=()=>{r(m),w&&!w.persisted&&w.afterLeave&&w.afterLeave()};if(d.shapeFlag&1&&w&&!w.persisted){const{leave:O,delayLeave:P}=w,C=()=>O(m,v);P?P(d.el,v,C):C()}else v()},$t=(d,h)=>{let m;for(;d!==h;)m=g(d),r(d),d=m;r(h)},Nt=(d,h,m)=>{const{bum:b,scope:w,job:v,subTree:O,um:P,m:C,a:A}=d;co(C),co(A),b&&Yn(b),w.stop(),v?(v.flags|=8,xe(O,d,h,m)):d.vnode.el&&O&&(O.transition=d.vnode.transition,xe(O,d,h,m)),P&&Oe(P,h),Oe(()=>{d.isUnmounted=!0},h)},Be=(d,h,m,b=!1,w=!1,v=0)=>{for(let O=v;O{if(d.shapeFlag&6)return E(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const h=g(d.anchor||d.el),m=h&&h[Ii];return m?g(m):h};let D=!1;const M=(d,h,m)=>{let b;d==null?h._vnode&&(xe(h._vnode,null,null,!0),b=h._vnode.component):_(h._vnode||null,d,h,null,null,null,m),h._vnode=d,D||(D=!0,Gr(b),xi(),D=!1)},F={p:_,um:xe,m:Je,r:zt,mt:ge,mc:B,pc:G,pbc:Z,n:E,o:e};return{render:M,hydrate:void 0,createApp:Zc(M)}}function Fs({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function jt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ga(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Mr(e,t,n=!1){const s=e.children,r=t.children;if(H(s)&&H(r))for(let o=0;o>1,e[n[l]]0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function Ji(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ji(t)}function co(e){if(e)for(let t=0;te.__isSuspense;function _a(e,t){t&&t.pendingBranch?H(e)?t.effects.push(...e):t.effects.push(e):vc(e)}const De=Symbol.for("v-fgt"),xs=Symbol.for("v-txt"),ct=Symbol.for("v-cmt"),ks=Symbol.for("v-stc"),gt=[];let Fe=null;function mt(e=!1){gt.push(Fe=e?null:[])}function Nr(){gt.pop(),Fe=gt[gt.length-1]||null}let Mn=1;function cs(e,t=!1){Mn+=e,e<0&&Fe&&t&&(Fe.hasOnce=!0)}function Xi(e){return e.dynamicChildren=Mn>0?Fe||Ft:null,Nr(),Mn>0&&Fe&&Fe.push(e),e}function Zn(e,t,n,s,r,o){return Xi(Ve(e,t,n,s,r,o,!0))}function Nn(e,t,n,s,r){return Xi(ae(e,t,n,s,r,!0))}function Dn(e){return e?e.__v_isVNode===!0:!1}function un(e,t){return e.type===t.type&&e.key===t.key}const Zi=({key:e})=>e??null,es=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ue(e)||pe(e)||K(e)?{i:Ae,r:e,k:t,f:!!n}:e:null);function Ve(e,t=null,n=null,s=0,r=null,o=e===De?0:1,i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Zi(t),ref:t&&es(t),scopeId:Pi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Ae};return l?(as(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=ue(n)?8:16),Mn>0&&!i&&Fe&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&Fe.push(c),c}const ae=ya;function ya(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===qc)&&(e=ct),Dn(e)){const l=tn(e,t,!0);return n&&as(l,n),Mn>0&&!o&&Fe&&(l.shapeFlag&6?Fe[Fe.indexOf(e)]=l:Fe.push(l)),l.patchFlag=-2,l}if(Oa(e)&&(e=e.__vccOpts),t){t=va(t);let{class:l,style:c}=t;l&&!ue(l)&&(t.class=Pn(l)),ne(c)&&(bs(c)&&!H(c)&&(c=Ee({},c)),t.style=_r(c))}const i=ue(e)?1:Yi(e)?128:ws(e)?64:ne(e)?4:K(e)?2:0;return Ve(e,t,n,s,r,i,o,!0)}function va(e){return e?bs(e)||qi(e)?Ee({},e):e:null}function tn(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:c}=e,a=t?ba(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&Zi(a),ref:t&&t.ref?n&&o?H(o)?o.concat(es(t)):[o,es(t)]:es(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==De?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&tn(e.ssContent),ssFallback:e.ssFallback&&tn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&s&&Cr(u,c.clone(u)),u}function lr(e=" ",t=0){return ae(xs,null,e,t)}function Kf(e="",t=!1){return t?(mt(),Nn(ct,null,e)):ae(ct,null,e)}function nt(e){return e==null||typeof e=="boolean"?ae(ct):H(e)?ae(De,null,e.slice()):Dn(e)?dt(e):ae(xs,null,String(e))}function dt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:tn(e)}function as(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(H(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),as(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!qi(t)?t._ctx=Ae:r===3&&Ae&&(Ae.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(K(t)){if(s&65){as(e,{default:t});return}t={default:t,_ctx:Ae},n=32}else t=String(t),s&64?(n=16,t=[lr(t)]):n=8;e.children=t,e.shapeFlag|=n}function ba(...e){const t={};for(let n=0;nSe||Ae;let us,jn;{const e=ys(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};us=t("__VUE_INSTANCE_SETTERS__",n=>Se=n),jn=t("__VUE_SSR_SETTERS__",n=>nn=n)}const Un=e=>{const t=Se;return us(e),e.scope.on(),()=>{e.scope.off(),us(t)}},ao=()=>{Se&&Se.scope.off(),us(null)};function tl(e){return e.vnode.shapeFlag&4}let nn=!1;function Aa(e,t=!1,n=!1){t&&jn(t);const{props:s,children:r}=e.vnode,o=tl(e);la(e,s,o,t),fa(e,r,n||t);const i=o?Ra(e,t):void 0;return t&&jn(!1),i}function Ra(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Kc);const{setup:s}=n;if(s){vt();const r=e.setupContext=s.length>1?Ca(e):null,o=Un(e),i=Hn(s,e,0,[e.props,r]),l=Qo(i);if(bt(),o(),(l||e.sp)&&!en(e)&&Pr(e),l){if(i.then(ao,ao),t)return i.then(c=>{jn(!0);try{uo(e,c,t)}finally{jn(!1)}}).catch(c=>{Bn(c,e,0)});e.asyncDep=i}else uo(e,i)}else nl(e)}function uo(e,t,n){K(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ne(t)&&(e.setupState=Si(t)),nl(e)}function nl(e,t,n){const s=e.type;e.render||(e.render=s.render||ot);{const r=Un(e);vt();try{Gc(e)}finally{bt(),r()}}}const xa={get(e,t){return Re(e,"get",""),e[t]}};function Ca(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,xa),slots:e.slots,emit:e.emit,expose:t}}function Cs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Si(Rr(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Sn)return Sn[n](e)},has(t,n){return n in t||n in Sn}})):e.proxy}function Pa(e,t=!0){return K(e)?e.displayName||e.name:e.name||t&&e.__name}function Oa(e){return K(e)&&"__vccOpts"in e}const Q=(e,t)=>pc(e,t,nn);function sl(e,t,n){try{cs(-1);const s=arguments.length;return s===2?ne(t)&&!H(t)?Dn(t)?ae(e,null,[t]):ae(e,t):ae(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Dn(n)&&(n=[n]),ae(e,t,n))}finally{cs(1)}}const Ta="3.5.43";let cr;const fo=typeof window<"u"&&window.trustedTypes;if(fo)try{cr=fo.createPolicy("vue",{createHTML:e=>e})}catch{}const rl=cr?e=>cr.createHTML(e):e=>e,Ia="http://www.w3.org/2000/svg",Ma="http://www.w3.org/1998/Math/MathML",ft=typeof document<"u"?document:null,ho=ft&&ft.createElement("template"),Na={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?ft.createElementNS(Ia,e):t==="mathml"?ft.createElementNS(Ma,e):n?ft.createElement(e,{is:n}):ft.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>ft.createTextNode(e),createComment:e=>ft.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ft.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{ho.innerHTML=rl(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=ho.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Da=Symbol("_vtc");function ja(e,t,n){const s=e[Da];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const fs=Symbol("_vod"),ol=Symbol("_vsh"),La={name:"show",beforeMount(e,{value:t},{transition:n}){e[fs]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):fn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),fn(e,!0),s.enter(e)):s.leave(e,()=>{fn(e,!1)}):fn(e,t))},beforeUnmount(e,{value:t}){fn(e,t)}};function fn(e,t){e.style.display=t?e[fs]:"none",e[ol]=!t}const Va=Symbol(""),Fa=/(?:^|;)\s*display\s*:/;function ka(e,t,n){const s=e.style,r=ue(n);let o=!1;if(n&&!r){if(t)if(ue(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&_n(s,l,"")}else for(const i in t)n[i]==null&&_n(s,i,"");for(const i in n){i==="display"&&(o=!0);const l=n[i];l!=null?Ba(e,i,!ue(t)&&t?t[i]:void 0,l)||_n(s,i,l):_n(s,i,"")}}else if(r){if(t!==n){const i=s[Va];i&&(n+=";"+i),s.cssText=n,o=Fa.test(n)}}else t&&e.removeAttribute("style");fs in e&&(e[fs]=o?s.display:"",e[ol]&&(s.display="none"))}const Jn=/\s*!important$/;function _n(e,t,n){if(H(n))n.forEach(s=>_n(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))Jn.test(n)?e.setProperty(t,n.replace(Jn,""),"important"):e.setProperty(t,n);else{const s=Ha(e,t);Jn.test(n)?e.setProperty(qt(s),n.replace(Jn,""),"important"):e[s]=n}}const po=["Webkit","Moz","ms"],Hs={};function Ha(e,t){const n=Hs[t];if(n)return n;let s=Me(t);if(s!=="filter"&&s in e)return Hs[t]=s;s=ms(s);for(let r=0;rBs||(Ga.then(()=>Bs=0),Bs=Date.now());function Ja(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(H(r)){const o=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{o.call(s),s._stopped=!0};const i=r.slice(),l=[s];for(let c=0;ce.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Qa=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?ja(e,s,i):t==="style"?ka(e,n,s):ds(t)?hs(t)||qa(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ya(e,t,s,i))?(_o(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&mo(e,t,s,i,o,t!=="value")):e._isVueCE&&(Xa(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ue(s)))?_o(e,Me(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),mo(e,t,s,i))};function Ya(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&vo(t)&&K(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return vo(t)&&ue(n)?!1:t in e}function Xa(e,t){const n=e._def.props;if(!n)return!1;const s=Me(t);return Array.isArray(n)?n.some(r=>Me(r)===s):Object.keys(n).some(r=>Me(r)===s)}const sn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return H(t)?n=>Yn(t,n):t};function Za(e){e.target.composing=!0}function bo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const rt=Symbol("_assign"),Qn=Symbol("_initialValue");function Us(e,t,n){return t&&(e=e.trim()),n&&(e=_s(e)),e}const Gf={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e.parentNode&&(e.type==="text"?e[Qn]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Qn]=e.defaultValue.replace(/\r\n?/g,` +`))),e[rt]=sn(r);const o=s||r.props&&r.props.type==="number";Tt(e,t?"change":"input",i=>{i.target.composing||e[rt](Us(e.value,n,o))}),(n||o)&&Tt(e,"change",()=>{e.value=Us(e.value,n,o)}),t||(Tt(e,"compositionstart",Za),Tt(e,"compositionend",bo),Tt(e,"change",bo))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const r=t??"",o=e[Qn];delete e[Qn],o!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==o?e[rt](Us(e.value,n,s)):e.value=r},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},i){if(e[rt]=sn(i),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?_s(e.value):e.value,c=t??"";if(l===c)return;const a=e.getRootNode();(a instanceof Document||a instanceof ShadowRoot)&&a.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c)}},Wf={deep:!0,created(e,t,n){e[rt]=sn(n),Tt(e,"change",()=>{const s=e._modelValue,r=Ln(e),o=e.checked,i=e[rt];if(H(s)){const l=yr(s,r),c=l!==-1;if(o&&!c)i(s.concat(r));else if(!o&&c){const a=[...s];a.splice(l,1),i(a)}}else if(_t(s)){const l=new Set(s);o?l.add(r):l.delete(r),i(l)}else i(il(e,o))})},mounted:Eo,beforeUpdate(e,t,n){e[rt]=sn(n),Eo(e,t,n)}};function Eo(e,{value:t,oldValue:n},s){e._modelValue=t;let r;if(H(t))r=yr(t,s.props.value)>-1;else if(_t(t))r=t.has(s.props.value);else{if(t===n)return;r=yt(t,il(e,!0))}e.checked!==r&&(e.checked=r)}const Jf={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,Tt(e,"change",()=>{const r=Array.prototype.filter.call(e.options,c=>c.selected).map(c=>n?_s(Ln(c)):Ln(c)),o=e.multiple,i=o?_t(e._modelValue)?new Set(r):r:r[0],l=e._pendingValue=[o,o?H(i)?r.slice():r:i];try{e[rt](i)}finally{Es(()=>{e._pendingValue===l&&(e._pendingValue=void 0)})}}),e[rt]=sn(s)},mounted(e,{value:t}){wo(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[rt]=sn(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!eu(t,n[1],n[0]))&&wo(e,t)}};function eu(e,t,n){if(!n||H(e))return yt(e,t);if(_t(e)){if(e.size!==t.length)return!1;for(const s of t)if(!e.has(s))return!1;return!0}return!1}function wo(e,t){const n=e.multiple,s=H(t);if(!(n&&!s&&!_t(t))){for(let r=0,o=e.options.length;rString(a)===String(l)):i.selected=yr(t,l)>-1}else i.selected=t.has(l);else if(yt(Ln(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ln(e){return"_value"in e?e._value:e.value}function il(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const tu=["ctrl","shift","alt","meta"],nu={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>tu.some(n=>e[`${n}Key`]&&!t.includes(n))},Qf=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((r,...o)=>{for(let i=0;i{const t=ru().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=lu(s);if(!r)return;const o=t._component;!K(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=n(r,!1,iu(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t});function iu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function lu(e){return ue(e)?document.querySelector(e):e}let ll;const Ps=e=>ll=e,cl=Symbol();function ar(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var An;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(An||(An={}));function cu(){const e=ri(!0),t=e.run(()=>be({}));let n=[],s=[];const r=Rr({install(o){Ps(r),r._a=o,o.provide(cl,r),o.config.globalProperties.$pinia=r,s.forEach(i=>n.push(i)),s=[]},use(o){return this._a?n.push(o):s.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const al=()=>{};function Ao(e,t,n,s=al){e.add(t);const r=()=>{e.delete(t)&&s()};return!n&&oi()&&ql(r),r}function Wt(e,...t){e.forEach(n=>{n(...t)})}const au=e=>e(),Ro=Symbol(),qs=Symbol();function ur(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];ar(r)&&ar(s)&&e.hasOwnProperty(n)&&!pe(s)&&!it(s)?e[n]=ur(r,s):e[n]=s}return e}const uu=Symbol();function fu(e){return!ar(e)||!Object.prototype.hasOwnProperty.call(e,uu)}const{assign:xt}=Object;function du(e){return!!(pe(e)&&e.effect)}function hu(e,t,n,s){const{state:r,actions:o,getters:i}=t,l=n.state.value[e];let c;function a(){l||(n.state.value[e]=r?r():{});const u=uc(n.state.value[e]);return xt(u,o,Object.keys(i||{}).reduce((f,g)=>(f[g]=Rr(Q(()=>{Ps(n);const p=n._s.get(e);return i[g].call(p,p)})),f),{}))}return c=ul(e,a,t,n,s,!0),c}function ul(e,t,n={},s,r,o){let i;const l=xt({actions:{}},n),c={deep:!0};let a,u,f=new Set,g=new Set,p;const y=s.state.value[e];!o&&!y&&(s.state.value[e]={});let _;function x(B){let V;a=u=!1,typeof B=="function"?(B(s.state.value[e]),V={type:An.patchFunction,storeId:e,events:p}):(ur(s.state.value[e],B),V={type:An.patchObject,payload:B,storeId:e,events:p});const Z=_=Symbol();Es().then(()=>{_===Z&&(a=!0)}),u=!0,Wt(f,V,s.state.value[e])}const R=o?function(){const{state:V}=n,Z=V?V():{};this.$patch(fe=>{xt(fe,Z)})}:al;function S(){i.stop(),f.clear(),g.clear(),s._s.delete(e)}const I=(B,V="")=>{if(Ro in B)return B[qs]=V,B;const Z=function(){Ps(s);const fe=Array.from(arguments),U=new Set,de=new Set;function ge($){U.add($)}function ze($){de.add($)}Wt(g,{args:fe,name:Z[qs],store:j,after:ge,onError:ze});let ie;try{ie=B.apply(this&&this.$id===e?this:j,fe)}catch($){throw Wt(de,$),$}return ie instanceof Promise?ie.then($=>(Wt(U,$),$)).catch($=>(Wt(de,$),Promise.reject($))):(Wt(U,ie),ie)};return Z[Ro]=!0,Z[qs]=V,Z},T={_p:s,$id:e,$onAction:Ao.bind(null,g),$patch:x,$reset:R,$subscribe(B,V={}){const Z=Ao(f,B,V.detached,()=>fe()),fe=i.run(()=>Zt(()=>s.state.value[e],U=>{(V.flush==="sync"?u:a)&&B({storeId:e,type:An.direct,events:p},U)},xt({},c,V)));return Z},$dispose:S},j=kn(T);s._s.set(e,j);const L=(s._a&&s._a.runWithContext||au)(()=>s._e.run(()=>(i=ri()).run(()=>t({action:I}))));for(const B in L){const V=L[B];if(pe(V)&&!du(V)||it(V))o||(y&&fu(V)&&(pe(V)?V.value=y[B]:ur(V,y[B])),s.state.value[e][B]=V);else if(typeof V=="function"){const Z=I(V,B);L[B]=Z,l.actions[B]=V}}return xt(j,L),xt(Y(j),L),Object.defineProperty(j,"$state",{get:()=>s.state.value[e],set:B=>{x(V=>{xt(V,B)})}}),s._p.forEach(B=>{xt(j,i.run(()=>B({store:j,app:s._a,pinia:s,options:l})))}),y&&o&&n.hydrate&&n.hydrate(j.$state,y),a=!0,u=!0,j}function qn(e,t,n){let s;const r=typeof t=="function";s=r?n:t;function o(i,l){const c=Ec();return i=i||(c?Ue(cl,null):null),i&&Ps(i),i=ll,i._s.has(e)||(r?ul(e,t,s,i):hu(e,s,i)),i._s.get(e)}return o.$id=e,o}const Yt=typeof document<"u";function fl(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function pu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&fl(e.default)}const ee=Object.assign;function zs(e,t){const n={};for(const s in t){const r=t[s];n[s]=We(r)?r.map(e):e(r)}return n}const Rn=()=>{},We=Array.isArray;function xo(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const dl=/#/g,gu=/&/g,mu=/\//g,_u=/=/g,yu=/\?/g,hl=/\+/g,vu=/%5B/g,bu=/%5D/g,pl=/%5E/g,Eu=/%60/g,gl=/%7B/g,wu=/%7C/g,ml=/%7D/g,Su=/%20/g;function Dr(e){return e==null?"":encodeURI(""+e).replace(wu,"|").replace(vu,"[").replace(bu,"]")}function Au(e){return Dr(e).replace(gl,"{").replace(ml,"}").replace(pl,"^")}function fr(e){return Dr(e).replace(hl,"%2B").replace(Su,"+").replace(dl,"%23").replace(gu,"%26").replace(Eu,"`").replace(gl,"{").replace(ml,"}").replace(pl,"^")}function Ru(e){return fr(e).replace(_u,"%3D")}function xu(e){return Dr(e).replace(dl,"%23").replace(yu,"%3F")}function Cu(e){return xu(e).replace(mu,"%2F")}function Vn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Pu=/\/$/,Ou=e=>e.replace(Pu,"");function $s(e,t,n="/"){let s,r={},o="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return c=l>=0&&c>l?-1:c,c>=0&&(s=t.slice(0,c),o=t.slice(c,l>0?l:t.length),r=e(o.slice(1))),l>=0&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=Nu(s??t,n),{fullPath:s+o+i,path:s,query:r,hash:Vn(i)}}function Tu(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Co(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Iu(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&rn(t.matched[s],n.matched[r])&&_l(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function rn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function _l(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Mu(e[n],t[n]))return!1;return!0}function Mu(e,t){return We(e)?Po(e,t):We(t)?Po(t,e):e?.valueOf()===t?.valueOf()}function Po(e,t){return We(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Nu(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,i,l;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(i).join("/")}const St={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let dr=(function(e){return e.pop="pop",e.push="push",e})({}),Ks=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Du(e){if(!e)if(Yt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Ou(e)}const ju=/^[^#]+#/;function Lu(e,t){return e.replace(ju,"#")+t}function Vu(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Os=()=>({left:window.scrollX,top:window.scrollY});function Fu(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Vu(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Oo(e,t){return(history.state?history.state.position-t:-1)+e}const hr=new Map;function ku(e,t){hr.set(e,t)}function Hu(e){const t=hr.get(e);return hr.delete(e),t}function Bu(e){return typeof e=="string"||e&&typeof e=="object"}function yl(e){return typeof e=="string"||typeof e=="symbol"}let he=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const vl=Symbol("");he.MATCHER_NOT_FOUND+"",he.NAVIGATION_GUARD_REDIRECT+"",he.NAVIGATION_ABORTED+"",he.NAVIGATION_CANCELLED+"",he.NAVIGATION_DUPLICATED+"";function on(e,t){return ee(new Error,{type:e,[vl]:!0},t)}function ut(e,t){return e instanceof Error&&vl in e&&(t==null||!!(e.type&t))}const Uu=["params","query","hash"];function qu(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Uu)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function zu(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;sr&&fr(r)):[s&&fr(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function $u(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=We(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const Ku=Symbol(""),Io=Symbol(""),Ts=Symbol(""),jr=Symbol(""),pr=Symbol("");function dn(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Ot(e,t,n,s,r,o=i=>i()){const i=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((l,c)=>{const a=g=>{g===!1?c(on(he.NAVIGATION_ABORTED,{from:n,to:t})):g instanceof Error?c(g):Bu(g)?c(on(he.NAVIGATION_GUARD_REDIRECT,{from:t,to:g})):(i&&s.enterCallbacks[r]===i&&typeof g=="function"&&i.push(g),l())},u=o(()=>e.call(s&&s.instances[r],t,n,a));let f=Promise.resolve(u);e.length<3&&(f=f.then(a)),f.catch(g=>c(g))})}function Gs(e,t,n,s,r=o=>o()){const o=[];for(const i of e)for(const l in i.components){let c=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(fl(c)){const a=(c.__vccOpts||c)[t];a&&o.push(Ot(a,n,s,i,l,r))}else{let a=c();o.push(()=>a.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${l}" at "${i.path}"`);const f=pu(u)?u.default:u;i.mods[l]=u,i.components[l]=f;const g=(f.__vccOpts||f)[t];return g&&Ot(g,n,s,i,l,r)()}))}}return o}function Gu(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;irn(a,l))?s.push(l):n.push(l));const c=e.matched[i];c&&(t.matched.find(a=>rn(a,c))||r.push(c))}return[n,s,r]}let Wu=()=>location.protocol+"//"+location.host;function bl(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let i=r.includes(e.slice(o))?e.slice(o).length:1,l=r.slice(i);return l[0]!=="/"&&(l="/"+l),Co(l,"")}return Co(n,e)+s+r}function Ju(e,t,n,s){let r=[],o=[],i=null;const l=({state:g})=>{const p=bl(e,location),y=n.value,_=t.value;let x=0;if(g){if(n.value=p,t.value=g,i&&i===y){i=null;return}x=_?g.position-_.position:0}else s(p);r.forEach(R=>{R(n.value,y,{delta:x,type:dr.pop,direction:x?x>0?Ks.forward:Ks.back:Ks.unknown})})};function c(){i=n.value}function a(g){r.push(g);const p=()=>{const y=r.indexOf(g);y>-1&&r.splice(y,1)};return o.push(p),p}function u(){if(document.visibilityState==="hidden"){const{history:g}=window;if(!g.state)return;g.replaceState(ee({},g.state,{scroll:Os()}),"")}}function f(){for(const g of o)g();o=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:c,listen:a,destroy:f}}function Mo(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?Os():null}}function Qu(e){const{history:t,location:n}=window,s={value:bl(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(c,a,u){const f=e.indexOf("#"),g=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+c:Wu()+e+c;try{t[u?"replaceState":"pushState"](a,"",g),r.value=a}catch(p){console.error(p),n[u?"replace":"assign"](g)}}function i(c,a){o(c,ee({},t.state,Mo(r.value.back,c,r.value.forward,!0),a,{position:r.value.position}),!0),s.value=c}function l(c,a){const u=ee({},r.value,t.state,{forward:c,scroll:Os()});o(u.current,u,!0),o(c,ee({},Mo(s.value,c,null),{position:u.position+1},a),!1),s.value=c}return{location:s,state:r,push:l,replace:i}}function Yu(e){e=Du(e);const t=Qu(e),n=Ju(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=ee({location:"",base:e,go:s,createHref:Lu.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let kt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var ye=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(ye||{});const Xu={type:kt.Static,value:""},Zu=/[a-zA-Z0-9_]/;function ef(e){if(!e)return[[]];if(e==="/")return[[Xu]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${a}": ${p}`)}let n=ye.Static,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let l=0,c,a="",u="";function f(){a&&(n===ye.Static?o.push({type:kt.Static,value:a}):n===ye.Param||n===ye.ParamRegExp||n===ye.ParamRegExpEnd?(o.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),o.push({type:kt.Param,value:a,regexp:u,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),a="")}function g(){a+=c}for(;lt.length?t.length===1&&t[0]===Te.Static+Te.Segment?1:-1:0}function El(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const of={strict:!1,end:!0,sensitive:!1};function lf(e,t,n){const s=sf(ef(e.path),n),r=ee(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function cf(e,t){const n=[],s=new Map;t=xo(of,t);function r(f){return s.get(f)}function o(f,g,p){const y=!p,_=Lo(f);_.aliasOf=p&&p.record;const x=xo(t,f),R=[_];if("alias"in f){const T=typeof f.alias=="string"?[f.alias]:f.alias;for(const j of T)R.push(Lo(ee({},_,{components:p?p.record.components:_.components,path:j,aliasOf:p?p.record:_})))}let S,I;for(const T of R){const{path:j}=T;if(g&&j[0]!=="/"){const X=g.record.path,L=X[X.length-1]==="/"?"":"/";T.path=g.record.path+(j&&L+j)}if(S=lf(T,g,x),p?p.alias.push(S):(I=I||S,I!==S&&I.alias.push(S),y&&f.name&&!Vo(S)&&i(f.name)),wl(S)&&c(S),_.children){const X=_.children;for(let L=0;L{i(I)}:Rn}function i(f){if(yl(f)){const g=s.get(f);g&&(s.delete(f),n.splice(n.indexOf(g),1),g.children.forEach(i),g.alias.forEach(i))}else{const g=n.indexOf(f);g>-1&&(n.splice(g,1),f.record.name&&s.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function l(){return n}function c(f){const g=ff(f,n);n.splice(g,0,f),f.record.name&&!Vo(f)&&s.set(f.record.name,f)}function a(f,g){let p,y={},_,x;if("name"in f&&f.name){if(p=s.get(f.name),!p)throw on(he.MATCHER_NOT_FOUND,{location:f});x=p.record.name,y=ee(jo(g.params,p.keys.filter(I=>!I.optional).concat(p.parent?p.parent.keys.filter(I=>I.optional):[]).map(I=>I.name)),f.params&&jo(f.params,p.keys.map(I=>I.name))),_=p.stringify(y)}else if(f.path!=null)_=f.path,p=n.find(I=>I.re.test(_)),p&&(y=p.parse(_),x=p.record.name);else{if(p=g.name?s.get(g.name):n.find(I=>I.re.test(g.path)),!p)throw on(he.MATCHER_NOT_FOUND,{location:f,currentLocation:g});x=p.record.name,y=ee({},g.params,f.params),_=p.stringify(y)}const R=[];let S=p;for(;S;)R.unshift(S.record),S=S.parent;return{name:x,path:_,params:y,matched:R,meta:uf(R)}}e.forEach(f=>o(f));function u(){n.length=0,s.clear()}return{addRoute:o,resolve:a,removeRoute:i,clearRoutes:u,getRoutes:l,getRecordMatcher:r}}function jo(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Lo(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:af(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function af(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function Vo(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function uf(e){return e.reduce((t,n)=>ee(t,n.meta),{})}function ff(e,t){let n=0,s=t.length;for(;n!==s;){const o=n+s>>1;El(e,t[o])<0?s=o:n=o+1}const r=df(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function df(e){let t=e;for(;t=t.parent;)if(wl(t)&&El(e,t)===0)return t}function wl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Fo(e){const t=Ue(Ts),n=Ue(jr),s=Q(()=>{const c=$e(e.to);return t.resolve(c)}),r=Q(()=>{const{matched:c}=s.value,{length:a}=c,u=c[a-1],f=n.matched;if(!u||!f.length)return-1;const g=f.findIndex(rn.bind(null,u));if(g>-1)return g;const p=ko(c[a-2]);return a>1&&ko(u)===p&&f[f.length-1].path!==p?f.findIndex(rn.bind(null,c[a-2])):g}),o=Q(()=>r.value>-1&&_f(n.params,s.value.params)),i=Q(()=>r.value>-1&&r.value===n.matched.length-1&&_l(n.params,s.value.params));function l(c={}){if(mf(c)){const a=t[$e(e.replace)?"replace":"push"]($e(e.to)).catch(Rn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>a),a}return Promise.resolve()}return{route:s,href:Q(()=>s.value.href),isActive:o,isExactActive:i,navigate:l}}function hf(e){return e.length===1?e[0]:e}const pf=ln({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Fo,setup(e,{slots:t}){const n=kn(Fo(e)),{options:s}=Ue(Ts),r=Q(()=>({[Ho(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Ho(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&hf(t.default(n));return e.custom?o:sl("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),gf=pf;function mf(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function _f(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!We(r)||r.length!==s.length||s.some((o,i)=>o.valueOf()!==r[i].valueOf()))return!1}return!0}function ko(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ho=(e,t,n)=>e??t??n,yf=ln({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=Ue(pr),r=Q(()=>e.route||s.value),o=Ue(Io,0),i=Q(()=>{let a=$e(o);const{matched:u}=r.value;let f;for(;(f=u[a])&&!f.components;)a++;return a}),l=Q(()=>r.value.matched[i.value]);Xn(Io,Q(()=>i.value+1)),Xn(Ku,l),Xn(pr,r);const c=be();return Zt(()=>[c.value,l.value,e.name],([a,u,f],[g,p,y])=>{u&&(u.instances[f]=a,p&&p!==u&&a&&a===g&&(u.leaveGuards.size||(u.leaveGuards=p.leaveGuards),u.updateGuards.size||(u.updateGuards=p.updateGuards))),a&&u&&(!p||!rn(u,p)||!g)&&(u.enterCallbacks[f]||[]).forEach(_=>_(a))},{flush:"post"}),()=>{const a=r.value,u=e.name,f=l.value,g=f&&f.components[u];if(!g)return Bo(n.default,{Component:g,route:a});const p=f.props[u],y=p?p===!0?a.params:typeof p=="function"?p(a):p:null,x=sl(g,ee({},y,t,{onVnodeUnmounted:R=>{R.component.isUnmounted&&(f.instances[u]=null)},ref:c}));return Bo(n.default,{Component:x,route:a})||x}}});function Bo(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const vf=yf;function bf(e){const t=cf(e.routes,e),n=e.parseQuery||zu,s=e.stringifyQuery||To,r=e.history,o=dn(),i=dn(),l=dn(),c=Ei(St);let a=St;Yt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=zs.bind(null,E=>""+E),f=zs.bind(null,Cu),g=zs.bind(null,Vn);function p(E,D){let M,F;return yl(E)?(M=t.getRecordMatcher(E),F=D):F=E,t.addRoute(F,M)}function y(E){const D=t.getRecordMatcher(E);D&&t.removeRoute(D)}function _(){return t.getRoutes().map(E=>E.record)}function x(E){return!!t.getRecordMatcher(E)}function R(E,D){if(D=ee({},D||c.value),typeof E=="string"){const m=$s(n,E,D.path),b=t.resolve({path:m.path},D),w=r.createHref(m.fullPath);return ee(m,b,{params:g(b.params),hash:Vn(m.hash),redirectedFrom:void 0,href:w})}let M;if(E.path!=null)M=ee({},E,{path:$s(n,E.path,D.path).path});else{const m=ee({},E.params);for(const b in m)m[b]==null&&delete m[b];M=ee({},E,{params:f(m)}),D.params=f(D.params)}const F=t.resolve(M,D),W=E.hash||"";F.params=u(g(F.params));const d=Tu(s,ee({},E,{hash:Au(W),path:F.path})),h=r.createHref(d);return ee({fullPath:d,hash:W,query:s===To?$u(E.query):E.query||{}},F,{redirectedFrom:void 0,href:h})}function S(E){return typeof E=="string"?$s(n,E,c.value.path):ee({},E)}function I(E,D){if(a!==E)return on(he.NAVIGATION_CANCELLED,{from:D,to:E})}function T(E){return L(E)}function j(E){return T(ee(S(E),{replace:!0}))}function X(E,D){const M=E.matched[E.matched.length-1];if(M&&M.redirect){const{redirect:F}=M;let W=typeof F=="function"?F(E,D):F;return typeof W=="string"&&(W=W.includes("?")||W.includes("#")?W=S(W):{path:W},W.params={}),ee({query:E.query,hash:E.hash,params:W.path!=null?{}:E.params},W)}}function L(E,D){const M=a=R(E),F=c.value,W=E.state,d=E.force,h=E.replace===!0,m=X(M,F);if(m)return L(ee(S(m),{state:typeof m=="object"?ee({},W,m.state):W,force:d,replace:h}),D||M);const b=M;b.redirectedFrom=D;let w;return!d&&Iu(s,F,M)&&(w=on(he.NAVIGATION_DUPLICATED,{to:b,from:F}),Je(F,F,!0,!1)),(w?Promise.resolve(w):Z(b,F)).catch(v=>ut(v)?ut(v,he.NAVIGATION_GUARD_REDIRECT)?v:wt(v):G(v,b,F)).then(v=>{if(v){if(ut(v,he.NAVIGATION_GUARD_REDIRECT))return L(ee({replace:h},S(v.to),{state:typeof v.to=="object"?ee({},W,v.to.state):W,force:d}),D||b)}else v=U(b,F,!0,h,W);return fe(b,F,v),v})}function B(E,D){const M=I(E,D);return M?Promise.reject(M):Promise.resolve()}function V(E){const D=$t.values().next().value;return D&&typeof D.runWithContext=="function"?D.runWithContext(E):E()}function Z(E,D){let M;const[F,W,d]=Gu(E,D);M=Gs(F.reverse(),"beforeRouteLeave",E,D);for(const m of F)m.leaveGuards.forEach(b=>{M.push(Ot(b,E,D))});const h=B.bind(null,E,D);return M.push(h),Be(M).then(()=>{M=[];for(const m of o.list())M.push(Ot(m,E,D));return M.push(h),Be(M)}).then(()=>{M=Gs(W,"beforeRouteUpdate",E,D);for(const m of W)m.updateGuards.forEach(b=>{M.push(Ot(b,E,D))});return M.push(h),Be(M)}).then(()=>{M=[];for(const m of d)if(m.beforeEnter)if(We(m.beforeEnter))for(const b of m.beforeEnter)M.push(Ot(b,E,D));else M.push(Ot(m.beforeEnter,E,D));return M.push(h),Be(M)}).then(()=>(E.matched.forEach(m=>m.enterCallbacks={}),M=Gs(d,"beforeRouteEnter",E,D,V),M.push(h),Be(M))).then(()=>{M=[];for(const m of i.list())M.push(Ot(m,E,D));return M.push(h),Be(M)}).catch(m=>ut(m,he.NAVIGATION_CANCELLED)?m:Promise.reject(m))}function fe(E,D,M){l.list().forEach(F=>V(()=>F(E,D,M)))}function U(E,D,M,F,W){const d=I(E,D);if(d)return d;const h=D===St,m=Yt?history.state:{};M&&(F||h?r.replace(E.fullPath,ee({scroll:h&&m&&m.scroll},W)):r.push(E.fullPath,W)),c.value=E,Je(E,D,M,h),wt()}let de;function ge(){de||(de=r.listen((E,D,M)=>{if(!Nt.listening)return;const F=R(E),W=X(F,Nt.currentRoute.value);if(W){L(ee(W,{replace:!0,force:!0}),F).catch(Rn);return}a=F;const d=c.value;Yt&&ku(Oo(d.fullPath,M.delta),Os()),Z(F,d).catch(h=>ut(h,he.NAVIGATION_ABORTED|he.NAVIGATION_CANCELLED)?h:ut(h,he.NAVIGATION_GUARD_REDIRECT)?(L(ee(S(h.to),{force:!0}),F).then(m=>{ut(m,he.NAVIGATION_ABORTED|he.NAVIGATION_DUPLICATED)&&!M.delta&&M.type===dr.pop&&r.go(-1,!1)}).catch(Rn),Promise.reject()):(M.delta&&r.go(-M.delta,!1),G(h,F,d))).then(h=>{h=h||U(F,d,!1),h&&(M.delta&&!ut(h,he.NAVIGATION_CANCELLED)?r.go(-M.delta,!1):M.type===dr.pop&&ut(h,he.NAVIGATION_ABORTED|he.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),fe(F,d,h)}).catch(Rn)}))}let ze=dn(),ie=dn(),$;function G(E,D,M){wt(E);const F=ie.list();return F.length?F.forEach(W=>W(E,D,M)):console.error(E),Promise.reject(E)}function je(){return $&&c.value!==St?Promise.resolve():new Promise((E,D)=>{ze.add([E,D])})}function wt(E){return $||($=!E,ge(),ze.list().forEach(([D,M])=>E?M(E):D()),ze.reset()),E}function Je(E,D,M,F){const{scrollBehavior:W}=e;if(!Yt||!W)return Promise.resolve();const d=!M&&Hu(Oo(E.fullPath,0))||(F||!M)&&history.state&&history.state.scroll||null;return Es().then(()=>W(E,D,d)).then(h=>h&&Fu(h)).catch(h=>G(h,E,D))}const xe=E=>r.go(E);let zt;const $t=new Set,Nt={currentRoute:c,listening:!0,addRoute:p,removeRoute:y,clearRoutes:t.clearRoutes,hasRoute:x,getRoutes:_,resolve:R,options:e,push:T,replace:j,go:xe,back:()=>xe(-1),forward:()=>xe(1),beforeEach:o.add,beforeResolve:i.add,afterEach:l.add,onError:ie.add,isReady:je,install(E){E.component("RouterLink",gf),E.component("RouterView",vf),E.config.globalProperties.$router=Nt,Object.defineProperty(E.config.globalProperties,"$route",{enumerable:!0,get:()=>$e(c)}),Yt&&!zt&&c.value===St&&(zt=!0,T(r.location).catch(F=>{}));const D={};for(const F in St)Object.defineProperty(D,F,{get:()=>c.value[F],enumerable:!0});E.provide(Ts,Nt),E.provide(jr,bi(D)),E.provide(pr,c);const M=E.unmount;$t.add(E),E.unmount=function(){$t.delete(E),$t.size<1&&(a=St,de&&de(),de=null,c.value=St,zt=!1,$=!1),M()}}};function Be(E){return E.reduce((D,M)=>D.then(()=>V(M)),Promise.resolve())}return Nt}function Yf(){return Ue(Ts)}function Sl(e){return Ue(jr)}const Ef={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},wf=["d"],Uo=ln({__name:"Icon",props:{name:{}},setup(e){const t=e,n={home:"M3 11l9-8 9 8M5 10v10h5v-6h4v6h5V10",calendar:"M4 6h16v14H4zM4 10h16M8 3v5M16 3v5",book:"M5 4h10a3 3 0 013 3v13H8a3 3 0 01-3-3zM5 17a3 3 0 013-3h10",quiz:"M12 21a9 9 0 100-18 9 9 0 000 18zM9.5 9.5a2.5 2.5 0 114 2c-.9.6-1.5 1-1.5 2M12 17h.01",more:"M5 12h.01M12 12h.01M19 12h.01",flag:"M5 21V4M5 4h11l-2 4 2 4H5",grad:"M2 9l10-5 10 5-10 5zM6 11.5V16c0 1.5 3 3 6 3s6-1.5 6-3v-4.5",file:"M7 3h7l5 5v13H7zM14 3v5h5M10 13h6M10 17h6",slides:"M3 4h18v12H3zM12 16v4M8 20h8",user:"M12 12a4 4 0 100-8 4 4 0 000 8zM4 21c0-4 4-6 8-6s8 2 8 6",out:"M10 4H5v16h5M15 8l4 4-4 4M19 12H9",chevron:"M9 6l6 6-6 6"};return(s,r)=>(mt(),Zn("svg",Ef,[Ve("path",{d:n[t.name]??""},null,8,wf)]))}});class ts extends Error{constructor(n,s,r={}){super(s);Kt(this,"status");Kt(this,"errors");this.name="ApiError",this.status=n,this.errors=r}}const Ws="bm.token";class Sf{constructor(t,n){Kt(this,"local");Kt(this,"session");Kt(this,"memory",null);this.local=t,this.session=n}read(t){try{return t?.getItem(Ws)??null}catch{return null}}get(){return this.read(this.local)??this.read(this.session)??this.memory}get remembered(){return this.read(this.local)!==null}set(t,n){this.clear();try{(n?this.local:this.session)?.setItem(Ws,t)}catch{}this.get()===null&&(this.memory=t)}replace(t){this.set(t,this.remembered)}clear(){this.memory=null;for(const t of[this.local,this.session])try{t?.removeItem(Ws)}catch{}}}function Af(e){const t=e.fetch??((...p)=>fetch(...p)),{tokens:n}=e;let s=null;function r(p,y){if(!y)return p;const _=new URLSearchParams;for(const[R,S]of Object.entries(y))S!=null&&S!==""&&_.set(R,String(S));const x=_.toString();return x?`${p}?${x}`:p}async function o(p,y){const _={Accept:"application/json"},x=n.get();y.auth!==!1&&x&&(_.Authorization=`Bearer ${x}`);let R;return y.body!==void 0&&(_["Content-Type"]="application/json",R=JSON.stringify(y.body)),t(r(p,y.query),{method:y.method??"GET",headers:_,body:R})}function i(){return s||(s=(async()=>{try{const p=await o("/_user/api/v1/refresh",{method:"POST"});if(!p.ok)return!1;const y=await p.json(),_=y.token??y.data?.token;return _?(n.replace(_),!0):!1}catch{return!1}finally{queueMicrotask(()=>{s=null})}})()),s}async function l(p){const y=await p.text();if(!y)return null;try{return JSON.parse(y)}catch{return null}}function c(p,y){const _=y??{},x=typeof _.error=="string"&&_.error||typeof _.message=="string"&&_.message||(p.status>=500?"Błąd serwera. Spróbuj ponownie za chwilę.":`Błąd ${p.status}`);return new ts(p.status,x,_.errors??{})}async function a(p,y){let _;const x=n.get();try{_=await o(p,y)}catch{throw new ts(0,"Brak połączenia z serwerem.")}if(_.status===401&&y.auth!==!1&&x){const R=n.get();if(R!==null&&R!==x?!0:await i())try{_=await o(p,y)}catch{throw new ts(0,"Brak połączenia z serwerem.")}_.status===401&&(n.clear(),e.onUnauthorized?.())}return _}async function u(p,y={}){const _=await a(p,y),x=await l(_);if(!_.ok)throw c(_,x);return x}async function f(p,y={}){const _=await a(p,y);if(!_.ok){const x=await l(_);throw c(_,x)}return _.blob()}async function g(p,y={}){const _=await u(p,y);return _&&typeof _=="object"&&"data"in _?_.data:_}return{request:g,raw:u,blob:f}}function qo(e){try{return e()}catch{return null}}const Ct=new Sf(qo(()=>window.localStorage),qo(()=>window.sessionStorage));let Al=()=>{};function Rf(e){Al=e}const ce=Af({tokens:Ct,onUnauthorized:()=>Al()}),At="/_user/api/v1",hn={login:e=>ce.request(`${At}/login`,{method:"POST",body:e,auth:!1}),register:e=>ce.request(`${At}/register`,{method:"POST",body:e,auth:!1}),fetch:()=>ce.request(`${At}/fetch`),logout:()=>ce.request(`${At}/logout`,{method:"POST"}),forgotPassword:e=>ce.request(`${At}/forgot-password`,{method:"POST",body:{email:e},auth:!1}),resetPassword:e=>ce.request(`${At}/reset-password`,{method:"POST",body:e,auth:!1}),update:e=>ce.request(`${At}/update`,{method:"POST",body:e}),changePassword:e=>ce.request(`${At}/change-password`,{method:"POST",body:e})},xf="modulepreload",Cf=function(e){return"/"+e},zo={},me=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){let c=function(a){return Promise.all(a.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=i?.nonce||i?.getAttribute("nonce");r=c(n.map(a=>{if(a=Cf(a),a in zo)return;zo[a]=!0;const u=a.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${f}`))return;const g=document.createElement("link");if(g.rel=u?"stylesheet":xf,u||(g.as="script"),g.crossOrigin="",g.href=a,l&&g.setAttribute("nonce",l),document.head.appendChild(g),u)return new Promise((p,y)=>{g.addEventListener("load",p),g.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${a}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return r.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},Ht=bf({history:Yu("/"),scrollBehavior:(e,t,n)=>e.meta.bare?!1:n??(e.hash?{el:e.hash,top:12}:e.path===t.path?void 0:{top:0}),routes:[{path:"/logowanie",name:"login",component:()=>me(()=>import("./LoginView-BJXrPNjb.js"),__vite__mapDeps([0,1])),meta:{public:!0,guest:!0,title:"Logowanie"}},{path:"/rejestracja",name:"register",component:()=>me(()=>import("./RegisterView-DJ1QoVDK.js"),__vite__mapDeps([2,1])),meta:{public:!0,guest:!0,title:"Rejestracja"}},{path:"/przypomnij-haslo",name:"forgot",component:()=>me(()=>import("./ForgotView-BX93XuZx.js"),__vite__mapDeps([3,1])),meta:{public:!0,title:"Przypomnienie hasła"}},{path:"/reset-password",alias:"/reset-hasla",name:"reset",component:()=>me(()=>import("./ResetView-_AGvi3TG.js"),__vite__mapDeps([4,1])),meta:{public:!0,title:"Nowe hasło"}},{path:"/",name:"dashboard",component:()=>me(()=>import("./DashboardView-BYuD8Ygc.js"),__vite__mapDeps([5,6,7,8,9])),meta:{title:"Pulpit"}},{path:"/plan",name:"schedule",component:()=>me(()=>import("./ScheduleView-BqW7gmzM.js"),__vite__mapDeps([10,6,7,8,9])),meta:{title:"Plan zajęć"}},{path:"/terminarz",name:"deadlines",component:()=>me(()=>import("./DeadlinesView-DY301l3f.js"),__vite__mapDeps([11,6,7,8,9])),meta:{title:"Terminarz"}},{path:"/przedmioty",name:"courses",component:()=>me(()=>import("./CoursesView-CCyOcVSP.js"),__vite__mapDeps([12,6,7,8,9])),meta:{title:"Przedmioty"}},{path:"/przedmioty/:id(\\d+)",name:"course",component:()=>me(()=>import("./CourseView-CXI6huVv.js"),__vite__mapDeps([13,6,7,14,9])),props:!0,meta:{title:"Przedmiot"}},{path:"/lektury",name:"readings",component:()=>me(()=>import("./ReadingsView-Dwn-CoLm.js"),__vite__mapDeps([15,6,7,8,9,14])),meta:{title:"Lektury"}},{path:"/materialy",name:"materials",component:()=>me(()=>import("./MaterialsView-CSlYRC1S.js"),__vite__mapDeps([16,6,9])),meta:{title:"Materiały"}},{path:"/materialy/:id(\\d+)",name:"material",component:()=>me(()=>import("./MaterialView-BU7ZdTm0.js"),__vite__mapDeps([17,6,7,9])),props:!0,meta:{title:"Materiał"}},{path:"/quiz",redirect:"/quizy/powtorka-1-zjazd"},{path:"/quizy",name:"quizzes",component:()=>me(()=>import("./QuizzesView-BPpiDTe0.js"),__vite__mapDeps([18,6,7,19,9])),meta:{title:"Quizy"}},{path:"/quizy/:slug",name:"quiz",component:()=>me(()=>import("./QuizView-BWZffs6k.js"),__vite__mapDeps([20,6,7,19,9])),props:!0,meta:{title:"Quiz"}},{path:"/wiecej",name:"more",component:()=>me(()=>import("./MoreView-B3Qn1wI_.js"),__vite__mapDeps([21,6])),meta:{title:"Więcej"}},{path:"/profil",name:"profile",component:()=>me(()=>import("./ProfileView-CyRqKzB5.js"),__vite__mapDeps([22,6,1])),meta:{title:"Profil"}},{path:"/moje-prezentacje",name:"my-presentations",component:()=>me(()=>import("./MyPresentationsView-Jd38nBse.js"),__vite__mapDeps([23,6,7,24,9])),meta:{title:"Moje prezentacje"}},{path:"/moje-prezentacje/:slug",name:"presentation-speaker",component:()=>me(()=>import("./PresentationSpeakerView-CV1WMYIv.js"),__vite__mapDeps([25,24,26,27,28,29])),props:!0,meta:{bare:!0,title:"Prezentacja"}},{path:"/moje-prezentacje/:slug/pilot",name:"presentation-remote",component:()=>me(()=>import("./PresentationRemoteView-DCKt4fp6.js"),__vite__mapDeps([30,24,28,31,32])),props:!0,meta:{bare:!0,title:"Pilot"}},{path:"/prezentacje/:slugHash",name:"presentation-public",component:()=>me(()=>import("./PresentationPublicView-CnKQnORE.js"),__vite__mapDeps([33,24,26,27,34])),props:!0,meta:{public:!0,bare:!0,title:"Prezentacja"}},{path:"/:rest(.*)*",name:"notfound",component:()=>me(()=>import("./NotFoundView-CiR7B3dL.js"),__vite__mapDeps([35,31])),meta:{title:"Nie znaleziono"}}]});Ht.beforeEach(async e=>{const t=Pl();return t.ready||await t.restore(e),!e.meta.public&&!t.loggedIn?{name:"login",query:e.fullPath==="/"?{}:{redirect:e.fullPath}}:e.meta.guest&&t.loggedIn?{name:"dashboard"}:!0});Ht.afterEach(e=>{const t=e.meta.title;document.title=t?`${t} · BM II°`:"BM II°"});const Ce="/_bm/api/v1",Ne={dashboard:()=>ce.request(`${Ce}/dashboard`),courses:e=>ce.request(`${Ce}/courses`,{query:{semester:e}}),course:e=>ce.request(`${Ce}/courses/${e}`),schedule:(e,t)=>ce.request(`${Ce}/schedule`,{query:{from:e,to:t}}),meetings:()=>ce.request(`${Ce}/meetings`),deadlines:(e,t)=>ce.request(`${Ce}/deadlines`,{query:{from:e,to:t}}),readings:e=>ce.request(`${Ce}/readings`,{query:{course:e}}),markRead:e=>ce.request(`${Ce}/readings/${e}/progress`,{method:"PUT"}),unmarkRead:e=>ce.request(`${Ce}/readings/${e}/progress`,{method:"DELETE"}),materials:(e={})=>ce.raw(`${Ce}/materials`,{query:{...e}}),material:e=>ce.request(`${Ce}/materials/${e}`),calendarFeed:()=>ce.request(`${Ce}/calendar-feed`),saveCalendarFeed:e=>ce.request(`${Ce}/calendar-feed`,{method:"PUT",body:e}),rotateCalendarFeed:()=>ce.request(`${Ce}/calendar-feed/rotate`,{method:"POST"}),deleteCalendarFeed:()=>ce.request(`${Ce}/calendar-feed`,{method:"DELETE"})},Pf={"historia-koncepcje":"Historia / koncepcje wojny i pokoju",specjalnosc:"Specjalność"};function Xf(e){return Pf[e]??e}function Lr(e){const t=new Map;for(const n of e){if(!n.elective_group)continue;const s=t.get(n.elective_group)??[];s.includes(n.name)||s.push(n.name),t.set(n.elective_group,s)}return[...t].map(([n,s])=>({code:n,options:s}))}function Of(e,t){const n={};for(const s of Lr(e)){const r=t[s.code];r&&s.options.includes(r)&&(n[s.code]=r)}return n}function Tf(e,t){if(!e.elective_group)return!1;const n=t[e.elective_group];return n!==void 0&&n!==e.name}function Rl(e,t,n=!1){const s=new Set;if(n)return s;for(const r of e)Tf(r,t)&&s.add(r.id);return s}function Js(e,t){return t.size===0?e:e.filter(n=>n.course_id===null||!t.has(n.course_id))}function If(e,t){return Lr(e).filter(n=>n.options.length>1&&!t[n.code])}function Zf(e,t){return!!e.elective_group&&!t[e.elective_group]}const $o="bm.showAllElectives";function Ko(e){try{return localStorage.getItem(e)}catch{return null}}function Go(e,t){try{localStorage.setItem(e,t)}catch{}}const xn=qn("electives",()=>{const e=be({}),t=be(Ko($o)==="1"),n=be(null),s=()=>n.value===null?null:`bm.electives.${n.value}`,r=()=>{const f=s();f&&Go(f,JSON.stringify(e.value))};function o(f){n.value=f;try{const g=JSON.parse(Ko(`bm.electives.${f}`)??"{}");e.value=g&&typeof g=="object"?g:{}}catch{e.value={}}}const i=Q(()=>Object.keys(e.value).length>0);function l(f,g){const p={...e.value};g===null?delete p[f]:p[f]=g,e.value=p,r()}function c(f){t.value=f,Go($o,f?"1":"0")}function a(f){const g=Of(f,e.value);Object.keys(g).length!==Object.keys(e.value).length&&(e.value=g,r())}function u(){e.value={},n.value=null}return{choices:e,showAll:t,userId:n,hasChoices:i,load:o,choose:l,setShowAll:c,prune:a,reset:u}}),Vr=qn("toast",()=>{const e=be("");let t;function n(r,o=4e3){e.value=r,clearTimeout(t),t=setTimeout(()=>e.value="",o)}function s(){e.value=""}return{message:e,show:n,clear:s}});function Cn(e){return e instanceof ts?e.message:"Nie udało się wczytać danych."}function Jt(e){const t=Ei(null),n=be(!1),s=be("");let r=null;function o(l=!1){return r||(t.value!==null&&!l?Promise.resolve():(n.value=!0,s.value="",r=e().then(c=>{t.value=c}).catch(c=>{s.value=Cn(c)}).finally(()=>{n.value=!1,r=null}),r))}function i(){t.value=null,s.value="",n.value=!1,r=null}return{data:t,loading:n,error:s,load:o,reset:i}}const Wo="2000-01-01",xl=qn("bm",()=>{const e=Jt(()=>Ne.courses()),t=Jt(()=>Ne.meetings()),n=Jt(()=>Ne.schedule(Wo)),s=Jt(()=>Ne.deadlines(Wo)),r=Jt(()=>Ne.readings()),o=Jt(()=>Ne.dashboard()),i=Q(()=>e.data.value),l=Q(()=>t.data.value),c=Q(()=>o.data.value),a=xn(),u=Q(()=>Lr(i.value??[])),f=Q(()=>If(i.value??[],a.choices)),g=Q(()=>Rl(i.value??[],a.choices,a.showAll)),p=Q(()=>Js(n.data.value??[],g.value)),y=Q(()=>Js(s.data.value??[],g.value)),_=Q(()=>Js(r.data.value??[],g.value)),x=Q(()=>r.data.value??[]),R=Q(()=>(i.value??[]).filter(U=>!g.value.has(U.id))),S=Q(()=>{const U=_.value,de=U.filter(ge=>ge.is_required);return{total:U.length,read:U.filter(ge=>ge.read_at).length,requiredTotal:de.length,requiredRead:de.filter(ge=>ge.read_at).length}}),I=Q(()=>new Map((i.value??[]).map(U=>[U.id,U])));async function T(U=!1){await e.load(U),e.data.value&&a.prune(e.data.value)}async function j(U,de){const ge=r.data.value,ze=ge?.find(G=>G.id===U);if(!ge||!ze)return;const ie=ze.read_at,$=G=>{r.data.value=ge.map(je=>je.id===U?{...je,read_at:G}:je)};$(de?new Date().toISOString():null);try{const G=de?await Ne.markRead(U):await Ne.unmarkRead(U);$(G.read_at)}catch(G){$(ie),Vr().show(`Nie udało się zapisać zmiany. ${Cn(G)}`)}}const X=[e,t,n,s,r,o],L=Q(()=>X.some(U=>U.loading.value)),B=Q(()=>X.find(U=>U.error.value)?.error.value??""),V=Q(()=>({courses:e.data.value!==null,meetings:t.data.value!==null,schedule:n.data.value!==null,deadlines:s.data.value!==null,readings:r.data.value!==null,dashboard:o.data.value!==null}));function Z(){for(const U of X)U.error.value&&U.load(!0)}function fe(){for(const U of X)U.reset()}return{courses:i,electiveGroups:u,pendingElectives:f,hidden:g,meetings:l,dashboard:c,schedule:p,deadlines:y,readings:_,allReadings:x,visibleCourses:R,readingStats:S,courseById:I,loading:L,error:B,loaded:V,retry:Z,loadCourses:T,loadMeetings:(U=!1)=>t.load(U),loadSchedule:(U=!1)=>n.load(U),loadDeadlines:(U=!1)=>s.load(U),loadReadings:(U=!1)=>r.load(U),loadDashboard:(U=!1)=>o.load(U),toggleReading:j,reset:fe}});function Mf(e,t){return[...Rl(e,t,!1)].sort((n,s)=>n-s)}function Nf(e,t){if(e.length!==t.length)return!1;const n=[...e].sort((r,o)=>r-o),s=[...t].sort((r,o)=>r-o);return n.every((r,o)=>r===s[o])}async function ed(e){try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0}catch{}try{const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-1000px",document.body.appendChild(t),t.select();const n=document.execCommand("copy");return document.body.removeChild(t),n}catch{return!1}}const Cl=qn("calendarFeed",()=>{const e=be(void 0),t=be(!1),n=be(!1),s=be(""),r=xl(),o=xn();let i=Promise.resolve();function l(R){const S=i.then(R,R);return i=S.catch(()=>{}),S}async function c(R=!1){if(!(e.value!==void 0&&!R)){t.value=!0,s.value="";try{e.value=await Ne.calendarFeed()}catch(S){s.value=Cn(S)}finally{t.value=!1}}}async function a(){await r.loadCourses();const R=r.courses;return R?Mf(R,o.choices):null}async function u(R){n.value=!0,s.value="";try{await l(R)}catch(S){s.value=Cn(S)}finally{n.value=!1}}function f(){return u(async()=>{const R=await a();e.value=await Ne.saveCalendarFeed(R?{excluded_course_ids:R}:{})})}function g(R){return u(async()=>{e.value=await Ne.saveCalendarFeed(R)})}function p(){return u(async()=>{e.value=await Ne.rotateCalendarFeed()})}function y(){return u(async()=>{await Ne.deleteCalendarFeed(),e.value=null})}function _(){return l(async()=>{e.value===void 0&&await c();const R=e.value;if(!R)return;const S=await a();if(!(!S||Nf(S,R.excluded_course_ids)))try{e.value=await Ne.saveCalendarFeed({excluded_course_ids:S})}catch(I){Vr().show(`Nie udało się zaktualizować kalendarza. ${Cn(I)}`)}})}Zt(()=>o.choices,()=>{o.userId!==null&&_()});function x(){e.value=void 0,s.value="",t.value=!1,n.value=!1}return{feed:e,loading:t,busy:n,error:s,load:c,create:f,save:g,rotate:p,remove:y,sync:_,reset:x}});let Qs=null;const Pl=qn("auth",()=>{const e=be(null),t=be(Ct.get()),n=be(!1),s=Q(()=>t.value!==null),r=Q(()=>{const p=e.value;return p?[p.name,p.surname].filter(Boolean).join(" ")||p.email:""});function o(p,y,_){Ct.set(p,_),t.value=Ct.get(),y&&(e.value=y,xn().load(y.id))}function i(){Ct.clear(),t.value=null,e.value=null,xl().reset(),xn().reset(),Cl().reset()}async function l(p){p&&(Qs={public:p.meta.public===!0,fullPath:p.fullPath});try{if(Ct.get())try{const y=await hn.fetch();e.value=y.user,t.value=Ct.get(),xn().load(y.user.id)}catch{Ct.get()||i()}n.value=!0}finally{Qs=null}}async function c(p,y,_){const x=await hn.login({email:p,password:y});o(x.token,x.user,_)}async function a(p,y){const _=await hn.register(p);return _.token?(o(_.token,_.user,y),{signedIn:!0,message:""}):{signedIn:!1,message:_.message??""}}async function u(){try{await hn.logout()}catch{}i(),await Ht.push({name:"login"})}async function f(p){const y=await hn.update(p);e.value=y.user}function g(){const p=Qs??{public:Ht.currentRoute.value.meta.public===!0,fullPath:Ht.currentRoute.value.fullPath},y=s.value||e.value!==null;i(),y&&!p.public&&Ht.push({name:"login",query:{redirect:p.fullPath,expired:"1"}})}return Rf(g),{user:e,token:t,ready:n,loggedIn:s,displayName:r,restore:l,login:c,register:a,logout:u,updateProfile:f}}),Df={class:"shell"},jf={class:"sidebar"},Lf={"aria-label":"Główna nawigacja"},Vf={class:"who"},Ff={class:"muted"},kf={class:"main",id:"main"},Hf={class:"tabbar","aria-label":"Nawigacja"},Bf=ln({__name:"AppShell",setup(e){const t=Pl(),n=Vr(),s=Sl();Cl();const r=[{to:"/",label:"Pulpit",icon:"home",match:["dashboard"]},{to:"/plan",label:"Plan zajęć",icon:"calendar",match:["schedule"]},{to:"/terminarz",label:"Terminarz",icon:"flag",match:["deadlines"]},{to:"/przedmioty",label:"Przedmioty",icon:"grad",match:["courses","course"]},{to:"/lektury",label:"Lektury",icon:"book",match:["readings"]},{to:"/materialy",label:"Materiały",icon:"file",match:["materials","material"]},{to:"/quizy",label:"Quizy",icon:"quiz",match:["quizzes","quiz"]},{to:"/moje-prezentacje",label:"Moje prezentacje",icon:"slides",match:["my-presentations"]},{to:"/profil",label:"Profil",icon:"user",match:["profile"]}],o=[{to:"/",label:"Pulpit",icon:"home",match:["dashboard"]},{to:"/plan",label:"Plan",icon:"calendar",match:["schedule"]},{to:"/lektury",label:"Lektury",icon:"book",match:["readings"]},{to:"/quizy",label:"Quizy",icon:"quiz",match:["quizzes","quiz"]},{to:"/wiecej",label:"Więcej",icon:"more",match:["more","deadlines","courses","course","materials","material","my-presentations","profile"]}],i=Q(()=>String(s.name??"")),l=c=>c.includes(i.value);return(c,a)=>{const u=Di("router-link");return mt(),Zn("div",Df,[Ve("aside",jf,[ae(u,{to:"/",class:"brand"},{default:En(()=>[...a[1]||(a[1]=[Ve("span",{class:"eyebrow"},"UWr · ISMiB",-1),Ve("b",null,"BM II°",-1)])]),_:1}),Ve("nav",Lf,[(mt(),Zn(De,null,eo(r,f=>ae(u,{key:f.to,to:f.to,class:Pn({active:l(f.match)}),"aria-current":l(f.match)?"page":void 0},{default:En(()=>[ae(Uo,{name:f.icon},null,8,["name"]),lr(pn(f.label),1)]),_:2},1032,["to","class","aria-current"])),64))]),Ve("div",Vf,[Ve("span",Ff,pn($e(t).displayName),1),Ve("button",{class:"btn small ghost",type:"button",onClick:a[0]||(a[0]=f=>$e(t).logout())},"Wyloguj")])]),Ve("main",kf,[$c(c.$slots,"default")]),Ve("nav",Hf,[(mt(),Zn(De,null,eo(o,f=>ae(u,{key:f.to,to:f.to,class:Pn({active:l(f.match)}),"aria-current":l(f.match)?"page":void 0},{default:En(()=>[ae(Uo,{name:f.icon},null,8,["name"]),lr(pn(f.label),1)]),_:2},1032,["to","class","aria-current"])),64))]),bc(Ve("div",{class:"toast",role:"status","aria-live":"polite"},pn($e(n).message),513),[[La,$e(n).message]])])}}}),Uf=ln({__name:"App",setup(e){const t=Sl(),n=Q(()=>t.meta.public===!0||t.meta.bare===!0);return(s,r)=>{const o=Di("router-view");return n.value?(mt(),Nn(o,{key:0})):(mt(),Nn(Bf,{key:1},{default:En(()=>[ae(o)]),_:1}))}}});ou(Uf).use(cu()).use(Ht).mount("#app");export{Zt as A,Nn as B,xn as C,Zf as D,Ne as E,De as F,Cn as G,Jf as H,kn as I,Vc as J,Es as K,ce as L,Cl as M,Vr as N,ed as O,Xf as P,ts as Q,$c as R,Or as S,$f as T,me as U,zf as V,Ct as W,La as X,Uo as _,Ve as a,$e as b,Zn as c,ln as d,Kf as e,Wf as f,Qf as g,ae as h,En as i,Sl as j,Di as k,Yf as l,lr as m,hn as n,mt as o,xl as p,Dc as q,be as r,Q as s,pn as t,Pl as u,Gf as v,bc as w,Pn as x,eo as y,_r as z}; diff --git a/public/assets/presentations-B2_nwGC8.js b/public/assets/presentations-B2_nwGC8.js new file mode 100644 index 0000000..fa1b9bb --- /dev/null +++ b/public/assets/presentations-B2_nwGC8.js @@ -0,0 +1 @@ +import{W as m,L as n}from"./index-CvyVvvnt.js";const o="/_presentations/api/v1",c={publicDeck:e=>n.request(`${o}/public/${encodeURIComponent(e)}`,{auth:!1}),mine:()=>n.request(`${o}/mine`),speaker:e=>n.request(`${o}/mine/${encodeURIComponent(e)}`),speakerImage:(e,t)=>n.blob(`${o}/mine/${encodeURIComponent(e)}/images/${encodeURIComponent(t)}`),remote:(e,t)=>n.request(`${o}/mine/${encodeURIComponent(e)}/remote`,{method:"POST",body:t}),remoteState:(e,t)=>n.request(`${o}/mine/${encodeURIComponent(e)}/remote/state`,{method:"POST",body:t}),remoteStateBeacon(e,t){const a={Accept:"application/json","Content-Type":"application/json"},i=m.get();i&&(a.Authorization=`Bearer ${i}`);try{fetch(`${o}/mine/${encodeURIComponent(e)}/remote/state`,{method:"POST",headers:a,body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}};export{c as p}; diff --git a/public/assets/presentations-W-oMAxZb.js b/public/assets/presentations-W-oMAxZb.js deleted file mode 100644 index 01d9490..0000000 --- a/public/assets/presentations-W-oMAxZb.js +++ /dev/null @@ -1 +0,0 @@ -import{L as n}from"./index-LFNXxSi2.js";const o="/_presentations/api/v1",s={publicDeck:e=>n.request(`${o}/public/${encodeURIComponent(e)}`,{auth:!1}),mine:()=>n.request(`${o}/mine`),speaker:e=>n.request(`${o}/mine/${encodeURIComponent(e)}`),speakerImage:(e,t)=>n.blob(`${o}/mine/${encodeURIComponent(e)}/images/${encodeURIComponent(t)}`)};export{s as p}; diff --git a/public/assets/quizzes-B7pKYg3A.js b/public/assets/quizzes-ByhEqvvR.js similarity index 96% rename from public/assets/quizzes-B7pKYg3A.js rename to public/assets/quizzes-ByhEqvvR.js index b7246a7..4a3286c 100644 --- a/public/assets/quizzes-B7pKYg3A.js +++ b/public/assets/quizzes-ByhEqvvR.js @@ -1 +1 @@ -import{e as p}from"./format-bcE-cYHJ.js";import{d as z,o,c as a,F as c,y as h,a as d,m,t as n,b as _,x as q,e as l,L as r}from"./index-LFNXxSi2.js";const y={class:"rows"},$={class:"row-main"},k={class:"title"},w=["aria-label"],f={key:1,class:"badge"},b={class:"muted small"},S=z({__name:"AttemptList",props:{attempts:{},showQuiz:{type:Boolean}},setup(e){const s=u=>`${Math.round(u.score_points)}/${Math.round(u.max_points)}`;return(u,g)=>(o(),a("ul",y,[(o(!0),a(c,null,h(e.attempts,t=>(o(),a("li",{key:t.id},[d("div",$,[d("span",k,[e.showQuiz?(o(),a(c,{key:0},[m(n(t.quiz_title),1)],64)):(o(),a(c,{key:1},[m(n(_(p)(t.started_at)),1)],64))]),t.completed_at?(o(),a("span",{key:0,class:q(["badge",t.passed?"online":""]),"aria-label":`Wynik ${s(t)}`},n(s(t)),11,w)):(o(),a("span",f,"niezakończona"))]),d("div",b,[e.showQuiz?(o(),a(c,{key:0},[m(n(_(p)(t.started_at))+" · ",1)],64)):l("",!0),t.category?(o(),a(c,{key:1},[m(n(t.category)+" · ",1)],64)):l("",!0),m(" odpowiedzi: "+n(t.answered_count),1),t.completed_at&&t.score_percent!==null?(o(),a(c,{key:2},[m(" · "+n(String(t.score_percent).replace(".",","))+"% puli",1)],64)):l("",!0)])]))),128))]))}}),i="/_quizzes/api/v1",T={list:e=>r.request(`${i}/quizzes`,{query:{context:e}}),quiz:(e,s)=>r.request(`${i}/quizzes/${encodeURIComponent(e)}`,{query:{category:s}}),start:(e,s)=>r.request(`${i}/quizzes/${encodeURIComponent(e)}/attempts`,{method:"POST",body:s?{category:s}:{}}),answer:(e,s)=>r.request(`${i}/attempts/${e}/answers`,{method:"POST",body:s}),finish:e=>r.request(`${i}/attempts/${e}/finish`,{method:"POST"}),attempt:e=>r.request(`${i}/attempts/${e}`),attempts:(e,s)=>r.raw(`${i}/attempts`,{query:{quiz:e,page:s}})};export{S as _,T as q}; +import{e as p}from"./format-bcE-cYHJ.js";import{d as z,o,c as a,F as c,y as h,a as d,m,t as n,b as _,x as q,e as l,L as r}from"./index-CvyVvvnt.js";const y={class:"rows"},$={class:"row-main"},k={class:"title"},w=["aria-label"],f={key:1,class:"badge"},b={class:"muted small"},S=z({__name:"AttemptList",props:{attempts:{},showQuiz:{type:Boolean}},setup(e){const s=u=>`${Math.round(u.score_points)}/${Math.round(u.max_points)}`;return(u,g)=>(o(),a("ul",y,[(o(!0),a(c,null,h(e.attempts,t=>(o(),a("li",{key:t.id},[d("div",$,[d("span",k,[e.showQuiz?(o(),a(c,{key:0},[m(n(t.quiz_title),1)],64)):(o(),a(c,{key:1},[m(n(_(p)(t.started_at)),1)],64))]),t.completed_at?(o(),a("span",{key:0,class:q(["badge",t.passed?"online":""]),"aria-label":`Wynik ${s(t)}`},n(s(t)),11,w)):(o(),a("span",f,"niezakończona"))]),d("div",b,[e.showQuiz?(o(),a(c,{key:0},[m(n(_(p)(t.started_at))+" · ",1)],64)):l("",!0),t.category?(o(),a(c,{key:1},[m(n(t.category)+" · ",1)],64)):l("",!0),m(" odpowiedzi: "+n(t.answered_count),1),t.completed_at&&t.score_percent!==null?(o(),a(c,{key:2},[m(" · "+n(String(t.score_percent).replace(".",","))+"% puli",1)],64)):l("",!0)])]))),128))]))}}),i="/_quizzes/api/v1",T={list:e=>r.request(`${i}/quizzes`,{query:{context:e}}),quiz:(e,s)=>r.request(`${i}/quizzes/${encodeURIComponent(e)}`,{query:{category:s}}),start:(e,s)=>r.request(`${i}/quizzes/${encodeURIComponent(e)}/attempts`,{method:"POST",body:s?{category:s}:{}}),answer:(e,s)=>r.request(`${i}/attempts/${e}/answers`,{method:"POST",body:s}),finish:e=>r.request(`${i}/attempts/${e}/finish`,{method:"POST"}),attempt:e=>r.request(`${i}/attempts/${e}`),attempts:(e,s)=>r.raw(`${i}/attempts`,{query:{quiz:e,page:s}})};export{S as _,T as q}; diff --git a/public/assets/realtime-DuTUbwvj.js b/public/assets/realtime-DuTUbwvj.js new file mode 100644 index 0000000..6179b04 --- /dev/null +++ b/public/assets/realtime-DuTUbwvj.js @@ -0,0 +1 @@ +import{U as h,L as A,Q as S}from"./index-CvyVvvnt.js";const m="remote.action",y="remote.state",Y=300,$=1e4,g=45e3,j=15e3,w=25e3,B=1e4,F=1e3,M=["next","prev","first","last","goto","speak","notes","sources","special","back","clock-pause","clock","clock-reset","toolbar","sync"],E=/^[A-Za-z0-9_-]{8,64}$/,N=9999,f=9999,b=86400,R=new Set(M),I=new Set(["say","notes","srcs"]),L={next:"ArrowRight",prev:"ArrowLeft",first:"Home",last:"End",speak:"p",notes:"n",sources:"z",special:"s",back:"Escape","clock-pause":"t",clock:"c","clock-reset":"r",toolbar:"h"};function G(e){const n=L[e];return!n||n.toLowerCase()==="f"?null:n}function u(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function c(e,n,t){return typeof e=="number"&&Number.isInteger(e)&&e>=n&&e<=t}function k(e){if(!u(e))return null;const n=e.action,t=e.tab;if(typeof n!="string"||!R.has(n)||typeof t!="string"||t!==""&&!E.test(t))return null;const o=n;return o==="goto"?c(e.number,1,N)?{action:o,number:e.number,tab:t}:null:e.number!==void 0?null:{action:o,tab:t}}function C(e){if(!u(e))return null;const{elapsed:n,slide_elapsed:t,paused:o,hidden:r,idle:l}=e;return!c(n,0,b)||!c(t,0,b)||typeof o!="boolean"||typeof r!="boolean"||typeof l!="boolean"?null:{elapsed:n,slide_elapsed:t,paused:o,hidden:r,idle:l}}function O(e){if(!u(e))return null;const{tab:n,claim:t,bye:o,number:r,total:l,special:s,has_special:i,panel:a,toolbar_hidden:p}=e;if(typeof n!="string"||!E.test(n)||typeof t!="boolean"||typeof o!="boolean"||!c(r,0,f)||!c(l,0,f)||r>l||typeof s!="boolean"||typeof i!="boolean"||typeof p!="boolean"||a!==null&&(typeof a!="string"||!I.has(a)))return null;const d=C(e.clock);return d?{tab:n,claim:t,bye:o,number:r,total:l,special:s,has_special:i,panel:a,toolbar_hidden:p,clock:d}:null}function K(e){if(!u(e))return null;if(e.event===m){const n=k(e.payload);return n?{event:m,payload:n}:null}if(e.event===y){const n=O(e.payload);return n?{event:y,payload:n}:null}return null}function X(){const e=globalThis.crypto;if(e&&typeof e.randomUUID=="function")return e.randomUUID();const n=new Uint8Array(16);if(e&&typeof e.getRandomValues=="function")e.getRandomValues(n);else for(let t=0;tt.toString(16).padStart(2,"0")).join("")}function T(e){return!Number.isFinite(e)||e<=0?0:Math.min(b,Math.floor(e))}function _(e){return!Number.isFinite(e)||e<=0?0:Math.min(f,Math.floor(e))}function q(e,n,t,o={}){const r=_(e.total),l=Math.min(_(e.number),r);return{tab:t,claim:!!o.claim,bye:!!o.bye,number:l,total:r,special:e.special,has_special:e.hasSpecial,panel:e.panel,toolbar_hidden:e.toolbarHidden,clock:n?{elapsed:T(n.elapsed),slide_elapsed:T(n.slideElapsed),paused:n.paused,hidden:n.hidden,idle:n.idle}:{elapsed:0,slide_elapsed:0,paused:!1,hidden:!1,idle:!0}}}function Q(e){let n=null;return{observe(t){if(t.bye){t.tab===n&&(n=null);return}t.claim&&(n=t.tab)},activeTab:()=>n,isActive:()=>n===e,shouldApply(t){return n===e&&(t.tab===""||t.tab===e)}}}function W(){let e=null,n=0,t=null;return{observe(o,r){return(o.claim&&!o.bye||t===null)&&(t=o.tab),o.tab!==t?!1:(e=o,n=r,o.bye&&(t=null),!0)},current:()=>e,receivedAt:()=>n,actionTab:()=>t??"",live(o){return e!==null&&!e.bye&&o-n0&&n-eDate.now(),setTimeout:(e,n)=>globalThis.setTimeout(e,n),clearTimeout:e=>globalThis.clearTimeout(e)};function J(e,n,t=v){let o=Number.NEGATIVE_INFINITY,r=null;function l(){o=t.now(),e()}function s(){r!==null&&t.clearTimeout(r),r=null}return{call(){if(r!==null)return;const i=o+n-t.now();if(i<=0){l();return}r=t.setTimeout(()=>{r=null,l()},i)},flush(){s(),l()},cancel:s}}const D="/ws",U="/api/realtime/token",H=new Set([401,403,404,503]);function P(e=window.location){return`${e.protocol==="https:"?"wss":"ws"}://${e.host}${D}`}function V(e){const n=String(e);return n==="connected"||n==="connecting"?n:"disconnected"}async function x(e,n){const{Centrifuge:t,UnauthorizedError:o}=await h(async()=>{const{Centrifuge:i,UnauthorizedError:a}=await import("./index-B53bcf0x.js");return{Centrifuge:i,UnauthorizedError:a}},[]),r=new t(P(),{minReconnectDelay:500,maxReconnectDelay:1e4,getToken:async()=>{try{const i=await A.request(U);if(!i||typeof i.token!="string"||i.token==="")throw new Error("realtime: empty token");return i.token}catch(i){throw i instanceof S&&H.has(i.status)?(n.onUnavailable?.(),new o("realtime unavailable")):i}}});r.on("state",i=>n.onConnection?.(V(i.newState)));const l=r.newSubscription(e);l.on("publication",i=>n.onPublication(i.data)),l.on("subscribed",()=>n.onSubscribed?.()),l.on("unsubscribed",i=>{i.code>=400&&n.onDenied?.(i.code)}),l.subscribe(),r.connect();let s=!1;return{close(){s||(s=!0,l.removeAllListeners(),l.unsubscribe(),r.removeSubscription(l),r.disconnect(),r.removeAllListeners())},resubscribe(){s||l.subscribe()}}}export{F as C,B as D,$ as H,y as R,Y as S,J as a,K as b,Q as c,q as d,j as e,W as f,X as n,x as o,Z as p,G as r}; diff --git a/public/index.html b/public/index.html index 1b21926..616d527 100644 --- a/public/index.html +++ b/public/index.html @@ -8,7 +8,7 @@ BM II° – plan studiów - +