PageSourceSearch

https://fikraevents.com/build/assets/_slug_-CgELiP6s.js

js fikraevents.com collected 2026-10-04 06:31:09 UTC 15,056 bytes, 1 lines download raw bytes

1import{a as e,j as s}from"./ui-Dz5CFnta.js";import{I as a}from"./input-error-Co6ldkHn.js";import{C as r}from"./CountrySelector-KbFxxr0a.js";import{c as l,B as i}from"./button-DtWFyvMW.js";import{C as t}from"./checkbox-yaiDPXje.js";import{I as n}from"./input-Cyx6eXPZ.js";import{L as d}from"./label-BGISOLnw.js";import{c as o,S as c,X as m}from"./site-layout-CcKq8DYZ.js";import{P as x}from"./index-ipYlkjID.js";import{T as p}from"./textarea-BemDCX5B.js";import{T as u,a as h,b as j,c as g}from"./tooltip-bLbZV4bJ.js";import{a as b,u as v,H as f,L as y}from"./app-CWNYW_tK.js";import{A as N}from"./arrow-left-3XkDYAnm.js";import{U as w}from"./upload-BX2sG35O.js";import{c as _}from"./createLucideIcon-Ca3eeypX.js";import"./select-BTNsx7am.js";import"./index-dsp9MoVC.js";import"./index-B2pkL5vp.js";import"./chevron-up-DYRXlY5J.js";import"./check-B1ij4JZM.js";import"./vendor-CSnzqfkr.js";import"./circle-check-big-IZQ4k49B.js";import"./circle-alert-DLBJvvPh.js";import"./loader-circle-BMjpsBbC.js";import"./index-_cYmSVT0.js";/* empty css            */const k=_("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var C="Progress",[P]=o(C),[S,R]=P(C),I=e.forwardRef((e,a)=>{const{__scopeProgress:r,value:l=null,max:i,getValueLabel:t=E,...n}=e;(i||0===i)&&O(i);const d=O(i)?i:100;null!==l&&T(l,d);const o=T(l,d)?l:null,c=M(o)?t(o,d):void 0;return s.jsx(S,{scope:r,value:o,max:d,children:s.jsx(x.div,{"aria-valuemax":d,"aria-valuemin":0,"aria-valuenow":M(o)?o:void 0,"aria-valuetext":c,role:"progressbar","data-state":L(o,d),"data-value":o??void 0,"data-max":d,...n,ref:a})})});I.displayName=C;var F="ProgressIndicator",A=e.forwardRef((e,a)=>{const{__scopeProgress:r,...l}=e,i=R(F,r);return s.jsx(x.div,{"data-state":L(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...l,ref:a})});function E(e,s){return`${Math.round(e/s*100)}%`}function L(e,s){return null==e?"indeterminate":e===s?"complete":"loading"}function M(e){return"number"==typeof e}function O(e){return M(e)&&!isNaN(e)&&e>0}function T(e,s){return M(e)&&!isNaN(e)&&e<=s&&e>=0}A.displayName=F;var D=I,G=A;const U=e.forwardRef(({className:e,value:a,...r},i)=>s.jsx(D,{ref:i,className:l("relative h-2 w-full overflow-hidden rounded-full bg-black",e),...r,children:s.jsx(G,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(a||0)}%)`}})}));U.displayName=D.displayName;const B={PC:"PC",MOBILE:"Mobile",CONSOLE:"Console",VR:"VR",AR:"AR"},q={ENGLISH:"English",ARABIC:"Arabic",FRENCH:"French",GERMAN:"German",SPANISH:"Spanish",ITALIAN:"Italian",JAPANESE:"Japanese",KOREAN:"Korean",CHINESE:"Chinese"};function H({event:o,contest:x,submitted:_}){const{auth:C}=b().props,P="string"==typeof C.user.nickname?C.user.nickname:"",[S,R]=e.useState(null),[I,F]=e.useState(null),[A]=e.useState(0),[E,L]=e.useState(1),{data:M,setData:O,post:T,processing:D,errors:G,reset:H}=v({title:"",developer_name:"",publisher_name:"",developer_country:"",est_release_date:"",platforms:[],languages:[],youtube_link:"",description:"",thumbnail:null,media:null}),V=e=>{const s=e.target.files?.[0]||null;O("thumbnail",s),R(s?URL.createObjectURL(s):null)},J=e=>{const s=e.target.files?.[0]||null;O("media",s),F(s?URL.createObjectURL(s):null)},W=()=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(d,{htmlFor:"name",children:"Name"}),s.jsx(n,{id:"name",value:P||C.user.name,disabled:!0})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(d,{htmlFor:"email",children:"Email"}),s.jsx(n,{id:"email",value:C.user.email||"",disabled:!0})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(d,{htmlFor:"title",children:["Game title ",s.jsx("span",{className:"text-primary text-xl",children:"*"})]}),s.jsx(u,{children:s.jsxs(h,{children:[s.jsx(j,{children:s.jsx(k,{className:"h-4 w-4 text-gray-400"})}),s.jsx(g,{children:s.jsx("p",{children:"Enter the name of your game"})})]})})]}),s.jsx(n,{id:"title",value:M.title,onChange:e=>O("title",e.target.value),required:!0}),s.jsx(a,{message:G.title})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsxs(d,{htmlFor:"developer_name",children:["Team/Developer name ",s.jsx("span",{className:"text-primary text-xl",children:"*"})]}),s.jsx(n,{id:"developer_name",value:M.developer_name,onChange:e=>O("developer_name",e.target.value),required:!0}),s.jsx(a,{message:G.developer_name})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsxs(d,{htmlFor:"publisher_name",children:["Publisher name ",s.jsx("span",{className:"text-primary text-xl",children:"*"})]}),s.jsx(n,{id:"publisher_name",value:M.publisher_name,onChange:e=>O("publisher_name",e.target.value),required:!0}),s.jsx(a,{message:G.publisher_name})]}),s.jsxs("div",{className:"mt-2 grid gap-2",children:[s.jsx(r,{label:"Developer Country",onChange:e=>O("developer_country",e),errors:G}),s.jsx(a,{message:G.developer_country})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(d,{htmlFor:"est_release_date",children:"Estimated release date"}),s.jsx(n,{id:"est_release_date",type:"date",value:M.est_release_date,onChange:e=>O("est_release_date",e.target.value)}),s.jsx("p",{className:"text-sm text-gray-500",children:"If you don't have a date, please skip this field"})]})]}),s.jsxs("div",{className:"mt-6 space-y-4",children:[s.jsx(d,{children:"What platforms you plan to release on?"}),s.jsx("div",{className:"mt-4 grid grid-cols-4 gap-4 md:grid-cols-6",children:Object.entries(B).map(([e,a])=>s.jsxs("label",{className:l("hover:bg-secondary flex cursor-pointer items-center space-x-3 rounded-lg border p-2 transition-colors",M.platforms.includes(e)&&"border-primary bg-primary/5"),children:[s.jsx(t,{checked:M.platforms.includes(e),onCheckedChange:()=>(e=>{const s=[...M.platforms],a=s.indexOf(e);-1===a?s.push(e):s.splice(a,1),O("platforms",s)})(e)}),s.jsx("span",{children:a})]},e))}),s.jsx(a,{message:G.platforms})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx(d,{children:"What languages does your game support?"}),s.jsx("div",{className:"mt-4 grid grid-cols-4 gap-4 md:grid-cols-6",children:Object.entries(q).map(([e,a])=>s.jsxs("label",{className:l("hover:bg-secondary flex cursor-pointer items-center space-x-3 rounded-lg border p-2 transition-colors",M.languages.includes(e)&&"border-primary bg-primary/5"),children:[s.jsx(t,{checked:M.languages.includes(e),onCheckedChange:()=>(e=>{const s=[...M.languages],a=s.indexOf(e);-1===a?s.push(e):s.splice(a,1),O("languages",s)})(e)}),s.jsx("span",{children:a})]},e))}),s.jsx(a,{message:G.languages})]})]});return s.jsxs(c,{children:[s.jsxs(f,{children:[s.jsx("title",{children:x?.title?`${x.title}`:"Contest Form"}),s.jsx("meta",{"head-key":"description",name:"description",content:x?.body||""})]}),s.jsx("div",{className:"mt-4 py-8 md:py-4 lg:px-6",children:s.jsx("div",{className:"3xl:px-24 mx-auto w-full md:px-4 2xl:max-w-none 2xl:px-16",children:s.jsxs("div",{className:"bg-muted p-4 md:rounded-3xl md:p-8 2xl:p-12",children:[s.jsxs("div",{className:"mb-4 flex items-center justify-between gap-2",children:[s.jsx("h2",{className:"mb-6 text-2xl font-black md:text-2xl 2xl:mb-8 2xl:text-3xl",children:x.title}),s.jsx(i,{variant:"secondary",className:"size-10",asChild:!0,children:s.jsxs(y,{href:route("events.show",o.slug),className:"flex w-50 items-center gap-2 text-white",children:[s.jsx(N,{className:"h-4 w-4"})," Back to Event"]})})]}),s.jsxs("div",{className:"mb-6 flex flex-col gap-8 md:flex-row",children:[s.jsxs("picture",{children:[s.jsx("source",{srcSet:x.image,media:"(min-width: 768px)"}),s.jsx("img",{src:x.image,loading:"lazy",alt:"Product Image",className:"w-full rounded-lg"})]}),s.jsxs("article",{className:"mt-4 md:m-0 md:w-8/12",children:[s.jsx("h2",{className:"text-lg font-semibold",children:x.title}),!!x.body]})]}),Object.keys(G).length>0&&s.jsx("div",{className:"border-primary text-primary my-4 roun
1ded-lg border-2 border-solid p-5 font-sans text-base leading-normal font-normal",children:s.jsx("ul",{children:Object.entries(G).map(([e,a])=>s.jsx("li",{children:a},e))})}),C?.user?_?s.jsxs("div",{className:"border-primary text-primary my-4 rounded-lg border-2 border-solid p-5 font-sans text-base leading-normal font-normal",children:[s.jsx("p",{children:"Thank you for your submission"}),s.jsx(i,{asChild:!0,className:"mt-4",children:s.jsx("a",{href:route("settings.contests-submissions"),target:"_blank",rel:"noopener noreferrer",children:"View Application"})})]}):s.jsxs("form",{onSubmit:e=>{e.preventDefault(),T(route("events.contest.store",{event:o.slug,contest:x.slug}),{forceFormData:!0,onSuccess:()=>{H(),R(null),F(null)}})},className:"space-y-6",encType:"multipart/form-data",children:[s.jsxs("div",{className:"mb-8",children:[s.jsx("div",{className:"flex items-center justify-between",children:Array.from({length:2}).map((e,a)=>s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("div",{className:l("flex h-8 w-8 items-center justify-center rounded-full border-2",E>a+1?"border-primary bg-primary text-white":E===a+1?"border-primary text-primary":"border-gray-300 text-gray-300"),children:E>a+1?"✓":a+1}),s.jsx("span",{className:"mt-2 text-sm text-gray-500",children:0===a?"Game Information":"Media & Review"})]},a))}),s.jsx(U,{value:E/2*100,className:"mt-4"})]}),(()=>{switch(E){case 1:return W();case 2:return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsxs(d,{htmlFor:"youtube_link",children:["Youtube/website link ",s.jsx("span",{className:"text-primary text-xl",children:"*"})]}),s.jsx(n,{id:"youtube_link",type:"url",value:M.youtube_link,onChange:e=>O("youtube_link",e.target.value),required:!0}),s.jsx(a,{message:G.youtube_link})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(d,{htmlFor:"description",children:"Description"}),s.jsx(p,{id:"description",value:M.description,onChange:e=>O("description",e.target.value),placeholder:"Please briefly describe your game less than 1500 characters and what make it fun/unique",rows:4}),s.jsx(a,{message:G.description})]})]}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsxs(d,{htmlFor:"thumbnail",children:["Image Thumbnail (Dimensions: 350px x 200px) ",s.jsx("span",{className:"text-primary text-xl",children:"*"})]}),s.jsx("div",{className:"mt-1 flex justify-center rounded-lg border border-dashed border-gray-900/25 px-6 py-10",children:s.jsxs("div",{className:"text-center",children:[s.jsx(w,{className:"mx-auto h-6 w-6 text-gray-300","aria-hidden":"true"}),s.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[s.jsxs("label",{htmlFor:"thumbnail",className:"text-primary focus-within:ring-primary hover:text-primary/80 relative cursor-pointer rounded-md bg-black p-1 font-semibold focus-within:ring-2 focus-within:ring-offset-2 focus-within:outline-none",children:[s.jsx("span",{children:"Upload a file"}),s.jsx("input",{id:"thumbnail",type:"file",className:"sr-only",accept:"image/*",onChange:V,required:!0})]}),s.jsx("p",{className:"pl-1",children:"or drag and drop"})]}),s.jsx("p",{className:"text-xs leading-5 text-gray-600",children:"PNG, JPG, GIF up to 10MB"})]})}),S&&s.jsx("div",{className:"mt-4",children:s.jsxs("div",{className:"relative inline-block",children:[s.jsx("img",{src:S,alt:"Thumbnail Preview",className:"h-24 rounded-md border"}),s.jsx("button",{type:"button",onClick:()=>{R(null),O("thumbnail",null)},className:"absolute -top-2 -right-2 rounded-full bg-red-500 p-1 text-white hover:bg-red-600",children:s.jsx(m,{className:"h-4 w-4"})})]})}),s.jsx(a,{message:G.thumbnail})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(d,{htmlFor:"media",children:"Media (Please upload your game's trailer. Max 150MB)"}),s.jsx("div",{className:"mt-1 flex justify-center rounded-lg border border-dashed border-gray-900/25 px-6 py-10",children:s.jsxs("div",{className:"text-center",children:[s.jsx(w,{className:"mx-auto h-6 w-6 text-gray-300","aria-hidden":"true"}),s.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[s.jsxs("label",{htmlFor:"media",className:"text-primary focus-within:ring-primary hover:text-primary/80 relative cursor-pointer rounded-md bg-black p-1 font-semibold focus-within:ring-2 focus-within:ring-offset-2 focus-within:outline-none",children:[s.jsx("span",{children:"Upload a file"}),s.jsx("input",{id:"media",type:"file",className:"sr-only",accept:"video/*",onChange:J,required:!0})]}),s.jsx("p",{className:"pl-1",children:"or drag and drop"})]}),s.jsx("p",{className:"text-xs leading-5 text-gray-600",children:"MP4, MOV up to 150MB"})]})}),A>0&&s.jsxs("div",{className:"mt-4",children:[s.jsx(U,{value:A,className:"h-2"}),s.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Uploading... ",A,"%"]})]}),I&&s.jsx("div",{className:"mt-4",children:s.jsxs("div",{className:"relative inline-block",children:[s.jsx("video",{src:I,controls:!0,className:"h-48 rounded-md border"}),s.jsx("button",{type:"button",onClick:()=>{F(null),O("media",null)}
1,className:"absolute -top-2 -right-2 rounded-full bg-red-500 p-1 text-white hover:bg-red-600",children:s.jsx(m,{className:"h-4 w-4"})})]})}),s.jsx(a,{message:G.media})]})]}),s.jsxs("div",{className:"mt-8 rounded-lg border p-6",children:[s.jsx("h3",{className:"mb-4 text-lg font-semibold",children:"Review Your Submission"}),s.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"font-medium",children:"Basic Information"}),s.jsxs("p",{children:["Game Title: ",M.title]}),s.jsxs("p",{children:["Developer: ",M.developer_name]}),s.jsxs("p",{children:["Publisher: ",M.publisher_name]}),s.jsxs("p",{children:["Country: ",M.developer_country]}),M.est_release_date&&s.jsxs("p",{children:["Release Date: ",M.est_release_date]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-medium",children:"Platforms & Languages"}),s.jsxs("p",{children:["Platforms: ",M.platforms.map(e=>B[e]).join(", ")]}),s.jsxs("p",{children:["Languages: ",M.languages.map(e=>q[e]).join(", ")]})]})]})]})]});default:return null}})(),s.jsxs("div",{className:"mt-8 flex justify-between",children:[E>1&&s.jsx(i,{type:"button",variant:"outline",onClick:()=>{E>1&&L(E-1)},disabled:D,children:"Previous"}),E<2?s.jsx(i,{type:"button",className:"bg-primary hover:bg-primary/90",onClick:()=>{E<2&&L(E+1)},disabled:D,children:"Next"}):s.jsx(i,{type:"submit",className:"bg-primary hover:bg-primary/90",disabled:D,children:D?"Submitting...":"Submit"})]})]}):s.jsx(i,{type:"button",className:"bg-primary hover:bg-primary/90 mt-4 w-full rounded-md px-4 py-2 text-black transition duration-300",onClick:()=>window.location.href=route("login"),children:"Login to participate"})]})})})]})}export{H 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.