PageSourceSearch

https://vc.ru/assets/CourseItem.vue_vue_type_style_index_0_lang-Cuth7S2B.js

js vc.ru collected 2026-09-24 07:40:35 UTC 5,554 bytes, 1 lines download raw bytes

1import{d as S,a as r,b as a,c as L,M as A,f as t,ab as N,w as D,e as C,a8 as U,aS as X,s as l,m as b,t as c,e9 as Q,v as w,z as u,e7 as W,aO as V,b5 as Y,p as i,F as j,L as q,S as E,l as I,y as G,b4 as _,R as H,u as J,X as K,a7 as Z,ac as oo,bQ as eo,r as so,T as z}from"./index-DcSVvNrM.js";import{u as O}from"./useLocale-BECgx5XS.js";const to={class:"school-link"},co=S({__name:"SchoolLink",props:{school:{},withoutAvatar:{type:Boolean}},setup(o){const e=o,s=w(()=>{if(u(e.school.slug))return W(e.school.slug)});return(g,k)=>(r(),a("div",to,[o.withoutAvatar?l("",!0):(r(),L(A(s.value!==void 0?t(N):"div"),{key:0,to:s.value,class:"school-link__avatar"},{default:D(()=>[C(t(U),{source:t(X)({uuid:o.school.avatarLeonardoUuid??o.school.iconLeonardoUuid,width:20,height:20}),size:20},null,8,["source"])]),_:1},8,["to"])),(r(),L(A(s.value!==void 0?t(N):"span"),{to:s.value,class:"school-link__title"},{default:D(()=>[b(c(o.school.title),1)]),_:1},8,["to"])),o.school.rating?(r(),L(Q,{key:1,value:o.school.rating,school:o.school},null,8,["value","school"])):l("",!0)]))}}),ro={class:"course-promocode"},io={class:"course-promocode__title"},ao={class:"course-promocode__label"},uo={class:"course-promocode__value"},F=S({__name:"CoursePromocode",props:{promocode:{},price:{},priceBeforeDiscount:{}},setup(o){const e=o,{t:s}=O(),{isOneColumn:g}=V(),{copy:k}=Y(),x="vc.ru",$=w(()=>e.promocode.unit==="%"?"%":" ₽"),B=w(()=>
1{if(!u(e.price))return[];const h=e.priceBeforeDiscount??e.price??0,p=e.promocode.unit==="%"?Math.round(e.price*(e.promocode.amount/100)):e.promocode.amount;return[{label:s("courses.promocode.coursePrice"),value:_(h)},...u(e.priceBeforeDiscount)?[{label:s("courses.promocode.discountedPrice"),value:_(e.price)}]:[],{label:s("courses.promocode.label",{site:x}),value:`−${_(p)}`},{label:s("courses.promocode.total"),value:_(e.price-p),bold:!0}]});function m(){const{alert:h,AlertType:p}=G();k(e.promocode.code),h({type:p.Success,text:s("courses.promocode.copied")})}return(h,p)=>(r(),a("div",ro,[i("p",io,[b(c(t(s)("courses.promocode.title"))+" ",1),i("span",{onClick:m},c(o.promocode.code),1),b(" "+c(t(s)("courses.promocode.discount",{amount:o.promocode.amount,unit:$.value})),1)]),(r(!0),a(j,null,q(B.value,v=>(r(),a("div",{key:v.label,class:E(["course-promocode__list-item",v.bold&&"course-promocode__list-item--bold"])},[i("p",ao,c(v.label),1),i("p",uo,[i("span",null,c(v.value),1)])],2))),128)),C(t(I),{rounded:t(g),size:t(g)?"xl":"s",class:"course-promocode__copy",onClick:m},{default:D(()=>[b(c(t(s)("courses.promocode.copy")),1)]),_:1},8,["rounded","size"])]))}}),no=["href"],lo={class:"course-item__header"},mo={class:"course-item__body"},ho={class:"course-item__title"},po={key:0,class:"course-item__description"},vo={class:"course-item__footer"},fo={key:0,class:"course-item__highlight-text"},_o={key:1,class:"course-item__price-per-month"},go={class:"course-item__price"},yo={key:0},bo={key:1},ko={key:2},$o={key:2,class:"course-item__promocode"},Do=["href"],xo=S({__name:"CourseItem",props:{course:{},isNarrow:{type:Boolean}},setup(o){const e=o,{t:s}=O(),{formatTime:g}=H(),{open:k}=J(),{open:x}=K(),{isOneColumn:$}=V(),B=eo(p,250),m=so(),h=w(()=>{const{startingDate:y,longevity:n}=e.course,f=u(n),d=u(y);return d&&y*1e3<Date.now()?f?n.text:"":!f&&!d?`${s("courses.start")} ${s("courses.atAnyTime").toLowerCase()}`:f&&d?`${n.text}, ${s("courses.start").toLowerCase()} ${g(y*1e3,z.DayAndMonth)}`:f&&!d?`${n.text}, ${s("courses.start").toLowerCase()} ${s("courses.atAnyTime").toLowerCase()}`:!f&&d?`${s("courses.start")} ${g(y*1e3,z.DayAndMonth)}`:""});function p(){u(e.course.promocode)&&u(m.value)&&k(F,{promocode:e.course.promocode,price:e.course.price,priceBeforeDiscount:e.course.priceBeforeDiscount},{target:m.value,positionX:"left",positionY:"top",width:"max-content",behavior:"hover"})}function v(){u(e.course.promocode)&&u(m.value)&&x(F,{promocode:e.course.promocode,price:e.course.price,priceBeforeDiscount:e.course.priceBeforeDiscount})}return(y,n)=>{var d,P,M,T;const f=Z("gtm");return oo((r(),a("div",{class:E(["course-item",o.isNarrow&&"course-item--narrow",o.course.highlight&&`course-item--${o.course.highlight.style}`,((d=o.course.highlight)==null?void 0:d.hasBorder)&&"course-item--highlight-border"])},[i("a",{class:"course-item__link",href:o.course.url,target:"_blank",rel:"nofollow"},null,8,no),i("div",lo,[C(co,{school:o.course.school},null,8,["school"])]),i("div",mo,[i("p",ho,c(o.course.title),1),t(u)(h.value)?(r(),a("p",po,c(h.value),1)):l("",!0)]),i("div",vo,[(P=o.course.highlight)!=null&&P.text?(r(),a("div",fo,c((M=o.course.highlight)==null?void 0:M.text),1)):l("",!0),o.course.pricePerMonth?(r(),a("p",_o,c(t(s)("courses.creditPrice",{price:t(_)(o.course.pricePerMonth)})),1)):l("",!0),i("div",go,[o.course.price?l("",!0):(r(),a("p",yo,c(t(s)("courses.free")),1)),o.course.price?(r(),a("p",bo,c(t(_)(o.course.price)),1)):l("",!0),o.course.priceBeforeDiscount?(r(),a("span",ko,c(t(_)(o.course.priceBeforeDiscount)),1)):l("",!0)]),o.course.promocode&&!((T=o.course.highlight)!=null&&T.text)?(r(),a("div",$o,[i("span",{ref_key:"promocode",ref:m,onMouseenter:n[0]||(n[0]=R=>!t($)&&t(B)()),onClick:n[1]||(n[1]=R=>t($)&&v())},c(t(s)("courses.promocodeText",{amount:o.course.promocode.amount,unit:o.course.promocode.unit})),545)])):l("",!0),i("a",{class:"course-item__link-button",href:o.course.url,target:"_blank",rel:"nofollow"},[C(t(I),{rounded:""},{default:D(()=>[b(c(t(s)("courses.goTo")),1)]),_:1}
1)],8,Do)])],2)),[[f,"Courses Feed — Course Item — [Show, Click]"]])}}});export{xo as _,co as a};

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.