PageSourceSearch

https://tutor.minded.es/p2wp88dq/chunk-JV36KU67.js

js minded.es collected 2026-10-08 20:33:18 UTC 16,497 bytes, 1 lines download raw bytes

1import{a as oe,b as _e}from"./chunk-HT3ACZK7.js";import{a as ie,b as ue}from"./chunk-Q32RV45O.js";import{a as ne,b as xe}from"./chunk-ZAVDJZJD.js";import"./chunk-JTIN5PEK.js";import{a as te,b as fe}from"./chunk-5I4NV5SX.js";import{a as ee,b as ye}from"./chunk-OGCHE77I.js";import"./chunk-O3PWFC7N.js";import"./chunk-EENRPR6A.js";import"./chunk-IK6FPKYR.js";import"./chunk-U6GWRNOY.js";import{Ad as Z,Dd as J,Je as X,Ke as ge,le as K,me as de,o as V,r as le,ue as Q,vd as q,ve as me,wd as pe,we as W,xe as he,zd as G}from"./chunk-5HMQNP6A.js";import{$b as R,Aa as k,Fc as l,Gc as d,Ib as A,Jc as U,Mb as F,Ob as D,Xc as f,Yc as x,Zb as M,_b as E,dc as z,dd as $,gc as B,hc as Y,ic as n,jc as i,kc as g,md as ce,ob as I,oc as H,tb as o,tc as j,uc as v,yb as p,za as S}from"./chunk-43BDY345.js";import"./chunk-TDUPUL7J.js";import"./chunk-MN6F6A2Y.js";import"./chunk-ILFUUTES.js";import"./chunk-3PTYF7QR.js";import"./chunk-OZYTUWXJ.js";import"./chunk-5OFQDI43.js";import"./chunk-HITQ2REX.js";import"./chunk-UZPT3SY4.js";import"./chunk-2YWGTEAW.js";import"./chunk-SXB2DM7L.js";import"./chunk-GS2D63VQ.js";import"./chunk-J3JIONXL.js";import"./chunk-UIVR5VXX.js";import"./chunk-WQ47XZVL.js";import"./chunk-H2GZ6USO.js";import"./chunk-MZRMP76P.js";import"./chunk-IQHOZG6P.js";import"./chunk-UGFBPTNR.js";import"./chunk-MXA3TL24.js";import"./chunk-J5XOCFPE.js";import{a as T,b as O,e as se,j as N,k as P}from"./chunk-X2KQQDTV.js";function ve(r,m){r&1&&(n(0,"section",3)(1,"p",5),l(2),f(3,"translate"),i()()),r&2&&(o(2),d(x(3,1,"LOADING_DAILY_TROPHIES")))}function Ce(r,m){if(r&1){let e=H();n(0,"app-unlocked-detail",6),f(1,"translate"),j("back",function(){S(e);let a=v();return k(a.closeDetail())}),i()}if(r&2){let e=v();M("sectionTitle",x(1,5,"CHALLENGES_HISTORICAL"))("imageSrc",e.selectedHistoryTrophy.imageSrc)("imageAlt",e.selectedHistoryTrophy.month+" "+e.selectedHistoryTrophy.year)("progress",e.selectedHistoryTrophy.progress)("goal",e.selectedHistoryTrophy.goal)}}function Me(r,m){r&1&&(n(0,"p",5),l(1),f(2,"translate"),i()),r&2&&(o(),d(x(2,1,"NO_TROPHIES_HISTORY")))}function we(r,m){if(r&1){let e=H();n(0,"button",25),j("click",function(){let a=S(e).$implicit,s=v(3);return k(s.selectTrophy(a))}),n(1,"div",26),g(2,"img",12),i(),n(3,"div",27)(4,"p"),l(5),i(),n(6,"p"),l(7),i()()()}if(r&2){let e=m.$implicit;o(2),M("src",e.imageSrc,I)("alt",e.month+" "+e.year),o(3),d(e.month),o(2),d(e.year)}}function Te(r,m){if(r&1&&(n(0,"div",23),B(1,we,8,4,"button",24,be),i()),r&2){let e=v(2);o(),Y(e.history)}}function Oe(r,m){if(r&1&&(n(0,"section",3)(1,"div",7)(2,"h1"),l(3),f(4,"translate"),i(),n(5,"div",8)(6,"span"),l(7),i(),g(8,"img",9),i()(),n(9,"div",10)(10,"div",11),g(11,"img",12),n(12,"div",13),g(13,"img",14),i()(),n(14,"div",15)(15,"h2"),l(16),i(),n(17,"p"),l(18),i(),n(19,"div",16)(20,"div",17),g(21,"div",18),i(),n(22,"span",19),l(23),f(24,"translate"),i(),n(25,"div",20),g(26,"img",21),i()()()()(),n(27,"section",3)(28,"div",22)(29,"h1"),l(30),f(31,"translate"),i()(),D(32,Me,3,3,"p",5)(33,Te,3,0,"div",23),i()),r&2){let e=v();o(3),d(x(4,17,"MONTHLY_TROPHY")),o(4),d(e.monthlyTrophy.remainingText),o(2),R("is-completed",e.monthlyTrophy.completed),o(2),M("src",e.monthlyTrophy.imageSrc,I)("alt",e.monthlyTrophy.title),o(),E("display",e.monthlyTrophy.completed?"none":"grid"),o(4),d(e.monthlyTrophy.title),o(2),d(e.monthlyTrophy.description),o(3),E("width",e.min(e.monthlyTrophy.progress,e.monthlyTrophy.goal)/e.monthlyTrophy.goal*100,"%"),o(2),U("",e.min(e.monthlyTrophy.progress,e.monthlyTrophy.goal)," ",x(24,19,"POPUP_OF")," ",e.monthlyTrophy.goal,""),o(7),d(x(31,21,"ALBUM")),o(2),z(e.history.length===0?32:33)}}var be,u,re,Pe=se(()=>{le();J();ue();xe();_e();ce();de();fe();he();ye();me();pe();ge();J();be=(r,m)=>m.id;u=class u extends ne{constructor(e,t,a,s,h,c,_,y,C){super(e,t,a,s,h,c);this.cognifitApiService=_;this.cdr=y;this.translateService=C;this.min=Math.min;this.monthlyTrophy={title:"",description:"",rewardStars:0,progress:0,goal:50,remainingText:"",imageSrc:"images/achievements/trophies/may_2026.png",completed:!1};this.history=[];this.selectedHistoryTrophy=null;this.isLoading=!0}ngOnInit(){setTimeout(()=>{this.initializeTrophies()})}initializeTrophies(){return P(this,null,function*(){this.isLoading=!0,this.cdr.detectChanges();try{yield N(u.prototype,this,"setupVariables").call(this),yield this.syncTrophiesData()}catch(e){console.error("Error initializing trophies component:",e),this.setDefaultMonthlyTrophyLabels(),this.history=[]}finally{this.isLoading=!1,this.cdr.detectChanges()}})}selectTrophy(e){this.selectedHistoryTrophy=e}closeDetail(){this.selectedHistoryTrophy=null}syncTrophiesData(){return P(this,null,function*(){let e=this.child()??(yield this.cfDataService.getActiveChild());if(!e?.userId){this.setDefaultMonthlyTrophyLabels(),this.history=[];return}this.child()||this.child.set(e);let t=new Date,a=t.getFullYear(),s=t.getMonth()+1,h=Intl.DateTimeFormat().resolvedOptions().timeZone||"Europe/Madrid",c=yield this.cognifitApiService.getTrophies({userId:e.userId,timezone:h,year:a}),_=Number(c?.data?.year)||a,y=Number(c?.data?.current_month),C=Number.isFinite(y)&&y>=1&&y<=12?y:s,ae=Array.isArray(c?.data?.months)?c.data.months:[],L=new Map(ae.map(b=>[Number(b.month),b])),w=L.get(C);if(this.updateMonthlyTrophyDateLabels(C,_),w){let b=this.getTopTier(w);this.monthlyTrophy=O(T({},this.monthlyTrophy),{progress:Number(w.counter)||0,goal:b?.goal??50,rewardStars:b?.neurons??0,completed:b?.completed??!1,imageSrc:this.buildTrophyImagePath(C,_)})}this.history=this.buildHistory(L,_)})}buildHistory(e,t){let a=[];for(let s=1;s<=12;s+=1){let h=e.get(s);if(!h)continue;let c=this.getTopTier(h);c?.completed&&a.push({id:`history-${t}-${String(s).padStart(2,"0")}`,month:this.getMonthName(s),year:`${t}`,rewardStars:c.neurons,progress:Number(h.counter)||0,goal:c.goal,imageSrc:this.buildTrophyImagePath(s,t),completed:!0})}return a}getTopTier(e){return e.tiers.find(t=>t.tier===3)??e.tiers.at(-1)}setDefaultMonthlyTrophyLabels(){let e=new Date;this.updateMonthlyTrophyDateLabels(e.getMonth()+1,e.getFullYear())}updateMonthlyTrophyDateLabels(e,t){let a=new Date,s=new Date(t,e,1),h=24*60*60*1e3,c=Math.max(0,Math.floor((s.getTime()-a.getTime())/h)),_=new Date(t,e-1,1).toLocaleDateString(this.translateService.currentLang||this.translateService.defaultLang,{month:"long"}),y=c===1?this.translateService.instant("TROPHIES_ENDS_IN_ONE_DAY"):this.translateService.instant("TROPHIES_ENDS_IN_DAYS",{days:c});this.monthlyTrophy=O(T({},this.monthlyTrophy),{title:this.translateService.instant("TROPHY_OF_MONTH",{month:_}),description:this.translateService.instant("TROHPIES_COMPLETE_TITLE"),remainingText:y})}buildTrophyImagePath(e,t){return`images/achievements/trophies/${["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"][e-1]}_${t}.png`}getMonthName(e){return new Date(2026,e-1,1).toLocaleDateString(this.translateService.currentLang||this.translateService.defaultLang,{month:"long"})}};u.\u0275fac=function(t){return new(t||u)(p(K),p(te),p(W),p(ee),p(Q),p(q),p(X),p($),p(G))},u.\u0275cmp=A({type:u,selectors:[["app-trophies"]],features:[F],decls:7,vars:1,consts:[[1,"trophies-body"],[1,"body-background"],[1,"body-content"],[1,"missions-section"],[3,"sectionTitle","imageSrc","imageAlt","progress","goal"],[1,"history-empty-text"],[3,"back","sectionTitle","imageSrc","imageAlt","progress","goal"],[1,"section-header"],[1,"time-badge"],["src","images/icons/rewards/clock.png","alt","clock",1,"timer-icon"],["role","article",1,"monthly-card"],[1,"monthly-card-art"],[3,"src","alt"],[1,"monthly-card-lock"],["src","images/icons/locked.svg","alt","Bloqueado"],[1,"monthly-card-content"],[1,"progress-container"],[1,"progress-bg"],[1,"progress-fill"],[1,"progress-text"],[1,"reward-icon"],["src","images/icons/star.png","alt","Reward"],[1,"section-header","section-header-start"],[1,"history-grid"],["type","button",1,"history-card"],["type","button",1,"history-card",3,"click"],[1,"history-card-art"],[1,"history-card-content"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"div",1),g(2,"app-tab-sand-and-trees"),i(),n(3,"div",2),D(4,ve,4,3,"section",3)(5,Ce,2,7,"app-unlocked-detail",4)(6,Oe,34,23),i()()),t&2&&(o(4),z(a.isLoading?4:a.selectedHistoryTrophy?5:6))},dependencies:[V,ie,oe,Z],styles:['[_nghost-%COMP%]{display:block;-webkit-text-size-adjust:100%;text-size-adjust:100%;width:100%;min-height:100%;--timer-text: #db6b3d;--timer-bg: #fffbd2;--weekly-start: #e4fffb;--weekly-end: #c5f3f5;--weekly-title: #00acc1;--daily-surface: #fffbd2;--daily-separator: #c16a39;--progress-track: #00466d;--progress-blue-start: #00b1ec;--progress-blue-mid: #00e5ff;--progress-blue-end: #0172bd;--progress-green-start: #00c913;--progress-green-mid: #00dd1c;--progress-green-end: #00ac30;--progress-yellow-start: #ffbf00;--progress-yellow-mid: #ffd000;--progress-yellow-end: #f0a004;--progress-pink-start: #f0006a;--progress-pink-mid: #ff0070;--progress-pink-end: #c1004a}.trophies-body[_ngcontent-%COMP%]{width:100%;min-height:var(--tabs-content-min-height, 100svh);flex-grow:1;height:auto;padding:26px 24px 42px;box-sizing:border-box;display:flex;flex-direction:column;gap:20px;position:relative;overflow:hidden}.body-background[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:0;pointer-events:none}.body-background[_ngcontent-%COMP%]     .background{width:100%;height:100%}.body-content[_ngcontent-%COMP%]{position:relative;z-index:1;width:100%;min-height:100%;flex:1;display:flex;flex-direction:column;gap:20px}.section-header[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;max-width:1120px;margin:0 auto;width:100%}.section-header[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{margin:0;color:#121212;font-size:2.25rem;font-weight:950}.section-header-start[_ngcontent-%COMP%]{justify-content:flex-start}.missions-section[_ngcontent-%COMP%]{width:100%;max-width:1120px;margin:0 auto;display:flex;flex-direction:column;gap:18px}.time-badge[_ngcontent-%COMP%]{border-radius:12px;padding:8px 14px;background:var(--timer-bg);display:flex;align-items:center;gap:6px;color:var(--timer-text);font-size:1rem;box-shadow:0 2px 4px #0000000d;white-space:nowrap}.time-badge[_ngcontent-%COMP%]   .timer-icon[_ngcontent-%COMP%]{width:24px;height:24px;object-fit:contain;display:block}.monthly-card[_ngcontent-%COMP%]{display:grid;grid-template-columns:180px minmax(0,1fr);gap:26px;
1padding:24px 26px;border-radius:24px;background:linear-gradient(180deg,var(--weekly-start) 0%,var(--weekly-end) 100%);border:3px solid rgba(255,255,255,.9);box-shadow:0 10px 20px #1446631f;align-items:center;overflow:visible}.monthly-card-art[_ngcontent-%COMP%]{position:relative;display:grid;place-items:center;width:180px;height:180px;min-height:0;align-content:center}.monthly-card-art[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain;display:block}.monthly-card-lock[_ngcontent-%COMP%]{position:absolute;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#e9357f;box-shadow:0 4px 10px #0000002e;top:-8px;right:0}.monthly-card-lock[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain;display:block}.monthly-card[_ngcontent-%COMP%]:not(.is-completed)   .monthly-card-art[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{filter:brightness(.1)}.monthly-card-content[_ngcontent-%COMP%]{display:flex;min-width:0;flex-direction:column;gap:12px;overflow:visible}.monthly-card-content[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%], .monthly-card-content[_ngcontent-%COMP%]   p[_ngcontent-%COMP%], .monthly-card-content[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{margin:0}.monthly-card-content[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:var(--weekly-title);font-size:1.65rem;font-weight:950;overflow-wrap:break-word}.monthly-card-content[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#000;overflow-wrap:break-word;word-break:normal;line-height:1.3;font-weight:700;font-size:1.08rem}.monthly-card-content[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{color:#122f47;font-size:1.2rem;display:inline-flex;align-items:center;gap:6px}.monthly-card-star[_ngcontent-%COMP%]{width:21px;height:21px;display:inline-block;background-image:url(./images/icons/cutstar.png);background-size:contain;background-repeat:no-repeat;background-position:center}.progress-container[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;align-items:center;gap:6px;position:relative}.progress-bg[_ngcontent-%COMP%]{width:100%;height:32px;background-color:var(--progress-track);border-radius:20px;overflow:hidden;box-shadow:inset 0 4px 4px #0006}.progress-fill[_ngcontent-%COMP%]{height:100%;border-radius:20px;transition:width .8s cubic-bezier(.4,0,.2,1);position:relative;border:none;background:linear-gradient(180deg,var(--progress-blue-start) 0%,var(--progress-blue-mid) 40%,var(--progress-blue-end) 100%);box-shadow:inset 0 0 10px #06006e80}.progress-fill[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;left:0;right:0;height:40%;background:linear-gradient(to bottom,#ffffff4d,#fff0);border-radius:20px 20px 0 0}.progress-text[_ngcontent-%COMP%]{font-weight:950;font-size:1rem;color:var(--weekly-title);text-transform:uppercase}.reward-icon[_ngcontent-%COMP%]{position:absolute;right:-15px;bottom:5px;width:64px;height:64px;z-index:15;pointer-events:none}.reward-icon[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain;display:block}.history-empty-text[_ngcontent-%COMP%]{margin:0;color:#c16a39;font-size:1.15rem;font-weight:800}.history-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:start}.history-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:240px;padding:18px 14px;border:0;border-radius:24px;background:#fffbd2;box-shadow:0 8px 16px #9161161f}.history-card-art[_ngcontent-%COMP%]{position:relative;display:grid;place-items:center;width:132px;height:132px}.history-card-art[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain;display:block}.history-card-image-dimmed[_ngcontent-%COMP%]{filter:brightness(.1)}.history-card-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;align-items:center;min-height:58px;justify-content:center}.history-card-content[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%], .history-card-content[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;color:#c16a39}.history-card-content[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:1.12rem;line-height:1.05}.history-card-content[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:1.08rem}@media (orientation: portrait),(max-width: 1180px){.trophies-body[_ngcontent-%COMP%]{padding:30px 15px 60px;gap:18px;min-height:var(--tabs-content-min-height, 100svh);height:auto}.section-header[_ngcontent-%COMP%]{align-items:flex-start;max-width:460px}.section-header[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:1.95rem}.missions-section[_ngcontent-%COMP%]{max-width:460px;gap:14px}.time-badge[_ngcontent-%COMP%]{padding:5px 12px;font-size:.9rem}.monthly-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;padding:14px;border-radius:20px;overflow:visible}.monthly-card-art[_ngcontent-%COMP%]{flex:0 0 104px;width:104px;
1height:104px;min-height:0;align-self:center}.monthly-card-lock[_ngcontent-%COMP%]{width:36px;height:36px;top:-8px;right:0}.monthly-card-content[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;gap:10px;overflow:visible}.monthly-card-content[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:1.25rem;overflow-wrap:break-word;word-break:normal}.monthly-card-content[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:1rem;overflow-wrap:break-word;word-break:normal}.monthly-card-content[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{font-size:1.05rem}.progress-text[_ngcontent-%COMP%]{font-size:.95rem}.reward-icon[_ngcontent-%COMP%]{right:-15px;bottom:10px;width:60px;height:60px}.history-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.history-card[_ngcontent-%COMP%]{min-height:0;padding:12px 10px 14px;border-radius:20px}.history-card-art[_ngcontent-%COMP%]{width:92px;height:92px}.history-card-content[_ngcontent-%COMP%]{min-height:0}.history-card-content[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%], .history-card-content[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:.98rem}}']});re=u});Pe();export{re as TrophiesComponent};

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.