"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[5776],{5776:(Y,v,i)=>{i.r(v),i.d(v,{ExclusivePlanetsPageModule:()=>I});var r=i(6895),l=i(8008),d=i(9383),P=i(9832),f=i(529),g=i(3324),h=i(7582),x=i(7553),p=i(7428),y=i(3286),m=i(1937),E=i(8317),t=i(4650),Z=i(5362),C=i(205),T=i(4204),O=i(2602),b=i(8753);const J=function(n,o){return[n,o]};function M(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"ion-col",8)(1,"div",9),t.NdJ("click",function(){const c=t.CHM(e).$implicit,u=t.oxw();return t.KtG(u.preview(c))}),t.TgZ(2,"div",10)(3,"div",11),t._UZ(4,"img",12),t.qZA()(),t.TgZ(5,"div",13)(6,"div",14),t._uU(7),t.qZA()()()()}if(2&n){const e=o.$implicit,s=t.oxw();t.Q6J("size",s.colSize),t.xp6(1),t.Q6J("ngClass",t.WLB(4,J,"rarity-"+e.theme.rarity,null!=e.snapshot&&e.snapshot.incompatible?"incompatible":"")),t.xp6(3),t.Q6J("src",e.thumbnail,t.LSH),t.xp6(3),t.Oqu(e.name)}}const S=function(n){return{hidden:n}},w=function(n){return{"hide-ui":n}},z=[{path:"",component:(()=>{class n{constructor(e,s,a,c,u){this._log=e,this._nav=s,this._taptic=a,this._thumbnail=c,this._inventory=u,this.loading=!0,this.planets=[]}ngOnInit(){return(0,h.mG)(this,void 0,void 0,function*(){yield y.Z.initDeps([this._inventory,this._thumbnail]),yield this._initPlanets(),this.loading=!1})}get colSize(){return window.innerWidth<560?4:3}dismiss(){this._taptic.impactOpenPage(),this._nav.back()}preview(e){null!=e&&e.snapshot.incompatible||(this._taptic.impactOpenPage(),this._log.send({event:"exclusive-planets:preview",type:"click"}),this.selectedPlanet=e)}handlePreviewDidDismiss(){this.selectedPlanet=null}_initPlanets(){return(0,h.mG)(this,void 0,void 0,function*(){const e=[p.s.Rabbit,p.s.EarthRabbit,p.s.Eye],s=[...this._inventory.planetProducts.filter(a=>e.includes(a.theme.type)),...["planet_snake-1","planet_snake-2"].map(a=>this._inventory.getPlanetProduct(a))].sort((a,c)=>c.theme.rarity-a.theme.rarity);(0,E.jr)()&&s.unshift(this._inventory.getPlanetProduct("planet_cr-1"));for(const a of s)a.snapshot=new x.N(Object.assign(Object.assign({},a.theme),{eyeIncomplete:(0,m.Io)(.5),hasSpecialRabbit:(0,m.Io)(.5)})),a.thumbnail=yield this._thumbnail.getThumbnail(a.snapshot,{size:200,ortho:.77});this.planets=s})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(Z.$),t.Y36(l.SH),t.Y36(C.u),t.Y36(T.R),t.Y36(O.V))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-exclusive-planets-page"]],decls:16,vars:12,consts:[["slot","start"],["fill","clear",3,"click"],[1,"text-icon-back"],["name","dots",1,"content-loading",3,"ngClass"],[1,"wrapper","hidable-ui",3,"ngClass"],[1,"list"],[3,"size",4,"ngFor","ngForOf"],[3,"data","viewOnly","didDismiss"],[3,"size"],[1,"planet-card",3,"ngClass","click"],[1,"planet-card-body"],[1,"planet-card-thumbnail"],[3,"src"],[1,"planet-card-footer"],[1,"planet-card-name"]],template:function(e,s){1&e&&(t.TgZ(0,"ion-header")(1,"ion-toolbar")(2,"ion-buttons",0)(3,"ion-button",1),t.NdJ("click",function(){return s.dismiss()}),t.TgZ(4,"span",2),t._uU(5,"<"),t.qZA()()(),t.TgZ(6,"ion-title"),t._uU(7),t.ALo(8,"translate"),t.qZA()()(),t.TgZ(9,"ion-content"),t._UZ(10,"ion-spinner",3),t.TgZ(11,"div",4)(12,"ion-grid",5)(13,"ion-row"),t.YNc(14,M,8,7,"ion-col",6),t.qZA()()(),t.TgZ(15,"app-planet-preview",7),t.NdJ("didDismiss",function(){return s.handlePreviewDidDismiss()}),t.qZA()()),2&e&&(t.xp6(7),t.Oqu(t.lcZ(8,6,"HOLIDAY_EXCLUSIVES.TITLE")),t.xp6(3),t.Q6J("ngClass",t.VKq(8,S,!s.loading)),t.xp6(1),t.Q6J("ngClass",t.VKq(10,w,s.loading)),t.xp6(3),t.Q6J("ngForOf",s.planets),t.xp6(1),t.Q6J("data",s.selectedPlanet)("viewOnly",!0))},dependencies:[r.mk,r.sg,l.YG,l.Sm,l.wI,l.W2,l.jY,l.Gu,l.Nd,l.PQ,l.wd,l.sr,b.L,d.X$],styles:["ion-content[_ngcontent-%COMP%]{--padding-top: var(--pd);--padding-bottom: calc(var(--ion-safe-area-bottom, 0) + var(--pd));--padding-start: var(--pd);--padding-end: var(--pd)}.wrapper[_ngcontent-%COMP%]{margin:0 auto;max-width:680px}.list[_ngcontent-%COMP%]{--ion-grid-padding: 0;margin:-5px}.planet-card-thumbnail[_ngcontent-%COMP%]{padding-top:0}"]}),n})()}];let A=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[g.Bz.forChild(z),g.Bz]}),n})();var D=i(4923);let I=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[r.ez,l.Pc,A,D.S,d.aw.forChild({loader:{provide:d.Zw,useFactory:o=>new P.w(o),deps:[f.eN]}})]}),n})()}}]);