1import{_ as Je}from"./CurrencyConversion.vue_vue_type_script_setup_true_lang-CbmnCDwg.js";import{_ as ze}from"./BaseButton-Cj-1BM-l.js";import{J as D,F as re,r as v,K,d as H,g as k,y as Qe,L as We,N as Ze,O as xe,H as de,P as Me,Q as Y,o as m,e as ne,i as ae,b as G,j as e,c as _,I as we,a as t,f as me,h as Be,w as ce,t as n,q as oe,l as U,n as S,u as et,_ as ve,R as tt,s as Oe,T as st}from"./main-QFd2JyzA.js";import{C as nt}from"./vue-content-loader.es-4w4u5Wqd.js";import{u as be}from"./projects-aMuvfwTW.js";import{C as ot}from"./Checkbox-AZsLFUh2.js";import{u as _e}from"./payments-DXXwx96o.js";import{u as at}from"./useMoney-BWFuUMK8.js";import{u as je}from"./useFunctions-Dbtk2qdY.js";import{u as lt}from"./useSource-DmVodFox.js";/** 2 * Vue 3 Carousel 0.7.1 3 * (c) 2024 4 * @license MIT 5 */const Ue=["center","start","end","center-even","center-odd"],Fe=["viewport","carousel"],Xe=["ltr","left-to-right","rtl","right-to-left","ttb","top-to-bottom","btt","bottom-to-top"],it={ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",ariaNavigateToSli
5de:"Navigate to slide {slideNumber}",ariaGallery:"Gallery",itemXofY:"Item {currentSlide} of {slidesCount}",iconArrowUp:"Arrow pointing upwards",iconArrowDown:"Arrow pointing downwards",iconArrowRight:"Arrow pointing to the right",iconArrowLeft:"Arrow pointing to the left"},j={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,gap:0,height:"auto",wrapAround:!1,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,snapAlign:Ue[0],dir:Xe[0],breakpointMode:Fe[0],breakpoints:void 0,i18n:it},De={itemsToShow:{default:j.itemsToShow,type:Number},itemsToScroll:{default:j.itemsToScroll,type:Number},wrapAround:{default:j.wrapAround,type:Boolean},gap:{default:j.gap,type:Number},height:{default:j.height,type:Number},snapAlign:{default:j.snapAlign,validator(a){return Ue.includes(a)}},transition:{default:j.transition,type:Number},breakpointMode:{default:j.breakpointMode,validator(a){return Fe.includes(a)}},breakpoints:{default:j.breakpoints,type:Object},autoplay:{default:j.autoplay,type:Number},pauseAutoplayOnHover:{default:j.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:j.mouseDrag,type:Boolean},touchDrag:{default:j.touchDrag,type:Boolean},dir:{default:j.dir,validator(a){return Xe.includes(a)}},i18n:{default:j.i18n,type:Object}};function rt({config:a,slidesCount:l}){var s;const{snapAlign:d="N/A",wrapAround:p,itemsToShow:c=1}=a;if(p)return Math.max(l-1,0);const o=(s={start:Math.ceil(l-c),end:Math.ceil(l-1),center:l-Math.ceil((c-.5)/2),"center-odd":l-Math.ceil((c-.5)/2),"center-even":l-Math.ceil(c/2)}[d])!==null&&s!==void 0?s:0;return Math.max(o,0)}function ut({config:a,slidesCount:l}){var s;const{snapAlign:d="N/A",wrapAround:p,itemsToShow:c=1}=a;return p||c>l?0:(s={start:0,end:Math.floor(c-1),center:Math.floor((c-1)/2),"center-odd":Math.floor((c-1)/2),"center-even":Math.floor((c-2)/2)}[d])!==null&&s!==void 0?s:0}function ye({val:a,max:l,min:s}){return l<s?a:Math.min(Math.max(a,s),l)}const ct=(a,l)=>{var s;return(s={start:0,center:(l-1)/2,"center-odd":(l-1)/2,"center-even":(l-2)/2,end:l-1}[a])!==null&&s!==void 0?s:0};function dt({config:a,currentSlide:l,slidesCount:s}){const{snapAlign:d="N/A",wrapAround:p,itemsToShow:c=1}=a,x=ct(d,c);return p?l-x:ye({val:l-x,max:s-c,min:0})}function Ye(a){return a?a.reduce((l,s)=>{var d;return s.type===de?[...l,...Ye(s.children)]:((d=s.type)===null||d===void 0?void 0:d.name)==="CarouselSlide"?[...l,s]:l},[]):[]}function Ge({val:a,max:l,min:s=0}){const d=l-s+1;return((a-s)%d+d)%d+s}function mt(a){let l=!1;return function(...s){l||(l=!0,requestAnimationFrame(()=>{a.apply(this,s),l=!1}))}}function vt(a,l){let s;return function(...d){s&&clearTimeout(s),s=setTimeout(()=>{a(...d),s=null},l)}}function He(a="",l={}){return Object.entries(l).reduce((s,[d,p])=>s.replace(`{${d}}`,String(p)),a)}var _t=H({name:"ARIA",setup(){const a=D("config",re(Object.assign({},j))),l=D("currentSlide",v(0)),s=D("slidesCount",v(0));return()=>K("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},He(a.i18n.itemXofY,{currentSlide:l.value+1,slidesCount:s.value}))}}),ht=H({name:"Carousel",props:De,setup(a,{slots:l,emit:s,expose:d}){var p;const c=v(null),x=v(null),o=v([]),y=v(0),h=v(0),T=k(()=>Object.assign(Object.assign(Object.assign({},j),a),{i18n:Object.assign(Object.assign({},j.i18n),a.i18n),breakpoints:void 0})),i=re(Object.assign({},T.value)),g=v((p=a.modelValue)!==null&&p!==void 0?p:0),r=v(0),P=v(0),B=v(0),A=v(0);let F=null,L=null,b=null;const f=k(()=>y.value+i.gap),E=k(()=>{const u=i.dir||"lrt";return{"left-to-right":"ltr","right-to-left":"rtl","top-to-bottom":"ttb","bottom-to-top":"btt"}[u]||u}),M=k(()=>["ttb","btt"].includes(E.value));Y("config",i),Y("slidesCount",h),Y("currentSlide",g),Y("maxSlide",B),Y("minSlide",A),Y("slideSize",y),Y("isVertical",M),Y("normalizeDir",E);function $(){var u;if(!a.breakpoints)return;const I=(i.breakpointMode==="carousel"?(u=c.value)===null||u===void 0?void 0:u.getBoundingClientRect().width:window.innerWidth)||0,V=Object.keys(a.breakpoints||{}).map(z=>Number(z)).sort((z,q)=>+q-+z);let R=Object.assign({},T.value);V.some(z=>{var q;return I>=z?(R=Object.assign(Object.assign({},R),(q=a.breakpoints)===null||q===void 0?void 0:q[z]),!0):!1}),Object.assign(i,R)}const W=vt(()=>{$(),J(),C()},16);function C(){if(!x.value)return;const u=x.value.getBoundingClientRect(),I=(i.itemsToShow-1)*i.gap;
5M.value?y.value=(u.height-I)/i.itemsToShow:y.value=(u.width-I)/i.itemsToShow}function J(){h.value<=0||(P.value=Math.ceil((h.value-1)/2),B.value=rt({config:i,slidesCount:h.value}),A.value=ut({config:i,slidesCount:h.value}),i.wrapAround||(g.value=ye({val:g.value,max:B.value,min:A.value})))}Qe(()=>{We(()=>C()),setTimeout(()=>C(),1e3),$(),$e(),window.addEventListener("resize",W,{passive:!0}),b=new ResizeObserver(W),c.value&&b.observe(c.value),s("init")}),Ze(()=>{L&&clearTimeout(L),F&&clearInterval(F),b&&c.value&&(b.unobserve(c.value),b=null),window.removeEventListener("resize",W,{passive:!0})});let w=!1;const O={x:0,y:0},X=re({x:0,y:0}),le=v(!1),N=v(!1),he=()=>{le.value=!0},Se=()=>{le.value=!1};function ke(u){const I=u.target.tagName;if(["INPUT","TEXTAREA","SELECT"].includes(I)||Z.value||(w=u.type==="touchstart",!w&&(u.preventDefault(),u.button!==0)))return;O.x=w?u.touches[0].clientX:u.clientX,O.y=w?u.touches[0].clientY:u.clientY;const V=w?"touchmove":"mousemove",R=w?"touchend":"mouseup";document.addEventListener(V,Ae,{passive:!1}),document.addEventListener(R,Pe,{passive:!0})}const Ae=mt(u=>{N.value=!0;const I=w?u.touches[0].clientX:u.clientX,V=w?u.touches[0].clientY:u.clientY,R=I-O.x,z=V-O.y;X.x=R,X.y=z,s("drag",{deltaX:R,deltaY:z})});function Pe(){const u=M.value?"y":"x",I=["rtl","btt"].includes(E.value)?-1:1,V=Math.sign(X[u])*.4,R=Math.round(X[u]/f.value+V)*I;if(R&&!w){const Q=ie=>{ie.preventDefault(),window.removeEventListener("click",Q)};window.addEventListener("click",Q)}const z=g.value-R;ee(z),X.x=0,X.y=0,N.value=!1;const q=w?"touchmove":"mousemove",te=w?"touchend":"mouseup";document.removeEventListener(q,Ae),document.removeEventListener(te,Pe)}function $e(){!i.autoplay||i.autoplay<=0||(F=setInterval(()=>{i.pauseAutoplayOnHover&&le.value||ue()},i.autoplay))}function Ie(){F&&(clearInterval(F),F=null),$e()}const Z=v(!1);function ee(u){const I=i.wrapAround?u:ye({val:u,max:B.value,min:A.value});g.value===I||Z.value||(s("slide-start",{slidingToIndex:u,currentSlideIndex:g.value,prevSlideIndex:r.value,slidesCount:h.value}),Z.value=!0,r.value=g.value,g.value=I,L=setTimeout(()=>{if(i.wrapAround){const V=Ge({val:I,max:B.value,min:0});V!==g.value&&(g.value=V,s("loop",{currentSlideIndex:g.value,slidingToIndex:u}))}s("update:modelValue",g.value),s("slide-end",{currentSlideIndex:g.value,prevSlideIndex:r.value,slidesCount:h.value}),Z.value=!1,Ie()},i.transition))}function ue(){ee(g.value+i.itemsToScroll)}function ge(){ee(g.value-i.itemsToScroll)}const Te={slideTo:ee,next:ue,prev:ge};Y("nav",Te),Y("isSliding",Z);function Ce(){$(),J(),C(),Ie()}Object.keys(De).forEach(u=>{["modelValue"].includes(u)||xe(()=>a[u],Ce)}),xe(()=>a.modelValue,u=>{u!==g.value&&ee(Number(u))}),xe(h,J),s("before-init");const Ne={config:i,slidesCount:h,slideSize:y,next:ue,prev:ge,slideTo:ee,currentSlide:g,maxSlide:B,minSlide:A,middleSlide:P};d({updateBreakpointsConfig:$,updateSlidesData:J,updateSlideSize:C,restartCarousel:Ce,slideTo:ee,next:ue,prev:ge,nav:Te,data:Ne});const fe=l.default||l.slides,pe=l.addons,Le=re(Ne);return()=>{const u=Ye(fe==null?void 0:fe(Le)),I=(pe==null?void 0:pe(Le))||[];u.forEach((te,Q)=>te.props.index=Q);let V=u;if(i.wrapAround){const te=u.map((ie,se)=>Me(ie,{index:-u.length+se,isClone:!0,key:`clone-before-${se}`})),Q=u.map((ie,se)=>Me(ie,{index:u.length+se,isClone:!0,key:`clone-after-${se}`}));V=[...te,...u,...Q]}o.value=u,h.value=Math.max(u.length,1);const R=k(()=>{const te=dt({config:i,currentSlide:g.value,slidesCount:h.value}),Q=i.wrapAround?h.value:0,se=["rtl","btt"].includes(E.value)?-1:1,qe=(te+Q)*f.value*se,Ke=M.value?X.y:X.x;return`translate${M.value?"Y":"X"}(${Ke-qe}px)`}),z=K("ol",{class:"carousel__track",style:{transform:R.value,transition:`${Z.value?i.transition:0}ms`,gap:`${i.gap}px`},onMousedownCapture:i.mouseDrag?ke:null,onTouchstartPassiveCapture:i.touchDrag?ke:null},V),q=K("div",{class:"carousel__viewport",ref:x},z);return K("section",{ref:c,class:["carousel",`is-${E.value}`,{"is-vertical":M.value,"is-sliding":Z.value,"is-dragging":N.value,"is-hover":le.value}],style:{"--vc-trk-height":`${typeof i.height=="number"?`${i.height}px`:i.height}`},dir:E.value,"aria-label":i.i18n.ariaGallery,tabindex:"0",onMouseenter:he,onMouseleave:Se},[q,I,K(_t)])}}}),Ee;(function(a){a.arrowUp="arrowUp",a.arrowDown="arrowDown",a.arrowRight="arrowRight",a.arrowLeft="arrowLeft"})(Ee||(Ee={}));const gt=()=>{const a=D("config",re(Object.assign({},j))),l=D("maxSlide",v(1)),s=D("minSlide",v(1)),d=D("currentSlide",v(1)),p=D("nav",{}),c=o=>Ge({val:d.value,max:l.value,min:0})===o,x=[];for(let o=s.value;o<l.value+1;
5o++){const y=He(a.i18n.ariaNavigateToSlide,{slideNumber:o+1}),h=K("button",{type:"button",class:{"carousel__pagination-button":!0,"carousel__pagination-button--active":c(o)},"aria-label":y,title:y,onClick:()=>p.slideTo(o)}),T=K("li",{class:"carousel__pagination-item",key:o},h);x.push(T)}return K("ol",{class:"carousel__pagination"},x)};var ft=H({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(a,{slots:l}){const s=D("config",re(Object.assign({},j))),d=D("currentSlide",v(0)),p=D("slidesToScroll",v(0)),c=D("isSliding",v(!1)),x=D("isVertical",v(!1)),o=D("slideSize",v(0)),y=k(()=>a.index===d.value),h=k(()=>a.index===d.value-1),T=k(()=>a.index===d.value+1),i=k(()=>{const r=Math.floor(p.value),P=Math.ceil(p.value+s.itemsToShow-1);return a.index>=r&&a.index<=P}),g=k(()=>{const r=s.gap?`${o.value}px`:`${100/s.itemsToShow}%`;return x.value?{height:r,width:""}:{width:r,height:""}});return()=>{var r;return K("li",{style:g.value,class:{carousel__slide:!0,"carousel__slide--clone":a.isClone,"carousel__slide--visible":i.value,"carousel__slide--active":y.value,"carousel__slide--prev":h.value,"carousel__slide--next":T.value,"carousel__slide--sliding":c.value},"aria-hidden":!i.value},(r=l.default)===null||r===void 0?void 0:r.call(l,{isActive:y.value,isClone:a.isClone,isPrev:h.value,isNext:T.value,isSliding:c.value,isVisible:i.value}))}}});const pt={class:"carousel__item gallery-bg"},xt=["alt","src"],yt=H({__name:"SingleProjectGallery",props:{projectImages:{}},setup(a){const l=v({itemsToShow:1,snapAlign:"center",itemsToScroll:0,autoplay:2500,pauseAutoplayOnHover:!0,wrapAround:!0,transition:2500}),s=v({700:{itemsToShow:1,snapAlign:"center",itemsToScroll:1},1024:{itemsToShow:1,snapAlign:"center",itemsToScroll:1}});return(d,p)=>(m(),ne(e(ht),{breakpoints:s.value,settings:l.value,class:"gallery-slider mt-10",dir:"ltr"},{slides:ae(()=>[(m(!0),_(de,null,we(d.projectImages,(c,x)=>(m(),ne(e(ft),{key:x},{default:ae(()=>[t("div",pt,[t("img",{alt:c,src:c,class:"w-full h-full object-cover"},null,8,xt)])]),_:2},1024))),128))]),addons:ae(()=>[G(e(gt))]),_:1},8,["breakpoints","settings"]))}}),wt={class:"md:container md:px-4 md:max-w-6xl lg:px-0 mx-auto relative mt-10 md:mt-25 mb-10"},bt=H({__name:"SingleProjectSkeleton",setup(a){return(l,s)=>(m(),_("div",null,[t("div",wt,[G(e(nt),{"background-color":"#f3f3f3","foreground-color":"#ecebeb",height:"{2200}",viewBox:"0 0 1280 2200",width:"{1280}"},{default:ae(()=>s[0]||(s[0]=[t("rect",{height:"422",rx:"0",ry:"0",width:"1280",x:"0",y:"63"},null,-1),t("rect",{height:"42",rx:"0",ry:"0",width:"350",x:"1000",y:"520"},null,-1),t("rect",{height:"42",rx:"0",ry:"0",width:"380",x:"0",y:"600"},null,-1),t("rect",{height:"22",rx:"0",ry:"0",width:"580",x:"0",y:"680"},null,-1),t("rect",{height:"22",rx:"0",ry:"0",width:"580",x:"0",y:"720"},null,-1),t("rect",{height:"22",rx:"0",ry:"0",width:"280",x:"0",y:"760"},null,-1),t("rect",{height:"62",rx:"0",ry:"0",width:"380",x:"0",y:"840"},null,-1),t("rect",{height:"492",rx:"0",ry:"0",width:"580",x:"0",y:"950"},null,-1),t("rect",{height:"42",rx:"0",ry:"0",width:"380",x:"0",y:"1500"},null,-1),t("rect",{height:"22",rx:"0",ry:"0",width:"580",x:"0",y:"1580"},null,-1),t("rect",{height:"22",rx:"0",ry:"0",width:"580",x:"0",y:"1620"},null,-1),t("rect",{height:"22",rx:"0",ry:"0",width:"280",x:"0",y:"1660"},null,-1),t("rect",{height:"392",rx:"0",ry:"0",width:"580",x:"0",y:"1700"},null,-1),t("rect",{height:"10",rx:"5",ry:"5",width:"520",x:"753",y:"623"},null,-1),t("rect",{height:"42",rx:"0",ry:"0",width:"320",x:"753",y:"673"},null,-1),t("rect",{height:"18",rx:"0",ry:"0",width:"350",x:"753",y:"733"},null,-1),t("rect",{height:"42",rx:"0",ry:"0",width:"320",x:"753",y:"803"},null,-1),t("rect",{height:"18",rx:"0",ry:"0",width:"350",x:"753",y:"863"},null,-1),t("rect",{height:"42",rx:"0",ry:"0",width:"320",x:"753",y:"933"},null,-1),t("rect",{height:"18",rx:"0",ry:"0",width:"350",x:"753",y:"993"},null,-1),t("rect",{height:"450",rx:"0",ry:"0",width:"520",x:"753",y:"1093"},null,-1),t("rect",{height:"80",rx:"0",ry:"0",width:"520",x:"753",y:"1583"},null,-1),t("rect",{height:"480",rx:"0",ry:"0",width:"520",x:"753",y:"1723"},null,-1)])),_:1})])]))}}),jt="https://lender.sparkil.org/lenders/supporters-arrow-down.svg",St={class:"how_much_lend mt-10"},kt={class:"capitalize font-weight-700 font-poppins text-2xl mb-5"},At={class:"grid grid-cols-3 gap-5"},Pt=["onClick"],$t={class:"group-hover:text-main"},It={class:"relative mt-5"},Tt=["placeholder","value"],Ct={key:0,class:"mt-2 text-dark-green font-weight-500"},Nt={class:"font-weight-700 text-dark-green"},Lt={class:"rtl:hidden font-weight-300 text-dark-green mx-1"},Mt={key:1,class:"mt-2 text-error"},Ot={key:2,class:"mt-2 text-error"},Dt={class:"flex items-center mt-5"},Et={key:0,class:"form-check rtl:flex rtl:flex-row"}
5,Vt=H({__name:"LendForm",setup(a){const{t:s,locale:d}=me(),p=et(),c=Be(),x=be(),o=_e(),y=v(!1),h=v(null),T=v([36,50,100,180,360,500]),i=v([50,100,150,200,300,500]),g=v(d.value=="en"?T:i),r=v({anonymous:!1,lendAmount:""}),P=v(null),B=k(()=>c.params.project),A=k(()=>x.currentProject),F=k(()=>o.isAuthenticated),{makeMoney:L,getLocale:b,formattedLocale:f,formattedILS:E,getCurrency:M}=at(),$=k(()=>L(P.value||0,M())),W=w=>{r.value.lendAmount="",h.value=w,P.value=w},C=()=>{p.push({name:"project-checkout",params:{project:B.value},query:{anonymous:r.value.anonymous.toString(),amount:b($.value),currency:M().toUpperCase(),source:"internal"}})},J=w=>{if(w.data?r.value.lendAmount=r.value.lendAmount.slice(1)+w.data:r.value.lendAmount=r.value.lendAmount.slice(1).slice(0,-1),r.value.lendAmount&&r.value.lendAmount.length&&Number(r.value.lendAmount)){let O=L(Number(r.value.lendAmount||0),M());P.value=b(O),h.value=null,r.value.lendAmount=f(O)}};return ce(()=>{!r.value.lendAmount&&!h.value&&(P.value=null)}),ce(()=>{let w=A.value.summary.total_goal_amount-A.value.summary.total_raised_amount;y.value=$.value.ILS!==0&&b($.value)>=g.value[0]&&w>0&&$.value.ILS<=w,F.value&&(y.value=!0)}),(w,O)=>{const X=ot,le=ze;return m(),_("div",St,[t("h3",kt,n(e(s)("singleProject.how_much_to_lend")),1),t("div",At,[(m(!0),_(de,null,we(g.value,(N,he)=>(m(),_("div",{key:he,class:oe([{"selected-loan gradient-btn":h.value===N},"cursor-pointer border-3 border-primary rounded-md text-center h-25 w-full flex justify-center items-center hover:border-main hover:text-main group-hover:border-main group-hover:text-main lend-box"]),onClick:Se=>W(N)},[t("div",$t,[t("div",{class:oe([{"text-white":h.value===N,"text-primary":h.value!==N},"font-weight-700 group-hover:text-main text-xl leading-5"])},n(e(f)(e(L)(N,e(M)()))),3),t("span",{class:oe([{"text-white":h.value===N},"rtl:hidden text-sm group-hover:text-main"])}," ("+n(e(E)(e(L)(N,e(M)())))+") ",3)])],10,Pt))),128))]),t("div",It,[t("input",{placeholder:e(s)("singleProject.i_want_to_lend"),value:r.value.lendAmount,class:"mt-2 border-3 border-primary rounded-md w-full p-4 ring-0 focus:border-main outline-transparent",onInput:O[0]||(O[0]=N=>J(N))},null,40,Tt)]),y.value?(m(),_("div",Ct,[U(n(e(s)("singleProject.monthly_return"))+" ",1),t("span",Nt,n(e(f)(e(L)($.value.ILS/A.value.repayment_term))),1),t("span",Lt," ("+n(e(s)("approx"))+" "+n(e(E)(e(L)($.value.ILS/A.value.repayment_term)))+") ",1),U(" "+n(e(s)("singleProject.for"))+" "+n(A.value.repayment_term)+" "+n(e(s)("singleProject.months")),1)])):S("",!0),$.value.ILS&&$.value.ILS>e(L)(A.value.summary.total_goal_amount-A.value.summary.total_raised_amount).ILS?(m(),_("div",Mt,n(e(s)("singleProject.last_loan_limit",{min:e(f)(e(L)(Math.max(A.value.summary.total_goal_amount-A.value.summary.total_raised_amount,0)))})),1)):S("",!0),$.value.ILS&&e(b)($.value)<g.value[0]?(m(),_("div",Ot,n(e(s)("singleProject.amount_minimum",{min:e(f)(e(L)(g.value[0],e(M)()))})),1)):S("",!0),t("div",Dt,[(m(),_("div",Et,[G(X,{id:"anonymous",modelValue:r.value.anonymous,"onUpdate:modelValue":O[1]||(O[1]=N=>r.value.anonymous=N),msg:e(s)("singleProject.prefer_anonymous")},null,8,["modelValue","msg"])]))]),G(le,{class:oe([{"opacity-50 cursor-default":!y.value},"mt-5 h-12 w-full rounded text-lg font-weight-500 gradient-btn text-white py-2"]),onClick:O[2]||(O[2]=N=>C())},{default:ae(()=>[U(n(e(s)("singleProject.proceed_to_checkout")),1)]),_:1},8,["class"])])}}}),Rt=ve(Vt,[["__scopeId","data-v-4e5f702e"]]),zt={key:0},Bt={class:"font-weight-800 text-3xl text-start"},Ut={class:"font-weight-600 text-sm"},Ft={class:"rtl:hidden font-weight-700 text-base text-start text-primary"},Xt={class:"font-weight-700 text-2xl"},Yt={class:"ms-1"},Gt={class:"ltr:hidden font-weight-700 text-base text-start text-primary"},Ht={class:"font-weight-700 text-2xl"},qt=H({__name:"SingleProjectInvest",props:{projectId:{}},setup(a){const l=a,{t:s}=me(),d=v(!1),p=_e(),{formatNumber:c,convertShekelsToDollars:x}=je(),o=k(()=>p.totalUserProjectInvestment);return(()=>{d.value=!0,p.fetchUserProjectLoan(l.projectId).then(()=>{d.value=!1}).catch(()=>{d.value=!1})})(),(h,T)=>(m(),_("div",null,[o.value?(m(),_("div",zt,[t("div",Bt,[t("span",Ut,n(e(s)("singleProject.invest.you_invested")),1)]),t("div",Ft,[t("div",Xt,[U(n(e(s)("minor_currency"))+n(e(c)(e(x)(o.value)))+" ",1),t("span",Yt,"("+n(e(s)("major_currency"))+n(e(c)(o.value))+")",1)])]),t("div",Gt,[t("div",Ht,n(e(s)("major_currency"))+n(e(c)(o.value)),1)])])):S("",!0)]))}}
5),Ve=ve(qt,[["__scopeId","data-v-a878c574"]]),Kt={key:0},Jt={key:1,class:"text-end text-md text-fundraising"},Qt={key:2,class:"text-sm font-weight-700"},Re=H({__name:"ProjectStatus",setup(a){const{t:l,locale:s}=me(),d=_e(),p=be(),{getDaysLeft:c,formatNumber:x,convertedDecimalValue:o,getCurrencySign:y,capitalize:h}=je(),{isAuthenticated:T}=d,i=k(()=>d.totalUserProjectInvestment),g=k(()=>d.totalUserProjectRepaid),r=k(()=>p.currentProject);return(P,B)=>e(T)?(m(),_("div",Kt,[t("div",null,[i.value?(m(),_("div",{key:0,class:oe([{"bg-fundraising":r.value.status==="fundraising","bg-repaying":r.value.status==="repaying"},"bg-orange text-white px-3 py-2 capitalize text-center"])},n(r.value.status),3)):S("",!0),r.value.status==="fundraising"?(m(),_("div",Jt,n(e(l)("singleProject.invest.starts_in_day",{days:e(c)(r.value.ends_on)})),1)):S("",!0),r.value.status==="repaying"&&i.value?(m(),_("div",Qt,n(e(h)(e(l)("singleProject.invest.repaid")))+" "+n(e(y)(e(l),e(s))+e(x)(e(o)(g.value,e(s))))+", "+n(e(h)(e(l)("singleProject.invest.left")))+" "+n(e(y)(e(l),e(s))+e(x)(e(o)(i.value-g.value,e(s)))),1)):S("",!0)])])):S("",!0)}}),Wt=H({props:{src:String}}),Zt={playsinline:"",controls:"",class:"video-player"},es=["src"];function ts(a,l,s,d,p,c){return m(),_("video",Zt,[t("source",{src:a.src,type:"video/mp4"},null,8,es)])}const ss=ve(Wt,[["render",ts]]),ns={key:0},os={key:1,class:"md:container md:px-4 md:max-w-6xl px-5 md:px-0 mx-auto relative mt-10 md:mt-15 mb-10 md:mb-50"},as={class:"w-full md:h-[400px] relative"},ls=["src"],is={key:0,class:"absolute px-4 bottom-6"},rs=["alt","src"],us={class:"md:flex mt-15"},cs={class:"left-side md:w-6/12"},ds={class:"intro"},ms={class:"text-2xl font-weight-900 mb-3"},vs={class:"font-weight-700 text-base tracking-wide text-justify leading-9"},_s={class:"mobile-section mt-10"},hs={class:"md:hidden progress-bar relative"},gs={class:"md:hidden project-finance-details mb-10 w-full flex"},fs={class:"mt-5 me-5"},ps={class:"font-weight-800 text-base text-start"},xs={class:"font-weight-300 mx-1"},ys=["title"],ws={class:"rtl:hidden font-weight-800 text-base text-start text-fundraising"},bs={class:"ltr:hidden font-weight-800 text-base text-start text-fundraising"},js={class:"mt-5 me-5"},Ss={class:"font-weight-800 text-base text-start"},ks={class:"text-xs text-start text-primary mt-2"},As={class:"mt-5"},Ps={class:"font-weight-800 text-base text-start flex"},$s={class:"font-weight-600 text-sm"},Is={class:"text-xs text-start text-primary mt-2"},Ts={class:"descripton mt-10"},Cs={class:"text-2xl font-weight-700 mb-3"},Ns={class:"font-weight-300 text-base text-justify leading-8"},Ls={class:"flex flex-col mt-6"},Ms={class:"font-semibold text-base"},Os={key:0,class:"promo_video flex flex-col mt-20"},Ds={class:"text-2xl font-weight-700 mb-5"},Es={class:"about-owner mt-20"},Vs={class:"text-2xl font-weight-700 mb-3 capitalize"},Rs={class:"font-weight-300 text-base text-justify leading-8"},zs=["src"],Bs={key:1,class:"gallery mt-20"},Us={class:"text-2xl font-weight-700 mb-3 capitalize"},Fs={class:"right-side md:w-4/12"},Xs={class:"hidden md:block progress-bar relative"},Ys={class:"hidden md:block project-finance-details my-10 w-full"},Gs={class:"mt-10"},Hs={class:"rtl:hidden font-weight-800 text-3xl text-start"},qs={class:"font-weight-300 mx-1"},Ks={class:"ltr:hidden font-weight-800 text-3xl text-start"},Js=["title"],Qs={class:"rtl:hidden font-weight-800 text-base text-start text-fundraising"},Ws={class:"ltr:hidden font-weight-800 text-base text-start text-fundraising"},Zs={key:0,class:"mt-10"},en={class:"font-weight-800 text-3xl text-start"},tn={class:"font-weight-700 text-base text-start text-primary mt-2"},sn={key:1,class:"mt-10"},nn={class:"font-weight-800 text-3xl text-start"},on={class:"font-weight-600 text-sm"},an={class:"font-weight-700 text-base text-start text-primary mt-2"},ln={class:"mt-10"},rn={key:0,class:"supporting-people mt-10 w-full bg-background p-5 py-7 relative"},un={class:"font-weight-700 flex flex-row items-center"},cn={class:"font-weight-700 leading-4 me-1 mb-1"},dn=["src"],mn={class:"rtl:hidden flex justify-start items-center"},vn={class:"ms-2"},_n=["title"],hn={class:"ltr:hidden flex justify-start items-center ms-2"},gn={class:"leading-4 text-xs me-1"},fn={class:"leading-4 text-xs font-weight-700 text-light-green"},pn={class:"leading-4 text-xs font-weight-700 text-light-green"},xn={class:"leading-4 text-xs mx-1"},yn={class:"leading-4 text-xs"},wn={key:1},bn={class:"mt-10"},jn=H({__name:"SingleProject",setup(a){const{t:s}=me();let d=Be();const p=be(),c=v(!1),x=k(()=>d.params.project),o=v(),y=v(!1);let{getSourceIcon:h}=lt();const T=k(()=>h("white")),i=v();ce(()=>{x.value&&p.fetchProject(x.value).then(b=>o.value=b)}),ce(()=>{x.value&&p.fetchProjectSupporters(x.value).then(b=>i.value=L(b))});const{getDaysLeft:g,formatNumber:r,constConvertedValue:P,imageSrcFail:B}=je(),{isAuthenticated:A}=_e(),F=b=>{var f;b.preventDefault(),window.scrollTo({top:(f=document.getElementById("fundLoan"))==null?void 0:f.offsetTop,behavior:"smooth"}),c.value=!0},L=b=>{const f=b.findIndex(E=>
5E.lender_id==="623a2cb254c44017aae80dea");return f!==-1&&b.push(b.splice(f,1)[0]),b};return(b,f)=>{const E=bt,M=yt,$=ze,W=Je;return m(),_("div",null,[o.value?(m(),_("div",os,[t("figure",as,[t("img",{src:o.value.cover,alt:"",class:"w-full md:h-full project-cover object-cover",srcset:""},null,8,ls),T.value?(m(),_("figcaption",is,[t("img",{alt:T.value,src:T.value},null,8,rs)])):S("",!0)]),o.value.status==="fundraising"?(m(),_("div",{key:0,class:"cursor-pointer text-end text-lg font-weight-800 text-main mt-2",onClick:tt(F,["prevent"])},n(e(s)("singleProject.fund_this_project")),1)):S("",!0),t("div",us,[t("div",cs,[G(Re,{class:"flex md:hidden justify-end mb-5"}),t("div",ds,[t("div",ms,n(o.value.name),1),t("div",vs,n(o.value.title),1)]),t("div",_s,[t("div",hs,[f[3]||(f[3]=t("div",{class:"w-full h-2 bg-background"},null,-1)),t("div",{style:Oe({width:`${o.value.summary.total_goal_complete}%`}),class:"absolute top-0 h-2 bg-main"},null,4)]),t("div",gs,[t("div",fs,[t("div",ps,[U(n(e(s)("minor_currency"))+n(e(r)(e(P)(o.value.summary.total_goal_amount)))+" ",1),t("span",xs," ("+n(e(s)("major_currency"))+n(e(r)(o.value.summary.total_goal_amount))+") ",1)]),t("div",{title:`${e(s)("minor_currency")}${e(r)(e(P)(o.value.summary.total_goal_amount-o.value.summary.total_raised_amount))}`,class:"text-xs text-start text-primary mt-2"},[t("span",ws,n(e(s)("minor_currency"))+n(e(r)(e(P)(o.value.summary.total_goal_amount-o.value.summary.total_raised_amount))),1),t("span",bs,n(e(s)("major_currency"))+n(e(r)(o.value.summary.total_goal_amount-o.value.summary.total_raised_amount)),1),U(" "+n(e(s)("singleProject.left_to_the_goal")),1)],8,ys)]),t("div",js,[t("div",Ss,n(e(g)(o.value.ends_on)),1),t("div",ks,n(e(s)("singleProject.days_to_goal")),1)]),t("div",As,[t("div",Ps,[U(n(o.value.repayment_term)+" ",1),t("span",$s,n(e(s)("singleProject.months")),1)]),t("div",Is,n(e(s)("singleProject.repayment_term")),1)])]),e(A)?(m(),ne(Ve,{key:0,"project-id":o.value.id,class:"md:hidden my-10"},null,8,["project-id"])):S("",!0)]),t("div",Ts,[t("div",Cs,n(e(s)("singleProject.about_loan_request")),1),t("div",Ns,n(o.value.description),1),t("div",Ls,[t("span",Ms,n(e(s)("singleProject.share_the_campaign_on")),1)])]),o.value.promo_video&&o.value.promo_video.trim()?(m(),_("div",Os,[t("div",Ds,n(o.value.promo_video_description),1),G(ss,{src:o.value.promo_video},null,8,["src"])])):S("",!0),t("div",Es,[t("div",Vs,n(e(s)("singleProject.about"))+" "+n(o.value.owner_name),1),t("div",Rs,n(o.value.owner_about),1),t("img",{src:o.value.owner_avatar,alt:"",class:"mt-5 rounded-xl h-[250px] w-full object-cover",srcset:""},null,8,zs)]),o.value.gallery_items&&o.value.gallery_items.length>0?(m(),_("div",Bs,[t("div",Us,n(e(s)("singleProject.gallery")),1),t("div",null,[G(M,{"project-images":o.value.gallery_items},null,8,["project-images"])])])):S("",!0)]),f[7]||(f[7]=t("div",{class:"w-2/12"},null,-1)),t("div",Fs,[G(Re,{class:"hidden md:flex justify-end mb-5"}),t("div",Xs,[f[4]||(f[4]=t("div",{class:"w-full h-2 bg-background"},null,-1)),t("div",{style:Oe({width:`${o.value.summary.total_goal_complete}%`}),class:"absolute top-0 h-2 bg-main"},null,4)]),t("div",Ys,[t("div",Gs,[t("div",Hs,[U(n(e(s)("minor_currency"))+n(e(r)(e(P)(o.value.summary.total_goal_amount)))+" ",1),t("span",qs," ( "+n(e(s)("major_currency"))+n(e(r)(o.value.summary.total_goal_amount))+") ",1)]),t("div",Ks,n(e(r)(o.value.summary.total_goal_amount))+" "+n(e(s)("major_currency")),1),t("div",{title:`${e(s)("major_currency")}${e(r)(o.value.summary.total_goal_amount-o.value.summary.total_raised_amount)}`,class:"font-weight-800 text-base text-start text-primary mt-2"},[t("span",Qs,n(e(s)("minor_currency"))+n(e(r)(e(P)(o.value.summary.total_goal_amount-o.value.summary.total_raised_amount))),1),t("span",Ws,n(e(s)("major_currency"))+n(e(r)(o.value.summary.total_goal_amount-o.value.summary.total_raised_amount)),1),U(" "+n(e(s)("singleProject.left_to_the_goal")),1)],8,Js)]),o.value.status==="fundraising"?(m(),_("div",Zs,[t("div",en,n(e(g)(o.value.ends_on)),1),t("div",tn,n(e(s)("singleProject.days_to_goal")),1)])):S("",!0),o.value.status==="fundraising"?(m(),_("div",sn,[t("div",nn,[U(n(o.value.repayment_term)+" ",1),t("span",on,n(e(s)("singleProject.months")),1
5)]),t("div",an,n(e(s)("singleProject.repayment_term")),1)])):S("",!0),t("div",ln,[e(A)?(m(),ne(Ve,{key:0,"project-id":o.value.id,class:"hidden md:block"},null,8,["project-id"])):S("",!0)])]),(m(),_("div",rn,[t("div",un,[t("span",cn,n(i.value?i.value.length:0),1),U(" "+n(e(s)("singleProject.supported_this_project")),1)]),f[6]||(f[6]=t("div",{class:"h-1 w-10 my-5 bg-primary"},null,-1)),i.value&&i.value.length?(m(),_("div",{key:0,class:oe([{"transition-height ease-in-out duration-1000 h-[600px] overflow-auto":y.value,"transition-height ease-in-out duration-1000 h-[230px] overflow-hidden":!y.value},""])},[(m(!0),_(de,null,we(i.value,(C,J)=>(m(),_("div",{key:J,class:"flex justify_between items-center my-5"},[t("img",{src:C.lender_avatar,alt:"",class:"h-12 w-12 rounded-full object-cover",srcset:"",onError:f[0]||(f[0]=(...w)=>e(B)&&e(B)(...w))},null,40,dn),f[5]||(f[5]=t("div",null,null,-1)),t("div",mn,[t("div",vn,n(C.lender_name)+" "+n(o.value.status==="fundraising"?e(s)("singleProject.just_lent"):e(s)("singleProject.lent")),1),t("div",{title:`${e(s)("major_currency")}${e(r)(C.amount)}`,class:"ms-1 font-weight-700 text-light-green"},n(e(s)("minor_currency"))+n(e(r)(e(P)(C.amount))),9,_n)]),t("div",hn,[t("span",gn,n(o.value.summary.total_goal_complete!==100?e(s)("singleProject.just_lent"):e(s)("singleProject.lent")),1),t("span",fn,n(e(r)(C.amount)),1),t("span",pn,n(e(s)("major_currency")),1),t("span",xn,n(e(s)("singleProject.lent_from")),1),t("span",yn,n(C.lender_name),1)])]))),128))],2)):(m(),_("div",wn,n(e(s)("singleProject.be_the_first_one")),1)),i.value&&i.value.length>3?(m(),_("div",{key:2,class:"cursor-pointer absolute start-0 bottom-0 w-full bg-background flex justify-center items-center p-5",onClick:f[1]||(f[1]=C=>y.value=!y.value)},[t("img",{class:oe({"transform ease-in-out duration-1000 rotate-180":y.value}),alt:"",src:jt},null,2)])):S("",!0)])),o.value.status==="fundraising"?(m(),ne(st,{key:1,"enter-from-class":"opacity-0 translate-y-5","enter-to-class":"transition duration-200 transform ease","leave-from-class":"transition duration-200 transform ease","leave-to-class":"opacity-0 translate-y-5"},{default:ae(()=>[(m(),_("div",{id:"fundLoan",key:"t"+c.value},[c.value?S("",!0):(m(),ne($,{key:0,class:"mt-5 h-12 w-full rounded gradient-btn text-white text-lg font-weight-500 py-2",onClick:f[2]||(f[2]=C=>c.value=!c.value)},{default:ae(()=>[U(n(e(s)("singleProject.fund_loan")),1)]),_:1})),c.value?(m(),ne(Rt,{key:1})):S("",!0)]))]),_:1})):S("",!0),t("div",bn,[G(W,{"parent-class":"rtl:hidden bg-background p-6 px-9"})])])])])):(m(),_("div",ns,[G(E)]))])}}}),On=ve(jn,[["__scopeId","data-v-a843a154"]]);export{On as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.