PageSourceSearch

https://astonedu-s5tytnc5.manus.space/assets/CompetitionExamRegistrationPage-BEFFhYxF.js

js astonedu-s5tytnc5.manus.space collected 2026-10-03 05:00:20 UTC 18,651 bytes, 11 lines download raw bytes

1import{c as $,Y as F,V as G,Z as l,t as V,_ as x,$ as z,j as e,a0 as M,a7 as O,S as P,b as W,L as C,a3 as K,W as B,a8 as U,M as Y,y as Q,aC as X,B as R,aD as d,T as Z,D as J}from"./index-VnmYj_Qr.js";import{I as p}from"./input-BRD1jd5y.js";import{L as n}from"./label-CUHhJyav.js";import{T as ee}from"./textarea-4zu02lpn.js";import{S as se,a as re,b as te,c as ae,d as ie}from"./select-D9SVYHVo.js";import{C as le}from"./CompetitionPaymentInstructions-DdYG_jgc.js";import{S as oe}from"./inquiryOptions-5-av51AX.js";import{L as de}from"./loader-circle-TnhmRrYJ.js";import"./index-BqNGbNTD.js";import"./check-BdISGZSV.js";import"./receipt-text-OD8EWfag.js";import"./info-DhTqJgbA.js";/**
2 * @license lucide-react v0.453.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const ne=$("Laptop",[["path",{d:"M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16",key:"tarvll"}]]);/**
7 * @license lucide-react v0.453.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const me=$("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);function ke(){const w=F(),s=G(w.slug??""),[_,q]=l.useState(!1),[T,A]=l.useState("not_applicable"),[a,N]=l.useState(""),[y,h]=l.useState(!1),[u,H]=l.useState(!1),[g,k]=l.useState(!1),[j,D]=l.useState(!1),[f,S]=l.useState(!1),[t,o]=l.useState({name:"",studentEnglishName:"",phone:"",email:"",school:"",studentGrade:"",remarks:""}),b=V.competitions.register.useMutation({onSuccess:r=>{z("CompleteRegistration",{content_name:`${s?.code??"Competition"} exam`,content_category:"International competition exam",value:s?.examRegistration?.smallGroupWaiver&&a==="small_group"?0:s?.examRegistration?.fee.amount,currency:"HKD"}),A(r.confirmationEmail),q(!0),window.scrollTo({top:0,behavior:"smooth"})},onError:r=>x.error(r.message||"提交失敗,請稍後再試或聯絡我們")});if(!s?.examRegistration||!s.competitionSchedule)return e.jsx(M,{});const v=s.examRegistration,m=s.competitionSchedule.dateTime.slice(0,4),i=!!v.smallGroupWaiver,c=O(s)==="home_online",I=r=>{if(r.preventDefault(),!t.name.trim()||!t.studentEnglishName.trim()||!t.studentGrade||!t.email.trim()||!t.school.trim()){x.error("請填寫學生中文及英文全名、電郵、現時年級及就讀學校全名");return}if(i&&!a){h(!0),x.error("請選擇適用的考試費安排");return}if(c&&!j){S(!0),x.error("請先確認已了解居家線上考試的設備及 VooV 監考要求");return}if(v.terms&&!u){k(!0),x.error("請先閱讀並同意考試報名條款");return}b.mutate({competitionSlug:s.slug,registrationType:"exam",enrolledInSmallGroupCourse:i?a==="small_group":!1,examTermsAccepted:u,examTermsVersion:v.terms?.version,homeExamRequirementsAccepted:c?j:void 0,homeExamRequirementsVersion:c?d.version:void 0,...t})},L=i&&a==="small_group"?0:s.examRegistration.fee.amount,E=`${s.code} ${m} 考試報名`;return e.jsxs(P,{children:[e.jsx(W,{title:`${E} — Aston Institute`,description:`報名 ${s.code} ${m} 香港場次。${c?"居家考試,須同時準備電腦作答及手機/平板 VooV 監考。":""}考試費 ${s.examRegistration.fee.display}(已包括行政費)${i?`;已報讀或同時報讀 ${s.code} 小班課程可獲豁免`:""}。`,path:`/competitions/${s.slug}/exam-register`}),e.jsx("section",{className:"bg-primary py-12 text-primary-foreground md:py-16",children:e.jsxs("div",{className:"container max-w-5xl",children:[e.jsxs(C,{href:`/competitions/${s.slug}`,className:"inline-flex items-center gap-1.5 text-sm text-primary-foreground/70 transition-colors hover:text-[var(--gold)]",children:[e.jsx(K,{size:15})," 返回 ",s.code," 競賽詳情"]}),e.jsx("p",{className:"mt-7 text-[11px] font-semibold uppercase tracking-[0.22em] text-[var(--gold)]",children:"Exam Registration"}),e.jsx("h1",{className:"mt-3 font-serif-brand text-3xl font-bold md:text-5xl",children:E}),e.jsxs("p",{className:"mt-4 max-w-2xl leading-relaxed text-primary-foreground
11/78",children:["填寫以下資料登記 ",m," ",s.code," 香港場次。Aston Institute 團隊會核對參賽資格、名額及付款安排後與你聯絡;提交表格不代表已完成付款或確認考位。"]})]})}),e.jsx("main",{className:"bg-secondary/35 py-12 md:py-16",children:e.jsxs("div",{className:"container grid max-w-5xl gap-8 lg:grid-cols-[0.82fr_1.18fr]",children:[e.jsxs("aside",{className:"space-y-5",children:[e.jsxs("div",{className:"overflow-hidden rounded-xl border border-[var(--gold)]/35 bg-card shadow-sm",children:[e.jsxs("div",{className:"bg-primary p-5 text-primary-foreground",children:[e.jsxs("p",{className:"text-[10px] font-semibold uppercase tracking-[0.18em] text-[var(--gold)]",children:[m," Hong Kong Sitting"]}),e.jsxs("h2",{className:"mt-2 font-serif-brand text-2xl font-bold",children:[s.code," 香港場次"]})]}),e.jsxs("dl",{className:"space-y-4 p-5 text-sm",children:[e.jsxs("div",{children:[e.jsxs("dt",{className:"flex items-center gap-1.5 font-semibold text-primary",children:[e.jsx(B,{size:15})," 考試日期及時間"]}),e.jsx("dd",{className:"mt-1 text-muted-foreground",children:e.jsxs("time",{dateTime:s.competitionSchedule.dateTime,children:[s.competitionSchedule.display," · ",s.competitionSchedule.time]})})]}),c?e.jsxs("div",{children:[e.jsxs("dt",{className:"flex items-center gap-1.5 font-semibold text-primary",children:[e.jsx(U,{size:15}),"考試方式"]}),e.jsx("dd",{className:"mt-1 leading-relaxed text-muted-foreground",children:"居家考試"})]}):s.competitionSchedule.venue&&e.jsxs("div",{children:[e.jsxs("dt",{className:"flex items-center gap-1.5 font-semibold text-primary",children:[e.jsx(Y,{size:15}),"考試地點"]}),e.jsx("dd",{className:"mt-1 leading-relaxed text-muted-foreground",children:s.competitionSchedule.venue})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"font-semibold text-primary",children:"報名截止"}),e.jsx("dd",{className:"mt-1 text-muted-foreground",children:s.registrationDeadline.display})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"font-semibold text-primary",children:"一般考試費"}),e.jsx("dd",{className:"mt-1 font-serif-brand text-3xl font-bold text-[var(--gold-text)]",children:s.examRegistration.fee.display}),e.jsx("dd",{className:"mt-1 text-xs text-muted-foreground",children:"已包括行政費"})]}),s.examRegistration.smallGroupWaiver&&e.jsxs("div",{className:"rounded-lg border border-[var(--gold)]/35 bg-[var(--gold-light)]/20 p-4",children:[e.jsx("dt",{className:"font-semibold text-primary",children:"小班課程學生"}),e.jsx("dd",{className:"mt-1 text-lg font-bold text-[var(--gold-text)]",children:s.examRegistration.smallGroupWaiver.display}),e.jsx("dd",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:s.examRegistration.smallGroupWaiver.description})]})]})]}),e.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"考試形式、應考方式、名額及最終安排以 Aston Institute 報名確認為準。核對資料後,正式付款指示會寄至登記電郵。"})]}),e.jsx("section",{id:"exam-registration-form",className:"rounded-xl border border-border bg-card p-6 shadow-sm md:p-8","aria-labelledby":"exam-registration-title",children:_?e.jsxs("div",{className:"flex min-h-[430px] flex-col items-center justify-center text-center",children:[e.jsx(Q,{className:"text-[var(--gold-text)]",size:52}),e.jsx("h2",{id:"exam-registration-title",className:"mt-4 font-serif-brand text-2xl font-bold text-primary",children:"考試報名資料已送出"}),e.jsxs("p",{className:"mt-3 max-w-md text-sm leading-relaxed text-muted-foreground",children:["多謝你登記 ",s.code," ",m," 香港場次。",T==="sent"?"付款指示已寄至登記電郵;":"我們已收到報名,電郵暫未能自動送出,團隊會再跟進;","請先等候資格、考位及",i&&a==="small_group"?"小班豁免":"費用","確認。"]}),e.jsx(le,{amountLabel:i&&a==="small_group"?"HK$0(小班課程豁免,待核對)":s.examRegistration.fee.display,feeWaived:i&&a==="small_group",examArrangement:X(s)}),e.jsx(R,{asChild:!0,variant:"outline",className:"mt-6 border-primary/25 text-primary",children:e.jsx(C,{href:`/competitions/${s.slug}`,children:"返回競賽詳情"})})]}):e.jsxs(e.Fragment,{children:[e.jsx("h2",{id:"exam-registration-title",className:"font-serif-brand text-2xl font-bold text-primary",children:"立即報考試"}),e.jsx("p",{className:"mt-2 text-sm leading-relaxed text-muted-foreground",children:"標示 * 的欄位為必填。請使用可聯絡的資料,方便我們確認考位及費用安排。"}),e.jsxs("form",{onSubmit:I,className:"mt-7 space-y-5","aria-label":`${s.code} 考試報名表單`,children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(n,{htmlFor:"exam-name",children:"學生中文全名 *"}),e.jsx(p,{id:"exam-name",autoComplete:"name",value:t.name,onChange:r=>o({...t,name:r.target.value}),required:!0})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(n,{htmlFor:"exam-english-name",children:"學生英文全名 *"}),e.jsx(p,{id:"exam-english-name",autoComplete:"name",value:t.studentEnglishName,onChange:r=>o({...t,studentEnglishName:r.target.value}),placeholder:"須與身份證明文件相同",required:!0})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(n,{htmlFor:"exam-phone",children:"聯絡電話 *"}),e.jsx(p,{id:"exam-phone",type:"tel",value:t.phone,onChange:r=>o({...t,phone:r.target.value}),required:!0})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(n,{htmlFor:"exam-email",children:"電郵 *"}),e.jsx(p,{id:"exam-email",type:"email",value:t.email,onChange:r=>o({...t,email:r.target.value}),required:!0})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(n,{children:"學生現時年級 *"}),e.jsxs(se,{value:t.studentGrade,onValueChange:r=>o({...t,studentGrade:r}),children:[e.jsx(re,{"aria-required":"true",children:e.jsx(te,{placeholder:"請選擇"})}),e.jsx(ae,{children:oe.map(r=>e.jsx(ie,{value:r,children:r},r))})]})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(n,{htmlFor:"exam-school",children:"學生就讀學校全名 *"}),e.jsx(p,{id:"exam-school",value:t.school,onChange:r=>o({...t,school:r.target.value}),placeholder:"請勿使用學校簡稱",required:!0})]}),i?e.jsxs("fieldset",{className:`rounded-xl border p-5 ${y?"border-destructive bg-destructive/5":"border-primary/15 bg-secondary/30"}`,children:[e.jsx("legend",{className:"px-1 font-semibold text-primary",children:"考試費安排 *"}),e.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:"請選擇一項;如選擇小班豁免,團隊會核對相同學生的課程報名紀錄。"}),e.jsxs("div",{className:"mt-4 grid gap-3",children:[e.jsxs("label",{className:"flex cursor-pointer gap-3 rounded-lg border border-border bg-card p-4 hover:border-[var(--gold)]/55",children:[e.jsx("input",{type:"radio",name:"exam-fee-option",value:"standard",checked:a==="standard",onChange:()=>{N("standard"),h(!1)},required:!0,className:"mt-1 h-4 w-4 accent-[var(--gold)]"}),e.jsxs("span",{children:[e.jsxs("strong",{className:"block text-primary",children:["一般考試報名 · ",s.examRegistration.fee.display]}),e.jsx("span",{className:"mt-1 block text-xs leading-relaxed text-muted-foreground",children:"已包括行政費;付款方法會在考位確認後提供。"})]})]}),e.jsxs("label",{className:"flex cursor-pointer gap-3 rounded-lg border border-border bg-card p-4 hover:border-[var(--gold)]/55",children:[e.jsx("input",{type:"radio",name:"exam-fee-option",value:"small_group",checked:a==="small_group",onChange:()=>{N("small_group"),h(!1)},required:!0,className:"mt-1 h-4 w-4 accent-[var(--gold)]"}),e.jsxs("span",{children:[e.jsxs("strong",{className:"block text-primary",children:["已報讀/同時報讀 ",m," ",s.code," 小班 · 考試費 HK$0"]}),e.jsx("span",{className:"mt-1 block text-xs leading-relaxed text-muted-foreground",children:"小班課程學生可獲豁免考試費;最終豁免資格由 Aston Institute 核對。"})]})]})]}),y&&e.jsx("p",{className:"mt-2 text-xs text-destructive",role:"alert",children:"請選擇適用的考試費安排。"})]}):e.jsxs("div",{className:"rounded-xl border border-primary/15 bg-secondary/30 p-5",children:[e.jsxs("p",{className:"font-semibold text-primary",children:["考試費 · ",s.examRegistration.fee.display]}),e.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:"已包括行政費;付款方法會在考位確認後以電郵提供。"})]}),e.jsxs("div",{className:"rounded-lg border border-[var(--gold)]/35 bg-[var(--gold-light)]/15 p-4","aria-live":"polite",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("span",{className:"text-sm font-semibold text-primary",children:"預計應付考試費"}),e.jsx("strong",{className:"font-serif-brand text-2xl text-[var(--gold-text)]",children:i&&!a?"請先選擇":`HK$${L.toLocaleStr
11ing("en-HK")}`})]}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i&&a==="small_group"?"小班課程豁免,待團隊核對報名紀錄。":"一般考試費已包括行政費。"})]}),c&&e.jsxs("section",{className:"overflow-hidden rounded-xl border border-sky-700/25 bg-sky-50/70","aria-labelledby":"home-exam-requirements-title",children:[e.jsxs("div",{className:"border-b border-sky-700/15 bg-primary px-5 py-4 text-primary-foreground",children:[e.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-[0.18em] text-[var(--gold)]",children:"Home Online Exam"}),e.jsx("h3",{id:"home-exam-requirements-title",className:"mt-1 font-serif-brand text-xl font-bold",children:d.title})]}),e.jsxs("div",{className:"space-y-4 p-5",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ne,{size:20,className:"mt-0.5 shrink-0 text-primary"}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-primary",children:d.examDevice.title}),e.jsx("p",{className:"mt-1 text-sm leading-relaxed text-foreground/80",children:d.examDevice.description})]})]}),e.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-amber-500/30 bg-amber-50 p-4",children:[e.jsx(Z,{size:19,className:"mt-0.5 shrink-0 text-amber-700"}),e.jsx("p",{className:"text-sm font-medium leading-relaxed text-amber-950",children:d.examDevice.warning})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(me,{size:20,className:"mt-0.5 shrink-0 text-primary"}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-primary",children:d.proctorDevice.title}),e.jsx("p",{className:"mt-1 text-sm leading-relaxed text-foreground/80",children:d.proctorDevice.description})]})]}),e.jsxs("label",{className:`flex cursor-pointer items-start gap-3 rounded-lg border p-4 transition-colors ${f?"border-destructive bg-destructive/5":"border-sky-700/20 bg-card hover:border-sky-700/40"}`,children:[e.jsx("input",{type:"checkbox",checked:j,onChange:r=>{D(r.target.checked),r.target.checked&&S(!1)},required:!0,"aria-describedby":"home-exam-requirements-error",className:"mt-0.5 h-4 w-4 shrink-0 accent-[var(--gold)]"}),e.jsx("span",{className:"text-sm font-medium leading-relaxed text-primary",children:"我已了解並會同時準備符合要求的考試設備及 VooV 監考設備。*"})]}),e.jsx("p",{id:"home-exam-requirements-error",className:`text-xs ${f?"text-destructive":"sr-only"}`,role:f?"alert":void 0,children:"請先確認居家線上考試設備及監考要求,才可提交報名。"})]})]}),s.examRegistration.terms&&e.jsxs("section",{className:"overflow-hidden rounded-xl border border-primary/15 bg-secondary/35","aria-labelledby":"exam-terms-title",children:[e.jsxs("div",{className:"border-b border-primary/10 bg-primary px-5 py-4 text-primary-foreground",children:[e.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-[0.18em] text-[var(--gold)]",children:"Terms and Conditions"}),e.jsx("h3",{id:"exam-terms-title",className:"mt-1 font-serif-brand text-xl font-bold",children:s.examRegistration.terms.title}),e.jsx("p",{className:"mt-1 text-xs text-primary-foreground/70",children:"提交考試報名資料前,請仔細閱讀以下安排。"})]}),e.jsxs("div",{className:"p-5",children:[e.jsx("ul",{id:"exam-terms-list",className:"space-y-3 text-sm leading-relaxed text-foreground/85",children:s.examRegistration.terms.items.map(r=>e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{"aria-hidden":"true",className:"mt-2 h-1.5 w-1.5 shrink-0 rounded-full bg-[var(--gold)]"}),e.jsx("span",{children:r})]},r))}),e.jsxs("label",{className:`mt-5 flex cursor-pointer items-start gap-3 rounded-lg border p-4 transition-colors ${g?"border-destructive bg-destructive/5":"border-primary/15 bg-card hover:border-primary/30"}`,children:[e.jsx("input",{type:"checkbox",checked:u,onChange:r=>{H(r.target.checked),r.target.checked&&k(!1)},required:!0,"aria-describedby":"exam-terms-list exam-terms-error",className:"mt-0.5 h-4 w-4 shrink-0 accent-[var(--gold)]"}),e.jsxs("span",{className:"text-sm font-medium leading-relaxed text-primary",children:["我已閱讀及同意以上 ",s.code," 考試報名條款,包括退款、轉讓及惡劣天氣改期安排。*"]})]}),e.jsx("p",{id:"exam-terms-error",className:`mt-2 text-xs ${g?"text-destructive":"sr-only"}`,role:g?"alert":void 0,children:"請先閱讀並同意考試報名條款,才可提交報名。"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(n,{htmlFor:"exam-remarks",children:"備註"}),e.jsx(ee,{id:"exam-remarks",rows:4,value:t.remarks,onChange:r=>o({...t,remarks:r.target.value}),placeholder:i?"例如:小班課程報名姓名、特殊考試安排或其他需要跟進的事項":"例如:特殊考試安排或其他需要跟進的事項"})]}),e.jsx(R,{type:"submit",size:"lg",disabled:b.isPending,className:"w-full bg-[var(--gold)] font-semibold text-primary hover:bg-[var(--gold)]/90",children:b.isPending?e.jsxs(e.Fragment,{children:[e.jsx(de,{className:"mr-2 animate-spin",size:17}),"提交中⋯"]}):`提交 ${s.code} 考試報名`}),e.jsxs("p",{className:"flex items-start gap-2 text-xs leading-relaxed text-muted-foreground",children:[e.jsx(J,{size:14,className:"mt-0.5 shrink-0"}),"提交即表示同意 Aston Institute 使用所提供資料跟進本次考試報名;我們不會因本次提交自動把你加入其他推廣名單。"]})]})]})})]})})]})}export{ke 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.