-
Notifications
You must be signed in to change notification settings - Fork 1
/
7915.83e8b1a399272c8c.js
1 lines (1 loc) · 8.52 KB
/
7915.83e8b1a399272c8c.js
1
"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[7915],{7915:(x,c,t)=>{t.r(c),t.d(c,{TabsPageModule:()=>i});var d=t(177),u=t(9417),h=t(915),m=t(1470),n=t(4438),M=t(6863);const P=["tabs"];function r(o,f){if(1&o&&(n.j41(0,"ion-tab-bar",3)(1,"ion-tab-button",4),n.nrm(2,"ion-icon",5),n.k0s(),n.j41(3,"ion-tab-button",6),n.nrm(4,"ion-icon",5),n.k0s(),n.j41(5,"ion-tab-button",7),n.nrm(6,"ion-icon",5),n.k0s(),n.j41(7,"ion-tab-button",8),n.nrm(8,"ion-icon",5),n.k0s(),n.j41(9,"ion-tab-button",9),n.nrm(10,"ion-icon",5),n.k0s()()),2&o){const a=n.XpG();n.R7$(2),n.Y8G("name","home"==a.selectTab?"home":"home-outline"),n.R7$(2),n.Y8G("name","search"==a.selectTab?"search":"search-outline"),n.R7$(2),n.Y8G("name","add-post"==a.selectTab?"add-circle":"add-circle-outline"),n.R7$(2),n.Y8G("name","reels"==a.selectTab?"film":"film-outline"),n.R7$(),n.Y8G("tab","profile/"+a.loggedUserInfo.id),n.R7$(),n.Y8G("name","profile"==a.selectTab?"person":"person-outline")}}const e=[{path:"",component:(()=>{class o{constructor(a){this.dataManager=a,this.userInfo=!0}ngOnInit(){this.dataManager.getLoggedInUser(a=>{this.loggedUserInfo=a})}ionViewDidEnter(){this.dataManager.getLoggedInUser(a=>{this.loggedUserInfo=a})}setCurrentTab(){this.selectTab=this.tabs.getSelected()}static#t=this.\u0275fac=function(l){return new(l||o)(n.rXU(M.j))};static#o=this.\u0275cmp=n.VBU({type:o,selectors:[["app-tabs"]],viewQuery:function(l,g){if(1&l&&n.GBs(P,5),2&l){let p;n.mGM(p=n.lsd())&&(g.tabs=p.first)}},standalone:!0,features:[n.aNF],decls:3,vars:1,consts:[["tabs",""],[3,"ionTabsDidChange"],["color","light","slot","bottom",4,"ngIf"],["color","light","slot","bottom"],["tab","home"],[3,"name"],["tab","search"],["tab","add-post"],["tab","reels"],[3,"tab"]],template:function(l,g){if(1&l){const p=n.RV6();n.j41(0,"ion-tabs",1,0),n.bIt("ionTabsDidChange",function(){return n.eBV(p),n.Njj(g.setCurrentTab())}),n.DNE(2,r,11,6,"ion-tab-bar",2),n.k0s()}2&l&&(n.R7$(2),n.Y8G("ngIf",null!=g.userInfo&&g.loggedUserInfo))},dependencies:[h.bv,h.iq,h.Jq,h.qW,h.p4,d.bT],styles:["ion-header[_ngcontent-%COMP%]{width:100%}ion-header[_ngcontent-%COMP%] ion-toolbar[_ngcontent-%COMP%]{width:70%;margin:auto}ion-header[_ngcontent-%COMP%] ion-toolbar[_ngcontent-%COMP%] ion-searchbar[_ngcontent-%COMP%]{--box-shadow: none!important}ion-header[_ngcontent-%COMP%] ion-toolbar[_ngcontent-%COMP%] ion-searchbar[_ngcontent-%COMP%] .searchbar-clear-icon{display:none!important}ion-header[_ngcontent-%COMP%] ion-toolbar[_ngcontent-%COMP%] ion-title[_ngcontent-%COMP%]{font-family:instagram;font-size:1.9rem}ion-tabs[_ngcontent-%COMP%] ion-tab-bar[_ngcontent-%COMP%]{position:absolute;bottom:0;width:100%;height:50px}ion-tabs[_ngcontent-%COMP%] ion-tab-bar[_ngcontent-%COMP%] ion-tab-button[_ngcontent-%COMP%]{--background: var(--ion-color-dark);--color: var(--ion-color-medium);--color-selected: var(--ion-color-light)}ion-tabs[_ngcontent-%COMP%] ion-tab-bar[_ngcontent-%COMP%] ion-tab-button[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:1.5rem}"]})}return o})(),children:[{path:"home",loadChildren:()=>Promise.all([t.e(2076),t.e(8259)]).then(t.bind(t,8259)).then(o=>o.HomePageModule)},{path:"search",loadChildren:()=>t.e(5438).then(t.bind(t,5438)).then(o=>o.SearchPageModule)},{path:"reels",loadChildren:()=>Promise.all([t.e(2076),t.e(2850)]).then(t.bind(t,2850)).then(o=>o.ReelsPageModule)},{path:"notifications",loadChildren:()=>Promise.all([t.e(2076),t.e(6552)]).then(t.bind(t,6552)).then(o=>o.NotificationsPageModule)},{path:"add-post",loadChildren:()=>t.e(4249).then(t.bind(t,4249)).then(o=>o.AddPostModule)},{path:"conversations",loadChildren:()=>Promise.all([t.e(2076),t.e(4347)]).then(t.bind(t,4347)).then(o=>o.ConversationsModule)},{path:"profile",loadChildren:()=>Promise.all([t.e(2076),t.e(691)]).then(t.bind(t,691)).then(o=>o.ProfilePageModule)},{path:"profile/:id",loadChildren:()=>Promise.all([t.e(2076),t.e(691)]).then(t.bind(t,691)).then(o=>o.ProfilePageModule)},{path:"edit/profile",loadChildren:()=>Promise.all([t.e(2076),t.e(5114)]).then(t.bind(t,5114)).then(o=>o.EditProfileModule)},{path:"post",loadChildren:()=>Promise.all([t.e(2076),t.e(180)]).then(t.bind(t,180)).then(o=>o.PostModule)},{path:"settings",loadChildren:()=>t.e(8734).then(t.bind(t,8734)).then(o=>o.SettingsModule)},{path:"language",loadChildren:()=>t.e(9479).then(t.bind(t,9479)).then(o=>o.LanguagesModule)},{path:"",redirectTo:"/p/home",pathMatch:"full"}]}];let s=(()=>{class o{static#t=this.\u0275fac=function(l){return new(l||o)};static#o=this.\u0275mod=n.$C({type:o});static#n=this.\u0275inj=n.G2t({imports:[m.iI.forChild(e),m.iI]})}return o})(),i=(()=>{class o{static#t=this.\u0275fac=function(l){return new(l||o)};static#o=this.\u0275mod=n.$C({type:o});static#n=this.\u0275inj=n.G2t({imports:[d.MD,u.YN,h.bv,s]})}return o})()},6863:(x,c,t)=>{t.d(c,{j:()=>P});class d{constructor(b,e,s,i,o,f,a){this.id=b,this.avatar=e,this.sender=s,this.receiver=i,this.message=o,this.time=f,this.type=a}}class u{constructor(b,e,s,i){this.id=b,this.userId=e,this.src=s,this.time=i}}var h=t(4438),m=t(6354),n=t(1626);let M=(()=>{class r{constructor(e){this.http=e}getDataFromApi(e){return this.http.get(e).pipe((0,m.T)(s=>s))}static#t=this.\u0275fac=function(s){return new(s||r)(h.KVO(n.Qq))};static#o=this.\u0275prov=h.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})(),P=(()=>{class r{constructor(e){this.httprequest=e,this.postsApiUrl="https://gokadzev.github.io/fake-apis-for-projects/sociogram/posts.json",this.usersApiUrl="https://gokadzev.github.io/fake-apis-for-projects/sociogram/users.json",this.loggedUserId=0,this.conversations=[new d(1,"https://images.unsplash.com/photo-1566666185799-b1f3fee2d6f7?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=735&q=80","user123","kate2021","hello",new Date("February 9, 2022 08:13:00"),"message"),new d(1,"https://images.unsplash.com/photo-1566666185799-b1f3fee2d6f7?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=735&q=80","kate2021","user123","Hi",new Date("February 9, 2022 08:13:22"),"message"),new d(1,"https://images.unsplash.com/photo-1566666185799-b1f3fee2d6f7?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=735&q=80","user123","kate2021","How Are you?",new Date("February 9, 2022 08:14:00"),"message"),new d(1,"https://images.unsplash.com/photo-1566666185799-b1f3fee2d6f7?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=735&q=80","kate2021","user123","i am good, how are you?",new Date("February 9, 2022 08:15:00"),"message"),new d(1,"https://images.unsplash.com/photo-1566666185799-b1f3fee2d6f7?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=735&q=80","user123","kate2021","i am good too",new Date("February 9, 2022 08:16:00"),"message"),new d(1,"https://images.unsplash.com/photo-1566666185799-b1f3fee2d6f7?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=735&q=80","kate2021","user123","Great!",new Date("February 9, 2022 08:16:33"),"message")],this.stories=[new u(0,0,"https://images.unsplash.com/photo-1593642702909-dec73df255d7?ixid=MnwxMjA3fDF8MHxlZGl0b3JpYWwtZmVlZHwxfHx8ZW58MHx8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=735&q=80",new Date("February 9, 2022 08:13:00")),new u(1,0,"https://images.unsplash.com/photo-1635337930647-2fa411b620e2?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwyfHx8ZW58MHx8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=735&q=80",new Date("February 9, 2022 08:13:00"))]}getLoggedInUser(e){this.getUserById(this.loggedUserId,s=>e(s))}getStories(e){return e(this.stories)}getReels(e){return this.httprequest.getDataFromApi(this.postsApiUrl).subscribe(s=>{let i=s.filter(o=>1==o.reel);return e(i)})}getPosts(e){return this.httprequest.getDataFromApi(this.postsApiUrl).subscribe(s=>e(s))}getPostsByUserId(e,s){return this.httprequest.getDataFromApi(this.postsApiUrl).subscribe(i=>{let o=i.filter(f=>f.userid==e);return s(o)})}getConversations(e){return e(this.conversations)}getUsers(e){return this.httprequest.getDataFromApi(this.usersApiUrl).subscribe(s=>e(s))}getUserById(e,s){return this.httprequest.getDataFromApi(this.usersApiUrl).subscribe(i=>{let o=i.filter(f=>f.id==e);return s(o[0])})}getUserByUsername(e,s){return this.httprequest.getDataFromApi(this.usersApiUrl).subscribe(i=>{let o=i.filter(f=>f.username==e);return s(o[0])})}addMessage(e,s,i,o,f,a,l,g){return this.conversations.push(new d(e,s,i,o,f,a,l)),g(this.conversations)}static#t=this.\u0275fac=function(s){return new(s||r)(h.KVO(M))};static#o=this.\u0275prov=h.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})()}}]);