PageSourceSearch

https://chat.ifeelonline.com/assets/StatisticsPage-BgQjXKUz.js

js ifeelonline.com collected 2026-10-02 03:33:08 UTC 11,360 bytes, 1 lines download raw bytes

1import{j as e,i as t,r as s}from"./vendor-react-BqXu7aan.js";import{b as i,a0 as a,F as l,V as o,a1 as r,l as n,s as c,a2 as d}from"./vendor-storybook-CZEaQSqz.js";import{u as x,e as m,Z as f,_ as h,$ as p,d as u,r as g,h as j}from"./AppShell-BGTYNCr1.js";import{A as b,R as v,be as y}from"./index-B6N_I7jt.js";import{u as N}from"./vendor-i18n-BbiHsY4v.js";import{bw as w,bm as T,s as D}from"./vendor-ifeel-DY-fy38U.js";import{d as C}from"./vendor-utils-XhrL1VEp.js";import{c as k}from"./journal-Ct6T3f4V.js";import{u as S}from"./useJournal-_hbxCQ6S.js";import"./vendor-mui-CiXS2U2q.js";import"./vendor-redux-CV2u9Zzy.js";import"./index.esm-yNx01ZJ9.js";import"./vendor-video-BFkd9NQD.js";import"./ToolsRepository-D3gTj0gN.js";import"./JourneysRepository-DHLeIbao.js";const I=({title:t,children:s})=>e.jsxs("div",{className:"flex w-full flex-col items-start gap-3",children:[e.jsx(i,{textType:"body-3",fontColor:"text-text-600",children:t}),s]}),F=({achievements:t,graphInfo:s})=>{const{t:l}=N(),o=x(),r=t.slice(0,6),n=t.slice(6);return e.jsx(I,{title:l("statistics.attainment.header"),children:e.jsx("div",{className:"flex w-full flex-col items-start justify-center rounded-3 border border-text-200 bg-white px-11 pb-14 pt-10 shadow-shadow1",children:e.jsxs("div",{className:"flex flex-col items-start justify-center gap-10",children:[e.jsxs("div",{className:"flex flex-col items-start justify-center gap-3",children:[e.jsx(i,{textType:"headline-4",fontFamily:o,fontWeight:"medium",fontColor:"text-text-600",children:l("statistics.attainment.name")}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("img",{className:"size-8",src:`${b}/images/medal.png`}),e.jsxs("div",{className:"flex flex-1 flex-col items-start gap-2",children:[e.jsx(i,{textType:"subtitle",fontWeight:"semibold",fontColor:"text-text-600",children:0===s.completedAchievements?l("statistics.attainment.title_no_attainments",{value:s.completedAchievements,total:s.totalAchievements}):l("statistics.attainment.title",{value:s.completedAchievements,total:s.totalAchievements})}),e.jsx(i,{textType:"body-3",fontColor:"text-text-600",children:l("statistics.attainment.description2")})]})]})]}),e.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-6",children:[e.jsx("div",{className:"flex h-full flex-wrap items-stretch justify-center gap-4",children:r.length>0&&r.map(t=>e.jsx(a,{isVertical:!1,imageUrl:t.image,text:t.description,title:t.title,isDisabled:!t.achieved},t.title))}),e.jsx("div",{className:"flex flex-col items-center justify-center gap-2.5 rounded-1.5 bg-backgrounds-4 px-3 py-2.5 ",children:e.jsx(i,{textType:"body-3",className:"italic",fontWeight:"medium",fontColor:"text-text-600",children:l("statistics.attainment.tag")})}),e.jsx("div",{className:"flex w-full flex-wrap items-center justify-center gap-4",children:n.length>0&&n.map(t=>e.jsx(a,{isVertical:!1,imageUrl:t.image,text:t.description,title:t.title,isDisabled:!t.achieved},t.title))})]})]})})})},z=()=>{const{t:s}=N(),a=t(),o=x();return e.jsx(I,{title:s("statistics.mounth"),children:e.jsx("div",{className:"h-50 w-full rtl:scale-x-flip",style:{backgroundImage:`url(${b}/images/background-mounth-statistc.png)`},children:e.jsx("div",{className:"flex h-50 w-full flex-col items-start justify-center gap-3 rounded-2  bg-cover bg-center bg-no-repeat ps-11 rtl:scale-x-flip",children:e.jsxs("div",{className:"mr-4 flex flex-col items-start justify-center gap-4 sm:mr-0",children:[e.jsxs("div",{className:"flex flex-col gap-2.5",children:[e.jsx(i,{textType:"headline-4",fontFamily:o,fontWeight:"medium",fontColor:"text-text-600",children:s("statistics.banner.title")}),e.jsx(i,{textType:"body-2",fontFamily:"poppins",fontWeight:"light",fontColor:"text-text-600",children:s("statistics.banner.description")})]}),e.jsx(l,{buttonType:"button-primary",text:s("ryff_survey.survey_finished.btn"),onClick:()=>a(v.RYFF_RESULTS)})]})})})})},W=({image:t,title:s,subtitle:a})=>{const{t:l}=N(),o=x();return e.jsxs("div",{className:"flex w-full flex-1 gap-4 rounded-3 border border-text-200 bg-white px-11 py-6",children:[e.jsx("img",{className:"h-39 w-29",src:t}),e.jsxs("div",{className:"flex flex-1 flex-col items-start gap-3.5",children:[e.jsx(i,{textType:"headline-4",fontFamily:o,fontWeight:"medium",fontColor:"text-text-600",children:s}),e.jsx(i,{textType:"body-2",fontColor:"text-text-500",children:a})]})]})},$=({moods:t})=>e.jsx("div",{className:"flex",children:[0,1,2,3,4,5,6].map(s=>e.jsxs("div",{className:"group relative z-10 flex  w-full flex-col before:absolute before:bottom-0 before:left-8 before:top-4 before:z-0\n             before:h-0.5 before:w-full before:bg-text-100 before:content-empty rtl:before:left-0 rtl:before:right-8 "+(6===s?"before:hidden":""),children:[e.jsx("img",{className:""+(t[s]?"size-8":"size-10"),src:t[s]?t[s]:`${b}/images/Ellipse.png`}),e.jsx("div",{className:"flex-1 "+(t[s]?"ms-3.5 mt-2":"ms-4"),children:e.jsx(i,{textType:"subtitle",fontWeight:"semibold",fontColor:"text-text-500",children:s+1})})]},s))}),A=({streak:t,moods:s})=>{const{t:a}=N(),l=x();return e.jsx("div",{className:" flex size-full flex-1 gap-5 rounded-3 border border-text-200 bg-white px-11 py-6",children:e.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[e.jsx(i,{textType:"headline-4",fontFamily:l,fontWeight:"medium",fontColor:"text-text-600",children:a("statistics.streak.title")}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx($,{moods:s}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{className:"h-4 w-4.5",src:`${b}/images/winner-cup.png`}),e.jsx(i,{textType:"body-2",fontWeight:0===t?"regular":"semibold",fontColor:0===t?"text-text-400":"text-text-500",children:0===t?a("statistics.streak.nothing"):1===t?a("statistics.streak.description1day"):a("statistics.streak.description",{streak:t})})]})]})]})})},E=({factors:t,moods:s,moodId:a,setMoodId:l})=>{const c=x(),d=w(t),m=t&&t.length>0?t.map(e=>({name:e.body,value:e.counter||0,marker:{fillColor:`rgba(125,169,249,${d&&e.counter&&e.counter>0?d.filter(t=>t.counter===e.counter)[0].opacity:0}
1)`}})):[],f=s&&s.length>0?s.map(e=>({value:e.id,text:e.body,icon:e.image})):[],{t:h}=N(),p=t&&0===t.length||!a||s&&0===s.length;return e.jsx("div",{className:"relative flex h-115 w-full rounded-3 border border-text-200 bg-white px-11 py-6",children:e.jsxs("div",{className:"relative flex w-full flex-col items-center",children:[e.jsxs("div",{className:"flex flex-1 flex-col items-start gap-3 overflow-x-hidden",children:[e.jsx(i,{textType:"headline-4",fontFamily:c,fontWeight:"medium",fontColor:"text-text-600",children:h("statistics.factors.title")}),e.jsx(i,{textType:"body-3",fontColor:"text-text-600",children:h(p?"statistics.factors.nothing":"statistics.factors.description")})]}),!p&&e.jsx("div",{className:"w-40 pb-3 pt-6",children:e.jsx(o,{value:a,onChange:e=>{l(e.target.value)},options:f,hasBorder:!0,disabled:!1,errors:!1,fullWidth:!0})}),p?e.jsx("div",{className:"h-55",children:e.jsx("img",{src:`${b}/images/empty-factors.png`})}):e.jsx("div",{className:"h-62.5",children:e.jsx(r,{showBubbleName:!0,data:m,name:"",options:{title:{text:""},chart:{type:"packedbubble",spacingBottom:0,spacingTop:0,spacingLeft:0,spacingRight:0,marginTop:0,height:"250px"},plotOptions:{series:{marker:{lineColor:"transparent"}},packedbubble:{maxSize:"95%",minSize:"30%",layoutAlgorithm:{splitSeries:!1,gravitationalConstant:.02},dataLabels:{enabled:!0,format:"{point.name}",style:{color:n.DefaultTheme.theme.extend.colors.text[500],textOutline:"none",fontWeight:"normal",fontSize:"16px"}},tooltip:{headerFormat:"",pointFormatter:function(){return(e=>e?e.counter&&e.counter>1?`${e.body} . ${h("statistics.factors.counts",{count:e.counter})}`:`${e.body} . ${h("statistics.factors.count",{count:e.counter})}`:"")(null==t?void 0:t.find(e=>e.body===this.name))}}}}}})})]})})},_=({journeys:t,startDate:s,endDate:a,setStartDate:o,setEndDate:r,isLoading:n})=>{var x;const{t:u}=N(),{user:g}=m(),j=k(t,s),v=C(),y=C(null==(x=null==g?void 0:g.info)?void 0:x.createdAt),w=C(s),S=C(a).isBefore(v,"day"),I=w.isAfter(y,"day");return e.jsx("div",{className:"flex h-115 w-full gap-7 rounded-3 border border-text-200 bg-white px-11 py-6",children:e.jsxs("div",{className:"flex size-full flex-col items-start justify-start gap-9",children:[e.jsxs("div",{className:"flex w-full items-center justify-center gap-14",children:[I&&e.jsx(l,{buttonType:"icon-button-action",icon:e.jsx("div",{className:"h-6 text-brandPrimary-400",children:e.jsx(T,{fullHeight:!0,className:"rtl:scale-x-flip"})}),onClick:()=>{const{prevStartDate:e,prevEndDate:t}=h(s);o(e),r(t)},onFocus:e=>e.target.blur()}),e.jsx("div",{className:"flex w-full min-w-fit items-center justify-center "+(I?"pl-0":"pl-20"),children:e.jsx(i,{textType:"body-2",fontWeight:"semibold",fontColor:"text-text-600",children:f(s,a)})}),S?e.jsx(l,{buttonType:"icon-button-action",icon:e.jsx("div",{className:"h-6 text-brandPrimary-400",children:e.jsx(D,{fullHeight:!0,className:"rtl:scale-x-flip"})}),onClick:()=>{const{nextStartDate:e,nextEndDate:t}=p(s);o(e),r(t)},onFocus:e=>e.target.blur()}):e.jsx("div",{className:"w-6"})]}),e.jsxs("div",{className:"relative flex size-full justify-end",children:[n&&e.jsx(c,{}),t.length>0?e.jsx(d,{graphData:{config:{title:"",minValue:1,maxValue:5,nodeType:"emoji",nodeSize:40,header:{showHeader:!1,valueStep:1}},columns:j}}):e.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-3 text-center",children:[e.jsx("img",{src:`${b}/images/no_mouth.png`,className:"size-8"}),e.jsx(i,{textType:"body-2",fontWeight:"semibold",fontColor:"text-textCold-500",children:u("statistics.no_mouth")})]})]})]})})},L=({graphInfo:t,factors:s,moodId:i,setMoodId:a,startDate:l,endDate:o,setStartDate:r,setEndDate:n,isLoading:c})=>{const{t:d}=N();return e.jsx(I,{title:d("statistics.week"),children:e.jsxs("div",{className:"flex w-full flex-col items-start justify-center  gap-4",children:[e.jsxs("div",{className:"flex w-full flex-col items-start gap-4 lg:flex-row",children:[e.jsx(W,{image:t.image||`${b}/images/emotional-image.png`,title:t.title||d("statistics.resume.title"),subtitle:t.subtitle||d("statistics.resume.description3")}),e.jsx(A,{streak:t.globalStreak,moods:t.facesStreaks||[]})]}),e.jsxs("div",{className:"flex w-full flex-col items-start gap-4 lg:flex-row",children:[e.jsx(_,{journeys:t.journeys,startDate:l,endDate:o,setEndDate:n,setStartDate:r,isLoading:c}),e.jsx(E,{factors:s,moods:t.moods,moodId:i,setMoodId:a})]})]})})},R=()=>{const t=u(),{t:i}=N(),{trackEventPosthog:a}=g(),{getGraphInfo:l,achievements:o,graphInfo:r,moodsFactors:n,moodId:c,setMoodId:d,startDate:x,endDate:m,setEndDate:f,setStartDate:h,getAchievements:p,isLoading:b}=S();return s.useEffect(()=>{l()},[x]),s.useEffect(()=>{p(),t(j({pageTitle:i(y[v.STATISTICS].keyForTranslation)})),a("user_viewed_stats",location.pathname,{})},[]),e.jsx("div",{className:"bg-gradient-to-b from-gradientFrom-4 to-gradientTo-4 flex size-full flex-1 flex-col items-center overflow-y-auto overflow-x-hidden py-8",children:e.jsxs("div",{className:"flex w-9/10 max-w-233.5 flex-col items-start gap-5",children:[e.jsx(z,{}),r&&e.jsxs(e.Fragment,{children:[e.jsx(L,{graphInfo:r,factors:n,moodId:c,setMoodId:d,startDate:x,endDate:m,setEndDate:f,setStartDate:h,isLoading:b}),e.jsx(F,{graphInfo:r,achievements:o})]})]})})};export{R as StatisticsPage};

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.