PageSourceSearch

https://techfeed.io/3250.ae846e6f6fec4464.js

js techfeed.io collected 2026-09-24 09:47:45 UTC 93,854 bytes, 1 lines download raw bytes

1(self.webpackChunkapp=self.webpackChunkapp||[]).push([[3250],{63250:(Y,L,l)=>{"use strict";l.r(L),l.d(L,{SettingsModule:()=>Re});var A=l(27910),t=l(94650);let J=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[A.L]}),n})(),F=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[A.L]}),n})();var q=l(34793),f=l(15861),Z=l(73071),b=l(18297),x=l(34986),I=l(23665),R=l(81263),T=l(16278),Q=l(89204),at=l(25099),j=l(21805),G=l(99654),O=l(37556),U=l(92725),E=l(42112),o=l(95133),d=l(36895),rt=l(75119),C=l(47936),k=l(60326),ct=l(10515),p=l(5694);function lt(n,r){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.hij("(",e.user.id,")")}}function gt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"ion-item",16)(1,"ion-avatar",17),t._UZ(2,"tf-avatar",18),t.qZA(),t.TgZ(3,"ion-label")(4,"h2"),t._uU(5),t.ALo(6,"tfI18n"),t.qZA(),t.YNc(7,lt,2,1,"span",1),t.TgZ(8,"div",19),t._uU(9),t.ALo(10,"tfI18n"),t.TgZ(11,"a",20),t.NdJ("click",function(s){t.CHM(e);const a=t.oxw(2);return t.KtG(a.toProfile(s))}),t._uU(12),t.ALo(13,"tfI18n"),t.qZA()(),t.TgZ(14,"div",21)(15,"ion-button",22),t.NdJ("click",function(s){t.CHM(e);const a=t.oxw(2);return t.KtG(a.toLogin(s))}),t._uU(16),t.ALo(17,"tfI18n"),t.qZA(),t.TgZ(18,"ion-button",22),t.NdJ("click",function(s){t.CHM(e);const a=t.oxw(2);return t.KtG(a.toSignup(s))}),t._uU(19),t.ALo(20,"tfI18n"),t.qZA()()()()}if(2&n){const e=t.oxw(2);t.xp6(2),t.Q6J("user",e.user),t.xp6(3),t.Oqu(t.lcZ(6,7,"notLoggedIn")),t.xp6(2),t.Q6J("ngIf",e.isDev),t.xp6(2),t.hij(" ",t.lcZ(10,9,"login.recommended")," "),t.xp6(3),t.Oqu(t.lcZ(13,11,"userProfile.show")),t.xp6(4),t.Oqu(t.lcZ(17,13,"login")),t.xp6(3),t.Oqu(t.lcZ(20,15,"signup"))}}function ut(n,r){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.hij(" (",e.user.id,")")}}function _t(n,r){if(1&n&&(t.TgZ(0,"ion-item",16)(1,"ion-avatar",17),t._UZ(2,"tf-avatar",18),t.qZA(),t.TgZ(3,"ion-label")(4,"h2"),t._uU(5),t.qZA(),t.TgZ(6,"p"),t._uU(7),t.YNc(8,ut,2,1,"span",1),t.qZA(),t.TgZ(9,"a",23),t._uU(10),t.ALo(11,"tfI18n"),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(2),t.Q6J("user",e.user),t.xp6(3),t.Oqu(e.user.displayName),t.xp6(2),t.hij("@",e.user.username,""),t.xp6(1),t.Q6J("ngIf",e.isDev),t.xp6(2),t.Oqu(t.lcZ(11,5,"userProfile.show"))}}function ht(n,r){if(1&n&&(t.TgZ(0,"ion-badge",24),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.settingPages.notice.badge)}}function dt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw(2);return t.KtG(s.itemClicked(s.settingPages.expertOnly))}),t._UZ(1,"tf-icon",25),t.TgZ(2,"ion-label"),t._uU(3),t.ALo(4,"tfI18n"),t.qZA(),t._UZ(5,"tf-icon",8),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Oqu(t.lcZ(4,1,e.settingPages.expertOnly.key))}}function mt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw(2);return t.KtG(s.logout())}),t._UZ(1,"tf-icon",26),t.TgZ(2,"ion-label"),t._uU(3),t.ALo(4,"tfI18n"),t.qZA(),t._UZ(5,"tf-icon",8),t.qZA()}2&n&&(t.xp6(3),t.Oqu(t.lcZ(4,1,"logout")))}function ft(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"ion-list")(1,"ion-list-header")(2,"ion-label"),t._uU(3),t.ALo(4,"tfI18n"),t.qZA()(),t.TgZ(5,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw(2);return t.KtG(s.itemClicked(s.settingPages.manualPush))}),t._UZ(6,"tf-icon",6),t.TgZ(7,"ion-label"),t._uU(8),t.ALo(9,"tfI18n"),t.qZA(),t._UZ(10,"tf-icon",8),t.qZA(),t.TgZ(11,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw(2);return t.KtG(s.itemClicked(s.settingPages.release))}),t._UZ(12,"tf-icon",27),t.TgZ(13,"ion-label"),t._uU(14),t.ALo(15,"tfI18n"),t.qZA(),t._UZ(16,"tf-icon",8),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Oqu(t.lcZ(4,3,"settings.admin")),t.xp6(5),t.Oqu(t.lcZ(9,5,e.settingPages.manualPush.key)),t.xp6(6),t.Oqu(t.lcZ(15,7,e.settingPages.release.key))}}function pt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"ion-list")(1,"ion-list-header")(2,"ion-label"),t._uU(3),t.ALo(4,"tfI18n"),t.qZA()(),t.TgZ(5,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw(2);return t.KtG(s.toDebug())}),t._UZ(6,"tf-icon",9),t.TgZ(7,"ion-label"),t._uU(8),t.ALo(9,"tfI18n"),t.qZA(),t._UZ(10,"tf-icon",8),t.qZA(),t.TgZ(11,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw(2);return t.KtG(s.toStorage())}),t._UZ(12,"tf-icon",28),t.TgZ(13,"ion-label"),t._uU(14,"Storage"),t.qZA(),t._UZ(15,"tf-icon",8),t.qZA()()}2&n&&(t.xp6(3),t.Oqu(t.lcZ(4,2,"settings.debug")),t.xp6(5),t.Oqu(t.lcZ(9,4,"settings.parameters")))}function Zt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"ion-content")(1,"ion-card",2),t.NdJ("click",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.toProfile(s))}),t.YNc(2,gt,21,17,"ion-item",3),t.YNc(3,_t,12,7,"ion-item",3),t.qZA(),t._UZ(4,"tf-push-confirm",4),t.TgZ(5,"ion-list")(6,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.itemClicked(s.settingPages.notice))}),t._UZ(7,"tf-icon",6),t.TgZ(8,"ion-label"),t._uU(9),t.ALo(10,"tfI18n"),t.qZA(),t.YNc(11,ht,2,1,"ion-badge",7),t._UZ(12,"tf-icon",8),t.qZA()(),t.TgZ(13,"ion-list")(14,"ion-list-header")(15,"ion-label"),t._uU(16),t.ALo(17,"tfI18n"),t.qZA()(),t.TgZ(18,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.itemClicked(s.settingPages.account))}),t._UZ(19,"tf-icon",9),t.TgZ(20,"ion-label"),t._uU(21),t.ALo(22,"tfI18n"),t.qZA(),t._UZ(23,"tf-icon",8),t.qZA(),t.TgZ(24,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.itemClicked(s.settingPages.notification))}),t._UZ(25,"tf-icon",6),t.TgZ(26,"ion-label"),t._uU(27),t.ALo(28,"tfI18n"),t.qZA(),t._UZ(29,"tf-icon",8),t.qZA(),t.TgZ(30,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.itemClicked(s.settingPages.theme))}),t._UZ(31,"tf-icon",10),t.TgZ(32,"ion-label"),t._uU(33),t.ALo(34,"tfI18n"),t.qZA(),t._UZ(35,"tf-icon",8),t.qZA(),t.TgZ(36,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.itemClicked(s.settingPages.external))}),t._UZ(37,"tf-icon",11),t.TgZ(38,"ion-label"),t._uU(39),t.ALo(40,"tfI18n"),t.qZA(),t._UZ(41,"tf-icon",8),t.qZA(),t.TgZ(42,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.itemClicked(s.settingPages.feedback))}),t._UZ(43,"tf-icon",12),t.TgZ(44,"ion-label"),t._uU(45),t.ALo(46,"tfI18n"),t.qZA(),t._UZ(47,"tf-icon",8),t.qZA(),t.YNc(48,dt,6,3,"ion-item",13),t.YNc(49,mt,6,3,"ion-item",13),t.qZA(),t.YNc(50,ft,17,9,"ion-list",1),t.TgZ(51,"ion-list")(52,"ion-list-header")(53,"ion-label"),t._uU(54),t.ALo(55,"tfI18n"),t.qZA()(),t.TgZ(56,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.itemClicked(s.settingPages.blog))}),t.TgZ(57,"ion-label"),t._uU(58),t.ALo(59,"tfI18n"),t.qZA(),t._UZ(60,"tf-icon",8),t.qZA(),t.TgZ(61,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.itemClicked(s.settingPages.faq))}),t.TgZ(62,"ion-label"),t._uU(63),t.ALo(64,"tfI18n"),t.qZA(),t._UZ(65,"tf-icon",8),t.qZA(),t.TgZ(66,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.itemClicked(s.settingPages.terms))}),t.TgZ(67,"ion-label"),t._uU(68),t.ALo(69,"tfI18n"),t.qZA(),t._UZ(70,"tf-icon",8),t.qZA(),t.TgZ(71,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.itemClicked(s.settingPages.privacy))}),t.TgZ(72,"ion-label"),t._uU(73),t.ALo(74,"tfI18n"),t.qZA(),t._UZ(75,"tf-icon",8),t.qZA(),t.TgZ(76,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.itemClicked(s.settingPages.guidelines))}),t.TgZ(77,"ion-label"),t._uU(78),t.ALo(79,"tfI18n"),t.qZA(),t._UZ(80,"tf-icon",8),t.qZA(),t.TgZ(81,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.itemClicked(s.settingPages.thanks))}),t.TgZ(82,"ion-label"),t._uU(83),t.ALo(84,"tfI18n"),t.qZA(),t._UZ(85,"tf-icon",8),t.qZA(),t.TgZ(86,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.itemClicked(s.settingPages.experts))}),t.TgZ(87,"ion-label"),t._uU(88),t.ALo(89,"tfI18n"),t.qZA(),t._UZ(90,"tf-icon",8),t.qZA(),t.TgZ(91,"ion-item",5),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.itemClicked(s.settingPages.company))}),t.TgZ(92,"ion-label"),t._uU(93),t.ALo(94,"tfI18n"),t.qZA(),t._UZ(95,"tf-icon",8),t.qZA(),t.TgZ(96,"ion-item",14)(97,"i
1on-label"),t._uU(98),t.ALo(99,"tfI18n"),t.qZA(),t.TgZ(100,"ion-note",15),t._uU(101),t.qZA()()(),t.YNc(102,pt,16,6,"ion-list",1),t.qZA()}if(2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngIf",e.user.anonymous),t.xp6(1),t.Q6J("ngIf",!e.user.anonymous),t.xp6(1),t.Q6J("context",e.pushPermissionRequestContext),t.xp6(5),t.Oqu(t.lcZ(10,26,e.settingPages.notice.key)),t.xp6(2),t.Q6J("ngIf",0!==e.settingPages.notice.badge),t.xp6(5),t.Oqu(t.lcZ(17,28,"settings.basic")),t.xp6(5),t.Oqu(t.lcZ(22,30,e.settingPages.account.key)),t.xp6(6),t.Oqu(t.lcZ(28,32,e.settingPages.notification.key)),t.xp6(6),t.Oqu(t.lcZ(34,34,e.settingPages.theme.key)),t.xp6(6),t.Oqu(t.lcZ(40,36,e.settingPages.external.key)),t.xp6(6),t.Oqu(t.lcZ(46,38,e.settingPages.feedback.key)),t.xp6(3),t.Q6J("ngIf",e.isExpert||e.isAdmin),t.xp6(1),t.Q6J("ngIf",!e.user.anonymous),t.xp6(1),t.Q6J("ngIf",e.isAdmin),t.xp6(4),t.Oqu(t.lcZ(55,40,"settings.other")),t.xp6(4),t.Oqu(t.lcZ(59,42,e.settingPages.blog.key)),t.xp6(5),t.Oqu(t.lcZ(64,44,e.settingPages.faq.key)),t.xp6(5),t.Oqu(t.lcZ(69,46,e.settingPages.terms.key)),t.xp6(5),t.Oqu(t.lcZ(74,48,e.settingPages.privacy.key)),t.xp6(5),t.Oqu(t.lcZ(79,50,e.settingPages.guidelines.key)),t.xp6(5),t.Oqu(t.lcZ(84,52,e.settingPages.thanks.key)),t.xp6(5),t.Oqu(t.lcZ(89,54,e.settingPages.experts.key)),t.xp6(5),t.Oqu(t.lcZ(94,56,e.settingPages.company.key)),t.xp6(5),t.Oqu(t.lcZ(99,58,e.settingPages.version.key)),t.xp6(3),t.Oqu(e.settingPages.version.value),t.xp6(1),t.Q6J("ngIf",!e._tfContext.isProductionEnv)}}let bt=(()=>{class n{constructor(e,i,s,a,c,g,_,h,m,M,S,D){this._route=e,this._dialogService=i,this._authService=s,this._userService=a,this._i18n=c,this._iabService=g,this._navCtrl=_,this._changeDetector=h,this._cloudinaryService=m,this._tracker=M,this._counterService=S,this._tfContext=D,this.pushPermissionRequestContext="settings",this.settingPages={notice:{paths:["notices"],key:"notices",badge:0},chat:{paths:["chat"],key:"chat",badge:0},entryView:{paths:["settings","entryViewType"],key:"settings.entryView"},tabs:{paths:["settings","tabmanage"],key:"tabs.management"},account:{paths:["settings","account"],key:"settings.account"},theme:{paths:["settings","theme"],key:"settings.theme"},notification:{paths:["settings","notification"],key:"settings.notification"},external:{paths:["settings","externals"],key:"settings.external"},blog:{key:"blog",url:"https://medium.com/@techfeed"},faq:{key:"faq",url:"/faq"},feedback:{paths:["feedback"],key:"feedback"},terms:{key:"terms",url:"/terms"},privacy:{key:"privacy",url:"/privacy"},guidelines:{key:"guidelines",url:"/guidelines"},thanks:{key:"thanks",url:"/thanks"},company:{key:"aboutCompany",url:"https://hajimari.inc/"},version:{key:"version.app",value:""},manualPush:{paths:["admin","manualPush"],key:"settings.manualPush"},release:{paths:["admin","releases"],key:"settings.releaseManager"},experts:{paths:["experts"],key:"expert.list.title"},expertOnly:{paths:["settings","expert"],key:"expert.only"}},this._subscription=new Q.Subscription,this.isDev=this._tfContext.
1isDevelopmentEnv,this.settingPages.version.value=D.version;const je=this._authService.authEvents.userModified$.filter($=>!!$).subscribe($=>{this.user=$,this._changeDetector.markForCheck()});this._subscription.add(je),this._initBadges()}get isAdmin(){return(0,T.isAdmin)(this.user)}get isExpert(){return!!this.user&&!!this.user.isExpert}ionViewDidEnter(){this._userService.refresh()}itemClicked(e){if("paths"in e){const i=(0,U.jg)(this._route).concat(e.paths);this._navCtrl.navigateForward(i)}else if("url"in e){const i=e.url.match(/^\//)?this._tfContext.serviceUrl+e.url:e.url;this._iabService.getUserAgentType().then(s=>{s===R.O.CUSTOM_BROWSER?this._iabService.open(i):"web"===this._tfContext.deviceType?window.open(i,"_blank"):this._dialogService.confirm(this._i18n.getMessage("confirm.openBrowser")).then(a=>{!0===a&&window.open(i,"_system")})})}}toProfile(e){if(e.preventDefault(),e.stopPropagation(),!this.user)return;const i=(0,U.jg)(this._route).concat(["people",this.user.id]);this._navCtrl.navigateForward(i)}toLogin(e){e.stopPropagation();const i=(0,U.jg)(this._route).concat(["anonymous","login"]);this._navCtrl.navigateForward(i)}toSignup(e){e.stopPropagation();const i=(0,U.jg)(this._route).concat(["anonymous","signup"]);this._navCtrl.navigateForward(i)}toDebug(){const e=(0,U.jg)(this._route).concat(["debug"]);this._navCtrl.navigateForward(e)}toStorage(){const e=(0,U.jg)(this._route).concat(["storage"]);this._navCtrl.navigateForward(e)}logout(){var e=this;return(0,f.Z)(function*(){!(yield e._dialogService.confirm(e._i18n.getMessage("confirm.logout")))||(e._tracker.trackEvent("auth","logout","success",1),yield e._authService.logout(),e._tfContext.reload$.emit())})()}getResizeGroupIconUrl(e){return this._cloudinaryService.getResizedImageUrl(e,j.o,j.o)}ngOnDestroy(){this._subscription.closed||this._subscription.unsubscribe()}_initBadges(){var e=this;return(0,f.Z)(function*(){e.settingPages.notice.badge=yield e._counterService.get(E.e.NEWLY_NOTICES),e.settingPages.chat.badge=yield e._counterService.get(E.e.UNREAD_CHAT_THREAD);const i=e._counterService.update$.subscribe(s=>{s.type===E.e.NEWLY_NOTICES?e.settingPages.notice.badge=s.value:s.type===E.e.UNREAD_CHAT_THREAD&&(e.settingPages.chat.badge=s.value)});e._subscription.add(i)})()}}return n.screenName="SettingsPage",n.\u0275fac=function(e){return new(e||n)(t.Y36(q.gz),t.Y36(I.Y),t.Y36(O.e8),t.Y36(Z.K),t.Y36(b.D),t.Y36(R.v),t.Y36(o.SH),t.Y36(t.sBO),t.Y36(at.qT),t.Y36(G.e),t.Y36(E.Q),t.Y36(x.qe))},n.\u0275cmp=t.Xpm({type:n,selectors:[["ng-component"]],decls:4,vars:4,consts:[["icon","fa-cog",3,"title"],[4,"ngIf"],[1,"item-profile",3,"click"],["lines","none",4,"ngIf"],["trackingLabel","settings",3,"context"],["button","true","detail","false",3,"click"],["name","fa-bell","type","solid","slot","start"],["slot","end",4,"ngIf"],["name","fa-chevron-right","type","regular","slot","end",1,"tf-item-detail-icon"],["name","fa-cog","type","solid","slot","start"],["name","fa-tv","type","light","slot","start"],["name","fa-user-plus","type","solid","slot","start"],["name","fa-paper-plane","type","solid","slot","start"],["button","true","detail","false",3,"click",4,"ngIf"],["button","true","detail","false"],["item-right",""],["lines","none"],["slot","start"],["size","large",3,"user"],[1,"anonymous-description"],["href","#",1,"show-profile",3,"click"],[1,"auth-buttons"],[3,"click"],["href","#"],["slot","end"],["name","fa-shield-check","type","solid","slot","start",1,"expert-icon"],["name","fa-sign-out","type","regular","slot","start"],["name","fa-info-circle","slot","start"],["name","fa-database","type","solid","slot","start"]],template:function(e,i){1&e&&(t.TgZ(0,"ion-header"),t._UZ(1,"tf-navbar",0),t.ALo(2,"tfI18n"),t.qZA(),t.YNc(3,Zt,103,60,"ion-content",1)),2&e&&(t.xp6(1),t.s9C("title",t.lcZ(2,2,"settings")),t.xp6(2),t.Q6J("ngIf",i.user))},dependencies:[o.BJ,o.yp,o.YG,o.PM,o.W2,o.Gu,o.Ie,o.Q$,o.q_,o.yh,o.uN,d.O5,rt.Ao,C.S,k.M,ct.s,p.C],styles:['@charset "UTF-8";.item-profile[_ngcontent-%COMP%]{margin:0 0 16px;width:100%}.anonymous-description[_ngcontent-%COMP%]{white-space:normal;margin-top:8px;font-size:1.4rem;line-height:normal;color:var(--tf-color-15)}.anonymous-description[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin:0}.anonymous-description-more[_ngcontent-%COMP%]{text-align:right}.auth-buttons[_ngcontent-%COMP%]{margin-top:12px}ion-card[_ngcontent-%COMP%] + tf-push-confirm[_ngcontent-%COMP%]{margin-top:-16px;margin-bottom:16px}ion-card[_ngcontent-%COMP%]{border-radius:0}
1ion-card[_ngcontent-%COMP%]   ion-avatar[_ngcontent-%COMP%]{width:48px;height:48px}ion-card[_ngcontent-%COMP%]   ion-avatar[_ngcontent-%COMP%]     img{border-radius:50%}ion-card[_ngcontent-%COMP%]   ion-label[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{font-size:1.4rem}ion-list[_ngcontent-%COMP%]   ion-item[_ngcontent-%COMP%]{font-size:1.4rem}ion-list[_ngcontent-%COMP%]   ion-item[_ngcontent-%COMP%]   tf-icon[_ngcontent-%COMP%]{margin:8px 0;width:32px}ion-list[_ngcontent-%COMP%]   ion-item[_ngcontent-%COMP%]   tf-icon[name=fa-tv][_ngcontent-%COMP%], ion-list[_ngcontent-%COMP%]   ion-item[_ngcontent-%COMP%]   tf-icon[name=fa-user-plus][_ngcontent-%COMP%]{font-size:1.6rem}ion-list[_ngcontent-%COMP%]   ion-item[_ngcontent-%COMP%]   tf-icon[name=fa-paper-plane][_ngcontent-%COMP%]{font-size:1.8rem}ion-list[_ngcontent-%COMP%]   ion-item[_ngcontent-%COMP%]   ion-badge[_ngcontent-%COMP%]{font-size:1.2rem}ion-note[_ngcontent-%COMP%]{--color: $tf-color-1}.expert-icon[_ngcontent-%COMP%]{color:var(--tf-color-18)}']}),n})();var y=l(10195),u=l(24006),Ct=l(10633),v=l(19249);let K=(()=>{class n{constructor(e,i,s){this._tfContext=e,this._pageElement=i,this._clientHeight=s}
1ngOnInit(){this._tfContext.isWideView&&this._pageElement.nativeElement.parentElement.style.setProperty("--height",this._clientHeight)}}return n.\u0275fac=function(e){t.$Z()},n.\u0275dir=t.lG2({type:n}),n})();function xt(n,r){1&n&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"tfI18n"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.xi3(2,1,"error.required","&{email}")))}function Tt(n,r){1&n&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"tfI18n"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"signup.email.invalidFormat")))}function vt(n,r){if(1&n&&(t.TgZ(0,"ion-item",13)(1,"ion-label",14),t.YNc(2,xt,3,4,"div",15),t.YNc(3,Tt,3,3,"div",15),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngIf",e.email.hasError("required")),t.xp6(1),t.Q6J("ngIf",e.email.hasError("invalidMailFormat"))}}let yt=(()=>{class n extends K{constructor(e,i,s,a,c,g,_,h,m){if(super(e,i,"512px"),this._userService=s,this._i18nService=a,this._fb=c,this._toastService=g,this._dialogService=_,this._logger=h,this._modalCtrl=m,this._submitting=!1,!this._tfContext.currentUser)throw new Error("currentUser is undefined on settings-email");this.user=this._tfContext.currentUser,this.form=this._fb.group({email:["",u.kI.compose([u.kI.required,Ct.o.mailFormat])]}),this.email=this.form.controls.email}get userEmail(){return!this.user||(0,T.hasDummyEmail)(this.user)?"":this.user.email}get isValid(){return this.form.valid&&!this._submitting&&this.email.value!==this.user.email}changeEmail(){!this.isValid||(this._submitting=!0,this._userService.changeEmail(this.email.value).then(e=>(this._logger.debug({person:e},"success changeEmail"),this._dialogService.info(this._i18nService.getMessage("settings.email.success")))).then(()=>{this.dismiss()}).catch(e=>{let s;switch(this._logger.debug({err:e},"failure changeEmail"),e.cause&&e.cause.message){case"email is required":s="settings.email.error.email.required";break;case"email is not valid":s="settings.email.error.email.notValid";break;case"email is not modified":s="settings.email.error.email.notModified";break;case"email is already exists":s="settings.email.error.email.exists";break;default:s="error.common"}this._toastService.failure(this._i18nService.getMessage(s))}).then(()=>{this._submitting=!1}))}dismiss(){this._modalCtrl.dismiss()}}return n.screenName="EmailModal",n.\u0275fac=function(e){return new(e||n)(t.Y36(x.qe),t.Y36(t.SBq),t.Y36(Z.K),t.Y36(b.D),t.Y36(u.QS),t.Y36(y.y),t.Y36(I.Y),t.Y36(v.Yd),t.Y36(o.IN))},n.\u0275cmp=t.Xpm({type:n,selectors:[["ng-component"]],features:[t.qOj],decls:42,vars:34,consts:[["slot","secondary"],["size","small","fill","clear",3,"click"],[1,"resize-modal-container"],[3,"formGroup","ngSubmit"],["no-lines",""],["position","stacked"],["type","email",3,"value","disabled"],["type","email","required","","autocapitalize","none","formControlName","email",3,"placeholder"],["class","alert-box","lines","none",4,"ngIf"],[1,"mail-caution-wrap"],[1,"mail-caution"],[1,"ion-padding"],["type","submit","expand","block",1,"",3,"disabled"],["lines","none",1,"alert-box"],[1,"alert-label"],[4,"ngIf"]],template:function(e,i){1&e&&(t.TgZ(0,"ion-header")(1,"ion-toolbar")(2,"ion-title"),t._uU(3),t.ALo(4,"tfI18n"),t.qZA(),t.TgZ(5,"ion-buttons",0)(6,"ion-button",1),t.NdJ("click",function(){return i.dismiss()}),t._uU(7),t.ALo(8,"tfI18n"),t.qZA()()()(),t.TgZ(9,"ion-content")(10,"div",2)(11,"form",3),t.NdJ("ngSubmit",function(){return i.changeEmail()}),t.TgZ(12,"ion-list",4)(13,"ion-list-header")(14,"ion-label"),t._uU(15),t.ALo(16,"tfI18n"),t.qZA()(),t.TgZ(17,"ion-item")(18,"ion-label",5),t._uU(19),t.ALo(20,"tfI18n"),t.qZA(),t._UZ(21,"ion-input",6),t.qZA(),t.TgZ(22,"ion-item")(23,"ion-label",5),t._uU(24),t.ALo(25,"tfI18n"),t.qZA(),t._UZ(26,"ion-input",7),t.ALo(27,"tfI18n"),t.qZA(),t.YNc(28,vt,4,2,"ion-item",8),t.qZA(),t.TgZ(29,"div",9),t._uU(30," \u5909\u66f4\u3057\u305f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306b\u78ba\u8a8d\u306e\u30e1\u30fc\u30eb\u3092\u304a\u9001\u308a\u3057\u307e\u3059\u3002 \u78ba\u8a8d\u3059\u308b\u3068\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u5909\u66f4\u304c\u5b8c\u4e86\u3057\u307e\u3059\u3002 "),t.TgZ(31,"ul",10)(32,"li"),t._uU(33),t.ALo(34,"tfI18n"),t.qZA(),t.TgZ(35,"li"),t._uU(36),t.ALo(37,"tfI18n"),t.qZA()()(),t.TgZ(38,"div",11)(39,"ion-button",12),t._uU(40),t.ALo(41,"tfI18n"),t.qZA()()()()()),2&e&&(t.xp6(3),t.hij(" ",t.lcZ(4,16,"settings.email")," "),t.xp6(4),t.hij(" ",t.lcZ(8,18,"cancel")," "),t.xp6(4),t.Q6J("formGroup",i.form),t.xp6(4),t.Oqu(t.lcZ(16,20,"settings.email")),t.xp6(4),t.Oqu(t.lcZ(20,22,"settings.email.current")),t.xp6(2),t.s9C("value",i.userEmail),t.Q6J("disabled",!0),t.xp6(1),t.ekj("error",!i.email.valid&&i.email.touched),t.xp6(2),t.Oqu(t.lcZ(25,24,"settings.email.new")),t.xp6(2),t.s9C("placeholder",t.lcZ(27,26,"settings.email.new")),t.xp6(2),t.Q6J("ngIf",!i.email.valid&&i.email.touched),t.xp6(5),t.Oqu(t.lcZ(34,28,"mail.caution.spamFilter")),t.xp6(3),t.Oqu(t.lcZ(37,30,"mail.caution.domainFilter")),t.xp6(3),t.Q6J("disabled",!i.isValid),t.xp6(1),t.hij(" ",t.lcZ(41,32,"change"),""))},dependencies:[o.YG,o.Sm,o.W2,o.Gu,o.pK,o.Ie,o.Q$,o.q_,o.yh,o.wd,o.sr,o.j9,d.O5,u._Y,u.JJ,u.JL,u.Q7,u.sg,u.u,p.C],styles:['@charset "UTF-8";ion-list[_ngcontent-%COMP%]{padding-bottom:29px}ion-list-header[_ngcontent-%COMP%]{margin-bottom:16px}.alert-box[_ngcontent-%COMP%]{font-size:1.4rem;margin-bottom:-29px}']}),n})();var St=l(32801),P=l(36597);const At=["displayPassword"];function kt(n,r){if(1&n&&(t.TgZ(0,"ion-item")(1,"ion-label",7),t._uU(2),t.ALo(3,"tfI18n"),t.qZA(),t._UZ(4,"ion-input",16),t.qZA()),2&n){const e=t.oxw(),i=t.MAs(29);t.ekj("error",!(null!=e.currentPassword&&e.currentPassword.valid)&&(null==e.currentPassword?null:e.currentPassword.touched)),t.xp6(2),t.Oqu(t.lcZ(3,5,"settings.password.current")),t.xp6(2),t.Q6J("type",i.checked?"text":"password")("formControl",e.currentPassword)}}function wt(n,r){1&n&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"tfI18n"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.xi3(2,1,"error.required","&{password}")))}function Mt(n,r){1&n&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"tfI18n"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"signup.email.invalidFormat")))}function qt(n,r){if(1&n&&(t.TgZ(0,"ion-item",17)(1,"ion-label",18),t.YNc(2,wt,3,4,"div",19),t.YNc(3,Mt,3,3,"div",19),t.qZA()()),2&n){const e=t.oxw();
1t.xp6(2),t.Q6J("ngIf",null==e.currentPassword?null:e.currentPassword.hasError("required")),t.xp6(1),t.Q6J("ngIf",null==e.currentPassword?null:e.currentPassword.hasError("invalidMailFormat"))}}function Ot(n,r){1&n&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"tfI18n"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.xi3(2,1,"error.required","&{password}")))}function Ut(n,r){1&n&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"tfI18n"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"error.pass.invalid")))}function It(n,r){if(1&n&&(t.TgZ(0,"ion-item",20)(1,"ion-label",18),t.YNc(2,Ot,3,4,"div",19),t.YNc(3,Ut,3,3,"div",19),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngIf",e.password.hasError("required")),t.xp6(1),t.Q6J("ngIf",e.password.hasError("validatePassword"))}}function Et(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"p",21),t._uU(1),t.ALo(2,"tfI18n"),t._UZ(3,"br"),t.TgZ(4,"a",22),t.NdJ("click",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.toPasswordReset(s))}),t._uU(5),t.ALo(6,"tfI18n"),t.qZA()()}2&n&&(t.xp6(1),t.hij(" ",t.lcZ(2,2,"password.reconfirm.msg"),""),t.xp6(4),t.Oqu(t.lcZ(6,4,"dialog.login.forgetPass")))}let Lt=(()=>{class n extends K{constructor(e,i,s,a,c,g,_,h,m,M){if(super(e,i,"562px"),this._navCtrl=s,this._userService=a,this._i18nService=c,this._fb=g,this._toastService=_,this._dialogService=h,this._logger=m,this._modalCtrl=M,this._submitting=!1,this._navPushDelay=100,!this._tfContext.currentUser)throw new Error("currentUser is undefined on settings-password");this.user=this._tfContext.currentUser;const S={password:["",u.kI.compose([u.kI.required,St._.validatePassword])]};this.isPasswordTypeSystem||(S.currentPassword=["",u.kI.required]),this.form=this._fb.group(S),this.isPasswordTypeSystem||(this.currentPassword=this.form.controls.currentPassword),this.password=this.form.controls.password}get isPasswordTypeSystem(){return this.user.passwordType===P.PersonPasswordType.System}get valid(){return(!this.currentPassword||this.currentPassword.value)&&this.password.value&&this.form.valid&&!this._submitting}changePassword(){this.valid&&(this._submitting=!0,this._userService.changePassword(this.password.value,this.currentPassword?this.currentPassword.value:void 0).then(i=>(this._logger.debug({person:i},"success changePassword"),this._dialogService.info(this._i18nService.getMessage("settings.password.success")))).then(()=>(this.dismiss(),this._userService.refresh())).catch(i=>{let a;switch(this._logger.debug({err:i},"failure changePassword"),i.cause&&i.cause.message){case"current is required":a="error.pass.current.required";break;case"password is required":a="error.pass.confirm.required";break;case"current password is not valid":a="error.pass.current.invalid";break;case"password is not modified":a="error.pass.notModified";break;default:a="error.common"}this._toastService.failure(this._i18nService.getMessage(a))}).then(()=>{this._submitting=!1}))}toPasswordReset(e){this._logger.debug("toPasswordReset"),e.stopPropagation(),e.preventDefault(),this.dismiss(),this._navCtrl.navigateForward("/auth/reset-password-request")}dismiss(){this._modalCtrl.dismiss()}}return n.screenName="PasswordModal",n.\u0275fac=function(e){return new(e||n)(t.Y36(x.qe),t.Y36(t.SBq),t.Y36(o.SH),t.Y36(Z.K),t.Y36(b.D),t.Y36(u.QS),t.Y36(y.y),t.Y36(I.Y),t.Y36(v.Yd),t.Y36(o.IN))},n.\u0275cmp=t.Xpm({type:n,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&t.Gf(At,5),2&e){let s;t.iGM(s=t.CRH())&&(i.displayPassword=s.first)}},features:[t.qOj],decls:36,vars:28,consts:[["slot","secondary"],["size","small","fill","clear",3,"click"],[1,"resize-modal-container"],[3,"formGroup","ngSubmit"],["no-lines",""],[3,"error",4,"ngIf"],["class","alert-box currentPassword",4,"ngIf"],["position","stacked"],["required","","autocapitalize","none","autocomplete","off",3,"type","formControl","formControlChange"],[1,"display-password"],[1,"suffix"],["displayPassword",""],["class","alert-box password","lines","none",4,"ngIf"],["class","password-reconfirm-msg ion-padding",4,"ngIf"],[1,"ion-padding"],["type","submit","expand","block",1,"",3,"disabled"],["required","","autocapitalize","none","autocomplete","off",3,"type","formControl"],[1,"alert-box","currentPassword"],[1,"alert-label"],[4,"ngIf"],["lines","none",1,"alert-box","password"],[1,"password-reconfirm-msg","ion-padding"],["href","#",3,"click"]],template:function(e,i){if(1&e&&(t.TgZ(0,"ion-header")(1,"ion-toolbar")(2,"ion-title"),t._uU(3),t.ALo(4,"tfI18n"),t.qZA(),t.TgZ(5,"ion-buttons",0)(6,"ion-button",1),t.NdJ("click",function(){return i.dismiss()}),t._uU(7),t.ALo(8,"tfI18n"),t.qZA()()()(),t.TgZ(9,"ion-content")(10,"div",2)(11,"form",3),t.NdJ("ngSubmit",function(){return i.changePassword()}),t.TgZ(12,"ion-list",4)(13,"ion-list-header")(14,"ion-label"),t._uU(15),t.ALo(16,"tfI18n"),t.qZA()(),t.YNc(17,kt,5,7,"ion-item",5),t.YNc(18,qt,4,2,"ion-item",6),t.TgZ(19,"ion-item")(20,"ion-label",7),t._uU(21),t.ALo(22,"tfI18n"),t.qZA(),t.TgZ(23,"ion-input",8),t.
1NdJ("formControlChange",function(a){return i.password=a}),t.qZA()(),t.TgZ(24,"ion-item",9)(25,"ion-label"),t._uU(26),t.ALo(27,"tfI18n"),t.qZA(),t._UZ(28,"ion-checkbox",10,11),t.qZA(),t.YNc(30,It,4,2,"ion-item",12),t.qZA(),t.YNc(31,Et,7,6,"p",13),t.TgZ(32,"div",14)(33,"ion-button",15),t._uU(34),t.ALo(35,"tfI18n"),t.qZA()()()()()),2&e){const s=t.MAs(29);t.xp6(3),t.hij(" ",t.lcZ(4,16,"settings.password")," "),t.xp6(4),t.hij(" ",t.lcZ(8,18,"cancel")," "),t.xp6(4),t.Q6J("formGroup",i.form),t.xp6(4),t.Oqu(t.lcZ(16,20,"settings.password")),t.xp6(2),t.Q6J("ngIf",!i.isPasswordTypeSystem),t.xp6(1),t.Q6J("ngIf",!(null!=i.currentPassword&&i.currentPassword.valid)&&(null==i.currentPassword?null:i.currentPassword.touched)&&!i.isPasswordTypeSystem),t.xp6(1),t.ekj("error",!i.password.valid&&i.password.touched),t.xp6(2),t.Oqu(t.lcZ(22,22,"settings.password.new")),t.xp6(2),t.Q6J("type",s.checked?"text":"password")("formControl",i.password),t.xp6(3),t.Oqu(t.lcZ(27,24,"dispPass")),t.xp6(4),t.Q6J("ngIf",!i.password.valid&&i.password.touched),t.xp6(1),t.Q6J("ngIf",!i.isPasswordTypeSystem),t.xp6(2),t.Q6J("disabled",!i.valid),t.xp6(1),t.Oqu(t.lcZ(35,26,"change"))}},dependencies:[o.YG,o.Sm,o.nz,o.W2,o.Gu,o.pK,o.Ie,o.Q$,o.q_,o.yh,o.wd,o.sr,o.w,o.j9,d.O5,u._Y,u.JJ,u.JL,u.Q7,u.oH,u.sg,p.C],styles:['@charset "UTF-8";.password-reconfirm-msg[_ngcontent-%COMP%]{font-size:1.3rem;margin-top:38px}ion-list[_ngcontent-%COMP%]{padding-bottom:29px}ion-list-header[_ngcontent-%COMP%]{margin-bottom:16px}.display-password[_ngcontent-%COMP%], .alert-box[_ngcontent-%COMP%]{font-size:1.4rem}.alert-box.password[_ngcontent-%COMP%]{margin-bottom:-29px}']}),n})();var Dt=l(78958);function Yt(n,r){1&n&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"tfI18n"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.xi3(2,1,"error.required","&{username}")))}function Jt(n,r){1&n&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"tfI18n"),t.qZA()),2&n&&(t.xp6(1),t.hij("",t.xi3(2,1,"error.id.invalid","&{username}"),"}"))}function Ft(n,r){1&n&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"tfI18n"),t.qZA()),2&n&&(t.xp6(1),t.hij("",t.xi3(2,1,"error.id.exists","&{username}"),"}"))}function Qt(n,r){if(1&n&&(t.TgZ(0,"ion-item",10)(1,"ion-label",11),t.YNc(2,Yt,3,4,"div",12),t.YNc(3,Jt,3,4,"div",12),t.YNc(4,Ft,3,4,"div",12),t.qZA()()),2&n){const e=t.oxw();
1t.xp6(2),t.Q6J("ngIf",e.username.hasError("required")),t.xp6(1),t.Q6J("ngIf",e.username.hasError("invalidUsernameFormat")),t.xp6(1),t.Q6J("ngIf",e.username.hasError("alreadyExists"))}}let Kt=(()=>{class n extends K{constructor(e,i,s,a,c,g,_,h){if(super(e,i,"330px"),this._userService=s,this._i18nService=a,this._fb=c,this._toastService=g,this._logger=_,this._modalCtrl=h,this._submitting=!1,!this._tfContext.currentUser)throw new Error("currentUser is undefined on settings-username");this.user=this._tfContext.currentUser,this.form=this._fb.group({username:["",u.kI.compose([u.kI.required,Dt.B.validateUsername])]}),this.username=this.form.controls.username,this.username.setValue(this.user.username)}get isValid(){return this.form.valid&&!this._submitting}changeUsername(){!this.isValid||(this._submitting=!0,this._userService.changeUsername(this.username.value).then(()=>{this.dismiss()}).catch(e=>{let s,a;switch(this._logger.debug({err:e},"failure changeUsername"),e.cause&&e.cause.message||e.message){case"username is required":s="error.required",a="&{username}";break;case"username is not valid":s="error.id.invalid",a="&{username}";break;case"username already exists":s="error.id.exists",a="&{username}";break;default:s="error.common"}this._toastService.failure(this._i18nService.getMessage(s,a))}).then(()=>{this._submitting=!1}))}dismiss(){this._modalCtrl.dismiss()}}return n.screenName="UsernameModal",n.\u0275fac=function(e){return new(e||n)(t.Y36(x.qe),t.Y36(t.SBq),t.Y36(Z.K),t.Y36(b.D),t.Y36(u.QS),t.Y36(y.y),t.Y36(v.Yd),t.Y36(o.IN))},n.\u0275cmp=t.Xpm({type:n,selectors:[["ng-component"]],features:[t.qOj],decls:27,vars:20,consts:[["slot","secondary"],["size","small","fill","clear",3,"click"],[1,"resize-modal-container"],[3,"formGroup","ngSubmit"],["no-lines",""],["position","stacked"],["type","username","required","","autocapitalize","none","formControlName","username"],["class","alert-box","lines","none",4,"ngIf"],[1,"ion-padding"],["type","submit","expand","block",1,"",3,"disabled"],["lines","none",1,"alert-box"],[1,"alert-label"],[4,"ngIf"]],template:function(e,i){1&e&&(t.TgZ(0,"ion-header")(1,"ion-toolbar")(2,"ion-title"),t._uU(3),t.ALo(4,"tfI18n"),t.qZA(),t.TgZ(5,"ion-buttons",0)(6,"ion-button",1),t.NdJ("click",function(){return i.dismiss()}),t._uU(7),t.ALo(8,"tfI18n"),t.qZA()()()(),t.TgZ(9,"ion-content")(10,"div",2)(11,"form",3),t.NdJ("ngSubmit",function(){return i.changeUsername()}),t.TgZ(12,"ion-list",4)(13,"ion-list-header")(14,"ion-label"),t._uU(15),t.ALo(16,"tfI18n"),t.qZA()(),t.TgZ(17,"ion-item")(18,"ion-label",5),t._uU(19),t.ALo(20,"tfI18n"),t.qZA(),t._UZ(21,"ion-input",6),t.qZA(),t.YNc(22,Qt,5,3,"ion-item",7),t.qZA(),t.TgZ(23,"div",8)(24,"ion-button",9),t._uU(25),t.ALo(26,"tfI18n"),t.qZA()()()()()),2&e&&(t.xp6(3),t.hij(" ",t.lcZ(4,10,"settings.username")," "),t.xp6(4),t.hij(" ",t.lcZ(8,12,"cancel")," "),t.xp6(4),t.Q6J("formGroup",i.form),t.xp6(4),t.Oqu(t.lcZ(16,14,"settings.username")),t.xp6(2),t.ekj("error",!i.username.valid&&i.username.touched),t.xp6(2),t.Oqu(t.lcZ(20,16,"username")),t.xp6(3),t.Q6J("ngIf",!i.username.valid),t.xp6(2),t.Q6J("disabled",!i.isValid),t.xp6(1),t.Oqu(t.lcZ(26,18,"change")))},dependencies:[o.YG,o.Sm,o.W2,o.Gu,o.pK,o.Ie,o.Q$,o.q_,o.yh,o.wd,o.sr,o.j9,d.O5,u._Y,u.JJ,u.JL,u.Q7,u.sg,u.u,p.C],styles:['@charset "UTF-8";ion-list[_ngcontent-%COMP%]{padding-bottom:29px}ion-list-header[_ngcontent-%COMP%]{margin-bottom:16px}.alert-box[_ngcontent-%COMP%]{font-size:1.4rem;margin-bottom:-29px}']}),n})();var w=l(95115),B=l(30298),Ht=l(84331),Vt=l(2839),zt=l(67440),$t=l(86194),Rt=l(93384);function jt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"ion-list")(1,"ion-list-header")(2,"ion-label"),t._uU(3),t.ALo(4,"tfI18n"),t.qZA()(),t.TgZ(5,"ion-item",13),t.NdJ("click",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.changeEmail(s))}),t.TgZ(6,"ion-label"),t._uU(7),t.ALo(8,"tfI18n"),t.qZA(),t.TgZ(9,"ion-note"),t._uU(10),t.qZA(),t._UZ(11,"tf-icon",14),t.qZA(),t.TgZ(12,"ion-item",13),t.NdJ("click",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.changeUsername(s))}),t.TgZ(13,"ion-label"),t._uU(14),t.ALo(15,"tfI18n"),t.qZA(),t.TgZ(16,"ion-note"),t._uU(17),t.qZA(),t._UZ(18,"tf-icon",14),t.qZA()()}if(2&n){const e=t.oxw();
1t.xp6(3),t.Oqu(t.lcZ(4,5,"settings.basic")),t.xp6(4),t.Oqu(t.lcZ(8,7,"email")),t.xp6(3),t.Oqu(e.userEmail),t.xp6(4),t.Oqu(t.lcZ(15,9,"username")),t.xp6(3),t.Oqu(null==e.user?null:e.user.username)}}function Bt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"ion-list")(1,"ion-list-header")(2,"ion-label"),t._uU(3),t.ALo(4,"tfI18n"),t.qZA()(),t.TgZ(5,"ion-item",13),t.NdJ("click",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.changePassword(s))}),t.TgZ(6,"ion-label"),t._uU(7),t.ALo(8,"tfI18n"),t.qZA(),t._UZ(9,"tf-icon",14),t.qZA()()}2&n&&(t.xp6(3),t.Oqu(t.lcZ(4,2,"settings.auth")),t.xp6(4),t.Oqu(t.lcZ(8,4,"change.password")))}const Wt=function(n){return{"ng-invalid":n}};function Xt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"ion-item")(1,"ion-label",15),t._uU(2),t.ALo(3,"tfI18n"),t.TgZ(4,"ion-checkbox",16),t.NdJ("ionChange",function(s){const c=t.CHM(e).$implicit,g=t.oxw();return t.KtG(g.onLangChange(s,c))}),t.qZA()(),t.TgZ(5,"ion-reorder",17),t._UZ(6,"tf-icon",18),t.qZA()()}if(2&n){const e=r.$implicit,i=t.oxw();t.xp6(2),t.hij(" ",t.lcZ(3,3,"lang."+e)," "),t.xp6(2),t.Q6J("checked",i.inputLanguages[e])("ngClass",t.VKq(5,Wt,i.isLangInvalid))}}function te(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",19)(1,"ion-button",20),t.NdJ("click",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.reload(s))}),t._uU(2),t.ALo(3,"tfI18n"),t.qZA()()}2&n&&(t.xp6(2),t.Oqu(t.lcZ(3,1,"settings.langs.reload")))}function ee(n,r){1&n&&(t.TgZ(0,"div",21),t._uU(1),t.ALo(2,"tfI18n"),t.qZA()),2&n&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"error.langs.length")," "))}function ie(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"ion-list")(1,"ion-list-header")(2,"ion-label"),t._uU(3),t.ALo(4,"tfI18n"),t.qZA()(),t.TgZ(5,"ion-item")(6,"ion-label"),t._uU(7),t.ALo(8,"tfI18n"),t.qZA(),t.TgZ(9,"ion-toggle",7),t.NdJ("ionChange",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.onTranslationDefaultChange(s))}),t.qZA()()()}if(2&n){const e=t.oxw();
1t.xp6(3),t.Oqu(t.lcZ(4,3,"settings.translation")),t.xp6(4),t.Oqu(t.lcZ(8,5,"settings.translationDefault")),t.xp6(2),t.Q6J("checked",e.showTranslationDefault)}}const ne=function(){return["/auth/leave"]};function se(n,r){1&n&&(t.TgZ(0,"ion-item",10),t._UZ(1,"tf-icon",22),t.TgZ(2,"ion-label"),t._uU(3),t.ALo(4,"tfI18n"),t.qZA()()),2&n&&(t.Q6J("routerLink",t.DdM(4,ne)),t.xp6(3),t.Oqu(t.lcZ(4,2,"leave.title")))}const oe=function(){return["/settings/externals"]};let ae=(()=>{class n{constructor(e,i,s,a,c,g,_,h,m,M,S,D){this._userService=e,this._authCtrl=i,this._tfContext=s,this._i18nService=a,this._toastService=c,this._modalController=g,this._dialogService=_,this._logger=h,this._changeDetector=m,this._tabService=M,this._locationController=S,this._jobProfileCtrl=D,this.user=null,this.isLangInvalid=!1,this.availableLangs=w.MT,this.inputLanguages={},this.isReloadRequest=!1,this.showTranslationDefault=!1,this.showRecommendEvents=!0,this.timelineType="default",this._isInitizalizing=!1,this._updateTimer=0,this._inputPassword="",this._subscription=new Q.Subscription,this._highlightTypeInitialized=!1}get isTranslationSettingEnabled(){return!!this.user&&"ja"===this.user.primaryLang}get locationLabel(){return this._locationController.getUserCurrentLocationLabel()}get userEmail(){return!this.user||(0,T.hasDummyEmail)(this.user)?"":this.user.email}ngOnInit(){const e=this._authCtrl.userModified$.filter(i=>!!i).subscribe(i=>{this.user=i});this._subscription.add(e)}ngOnDestroy(){this._subscription.unsubscribe()}ionViewDidEnter(){this._userService.refresh().then(e=>{this.user=e,this.init()})}init(){if(!this.user)return;this._isInitizalizing=!0;const e=this.user.settings.acceptLanguages;this.availableLangs.sort((i,s)=>{const a=e.indexOf(i),c=e.indexOf(s);return-1===a?1:-1===c||a<c?-1:a>c?1:0}),this.availableLangs.forEach(i=>{this.inputLanguages[i]=-1!==e.indexOf(i)}),this._userService.getTimezoneLabel(this.user).then(i=>this.timezoneLabel=i),this.highlightType=this.user.settings&&this.user.settings.highlights&&this.user.settings.highlights.type||0,this.showTranslationDefault=this.user.settings&&this.user.settings.showTranslationDefault||!1,this.showRecommendEvents=this.user.settings&&!!this.user.settings.showRecommendEvents,this.timelineType=this.user.settings&&this.user.settings.timeline&&this.user.settings.timeline.type||"default",this._changeDetector.markForCheck(),this._isInitizalizing=!1}onPasswordChangeSubmit(){!this._inputPassword||this._passwordUpdate().then(e=>{e?(this._inputPassword="",this._toastService.success(this._i18nService.getMessage("changed",["&{password}"]))):this._toastService.failure(this._i18nService.getMessage("error.common"))})}onLangChange(e,i){if(this.inputLanguages[i]!==e.detail.checked){if(this.inputLanguages[i]=e.detail.checked,0===this.availableLangs.filter(s=>this.inputLanguages[s]).length)return this.isLangInvalid=!0,void(this.isReloadRequest=!1);this.isLangInvalid=!1,this.isReloadRequest=!0,this._changeDetector.markForCheck(),this.asyncUpdate()}}onTranslationDefaultChange(e){this.showTranslationDefault=e.detail.checked,this._changeDetector.markForCheck(),this.asyncUpdate()}onShowRecommendEventsChange(e){this.showRecommendEvents=e.detail.checked,this._changeDetector.markForCheck(),this.asyncUpdate()}onTimelineDefaultChange(e){this.timelineType=e.detail.checked?"default":"combine",this._changeDetector.markForCheck(),this.asyncUpdate()}changePassword(e){var i=this;return(0,f.Z)(function*(){e.preventDefault();const s=yield i._modalController.create({component:Lt});yield s.present(),yield s.onDidDismiss(),i._changeDetector.markForCheck()})()}changeEmail(e){var i=this;return(0,f.Z)(function*(){e.stopPropagation(),e.preventDefault();const s=yield i._modalController.create({component:yt});yield s.present(),yield s.onDidDismiss(),i._changeDetector.markForCheck()})()}changeUsername(e){var i=this;return(0,f.Z)(function*(){e.stopPropagation(),e.preventDefault();const s=yield i._modalController.create({component:Kt});yield s.present(),yield s.onDidDismiss(),i._changeDetector.markForCheck()})()}changeLocation(e){var i=this;return(0,f.Z)(function*(){e.stopPropagation(),e.preventDefault();const s=yield i._modalController.create({component:zt.v,componentProps:{page:Vt.F}});yield s.present(),yield s.onDidDismiss(),i._changeDetector.markForCheck()})()}reorderLang(e){!this.user||(this.availableLangs=e.detail.complete(this.availableLangs),this.asyncUpdate(),this.isReloadRequest=!0,this._changeDetector.markForCheck())}reload(e){e.preventDefault(),this._accountUpdate().then(i=>{i&&this._tfContext.reload$.emit()})}asyncUpdate(){this._isInitizalizing||(this._updateTimer&&(clearTimeout(this._updateTimer),this._updateTimer=0),this._updateTimer=setTimeout(this._accountUpdate.bind(this),500))}changeHighlightType(){var e=this;return(0,f.Z)(function*(){if(e._highlightTypeInitialized||e.highlightType!==T.HighlightType.Channel.valueOf())return e._highlightTypeInitialized=!0,e.highlightType!==T.HighlightType.Channel.valueOf()||(yield e._dialogService.confirm(e._i18nService.getMessage("confirm.deprecatedSettings")))?void e.asyncUpdate():(e.highlightType=T.HighlightType.Tab.valueOf(),void e._changeDetector.markForCheck());e._highlightTypeInitialized=!0})()}showJobProfileSettings(){this._jobProfileCtrl.showJobProfileSettings(!1,!1,{},"account-settings")}_passwordUpdate(){return this._userService.update({password:this._inputPassword})}_accountUpdate(){if(!this.user)return Promise.resolve(!1);this._updateTimer&&clearTimeout(this._updateTimer);let e=!0;const i=this.availableLangs.filter(a=>this.inputLanguages[a]);return 0===i.length?Promise.resolve(!1):(this.user.settings?(this._checkedLangChanged(i)&&(e=!1),this.showTranslationDefault!==this.user.settings.showTranslationDefault&&(e=!1),this.showRecommendEvents!==this.user.settings.showRecommendEvents&&(e=!1),this.highlightType!==(this.user.settings.highlights&&this.user.settings.highlights.type)&&(e=!1),this.timelineType!==(this.user.settings.timeline&&this.user.settings.timeline.type)&&(e=!1)):e=!1,e?Promise.resolve(!0):this._userService.update({settings:{acceptLanguages:i,showTranslationDefault:this.showTranslationDefault,showRecommendEvents:this.showRecommendEvents,highlights:{type:this.highlightType},timeline:{type:this.timelineType}}}).then(()=>this._tabService.clearCacheAll().then(()=>!0)).catch(a=>(this._toastService.failure(),this._logger.error({err:a},"user update error at account settings"),!1)))}_checkedLangChanged(e){if(!this.user)return!1;let i=!1;const s=this.user.settings&&this.user.settings.acceptLanguages||[];
1return s&&s.length===e.length?s.forEach((a,c)=>{a!==e[c]&&(i=!0)}):i=!0,i}}return n.screenName="AccountSettingsPage",n.\u0275fac=function(e){return new(e||n)(t.Y36(Z.K),t.Y36(Ht.l),t.Y36(x.qe),t.Y36(b.D),t.Y36(y.y),t.Y36(o.IN),t.Y36(I.Y),t.Y36(v.Yd),t.Y36(t.sBO),t.Y36(B.pr),t.Y36($t.u),t.Y36(Rt.V))},n.\u0275cmp=t.Xpm({type:n,selectors:[["ng-component"]],decls:42,vars:29,consts:[["icon","fa-cog","defaultHref","/settings",3,"title"],[4,"ngIf"],[1,"lang"],[3,"disabled","ionItemReorder"],[4,"ngFor","ngForOf"],["class","note request-reload",4,"ngIf"],["class","note alert-box",4,"ngIf"],["slot","end",3,"checked","ionChange"],["detail","true",1,"account-settings-item",3,"click"],["slot","start","name","fa-briefcase","type","solid"],[3,"routerLink"],["slot","start","name","fa-user-plus","type","solid"],[3,"routerLink",4,"ngIf"],[1,"account-settings-item",3,"click"],["name","fa-chevron-right","type","regular","slot","end",1,"tf-item-detail-icon"],[1,"lang-label"],[3,"checked","ngClass","ionChange"],["slot","end"],["name","fa-bars"],[1,"note","request-reload"],["size","small",3,"click"],[1,"note","alert-box"],["slot","start","name","fa-minus-circle","type","solid","color","danger"]],template:function(e,i){1&e&&(t.TgZ(0,"ion-header"),t._UZ(1,"tf-navbar",0),t.ALo(2,"tfI18n"),t.qZA(),t.TgZ(3,"ion-content"),t.YNc(4,jt,19,11,"ion-list",1),t.YNc(5,Bt,10,6,"ion-list",1),t.TgZ(6,"ion-list",2)(7,"ion-list-header")(8,"ion-label"),t._uU(9),t.ALo(10,"tfI18n"),t.qZA()(),t.TgZ(11,"ion-reorder-group",3),t.NdJ("ionItemReorder",function(a){return i.reorderLang(a)}),t.YNc(12,Xt,7,7,"ion-item",4),t.qZA()(),t.TgZ(13,"ion-list"),t.YNc(14,te,4,3,"div",5),t.YNc(15,ee,3,3,"div",6),t.qZA(),t.TgZ(16,"ion-list")(17,"ion-list-header")(18,"ion-label"),t._uU(19),t.ALo(20,"tfI18n"),t.qZA()(),t.TgZ(21,"ion-item")(22,"ion-label"),t._uU(23),t.ALo(24,"tfI18n"),t.qZA(),t.TgZ(25,"ion-toggle",7),t.NdJ("ionChange",function(a){return i.onTimelineDefaultChange(a)}),t.qZA()()(),t.YNc(26,ie,10,7,"ion-list",1),t.TgZ(27,"ion-list")(28,"ion-list-header")(29,"ion-label"),t._uU(30),t.ALo(31,"tfI18n"),t.qZA()(),t.TgZ(32,"ion-item",8),t.NdJ("click",function(){return i.showJobProfileSettings()}),t._UZ(33,"tf-icon",9),t.TgZ(34,"ion-label"),t._uU(35,"\u6c42\u4eba\u60c5\u5831\u306e\u8a2d\u5b9a"),t.qZA()(),t.TgZ(36,"ion-item",10),t._UZ(37,"tf-icon",11),t.TgZ(38,"ion-label"),t._uU(39),t.ALo(40,"tfI18n"),t.qZA()(),t.YNc(41,se,5,5,"ion-item",12),t.qZA()()),2&e&&(t.xp6(1),t.s9C("title",t.lcZ(2,16,"settings.account")),t.xp6(3),t.Q6J("ngIf",!(null!=i.user&&i.user.anonymous)),t.xp6(1),t.Q6J("ngIf",!(null!=i.user&&i.user.anonymous)),t.xp6(4),t.Oqu(t.lcZ(10,18,"settings.langs")),t.xp6(2),t.Q6J("disabled",!1),t.xp6(1),t.Q6J("ngForOf",i.availableLangs),t.xp6(2),t.Q6J("ngIf",i.isReloadRequest),t.xp6(1),t.Q6J("ngIf",i.isLangInvalid),t.xp6(4),t.Oqu(t.lcZ(20,20,"timeline")),t.xp6(4),t.Oqu(t.lcZ(24,22,"settings.timeline.type")),t.xp6(2),t.Q6J("checked","default"===i.timelineType),t.xp6(1),t.Q6J("ngIf",i.isTranslationSettingEnabled),t.xp6(4),t.Oqu(t.lcZ(31,24,"settings.other")),t.xp6(6),t.Q6J("routerLink",t.DdM(28,oe)),t.xp6(3),t.Oqu(t.lcZ(40,26,"settings.external")),t.xp6(2),t.Q6J("ngIf",!(null!=i.user&&i.user.anonymous)))},dependencies:[o.YG,o.nz,o.W2,o.Gu,o.Ie,o.Q$,o.q_,o.yh,o.uN,o.Nh,o.oz,o.ho,o.w,o.YI,d.mk,d.sg,d.O5,q.rH,C.S,k.M,p.C],styles:['@charset "UTF-8";ion-list[_ngcontent-%COMP%]{margin:0 0 1px}ion-list-header[_ngcontent-%COMP%]{--color: var(--tf-color-51);font-weight:600;min-height:auto;padding-top:10px}ion-item[_ngcontent-%COMP%]:last-child{--border-color: transparent}ion-item[_ngcontent-%COMP%]   ion-label[_ngcontent-%COMP%]{font-size:1.4rem}.settings-highlight[_ngcontent-%COMP%]   ion-label[_ngcontent-%COMP%]{white-space:normal}.settings-highlight[_ngcontent-%COMP%]   ion-label[_ngcontent-%COMP%]   small[_ngcontent-%COMP%]{display:block;color:var(--tf-color-51)}.lang[_ngcontent-%COMP%]{margin:0}.lang-label[_ngcontent-%COMP%]{display:flex}.lang-label[_ngcontent-%COMP%]   ion-checkbox[_ngcontent-%COMP%]{display:inline-block;margin:0 0 0 auto!important}.note[_ngcontent-%COMP%]{font-size:1.2rem;padding:0 12px;margin:8px 0;text-align:right}.alert-box[_ngcontent-%COMP%]{color:var(--tf-color-18)}.request-reload[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end}.request-reload[_ngcontent-%COMP%]   tf-icon[_ngcontent-%COMP%]{font-size:2.4rem;color:var(--tf-color-21);margin:0 8px 0 0}.request-reload[_ngcontent-%COMP%]   ion-button[_ngcontent-%COMP%]{margin:0 0 0 8px}ion-note[_ngcontent-%COMP%]{--color: $tf-color-1}'],changeDetection:0}),n})();const re=function(){return["/settings","notification","digest","push"]},ce=function(){return["/settings","notification","notice","push"]},le=function(){return["/settings","notification","digest","email"]},ge=function(){return["/settings","notification","notice","email"]};let ue=(()=>{class n{constructor(){}}return n.screenName="SettingsNotificationPage",n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["ng-component"]],decls:34,vars:29,consts:[["icon","fa-bell","defaultHref","/settings",3,"title"],[3,"routerLink"],["name","fa-layer-group","type","solid","slot","start"],["name","fa-bell","type","solid","slot","start"]],template:function(e,i){1&e&&(t.TgZ(0,"ion-header"),t._UZ(1,"tf-navbar",0),t.ALo(2,"tfI18n"),t.qZA(),t.TgZ(3,"ion-content")(4,"ion-list")(5,"ion-list-header")(6,"ion-label"),t._uU(7),t.ALo(8,"tfI18n"),t.qZA()(),t.TgZ(9,"ion-item",1),t._UZ(10,"tf-icon",2),t.TgZ(11,"ion-label"),t._uU(12),t.ALo(13,"tfI18n"),t.qZA()(),t.TgZ(14,"ion-item",1),t._UZ(15,"tf-icon",3),t.TgZ(16,"ion-label"),t._uU(17),t.ALo(18,"tfI18n"),t.qZA()()(),t.TgZ(19,"ion-list")(20,"ion-list-header")(21,"ion-label"),t._uU(22),t.ALo(23,"tfI18n"),t.qZA()(),t.TgZ(24,"ion-item",1),t._UZ(25,"tf-icon",2),t.TgZ(26,"ion-label"),t._uU(27),t.ALo(28,"tfI18n"),t.qZA()(),t.TgZ(29,"ion-item",1),t._UZ(30,"tf-icon",3),t.TgZ(31,"ion-label"),t._uU(32),t.ALo(33,"tfI18n"),t.qZA()()()()),2&e&&(t.xp6(1),t.s9C("title",t.lcZ(2,11,"settings.notification")),t.xp6(6),t.Oqu(t.lcZ(8,13,"settings.notification.push")),t.xp6(2),t.Q6J("routerLink",t.DdM(25,re)),t.xp6(3),t.Oqu(t.lcZ(13,15,"settings.notification.digest.push")),t.xp6(2),t.Q6J("routerLink",t.DdM(26,ce)),t.xp6(3),t.Oqu(t.lcZ(18,17,"settings.notification.notice.push")),t.xp6(5),t.Oqu(t.lcZ(23,19,"settings.notification.mail")),t.xp6(2),t.Q6J("routerLink",t.DdM(27,le)),t.xp6(3),t.Oqu(t.lcZ(28,21,"settings.notification.digest.email")),t.xp6(2),t.Q6J("routerLink",t.DdM(28,ge)),t.xp6(3),t.Oqu(t.lcZ(33,23,"settings.notification.notice.email")))},dependencies:[o.W2,o.Gu,o.Ie,o.Q$,o.q_,o.yh,o.YI,q.rH,C.S,k.M,p.C],styles:['@charset "UTF-8";ion-item[_ngcontent-%COMP%]   ion-label[_ngcontent-%COMP%]{font-size:1.4rem}']}),n})();var _e=l(64509),W=l.n(_e),H=(l(97442),l(13446)),X=l(47689),he=l(24096),de=l(34918);const V=function(n){return{disabled:n}};function me(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"ion-item",3)(1,"ion-label",4)(2,"span"),t._uU(3),t.ALo(4,"tfI18n"),t.qZA(),t.TgZ(5,"p",5)(6,"small"),t._uU(7),t.ALo(8,"tfI18n"),t.qZA()()(),t.TgZ(9,"ion-checkbox",6),t.NdJ("ngModelChange",function(s){const c=t.CHM(e).$implicit,g=t.oxw().$implicit,_=t.oxw();return t.KtG(_.timings[g][c]=s)})("ionChange",function(){t.CHM(e);const s=t.oxw(2);return t.KtG(s.onChange())}),t.qZA()()}if(2&n){const e=r.$implicit,i=t.oxw().$implicit,s=t.oxw();t.Q6J("ngClass",t.VKq(9,V,s.disabled)),t.xp6(3),t.Oqu(t.lcZ(4,5,e)),t.xp6(4),t.hij("(",t.lcZ(8,7,e+".explain"),")"),t.xp6(2),t.Q6J("ngModel",s.timings[i][e])("ngClass",t.VKq(11,V,s.disabled))}}function fe(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"ion-item",1)(2,"ion-label"),t._uU(3),t.ALo(4,"tfI18n"),t.qZA()(),t.YNc(5,me,10,13,"ion-item",2),t.ALo(6,"keys"),t.BQk()),2&n){const e=r.$implicit,i=t.oxw();
1t.xp6(1),t.Q6J("ngClass",t.VKq(7,V,i.disabled)),t.xp6(2),t.Oqu(t.lcZ(4,3,e)),t.xp6(2),t.Q6J("ngForOf",t.lcZ(6,5,i.timings[e]))}}let tt=(()=>{class n{constructor(){this.disabled=!1,this.change=new t.vpe}onChange(){this.change.emit(this.timings)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["tf-notification-timings"]],inputs:{timings:"timings",disabled:"disabled"},outputs:{change:"change"},decls:7,vars:6,consts:[[4,"ngFor","ngForOf"],["no-lines","",1,"daykind",3,"ngClass"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"timing"],[1,"timing-desc"],[1,"right",3,"ngModel","ngClass","ngModelChange","ionChange"]],template:function(e,i){1&e&&(t.TgZ(0,"ion-list")(1,"ion-list-header")(2,"ion-label"),t._uU(3),t.ALo(4,"tfI18n"),t.qZA()(),t.YNc(5,fe,7,9,"ng-container",0),t.ALo(6,"keys"),t.qZA()),2&e&&(t.xp6(3),t.Oqu(t.lcZ(4,2,"settings.notification.timings")),t.xp6(2),t.Q6J("ngForOf",t.lcZ(6,4,i.timings)))},dependencies:[o.nz,o.Ie,o.Q$,o.q_,o.yh,o.w,d.mk,d.sg,u.JJ,u.On,p.C,de.V],styles:[".daykind[_ngcontent-%COMP%]{font-weight:700}.daykind[_ngcontent-%COMP%]:not(:nth-child(2)){padding-top:1.6rem}.timing-desc[_ngcontent-%COMP%]{display:inline-block;margin-left:1rem;height:1.6rem}"]}),n})();function pe(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"tf-notification-timings",4),t.NdJ("change",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.onChange())}),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("timings",e.timings)("disabled",!e.pushEnabled||e.systemDisabled)}}let Ze=(()=>{class n{constructor(e,i,s,a,c){this._userService=e,this._authService=i,this._changeDetector=s,this._logger=a,this._pushAlertCtrl=c,this.systemDisabled=!0,this.pushEnabled=!1,this._change=new t.vpe,this._debounceTimeMills=1e3,this._subscription=new he.w,this._requestPermissionOptions={forceConfirm:!0,context:"settings_notification_digest"}}ngOnInit(){var e=this;return(0,f.Z)(function*(){const i=yield e._authService.getCurrentUser();yield e._updateUser(i),e._userService.refresh().then(s=>{e._updateUser(s)}),e._initPushPermission(),e._change.debounceTime(e._debounceTimeMills).subscribe(e._updateSettings.bind(e))})()}ngOnDestroy(){this._subscription&&this._subscription.unsubscribe()}onChange(){this._change.emit({settings:{highlights:{push:this.pushEnabled,pushTimings:this.timings}}})}_initPushPermission(){var e=this;return(0,f.Z)(function*(){const i=e._pushAlertCtrl.permissionChange$.subscribe(s=>{e.systemDisabled=s.current!==H.H7.Allowed,e._changeDetector.markForCheck()});e._subscription.add(i)})()}_requestPushPermission(){var e=this;return(0,f.Z)(function*(){e._permissionRequest$||(e._permissionRequest$=e._pushAlertCtrl.requestPermission(e._requestPermissionOptions)),yield e._permissionRequest$;const i=yield e._pushAlertCtrl.getCurrentPermission();e.systemDisabled=i!==H.H7.Allowed,e._changeDetector.markForCheck(),e._permissionRequest$=void 0})()}_updateUser(e){var i=this;return(0,f.Z)(function*(){i._isSameSettings(e)?i._logger.debug("settings not updated."):(i.pushEnabled=e.settings.highlights.push,i.pushEnabled&&i._requestPushPermission(),i.timings=e.settings.highlights.pushTimings,i._changeDetector.markForCheck(),i._logger.debug("settings sync updated."))})()}_isSameSettings(e){return this.pushEnabled===e.settings.highlights.push&&this._isSameTimings(e)}_isSameTimings(e){return W()(this.timings,e.settings.highlights.pushTimings)}_updateSettings(e){this._logger.debug({data:e},"_updateSettings"),this.pushEnabled&&this._requestPushPermission(),this._userService.update(e)}}return n.screenName="SettingsNotificationDigestPushPage",n.\u0275fac=function(e){return new(e||n)(t.Y36(Z.K),t.Y36(O.e8),t.Y36(t.sBO),t.Y36(v.Yd),t.Y36(X.i))},n.\u0275cmp=t.Xpm({type:n,selectors:[["ng-component"]],decls:17,vars:11,consts:[["defaultHref","/settings",3,"title"],["name","fa-bell","type","solid","slot","start"],[3,"ngModel","ngModelChange","ionChange"],[3,"timings","disabled","change",4,"ngIf"],[3,"timings","disabled","change"]],template:function(e,i){1&e&&(t.TgZ(0,"ion-header"),t._UZ(1,"tf-navbar",0),t.ALo(2,"tfI18n"),t.qZA(),t.TgZ(3,"ion-content")(4,"ion-list")(5,"ion-list-header")(6,"ion-label"),t._uU(7),t.ALo(8,"tfI18n"),t.qZA()(),t.TgZ(9,"ion-item"),t._UZ(10,"tf-icon",1),t.TgZ(11,"ion-label")(12,"span"),t._uU(13),t.ALo(14,"tfI18n"),t.qZA()(),t.TgZ(15,"ion-toggle",2),t.NdJ("ngModelChange",function(a){return i.pushEnabled=a})("ionChange",function(){return i.onChange()}),t.qZA()()(),t.YNc(16,pe,1,2,"tf-notification-timings",3),t.qZA()),2&e&&(t.xp6(1),t.s9C("title",t.lcZ(2,5,"settings.notification.digest.push.title")),t.xp6(6),t.Oqu(t.lcZ(8,7,"settings.notification.digest.push.title")),t.xp6(6),t.Oqu(t.lcZ(14,9,"settings.notification.digest.push.enable")),t.xp6(2),t.Q6J("ngModel",i.pushEnabled),t.xp6(1),t.Q6J("ngIf",i.timings))},dependencies:[o.W2,o.Gu,o.Ie,o.Q$,o.q_,o.yh,o.ho,o.w,d.O5,u.JJ,u.On,C.S,k.M,tt,p.C],styles:['@charset "UTF-8";ion-item[_ngcontent-%COMP%]   ion-label[_ngcontent-%COMP%]{font-size:1.4rem}'],changeDetection:0}),n})();function be(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"ion-item")(1,"ion-label",2),t._uU(2),t.ALo(3,"tfI18n"),t.qZA(),t.TgZ(4,"ion-checkbox",3),t.NdJ("ngModelChange",function(s){const c=t.CHM(e).$implicit;return t.KtG(c.value=s)})("ionChange",function(){const a=t.CHM(e).$implicit,c=t.oxw();return t.KtG(c.onChange(a))}),t.qZA()()}if(2&n){const e=r.$implicit,i=t.oxw();
1t.xp6(2),t.Oqu(t.lcZ(3,3,"settings.notification.notice.kind."+e.kind)),t.xp6(2),t.Q6J("disabled",i.disabled)("ngModel",e.value)}}let Ce=(()=>{class n{constructor(e,i,s,a){if(this._userService=e,this._tfContext=i,this._logger=s,this._pushAlertCtrl=a,this.disabled=!0,this.kindSettings=[],this._change=new t.vpe,this._bufferTimeMills=1e3,this._subscription=new Q.Subscription,!this._tfContext.currentUser)throw new Error("currentUser is undefined on settings-notification-notice-push");this.kindSettings=Object.keys(P.NOTICE_KIND_SETTINGS).map(g=>({name:g,setting:P.NOTICE_KIND_SETTINGS[g]})).filter(g=>g.setting.push).map(g=>({kind:P.NoticeKind[g.name],value:!1})),this._change.do(g=>this._logger.debug({event:g},"event")).bufferTime(this._bufferTimeMills).filter(g=>g.length>0).do(g=>this._logger.debug({events:g},"buffered events.")).map(this._mergeEvents.bind(this)).filter(g=>!!g).subscribe(this._updateSettings.bind(this)),this._setUser(this._tfContext.currentUser);const c=this._pushAlertCtrl.permissionChange$.merge(this._pushAlertCtrl.getCurrentPermission().then(g=>({current:g}))).subscribe(({current:g})=>this.disabled=g!==H.H7.Allowed);this._subscription.add(c)}ngOnDestroy(){this._subscription.closed||this._subscription.unsubscribe()}ionViewDidEnter(){this._userService.refresh().then(this._setUser.bind(this)).then(()=>this._showPushConfirmDialog())}onChange(e){this._change.emit(e)}_setUser(e){this.user=e;const i=e.settings.notices&&e.settings.notices.push&&e.settings.notices.push.kinds||{};this.kindSettings.forEach(s=>{const{kind:a}=s;s.value=typeof i[a]>"u"||i[a]})}_mergeEvents(e){const i={};for(let s of e)typeof i[s.kind]<"u"?delete i[s.kind]:i[s.kind]=s.value;return 0===Object.keys(i).length?null:{kinds:i}}_updateSettings(e){return this._logger.debug({noticeSettings:e},"_updateSettings"),this._userService.update({settings:{notices:{push:e}}})}_showPushConfirmDialog(){this._logger.debug("SettingsNotificationNoticePushPage._showPushConfirmDialog"),this._pushAlertCtrl.requestPermission({context:"settings_notification_notice"})}}return n.screenName="SettingsNotificationNoticePushPage",n.\u0275fac=function(e){return new(e||n)(t.Y36(Z.K),t.Y36(x.qe),t.Y36(v.Yd),t.Y36(X.i))},n.\u0275cmp=t.Xpm({type:n,selectors:[["ng-component"]],decls:6,vars:4,consts:[[3,"title"],[4,"ngFor","ngForOf"],[1,"text-small","ion-text-wrap"],[1,"right",3,"disabled","ngModel","ngModelChange","ionChange"]],template:function(e,i){1&e&&(t.TgZ(0,"ion-header"),t._UZ(1,"tf-navbar",0),t.ALo(2,"tfI18n"),t.qZA(),t.TgZ(3,"ion-content")(4,"ion-list"),t.YNc(5,be,5,5,"ion-item",1),t.qZA()()),2&e&&(t.xp6(1),t.s9C("title",t.lcZ(2,2,"settings.notification.notice.push.title")),t.xp6(4),t.Q6J("ngForOf",i.kindSettings))},dependencies:[o.nz,o.W2,o.Gu,o.Ie,o.Q$,o.q_,o.w,d.sg,u.JJ,u.On,C.S,p.C]}),n})(),et=(()=>{class n{constructor(e,i,s,a,c){this._userService=e,this._i18nService=i,this._dialogService=s,this._toastService=a,this._tracker=c}show(e){const{email:i}=e,s=this._i18nService.getMessage.bind(this._i18nService),a=`\n<p>\n  ${s("signup.email.confirm",i)}\n</p>\n<ul class="mail-caution">\n  <li>${s("mail.caution.spamFilter")}</li>\n  <li>${s("mail.caution.domainFilter")}</li>\n</ul>\n`,{trackingCategory:c="auth"}=e;this._tracker.trackView("EmailConfirmDialog"),this._tracker.trackEvent(c,"emailPrompt","open",1);const g={cssClass:"email-confirm-dialog",okButtonLabel:s("settings.mails.confirm.okButtonLabel")};return this._dialogService.confirm(a,g).then(_=>{if(!0===_)return this._tracker.trackEvent(c,"emailPrompt","send",1),this._sendConfirmationMail(i);this._tracker.trackEvent(c,"emailPrompt","close",1)})}_sendConfirmationMail(e){return this._userService.sendConfirmationMail(e).then(()=>new Promise(i=>setTimeout(i,500))).then(()=>{this._toastService.success(this._i18nService.getMessage("signup.email.confirm.success"))})}}return n.\u0275fac=function(e){return new(e||n)(t.LFG(Z.K),t.LFG(b.D),t.LFG(I.Y),t.LFG(y.y),t.LFG(G.e))},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var xe=l(71606),N=(l(24348),l(35978),l(94605),l(13214),l(91384));let it=(()=>{class n{constructor(e,i,s,a,c,g,_){if(this._userService=e,this._tfContext=i,this._emailConfirmDialog=s,this._changeDetector=a,this._logger=c,this._i18n=g,this._loginPromptCtrl=_,this._change=new t.vpe,this._loaded=!1,this._debounceTimeMills=1e3,this._changeDelayMills=200,this._trackingCategory="notificationMail",!this._tfContext.currentUser)throw new Error("currentUser is undefined on settings-notification-digest-email");this._updateUser(this._tfContext.currentUser),this._change.debounceTime(this._debounceTimeMills).filter(h=>!!h&&!!h._loaded).map(h=>(delete h._loaded,h)).subscribe(this._updateSettings.bind(this))}ionViewDidEnter(){this._loaded=!1,this._userService.refresh().then(this._updateUser.bind(this)).then(this._showEmailConfirmDialog.bind(this)).then(()=>new Promise(e=>setTimeout(e,this._changeDelayMills))).then(()=>{this._loaded=!0,this._changeDetector.markForCheck()})}ionViewCanEnter(){if(this._tfContext.currentUser&&this._tfContext.currentUser.anonymous){const e={message:this._i18n.getMessage("login.prompt.message.notificationMail"),trackingCategory:this._trackingCategory};return this._loginPromptCtrl.show(e),!1}return!0}onChange(e){e.enabled&&this._loaded&&this._showEmailConfirmDialog(),this._change.emit({_loaded:this._loaded,settings:{highlights:{subscribed:this.enabled,timings:this.timings}}})}_updateUser(e){return this._user=e,this._isSameSettings(e)?(this._logger.debug("settings not updated."),Promise.resolve()):e.settings.highlights.subscribed||this._isSameTimings(e)?this._updateUserSync(e):this._updateUserAsync(e)}_updateUserSync(e){return this.enabled=e.settings.highlights.subscribed,this.timings=e.settings.highlights.timings,this._changeDetector.markForCheck(),this._logger.debug("settings sync updated."),Promise.resolve()}_updateUserAsync(e){return xe.Observable.of(e.settings.highlights).do(i=>{this.enabled=!0,this.timings=i.timings,this._changeDetector.markForCheck()}).delay(1).do(i=>{this.enabled=i.subscribed,this._changeDetector.markForCheck()}).do(i=>this._logger.debug({settingsHighlights:i},"settings async updated.")).toPromise()}_isSameSettings(e){return this.enabled===e.settings.highlights.subscribed&&this._isSameTimings(e)}_isSameTimings(e){return W()(this.timings,e.settings.highlights.timings)}_updateSettings(e){this._userService.update(e)}_showEmailConfirmDialog(){this.enabled&&!this._user.emailVerified&&(this._logger.debug("_showEmailConfirmDialog"),this._emailConfirmDialog.show({email:this._user.email,trackingCategory:this._trackingCategory}))}}return n.screenName="SettingsNotificationDigestEmailPage",n.\u0275fac=function(e){return new(e||n)(t.Y36(Z.K),t.Y36(x.qe),t.Y36(et),t.Y36(t.sBO),t.Y36(v.Yd),t.Y36(b.D),t.Y36(N.y))},n.\u0275cmp=t.Xpm({type:n,selectors:[["ng-component"]],decls:17,vars:12,consts:[[3,"title"],["name","fa-envelope","type","solid","slot","start"],[3,"ngModel","ngModelChange","ionChange"],[3,"timings","disabled","change"]],template:function(e,i){1&e&&(t.TgZ(0,"ion-header"),t._UZ(1,"tf-navbar",0),t.ALo(2,"tfI18n"),t.qZA(),t.TgZ(3,"ion-content")(4,"ion-list")(5,"ion-list-header")(6,"ion-label"),t._uU(7),t.ALo(8,"tfI18n"),t.qZA()(),t.TgZ(9,"ion-item"),t._UZ(10,"tf-icon",1),t.TgZ(11,"ion-label")(12,"span"),t._uU(13),t.ALo(14,"tfI18n"),t.qZA()(),t.TgZ(15,"ion-toggle",2),t.NdJ("ngModelChange",function(a){return i.enabled=a})("ionChange",function(a){return i.onChange({enabled:a.detail.checked})}),t.qZA()()(),t.TgZ(16,"tf-notification-timings",3),t.NdJ("change",function(a){return i.onChange({timings:a})}),t.qZA()()),2&e&&(t.xp6(1),t.s9C("title",t.lcZ(2,6,"settings.notification.digest.email.title")),t.xp6(6),t.Oqu(t.lcZ(8,8,"settings.notification.digest.email.title")),t.xp6(6),t.Oqu(t.lcZ(14,10,"settings.notification.digest.email.enable")),t.xp6(2),t.Q6J("ngModel",i.enabled),t.xp6(1),t.Q6J("timings",i.timings)("disabled",!i.enabled))},dependencies:[o.W2,o.Gu,o.Ie,o.Q$,o.q_,o.yh,o.ho,o.w,u.JJ,u.On,C.S,k.M,tt,p.C],styles:['@charset "UTF-8";ion-item[_ngcontent-%COMP%]   ion-label[_ngcontent-%COMP%]{font-size:1.4rem}'],changeDetection:0}),n})(),z=(()=>{class n{constructor(e,i,s){this._authService=e,this._i18n=i,this._loginPromptCtrl=s}canActivate(e,i){return this._isGuard()}_isGuard(){var e=this;return(0,f.Z)(function*(){const i=yield e._authService.getCurrentUser();if(i.anonymous){const s={message:e._i18n.getMessage("login.prompt.message.notificationMail"),trackingCategory:"notificationMail"};e._loginPromptCtrl.show(s)}return!i.anonymous})()}}
1return n.\u0275fac=function(e){return new(e||n)(t.LFG(O.e8),t.LFG(b.D),t.LFG(N.y))},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Te(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"ion-item")(1,"ion-label",2),t._uU(2),t.ALo(3,"tfI18n"),t.qZA(),t.TgZ(4,"ion-checkbox",3),t.NdJ("ngModelChange",function(s){const c=t.CHM(e).$implicit;return t.KtG(c.value=s)})("ionChange",function(){const a=t.CHM(e).$implicit,c=t.oxw();return t.KtG(c.onChange(a))}),t.qZA()()}if(2&n){const e=r.$implicit,i=t.oxw();t.xp6(2),t.Oqu(t.lcZ(3,3,"settings.notification.notice.kind."+e.kind)),t.xp6(2),t.Q6J("disabled",i.disabled)("ngModel",e.value)}}l(85561),l(40811),l(1975);let ve=(()=>{class n{constructor(e,i,s,a,c,g){if(this._userService=e,this._tfContext=i,this._emailConfirmDialog=s,this._logger=a,this._i18n=c,this._loginPromptCtrl=g,this.disabled=!0,this.kindSettings=[],this._change=new t.vpe,this._debounceTimeMills=1e3,this._trackingCategory="notificationMail",!this._tfContext.currentUser)throw new Error("currentUser is undefined on settings-notification-notice-email");this.kindSettings=Object.keys(P.NOTICE_KIND_SETTINGS).map(_=>({name:_,setting:P.NOTICE_KIND_SETTINGS[_]})).filter(_=>_.setting.mail).map(_=>{const h=P.NoticeKind[_.name];return{kind:h,value:h===P.NoticeKind.EXPERTS_NIGHT}}),this._change.do(_=>this._logger.debug({event:_},"event")).bufferTime(this._debounceTimeMills).filter(_=>_.length>0).do(_=>this._logger.debug({events:_},"buffered events.")).map(this._mergeEvents.bind(this)).filter(_=>!!_).subscribe(this._updateSettings.bind(this)),this._setUser(this._tfContext.currentUser)}ionViewDidEnter(){this._userService.refresh().then(this._setUser.bind(this)).then(()=>this._showEmailConfirmDialog())}ionViewCanEnter(){if(this._tfContext.currentUser&&this._tfContext.currentUser.anonymous){const e={message:this._i18n.getMessage("login.prompt.message.notificationMail"),trackingCategory:this._trackingCategory};return this._loginPromptCtrl.show(e),!1}return!0}onChange(e){this._change.emit(e)}_setUser(e){this._user=e;const i=e.settings.notices&&e.settings.notices.mails&&e.settings.notices.mails.kinds||{};this.kindSettings.forEach(s=>{const{kind:a}=s;s.value=typeof i[a]>"u"||i[a]})}_mergeEvents(e){const i={};for(let s of e)typeof i[s.kind]<"u"?delete i[s.kind]:i[s.kind]=s.value;return 0===Object.keys(i).length?null:{kinds:i}}_updateSettings(e){return this._logger.debug({noticeSettings:e},"_updateSettings"),this._userService.update({settings:{notices:{mails:e}}})}_showEmailConfirmDialog(){this._user.emailVerified?this.disabled=!1:(this._logger.debug("_showEmailConfirmDialog"),this._emailConfirmDialog.show({email:this._user.email,trackingCategory:this._trackingCategory}))}}return n.screenName="SettingsNotificationNoticeEmailPage",n.\u0275fac=function(e){return new(e||n)(t.Y36(Z.K),t.Y36(x.qe),t.Y36(et),t.Y36(v.Yd),t.Y36(b.D),t.Y36(N.y))},n.\u0275cmp=t.Xpm({type:n,selectors:[["ng-component"]],decls:6,vars:4,consts:[[3,"title"],[4,"ngFor","ngForOf"],[1,"text-small","ion-text-wrap"],[1,"right",3,"disabled","ngModel","ngModelChange","ionChange"]],template:function(e,i){1&e&&(t.TgZ(0,"ion-header"),t._UZ(1,"tf-navbar",0),t.ALo(2,"tfI18n"),t.qZA(),t.TgZ(3,"ion-content")(4,"ion-list"),t.YNc(5,Te,5,5,"ion-item",1),t.qZA()()),2&e&&(t.xp6(1),t.s9C("title",t.lcZ(2,2,"settings.notification.notice.email.title")),t.xp6(4),t.Q6J("ngForOf",i.kindSettings))},dependencies:[o.nz,o.W2,o.Gu,o.Ie,o.Q$,o.q_,o.w,d.sg,u.JJ,u.On,C.S,p.C]}),n})();var Pe=l(83524),nt=l(88334),ye=l(91887);function Se(n,r){if(1&n&&(t.TgZ(0,"small"),t._uU(1),t.ALo(2,"tfI18n"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,"settings.external.link.true",e.displayName)," ")}}function Ae(n,r){1&n&&(t.TgZ(0,"small"),t._uU(1),t.ALo(2,"tfI18n"),t.qZA()),2&n&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"settings.external.link.false")," "))}function ke(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"ion-item",2)(1,"ion-toggle",3),t.NdJ("ionChange",function(s){const c=t.CHM(e).$implicit,g=t.oxw();return t.KtG(g.toggleExService(c,s))}),t.qZA(),t.TgZ(2,"ion-label")(3,"span"),t._uU(4),t.ALo(5,"tfI18n"),t.qZA(),t.TgZ(6,"p",4),t.YNc(7,Se,3,4,"small",5),t.YNc(8,Ae,3,3,"small",5),t.qZA()()()}if(2&n){const e=r.$implicit,i=t.oxw();t.Q6J("disabled","pocket"===e.name&&!e.connected),t.xp6(1),t.Q6J("checked",e.connected)("disabled",i.isFormDisabled),t.xp6(3),t.Oqu(t.lcZ(5,6,"settings.external."+e.n
1ame)),t.xp6(3),t.Q6J("ngIf",e.connected&&e.displayName),t.xp6(1),t.Q6J("ngIf",!(e.connected&&e.displayName))}}function we(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"ion-item",2)(1,"ion-toggle",3),t.NdJ("ionChange",function(s){const c=t.CHM(e).$implicit,g=t.oxw();return t.KtG(g.togglePinService(c,s.target.checked))}),t.qZA(),t.TgZ(2,"ion-label")(3,"span"),t._uU(4),t.ALo(5,"tfI18n"),t.qZA(),t.TgZ(6,"p",4)(7,"small"),t._uU(8),t.ALo(9,"tfI18n"),t.qZA()()()()}if(2&n){const e=r.$implicit,i=t.oxw();t.Q6J("disabled","pocket"===e.name&&!e.pinConnected),t.xp6(1),t.Q6J("checked",e.pinConnected)("disabled",i.isFormDisabled),t.xp6(3),t.Oqu(t.lcZ(5,5,"settings.external."+e.name)),t.xp6(4),t.Oqu(t.lcZ(9,7,"pins.connect."+e.pinConnected.toString()))}}let Me=(()=>{class n{constructor(e,i,s,a,c,g,_,h,m,M,S){this._tfContext=e,this._i18n=i,this._userService=s,this._authService=a,this._toastService=c,this._changeDetector=g,this._logger=_,this._socialLogin=h,this._loginPromptCtrl=m,this._signInWithApple=M,this._tracker=S,this.isFormDisabled=!0,this._externalServices=[],this._pinServices=[],this._externalServiceMap=new Map,this._exServiceNames=["twitter","github_beta","google","facebook","hatena","pocket"],this._exServiceNamesIOS13=["twitter","github_beta","google","apple","facebook","hatena","pocket"],this._pinServiceNames=["hatena","pocket"],this.initExternalServices()}initExternalServices(){var e=this;return(0,f.Z)(function*(){yield e._tfContext.platformReady$;const i=(yield e._signInWithApple.isAvailable())?e._exServiceNamesIOS13:e._exServiceNames;e._externalServices=i.map(s=>e._socialLogin.getProvider(s)).map(s=>{const a=s.providerName,c={name:a,provider:s,connected:!1,pinConnected:!1};return-1!==e._pinServiceNames.indexOf(a)&&e._pinServices.push(c),e._externalServiceMap.set(a,c),c})})()}ionViewDidEnter(){this.init()}init(){const e=this._userService.getProviders(),i=this._userService.refresh();Promise.all([e,i]).then(s=>(this.isFormDisabled=!1,this._changeDetector.markForCheck(),new Promise(a=>{setTimeout(()=>a(s),0)}))).then(s=>{const[a,c]=s;this._updateProviders(a),this._updatePinConnect(c),this._changeDetector.markForCheck()})}toggleExService(e,i){const s=i.detail.checked;e.connected!==s&&(s?this.linkAccount(e):this.unlinkAccount(e))}linkAccount(e,i=!1){e.connected=!0;const a="auth",c=`login.${e.provider.name}`;return this._authService.loginSocial(e.provider.name,{accessToken:this._tfContext.accessToken&&this._tfContext.accessToken.id}).then(g=>{if(g)return this._tracker.trackEvent(a,c,"success",1),e.displayName=g.profile&&(g.profile.displayName||g.profile.username),this._changeDetector.markForCheck(),g}).catch(g=>{const _=(0,nt.Zc)(g)?"unregistered":"failure";if(this._tracker.trackEvent(a,c,_,1),e.connected=!1,this._changeDetector.markForCheck(),this._logger.warn({err:g},"linkAccount failed"),i)throw g;let h;g instanceof nt.hv&&(h=g.additionalData.toast&&g.additionalData.toast.messageKey);const m=this._i18n.getMessage(h||"error.settings.external");this._toastService.failure(m)})}unlinkAccount(e,i=!1){return e.connected=!1,this._userService.unlinkAccount(e.name).then(()=>{if(e.displayName="",this._changeDetector.markForCheck(),e.pinConnected)return this.disconnectPin(e)}).catch(s=>{if(e.connected=!0,this._changeDetector.markForCheck(),this._logger.warn({err:s},"unlinkAccount failed"),i)throw s;const c=this._i18n.getMessage(s.param&&s.param.msgKey||"error.settings.external");this._toastService.failure(c)})}togglePinService(e,i){e.pinConnected!==i&&(i?this.connectPin(e):this.disconnectPin(e))}connectPin(e,i=!1){let s;return this._logger.debug("connectPin "+e.name),s=e.connected?Promise.resolve():this.linkAccount(e,!0),e.pinConnected=!0,s.then(()=>(this._changeDetector.markForCheck(),this._userService.connectPin(e.name))).catch(a=>{if(e.pinConnected=!1,this._changeDetector.markForCheck(),this._logger.warn({err:a},"connectPin failed"),i)throw a;const g=this._i18n.getMessage(a.param&&a.param.msgKey||"error.settings.pinConnect");this._toastService.failure(g)})}disconnectPin(e,i=!1){return e.pinConnected=!1,this._logger.debug("disconnectPin "+e.name),this._userService.disconnectPin(e.name).then(()=>{this._changeDetector.markForCheck()}).catch(s=>{if(e.pinConnected=!0,this._changeDetector.markForCheck(),this._logger.warn({err:s},"connectPin failed"),i)throw s;const c=this._i18n.getMessage(s.param&&s.param.msgKey||"error.settings.pinConnect");this._toastService.failure(c)})}_updateProviders(e){!e||e.forEach(i=>
1{const a=this._externalServiceMap.get(i.provider);a&&(a.connected=!0,a.displayName=i.displayName)})}_updatePinConnect(e){const i=e.pinConnect||{};this._pinServices.forEach(s=>{const a=i[s.name];typeof a<"u"&&(s.pinConnected=a)})}}return n.screenName="ExternalsSettingsPage",n.\u0275fac=function(e){return new(e||n)(t.Y36(x.qe),t.Y36(b.D),t.Y36(Z.K),t.Y36(O.e8),t.Y36(y.y),t.Y36(t.sBO),t.Y36(v.Yd),t.Y36(Pe.JX),t.Y36(N.y),t.Y36(ye.x),t.Y36(G.e))},n.\u0275cmp=t.Xpm({type:n,selectors:[["ng-component"]],decls:16,vars:11,consts:[["defaultHref","/settings",3,"title"],[3,"disabled",4,"ngFor","ngForOf"],[3,"disabled"],["slot","end",3,"checked","disabled","ionChange"],[1,"desc"],[4,"ngIf"]],template:function(e,i){1&e&&(t.TgZ(0,"ion-header"),t._UZ(1,"tf-navbar",0),t.ALo(2,"tfI18n"),t.qZA(),t.TgZ(3,"ion-content")(4,"ion-list")(5,"ion-list-header")(6,"ion-label"),t._uU(7),t.ALo(8,"tfI18n"),t.qZA()(),t.YNc(9,ke,9,8,"ion-item",1),t.qZA(),t.TgZ(10,"ion-list")(11,"ion-list-header")(12,"ion-label"),t._uU(13),t.ALo(14,"tfI18n"),t.qZA()(),t.YNc(15,we,10,9,"ion-item",1),t.qZA()()),2&e&&(t.xp6(1),t.s9C("title",t.lcZ(2,5,"settings.external")),t.xp6(6),t.Oqu(t.lcZ(8,7,"settings.external.title")),t.xp6(2),t.Q6J("ngForOf",i._externalServices),t.xp6(4),t.Oqu(t.lcZ(14,9,"pins.connect")),t.xp6(2),t.Q6J("ngForOf",i._pinServices))},dependencies:[o.W2,o.Gu,o.Ie,o.Q$,o.q_,o.yh,o.ho,o.w,d.sg,d.O5,C.S,p.C],styles:['@charset "UTF-8";ion-label[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:1.4rem}'],changeDetection:0}),n})(),qe=(()=>{class n{constructor(e,i,s){this._authService=e,this._i18n=i,this._loginPromptCtrl=s}canActivate(e,i){return this._isGuard()}_isGuard(){var e=this;return(0,f.Z)(function*(){const i=yield e._authService.getCurrentUser();if(i.anonymous){const s={message:e._i18n.getMessage("login.prompt.message.externalSettings"),trackingCategory:"externalSettings"};e._loginPromptCtrl.show(s)}return!i.anonymous})()}}return n.\u0275fac=function(e){return new(e||n)(t.LFG(O.e8),t.LFG(b.D),t.LFG(N.y))},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var st=l(46370);const Oe=function(n,r){return{invisible:n,disabled:r}};function Ue(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"ion-item",5)(1,"ion-label",6),t.NdJ("click",function(s){const c=t.CHM(e).$implicit,g=t.oxw();return t.KtG(g.toggle(s,c.id))}),t.TgZ(2,"div",7),t._UZ(3,"tf-icon",8),t.TgZ(4,"span"),t._uU(5),t.qZA()(),t._uU(6),t.qZA(),t.TgZ(7,"ion-reorder",9),t._UZ(8,"tf-icon",10),t.qZA()()}if(2&n){const e=r.$implicit,i=t.oxw();t.Q6J("ngClass",t.WLB(5,Oe,!i.isTabVisible(e.id),!i.isKnownTabType(e))),t.xp6(3),t.Q6J("name",i.getIcon(e.id))("type",i.getIconType(e.id)),t.xp6(2),t.Oqu(i.getIconText(e.id)),t.xp6(1),t.hij(" ",e.label.text," ")}}function Ie(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"ion-footer")(1,"ion-toolbar")(2,"div",11)(3,"ion-button",12),t.NdJ("click",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.cancel(s))}),t._uU(4),t.ALo(5,"tfI18n"),t.qZA(),t.TgZ(6,"ion-button",13),t.NdJ("click",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.submit(s))}),t._uU(7),t.ALo(8,"tfI18n"),t.qZA()()()()}2&n&&(t.xp6(4),t.Oqu(t.lcZ(5,2,"cancel")),t.xp6(3),t.Oqu(t.lcZ(8,4,"saveChanges")))}let Ee=(()=>{class n{constructor(e,i,s,a,c,g,_,h){if(this._navCtrl=e,this._tfContext=i,this._tabService=s,this._toastService=a,this._i18nService=c,this._logger=g,this._tracker=_,this._changeDetector=h,this._isConfigChanged=!1,!this._tfContext.currentUser)throw new Error("currentUser is undefined on timeline-tab-management");this._user=this._tfContext.currentUser}get isConfigChanged(){return this._isConfigChanged}get explain(){return this.tabTop?this._i18nService.getMessage("tabs.management.explain",[this.tabTop.label.text,this.tabDigest.label.text]):""}ionViewDidEnter(){this.init()}init(){this._tabService.getTabs().subscribe(e=>{const i=new Array;for(const c of e)c.id===w.Pt?this.tabTop=c:c.id===w.KH?this.tabDigest=c:i.push(c);const s=[],a=this._user.tabs;a.others&&s.push(...a.others.map(c=>c.id)),this.tabVisibleSet=new Set(s),this.tabs=this.initSortTabs(i,s),this.defaultTabVisibleSet=new Set(this.tabVisibleSet),this.defaultTabs=this.tabs.concat(),this._changeDetector.markForCheck()},e=>{this._toastService.failure(this._i18nService.getMessage("error.common")),this._logger.logApiError({err:e},"tab management init failed")})}getIcon(e){return this.isTabVisible(e)?"fa-eye":"fa-eye-slash"}getIconType(e){return this.isTabVisible(e),"solid"}getIconText(e){return this.isTabVisible(e)?this._i18nService.getMessage("visible"):this._i18nService.getMessage("hidden")}isTabVisible(e){return this.tabVisibleSet.has(e)}isKnownTabType(e){return(0,T.isKnownTabType)(e)}initSortTabs(e,i){const s=[];
1return i.forEach(a=>{const c=e.findIndex(g=>g.id===a);-1!==c&&(s.push(e[c]),e.splice(c,1))}),e.length>0&&s.push(...e),s}moveInvisibleTabs(e){const i=[],s=[];return e.forEach(a=>{this.isTabVisible(a.id)?i.push(a):s.push(a)}),i.push(...s),i}visibleTab(e,i){i?this.tabVisibleSet.has(e)||this.tabVisibleSet.add(e):this.tabVisibleSet.has(e)&&this.tabVisibleSet.delete(e)}toggle(e,i){e.preventDefault(),e.stopPropagation();const s=!this.isTabVisible(i);this._tracker.trackEvent("tab.manage",s?"toggle.on":"toggle.off",i,1),this.visibleTab(i,s),this.configChanged(!0)}reorder(e){this.tabs=e.detail.complete(this.tabs),this.configChanged(!0)}submit(e){e.preventDefault(),this._tracker.trackEvent("tab.manage","finish","submit",1);const i={others:[]};this.tabs.forEach(s=>{!this.tabVisibleSet.has(s.id)||(s.id===w.Pt?i.top={id:s.id}:s.id===w.KH?i.digest={id:s.id}:i.others.push({id:s.id}))}),this._tabService.manageTabs(i).subscribe(()=>{this._setUserTabsLocal(i),this._toastService.success(this._i18nService.getMessage("changed",["&{settings}"])),this._tabService.clearCacheAll(),this.configChanged(!1),this._goBack()},s=>{this._toastService.failure(this._i18nService.getMessage("error.common")),this._logger.error({err:s},"tab management update failed")})}cancel(e){e.preventDefault(),this._tracker.trackEvent("tab.manage","finish","cancel",1),this.configChanged(!1),this._goBack()}configChanged(e){this._isConfigChanged=e,this._changeDetector.markForCheck()}_goBack(){this._navCtrl.pop()}_setUserTabsLocal(e){const i=this._user.tabs;e.others?(i.others&&e.others.forEach(s=>{const a=i.others.find(c=>c.id===s.id);a&&a.config&&(s.config=a.config)}),i.others=e.others):i.others=[]}}return n.screenName="TimelineTabManagementPage",n.\u0275fac=function(e){return new(e||n)(t.Y36(o.SH),t.Y36(x.qe),t.Y36(B.pr),t.Y36(y.y),t.Y36(b.D),t.Y36(v.Yd),t.Y36(st.e2),t.Y36(t.sBO))},n.\u0275cmp=t.Xpm({type:n,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&t.Gf(o.W2,5),2&e){let s;t.iGM(s=t.CRH())&&(i._content=s.first)}},decls:10,vars:7,consts:[[3,"title"],[1,"explain","ion-padding"],[3,"disabled","ionItemReorder"],[3,"ngClass",4,"ngFor","ngForOf"],[4,"ngIf"],[3,"ngClass"],[3,"click"],[1,"visible-icon"],[3,"name","type"],["slot","end"],["name","fa-bars"],[1,"footer-buttons"],["expand","full","color","dark","fill","clear",3,"click"],["expand","full",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"ion-header"),t._UZ(1,"tf-navbar",0),t.ALo(2,"tfI18n"),t.qZA(),t.TgZ(3,"ion-content")(4,"p",1),t._uU(5),t.qZA(),t.TgZ(6,"ion-list")(7,"ion-reorder-group",2),t.NdJ("ionItemReorder",function(a){return i.reorder(a)}),t.YNc(8,Ue,9,8,"ion-item",3),t.qZA()()(),t.YNc(9,Ie,9,6,"ion-footer",4)),2&e&&(t.xp6(1),t.s9C("title",t.lcZ(2,5,"tabs.management")),t.xp6(4),t.Oqu(i.explain),t.xp6(2),t.Q6J("disabled",!1),t.xp6(1),t.Q6J("ngForOf",i.tabs),t.xp6(1),t.Q6J("ngIf",i.isConfigChanged))},dependencies:[o.YG,o.W2,o.fr,o.Gu,o.Ie,o.Q$,o.q_,o.Nh,o.oz,o.sr,d.mk,d.sg,d.O5,C.S,k.M,p.C],styles:['@charset "UTF-8";.explain[_ngcontent-%COMP%]{margin:0}ion-list[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]{padding-left:10px}ion-list[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]   ion-label[_ngcontent-%COMP%]{display:flex;align-items:center;margin:8px 8px 8px 0}ion-list[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]   ion-label[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]{margin:0 4px 0 auto}ion-list[_ngcontent-%COMP%]   .item.invisible[_ngcontent-%COMP%]{opacity:.5}.visible-icon[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:35px;margin:0 8px 0 0;font-size:18px}.visible-icon[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:1rem}ion-footer[_ngcontent-%COMP%]   ion-toolbar[_ngcontent-%COMP%]{--padding-top: 0;--padding-bottom: 0;--padding-start: 0;--padding-end: 0}ion-footer[_ngcontent-%COMP%]   .footer-buttons[_ngcontent-%COMP%]{display:flex}ion-footer[_ngcontent-%COMP%]   .footer-buttons[_ngcontent-%COMP%]   ion-button[_ngcontent-%COMP%]{flex:1 1 auto;margin:0}ion-item[_ngcontent-%COMP%]   ion-label[_ngcontent-%COMP%]{font-size:1.4rem}'],changeDetection:0}),n})();var Ne=l(1567);function Le(n,r){if(1&n&&(t.TgZ(0,"ion-item")(1,"ion-label"),t._uU(2),t.ALo(3,"tfI18n"),t.qZA(),t._UZ(4,"ion-radio",9),t.qZA()),2&n){const e=r.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,2,e.titleKey)),t.xp6(2),t.Q6J("value",e.value)}}function De(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"ion-footer")(1,"ion-toolbar")(2,"div",10)(3,"ion-button",11),t.NdJ("click",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.cancel(s))}),t._uU(4),t.ALo(5,"tfI18n"),t.qZA(),t.TgZ(6,"ion-button",12),t.NdJ("click",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.submit(s))}),t._uU(7),t.ALo(8,"tfI18n"),t.qZA()()()()}2&n&&(t.xp6(4),t.Oqu(t.lcZ(5,2,"cancel")),t.xp6(3),t.Oqu(t.lcZ(8,4,"update")))}let Ye=(()=>{class n{constructor(e,i,s,a,c,g,_,h){this._tfContext=e,this._navCtrl=i,this._userService=s,this._toastService=a,this._i18nService=c,this._changeDetector=g,this._tracker=_,this._logger=h,this.viewT
1ypes=[{titleKey:"settings.entryView.viewType.default",value:T.EntryViewType.DEFAULT},{titleKey:"settings.entryView.viewType.simple",value:T.EntryViewType.SIMPLE},{titleKey:"settings.entryView.viewType.minimal",value:T.EntryViewType.MINIMAL}],this.selectedViewType=T.EntryViewType.DEFAULT,this._initialized=!1,this._isConfigChanged=!1;const m=this._tfContext.currentUser;m&&m.settings&&void 0!==m.settings.entryView&&(this.selectedViewType=m.settings.entryView),this.dummyEntry={id:"dummy",title:this._i18nService.getMessage("entry.preview.title"),description:this._i18nService.getMessage("entry.preview.description"),url:"dummy",lang:"ja",type:P.EntryType.Article,resourceType:P.ResourceType.Article,thumbnailUrl:"https://res.cloudinary.com/techfeed/image/upload/w_00,h_00,c_fill/default_01.jpg",publishedAt:new Date,domain:"techfeed.io",channels:[{id:"dummy-channel1",label:{en:"Topic 1",text:"Topic 1"}},{id:"dummy-channel2",label:{en:"Topic 2",text:"Topic 2"}}],numComments:0,numPins:0,rank:"D",recommendRate:{base:50,personalize:10}}}get previewEntryMode(){return"default"}get isConfigChanged(){return this._isConfigChanged}ionViewDidEnter(){this._initialized=!0}submit(e){e.preventDefault(),this._tracker.trackEvent("entryView","finish","submit",1),this._userService.update({settings:{entryView:this.selectedViewType}}).then(()=>{this._toastService.success(this._i18nService.getMessage("changed",["&{settings}"])),this.configChanged(!1),this._goBack()},i=>{this._toastService.failure(this._i18nService.getMessage("error.common")),this._logger.error({err:i},"entryView update failed")})}cancel(e){e.preventDefault(),this._tracker.trackEvent("entryView","finish","cancel",1),this.configChanged(!1),this._goBack()}configChanged(e=!0){!this._initialized||(this._isConfigChanged=e,this._changeDetector.markForCheck())}_goBack(){this._navCtrl.pop()}}return n.screenName="SettingsEntryViewPage",n.\u0275fac=function(e){return new(e||n)(t.Y36(x.qe),t.Y36(o.SH),t.Y36(Z.K),t.Y36(y.y),t.Y36(b.D),t.Y36(t.sBO),t.Y36(st.e2),t.Y36(v.Yd))},n.\u0275cmp=t.Xpm({type:n,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&t.Gf(o.W2,5),2&e){let s;t.iGM(s=t.CRH())&&(i._content=s.first)}},decls:18,vars:14,consts:[[3,"title"],[1,"dummy-entry-container"],[1,"title","ion-padding"],[1,"title-text"],[1,"dummy-entry","pointer-events-none",3,"entry","mode"],[1,"view-types",3,"ionChange"],[3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],[4,"ngIf"],["slot","end",3,"value"],[1,"footer-buttons"],["expand","full","color","dark","fill","clear",3,"click"],["expand","full",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"ion-header"),t._UZ(1,"tf-navbar",0),t.ALo(2,"tfI18n"),t.qZA(),t.TgZ(3,"ion-content")(4,"div",1)(5,"div",2)(6,"h3",3),t._uU(7),t.ALo(8,"tfI18n"),t.qZA()(),t._UZ(9,"tf-entry-listitem",4),t.qZA(),t.TgZ(10,"ion-list",5),t.NdJ("ionChange",function(){return i.configChanged()}),t.TgZ(11,"ion-radio-group",6),t.NdJ("ngModelChange",function(a){return i.selectedViewType=a}),t.TgZ(12,"ion-list-header")(13,"ion-label"),t._uU(14),t.ALo(15,"tfI18n"),t.qZA()(),t.YNc(16,Le,5,4,"ion-item",7),t.qZA()()(),t.YNc(17,De,9,6,"ion-footer",8)),2&e&&(t.xp6(1),t.s9C("title",t.lcZ(2,8,"settings.entryView")),t.xp6(6),t.Oqu(t.lcZ(8,10,"settings.entryView.preview")),t.xp6(2),t.Q6J("entry",i.dummyEntry)("mode",i.previewEntryMode),t.xp6(2),t.Q6J("ngModel",i.selectedViewType),t.xp6(3),t.Oqu(t.lcZ(15,12,"settings.entryView.viewType")),t.xp6(2),t.Q6J("ngForOf",i.viewTypes),t.xp6(1),t.Q6J("ngIf",i.isConfigChanged))},dependencies:[o.YG,o.W2,o.fr,o.Gu,o.Ie,o.Q$,o.q_,o.yh,o.B7,o.se,o.sr,o.U5,o.QI,d.sg,d.O5,u.JJ,u.On,Ne.Hl,C.S,p.C],styles:['@charset "UTF-8";.dummy-entry-container[_ngcontent-%COMP%]{min-height:182px}.dummy-entry-container[_ngcontent-%COMP%]   tf-entry-listitem[_ngcontent-%COMP%]{background-color:var(--tf-color-2);margin-top:16px}.title[_ngcontent-%COMP%]{display:flex;height:52px;background-color:var(--tf-color-2);color:var(--tf-color-15);border-radius:0;padding:17px 20px!important;align-items:center}.title[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%]{font-size:1.6rem;margin:0;font-weight:700;line-height:normal;text-align:left;flex:1 1 auto}.view-types[_ngcontent-%COMP%]{margin:16px 0 0}ion-item[_ngcontent-%COMP%]   ion-label[_ngcontent-%COMP%]{font-size:1.4rem}ion-footer[_ngcontent-%COMP%]   ion-toolbar[_ngcontent-%COMP%]{--padding-top: 0;--padding-bottom: 0;--padding-start: 0;--padding-end: 0}ion-footer[_ngcontent-%COMP%]   .footer-buttons[_ngcontent-%COMP%]{display:flex}ion-footer[_ngcontent-%COMP%]   .footer-buttons[_ngcontent-%COMP%]   ion-button[_ngcontent-%COMP%]{flex:1 1 auto;margin:0}@media (min-width: 768px){.dummy-entry-container[_ngcontent-%COMP%]{padding:0 10px;min-height:225px}.title[_ngcontent-%COMP%]{margin:10px 0}}'],changeDetection:0}),n})();var ot=l(55887),Je=l(77102),Fe=l(41298);function Qe(n,r){if(1&n&&(t.TgZ(0,"ion-item",5)(1,"ion-label"),t._uU(2),t.ALo(3,"tfI18n"),t.qZA(),t._UZ(4,"ion-radio",6),t.qZA()),2&n){const e=r.$implicit,i=t.oxw();t.Q6J("disabled",i.settings.os),t.xp6(2),t.Oqu(t.lcZ(3,3,e.labelKey)),t.xp6(2),t.Q6J("value",e.value)}}const Ke=function(){return["/analytics","rewards"]},ze=[{path:"",component:bt},{path:"account",component:ae},{path:"notification",component:ue},{path:"notification/digest/push",component:Ze},{path:"notification/notice/push",component:Ce},{path:"notification/digest/email",component:it,canActivate:[z]},{path:"notification/notice/email",component:ve,canActivate:[z]},{path:"mails",component:it,canActivate:[z]},{path:"externals",component:Me,canActivate:[qe]},{path:"tabmanage",component:Ee},{path:"entryViewType",component:Ye},{path:"theme",component:(()=>{class n{constructor(e,i){this._changeDetector=e,this._themeCtrl=i,this.themes=[{labelKey:"settings.theme.light",value:w.b3.Light},{labelKey:"settings.theme.dark",value:w.b3.Dark}],this._subscription=new ot.Subscription}
1ngOnInit(){const e=this._themeCtrl.settings$.subscribe(i=>{this.settings=i,this._changeDetector.markForCheck()});this._subscription.add(e)}ngOnDestroy(){this._subscription.closed||this._subscription.unsubscribe()}toggleOSSetting(e){let i;i=e&&"boolean"==typeof e.detail.checked?e.detail.checked:!this.settings.os,i!==this.settings.os&&this._themeCtrl.update({os:i})}changeTheme(e){const i=e.detail.value;this.settings.theme!==i&&this._themeCtrl.update({theme:i})}}return n.screenName="SettingsThemePage",n.\u0275fac=function(e){return new(e||n)(t.Y36(t.sBO),t.Y36(Je.u))},n.\u0275cmp=t.Xpm({type:n,selectors:[["ng-component"]],decls:15,vars:12,consts:[["icon","fa-tv","defaultHref","/settings",3,"title"],["button","true","detail","false","tf-event-stop","click",3,"click"],["slot","end","tf-event-stop","click",3,"checked","ionChange"],[3,"value","ionChange"],["detail","false",3,"disabled",4,"ngFor","ngForOf"],["detail","false",3,"disabled"],["slot","end",3,"value"]],template:function(e,i){1&e&&(t.TgZ(0,"ion-header"),t._UZ(1,"tf-navbar",0),t.ALo(2,"tfI18n"),t.qZA(),t.TgZ(3,"ion-content")(4,"ion-list")(5,"ion-list-header"),t._uU(6),t.ALo(7,"tfI18n"),t.qZA(),t.TgZ(8,"ion-item",1),t.NdJ("click",function(){return i.toggleOSSetting()}),t.TgZ(9,"ion-label"),t._uU(10),t.ALo(11,"tfI18n"),t.qZA(),t.TgZ(12,"ion-toggle",2),t.NdJ("ionChange",function(a){return i.toggleOSSetting(a)}),t.qZA()(),t.TgZ(13,"ion-radio-group",3),t.NdJ("ionChange",function(a){return i.changeTheme(a)}),t.YNc(14,Qe,5,5,"ion-item",4),t.qZA()()()),2&e&&(t.xp6(1),t.s9C("title",t.lcZ(2,6,"settings.theme")),t.xp6(5),t.Oqu(t.lcZ(7,8,"settings.theme.title")),t.xp6(4),t.Oqu(t.lcZ(11,10,"settings.theme.os")),t.xp6(2),t.Q6J("checked",i.settings.os),t.xp6(1),t.Q6J("value",i.settings.theme),t.xp6(1),t.Q6J("ngForOf",i.themes))},dependencies:[o.W2,o.Gu,o.Ie,o.Q$,o.q_,o.yh,o.B7,o.se,o.ho,o.w,o.U5,o.QI,d.sg,C.S,Fe.h,p.C],styles:['@charset "UTF-8";ion-toggle[_ngcontent-%COMP%]{transform:scale(.8);transform-origin:right center}'],changeDetection:0}),n})()},{path:"expert",component:(()=>{class n{constructor(e,i,s,a){this._changeDetector=e,this._authService=i,this._userService=s,this._toastCtrl=a,this.disableImportTweets=!1,this._subscription=new ot.Subscription}ngOnInit(){var e=this;return(0,f.Z)(function*(){e.user=yield e._authService.getCurrentUser(),e.disableImportTweets=!!e.user.disableImportTweets,e._changeDetector.markForCheck()})()}ngOnDestroy(){this._subscription.closed||this._subscription.unsubscribe()}toggleTweetImport(){var e=this;return(0,f.Z)(function*(){e.user&&e.user.isExpert?(e.disableImportTweets=!e.disableImportTweets,e._changeDetector.markForCheck(),yield e._userService.update({"expert.disableImportTweets":e.disableImportTweets},{deep:!0})):e._toastCtrl.failureWithKey("settings.expert")})()}}return n.screenName="SettingsExpertPage",n.\u0275fac=function(e){return new(e||n)(t.Y36(t.sBO),t.Y36(O.e8),t.Y36(Z.K),t.Y36(y.y))},n.\u0275cmp=t.Xpm({type:n,selectors:[["ng-component"]],decls:16,vars:12,consts:[["defaultHref","/settings",3,"title"],["button","true","detail","false",3,"click"],["name","fa-bell","type","solid","slot","start"],["slot","end",3,"checked"],["button","true",3,"routerLink"],["name","fa-chart-bar","type","solid","slot","start"]],template:function(e,i){1&e&&(t.TgZ(0,"ion-header"),t._UZ(1,"tf-navbar",0),t.ALo(2,"tfI18n"),t.qZA(),t.TgZ(3,"ion-content")(4,"ion-list")(5,"ion-item",1),t.NdJ("click",function(){return i.toggleTweetImport()}),t._UZ(6,"tf-icon",2),t.TgZ(7,"ion-label"),t._uU(8),t.ALo(9,"tfI18n"),t.qZA(),t._UZ(10,"ion-toggle",3),t.qZA(),t.TgZ(11,"ion-item",4),t._UZ(12,"tf-icon",5),t.TgZ(13,"ion-label"),t._uU(14),t.ALo(15,"tfI18n"),t.qZA()()()()),2&e&&(t.xp6(1),t.s9C("title",t.lcZ(2,5,"settings.expert")),t.xp6(7),t.Oqu(t.lcZ(9,7,"settings.import.tweet")),t.xp6(2),t.Q6J("checked",!i.disableImportTweets),t.xp6(1),t.Q6J("routerLink",t.DdM(11,Ke)),t.xp6(3),t.Oqu(t.lcZ(15,9,"analytics")))},dependencies:[o.W2,o.Gu,o.Ie,o.Q$,o.q_,o.ho,o.w,o.YI,q.rH,C.S,k.M,p.C],styles:['@charset "UTF-8";ion-toggle[_ngcontent-%COMP%]{transform:scale(.8);transform-origin:right center;pointer-events:none}'],changeDetection:0}),n})(),canActivate:[l(17908).f]}];let $e=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[q.Bz.forChild(ze),q.Bz]}),n})(),Re=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[A.L,F,J,$e]}),n})()},64509:(Y,L,l)=>{var A=l(85740);Y.exports=function t(J,F){return A(J,F)}},1975:(Y,L,l)=>{"use strict";l(97551)}}]);

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.