vendor: 10,463 bytes, line 1
1import{ai as f,aj as he,r as H,t as ke,j as e,A as Q,ag as Z,L as Pe,B as je,C as T,e as B,k as We,ak as Ne,s as we,al as Ae,c as ae,d as oe,m as Se,am as Oe,q as De}from"./index-bM8UT4Os.js";import{S as z}from"./skeleton-DVHVUV4f.js";import{S as Ee,a as Ce,b as Re,c as Le,d as ne}from"./select-CDP2pHh8.js";import{q as I,L as F,r as X,u as K,C as ee,A as _e,v as $,x as ie,y as Me,z as ce,B as Te,D as Be,E as ze,F as se,G as Ie,H as le,I as de,J as $e,K as Ke,X as q,Y as U,M as Ve,R as ue,N as Fe,O as ge,T as te,P as He}from"./LineChart-DZS4M0xI.js";import{C as Ge}from"./chevron-up-TG6jWiKP.js";var Ye=["layout","type","stroke","connectNulls","isRange","ref"],Xe=["key"],fe;function V(t){"@babel/helpers - typeof";return V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},V(t)}function ve(t,s){if(t==null)return{};var o=qe(t,s),r,n;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(t);for(n=0;n<d.length;n++)r=d[n],!(s.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function qe(t,s){if(t==null)return{};var o={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(s.indexOf(r)>=0)continue;o[r]=t[r]}return o}function M(){return M=Object.assign?Object.assign.bind():function(t){for(var s=1;s<arguments.length;s++){var o=arguments[s];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t},M.apply(this,arguments)}function pe(t,s){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);s&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),o.push.apply(o,r)}return o}function R(t){for(var s=1;s<arguments.length;s++){var o=arguments[s]!=null?arguments[s]:{};s%2?pe(Object(o),!0).forEach(function(r){E(t,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):pe(Object(o)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(o,r))})}return t}function Ue(t,s){if(!(t instanceof s))throw new TypeError("Cannot call a class as a function")}function xe(t,s){for(var o=0;o<s.length;o++){var r=s[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ye(r.key),r)}}function Je(t,s,o){return s&&xe(t.prototype,s),o&&xe(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function Qe(t,s,o){return s=J(s),Ze(t,be()?Reflect.construct(s,o||[],J(t).constructor):s.apply(t,o))}function Ze(t,s){if(s&&(V(s)==="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return et(t)}function et(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function be(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(be=function(){return!!t})()}function J(t){return J=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},J(t)}function tt(t,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(s&&s.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),s&&re(t,s)}function re(t,s){return re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},re(t,s)}function E(t,s,o){return s=ye(s),s in t?Object.defineProperty(t,s,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[s]=o,t}function ye(t){var s=st(t,"string");return V(s)=="symbol"?s:s+""}function st(t,s){if(V(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var r=o.call(t,s);if(V(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var C=(function(t){function s(){var o;Ue(this,s);for(var r=arguments.length,n=new Array(r),d=0;d<r;d++)n[d]=arguments[d];return o=Qe(this,s,[].concat(n)),E(o,"state",{isAnimationFinished:!0}),E(o,"id",ze("recharts-area-")),E(o,"handleAnimationEnd",function(){var i=o.props.onAnimationEnd;o.setState({isAnimationFinished:!0}),se(i)&&i()}),E(o,"handleAnimationStart",function(){var i=o.props.onAnimationStart;o.setState({isAnimationFinished:!1}),se(i)&&i()}),o}return tt(s,t),Je(s,[{key:"renderDots",value:function(r,n,d){var i=this.props.isAnimationActive,u=this.state.isAnimationFinished;if(i&&!u)return null;var a=this.props,c=a.dot,x=a.points,l=a.dataKey,m=I(this.props,!1),b=I(c,!0),k=x.map(function(v,w){var y=R(R(R({key:"dot-".concat(w),r:3},m),b),{},{index:w,cx:v.x,cy:v.y,dataKey:l,value:v.value,payload:v.payload,points:x});return s.renderDotItem(c,y)}),N={clipPath:r?"url(#clipPath-".concat(n?"":"dots-").concat(d,")"):null};return f.createElement(F,M({className:"recharts-area-dots"},N),k)}},{key:"renderHorizontalRect",value:function(r){var n=this.props,d=n.baseLine,i=n.points,u=n.strokeWidth,a=i[0].x,c=i[i.length-1].x,x=r*Math.abs(a-c),l=X(i.map(function(m){return m.y||0}));return K(d)&&typeof d=="number"?l=Math.max(d,l):d&&Array.isArray(d)&&d.length&&(l=Math.max(X(d.map(function(m){return m.y||0})),l)),K(l)?f.createElement("rect",{x:a<c?a:a-x,y:0,width:x,height:Math.floor(l+(u?parseInt("".concat(u),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var n=this.props,d=n.baseLine,i=n.points,u=n.strokeWidth,a=i[0].y,c=i[i.length-1].y,x=r*Math.abs(a-c),l=X(i.map(function(m){return m.x||0}));return K(d)&&typeof d=="number"?l=Math.max(d,l):d&&Array.isArray(d)&&d.length&&(l=Math.max(X(d.map(function(m){return m.x||0})),l)),K(l)?f.createElement("rect",{x:0,y:a<c?a:a-x,width:l+(u?parseInt("".concat(u),10):1),height:Math.floor(x)}):null}},{key:"renderClipRect",value:function(r){var n=this.props.layout;return n==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,n,d,i){var u=this.props,a=u.layout,c=u.type,x=u.stroke,l=u.connectNulls,m=u.isRange;u.ref;var b=ve(u,Ye);return f.createElement(F,{clipPath:d?"url(#clipPath-".concat(i,")"):null},f.createElement(ee,M({},I(b,!0),{points:r,connectNulls:l,type:c,baseLine:n,layout:a,stroke:"none",className:"recharts-area-area"})),x!=="none"&&f.createElement(ee,M({},I(this.props,!1),{className:"recharts-area-curve",layout:a,type:c,connectNulls:l,fill:"none",points:r})),x!=="none"&&m&&f.createElement(ee,M({},I(this.props,!1),{className:"recharts-area-curve",layout:a,type:c,connectNulls:l,fill:"none",points:n})))}},{key:"renderAreaWithAnimation",value:function(r,n){var d=this,i=this.props,u=i.points,a=i.baseLine,c=i.isAnimationActive,x=i.animationBegin,l=i.animationDuration,m=i.animationEasing,b=i.animationId,k=this.state,N=k.prevPoints,v=k.prevBaseLine;return f.createElement(_e,{begin:x,duration:l,isActive:c,easing:m,from:{t:0},to:{t:1},key:"area-".concat(b),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(w){var y=w.t;if(N){var O=N.length/u.length,g=u.map(function(j,A){var S=Math.floor(A*O);if(N[S]){var D=N[S],L=$(D.x,j.x),_=$(D.y,j.y);return R(R({},j),{},{x:L(y),y:_(y)})}return j}),p;if(K(a)&&typeof a=="number"){var h=$(v,a);p=h(y)}else if(ie(a)||Me(a)){var P=$(v,0);p=P(y)}else p=a.map(function(j,A){var S=Math.floor(A*O);if(v[S]){var D=v[S],L=$(D.x,j.x),_=$(D.y,j.y);return R(R({},j),{},{x:L(y),y:_(y)})}return j});return d.renderAreaStatically(g,p,r,n)}return f.createElement(F,null,f.createElement("defs",null,f.createElement("clipPath",{id:"animationClipPath-".concat(n)},d.renderClipRect(y))),f.createElement(F,{clipPath:"url(#animationClipPath-".concat(n,")")},d.renderAreaStatically(u,a,r,n)))})}},{key:"renderArea",value:function(r,n){var d=this.props,i=d.points,u=d.baseLine,a=d.isAnimationActive,c=this.state,x=c.prevPoints,l=c.prevBaseLine,m=c.totalLength;return a&&i&&i.length&&(!x&&m>0||!ce(x,i)||!ce(l,u))?this.renderAreaWithAnimation(r,n):this.renderAreaStatically(i,u,r,n)}},{key:"render",value:function(){var r,n=this.props,d=n.hide,i=n.dot,u=n.points,a=n.className,c=n.top,x=n.left,l=n.xAxis,m=n.yAxis,b=n.width,k=n.height,N=n.isAnimationActive,v=n.id;if(d||!u||!u.length)return null;var w=this.state.isAnimationFinished,y=u.length===1,O=he("recharts-area",a),g=l&&l.allowDataOverflow,p=m&&m.allowDataOverflow,h=g||p,P=ie(v)?this.id:v,j=(r=I(i,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},A=j.r,S=A===void 0?3:A,D=j.strokeWidth,L=D===void 0?2:D,_=Te(i)?i:{},W=_.clipDot,G=W===void 0?!0:W,Y=S*2+L;return f.createElement(F,{className:O},g||p?f.createElement("defs",null,f.createElement("clipPath",{id:"clipPath-".concat(P)},f.createElement("rect",{x:g?x:x-b/2,y:p?c:c-k/2,width:g?b:b*2,height:p?k:k*2})),!G&&f.createElement("clipPath",{id:"clipPath-dots-".concat(P)},f.createElement("rect",{x:x-Y/2,y:c-Y/2,width:b+Y,height:k+Y}))):null,y?null:this.renderArea(h,P),(i||y)&&this.renderDots(h,G,P),(!N||w)&&Be.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(r,n){return r.animationId!==n.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:n.curPoints,prevBaseLine:n.curBaseLine}:r.points!==n.curPoints||r.baseLine!==n.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])})(H.PureComponent);fe=C;E(C,"displayName","Area");E(C,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ie.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});E(C,"getBaseValue",function(t,s,o,r){var n=t.layout,d=t.baseValue,i=s.props.baseValue,u=i??d;if(K(u)&&typeof u=="number")return u;var a=n==="horizontal"?r:o,c=a.scale.domain();if(a.type==="number"){var x=Math.max(c[0],c[1]),l=Math.min(c[0],c[1]);return u==="dataMin"?l:u==="dataMax"||x<0?x:Math.max(Math.min(c[0],c[1]),0)}return u==="dataMin"?c[0]:u==="dataMax"?c[1]:c[0]});E(C,"getComposedData",function(t){var s=t.props,o=t.item,r=t.xAxis,n=t.yAxis,d=t.xAxisTicks,i=t.yAxisTicks,u=t.bandSize,a=t.dataKey,c=t.stackedData,x=t.dataStartIndex,l=t.displayedData,m=t.offset,b=s.layout,k=c&&c.length,N=fe.getBaseValue(s,o,r,n),v=b==="horizontal",w=!1,y=l.map(function(g,p){var h;k?h=c[x+p]:(h=le(g,a),Array.isArray(h)?w=!0:h=[N,h]);var P=h[1]==null||k&&le(g,a)==null;
1return v?{x:de({axis:r,ticks:d,bandSize:u,entry:g,index:p}),y:P?null:n.scale(h[1]),value:h,payload:g}:{x:P?null:r.scale(h[1]),y:de({axis:n,ticks:i,bandSize:u,entry:g,index:p}),value:h,payload:g}}),O;return k||w?O=y.map(function(g){var p=Array.isArray(g.value)?g.value[0]:null;return v?{x:g.x,y:p!=null&&g.y!=null?n.scale(p):null}:{x:p!=null?r.scale(p):null,y:g.y}}):O=v?n.scale(N):r.scale(N),R({points:y,baseLine:O,layout:b,isRange:w},m)});E(C,"renderDotItem",function(t,s){var o;if(f.isValidElement(t))o=f.cloneElement(t,s);else if(se(t))o=t(s);else{var r=he("recharts-area-dot",typeof t!="boolean"?t.className:""),n=s.key,d=ve(s,Xe);o=f.createElement($e,M({},d,{key:n,className:r}))}return o});var me=Ke({chartName:"AreaChart",GraphicalChild:C,axisComponents:[{axisType:"xAxis",AxisComp:q},{axisType:"yAxis",AxisComp:U}],formatAxisMap:Ve});function ct(){const{data:t,isLoading:s}=ke.workouts.getAll.useQuery(),[o,r]=H.useState("all"),[n,d]=H.useState(null),i=H.useMemo(()=>{if(!t||t.length===0)return null;const a=t.filter(g=>Number(g.weight)>0),c={};a.forEach(g=>{const p=g.exerciseName.replace(/^\[.*?\]\s*/,"");c[p]||(c[p]=[]),c[p].push({...g,cleanName:p})});const x=Object.entries(c).map(([g,p])=>{const h=[...p].sort((W,G)=>new Date(W.createdAt).getTime()-new Date(G.createdAt).getTime()),P=h[h.length-1],j=Math.max(...p.map(W=>Number(W.weight)||0)),A=Number(P.weight)||0,S=Number(h[0].weight)||0,D=S>0?(A-S)/S*100:0,L=A*(1+(P.reps||1)/30),_=A>=j&&h.length>1;return{name:g,currentWeight:A,maxWeight:j,estimated1RM:Math.round(L),reps:P.reps||0,sets:P.sets||0,progressPercent:Math.round(D*10)/10,lastSession:new Date(P.createdAt).toLocaleDateString("zh-HK"),totalSessions:p.length,isPR:_,history:h.map(W=>({date:new Date(W.createdAt).toLocaleDateString("zh-HK",{month:"numeric",day:"numeric"}),dateRaw:new Date(W.createdAt).getTime(),weight:Number(W.weight)||0,reps:W.reps||0,sets:W.sets||0,volume:(Number(W.weight)||0)*(W.reps||0)*(W.sets||0)}))}}).sort((g,p)=>p.totalSessions-g.totalSessions),l=new Date,m=t.filter(g=>{const p=new Date(g.createdAt);return p.getMonth()===l.getMonth()&&p.getFullYear()===l.getFullYear()}),b=new Date(l);b.setDate(l.getDate()-l.getDay()),b.setHours(0,0,0,0);const k=t.filter(g=>new Date(g.createdAt)>=b),N=[...t].sort((g,p)=>new Date(p.createdAt).getTime()-new Date(g.createdAt).getTime())[0],v=new Date(N.createdAt),w=Math.floor((l.getTime()-v.getTime())/(1e3*60*60*24)),y=w===0?"仿¥":w===1?"å°æ¥":`${w} æ¥å`,O=a.reduce((g,p)=>g+(Number(p.weight)||0)*(p.reps||0)*(p.sets||0),0);return{exerciseStats:x,monthlyCount:m.length,weeklyCount:k.length,lastTrainText:y,totalVolume:O,totalRecords:t.length,exerciseNames:x.map(g=>g.name)}},[t]),u=H.useMemo(()=>{if(!i)return[];if(o==="all"){const a=i.exerciseStats.slice(0,3),c=new Map;return a.forEach(x=>
1{x.history.forEach(l=>{c.has(l.dateRaw)||c.set(l.dateRaw,{date:l.date,dateRaw:l.dateRaw}),c.get(l.dateRaw)[x.name]=l.weight})}),Array.from(c.values()).sort((x,l)=>x.dateRaw-l.dateRaw)}else return i.exerciseStats.find(c=>c.name===o)?.history||[]},[i,o]);return s?e.jsx(Q,{"data-loc":"client/src/pages/WorkoutProgress.tsx:137",title:"è¨ç·´é²åº¦",showBack:!0,children:e.jsx("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:138",className:"py-6 px-4",children:e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:139",className:"max-w-6xl mx-auto space-y-6",children:[e.jsx(z,{"data-loc":"client/src/pages/WorkoutProgress.tsx:140",className:"h-8 w-48"}),e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:141",className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[e.jsx(z,{"data-loc":"client/src/pages/WorkoutProgress.tsx:142",className:"h-24"}),e.jsx(z,{"data-loc":"client/src/pages/WorkoutProgress.tsx:143",className:"h-24"}),e.jsx(z,{"data-loc":"client/src/pages/WorkoutProgress.tsx:144",className:"h-24"}),e.jsx(z,{"data-loc":"client/src/pages/WorkoutProgress.tsx:145",className:"h-24"})]}),e.jsx(z,{"data-loc":"client/src/pages/WorkoutProgress.tsx:147",className:"h-64"})]})})}):i?e.jsx(Q,{"data-loc":"client/src/pages/WorkoutProgress.tsx:179",title:"è¨ç·´é²åº¦",showBack:!0,children:e.jsx("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:180",className:"py-6 px-4",children:e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:181",className:"max-w-6xl mx-auto space-y-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:182",className:"mb-2",children:[e.jsx("h1",{"data-loc":"client/src/pages/WorkoutProgress.tsx:183",className:"text-2xl md:text-3xl font-bold text-foreground",children:"è¨ç·´é²åº¦"}),e.jsx("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:184",className:"text-muted-foreground text-sm mt-1",children:"追蹤æ¯ååä½å
ééè®åï¼è¦èä½ å
æé·"})]}),e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:188",className:"grid grid-cols-2 md:grid-cols-4 gap-3 mb-6",children:[e.jsx(T,{"data-loc":"client/src/pages/WorkoutProgress.tsx:189",className:"card-premium",children:e.jsx(B,{"data-loc":"client/src/pages/WorkoutProgress.tsx:190",className:"pt-3 pb-3",children:e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:191",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:192",className:"w-8 h-8 rounded-lg bg-blue-500/10 flex items-center justify-center",children:e.jsx(We,{"data-loc":"client/src/pages/WorkoutProgress.tsx:193",className:"w-4 h-4 text-blue-400"})}),e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:195",children:[e.jsx("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:196",className:"text-muted-foreground text-[10px]",children:"æ¬é±"}),e.jsxs("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:197",className:"text-lg font-bold",children:[i.weeklyCount," ",e.jsx("span",{"data-loc":"client/src/pages/WorkoutProgress.tsx:197",className:"text-xs text-muted-foreground",children:"次"})]})]})]})})}),e.jsx(T,{"data-loc":"client/src/pages/WorkoutProgress.tsx:203",className:"card-premium",children:e.jsx(B,{"data-loc":"client/src/pages/WorkoutProgress.tsx:204",className:"pt-3 pb-3",children:e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:205",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:206",className:"w-8 h-8 rounded-lg bg-green-500/10 flex items-center justify-center",children:e.jsx(Ne,{"data-loc":"client/src/pages/WorkoutProgress.tsx:207",className:"w-4 h-4 text-green-400"})}),e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:209",children:[e.jsx("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:210",className:"text-muted-foreground text-[10px]",children:"æ¬æ"}),e.jsxs("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:211",className:"text-lg font-bold",children:[i.monthlyCount," ",e.jsx("span",{"data-loc":"client/src/pages/WorkoutProgress.tsx:211",className:"text-xs text-muted-foreground",children:"次"})]})]})]})})}),e.jsx(T,{"data-loc":"client/src/pages/WorkoutProgress.tsx:217",className:"card-premium",children:e.jsx(B,{"data-loc":"client/src/pages/WorkoutProgress.tsx:218",className:"pt-3 pb-3",children:e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:219",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:220",className:"w-8 h-8 rounded-lg bg-purple-500/10 flex items-center justify-center",children:e.jsx(we,{"data-loc":"client/src/pages/WorkoutProgress.tsx:221",className:"w-4 h-4 text-purple-400"})}),e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:223",children:[e.jsx("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:224",className:"text-muted-foreground text-[10px]",children:"å使¸"}),e.jsx("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:225",className:"text-lg font-bold",children:i.exerciseStats.length})]})]})})}),e.jsx(T,{"data-loc":"client/src/pages/WorkoutProgress.tsx:231",className:"card-premium",children:e.jsx(B,{"data-loc":"client/src/pages/WorkoutProgress.tsx:232",className:"pt-3 pb-3",children:e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:233",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:234",className:"w-8 h-8 rounded-lg bg-amber-500/10 flex items-center justify-center",children:e.jsx(Ae,{"data-loc":"client/src/pages/WorkoutProgress.tsx:235",className:"w-4 h-4 text-amber-400"})}),e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:237",children:[e.jsx("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:238",className:"text-muted-foreground text-[10px]",children:"æå¾è¨ç·´"}),e.jsx("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:239",className:"text-lg font-bold",children:i.lastTrainText})]})]})})})]}),e.jsxs(T,{"data-loc":"client/src/pages/WorkoutProgress.tsx:247",className:"mb-6 card-premium",children:[e.jsx(ae,{"data-loc":"client/src/pages/WorkoutProgress.tsx:248",className:"pb-2",children:e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:249",className:"flex items-center justify-between",children:[e.jsx(oe,{"data-loc":"client/src/pages/WorkoutProgress.tsx:250",className:"text-base",children:"éé趨å¢"}),e.jsxs(Ee,{"data-loc":"client/src/pages/WorkoutProgress.tsx:251",value:o,onValueChange:r,children:[e.jsx(Ce,{"data-loc":"client/src/pages/WorkoutProgress.tsx:252",className:"w-[180px] h-8 text-xs",children:e.jsx(Re,{"data-loc":"client/src/pages/WorkoutProgress.tsx:253",placeholder:"æåä½..."})}),e.jsxs(Le,{"data-loc":"client/src/pages/WorkoutProgress.tsx:255",children:[e.jsx(ne,{"data-loc":"client/src/pages/WorkoutProgress.tsx:256",value:"all",children:"Top 3 åä½"}),i.exerciseNames.map(a=>e.jsx(ne,{"data-loc":"client/src/pages/WorkoutProgress.tsx:258",value:a,children:a.length>20?a.slice(0,20)+"...":a},a))]})]})]})}),e.jsx(B,{"data-loc":"client/src/pages/WorkoutProgress.tsx:266",children:u.length>1?e.jsx(ue,{"data-loc":"client/src/pages/WorkoutProgress.tsx:268",width:"100%",height:220,children:o==="all"?e.jsxs(Fe,{"data-loc":"client/src/pages/WorkoutProgress.tsx:270",data:u,children:[e.jsx(ge,{"data-loc":"client/src/pages/WorkoutProgress.tsx:271",strokeDasharray:"3 3",stroke:"hsl(var(--border))",opacity:.3}),e.jsx(q,{"data-loc":"client/src/pages/WorkoutProgress.tsx:272",dataKey:"date",stroke:"hsl(var(--muted-foreground))",fontSize:11}),e.jsx(U,{"data-loc":"client/src/pages/WorkoutProgress.tsx:273",stroke:"hsl(var(--muted-foreground))",fontSize:11,unit:"kg"}),e.jsx(te,{"data-loc":"client/src/pages/WorkoutProgress.tsx:274",contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px"},labelStyle:{color:"hsl(var(--foreground))"}}),i.exerciseStats.slice(0,3).map((a,c)=>e.jsx(He,{"data-loc":"client/src/pages/WorkoutProgress.tsx:279",type:"monotone",dataKey:a.name,stroke:["#3b82f6","#10b981","#f59e0b"][c],strokeWidth:2,dot:{r:3},connectNulls:!0},a.name))]}):e.jsxs(me,{"data-loc":"client/src/pages/WorkoutProgress.tsx:291",data:u,children:[e.jsx("defs",{"data-loc":"client/src/pages/WorkoutProgress.tsx:292",children:e.jsxs("linearGradient",{"data-loc":"client/src/pages/WorkoutProgress.tsx:293",id:"weightGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{"data-loc":"client/src/pages/WorkoutProgress.tsx:294",offset:"5%",
1stopColor:"#3b82f6",stopOpacity:.3}),e.jsx("stop",{"data-loc":"client/src/pages/WorkoutProgress.tsx:295",offset:"95%",stopColor:"#3b82f6",stopOpacity:0})]})}),e.jsx(ge,{"data-loc":"client/src/pages/WorkoutProgress.tsx:298",strokeDasharray:"3 3",stroke:"hsl(var(--border))",opacity:.3}),e.jsx(q,{"data-loc":"client/src/pages/WorkoutProgress.tsx:299",dataKey:"date",stroke:"hsl(var(--muted-foreground))",fontSize:11}),e.jsx(U,{"data-loc":"client/src/pages/WorkoutProgress.tsx:300",stroke:"hsl(var(--muted-foreground))",fontSize:11,unit:"kg"}),e.jsx(te,{"data-loc":"client/src/pages/WorkoutProgress.tsx:301",contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px"},labelStyle:{color:"hsl(var(--foreground))"},formatter:a=>[`${a} kg`,"éé"]}),e.jsx(C,{"data-loc":"client/src/pages/WorkoutProgress.tsx:306",type:"monotone",dataKey:"weight",stroke:"#3b82f6",strokeWidth:2,fill:"url(#weightGradient)",dot:{r:4,fill:"#3b82f6"}})]})}):e.jsx("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:318",className:"h-[220px] flex items-center justify-center text-muted-foreground text-sm",children:"éè¦è³å° 2 次è¨éå
å¯ä»¥é¡¯ç¤ºè¶¨å¢å"})})]}),e.jsxs(T,{"data-loc":"client/src/pages/WorkoutProgress.tsx:326",className:"card-premium",children:[e.jsx(ae,{"data-loc":"client/src/pages/WorkoutProgress.tsx:327",className:"pb-2",children:e.jsx(oe,{"data-loc":"client/src/pages/WorkoutProgress.tsx:328",className:"text-base",children:"åä½è©³ç´°"})}),e.jsx(B,{"data-loc":"client/src/pages/WorkoutProgress.tsx:330",children:e.jsx("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:331",className:"space-y-3",children:i.exerciseStats.map(a=>e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:333",className:"border border-border rounded-lg overflow-hidden",children:[e.jsxs("button",{"data-loc":"client/src/pages/WorkoutProgress.tsx:338",onClick:()=>d(n===a.name?null:a.name),className:"w-full flex items-center justify-between p-3 hover:bg-muted/20 transition-colors",children:[e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:342",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:343",className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center",children:e.jsx(Z,{"data-loc":"client/src/pages/WorkoutProgress.tsx:344",className:"w-5 h-5 text-primary"})}),e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:346",className:"text-left",children:[e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:347",className:"flex items-center gap-2",children:[e.jsx("h3",{"data-loc":"client/src/pages/WorkoutProgress.tsx:348",className:"text-sm font-semibold",children:a.name}),a.isPR&&e.jsxs(Se,{"data-loc":"client/src/pages/WorkoutProgress.tsx:350",variant:"secondary",className:"text-[10px] px-1.5 py-0 bg-amber-500/10 text-amber-500 border-amber-500/20",children:[e.jsx(Oe,{"data-loc":"client/src/pages/WorkoutProgress.tsx:351",className:"w-2.5 h-2.5 mr-0.5"})," PR"]})]}),e.jsxs("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:355",className:"text-xs text-muted-foreground",children:[a.totalSessions," 次è¨é ⢠æå¾ï¼",a.lastSession]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:360",className:"flex items-center gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:361",className:"text-right",children:[e.jsxs("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:362",className:"text-sm font-bold",children:[a.currentWeight,"kg"]}),e.jsxs("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:363",className:`text-xs font-medium ${a.progressPercent>=0?"text-green-500":"text-red-500"}`,children:[a.progressPercent>=0?"+":"",a.progressPercent,"%"]})]}),n===a.name?e.jsx(Ge,{"data-loc":"client/src/pages/WorkoutProgress.tsx:368",className:"w-4 h-4 text-muted-foreground"}):e.jsx(De,{"data-loc":"client/src/pages/WorkoutProgress.tsx:370",className:"w-4 h-4 text-muted-foreground"})]})]}),n===a.name&&e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:377",className:"px-3 pb-3 border-t border-border pt-3 space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:378",className:"grid grid-cols-4 gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:379",className:"bg-blue-500/5 border border-blue-500/10 rounded-lg p-2 text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:380",className:"text-[10px] text-muted-foreground",children:"ç¶å"}),e.jsxs("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:381",className:"text-sm font-bold text-blue-400",children:[a.currentWeight,"kg"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:383",className:"bg-green-500/5 border border-green-500/10 rounded-lg p-2 text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:384",className:"text-[10px] text-muted-foreground",children:"æé"}),e.jsxs("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:385",className:"text-sm font-bold text-green-400",children:[a.maxWeight,"kg"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:387",className:"bg-purple-500/5 border border-purple-500/10 rounded-lg p-2 text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:388",className:"text-[10px] text-muted-foreground",children:"ä¼°ç® 1RM"}),e.jsxs("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:389",className:"text-sm font-bold text-purple-400",children:[a.estimated1RM,"kg"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:391",className:"bg-amber-500/5 border border-amber-500/10 rounded-lg p-2 text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:392",className:"text-[10px] text-muted-foreground",children:"çµÃ次"}),e.jsxs("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:393",className:"text-sm font-bold text-amber-400",children:[a.sets,"Ã",a.reps]})]})]}),a.history.length>1&&e.jsx(ue,{"data-loc":"client/src/pages/WorkoutProgress.tsx:399",width:"100%",height:120,children:e.jsxs(me,{"data-loc":"client/src/pages/WorkoutProgress.tsx:400",data:a.history,children:[e.jsx("defs",{"data-loc":"client/src/pages/WorkoutProgress.tsx:401",children:e.jsxs("linearGradient",{"data-loc":"client/src/pages/WorkoutProgress.tsx:402",id:`grad_${a.name}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{"data-loc":"client/src/pages/WorkoutProgress.tsx:403",offset:"5%",
1stopColor:"#3b82f6",stopOpacity:.2}),e.jsx("stop",{"data-loc":"client/src/pages/WorkoutProgress.tsx:404",offset:"95%",stopColor:"#3b82f6",stopOpacity:0})]})}),e.jsx(q,{"data-loc":"client/src/pages/WorkoutProgress.tsx:407",dataKey:"date",fontSize:10,stroke:"hsl(var(--muted-foreground))"}),e.jsx(U,{"data-loc":"client/src/pages/WorkoutProgress.tsx:408",fontSize:10,stroke:"hsl(var(--muted-foreground))",domain:["dataMin - 5","dataMax + 5"]}),e.jsx(te,{"data-loc":"client/src/pages/WorkoutProgress.tsx:409",contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"12px"},formatter:c=>[`${c} kg`,"éé"]}),e.jsx(C,{"data-loc":"client/src/pages/WorkoutProgress.tsx:413",type:"monotone",dataKey:"weight",stroke:"#3b82f6",strokeWidth:2,fill:`url(#grad_${a.name})`,dot:{r:3,fill:"#3b82f6"}})]})})]})]},a.name))})})]})]})})}):e.jsx(Q,{"data-loc":"client/src/pages/WorkoutProgress.tsx:156",title:"è¨ç·´é²åº¦",showBack:!0,children:e.jsx("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:157",className:"py-6 px-4",children:e.jsxs("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:158",className:"max-w-md mx-auto text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/WorkoutProgress.tsx:159",className:"w-20 h-20 bg-gradient-to-br from-blue-500/20 to-purple-500/20 rounded-full flex items-center justify-center mx-auto mb-6",children:e.jsx(Z,{"data-loc":"client/src/pages/WorkoutProgress.tsx:160",className:"w-10 h-10 text-blue-400"})}),e.jsx("h2",{"data-loc":"client/src/pages/WorkoutProgress.tsx:162",className:"text-2xl font-bold mb-3",children:"æªæè¨ç·´è¨é"}),e.jsx("p",{"data-loc":"client/src/pages/WorkoutProgress.tsx:163",className:"text-muted-foreground mb-6 leading-relaxed",children:"éå§è¨éä½ å
è¨ç·´ï¼å¢åº¦æé¡¯ç¤ºä½ å
é²åº¦åçµ±è¨æ¸æã"}),e.jsx(Pe,{"data-loc":"client/src/pages/WorkoutProgress.tsx:166",href:"/workouts",children:e.jsxs(je,{"data-loc":"client/src/pages/WorkoutProgress.tsx:167",className:"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700",children:[e.jsx(Z,{"data-loc":"client/src/pages/WorkoutProgress.tsx:168",className:"w-4 h-4 mr-2"}),"å»è¨éè¨ç·´"]})})]})})})}export{ct as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.