1/*! For license information please see 4645.c302dbcb.chunk.js.LICENSE.txt */ 2"use strict";(globalThis.webpackChunkfrontend=globalThis.webpackChunkfrontend||[]).push([[4645],{92264(e,a,s){s.d(a,{p:()=>o});var t=s(65043),r=s(99766),l=s(70579);const o=t.forwardRef((e,a)=>{let{className:s,type:t,...o}=e;return(0,l.jsx)("input",{type:t,className:(0,r.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",s),ref:a,...o})});o.displayName="Input"},84370(e,a,s){s.d(a,{bq:()=>m,eb:()=>x,gC:()=>f,l6:()=>c,yv:()=>u});var t=s(65043),r=s(22095),l=s(36210),o=s(92382),i=s(15711),n=s(99766),d=s(70579);const c=r.bL,u=(r.YJ,r.WT),m=t.forwardRef((e,a)=>{let{className:s,children:t,...l}=e;return(0,d.jsxs)(r.l9,{ref:a,className:(0,n.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),...l,children:[t,(0,d.jsx)(r.In,{asChild:!0,children:(0,d.jsx)(o.A,{className:"h-4 w-4 opacity-50"})})]})});m.displayName=r.l9.displayName;const p=t.forwardRef((e,a)=>{let{className:s,...t}=e;return(0,d.jsx)(r.PP,{ref:a,className:(0,n.cn)("flex cursor-default items-center justify-center py-1",s),...t,children:(0,d.jsx)(i.A,{className:"h-4 w-4"})})});p.displayName=r.PP.displayName;const h=t.forwardRef((e,a)=>{let{className:s,...t}=e;return(0,d.jsx)(r.wn,{ref:a,className:(0,n.cn)("flex cursor-default items-center justify-center py-1",s),...t,children:(0,d.jsx)(o.A,{className:"h-4 w-4"})})});h.displayName=r.wn.displayName;const f=t.forwardRef((e,a)=>{let{className:s,children:t,position:l="popper",...o}=e;return(0,d.jsx)(r.ZL,{children:(0,d.jsxs)(r.UC,{ref:a,className:(0,n.cn)("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-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 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]","popper"===l&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:l,...o,children:[(0,d.jsx)(p,{}),(0,d.jsx)(r.LM,{className:(0,n.cn)("p-1","popper"===l&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,d.jsx)(h,{})]})})});f.displayName=r.UC.displayName;t.forwardRef((e,a)=>{let{className:s,...t}=e;return(0,d.jsx)(r.JU,{ref:a,className:(0,n.cn)("px-2 py-1.5 text-sm font-semibold",s),...t})}).displayName=r.JU.displayName;const x=t.forwardRef((e,a)=>{let{className:s,children:t,...o}=e;return(0,d.jsxs)(r.q7,{ref:a,className:(0,n.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...o,children:[(0,d.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,d.jsx)(r.VF,{children:(0,d.jsx)(l.A,{className:"h-4 w-4"})})}),(0,d.jsx)(r.p4,{children:t})]})});x.displayName=r.q7.displayName;t.forwardRef((e,a)=>{let{className:s,...t}=e;return(0,d.jsx)(r.wv,{ref:a,className:(0,n.cn)("-mx-1 my-1 h-px bg-muted",s),...t})}).displayName=r.wv.displayName},19690(e,a,s){s.d(a,{Xi:()=>d,av:()=>c,j7:()=>n,tU:()=>i});var t=s(65043),r=s(47127),l=s(99766),o=s(70579);const i=r.bL,n=t.forwardRef((e,a)=>{let{className:s,...t}=e;return(0,o.jsx)(r.B8,{ref:a,className:(0,l.cn)("inline-flex h-9 max-w-full items-center justify-start overflow-x-auto scrollbar-hide rounded-lg bg-muted p-1 text-muted-foreground",s),...t})});n.displayName=r.B8.displayName;const d=t.forwardRef((e,a)=>{let{className:s,...t}=e;return(0,o.jsx)(r.l9,{ref:a,className:(0,l.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",s),...t})});d.displayName=r.l9.displayName;const c=t.forwardRef((e,a)=>{let{className:s,...t}=e;return(0,o.jsx)(r.UC,{ref:a,className:(0,l.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...t})});c.displayName=r.UC.displayName},73455(e,a,s){s.r(a),s.d(a,{default:()=>S});var t=s(65043),r=s(45621),l=s(73824),o=s(4980),i=s(56328),n=s(13390),d=s(91140),c=s(92264),u=s(59938),m=s(5949),p=s(13416),h=s(19690),f=s(84370),x=s(46258),v=s(5704
20),g=s(1673),b=s(25440),j=s(37719),y=s(22626),N=s(38326),w=s(27673),_=s(71360),C=s(98971),A=s(39292),k=s(36401),T=s(70579);const R=["Foundation","1","2","3","4","5","6","7","8","9","10"],D=["English","Mathematics","Science","History","Geography","Health & PE","Technology","Visual Arts","Music","Drama","HASS","Design & Technology","Digital Technologies"],P=["Mother's Day","Father's Day","Easter","Christmas","Halloween","NAIDOC Week","ANZAC Day","Harmony Day","Back to School","End of Year","Valentine's Day","Book Week","Science Week"],G=[{id:"colouring_page",label:"Colouring Page",description:"AI-generated line-art scene for students to colour in",icon:w.A,colour:"bg-amber-50 border-amber-200 text-amber-800",activeColour:"bg-amber-500 text-white border-amber-500"},{id:"cut_and_assemble",label:"Cut & Assemble",description:"Printable template with numbered assembly steps",icon:C.A,colour:"bg-sky-50 border-sky-200 text-sky-800",activeColour:"bg-sky-600 text-white border-sky-600"},{id:"tech_project",label:"Tech Project Guide",description:"D&T project guide \u2014 tools, materials, PPE, step-by-step",icon:k.A,colour:"bg-slate-50 border-slate-200 text-slate-700",activeColour:"bg-slate-700 text-white border-slate-700"}],M=[4,6,8,10,12],I=["colouring_page","cut_and_assemble","tech_project"],S=function(){var e;let{lockedMode:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=(0,r.Zp)(),[w]=(0,r.ok)(),{user:k}=(0,l.As)(),[S,L]=(0,t.useState)(!1),[V,$]=(0,t.useState)([]),[F,E]=(0,t.useState)("create"),[q,J]=(0,t.useState)(!1),[W,B]=(0,t.useState)(""),U=a||(I.includes(w.get("mode"))?w.get("mode"):"colouring_page"),[H,K]=(0,t.useState)({title:"",craft_mode:U,year_levels:[],subject:"",seasonal_theme:"",num_steps:6,outcome_codes:"",curriculum_notes:"",project_description:""}),z=(0,t.useCallback)(async()=>{try{const e=await o.A.get(`${o.n}/craft/`,{params:{search:W||void 0,craft_mode:a||void 0}});$(e.data.craft_activities||[])}catch{}},[W,a]);(0,t.useEffect)(()=>{z()},[z]);const Y=V.filter(e=>{var a,s,t;return!W||(null===(a=e.title)||void 0===a?void 0:a.toLowerCase().includes(W.toLowerCase()))||(null===(s=e.subject)||void 0===s?void 0:s.toLowerCase().includes(W.toLowerCase()))||(null===(t=e.seasonal_theme)||void 0===t?void 0:t.toLowerCase().includes(W.toLowerCase()))}),Z=G.find(e=>e.id===H.craft_mode),O="tech_project"===H.craft_mode,X=(null===Z||void 0===Z?void 0:Z.icon)||C.A,Q=e=>{const a=G.find(a=>a.id===e);return a?a.label:e};return(0,T.jsxs)(x.A,{children:[(0,T.jsx)(b.A,{}),(0,T.jsxs)("div",{className:"p-6 max-w-5xl mx-auto",children:[(0,T.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,T.jsx)("div",{className:`p-2 rounded-lg ${a&&(null===Z||void 0===Z||null===(e=Z.colour)||void 0===e?void 0:e.split(" ")[0])||"bg-rose-100"}`,children:(0,T.jsx)(X,{className:"w-6 h-6"})}),(0,T.jsxs)("div",{className:"min-w-0",children:[(0,T.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:a?null===Z||void 0===Z?void 0:Z.label:"Maker Studio"}),(0,T.jsx)("p",{className:"text-sm text-muted-foreground",children:a?null===Z||void 0===Z?void 0:Z.description:"Colouring pages, cut-and-assemble templates, and D&T project guides"})]}),(0,T.jsx)(m.E,{variant:"secondary",className:"ml-auto",children:"5 credits"})]}),!a&&(0,T.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 mb-6",children:G.map(e=>{let{id:a,label:s,description:t,icon:r,colour:l,activeColour:o}=e;return(0,T.jsxs)("button",{type:"button",onClick:()=>K(e=>({...e,craft_mode:a})),className:`flex items-start gap-2 rounded-lg border p-3 text-left transition-colors ${H.craft_mode===a?o:l}`,children:[(0,T.jsx)(r,{className:"w-4 h-4 mt-0.5 shrink-0"}),(0,T.jsxs)("div",{children:[(0,T.jsx)("p",{className:"text-xs font-semibold",children:s}),(0,T.jsx)("p",{className:"text-xs opacity-75 mt-0.5",children:t})]})]},a)})}),(0,T.jsxs)(h.tU,{value:F,onValueChange:E,children:[(0,T.jsxs)(h.j7,{className:"mb-6",children:[(0,T.jsxs)(h.Xi,{value:"create",children:[(0,T.jsx)(_.A,{className:"w-4 h-4 mr-1"})," Create"]}),(0,T.jsxs)(h.Xi,{value:"library",children:[(0,T.jsx)(y.A,{className:"w-4 h-4 mr-1"})," My Activities (",V.length,")"]})]}),(0,T.jsx)(h.av,{value:"create",children:S?(0,T.jsx)(v.A,{title:`Creating your ${(null===Z||void 0===Z?void 0:Z.label)||"craft activity"}\u2026`,steps:["Designing activity content",O?"Building step-by-step project guide":"Generating scene description",O?"Preparing materials and tools list":"Creating reference image","Finalising your PDF"]}):(0,T.jsxs)(d.Zp,{children:[(0,T.jsx)(d.aR,{children:(0,T.jsxs)(d.ZB,{className:"text-base",children:[(null===Z||void 0===Z?void 0:Z.label)||"Craft"," details"]}
2)}),(0,T.jsxs)(d.Wu,{className:"space-y-5",children:[(0,T.jsxs)("div",{className:"space-y-1",children:[(0,T.jsxs)(u.J,{children:["Title ",(0,T.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,T.jsx)(c.p,{placeholder:O?"e.g. Year 9 Timber Toolbox Project":"e.g. Mother's Day Colouring Page",value:H.title,onChange:e=>K(a=>({...a,title:e.target.value}))})]}),(0,T.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,T.jsxs)("div",{className:"space-y-1",children:[(0,T.jsxs)(u.J,{children:["Year Level ",(0,T.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,T.jsxs)(f.l6,{value:H.year_levels[0]||"",onValueChange:e=>K(a=>({...a,year_levels:e?[e]:[]})),children:[(0,T.jsx)(f.bq,{children:(0,T.jsx)(f.yv,{placeholder:"Select year level"})}),(0,T.jsx)(f.gC,{children:R.map(e=>(0,T.jsx)(f.eb,{value:e,children:"Foundation"===e?"Foundation (Prep / Kindy)":`Year ${e}`},e))})]})]}),(0,T.jsxs)("div",{className:"space-y-1",children:[(0,T.jsx)(u.J,{children:"Subject"}),(0,T.jsxs)(f.l6,{value:H.subject,onValueChange:e=>K(a=>({...a,subject:e})),children:[(0,T.jsx)(f.bq,{children:(0,T.jsx)(f.yv,{placeholder:"Select subject (optional)"})}),(0,T.jsx)(f.gC,{children:D.map(e=>(0,T.jsx)(f.eb,{value:e,children:e},e))})]})]})]}),(0,T.jsxs)("div",{className:"space-y-1",children:[(0,T.jsx)(u.J,{children:"Seasonal / Cultural Theme"}),(0,T.jsxs)(f.l6,{value:H.seasonal_theme,onValueChange:e=>K(a=>({...a,seasonal_theme:"__none__"===e?"":e})),children:[(0,T.jsx)(f.bq,{children:(0,T.jsx)(f.yv,{placeholder:"Select a theme (optional)"})}),(0,T.jsxs)(f.gC,{children:[(0,T.jsx)(f.eb,{value:"__none__",children:"No theme"}),P.map(e=>(0,T.jsx)(f.eb,{value:e,children:e},e))]})]}),"NAIDOC Week"===H.seasonal_theme&&(0,T.jsxs)("p",{className:"text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded p-2 mt-1 flex gap-1.5 items-start",children:[(0,T.jsx)(j.A,{className:"w-3.5 h-3.5 mt-0.5 shrink-0"}),"NAIDOC Week activities will produce a text-only teacher guide following cultural protocols. No AI-generated imagery will be used."]})]}),"colouring_page"!==H.craft_mode&&(0,T.jsxs)("div",{className:"space-y-1",children:[(0,T.jsx)(u.J,{children:"Number of Steps"}),(0,T.jsx)("div",{className:"flex gap-2",children:M.map(e=>(0,T.jsx)("button",{type:"button",onClick:()=>K(a=>({...a,num_steps:e})),className:"px-3 py-1.5 rounded-md text-sm border transition-colors "+(H.num_steps===e?"bg-primary text-primary-foreground border-primary":"bg-background border-border hover:bg-muted"),children:e},e))})]}),O&&(0,T.jsxs)("div",{className:"space-y-1",children:[(0,T.jsx)(u.J,{children:"Project Description"}),(0,T.jsx)(p.T,{placeholder:"Describe what students will build (e.g. 'A timber toolbox using butt joints, nails, and sandpaper finish')",value:H.project_description,onChange:e=>K(a=>({...a,project_description:e.target.value})),rows:2})]}),(0,T.jsxs)("div",{className:"space-y-1",children:[(0,T.jsx)(u.J,{children:"Curriculum Outcome Codes"}),(0,T.jsx)(c.p,{placeholder:"e.g. ACTDEP023, ACTDEP029 (comma-separated, optional)",value:H.outcome_codes,onChange:e=>K(a=>({...a,outcome_codes:e.target.value}))}),(0,T.jsx)("p",{className:"text-xs text-muted-foreground",children:"ACARA, NSW, VIC, WA codes supported. Leave blank to use free-text notes below."})]}),(0,T.jsxs)("div",{className:"space-y-1",children:[(0,T.jsx)(u.J,{children:"Curriculum Notes"}),(0,T.jsx)(p.T,{placeholder:"Add any curriculum context, state-specific outcomes, or learning intentions (optional)",value:H.curriculum_notes,onChange:e=>K(a=>({...a,curriculum_notes:e.target.value})),rows:2})]}),(0,T.jsxs)(n.$,{onClick:async()=>{const e=[];if(H.title.trim()||e.push("Title"),0===H.year_levels.length&&e.push("Year Level"),e.length>0)return void i.oR.error(`Please fill in: ${e.join(", ")}.`);const a=H.outcome_codes?H.outcome_codes.split(",").map(e=>e.trim()).filter(Boolean):[],t={title:H.title,craft_mode:H.craft_mode,year_levels:H.year_levels,subject:H.subject||"",seasonal_theme:H.seasonal_theme||null,num_steps:H.num_steps,outcome_codes:a,curriculum_notes:H.curriculum_notes||"",project_description:H.project_description||""};L(!0);try{const e=await o.A.post(`${o.n}/craft/generate`,t);i.oR.success("Craft activity created!"),s(`/activity-studio/craft/${e.data.activity_id}`)}catch(m){var r,l,n;if(403===(null===(r=m.response)||void 0===r?void 0:r.status)){var d;const e=(null===(d=m.response.data)||void 0===d?void 0:d.detail)||"";e.toLowerCase().includes("credit")?J(!0):i.oR.error(e||"Access denied.")}else if(400===(null===(l=m.response)||void 0===l?void 0:l.status)){var c;i.oR.error((null===(c=m.response.data)||void 0===c?void 0:c.detail)||"Invalid outcome codes. Please check and try again.")}else if(422===(null===(n=m.response)||void 0===n?void 0:n.status)){var u;i.oR.error((null===(u=m.response.data)||void 0===u?void 0:u.detail)||"Could not generate craft activity. Try adjusting the settings.")}else i.oR.error("Generation failed. Please try again.")}finally{L(!1)}},disabled:S,className:"w-full",children:[(0,T.jsx)(C.A,{className:"w-4 h-4 mr-2"}),"Generate ",(null===Z||void 0===Z?void 0:Z.label)||"Craft Activity"]})]})]})}),(0,T.jsx)(h.av,{value:"library",children:(0,T.jsxs)("div",{className:"space-y-4",children:[(0,T.jsxs)("div",{className:"relative",children:[(0,T.jsx)(A.A,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),(0,T.jsx)(c.p,{placeholder:"Search craft activities\u2026",value:W,onChange:e=>B(e.target.value),className:"pl-9"})]}),0===Y.length?(0,T.jsxs)("div",{className:"text-center py-12 text-muted-foreground",children:[(0,T.jsx)(C.A,{className:"w-10 h-10 mx-auto mb-3 opacity-30"}),(0,T.jsx)("p",{className:"font-medium",children:"No craft activities yet"}),(0,T.jsx)("p",{className:"text-sm mt-1",children:"Create your first one on the Create tab."})]}):(0,T.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:Y.map(e=>{var a;return(0,T.jsx)(d.Zp,{className:"cursor-pointer hover:shadow-md transition-shadow",onClick:()=>s(`/activity-studio/craft/${e.activity_id}`),children:(0,T.jsx)(d.Wu,{className:"p-4",children:(0,T.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,T.jsxs)("div",{className:"min-w-0",children:[(0,T.jsx)("p",{className:"font-semibold text-sm truncate",children:e.title}),(0,T.jsxs)("p",{className:"text-xs text-muted-foreground mt-0.5",children:[Q(e.craft_mode),e.subject?` \xb7 ${e.subject}`:"",null!==(a=e.year_levels)&&void 0!==a&&a.length?` \xb7 Year ${e.year_levels.join(", ")}`:""]}),e.seasonal_theme&&(0,T.jsx)(m.E,{variant:"outline",className:"mt-1 text-xs",children:e.seasonal_theme})]}),(0,T.jsx)(N.A,{className:"w-4 h-4 text-muted-foreground shrink-0 mt-0.5"})]})})},e.activity_id)})})]})})]})]}),q&&(0,T.jsx)(g.A,{open:q,onClose:()=>J(!1),user:k})]})}},99432(e,a,s){s.d(a,{A:()=>t});const t=(0,s(77784).A)("coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]])},22024(e,a,s){s.d(a,{A:()=>t});const t=(0,s(77784).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},71360(e,a,s){s.d(a,{A:()=>t});const t=(0,s(77784).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},39292(e,a,s){s.d(a,{A:()=>t});const t=(0,s(77784).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},51419(e,a,s){s.d(a,{A:()=>t});const t=(0,s(77784).A)("shopping-cart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}
2],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]])},37719(e,a,s){s.d(a,{A:()=>t});const t=(0,s(77784).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},47127(e,a,s){s.d(a,{B8:()=>R,UC:()=>P,bL:()=>T,l9:()=>D});var t=s(65043),r=s(30858),l=s(21862),o=s(96711),i=s(52894),n=s(87914),d=s(14204),c=s(13642),u=s(54490),m=s(70579),p="Tabs",[h,f]=(0,l.A)(p,[o.RG]),x=(0,o.RG)(),[v,g]=h(p),b=t.forwardRef((e,a)=>{const{__scopeTabs:s,value:t,onValueChange:r,defaultValue:l,orientation:o="horizontal",dir:i,activationMode:h="automatic",...f}=e,x=(0,d.jH)(i),[g,b]=(0,c.i)({prop:t,onChange:r,defaultProp:l??"",caller:p});return(0,m.jsx)(v,{scope:s,baseId:(0,u.B)(),value:g,onValueChange:b,orientation:o,dir:x,activationMode:h,children:(0,m.jsx)(n.sG.div,{dir:x,"data-orientation":o,...f,ref:a})})});b.displayName=p;var j="TabsList",y=t.forwardRef((e,a)=>{const{__scopeTabs:s,loop:t=!0,...r}=e,l=g(j,s),i=x(s);return(0,m.jsx)(o.bL,{asChild:!0,...i,orientation:l.orientation,dir:l.dir,loop:t,children:(0,m.jsx)(n.sG.div,{role:"tablist","aria-orientation":l.orientation,...r,ref:a})})});y.displayName=j;var N="TabsTrigger",w=t.forwardRef((e,a)=>{const{__scopeTabs:s,value:t,disabled:l=!1,...i}=e,d=g(N,s),c=x(s),u=A(d.baseId,t),p=k(d.baseId,t),h=t===d.value;return(0,m.jsx)(o.q7,{asChild:!0,...c,focusable:!l,active:h,children:(0,m.jsx)(n.sG.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":p,"data-state":h?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:u,...i,ref:a,onMouseDown:(0,r.mK)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(t)}),onKeyDown:(0,r.mK)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(t)}),onFocus:(0,r.mK)(e.onFocus,()=>{const e="manual"!==d.activationMode;h||l||!e||d.onValueChange(t)})})})});w.displayName=N;var _="TabsContent",C=t.forwardRef((e,a)=>{const{__scopeTabs:s,value:r,forceMount:l,children:o,...d}=e,c=g(_,s),u=A(c.baseId,r),p=k(c.baseId,r),h=r===c.value,f=t.useRef(h);return t.useEffect(()=>{const e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,m.jsx)(i.C,{present:l||h,children:s=>{let{present:t}=s;return(0,m.jsx)(n.sG.div,{"data-state":h?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!t,id:p,tabIndex:0,...d,ref:a,style:{...e.style,animationDuration:f.current?"0s":void 0},children:t&&o})}})});function A(e,a){return`${e}-trigger-${a}`}function k(e,a){return`${e}-content-${a}`}C.displayName=_;var T=b,R=y,D=w,P=C},11009(e,a,s){s.d(a,{bL:()=>A,q7:()=>k});var t=s(65043),r=s(21862),l=s(87914),o=s(96711),i=s(31699),n=s(13642),d=s(14204),c=s(70579),u="ToggleGroup",[m,p]=(0,r.A)(u,[o.RG]),h=(0,o.RG)(),f=t.forwardRef((e,a)=>{const{type:s,...t}=e;if("single"===s){const e=t;return(0,c.jsx)(g,{...e,ref:a})}if("multiple"===s){const e=t;return(0,c.jsx)(b,{...e,ref:a})}throw new Error(`Missing prop \`type\` expected on \`${u}\``)});f.displayName=u;var[x,v]=m(u),g=t.forwardRef((e,a)=>{const{value:s,defaultValue:r,onValueChange:l=()=>{},...o}=e,[i,d]=(0,n.i)({prop:s,defaultProp:r??"",onChange:l,caller:u});return(0,c.jsx)(x,{scope:e.__scopeToggleGroup,type:"single",value:t.useMemo(()=>i?[i]:[],[i]),onItemActivate:d,onItemDeactivate:t.useCallback(()=>d(""),[d]),children:(0,c.jsx)(N,{...o,ref:a})})}),b=t.forwardRef((e,a)=>{const{value:s,defaultValue:r,onValueChange:l=()=>{},...o}=e,[i,d]=(0,n.i)({prop:s,defaultProp:r??[],onChange:l,caller:u}),m=t.useCallback(e=>d(function(){return[...arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e]}),[d]),p=t.useCallback(e=>d(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter(a=>a!==e)}),[d]);return(0,c.jsx)(x,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:m,onItemDeactivate:p,children:(0,c.jsx)(N,{...o,ref:a})})});f.displayName=u;var[j,y]=m(u),N=t.forwardRef((e,a)=>{const{__scopeToggleGroup:s,disabled:t=!1,rovingFocus:r=!0,orientation:i,dir:n,loop:u=!0,...m}=e,p=h(s),f=(0,d.jH)(n),x={role:"group",dir:f,...m};return(0,c.jsx)(j,{scope:s,rovingFocus:r,disabled:t,children:r?(0,c.jsx)(o.bL,{asChild:!0,...p,orientation:i,dir:f,loop:u,children:(0,c.jsx)(l.sG.div,{...x,ref:a})}):(0,c.jsx)(l.sG.div,{...x,ref:a})})}),w="ToggleGroupItem",_=t.forwardRef((e,a)=>{const s=v(w,e.__scopeToggleGroup),r=y(w,e.__scopeToggleGroup),l=h(e.__scopeToggleGroup),i=s.value.includes(e.value),n=r.disabled||e.disabled,d={...e,pressed:i,disabled:n},u=t.useRef(null);return r.rovingFocus?(0,c.jsx)(o.q7,{asChild:!0,...l,focusable:!n,active:i,ref:u,children:(0,c.jsx)(C,{...d,ref:a})}):(0,c.jsx)(C,{...d,ref:a})});_.displayName=w;var C=t.forwardRef((e,a)=>{const{__scopeToggleGroup:s,value:t,...r}=e,l=v(w,s),o={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},n="single"===l.type?o:void 0;
2return(0,c.jsx)(i.l,{...n,...r,ref:a,onPressedChange:e=>{e?l.onItemActivate(t):l.onItemDeactivate(t)}})}),A=f,k=_},31699(e,a,s){s.d(a,{b:()=>c,l:()=>d});var t=s(65043),r=s(30858),l=s(13642),o=s(87914),i=s(70579),n="Toggle",d=t.forwardRef((e,a)=>{const{pressed:s,defaultPressed:t,onPressedChange:d,...c}=e,[u,m]=(0,l.i)({prop:s,onChange:d,defaultProp:t??!1,caller:n});return(0,i.jsx)(o.sG.button,{type:"button","aria-pressed":u,"data-state":u?"on":"off","data-disabled":e.disabled?"":void 0,...c,ref:a,onClick:(0,r.mK)(e.onClick,()=>{e.disabled||m(!u)})})});d.displayName=n;var c=d}}]); 3//# sourceMappingURL=4645.c302dbcb.chunk.js.map
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.