%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/opti/public_html/startup-life/assets/
Upload File :
Create Path :
Current File : /home/opti/public_html/startup-life/assets/index-e0e2e932.js

import{P as p,r as x,e as E,y as R,Q as _,u as G,j as e,d as V}from"./index-5492fbe1.js";import{R as z}from"./style-0956a52d.js";import{u as B}from"./index.esm-1be9f6a3.js";import{I as f}from"./index-fbb310b5.js";import{C as F}from"./index-fdf728e2.js";import{D as A}from"./dashboard-page-layout-2cec2413.js";import{D}from"./dashboard-footer-navigation-f658b457.js";import{B as I}from"./Box-263f925f.js";import{G as s}from"./Grid-edacc4c9.js";import{F as N}from"./index-5e112d84.js";import{b as T}from"./base64-converter-db95817a.js";import{C as k}from"./index-2c4b8b3c.js";import{C as P}from"./CheckRounded-e8870de6.js";import"./styled-components.browser.esm-ee37ee23.js";import"./tslib.es6-ace8e431.js";import"./Menu-c26e62ae.js";import"./useFormControl-45c447f9.js";import"./useForkRef-ff55d5c8.js";import"./TransitionGroupContext-29effe25.js";import"./setPrototypeOf-0bb37fbe.js";import"./Modal-01a2ce69.js";import"./useTheme-0dfa0cbc.js";import"./useSlotProps-b42d44e4.js";import"./index-e5978b8b.js";import"./Paper-26f2abc8.js";import"./useControlled-967f9278.js";import"./createSvgIcon-6a373a0a.js";import"./joinClasses-adfcc520.js";import"./isNativeReflectConstruct-061ae640.js";import"./assertThisInitialized-081f9914.js";import"./use-isomorphic-layout-effect.browser.esm-1e1530e9.js";import"./motion-4a110d9b.js";import"./FileIcon-23592c30.js";import"./index.esm-b6fe913b.js";import"./iconBase-4b2ba95c.js";const M=({control:r,watch:o,setPage:c,handleChange:u,handleSubmit:a})=>{var S,n,i,t,b,y;const[m,h]=x.useState([{label:"",value:""}]);x.useEffect(()=>{l()},[]);const l=async()=>{await E.get(R+"/user").then(d=>{var j;h((j=d==null?void 0:d.data)==null?void 0:j.map(g=>({label:g==null?void 0:g.name,value:g==null?void 0:g.id})))}).catch(d=>{var j,g;_.error((g=(j=d.response)==null?void 0:j.data)==null?void 0:g.message)})},v=[{label:"No Preference",value:"No Preference"},{label:"Venture Capital Firm",value:"Venture Capital Firm"},{label:"Investor",value:"Investor"},{label:"Bank and Other Financial Institutions",value:"Bank and Other Financial Institutions"},{label:"Angels",value:"Angels"},{label:"Investment Communities",value:"Investments Communities"},{label:"Others",value:"Others"}],q=[{label:"Private equity listing",value:"Private equity listing"},{label:"Funding in exchange for equity",value:"Funding in exchange for equity"},{label:"Funding secured by equity",value:"Funding secured by equity"},{label:"Joint venture fundraising",value:"Joint venture fundraising"},{label:"Funding secured by a Global Standing Instruction",value:"Funding secured by a global standing instruction"},{label:"Smart-contract-backed funding",value:"Smart contract backed funding"}],C=G();return e.jsx(A,{children:e.jsxs("form",{onSubmit:a(d=>{console.log(d),c(j=>++j)}),children:[e.jsx(I,{sx:{pt:"2.31rem",position:"relative"},children:e.jsx(s,{container:!0,spacing:8,children:e.jsxs(s,{item:!0,xs:8,children:[e.jsx("p",{className:"subhero",children:"Create Campaign"}),e.jsx("form",{children:e.jsxs(s,{container:!0,spacing:4,children:[e.jsx(s,{item:!0,md:6,sx:{mb:"1.5rem"},children:e.jsx(F,{handleChange:d=>{u({name:"source",value:d})},options:v,name:"source",control:r,rules:{required:"Enter source of fund"},label:"Source"})}),e.jsx(s,{item:!0,md:6,sx:{mb:"1.5rem"},children:e.jsx(f,{name:"others",label:"Others",control:r,rules:{required:"This field is required"}})}),e.jsxs(s,{item:!0,md:6,sx:{mb:"1.5rem"},children:[e.jsx(F,{handleChange:d=>{console.log(d),u({name:"type_of_fundraising",value:d})},options:q,name:"type_of_fundraising",control:r,rules:{required:"Enter type of fundraising"},label:"Type of Fundraising"}),e.jsx("p",{className:"fundraise-Helpertext",children:((S=o())==null?void 0:S.type_of_fundraising)==="Private equity listing"?"Private equity listing enables founders to promote shares of their businesses to all users.":((n=o())==null?void 0:n.type_of_fundraising)==="Funding in exchange for equity"?"Founders can generate funds by trading a portion of their business's equity, either by directly approaching specific investors or targeting certain investor groups.":((i=o())==null?void 0:i.type_of_fundraising)==="Funding secured by equity"?"Founders raise debt using their startup's equity as security, and may convert debt to equity if unpaid, managed by an Investment Management Group.":((t=o())==null?void 0:t.type_of_fundraising)==="Joint venture fundraising"||((b=o())==null?void 0:b.type_of_fundraising)==="Funding secured by a Global Standing Instruction"?"Founders raise funds for specific projects, promising to split the proceeds with investors, and manage the process through an Investment Management Group.":((y=o())==null?void 0:y.type_of_fundraising)==="Smart-contract-backed funding"?"Founders raise debt secured by cryptocurrency, which can be liquidated or transferred to the investor in case of default, managed by an Investment Management Group.":""})]}),e.jsx(s,{item:!0,md:6,sx:{mb:"1.5rem"},children:e.jsx(F,{handleChange:d=>u({name:"startup",value:d}),options:m,name:"startup",control:r,rules:{required:"Select a start up"},label:"Which business are you raising the fund for?"})})]})})]})})}),e.jsx(D,{cancelEventHandler:()=>{C(-1)}})]})})};M.propTypes={control:p.any,watch:p.any,setPage:p.any,handleChange:p.any,handleSubmit:p.any};const w=({control:r,setPage:o,handleChange:c,handleSubmit:u})=>{const[a,m]=x.useState({pitchDeck:"",financialAnalysis:"",userFeedback:""}),h=x.useRef(),l=x.useRef(),v=x.useRef(),[q,C]=x.useState([{label:"",value:""}]);x.useEffect(()=>{S()},[]);const S=async()=>{await E.get(R+"/user").then(n=>{var i;C((i=n==null?void 0:n.data)==null?void 0:i.map(t=>({label:t==null?void 0:t.name,value:t==null?void 0:t.id})))}).catch(n=>{var i,t;console.log((t=(i=n.response)==null?void 0:i.data)==null?void 0:t.message)})};return e.jsx(A,{children:e.jsxs("form",{onSubmit:u(n=>{console.log(n),o(i=>++i)}),children:[e.jsxs(I,{sx:{pt:"2.31rem",position:"relative"},children:[e.jsx("p",{className:"subhero",children:"Private equity listing"}),e.jsx("p",{className:"mb-5",children:"Private equity listing enables founders to promote shares of their businesses to all users."}),e.jsx(s,{container:!0,spacing:8,children:e.jsx(s,{item:!0,xs:10,children:e.jsxs("form",{children:[e.jsxs(s,{container:!0,spacing:4,children:[e.jsxs(s,{item:!0,container:!0,md:6,children:[e.jsx(s,{item:!0,md:12,sx:{mb:"1.5rem"},children:e.jsx(F,{handleChange:n=>{console.log(n.label),c({name:"startup",value:n.label})},options:q,name:"startup",control:r,rules:{required:"This field is required"},isDisabled:!0,label:"My Startup"})}),e.jsx(s,{item:!0,md:12,sx:{mb:"1.5rem"},children:e.jsx(f,{name:"total_number_of_shares",type:"number",label:"Total number of shares in the business",control:r,rules:{required:"This field is required"}})}),e.jsx(s,{item:!0,md:12,sx:{mb:"1.5rem"},children:e.jsx(f,{name:"purpose",label:"Purpose of fundraising",control:r,multiline:!0,rows:3,rules:{required:"This field is required"}})})]}),e.jsxs(s,{item:!0,container:!0,md:6,children:[e.jsxs(s,{item:!0,md:12,sx:{mb:"1.5rem"},children:[e.jsx(F,{handleChange:n=>{console.log(n)},value:"Naira",label:"Select Currency",options:[{label:"NGN",value:"Naira"},{label:"USD",value:"Dollar"},{label:"GBP",value:"Pounds"}],name:"",control:r,rules:{required:"This field is required"}}),e.jsx(f,{name:"valuation",label:"Valuation",control:r,rules:{required:"This field is required"}})]}),e.jsx(s,{item:!0,md:12,sx:{mb:"1.5rem"},children:e.jsx(f,{name:"number_of_shared_to_be_sold",type:"number",label:"Number of shares to be sold",control:r,rules:{required:"This field is required"}})}),e.jsx(s,{item:!0,md:12,sx:{mb:"1.5rem"},children:e.jsx(f,{type:"number",name:"minimum_investment_per_investor",label:"Minimum investment per investor",control:r,rules:{required:"This field is required"}})}),e.jsx(s,{item:!0,md:12,sx:{mb:"1.5rem"},children:e.jsx(f,{name:"percentageOfSharesTakenUp",type:"number",label:"Percentage of Shares Taken up",control:r,rules:{required:"This field is required"}})})]})]}),e.jsxs(I,{sx:{mt:"3.62rem"},children:[e.jsx("p",{className:"infoText",children:"Attach Files"}),e.jsxs(s,{container:!0,children:[e.jsxs("div",{className:"flex  w-full gap-x-5 ",children:[e.jsx(k,{appear:a.pitchDeck,children:e.jsx(P,{className:"!mt-5"})}),e.jsx(s,{item:!0,xs:12,sx:{mb:"1.31rem"},children:e.jsx(N,{label:"Pitch deck",name:"pitchDeck",handleFileChange:n=>{const i=n.target.files[0],t=.5;if(i){if(i.size>t*1024*1024){console.log("processed"),_.error("Error: File size exceeds the allowed limit of 500kb.");return}T({selectedFile:i,callback:b=>{console.log(b),c({name:"pitchDeck",value:i}),m(y=>({...y,pitchDeck:b}))}})}},inputRef:h,doc:a==null?void 0:a.pitchDeck})})]}),e.jsxs("div",{className:"flex  w-full gap-x-5 ",children:[e.jsx(k,{appear:a.financialAnalysis,children:e.jsx(P,{className:"!mt-5"})})," ",e.jsx(s,{item:!0,xs:12,sx:{mb:"1.31rem"},children:e.jsx(N,{label:"Financial analysis",name:"financialAnalysis",handleFileChange:n=>{const i=n.target.files[0],t=.5;if(i){if(i.size>t*1024*1024){console.log("processed"),_.error("Error: File size exceeds the allowed limit 500kb.");return}T({selectedFile:i,callback:b=>{console.log(b),c({name:"financialAnalysis",value:i}),m(y=>({...y,financialAnalysis:b}))}})}},inputRef:l,doc:a==null?void 0:a.financialAnalysis})})]}),e.jsxs("div",{className:"flex  w-full gap-x-5 ",children:[e.jsx(k,{appear:a.userFeedback,children:e.jsx(P,{className:"!mt-5"})}),e.jsx(s,{item:!0,xs:12,sx:{mb:"1.31rem"},children:e.jsx(N,{label:"User feedback",name:"userFeedback",handleFileChange:n=>{const i=n.target.files[0],t=.5;if(i){if(i.size>t*1024*1024){console.log("processed"),_.error("Error: File size exceeds the allowed limit of 500kb.");return}T({selectedFile:i,callback:b=>{console.log(b),c({name:"userFeedback",value:i}),m(y=>({...y,userFeedback:b}))}})}},inputRef:v,doc:a==null?void 0:a.userFeedback})})]})]})]})]})})})]}),e.jsx(D,{cancelEventHandler:()=>{o(n=>--n)}})]})})};w.propTypes={setPage:p.any,control:p.any,handleChange:p.any,handleSubmit:p.any};const U=()=>V({mutationFn:async c=>{var u;try{return(await E.post("/raise-fund",c,{headers:{"Content-Type":"multipart/form-data"}})).data}catch(a){return(u=a.response)==null?void 0:u.data}}}),O=({control:r,setPage:o,handleSubmit:c})=>{const u=G(),{mutateAsync:a}=U(),m=h=>{console.log(h),a(h).then(l=>{if(console.log(l),l.statusCode===500||l.statusCode===400||l.statusCode===401){_.error(l.message);return}_.success(l.message),u("/fundraising-campaign"),console.log(l)}).catch(l=>{_.error("Input appropriate values"),console.log(l)})};return e.jsxs(A,{children:[e.jsx("p",{className:"subhero",children:"Private equity listing"}),e.jsx("p",{className:"mb-5",children:"Private equity listing enables founders to promote shares of their businesses to all users."}),e.jsxs("form",{onSubmit:c(m),children:[e.jsx(s,{container:!0,spacing:8,children:e.jsx(s,{item:!0,xs:10,children:e.jsx("form",{children:e.jsxs(s,{container:!0,spacing:4,children:[e.jsx(s,{item:!0,md:6,sx:{mb:"1.5rem"},children:e.jsx(F,{handleChange:h=>{console.log(h)},value:"Naira",label:"Select Currency",options:[{label:"NGN",value:"Naira"},{label:"USD",value:"Dollar"},{label:"GBP",value:"Pounds"}],name:"",control:r,rules:{required:"This field is required"}})}),e.jsx(s,{item:!0,md:6,sx:{mb:"1.5rem"},children:e.jsx(f,{name:"price_per_share",label:"Price per share",control:r,type:"number",rules:{required:"This field is required"}})}),e.jsx(s,{item:!0,md:6,sx:{mb:"1.5rem"},children:e.jsx(f,{name:"value_of_shares_to_be_sold",type:"number",label:"Value of shares to be sold/fundraising target",control:r,rules:{required:"This field is required"}})}),e.jsx(s,{item:!0,md:6,sx:{mb:"1.5rem"},children:e.jsx(f,{name:"percentage_of_shares_to_be_sold",type:"number",label:"Percentage of shares in the business to be sold",control:r,rules:{required:"This field is required"}})}),e.jsx(s,{item:!0,md:6,sx:{mb:"1.5rem"},children:e.jsx(f,{name:"minimum_shares_taken_up",label:"Minimum shares to be taken up",control:r,type:"number",rules:{required:"This field is required"}})}),e.jsx(s,{item:!0,md:6,sx:{mb:"1.5rem"},children:e.jsx(f,{name:"amountTargeted",label:"Amount Targeted",control:r,type:"number",rules:{required:"This field is required"}})})]})})})}),e.jsx(D,{cancelEventHandler:()=>{o(h=>--h)},continueEventHandler:()=>{console.log("clicking"),c(m)}})]})]})};O.propTypes={setPage:p.any,control:p.any,handleSubmit:p.any,handleChange:p.any};const ke=()=>{const[r,o]=x.useState(1);x.useEffect(()=>{},[]);const c={source:"Venture Capital Firm",type_of_fundraising:"Funding secured by equity",others:"Angels",purpose:"",total_number_of_shares:0,number_of_shared_to_be_sold:0,valuation:0,valuation_currency:"",investment_currency:"",minimum_investment_per_investor:"",percentageOfSharesTakenUp:0,price_per_share:0,price_per_share_currency:"NGN",percentage_of_shares_to_be_sold:0,minimum_shares_taken_up:0,value_of_shares_to_be_sold:0,value_of_shares_to_be_sold_currency:"NGN",startup:"",pitchDeck:"m.m",financialAnalysis:"mbn",userFeedback:"bvn",amountTargeted:0},{control:u,watch:a,handleSubmit:m,setValue:h}=B({defaultValues:c}),l=({name:v,value:q})=>{console.log(v,q),h(v,q)};return e.jsx(z,{children:e.jsxs("div",{className:"pageContain",children:[e.jsx(k,{appear:r===1,children:e.jsx(M,{control:u,watch:a,setPage:o,handleChange:l,handleSubmit:m})}),e.jsx(k,{appear:r===2,children:e.jsx(w,{control:u,setPage:o,handleChange:l,handleSubmit:m})}),e.jsxs(k,{appear:r===3,children:[e.jsx(O,{control:u,handleSubmit:m,handleChange:l,setPage:o})," "]})]})})};export{ke as default};

Zerion Mini Shell 1.0