1import{i as F,fn as E,j as e,bj as V,X as p,P as n,T as l,o as C,n as S,e as L,cK as W,aH as q,t as z,L as Q,jM as K,B as O,y as X,b as J,r as y,w as T,x as f,F as k,l as _,ay as I,C as N,R as U,aj as Y,aq as Z,a9 as ee}from"./index-aREvobyF.js";import{P as te}from"./PageMetaHeader-6lUw-EYb.js";import{u as re,P as ae}from"./ProjectTemplateCard-CFNODM1j.js";import{f as le}from"./achievementStandard-BdQjJun5.js";import{A as se,a as ie,b as oe,c as ne}from"./alert-Brzb1jZD.js";import{T as ce,a as de,b as B,c as A,d as me,e as P}from"./table-BqH1TAsn.js";import{a as ue}from"./BorderStyle-66LuUJot.js";import{S as he}from"./simple-grid-CyZDy2Fv.js";import{a as xe,L as be}from"./link-box-DcUyRFYn.js";import"./ProjectTemplateCardLayer-dSgMlunz.js";import"./IconButtonWithTooltip-BidBKNAt.js";import"./xlsx-Dxpd-3wM.js";import"./grid-DsfbS9aq.js";try{let r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new r.Error().stack;s&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[s]="853609fc-22c9-4d98-853d-a7d31966c222",r._sentryDebugIdIdentifier="sentry-dbid-853609fc-22c9-4d98-853d-a7d31966c222")}catch{}const pe=({projectTemplate:r,trigger:s})=>{const m=F(),{data:u}=E(),{downloadProjectTemplateExcel:a,isDownloading:c}=re(),{subject:i,schema_info:h}=r,g=u==null?void 0:u.subject_category_ids.includes(i.subject_category.id);return e.jsx(V,{"aria-label":`íê°ê³í : ${r.title}`,size:"cover",trigger:s,modalContentProps:{height:"fit-content",maxH:"calc(100dvh - 5rem)",overflow:"hidden"},modalBodyProps:{padding:0,bg:"bg.emphasized",minH:0,py:4,px:6},footer:e.jsxs(q,{columnGap:3,flexShrink:0,children:[e.jsx(S,{variant:"outline",onClick:()=>s.onClose(),children:"ë«ê¸°"}),e.jsx(S,{asChild:!0,onClick:()=>z.create({title:"íê°ê³íì ë³µì¬íì´ì. ì´ì´ì ìì
í´ ë³´ì¸ì.",type:"success"}),children:e.jsxs(Q,{to:`/teachers/project-templates/create?base=${r.key}`,state:{from:m.pathname},children:[e.jsx(L,{as:K}),"íê°ê³í ë³µì¬"]})},"copy")]}),header:e.jsxs(l,{textStyle:"t4-semibold-compact",lineClamp:1,children:["íê°ê³í : ",r.title]}),children:e.jsxs(p,{py:10,px:7,bg:"white",rowGap:4,alignItems:"stretch",boxShadow:"lg",children:[e.jsxs(n,{w:"full",justify:"space-between",alignItems:{base:"center",md:"flex-start"},children:[e.jsxs(n,{columnGap:3,children:[e.jsxs(l,{textStyle:"b1-medium-compact",color:"fg.muted",whiteSpace:"nowrap",children:[i.subject_category.curriculum," ê°ì êµì¡ê³¼ì "]}),e.jsx(C,{orientation:"vertical",h:3,borderColor:"border.emphasized"}),e.jsx(l,{truncate:!0,textStyle:"b1-medium-compact",color:"fg.muted",maxW:"120px",children:i.title})]}),e.jsxs(S,{variant:"surface",colorPalette:"green",loading:c,onClick:()=>a({projectTemplate:r}),children:[e.jsx(L,{as:W}),"ìì
ë¤ì´ë¡ë"]},"download")]}),e.jsxs(p,{rowGap:3,alignItems:"stretch",children:[e.jsx(l,{textStyle:"t1-semibold",children:r.title}),e.jsx(l,{textStyle:"b1-regular",children:r.description||"-"})]}),!g&&e.jsx(je,{}),e.jsx(C,{my:2}),e.jsxs(p,{as:"section","aria-label":"ì±ì·¨ê¸°ì¤",alignItems:"stretch",rowGap:4,children:[e.jsx(M,{count:h.tables.length,children:"ì±ì·¨ê¸°ì¤"}),h.tables.length>0?h.tables.map((o,x)=>e.jsx(R,{label:`ì±ì·¨ê¸°ì¤ ${x+1}`,levelHeader:"ìì¤",title:le(o.achievement_standard_item),rows:o.grades.map(b=>({level:b.achievement_level,description:b.text}))},`${o.achievement_standard_item.code}-${x}`)):e.jsx(l,{color:"fg.muted",textStyle:"b2-regular",children:"ë±ë¡ë ì±ì·¨ê¸°ì¤ì´ ììµëë¤."})]}),e.jsx(C,{my:2}),e.jsxs(p,{as:"section","aria-label":"ì±ì 기ì¤",align:"stretch",rowGap:4,children:[e.jsx(M,{count:h.elements.length,children:"ì±ì 기ì¤"}),h.elements.length>0?h.elements.map((o,x)=>e.jsx(R,{label:`ì±ì ê¸°ì¤ ${x+1}`,levelHeader:"ê¸ê°",title:o.title,rows:o.levels.map(b=>({level:b.value,description:b.description}))},`${o.key??o.title}-${x}`)):e.jsx(l,{color:"fg.muted",textStyle:"b2-regular",children:"ë±ë¡ë ì±ì 기ì¤ì´ ììµëë¤."})]})]})})},M=({children:r,count:s})=>e.jsxs(n,{gap:1,children:[e.jsx(l,{textStyle:"b1-semibold-compact",children:r}),e.jsxs(l,{textStyle:"b1-semibold-compact",children:["(",s,")"]})]}),R=({label:r,levelHeader:s,title:m,rows:u})=>{const a=u.length>0?u:[{level:"-",description:"-"}];return e.jsx(O,{width:"100%",p:"1px",children:e.jsxs(ce,{showColumnBorder:!0,"aria-label":r,width:"100%",tableLayout:"fixed",borderRadius:"lg",variant:"outline",children:[e.jsx(de,{children:e.jsxs(B,{children:[e.jsx(A,{width:{base:"30%",md:"210px"},children:r}),e.jsx(A,{width:"68px",children:s}),e.jsx(A,{children:"ì¸ë¶ 기ì¤"})]})}),e.jsx(me,{children:a.map((c,i)=>e.jsxs(B,{children:[i===0&&e.jsx(P,{rowSpan:a.length,maxWidth:"none",wordBreak:"break-word",verticalAlign:"middle",whiteSpace:"pre-wrap",overflow:"visible",textAlign:"left",children:m||"-"}),e.jsx(P,{maxWidth:"none",verticalAlign:"middle",whiteSpace:"normal",overflow:"visible",textAlign:"center",wordBreak:"break-word",children:c.level}),e.jsx(P,{maxWidth:"none",verticalAlign:"middle",whiteSpace:"pre-wrap",overflow:"visible",textAlign:"left",wordBreak:"break-word",children:c.description||"-"})]},`${String(c.level)}-${i}`))})]})})},je=()=>e.jsxs(se,{px:4,py:3,bg:"bg.info",borderRadius:"lg",borderWidth:"1px",borderColor:"blue.muted",children:[e.jsx(ie,{boxSize:4.5}),e.jsx(oe,{children:e.jsx(ne,{textStyle:"b2-medium",children:"ë¤ë¥¸ êµê³¼ì 과목ì´ë©´ ì±ì·¨ê¸°ì¤ì ë³µì¬ëì§ ììì. ì±ì 기ì¤ë§ ë³µì¬ë¼ì."})})]}),$e=()=>{const r=X(),s=J(),[m,u]=y.useState(),[a,c]=y.useState({curriculum:"2015",subjectCategory:"",subjectTitle:"",achievementStandardItemCode:null}),{data:i}=T(f.subjects.list),h=y.useMemo(()=>i===void 0?[]:i.filter(t=>t.subject_category.curriculum===a.curriculum),[i,a.curriculum]),{data:g,isFetched:o}=T({...f.subjects.achievementStandards({curriculum:a.curriculum??"2015",category:a.subjectCategory??"",title:a.subjectTitle??""}),enabled:!!(a.curriculum&&a.subjectCategory&&a.subjectTitle),retry:!1}),x=y.useMemo(()=>g===void 0?new Map:g.reduce((t,d)=>{const v=d.achievement_standard_items.reduce((D,$)=>D.set($.code,$),new Map);return new Map([...Array.from(t.entries()),...Array.from(v.entries())])},new Map),[g]),b=Array.from(x).map(([t,d])=>d).sort((t,d)=>t.code<d.code?-1:1).map(t=>({value:t.code,label:`[${t.code}] ${t.title}`})),{data:j}=T(f.projectTemplates.list({mode:"school",...a})),w=()=>{r.resetQueries({queryKey:f.subjects.achievementStandards._def})},H=t=>{c(d=>({...d,achievementStandardItemCode:t??null})),w()};return e.jsxs(p,{height:"100%",children:[e.jsx(te,{title:"íê°ê³í ìë£ì¤",description:"ì°ë¦¬ íêµ ë¤ë¥¸ ì ìëë¤ì íê°ê³íì ì°¸ê³ í ì ììµëë¤. íê°ê³íì ì¸ì°ë ë° íìí ì°¸ê³ ìë£ë¤ë í¨ê» íì¸í´ ë³´ì¸ì."}),e.jsx(n,{width:"100%",justify:"space-between",children:e.jsx(l,{textStyle:"t3-semibold-compact",children:"ì°ë¦¬ íêµ íê°ê³í"})}),e.jsxs(n,{width:"100%",gap:"1rem",children:[e.jsxs(k,{as:n,width:"fit-content",children:[e.jsx(_,{asChild:!0,children:e.jsx(l,{textStyle:"b1-medium-compact",width:"4rem",m:0,children:"êµì¡ê³¼ì "})}),e.jsx(I,{width:"10rem",my:0,rounded:"lg",backgroundColor:"white",value:[a.curriculum??"2015"],items:[{value:"2015",label:"2015"},{value:"2022",label:"2022"}],onValueChange:t=>{c({curriculum:t.value[0],subjectCategory:"",subjectTitle:"",achievementStandardItemCode:null}),w()}})]}),e.jsxs(k,{as:n,width:"fit-content",children:[e.jsx(_,{asChild:!0,children:e.jsx(l,{textStyle:"b1-medium-compact",width:"2rem",m:0,children:"과목"})}),e.jsx(I,{width:"10rem",my:0,rounded:"lg",backgroundColor:"white",value:a.subjectTitle?[`${a.subjectCategory}#${a.subjectTitle}`]:[""],items:[{value:"",label:"ì ì²´ì í"},...h.map(t=>({value:`${t.subject_category.category}#${t.title}`,label:t.title}))],onValueChange:t=>{const[d,v]=t.value[0].split("#");c({...a,subjectCategory:d,subjectTitle:v,achievementStandardItemCode:null}),w()}})]}),e.jsxs(k,{as:n,children:[e.jsx(_,{asChild:!0,children:e.jsx(l,{textStyle:"b1-medium-compact",width:"4.5rem",m:0,children:"ì±ì·¨ê¸°ì¤"})}),e.jsx(I,{my:0,backgroundColor:"white",disabled:!o,items:b,emptyContent:"ì í ê°ë¥í ì±ì·¨ê¸°ì¤ì´ ììµëë¤.",triggerProps:{clearable:!0},value:a.achievementStandardItemCode?[a.achievementStandardItemCode]:[],valueTextProps:{placeholder:a.subjectTitle?"ì±ì·¨ê¸°ì¤ì ì íí´ ì£¼ì¸ì.":"과목ì ì íí´ ì£¼ì¸ì."},onValueChange:t=>H(t.value[0])})]})]}),(j===void 0||j.length===0)&&e.jsx(N,{flexGrow:1,height:"100%",children:e.jsx(l,{textStyle:"b1-medium-compact",children:"ë±ë¡ë íê°ê³íì´ ììµëë¤."})}),j&&j.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs(l,{alignSelf:"start",textStyle:"b3-medium-compact",children:[j.length,"ê°ì íê°ê³íì´ ììµëë¤."]}),e.jsx(he,{width:"100%",gridRowGap:"1.25rem",gridColumnGap:"1.25rem",pb:{base:"1.25rem",md:0},templateColumns:{base:"repeat(auto-fill, 1fr)",md:"repeat(auto-fill, minmax(25rem, 1fr))"},children:j.map(t=>e.jsx(ae,{projectTemplate:t,isLibraryCard:!0,onClick:()=>{u(t),s.onOpen()}},t.key))})]}),e.jsx(U,{}),m&&e.jsx(pe,{projectTemplate:m,trigger:s}),e.jsxs(p,{width:"100%",mb:"1.5rem",children:[e.jsx(l,{textStyle:"t3-semibold-compact",alignSelf:"start",children:"íê°ê³í ì°¸ê³ ìë£"}),e.jsxs(n,{width:"100%",gap:"1.25rem",children:[e.jsx(G,{title:"ë¤ë¥¸ íêµ íê°ê³í ì°¾ì보기",href:"https://www.schoolinfo.go.kr/ei/ss/pneiss_a03_s0.do",badgeText:"êµì¡ë¶ íêµì리미"}),e.jsx(G,{title:"íê° ë구 ìì ì°¾ì보기",href:"https://stas.moe.go.kr/cmn/main",badgeText:"êµì¡ë¶ íìíê°ì§ìí¬í¸"})]})]})]})},G=({title:r,href:s,badgeText:m})=>e.jsxs(p,{as:xe,width:"100%",px:"1.25rem",py:"1.25rem",borderRadius:"0.5rem",border:"1px solid",borderColor:"gray.200",backgroundColor:"white",...ue,children:[e.jsx(n,{width:"100%",children:e.jsx(be,{asChild:!0,width:"100%",_hover:{textDecoration:"none"},children:e.jsx(Y,{href:s,target:"_blank",rel:"noopener noreferrer",children:e.jsx(Z,{textStyle:"t4-semibold-compact",lineClamp:1,color:"black.600",textAlign:"center",w:"full",children:r})})})}),e.jsx(ee,{colorPalette:"blue",children:m})]});
1export{$e as default}; 2//# sourceMappingURL=ProjectTemplateLibraryListPage-Bp-a9saP.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.