module.exports=[97445,(a,b,c)=>{"use strict";function d({widthInt:a,heightInt:b,blurWidth:c,blurHeight:d,blurDataURL:e,objectFit:f}){let g=c?40*c:a,h=d?40*d:b,i=g&&h?`viewBox='0 0 ${g} ${h}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${i}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${i?"none":"contain"===f?"xMidYMid":"cover"===f?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${e}'/%3E%3C/svg%3E`}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"getImageBlurSvg",{enumerable:!0,get:function(){return d}})},75457,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={VALID_LOADERS:function(){return f},imageConfigDefault:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=["default","imgix","cloudinary","akamai","custom"],g={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumRedirects:3,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1}},889,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"getImgProps",{enumerable:!0,get:function(){return i}}),a.r(93089);let d=a.r(97445),e=a.r(75457),f=["-moz-initial","fill","none","scale-down",void 0];function g(a){return void 0!==a.default}function h(a){return void 0===a?a:"number"==typeof a?Number.isFinite(a)?a:NaN:"string"==typeof a&&/^[0-9]+$/.test(a)?parseInt(a,10):NaN}function i({src:a,sizes:b,unoptimized:c=!1,priority:i=!1,preload:j=!1,loading:k,className:l,quality:m,width:n,height:o,fill:p=!1,style:q,overrideSrc:r,onLoad:s,onLoadingComplete:t,placeholder:u="empty",blurDataURL:v,fetchPriority:w,decoding:x="async",layout:y,objectFit:z,objectPosition:A,lazyBoundary:B,lazyRoot:C,...D},E){var F;let G,H,I,{imgConf:J,showAltText:K,blurComplete:L,defaultLoader:M}=E,N=J||e.imageConfigDefault;if("allSizes"in N)G=N;else{let a=[...N.deviceSizes,...N.imageSizes].sort((a,b)=>a-b),b=N.deviceSizes.sort((a,b)=>a-b),c=N.qualities?.sort((a,b)=>a-b);G={...N,allSizes:a,deviceSizes:b,qualities:c}}if(void 0===M)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let O=D.loader||M;delete D.loader,delete D.srcSet;let P="__next_img_default"in O;if(P){if("custom"===G.loader)throw Object.defineProperty(Error(`Image with src "${a}" is missing "loader" prop. Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let a=O;O=b=>{let{config:c,...d}=b;return a(d)}}if(y){"fill"===y&&(p=!0);let a={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[y];a&&(q={...q,...a});let c={responsive:"100vw",fill:"100vw"}[y];c&&!b&&(b=c)}let Q="",R=h(n),S=h(o);if((F=a)&&"object"==typeof F&&(g(F)||void 0!==F.src)){let b=g(a)?a.default:a;if(!b.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(b)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!b.height||!b.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(b)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(H=b.blurWidth,I=b.blurHeight,v=v||b.blurDataURL,Q=b.src,!p)if(R||S){if(R&&!S){let a=R/b.width;S=Math.round(b.height*a)}else if(!R&&S){let a=S/b.height;R=Math.round(b.width*a)}}else R=b.width,S=b.height}let T=!i&&!j&&("lazy"===k||void 0===k);(!(a="string"==typeof a?a:Q)||a.startsWith("data:")||a.startsWith("blob:"))&&(c=!0,T=!1),G.unoptimized&&(c=!0),P&&!G.dangerouslyAllowSVG&&a.split("?",1)[0].endsWith(".svg")&&(c=!0);let U=h(m),V=Object.assign(p?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:z,objectPosition:A}:{},K?{}:{color:"transparent"},q),W=L||"empty"===u?null:"blur"===u?`url("data:image/svg+xml;charset=utf-8,${(0,d.getImageBlurSvg)({widthInt:R,heightInt:S,blurWidth:H,blurHeight:I,blurDataURL:v||"",objectFit:V.objectFit})}")`:`url("${u}")`,X=f.includes(V.objectFit)?"fill"===V.objectFit?"100% 100%":"cover":V.objectFit,Y=W?{backgroundSize:X,backgroundPosition:V.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:W}:{},Z=function({config:a,src:b,unoptimized:c,width:d,quality:e,sizes:f,loader:g}){if(c)return{src:b,srcSet:void 0,sizes:void 0};let{widths:h,kind:i}=function({deviceSizes:a,allSizes:b},c,d){if(d){let c=/(^|\s)(1?\d?\d)vw/g,e=[];for(let a;a=c.exec(d);)e.push(parseInt(a[2]));if(e.length){let c=.01*Math.min(...e);return{widths:b.filter(b=>b>=a[0]*c),kind:"w"}}return{widths:b,kind:"w"}}return"number"!=typeof c?{widths:a,kind:"w"}:{widths:[...new Set([c,2*c].map(a=>b.find(b=>b>=a)||b[b.length-1]))],kind:"x"}}(a,d,f),j=h.length-1;return{sizes:f||"w"!==i?f:"100vw",srcSet:h.map((c,d)=>`${g({config:a,src:b,quality:e,width:c})} ${"w"===i?c:d+1}${i}`).join(", "),src:g({config:a,src:b,quality:e,width:h[j]})}}({config:G,src:a,unoptimized:c,width:R,quality:U,sizes:b,loader:O}),$=T?"lazy":k;return{props:{...D,loading:$,fetchPriority:w,width:R,height:S,decoding:x,className:l,style:{...V,...Y},sizes:Z.sizes,srcSet:Z.srcSet,src:r||Z.src},meta:{unoptimized:c,preload:j||i,placeholder:u,fill:p}}}},97836,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"default",{enumerable:!0,get:function(){return f}});let d=a.r(54297),e=()=>{};function f(a){let{headManager:b,reduceComponentsToState:c}=a;function f(){if(b&&b.mountedInstances){let a=d.Children.toArray(Array.from(b.mountedInstances).filter(Boolean));b.updateHead(c(a))}}return b?.mountedInstances?.add(a.children),f(),e(()=>(b?.mountedInstances?.add(a.children),()=>{b?.mountedInstances?.delete(a.children)})),e(()=>(b&&(b._pendingUpdate=f),()=>{b&&(b._pendingUpdate=f)})),null}},30314,(a,b,c)=>{"use strict";b.exports=a.r(81232).vendored.contexts.HeadManagerContext},8076,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={default:function(){return p},defaultHead:function(){return l}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(2657),g=a.r(18253),h=a.r(6155),i=g._(a.r(54297)),j=f._(a.r(97836)),k=a.r(30314);function l(){return[(0,h.jsx)("meta",{charSet:"utf-8"},"charset"),(0,h.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function m(a,b){return"string"==typeof b||"number"==typeof b?a:b.type===i.default.Fragment?a.concat(i.default.Children.toArray(b.props.children).reduce((a,b)=>"string"==typeof b||"number"==typeof b?a:a.concat(b),[])):a.concat(b)}a.r(93089);let n=["name","httpEquiv","charSet","itemProp"];function o(a){let b,c,d,e;return a.reduce(m,[]).reverse().concat(l().reverse()).filter((b=new Set,c=new Set,d=new Set,e={},a=>{let f=!0,g=!1;if(a.key&&"number"!=typeof a.key&&a.key.indexOf("$")>0){g=!0;let c=a.key.slice(a.key.indexOf("$")+1);b.has(c)?f=!1:b.add(c)}switch(a.type){case"title":case"base":c.has(a.type)?f=!1:c.add(a.type);break;case"meta":for(let b=0,c=n.length;b{let c=a.key||b;return i.default.cloneElement(a,{key:c})})}let p=function({children:a}){let b=(0,i.useContext)(k.HeadManagerContext);return(0,h.jsx)(j.default,{reduceComponentsToState:o,headManager:b,children:a})};("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},24044,(a,b,c)=>{"use strict";b.exports=a.r(81232).vendored.contexts.ImageConfigContext},77540,(a,b,c)=>{"use strict";b.exports=a.r(81232).vendored.contexts.RouterContext},34871,(a,b,c)=>{"use strict";function d(a,b){let c=a||75;return b?.qualities?.length?b.qualities.reduce((a,b)=>Math.abs(b-c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"default",{enumerable:!0,get:function(){return f}});let d=a.r(34871);function e({config:a,src:b,width:c,quality:e}){if(b.startsWith("/")&&b.includes("?")&&a.localPatterns?.length===1&&"**"===a.localPatterns[0].pathname&&""===a.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${b}" is using a query string which is not configured in images.localPatterns. Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let f=(0,d.findClosestQuality)(e,a);return`${a.path}?url=${encodeURIComponent(b)}&w=${c}&q=${f}${b.startsWith("/_next/static/media/"),""}`}e.__next_img_default=!0;let f=e},3104,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"Image",{enumerable:!0,get:function(){return u}});let d=a.r(2657),e=a.r(18253),f=a.r(6155),g=e._(a.r(54297)),h=d._(a.r(7614)),i=d._(a.r(8076)),j=a.r(889),k=a.r(75457),l=a.r(24044);a.r(93089);let m=a.r(77540),n=d._(a.r(1705)),o=a.r(78133),p={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function q(a,b,c,d,e,f,g){let h=a?.src;a&&a["data-loaded-src"]!==h&&(a["data-loaded-src"]=h,("decode"in a?a.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(a.parentElement&&a.isConnected){if("empty"!==b&&e(!0),c?.current){let b=new Event("load");Object.defineProperty(b,"target",{writable:!1,value:a});let d=!1,e=!1;c.current({...b,nativeEvent:b,currentTarget:a,target:a,isDefaultPrevented:()=>d,isPropagationStopped:()=>e,persist:()=>{},preventDefault:()=>{d=!0,b.preventDefault()},stopPropagation:()=>{e=!0,b.stopPropagation()}})}d?.current&&d.current(a)}}))}function r(a){return g.use?{fetchPriority:a}:{fetchpriority:a}}globalThis.__NEXT_IMAGE_IMPORTED=!0;let s=(0,g.forwardRef)(({src:a,srcSet:b,sizes:c,height:d,width:e,decoding:h,className:i,style:j,fetchPriority:k,placeholder:l,loading:m,unoptimized:n,fill:p,onLoadRef:s,onLoadingCompleteRef:t,setBlurComplete:u,setShowAltText:v,sizesInput:w,onLoad:x,onError:y,...z},A)=>{let B=(0,g.useCallback)(a=>{a&&(y&&(a.src=a.src),a.complete&&q(a,l,s,t,u,n,w))},[a,l,s,t,u,y,n,w]),C=(0,o.useMergedRef)(A,B);return(0,f.jsx)("img",{...z,...r(k),loading:m,width:e,height:d,decoding:h,"data-nimg":p?"fill":"1",className:i,style:j,sizes:c,srcSet:b,src:a,ref:C,onLoad:a=>{q(a.currentTarget,l,s,t,u,n,w)},onError:a=>{v(!0),"empty"!==l&&u(!0),y&&y(a)}})});function t({isAppRouter:a,imgAttributes:b}){let c={as:"image",imageSrcSet:b.srcSet,imageSizes:b.sizes,crossOrigin:b.crossOrigin,referrerPolicy:b.referrerPolicy,...r(b.fetchPriority)};return a&&h.default.preload?(h.default.preload(b.src,c),null):(0,f.jsx)(i.default,{children:(0,f.jsx)("link",{rel:"preload",href:b.srcSet?void 0:b.src,...c},"__nimg-"+b.src+b.srcSet+b.sizes)})}let u=(0,g.forwardRef)((a,b)=>{let c=(0,g.useContext)(m.RouterContext),d=(0,g.useContext)(l.ImageConfigContext),e=(0,g.useMemo)(()=>{let a=p||d||k.imageConfigDefault,b=[...a.deviceSizes,...a.imageSizes].sort((a,b)=>a-b),c=a.deviceSizes.sort((a,b)=>a-b),e=a.qualities?.sort((a,b)=>a-b);return{...a,allSizes:b,deviceSizes:c,qualities:e,localPatterns:d?.localPatterns}},[d]),{onLoad:h,onLoadingComplete:i}=a,o=(0,g.useRef)(h);(0,g.useEffect)(()=>{o.current=h},[h]);let q=(0,g.useRef)(i);(0,g.useEffect)(()=>{q.current=i},[i]);let[r,u]=(0,g.useState)(!1),[v,w]=(0,g.useState)(!1),{props:x,meta:y}=(0,j.getImgProps)(a,{defaultLoader:n.default,imgConf:e,blurComplete:r,showAltText:v});return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s,{...x,unoptimized:y.unoptimized,placeholder:y.placeholder,fill:y.fill,onLoadRef:o,onLoadingCompleteRef:q,setBlurComplete:u,setShowAltText:w,sizesInput:a.sizes,ref:b}),y.preload?(0,f.jsx)(t,{isAppRouter:!c,imgAttributes:x}):null]})});("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},18054,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={default:function(){return k},getImageProps:function(){return j}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(2657),g=a.r(889),h=a.r(3104),i=f._(a.r(1705));function j(a){let{props:b}=(0,g.getImgProps)(a,{defaultLoader:i.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[a,c]of Object.entries(b))void 0===c&&delete b[a];return{props:b}}let k=h.Image},87552,(a,b,c)=>{b.exports=a.r(18054)},32216,a=>{"use strict";var b=a.i(6155),c=a.i(31483),d=a.i(87552),e=a.i(8895),f=a.i(99766),g=a.i(74719),h=a.i(57657),i=a.i(16606),j=a.i(20334),k=a.i(79551),l=a.i(18116),m=a.i(18951),n=a.i(64584),o=a.i(53902),p=a.i(38076),q=a.i(43181),r=a.i(54297);a.i(33965);var s=a.i(83966);a.s([],85298),a.i(85298);var t=a.i(30951),u=a.i(70214),v=a.i(74208),w=a.i(50139),x=a.i(75948),y=a.i(8803),z=a.i(77308),z=z,A=a.i(58590),B=a.i(76606),C=a.i(47811),D=a.i(17622),E=a.i(31357),F=a.i(30901),G=a.i(6241),H=a.i(5815),I=a.i(61895),I=I,J=a.i(52681),K=a.i(87799),L=a.i(68905),L=L,M=a.i(78121);a.s(["Arc",()=>H.Arc,"BezierCurve",()=>G.BezierCurve,"BoundingRect",()=>M.BoundingRect,"Circle",()=>y.Circle,"CompoundPath",()=>J.CompoundPath,"Ellipse",()=>z.default,"Group",()=>v.Group,"Image",()=>w.Image,"IncrementalDisplayable",()=>I.default,"Line",()=>F.Line,"LinearGradient",()=>K.LinearGradient,"Polygon",()=>C.Polygon,"Polyline",()=>D.Polyline,"RadialGradient",()=>L.default,"Rect",()=>E.Rect,"Ring",()=>B.Ring,"Sector",()=>A.Sector,"Text",()=>x.Text,"clipPointsByRect",()=>t.clipPointsByRect,"clipRectByRect",()=>t.clipRectByRect,"createIcon",()=>t.createIcon,"extendPath",()=>t.extendPath,"extendShape",()=>t.extendShape,"getShapeClass",()=>t.getShapeClass,"getTransform",()=>t.getTransform,"initProps",()=>u.initProps,"makeImage",()=>t.makeImage,"makePath",()=>t.makePath,"mergePath",()=>t.mergePath,"registerShape",()=>t.registerShape,"resizePath",()=>t.resizePath,"updateProps",()=>u.updateProps],34766);var N=a.i(34766),N=N;function O({members:a}){let c=(0,r.useRef)(null),d=(0,r.useRef)(null),e=(0,r.useRef)(null),g=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(!c.current||0===a.length)return;let b=s.init(c.current),d={male:a.filter(a=>"MALE"===a.gender).length,female:a.filter(a=>"FEMALE"===a.gender).length,other:a.filter(a=>"OTHER"===a.gender).length};return b.setOption({title:{text:"性别分布",left:"center",top:10,textStyle:{fontSize:14,fontWeight:"normal"}},tooltip:{trigger:"item",formatter:"{b}: {c} 人 ({d}%)"},legend:{bottom:10,left:"center"},series:[{type:"pie",radius:["40%","70%"],center:["50%","50%"],avoidLabelOverlap:!1,itemStyle:{borderRadius:10,borderColor:"#fff",borderWidth:2},label:{show:!1},emphasis:{label:{show:!0,fontSize:16,fontWeight:"bold"}},data:[{value:d.male,name:"男性",itemStyle:{color:"#3b82f6"}},{value:d.female,name:"女性",itemStyle:{color:"#ec4899"}},...d.other>0?[{value:d.other,name:"其他",itemStyle:{color:"#8b5cf6"}}]:[]]}]}),()=>{b.dispose()}},[a]),(0,r.useEffect)(()=>{if(!d.current||0===a.length)return;let b=s.init(d.current),c=new Map;a.forEach(a=>{let b=a.generation||0;c.set(b,(c.get(b)||0)+1)});let e=Array.from(c.entries()).sort((a,b)=>a[0]-b[0]);return b.setOption({title:{text:"世代分布",left:"center",top:10,textStyle:{fontSize:14,fontWeight:"normal"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:"{b}世: {c} 人"},grid:{left:"3%",right:"4%",bottom:"3%",top:"15%",containLabel:!0},xAxis:{type:"category",data:e.map(([a])=>`第${a}世`),axisLabel:{rotate:45}},yAxis:{type:"value",name:"人数"},series:[{type:"bar",data:e.map(([,a])=>a),itemStyle:{color:new N.LinearGradient(0,0,0,1,[{offset:0,color:"#83bff6"},{offset:.5,color:"#188df0"},{offset:1,color:"#188df0"}])},emphasis:{itemStyle:{color:new N.LinearGradient(0,0,0,1,[{offset:0,color:"#2378f7"},{offset:.7,color:"#2378f7"},{offset:1,color:"#83bff6"}])}}}]}),()=>{b.dispose()}},[a]),(0,r.useEffect)(()=>{if(!e.current||0===a.length)return;let b=s.init(e.current),c=new Date().getFullYear(),d={"0-18":0,"19-35":0,"36-50":0,"51-65":0,"66+":0,已故:0};return a.forEach(a=>{if(a.deathDate)d["已故"]++;else if(a.birthDate){let b=c-new Date(a.birthDate).getFullYear();b<=18?d["0-18"]++:b<=35?d["19-35"]++:b<=50?d["36-50"]++:b<=65?d["51-65"]++:d["66+"]++}}),b.setOption({title:{text:"年龄分布",left:"center",top:10,textStyle:{fontSize:14,fontWeight:"normal"}},tooltip:{trigger:"item",formatter:"{b}: {c} 人 ({d}%)"},legend:{bottom:10,left:"center"},series:[{type:"pie",radius:"60%",center:["50%","50%"],data:Object.entries(d).filter(([,a])=>a>0).map(([a,b])=>({name:a,value:b})),emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}),()=>{b.dispose()}},[a]),(0,r.useEffect)(()=>{if(!g.current||0===a.length)return;let b=s.init(g.current),c=new Map;a.forEach(a=>{if(a.birthDate){let b=new Date(a.birthDate).getFullYear();if(b>=1900){let a=10*Math.floor(b/10);c.set(a,(c.get(a)||0)+1)}}});let d=Array.from(c.entries()).sort((a,b)=>a[0]-b[0]);return b.setOption({title:{text:"出生年代分布",left:"center",top:10,textStyle:{fontSize:14,fontWeight:"normal"}},tooltip:{trigger:"axis",formatter:"{b}年代: {c} 人"},grid:{left:"3%",right:"4%",bottom:"3%",top:"15%",containLabel:!0},xAxis:{type:"category",data:d.map(([a])=>`${a}s`),axisLabel:{rotate:45}},yAxis:{type:"value",name:"人数"},series:[{type:"line",data:d.map(([,a])=>a),smooth:!0,areaStyle:{color:new N.LinearGradient(0,0,0,1,[{offset:0,color:"rgba(99, 102, 241, 0.5)"},{offset:1,color:"rgba(99, 102, 241, 0.1)"}])},lineStyle:{color:"#6366f1",width:2},itemStyle:{color:"#6366f1"}}]}),()=>{b.dispose()}},[a]),(0,b.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,b.jsxs)(f.Card,{children:[(0,b.jsxs)(f.CardHeader,{children:[(0,b.jsx)(f.CardTitle,{children:"性别分布"}),(0,b.jsx)(f.CardDescription,{children:"家族成员性别比例"})]}),(0,b.jsx)(f.CardContent,{children:(0,b.jsx)("div",{ref:c,className:"h-[300px]"})})]}),(0,b.jsxs)(f.Card,{children:[(0,b.jsxs)(f.CardHeader,{children:[(0,b.jsx)(f.CardTitle,{children:"世代分布"}),(0,b.jsx)(f.CardDescription,{children:"各世代人数统计"})]}),(0,b.jsx)(f.CardContent,{children:(0,b.jsx)("div",{ref:d,className:"h-[300px]"})})]}),(0,b.jsxs)(f.Card,{children:[(0,b.jsxs)(f.CardHeader,{children:[(0,b.jsx)(f.CardTitle,{children:"年龄分布"}),(0,b.jsx)(f.CardDescription,{children:"按年龄段划分的人数"})]}),(0,b.jsx)(f.CardContent,{children:(0,b.jsx)("div",{ref:e,className:"h-[300px]"})})]}),(0,b.jsxs)(f.Card,{children:[(0,b.jsxs)(f.CardHeader,{children:[(0,b.jsx)(f.CardTitle,{children:"出生年代分布"}),(0,b.jsx)(f.CardDescription,{children:"各年代出生人数趋势"})]}),(0,b.jsx)(f.CardContent,{children:(0,b.jsx)("div",{ref:g,className:"h-[300px]"})})]})]})}var P=a.i(90383),Q=a.i(1845),R=a.i(87240),S=a.i(59580),T=a.i(85801),U=a.i(90247),V=a.i(78802),W=a.i(65119);let X=(0,a.i(37111).default)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var Y=a.i(75525),Z=a.i(24749),$=a.i(6364);function _(){let{data:a}=(0,Q.useSession)(),{currentTree:c}=(0,q.useFamily)(),{showConfirm:d,showAlert:f}=(0,$.useDialog)(),[g,h]=(0,r.useState)(!1),[i,j]=(0,r.useState)([]),[k,l]=(0,r.useState)(!1),[n,o]=(0,r.useState)(""),[p,s]=(0,r.useState)("VIEWER"),[t,u]=(0,r.useState)(""),[v,w]=(0,r.useState)(""),[x,y]=(0,r.useState)("");(0,r.useEffect)(()=>{g&&c?.id&&z()},[g,c?.id]);let z=async()=>{if(c?.id)try{let a=await fetch(`/api/trees/${c.id}/collaborators`);if(a.ok){let b=await a.json();j(b.collaborators)}}catch(a){console.error("加载协作者失败:",a)}},A=async a=>{if(a.preventDefault(),c?.id){l(!0),w(""),y("");try{let a=await fetch(`/api/trees/${c.id}/invite`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:n,role:p,password:t||void 0})}),b=await a.json();if(!a.ok)throw Error(b.error||"邀请失败");y(b.message),o(""),u(""),z()}catch(a){w(a.message)}finally{l(!1)}}},B=async a=>{if(c?.id&&await d("确定要移除此协作者吗?","移除协作者"))try{if(!(await fetch(`/api/trees/${c.id}/collaborators?userId=${a}`,{method:"DELETE"})).ok)throw Error("移除失败");z()}catch(a){console.error(a),await f("移除失败","错误")}};return c&&c.ownerId===a?.user?.id?(0,b.jsxs)(R.Dialog,{open:g,onOpenChange:h,children:[(0,b.jsx)(R.DialogTrigger,{asChild:!0,children:(0,b.jsxs)(e.Button,{variant:"outline",className:"gap-2",children:[(0,b.jsx)(m.Users,{className:"h-4 w-4"}),"协作管理"]})}),(0,b.jsxs)(R.DialogContent,{className:"sm:max-w-[600px]",children:[(0,b.jsxs)(R.DialogHeader,{children:[(0,b.jsxs)(R.DialogTitle,{children:["协作管理 - ",c.name]}),(0,b.jsx)(R.DialogDescription,{children:"邀请其他用户协作编辑或查看您的家族树。"})]}),(0,b.jsxs)("div",{className:"space-y-6 py-4",children:[(0,b.jsxs)("form",{onSubmit:A,className:"space-y-4 border-b pb-6",children:[(0,b.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(T.Label,{htmlFor:"email",children:"邮箱地址"}),(0,b.jsx)(S.Input,{id:"email",type:"email",placeholder:"输入对方邮箱",value:n,onChange:a=>o(a.target.value),required:!0})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(T.Label,{htmlFor:"role",children:"权限角色"}),(0,b.jsxs)(U.Select,{value:p,onValueChange:a=>s(a),children:[(0,b.jsx)(U.SelectTrigger,{children:(0,b.jsx)(U.SelectValue,{})}),(0,b.jsxs)(U.SelectContent,{children:[(0,b.jsx)(U.SelectItem,{value:"EDITOR",children:(0,b.jsxs)("div",{className:"flex items-center",children:[(0,b.jsx)(Y.Edit,{className:"mr-2 h-4 w-4"}),"编辑者 (可以增删改)"]})}),(0,b.jsx)(U.SelectItem,{value:"VIEWER",children:(0,b.jsxs)("div",{className:"flex items-center",children:[(0,b.jsx)(X,{className:"mr-2 h-4 w-4"}),"查看者 (只读)"]})})]})]})]}),(0,b.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,b.jsx)(T.Label,{htmlFor:"password",children:"初始密码 (仅新用户)"}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(S.Input,{id:"password",type:"text",placeholder:"为新用户设置密码(可选)",value:t,onChange:a=>u(a.target.value),minLength:6,className:"flex-1"}),(0,b.jsx)(e.Button,{type:"submit",disabled:k,children:k?"处理中...":"发送邀请"})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"如果是现有用户,此密码将被忽略。"})]})]}),v&&(0,b.jsxs)(Z.Alert,{variant:"destructive",children:[(0,b.jsx)(Z.AlertTitle,{children:"错误"}),(0,b.jsx)(Z.AlertDescription,{children:v})]}),x&&(0,b.jsxs)(Z.Alert,{className:"bg-green-50 text-green-700 border-green-200",children:[(0,b.jsx)(Z.AlertTitle,{children:"成功"}),(0,b.jsx)(Z.AlertDescription,{children:x})]})]}),(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)("h3",{className:"font-medium text-sm text-muted-foreground",children:"现有协作者"}),0===i.length?(0,b.jsx)("div",{className:"text-center py-8 text-muted-foreground border border-dashed rounded-lg",children:"暂无协作者"}):(0,b.jsx)("div",{className:"space-y-2 max-h-[300px] overflow-y-auto pr-2",children:i.map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg border bg-muted/30",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(V.Avatar,{className:"h-9 w-9 border border-border",children:(0,b.jsx)(V.AvatarFallback,{children:a.user.name?.charAt(0).toUpperCase()||a.user.email.charAt(0).toUpperCase()})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"font-medium text-sm",children:a.user.name||"用户"}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground",children:a.user.email})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("span",{className:`text-[10px] px-2 py-0.5 rounded-full border ${"EDITOR"===a.role?"bg-blue-50 text-blue-700 border-blue-200":"bg-gray-50 text-gray-700 border-gray-200"}`,children:"EDITOR"===a.role?"编辑者":"查看者"}),(0,b.jsx)(e.Button,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",onClick:()=>B(a.userId),children:(0,b.jsx)(W.Trash2,{className:"h-4 w-4"})})]})]},a.id))})]})]})]})]}):null}var aa=a.i(17400),ab=a.i(17160),ac=a.i(26269);function ad(){let a,s,t,u,{treeData:v,isLoading:w,currentTree:x}=(0,q.useFamily)(),{data:y}=(0,Q.useSession)(),[z,A]=(0,r.useState)([]);(0,r.useEffect)(()=>{y?.user?.id&&(localStorage.getItem(`user_${y.user.id}_visited`)||(localStorage.setItem(`user_${y.user.id}_visited`,"true"),window.location.href="/help"))},[y?.user?.id]),(0,r.useEffect)(()=>{if(!x?.id||!y?.user?.id)return void A([]);let a=new AbortController;return fetch(`/api/trees/${x.id}/activity-logs?limit=10`,{signal:a.signal}).then(a=>{if(!a.ok)throw Error(`HTTP error! status: ${a.status}`);return a.json()}).then(a=>{a.logs&&Array.isArray(a.logs)&&A(a.logs)}).catch(a=>{"AbortError"!==a.name&&console.error("获取活动日志失败:",a),A([])}),()=>a.abort()},[x?.id,y?.user?.id]);let B=(0,r.useMemo)(()=>{let a=Object.values(v.members),b=a.length,c=a.filter(a=>!a.deathDate).length,d=a.filter(a=>a.deathDate).length,e=a.filter(a=>"MALE"===a.gender).length,f=a.filter(a=>"FEMALE"===a.gender).length,g=a.map(a=>a.generation||0),h=g.length>0?Math.max(...g):0,i=a.map(a=>a.birthDate?new Date(a.birthDate).getFullYear():null).filter(a=>null!==a),j=i.length>0?Math.min(...i):new Date().getFullYear(),k=i.length>0?new Date().getFullYear()-j:0,l=a.filter(a=>a.birthDate&&a.deathDate),m=l.reduce((a,b)=>{let c=new Date(b.birthDate).getFullYear();return a+(new Date(b.deathDate).getFullYear()-c)},0);return{totalMembers:b,livingMembers:c,deceasedMembers:d,maleCount:e,femaleCount:f,maxGeneration:h,yearsSpan:k,earliestYear:j,averageLifespan:l.length>0?Math.round(m/l.length):0}},[v]);(0,r.useMemo)(()=>Object.values(v.members).sort((a,b)=>parseInt(b.id)-parseInt(a.id)).slice(0,5),[v]);let C=(0,r.useMemo)(()=>{let a=Object.values(v.members),b=[];return a.forEach(a=>{if(a.birthDate){let c=a.isLunarDate||!1,d=(0,ab.isInCurrentMonth)(a.birthDate,c);if(d){let e;if(c){let b=(0,ab.solar2lunar)(new Date(a.birthDate));b&&(e=`${b.monthName}${b.dayName}`)}b.push({member:a,type:"birth",date:a.birthDate,day:d.day,month:d.month,isLunar:c,lunarDisplay:e})}}if(a.deathDate){let c=a.isLunarDate||!1,d=(0,ab.isInCurrentMonth)(a.deathDate,c);if(d){let e;if(c){let b=(0,ab.solar2lunar)(new Date(a.deathDate));b&&(e=`${b.monthName}${b.dayName}`)}b.push({member:a,type:"death",date:a.deathDate,day:d.day,month:d.month,isLunar:c,lunarDisplay:e})}}}),b.sort((a,b)=>a.day-b.day).slice(0,5)},[v]),D=(0,r.useMemo)(()=>{let a=Object.values(v.members),b={};return a.forEach(a=>{a.ancestralHome&&(b[a.ancestralHome]||(b[a.ancestralHome]=[]),b[a.ancestralHome].push(a))}),Object.entries(b).sort((a,b)=>b[1].length-a[1].length)},[v]);return w||x?(0,b.jsxs)("div",{className:"flex min-h-screen flex-col bg-background font-sans",children:[(0,b.jsx)(g.SiteHeader,{}),(0,b.jsxs)("main",{className:"flex-1 container mx-auto py-8 px-4 md:px-6",children:[(0,b.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between gap-4 mb-8",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("h1",{className:"text-3xl font-serif font-bold text-foreground",children:x?.name||"家族族谱"}),x?.currentUserRole&&(0,b.jsx)("span",{className:`text-xs px-2 py-1 rounded-full border font-sans font-normal translate-y-[2px] ${"OWNER"===x.currentUserRole?"bg-purple-100 text-purple-700 border-purple-200":"EDITOR"===x.currentUserRole?"bg-blue-100 text-blue-700 border-blue-200":"bg-gray-100 text-gray-700 border-gray-200"}`,children:"OWNER"===x.currentUserRole?"所有者":"EDITOR"===x.currentUserRole?"编辑者":"查看者"})]}),(0,b.jsxs)("p",{className:"text-muted-foreground mt-1",children:[x?.description||"记录家族历史,传承家族文化",B.maxGeneration>0&&` \xb7 第 ${B.maxGeneration} 代传人`]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[y&&x?.ownerId===y.user?.id&&(0,b.jsx)(_,{}),aa.permissions.canCreate(x?.currentUserRole)&&(0,b.jsx)(c.default,{href:x?.id?`/members/new?treeId=${x.id}`:"/members/new",children:(0,b.jsxs)(e.Button,{className:"gap-2 bg-primary text-primary-foreground hover:bg-primary/90",children:[(0,b.jsx)(j.UserPlus,{className:"h-4 w-4"}),"添加成员"]})})]})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-8",children:[(0,b.jsx)(ae,{title:"家族成员",value:B.totalMembers.toString(),subtitle:`男 ${B.maleCount} \xb7 女 ${B.femaleCount}`,icon:(0,b.jsx)(m.Users,{className:"h-4 w-4"}),href:x?.id?`/members?treeId=${x.id}`:void 0}),(0,b.jsx)(ae,{title:"记录年代",value:`${B.yearsSpan} 年`,subtitle:`始于 ${B.earliestYear} 年`,icon:(0,b.jsx)(o.Clock,{className:"h-4 w-4"}),href:x?.id?`/timeline?treeId=${x.id}`:void 0}),(0,b.jsx)(ae,{title:"繁衍代数",value:`${B.maxGeneration} 代`,subtitle:`当前最高世代`,icon:(0,b.jsx)(k.Network,{className:"h-4 w-4"}),href:x?.id?`/tree?treeId=${x.id}`:void 0}),(0,b.jsx)(ae,{title:"在世 / 已故",value:`${B.livingMembers} / ${B.deceasedMembers}`,subtitle:`在世率 ${B.totalMembers>0?Math.round(B.livingMembers/B.totalMembers*100):0}%`,icon:(0,b.jsx)(m.Users,{className:"h-4 w-4"}),href:x?.id?`/members?treeId=${x.id}`:void 0}),(0,b.jsx)(ae,{title:"平均寿命",value:B.averageLifespan>0?`${B.averageLifespan} 岁`:"暂无数据",subtitle:`已统计 ${B.deceasedMembers} 人`,icon:(0,b.jsx)(o.Clock,{className:"h-4 w-4"}),href:x?.id?`/timeline?treeId=${x.id}`:void 0}),(0,b.jsx)(c.default,{href:x?.id?`/members?treeId=${x.id}`:"#",children:(0,b.jsxs)(f.Card,{className:"relative overflow-hidden border border-border/50 shadow-sm bg-gradient-to-br from-card to-card/50 backdrop-blur transition-all hover:shadow-lg hover:border-primary/30 group cursor-pointer",children:[(0,b.jsxs)(f.CardContent,{className:"p-6",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsx)("p",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"性别比例"}),(0,b.jsx)("div",{className:"text-primary/70 bg-primary/10 p-2.5 rounded-lg group-hover:bg-primary/20 transition-colors",children:(0,b.jsx)(m.Users,{className:"h-4 w-4"})})]}),(0,b.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,b.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,b.jsx)("span",{className:"text-3xl font-serif font-bold text-primary tracking-tight",children:B.maleCount>0?"1":"0"}),(0,b.jsx)("span",{className:"text-2xl font-bold text-muted-foreground",children:":"}),(0,b.jsx)("span",{className:"text-3xl font-serif font-bold text-primary tracking-tight",children:B.maleCount>0?(B.femaleCount/B.maleCount).toFixed(2):"0"})]}),(0,b.jsxs)("div",{className:"text-center text-xs text-muted-foreground/80 font-medium mt-1",children:["男性 ",B.maleCount," · 女性 ",B.femaleCount]})]})]}),(0,b.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-1 bg-gradient-to-r from-primary/50 via-primary to-primary/50 opacity-0 group-hover:opacity-100 transition-opacity"})]})})]}),(0,b.jsxs)(i.Tabs,{defaultValue:"recent",className:"w-full",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)(i.TabsList,{className:"bg-muted/50",children:[(0,b.jsx)(i.TabsTrigger,{value:"recent",children:"最近更新"}),(0,b.jsx)(i.TabsTrigger,{value:"anniversaries",children:"近期纪念日"}),(0,b.jsx)(i.TabsTrigger,{value:"statistics",children:"统计图表"}),(0,b.jsx)(i.TabsTrigger,{value:"migration",children:"迁徙记录"})]}),(0,b.jsx)(c.default,{href:x?.id?`/members?treeId=${x.id}`:"/members",children:(0,b.jsxs)(e.Button,{variant:"ghost",size:"sm",className:"text-muted-foreground gap-1",children:["查看全部 ",(0,b.jsx)(n.ArrowRight,{className:"h-3 w-3"})]})})]}),(0,b.jsx)(i.TabsContent,{value:"recent",className:"mt-0",children:(0,b.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,b.jsx)("div",{className:"space-y-6",children:(0,b.jsxs)(f.Card,{className:"border-none shadow-sm bg-primary/5",children:[(0,b.jsx)(f.CardHeader,{children:(0,b.jsxs)(f.CardTitle,{className:"flex items-center gap-2 text-primary font-serif",children:[(0,b.jsx)(l.Calendar,{className:"h-5 w-5"}),"本月祭祖/纪念"]})}),(0,b.jsx)(f.CardContent,{className:"grid gap-4",children:C.length>0?C.map((a,d)=>{let e=new Date().getFullYear()-new Date(a.date).getFullYear();return(0,b.jsx)(c.default,{href:`/members/${a.member.id}${x?.id?`?treeId=${x.id}`:""}`,children:(0,b.jsxs)("div",{className:"flex items-center gap-4 p-3 rounded-lg bg-background/60 border border-border/50 hover:bg-background transition-colors cursor-pointer",children:[a.isLunar&&a.lunarDisplay?(0,b.jsx)("div",{className:"flex flex-col items-center justify-center w-14 h-14 rounded-lg bg-gradient-to-br from-red-50 to-amber-50 border-2 border-red-200/50 text-red-800 font-serif shadow-sm",children:(0,b.jsx)("span",{className:"text-[10px] leading-tight text-center px-1",children:a.lunarDisplay.replace("月","")})}):(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center w-14 h-14 rounded-lg bg-gradient-to-br from-blue-50 to-sky-50 border-2 border-blue-200/50 text-blue-800 font-serif shadow-sm",children:[(0,b.jsxs)("span",{className:"text-xs font-medium",children:[a.month,"月"]}),(0,b.jsx)("span",{className:"font-bold text-xl leading-tight",children:a.day})]}),(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsxs)("p",{className:"font-medium flex items-center gap-2",children:[(0,b.jsx)(ac.MemberNameWithStatus,{name:a.member.fullName,isDead:!!a.member.deathDate})," ","birth"===a.type?"诞辰":"忌日",a.isLunar&&(0,b.jsx)("span",{className:"text-[10px] text-amber-600 bg-amber-50 px-1.5 py-0.5 rounded border border-amber-200",children:"农历"})]}),(0,b.jsxs)("p",{className:"text-sm text-muted-foreground",children:["第 ",a.member.generation," 世 · 距今 ",e," 年","death"===a.type&&" · 已故",a.isLunar&&a.lunarDisplay&&(0,b.jsxs)("span",{className:"ml-1",children:["· ",a.lunarDisplay]})]})]})]})},`${a.member.id}-${a.type}`)}):(0,b.jsx)("div",{className:"text-center py-12",children:(0,b.jsx)("p",{className:"text-sm text-foreground font-light tracking-wide",children:"此月无忆"})})})]})}),(0,b.jsxs)(f.Card,{className:"border-none shadow-sm bg-card/50 backdrop-blur",children:[(0,b.jsxs)(f.CardHeader,{children:[(0,b.jsx)(f.CardTitle,{className:"font-serif",children:"近期修谱动态"}),(0,b.jsx)(f.CardDescription,{children:"记录家族成员的最新变动与修订"})]}),(0,b.jsx)(f.CardContent,{children:(0,b.jsx)(h.ScrollArea,{className:"h-[400px] pr-4",children:(0,b.jsx)("div",{className:"space-y-4",children:z.length>0?z.map((a,d)=>{let e,f,g;return(0,b.jsxs)("div",{className:"flex gap-3 group hover:bg-muted/30 p-2 rounded-lg transition-colors",children:[(0,b.jsxs)("div",{className:"relative flex flex-col items-center",children:[(0,b.jsx)("div",{className:"h-full w-px bg-border group-last:hidden"}),(0,b.jsx)("div",{className:`absolute top-2 h-2 w-2 rounded-full ring-4 ring-background ${"CREATE"===a.action?"bg-green-500":"UPDATE"===a.action?"bg-blue-500":"DELETE"===a.action?"bg-red-500":"bg-purple-500"}`})]}),(0,b.jsxs)("div",{className:"pb-2 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[(0,b.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${"CREATE"===a.action?"bg-green-100 text-green-700":"UPDATE"===a.action?"bg-blue-100 text-blue-700":"DELETE"===a.action?"bg-red-100 text-red-700":"bg-purple-100 text-purple-700"}`,children:"CREATE"===a.action?"创建":"UPDATE"===a.action?"更新":"DELETE"===a.action?"删除":"导入"}),a.entityId&&"MEMBER"===a.entityType?(0,b.jsx)(c.default,{href:`/members/${a.entityId}${x?.id?`?treeId=${x.id}`:""}`,className:"font-medium hover:text-primary hover:underline transition-colors",children:a.entityName||"未知"}):(0,b.jsx)("span",{className:"font-medium",children:a.entityName||"未知"}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:(0,P.format)(new Date(a.timestamp),"MM-dd HH:mm")})]}),"UPDATE"===a.action&&a.changes?(0,b.jsx)("div",{className:"text-xs text-muted-foreground space-y-0.5",children:(e=a.changes,f={fullName:"姓名",surname:"姓氏",givenName:"名字",gender:"性别",birthDate:"出生日期",deathDate:"去世日期",birthPlace:"出生地",ancestralHome:"祖籍",generation:"世代",generationName:"字辈",courtesyName:"字",artName:"号",posthumousName:"谥号",rank:"排行",bio:"简介",phone:"手机",telephone:"电话",email:"邮箱",address:"地址",photoIds:"照片",spouseIds:"配偶",childrenIds:"子女",motherId:"母亲",fatherId:"父亲",isFounder:"始祖",isLunarDate:"农历日期",burialPlace:"安葬地",tags:"标签"},(g=Object.entries(e).filter(([a])=>f[a]).slice(0,2)).length>0?(0,b.jsxs)(b.Fragment,{children:[g.map(([a])=>(0,b.jsxs)("div",{children:["• 修改了",f[a]]},a)),Object.keys(e).length>2&&(0,b.jsxs)("div",{className:"italic",children:["等 ",Object.keys(e).length," 项变更"]})]}):(0,b.jsx)("div",{children:"更新了成员"}))}):(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:["CREATE"===a.action&&"创建了成员","UPDATE"===a.action&&"更新了成员","DELETE"===a.action&&"删除了成员","IMPORT"===a.action&&"导入了数据"]})]})]},a.id)}):(0,b.jsx)("div",{className:"text-center py-12",children:(0,b.jsx)("p",{className:"text-sm text-foreground font-light tracking-wide",children:"静待修谱"})})})})})]})]})}),(0,b.jsx)(i.TabsContent,{value:"anniversaries",className:"mt-0",children:(0,b.jsxs)(f.Card,{className:"border-none shadow-sm bg-card/50 backdrop-blur",children:[(0,b.jsxs)(f.CardHeader,{children:[(0,b.jsx)(f.CardTitle,{className:"font-serif",children:"近期纪念日"}),(0,b.jsx)(f.CardDescription,{children:"未来三个月内的生日和忌日"})]}),(0,b.jsx)(f.CardContent,{children:(0,b.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:(s=new Date((a=new Date).getFullYear(),a.getMonth()+3,a.getDate()),t=Object.values(v.members),u=[],t.forEach(b=>{if(b.birthDate){let c,d,e=new Date(b.birthDate);if(b.isLunarDate){let b=(0,ab.solar2lunar)(e);if(b){let f=(0,ab.lunar2solar)(a.getFullYear(),b.lunarMonth,b.lunarDay,b.isLeap);f?(c=f,d=`${b.monthName}${b.dayName}`):c=new Date(a.getFullYear(),e.getMonth(),e.getDate())}else c=new Date(a.getFullYear(),e.getMonth(),e.getDate())}else c=new Date(a.getFullYear(),e.getMonth(),e.getDate());c>=a&&c<=s&&u.push({member:b,type:"birth",date:c,originalDate:b.birthDate,isLunar:b.isLunarDate||!1,lunarDisplay:d,month:c.getMonth()+1,day:c.getDate()})}if(b.deathDate){let c,d,e=new Date(b.deathDate);if(b.isLunarDate){let b=(0,ab.solar2lunar)(e);if(b){let f=(0,ab.lunar2solar)(a.getFullYear(),b.lunarMonth,b.lunarDay,b.isLeap);f?(c=f,d=`${b.monthName}${b.dayName}`):c=new Date(a.getFullYear(),e.getMonth(),e.getDate())}else c=new Date(a.getFullYear(),e.getMonth(),e.getDate())}else c=new Date(a.getFullYear(),e.getMonth(),e.getDate());c>=a&&c<=s&&u.push({member:b,type:"death",date:c,originalDate:b.deathDate,isLunar:b.isLunarDate||!1,lunarDisplay:d,month:c.getMonth()+1,day:c.getDate()})}}),u.sort((a,b)=>a.date.getTime()-b.date.getTime()),u.length>0?u.map((d,e)=>{let g=a.getFullYear()-new Date(d.originalDate).getFullYear();return(0,b.jsx)(c.default,{href:`/members/${d.member.id}${x?.id?`?treeId=${x.id}`:""}`,children:(0,b.jsx)(f.Card,{className:"hover:border-primary transition-colors cursor-pointer",children:(0,b.jsx)(f.CardContent,{className:"p-4",children:(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[d.isLunar&&d.lunarDisplay?(0,b.jsx)("div",{className:"flex flex-col items-center justify-center w-14 h-14 rounded-lg bg-gradient-to-br from-red-50 to-amber-50 border-2 border-red-200/50 text-red-800 font-serif shadow-sm",children:(0,b.jsx)("span",{className:"text-[10px] leading-tight text-center px-1",children:d.lunarDisplay})}):(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center w-14 h-14 rounded-lg bg-gradient-to-br from-blue-50 to-sky-50 border-2 border-blue-200/50 text-blue-800 font-serif shadow-sm",children:[(0,b.jsxs)("span",{className:"text-xs font-medium",children:[d.month,"月"]}),(0,b.jsx)("span",{className:"font-bold text-xl leading-tight",children:d.day})]}),(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsxs)("p",{className:"font-medium text-sm flex items-center gap-2",children:[(0,b.jsx)(ac.MemberNameWithStatus,{name:d.member.fullName,isDead:!!d.member.deathDate})," ","birth"===d.type?"诞辰":"忌日",d.isLunar&&(0,b.jsx)("span",{className:"text-[10px] text-amber-600 bg-amber-50 px-1.5 py-0.5 rounded border border-amber-200",children:"农历"})]}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:["第 ",d.member.generation," 世 · ",g," 年","death"===d.type&&" · 已故",d.isLunar&&d.lunarDisplay&&(0,b.jsxs)("span",{className:"ml-1",children:["· ",d.lunarDisplay]})]})]})]})})})},`${d.member.id}-${d.type}-${e}`)}):(0,b.jsx)("div",{className:"col-span-full text-center py-16",children:(0,b.jsx)("p",{className:"text-sm text-foreground font-light tracking-wide",children:"来日无期"})}))})})]})}),(0,b.jsx)(i.TabsContent,{value:"statistics",className:"mt-0",children:(0,b.jsx)(O,{members:Object.values(v.members)})}),(0,b.jsx)(i.TabsContent,{value:"migration",className:"mt-0",children:(0,b.jsxs)(f.Card,{className:"border-none shadow-sm bg-card/50 backdrop-blur",children:[(0,b.jsxs)(f.CardHeader,{children:[(0,b.jsx)(f.CardTitle,{className:"font-serif",children:"家族迁徙记录"}),(0,b.jsx)(f.CardDescription,{children:"记录家族成员的籍贯分布"})]}),(0,b.jsx)(f.CardContent,{children:(0,b.jsx)("div",{className:"space-y-6",children:D.length>0?D.map(([a,d])=>(0,b.jsxs)("div",{className:"border-l-4 border-primary pl-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,b.jsx)("h3",{className:"text-lg font-serif font-bold",children:a}),(0,b.jsxs)("span",{className:"text-sm text-muted-foreground",children:[d.length," 人"]})]}),(0,b.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-2",children:d.map(a=>(0,b.jsx)(c.default,{href:`/members/${a.id}${x?.id?`?treeId=${x.id}`:""}`,children:(0,b.jsxs)("div",{className:"px-3 py-2 bg-muted rounded hover:bg-muted/80 transition-colors",children:[(0,b.jsx)("p",{className:"text-sm font-medium truncate",children:a.fullName}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:["第 ",a.generation," 世"]})]})},a.id))})]},a)):(0,b.jsx)("div",{className:"text-center py-16",children:(0,b.jsx)("p",{className:"text-sm text-foreground font-light tracking-wide",children:"未有迁徙"})})})})]})})]})]})]}):(0,b.jsxs)("div",{className:"flex min-h-screen flex-col bg-background font-sans",children:[(0,b.jsx)(g.SiteHeader,{}),(0,b.jsxs)("main",{className:"flex-1 flex items-center justify-center px-4 md:px-6 relative -mt-24",children:[(0,b.jsxs)("div",{className:"absolute inset-0 pointer-events-none overflow-hidden",children:[(0,b.jsx)("div",{className:"absolute left-32 top-[20%] w-[20rem] h-[20rem] opacity-20 rotate-3",children:(0,b.jsx)(d.default,{src:"/wxz.png",alt:"",fill:!0,className:"object-contain",priority:!0})}),(0,b.jsx)("div",{className:"absolute right-32 top-[20%] w-[20rem] h-[20rem] opacity-20 -rotate-3",children:(0,b.jsx)(d.default,{src:"/tree1.png",alt:"",fill:!0,className:"object-contain",priority:!0})}),(0,b.jsx)("div",{className:"absolute left-24 bottom-[8%] w-[28rem] h-[28rem] opacity-15 rotate-6",children:(0,b.jsx)(d.default,{src:"/building.png",alt:"",fill:!0,className:"object-contain",priority:!0})}),(0,b.jsx)("div",{className:"absolute right-24 bottom-[8%] w-[28rem] h-[28rem] opacity-15 -rotate-6",children:(0,b.jsx)(d.default,{src:"/tree.png",alt:"",fill:!0,className:"object-contain",priority:!0})})]}),(0,b.jsxs)("div",{className:"max-w-3xl mx-auto text-center space-y-12",children:[(0,b.jsx)("p",{className:"text-2xl md:text-3xl text-foreground font-serif font-medium tracking-wider",children:"传承千年文脉 · 记录家族荣光"}),(0,b.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 text-primary/20",children:(0,b.jsx)(p.BookOpen,{className:"h-16 w-16",strokeWidth:1})}),(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsx)("h1",{className:"text-4xl md:text-5xl font-serif font-light text-foreground tracking-wide",children:"华夏家谱"}),(0,b.jsx)("div",{className:"h-48 overflow-hidden relative",children:(0,b.jsxs)("div",{className:"space-y-8 text-muted-foreground antialiased animate-scroll",children:[(0,b.jsx)("p",{className:"text-lg md:text-xl font-serif font-normal leading-relaxed tracking-wide",children:"家族是根,文化是魂 · 记录过往,传承未来"}),(0,b.jsx)("p",{className:"text-base md:text-lg font-serif font-normal leading-relaxed opacity-85 tracking-wide",children:"让每一个故事都成为永恒 · 血脉相连,世代相传"}),(0,b.jsx)("p",{className:"text-base md:text-lg font-serif font-normal leading-relaxed opacity-70 tracking-wide",children:"铭记历史,启迪后人 · 家风永续,德泽绵长"}),(0,b.jsx)("p",{className:"text-lg md:text-xl font-serif font-normal leading-relaxed tracking-wide",children:"家族是根,文化是魂 · 记录过往,传承未来"}),(0,b.jsx)("p",{className:"text-base md:text-lg font-serif font-normal leading-relaxed opacity-85 tracking-wide",children:"让每一个故事都成为永恒 · 血脉相连,世代相传"}),(0,b.jsx)("p",{className:"text-base md:text-lg font-serif font-normal leading-relaxed opacity-70 tracking-wide",children:"铭记历史,启迪后人 · 家风永续,德泽绵长"})]})})]}),(0,b.jsx)("div",{className:"pt-8",children:(0,b.jsx)(c.default,{href:"/trees/new",children:(0,b.jsxs)(e.Button,{size:"lg",className:"gap-3 px-8 py-6 text-lg font-serif bg-primary text-primary-foreground hover:bg-primary/90 transition-all duration-300 shadow-lg hover:shadow-xl",children:["开始记录",(0,b.jsx)(n.ArrowRight,{className:"h-5 w-5"})]})})})]})]})]})}function ae({title:a,value:d,subtitle:e,icon:g,href:h}){let i=(0,b.jsxs)(f.Card,{className:"relative overflow-hidden border border-border/50 shadow-sm bg-gradient-to-br from-card to-card/50 backdrop-blur transition-all hover:shadow-lg hover:border-primary/30 group cursor-pointer",children:[(0,b.jsxs)(f.CardContent,{className:"p-6",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsx)("p",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:a}),(0,b.jsx)("div",{className:"text-primary/70 bg-primary/10 p-2.5 rounded-lg group-hover:bg-primary/20 transition-colors",children:g})]}),(0,b.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,b.jsx)("span",{className:"text-3xl font-serif font-bold text-foreground tracking-tight",children:d}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground/80 font-medium",children:e})]})]}),(0,b.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-1 bg-gradient-to-r from-primary/50 via-primary to-primary/50 opacity-0 group-hover:opacity-100 transition-opacity"})]});return h?(0,b.jsx)(c.default,{href:h,children:i}):i}a.s(["default",()=>ad],32216)}]; //# sourceMappingURL=Documents_go-new_chinese-family-tree_0a218095._.js.map