=100&&e.score<=s.max));if(t&&t.gp!=null){if(t.gpTop!=null){const s=t.max>=100?t.max:t.max-1,l=(t.gpTop-t.gp)/Math.max(1,s-t.min);return N(t.gp+(e.score-t.min)*l)}return t.gp}}return null},B=e=>m?m[e.category??"其他"]??m.其他??1:1,T=O.map(e=>({...e,grade_point:Q(e)})).filter(e=>e.grade_point!=null&&e.credit>0);if(T.length){const e=T.reduce((t,s)=>t+s.credit,0);M=N(T.reduce((t,s)=>t+s.grade_point*B(s)*s.credit,0)/e)}const P=M!=null?Math.min(N(M*n.gpaFactor),60):0;b.push(I("academic","学业成绩",60,[{itemKey:"gpa",title:"平均学分绩点 "+(M!=null?M.toFixed(2):"—")+" × 10",source:"成绩模块 · "+O.length+" 门课程",score:P,note:M==null?"该学期暂无课程成绩":void 0}]));const r=O.filter(e=>/体育/.test(e.course_name)),i=N(r.reduce((e,t)=>e+(t.score??0),0)*n.sportsFactor),d=[];r.length&&d.push({itemKey:"sports",title:"体育成绩("+r.length+" 学期体育课)",source:"体育课成绩之和 × "+n.sportsFactor,score:Math.min(i,5)});const v=[];for(const e of y.filter(t=>t.type_name==="文体活动")){const t=re(n,q(e.level),ne(e.award_grade));t==null&&!((V=x("w"+e.id))!=null&&V.score)||v.push(C("w"+e.id,e.title,e.type_name+" · "+(e.level??"")+" "+(e.award_grade??""),t,void 0,e.id))}const F=N(Math.min(v.reduce((e,t)=>e+t.score,0),5));b.push(I("sports","文体素质",10,[...d,{itemKey:"wcap",title:"文体类加分(上限 5 分)",source:v.length+" 条记录",score:F,note:v.map(e=>e.title+" "+e.score+"分").join(";")||"无匹配记录"}]));const E=[];for(const e of y.filter(t=>t.type_name==="竞赛"||t.type_name==="科研")){const t=re(n,q(e.level),ne(e.award_grade));t==null&&!((X=x("c"+e.id))!=null&&X.score)||E.push(C("c"+e.id,e.title,e.type_name+" · "+(e.level??"")+" "+(e.award_grade??""),t,void 0,e.id))}const W=N(Math.min(E.reduce((e,t)=>e+t.score,0),10)),S=[];for(const e of y.filter(t=>t.type_name==="学生工作")){const t=q(e.level)??"院级",s=(e.role??"")+" "+e.title,l=n.table4[t==="国家级"||t==="省市级"||t==="区县级"?"校级":t]??n.table4.院级;let _=null;for(const[z,w]of Object.entries(l))if(s.includes(z)){_=w;break}_==null&&!((ee=x("k"+e.id))!=null&&ee.score)||S.push(C("k"+e.id,e.title,"学生工作 · "+(e.level??"院级")+" "+(e.role??""),_,_==null?"请手动填写分值":void 0,e.id))}const oe=N(Math.min(S.reduce((e,t)=>e+t.score,0),4)),Z=[];for(const e of y.filter(t=>t.type_name==="志愿公益")){const t=q(e.level),s=/献血/.test(e.title);let l=s?n.publicGood.无偿献血:t?n.publicGood[t]??null:null;l==null&&!((te=x("g"+e.id))!=null&&te.score)||Z.push(C("g"+e.id,e.title,"公益 · "+(s?"无偿献血":e.level??"校级"),l,void 0,e.id))}const ae=N(Math.min(Z.reduce((e,t)=>e+t.score,0),3));b.push(I("expand","拓展性素质",17,[{itemKey:"ccap",title:"竞赛获奖(上限 10 分)",source:E.length+" 条记录",score:W,note:E.map(e=>e.title+" "+e.score+"分").join(";")||"无匹配记录"},{itemKey:"kcap",title:"担任学生工作(上限 4 分)",source:S.length+" 条记录",score:oe,note:S.map(e=>e.title+" "+e.score+"分").join(";")||"无匹配记录"},{itemKey:"gcap",title:"公益活动(上限 3 分)",source:Z.length+" 条记录",score:ae,note:Z.map(e=>e.title+" "+e.score+"分").join(";")||"无匹配记录"}]));const H=[];for(const e of y.filter(t=>t.type_name==="荣誉惩处"||t.type_name==="证书技能")){const t=x("h"+e.id),s=e.title+" "+(e.award_grade??"");if(/综合测评奖学金/.test(s))continue;let l=null,_=e.type_name;if(/留校察看/.test(s))l=-n.penalties.留校察看;else if(/记过/.test(s))l=-n.penalties.记过;else if(/严重警告/.test(s))l=-n.penalties.严重警告;else if(/警告/.test(s))l=-n.penalties.警告;else if(/通报批评/.test(s))l=-n.penalties.通报批评;else if(/六级|专八/.test(s))l=n.rewards.英语等级.六级;else if(/四级|专四/.test(s))l=n.rewards.英语等级.四级;else if(/三级/.test(s)&&/英语/.test(s))l=n.rewards.英语等级.三级;else if(/计算机/.test(s)&&/三级/.test(s))l=n.rewards.计算机等级.三级;else if(/计算机/.test(s)&&/二级/.test(s))l=n.rewards.计算机等级.二级;else if(/计算机/.test(s)&&/一级/.test(s))l=n.rewards.计算机等级.一级;else if(/高级/.test(s))l=n.rewards.职业资格.高级;else if(/中级/.test(s))l=n.rewards.职业资格.中级;else if(/初级/.test(s))l=n.rewards.职业资格.初级;else if(/从业|资格证|教师资格|普通话|驾驶证|软考/.test(s))l=n.rewards.职业资格.从业资格;else{const z=q(e.level),w=z==="省市级"?"市级":z==="区县级"?"区级":z==="二级学院"?"院级":z;w&&n.rewards.荣誉称号[w]!=null&&(l=n.rewards.荣誉称号[w],_="荣誉 · "+w)}l==null&&!(t!=null&&t.score)||H.push(C("h"+e.id,e.title,_,l,void 0,e.id))}const ie=N(Math.max(Math.min(H.reduce((e,t)=>e+t.score,0),5),-5));b.push(I("rewards","奖惩分",5,[{itemKey:"hcap",title:"奖惩合计(±5 分)",source:H.length+" 条记录",score:ie,note:H.map(e=>e.title+" "+e.score+"分").join(";")||"无匹配记录"}]));for(const e of p.manual??[]){const t=b.find(s=>s.label===e.section)??b[b.length-1];t.items.push({itemKey:"m"+e.title+e.score,title:e.title,source:"手动添加",score:e.score}),t.subtotal=N(t.items.reduce((s,l)=>s+l.score,0))}const le=N(b.reduce((e,t)=>{const s=t.key==="rewards"?t.subtotal:Math.min(t.subtotal,t.cap);return e+s},0));return{sections:b,total:le,gpa:M}}function k(c){return String(c??"").replace(/&/g,"&").replace(//g,">")}function _e(c,a){var u;const f="----=_fp_zongce",h=[];h.push("--"+f+`\r
Content-Type: text/html; charset="utf-8"\r
Content-Transfer-Encoding: 8bit\r
\r
@@ -10,4 +10,4 @@ Content-Location: `+m.name+`\r
\r
`+p+`\r
`)}return h.push("--"+f+`--\r
-`),new Blob([h.join("")],{type:'multipart/related; type="text/html"; boundary="'+f+'"'})}function ke(c,a,f,h){const u=a.sections.map(p=>{const g=p.key==="rewards"?p.subtotal:Math.min(p.subtotal,p.cap),y=p.items.map(x=>'| '+k(x.title)+' | '+k(x.note||x.source)+' | '+k(x.score)+" |
").join("");return''+k(p.label)+"(上限 "+k(p.cap)+" 分,小计 "+k(g)+' 分)
"}).join(""),m=[],j=h.map(p=>{let g="";return p.images.forEach((y,x)=>{const C="ev"+p.recordId+"_"+x;m.push({name:C,dataUri:y}),g+='图 '+(x+1)+'
'}),''+k(p.title)+""+g+"
"}).join(""),n='综合素质测评学生综合素质测评
'+k(f.name??"")+" · "+k(f.className??"")+" · 统计周期:"+k(c)+'
综合素质总分:'+k(a.total)+" 分
"+u+(j?'附:证明材料
'+j:"")+'| 学生签名:______ | 辅导员签名:______ | 日期:______ |
';return _e(n,m)}function Ke(){var Q,B,T,P;const c=de(),a=Y({queryKey:["profile"],queryFn:xe}),f=Y({queryKey:["zc-records"],queryFn:()=>ge({page:1,page_size:500})}),h=Y({queryKey:["grades"],queryFn:be}),u=(Q=a.data)==null?void 0:Q.content,m={...(u==null?void 0:u.info)??{}},j=((B=u==null?void 0:u.zongce)==null?void 0:B.rules)??we,[n,p]=L.useState(""),[g,y]=L.useState({}),[x,C]=L.useState([]),[I,b]=L.useState(!1);L.useEffect(()=>{var i,d;if(!u)return;y(((i=u.zongce)==null?void 0:i.overrides)??{});const r=Array.from(new Set((((d=h.data)==null?void 0:d.semesters)??[]).map(v=>v.term.slice(0,7))));!n&&r.length&&p(r[0])},[u,h.data]);const U=((T=f.data)==null?void 0:T.items)??[],K=g[n]??{},R=L.useMemo(()=>{var r,i,d;return Ne({year:n||"all",records:U,semesters:((r=h.data)==null?void 0:r.semesters)??[],bands:(i=h.data)==null?void 0:i.bands,weights:(d=h.data)==null?void 0:d.weights,profile:m,rules:j,ov:K})},[U,h.data,m,j,K,n]),G=L.useMemo(()=>{const r=[];return R.sections.forEach(i=>i.items.forEach(d=>{d.fromRecord&&r.push(d.fromRecord)})),r},[R]);L.useEffect(()=>{let r=!0;return(async()=>{const i=[];for(const d of G){const v=U.find(F=>F.id===d);try{const F=await ue(d),E=[];for(const W of F.items.filter(S=>S.id).slice(0,3)){const S=await me(W.id);S.data_b64&&E.push("data:"+(W.mime==="image/jpeg"?"image/jpeg":"image/webp")+";base64,"+S.data_b64)}E.length&&i.push({recordId:d,title:(v==null?void 0:v.title)??"记录 "+d,images:E})}catch{}}r&&C(i)})(),()=>{r=!1}},[G.join(",")]);const A=r=>{y(i=>({...i,[n]:r})),se({info:m,zongce:{rules:j,overrides:{...g,[n]:r}}}).catch(i=>c("error",i.message))},O=n==="all"?"全部学年":J(n,m.eduStart),M=()=>{const r=ke(O,R,m,x),i=URL.createObjectURL(r),d=document.createElement("a");d.href=i,d.download="综合素质测评_"+O+".doc",d.click(),setTimeout(()=>URL.revokeObjectURL(i),6e4),c("success","综测材料已导出"+(x.length?"(含 "+x.length+" 条证明材料图片)":""))};return o.jsxs("div",{className:"mx-auto max-w-[1080px] px-3 py-4 sm:px-6 sm:py-5",children:[o.jsxs("div",{className:"no-print mb-4 flex flex-wrap items-center justify-between gap-2",children:[o.jsx("h2",{className:"text-[15px] font-semibold text-ink-1",children:"综合测评(按学年自动计算)"}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsx(pe,{className:"w-[190px]",value:n,onChange:r=>p(r.target.value),options:[...Array.from(new Set((((P=h.data)==null?void 0:P.semesters)??[]).map(r=>r.term.slice(0,7)))).map(r=>({value:r,label:J(r,m.eduStart)})),{value:"all",label:"全部学年"}]}),o.jsxs(D,{variant:"secondary",onClick:M,children:[o.jsx(fe,{size:13})," 导出材料"]}),o.jsxs(D,{variant:"secondary",onClick:()=>b(!0),children:[o.jsx(ye,{size:13})," 初始化"]}),o.jsxs(D,{variant:"primary",onClick:()=>window.print(),children:[o.jsx(ve,{size:13})," 打印"]})]})]}),o.jsxs("div",{className:"print-sheet mx-auto w-full max-w-[794px] rounded-lg border border-line bg-white p-5 shadow-card sm:p-8",children:[o.jsx("h1",{className:"text-center text-[18px] font-bold text-neutral-900",children:"学生综合素质测评"}),o.jsxs("div",{className:"mt-1 text-center text-[12px] text-neutral-500",children:[m.name??""," · ",m.className??""," · 统计周期:",O]}),o.jsxs("div",{className:"mt-5 rounded-md bg-neutral-100 px-4 py-2 text-center text-[15px] font-bold text-neutral-900",children:["综合素质总分:",o.jsx("span",{className:"num",children:R.total})," 分"]}),R.sections.map(r=>o.jsxs("div",{className:"mt-5",children:[o.jsxs("div",{className:"flex items-baseline justify-between border-b-2 border-neutral-800 pb-1",children:[o.jsxs("span",{className:"text-[13.5px] font-bold text-neutral-900",children:[r.label,"(上限 ",r.cap," 分)"]}),o.jsxs("span",{className:"num text-[12.5px] text-neutral-600",children:["小计 ",r.key==="rewards"?r.subtotal:Math.min(r.subtotal,r.cap)," 分"]})]}),o.jsxs("div",{className:"mt-2 flex flex-col gap-1.5",children:[r.items.map(i=>o.jsxs("div",{className:"flex items-center gap-2 text-[12.5px]",children:[o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:"text-neutral-900",children:i.title}),o.jsx("span",{className:"ml-2 text-[11px] text-neutral-400",children:i.source}),i.note&&o.jsx("div",{className:"text-[11px] text-neutral-400",children:i.note})]}),o.jsx("input",{type:"number",step:"0.1",className:"num w-[72px] rounded-sm border border-neutral-200 px-1 py-0.5 text-right text-[12px]",value:i.score,onChange:d=>{var v;if(i.itemKey==="conduct"||i.itemKey==="integrity")A({...K,[i.itemKey]:Number(d.target.value)});else{const F={...K.itemOverrides??{},[i.itemKey]:{...((v=K.itemOverrides)==null?void 0:v[i.itemKey])??{},score:Number(d.target.value)}};A({...K,itemOverrides:F})}}})]},i.itemKey)),!r.items.length&&o.jsx("div",{className:"text-[12px] text-neutral-400",children:"暂无数据"})]})]},r.key)),x.length>0&&o.jsxs("div",{className:"mt-6 border-t border-neutral-300 pt-4",children:[o.jsx("div",{className:"mb-3 text-[13.5px] font-bold text-neutral-900",children:"附:证明材料"}),x.map(r=>o.jsxs("div",{className:"mb-4",children:[o.jsx("div",{className:"text-[12px] font-semibold text-neutral-800",children:r.title}),o.jsx("div",{className:"mt-1.5 flex flex-wrap gap-3",children:r.images.map((i,d)=>o.jsx("img",{src:i,alt:"证明 "+(d+1),className:"max-h-[180px] rounded border border-neutral-200"},d))})]},r.recordId))]}),o.jsx("div",{className:"mt-6 border-t border-neutral-200 pt-3 text-[11px] leading-relaxed text-neutral-400",children:"计分依据:《计算机与网络安全学院学生综合素质测评评分细则》。自动匹配条目均可手动修正分值; 「恢复自动」清除本学年全部手动修正。导出材料前请核对每条加分记录与证明材料一致。"})]}),o.jsx(he,{open:I,onClose:()=>b(!1),width:440,title:"初始化综测",footer:o.jsxs(o.Fragment,{children:[o.jsx(D,{variant:"ghost",onClick:()=>b(!1),children:"取消"}),o.jsx(D,{variant:"primary",onClick:()=>{const r={...g};delete r[n],y(r),se({info:m,zongce:{rules:j,overrides:r}}).then(()=>{b(!1),c("success","已恢复自动计算")}).catch(i=>c("error",i.message))},children:"恢复自动计算"})]}),children:o.jsxs("div",{className:"text-[12.5px] leading-relaxed text-ink-2",children:["将清除 ",o.jsx("b",{children:n==="all"?"全部学年":J(n,m.eduStart)})," 的全部手动修正 (分值覆盖、操行/诚信分修改),恢复为按细则规则的自动计算结果。",o.jsx("div",{className:"mt-2 text-ink-3",children:"记录数据与个人信息不受影响。"})]})})]})}export{Ke as AssessmentPage};
+`),new Blob([h.join("")],{type:'multipart/related; type="text/html"; boundary="'+f+'"'})}function ke(c,a,f,h){const u=a.sections.map(p=>{const g=p.key==="rewards"?p.subtotal:Math.min(p.subtotal,p.cap),y=p.items.map(x=>'| '+k(x.title)+' | '+k(x.note||x.source)+' | '+k(x.score)+" |
").join("");return''+k(p.label)+"(上限 "+k(p.cap)+" 分,小计 "+k(g)+' 分)
"}).join(""),m=[],j=h.map(p=>{let g="";return p.images.forEach((y,x)=>{const C="ev"+p.recordId+"_"+x;m.push({name:C,dataUri:y}),g+='图 '+(x+1)+'
'}),''+k(p.title)+""+g+"
"}).join(""),n='综合素质测评学生综合素质测评
'+k(f.name??"")+" · "+k(f.className??"")+" · 统计周期:"+k(c)+'
综合素质总分:'+k(a.total)+" 分
"+u+(j?'附:证明材料
'+j:"")+'| 学生签名:______ | 辅导员签名:______ | 日期:______ |
';return _e(n,m)}function Ke(){var Q,B,T,P;const c=de(),a=Y({queryKey:["profile"],queryFn:xe}),f=Y({queryKey:["zc-records"],queryFn:()=>ge({page:1,page_size:500})}),h=Y({queryKey:["grades"],queryFn:be}),u=(Q=a.data)==null?void 0:Q.content,m={...(u==null?void 0:u.info)??{}},j=((B=u==null?void 0:u.zongce)==null?void 0:B.rules)??we,[n,p]=L.useState(""),[g,y]=L.useState({}),[x,C]=L.useState([]),[I,b]=L.useState(!1);L.useEffect(()=>{var i,d;if(!u)return;y(((i=u.zongce)==null?void 0:i.overrides)??{});const r=Array.from(new Set((((d=h.data)==null?void 0:d.semesters)??[]).map(v=>v.term.slice(0,7))));!n&&r.length&&p(r[0])},[u,h.data]);const U=((T=f.data)==null?void 0:T.items)??[],K=g[n]??{},R=L.useMemo(()=>{var r,i,d;return Ne({year:n||"all",records:U,semesters:((r=h.data)==null?void 0:r.semesters)??[],bands:(i=h.data)==null?void 0:i.bands,weights:(d=h.data)==null?void 0:d.weights,profile:m,rules:j,ov:K})},[U,h.data,m,j,K,n]),G=L.useMemo(()=>{const r=[];return R.sections.forEach(i=>i.items.forEach(d=>{d.fromRecord&&r.push(d.fromRecord)})),r},[R]);L.useEffect(()=>{let r=!0;return(async()=>{const i=[];for(const d of G){const v=U.find(F=>F.id===d);try{const F=await ue(d),E=[];for(const W of F.items.filter(S=>S.id).slice(0,3)){const S=await me(W.id);S.data_b64&&E.push("data:"+(W.mime==="image/jpeg"?"image/jpeg":"image/webp")+";base64,"+S.data_b64)}E.length&&i.push({recordId:d,title:(v==null?void 0:v.title)??"记录 "+d,images:E})}catch{}}r&&C(i)})(),()=>{r=!1}},[G.join(",")]);const A=r=>{y(i=>({...i,[n]:r})),se({info:m,zongce:{rules:j,overrides:{...g,[n]:r}}}).catch(i=>c("error",i.message))},O=n==="all"?"全部学年":J(n,m.eduStart),M=()=>{const r=ke(O,R,m,x),i=URL.createObjectURL(r),d=document.createElement("a");d.href=i,d.download="综合素质测评_"+O+".doc",d.click(),setTimeout(()=>URL.revokeObjectURL(i),6e4),c("success","综测材料已导出"+(x.length?"(含 "+x.length+" 条证明材料图片)":""))};return o.jsxs("div",{className:"mx-auto max-w-[1080px] px-3 py-4 sm:px-6 sm:py-5",children:[o.jsxs("div",{className:"no-print mb-4 flex flex-wrap items-center justify-between gap-2",children:[o.jsx("h2",{className:"text-[15px] font-semibold text-ink-1",children:"综合测评(按学年自动计算)"}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsx(pe,{className:"w-[190px]",value:n,onChange:r=>p(r.target.value),options:[...Array.from(new Set((((P=h.data)==null?void 0:P.semesters)??[]).map(r=>r.term.split("-").slice(0,2).join("-")))).map(r=>({value:r,label:J(r,m.eduStart)})),{value:"all",label:"全部学年"}]}),o.jsxs(D,{variant:"secondary",onClick:M,children:[o.jsx(fe,{size:13})," 导出材料"]}),o.jsxs(D,{variant:"secondary",onClick:()=>b(!0),children:[o.jsx(ye,{size:13})," 初始化"]}),o.jsxs(D,{variant:"primary",onClick:()=>window.print(),children:[o.jsx(ve,{size:13})," 打印"]})]})]}),o.jsxs("div",{className:"print-sheet mx-auto w-full max-w-[794px] rounded-lg border border-line bg-white p-5 shadow-card sm:p-8",children:[o.jsx("h1",{className:"text-center text-[18px] font-bold text-neutral-900",children:"学生综合素质测评"}),o.jsxs("div",{className:"mt-1 text-center text-[12px] text-neutral-500",children:[m.name??""," · ",m.className??""," · 统计周期:",O]}),o.jsxs("div",{className:"mt-5 rounded-md bg-neutral-100 px-4 py-2 text-center text-[15px] font-bold text-neutral-900",children:["综合素质总分:",o.jsx("span",{className:"num",children:R.total})," 分"]}),R.sections.map(r=>o.jsxs("div",{className:"mt-5",children:[o.jsxs("div",{className:"flex items-baseline justify-between border-b-2 border-neutral-800 pb-1",children:[o.jsxs("span",{className:"text-[13.5px] font-bold text-neutral-900",children:[r.label,"(上限 ",r.cap," 分)"]}),o.jsxs("span",{className:"num text-[12.5px] text-neutral-600",children:["小计 ",r.key==="rewards"?r.subtotal:Math.min(r.subtotal,r.cap)," 分"]})]}),o.jsxs("div",{className:"mt-2 flex flex-col gap-1.5",children:[r.items.map(i=>o.jsxs("div",{className:"flex items-center gap-2 text-[12.5px]",children:[o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:"text-neutral-900",children:i.title}),o.jsx("span",{className:"ml-2 text-[11px] text-neutral-400",children:i.source}),i.note&&o.jsx("div",{className:"text-[11px] text-neutral-400",children:i.note})]}),o.jsx("input",{type:"number",step:"0.1",className:"num w-[72px] rounded-sm border border-neutral-200 px-1 py-0.5 text-right text-[12px]",value:i.score,onChange:d=>{var v;if(i.itemKey==="conduct"||i.itemKey==="integrity")A({...K,[i.itemKey]:Number(d.target.value)});else{const F={...K.itemOverrides??{},[i.itemKey]:{...((v=K.itemOverrides)==null?void 0:v[i.itemKey])??{},score:Number(d.target.value)}};A({...K,itemOverrides:F})}}})]},i.itemKey)),!r.items.length&&o.jsx("div",{className:"text-[12px] text-neutral-400",children:"暂无数据"})]})]},r.key)),x.length>0&&o.jsxs("div",{className:"mt-6 border-t border-neutral-300 pt-4",children:[o.jsx("div",{className:"mb-3 text-[13.5px] font-bold text-neutral-900",children:"附:证明材料"}),x.map(r=>o.jsxs("div",{className:"mb-4",children:[o.jsx("div",{className:"text-[12px] font-semibold text-neutral-800",children:r.title}),o.jsx("div",{className:"mt-1.5 flex flex-wrap gap-3",children:r.images.map((i,d)=>o.jsx("img",{src:i,alt:"证明 "+(d+1),className:"max-h-[180px] rounded border border-neutral-200"},d))})]},r.recordId))]}),o.jsx("div",{className:"mt-6 border-t border-neutral-200 pt-3 text-[11px] leading-relaxed text-neutral-400",children:"计分依据:《计算机与网络安全学院学生综合素质测评评分细则》。自动匹配条目均可手动修正分值; 「恢复自动」清除本学年全部手动修正。导出材料前请核对每条加分记录与证明材料一致。"})]}),o.jsx(he,{open:I,onClose:()=>b(!1),width:440,title:"初始化综测",footer:o.jsxs(o.Fragment,{children:[o.jsx(D,{variant:"ghost",onClick:()=>b(!1),children:"取消"}),o.jsx(D,{variant:"primary",onClick:()=>{const r={...g};delete r[n],y(r),se({info:m,zongce:{rules:j,overrides:r}}).then(()=>{b(!1),c("success","已恢复自动计算")}).catch(i=>c("error",i.message))},children:"恢复自动计算"})]}),children:o.jsxs("div",{className:"text-[12.5px] leading-relaxed text-ink-2",children:["将清除 ",o.jsx("b",{children:n==="all"?"全部学年":J(n,m.eduStart)})," 的全部手动修正 (分值覆盖、操行/诚信分修改),恢复为按细则规则的自动计算结果。",o.jsx("div",{className:"mt-2 text-ink-3",children:"记录数据与个人信息不受影响。"})]})})]})}export{Ke as AssessmentPage};
diff --git a/sync-server/www/assets/DashboardPage-Cf6y5AYb.js b/sync-server/www/assets/DashboardPage-CTFfbcSG.js
similarity index 94%
rename from sync-server/www/assets/DashboardPage-Cf6y5AYb.js
rename to sync-server/www/assets/DashboardPage-CTFfbcSG.js
index 69a8604..80de938 100644
--- a/sync-server/www/assets/DashboardPage-Cf6y5AYb.js
+++ b/sync-server/www/assets/DashboardPage-CTFfbcSG.js
@@ -1 +1 @@
-import{r as g,f as v,j as t,S as j,t as S}from"./index-zXE6XEB1.js";import{C as c,a as d,b as x}from"./card-DF5JL5Kk.js";import{u as N,i as u,a as m}from"./useChart-VLUgJQ2-.js";import{u as k,i as w,a as C,b as L,c as R,d as $,e as z,f as T}from"./echarts-BIWefrIc.js";k([w,C,L,R,$,z,T]);function q(){const[l,n]=g.useState(""),i=N(),e=v({queryKey:["stats",l||void 0],queryFn:()=>S(l?Number(l):void 0)}).data,p=u("2"),r=u("3"),h=m(()=>({grid:{left:34,right:12,top:14,bottom:24},tooltip:{trigger:"axis"},xAxis:{type:"category",data:(e==null?void 0:e.monthly.map(a=>a.ym.slice(2)))??[],axisLine:{lineStyle:{color:r}},axisTick:{show:!1},axisLabel:{color:r,fontSize:10}},yAxis:{type:"value",splitLine:{lineStyle:{color:"rgba(128,138,155,0.15)"}},axisLabel:{color:r,fontSize:10}},series:[{type:"bar",data:(e==null?void 0:e.monthly.map(a=>a.count))??[],barMaxWidth:18,itemStyle:{color:"#3056d3",borderRadius:[3,3,0,0]}}]}),[e,i]),b=m(()=>{const a=((e==null?void 0:e.by_type)??[]).filter(s=>s.count>0);return{tooltip:{trigger:"item"},legend:{orient:"vertical",right:4,top:"middle",textStyle:{color:p,fontSize:11},itemWidth:10,itemHeight:10},series:[{type:"pie",radius:["48%","72%"],center:["34%","50%"],label:{show:!1},data:a.map(s=>({name:s.label,value:s.count,itemStyle:{color:s.color||"#64748b"}}))}]}},[e,i]),y=m(()=>{const a=((e==null?void 0:e.by_level)??[]).filter(s=>s.count>0).slice().reverse();return{grid:{left:64,right:24,top:8,bottom:22},tooltip:{trigger:"axis"},xAxis:{type:"value",splitLine:{lineStyle:{color:"rgba(128,138,155,0.15)"}},axisLabel:{color:r,fontSize:10}},yAxis:{type:"category",data:a.map(s=>s.label),axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:p,fontSize:11}},series:[{type:"bar",data:a.map(s=>({value:s.count,itemStyle:{color:s.color||"#3056d3",borderRadius:[0,3,3,0]}})),barMaxWidth:14}]}},[e,i]),f=((e==null?void 0:e.metrics)??[]).slice(0,3);return t.jsxs("div",{className:"mx-auto max-w-[1080px] px-3 py-4 sm:px-6 sm:py-5",children:[t.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex flex-wrap gap-3",children:[t.jsx(o,{label:"总记录",value:(e==null?void 0:e.total)??0}),t.jsx(o,{label:l?l+" 年新增":"本年新增",value:(e==null?void 0:e.total_this_year)??0}),t.jsx(o,{label:"附件总数",value:(e==null?void 0:e.attachment_total)??0}),f.map(a=>t.jsx(o,{label:a.label,value:a.value,unit:a.unit??""},a.key))]}),t.jsx(j,{className:"w-[120px]",value:l,onChange:a=>n(a.target.value),options:[{value:"",label:"全部年份"},...((e==null?void 0:e.years)??[]).map(a=>({value:String(a),label:a+" 年"}))]})]}),!(e!=null&&e.metrics.length)&&t.jsx("div",{className:"mb-4 rounded-md border border-dashed border-line px-4 py-2 text-[12px] text-ink-3",children:"提示:在「统计」配置中注册指标(如志愿时长、读书本数),带单位的数值字段即可在此量化展示。"}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[t.jsxs(c,{children:[t.jsx(d,{title:"近 12 个月活跃度"}),t.jsx(x,{children:t.jsx("div",{ref:h,className:"h-[220px]"})})]}),t.jsxs(c,{children:[t.jsx(d,{title:"类型分布"}),t.jsx(x,{children:t.jsx("div",{ref:b,className:"h-[220px]"})})]}),t.jsxs(c,{className:"lg:col-span-2",children:[t.jsx(d,{title:"级别分布"}),t.jsx(x,{children:t.jsx("div",{ref:y,className:"h-[200px]"})})]})]})]})}function o({label:l,value:n,unit:i}){return t.jsxs("div",{className:"min-w-[120px] rounded-lg border border-line bg-surface px-4 py-3 shadow-card",children:[t.jsx("div",{className:"text-[12px] text-ink-3",children:l}),t.jsxs("div",{className:"num mt-0.5 text-[22px] font-semibold leading-tight text-ink-1",children:[n,i&&t.jsx("span",{className:"ml-1 text-[12px] font-normal text-ink-3",children:i})]})]})}export{q as DashboardPage};
+import{r as g,f as v,j as t,S as j,t as S}from"./index-D-R037K4.js";import{C as c,a as d,b as x}from"./card-Br1zrGHT.js";import{u as N,i as u,a as m}from"./useChart-59NNyLSS.js";import{u as k,i as w,a as C,b as L,c as R,d as $,e as z,f as T}from"./echarts-BIWefrIc.js";k([w,C,L,R,$,z,T]);function q(){const[l,n]=g.useState(""),i=N(),e=v({queryKey:["stats",l||void 0],queryFn:()=>S(l?Number(l):void 0)}).data,p=u("2"),r=u("3"),h=m(()=>({grid:{left:34,right:12,top:14,bottom:24},tooltip:{trigger:"axis"},xAxis:{type:"category",data:(e==null?void 0:e.monthly.map(a=>a.ym.slice(2)))??[],axisLine:{lineStyle:{color:r}},axisTick:{show:!1},axisLabel:{color:r,fontSize:10}},yAxis:{type:"value",splitLine:{lineStyle:{color:"rgba(128,138,155,0.15)"}},axisLabel:{color:r,fontSize:10}},series:[{type:"bar",data:(e==null?void 0:e.monthly.map(a=>a.count))??[],barMaxWidth:18,itemStyle:{color:"#3056d3",borderRadius:[3,3,0,0]}}]}),[e,i]),b=m(()=>{const a=((e==null?void 0:e.by_type)??[]).filter(s=>s.count>0);return{tooltip:{trigger:"item"},legend:{orient:"vertical",right:4,top:"middle",textStyle:{color:p,fontSize:11},itemWidth:10,itemHeight:10},series:[{type:"pie",radius:["48%","72%"],center:["34%","50%"],label:{show:!1},data:a.map(s=>({name:s.label,value:s.count,itemStyle:{color:s.color||"#64748b"}}))}]}},[e,i]),y=m(()=>{const a=((e==null?void 0:e.by_level)??[]).filter(s=>s.count>0).slice().reverse();return{grid:{left:64,right:24,top:8,bottom:22},tooltip:{trigger:"axis"},xAxis:{type:"value",splitLine:{lineStyle:{color:"rgba(128,138,155,0.15)"}},axisLabel:{color:r,fontSize:10}},yAxis:{type:"category",data:a.map(s=>s.label),axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:p,fontSize:11}},series:[{type:"bar",data:a.map(s=>({value:s.count,itemStyle:{color:s.color||"#3056d3",borderRadius:[0,3,3,0]}})),barMaxWidth:14}]}},[e,i]),f=((e==null?void 0:e.metrics)??[]).slice(0,3);return t.jsxs("div",{className:"mx-auto max-w-[1080px] px-3 py-4 sm:px-6 sm:py-5",children:[t.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex flex-wrap gap-3",children:[t.jsx(o,{label:"总记录",value:(e==null?void 0:e.total)??0}),t.jsx(o,{label:l?l+" 年新增":"本年新增",value:(e==null?void 0:e.total_this_year)??0}),t.jsx(o,{label:"附件总数",value:(e==null?void 0:e.attachment_total)??0}),f.map(a=>t.jsx(o,{label:a.label,value:a.value,unit:a.unit??""},a.key))]}),t.jsx(j,{className:"w-[120px]",value:l,onChange:a=>n(a.target.value),options:[{value:"",label:"全部年份"},...((e==null?void 0:e.years)??[]).map(a=>({value:String(a),label:a+" 年"}))]})]}),!(e!=null&&e.metrics.length)&&t.jsx("div",{className:"mb-4 rounded-md border border-dashed border-line px-4 py-2 text-[12px] text-ink-3",children:"提示:在「统计」配置中注册指标(如志愿时长、读书本数),带单位的数值字段即可在此量化展示。"}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[t.jsxs(c,{children:[t.jsx(d,{title:"近 12 个月活跃度"}),t.jsx(x,{children:t.jsx("div",{ref:h,className:"h-[220px]"})})]}),t.jsxs(c,{children:[t.jsx(d,{title:"类型分布"}),t.jsx(x,{children:t.jsx("div",{ref:b,className:"h-[220px]"})})]}),t.jsxs(c,{className:"lg:col-span-2",children:[t.jsx(d,{title:"级别分布"}),t.jsx(x,{children:t.jsx("div",{ref:y,className:"h-[200px]"})})]})]})]})}function o({label:l,value:n,unit:i}){return t.jsxs("div",{className:"min-w-[120px] rounded-lg border border-line bg-surface px-4 py-3 shadow-card",children:[t.jsx("div",{className:"text-[12px] text-ink-3",children:l}),t.jsxs("div",{className:"num mt-0.5 text-[22px] font-semibold leading-tight text-ink-1",children:[n,i&&t.jsx("span",{className:"ml-1 text-[12px] font-normal text-ink-3",children:i})]})]})}export{q as DashboardPage};
diff --git a/sync-server/www/assets/GradesPage-mGpFf5D_.js b/sync-server/www/assets/GradesPage-CGH6s4Qj.js
similarity index 99%
rename from sync-server/www/assets/GradesPage-mGpFf5D_.js
rename to sync-server/www/assets/GradesPage-CGH6s4Qj.js
index 5ce1e47..055d568 100644
--- a/sync-server/www/assets/GradesPage-mGpFf5D_.js
+++ b/sync-server/www/assets/GradesPage-CGH6s4Qj.js
@@ -1,4 +1,4 @@
-import{c as $,f as O,j as e,E as H,w as U,u as k,d as C,r as u,g as y,x as W,y as J,B as j,P as E,I as g,z as Y,C as A,A as V,D as B,F as X,m as S,l as Q,T as q,H as Z,J as z,K as M,S as T,M as D}from"./index-zXE6XEB1.js";import{C as w,a as G,b as F}from"./card-DF5JL5Kk.js";import{u as ee,i as K,a as P}from"./useChart-VLUgJQ2-.js";import{u as se,i as te,b as ae,a as re,c as ne,d as le,e as ie,f as oe}from"./echarts-BIWefrIc.js";/**
+import{c as $,f as O,j as e,E as H,w as U,u as k,d as C,r as u,g as y,x as W,y as J,B as j,P as E,I as g,z as Y,C as A,A as V,D as B,F as X,m as S,l as Q,T as q,H as Z,J as z,K as M,S as T,M as D}from"./index-D-R037K4.js";import{C as w,a as G,b as F}from"./card-Br1zrGHT.js";import{u as ee,i as K,a as P}from"./useChart-59NNyLSS.js";import{u as se,i as te,b as ae,a as re,c as ne,d as le,e as ie,f as oe}from"./echarts-BIWefrIc.js";/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
diff --git a/sync-server/www/assets/ProfilePage-qVI0OyG4.js b/sync-server/www/assets/ProfilePage-B_ccov-c.js
similarity index 99%
rename from sync-server/www/assets/ProfilePage-qVI0OyG4.js
rename to sync-server/www/assets/ProfilePage-B_ccov-c.js
index 6b3216d..27206f3 100644
--- a/sync-server/www/assets/ProfilePage-qVI0OyG4.js
+++ b/sync-server/www/assets/ProfilePage-B_ccov-c.js
@@ -1,4 +1,4 @@
-import{c as E,u as P,d as S,r as p,f as q,g as F,j as e,B as f,l as B,ac as L,H as z,J as k,S as M,I as Q,ad as _,ae as K,af as v,ag as T}from"./index-zXE6XEB1.js";/**
+import{c as E,u as P,d as S,r as p,f as q,g as F,j as e,B as f,l as B,ac as L,H as z,J as k,S as M,I as Q,ad as _,ae as K,af as v,ag as T}from"./index-D-R037K4.js";/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
diff --git a/sync-server/www/assets/RecordsPage-DBOIy5Dt.js b/sync-server/www/assets/RecordsPage-BilD6G_8.js
similarity index 99%
rename from sync-server/www/assets/RecordsPage-DBOIy5Dt.js
rename to sync-server/www/assets/RecordsPage-BilD6G_8.js
index c484efe..02daad4 100644
--- a/sync-server/www/assets/RecordsPage-DBOIy5Dt.js
+++ b/sync-server/www/assets/RecordsPage-BilD6G_8.js
@@ -1,4 +1,4 @@
-import{c as fe,j as e,a as N,r as s,b as he,u as ve,d as ge,e as je,f as L,g as ye,I as be,S as k,B as w,P as Q,h as te,L as se,G as ae,R as Ne,i as ne,k as ke,l as we,T as Ce,E as le,m as Ee,n as Se,o as _e,C as ze,p as qe,q as Le,s as Re,t as De,v as Ie}from"./index-zXE6XEB1.js";/**
+import{c as fe,j as e,a as N,r as s,b as he,u as ve,d as ge,e as je,f as L,g as ye,I as be,S as k,B as w,P as Q,h as te,L as se,G as ae,R as Ne,i as ne,k as ke,l as we,T as Ce,E as le,m as Ee,n as Se,o as _e,C as ze,p as qe,q as Le,s as Re,t as De,v as Ie}from"./index-D-R037K4.js";/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
diff --git a/sync-server/www/assets/ResumePage-q1_lGC_L.js b/sync-server/www/assets/ResumePage-CDZ54fmp.js
similarity index 99%
rename from sync-server/www/assets/ResumePage-q1_lGC_L.js
rename to sync-server/www/assets/ResumePage-CDZ54fmp.js
index b3ee853..e529646 100644
--- a/sync-server/www/assets/ResumePage-q1_lGC_L.js
+++ b/sync-server/www/assets/ResumePage-CDZ54fmp.js
@@ -1,4 +1,4 @@
-import{c as D,d as ve,f as te,r as E,j as e,B as R,ah as Ne,af as L,J as A,S as se,ad as ce,P as q,H as we,a9 as Ce,T as ne,I as W,ag as Se,v as _e}from"./index-zXE6XEB1.js";import{C as ie,a as ae,b as re}from"./card-DF5JL5Kk.js";import{R as le,P as ze}from"./rotate-ccw-Ck6NqXrk.js";/**
+import{c as D,d as ve,f as te,r as E,j as e,B as R,ah as Ne,af as L,J as A,S as se,ad as ce,P as q,H as we,a9 as Ce,T as ne,I as W,ag as Se,v as _e}from"./index-D-R037K4.js";import{C as ie,a as ae,b as re}from"./card-Br1zrGHT.js";import{R as le,P as ze}from"./rotate-ccw-D_RZxoBX.js";/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
diff --git a/sync-server/www/assets/TaxonomyPage-CdYiqX0H.js b/sync-server/www/assets/TaxonomyPage-DltVJTdo.js
similarity index 97%
rename from sync-server/www/assets/TaxonomyPage-CdYiqX0H.js
rename to sync-server/www/assets/TaxonomyPage-DltVJTdo.js
index 60435d5..6142e78 100644
--- a/sync-server/www/assets/TaxonomyPage-CdYiqX0H.js
+++ b/sync-server/www/assets/TaxonomyPage-DltVJTdo.js
@@ -1 +1 @@
-import{j as e,u as k,d as q,f as z,r as g,g as h,W as F,X as w,B as j,T as D,I as Q,P as T,C as E,Y as M,Z as B,s as P,_ as I}from"./index-zXE6XEB1.js";import{C as K,a as S}from"./card-DF5JL5Kk.js";const f=["#3056d3","#7c3aed","#0891b2","#16a34a","#d97706","#dc2626","#db2777","#64748b"];function A(){return e.jsxs("div",{className:"mx-auto max-w-[1080px] px-3 py-4 sm:px-6 sm:py-5",children:[e.jsx("p",{className:"mb-4 text-[12px] text-ink-3",children:"字典驱动录入表单中的下拉选项;维度是自定义的成长分类轴,一条记录可挂多个维度。"}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[e.jsx(C,{kind:"level",title:"级别字典",description:"国际级、国家级、省市级等,可按学校口径增改"}),e.jsx(C,{kind:"role",title:"角色字典",description:"主导、核心、参加等参与角色"}),e.jsx(O,{})]})]})}function C({kind:r,title:x,description:N}){var v;const l=k(),o=q(),n=(((v=z({queryKey:["taxonomy-all"],queryFn:()=>P()}).data)==null?void 0:v.items)??[]).filter(s=>s.kind===r).sort((s,m)=>s.sort-m.sort),[a,c]=g.useState(""),[u,d]=g.useState(null),t=h({mutationFn:F,onSuccess:()=>void l.invalidateQueries({queryKey:["taxonomy-all"]})}),i=h({mutationFn:s=>w(s),onSuccess:()=>{l.invalidateQueries({queryKey:["taxonomy-all"]}),o("success","已删除"),d(null)},onError:s=>{o("error",s.message),d(null)}});return e.jsxs(K,{children:[e.jsx(S,{title:x,extra:e.jsx("span",{className:"text-[11px] text-ink-3",children:N})}),e.jsxs("div",{className:"flex flex-col gap-1 p-3",children:[n.map((s,m)=>e.jsxs("div",{className:"flex items-center gap-2 rounded-md px-1 py-1 hover:bg-surface-2",children:[e.jsx("input",{type:"color",value:s.color??f[m%f.length],className:"size-5 cursor-pointer rounded border border-line bg-surface",onChange:y=>t.mutate({id:s.id,kind:r,value:s.value,color:y.target.value,sort:s.sort})}),e.jsx("input",{className:"h-7 flex-1 rounded border border-transparent bg-transparent px-1.5 text-[13px] text-ink-1 hover:border-line focus:border-brand focus:outline-none",value:s.value,onChange:()=>{},onBlur:y=>{const b=y.target.value.trim();b&&b!==s.value&&t.mutate({id:s.id,kind:r,value:b,color:s.color,sort:s.sort})},defaultValue:s.value},s.value),e.jsxs("span",{className:"num w-14 text-right text-[11px] text-ink-3",children:["#",s.sort]}),s.is_builtin?e.jsx("span",{className:"w-7 text-center text-[11px] text-ink-3",children:"内置"}):e.jsx(j,{variant:"ghost",size:"icon-sm","aria-label":"删除",onClick:()=>d({id:s.id,value:s.value}),children:e.jsx(D,{size:13})})]},s.id)),e.jsxs("div",{className:"mt-1 flex items-center gap-2 border-t border-line pt-2",children:[e.jsx(Q,{className:"flex-1",placeholder:"新增条目,回车或点击按钮",value:a,onChange:s=>c(s.target.value),onKeyDown:s=>{var m;s.key==="Enter"&&a.trim()&&(t.mutate({kind:r,value:a.trim(),sort:(((m=n.at(-1))==null?void 0:m.sort)??0)+10}),c(""))}}),e.jsxs(j,{size:"sm",variant:"secondary",disabled:!a.trim(),onClick:()=>{var s;t.mutate({kind:r,value:a.trim(),sort:(((s=n.at(-1))==null?void 0:s.sort)??0)+10}),c("")},children:[e.jsx(T,{size:13})," 添加"]})]})]}),e.jsx(E,{open:!!u,title:"删除字典条目",content:u?"确定删除「"+u.value+"」吗?":"",onCancel:()=>d(null),onOk:()=>u&&i.mutate(u.id)})]})}function O(){var d;const r=k(),x=q(),l=[...((d=z({queryKey:["dimensions"],queryFn:I}).data)==null?void 0:d.items)??[]].sort((t,i)=>t.sort-i.sort),[o,p]=g.useState(""),[n,a]=g.useState(null),c=h({mutationFn:M,onSuccess:()=>void r.invalidateQueries({queryKey:["dimensions"]})}),u=h({mutationFn:t=>B(t),onSuccess:()=>{r.invalidateQueries({queryKey:["dimensions"]}),x("success","已删除"),a(null)},onError:t=>{x("error",t.message),a(null)}});return e.jsxs(K,{children:[e.jsx(S,{title:"成长维度",extra:e.jsx("span",{className:"text-[11px] text-ink-3",children:"如:学业深造 / 职业发展 / 兴趣生活"})}),e.jsxs("div",{className:"flex flex-col gap-1 p-3",children:[l.map((t,i)=>e.jsxs("div",{className:"flex items-center gap-2 rounded-md px-1 py-1 hover:bg-surface-2",children:[e.jsx("span",{className:"size-3 rounded-full",style:{backgroundColor:t.color??f[i%f.length]}}),e.jsx("input",{className:"h-7 flex-1 rounded border border-transparent bg-transparent px-1.5 text-[13px] text-ink-1 hover:border-line focus:border-brand focus:outline-none",defaultValue:t.name,onBlur:v=>{const s=v.target.value.trim();s&&s!==t.name&&c.mutate({id:t.id,name:s,color:t.color,sort:t.sort})}},t.name),e.jsx(j,{variant:"ghost",size:"icon-sm","aria-label":"删除",onClick:()=>a({id:t.id,name:t.name}),children:e.jsx(D,{size:13})})]},t.id)),!l.length&&e.jsx("div",{className:"py-2 text-center text-[12px] text-ink-3",children:"尚未配置维度"}),e.jsxs("div",{className:"mt-1 flex items-center gap-2 border-t border-line pt-2",children:[e.jsx(Q,{className:"flex-1",placeholder:"新增维度名称",value:o,onChange:t=>p(t.target.value),onKeyDown:t=>{var i;t.key==="Enter"&&o.trim()&&(c.mutate({name:o.trim(),sort:(((i=l.at(-1))==null?void 0:i.sort)??0)+10}),p(""))}}),e.jsxs(j,{size:"sm",variant:"secondary",disabled:!o.trim(),onClick:()=>{var t;c.mutate({name:o.trim(),sort:(((t=l.at(-1))==null?void 0:t.sort)??0)+10}),p("")},children:[e.jsx(T,{size:13})," 添加"]})]})]}),e.jsx(E,{open:!!n,title:"删除维度",content:n?"确定删除「"+n.name+"」吗?记录与该维度的关联将一并移除。":"",onCancel:()=>a(null),onOk:()=>n&&u.mutate(n.id)})]})}export{A as TaxonomyPage};
+import{j as e,u as k,d as q,f as z,r as g,g as h,W as F,X as w,B as j,T as D,I as Q,P as T,C as E,Y as M,Z as B,s as P,_ as I}from"./index-D-R037K4.js";import{C as K,a as S}from"./card-Br1zrGHT.js";const f=["#3056d3","#7c3aed","#0891b2","#16a34a","#d97706","#dc2626","#db2777","#64748b"];function A(){return e.jsxs("div",{className:"mx-auto max-w-[1080px] px-3 py-4 sm:px-6 sm:py-5",children:[e.jsx("p",{className:"mb-4 text-[12px] text-ink-3",children:"字典驱动录入表单中的下拉选项;维度是自定义的成长分类轴,一条记录可挂多个维度。"}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[e.jsx(C,{kind:"level",title:"级别字典",description:"国际级、国家级、省市级等,可按学校口径增改"}),e.jsx(C,{kind:"role",title:"角色字典",description:"主导、核心、参加等参与角色"}),e.jsx(O,{})]})]})}function C({kind:r,title:x,description:N}){var v;const l=k(),o=q(),n=(((v=z({queryKey:["taxonomy-all"],queryFn:()=>P()}).data)==null?void 0:v.items)??[]).filter(s=>s.kind===r).sort((s,m)=>s.sort-m.sort),[a,c]=g.useState(""),[u,d]=g.useState(null),t=h({mutationFn:F,onSuccess:()=>void l.invalidateQueries({queryKey:["taxonomy-all"]})}),i=h({mutationFn:s=>w(s),onSuccess:()=>{l.invalidateQueries({queryKey:["taxonomy-all"]}),o("success","已删除"),d(null)},onError:s=>{o("error",s.message),d(null)}});return e.jsxs(K,{children:[e.jsx(S,{title:x,extra:e.jsx("span",{className:"text-[11px] text-ink-3",children:N})}),e.jsxs("div",{className:"flex flex-col gap-1 p-3",children:[n.map((s,m)=>e.jsxs("div",{className:"flex items-center gap-2 rounded-md px-1 py-1 hover:bg-surface-2",children:[e.jsx("input",{type:"color",value:s.color??f[m%f.length],className:"size-5 cursor-pointer rounded border border-line bg-surface",onChange:y=>t.mutate({id:s.id,kind:r,value:s.value,color:y.target.value,sort:s.sort})}),e.jsx("input",{className:"h-7 flex-1 rounded border border-transparent bg-transparent px-1.5 text-[13px] text-ink-1 hover:border-line focus:border-brand focus:outline-none",value:s.value,onChange:()=>{},onBlur:y=>{const b=y.target.value.trim();b&&b!==s.value&&t.mutate({id:s.id,kind:r,value:b,color:s.color,sort:s.sort})},defaultValue:s.value},s.value),e.jsxs("span",{className:"num w-14 text-right text-[11px] text-ink-3",children:["#",s.sort]}),s.is_builtin?e.jsx("span",{className:"w-7 text-center text-[11px] text-ink-3",children:"内置"}):e.jsx(j,{variant:"ghost",size:"icon-sm","aria-label":"删除",onClick:()=>d({id:s.id,value:s.value}),children:e.jsx(D,{size:13})})]},s.id)),e.jsxs("div",{className:"mt-1 flex items-center gap-2 border-t border-line pt-2",children:[e.jsx(Q,{className:"flex-1",placeholder:"新增条目,回车或点击按钮",value:a,onChange:s=>c(s.target.value),onKeyDown:s=>{var m;s.key==="Enter"&&a.trim()&&(t.mutate({kind:r,value:a.trim(),sort:(((m=n.at(-1))==null?void 0:m.sort)??0)+10}),c(""))}}),e.jsxs(j,{size:"sm",variant:"secondary",disabled:!a.trim(),onClick:()=>{var s;t.mutate({kind:r,value:a.trim(),sort:(((s=n.at(-1))==null?void 0:s.sort)??0)+10}),c("")},children:[e.jsx(T,{size:13})," 添加"]})]})]}),e.jsx(E,{open:!!u,title:"删除字典条目",content:u?"确定删除「"+u.value+"」吗?":"",onCancel:()=>d(null),onOk:()=>u&&i.mutate(u.id)})]})}function O(){var d;const r=k(),x=q(),l=[...((d=z({queryKey:["dimensions"],queryFn:I}).data)==null?void 0:d.items)??[]].sort((t,i)=>t.sort-i.sort),[o,p]=g.useState(""),[n,a]=g.useState(null),c=h({mutationFn:M,onSuccess:()=>void r.invalidateQueries({queryKey:["dimensions"]})}),u=h({mutationFn:t=>B(t),onSuccess:()=>{r.invalidateQueries({queryKey:["dimensions"]}),x("success","已删除"),a(null)},onError:t=>{x("error",t.message),a(null)}});return e.jsxs(K,{children:[e.jsx(S,{title:"成长维度",extra:e.jsx("span",{className:"text-[11px] text-ink-3",children:"如:学业深造 / 职业发展 / 兴趣生活"})}),e.jsxs("div",{className:"flex flex-col gap-1 p-3",children:[l.map((t,i)=>e.jsxs("div",{className:"flex items-center gap-2 rounded-md px-1 py-1 hover:bg-surface-2",children:[e.jsx("span",{className:"size-3 rounded-full",style:{backgroundColor:t.color??f[i%f.length]}}),e.jsx("input",{className:"h-7 flex-1 rounded border border-transparent bg-transparent px-1.5 text-[13px] text-ink-1 hover:border-line focus:border-brand focus:outline-none",defaultValue:t.name,onBlur:v=>{const s=v.target.value.trim();s&&s!==t.name&&c.mutate({id:t.id,name:s,color:t.color,sort:t.sort})}},t.name),e.jsx(j,{variant:"ghost",size:"icon-sm","aria-label":"删除",onClick:()=>a({id:t.id,name:t.name}),children:e.jsx(D,{size:13})})]},t.id)),!l.length&&e.jsx("div",{className:"py-2 text-center text-[12px] text-ink-3",children:"尚未配置维度"}),e.jsxs("div",{className:"mt-1 flex items-center gap-2 border-t border-line pt-2",children:[e.jsx(Q,{className:"flex-1",placeholder:"新增维度名称",value:o,onChange:t=>p(t.target.value),onKeyDown:t=>{var i;t.key==="Enter"&&o.trim()&&(c.mutate({name:o.trim(),sort:(((i=l.at(-1))==null?void 0:i.sort)??0)+10}),p(""))}}),e.jsxs(j,{size:"sm",variant:"secondary",disabled:!o.trim(),onClick:()=>{var t;c.mutate({name:o.trim(),sort:(((t=l.at(-1))==null?void 0:t.sort)??0)+10}),p("")},children:[e.jsx(T,{size:13})," 添加"]})]})]}),e.jsx(E,{open:!!n,title:"删除维度",content:n?"确定删除「"+n.name+"」吗?记录与该维度的关联将一并移除。":"",onCancel:()=>a(null),onOk:()=>n&&u.mutate(n.id)})]})}export{A as TaxonomyPage};
diff --git a/sync-server/www/assets/TypesPage-QsBhkhzA.js b/sync-server/www/assets/TypesPage-BCNfvAxm.js
similarity index 98%
rename from sync-server/www/assets/TypesPage-QsBhkhzA.js
rename to sync-server/www/assets/TypesPage-BCNfvAxm.js
index f64bfd2..98a050b 100644
--- a/sync-server/www/assets/TypesPage-QsBhkhzA.js
+++ b/sync-server/www/assets/TypesPage-BCNfvAxm.js
@@ -1,4 +1,4 @@
-import{c as D,u as K,d as I,f as L,r,g as q,j as e,B as p,P as F,N as O,m as _,l as H,T as P,C as R,O as G,H as J,J as i,I as j,Q as U,S as z,U as V,V as W,q as X}from"./index-zXE6XEB1.js";import{C as Y}from"./card-DF5JL5Kk.js";/**
+import{c as D,u as K,d as I,f as L,r,g as q,j as e,B as p,P as F,N as O,m as _,l as H,T as P,C as R,O as G,H as J,J as i,I as j,Q as U,S as z,U as V,V as W,q as X}from"./index-D-R037K4.js";import{C as Y}from"./card-Br1zrGHT.js";/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
diff --git a/sync-server/www/assets/card-DF5JL5Kk.js b/sync-server/www/assets/card-Br1zrGHT.js
similarity index 89%
rename from sync-server/www/assets/card-DF5JL5Kk.js
rename to sync-server/www/assets/card-Br1zrGHT.js
index a980285..c236b7a 100644
--- a/sync-server/www/assets/card-DF5JL5Kk.js
+++ b/sync-server/www/assets/card-Br1zrGHT.js
@@ -1 +1 @@
-import{j as s,a}from"./index-zXE6XEB1.js";function i({className:r,...e}){return s.jsx("div",{className:a("rounded-lg border border-line bg-surface shadow-card",r),...e})}function t({title:r,extra:e,className:n}){return s.jsxs("div",{className:a("flex min-h-11 flex-wrap items-center justify-between gap-2 border-b border-line px-4 py-1.5",n),children:[s.jsx("h3",{className:"text-[13px] font-semibold text-ink-1",children:r}),e&&s.jsx("div",{className:"flex flex-wrap items-center gap-2",children:e})]})}function c({className:r,...e}){return s.jsx("div",{className:a("p-4",r),...e})}export{i as C,t as a,c as b};
+import{j as s,a}from"./index-D-R037K4.js";function i({className:r,...e}){return s.jsx("div",{className:a("rounded-lg border border-line bg-surface shadow-card",r),...e})}function t({title:r,extra:e,className:n}){return s.jsxs("div",{className:a("flex min-h-11 flex-wrap items-center justify-between gap-2 border-b border-line px-4 py-1.5",n),children:[s.jsx("h3",{className:"text-[13px] font-semibold text-ink-1",children:r}),e&&s.jsx("div",{className:"flex flex-wrap items-center gap-2",children:e})]})}function c({className:r,...e}){return s.jsx("div",{className:a("p-4",r),...e})}export{i as C,t as a,c as b};
diff --git a/sync-server/www/assets/index-zXE6XEB1.js b/sync-server/www/assets/index-D-R037K4.js
similarity index 99%
rename from sync-server/www/assets/index-zXE6XEB1.js
rename to sync-server/www/assets/index-D-R037K4.js
index 73a02db..ac822c6 100644
--- a/sync-server/www/assets/index-zXE6XEB1.js
+++ b/sync-server/www/assets/index-D-R037K4.js
@@ -1,4 +1,4 @@
-const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-Cf6y5AYb.js","assets/card-DF5JL5Kk.js","assets/useChart-VLUgJQ2-.js","assets/echarts-BIWefrIc.js","assets/GradesPage-mGpFf5D_.js","assets/TypesPage-QsBhkhzA.js","assets/TaxonomyPage-CdYiqX0H.js","assets/AdminPage-Cg6x5tmL.js","assets/ResumePage-q1_lGC_L.js","assets/rotate-ccw-Ck6NqXrk.js","assets/AssessmentPage-DXSU24FA.js"])))=>i.map(i=>d[i]);
+const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-CTFfbcSG.js","assets/card-Br1zrGHT.js","assets/useChart-59NNyLSS.js","assets/echarts-BIWefrIc.js","assets/GradesPage-CGH6s4Qj.js","assets/TypesPage-BCNfvAxm.js","assets/TaxonomyPage-DltVJTdo.js","assets/AdminPage-BS1A5Dj5.js","assets/ResumePage-CDZ54fmp.js","assets/rotate-ccw-D_RZxoBX.js","assets/AssessmentPage-BuX9x9ZE.js"])))=>i.map(i=>d[i]);
var Cv=n=>{throw TypeError(n)};var Kf=(n,r,s)=>r.has(n)||Cv("Cannot "+s);var T=(n,r,s)=>(Kf(n,r,"read from private field"),s?s.call(n):r.get(n)),he=(n,r,s)=>r.has(n)?Cv("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,s),P=(n,r,s,o)=>(Kf(n,r,"write to private field"),o?o.call(n,s):r.set(n,s),s),Se=(n,r,s)=>(Kf(n,r,"access private method"),s);var Ys=(n,r,s,o)=>({set _(f){P(n,r,f,s)},get _(){return T(n,r,o)}});(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))o(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const d of m.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function s(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function o(f){if(f.ep)return;f.ep=!0;const m=s(f);fetch(f.href,m)}})();var V5=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ag(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Zf={exports:{}},Iu={};/**
* @license React
* react-jsx-runtime.production.js
@@ -334,4 +334,4 @@ Please change the parent to Te("app_info"),T4=()=>Te("sync_status"),ro=()=>Te("type_list"),N4=n=>Te("type_upsert",n),C4=n=>Te("type_delete",{id:n}),E0=n=>Te("taxonomy_list",{kind:n}),w4=n=>Te("taxonomy_upsert",n),j4=n=>Te("taxonomy_delete",{id:n}),Wd=()=>Te("dimension_list"),z4=n=>Te("dimension_upsert",n),O4=n=>Te("dimension_delete",{id:n}),_0=(n={})=>Te("footprint_list",{query:n}),Id=n=>Te("footprint_get",{id:n}),T0=n=>Te("footprint_upsert",{item:n}),R4=n=>Te("footprint_delete",{id:n}),N0=(n={})=>Te("timeline",{query:n}),A4=n=>Te("stats_overview",{year:n}),M4=()=>Te("metric_list"),D4=n=>Te("metric_upsert",n),U4=n=>Te("metric_delete",{key:n}),k4=()=>Te("grades_overview"),H4=n=>Te("semester_upsert",n),q4=n=>Te("semester_delete",{id:n}),L4=n=>Te("course_upsert",n),B4=n=>Te("course_delete",{id:n}),Q4=n=>Te("band_upsert",n),G4=n=>Te("band_delete",{id:n}),C0=n=>Te("attachment_list",{owner_id:n}),w0=n=>Te("attachment_delete",{id:n}),eo=n=>Te("attachment_read",{id:n});async function Td(n,r,s){const o=new URLSearchParams({owner:String(n),name:r.name,mime:r.type||"application/octet-stream"}),f=await fetch(Ol()+"/sync/attachment/raw?"+o,{method:"PUT",headers:{authorization:"Bearer "+pl(),"content-type":r.type||"application/octet-stream"},body:r}),m=await f.json().catch(()=>({ok:!1,error:"HTTP "+f.status}));if(!m.ok)throw new Error(m.error||"上传失败");const d=m.data.item;if(s)try{await Te("attachment_set_thumb",{id:d.id,thumb_b64:s})}catch{}return d}async function j0(n){var f;const r=await fetch(Ol()+"/api/attachment_download",{method:"POST",headers:{"content-type":"application/json",authorization:"Bearer "+pl()},body:JSON.stringify({id:n})});if(!r.ok){const m=await r.json().catch(()=>null);throw new Error((m==null?void 0:m.error)||"下载失败")}const s=decodeURIComponent(r.headers.get("x-file-name")||((f=(r.headers.get("content-disposition")||"").match(/UTF-8''([^;]+)/))==null?void 0:f[1])||"file"),o=r.headers.get("content-type")||void 0;return{blob:await r.blob(),file_name:s,mime:o}}const z0=n=>Te("attachment_thumb",{id:n}),Y4=()=>Te("view_list"),V4=n=>Te("view_upsert",n),X4=n=>Te("view_delete",{id:n});async function nu(n,r,s){const o=await fetch((s||Ol())+n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+pl()},body:JSON.stringify(r??{})}),f=await o.json().catch(()=>({ok:!1,error:"HTTP "+o.status}));if(!f.ok)throw new Error(f.error||"请求失败");return f.data}async function O0(n,r){const s=await fetch((r||Ol())+n,{headers:{Authorization:"Bearer "+pl()}}),o=await s.json().catch(()=>({ok:!1,error:"HTTP "+s.status}));if(!o.ok)throw new Error(o.error||"请求失败");return o.data}const K4=n=>O0("/admin/invites",n),Z4=n=>O0("/admin/users",n),J4=(n,r)=>nu("/admin/invites/generate",{count:n},r),F4=(n,r,s)=>nu("/admin/invites/create",{code:n,remark:r},s),$4=(n,r,s)=>nu("/admin/invites/update",{id:n,...r},s),P4=n=>nu("/admin/demo-rebuild",{},n),W4=(n,r)=>nu("/admin/users/delete",{user_id:n},r),I4=(n,r)=>nu("/admin/invites/delete",{id:n},r),e_=()=>Te("gpa_settings_get",{}),t_=n=>Te("gpa_settings_upsert",{weights:n}),l_=()=>Te("profile_get",{}),a_=n=>Te("profile_upsert",{content:n});async function n_(n){const r=await new Promise((f,m)=>{const d=new FileReader;d.onload=()=>f(String(d.result||"").split(",")[1]||""),d.onerror=()=>m(new Error("读取文件失败")),d.readAsDataURL(n)}),o=await(await fetch(Ol()+"/api/profile_photo",{method:"POST",headers:{"content-type":"application/json",authorization:"Bearer "+pl()},body:JSON.stringify({data_b64:r,file_name:n.name,mime:n.type||"image/png"})})).json().catch(()=>null);if(!(o!=null&&o.ok))throw new Error((o==null?void 0:o.error)||"证件照上传失败");return o.data.url}const i_=Object.freeze(Object.defineProperty({__proto__:null,AuthError:_d,adminCreateInvite:F4,adminDeleteInvite:I4,adminDeleteUser:W4,adminDemoRebuild:P4,adminGenerateInvites:J4,adminListInvites:K4,adminListUsers:Z4,adminUpdateInvite:$4,appInfo:_4,attachmentDelete:w0,attachmentDownload:j0,attachmentList:C0,attachmentRead:eo,attachmentThumb:z0,attachmentUploadRaw:Td,bandDelete:G4,bandUpsert:Q4,clearToken:Fd,courseDelete:B4,courseUpsert:L4,deleteDimension:O4,deleteTaxonomy:j4,deleteType:C4,footprintDelete:R4,footprintGet:Id,footprintList:_0,footprintUpsert:T0,getServerUrl:Ol,getToken:pl,gpaSettingsGet:e_,gpaSettingsUpsert:t_,gradesOverview:k4,listDimensions:Wd,listTaxonomy:E0,listTypes:ro,metricDelete:U4,metricList:M4,metricUpsert:D4,profileGet:l_,profilePhotoUpload:n_,profileUpsert:a_,semesterDelete:q4,semesterUpsert:H4,serverLogin:$d,serverMe:b0,serverRegister:Pd,setServerUrl:S0,setToken:Jd,statsOverview:A4,syncStatus:T4,timeline:N0,upsertDimension:z4,upsertTaxonomy:w4,upsertType:N4,viewDelete:X4,viewList:Y4,viewUpsert:V4},Symbol.toStringTag,{value:"Module"}));function R0(n){var r,s,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var f=n.length;for(r=0;rtypeof n=="boolean"?`${n}`:n===0?"0":n,ag=A0,u_=(n,r)=>s=>{var o;if((r==null?void 0:r.variants)==null)return ag(n,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:f,defaultVariants:m}=r,d=Object.keys(f).map(v=>{const x=s==null?void 0:s[v],g=m==null?void 0:m[v];if(x===null)return null;const _=lg(x)||lg(g);return f[v][_]}),p=s&&Object.entries(s).reduce((v,x)=>{let[g,_]=x;return _===void 0||(v[g]=_),v},{}),b=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((v,x)=>{let{class:g,className:_,...k}=x;return Object.entries(k).every(K=>{let[q,D]=K;return Array.isArray(D)?D.includes({...m,...p}[q]):{...m,...p}[q]===D})?[...v,g,_]:v},[]);return ag(n,d,b,s==null?void 0:s.class,s==null?void 0:s.className)},r_=(n,r)=>{const s=new Array(n.length+r.length);for(let o=0;o({classGroupId:n,validator:r}),M0=(n=new Map,r=null,s)=>({nextPart:n,validators:r,classGroupId:s}),to="-",ng=[],o_="arbitrary..",c_=n=>{const r=d_(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return f_(d);const p=d.split(to),b=p[0]===""&&p.length>1?1:0;return D0(p,b,r)},getConflictingClassGroupIds:(d,p)=>{if(p){const b=o[d],v=s[d];return b?v?r_(v,b):b:v||ng}return s[d]||ng}}},D0=(n,r,s)=>{if(n.length-r===0)return s.classGroupId;const f=n[r],m=s.nextPart.get(f);if(m){const v=D0(n,r+1,m);if(v)return v}const d=s.validators;if(d===null)return;const p=r===0?n.join(to):n.slice(r).join(to),b=d.length;for(let v=0;vn.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=n.slice(1,-1),s=r.indexOf(":"),o=r.slice(0,s);return o?o_+o:void 0})(),d_=n=>{const{theme:r,classGroups:s}=n;return h_(s,r)},h_=(n,r)=>{const s=M0();for(const o in n){const f=n[o];eh(f,s,o,r)}return s},eh=(n,r,s,o)=>{const f=n.length;for(let m=0;m{if(typeof n=="string"){y_(n,r,s);return}if(typeof n=="function"){p_(n,r,s,o);return}v_(n,r,s,o)},y_=(n,r,s)=>{const o=n===""?r:U0(r,n);o.classGroupId=s},p_=(n,r,s,o)=>{if(g_(n)){eh(n(o),r,s,o);return}r.validators===null&&(r.validators=[]),r.validators.push(s_(s,n))},v_=(n,r,s,o)=>{const f=Object.entries(n),m=f.length;for(let d=0;d{let s=n;const o=r.split(to),f=o.length;for(let m=0;m"isThemeGetter"in n&&n.isThemeGetter===!0,b_=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,s=Object.create(null),o=Object.create(null);const f=(m,d)=>{s[m]=d,r++,r>n&&(r=0,o=s,s=Object.create(null))};return{get(m){let d=s[m];if(d!==void 0)return d;if((d=o[m])!==void 0)return f(m,d),d},set(m,d){m in s?s[m]=d:f(m,d)}}},Nd="!",ig=":",x_=[],ug=(n,r,s,o,f)=>({modifiers:n,hasImportantModifier:r,baseClassName:s,maybePostfixModifierPosition:o,isExternal:f}),S_=n=>{const{prefix:r,experimentalParseClassName:s}=n;let o=f=>{const m=[];let d=0,p=0,b=0,v;const x=f.length;for(let q=0;qb?v-b:void 0;return ug(m,k,_,K)};if(r){const f=r+ig,m=o;o=d=>d.startsWith(f)?m(d.slice(f.length)):ug(x_,!1,d,void 0,!0)}if(s){const f=o;o=m=>s({className:m,parseClassName:f})}return o},E_=n=>{const r=new Map;return n.orderSensitiveModifiers.forEach((s,o)=>{r.set(s,1e6+o)}),s=>{const o=[];let f=[];for(let m=0;m0&&(f.sort(),o.push(...f),f=[]),o.push(d)):f.push(d)}return f.length>0&&(f.sort(),o.push(...f)),o}},__=n=>({cache:b_(n.cacheSize),parseClassName:S_(n),sortModifiers:E_(n),postfixLookupClassGroupIds:T_(n),...c_(n)}),T_=n=>{const r=Object.create(null),s=n.postfixLookupClassGroups;if(s)for(let o=0;o{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:f,sortModifiers:m,postfixLookupClassGroupIds:d}=r,p=[],b=n.trim().split(N_);let v="";for(let x=b.length-1;x>=0;x-=1){const g=b[x],{isExternal:_,modifiers:k,hasImportantModifier:K,baseClassName:q,maybePostfixModifierPosition:D}=s(g);if(_){v=g+(v.length>0?" "+v:v);continue}let H=!!D,Q;if(H){const F=q.substring(0,D);Q=o(F);const U=Q&&d[Q]?o(q):void 0;U&&U!==Q&&(Q=U,H=!1)}else Q=o(q);if(!Q){if(!H){v=g+(v.length>0?" "+v:v);continue}if(Q=o(q),!Q){v=g+(v.length>0?" "+v:v);continue}H=!1}const Z=k.length===0?"":k.length===1?k[0]:m(k).join(":"),J=K?Z+Nd:Z,Y=J+Q;if(p.indexOf(Y)>-1)continue;p.push(Y);const de=f(Q,H);for(let F=0;F0?" "+v:v)}return v},w_=(...n)=>{let r=0,s,o,f="";for(;r{if(typeof n=="string")return n;let r,s="";for(let o=0;o{let s,o,f,m;const d=b=>{const v=r.reduce((x,g)=>g(x),n());return s=__(v),o=s.cache.get,f=s.cache.set,m=p,p(b)},p=b=>{const v=o(b);if(v)return v;const x=C_(b,s);return f(b,x),x};return m=d,(...b)=>m(w_(...b))},z_=[],ct=n=>{const r=s=>s[n]||z_;return r.isThemeGetter=!0,r.themeKey=n,r},H0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,q0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,O_=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,R_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,A_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,M_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,D_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,U_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ja=n=>O_.test(n),_e=n=>!!n&&!Number.isNaN(Number(n)),Xl=n=>!!n&&Number.isInteger(Number(n)),ad=n=>n.endsWith("%")&&_e(n.slice(0,-1)),fa=n=>R_.test(n),L0=()=>!0,k_=n=>A_.test(n)&&!M_.test(n),th=()=>!1,H_=n=>D_.test(n),q_=n=>U_.test(n),L_=n=>!ne(n)&&!ue(n),B_=n=>n.startsWith("@container")&&(n[10]==="/"&&n[11]!==void 0||n[11]==="s"&&n[16]!==void 0&&n.startsWith("-size/",10)||n[11]==="n"&&n[18]!==void 0&&n.startsWith("-normal/",10)),Q_=n=>nn(n,G0,th),ne=n=>H0.test(n),zn=n=>nn(n,Y0,k_),rg=n=>nn(n,F_,_e),G_=n=>nn(n,X0,L0),Y_=n=>nn(n,V0,th),sg=n=>nn(n,B0,th),V_=n=>nn(n,Q0,q_),Ks=n=>nn(n,K0,H_),ue=n=>q0.test(n),lr=n=>Vn(n,Y0),X_=n=>Vn(n,V0),og=n=>Vn(n,B0),K_=n=>Vn(n,G0),Z_=n=>Vn(n,Q0),Zs=n=>Vn(n,K0,!0),J_=n=>Vn(n,X0,!0),nn=(n,r,s)=>{const o=H0.exec(n);return o?o[1]?r(o[1]):s(o[2]):!1},Vn=(n,r,s=!1)=>{const o=q0.exec(n);return o?o[1]?r(o[1]):s:!1},B0=n=>n==="position"||n==="percentage",Q0=n=>n==="image"||n==="url",G0=n=>n==="length"||n==="size"||n==="bg-size",Y0=n=>n==="length",F_=n=>n==="number",V0=n=>n==="family-name",X0=n=>n==="number"||n==="weight",K0=n=>n==="shadow",$_=()=>{const n=ct("color"),r=ct("font"),s=ct("text"),o=ct("font-weight"),f=ct("tracking"),m=ct("leading"),d=ct("breakpoint"),p=ct("container"),b=ct("spacing"),v=ct("radius"),x=ct("shadow"),g=ct("inset-shadow"),_=ct("text-shadow"),k=ct("drop-shadow"),K=ct("blur"),q=ct("perspective"),D=ct("aspect"),H=ct("ease"),Q=ct("animate"),Z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Y=()=>[...J(),ue,ne],de=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],U=()=>[ue,ne,b],I=()=>[Ja,"full","auto",...U()],le=()=>[Xl,"none","subgrid",ue,ne],Ve=()=>["auto",{span:["full",Xl,ue,ne]},Xl,ue,ne],Fe=()=>[Xl,"auto",ue,ne],ie=()=>["auto","min","max","fr",ue,ne],Ne=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...U()],ee=()=>[Ja,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],R=()=>[p,Ja,"screen","full","dvw","lvw","svw","min","max","fit",...U()],ae=()=>[Ja,"screen","full","lh","dvh","lvh","svh","min","max","fit",...U()],X=()=>[n,ue,ne],ke=()=>[...J(),og,sg,{position:[ue,ne]}],Nt=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Rl=()=>["auto","cover","contain",K_,Q_,{size:[ue,ne]}],C=()=>[ad,lr,zn],G=()=>["","none","full",v,ue,ne],W=()=>["",_e,lr,zn],ce=()=>["solid","dashed","dotted","double"],je=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>[_e,ad,og,sg],Ae=()=>["","none",K,ue,ne],se=()=>["none",_e,ue,ne],ye=()=>["none",_e,ue,ne],Vt=()=>[_e,ue,ne],ga=()=>[Ja,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[fa],breakpoint:[fa],color:[L0],container:[fa],"drop-shadow":[fa],ease:["in","out","in-out"],font:[L_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[fa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[fa],shadow:[fa],spacing:["px",_e],text:[fa],"text-shadow":[fa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ja,ne,ue,D]}],container:["container"],"container-type":[{"@container":["","normal","size",ue,ne]}],"container-named":[B_],columns:[{columns:[_e,"auto",ne,ue,p]}],"break-after":[{"break-after":Z()}],"break-before":[{"break-before":Z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Y()}],overflow:[{overflow:de()}],"overflow-x":[{"overflow-x":de()}],"overflow-y":[{"overflow-y":de()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{"inset-s":I(),start:I()}],end:[{"inset-e":I(),end:I()}],"inset-bs":[{"inset-bs":I()}],"inset-be":[{"inset-be":I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Xl,"auto",ue,ne]}],basis:[{basis:[Ja,"full","auto",p,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[_e,Ja,"auto","initial","none",ne]}],grow:[{grow:["",_e,ue,ne]}],shrink:[{shrink:["",_e,ue,ne]}],order:[{order:[Xl,"first","last","none",ue,ne]}],"grid-cols":[{"grid-cols":le()}],"col-start-end":[{col:Ve()}],"col-start":[{"col-start":Fe()}],"col-end":[{"col-end":Fe()}],"grid-rows":[{"grid-rows":le()}],"row-start-end":[{row:Ve()}],"row-start":[{"row-start":Fe()}],"row-end":[{"row-end":Fe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ie()}],"auto-rows":[{"auto-rows":ie()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...Ne(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...Ne()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":Ne()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pbs:[{pbs:U()}],pbe:[{pbe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mbs:[{mbs:V()}],mbe:[{mbe:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:ee()}],"inline-size":[{inline:["auto",...R()]}],"min-inline-size":[{"min-inline":["auto",...R()]}],"max-inline-size":[{"max-inline":["none",...R()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[p,"screen",...ee()]}],"min-w":[{"min-w":[p,"screen","none",...ee()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[d]},...ee()]}],h:[{h:["screen","lh",...ee()]}],"min-h":[{"min-h":["screen","lh","none",...ee()]}],"max-h":[{"max-h":["screen","lh","none",...ee()]}],"font-size":[{text:["base",s,lr,zn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,J_,G_]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ad,ne]}],"font-family":[{font:[X_,Y_,r]}],"font-features":[{"font-features":[ne]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[f,ue,ne]}],"line-clamp":[{"line-clamp":[_e,"none",ue,rg]}],leading:[{leading:["none",m,...U()]}],"list-image":[{"list-image":["none",ue,ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ue,ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:X()}],"text-color":[{text:X()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[_e,"from-font","auto",ue,zn]}],"text-decoration-color":[{decoration:X()}],"underline-offset":[{"underline-offset":[_e,"auto",ue,ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"tab-size":[{tab:[Xl,ue,ne]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue,ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ue,ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ke()}],"bg-repeat":[{bg:Nt()}],"bg-size":[{bg:Rl()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Xl,ue,ne],radial:["",ue,ne],conic:["",Xl,ue,ne]},Z_,V_]}],"bg-color":[{bg:X()}],"gradient-from-pos":[{from:C()}],"gradient-via-pos":[{via:C()}],"gradient-to-pos":[{to:C()}],"gradient-from":[{from:X()}],"gradient-via":[{via:X()}],"gradient-to":[{to:X()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-bs":[{"border-bs":W()}],"border-w-be":[{"border-be":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ce(),"hidden","none"]}],"divide-style":[{divide:[...ce(),"hidden","none"]}],"border-color":[{border:X()}],"border-color-x":[{"border-x":X()}],"border-color-y":[{"border-y":X()}],"border-color-s":[{"border-s":X()}],"border-color-e":[{"border-e":X()}],"border-color-bs":[{"border-bs":X()}],"border-color-be":[{"border-be":X()}],"border-color-t":[{"border-t":X()}],"border-color-r":[{"border-r":X()}],"border-color-b":[{"border-b":X()}],"border-color-l":[{"border-l":X()}],"divide-color":[{divide:X()}],"outline-style":[{outline:[...ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[_e,ue,ne]}],"outline-w":[{outline:["",_e,lr,zn]}],"outline-color":[{outline:X()}],shadow:[{shadow:["","inner","none",x,Zs,Ks]}],"shadow-color":[{shadow:X()}],"inset-shadow":[{"inset-shadow":["none",g,Zs,Ks]}],"inset-shadow-color":[{"inset-shadow":X()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:X()}],"ring-offset-w":[{"ring-offset":[_e,zn]}],"ring-offset-color":[{"ring-offset":X()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":X()}],"text-shadow":[{"text-shadow":["none",_,Zs,Ks]}],"text-shadow-color":[{"text-shadow":X()}],opacity:[{opacity:[_e,ue,ne]}],"mix-blend":[{"mix-blend":[...je(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":je()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[_e]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":X()}],"mask-image-linear-to-color":[{"mask-linear-to":X()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":X()}],"mask-image-t-to-color":[{"mask-t-to":X()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":X()}],"mask-image-r-to-color":[{"mask-r-to":X()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":X()}],"mask-image-b-to-color":[{"mask-b-to":X()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":X()}],"mask-image-l-to-color":[{"mask-l-to":X()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":X()}],"mask-image-x-to-color":[{"mask-x-to":X()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":X()}],"mask-image-y-to-color":[{"mask-y-to":X()}],"mask-image-radial":[{"mask-radial":[ue,ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":X()}],"mask-image-radial-to-color":[{"mask-radial-to":X()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":J()}],"mask-image-conic-pos":[{"mask-conic":[_e]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":X()}],"mask-image-conic-to-color":[{"mask-conic-to":X()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ke()}],"mask-repeat":[{mask:Nt()}],"mask-size":[{mask:Rl()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ue,ne]}],filter:[{filter:["","none",ue,ne]}],blur:[{blur:Ae()}],brightness:[{brightness:[_e,ue,ne]}],contrast:[{contrast:[_e,ue,ne]}],"drop-shadow":[{"drop-shadow":["","none",k,Zs,Ks]}],"drop-shadow-color":[{"drop-shadow":X()}],grayscale:[{grayscale:["",_e,ue,ne]}],"hue-rotate":[{"hue-rotate":[_e,ue,ne]}],invert:[{invert:["",_e,ue,ne]}],saturate:[{saturate:[_e,ue,ne]}],sepia:[{sepia:["",_e,ue,ne]}],"backdrop-filter":[{"backdrop-filter":["","none",ue,ne]}],"backdrop-blur":[{"backdrop-blur":Ae()}],"backdrop-brightness":[{"backdrop-brightness":[_e,ue,ne]}],"backdrop-contrast":[{"backdrop-contrast":[_e,ue,ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",_e,ue,ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[_e,ue,ne]}],"backdrop-invert":[{"backdrop-invert":["",_e,ue,ne]}],"backdrop-opacity":[{"backdrop-opacity":[_e,ue,ne]}],"backdrop-saturate":[{"backdrop-saturate":[_e,ue,ne]}],"backdrop-sepia":[{"backdrop-sepia":["",_e,ue,ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ue,ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[_e,"initial",ue,ne]}],ease:[{ease:["linear","initial",H,ue,ne]}],delay:[{delay:[_e,ue,ne]}],animate:[{animate:["none",Q,ue,ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[q,ue,ne]}],"perspective-origin":[{"perspective-origin":Y()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ye()}],"scale-x":[{"scale-x":ye()}],"scale-y":[{"scale-y":ye()}],"scale-z":[{"scale-z":ye()}],"scale-3d":["scale-3d"],skew:[{skew:Vt()}],"skew-x":[{"skew-x":Vt()}],"skew-y":[{"skew-y":Vt()}],transform:[{transform:[ue,ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:Y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ga()}],"translate-x":[{"translate-x":ga()}],"translate-y":[{"translate-y":ga()}],"translate-z":[{"translate-z":ga()}],"translate-none":["translate-none"],zoom:[{zoom:[Xl,ue,ne]}],accent:[{accent:X()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:X()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ue,ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":X()}],"scrollbar-track-color":[{"scrollbar-track":X()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mbs":[{"scroll-mbs":U()}],"scroll-mbe":[{"scroll-mbe":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pbs":[{"scroll-pbs":U()}],"scroll-pbe":[{"scroll-pbe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ue,ne]}],fill:[{fill:["none",...X()]}],"stroke-w":[{stroke:[_e,lr,zn,rg]}],stroke:[{stroke:["none",...X()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},P_=j_($_);function gl(...n){return P_(A0(n))}const W_=u_("inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md font-medium transition-colors select-none disabled:pointer-events-none disabled:opacity-45",{variants:{variant:{primary:"bg-brand text-white hover:bg-brand-hover shadow-card",secondary:"bg-surface text-ink-1 border border-line hover:bg-surface-3 hover:border-line-strong",ghost:"text-ink-2 hover:bg-surface-3 hover:text-ink-1",subtle:"bg-brand-subtle text-brand-text hover:brightness-[0.97]",danger:"bg-danger text-white hover:brightness-110","danger-ghost":"text-danger hover:bg-danger-subtle"},size:{sm:"h-7 px-2.5 text-[12px]",md:"h-8 px-3 text-[13px]",lg:"h-9 px-4 text-sm",icon:"h-8 w-8 p-0","icon-sm":"h-7 w-7 p-0"}},defaultVariants:{variant:"secondary",size:"md"}}),zt=E.forwardRef(function({className:r,variant:s,size:o,...f},m){return h.jsx("button",{ref:m,className:gl(W_({variant:s,size:o}),r),...f})}),Z0="w-full rounded-md border border-line bg-surface px-2.5 text-[13px] text-ink-1 placeholder:text-ink-3 transition-colors hover:border-line-strong focus:border-brand focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed",nt=E.forwardRef(function({className:r,...s},o){return h.jsx("input",{ref:o,className:gl(Z0,"h-8",r),...s})}),Cd=E.forwardRef(function({className:r,...s},o){return h.jsx("textarea",{ref:o,className:gl(Z0,"py-2 min-h-[72px] resize-y leading-relaxed",r),...s})});function De({label:n,required:r,hint:s,className:o,children:f}){return h.jsxs("div",{className:gl("flex flex-col gap-1.5",o),children:[h.jsxs("label",{className:"text-[12px] font-medium text-ink-2",children:[n,r&&h.jsx("span",{className:"text-danger ml-0.5",children:"*"}),s&&h.jsx("span",{className:"text-ink-3 font-normal ml-2",children:s})]}),f]})}const ml=E.forwardRef(function({className:r,options:s,children:o,...f},m){return h.jsxs("div",{className:gl("relative",r?r.split(" ").filter(d=>/^w-|^min-w|^flex-/.test(d)).join(" "):""),children:[h.jsx("select",{ref:m,className:gl("w-full h-8 appearance-none rounded-md border border-line bg-surface pl-2.5 pr-7 text-[13px] text-ink-1","transition-colors hover:border-line-strong focus:border-brand focus:outline-none disabled:opacity-50",r),...f,children:s?s.map(d=>h.jsx("option",{value:d.value,children:d.label},d.value)):o}),h.jsx(J3,{size:14,className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-ink-3"})]})});function Ii({className:n,color:r,...s}){return h.jsx("span",{className:gl("inline-flex items-center gap-1 rounded-sm border px-1.5 py-px text-[11px] leading-[18px] font-medium whitespace-nowrap",n),style:r?{color:r,borderColor:r+"44",backgroundColor:r+"14"}:void 0,...s})}function I_({className:n,...r}){return h.jsx("span",{className:gl("inline-flex items-center gap-1 rounded-sm border border-line bg-surface-2 px-1.5 py-px text-[11px] leading-[18px] font-medium text-ink-2 whitespace-nowrap",n),...r})}function so({open:n,onClose:r,title:s,width:o=560,children:f,footer:m}){return E.useEffect(()=>{if(!n)return;const d=p=>{p.key==="Escape"&&r()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[n,r]),n?KS.createPortal(h.jsxs("div",{className:"fixed inset-0 z-50 flex justify-center overflow-y-auto p-3 sm:p-6",children:[h.jsx("div",{className:"fixed inset-0 bg-black/45",onClick:r}),h.jsxs("div",{className:"animate-in relative my-auto w-full rounded-lg border border-line bg-surface shadow-pop",style:{maxWidth:o},role:"dialog",children:[h.jsxs("div",{className:"flex h-12 items-center justify-between border-b border-line px-4",children:[h.jsx("div",{className:"text-sm font-semibold text-ink-1",children:s}),h.jsx(zt,{variant:"ghost",size:"icon-sm",onClick:r,"aria-label":"关闭",children:h.jsx(g0,{size:15})})]}),h.jsx("div",{className:"max-h-[70vh] overflow-y-auto px-3 py-3 sm:px-4 sm:py-4",children:f}),m&&h.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line px-3 py-2.5 sm:h-14 sm:flex-nowrap sm:px-4 sm:py-0",children:m})]})]}),document.body):null}function e5({icon:n,title:r,description:s,action:o}){return h.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-center",children:[h.jsx("div",{className:"text-ink-3",children:n??h.jsx(xE,{size:36,strokeWidth:1.5})}),h.jsx("div",{className:"text-[13px] font-medium text-ink-2",children:r}),s&&h.jsx("div",{className:"max-w-[360px] text-[12px] text-ink-3",children:s}),o&&h.jsx("div",{className:"mt-2",children:o})]})}const J0=E.createContext(()=>{});function oo(){return E.useContext(J0)}const t5={success:h.jsx(W3,{size:15,className:"text-success"}),error:h.jsx($3,{size:15,className:"text-danger"}),info:h.jsx(EE,{size:15,className:"text-brand"})};function l5({children:n}){const[r,s]=E.useState([]),o=E.useRef(0),f=E.useCallback((m,d)=>{const p=++o.current;s(b=>[...b,{id:p,kind:m,text:d}]),setTimeout(()=>s(b=>b.filter(v=>v.id!==p)),3200)},[]);return h.jsxs(J0.Provider,{value:f,children:[n,h.jsx("div",{className:"pointer-events-none fixed bottom-5 right-5 z-[60] flex flex-col gap-2",children:r.map(m=>h.jsxs("div",{className:gl("pointer-events-auto flex items-center gap-2 rounded-md border border-line bg-surface px-3 py-2 text-[13px] text-ink-1 shadow-pop","animate-in"),children:[t5[m.kind],m.text]},m.id))})]})}function a5({open:n,title:r,content:s,onCancel:o,onOk:f,loading:m}){return h.jsx(so,{open:n,onClose:o,title:r,width:420,footer:h.jsxs(h.Fragment,{children:[h.jsx(zt,{variant:"secondary",onClick:o,children:"取消"}),h.jsx(zt,{variant:"danger",onClick:f,disabled:m,children:"确认"})]}),children:h.jsx("p",{className:"text-[13px] text-ink-2",children:s??"该操作不可撤销,请确认。"})})}function n5({size:n=44}){return h.jsxs("svg",{width:n,height:n,viewBox:"0 0 26 26",fill:"none","aria-hidden":!0,children:[h.jsx("rect",{x:"1",y:"1",width:"24",height:"24",rx:"6",fill:"var(--brand)"}),h.jsx("ellipse",{cx:"11",cy:"10",rx:"4.2",ry:"5.2",fill:"#fff",opacity:"0.95",transform:"rotate(-18 11 10)"}),h.jsx("circle",{cx:"17.5",cy:"17.5",r:"3.1",fill:"#fff",opacity:"0.7"})]})}function i5({open:n,onClose:r,defaultUrl:s}){const o=lu(),f=oo(),[m,d]=E.useState("login"),[p,b]=E.useState(s||"https://footpr.linyux.cn"),[v,x]=E.useState(""),[g,_]=E.useState(""),[k,K]=E.useState(""),[q,D]=E.useState(""),[H,Q]=E.useState(!1),Z=async()=>{if(!v.trim()||!g){D("请填写账号与密码");return}let J=p.trim();J&&!J.startsWith("http")&&(J="https://"+J),Q(!0),D("");try{if(m==="login")await $d(v.trim(),g,J);else{if(!k.trim())throw new Error("请填写邀请码");await Pd(v.trim(),g,k.trim(),J)}o.invalidateQueries(),f("success",m==="login"?"已登录 · 同步已开启":"已注册登录 · 同步已开启"),r(),setTimeout(()=>window.location.reload(),300)}catch(Y){D(Y.message)}finally{Q(!1)}};return n?h.jsx("div",{className:"fixed inset-0 z-[70] flex items-center justify-center bg-bg/95",children:h.jsxs("div",{className:"w-full max-w-[380px] rounded-lg border border-line bg-surface p-6 shadow-pop",children:[h.jsxs("div",{className:"flex flex-col items-center gap-1.5 pb-5",children:[h.jsx(n5,{}),h.jsx("div",{className:"text-[17px] font-semibold tracking-tight text-ink-1",children:"足迹"}),h.jsx("div",{className:"text-[10px] font-medium tracking-[0.2em] text-ink-3",children:"FOOTPRINTS"})]}),h.jsxs("div",{className:"mb-4 flex rounded-md border border-line bg-surface-2 p-0.5 text-[12.5px]",children:[h.jsx("button",{className:"flex-1 rounded-sm px-2 py-1 transition-colors "+(m==="login"?"bg-surface font-medium text-ink-1 shadow-card":"text-ink-3"),onClick:()=>{d("login"),D("")},children:"登录"}),h.jsx("button",{className:"flex-1 rounded-sm px-2 py-1 transition-colors "+(m==="register"?"bg-surface font-medium text-ink-1 shadow-card":"text-ink-3"),onClick:()=>{d("register"),D("")},children:"注册"})]}),h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsx(De,{label:"服务器地址",hint:"与网页版同一账号体系",children:h.jsx(nt,{value:p,onChange:J=>b(J.target.value),placeholder:"https://footpr.linyux.cn"})}),h.jsx(De,{label:"用户名",required:!0,children:h.jsx(nt,{value:v,onChange:J=>x(J.target.value),placeholder:"3-32 位字母数字-_"})}),h.jsx(De,{label:"密码",required:!0,children:h.jsx(nt,{type:"password",value:g,onChange:J=>_(J.target.value),placeholder:"至少 8 位"})}),m==="register"&&h.jsx(De,{label:"邀请码",required:!0,hint:"向管理员索取",children:h.jsx(nt,{value:k,onChange:J=>K(J.target.value),placeholder:"邀请码"})}),q&&h.jsx("div",{className:"text-[12px] text-danger",children:q}),h.jsx(zt,{variant:"primary",size:"lg",onClick:()=>void Z(),disabled:H,children:H?"请稍候…":m==="login"?"登录并同步":"注册并同步"}),h.jsx("p",{className:"text-center text-[11px] text-ink-3",children:"登录后本机数据将多端同步"})]})]})}):null}const u5=[{section:"工作区",items:[{to:"/timeline",label:"时间线",icon:m0},{to:"/records",label:"记录",icon:PE},{to:"/grades",label:"成绩",icon:p0},{to:"/dashboard",label:"统计",icon:K3}]},{section:"个人",items:[{to:"/profile",label:"个人信息",icon:b4},{to:"/resume",label:"我的简历",icon:IE},{to:"/assessment",label:"综合测评",icon:eE}]},{section:"配置",items:[{to:"/admin",label:"管理",icon:r4},{to:"/types",label:"记录类型",icon:a4},{to:"/taxonomy",label:"字典与维度",icon:o4}]}];function r5(){return h.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 26 26",fill:"none","aria-hidden":!0,children:[h.jsx("defs",{children:h.jsxs("linearGradient",{id:"lg",x1:"0",y1:"0",x2:"0",y2:"26",children:[h.jsx("stop",{stopColor:"#4359e8"}),h.jsx("stop",{offset:"1",stopColor:"#2a3ab8"})]})}),h.jsx("rect",{x:"1",y:"1",width:"24",height:"24",rx:"7",fill:"url(#lg)"}),h.jsx("ellipse",{cx:"11",cy:"10",rx:"4.2",ry:"5.2",fill:"#fff",opacity:".95",transform:"rotate(-18 11 10)"}),h.jsx("circle",{cx:"17.5",cy:"17.5",r:"3.1",fill:"#fff",opacity:".7"})]})}function s5({open:n,onClose:r}){const s=lu(),f=yl({queryKey:["me",pl()??""],refetchOnMount:"always",queryFn:()=>b0(),enabled:!!pl(),retry:0}).data??null,[m,d]=E.useState(!1);return h.jsxs("aside",{className:gl("no-print","flex w-[236px] shrink-0 flex-col border-r border-line bg-surface","max-lg:fixed max-lg:inset-y-0 max-lg:left-0 max-lg:z-40 max-lg:transition-transform",n?"max-lg:translate-x-0":"max-lg:-translate-x-full"),children:[h.jsx(i5,{open:m,onClose:()=>d(!1),defaultUrl:"https://footpr.linyux.cn"}),h.jsxs("div",{className:"flex h-[60px] items-center gap-3 border-b border-line px-5",children:[h.jsx(r5,{}),h.jsxs("div",{className:"leading-tight",children:[h.jsx("div",{className:"text-[15px] font-bold tracking-tight text-ink-1",children:"足迹"}),h.jsx("div",{className:"text-[9px] font-medium tracking-[0.24em] text-ink-3",children:"FOOTPRINTS"})]})]}),h.jsx("nav",{className:"flex-1 overflow-y-auto px-2.5 py-4",children:u5.map(p=>h.jsxs("div",{className:"mb-5",children:[h.jsx("div",{className:"px-2.5 pb-1.5 text-[10px] font-semibold uppercase tracking-[0.08em] text-ink-3",children:p.section}),h.jsx("div",{className:"flex flex-col gap-0.5",children:p.items.map(b=>h.jsxs(e0,{to:b.to,onClick:r,className:({isActive:v})=>gl("relative flex h-[34px] items-center gap-3 rounded-lg px-3 text-[13px] font-medium transition-all duration-150",v?"bg-brand-subtle text-brand-text nav-active":"text-ink-2 hover:bg-surface-3 hover:text-ink-1"),children:[h.jsx(b.icon,{size:16,strokeWidth:1.8}),b.label]},b.to))})]},p.section))}),h.jsx("div",{className:"border-t border-line px-3 py-3",children:pl()&&f?h.jsxs("div",{className:"rounded-lg bg-surface-2 px-3 py-2.5",children:[h.jsxs("div",{className:"flex items-center justify-between gap-2",children:[h.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[h.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center rounded-full bg-brand text-[10px] font-bold text-white",children:f.username.charAt(0).toUpperCase()}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"truncate text-[12px] font-semibold text-ink-1",title:f.username,children:f.username}),f.is_admin&&h.jsx("div",{className:"text-[10px] text-brand-text",children:"管理员"})]})]}),h.jsx("button",{className:"shrink-0 rounded p-1 text-ink-3 transition-colors hover:bg-surface-3 hover:text-danger",title:"退出登录",onClick:()=>{Fd(),s.clear(),window.location.reload()},children:h.jsx(OE,{size:13})})]}),h.jsxs("div",{className:"mt-1.5 flex items-center gap-1 text-[10px] text-success",children:[h.jsx(lE,{size:10}),"云端同步已开启"]})]}):h.jsxs("button",{className:"flex w-full items-center justify-center gap-2 rounded-lg border border-brand/30 bg-brand-subtle px-3 py-2 text-[13px] font-medium text-brand-text transition-all hover:shadow-brand",onClick:()=>d(!0),children:[h.jsx(jE,{size:14}),"登录我的档案"]})})]})}const o5={"/timeline":{title:"时间线",sub:"按学年与月份回顾全部足迹"},"/records":{title:"记录",sub:"全部足迹的检索与管理"},"/grades":{title:"成绩",sub:"学年学科成绩 · 梯度与总览"},"/dashboard":{title:"统计",sub:"量化个人成长收获"},"/types":{title:"记录类型",sub:"类型与字段模板管理"},"/taxonomy":{title:"字典与维度",sub:"级别、角色与成长维度"}};function c5({onMenu:n}){const{pathname:r}=bl(),s=no(),[o,f]=E.useState(""),[m,d]=E.useState(document.documentElement.classList.contains("dark")),p=o5[r]??{title:""},b=()=>{const v=!m;d(v),document.documentElement.classList.toggle("dark",v),localStorage.setItem("fp-theme",v?"dark":"light"),window.dispatchEvent(new CustomEvent("fp-theme-change"))};return h.jsxs("header",{className:"no-print flex h-14 shrink-0 items-center gap-2 border-b border-line bg-surface px-3 sm:gap-4 sm:px-5",children:[h.jsx(zt,{variant:"ghost",size:"icon",className:"lg:hidden",onClick:n,"aria-label":"打开导航",children:h.jsx(AE,{size:17})}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("h1",{className:"truncate text-[15px] font-semibold leading-tight text-ink-1",children:p.title}),p.sub&&h.jsx("p",{className:"truncate text-[11px] leading-tight text-ink-3",children:p.sub})]}),h.jsxs("div",{className:"relative ml-auto hidden w-[240px] md:block lg:w-[280px]",children:[h.jsx(t4,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-ink-3"}),h.jsx(nt,{className:"pl-8",placeholder:"搜索标题、内容、结果、标签",value:o,onChange:v=>f(v.target.value),onKeyDown:v=>{v.key==="Enter"&&o.trim()&&s("/records?q="+encodeURIComponent(o.trim()))}})]}),h.jsx(zt,{variant:"ghost",size:"icon",onClick:b,"aria-label":"切换主题",children:m?h.jsx(h4,{size:15}):h.jsx(kE,{size:15})}),h.jsxs(zt,{variant:"primary",onClick:()=>s("/records?new=1"),"aria-label":"新建记录",children:[h.jsx(ZE,{size:14}),h.jsx("span",{className:"hidden sm:inline",children:"新建记录"})]})]})}function f5(){return h.jsxs("svg",{width:"44",height:"44",viewBox:"0 0 26 26",fill:"none","aria-hidden":!0,children:[h.jsx("rect",{x:"1",y:"1",width:"24",height:"24",rx:"6",fill:"var(--brand)"}),h.jsx("ellipse",{cx:"11",cy:"10",rx:"4.2",ry:"5.2",fill:"#fff",opacity:"0.95",transform:"rotate(-18 11 10)"}),h.jsx("circle",{cx:"17.5",cy:"17.5",r:"3.1",fill:"#fff",opacity:"0.7"})]})}function d5(){const[n,r]=E.useState("login"),[s,o]=E.useState(""),[f,m]=E.useState(""),[d,p]=E.useState(""),[b,v]=E.useState(""),[x,g]=E.useState(!1),_="__TAURI_INTERNALS__"in window,[k,K]=E.useState(Ol()),q=H=>{K(H),S0(H)},D=async()=>{if(!s.trim()||!f){v("请填写账号与密码");return}g(!0),v("");try{if(n==="login")await $d(s.trim(),f,k);else{if(!d.trim())throw new Error("请填写邀请码");await Pd(s.trim(),f,d.trim(),k)}setTimeout(()=>window.location.reload(),200)}catch(H){v(H.message)}finally{g(!1)}};return h.jsx("div",{className:"flex h-full items-center justify-center bg-bg px-4",children:h.jsxs("div",{className:"w-full max-w-[380px] rounded-lg border border-line bg-surface p-6 shadow-pop",children:[h.jsxs("div",{className:"flex flex-col items-center gap-1.5 pb-5",children:[h.jsx(f5,{}),h.jsx("div",{className:"text-[18px] font-semibold tracking-tight text-ink-1",children:"足迹"}),h.jsx("div",{className:"text-[11px] font-medium tracking-[0.2em] text-ink-3",children:"FOOTPRINTS"})]}),h.jsxs("div",{className:"mb-4 flex rounded-md border border-line bg-surface-2 p-0.5 text-[12.5px]",children:[h.jsx("button",{className:"flex-1 rounded-sm px-2 py-1 transition-colors "+(n==="login"?"bg-surface font-medium text-ink-1 shadow-card":"text-ink-3"),onClick:()=>{r("login"),v("")},children:"登录"}),h.jsx("button",{className:"flex-1 rounded-sm px-2 py-1 transition-colors "+(n==="register"?"bg-surface font-medium text-ink-1 shadow-card":"text-ink-3"),onClick:()=>{r("register"),v("")},children:"注册"})]}),h.jsxs("div",{className:"flex flex-col gap-3",children:[_&&h.jsx(De,{label:"服务器地址",hint:"默认即可",children:h.jsx(nt,{value:k,onChange:H=>q(H.target.value),placeholder:"https://footpr.linyux.cn"})}),h.jsx(De,{label:"用户名",required:!0,children:h.jsx(nt,{value:s,onChange:H=>o(H.target.value),placeholder:"3-32 位字母数字-_",onKeyDown:H=>{H.key==="Enter"&&D()}})}),h.jsx(De,{label:"密码",required:!0,children:h.jsx(nt,{type:"password",value:f,onChange:H=>m(H.target.value),placeholder:"至少 8 位",onKeyDown:H=>{H.key==="Enter"&&D()}})}),n==="register"&&h.jsx(De,{label:"邀请码",required:!0,hint:"向管理员索取",children:h.jsx(nt,{value:d,onChange:H=>p(H.target.value),placeholder:"邀请码",onKeyDown:H=>{H.key==="Enter"&&D()}})}),b&&h.jsx("div",{className:"text-[12px] text-danger",children:b}),h.jsx(zt,{variant:"primary",size:"lg",onClick:()=>void D(),disabled:x,children:x?"请稍候…":n==="login"?"进入我的档案":"创建我的档案"}),h.jsx("button",{type:"button",className:"mt-1 flex w-full items-center justify-center gap-1.5 rounded-md border border-dashed border-line px-3 py-2 text-[11.5px] text-ink-3 transition-colors hover:border-brand/40 hover:text-brand-text",onClick:()=>{o("demo"),m("demo1234")},children:"演示账号:demo / demo1234(点击填充)"})]})]})})}function h5(){const[n,r]=E.useState(()=>!!pl()),[s,o]=E.useState(!1);return E.useEffect(()=>{const f=()=>r(!1);return window.addEventListener("fp-auth-required",f),()=>window.removeEventListener("fp-auth-required",f)},[]),n?h.jsx(l5,{children:h.jsxs("div",{className:"flex h-full",children:[s&&h.jsx("div",{className:"fixed inset-0 z-30 bg-black/45 lg:hidden",onClick:()=>o(!1),"aria-hidden":!0}),h.jsx(s5,{open:s,onClose:()=>o(!1)}),h.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[h.jsx(c5,{onMenu:()=>o(!0)}),h.jsx("main",{className:"app-scroll min-h-0 flex-1 overflow-y-auto",children:h.jsx(cS,{})})]})]})}):h.jsx(d5,{})}const Gn="inline-flex h-[22px] min-w-[52px] items-center justify-center gap-1 rounded-sm border px-2 text-[11.5px] font-medium whitespace-nowrap",cg={draft:{label:"草稿",color:"var(--text-3)",bg:"var(--surface-3)"},ongoing:{label:"进行中",color:"var(--brand-text)",bg:"var(--brand-subtle)"},submitted:{label:"已提交待果",color:"var(--warning)",bg:"var(--warning-subtle)"},finished:{label:"已完结",color:"var(--success)",bg:"var(--success-subtle)"}};function F0({status:n}){const r=cg[n]??cg.draft;return h.jsx("span",{className:Gn+" border-transparent",style:{color:r.color,backgroundColor:r.bg},children:r.label})}const m5={国际级:"#7c3aed",国家级:"#dc2626",省市级:"#ea580c",区县级:"#2563eb",校级:"#16a34a",院级:"#0891b2"};function $0({level:n}){return n?h.jsx(Ii,{color:m5[n]??"var(--text-3)",className:Gn,children:n}):null}const y5={特等奖:"#b45309",一等奖:"#b45309",二等奖:"#ea580c",三等奖:"#2563eb",优秀奖:"#64748b"};function P0({grade:n}){return n?h.jsx(Ii,{color:y5[n]??"var(--text-3)",className:Gn,children:n}):null}function W0({role:n}){return n?h.jsx(I_,{className:Gn,children:n}):null}function I0(){return h.jsx(Ii,{color:"var(--danger)",className:Gn,children:"负面"})}const Z5=[{name:"tag",label:"通用"},{name:"graduation-cap",label:"学业"},{name:"trophy",label:"竞赛"},{name:"flask-conical",label:"科研"},{name:"briefcase",label:"实习"},{name:"network",label:"学生工作"},{name:"heart-handshake",label:"志愿"},{name:"palette",label:"文体"},{name:"award",label:"荣誉"},{name:"file-badge",label:"证书"},{name:"star",label:"收藏"},{name:"shield-alert",label:"惩处"},{name:"book-open",label:"阅读"},{name:"code-2",label:"技术"},{name:"languages",label:"语言"},{name:"mic-2",label:"文艺"},{name:"pen-line",label:"发表"},{name:"rocket",label:"项目"},{name:"users",label:"团队"},{name:"building-2",label:"组织"},{name:"dumbbell",label:"体育"}],p5={tag:v0,"graduation-cap":p0,trophy:v4,"flask-conical":hE,briefcase:Q3,network:qE,"heart-handshake":pE,palette:BE,award:H3,"file-badge":cE,star:f4,"shield-alert":i4,"book-open":L3,"code-2":nE,languages:TE,"mic-2":DE,"pen-line":YE,rocket:FE,users:S4,"building-2":Y3,dumbbell:sE};function v5({name:n,color:r,size:s=14,className:o}){const f=p5[n]??v0;return h.jsx(f,{size:s,color:r,className:o,strokeWidth:2})}const fg=new Map,g5=25*1024*1024;async function b5(n){const r=fg.get(n.id);if(r)return r;const s=await eo(n.id);return(n.size??0)<=g5&&fg.set(n.id,s),s}function dg(n){const r=(n.mime||"").toLowerCase(),s=(n.file_name.split(".").pop()||"").toLowerCase();return r.startsWith("image/")||["png","jpg","jpeg","gif","webp","bmp","svg"].includes(s)?"image":r==="application/pdf"||s==="pdf"?"pdf":s==="docx"||r.includes("wordprocessingml")?"docx":s==="xlsx"||s==="xls"||r.includes("spreadsheetml")||r==="application/vnd.ms-excel"?"xlsx":r.startsWith("audio/")||["mp3","wav","m4a","flac","ogg"].includes(s)?"audio":r.startsWith("video/")||["mp4","mov","webm","mkv"].includes(s)?"video":r.startsWith("text/")||["txt","md","csv","json","log","srt"].includes(s)?"text":"other"}function x5(n){return Uint8Array.from(atob(n),r=>r.charCodeAt(0))}const S5={image:"图片",pdf:"PDF 文档",text:"文本文件",audio:"音频",video:"视频",docx:"Word 文档(.docx)",xlsx:"Excel 表格(.xlsx)",other:"该类型暂不支持在线预览"};function e1({att:n,onClose:r}){const s=oo(),[o,f]=E.useState(!1),[m,d]=E.useState(""),[p,b]=E.useState(null);E.useEffect(()=>{if(!n){b(null),d("");return}let x=!1;const g=[];return f(!0),d(""),b(null),(async()=>{try{const _=dg(n),k=n.remote_url||null;if(k&&(_==="image"||_==="pdf"||_==="audio"||_==="video")){b({kind:_,objectUrl:k}),f(!1);return}let K=n.mime??void 0,q;if(k)q=new Uint8Array(await(await fetch(k)).arrayBuffer());else{const D=await b5(n);K=D.mime,q=x5(D.data_b64)}if(x)return;if(_==="text"){const D=new TextDecoder().decode(q);b({kind:_,text:D.length>4e5?D.slice(0,4e5)+`
-…(已截断)`:D})}else if(_==="docx"){const H=(await(await vl(()=>import("./mammoth.browser-DXSEnqlw.js").then(Q=>Q.m),[])).convertToHtml({arrayBuffer:q.buffer})).value;if(x)return;b({kind:_,html:H})}else if(_==="xlsx"){const D=await vl(()=>import("./xlsx-CbTSpprj.js"),[]),H=D.read(q,{type:"array"}),Q=D.utils.sheet_to_html(H.Sheets[H.SheetNames[0]]);if(x)return;b({kind:_,html:Q})}else{const D=URL.createObjectURL(new Blob([q],{type:K||"application/octet-stream"}));if(x){URL.revokeObjectURL(D);return}g.push(D),b({kind:_,objectUrl:D})}}catch(_){x||d(_.message||"预览加载失败")}finally{x||f(!1)}})(),()=>{x=!0,g.forEach(_=>URL.revokeObjectURL(_))}},[n==null?void 0:n.id,n==null?void 0:n.file_name,n==null?void 0:n.remote_url]);const v=n?dg(n):"other";return h.jsxs(so,{open:!!n,onClose:r,width:v==="image"||v==="pdf"?880:680,title:(n?"附件预览 · "+n.file_name:"附件预览")+(n?"("+S5[v]+")":""),footer:n?h.jsxs(h.Fragment,{children:[h.jsxs(zt,{variant:"secondary",className:"mr-auto",onClick:()=>{(async()=>{try{const{blob:x,file_name:g}=await j0(n.id),_=URL.createObjectURL(x),k=document.createElement("a");k.href=_,k.download=g,k.click(),setTimeout(()=>URL.revokeObjectURL(_),6e4),s("success","已下载:"+g)}catch(x){s("error","下载失败:"+x.message)}})()},children:[h.jsx(uE,{size:13})," 下载"]}),h.jsx(zt,{variant:"primary",onClick:r,children:"关闭"})]}):null,children:[o&&h.jsxs("div",{className:"flex items-center justify-center gap-2 py-16 text-[13px] text-ink-3",children:[h.jsx(CE,{className:"animate-spin",size:16})," 正在加载预览…"]}),!o&&!!m&&h.jsx("div",{className:"py-10 text-center text-[13px] text-danger",children:m}),!o&&!m&&p&&h.jsxs(h.Fragment,{children:[p.kind==="image"&&h.jsx("img",{src:p.objectUrl,alt:n==null?void 0:n.file_name,className:"mx-auto max-h-[72vh] rounded-md"}),p.kind==="pdf"&&h.jsx("iframe",{src:p.objectUrl,title:n==null?void 0:n.file_name,className:"h-[72vh] w-full rounded-md border border-line bg-white"}),p.kind==="audio"&&h.jsx("audio",{controls:!0,src:p.objectUrl,className:"w-full"}),p.kind==="video"&&h.jsx("video",{controls:!0,src:p.objectUrl,className:"max-h-[70vh] w-full rounded-md bg-black"}),p.kind==="text"&&h.jsx("pre",{className:"max-h-[68vh] overflow-auto whitespace-pre-wrap rounded-md bg-surface-2 p-3 text-[12.5px] leading-relaxed text-ink-1",children:p.text}),(p.kind==="docx"||p.kind==="xlsx")&&h.jsx("div",{className:"max-h-[70vh] overflow-auto rounded-md border border-line bg-white p-4 text-[13px] leading-relaxed [&_img]:max-w-full [&_table]:border-collapse [&_td]:border [&_td]:border-line [&_td]:px-2 [&_td]:py-1 [&_th]:border [&_th]:border-line [&_th]:px-2 [&_th]:py-1",dangerouslySetInnerHTML:{__html:p.html||""}}),p.kind==="other"&&h.jsxs("div",{className:"py-10 text-center",children:[h.jsx("p",{className:"text-[13px] text-ink-2",children:"该文件类型暂不支持在线预览"}),h.jsx("p",{className:"mt-1 text-[12px] text-ink-3",children:"请点击左下角「下载」,用本地应用打开"})]})]})]})}function E5({value:n,onChange:r,placeholder:s}){const[o,f]=E.useState(""),m=()=>{const p=o.trim();p&&!n.includes(p)&&r([...n,p]),f("")},d=p=>{p.key==="Enter"||p.key===","?(p.preventDefault(),m()):p.key==="Backspace"&&!o&&n.length&&r(n.slice(0,-1))};return h.jsxs("div",{className:gl("flex min-h-8 w-full flex-wrap items-center gap-1 rounded-md border border-line bg-surface px-1.5 py-1","transition-colors hover:border-line-strong focus-within:border-brand"),children:[n.map(p=>h.jsxs("span",{className:"inline-flex items-center gap-0.5 rounded-sm bg-surface-3 px-1.5 text-[12px] text-ink-2",children:[p,h.jsx("button",{type:"button",className:"text-ink-3 hover:text-ink-1",onClick:()=>r(n.filter(b=>b!==p)),children:h.jsx(g0,{size:11})})]},p)),h.jsx("input",{className:"min-w-[80px] flex-1 border-0 bg-transparent text-[13px] outline-none placeholder:text-ink-3",value:o,placeholder:n.length?"":s??"输入后回车添加",onChange:p=>f(p.target.value),onKeyDown:d,onBlur:m})]})}function hg(n,r){return n.options?Array.isArray(n.options)?n.options.map(s=>({value:s,label:s})):r[n.options.taxonomy]??[]:[]}function _5({fields:n,value:r,onChange:s,taxonomies:o}){if(!n.length)return null;const f=(d,p)=>s({...r,[d]:p}),m=d=>{const p=r[d.key],b=d.required&&(p==null||p==="")?"该项必填":"",v=x=>d.unit?h.jsxs("div",{className:"flex items-center gap-2",children:[x,h.jsx("span",{className:"text-[12px] text-ink-3 shrink-0",children:d.unit})]}):x;switch(d.widget){case"textarea":return h.jsx(De,{label:d.label,required:d.required,hint:b,children:h.jsx(Cd,{value:String(p??""),onChange:x=>f(d.key,x.target.value),placeholder:d.placeholder})},d.key);case"number":return h.jsx(De,{label:d.label,required:d.required,hint:b,children:v(h.jsx(nt,{type:"number",step:"any",className:"num",value:p==null?"":String(p),onChange:x=>f(d.key,x.target.value===""?void 0:Number(x.target.value))}))},d.key);case"date":return h.jsx(De,{label:d.label,required:d.required,hint:b,children:h.jsx(nt,{type:"date",value:String(p??""),onChange:x=>f(d.key,x.target.value)})},d.key);case"select":return h.jsx(De,{label:d.label,required:d.required,hint:b,children:h.jsx(ml,{value:String(p??""),onChange:x=>f(d.key,x.target.value||void 0),options:[{value:"",label:"请选择"},...hg(d,o)]})},d.key);case"multiselect":{const x=hg(d,o),g=Array.isArray(p)?p:[];return h.jsx(De,{label:d.label,required:d.required,hint:b,children:h.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[x.map(_=>{const k=g.includes(_.value);return h.jsx("button",{type:"button",className:"rounded-sm border px-2 py-0.5 text-[12px] transition-colors "+(k?"border-brand bg-brand-subtle text-brand-text":"border-line bg-surface text-ink-2 hover:border-line-strong"),onClick:()=>f(d.key,k?g.filter(K=>K!==_.value):[...g,_.value]),children:_.label},_.value)}),!x.length&&h.jsx("span",{className:"text-[12px] text-ink-3",children:"未配置选项"})]})},d.key)}case"link":return h.jsx(De,{label:d.label,required:d.required,hint:b||"关联记录功能规划中,暂以文本记录",children:h.jsx(nt,{value:String(p??""),onChange:x=>f(d.key,x.target.value),placeholder:d.placeholder})},d.key);default:return h.jsx(De,{label:d.label,required:d.required,hint:b,children:h.jsx(nt,{value:String(p??""),onChange:x=>f(d.key,x.target.value),placeholder:d.placeholder})},d.key)}};return h.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-3 gap-y-3.5",children:n.map(d=>h.jsx("div",{className:d.widget==="textarea"?"sm:col-span-2":"",children:m(d)},d.key))})}function mg(n){return n?n.slice(0,16).replace("T"," "):""}function T5(n,r){const s=n?n.slice(0,10):"",o=r?r.slice(0,10):"";return s&&o?s+" ~ "+o:s?s+(r===""?"":" 起"):o?"至 "+o:""}function wd(n){return n<1024?n+" B":n<1024*1024?(n/1024).toFixed(1)+" KB":(n/1024/1024).toFixed(1)+" MB"}function t1(n,r,s=480,o=.82){return new Promise((f,m)=>{const d=new Image;d.onload=()=>{try{const p=Math.min(1,s/Math.max(d.naturalWidth,d.naturalHeight)),b=Math.max(1,Math.round(d.naturalWidth*p)),v=Math.max(1,Math.round(d.naturalHeight*p)),x=document.createElement("canvas");x.width=b,x.height=v;const g=x.getContext("2d");if(!g)return m(new Error("canvas 不可用"));g.drawImage(d,0,0,b,v),f(x.toDataURL("image/webp",o))}catch(p){m(p instanceof Error?p:new Error(String(p)))}},d.onerror=()=>m(new Error("图片解码失败")),d.src="data:"+r+";base64,"+n})}function yg({items:n,pending:r,onPick:s,onDeleteSaved:o,onDeletePending:f,onOpenSaved:m,uploading:d}){const p=E.useRef(null),b=n.length+r.length;return h.jsxs("div",{className:"rounded-md border border-line bg-surface-2 p-3",children:[h.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-1.5 text-[12px] font-medium text-ink-2",children:[h.jsx(Kd,{size:13}),"附件(",b,")"]}),h.jsx(zt,{size:"sm",variant:"secondary",disabled:d,onClick:()=>{var v;return(v=p.current)==null?void 0:v.click()},children:d?"上传中…":"添加文件"}),h.jsx("input",{ref:p,type:"file",multiple:!0,className:"hidden",onChange:v=>{var x;(x=v.target.files)!=null&&x.length&&s(v.target.files),v.target.value=""}})]}),h.jsxs("div",{className:"flex flex-col gap-1",children:[n.map(v=>h.jsxs("div",{className:"flex items-center gap-2 rounded-sm bg-surface px-2 py-1.5 text-[12px]",children:[h.jsx(y0,{size:13,className:"text-ink-3 shrink-0"}),h.jsx("span",{className:"truncate "+(m?"cursor-pointer text-ink-1 hover:text-brand-text hover:underline":"text-ink-1"),onClick:()=>m==null?void 0:m(v),title:v.file_name,children:v.file_name}),h.jsx("span",{className:"num ml-auto shrink-0 text-ink-3",children:wd(v.size)}),h.jsx("button",{className:"text-ink-3 hover:text-danger shrink-0",onClick:()=>o(v.id),"aria-label":"删除附件",children:h.jsx(Ed,{size:13})})]},"s"+v.id)),r.map((v,x)=>{var g;return h.jsxs("div",{className:"flex items-center gap-2 rounded-sm bg-surface px-2 py-1.5 text-[12px]",children:[(g=v.mime)!=null&&g.startsWith("image/")&&v.preview?h.jsx("img",{src:v.preview,alt:v.file_name,className:"size-7 shrink-0 rounded object-cover"}):h.jsx(gE,{size:13,className:"text-ink-3 shrink-0"}),h.jsx("span",{className:"truncate text-ink-1",children:v.file_name}),h.jsx("span",{className:"text-[11px] text-brand-text",children:"待上传"}),h.jsx("span",{className:"num ml-auto shrink-0 text-ink-3",children:wd(v.size)}),h.jsx("button",{className:"text-ink-3 hover:text-danger shrink-0",onClick:()=>f(x),"aria-label":"移除",children:h.jsx(Ed,{size:13})})]},"p"+x)}),!b&&h.jsx("div",{className:"py-1 text-[12px] text-ink-3",children:"证书扫描件、照片、文档等佐证材料"})]})]})}async function pg(n){var d,p,b,v;let r=n;if(n.type==="image/jpeg"&&n.size>3*1024*1024)try{const x=await createImageBitmap(n),g=Math.min(1,2560/Math.max(x.width,x.height)),_=document.createElement("canvas");_.width=Math.round(x.width*g),_.height=Math.round(x.height*g),(d=_.getContext("2d"))==null||d.drawImage(x,0,0,_.width,_.height);const k=await new Promise(K=>_.toBlob(K,"image/jpeg",.85));k&&k.size{const _=new FileReader;_.onload=()=>x(String(_.result||"")),_.onerror=()=>g(new Error("读取文件失败")),_.readAsDataURL(r)}),o=s.indexOf(","),f=o>=0?s.slice(o+1):s;let m;if((b=n.type)!=null&&b.startsWith("image/")&&!n.type.includes("gif"))try{m=(await t1(f,n.type)).split(",")[1]||void 0}catch{m=void 0}return{file:r,file_name:n.name,mime:r.type||void 0,size:r.size,data_b64:f,thumb_b64:m,preview:(v=n.type)!=null&&v.startsWith("image/")?URL.createObjectURL(n):void 0}}const Ps={竞赛:{core:["level","award_grade","role","organizer"]},科研:{core:["level","role","organizer"]},实习实践:{core:["organizer"]},学生工作:{core:["role","organizer"]},志愿公益:{core:["organizer"]},文体活动:{core:["level","organizer"]},证书技能:{core:["level","organizer"]},荣誉惩处:{core:["award_grade","level","organizer"]},学业:{core:["rank"]}},vg={core:["level","role","award_grade","organizer"]},J5=[{value:"",label:"通用布局(级别/角色/奖等/组织方)"},...Object.keys(Ps).map(n=>({value:n,label:n+"式布局"}))];function N5(n,r){return r&&Ps[r]?Ps[r]:n?Ps[n]??vg:vg}const gg={type_id:null,title:"",organizer:"",start_date:"",end_date:"",status:"draft",role:"",level:"",award_grade:"",rank:"",polarity:"positive",weight:"3",description:"",result:"",tags:[],dimension_ids:[],group_id:"",parent_id:"",extras:{}},C5=["特等奖","一等奖","二等奖","三等奖","优秀奖","无"],bg=80*1024*1024,w5=[{value:"draft",label:"草稿"},{value:"ongoing",label:"进行中"},{value:"submitted",label:"已提交待果"},{value:"finished",label:"已完结"}];function j5({open:n,onClose:r,footprintId:s,onSaved:o}){var ie,Ne,re,V,ee;const f=lu(),m=oo(),[d,p]=E.useState(gg),[b,v]=E.useState([]),[x,g]=E.useState(!1),[_,k]=E.useState(null),[K,q]=E.useState(""),D=yl({queryKey:["types"],queryFn:ro,enabled:n}),H=yl({queryKey:["taxonomy-all"],queryFn:()=>E0(),enabled:n}),Q=yl({queryKey:["dimensions"],queryFn:Wd,enabled:n}),Z=yl({queryKey:["footprint",s],queryFn:()=>Id(s),enabled:n&&!!s}),J=yl({queryKey:["attachments",s],queryFn:()=>C0(s),enabled:n&&!!s}),Y=E.useMemo(()=>{var R;return(R=D.data)==null?void 0:R.items.find(ae=>ae.id===d.type_id)},[D.data,d.type_id]),de=N5(Y==null?void 0:Y.name,Y==null?void 0:Y.profile),F=yl({queryKey:["parent-candidates",d.type_id],queryFn:()=>_0({types:d.type_id?[d.type_id]:void 0,page_size:200,sort:"date_desc"}),enabled:n&&!!d.type_id});E.useEffect(()=>{if(n)if(q(""),v([]),s&&Z.data){const R=Z.data.item;p({type_id:R.type_id,title:R.title,organizer:R.organizer??"",start_date:(R.start_date??"").slice(0,10),end_date:(R.end_date??"").slice(0,10),status:R.status,role:R.role??"",level:R.level??"",award_grade:R.award_grade??"",rank:R.rank!=null?String(R.rank):"",polarity:R.polarity,weight:String(R.weight??3),description:R.description??"",result:R.result??"",tags:R.tags??[],dimension_ids:R.dimensions??[],group_id:R.group_id??"",parent_id:R.parent_id!=null?String(R.parent_id):"",extras:R.extras??{}})}else p(gg)},[n,s,Z.data]);const U=E.useMemo(()=>{var ae,X;const R={};for(const ke of((ae=H.data)==null?void 0:ae.items)??[])(R[X=ke.kind]??(R[X]=[])).push({value:ke.value,label:ke.value});return R},[H.data]),I=Sd({mutationFn:async()=>{if(!d.type_id)throw new Error("请选择记录类型");if(!d.title.trim())throw new Error("请填写标题");const R={};for(const ke of(Y==null?void 0:Y.form_template)??[])if(ke.metric&&ke.widget==="number"){const Nt=d.extras[ke.key];typeof Nt=="number"&&!Number.isNaN(Nt)&&(R[ke.metric]=Nt)}const ae={id:s??void 0,type_id:d.type_id,title:d.title.trim(),organizer:d.organizer||null,start_date:d.start_date||null,end_date:d.end_date||null,status:d.status,role:d.role||null,level:d.level||null,award_grade:d.award_grade&&d.award_grade!=="无"?d.award_grade:null,rank:d.rank?Number(d.rank):null,polarity:d.polarity,description:d.description,result:d.result,tags:d.tags,dimension_ids:d.dimension_ids,group_id:d.group_id||null,parent_id:d.parent_id?Number(d.parent_id):null,weight:Number(d.weight)||3,extras:d.extras,metrics:R},X=await T0(ae);for(const ke of b)await Td(X.id,ke.file,ke.thumb_b64);return X.id},onSuccess:R=>{f.invalidateQueries({queryKey:["footprints"]}),f.invalidateQueries({queryKey:["timeline"]}),f.invalidateQueries({queryKey:["stats"]}),f.invalidateQueries({queryKey:["footprint"]}),f.invalidateQueries({queryKey:["attachments",R]}),f.invalidateQueries({queryKey:["types"]}),m("success",s?"记录已更新":"记录已创建"),o==null||o(R),r()},onError:R=>q(R.message)}),le=(R,ae)=>p(X=>({...X,[R]:ae})),Ve=Sd({mutationFn:R=>w0(R),onSuccess:()=>void f.invalidateQueries({queryKey:["attachments",s]})}),Fe=R=>R==="organizer"?h.jsx(De,{label:"组织方 / 所在组织",children:h.jsx(nt,{value:d.organizer,onChange:ae=>le("organizer",ae.target.value),placeholder:"如:中国工业与应用数学学会"})},"organizer"):R==="role"?h.jsx(De,{label:"角色",children:h.jsx(ml,{value:d.role,onChange:ae=>le("role",ae.target.value),options:[{value:"",label:"未设置"},...U.role??[]]})},"role"):R==="level"?h.jsx(De,{label:"级别",children:h.jsx(ml,{value:d.level,onChange:ae=>le("level",ae.target.value),options:[{value:"",label:"未设置"},...U.level??[]]})},"level"):R==="award_grade"?h.jsx(De,{label:"奖等",children:h.jsx(ml,{value:d.award_grade,onChange:ae=>le("award_grade",ae.target.value),options:[{value:"",label:"未设置"},...C5.map(ae=>({value:ae,label:ae}))]})},"award_grade"):R==="rank"?h.jsx(De,{label:"名次",children:h.jsx(nt,{type:"number",className:"num",value:d.rank,onChange:ae=>le("rank",ae.target.value),placeholder:"如 2"})},"rank"):null;return h.jsxs(so,{open:n,onClose:r,width:760,title:s?"编辑记录":"新建记录",footer:h.jsxs(h.Fragment,{children:[K&&h.jsx("span",{className:"mr-auto text-[12px] text-danger",children:K}),h.jsx(zt,{variant:"secondary",onClick:r,children:"取消"}),h.jsx(zt,{variant:"primary",onClick:()=>I.mutate(),disabled:I.isPending,children:I.isPending?"保存中…":"保存"})]}),children:[h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-[200px_1fr] gap-x-3 gap-y-3.5",children:[h.jsx(De,{label:"类型",required:!0,children:h.jsx(ml,{value:d.type_id!=null?String(d.type_id):"",onChange:R=>le("type_id",R.target.value?Number(R.target.value):null),options:[{value:"",label:"请选择"},...(((ie=D.data)==null?void 0:ie.items)??[]).map(R=>({value:String(R.id),label:R.name}))]})}),h.jsx(De,{label:"标题",required:!0,children:h.jsx(nt,{value:d.title,onChange:R=>le("title",R.target.value),placeholder:"事项名称,如:2025 全国大学生数学建模竞赛"})})]}),h.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-x-3 gap-y-3.5",children:[h.jsx(De,{label:"开始日期",children:h.jsx(nt,{type:"date",value:d.start_date,onChange:R=>le("start_date",R.target.value)})}),h.jsx(De,{label:"结束日期",children:h.jsx(nt,{type:"date",value:d.end_date,onChange:R=>le("end_date",R.target.value)})}),h.jsx(De,{label:"状态",children:h.jsx(ml,{value:d.status,onChange:R=>le("status",R.target.value),options:w5})})]}),h.jsxs("div",{className:"border-t border-line pt-4",children:[h.jsxs("div",{className:"mb-3 flex items-center gap-2 text-[12px] font-semibold text-ink-2",children:["类型要素",Y?" · "+Y.name:""]}),h.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-3 gap-y-3.5",children:de.core.map(R=>Fe(R))}),Y&&Y.form_template.length>0&&h.jsxs("div",{className:"mt-3.5",children:[h.jsx("div",{className:"mb-2 text-[11.5px] text-ink-3",children:"专项信息"}),h.jsx(_5,{fields:Y.form_template,value:d.extras,onChange:R=>le("extras",R),taxonomies:U})]})]}),h.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-3 gap-y-3.5 border-t border-line pt-4",children:[h.jsx(De,{label:"工作内容 / 描述",children:h.jsx(Cd,{value:d.description,onChange:R=>le("description",R.target.value),placeholder:"具体做了什么、承担什么分工"})}),h.jsx(De,{label:"结果 / 产出",children:h.jsx(Cd,{value:d.result,onChange:R=>le("result",R.target.value),placeholder:"获奖等级、成果、最终产品等"})})]}),h.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-3 gap-y-3.5 border-t border-line pt-4",children:[h.jsx(De,{label:"标签",children:h.jsx(E5,{value:d.tags,onChange:R=>le("tags",R)})}),h.jsx(De,{label:"成长维度",children:h.jsxs("div",{className:"flex flex-wrap gap-1.5 min-h-8 items-center",children:[(((Ne=Q.data)==null?void 0:Ne.items)??[]).map(R=>{const ae=d.dimension_ids.includes(R.id);return h.jsx("button",{type:"button",className:"rounded-sm border px-2 py-0.5 text-[12px] transition-colors "+(ae?"border-brand bg-brand-subtle text-brand-text":"border-line bg-surface text-ink-2 hover:border-line-strong"),onClick:()=>le("dimension_ids",ae?d.dimension_ids.filter(X=>X!==R.id):[...d.dimension_ids,R.id]),children:R.name},R.id)}),!((re=Q.data)!=null&&re.items.length)&&h.jsx("span",{className:"text-[12px] text-ink-3",children:"尚未配置维度(配置页可添加)"})]})})]}),h.jsxs("details",{className:"border-t border-line pt-4",children:[h.jsx("summary",{className:"cursor-pointer select-none text-[12px] text-ink-3 transition-colors hover:text-ink-2",children:"高级选项(重要度 · 名次 · 性质 · 关联)"}),h.jsxs("div",{className:"mt-3 grid grid-cols-2 sm:grid-cols-4 gap-x-3 gap-y-3.5",children:[h.jsx(De,{label:"重要度",children:h.jsx(ml,{value:d.weight,onChange:R=>le("weight",R.target.value),options:[1,2,3,4,5].map(R=>({value:String(R),label:String(R)}))})}),!de.core.includes("rank")&&h.jsx(De,{label:"名次",children:h.jsx(nt,{type:"number",className:"num",value:d.rank,onChange:R=>le("rank",R.target.value),placeholder:"如 2"})}),h.jsx(De,{label:"性质",children:h.jsx(ml,{value:d.polarity,onChange:R=>le("polarity",R.target.value),options:[{value:"positive",label:"正面"},{value:"negative",label:"负面"}]})}),h.jsx(De,{label:"上级记录",hint:"晋升链",children:h.jsx(ml,{value:d.parent_id,onChange:R=>le("parent_id",R.target.value),options:[{value:"",label:"无"},...(((V=F.data)==null?void 0:V.items)??[]).filter(R=>R.id!==s).map(R=>({value:String(R.id),label:R.title.slice(0,24)}))]})})]}),h.jsx("div",{className:"mt-3 grid grid-cols-1 sm:grid-cols-2 gap-x-3",children:h.jsx(De,{label:"事件组 ID",hint:"同一场事件的多条记录共享",children:h.jsx(nt,{value:d.group_id,onChange:R=>le("group_id",R.target.value),placeholder:"如 g2025001(可选)"})})})]}),s?h.jsxs("div",{className:"border-t border-line pt-4",children:[h.jsx(yg,{items:((ee=J.data)==null?void 0:ee.items)??[],pending:b,uploading:x,onPick:async R=>{if(s){g(!0);try{let ae=0;for(const X of Array.from(R)){if(X.size>bg){m("error","「"+X.name+"」超过 80MB,已跳过");continue}const ke=await pg(X);await Td(s,ke.file,ke.thumb_b64),ae++}ae>0&&(f.invalidateQueries({queryKey:["attachments",s]}),m("success","已上传 "+ae+" 个附件"))}catch(ae){m("error",ae.message)}finally{g(!1)}}},onDeleteSaved:R=>Ve.mutate(R),onDeletePending:()=>{},onOpenSaved:R=>k(R)}),h.jsx("div",{className:"mt-1.5 text-[11px] text-ink-3",children:"点击文件名可在线预览(图片 · PDF · 文本 · Word · Excel · 音视频)· 单个文件不超过 80MB"})]}):h.jsxs("div",{className:"border-t border-line pt-4",children:[h.jsx(yg,{items:[],pending:b,onPick:async R=>{const ae=[];for(const X of Array.from(R)){if(X.size>bg){m("error","「"+X.name+"」超过 80MB,已跳过");continue}ae.push(await pg(X))}v(X=>[...X,...ae])},onDeleteSaved:()=>{},onDeletePending:R=>v(ae=>ae.filter((X,ke)=>ke!==R))}),h.jsx("div",{className:"mt-1.5 text-[11px] text-ink-3",children:"保存记录时将一并上传 · 单个文件不超过 80MB"})]})]}),h.jsx(e1,{att:_,onClose:()=>k(null)})]})}const ki=new Map;function z5({open:n,onClose:r,footprintId:s,onEdit:o}){var U,I,le,Ve,Fe;const f=lu(),m=oo(),d=yl({queryKey:["footprint",s],queryFn:()=>Id(s),enabled:n&&!!s}),p=yl({queryKey:["types"],queryFn:ro,enabled:n}),b=yl({queryKey:["dimensions"],queryFn:Wd,enabled:n}),v=(U=d.data)==null?void 0:U.item,x=(I=p.data)==null?void 0:I.items.find(ie=>ie.id===(v==null?void 0:v.type_id)),g=((v==null?void 0:v.dimensions)??[]).map(ie=>{var Ne,re;return(re=(Ne=b.data)==null?void 0:Ne.items.find(V=>V.id===ie))==null?void 0:re.name}).filter(Boolean),[_,k]=E.useState(!1),[K,q]=E.useState(null),D=Sd({mutationFn:()=>vl(()=>Promise.resolve().then(()=>i_),void 0).then(ie=>ie.footprintDelete(s)),onSuccess:()=>{f.invalidateQueries({queryKey:["footprints"]}),f.invalidateQueries({queryKey:["timeline"]}),f.invalidateQueries({queryKey:["stats"]}),m("success","记录已删除"),k(!1),r()}}),[H,Q]=E.useState({}),Z=(v==null?void 0:v.attachments)??[],J=Z.filter(ie=>{var Ne;return(Ne=ie.mime)==null?void 0:Ne.startsWith("image/")}),Y=Z.filter(ie=>{var Ne;return!((Ne=ie.mime)!=null&&Ne.startsWith("image/"))}),de=Z.map(ie=>ie.id).join(",");E.useEffect(()=>{if(!n||!de)return;let ie=!1;const Ne=Z.filter(re=>{var V;return(V=re.mime)==null?void 0:V.startsWith("image/")});return(async()=>{for(const re of Ne){if(ie)return;if(ki.has(re.id)){Q(V=>({...V,[re.id]:ki.get(re.id)}));continue}if(re.remote_thumb){ki.set(re.id,re.remote_thumb),Q(V=>({...V,[re.id]:re.remote_thumb}));continue}try{if(re.thumb_rel_path){const V=await z0(re.id);if(ie)return;const ee="data:"+(V.mime||"image/webp")+";base64,"+V.data_b64;ki.set(re.id,ee),Q(R=>({...R,[re.id]:ee}))}else{const V=await eo(re.id);if(ie)return;const ee=await t1(V.data_b64,V.mime||"image/png");ki.set(re.id,ee),Q(R=>({...R,[re.id]:ee}))}}catch{try{const V=await eo(re.id);if(ie)return;const ee="data:"+(V.mime||"image/png")+";base64,"+V.data_b64;ki.set(re.id,ee),Q(R=>({...R,[re.id]:ee}))}catch{}}}})(),()=>{ie=!0}},[n,s,de]);const F=[];if(v&&x)for(const ie of x.form_template??[]){const Ne=(v.extras??{})[ie.key];if(Ne==null||Ne==="")continue;const re=Array.isArray(Ne)?Ne.join("、"):String(Ne);F.push({label:ie.label,value:ie.unit?re+" "+ie.unit:re})}return h.jsxs(so,{open:n,onClose:r,width:680,title:"记录详情",footer:v?h.jsxs(h.Fragment,{children:[h.jsxs(zt,{variant:"danger-ghost",className:"mr-auto",onClick:()=>k(!0),disabled:D.isPending,children:[h.jsx(Ed,{size:13})," 删除"]}),h.jsx(zt,{variant:"secondary",onClick:r,children:"关闭"}),h.jsxs(zt,{variant:"primary",onClick:()=>s&&(o==null?void 0:o(s)),children:[h.jsx(XE,{size:13})," 编辑"]})]}):null,children:[d.isLoading||!v?h.jsx("div",{className:"py-10 text-center text-[13px] text-ink-3",children:"加载中…"}):h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsxs("div",{children:[h.jsx("h2",{className:"text-[20px] font-bold leading-tight tracking-tight text-ink-1",style:{textWrap:"balance"},children:v.title}),h.jsxs("div",{className:"mt-2.5 flex flex-wrap items-center gap-1.5",children:[h.jsx(Ii,{color:v.type_color,className:Gn,children:v.type_name}),h.jsx($0,{level:v.level}),h.jsx(P0,{grade:v.award_grade}),h.jsx(W0,{role:v.role}),h.jsx(F0,{status:v.status}),v.polarity==="negative"&&h.jsx(I0,{}),v.rank!=null&&h.jsxs(Ii,{color:"var(--text-3)",className:Gn,children:["第 ",v.rank," 名"]})]})]}),h.jsx(Hi,{title:"事项要素",children:h.jsxs("div",{className:"grid grid-cols-1 gap-x-4 gap-y-2 rounded-md border border-line bg-surface-2 px-3 py-2.5 text-[12.5px] sm:grid-cols-2",children:[h.jsx(nd,{label:"时间",value:T5(v.start_date,v.end_date)||"—"}),h.jsx(nd,{label:"组织方",value:v.organizer||"—"}),F.map(ie=>h.jsx(nd,{label:ie.label,value:ie.value},ie.label))]})}),(((le=v.attachments)==null?void 0:le.length)??0)>0&&h.jsx(Hi,{title:"附件("+(((Ve=v.attachments)==null?void 0:Ve.length)??0)+")",children:Z.length?h.jsxs("div",{className:"flex flex-col gap-2.5",children:[J.length>0&&h.jsx("div",{className:"grid grid-cols-3 gap-2 sm:grid-cols-4",children:J.map(ie=>h.jsxs("button",{className:"group relative aspect-square overflow-hidden rounded-md border border-line bg-surface-2",onClick:()=>q(ie),title:"点击预览:"+ie.file_name,children:[H[ie.id]?h.jsx("img",{src:H[ie.id],alt:ie.file_name,loading:"lazy",className:"h-full w-full object-cover transition-transform duration-200 group-hover:scale-[1.04]"}):h.jsx("div",{className:"h-full w-full animate-pulse bg-surface-3"}),h.jsx("span",{className:"absolute inset-x-0 bottom-0 truncate bg-gradient-to-t from-black/60 to-transparent px-1.5 pb-1 pt-3 text-[10px] text-white opacity-0 transition-opacity group-hover:opacity-100",children:ie.file_name})]},ie.id))}),Y.length>0&&h.jsx("div",{className:"flex flex-col gap-1",children:Y.map(ie=>h.jsxs("button",{className:"flex items-center gap-2 rounded-md border border-line bg-surface px-2.5 py-2 text-left text-[12.5px] transition-colors hover:border-line-strong",onClick:()=>q(ie),children:[h.jsx(y0,{size:14,className:"shrink-0 text-ink-3"}),h.jsx("span",{className:"truncate text-ink-1",children:ie.file_name}),h.jsx("span",{className:"num ml-auto shrink-0 text-ink-3",children:wd(ie.size)}),h.jsx(Kd,{size:12,className:"shrink-0 text-ink-3"})]},ie.id))}),h.jsx("div",{className:"text-[11px] text-ink-3",children:"点击图片 / 文件可在线预览(图片 · PDF · 文本 · Word · Excel · 音视频)"})]}):h.jsx("p",{className:"text-[12px] text-ink-3",children:"暂无佐证附件"})}),v.description&&h.jsx(Hi,{title:"工作内容 / 描述",children:h.jsx("p",{className:"whitespace-pre-wrap text-[13px] leading-relaxed text-ink-2",children:v.description})}),v.result&&h.jsx(Hi,{title:"结果 / 产出",children:h.jsx("p",{className:"whitespace-pre-wrap rounded-md bg-success-subtle px-3 py-2 text-[13px] leading-relaxed text-success",children:v.result})}),v.metrics&&Object.keys(v.metrics).length>0&&h.jsx(Hi,{title:"量化指标",children:h.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(v.metrics).map(([ie,Ne])=>h.jsxs("span",{className:"num rounded-sm border border-line bg-surface-2 px-2 py-0.5 text-[12px] text-ink-2",children:[ie,": ",h.jsx("span",{className:"font-medium text-ink-1",children:Ne})]},ie))})}),((((Fe=v.tags)==null?void 0:Fe.length)??0)>0||g.length>0)&&h.jsx(Hi,{title:"标签与维度",children:h.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[v.tags.map(ie=>h.jsx("span",{className:"rounded-sm bg-surface-3 px-1.5 py-0.5 text-[12px] text-ink-2",children:ie},ie)),g.map(ie=>h.jsx("span",{className:"rounded-sm border border-brand/30 bg-brand-subtle px-1.5 py-0.5 text-[12px] text-brand-text",children:ie},ie))]})}),h.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 border-t border-line pt-3 text-[11.5px] text-ink-3",children:[h.jsxs("span",{children:["创建于 ",mg(v.created_at)]}),h.jsxs("span",{children:["更新于 ",mg(v.updated_at)]}),v.group_id&&h.jsxs("span",{children:["事件组 ",v.group_id]}),v.parent_id!=null&&h.jsxs("span",{children:["上级 #",v.parent_id]})]})]}),h.jsx(e1,{att:K,onClose:()=>q(null)}),h.jsx(a5,{open:_,title:"删除记录",content:v?"确定删除「"+v.title+"」吗?该操作不可撤销。":"",onCancel:()=>k(!1),onOk:()=>D.mutate(),loading:D.isPending})]})}function nd({label:n,value:r}){return h.jsxs("div",{className:"grid min-w-0 grid-cols-[76px_1fr] gap-x-2.5",children:[h.jsx("span",{className:"shrink-0 text-right text-ink-3",children:n}),h.jsx("span",{className:"min-w-0 truncate font-medium text-ink-1",title:r,children:r})]})}function Hi({title:n,children:r}){return h.jsxs("div",{children:[h.jsx("div",{className:"mb-1.5 text-[12px] font-semibold text-ink-2",children:n}),r]})}function O5(){var Y,de,F;const[n,r]=E.useState(""),[s,o]=E.useState(""),[f,m]=E.useState(""),[d,p]=E.useState(""),[b,v]=E.useState(null),[x,g]=E.useState(!1),[_,k]=E.useState(null),[K,q]=E.useState(!1),D=yl({queryKey:["types"],queryFn:ro}),H=E.useMemo(()=>({q:n||void 0,types:s?[Number(s)]:void 0,year:f?Number(f):void 0,polarity:d||void 0,sort:"date_desc",page_size:2e3}),[n,s,f,d]),Q=yl({queryKey:["timeline",H],queryFn:()=>N0(H)}),Z=E.useMemo(()=>{var I;const U=new Set;for(const le of((I=Q.data)==null?void 0:I.groups)??[])U.add(le.year);return Array.from(U).sort((le,Ve)=>Ve-le)},[Q.data]),J=U=>{k(U),q(!0)};return h.jsxs("div",{className:"mx-auto max-w-[880px] px-3 py-4 sm:px-6 sm:py-5",children:[h.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[h.jsx(nt,{className:"w-full sm:w-[220px]",placeholder:"搜索足迹…",value:n,onChange:U=>r(U.target.value)}),h.jsxs("div",{className:"grid w-full grid-cols-2 gap-2 sm:flex sm:w-auto sm:items-center sm:gap-2",children:[h.jsx(ml,{className:"w-full sm:w-[130px]",value:s,onChange:U=>o(U.target.value),options:[{value:"",label:"全部类型"},...(((Y=D.data)==null?void 0:Y.items)??[]).map(U=>({value:String(U.id),label:U.name}))]}),h.jsx(ml,{className:"w-full sm:w-[120px]",value:f,onChange:U=>m(U.target.value),options:[{value:"",label:"全部年份"},...Z.map(U=>({value:String(U),label:U+" 年"}))]}),h.jsx(ml,{className:"w-full sm:w-[110px]",value:d,onChange:U=>p(U.target.value),options:[{value:"",label:"全部性质"},{value:"positive",label:"正面"},{value:"negative",label:"负面"}]})]}),h.jsxs("span",{className:"num ml-auto text-[12px] text-ink-3",children:["共 ",((de=Q.data)==null?void 0:de.total)??0," 条"]})]}),Q.isLoading?h.jsx("div",{className:"py-16 text-center text-[13px] text-ink-3",children:"加载中…"}):(F=Q.data)!=null&&F.groups.length?h.jsxs("div",{className:"relative",children:[h.jsx("div",{className:"absolute bottom-0 left-[7px] top-0 w-px bg-line","aria-hidden":!0}),Q.data.groups.map(U=>h.jsxs("section",{className:"mb-2",children:[h.jsxs("div",{className:"sticky top-0 z-10 -mx-3 flex items-center gap-2 bg-bg/90 px-3 py-2 backdrop-blur sm:-mx-6 sm:px-6",children:[h.jsx("span",{className:"num text-[16px] font-semibold text-ink-1",children:U.year}),h.jsxs("span",{className:"text-[12px] text-ink-3",children:[U.count," 条记录"]})]}),U.months.map(I=>h.jsxs("div",{className:"mb-3",children:[h.jsxs("div",{className:"mb-2 pl-6 text-[12px] font-medium text-ink-3",children:[I.month," 月"]}),h.jsx("div",{className:"flex flex-col gap-2",children:I.items.map(le=>h.jsx(R5,{row:le,onClick:()=>J(le.id)},le.id))})]},I.month))]},U.year))]}):h.jsx(e5,{icon:h.jsx(m0,{size:36,strokeWidth:1.5}),title:"暂无足迹",description:"点击右上角「新建记录」,开始记录你的第一段足迹。"}),h.jsx(z5,{open:K,onClose:()=>q(!1),footprintId:_,onEdit:U=>{q(!1),v(U),g(!0)}}),h.jsx(j5,{open:x,onClose:()=>g(!1),footprintId:b})]})}function R5({row:n,onClick:r}){const s=(n.start_date??n.created_at).slice(0,10);return h.jsxs("button",{onClick:r,className:"group relative w-full rounded-lg border border-line bg-surface px-4 py-3 text-left shadow-card transition-all hover:border-line-strong hover:shadow-pop",children:[h.jsx("span",{className:"absolute left-0 top-3 bottom-3 w-[3px] rounded-full",style:{backgroundColor:n.type_color},"aria-hidden":!0}),h.jsxs("div",{className:"flex items-start gap-3",children:[h.jsxs("div",{className:"num w-[52px] shrink-0 pt-0.5 text-[12px] leading-relaxed text-ink-3",children:[s.slice(5,7),"-",s.slice(8,10)]}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[h.jsx("span",{className:"text-[13.5px] font-medium text-ink-1 group-hover:text-brand-text",children:n.title}),h.jsx(Ii,{color:n.type_color,children:n.type_name}),h.jsx($0,{level:n.level}),h.jsx(P0,{grade:n.award_grade}),h.jsx(W0,{role:n.role}),h.jsx(F0,{status:n.status}),n.polarity==="negative"&&h.jsx(I0,{})]}),n.organizer&&h.jsx("div",{className:"mt-0.5 text-[12px] text-ink-3",children:n.organizer}),n.description&&h.jsx("p",{className:"mt-1 line-clamp-2 text-[12.5px] leading-relaxed text-ink-2",children:n.description}),(n.result||n.tags.length>0||n.attachment_count>0)&&h.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-[11.5px] text-ink-3",children:[n.result&&h.jsxs("span",{className:"text-success",children:["结果:",n.result]}),n.tags.map(o=>h.jsx("span",{className:"rounded-sm bg-surface-3 px-1.5 py-px",children:o},o)),n.attachment_count>0&&h.jsxs("span",{className:"inline-flex items-center gap-1",children:[h.jsx(Kd,{size:11}),n.attachment_count]})]})]}),h.jsx("div",{className:"shrink-0 pt-1 text-ink-3",children:h.jsx(v5,{name:n.type_icon,color:n.type_color,size:16})})]})]})}const A5=E.lazy(()=>vl(()=>import("./RecordsPage-DBOIy5Dt.js"),[]).then(n=>({default:n.RecordsPage}))),M5=E.lazy(()=>vl(()=>import("./DashboardPage-Cf6y5AYb.js"),__vite__mapDeps([0,1,2,3])).then(n=>({default:n.DashboardPage}))),D5=E.lazy(()=>vl(()=>import("./GradesPage-mGpFf5D_.js"),__vite__mapDeps([4,1,2,3])).then(n=>({default:n.GradesPage}))),U5=E.lazy(()=>vl(()=>import("./TypesPage-QsBhkhzA.js"),__vite__mapDeps([5,1])).then(n=>({default:n.TypesPage}))),k5=E.lazy(()=>vl(()=>import("./TaxonomyPage-CdYiqX0H.js"),__vite__mapDeps([6,1])).then(n=>({default:n.TaxonomyPage}))),H5=E.lazy(()=>vl(()=>import("./AdminPage-Cg6x5tmL.js"),__vite__mapDeps([7,1])).then(n=>({default:n.AdminPage}))),q5=E.lazy(()=>vl(()=>import("./ProfilePage-qVI0OyG4.js"),[]).then(n=>({default:n.ProfilePage}))),L5=E.lazy(()=>vl(()=>import("./ResumePage-q1_lGC_L.js"),__vite__mapDeps([8,1,9])).then(n=>({default:n.ResumePage}))),B5=E.lazy(()=>vl(()=>import("./AssessmentPage-DXSU24FA.js"),__vite__mapDeps([10,9])).then(n=>({default:n.AssessmentPage})));function da(){return h.jsx("div",{className:"py-16 text-center text-[13px] text-ink-3",children:"加载中…"})}function Q5(){return h.jsx(dS,{children:h.jsxs(Yt,{element:h.jsx(h5,{}),children:[h.jsx(Yt,{path:"/",element:h.jsx(Vv,{to:"/timeline",replace:!0})}),h.jsx(Yt,{path:"/timeline",element:h.jsx(O5,{})}),h.jsx(Yt,{path:"/records",element:h.jsx(E.Suspense,{fallback:h.jsx(da,{}),children:h.jsx(A5,{})})}),h.jsx(Yt,{path:"/grades",element:h.jsx(E.Suspense,{fallback:h.jsx(da,{}),children:h.jsx(D5,{})})}),h.jsx(Yt,{path:"/dashboard",element:h.jsx(E.Suspense,{fallback:h.jsx(da,{}),children:h.jsx(M5,{})})}),h.jsx(Yt,{path:"/types",element:h.jsx(E.Suspense,{fallback:h.jsx(da,{}),children:h.jsx(U5,{})})}),h.jsx(Yt,{path:"/taxonomy",element:h.jsx(E.Suspense,{fallback:h.jsx(da,{}),children:h.jsx(k5,{})})}),h.jsx(Yt,{path:"/admin",element:h.jsx(E.Suspense,{fallback:h.jsx(da,{}),children:h.jsx(H5,{})})}),h.jsx(Yt,{path:"/profile",element:h.jsx(E.Suspense,{fallback:h.jsx(da,{}),children:h.jsx(q5,{})})}),h.jsx(Yt,{path:"/resume",element:h.jsx(E.Suspense,{fallback:h.jsx(da,{}),children:h.jsx(L5,{})})}),h.jsx(Yt,{path:"/assessment",element:h.jsx(E.Suspense,{fallback:h.jsx(da,{}),children:h.jsx(B5,{})})}),h.jsx(Yt,{path:"*",element:h.jsx(Vv,{to:"/timeline",replace:!0})})]})})}const G5=new b3({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!0,staleTime:0,gcTime:0}}}),xg=localStorage.getItem("fp-theme");(xg==="dark"||!xg&&window.matchMedia("(prefers-color-scheme: dark)").matches)&&document.documentElement.classList.add("dark");function l1(){var r;const n=getComputedStyle(document.documentElement).getPropertyValue("--bg").trim();n&&((r=document.querySelector('meta[name="theme-color"]'))==null||r.setAttribute("content",n))}l1();window.addEventListener("fp-theme-change",l1);"serviceWorker"in navigator&&!("__TAURI_INTERNALS__"in window)&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").catch(()=>{})});o2.createRoot(document.getElementById("root")).render(h.jsx(l2.StrictMode,{children:h.jsx(ZS,{client:G5,children:h.jsx(HS,{children:h.jsx(Q5,{})})})}));export{Ol as $,B4 as A,zt as B,a5 as C,H4 as D,e5 as E,q4 as F,P0 as G,so as H,nt as I,De as J,L4 as K,$0 as L,k4 as M,v5 as N,N4 as O,ZE as P,Z5 as Q,W0 as R,ml as S,Ed as T,J5 as U,C4 as V,w4 as W,j4 as X,z4 as Y,O4 as Z,Wd as _,gl as a,pl as a0,g0 as a1,wd as a2,J4 as a3,F4 as a4,$4 as a5,I4 as a6,W4 as a7,P4 as a8,vl as a9,Z4 as aa,K4 as ab,b4 as ac,Cd as ad,n_ as ae,a_ as af,l_ as ag,uE as ah,C0 as ai,z0 as aj,V5 as ak,Ag as al,i_ as am,KS as b,pe as c,oo as d,X5 as e,yl as f,Sd as g,T5 as h,F0 as i,h as j,mg as k,XE as l,Ii as m,z5 as n,j5 as o,R4 as p,ro as q,E as r,E0 as s,A4 as t,lu as u,_0 as v,p0 as w,Q4 as x,G4 as y,t_ as z};
+…(已截断)`:D})}else if(_==="docx"){const H=(await(await vl(()=>import("./mammoth.browser-CHj5V251.js").then(Q=>Q.m),[])).convertToHtml({arrayBuffer:q.buffer})).value;if(x)return;b({kind:_,html:H})}else if(_==="xlsx"){const D=await vl(()=>import("./xlsx-CbTSpprj.js"),[]),H=D.read(q,{type:"array"}),Q=D.utils.sheet_to_html(H.Sheets[H.SheetNames[0]]);if(x)return;b({kind:_,html:Q})}else{const D=URL.createObjectURL(new Blob([q],{type:K||"application/octet-stream"}));if(x){URL.revokeObjectURL(D);return}g.push(D),b({kind:_,objectUrl:D})}}catch(_){x||d(_.message||"预览加载失败")}finally{x||f(!1)}})(),()=>{x=!0,g.forEach(_=>URL.revokeObjectURL(_))}},[n==null?void 0:n.id,n==null?void 0:n.file_name,n==null?void 0:n.remote_url]);const v=n?dg(n):"other";return h.jsxs(so,{open:!!n,onClose:r,width:v==="image"||v==="pdf"?880:680,title:(n?"附件预览 · "+n.file_name:"附件预览")+(n?"("+S5[v]+")":""),footer:n?h.jsxs(h.Fragment,{children:[h.jsxs(zt,{variant:"secondary",className:"mr-auto",onClick:()=>{(async()=>{try{const{blob:x,file_name:g}=await j0(n.id),_=URL.createObjectURL(x),k=document.createElement("a");k.href=_,k.download=g,k.click(),setTimeout(()=>URL.revokeObjectURL(_),6e4),s("success","已下载:"+g)}catch(x){s("error","下载失败:"+x.message)}})()},children:[h.jsx(uE,{size:13})," 下载"]}),h.jsx(zt,{variant:"primary",onClick:r,children:"关闭"})]}):null,children:[o&&h.jsxs("div",{className:"flex items-center justify-center gap-2 py-16 text-[13px] text-ink-3",children:[h.jsx(CE,{className:"animate-spin",size:16})," 正在加载预览…"]}),!o&&!!m&&h.jsx("div",{className:"py-10 text-center text-[13px] text-danger",children:m}),!o&&!m&&p&&h.jsxs(h.Fragment,{children:[p.kind==="image"&&h.jsx("img",{src:p.objectUrl,alt:n==null?void 0:n.file_name,className:"mx-auto max-h-[72vh] rounded-md"}),p.kind==="pdf"&&h.jsx("iframe",{src:p.objectUrl,title:n==null?void 0:n.file_name,className:"h-[72vh] w-full rounded-md border border-line bg-white"}),p.kind==="audio"&&h.jsx("audio",{controls:!0,src:p.objectUrl,className:"w-full"}),p.kind==="video"&&h.jsx("video",{controls:!0,src:p.objectUrl,className:"max-h-[70vh] w-full rounded-md bg-black"}),p.kind==="text"&&h.jsx("pre",{className:"max-h-[68vh] overflow-auto whitespace-pre-wrap rounded-md bg-surface-2 p-3 text-[12.5px] leading-relaxed text-ink-1",children:p.text}),(p.kind==="docx"||p.kind==="xlsx")&&h.jsx("div",{className:"max-h-[70vh] overflow-auto rounded-md border border-line bg-white p-4 text-[13px] leading-relaxed [&_img]:max-w-full [&_table]:border-collapse [&_td]:border [&_td]:border-line [&_td]:px-2 [&_td]:py-1 [&_th]:border [&_th]:border-line [&_th]:px-2 [&_th]:py-1",dangerouslySetInnerHTML:{__html:p.html||""}}),p.kind==="other"&&h.jsxs("div",{className:"py-10 text-center",children:[h.jsx("p",{className:"text-[13px] text-ink-2",children:"该文件类型暂不支持在线预览"}),h.jsx("p",{className:"mt-1 text-[12px] text-ink-3",children:"请点击左下角「下载」,用本地应用打开"})]})]})]})}function E5({value:n,onChange:r,placeholder:s}){const[o,f]=E.useState(""),m=()=>{const p=o.trim();p&&!n.includes(p)&&r([...n,p]),f("")},d=p=>{p.key==="Enter"||p.key===","?(p.preventDefault(),m()):p.key==="Backspace"&&!o&&n.length&&r(n.slice(0,-1))};return h.jsxs("div",{className:gl("flex min-h-8 w-full flex-wrap items-center gap-1 rounded-md border border-line bg-surface px-1.5 py-1","transition-colors hover:border-line-strong focus-within:border-brand"),children:[n.map(p=>h.jsxs("span",{className:"inline-flex items-center gap-0.5 rounded-sm bg-surface-3 px-1.5 text-[12px] text-ink-2",children:[p,h.jsx("button",{type:"button",className:"text-ink-3 hover:text-ink-1",onClick:()=>r(n.filter(b=>b!==p)),children:h.jsx(g0,{size:11})})]},p)),h.jsx("input",{className:"min-w-[80px] flex-1 border-0 bg-transparent text-[13px] outline-none placeholder:text-ink-3",value:o,placeholder:n.length?"":s??"输入后回车添加",onChange:p=>f(p.target.value),onKeyDown:d,onBlur:m})]})}function hg(n,r){return n.options?Array.isArray(n.options)?n.options.map(s=>({value:s,label:s})):r[n.options.taxonomy]??[]:[]}function _5({fields:n,value:r,onChange:s,taxonomies:o}){if(!n.length)return null;const f=(d,p)=>s({...r,[d]:p}),m=d=>{const p=r[d.key],b=d.required&&(p==null||p==="")?"该项必填":"",v=x=>d.unit?h.jsxs("div",{className:"flex items-center gap-2",children:[x,h.jsx("span",{className:"text-[12px] text-ink-3 shrink-0",children:d.unit})]}):x;switch(d.widget){case"textarea":return h.jsx(De,{label:d.label,required:d.required,hint:b,children:h.jsx(Cd,{value:String(p??""),onChange:x=>f(d.key,x.target.value),placeholder:d.placeholder})},d.key);case"number":return h.jsx(De,{label:d.label,required:d.required,hint:b,children:v(h.jsx(nt,{type:"number",step:"any",className:"num",value:p==null?"":String(p),onChange:x=>f(d.key,x.target.value===""?void 0:Number(x.target.value))}))},d.key);case"date":return h.jsx(De,{label:d.label,required:d.required,hint:b,children:h.jsx(nt,{type:"date",value:String(p??""),onChange:x=>f(d.key,x.target.value)})},d.key);case"select":return h.jsx(De,{label:d.label,required:d.required,hint:b,children:h.jsx(ml,{value:String(p??""),onChange:x=>f(d.key,x.target.value||void 0),options:[{value:"",label:"请选择"},...hg(d,o)]})},d.key);case"multiselect":{const x=hg(d,o),g=Array.isArray(p)?p:[];return h.jsx(De,{label:d.label,required:d.required,hint:b,children:h.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[x.map(_=>{const k=g.includes(_.value);return h.jsx("button",{type:"button",className:"rounded-sm border px-2 py-0.5 text-[12px] transition-colors "+(k?"border-brand bg-brand-subtle text-brand-text":"border-line bg-surface text-ink-2 hover:border-line-strong"),onClick:()=>f(d.key,k?g.filter(K=>K!==_.value):[...g,_.value]),children:_.label},_.value)}),!x.length&&h.jsx("span",{className:"text-[12px] text-ink-3",children:"未配置选项"})]})},d.key)}case"link":return h.jsx(De,{label:d.label,required:d.required,hint:b||"关联记录功能规划中,暂以文本记录",children:h.jsx(nt,{value:String(p??""),onChange:x=>f(d.key,x.target.value),placeholder:d.placeholder})},d.key);default:return h.jsx(De,{label:d.label,required:d.required,hint:b,children:h.jsx(nt,{value:String(p??""),onChange:x=>f(d.key,x.target.value),placeholder:d.placeholder})},d.key)}};return h.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-3 gap-y-3.5",children:n.map(d=>h.jsx("div",{className:d.widget==="textarea"?"sm:col-span-2":"",children:m(d)},d.key))})}function mg(n){return n?n.slice(0,16).replace("T"," "):""}function T5(n,r){const s=n?n.slice(0,10):"",o=r?r.slice(0,10):"";return s&&o?s+" ~ "+o:s?s+(r===""?"":" 起"):o?"至 "+o:""}function wd(n){return n<1024?n+" B":n<1024*1024?(n/1024).toFixed(1)+" KB":(n/1024/1024).toFixed(1)+" MB"}function t1(n,r,s=480,o=.82){return new Promise((f,m)=>{const d=new Image;d.onload=()=>{try{const p=Math.min(1,s/Math.max(d.naturalWidth,d.naturalHeight)),b=Math.max(1,Math.round(d.naturalWidth*p)),v=Math.max(1,Math.round(d.naturalHeight*p)),x=document.createElement("canvas");x.width=b,x.height=v;const g=x.getContext("2d");if(!g)return m(new Error("canvas 不可用"));g.drawImage(d,0,0,b,v),f(x.toDataURL("image/webp",o))}catch(p){m(p instanceof Error?p:new Error(String(p)))}},d.onerror=()=>m(new Error("图片解码失败")),d.src="data:"+r+";base64,"+n})}function yg({items:n,pending:r,onPick:s,onDeleteSaved:o,onDeletePending:f,onOpenSaved:m,uploading:d}){const p=E.useRef(null),b=n.length+r.length;return h.jsxs("div",{className:"rounded-md border border-line bg-surface-2 p-3",children:[h.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-1.5 text-[12px] font-medium text-ink-2",children:[h.jsx(Kd,{size:13}),"附件(",b,")"]}),h.jsx(zt,{size:"sm",variant:"secondary",disabled:d,onClick:()=>{var v;return(v=p.current)==null?void 0:v.click()},children:d?"上传中…":"添加文件"}),h.jsx("input",{ref:p,type:"file",multiple:!0,className:"hidden",onChange:v=>{var x;(x=v.target.files)!=null&&x.length&&s(v.target.files),v.target.value=""}})]}),h.jsxs("div",{className:"flex flex-col gap-1",children:[n.map(v=>h.jsxs("div",{className:"flex items-center gap-2 rounded-sm bg-surface px-2 py-1.5 text-[12px]",children:[h.jsx(y0,{size:13,className:"text-ink-3 shrink-0"}),h.jsx("span",{className:"truncate "+(m?"cursor-pointer text-ink-1 hover:text-brand-text hover:underline":"text-ink-1"),onClick:()=>m==null?void 0:m(v),title:v.file_name,children:v.file_name}),h.jsx("span",{className:"num ml-auto shrink-0 text-ink-3",children:wd(v.size)}),h.jsx("button",{className:"text-ink-3 hover:text-danger shrink-0",onClick:()=>o(v.id),"aria-label":"删除附件",children:h.jsx(Ed,{size:13})})]},"s"+v.id)),r.map((v,x)=>{var g;return h.jsxs("div",{className:"flex items-center gap-2 rounded-sm bg-surface px-2 py-1.5 text-[12px]",children:[(g=v.mime)!=null&&g.startsWith("image/")&&v.preview?h.jsx("img",{src:v.preview,alt:v.file_name,className:"size-7 shrink-0 rounded object-cover"}):h.jsx(gE,{size:13,className:"text-ink-3 shrink-0"}),h.jsx("span",{className:"truncate text-ink-1",children:v.file_name}),h.jsx("span",{className:"text-[11px] text-brand-text",children:"待上传"}),h.jsx("span",{className:"num ml-auto shrink-0 text-ink-3",children:wd(v.size)}),h.jsx("button",{className:"text-ink-3 hover:text-danger shrink-0",onClick:()=>f(x),"aria-label":"移除",children:h.jsx(Ed,{size:13})})]},"p"+x)}),!b&&h.jsx("div",{className:"py-1 text-[12px] text-ink-3",children:"证书扫描件、照片、文档等佐证材料"})]})]})}async function pg(n){var d,p,b,v;let r=n;if(n.type==="image/jpeg"&&n.size>3*1024*1024)try{const x=await createImageBitmap(n),g=Math.min(1,2560/Math.max(x.width,x.height)),_=document.createElement("canvas");_.width=Math.round(x.width*g),_.height=Math.round(x.height*g),(d=_.getContext("2d"))==null||d.drawImage(x,0,0,_.width,_.height);const k=await new Promise(K=>_.toBlob(K,"image/jpeg",.85));k&&k.size{const _=new FileReader;_.onload=()=>x(String(_.result||"")),_.onerror=()=>g(new Error("读取文件失败")),_.readAsDataURL(r)}),o=s.indexOf(","),f=o>=0?s.slice(o+1):s;let m;if((b=n.type)!=null&&b.startsWith("image/")&&!n.type.includes("gif"))try{m=(await t1(f,n.type)).split(",")[1]||void 0}catch{m=void 0}return{file:r,file_name:n.name,mime:r.type||void 0,size:r.size,data_b64:f,thumb_b64:m,preview:(v=n.type)!=null&&v.startsWith("image/")?URL.createObjectURL(n):void 0}}const Ps={竞赛:{core:["level","award_grade","role","organizer"]},科研:{core:["level","role","organizer"]},实习实践:{core:["organizer"]},学生工作:{core:["role","organizer"]},志愿公益:{core:["organizer"]},文体活动:{core:["level","organizer"]},证书技能:{core:["level","organizer"]},荣誉惩处:{core:["award_grade","level","organizer"]},学业:{core:["rank"]}},vg={core:["level","role","award_grade","organizer"]},J5=[{value:"",label:"通用布局(级别/角色/奖等/组织方)"},...Object.keys(Ps).map(n=>({value:n,label:n+"式布局"}))];function N5(n,r){return r&&Ps[r]?Ps[r]:n?Ps[n]??vg:vg}const gg={type_id:null,title:"",organizer:"",start_date:"",end_date:"",status:"draft",role:"",level:"",award_grade:"",rank:"",polarity:"positive",weight:"3",description:"",result:"",tags:[],dimension_ids:[],group_id:"",parent_id:"",extras:{}},C5=["特等奖","一等奖","二等奖","三等奖","优秀奖","无"],bg=80*1024*1024,w5=[{value:"draft",label:"草稿"},{value:"ongoing",label:"进行中"},{value:"submitted",label:"已提交待果"},{value:"finished",label:"已完结"}];function j5({open:n,onClose:r,footprintId:s,onSaved:o}){var ie,Ne,re,V,ee;const f=lu(),m=oo(),[d,p]=E.useState(gg),[b,v]=E.useState([]),[x,g]=E.useState(!1),[_,k]=E.useState(null),[K,q]=E.useState(""),D=yl({queryKey:["types"],queryFn:ro,enabled:n}),H=yl({queryKey:["taxonomy-all"],queryFn:()=>E0(),enabled:n}),Q=yl({queryKey:["dimensions"],queryFn:Wd,enabled:n}),Z=yl({queryKey:["footprint",s],queryFn:()=>Id(s),enabled:n&&!!s}),J=yl({queryKey:["attachments",s],queryFn:()=>C0(s),enabled:n&&!!s}),Y=E.useMemo(()=>{var R;return(R=D.data)==null?void 0:R.items.find(ae=>ae.id===d.type_id)},[D.data,d.type_id]),de=N5(Y==null?void 0:Y.name,Y==null?void 0:Y.profile),F=yl({queryKey:["parent-candidates",d.type_id],queryFn:()=>_0({types:d.type_id?[d.type_id]:void 0,page_size:200,sort:"date_desc"}),enabled:n&&!!d.type_id});E.useEffect(()=>{if(n)if(q(""),v([]),s&&Z.data){const R=Z.data.item;p({type_id:R.type_id,title:R.title,organizer:R.organizer??"",start_date:(R.start_date??"").slice(0,10),end_date:(R.end_date??"").slice(0,10),status:R.status,role:R.role??"",level:R.level??"",award_grade:R.award_grade??"",rank:R.rank!=null?String(R.rank):"",polarity:R.polarity,weight:String(R.weight??3),description:R.description??"",result:R.result??"",tags:R.tags??[],dimension_ids:R.dimensions??[],group_id:R.group_id??"",parent_id:R.parent_id!=null?String(R.parent_id):"",extras:R.extras??{}})}else p(gg)},[n,s,Z.data]);const U=E.useMemo(()=>{var ae,X;const R={};for(const ke of((ae=H.data)==null?void 0:ae.items)??[])(R[X=ke.kind]??(R[X]=[])).push({value:ke.value,label:ke.value});return R},[H.data]),I=Sd({mutationFn:async()=>{if(!d.type_id)throw new Error("请选择记录类型");if(!d.title.trim())throw new Error("请填写标题");const R={};for(const ke of(Y==null?void 0:Y.form_template)??[])if(ke.metric&&ke.widget==="number"){const Nt=d.extras[ke.key];typeof Nt=="number"&&!Number.isNaN(Nt)&&(R[ke.metric]=Nt)}const ae={id:s??void 0,type_id:d.type_id,title:d.title.trim(),organizer:d.organizer||null,start_date:d.start_date||null,end_date:d.end_date||null,status:d.status,role:d.role||null,level:d.level||null,award_grade:d.award_grade&&d.award_grade!=="无"?d.award_grade:null,rank:d.rank?Number(d.rank):null,polarity:d.polarity,description:d.description,result:d.result,tags:d.tags,dimension_ids:d.dimension_ids,group_id:d.group_id||null,parent_id:d.parent_id?Number(d.parent_id):null,weight:Number(d.weight)||3,extras:d.extras,metrics:R},X=await T0(ae);for(const ke of b)await Td(X.id,ke.file,ke.thumb_b64);return X.id},onSuccess:R=>{f.invalidateQueries({queryKey:["footprints"]}),f.invalidateQueries({queryKey:["timeline"]}),f.invalidateQueries({queryKey:["stats"]}),f.invalidateQueries({queryKey:["footprint"]}),f.invalidateQueries({queryKey:["attachments",R]}),f.invalidateQueries({queryKey:["types"]}),m("success",s?"记录已更新":"记录已创建"),o==null||o(R),r()},onError:R=>q(R.message)}),le=(R,ae)=>p(X=>({...X,[R]:ae})),Ve=Sd({mutationFn:R=>w0(R),onSuccess:()=>void f.invalidateQueries({queryKey:["attachments",s]})}),Fe=R=>R==="organizer"?h.jsx(De,{label:"组织方 / 所在组织",children:h.jsx(nt,{value:d.organizer,onChange:ae=>le("organizer",ae.target.value),placeholder:"如:中国工业与应用数学学会"})},"organizer"):R==="role"?h.jsx(De,{label:"角色",children:h.jsx(ml,{value:d.role,onChange:ae=>le("role",ae.target.value),options:[{value:"",label:"未设置"},...U.role??[]]})},"role"):R==="level"?h.jsx(De,{label:"级别",children:h.jsx(ml,{value:d.level,onChange:ae=>le("level",ae.target.value),options:[{value:"",label:"未设置"},...U.level??[]]})},"level"):R==="award_grade"?h.jsx(De,{label:"奖等",children:h.jsx(ml,{value:d.award_grade,onChange:ae=>le("award_grade",ae.target.value),options:[{value:"",label:"未设置"},...C5.map(ae=>({value:ae,label:ae}))]})},"award_grade"):R==="rank"?h.jsx(De,{label:"名次",children:h.jsx(nt,{type:"number",className:"num",value:d.rank,onChange:ae=>le("rank",ae.target.value),placeholder:"如 2"})},"rank"):null;return h.jsxs(so,{open:n,onClose:r,width:760,title:s?"编辑记录":"新建记录",footer:h.jsxs(h.Fragment,{children:[K&&h.jsx("span",{className:"mr-auto text-[12px] text-danger",children:K}),h.jsx(zt,{variant:"secondary",onClick:r,children:"取消"}),h.jsx(zt,{variant:"primary",onClick:()=>I.mutate(),disabled:I.isPending,children:I.isPending?"保存中…":"保存"})]}),children:[h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-[200px_1fr] gap-x-3 gap-y-3.5",children:[h.jsx(De,{label:"类型",required:!0,children:h.jsx(ml,{value:d.type_id!=null?String(d.type_id):"",onChange:R=>le("type_id",R.target.value?Number(R.target.value):null),options:[{value:"",label:"请选择"},...(((ie=D.data)==null?void 0:ie.items)??[]).map(R=>({value:String(R.id),label:R.name}))]})}),h.jsx(De,{label:"标题",required:!0,children:h.jsx(nt,{value:d.title,onChange:R=>le("title",R.target.value),placeholder:"事项名称,如:2025 全国大学生数学建模竞赛"})})]}),h.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-x-3 gap-y-3.5",children:[h.jsx(De,{label:"开始日期",children:h.jsx(nt,{type:"date",value:d.start_date,onChange:R=>le("start_date",R.target.value)})}),h.jsx(De,{label:"结束日期",children:h.jsx(nt,{type:"date",value:d.end_date,onChange:R=>le("end_date",R.target.value)})}),h.jsx(De,{label:"状态",children:h.jsx(ml,{value:d.status,onChange:R=>le("status",R.target.value),options:w5})})]}),h.jsxs("div",{className:"border-t border-line pt-4",children:[h.jsxs("div",{className:"mb-3 flex items-center gap-2 text-[12px] font-semibold text-ink-2",children:["类型要素",Y?" · "+Y.name:""]}),h.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-3 gap-y-3.5",children:de.core.map(R=>Fe(R))}),Y&&Y.form_template.length>0&&h.jsxs("div",{className:"mt-3.5",children:[h.jsx("div",{className:"mb-2 text-[11.5px] text-ink-3",children:"专项信息"}),h.jsx(_5,{fields:Y.form_template,value:d.extras,onChange:R=>le("extras",R),taxonomies:U})]})]}),h.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-3 gap-y-3.5 border-t border-line pt-4",children:[h.jsx(De,{label:"工作内容 / 描述",children:h.jsx(Cd,{value:d.description,onChange:R=>le("description",R.target.value),placeholder:"具体做了什么、承担什么分工"})}),h.jsx(De,{label:"结果 / 产出",children:h.jsx(Cd,{value:d.result,onChange:R=>le("result",R.target.value),placeholder:"获奖等级、成果、最终产品等"})})]}),h.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-3 gap-y-3.5 border-t border-line pt-4",children:[h.jsx(De,{label:"标签",children:h.jsx(E5,{value:d.tags,onChange:R=>le("tags",R)})}),h.jsx(De,{label:"成长维度",children:h.jsxs("div",{className:"flex flex-wrap gap-1.5 min-h-8 items-center",children:[(((Ne=Q.data)==null?void 0:Ne.items)??[]).map(R=>{const ae=d.dimension_ids.includes(R.id);return h.jsx("button",{type:"button",className:"rounded-sm border px-2 py-0.5 text-[12px] transition-colors "+(ae?"border-brand bg-brand-subtle text-brand-text":"border-line bg-surface text-ink-2 hover:border-line-strong"),onClick:()=>le("dimension_ids",ae?d.dimension_ids.filter(X=>X!==R.id):[...d.dimension_ids,R.id]),children:R.name},R.id)}),!((re=Q.data)!=null&&re.items.length)&&h.jsx("span",{className:"text-[12px] text-ink-3",children:"尚未配置维度(配置页可添加)"})]})})]}),h.jsxs("details",{className:"border-t border-line pt-4",children:[h.jsx("summary",{className:"cursor-pointer select-none text-[12px] text-ink-3 transition-colors hover:text-ink-2",children:"高级选项(重要度 · 名次 · 性质 · 关联)"}),h.jsxs("div",{className:"mt-3 grid grid-cols-2 sm:grid-cols-4 gap-x-3 gap-y-3.5",children:[h.jsx(De,{label:"重要度",children:h.jsx(ml,{value:d.weight,onChange:R=>le("weight",R.target.value),options:[1,2,3,4,5].map(R=>({value:String(R),label:String(R)}))})}),!de.core.includes("rank")&&h.jsx(De,{label:"名次",children:h.jsx(nt,{type:"number",className:"num",value:d.rank,onChange:R=>le("rank",R.target.value),placeholder:"如 2"})}),h.jsx(De,{label:"性质",children:h.jsx(ml,{value:d.polarity,onChange:R=>le("polarity",R.target.value),options:[{value:"positive",label:"正面"},{value:"negative",label:"负面"}]})}),h.jsx(De,{label:"上级记录",hint:"晋升链",children:h.jsx(ml,{value:d.parent_id,onChange:R=>le("parent_id",R.target.value),options:[{value:"",label:"无"},...(((V=F.data)==null?void 0:V.items)??[]).filter(R=>R.id!==s).map(R=>({value:String(R.id),label:R.title.slice(0,24)}))]})})]}),h.jsx("div",{className:"mt-3 grid grid-cols-1 sm:grid-cols-2 gap-x-3",children:h.jsx(De,{label:"事件组 ID",hint:"同一场事件的多条记录共享",children:h.jsx(nt,{value:d.group_id,onChange:R=>le("group_id",R.target.value),placeholder:"如 g2025001(可选)"})})})]}),s?h.jsxs("div",{className:"border-t border-line pt-4",children:[h.jsx(yg,{items:((ee=J.data)==null?void 0:ee.items)??[],pending:b,uploading:x,onPick:async R=>{if(s){g(!0);try{let ae=0;for(const X of Array.from(R)){if(X.size>bg){m("error","「"+X.name+"」超过 80MB,已跳过");continue}const ke=await pg(X);await Td(s,ke.file,ke.thumb_b64),ae++}ae>0&&(f.invalidateQueries({queryKey:["attachments",s]}),m("success","已上传 "+ae+" 个附件"))}catch(ae){m("error",ae.message)}finally{g(!1)}}},onDeleteSaved:R=>Ve.mutate(R),onDeletePending:()=>{},onOpenSaved:R=>k(R)}),h.jsx("div",{className:"mt-1.5 text-[11px] text-ink-3",children:"点击文件名可在线预览(图片 · PDF · 文本 · Word · Excel · 音视频)· 单个文件不超过 80MB"})]}):h.jsxs("div",{className:"border-t border-line pt-4",children:[h.jsx(yg,{items:[],pending:b,onPick:async R=>{const ae=[];for(const X of Array.from(R)){if(X.size>bg){m("error","「"+X.name+"」超过 80MB,已跳过");continue}ae.push(await pg(X))}v(X=>[...X,...ae])},onDeleteSaved:()=>{},onDeletePending:R=>v(ae=>ae.filter((X,ke)=>ke!==R))}),h.jsx("div",{className:"mt-1.5 text-[11px] text-ink-3",children:"保存记录时将一并上传 · 单个文件不超过 80MB"})]})]}),h.jsx(e1,{att:_,onClose:()=>k(null)})]})}const ki=new Map;function z5({open:n,onClose:r,footprintId:s,onEdit:o}){var U,I,le,Ve,Fe;const f=lu(),m=oo(),d=yl({queryKey:["footprint",s],queryFn:()=>Id(s),enabled:n&&!!s}),p=yl({queryKey:["types"],queryFn:ro,enabled:n}),b=yl({queryKey:["dimensions"],queryFn:Wd,enabled:n}),v=(U=d.data)==null?void 0:U.item,x=(I=p.data)==null?void 0:I.items.find(ie=>ie.id===(v==null?void 0:v.type_id)),g=((v==null?void 0:v.dimensions)??[]).map(ie=>{var Ne,re;return(re=(Ne=b.data)==null?void 0:Ne.items.find(V=>V.id===ie))==null?void 0:re.name}).filter(Boolean),[_,k]=E.useState(!1),[K,q]=E.useState(null),D=Sd({mutationFn:()=>vl(()=>Promise.resolve().then(()=>i_),void 0).then(ie=>ie.footprintDelete(s)),onSuccess:()=>{f.invalidateQueries({queryKey:["footprints"]}),f.invalidateQueries({queryKey:["timeline"]}),f.invalidateQueries({queryKey:["stats"]}),m("success","记录已删除"),k(!1),r()}}),[H,Q]=E.useState({}),Z=(v==null?void 0:v.attachments)??[],J=Z.filter(ie=>{var Ne;return(Ne=ie.mime)==null?void 0:Ne.startsWith("image/")}),Y=Z.filter(ie=>{var Ne;return!((Ne=ie.mime)!=null&&Ne.startsWith("image/"))}),de=Z.map(ie=>ie.id).join(",");E.useEffect(()=>{if(!n||!de)return;let ie=!1;const Ne=Z.filter(re=>{var V;return(V=re.mime)==null?void 0:V.startsWith("image/")});return(async()=>{for(const re of Ne){if(ie)return;if(ki.has(re.id)){Q(V=>({...V,[re.id]:ki.get(re.id)}));continue}if(re.remote_thumb){ki.set(re.id,re.remote_thumb),Q(V=>({...V,[re.id]:re.remote_thumb}));continue}try{if(re.thumb_rel_path){const V=await z0(re.id);if(ie)return;const ee="data:"+(V.mime||"image/webp")+";base64,"+V.data_b64;ki.set(re.id,ee),Q(R=>({...R,[re.id]:ee}))}else{const V=await eo(re.id);if(ie)return;const ee=await t1(V.data_b64,V.mime||"image/png");ki.set(re.id,ee),Q(R=>({...R,[re.id]:ee}))}}catch{try{const V=await eo(re.id);if(ie)return;const ee="data:"+(V.mime||"image/png")+";base64,"+V.data_b64;ki.set(re.id,ee),Q(R=>({...R,[re.id]:ee}))}catch{}}}})(),()=>{ie=!0}},[n,s,de]);const F=[];if(v&&x)for(const ie of x.form_template??[]){const Ne=(v.extras??{})[ie.key];if(Ne==null||Ne==="")continue;const re=Array.isArray(Ne)?Ne.join("、"):String(Ne);F.push({label:ie.label,value:ie.unit?re+" "+ie.unit:re})}return h.jsxs(so,{open:n,onClose:r,width:680,title:"记录详情",footer:v?h.jsxs(h.Fragment,{children:[h.jsxs(zt,{variant:"danger-ghost",className:"mr-auto",onClick:()=>k(!0),disabled:D.isPending,children:[h.jsx(Ed,{size:13})," 删除"]}),h.jsx(zt,{variant:"secondary",onClick:r,children:"关闭"}),h.jsxs(zt,{variant:"primary",onClick:()=>s&&(o==null?void 0:o(s)),children:[h.jsx(XE,{size:13})," 编辑"]})]}):null,children:[d.isLoading||!v?h.jsx("div",{className:"py-10 text-center text-[13px] text-ink-3",children:"加载中…"}):h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsxs("div",{children:[h.jsx("h2",{className:"text-[20px] font-bold leading-tight tracking-tight text-ink-1",style:{textWrap:"balance"},children:v.title}),h.jsxs("div",{className:"mt-2.5 flex flex-wrap items-center gap-1.5",children:[h.jsx(Ii,{color:v.type_color,className:Gn,children:v.type_name}),h.jsx($0,{level:v.level}),h.jsx(P0,{grade:v.award_grade}),h.jsx(W0,{role:v.role}),h.jsx(F0,{status:v.status}),v.polarity==="negative"&&h.jsx(I0,{}),v.rank!=null&&h.jsxs(Ii,{color:"var(--text-3)",className:Gn,children:["第 ",v.rank," 名"]})]})]}),h.jsx(Hi,{title:"事项要素",children:h.jsxs("div",{className:"grid grid-cols-1 gap-x-4 gap-y-2 rounded-md border border-line bg-surface-2 px-3 py-2.5 text-[12.5px] sm:grid-cols-2",children:[h.jsx(nd,{label:"时间",value:T5(v.start_date,v.end_date)||"—"}),h.jsx(nd,{label:"组织方",value:v.organizer||"—"}),F.map(ie=>h.jsx(nd,{label:ie.label,value:ie.value},ie.label))]})}),(((le=v.attachments)==null?void 0:le.length)??0)>0&&h.jsx(Hi,{title:"附件("+(((Ve=v.attachments)==null?void 0:Ve.length)??0)+")",children:Z.length?h.jsxs("div",{className:"flex flex-col gap-2.5",children:[J.length>0&&h.jsx("div",{className:"grid grid-cols-3 gap-2 sm:grid-cols-4",children:J.map(ie=>h.jsxs("button",{className:"group relative aspect-square overflow-hidden rounded-md border border-line bg-surface-2",onClick:()=>q(ie),title:"点击预览:"+ie.file_name,children:[H[ie.id]?h.jsx("img",{src:H[ie.id],alt:ie.file_name,loading:"lazy",className:"h-full w-full object-cover transition-transform duration-200 group-hover:scale-[1.04]"}):h.jsx("div",{className:"h-full w-full animate-pulse bg-surface-3"}),h.jsx("span",{className:"absolute inset-x-0 bottom-0 truncate bg-gradient-to-t from-black/60 to-transparent px-1.5 pb-1 pt-3 text-[10px] text-white opacity-0 transition-opacity group-hover:opacity-100",children:ie.file_name})]},ie.id))}),Y.length>0&&h.jsx("div",{className:"flex flex-col gap-1",children:Y.map(ie=>h.jsxs("button",{className:"flex items-center gap-2 rounded-md border border-line bg-surface px-2.5 py-2 text-left text-[12.5px] transition-colors hover:border-line-strong",onClick:()=>q(ie),children:[h.jsx(y0,{size:14,className:"shrink-0 text-ink-3"}),h.jsx("span",{className:"truncate text-ink-1",children:ie.file_name}),h.jsx("span",{className:"num ml-auto shrink-0 text-ink-3",children:wd(ie.size)}),h.jsx(Kd,{size:12,className:"shrink-0 text-ink-3"})]},ie.id))}),h.jsx("div",{className:"text-[11px] text-ink-3",children:"点击图片 / 文件可在线预览(图片 · PDF · 文本 · Word · Excel · 音视频)"})]}):h.jsx("p",{className:"text-[12px] text-ink-3",children:"暂无佐证附件"})}),v.description&&h.jsx(Hi,{title:"工作内容 / 描述",children:h.jsx("p",{className:"whitespace-pre-wrap text-[13px] leading-relaxed text-ink-2",children:v.description})}),v.result&&h.jsx(Hi,{title:"结果 / 产出",children:h.jsx("p",{className:"whitespace-pre-wrap rounded-md bg-success-subtle px-3 py-2 text-[13px] leading-relaxed text-success",children:v.result})}),v.metrics&&Object.keys(v.metrics).length>0&&h.jsx(Hi,{title:"量化指标",children:h.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(v.metrics).map(([ie,Ne])=>h.jsxs("span",{className:"num rounded-sm border border-line bg-surface-2 px-2 py-0.5 text-[12px] text-ink-2",children:[ie,": ",h.jsx("span",{className:"font-medium text-ink-1",children:Ne})]},ie))})}),((((Fe=v.tags)==null?void 0:Fe.length)??0)>0||g.length>0)&&h.jsx(Hi,{title:"标签与维度",children:h.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[v.tags.map(ie=>h.jsx("span",{className:"rounded-sm bg-surface-3 px-1.5 py-0.5 text-[12px] text-ink-2",children:ie},ie)),g.map(ie=>h.jsx("span",{className:"rounded-sm border border-brand/30 bg-brand-subtle px-1.5 py-0.5 text-[12px] text-brand-text",children:ie},ie))]})}),h.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 border-t border-line pt-3 text-[11.5px] text-ink-3",children:[h.jsxs("span",{children:["创建于 ",mg(v.created_at)]}),h.jsxs("span",{children:["更新于 ",mg(v.updated_at)]}),v.group_id&&h.jsxs("span",{children:["事件组 ",v.group_id]}),v.parent_id!=null&&h.jsxs("span",{children:["上级 #",v.parent_id]})]})]}),h.jsx(e1,{att:K,onClose:()=>q(null)}),h.jsx(a5,{open:_,title:"删除记录",content:v?"确定删除「"+v.title+"」吗?该操作不可撤销。":"",onCancel:()=>k(!1),onOk:()=>D.mutate(),loading:D.isPending})]})}function nd({label:n,value:r}){return h.jsxs("div",{className:"grid min-w-0 grid-cols-[76px_1fr] gap-x-2.5",children:[h.jsx("span",{className:"shrink-0 text-right text-ink-3",children:n}),h.jsx("span",{className:"min-w-0 truncate font-medium text-ink-1",title:r,children:r})]})}function Hi({title:n,children:r}){return h.jsxs("div",{children:[h.jsx("div",{className:"mb-1.5 text-[12px] font-semibold text-ink-2",children:n}),r]})}function O5(){var Y,de,F;const[n,r]=E.useState(""),[s,o]=E.useState(""),[f,m]=E.useState(""),[d,p]=E.useState(""),[b,v]=E.useState(null),[x,g]=E.useState(!1),[_,k]=E.useState(null),[K,q]=E.useState(!1),D=yl({queryKey:["types"],queryFn:ro}),H=E.useMemo(()=>({q:n||void 0,types:s?[Number(s)]:void 0,year:f?Number(f):void 0,polarity:d||void 0,sort:"date_desc",page_size:2e3}),[n,s,f,d]),Q=yl({queryKey:["timeline",H],queryFn:()=>N0(H)}),Z=E.useMemo(()=>{var I;const U=new Set;for(const le of((I=Q.data)==null?void 0:I.groups)??[])U.add(le.year);return Array.from(U).sort((le,Ve)=>Ve-le)},[Q.data]),J=U=>{k(U),q(!0)};return h.jsxs("div",{className:"mx-auto max-w-[880px] px-3 py-4 sm:px-6 sm:py-5",children:[h.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[h.jsx(nt,{className:"w-full sm:w-[220px]",placeholder:"搜索足迹…",value:n,onChange:U=>r(U.target.value)}),h.jsxs("div",{className:"grid w-full grid-cols-2 gap-2 sm:flex sm:w-auto sm:items-center sm:gap-2",children:[h.jsx(ml,{className:"w-full sm:w-[130px]",value:s,onChange:U=>o(U.target.value),options:[{value:"",label:"全部类型"},...(((Y=D.data)==null?void 0:Y.items)??[]).map(U=>({value:String(U.id),label:U.name}))]}),h.jsx(ml,{className:"w-full sm:w-[120px]",value:f,onChange:U=>m(U.target.value),options:[{value:"",label:"全部年份"},...Z.map(U=>({value:String(U),label:U+" 年"}))]}),h.jsx(ml,{className:"w-full sm:w-[110px]",value:d,onChange:U=>p(U.target.value),options:[{value:"",label:"全部性质"},{value:"positive",label:"正面"},{value:"negative",label:"负面"}]})]}),h.jsxs("span",{className:"num ml-auto text-[12px] text-ink-3",children:["共 ",((de=Q.data)==null?void 0:de.total)??0," 条"]})]}),Q.isLoading?h.jsx("div",{className:"py-16 text-center text-[13px] text-ink-3",children:"加载中…"}):(F=Q.data)!=null&&F.groups.length?h.jsxs("div",{className:"relative",children:[h.jsx("div",{className:"absolute bottom-0 left-[7px] top-0 w-px bg-line","aria-hidden":!0}),Q.data.groups.map(U=>h.jsxs("section",{className:"mb-2",children:[h.jsxs("div",{className:"sticky top-0 z-10 -mx-3 flex items-center gap-2 bg-bg/90 px-3 py-2 backdrop-blur sm:-mx-6 sm:px-6",children:[h.jsx("span",{className:"num text-[16px] font-semibold text-ink-1",children:U.year}),h.jsxs("span",{className:"text-[12px] text-ink-3",children:[U.count," 条记录"]})]}),U.months.map(I=>h.jsxs("div",{className:"mb-3",children:[h.jsxs("div",{className:"mb-2 pl-6 text-[12px] font-medium text-ink-3",children:[I.month," 月"]}),h.jsx("div",{className:"flex flex-col gap-2",children:I.items.map(le=>h.jsx(R5,{row:le,onClick:()=>J(le.id)},le.id))})]},I.month))]},U.year))]}):h.jsx(e5,{icon:h.jsx(m0,{size:36,strokeWidth:1.5}),title:"暂无足迹",description:"点击右上角「新建记录」,开始记录你的第一段足迹。"}),h.jsx(z5,{open:K,onClose:()=>q(!1),footprintId:_,onEdit:U=>{q(!1),v(U),g(!0)}}),h.jsx(j5,{open:x,onClose:()=>g(!1),footprintId:b})]})}function R5({row:n,onClick:r}){const s=(n.start_date??n.created_at).slice(0,10);return h.jsxs("button",{onClick:r,className:"group relative w-full rounded-lg border border-line bg-surface px-4 py-3 text-left shadow-card transition-all hover:border-line-strong hover:shadow-pop",children:[h.jsx("span",{className:"absolute left-0 top-3 bottom-3 w-[3px] rounded-full",style:{backgroundColor:n.type_color},"aria-hidden":!0}),h.jsxs("div",{className:"flex items-start gap-3",children:[h.jsxs("div",{className:"num w-[52px] shrink-0 pt-0.5 text-[12px] leading-relaxed text-ink-3",children:[s.slice(5,7),"-",s.slice(8,10)]}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[h.jsx("span",{className:"text-[13.5px] font-medium text-ink-1 group-hover:text-brand-text",children:n.title}),h.jsx(Ii,{color:n.type_color,children:n.type_name}),h.jsx($0,{level:n.level}),h.jsx(P0,{grade:n.award_grade}),h.jsx(W0,{role:n.role}),h.jsx(F0,{status:n.status}),n.polarity==="negative"&&h.jsx(I0,{})]}),n.organizer&&h.jsx("div",{className:"mt-0.5 text-[12px] text-ink-3",children:n.organizer}),n.description&&h.jsx("p",{className:"mt-1 line-clamp-2 text-[12.5px] leading-relaxed text-ink-2",children:n.description}),(n.result||n.tags.length>0||n.attachment_count>0)&&h.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-[11.5px] text-ink-3",children:[n.result&&h.jsxs("span",{className:"text-success",children:["结果:",n.result]}),n.tags.map(o=>h.jsx("span",{className:"rounded-sm bg-surface-3 px-1.5 py-px",children:o},o)),n.attachment_count>0&&h.jsxs("span",{className:"inline-flex items-center gap-1",children:[h.jsx(Kd,{size:11}),n.attachment_count]})]})]}),h.jsx("div",{className:"shrink-0 pt-1 text-ink-3",children:h.jsx(v5,{name:n.type_icon,color:n.type_color,size:16})})]})]})}const A5=E.lazy(()=>vl(()=>import("./RecordsPage-BilD6G_8.js"),[]).then(n=>({default:n.RecordsPage}))),M5=E.lazy(()=>vl(()=>import("./DashboardPage-CTFfbcSG.js"),__vite__mapDeps([0,1,2,3])).then(n=>({default:n.DashboardPage}))),D5=E.lazy(()=>vl(()=>import("./GradesPage-CGH6s4Qj.js"),__vite__mapDeps([4,1,2,3])).then(n=>({default:n.GradesPage}))),U5=E.lazy(()=>vl(()=>import("./TypesPage-BCNfvAxm.js"),__vite__mapDeps([5,1])).then(n=>({default:n.TypesPage}))),k5=E.lazy(()=>vl(()=>import("./TaxonomyPage-DltVJTdo.js"),__vite__mapDeps([6,1])).then(n=>({default:n.TaxonomyPage}))),H5=E.lazy(()=>vl(()=>import("./AdminPage-BS1A5Dj5.js"),__vite__mapDeps([7,1])).then(n=>({default:n.AdminPage}))),q5=E.lazy(()=>vl(()=>import("./ProfilePage-B_ccov-c.js"),[]).then(n=>({default:n.ProfilePage}))),L5=E.lazy(()=>vl(()=>import("./ResumePage-CDZ54fmp.js"),__vite__mapDeps([8,1,9])).then(n=>({default:n.ResumePage}))),B5=E.lazy(()=>vl(()=>import("./AssessmentPage-BuX9x9ZE.js"),__vite__mapDeps([10,9])).then(n=>({default:n.AssessmentPage})));function da(){return h.jsx("div",{className:"py-16 text-center text-[13px] text-ink-3",children:"加载中…"})}function Q5(){return h.jsx(dS,{children:h.jsxs(Yt,{element:h.jsx(h5,{}),children:[h.jsx(Yt,{path:"/",element:h.jsx(Vv,{to:"/timeline",replace:!0})}),h.jsx(Yt,{path:"/timeline",element:h.jsx(O5,{})}),h.jsx(Yt,{path:"/records",element:h.jsx(E.Suspense,{fallback:h.jsx(da,{}),children:h.jsx(A5,{})})}),h.jsx(Yt,{path:"/grades",element:h.jsx(E.Suspense,{fallback:h.jsx(da,{}),children:h.jsx(D5,{})})}),h.jsx(Yt,{path:"/dashboard",element:h.jsx(E.Suspense,{fallback:h.jsx(da,{}),children:h.jsx(M5,{})})}),h.jsx(Yt,{path:"/types",element:h.jsx(E.Suspense,{fallback:h.jsx(da,{}),children:h.jsx(U5,{})})}),h.jsx(Yt,{path:"/taxonomy",element:h.jsx(E.Suspense,{fallback:h.jsx(da,{}),children:h.jsx(k5,{})})}),h.jsx(Yt,{path:"/admin",element:h.jsx(E.Suspense,{fallback:h.jsx(da,{}),children:h.jsx(H5,{})})}),h.jsx(Yt,{path:"/profile",element:h.jsx(E.Suspense,{fallback:h.jsx(da,{}),children:h.jsx(q5,{})})}),h.jsx(Yt,{path:"/resume",element:h.jsx(E.Suspense,{fallback:h.jsx(da,{}),children:h.jsx(L5,{})})}),h.jsx(Yt,{path:"/assessment",element:h.jsx(E.Suspense,{fallback:h.jsx(da,{}),children:h.jsx(B5,{})})}),h.jsx(Yt,{path:"*",element:h.jsx(Vv,{to:"/timeline",replace:!0})})]})})}const G5=new b3({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!0,staleTime:0,gcTime:0}}}),xg=localStorage.getItem("fp-theme");(xg==="dark"||!xg&&window.matchMedia("(prefers-color-scheme: dark)").matches)&&document.documentElement.classList.add("dark");function l1(){var r;const n=getComputedStyle(document.documentElement).getPropertyValue("--bg").trim();n&&((r=document.querySelector('meta[name="theme-color"]'))==null||r.setAttribute("content",n))}l1();window.addEventListener("fp-theme-change",l1);"serviceWorker"in navigator&&!("__TAURI_INTERNALS__"in window)&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").catch(()=>{})});o2.createRoot(document.getElementById("root")).render(h.jsx(l2.StrictMode,{children:h.jsx(ZS,{client:G5,children:h.jsx(HS,{children:h.jsx(Q5,{})})})}));export{Ol as $,B4 as A,zt as B,a5 as C,H4 as D,e5 as E,q4 as F,P0 as G,so as H,nt as I,De as J,L4 as K,$0 as L,k4 as M,v5 as N,N4 as O,ZE as P,Z5 as Q,W0 as R,ml as S,Ed as T,J5 as U,C4 as V,w4 as W,j4 as X,z4 as Y,O4 as Z,Wd as _,gl as a,pl as a0,g0 as a1,wd as a2,J4 as a3,F4 as a4,$4 as a5,I4 as a6,W4 as a7,P4 as a8,vl as a9,Z4 as aa,K4 as ab,b4 as ac,Cd as ad,n_ as ae,a_ as af,l_ as ag,uE as ah,C0 as ai,z0 as aj,V5 as ak,Ag as al,i_ as am,KS as b,pe as c,oo as d,X5 as e,yl as f,Sd as g,T5 as h,F0 as i,h as j,mg as k,XE as l,Ii as m,z5 as n,j5 as o,R4 as p,ro as q,E as r,E0 as s,A4 as t,lu as u,_0 as v,p0 as w,Q4 as x,G4 as y,t_ as z};
diff --git a/sync-server/www/assets/mammoth.browser-DXSEnqlw.js b/sync-server/www/assets/mammoth.browser-CHj5V251.js
similarity index 99%
rename from sync-server/www/assets/mammoth.browser-DXSEnqlw.js
rename to sync-server/www/assets/mammoth.browser-CHj5V251.js
index 83f3b1a..ba9d417 100644
--- a/sync-server/www/assets/mammoth.browser-DXSEnqlw.js
+++ b/sync-server/www/assets/mammoth.browser-CHj5V251.js
@@ -1,4 +1,4 @@
-import{ak as dt,al as mn}from"./index-zXE6XEB1.js";function vn(ut,Et){for(var P=0;Poe[R]})}}}return Object.freeze(Object.defineProperty(ut,Symbol.toStringTag,{value:"Module"}))}function bt(ut){throw new Error('Could not dynamically require "'+ut+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Xt={exports:{}},hr;function yn(){return hr||(hr=1,(function(ut,Et){(function(P){ut.exports=P()})(function(){return(function P(oe,R,M){function E(p,u){if(!R[p]){if(!oe[p]){var i=typeof bt=="function"&&bt;if(!u&&i)return i(p,!0);if(a)return a(p,!0);var e=new Error("Cannot find module '"+p+"'");throw e.code="MODULE_NOT_FOUND",e}var s=R[p]={exports:{}};oe[p][0].call(s.exports,function(d){var y=oe[p][1][d];return E(y||d)},s,s.exports,P,oe,R,M)}return R[p].exports}for(var a=typeof bt=="function"&&bt,g=0;goe[R]})}}}return Object.freeze(Object.defineProperty(ut,Symbol.toStringTag,{value:"Module"}))}function bt(ut){throw new Error('Could not dynamically require "'+ut+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Xt={exports:{}},hr;function yn(){return hr||(hr=1,(function(ut,Et){(function(P){ut.exports=P()})(function(){return(function P(oe,R,M){function E(p,u){if(!R[p]){if(!oe[p]){var i=typeof bt=="function"&&bt;if(!u&&i)return i(p,!0);if(a)return a(p,!0);var e=new Error("Cannot find module '"+p+"'");throw e.code="MODULE_NOT_FOUND",e}var s=R[p]={exports:{}};oe[p][0].call(s.exports,function(d){var y=oe[p][1][d];return E(y||d)},s,s.exports,P,oe,R,M)}return R[p].exports}for(var a=typeof bt=="function"&&bt,g=0;g0&&(Ee=X.concat(Ee),X=[]),r.map(ne(fe),K(Ee),function(Se,Me){return new a.Paragraph(Me,Se)}).insertExtra()},"w:r":function(re){return r.map(ie(re.firstOrEmpty("w:rPr")),K(re.children),function(fe,_e){var Ee=Ie();return Ee!==null&&(_e=[new a.Hyperlink(_e,Ee)]),new a.Run(_e,fe)})},"w:fldChar":be,"w:instrText":Le,"w:t":function(re){return c(new a.Text(re.text()))},"w:tab":function(re){return c(new a.Tab)},"w:noBreakHyphen":function(){return c(new a.Text("‑"))},"w:softHyphen":function(re){return c(new a.Text(""))},"w:sym":Be,"w:hyperlink":function(re){var fe=re.attributes["r:id"],_e=re.attributes["w:anchor"];return K(re.children).map(function(Ee){function Se(Pe){var Fe=re.attributes["w:tgtFrame"]||null;return new a.Hyperlink(Ee,E.extend({targetFrame:Fe},Pe))}if(fe){var Me=x.findTargetByRelationshipId(fe);return _e&&(Me=e.replaceFragment(Me,_e)),Se({href:Me})}else return _e?Se({anchor:_e}):Ee})},"w:tbl":l,"w:tr":o,"w:tc":D,"w:footnoteReference":f("footnote"),"w:endnoteReference":f("endnote"),"w:commentReference":$,"w:br":function(re){var fe=re.attributes["w:type"];return fe==null||fe==="textWrapping"?c(a.lineBreak):fe==="page"?c(a.pageBreak):fe==="column"?c(a.columnBreak):h([p("Unsupported break type: "+fe)])},"w:bookmarkStart":function(re){var fe=re.attributes["w:name"];return fe==="_GoBack"?_():c(new a.BookmarkStart({name:fe}))},"mc:AlternateContent":function(re){return V(re.firstOrEmpty("mc:Fallback"))},"w:sdt":function(re){var fe=K(re.firstOrEmpty("w:sdtContent").children);return fe.map(function(_e){var Ee=re.firstOrEmpty("w:sdtPr").first("wordml:checkbox");if(Ee){var Se=Ee.first("wordml:checked"),Me=!!Se&&Q(Se.attributes["wordml:val"]),Pe=a.checkbox({checked:Me}),Fe=!1,Ze=_e.map(i._elementsOfType(a.types.text,function(N){return N.value.length>0&&!Fe?(Fe=!0,Pe):N}));return Fe?Ze:Pe}else return _e})},"w:customXml":V,"w:ins":V,"w:moveFromRangeEnd":V,"w:moveFromRangeStart":V,"w:moveTo":V,"w:moveToRangeEnd":V,"w:moveToRangeStart":V,"w:object":V,"w:smartTag":V,"w:drawing":V,"w:pict":function(re){return V(re).toExtra()},"v:roundrect":V,"v:shape":V,"v:textbox":V,"w:txbxContent":V,"wp:inline":ae,"wp:anchor":ae,"v:imagedata":Ae,"v:group":V,"v:rect":V};return{readXmlElement:pe,readXmlElements:K};function l(re){var fe=t(re.firstOrEmpty("w:tblPr"));return K(re.children).flatMap(G).flatMap(function(_e){return fe.map(function(Ee){return a.Table(_e,Ee)})})}function t(re){return Re(re).map(function(fe){return{styleId:fe.styleId,styleName:fe.name}})}function o(re){var fe=re.firstOrEmpty("w:trPr"),_e=!!fe.first("w:del");if(_e)return _();var Ee=!!fe.first("w:tblHeader");return K(re.children).map(function(Se){return a.TableRow(Se,{isHeader:Ee})})}function D(re){return K(re.children).map(function(fe){var _e=re.firstOrEmpty("w:tcPr"),Ee=_e.firstOrEmpty("w:gridSpan").attributes["w:val"],Se=Ee?parseInt(Ee,10):1,Me=a.TableCell(fe,{colSpan:Se});return Me._vMerge=C(_e),Me})}function C(re){var fe=re.first("w:vMerge");if(fe){var _e=fe.attributes["w:val"];return _e==="continue"||!_e}else return null}function G(re){var fe=E.any(re,function(Se){return Se.type!==a.types.tableRow});if(fe)return te(re),n(re,[p("unexpected non-row element in table, cell merging may be incorrect")]);var _e=E.any(re,function(Se){return E.any(Se.children,function(Me){return Me.type!==a.types.tableCell})});if(_e)return te(re),n(re,[p("unexpected non-cell element in table row, cell merging may be incorrect")]);var Ee={};return re.forEach(function(Se){var Me=0;Se.children.forEach(function(Pe){Pe._vMerge&&Ee[Me]?Ee[Me].rowSpan++:(Ee[Me]=Pe,Pe._vMerge=!1),Me+=Pe.colSpan})}),re.forEach(function(Se){Se.children=Se.children.filter(function(Me){return!Me._vMerge}),Se.children.forEach(function(Me){delete Me._vMerge})}),c(re)}function te(re){re.forEach(function(fe){var _e=i.getDescendantsOfType(fe,a.types.tableCell);_e.forEach(function(Ee){delete Ee._vMerge})})}function ae(re){var fe=re.getElementsByTagName("a:graphic").getElementsByTagName("a:graphicData").getElementsByTagName("pic:pic").getElementsByTagName("pic:blipFill").getElementsByTagName("a:blip");return m(fe.map(de.bind(null,re)))}function de(re,fe){var _e=re.firstOrEmpty("wp:docPr"),Ee=_e.attributes,Se=Te(Ee.descr)?Ee.title:Ee.descr,Me=me(fe);return Me===null?h([p("Could not find image file for a:blip element")]):ze(Me,Se).map(function(Pe){var Fe=_e.firstOrEmpty("a:hlinkClick"),Ze=Fe.attributes["r:id"];if(Ze){var N=x.findTargetByRelationshipId(Ze);return new a.Hyperlink([Pe],{href:N})}else return Pe})}function Te(re){return re==null||/^\s*$/.test(re)}function me(re){var fe=re.attributes["r:embed"],_e=re.attributes["r:link"];if(fe)return Ue(fe);if(_e){var Ee=x.findTargetByRelationshipId(_e);return{path:Ee,read:B.read.bind(B,Ee)}}else return null}function Ae(re){var fe=re.attributes["r:id"];return fe?ze(Ue(fe),re.attributes["o:title"]):h([p("A v:imagedata element without a relationship ID was ignored")])}function Ue(re){var fe=e.uriToZipEntryName("word",x.findTargetByRelationshipId(re));return{path:fe,read:ee.read.bind(ee,fe)}}function ze(re,fe){var _e=W.findContentType(re.path),Ee=a.Image({readImage:re.read,altText:fe,contentType:_e}),Se=w[_e]?[]:p("Image of type "+_e+" is unlikely to display in web browsers");return n(Ee,Se)}function He(re,fe){return p(re+" style with ID "+fe+" was referenced but not defined in the document")}}function y(k,A,O){var X=A.firstOrEmpty("w:ilvl").attributes["w:val"],x=A.firstOrEmpty("w:numId").attributes["w:val"];if(X!==void 0&&x!==void 0)return O.findLevel(x,X);if(k!=null){var W=O.findLevelByParagraphStyleId(k);if(W!=null)return W}return x!==void 0?O.findLevel(x,"0"):null}var w={"image/png":!0,"image/gif":!0,"image/jpeg":!0,"image/svg+xml":!0,"image/tiff":!0},v={"office-word:wrap":!0,"v:shadow":!0,"v:shapetype":!0,"w:annotationRef":!0,"w:bookmarkEnd":!0,"w:sectPr":!0,"w:proofErr":!0,"w:lastRenderedPageBreak":!0,"w:commentRangeStart":!0,"w:commentRangeEnd":!0,"w:del":!0,"w:footnoteRef":!0,"w:endnoteRef":!0,"w:moveFrom":!0,"w:pPr":!0,"w:rPr":!0,"w:tblPr":!0,"w:tblGrid":!0,"w:trPr":!0,"w:tcPr":!0};function h(k){return new r(null,null,k)}function _(){return new r(null)}function c(k){return new r(k)}function n(k,A){return new r(k,null,A)}function r(k,A,O){this.value=k||[],this.extra=A||[],this._result=new g({element:this.value,extra:A},O),this.messages=this._result.messages}r.prototype.toExtra=function(){return new r(null,I(this.extra,this.value),this.messages)},r.prototype.insertExtra=function(){var k=this.extra;return k&&k.length?new r(I(this.value,k),null,this.messages):this},r.prototype.map=function(k){var A=this._result.map(function(O){return k(O.element)});return new r(A.value,this.extra,A.messages)},r.prototype.flatMap=function(k){var A=this._result.flatMap(function(O){return k(O.element)._result});return new r(A.value.element,I(this.extra,A.value.extra),A.messages)},r.map=function(k,A,O){return new r(O(k.value,A.value),I(k.extra,A.extra),k.messages.concat(A.messages))};function m(k){var A=g.combine(E.pluck(k,"_result"));return new r(E.flatten(E.pluck(A.value,"element")),E.filter(E.flatten(E.pluck(A.value,"extra")),U),A.messages)}function I(k,A){return E.flatten([k,A])}function U(k){return k}},{"../documents":4,"../results":25,"../transforms":30,"../xml":35,"./uris":16,"dingbat-to-unicode":50,underscore:67}],6:[function(P,oe,R){var M=P("../documents"),E=P("../results").Result;function a(g){function p(i){return E.combine(i.getElementsByTagName("w:comment").map(u))}function u(i){var e=i.attributes["w:id"];function s(d){return(i.attributes[d]||"").trim()||null}return g.readXmlElements(i.children).map(function(d){return M.comment({commentId:e,body:d,authorName:s("w:author"),authorInitials:s("w:initials")})})}return p}R.createCommentsReader=a},{"../documents":4,"../results":25}],7:[function(P,oe,R){R.readContentTypesFromXml=E;var M={png:"png",gif:"gif",jpeg:"jpeg",jpg:"jpeg",tif:"tiff",tiff:"tiff",bmp:"bmp"};R.defaultContentTypes=a({},{});function E(g){var p=Object.create(null),u=Object.create(null);return g.children.forEach(function(i){if(i.name==="content-types:Default"&&(p[i.attributes.Extension]=i.attributes.ContentType),i.name==="content-types:Override"){var e=i.attributes.PartName;e.charAt(0)==="/"&&(e=e.substring(1)),u[e]=i.attributes.ContentType}}),a(u,p)}function a(g,p){return{findContentType:function(u){var i=g[u];if(i)return i;var e=u.split("."),s=e[e.length-1];if(Object.prototype.hasOwnProperty.call(p,s))return p[s];var d=M[s.toLowerCase()];return d?"image/"+d:null}}}},{}],8:[function(P,oe,R){R.DocumentXmlReader=a;var M=P("../documents"),E=P("../results").Result;function a(g){var p=g.bodyReader;function u(i){var e=i.first("w:body");if(e==null)throw new Error("Could not find the body element: are you sure this is a docx file?");var s=p.readXmlElements(e.children).map(function(d){return new M.Document(d,{notes:g.notes,comments:g.comments})});return new E(s.value,s.messages)}return{convertXmlToDocument:u}}},{"../documents":4,"../results":25}],9:[function(P,oe,R){R.read=_,R._findPartPaths=c;var M=P("../promises"),E=P("../documents"),a=P("../results").Result,g=P("../zipfile"),p=P("./office-xml-reader").readXmlFromZipFile,u=P("./body-reader").createBodyReader,i=P("./document-xml-reader").DocumentXmlReader,e=P("./relationships-reader"),s=P("./content-types-reader"),d=P("./numbering-xml"),y=P("./styles-reader"),w=P("./notes-reader"),v=P("./comments-reader"),h=P("./files").Files;function _(x,W,ee){W=W||{},ee=ee||{};var B=new h({externalFileAccess:ee.externalFileAccess,relativeToFile:W.path});return M.props({contentTypes:k(x),partPaths:c(x),docxFile:x,files:B}).also(function(Y){return{styles:O(x,Y.partPaths.styles)}}).also(function(Y){return{numbering:A(x,Y.partPaths.numbering,Y.styles)}}).also(function(Y){return{footnotes:I(Y.partPaths.footnotes,Y,function(T,K){return K?w.createFootnotesReader(T)(K):new a([])}),endnotes:I(Y.partPaths.endnotes,Y,function(T,K){return K?w.createEndnotesReader(T)(K):new a([])}),comments:I(Y.partPaths.comments,Y,function(T,K){return K?v.createCommentsReader(T)(K):new a([])})}}).also(function(Y){return{notes:Y.footnotes.flatMap(function(T){return Y.endnotes.map(function(K){return new E.Notes(T.concat(K))})})}}).then(function(Y){return I(Y.partPaths.mainDocument,Y,function(T,K){return Y.notes.flatMap(function(pe){return Y.comments.flatMap(function(ne){var ce=new i({bodyReader:T,notes:pe,comments:ne});return ce.convertXmlToDocument(K)})})})})}function c(x){return X(x).then(function(W){var ee=n({docxFile:x,relationships:W,relationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",basePath:"",fallbackPath:"word/document.xml"});if(!x.exists(ee))throw new Error("Could not find main document part. Are you sure this is a valid .docx file?");return m({filename:U(ee),readElement:e.readRelationships,defaultValue:e.defaultValue})(x).then(function(B){function Y(T){return n({docxFile:x,relationships:B,relationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/"+T,basePath:g.splitPath(ee).dirname,fallbackPath:"word/"+T+".xml"})}return{mainDocument:ee,comments:Y("comments"),endnotes:Y("endnotes"),footnotes:Y("footnotes"),numbering:Y("numbering"),styles:Y("styles")}})})}function n(x){var W=x.docxFile,ee=x.relationships,B=x.relationshipType,Y=x.basePath,T=x.fallbackPath,K=ee.findTargetsByType(B),pe=K.map(function(ce){return r(g.joinPath(Y,ce),"/")}),ne=pe.filter(function(ce){return W.exists(ce)});return ne.length===0?T:ne[0]}function r(x,W){return x.substring(0,W.length)===W?x.substring(W.length):x}function m(x){return function(W){return p(W,x.filename).then(function(ee){return ee?x.readElement(ee):x.defaultValue})}}function I(x,W,ee){var B=m({filename:U(x),readElement:e.readRelationships,defaultValue:e.defaultValue});return B(W.docxFile).then(function(Y){var T=new u({relationships:Y,contentTypes:W.contentTypes,docxFile:W.docxFile,numbering:W.numbering,styles:W.styles,files:W.files});return p(W.docxFile,x).then(function(K){return ee(T,K)})})}function U(x){var W=g.splitPath(x);return g.joinPath(W.dirname,"_rels",W.basename+".rels")}var k=m({filename:"[Content_Types].xml",readElement:s.readContentTypesFromXml,defaultValue:s.defaultContentTypes});function A(x,W,ee){return m({filename:W,readElement:function(B){return d.readNumberingXml(B,{styles:ee})},defaultValue:d.defaultNumbering})(x)}function O(x,W){return m({filename:W,readElement:y.readStylesXml,defaultValue:y.defaultStyles})(x)}var X=m({filename:"_rels/.rels",readElement:e.readRelationships,defaultValue:e.defaultValue})},{"../documents":4,"../promises":23,"../results":25,"../zipfile":40,"./body-reader":5,"./comments-reader":6,"./content-types-reader":7,"./document-xml-reader":8,"./files":1,"./notes-reader":10,"./numbering-xml":11,"./office-xml-reader":12,"./relationships-reader":13,"./styles-reader":15}],10:[function(P,oe,R){var M=P("../documents"),E=P("../results").Result;R.createFootnotesReader=a.bind(this,"footnote"),R.createEndnotesReader=a.bind(this,"endnote");function a(g,p){function u(s){return E.combine(s.getElementsByTagName("w:"+g).filter(i).map(e))}function i(s){var d=s.attributes["w:type"];return d!=="continuationSeparator"&&d!=="separator"}function e(s){var d=s.attributes["w:id"];return p.readXmlElements(s.children).map(function(y){return M.Note({noteType:g,noteId:d,body:y})})}return u}},{"../documents":4,"../results":25}],11:[function(P,oe,R){var M=P("underscore");R.readNumberingXml=a,R.Numbering=E,R.defaultNumbering=new E({},{});function E(i,e,s){var d=M.flatten(M.values(e).map(function(_){return M.values(_.levels)})),y=M.indexBy(d.filter(function(_){return _.paragraphStyleId!=null}),"paragraphStyleId");function w(_,c){return v(_,c,Object.create(null))}function v(_,c,n){if(n[_])return null;n[_]=!0;var r=i[_];if(!r)return null;var m=e[r.abstractNumId];if(m){if(m.numStyleLink==null)return e[r.abstractNumId].levels[c];var I=s.findNumberingStyleById(m.numStyleLink);return v(I.numId,c,n)}else return null}function h(_){return y[_]||null}return{findLevel:w,findLevelByParagraphStyleId:h}}function a(i,e){if(!e||!e.styles)throw new Error("styles is missing");var s=g(i),d=u(i);return new E(d,s,e.styles)}function g(i){var e=Object.create(null);return i.getElementsByTagName("w:abstractNum").forEach(function(s){var d=s.attributes["w:abstractNumId"];e[d]=p(s)}),e}function p(i){var e=Object.create(null),s=null;i.getElementsByTagName("w:lvl").forEach(function(y){var w=y.attributes["w:ilvl"],v=y.firstOrEmpty("w:numFmt").attributes["w:val"],h=v!=="bullet",_=y.firstOrEmpty("w:pStyle").attributes["w:val"];w===void 0?s={isOrdered:h,level:"0",paragraphStyleId:_}:e[w]={isOrdered:h,level:w,paragraphStyleId:_}}),s!==null&&e[s.level]===void 0&&(e[s.level]=s);var d=i.firstOrEmpty("w:numStyleLink").attributes["w:val"];return{levels:e,numStyleLink:d}}function u(i){var e=Object.create(null);return i.getElementsByTagName("w:num").forEach(function(s){var d=s.attributes["w:numId"],y=s.first("w:abstractNumId").attributes["w:val"];e[d]={abstractNumId:y}}),e}},{underscore:67}],12:[function(P,oe,R){var M=P("underscore"),E=P("../promises"),a=P("../xml");R.read=p,R.readXmlFromZipFile=u;var g={"http://schemas.openxmlformats.org/wordprocessingml/2006/main":"w","http://schemas.openxmlformats.org/officeDocument/2006/relationships":"r","http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing":"wp","http://schemas.openxmlformats.org/drawingml/2006/main":"a","http://schemas.openxmlformats.org/drawingml/2006/picture":"pic","http://purl.oclc.org/ooxml/wordprocessingml/main":"w","http://purl.oclc.org/ooxml/officeDocument/relationships":"r","http://purl.oclc.org/ooxml/drawingml/wordprocessingDrawing":"wp","http://purl.oclc.org/ooxml/drawingml/main":"a","http://purl.oclc.org/ooxml/drawingml/picture":"pic","http://schemas.openxmlformats.org/package/2006/content-types":"content-types","http://schemas.openxmlformats.org/package/2006/relationships":"relationships","http://schemas.openxmlformats.org/markup-compatibility/2006":"mc","urn:schemas-microsoft-com:vml":"v","urn:schemas-microsoft-com:office:word":"office-word","http://schemas.microsoft.com/office/word/2010/wordml":"wordml"};function p(s){return a.readString(s,g).then(function(d){return e(d)[0]})}function u(s,d){return s.exists(d)?s.read(d,"utf-8").then(i).then(p):E.resolve(null)}function i(s){return s.replace(/^\uFEFF/g,"")}function e(s){return s.type==="element"?s.name==="mc:AlternateContent"?s.firstOrEmpty("mc:Fallback").children:(s.children=M.flatten(s.children.map(e,!0)),[s]):[s]}},{"../promises":23,"../xml":35,underscore:67}],13:[function(P,oe,R){R.readRelationships=M,R.defaultValue=new E([]),R.Relationships=E;function M(a){var g=[];return a.children.forEach(function(p){if(p.name==="relationships:Relationship"){var u={relationshipId:p.attributes.Id,target:p.attributes.Target,type:p.attributes.Type};g.push(u)}}),new E(g)}function E(a){var g=Object.create(null);a.forEach(function(u){g[u.relationshipId]=u.target});var p=Object.create(null);return a.forEach(function(u){p[u.type]||(p[u.type]=[]),p[u.type].push(u.target)}),{findTargetByRelationshipId:function(u){return g[u]},findTargetsByType:function(u){return p[u]||[]}}}},{}],14:[function(P,oe,R){var M=P("underscore"),E=P("../promises"),a=P("../xml");R.writeStyleMap=i,R.readStyleMap=y;var g="http://schemas.zwobble.org/mammoth/style-map",p="mammoth/style-map",u="/"+p;function i(w,v){return w.write(p,v),e(w).then(function(){return s(w)})}function e(w){var v="word/_rels/document.xml.rels",h="http://schemas.openxmlformats.org/package/2006/relationships",_="{"+h+"}Relationship";return w.read(v,"utf8").then(a.readString).then(function(c){var n=c.children;d(n,_,"Id",{Id:"rMammothStyleMap",Type:g,Target:u});var r={"":h};return w.write(v,a.writeString(c,r))})}function s(w){var v="[Content_Types].xml",h="http://schemas.openxmlformats.org/package/2006/content-types",_="{"+h+"}Override";return w.read(v,"utf8").then(a.readString).then(function(c){var n=c.children;d(n,_,"PartName",{PartName:u,ContentType:"text/prs.mammoth.style-map"});var r={"":h};return w.write(v,a.writeString(c,r))})}function d(w,v,h,_){var c=M.find(w,function(n){return n.name===v&&n.attributes[h]===_[h]});c?c.attributes=_:w.push(a.element(v,_))}function y(w){return w.exists(p)?w.read(p,"utf8"):E.resolve(null)}},{"../promises":23,"../xml":35,underscore:67}],15:[function(P,oe,R){R.readStylesXml=E,R.Styles=M,R.defaultStyles=new M({},{});function M(i,e,s,d){return{findParagraphStyleById:function(y){return i[y]},findCharacterStyleById:function(y){return e[y]},findTableStyleById:function(y){return s[y]},findNumberingStyleById:function(y){return d[y]}}}M.EMPTY=new M({},{},{},{});function E(i){var e=Object.create(null),s=Object.create(null),d=Object.create(null),y=Object.create(null);return i.getElementsByTagName("w:style").forEach(function(w){var v=a(w),h;switch(v.type){case"paragraph":h=e;break;case"character":h=s;break;case"table":h=d;break;case"numbering":h=y;break}h&&h[v.styleId]===void 0&&(h[v.styleId]=v)}),new M(e,s,d,y)}function a(i){var e=i.attributes["w:type"];if(e==="numbering")return p(e,i);var s=u(i),d=g(i);return{type:e,styleId:s,name:d}}function g(i){var e=i.first("w:name");return e?e.attributes["w:val"]:null}function p(i,e){var s=u(e),d=e.firstOrEmpty("w:pPr").firstOrEmpty("w:numPr").firstOrEmpty("w:numId").attributes["w:val"];return{type:i,numId:d,styleId:s}}function u(i){return i.attributes["w:styleId"]}},{}],16:[function(P,oe,R){R.uriToZipEntryName=M,R.replaceFragment=E;function M(a,g){return g.charAt(0)==="/"?g.substr(1):a+"/"+g}function E(a,g){var p=a.indexOf("#");return p!==-1&&(a=a.substring(0,p)),a+"#"+g}},{}],17:[function(P,oe,R){var M=P("../styles/html-paths");function E(s,d,y){return g(M.element(s,d,{fresh:!1}),y)}function a(s,d,y){var w=M.element(s,d,{fresh:!0});return g(w,y)}function g(s,d){return{type:"element",tag:s,children:d||[]}}function p(s){return{type:"text",value:s}}var u={type:"forceWrite"};R.freshElement=a,R.nonFreshElement=E,R.elementWithTag=g,R.text=p,R.forceWrite=u;var i={br:!0,hr:!0,img:!0,input:!0};function e(s){return s.children.length===0&&i[s.tag.tagName]}R.isVoidElement=e},{"../styles/html-paths":28}],18:[function(P,oe,R){var M=P("./ast");R.freshElement=M.freshElement,R.nonFreshElement=M.nonFreshElement,R.elementWithTag=M.elementWithTag,R.text=M.text,R.forceWrite=M.forceWrite,R.simplify=P("./simplify");function E(i,e){e.forEach(function(s){a(i,s)})}function a(i,e){g[e.type](i,e)}var g={element:p,text:u,forceWrite:function(){}};function p(i,e){M.isVoidElement(e)?i.selfClosing(e.tag.tagName,e.tag.attributes):(i.open(e.tag.tagName,e.tag.attributes),E(i,e.children),i.close(e.tag.tagName))}function u(i,e){i.text(e.value)}R.write=E},{"./ast":17,"./simplify":19}],19:[function(P,oe,R){var M=P("underscore"),E=P("./ast");function a(c){return g(d(c))}function g(c){var n=[];return c.map(p).forEach(function(r){s(n,r)}),n}function p(c){return u[c.type](c)}var u={element:i,text:e,forceWrite:e};function i(c){return E.elementWithTag(c.tag,g(c.children))}function e(c){return c}function s(c,n){var r=c[c.length-1];n.type==="element"&&!n.tag.fresh&&r&&r.type==="element"&&n.tag.matchesElement(r.tag)?(n.tag.separator&&s(r.children,E.text(n.tag.separator)),n.children.forEach(function(m){s(r.children,m)})):c.push(n)}function d(c){return y(c,function(n){return w[n.type](n)})}function y(c,n){return M.flatten(M.map(c,n),!0)}var w={element:h,text:_,forceWrite:v};function v(c){return[c]}function h(c){var n=d(c.children);return n.length===0&&!E.isVoidElement(c)?[]:[E.elementWithTag(c.tag,n)]}function _(c){return c.value.length===0?[]:[c]}oe.exports=a},{"./ast":17,underscore:67}],20:[function(P,oe,R){var M=P("underscore"),E=P("./promises"),a=P("./html");R.imgElement=g;function g(u){return function(i,e){return E.resolve(u(i)).then(function(s){var d={};return i.altText&&(d.alt=i.altText),M.extend(d,s),[a.freshElement("img",d)]})}}R.inline=R.imgElement,R.dataUri=g(function(u){return u.readAsBase64String().then(function(i){return{src:"data:"+u.contentType+";base64,"+i}})});function p(u){return u.contentType.split(/\/|\\/)[1]}R.imageFilenameExtension=p},{"./html":18,"./promises":23,underscore:67}],21:[function(P,oe,R){(function(M){var E=P("underscore"),a=P("./docx/docx-reader"),g=P("./docx/style-map"),p=P("./document-to-html").DocumentConverter,u=P("./raw-text").convertElementToRawText,i=P("./style-reader").readStyle,e=P("./options-reader").readOptions,s=P("./promises"),d=P("./unzip"),y=P("./results").Result;R.convertToHtml=w,R.convertToMarkdown=v,R.convert=h,R.extractRawText=r,R.images=P("./images"),R.transforms=P("./transforms"),R.underline=P("./underline"),R.embedStyleMap=m,R.readEmbeddedStyleMap=_;function w(I,U){return h(I,U)}function v(I,U){var k=Object.create(U||{});return k.outputFormat="markdown",h(I,k)}function h(I,U){U=e(U);var k=d.openZip(I).then(function(A){return g.readStyleMap(A).then(function(O){return U.embeddedStyleMap=O,A})}).then(function(A){return a.read(A,I,U).then(function(O){return O.map(U.transformDocument)}).then(function(O){return c(O,U)})});return s.toExternalPromise(k)}function _(I){var U=d.openZip(I).then(g.readStyleMap);return s.toExternalPromise(U)}function c(I,U){var k=n(U.readStyleMap()),A=E.extend({},U,{styleMap:k.value}),O=new p(A);return I.flatMapThen(function(X){return k.flatMapThen(function(x){return O.convertToHtml(X)})})}function n(I){return y.combine((I||[]).map(i)).map(function(U){return U.filter(function(k){return!!k})})}function r(I){var U=d.openZip(I).then(a.read).then(function(k){return k.map(u)});return s.toExternalPromise(U)}function m(I,U){var k=d.openZip(I).then(function(A){return g.writeStyleMap(A,U).then(function(){return A})}).then(function(A){return A.toArrayBuffer()}).then(function(A){return{toArrayBuffer:function(){return A},toBuffer:function(){return M.from(A)}}});return s.toExternalPromise(k)}R.styleMapping=function(){throw new Error(`Use a raw string instead of mammoth.styleMapping e.g. "p[style-name='Title'] => h1" instead of mammoth.styleMapping("p[style-name='Title'] => h1")`)}}).call(this,P("buffer").Buffer)},{"./document-to-html":3,"./docx/docx-reader":9,"./docx/style-map":14,"./images":20,"./options-reader":22,"./promises":23,"./raw-text":24,"./results":25,"./style-reader":26,"./transforms":30,"./underline":31,"./unzip":2,buffer:48,underscore:67}],22:[function(P,oe,R){R.readOptions=g;var M=P("underscore"),E=R._defaultStyleMap=["p.Heading1 => h1:fresh","p.Heading2 => h2:fresh","p.Heading3 => h3:fresh","p.Heading4 => h4:fresh","p.Heading5 => h5:fresh","p.Heading6 => h6:fresh","p[style-name='Heading 1'] => h1:fresh","p[style-name='Heading 2'] => h2:fresh","p[style-name='Heading 3'] => h3:fresh","p[style-name='Heading 4'] => h4:fresh","p[style-name='Heading 5'] => h5:fresh","p[style-name='Heading 6'] => h6:fresh","p[style-name='heading 1'] => h1:fresh","p[style-name='heading 2'] => h2:fresh","p[style-name='heading 3'] => h3:fresh","p[style-name='heading 4'] => h4:fresh","p[style-name='heading 5'] => h5:fresh","p[style-name='heading 6'] => h6:fresh","p.Heading => h1:fresh","p[style-name='Heading'] => h1:fresh","r[style-name='Strong'] => strong","p[style-name='footnote text'] => p:fresh","r[style-name='footnote reference'] =>","p[style-name='endnote text'] => p:fresh","r[style-name='endnote reference'] =>","p[style-name='annotation text'] => p:fresh","r[style-name='annotation reference'] =>","p[style-name='Footnote'] => p:fresh","r[style-name='Footnote anchor'] =>","p[style-name='Endnote'] => p:fresh","r[style-name='Endnote anchor'] =>","p:unordered-list(1) => ul > li:fresh","p:unordered-list(2) => ul|ol > li > ul > li:fresh","p:unordered-list(3) => ul|ol > li > ul|ol > li > ul > li:fresh","p:unordered-list(4) => ul|ol > li > ul|ol > li > ul|ol > li > ul > li:fresh","p:unordered-list(5) => ul|ol > li > ul|ol > li > ul|ol > li > ul|ol > li > ul > li:fresh","p:ordered-list(1) => ol > li:fresh","p:ordered-list(2) => ul|ol > li > ol > li:fresh","p:ordered-list(3) => ul|ol > li > ul|ol > li > ol > li:fresh","p:ordered-list(4) => ul|ol > li > ul|ol > li > ul|ol > li > ol > li:fresh","p:ordered-list(5) => ul|ol > li > ul|ol > li > ul|ol > li > ul|ol > li > ol > li:fresh","r[style-name='Hyperlink'] =>","p[style-name='Normal'] => p:fresh","p.Body => p:fresh","p[style-name='Body'] => p:fresh"],a=R._standardOptions={externalFileAccess:!1,transformDocument:u,includeDefaultStyleMap:!0,includeEmbeddedStyleMap:!0};function g(i){return i=i||{},M.extend({},a,i,{customStyleMap:p(i.styleMap),readStyleMap:function(){var e=this.customStyleMap;return this.includeEmbeddedStyleMap&&(e=e.concat(p(this.embeddedStyleMap))),this.includeDefaultStyleMap&&(e=e.concat(E)),e}})}function p(i){return i?M.isString(i)?i.split(`
`).map(function(e){return e.trim()}).filter(function(e){return e!==""&&e.charAt(0)!=="#"}):i:[]}function u(i){return i}},{underscore:67}],23:[function(P,oe,R){(function(M){var E=P("underscore");R.defer=u,R.Promise=Promise,R.resolve=Promise.resolve.bind(Promise),R.reject=Promise.reject.bind(Promise),R.forEachSeries=function(d,y){var w=0,v=u(),h=function(){if(w"u"?!1:{}.toString.call(M).toLowerCase()==="[object process]"}}).call(this,P("_process"))},{_process:66,underscore:67}],24:[function(P,oe,R){var M=P("./documents");function E(a){if(a.type==="text")return a.value;if(a.type===M.types.tab)return" ";var g=a.type==="paragraph"?`
diff --git a/sync-server/www/assets/rotate-ccw-Ck6NqXrk.js b/sync-server/www/assets/rotate-ccw-D_RZxoBX.js
similarity index 94%
rename from sync-server/www/assets/rotate-ccw-Ck6NqXrk.js
rename to sync-server/www/assets/rotate-ccw-D_RZxoBX.js
index 5c7a8e6..3a258c8 100644
--- a/sync-server/www/assets/rotate-ccw-Ck6NqXrk.js
+++ b/sync-server/www/assets/rotate-ccw-D_RZxoBX.js
@@ -1,4 +1,4 @@
-import{c as t}from"./index-zXE6XEB1.js";/**
+import{c as t}from"./index-D-R037K4.js";/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
diff --git a/sync-server/www/assets/useChart-VLUgJQ2-.js b/sync-server/www/assets/useChart-59NNyLSS.js
similarity index 92%
rename from sync-server/www/assets/useChart-VLUgJQ2-.js
rename to sync-server/www/assets/useChart-59NNyLSS.js
index 08fac00..876ff4d 100644
--- a/sync-server/www/assets/useChart-VLUgJQ2-.js
+++ b/sync-server/www/assets/useChart-59NNyLSS.js
@@ -1 +1 @@
-import{r}from"./index-zXE6XEB1.js";import{g as f}from"./echarts-BIWefrIc.js";function p(){const[n,o]=r.useState(0);return r.useEffect(()=>{const s=()=>o(t=>t+1);return window.addEventListener("fp-theme-change",s),()=>window.removeEventListener("fp-theme-change",s)},[]),n}function d(n){return getComputedStyle(document.documentElement).getPropertyValue("--text-"+n).trim()||"#454e5c"}function h(n,o){const s=r.useRef(null),[t,i]=r.useState(null),u=r.useRef(n);return u.current=n,r.useEffect(()=>{if(!t)return;const e=f(t);s.current=e,e.setOption(u.current(),{notMerge:!0});const c=new ResizeObserver(()=>e.resize());return c.observe(t),()=>{c.disconnect(),e.dispose(),s.current=null}},[t]),r.useEffect(()=>{var e;(e=s.current)==null||e.setOption(u.current(),{notMerge:!0})},[t,...o]),e=>i(e)}export{h as a,d as i,p as u};
+import{r}from"./index-D-R037K4.js";import{g as f}from"./echarts-BIWefrIc.js";function p(){const[n,o]=r.useState(0);return r.useEffect(()=>{const s=()=>o(t=>t+1);return window.addEventListener("fp-theme-change",s),()=>window.removeEventListener("fp-theme-change",s)},[]),n}function d(n){return getComputedStyle(document.documentElement).getPropertyValue("--text-"+n).trim()||"#454e5c"}function h(n,o){const s=r.useRef(null),[t,i]=r.useState(null),u=r.useRef(n);return u.current=n,r.useEffect(()=>{if(!t)return;const e=f(t);s.current=e,e.setOption(u.current(),{notMerge:!0});const c=new ResizeObserver(()=>e.resize());return c.observe(t),()=>{c.disconnect(),e.dispose(),s.current=null}},[t]),r.useEffect(()=>{var e;(e=s.current)==null||e.setOption(u.current(),{notMerge:!0})},[t,...o]),e=>i(e)}export{h as a,d as i,p as u};
diff --git a/sync-server/www/index.html b/sync-server/www/index.html
index 79d461c..2284a0c 100644
--- a/sync-server/www/index.html
+++ b/sync-server/www/index.html
@@ -9,7 +9,7 @@
足迹 Footprints
-
+