1"use strict";!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7084bdff-7249-4e22-9d7e-2e1cab082c99",e._sentryDebugIdIdentifier="sentry-dbid-7084bdff-7249-4e22-9d7e-2e1cab082c99")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8370],{1883:(e,t,r)=>{r.d(t,{f:()=>a});var n=r(16052);let a=(0,n.createServerReference)("605a46f97443d78ec50bf5886b52397f113193bb49",n.callServer,void 0,n.findSourceMapURL,"suggestGuidedLearningObjectives")},2332:(e,t,r)=>{r.d(t,{S:()=>o});var n=r(83037),a=r(84937),i=r(35124),s=r(27902),l=r(38976);let o=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)(i.bL,{ref:t,className:(0,l.cn)("peer h-5 w-5 shrink-0 cursor-pointer rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground transition-colors",r),...a,children:(0,n.jsx)(i.C1,{className:(0,l.cn)("flex items-center justify-center text-current"),children:(0,n.jsx)(s.A,{className:"h-4 w-4",strokeWidth:3})})})});o.displayName=i.bL.displayName},5329:(e,t,r)=>{r.d(t,{T:()=>s});var n=r(83037),a=r(84937),i=r(38976);let s=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)("textarea",{className:(0,i.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),ref:t,...a})});s.displayName="Textarea"},22661:(e,t,r)=>{r.d(t,{Mu:()=>f,YG:()=>g,Yt:()=>y,eU:()=>S,ig:()=>C,im:()=>p,np:()=>j,sg:()=>v});var n=r(52591),a=r(93472),i=r(7083),s=r(26095),l=r(29809);let o=["teacherText","iCanText","expectedEvidence"],c=["topic","subject","yearGroup","curriculum","program","programmeId","curriculumSource","curriculumFraming","teacherCurriculumLabel","learningObjective","numberOfLessons","plannedLessonsCount","timeLimit","complexityMode","difficulty","organizationId","sequenceSourceLessonId","existingLessonContent","essentialQuestions","priorKnowledgeLevel","priorLearningNotes","studentIdeaFormation","sequenceContext"],d=["provider-empty","provider-truncated","provider-json","provider-timeout","provider-rate-limit","provider-server","provider-unavailable","response-invalid","response-guardrail","learner-word-ceiling","unavailable-unknown"];class u extends Error{constructor(e="Check the complete objective draft and planning context. Your original text is retained.",t="request"){super(e),this.name="GuidedSuggestionError",this.code=t}}function p(e){return!e||"object"!=typeof e||Array.isArray(e)||Object.getPrototypeOf(e)!==Object.prototype?null:1===Object.keys(e).length&&"string"==typeof e.code&&d.includes(e.code)?{code:e.code}:null}let m=(e,t)=>
1new u(t,e);function f(e,t){return e.ownerId===t.ownerId&&e.workspaceKey===t.workspaceKey&&e.draftId===t.draftId&&e.version===t.version&&e.requestId===t.requestId}function g(e,t){return JSON.stringify(e)!==JSON.stringify(t)}let h=e=>!!(e&&"object"==typeof e&&!Array.isArray(e)&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))),x=(e,t)=>Object.keys(e).length===t.length&&t.every(t=>Object.prototype.hasOwnProperty.call(e,t)),b=e=>"string"==typeof e&&!!e.trim()&&e.length<=500&&e.trim()===e;function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(r>30)return!1;if(null===e||"string"==typeof e||"boolean"==typeof e)return!0;if("number"==typeof e)return Number.isFinite(e);if(!h(e)&&!Array.isArray(e)||t.has(e))return!1;t.add(e);let n=Object.entries(Object.getOwnPropertyDescriptors(e)).every(n=>{let[a,i]=n;return!!Array.isArray(e)&&"length"===a||!["__proto__","constructor","prototype"].includes(a)&&"value"in i&&w(i.value,t,r+1)});return t.delete(e),n}function y(e){return JSON.parse(JSON.stringify(Object.fromEntries(c.flatMap(t=>void 0===e[t]?[]:[[t,e[t]]]))))}function v(e){var t;let r;if(!w(e)||!h(e))throw new u;let d=JSON.stringify(e);if(d.length>4e4)throw new u("This complete planning request exceeds 40,000 characters. Shorten the supplied content or draft before requesting suggestions. Nothing has been clipped.");let p=["mode","source","context","plan","total","newGoalIds","calibration"];if(!(x(e,p)||x(e,[...p,"instruction"]))||!["fill","calibrate"].includes(String(e.mode))||!h(e.source)||!x(e.source,["ownerId","workspaceKey","draftId","version","requestId"])||!b(e.source.ownerId)||!b(e.source.workspaceKey)||!b(e.source.draftId)||!b(e.source.requestId)||!Number.isSafeInteger(e.source.version)||0>Number(e.source.version)||!h(e.context)||Object.keys(e.context).some(e=>!c.includes(e)))throw new u;let m=e.context;
1for(let e of["topic","subject","yearGroup","curriculum"])if(!Object.prototype.hasOwnProperty.call(m,e)||"string"!=typeof m[e]||!m[e].trim())throw new u;for(let e of["program","programmeId","curriculumSource","curriculumFraming","teacherCurriculumLabel","learningObjective","complexityMode","sequenceSourceLessonId","existingLessonContent","priorKnowledgeLevel","priorLearningNotes","studentIdeaFormation"])if(e in m&&"string"!=typeof m[e])throw new u;for(let e of["numberOfLessons","plannedLessonsCount","timeLimit","difficulty"])if(e in m&&("number"!=typeof m[e]||!Number.isFinite(m[e])||m[e]<=0))throw new u;if("organizationId"in m&&null!==m.organizationId&&!b(m.organizationId))throw new u;if("essentialQuestions"in m&&!(0,a.iW)(m.essentialQuestions))throw new u("Check all enquiry questions before requesting suggestions. Your full draft is retained.");if("sequenceContext"in m){let e=m.sequenceContext;if(!h(e)||!["lessonNo","vocabAlreadyTaught","thinkingSkillsUsed","lensesCovered","lensesRemaining","complexity","maxComplexityReached","latestLessonTitle"].every(t=>Object.prototype.hasOwnProperty.call(e,t))||Object.keys(e).some(e=>!["lessonNo","vocabAlreadyTaught","thinkingSkillsUsed","lensesCovered","lensesRemaining","complexity","maxComplexityReached","latestLessonTitle","teacherAssessmentNote","questionsAlreadyExplored"].includes(e))||!Number.isInteger(e.lessonNo)||1>Number(e.lessonNo)||!["foundational","building","higher-order"].includes(String(e.complexity)))throw new u;for(let t of["vocabAlreadyTaught","thinkingSkillsUsed","lensesCovered","lensesRemaining","questionsAlreadyExplored"])if(t in e&&(!Array.isArray(e[t])||!e[t].every(e=>"string"==typeof e)))throw new u;for(let t of["maxComplexityReached","latestLessonTitle","teacherAssessmentNote"])if(t in e&&"string"!=typeof e[t])throw new u}if("priorKnowledgeLevel"in m&&!["new","some","building"].includes(String(m.priorKnowledgeLevel))||"studentIdeaFormation"in m&&!["exploring","explaining"].includes(String(m.studentIdeaFormation))||"curriculumSource"in m&&!["own","catalogue"].includes(String(m.curriculumSource))||"complexityMode"in m&&!["automatic","manual"].includes(String(m.complexityMode)))throw new u;let f=(0,i.W)(e.plan);if(!f||!h(e.plan)||!Array.isArray(e.plan.goals)||e.plan.goals.length>10||(0,s.q0)(e.plan).length||!Number.isInteger(e.total)||1>Number(e.total)||Number(e.total)>10||!Array.isArray(e.newGoalIds)||e.newGoalIds.some(e=>!b(e))||"objective"in e.plan&&null!==e.plan.objective&&"string"!=typeof e.plan.objective)throw new u;for(let[t,r]of e.plan.goals.entries())if(!h(r)||!["id","skillName","colour","teacherText","iCanText","lessonLinks"].every(e=>Object.prototype.hasOwnProperty.call(r,e))||!b(r.id)||r.id!==f.goals[t].id||!o.every(e=>"expectedEvidence"===e&&!Object.prototype.hasOwnProperty.call(r,e)||"string"==typeof r[e])||!Object.values(n.SO).some(e=>e.name===r.skillName&&e.color===r.colour)||"invalid"===(0,l.w)(r).kind)throw new u;if("instruction"in e&&null!==e.instruction&&!["stretch","support","another-objective"].includes(String(e.instruction)))throw new u;let g=null!=(t=e.instruction)?t:null,y=[...e.plan.goals.map(e=>e.id),...e.newGoalIds];if(new Set(y).size!==y.length)throw new u;if("calibrate"===e.mode){if(g||!h(e.calibration)||!x(e.calibration,["goalId","direction"])||!["easier","harder"].includes(e.calibration.direction)||e.newGoalIds.length)throw new u;let t=e.plan.goals.find(t=>t.id===e.calibration.goalId);if(!t||!t.teacherText.trim())throw new u("Add your intended objective before calibrating its challenge. Your draft is retained.");r=[{goalId:t.id,skillName:t.skillName,fields:[...o]}]}else{if(null!==e.calibration||e.newGoalIds.length!==Math.max(0,e.total-e.plan.goals.length))throw new u;let t=e.plan.goals[e.plan.goals.length-1];if(("stretch"===g||"support"===g)&&(1!==e.newGoalIds.length||!t))throw new u("Add a first success criterion before asking for a stretch or support step. Your draft is retained.");if("another-objective"===g&&e.newGoalIds.length&&e.plan.goals.length)throw new u;(r=e.plan.goals.map(e=>({goalId:e.id,skillName:e.skillName,fields:o.filter(t=>{var r;return!(null!=(r=e[t])?r:"").trim()})})).filter(e=>e.fields.length>0)).push(...e.newGoalIds.map(e=>({goalId:e,skillName:"support"===g?t.skillName:null,fields:[...o]})));let n=!("string"==typeof e.plan.objective?e.plan.objective:"").trim();if(!r.length&&!n&&"another-objective"!==g)throw new u("These objectives and evidence are already complete. Increase the requested total or use a challenge proposal for an existing objective.")}return{request:e,targets:r,envelope:d}}c.filter(e=>!["programmeId","organizationId","sequenceSourceLessonId"].includes(e));let k={describe:"Explain",recall:"Retrieve",remember:"Retrieve",list:"Identify",name:"Identify",recognise:"Identify",recognize:"Identify",classify:"Categorise",sort:"Categorise",group:"Categorise",order:"Sequence",contrast:"Compare",evaluate:"Judge",assess:"Judge",justify:"Validate",predict:"Hypothesise",create:"Imagine",design:"Imagine",apply:"Exemplify",prioritise:"Rank",prioritize:"Rank",question:"Generate Questions","ask questions":"Generate Questions",link:"Connect",relate:"Connect",interpret:"Infer",expand:"Elaborate",construct:"Combine",build:"Combine",compose:"Combine"};function j(e){var t;if("string"!=typeof e)return e;let r=e.trim().toLowerCase().replace(/[-_]+/g," ").replace(/\s+/g," "),a=Object.values(n.SO).find(e=>e.name.toLowerCase()===r);if(a)return a.name;let i=r.replace(/ize\b/,"ise").replace(/izing\b/,"ising"),s=Object.values(n.SO).find(e=>e.name.toLowerCase()===i);return s?s.name:null!=(t=k[r])?t:e}let N=["analy","organi","recogni","summari","emphasi","categori","prioriti","visuali","reali","characteri","critici","memori","minimi","maximi","utili","familiari","standardi","symboli","theori","speciali","generali","hypothesi","apologi","synthesi","contextuali","conceptuali","internali","formali","personali","rationali","systemati","verbali","capitali","dramati","empathi","energi","equali","finali","globali","harmoni","legitimi","mobili","moderni","nationali","neutrali","normali","optimi","populari","randomi","sociali","stabili","italici","digiti","civili","vapori","oxidi","ioni","magneti","crystalli","fossili","polari","immuni","sterili","scrutini","authori","coloni","moneti","locali","materiali","publici","romantici","seriali","subsidi","territori","individuali","commerciali","industriali","humani","idoli","liberali","marginali","mechani","metaboli","naturali","paraly","plagiari","politici","privati","radicali","reorgani","revitali","satiri","sensationali","sensiti","signali","solemni","sympathi","tantali","temporali","triviali","unioni","urbani","victimi","vitali","vocali","westerni"].map(e=>"[".concat(e[0].toUpperCase()).concat(e[0],"]").concat(e.slice(1))).join("|"),I=["label","model","travel","cancel","signal","level","total","fuel","marvel","channel","counsel","quarrel","dial","initial","tunnel","pencil","equal","rival","spiral","chisel","grovel","panel","parcel","patrol","pedal","shovel","snorkel","stencil","trial","unravel"].map(e=>"[".concat(e[0].toUpperCase()).concat(e[0],"]").concat(e.slice(1))).join("|");function C(e,t){let{targets:r}=v(t);if(!w(e)||!h(e)||!x(e,["proposals"])||!Array.isArray(e.proposals)||e.proposals.length!==r.length)throw m("proposal-shape","The suggestion was incomplete. Your original draft is retained.");let a=new Set,o=[];for(let g of e.proposals){var c,d,u,p,f;if(!h(g)||!b(g.goalId)||a.has(g.goalId))throw m("proposal-goal");let e=r.find(e=>e.goalId===g.goalId),w=Object.values(n.SO).find(e=>e.name===g.skillName);if(!e)throw m("proposal-goal");if(!w)throw m("skill-unknown:".concat(String(null!=(c=g.skillName)?c:"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40)||"blank"));if(e.skillName&&w.name!==e.skillName)throw m("skill-changed");if(!x(g,["goalId","skillName",...e.fields]))throw m("proposal-fields");let y=t.plan.goals.find(e=>e.id===g.goalId),v={id:g.goalId,skillName:w.name,colour:w.color,teacherText:null!=(d=null==y?void 0:y.teacherText)?d:"",iCanText:null!=(u=null==y?void 0:y.iCanText)?u:"",expectedEvidence:null!=(p=null==y?void 0:y.expectedEvidence)?p:"",lessonLinks:null!=(f=null==y?void 0:y.lessonLinks)?f:{introduction:"",mapIt:"",buildIt:"",sayIt:"",finalExplanation:""}};for(let t of e.fields){if("string"!=typeof g[t]||!g[t].trim())throw m("field-blank");if(g[t].length>
1("expectedEvidence"===t?2e3:600))throw m("field-length");v[t]=g[t]}let k={...t.plan,goals:[v]};if(!(0,i.W)(k))throw m("plan-canonical");if((0,s.q0)(k).length)throw m("wording");if("invalid"===(0,l.w)(v).kind)throw m("evidence-invalid");a.add(g.goalId),o.push(g)}return r.map(e=>o.find(t=>t.goalId===e.goalId))}function S(e,t){var r;let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=C({proposals:t},e),s=e.plan.goals.map(e=>{let t=i.find(t=>t.goalId===e.id);if(!t)return e;let r={...e};for(let e of o)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e]);return r});for(let t of e.newGoalIds){let e=i.find(e=>e.goalId===t),r=Object.values(n.SO).find(t=>t.name===e.skillName);s.push({id:t,skillName:r.name,colour:r.color,teacherText:e.teacherText,iCanText:e.iCanText,expectedEvidence:e.expectedEvidence,teacherNote:null,curriculumAnchor:null,lessonLinks:{introduction:"",mapIt:"",buildIt:"",sayIt:"",finalExplanation:""}})}let l="string"==typeof a&&a.trim()&&(!(null!=(r=e.plan.objective)?r:"").trim()||"another-objective"===e.instruction)?a.trim().slice(0,600):null;return{...e.plan,...l?{objective:l}:{},goals:s}}RegExp("\\b(".concat(N,")z(e|es|ed|ing|er|ers|ation|ations)\\b"),"g"),RegExp("\\b(".concat(I,")(ed|ing|er|ers)\\b"),"g")},34961:(e,t,r)=>{r.d(t,{Ke:()=>s,Nt:()=>a,R6:()=>i});var n=r(59138);let a=n.bL,i=n.R6,s=n.Ke},50634:(e,t,r)=>{r.d(t,{F:()=>l});var n=r(83037),a=r(84937),i=r(74653),s=r(38976);let l=a.forwardRef((e,t)=>{let{className:r,children:a,...l}=e;return(0,n.jsxs)(i.bL,{ref:t,className:(0,s.cn)("relative overflow-hidden",r),...l,children:[(0,n.jsx)(i.LM,{className:"h-full w-full rounded-[inherit]",children:a}),(0,n.jsx)(o,{}),(0,n.jsx)(i.OK,{})]})});l.displayName=i.bL.displayName;let o=a.forwardRef((e,t)=>{let{className:r,orientation:a="vertical",...l}=e;return(0,n.jsx)(i.VM,{ref:t,orientation:a,className:(0,s.cn)("flex touch-none select-none transition-colors","vertical"===a&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===a&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",r),...l,children:(0,n.jsx)(i.lr,{className:"relative flex-1 rounded-full bg-border"})})});o.displayName=i.VM.displayName},56220:(e,t,r)=>{r.d(t,{z:()=>x});var n=r(83037),a=r(84937),i=r(1808),s=r(80719),l=r(20896),o=r(86535),c=r(25701),d=r(32270),u=r(98483),p=r(38976),m=r(12914),f=r(95957),g=r(68443);let h={"application/pdf":".pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document":".docx","application/vnd.openxmlformats-officedocument.presentationml.presentation":".pptx"};function x(e){var t;let{onFilesProcessed:r,onClear:x,disabled:b=!1}=e,[w,y]=(0,a.useState)(!1),[v,k]=(0,a.useState)(null),[j,N]=(0,a.useState)(!1),I=(0,a.useRef)(null),C=(0,a.useCallback)(e=>{let t=(0,g.a)(e);return t&&Object.prototype.hasOwnProperty.call(h,t)?(0,f.P3)(e)?f.sM:null:"Please upload a PDF, Word (.docx), or PowerPoint (.pptx) file. Legacy .doc and .ppt formats are not supported."},[]),S=(0,a.useCallback)(async e=>{N(!0);let t={file:e,name:e.name,size:e.size,type:e.type,status:"processing"};k(t);try{let n=new FormData;n.append("file",e);let a=await fetch("/api/process-lesson-file",{method:"POST",body:n});if((0,f.WO)(a))throw Error(f.sM);if(!a.ok){let e=await a.json().catch(()=>null);throw Error((0,m.xE)(a.status,f.S4,{body:e,teacherCopyStatuses:f.C_}))}let i=await a.json();k({...t,status:"success",extractedContent:i.content}),r(i.content)}catch(e){k({...t,status:"error",error:(0,m.oh)(e,f.S4)})}finally{N(!1)}},[r]),A=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),b||y(!0)},[b]),O=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),y(!1)},[]),L=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),E=(0,a.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),y(!1),b)return;let t=e.dataTransfer.files;if(t.length>0){let e=t[0],r=C(e);if(r)return void k({file:e,name:e.name,size:e.size,type:e.type,status:"error",error:r});S(e)}},[b,C,S]),R=(0,a.useCallback)(e=>{let t=e.target.files;if(t&&t.length>0){let e=t[0],r=C(e);if(r)return void k({file:e,name:e.name,size:e.size,type:e.type,status:"error",error:r});S(e)}I.current&&(I.current.value="")},[C,S]),T=(0,a.useCallback)(()=>{k(null),x()},[x]);return(0,n.jsx)("div",{className:"w-full",children:v?(0,n.jsxs)("div",{className:"rounded-lg border border-ui bg-white p-4",children:[(0,n.jsxs)("div",{className:"flex items-start justify-between",children:[(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(v.type,(0,n.jsx)(i.A,{className:"h-8 w-8 text-action"})),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("p",{className:"font-medium text-ink",children:v.name}),(0,n.jsx)("p",{className:"text-sm text-ink-muted",children:(t=v.size)<1024?t+" B":t<1048576?(t/1024).toFixed(1)+" KB":(t/1048576).toFixed(1)+" MB"}),"processing"===v.status&&(0,n.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-sm text-action",children:[(0,n.jsx)(l.A,{className:"h-4 w-4 animate-spin motion-reduce:animate-none"}),(0,n.jsx)("span",{children:"Processing your lesson plan..."})]}),"success"===v.status&&(0,n.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-sm text-action",children:[(0,n.jsx)(o.A,{className:"h-4 w-4"}),(0,n.jsx)("span",{children:"Content extracted successfully! Your lesson will be adapted."})]}),"error"===v.status&&(0,n.jsxs)("div",{className:"mt-2 flex items-start gap-2 text-sm text-[#E32A52]",children:[(0,n.jsx)(c.A,{className:"mt-0.5 h-4 w-4 shrink-0"}),(0,n.jsx)("span",{children:v.error})]})]})]}),(0,n.jsx)(u.$,{type:"button",variant:"ghost",size:"sm",onClick:T,disabled:j,className:"text-ink-muted hover:text-ink",children:(0,n.jsx)(d.A,{className:"h-4 w-4"})})]}),"success"===v.status&&v.extractedContent&&(0,n.jsxs)("div",{className:"mt-4 rounded-md bg-surface-page p-3",children:[(0,n.jsx)("p",{className:"mb-2 text-xs font-medium text-ink-muted",children:"Content Preview:"}),(0,n.jsxs)("p",{className:"max-h-24 overflow-y-auto text-sm text-ink",children:[v.extractedContent.slice(0,500),v.extractedContent.length>500&&"..."]})]})]}):(0,n.jsxs)("div",{onDragEnter:A,onDragLeave:O,onDragOver:L,onDrop:E,className:(0,p.cn)("relative flex flex-col items-center justify-center rounded-lg border-2 border-dashed p-8 transition-colors",w?"border-action bg-[#F1FCF9]":"border-ui bg-[#FAFAFA] hover:border-action hover:bg-[#F1FCF9]",b&&"curs
1or-not-allowed opacity-50"),children:[(0,n.jsx)("input",{ref:I,type:"file",accept:".pdf,.docx,.pptx",onChange:R,className:"hidden",disabled:b}),(0,n.jsxs)("div",{className:"flex flex-col items-center text-center",children:[(0,n.jsx)("div",{className:"mb-4 rounded-full bg-[#E8F5F1] p-4",children:(0,n.jsx)(s.A,{className:"h-8 w-8 text-action"})}),(0,n.jsx)("h3",{className:"mb-2 text-base font-semibold text-ink",children:"Import Your Existing Lesson Plan"}),(0,n.jsx)("p",{className:"mb-4 max-w-md text-sm text-ink-muted",children:"Have an existing lesson plan? Drag and drop it here, and the platform will adapt it into the Structural Learning format. We support PDF, Word, and PowerPoint files."}),(0,n.jsxs)(u.$,{type:"button",variant:"outline",onClick:()=>{var e;return null==(e=I.current)?void 0:e.click()},disabled:b,className:"border-brand-hover bg-white text-brand-hover hover:bg-white hover:text-brand-hover",children:[(0,n.jsx)(s.A,{className:"mr-2 h-4 w-4"}),"Choose File"]}),(0,n.jsxs)("p",{className:"mt-3 text-xs text-ink-muted",children:["Supported formats: PDF, Word (.docx), PowerPoint (.pptx) - Max ",f.cL]})]})]})})}},65899:(e,t,r)=>{r.d(t,{TR:()=>x,bq:()=>m,eb:()=>b,gC:()=>h,l6:()=>d,s3:()=>u,yv:()=>p});var n=r(83037),a=r(84937),i=r(42218),s=r(33922),l=r(19997),o=r(27902),c=r(38976);let d=i.bL,u=i.YJ,p=i.WT,m=a.forwardRef((e,t)=>{let{className:r,children:a,...l}=e;return(0,n.jsxs)(i.l9,{ref:t,className:(0,c.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm text-ink ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-action focus:ring-offset-2 disabled:cursor-not-allowed disabled:border-ui disabled:bg-surface-page disabled:opacity-50 data-[placeholder]:text-ink-muted [&>span]:line-clamp-1",r),...l,children:[a,(0,n.jsx)(i.In,{asChild:!0,children:(0,n.jsx)(s.A,{className:"h-4 w-4 opacity-50"})})]})});m.displayName=i.l9.displayName;let f=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)(i.PP,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",r),...a,children:(0,n.jsx)(l.A,{className:"h-4 w-4"})})});f.displayName=i.PP.displayName;let g=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)(i.wn,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",r),...a,children:(0,n.jsx)(s.A,{className:"h-4 w-4"})})});g.displayName=i.wn.displayName;let h=a.forwardRef((e,t)=>{let{className:r,children:a,position:s="popper",...l}=e;return(0,n.jsx)(i.ZL,{children:(0,n.jsxs)(i.UC,{ref:t,className:(0,c.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","popper"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r),position:s,onWheel:e=>{let t=e.currentTarget.querySelector("[data-radix-select-viewport]");t&&(t.scrollTop+=e.deltaY)},...l,children:[(0,n.jsx)(f,{}),(0,n.jsx)(i.LM,{className:(0,c.cn)("p-1","popper"===s&&"max-h-[var(--radix-select-content-available-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),(0,n.jsx)(g,{})]})})});h.displayName=i.UC.displayName;let x=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)(i.JU,{ref:t,className:(0,c.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",r),...a})});x.displayName=i.JU.displayName;let b=a.forwardRef((e,t)=>{let{className:r,children:a,...s}=e;return(0,n.jsxs)(i.q7,{ref:t,className:(0,c.cn)("relative flex w-full cursor-pointer select-none items-center rounded-sm py-2.5 pl-8 pr-3 text-sm outline-none transition-colors hover:bg-accent focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),...s,children:[(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(i.VF,{children:(0,n.jsx)(o.A,{className:"h-4 w-4"})})}),(0,n.jsx)(i.p4,{children:a})]})});b.displayName=i.q7.displayName,a.forwardRef((e,t)=>
1{let{className:r,...a}=e;return(0,n.jsx)(i.wv,{ref:t,className:(0,c.cn)("-mx-1 my-1 h-px bg-muted",r),...a})}).displayName=i.wv.displayName},67126:(e,t,r)=>{r.d(t,{CU:()=>l,iJ:()=>o,z6:()=>s});var n=r(83037);r(84937);var a=r(39471),i=r(38976);let s=e=>{let{className:t,...r}=e;return(0,n.jsx)(a.bL,{className:(0,i.cn)("grid gap-2",t),...r})};s.displayName=a.bL.displayName;let l=e=>{let{className:t,...r}=e;return(0,n.jsx)(a.q7,{className:(0,i.cn)("shadow-xs focus:outline-hidden aspect-square h-4 w-4 rounded-full border border-ui-strong text-primary focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed data-[state=checked]:border-action disabled:data-[state=checked]:border-ui-strong disabled:data-[state=checked]:bg-ui-strong",t),...r,children:(0,n.jsx)(a.C1,{className:"flex items-center justify-center",children:(0,n.jsx)("span",{className:"h-2 w-2 rounded-full bg-action"})})})};l.displayName=a.q7.displayName;let o=e=>(0,n.jsx)("label",{className:(0,i.cn)(e.className,"flex cursor-pointer rounded-md items-center space-x-4 border border-input transition-duration-500 p-4 text-sm transition-all focus-within:border-primary",{"bg-muted":e.selected,"hover:bg-muted":!e.selected}),children:e.children});o.displayName="RadioGroupItemLabel"},74e3:(e,t,r)=>{r.d(t,{rP:()=>u,Ms:()=>m,Cs:()=>d,Fo:()=>c,$w:()=>f,GK:()=>p});var n=r(22661),a=r(52591),i=r(2694);let s={compare:"Compare",categorise:"Categorise",sequence:"Sequence",connect:"Connect",rank:"Rank"},l=Object.values(a.SO);function o(e){return e.trim().replace(/^i\s+can\s+/i,"").trim()}function c(e){var t;let r=null!=(t=e.teacherNote)?t:"";return/^stretch\b/i.test(r)?"Stretch":/^support\b/i.test(r)?"Support":null}function d(e){let{plan:t,write:r}=e,n="own-words"===r?null:r,a="stretch"===n||"support"===n;return{mode:"fill",source:e.source,context:e.context,plan:t,total:a?t.goals.length+1:Math.max(1,t.goals.length),newGoalIds:a?[e.newId()]:[],calibration:null,...n?{instruction:n}:{}}}function u(e,t){var r;if(!t.success)throw Error(t.error);if(!(0,n.Mu)(t.source,e.source))throw Error("The suggestion belongs to a different request. Your draft is retained.");let a=(0,n.ig)({proposals:t.proposals},e);return p((0,n.eU)(e,a,null!=(r=t.objective)?r:null),e)}function p(e,t){let r="stretch"===t.instruction?"Stretch: a harder step for a group that can take more.":"support"===t.instruction?"Support: a gentler step for a group that needs a smaller step.":null;return r?{...e,goals:e.goals.map(e=>t.newGoalIds.includes(e.id)?{...e,teacherNote:r}:e)}:e}function m(e){switch(e){case"stretch":return"A stretch criterion has been added. Check it, then continue.";
1case"support":return"A support criterion has been added. Check it, then continue.";case"another-objective":return"Another objective has been written. Keep it, or ask again.";case"own-words":return"The evidence to look for has been written under your words."}}function f(e,t){let r=e.trim();if(!r)return null;let c=function(e){var t;let r=o(e),c=null!=(t=r.split(/\s+/)[0])?t:"",d=(0,n.np)(c),u=l.find(e=>e.name===d);if(u)return{name:u.name,colour:u.color,inferred:!0};let p=(0,i.U8)(r),m=p?l.find(e=>e.name===s[p]):void 0;return m?{name:m.name,colour:m.color,inferred:!0}:{name:a.SO.identify.name,colour:a.SO.identify.color,inferred:!1}}(r);return{id:t,skillName:c.name,colour:c.colour,teacherText:function(e){let t=o(e);return t?t[0].toUpperCase()+t.slice(1):""}(r),iCanText:function(e){let t=o(e);return t?"I can ".concat(t[0].toLowerCase()).concat(t.slice(1)):""}(r),expectedEvidence:"",teacherNote:null,curriculumAnchor:null,lessonLinks:{introduction:"",mapIt:"",buildIt:"",sayIt:"",finalExplanation:""}}}},78825:(e,t,r)=>{r.d(t,{N:()=>o});var n=r(83037),a=r(87020),i=r(94487),s=r(38976),l=r(84937);function o(e){let{topic:t,subject:r,yearGroup:i,selectedLens:s,omitLens:o,badge:d,onSelectLens:u}=e,p=(0,a.av)({topic:t,subject:r,yearGroup:i}).filter(e=>e.lens!==o),m=p.map(e=>e.lens),f=m[0],g=s&&m.includes(s)?s:void 0,[h,x]=(0,l.useState)(null!=g?g:f),b=h&&m.includes(h)?h:null!=g?g:f,w=(0,l.useRef)({});(0,l.useEffect)(()=>{x(null!=g?g:f)},[g,f]);let y=e=>{x(e);let t=p.find(t=>t.lens===e);t&&u(t.lens,t.question)};return(0,n.jsx)("div",{role:"radiogroup","aria-label":"Angle on the topic",className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:p.map(e=>(0,n.jsx)(c,{card:e,selected:g===e.lens,tabIndex:b===e.lens?0:-1,buttonRef:t=>{w.current[e.lens]=t},badge:(null==d?void 0:d.lens)===e.lens?d.text:void 0,onSelect:()=>y(e.lens),onKeyDown:t=>{var r;if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp"].includes(t.key))return;t.preventDefault();let n="ArrowRight"===t.key||"ArrowDown"===t.key?1:-1,a=((e,t)=>{let r=(m.indexOf(e)+t+m.length)%m.length;return m[r]})(e.lens,n);y(a),null==(r=w.current[a])||r.focus()}},e.lens))})}function c(e){let{card:t,selected:r,tabIndex:a,buttonRef:l,badge:o,onSelect:c,onKeyDown:d}=e;return(0,n.jsxs)("button",{type:"button",role:"radio","aria-checked":r,tabIndex:a,"data-lens":t.lens,onClick:c,onKeyDown:d,ref:l,className:(0,s.cn)("flex flex-col gap-2 rounded-xl border p-4 text-left transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",r?"border-transparent bg-action/10":"border-ui bg-white hover:bg-surface-page"),children:[(0,n.jsx)("span",{className:"text-xxs font-semibold uppercase tracking-wider text-action",children:i.OI[t.lens].label}),(0,n.jsx)("span",{"data-angle-question":!0,className:"text-sm font-semibold leading-snug text-ink",children:t.question}),o&&(0,n.jsx)("span",{"data-angle-badge":!0,className:"text-xs font-medium text-action",children:o}),(0,n.jsxs)("span",{className:"text-xs text-ink-muted",children:["For example: ",t.forExample,"."]}),t.weighUp&&(0,n.jsxs)("span",{className:"text-xs text-ink-muted",children:["Weigh up: ",t.weighUp]}),r&&(0,n.jsxs)("span",{className:"text-xs text-ink-muted",children:[(0,n.jsx)("span",{className:"font-medium text-ink",children:"Where this leads: "}),t.whereThisLeads]})]})}},82771:(e,t,r)=>{r.d(t,{J:()=>c});var n=r(83037),a=r(84937),i=r(17206),s=r(14879),l=r(38976);let o=(0,s.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)(i.b,{ref:t,className:(0,l.cn)(o(),r),...a})});c.displayName=i.b.displayName},95813:(e,t,r)=>{r.d(t,{T:()=>s});var n=r(83037),a=r(36177),i=r(38976);function s(e){let{label:t,coverageStatus:r,hasData:s,className:l}=e,o=(0,a.c0)({coverageStatus:r,hasData:s});return(0,n.jsxs)("span",{className:(0,i.cn)("flex w-full min-w-0 items-center justify-between gap-3",l),children:[(0,n.jsx)("span",{className:"min-w-0 truncate",children:t}),o?(0,n.jsx)("span",{className:"shrink-0 rounded border border-ui bg-surface-page px-1.5 py-0.5 text-xxs font-medium leading-none tracking-normal text-ink-muted",children:o}):null]})}},96149:(e,t,r)=>{r.d(t,{p:()=>s});var n=r(83037),a=r(84937),i=r(38976);let s=a.forwardRef((e,t)=>
1{let{className:r,type:a,...s}=e;return(0,n.jsx)("input",{type:a,className:(0,i.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-ink-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-0 aria-invalid:border-destructive disabled:cursor-not-allowed disabled:bg-surface-page disabled:opacity-50 md:text-sm",r),ref:t,...s})});s.displayName="Input"},98857:(e,t,r)=>{r.d(t,{v:()=>b});var n=r(83037),a=r(84937),i=r(98483),s=r(38976);let l=Object.values(r(52591).SO),o="h-auto min-h-0 rounded px-1 py-0.5 text-sm font-medium text-action hover:bg-surface-page hover:text-action",c="font-display text-xs font-semibold uppercase tracking-[.12em] text-action",d={green:"bg-framework-green/15",blue:"bg-framework-blue/15",yellow:"bg-framework-yellow/25",orange:"bg-framework-orange/15",red:"bg-framework-red/15"},u={green:"bg-framework-green",blue:"bg-framework-blue",yellow:"bg-framework-yellow",orange:"bg-framework-orange",red:"bg-framework-red"},p=[{colour:"green",asks:"How do I get started?",family:"Initiate and engage"},{colour:"blue",asks:"How should I organise my ideas?",family:"Connecting and relating"},{colour:"yellow",asks:"How do I know this?",family:"Reinforcing knowledge"},{colour:"orange",asks:"How can I communicate my understanding?",family:"Integrating language"},{colour:"red",asks:"What can I do with my new knowledge?",family:"Using knowledge purposefully"}],m=["One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten"];function f(e,t){var r;let n=[t.yearGroup,t.subject.toLowerCase()].filter(Boolean).join(" ");return"auto"===e||"fill"===e?["Reading your concepts: ".concat(t.concepts||"your topic"),"Reading your question: ".concat(t.question||"your enquiry question"),"Writing one objective for ".concat(n||"your class"),"Writing ".concat((null!=(r=m[t.criteria-1])?r:String(t.criteria)).toLowerCase()," success criteri").concat(1===t.criteria?"on":"a"," with the evidence you would expect")]:["Reading your objective and criteria",{stretch:"Writing a harder step for a group that can take more",support:"Writing a gentler step for a group that needs a smaller step","own-words":"Writing the evidence to look for under your own words","another-objective":"Writing another objective for ".concat(n||"your class"),challenge:"Writing a challenge proposal for you to compare"}[e]]}function g(e){let{writing:t,narration:r}=e,i=f(t,r),[l,o]=(0,a.useState)(0);return(0,a.useEffect)(()=>{let e=window.setInterval(()=>o(e=>Math.min(i.length-1,e+1)),1e3);return()=>window.clearInterval(e)},[i.length]),(0,n.jsxs)("div",{role:"status","aria-live":"polite",className:"border-b border-ui pb-4",children:[(0,n.jsx)("p",{className:(0,s.cn)(c,"mb-2"),children:"Writing your objective"}),i.map((e,t)=>(0,n.jsxs)("p",{className:(0,s.cn)("flex items-baseline gap-2.5 py-0.5 text-sm transition-colors duration-300",t<=l?"text-ink":"text-ink-muted"),children:[(0,n.jsx)("span",{"aria-hidden":"true",className:(0,s.cn)("h-2 w-2 shrink-0 translate-y-px rounded-full transition-colors duration-300",t<=l?"bg-action":"bg-ui")}),e]},e)),(0,n.jsx)("div",{"aria-hidden":"true",className:"my-3 h-0.5 overflow-hidden bg-ui",children:(0,n.jsx)("span",{className:"block h-full bg-action transition-[width] duration-1000 ease-linear motion-reduce:transition-none",style:{width:"".concat(Math.round((l+1)/i.length*100),"%")}})}),(0,n.jsx)("p",{className:"text-sm text-ink-muted",children:"About four seconds."})]})}function h(e){var t;let{colour:r}=e;return(0,n.jsx)("span",{"aria-hidden":"true","data-family":r,className:(0,s.cn)("h-2 w-2 shrink-0 rounded-full",null!=(t=u[r])?t:u.green)})}function x(e){var t;let{criterion:r,ownWords:a,onChange:i}=e,l=null!=(t=d[r.colour])?t:d.green;return a&&i?(0,n.jsxs)("button",{type:"button",className:(0,s.cn)("inline-flex items-center gap-1.5 self-start whitespace-nowrap rounded-full px-2.5 py-0.5 text-xs font-semibold text-ink hover:opacity-90",l),onClick:i,children:[(0,n.jsx)(h,{colour:r.colour}),"Looks like ",r.skillName," ",(0,n.jsx)("span",{"aria-hidden":"true",children:"\xb7"})," ",(0,n.jsx)("span",{className:"underline",children:"change"})]}):(0,n.jsxs)("span",{className:(0,s.cn)("inline-flex items-center gap-1.5 self-start whitespace-nowrap rounded-full px-2.5 py-0.5 text-xs font-semibold text-ink",l),children:[(0,n.jsx)(h,{colour:r.colour}),r.skillName]})}function b(e){var t;let{mode:r,criteria:d,writing:h}=e,b=(0,a.useId)(),w=!0===e.busy,y=!1!==e.canAdd&&!w,[v,k]=(0,a.useState)("read"),[j,N]=(0,a.useState)(!1),[I,C]=(0,a.useState)(null),[S,A]=(0,a.useState)(null),[O,L]=(0,a.useState)(!1),E=(0,a.useRef)(null),R=(0,a.useRef)(null),T=(0,a.useRef)([]),[q,P]=(0,a.useState)(null),D=(0,a.useRef)(null);(0,a.useEffect)(()=>{var e;""===I&&(null==(e=D.current)||e.focus())},[I]),(0,a.useEffect)(()=>
1{if(!j)return;let e=e=>{var t;(null==(t=E.current)?void 0:t.contains(e.target))||N(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[j]),(0,a.useEffect)(()=>{if(j&&null!==q){var e;null==(e=T.current[q])||e.focus(),P(null)}},[q,j]);let F=(e,t)=>{"Escape"===e.key&&(e.stopPropagation(),t())},z=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];N(!1),P(null),t&&(null==(e=R.current)||e.focus())},W=()=>{let t=(null!=I?I:"").trim();C(null),t&&(A(d.length),e.onOwnWords(t))},G=null===S?null:null!=(t=d[S])?t:null,M=e.objective.trim(),U=Math.max(1,Math.min(m.length,e.startingCount||d.length||1)),K=h&&"auto"!==h.kind&&"fill"!==h.kind&&"another-objective"!==h.kind&&"challenge"!==h.kind,_=d.length>0;return(null==h?void 0:h.kind)==="auto"?(0,n.jsx)(g,{writing:"auto",narration:h.narration}):(0,n.jsxs)("div",{className:"space-y-4 text-ink",children:[h&&!(K&&_)&&(0,n.jsx)(g,{writing:h.kind,narration:h.narration}),!_&&e.status&&(0,n.jsx)("p",{role:"status",className:"text-sm text-ink-muted",children:e.status}),!_&&e.error&&(0,n.jsx)("p",{role:"alert",className:"text-sm text-ink",children:e.error}),(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsx)("p",{className:c,children:"Learning objective"}),(0,n.jsxs)("div",{ref:E,className:"relative",children:[(0,n.jsx)(i.$,{ref:R,type:"button",variant:"outline",className:"border-ink-muted bg-white text-ink hover:bg-surface-page hover:text-ink whitespace-normal h-auto min-h-9 px-3 disabled:opacity-100 disabled:text-ink-muted disabled:bg-surface-page","aria-haspopup":"menu","aria-expanded":j,onClick:()=>{P(null),N(e=>!e)},onKeyDown:e=>{if("Escape"===e.key&&j){e.preventDefault(),F(e,()=>z(!0));return}let t=3*("End"===e.key||"ArrowUp"===e.key);["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),P(t),N(!0))},children:"Edit"}),j&&(0,n.jsx)("div",{role:"menu",tabIndex:-1,"data-wizard-escape-stays":"","aria-label":"Edit the objective and criteria",onKeyDown:e=>{let t=T.current.findIndex(e=>e===document.activeElement);if("Escape"===e.key){e.preventDefault(),F(e,()=>z(!0));return}if("Tab"===e.key)return void z();let r="Home"===e.key?0:"End"===e.key?3:"ArrowDown"===e.key?(t+1)%4:"ArrowUp"===e.key?(t+3)%4:null;if(null!==r){var n;e.preventDefault(),e.stopPropagation(),null==(n=T.current[r])||n.focus()}},className:"absolute right-0 z-10 mt-1 min-w-56 rounded-md border border-ui bg-white p-1 shadow-card-hover",children:[["Change the wording",e.onChangeWording],["Change a skill",()=>k("skills")],["Ask for another objective",e.onAnotherObjective],["Remove a criterion",()=>k("removing")]].map((e,t)=>{let[r,a]=e;return(0,n.jsx)("button",{ref:e=>{T.current[t]=e},type:"button",role:"menuitem",className:"block w-full rounded px-3 py-2 text-left text-sm text-ink hover:bg-surface-page",onClick:()=>{z(!0),a()},children:r},r)})})]})]}),(0,n.jsx)("p",{className:"font-display text-2xl leading-snug text-ink",children:M||(0,n.jsx)("span",{className:"text-ink-muted",children:"Not yet written. Press Edit to write it, or to ask for one."})}),"wizard"===r&&(0,n.jsx)("p",{className:"text-sm text-ink-muted",children:"Written from your concepts and your question. Keep it, or press Edit to change any wording or ask for another."}),(0,n.jsx)("p",{className:(0,s.cn)(c,"pt-2"),children:"Success criteria"}),"wizard"===r&&(0,n.jsx)("p",{className:"text-sm text-ink-muted",children:"".concat(m[U-1]," to get you started for ").concat(e.yearGroup||"your class","; add more as the lesson takes shape. Each one carries a thinking skill from the framework, and those skills shape your journey on the next step.")}),"read"!==v&&(0,n.jsxs)("p",{role:"status",className:"flex flex-wrap items-center gap-3 text-sm text-ink",children:["skills"===v?"Choose a different thinking skill for any criterion.":"Remove any criterion you do not need.",(0,n.jsx)(i.$,{type:"button",variant:"ghost",className:o,onClick:()=>k("read"),children:"Done"})]}),(0,n.jsxs)("ol",{className:"m-0 list-none p-0",children:[d.map((t,r)=>{let a=t.learnerText.trim()||t.teacherText.trim();return(0,n.jsxs)("li",{"data-objective-id":t.id,"aria-label":"Success criterion ".concat(r+1),className:"grid grid-cols-[2rem_minmax(0,1fr)] items-start gap-x-3 gap-y-2 border-t border-ui py-3 md:grid-cols-[2rem_minmax(0,1fr)_auto]",children:[(0,n.jsxs)("span",{"aria-hidden":"true",className:"font-display text-lg font-semibold leading-tight text-action",children:[r+1,"."]}),(0,n.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,n.jsxs)("p",{className:"font-semibold text-ink",children:[a||(0,n.jsx)("span",{className:"font-normal text-ink-muted",children:"Not yet written."}),t.tag&&(0,n.jsx)("span",{className:"ml-1.5 inline-flex items-center gap-1.5 align-middle text-xxs font-semibold uppercase tracking-[.06em] text-action before:h-1 before:w-1 before:rounded-full before:bg-action",children:t.tag})]}),(0,n.jsxs)("p",{className:"text-sm text-ink-muted",children:["Evidence to look for: ",t.evidence.trim()||"not yet written."]}),"skills"===v&&(0,n.jsx)("select",{"aria-label":"Thinking skill for success criterion ".concat(r+1),value:t.skillName,className:"mt-1 min-h-9 rounded-md border border-ink-muted bg-white px-2 py-1 text-sm text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",onCh
1ange:r=>{let n=l.find(e=>e.name===r.target.value);n&&e.onSkillChange({id:t.id,skillName:n.name,colour:n.color})},children:l.map(e=>(0,n.jsx)("option",{value:e.name,children:e.name},e.name))}),"removing"===v&&(0,n.jsx)(i.$,{type:"button",variant:"ghost",className:o,"aria-label":"Remove success criterion ".concat(r+1),onClick:()=>e.onRemove(t.id),children:"Remove"})]}),(0,n.jsx)("div",{className:"col-start-2 md:col-start-auto",children:(0,n.jsx)(x,{criterion:t,ownWords:(null==G?void 0:G.id)===t.id,onChange:()=>{A(null),k("skills")}})})]},t.id)}),(0,n.jsxs)("li",{"aria-label":"Add another success criterion",className:"relative grid grid-cols-[2rem_minmax(0,1fr)] items-start gap-x-3 gap-y-2 py-3 before:absolute before:inset-x-0 before:top-0 before:h-px before:origin-left before:bg-action before:animate-draw-in motion-reduce:before:animate-none md:grid-cols-[2rem_minmax(0,1fr)_auto]",children:[(0,n.jsx)("span",{"aria-hidden":"true",className:"animate-breathe font-display text-lg font-semibold leading-tight text-action motion-reduce:animate-none",children:d.length+1}),(0,n.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,n.jsx)("p",{className:"font-medium text-ink-muted",children:"Add another success criterion"}),(0,n.jsx)("p",{className:"text-sm text-ink-muted",children:"A harder one for a group that can take more, a gentler one for a group that needs a smaller step, or one in your own words; the skill pill fills itself from your verb."}),K&&_&&(0,n.jsx)("p",{role:"status","aria-live":"polite","data-testid":"criterion-writing",className:"animate-breathe text-sm font-medium text-action motion-reduce:animate-none",children:f(h.kind,h.narration)[1]}),_&&!h&&e.error&&(0,n.jsx)("p",{role:"alert","data-testid":"criterion-refusal",className:"text-sm text-ink",children:e.error}),_&&!h&&!e.error&&e.status&&(0,n.jsx)("p",{role:"status",className:"text-sm text-ink-muted",children:e.status}),null!==I&&(0,n.jsxs)("div",{"data-wizard-escape-stays":"",className:"flex flex-wrap items-center gap-2 pt-1",children:[(0,n.jsx)("label",{htmlFor:"".concat(b,"-own"),className:"text-sm text-ink-muted",children:"In my own words"}),(0,n.jsx)("input",{id:"".concat(b,"-own"),ref:D,value:I,placeholder:"I can ...",className:"min-h-9 min-w-0 flex-1 basis-64 rounded-md border border-ink-muted bg-white px-2.5 py-1 text-sm text-ink placeholder:text-ink-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",onCh
1ange:e=>C(e.target.value),onBlur:W,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),W()),F(e,()=>C(null))}})]})]}),(0,n.jsxs)("div",{className:"col-start-2 flex flex-wrap gap-x-3 gap-y-1 self-center md:col-start-auto",children:[(0,n.jsx)(i.$,{type:"button",variant:"ghost",className:o,disabled:!y||!d.length,onClick:e.onStretch,children:"Stretch"}),(0,n.jsx)(i.$,{type:"button",variant:"ghost",className:o,disabled:!y||!d.length,onClick:e.onSupport,children:"Support"}),(0,n.jsx)(i.$,{type:"button",variant:"ghost",className:o,disabled:!y,"aria-expanded":null!==I,onClick:()=>C(e=>null===e?"":e),children:"In my own words"})]})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(i.$,{type:"button",variant:"ghost",className:o,"aria-expanded":O,onClick:()=>L(e=>!e),children:"The five families"}),O&&(0,n.jsx)("ul",{className:"mt-2 space-y-1 text-sm text-ink",children:p.map(e=>(0,n.jsxs)("li",{className:"flex items-baseline gap-2.5",children:[(0,n.jsx)("span",{"aria-hidden":"true",className:(0,s.cn)("h-2 w-2 shrink-0 translate-y-px rounded-full",u[e.colour])}),(0,n.jsxs)("span",{children:[(0,n.jsx)("span",{className:"font-semibold",children:e.asks})," ",(0,n.jsxs)("span",{className:"text-ink-muted",children:[e.family,"."]})]})]},e.colour))})]}),"wizard"===r&&(0,n.jsx)("p",{className:"text-sm text-ink-muted",children:"These will appear in your lesson plan and shape your journey."})]})}}}]);
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.