PageSourceSearch

https://konferencjapsew.pl/assets/Course-__36DUsO.js

js konferencjapsew.pl collected 2026-09-30 16:24:17 UTC 16,467 bytes, 2 lines download raw bytes

1import{j as e,b7 as G,b as P,u as v,d as E,r as w,bw as J,a7 as K,V as B,bx as A,A as U,B as H}from"./index-DLrMUOBW.js";import{m as O}from"./react-error-boundary-Dquh30UF.js";import{L as ee,M as T,I as z,i as $,N as se,O as te,P as ae,Q as Y,T as oe,U as le,V as ne,W as re,X as ie,Y as ce,Z as ue,_ as me,$ as de}from"./index-D6Dt93pR.js";import{R as ge,u as xe,a as pe,b as fe,c as he}from"./RatingListEmptyState-8Dj6nGyU.js";import{E as Q,a as W}from"./404-VcCoZ4hj.js";import{a5 as je,aF as be,aE as Ce,ay as X,aD as Z}from"./StatusWrapper-BKz8KG0t.js";import"./Styles-4o5c-HNY.js";import"./Avatar-C6tnL99V.js";import"./Styles-CKJHHRt4.js";import{$ as Ne,L as we}from"./Styles-D6Wy4AGY.js";import"./Info-DrqXEzne.js";import"./navigation-CW5xMep9.js";import"./Icon-E_8XtIB5.js";import"./Checkbox-b-is9tQB.js";import"./FileType-CHMaFrTQ.js";import"./Card-BECsZCKr.js";import"./PrograssBar-Cg9SoYtD.js";import"./PrograssBar2-CNLVVdYN.js";import"./Badge-CqB-R0Rv.js";import"./Flex-Qwm8kMl-.js";import{u as Re,B as ve}from"./Breadcrumbs-z-WsBQGP.js";import{B as q}from"./ResourcesSimplified-Bwa3E8cy.js";import{f as ye}from"./TopbarActions-XAIGJU4L.js";import{C as Se,a as Me,b as Ee}from"./CommentsSection-Bpcx6zbX.js";import"./index-BWECTjTS.js";import"./index-B8sNpJIh.js";import"./Products-eedkR-Ay.js";import"./guards-DO21Mqax.js";import"./ProductModal-YMeXJ2-L.js";import"./Styles-DFQi8Ouq.js";import"./Text-CMmd0jH_.js";import"./LocalAlert-DQ91cQgh.js";import"./SocialMedia-BHdP3GGG.js";import"./NoData-C_0jdLIG.js";import"./Form-Buw9xCCi.js";import"./Live-CGrKDFdY.js";import"./useTranslatedLang-2ZdLpm_6.js";import"./BottomTabs-DwAho_yc.js";import"./Offcanvas-DweBsZ1T.js";import"./hls-Bei96viZ.js";import"./useElementDimensions-CMFhAfff.js";import"./index-4z51eJqp.js";import"./getStatusWrapper-Cp_Tbtgi.js";import"./Helmet-Ca3qM-yi.js";import"./onClickOutside-DKJL2DeG.js";import"./usePopperHook-BB57lh5O.js";import"./useAgendaRating-Ds8beMbo.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};o.SENTRY_RELEASE={id:"88e5fcb15f7f540116e63302ec73008418b63425"};var s=new o.Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="2dc1d18f-0be4-4fc0-83ff-7fa92a09d156",o._sentryDebugIdIdentifier="sentry-dbid-2dc1d18f-0be4-4fc0-83ff-7fa92a09d156")}catch{}})();const Le=({withInfo:o=!0,percentage:s})=>e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[o&&e.jsxs("div",{className:"flex flex-row items-center justify-between",children:[e.jsx("span",{className:"text-paragraph-sm text-text-strong-950",children:"Postęp"}),e.jsxs("span",{className:"text-paragraph-sm text-text-sub-600",children:[s,"%"]})]}),e.jsx(G.Root,{value:s,max:100,color:"primary"})]}),Ve=(o,s)=>{switch(o==null?void 0:o.status){case"notStarted":return s("course.message.cannotRateNotStarted",{defaultValue:"Start the course to leave a rating."});case"inProgress":return s("course.message.cannotRateInProgress",{defaultValue:"Complete the course to leave a rating."});default:return s("course.message.cannotRateUnavailable",{defaultValue:"Rating is not available right now."})}},Pe=({title:o,rating:s,courseId:t,eventSlug:a,canRate:l,progress:i})=>{const{t:c}=P(),r=v(({event:f})=>{var h;return(h=f==null?void 0:f.settings)==null?void 0:h.ratingsCourseMaxValue}),{mutate:u,isPending:j}=ee(),b=!!(t&&a&&l),g=!b&&(s!=null&&s.ratingScore)?Ve(i,c):void 0,C=({rating:f,comment:h},x)=>{!t||!a||u({eventSlug:a,courseId:t,rating:f,comment:(h==null?void 0:h.trim())??null},{onSuccess:x==null?void 0:x.onSuccess,onError:x==null?void 0:x.onError})};return e.jsx(ge,{title:o,variant:"course",ratingScore:s==null?void 0:s.ratingScore,attendeeRating:(s==null?void 0:s.attendeeRating)??void 0,canRate:b,cannotRateTooltip:g,isPending:j,maxValue:r,onRate:C})},Ie=()=>{const o=v(({event:a})=>a==null?void 0:a.slug),{courseId:s}=E(),{data:t}=T(o,s);return xe((t==null?void 0:t.seoTitle)||(t==null?void 0:t.name),t==null?void 0:t.seoDescription)},ke=(o,s,t)=>{const a=w.useRef({});w.useEffect(()=>{if(!o||!t)return;const l=a.current;a.current={courseId:o,status:t},!(l.courseId!==o||l.status===void 0)&&l.status!=="completed"&&t==="completed"&&J("courseCompleted",{courseId:o,courseName:s})},[o,s,t])},De=()=>{const{t:o}=P(),s=v(({event:x})=>x==null?void 0:x.slug),{courseId:t}=E(),{data:a}
1=T(s,t),{name:l,shortDescription:i,progress:c,rating:r,permissions:u,duration:j,lessonsCount:b,category:g,cover:C}=a??{},f=j&&j>0?ye(j):null,h=g==null?void 0:g.name;return e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"w-full flex items-center justify-between gap-2",children:[e.jsx(Pe,{title:l??"",rating:r,courseId:t,eventSlug:s,canRate:u==null?void 0:u.canRate,progress:c}),t&&!C&&e.jsx(O,{FallbackComponent:Q,children:e.jsx(q,{type:"courses",uuid:t,size:"xsmall",color:"neutral",mode:"stroke",withTooltip:!0})})]}),e.jsxs("div",{className:"flex flex-col items-start gap-2 mt-4 mb-4 lg:mt-1",children:[e.jsx("h2",{className:"text-text-strong-950 p-0 m-0",children:l}),(c==null?void 0:c.status)==="completed"&&e.jsx(K.Root,{variant:"lighter",color:"green",className:"h-5",children:o("general.statusCompleted")})]}),e.jsx("p",{className:"text-paragraph-md text-text-sub-600 mb-4  max-w-5xl",children:i}),e.jsxs("div",{className:"flex flex-row items-center gap-1 mb-4",children:[h&&e.jsx(z,{Icon:je,text:h}),h&&e.jsx($,{}),e.jsx(z,{Icon:be,text:o("course.info.lessons",{count:b})}),f&&e.jsxs(e.Fragment,{children:[e.jsx($,{}),e.jsx(z,{Icon:Ce,text:f})]})]}),e.jsx("div",{className:"w-full lg:w-lg",children:(c==null?void 0:c.percentage)!==void 0&&e.jsx(Le,{percentage:c.percentage})})]})},Fe=({commentId:o,types:s,isOpen:t})=>{const{courseId:a}=E(),l=v(({event:g})=>g==null?void 0:g.slug),[i,c]=w.useState(null),{data:r,isFetching:u}=se(l??"",a??"",o,t),j=(r==null?void 0:r.items)??[],b=i?j.filter(g=>g.type===i):j;return e.jsx(Ne,{types:s,items:b,setActiveFilter:c,activeFilter:i,isLoading:u&&!r})},Te=({eventSlug:o,courseId:s,parentCommentId:t,isExpanded:a,currentUserId:l,canModerate:i,onEdit:c,onDelete:r,onModerate:u,reactions:j,commentInputVariant:b})=>{var L;const{t:g}=P(),{data:C,fetchNextPage:f,hasNextPage:h,isFetchingNextPage:x,isLoading:I}=te(o,s,t,a),d=(C==null?void 0:C.pages.flatMap(R=>R.data))??[],y=((L=C==null?void 0:C.pages[0])==null?void 0:L.total)??0,k=d.filter(R=>{var M,n;return R.moderationStatus!=="waitingForModeration"?!0:(((M=R.permissions)==null?void 0:M.canModerate)??i??!1)||((n=R.author)==null?void 0:n.id)===l}),D=y-k.length;return a?e.jsx("div",{className:"mt-3 ml-12",children:I?e.jsx(Se,{}):e.jsxs(e.Fragment,{children:[k.map(R=>e.jsx(Me,{comment:R,currentUserId:l,canModerate:i,onEdit:(F,M)=>c(F,M),onDelete:(F,M)=>r(F,M),onModerate:u,reactions:j,isReply:!0,commentInputVariant:b},R.id)),D>0&&h&&e.jsx(B.Root,{variant:"gray",size:"medium",onClick:()=>f(),disabled:x,children:x?e.jsx(X,{className:"size-4 shrink-0 animate-spin"}):e.jsxs(e.Fragment,{children:[g("wall.post-load-more-comments")," (",D,")",e.jsx(B.Icon,{as:Z})]})})]})}):null},Ae=3,Be=()=>e.jsxs("div",{className:"flex flex-col overflow-y-auto",children:[e.jsxs("div",{className:"order-first flex items-center gap-3 px-5 py-3 lg:mb-2 lg:px-8",children:[e.jsx("div",{className:"size-8 animate-pulse rounded-lg bg-bg-soft-200"}),e.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-bg-soft-200"}),e.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-bg-soft-200"}),e.jsx("div",{className:"h-4 w-40 animate-pulse rounded bg-bg-soft-200"})]}),e.jsx("div",{className:"order-2 h-[300px] w-full animate-pulse bg-bg-soft-200 lg:order-1 lg:mb-2"}),e.jsx("div",{className:"order-1 px-5 py-10 lg:order-2 lg:p-8",children:e.jsxs("div",{className:"flex flex-col justify-between gap-8 lg:flex-row lg:gap-6",children:[e.jsxs("div",{className:"flex flex-1 flex-col gap-4",children:[e.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-bg-soft-200"}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("div",{className:"h-8 w-3/4 max-w-md animate-pulse rounded bg-bg-soft-200"}),e.jsx("div",{className:"h-4 w-16 max-w-md animate-pulse rounded bg-bg-soft-200"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("div",{className:"h-4 w-full max-w-[540px] animate-pulse rounded bg-bg-soft-200"}),e.jsx("div",{className:"h-4 w-2/3 max-w-[360px] animate-pulse rounded bg-bg-soft-200"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"h-4 w-20 animate-pulse rounded bg-bg-soft-200"}),e.jsx("div",{className:"h-4 w-px bg-bg-soft-200"}),e.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-bg-soft-200"})]})]}),e.jsxs("div",{className:"flex flex-col-reverse md:flex-col gap-4 md:gap-16 md:mt-16",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"h-10 w-32 animate-pulse rounded-lg bg-bg-soft-200"}),e.jsx("div",{className:"h-10 w-40 animate-pulse rounded-lg bg-bg-soft-200"}),e.jsx("div",{className:"size-10 animate-pulse rounded-lg bg-bg-soft-200"})]}),e.jsx("div",{className:"h-2 w-full animate-pulse rounded-full bg-bg-soft-200 lg:w-[320px]"})]})]})}),e.jsx("div",{className:"order-3 px-6 py-10 lg:px-8 lg:py-0 lg:pb-8",children:e.jsx("div",{className:"mt-3 flex flex-col gap-3 lg:mt-8 lg:px-4 lg:pb-4",children:Array.from({length:Ae},(o,s)=>e.jsx("div",{className:"h-16 animate-pulse rounded-xl bg-bg-soft-200"},s))})})]}),_e=({courseName:o})=>{const{t:s}=P(),t=Re();return e.jsx("div",{className:"order-first px-5 lg:px-8 py-3 bg-bg-white-0 rounded-t-lg lg:rou
1nded-lg lg:mb-2",children:e.jsx(ve,{showBackButton:!0,items:[t,{label:o||s("courses.label.course",{defaultValue:"Course"})}]})})},ze=()=>{const o=v(({event:l})=>l==null?void 0:l.slug),{courseId:s}=E(),{data:t}=T(o,s),{cover:a}=t??{};return a?e.jsxs("div",{className:"w-full h-[300px] order-2 lg:mb-2 lg:order-1 relative rounded-md",children:[e.jsx("img",{src:a.url,alt:a.alt??"",className:"w-full h-full object-cover object-center rounded-lg"}),s&&e.jsx("div",{className:"absolute top-4 right-4 z-10",children:e.jsx(O,{FallbackComponent:Q,children:e.jsx(q,{type:"courses",uuid:s,size:"small",color:"neutral",mode:"stroke",withTooltip:!0})})})]}):null},Oe=()=>e.jsx("div",{className:"flex flex-col py-10 px-5 lg:p-0 lg:px-0",children:e.jsx("div",{className:"flex flex-col lg:flex-row justify-between gap-8 lg:p-0 lg:gap-6",children:e.jsx(De,{})})}),Ue=({children:o,permissions:s,hasDescription:t})=>{const{t:a}=P(),[l,i]=w.useState("chapters"),c=w.useMemo(()=>[{id:"chapters",label:a("course.label.chapters",{defaultValue:"Content"})},...t?[{id:"description",label:a("course.label.description",{defaultValue:"Description"})}]:[],...s!=null&&s.canViewAnyComment?[{id:"comments",label:a("course.label.comments",{defaultValue:"Comments"})}]:[],...s!=null&&s.canViewAnyRatingResults?[{id:"ratings",label:a("course.label.ratings",{defaultValue:"Opinions"})}]:[]],[a,t,s==null?void 0:s.canViewAnyRatingResults,s==null?void 0:s.canViewAnyComment]);return e.jsxs(A.Root,{value:l,onValueChange:i,children:[e.jsx(A.List,{children:c.map(r=>e.jsx(A.Trigger,{value:r.id,children:r.label},r.id))}),c.map(r=>e.jsx(A.Content,{value:r.id,className:"mt-3 lg:mt-8",children:o(r.id)},r.id))]})},He=()=>{const o=ae(),s=v(({event:u})=>u==null?void 0:u.slug),{courseId:t}=E(),{data:a}=T(s,t),{chapters:l,lessons:i}=a??{},c=!!(i!=null&&i.length),r=w.useMemo(()=>i!=null&&i.length?{id:"standaloneLessons",name:o,description:"",cover:null,lessons:i}:null,[i,o]);return e.jsxs("div",{className:"flex flex-col gap-3 lg:px-4 lg:pb-4",children:[l==null?void 0:l.map(u=>e.jsx(Y,{chapter:u,onlyOneChapter:l.length===1&&!c},u.id)),r&&e.jsx(Y,{chapter:r,onlyOneChapter:!(l!=null&&l.length)})]})},$e=()=>{var I;const{t:o}=P(),{courseId:s}=E(),t=v(({event:d})=>d==null?void 0:d.slug),a=v(({event:d})=>{var y;return(y=d==null?void 0:d.settings)==null?void 0:y.ratingsCourseMaxValue}),{data:l,fetchNextPage:i,hasNextPage:c,isFetchingNextPage:r,isLoading:u,isError:j,error:b}=oe(t,s),{mutate:g,isPending:C}=le(),f=w.useMemo(()=>(l==null?void 0:l.pages.flatMap(d=>d.data))??[],[l==null?void 0:l.pages]),x=(((I=l==null?void 0:l.pages[0])==null?void 0:I.meta.total)??0)-f.length;return u?e.jsx(pe,{}):j?e.jsx(W,{error:{message:b==null?void 0:b.message}}):f.length===0?e.jsx(fe,{}):e.jsxs("div",{className:"flex flex-col gap-3",children:[f.map(d=>e.jsx(he,{rating:d,ratingsMaxValue:a??5,canDeleteRating:d.permissions.canDelete,isDeletePending:C,onDelete:y=>g({eventSlug:t,courseId:s,ratingId:y})},d.id)),x>0&&c&&e.jsx(B.Root,{variant:"gray",size:"medium",onClick:()=>i(),disabled:r,className:"self-start",children:r?e.jsx(X,{className:"size-4 shrink-0 animate-spin"}):e.jsxs(e.Fragment,{children:[o("courses.ratings.showMore",{defaultValue:"Show more opinions"})," (",x,")",e.jsx(B.Icon,{as:Z})]})})]})},Ye=()=>{const o=v(({event:a})=>a==null?void 0:a.slug),{courseId:s}=E(),{data:t}=T(o,s);return t!=null&&t.description?e.jsx("div",{className:"prose max-w-none",dangerouslySetInnerHTML:{__html:t.description}}):null},Qe=()=>{var M;const{t:o}=P(),{courseId:s}=E(),t=v(({event:n})=>n==null?void 0:n.slug),a=v(({attendee:n})=>n==null?void 0:n.hash),{data:l,fetchNextPage:i,hasNextPage:c,isPending:r,isFetchingNextPage:u}=ne(t,s),{mutate:j}=re(),{mutate:b}=ie(),{mutate:g}=ce(),{mutate:C}=ue(),{mutate:f}=me(),{mutate:h}=de(),x=(l==null?void 0:l.pages.flatMap(n=>n.data))??[],I=((M=l==null?void 0:l.pages[0])==null?void 0:M.total)??0,d=w.useCallback(({body:n,mentions:N,replyTo:m,callback:p,errorCallback:S})=>{j({eventSlug:t,courseId:s,body:n,mentions:N,replyTo:m},{onSuccess:p,onError:V=>{S==null||S(),U.toast.custom(_=>e.jsx(H.Root,{t:_,status:"error",variant:"light",message:(V==null?void 0:V.message)??o("general.message.error",{defaultValue:"Something went wrong. Please try again later."})}),{position:"top-center"})}})},[j,t,s]),y=w.useCallback((n,{body:N,mentions:m},p)=>{b({eventSlug:t,courseId:s,commentId:n,body:N,mentions:m,parentCommentId:p})},[b,t,s]),k=w.useCallback((n,N,m)=>{g({eventSlug:t,courseId:s,commentId:n,parentCommentId:m},N)},[g,t,s]),D=w.useCallback((n,N,m)=>{const p={eventSlug:t,courseId:s,commentId:n,parentCommentId:m},S=V=>{U.toast.custom(_=>e.jsx(H.Root,{t:_,status:"error",variant:"light",message:(V==null?void 0:V.message)??o("general.message.error",{defaultValue:"Something went wrong. Please try again later."})}),{position:"top-center"})};N==="approve"?C(p,{onError:S}):f(p,{onError:S})},[C,f,t,s]),L=w.useCallback((n,N,m,p)=>{h({eventSlug:t,courseId:s,commentId:n,type:N,selected:m,parentCommentId:p})},[h,t,s]),R=w.useMemo(()=>({enabled:!0,canReact:!0,onSelect:L,renderFilter:(n,N,m)=>e.jsx(Fe,{commentId:n,types:N,isOpen:m})}),[L]),F=w.useMemo(()=>({enabled:!0,canReply:!0,onAdd:(n,{body:N,mentions:m,callback:p,errorCallback:S})=>d({body:N,mentions:m,replyTo:n,callback:p,errorCallback:S}),renderReplies:(n,N)=>t&&s?e.jsx(Te,{eventSlug:t,courseId:s,parentCommentId:n,isExpanded:N,currentUserId:a,onEdit:(m,p)=>y(m,p,n),onDelete:(m,p)=>k(m,p,n),onModerate:(m,p)=>D(m,p,n),reactions:{...R,onSelect:(m,p,S)=>L(m,p,S,n)},commentInputVariant:"video"}):null}),[d,y,k,D,L,R,t,s,a]);
1return e.jsx(Ee,{comments:x,totalCount:I,onAdd:d,onEdit:y,onDelete:k,onModerate:D,onLoadMore:c?()=>i():void 0,isLoading:r,isLoadingMore:u,canComment:!0,currentUserId:a,commentInputVariant:"video",reactions:R,replies:F,showEmptyState:!0})},We=o=>{switch(o){case"chapters":return e.jsx(He,{});case"description":return e.jsx(Ye,{});case"ratings":return e.jsx($e,{});case"comments":return e.jsx(Qe,{});default:return null}},Xe=()=>{var r;const o=Ie(),s=v(({event:u})=>u==null?void 0:u.slug),{courseId:t}=E(),{data:a,isPending:l,isError:i,error:c}=T(s,t);return ke(t,a==null?void 0:a.name,(r=a==null?void 0:a.progress)==null?void 0:r.status),i?e.jsx(W,{error:{message:c==null?void 0:c.message}}):e.jsxs(e.Fragment,{children:[o,e.jsxs(we,{variant:"scroll",children:[l&&e.jsx(Be,{}),e.jsxs("div",{hidden:l,className:"flex flex-col",children:[e.jsx(_e,{courseName:a==null?void 0:a.name}),e.jsx(ze,{}),e.jsx("div",{className:"bg-white order-1 lg:order-2 lg:p-8 lg:rounded-t-lg",children:e.jsx(Oe,{})}),e.jsx("div",{className:"bg-white order-3 px-6 py-10 lg:py-0 lg:px-8 lg:pb-8 rounded-b-lg",children:e.jsx(Ue,{permissions:a==null?void 0:a.permissions,hasDescription:!!(a!=null&&a.description),children:We})})]})]})]})},Us=()=>e.jsx(O,{FallbackComponent:()=>null,children:e.jsx(Xe,{})});export{Us as default};
2//# sourceMappingURL=Course-__36DUsO.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.