PageSourceSearch

https://www.007icu.top/assets/TimeLineCard-BeVkQJV_.js

js 007icu.top collected 2026-10-09 04:36:32 UTC 13,821 bytes, 77 lines download raw bytes

1import{n as e,o as t}from"./rolldown-runtime-CMxvf4Kt.js";import{Bt as n}from"../i18n/i18n-ar-O-z3xW8i.js";import{F as r,L as i}from"../vendor/vendor-data-runtime-nLFaCKB0.js";import{Tn as a,jn as o}from"../vendor/vendor-ai-runtime-DrDK77gy.js";import{Ao as s,ca as c,ia as l,jo as u}from"./app-const-BzFqCjOv.js";import{Do as d,Fn as f,Mo as ee,Oo as p,bo as m,go as te,to as h,vo as g,wo as _}from"./ScrollArea-CdDxdn_v.js";import{I as ne,Ia as re,Ja as v,Ka as y,M as ie,Qa as ae,Xa as oe,Ya as se,Za as ce,cr as le,eo as ue,fa as b,n as x,qn as S}from"./es-D7HWafs1.js";import{Li as de,ag as fe,et as C,ju as pe,kl as me,lv as he,yf as ge}from"../vendor/vendor-icons-BXJMWD35.js";import{a as _e,n as ve}from"./base-ui-Bi3Dz7GG.js";import{i as w,t as ye}from"./userMemory-Cq2-UQHy.js";import{J as be,K as xe,ns as Se,q as Ce,ts as we}from"./index-Doip7UYu.js";import{n as Te,t as Ee}from"./useActivityTime-DTQWkBHZ.js";import{r as De,t as Oe}from"./EditorModal-CW2aW7Fi.js";import{n as ke,t as Ae}from"./NavHeader-DeWZ4kV0.js";import{n as je,t as Me}from"./RightPanel-Boprx1Dy.js";import{n as Ne,t as Pe}from"./ToggleRightPanelButton-BP3Eb9-s.js";import{n as Fe,r as Ie}from"./useScrollParent-Bu3F7Ppx.js";var Le,Re,ze,Be=e((()=>{Le=t(u()),De(),ye(),a(),Re=t(s()),ze=(0,Le.memo)(()=>{let e=w(e=>e.editingMemoryId),t=w(e=>e.editingMemoryContent),n=w(e=>e.editingMemoryLayer),r=w(e=>e.clearEditingMemory),i=w(e=>e.updateMemory),a={activity:o.Activity,context:o.Context,experience:o.Experience,identity:o.Identity,preference:o.Preference};return(0,Re.jsx)(Oe,{open:!!e,value:t,onCancel:r,onConfirm:async t=>{!e||!n||await i(e,t,a[n])}})})})),Ve,T,He,Ue=e((()=>{x(),ve(),C(),Ve=t(u()),r(),T=t(s()),He=(0,Ve.memo)(({searchValue:e,onSearch:t,sortValue:n,onSortChange:r,sortOptions:a})=>{let{t:o}=i(`memory`);return(0,T.jsxs)(g,{horizontal:!0,align:`center`,gap:12,children:[(0,T.jsx)(ie,{allowClear:!0,defaultValue:e,placeholder:o(`filter.search`),prefix:(0,T.jsx)(de,{size:16}),style:{flex:1},onSearch:e=>t(e),onInputChange:e=>{e||t(e)}}),a&&a.length>0&&r&&(0,T.jsx)(_e,{options:a,prefix:(0,T.jsx)(h,{icon:he,style:{marginRight:4}}),style:{minWidth:150},value:n,onChange:e=>r(e)})]})})})),We,E,Ge,D,O=e((()=>{x(),m(),We=t(u()),E=t(s()),Ge=_(({css:e,cssVar:t})=>({card:e`
2    display: flex;
3    flex-direction: column;
4    gap: 12px;
5
6    padding: 16px;
7    border: 1px solid ${t.colorBorderSecondary};
8    border-radius: ${t.borderRadiusLG};
9
10    background: ${t.colorBgContainer};
11  `})),D=(0,We.memo)(({viewMode:e,rows:t=3})=>e===`timeline`?(0,E.jsx)(g,{gap:24,paddingBlock:24,style:{paddingLeft:32},children:Array.from({length:3}).map((e,t)=>(0,E.jsxs)(g,{gap:8,children:[(0,E.jsx)(S.Title,{active:!0,fontSize:18,lineHeight:1.4,width:`30%`}),(0,E.jsx)(S.Paragraph,{active:!0,rows:4,style:{marginBottom:0}})]},t))}):(0,E.jsx)(le,{gap:12,maxItemWidth:240,paddingBlock:8,rows:t,children:Array.from({length:6}).map((e,t)=>(0,E.jsxs)(g,{className:Ge.card,children:[(0,E.jsx)(S.Title,{active:!0,fontSize:16,lineHeight:1.4,width:`80%`}),(0,E.jsx)(S.Paragraph,{active:!0,rows:5,style:{marginBottom:0}}),(0,E.jsxs)(g,{horizontal:!0,gap:8,children:[(0,E.jsx)(S.Button,{active:!0,size:`small`,style:{height:20,width:60}}),(0,E.jsx)(S.Button,{active:!0,size:`small`,style:{height:20,width:50}})]})]},t))}))})),Ke,k,qe,Je=e((()=>{x(),C(),Ke=t(u()),r(),c(),k=t(s()),qe=(0,Ke.memo)(({value:e,onChange:t})=>{let{t:n}=i(`memory`);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(re,{active:e===`timeline`,icon:fe,size:l,title:n(`viewMode.timeline`),onClick:()=>t(`timeline`)}),(0,k.jsx)(re,{active:e===`grid`,icon:me,size:l,title:n(`viewMode.masonry`),onClick:()=>t(`grid`)})]})})}));function Ye(e,t=0,n=100){if(t>n)return 0;let r=0;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);r=(r<<5)-r+n,r&=r}r=Math.abs(r);let i=n-t+1;return t+r%i}var Xe,A,Ze=e((()=>{m(),ce(),Xe=t(u()),A=e=>{let t=ee(),n=[t.volcano,t.orange,t.gold,t.green,t.cyan,t.blue,t.geekblue,t.purple,t.magenta,t.pink];return(0,Xe.useMemo)(()=>{if(!e)return;let r=Ye(e,0,n.length-1),i=oe(t.isDarkMode?.25:.5,ae(t.isDarkMode?.06:.05,n[r],t.isDarkMode?t.colorBg
11Container:t.colorBgLayout));return{backgroundColor:i,backgroundTextColor:t.isDarkMode?se(.5,i):v(.5,i),color:t.isDarkMode?se(.4,i):v(.6,i),shadowColor:ue(v(.6,i),t.isDarkMode?.5:.2)}},[e,n,t])}})),Qe,$e,j,et=e((()=>{x(),Qe=t(u()),Ze(),$e=t(s()),j=(0,Qe.memo)(({cate:e})=>{let t=A(e);return(0,$e.jsx)(b,{size:`large`,style:{background:t?.backgroundColor,borderRadius:16,color:t?.color,flex:`none`,fontWeight:500},children:e?.toUpperCase()||`CHORE`})})})),tt,M,nt,rt=e((()=>{x(),tt=t(u()),M=t(s()),nt=(0,tt.memo)(()=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(S.Button,{active:!0,shape:`round`,size:`small`,width:64}),(0,M.jsx)(S.Title,{active:!0,fontSize:20,lineHeight:1.4}),(0,M.jsx)(S.Tags,{active:!0,count:2}),(0,M.jsxs)(g,{horizontal:!0,align:`center`,gap:16,justify:`space-between`,children:[(0,M.jsx)(S.Tags,{active:!0}),(0,M.jsx)(S.Tags,{active:!0})]}),(0,M.jsx)(S.Paragraph,{active:!0,fontSize:16,rows:6})]}))})),it,N,at,ot=e((()=>{x(),m(),C(),it=t(u()),r(),N=t(s()),at=(0,it.memo)(()=>{let{t:e}=i(`memory`);return(0,N.jsxs)(te,{flex:1,gap:12,padding:48,width:`100%`,children:[(0,N.jsx)(h,{icon:ge,size:32,style:{color:d.colorTextTertiary}}),(0,N.jsxs)(g,{align:`center`,gap:4,children:[(0,N.jsx)(f,{fontSize:16,weight:600,children:e(`detail.notFound.title`)}),(0,N.jsx)(f,{align:`center`,color:d.colorTextTertiary,fontSize:13,style:{maxWidth:320},children:e(`detail.notFound.desc`)})]})]})})})),st,P,ct,lt=e((()=>{x(),st=t(u()),ke(),je(),Ne(),P=t(s()),ct=(0,st.memo)(({children:e,style:t,header:n,...r})=>(0,P.jsxs)(Me,{defaultWidth:480,maxWidth:640,minWidth:300,children:[(0,P.jsx)(Ae,{...n,left:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Pe,{}),n?.left]})}),(0,P.jsx)(g,{flex:1,gap:16,height:`100%`,paddingInline:16,style:{minWidth:300,overflowY:`auto`,paddingBottom:64,paddingTop:16,...t},...r,children:e})]}))})),ut,F,I,L=e((()=>{x(),m(),C(),ut=t(u()),F=t(s()),I=(0,ut.memo)(({hashTags:e})=>{if(!(!e||e.length===0))return e&&e.length>0&&(0,F.jsx)(g,{horizontal:!0,wrap:`wrap`,children:e.map((e,t)=>(0,F.jsx)(b,{icon:(0,F.jsx)(h,{icon:pe}),variant:`borderless`,style:{color:d.colorTextDescription,gap:2,marginRight:12,paddingInline:0},children:e},t))})})})),dt,R,ft,pt=e((()=>{x(),m(),dt=t(u()),R=t(s()),ft=(0,dt.memo)(({title:e,children:t})=>{if(!t)return;let n=(0,R.jsx)(ne,{fontSize:14,variant:`chat`,style:{color:d.colorText,overflow:`visible`},children:t||``});return e?(0,R.jsxs)(g,{gap:8,children:[(0,R.jsx)(f,{weight:500,children:e}),n]}):n})})),mt,ht,z,B=e((()=>{x(),mt=t(u()),Ee(),ht=t(s()),z=(0,mt.memo)(({capturedAt:e})=>{let{text:t,title:n}=Te(e);return t?(0,ht.jsx)(f,{as:`time`,fontSize:12,style:{display:`block`,flex:`none`},title:n,type:`secondary`,children:t}):null})}));function gt({items:e,defaultColumnCount:t=3,maxItemWidth:n=240,hasMore:r,isLoading:i,onLoadMore:a,renderItem:o}){let s=Ie();return!e||e.length===0?null:(0,V.jsx)(be,{customScrollParent:s,data:e,endReached:r&&a?a:void 0,increaseViewportBy:typeof window<`u`?window.innerHeight:0,overscan:48,style:{minHeight:`100%`},components:{Footer:i?()=>(0,V.jsx)(D,{rows:t,viewMode:`grid`}):void 0,List:(({ref:e,...r})=>(0,V.jsx)(le,{gap:8,maxItemWidth:n,ref:e,rows:t,...r}))},itemContent:(e,t)=>!t||!t.id?null:o(t,{onClick:void 0,onDelete:void 0,onEdit:void 0})})}var _t,V,vt,yt=e((()=>{x(),_t=t(u()),xe(),O(),Fe(),V=t(s()),vt=(0,_t.memo)(gt)})),bt,H,U,W,xt,St=e((()=>{x(),m(),bt=t(u()),L(),B(),Ze(),H=t(s()),U=`memory-masonry-actions`,W=_(({css:e,cssVar:t})=>({actions:e`
12    transition: opacity 0.15s ease;
13  `,masonryCard:e`
14    cursor: pointer;
15    position: relative;
16    background: ${t.colorFillQuaternary};
17    box-shadow: 0 0 0 1px ${t.colorFillTertiary} inset;
18    .${U} {
19      opacity: 0;
20    }
21
22    &:hover {
23      .${U} {
24        opacity: 1;
25      }
26    }
27  `})),xt=(0,bt.memo)(({title:e,titleAddon:t,cate:n,children:r,actions:i,onClick:a,hashTags:o,badges:s,footer:c,capturedAt:l})=>{let u=A(n);return(0,H.jsxs)(y,{className:W.masonryCard,gap:4,height:`100%`,padding:4,variant:`filled`,style:{background:u?.backgroundColor},onClick:a,children:[(0,H.jsxs)(y,{flex:1,gap:12,paddingBlock:16,paddingInline:12,variant:`outlined`,style:{boxShadow:`0 4px 16px -4px ${u?.shadowColor||`rgba(0, 0, 0, 0.2)`}`,overflow:`hidden`,position:`relative`},children:[(e||t)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(g,{horizontal:!0,align:`center`,gap:8,wrap:`wrap`,children:e&&typeof e==`string`?(0,H.jsx)(f,{as:`h2`,ellipsis:{rows:2},fontSize:16,style:{lineHeight:1.5,margin:0},weight:500,children:e}):e}),typeof t==`string`?(0,H.jsx)(b,{variant:`borderless`,children:t}):t]}),typeof r==`string`?(0,H.jsx)(f,{as:`p`,color:d.colorTextSecondary,ellipsis:{rows:4},children:r}):r,(0,H.jsx)(I,{hashTags:o}),(0,H.jsxs)(g,{horizontal:!0,align:`center`,gap:12,justify:`space-between`,style:{overflow:`hidden`,position:`relative`},children:[c,(0,H.jsx)(z,{capturedAt:l})]})]}),(0,H.jsxs)(g,{horizontal:!0,align:`center`,justify:`space-between`,paddingBlock:8,paddingInline:8,style:{overflow:`hidden`,position:`relative`},width:`100%`,children:[(0,H.jsx)(g,{horizontal:!0,align:`center`,flex:1,gap:8,style:{overflow:`hidden`},onClick:e=>{e.stopPropagation(),e.preventDefault()},children:s}),(0,H.jsx)(te,{flex:`none`,children:(0,H.jsx)(f,{align:`center`,color:u?.backgroundTextColor||d.colorTextSecondary,weight:`bold`,style:{opacity:.5},children:n?.toUpperCase()||`CHORE`})}),(0,H.jsx)(g,{horizontal:!0,align:`center`,className:p(U,W.actions),flex:1,gap:4,justify:`flex-end`,style:{overflow:`hidden`},onClick:e=>{e.stopPropagation(),e.preventDefault()},children:i})]})]})})}));function Ct({data:e,groupBy:t=`day`,getDateForGrouping:n,hasMore:r,isLoading:i,onLoadMore:a,renderHeader:o,renderItem:s}){let c=Se(),l=Ie(),{groupCounts:u,sortedPeriods:d,groupedItems:f}=(0,wt.useMemo)(()=>{let r=t===`month`?`YYYY-MM`:`YYYY-MM-DD`,i=e.reduce((e,t)=>
27{let i=(0,G.default)(J(t,n)).format(r);return e[i]||(e[i]=[]),e[i].push(t),e},{}),a=Object.keys(i).sort((e,t)=>t.localeCompare(e)),o=[],s=[];for(let e of a){let t=[...i[e]].sort((e,t)=>{let r=J(e,n);return(0,G.default)(J(t,n)).valueOf()-(0,G.default)(r).valueOf()});o.push(t.length),s.push(...t)}return{groupCounts:o,groupedItems:s,sortedPeriods:a}},[e,t,n]);return!e||e.length===0?null:(0,K.jsxs)(`div`,{className:q.timelineContainer,children:[(0,K.jsx)(`div`,{className:p(q.timelineLine,c&&q.timelineLine_dark)}),(0,K.jsx)(Ce,{customScrollParent:l,endReached:r&&a?a:void 0,groupCounts:u,increaseViewportBy:typeof window<`u`?window.innerHeight:0,overscan:24,style:{minHeight:`100%`},components:{Footer:i?()=>(0,K.jsx)(D,{viewMode:`timeline`}):void 0},groupContent:e=>{let t=d[e],n=u[e];return o(t,n)},itemContent:e=>{let t=f[e];return s(t)}})]})}var G,wt,K,q,J,Tt,Et=e((()=>{m(),G=t(n()),wt=t(u()),xe(),we(),O(),Fe(),K=t(s()),q=_(({css:e,cssVar:t})=>({timelineContainer:e`
28    position: relative;
29    height: 100%;
30  `,timelineLine:e`
31    position: absolute;
32    inset-block: 0;
33    inset-inline-start: 8px;
34
35    width: 1px;
36    height: 100%;
37
38    background: ${t.colorFillSecondary};
39  `,timelineLine_dark:e`
40    background: ${t.colorFillQuaternary};
41  `})),J=(e,t)=>t?t(e):e.capturedAt??e.createdAt??new Date,Tt=(0,wt.memo)(Ct)})),Dt,Ot,Y,X,kt,At,jt=e((()=>{x(),m(),Dt=t(n()),Ot=t(u()),Y=t(s()),X=_(({css:e,cssVar:t})=>({itemWrapper:e`
42    position: relative;
43    padding-inline-start: 24px;
44  `,periodHeader:e`
45    position: sticky;
46    z-index: 10;
47    inset-block-start: 0;
48
49    color: ${t.colorTextSecondary};
50
51    background: ${t.colorBgContainer};
52  `,timelineDot:e`
53    position: absolute;
54    inset-block-start: 20px;
55    inset-inline-start: 0;
56
57    width: 16px;
58    height: 16px;
59    border: 1px solid ${t.colorBorder};
60    border-radius: 50%;
61
62    background: ${t.colorBgElevated};
63    box-shadow: 0 2px 4px -2px rgb(0 0 0 / 40%);
64  `})),kt=(0,Ot.memo)(({periodKey:e,groupBy:t=`day`})=>{let n=t===`month`?(0,Dt.default)(`${e}-01`).format(`MMMM YYYY`):(0,Dt.default)(e).format(`MMMM D, YYYY`);return(0,Y.jsx)(g,{horizontal:!0,align:`center`,className:X.periodHeader,gap:12,paddingBlock:8,children:(0,Y.jsx)(f,{weight:500,children:n})})}),At=(0,Ot.memo)(({children:e})=>(0,Y.jsxs)(`div`,{className:X.itemWrapper,children:[(0,Y.jsx)(`div`,{className:X.timelineDot}),e]}))})),Mt,Z,Q,$,Nt,Pt=e((()=>{x(),m(),Mt=t(u()),et(),L(),B(),Z=t(s()),Q=`memory-actions`,$=_(({css:e})=>({actions:e`
65    transition: opacity 0.15s ease;
66  `,timelineCard:e`
67    position: relative;
68    .${Q} {
69      opacity: 0;
70    }
71
72    &:hover {
73      .${Q} {
74        opacity: 1;
75      }
76    }
77  `})),Nt=(0,Mt.memo)(({title:e,titleAddon:t,cate:n,children:r,actions:i,onClick:a,capturedAt:o,hashTags:s})=>(0,Z.jsxs)(y,{clickable:!0,className:$.timelineCard,gap:12,padding:16,variant:`borderless`,onClick:a,children:[(e||t)&&(0,Z.jsxs)(g,{horizontal:!0,align:`center`,gap:4,width:`100%`,wrap:`wrap`,style:{overflow:`hidden`},children:[e&&typeof e==`string`?(0,Z.jsx)(f,{as:`h2`,fontSize:16,style:{lineHeight:1.5,margin:0},weight:500,children:e}):e,t&&(0,Z.jsx)(b,{children:t})]}),typeof r==`string`?(0,Z.jsx)(f,{as:`p`,color:d.colorTextSecondary,ellipsis:{rows:3},children:r}):r,(0,Z.jsx)(I,{hashTags:s}),(0,Z.jsxs)(g,{horizontal:!0,align:`center`,gap:8,justify:`space-between`,children:[(0,Z.jsxs)(g,{horizontal:!0,align:`center`,gap:8,children:[(0,Z.jsx)(j,{cate:n}),(0,Z.jsx)(z,{capturedAt:o})]}),(0,Z.jsx)(g,{horizontal:!0,align:`center`,className:p(Q,$.actions),gap:4,onClick:e=>{e.stopPropagation(),e.preventDefault()},children:i})]})]}))}));export{He as A,rt as C,Je as D,qe as E,ze as M,Be as N,D as O,nt as S,et as T,L as _,jt as a,at as b,xt as c,yt as d,z as f,I as g,pt as h,At as i,Ue as j,O as k,St as l,ft as m,Pt as n,Tt as o,B as p,kt as r,Et as s,Nt as t,vt as u,ct as v,j as w,ot as x,lt as y};

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.