diff --git a/main.c62fb63e7fb1f49d.js b/main.c62fb63e7fb1f49d.js new file mode 100644 index 0000000..7c288a5 --- /dev/null +++ b/main.c62fb63e7fb1f49d.js @@ -0,0 +1 @@ +(self.webpackChunkSideQuestWebsite=self.webpackChunkSideQuestWebsite||[]).push([[179],{4615:(nt,me,h)=>{"use strict";h.d(me,{k:()=>st});var t=h(655),i=h(5e3),e=h(5439),m=h(5928),d=h(446),w=h(9808),b=h(8207);const S=["slidePane"],C=["slide"],T=["slideImage"];function I(Mt,It){if(1&Mt&&(i.ynx(0),i._UZ(1,"div",14),i.ALo(2,"safeHTML"),i.BQk()),2&Mt){const be=i.oxw();i.xp6(1),i.Q6J("innerHTML",i.lcZ(2,1,be.ad_to_show),i.oJD)}}function D(Mt,It){if(1&Mt&&(i.TgZ(0,"div",22)(1,"div",23),i._uU(2),i.qZA(),i.TgZ(3,"div",24),i._uU(4),i.qZA()()),2&Mt){const be=i.oxw().$implicit,pe=i.oxw();i.xp6(2),i.hij(" ",pe.doNotCount?be.title||"Sample Title":be.title," "),i.xp6(2),i.hij(" ",pe.doNotCount?be.description||"Sample Summary":be.description," ")}}function Q(Mt,It){1&Mt&&i._UZ(0,"div",25)}const R=function(Mt){return{left:Mt}};function ve(Mt,It){if(1&Mt){const be=i.EpF();i.TgZ(0,"div",15,16)(2,"div",17,18),i.NdJ("click",function(){const xe=i.CHM(be).$implicit;return i.oxw().onClickItem(xe.targetUrl)}),i._UZ(4,"div",19),i.YNc(5,D,5,2,"div",20),i.qZA(),i.YNc(6,Q,1,0,"div",21),i.qZA()}if(2&Mt){const be=It.$implicit,pe=It.index,Ke=i.oxw();i.Q6J("ngStyle",i.VKq(3,R,100*(pe+(Ke.ad_to_show?1:0))+"%")),i.xp6(5),i.Q6J("ngIf",!Ke.doNotCount&&(be.title||be.description)||Ke.doNotCount),i.xp6(1),i.Q6J("ngIf",null==be||null==be.imageUrl)}}const z=function(Mt){return{color:Mt}};function Ne(Mt,It){if(1&Mt){const be=i.EpF();i.TgZ(0,"span",26),i.NdJ("click",function(){const xe=i.CHM(be).index;return i.oxw().gotoSlide(xe)}),i._uU(1,"\u25cf"),i.qZA()}if(2&Mt){const be=It.index,pe=i.oxw();i.Q6J("ngStyle",i.VKq(1,z,pe.activeIndex===be?"white":"#444"))}}let st=(()=>{class Mt{constructor(be,pe,Ke,xe,wt){this._renderer=be,this._ngZone=pe,this._changes=Ke,this._expanseService=xe,this._adService=wt,this.hideAds=!1,this.itemSelected=new i.vpe,this.activeIndex=0,this._slideDelay=1e4,this._isStarted=!1,this.ad_to_show="",ifvisible.setIdleDuration(120)}ngAfterViewInit(){return(0,t.mG)(this,void 0,void 0,function*(){!this.doNotCount&&!this.hideAds&&(this.ad_to_show=yield this._adService.fetchAd(m.xD.BANNER)),this._startRotating()})}ngOnDestroy(){clearTimeout(this._slideTimeout)}trackBy(be,pe){return be}swipe(be){this.gotoSlideRelative(be)}onClickItem(be){return(0,t.mG)(this,void 0,void 0,function*(){this.items[this.activeIndex].feature_banners_id&&!this.doNotCount&&(yield this._expanseService.featureCount("click",this.items[this.activeIndex].feature_banners_id)),this.itemSelected.emit(be)})}gotoSlideRelative(be){this.activeIndex=this._relativeSlideIndex(be),this._changes.detectChanges(),this._play(be)}gotoSlide(be){this.activeIndex=be,this._play(1)}timeAgo(be){return e(be).fromNow()}formattedTimestamp(be){return e(be).format("dddd, MMMM Do YYYY, h:mm:ss a")}_startRotating(){this.activeIndex=0,this.slideImages.changes.subscribe(()=>{this.slideImages.length>0&&!this._isStarted&&(this._isStarted=!0,this._play(1))}),this.slideImages.notifyOnChanges()}_loadSlideImage(be){const pe=this.slideImages.toArray()[be].nativeElement;pe.style.backgroundImage||this._renderer.setStyle(pe,"backgroundImage",`url('${this.items[be].imageUrl}?size=2048')`)}_preloadRelative(be){const pe=this._relativeSlideIndex(be);this._loadSlideImage(pe)}_play(be){this._loadSlideImage(this.activeIndex),this.slidePane.nativeElement.style.left=`-${100*this.activeIndex}%`,this._preloadRelative(be),clearTimeout(this._slideTimeout),this._ngZone.runOutsideAngular(()=>{this.items[this.activeIndex].feature_banners_id&&!this.doNotCount&&document.body.scrollTop<600&&ifvisible.now()&&this._expanseService.featureCount("view",this.items[this.activeIndex].feature_banners_id),this._slideTimeout=setTimeout(()=>{this.gotoSlideRelative(1)},this.activeIndex<5?this._slideDelay+this._slideDelay/2*(5-this.activeIndex):this._slideDelay)})}_relativeSlideIndex(be){return(this.activeIndex+this.slides.length+be)%this.slides.length}}return Mt.\u0275fac=function(be){return new(be||Mt)(i.Y36(i.Qsj),i.Y36(i.R0b),i.Y36(i.sBO),i.Y36(m.sI),i.Y36(m.P))},Mt.\u0275cmp=i.Xpm({type:Mt,selectors:[["banner-carousel"]],viewQuery:function(be,pe){if(1&be&&(i.Gf(S,5),i.Gf(C,5),i.Gf(T,5)),2&be){let Ke;i.iGM(Ke=i.CRH())&&(pe.slidePane=Ke.first),i.iGM(Ke=i.CRH())&&(pe.slides=Ke),i.iGM(Ke=i.CRH())&&(pe.slideImages=Ke)}},inputs:{doNotCount:"doNotCount",items:"items",hideAds:"hideAds"},outputs:{itemSelected:"itemSelected"},decls:16,vars:4,consts:[[1,"slider-wrapper",3,"swipeleft","swiperight"],[1,"next-page","hide-on-med-and-up",3,"click"],["name","arrow_right"],[1,"prev-page","hide-on-med-and-up",3,"click"],["name","arrow_left"],[1,"slider-container"],[1,"pane"],["slidePane",""],[4,"ngIf"],["class","slide",3,"ngStyle",4,"ngFor","ngForOf","ngForTrackBy"],[1,"controls","hide-on-small-only"],[1,"pointer","slide-nav","half-margin-right",3,"click"],["class","slide-dot slide-nav",3,"ngStyle","click",4,"ngFor","ngForOf"],[1,"pointer","slide-nav","half-margin-left",3,"click"],[1,"slide",3,"innerHTML"],[1,"slide",3,"ngStyle"],["slide",""],[1,"slide-image",3,"click"],["slideImage",""],[1,"overlay"],["class","title-container",4,"ngIf"],["class","slide-spinner",4,"ngIf"],[1,"title-container"],[1,"title","truncate","condensed"],[1,"description"],[1,"slide-spinner"],[1,"slide-dot","slide-nav",3,"ngStyle","click"]],template:function(be,pe){1&be&&(i.TgZ(0,"div",0),i.NdJ("swipeleft",function(){return pe.swipe(1)})("swiperight",function(){return pe.swipe(-1)}),i.TgZ(1,"div",1),i.NdJ("click",function(){return pe.swipe(1)}),i._UZ(2,"sq-icon",2),i.qZA(),i.TgZ(3,"div",3),i.NdJ("click",function(){return pe.swipe(-1)}),i._UZ(4,"sq-icon",4),i.qZA(),i.TgZ(5,"div",5)(6,"div",6,7),i.YNc(8,I,3,3,"ng-container",8),i.YNc(9,ve,7,5,"div",9),i.qZA(),i.TgZ(10,"div",10)(11,"sq-icon",11),i.NdJ("click",function(){return pe.gotoSlideRelative(-1)}),i._uU(12,"arrow_left"),i.qZA(),i.YNc(13,Ne,2,3,"span",12),i.TgZ(14,"sq-icon",13),i.NdJ("click",function(){return pe.gotoSlideRelative(1)}),i._uU(15,"arrow_right"),i.qZA()()()()),2&be&&(i.xp6(8),i.Q6J("ngIf",!pe.doNotCount&&!!pe.ad_to_show),i.xp6(1),i.Q6J("ngForOf",pe.items)("ngForTrackBy",pe.trackBy),i.xp6(4),i.Q6J("ngForOf",pe.items))},directives:[d.oJ,w.O5,w.sg,w.PC],pipes:[b.u],styles:[".slider-wrapper[_ngcontent-%COMP%]{position:relative;width:100%;filter:drop-shadow(0px 4px 10px rgba(0,0,0,.55))}.slide-nav[_ngcontent-%COMP%]{font-size:1.3em}.next-page[_ngcontent-%COMP%], .prev-page[_ngcontent-%COMP%]{position:absolute;text-align:center;right:16px;top:calc(50% - 22px);z-index:3;cursor:pointer;width:44px;height:44px;background:#323A72;box-shadow:0 2px 10px #00000080;border-radius:10px;font-size:28px}.prev-page[_ngcontent-%COMP%]{left:16px;right:auto;right:initial}.slider-container[_ngcontent-%COMP%]{overflow:hidden}.slider-container[_ngcontent-%COMP%] .pane[_ngcontent-%COMP%]{height:512px;position:relative;transition:left .5s ease;will-change:left}@media screen and (max-width: 992px){.slider-container[_ngcontent-%COMP%] .pane[_ngcontent-%COMP%]{height:350px}}@media screen and (max-width: 600px){.slider-container[_ngcontent-%COMP%] .pane[_ngcontent-%COMP%]{height:250px}}.slide[_ngcontent-%COMP%]{position:absolute;width:100%}.slide[_ngcontent-%COMP%] .slide-image[_ngcontent-%COMP%]{width:100%;height:512px;background-size:cover;background-position:center center;position:relative;z-index:1}.slide[_ngcontent-%COMP%] .slide-image[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{background-image:linear-gradient(to right,rgba(22,24,48,.9) 0%,rgba(22,24,48,0) 100%);position:absolute;padding:1rem 2rem 1rem 1rem;margin-left:25em;max-width:calc(100% - 19rem)}.slide[_ngcontent-%COMP%] .slide-image[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%]{background-image:linear-gradient(to bottom,rgba(0,0,0,0) 75%,rgba(0,0,0,.75) 100%);position:absolute;width:100%;height:100%;cursor:pointer;z-index:4}.slide[_ngcontent-%COMP%] .slide-image[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:2rem;font-weight:700}.slide[_ngcontent-%COMP%] .slide-image[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{font-size:.8rem;color:#cfcfcf;white-space:pre-line}.slide[_ngcontent-%COMP%] .slide-image[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{bottom:2.8rem;z-index:5;max-width:40%}@media screen and (max-width: 2400px){.slide[_ngcontent-%COMP%] .slide-image[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{margin-left:15em;max-width:50%}}@media screen and (max-width: 1900px){.slide[_ngcontent-%COMP%] .slide-image[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{margin-left:8em;max-width:60%}}@media screen and (max-width: 1660px){.slide[_ngcontent-%COMP%] .slide-image[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{margin-left:2em;max-width:70%}}@media screen and (max-width: 992px){.slide[_ngcontent-%COMP%] .slide-image[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{margin-left:.6em;max-width:80%}.slide[_ngcontent-%COMP%] .slide-image[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:1;overflow:hidden;-webkit-box-orient:vertical}.slide[_ngcontent-%COMP%] .slide-image[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700}}@media screen and (max-width: 600px){.slide[_ngcontent-%COMP%] .slide-image[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{margin-left:0;bottom:0;width:100%;max-width:none;max-width:initial}.slide[_ngcontent-%COMP%] .slide-image[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{display:-webkit-box}}@media screen and (max-width: 992px){.slide[_ngcontent-%COMP%] .slide-image[_ngcontent-%COMP%], .slide[_ngcontent-%COMP%] .pane[_ngcontent-%COMP%]{height:350px}}@media screen and (max-width: 600px){.slide[_ngcontent-%COMP%] .slide-image[_ngcontent-%COMP%], .slide[_ngcontent-%COMP%] .pane[_ngcontent-%COMP%]{height:250px}}.slide[_ngcontent-%COMP%] .slide-spinner[_ngcontent-%COMP%]{width:60px;height:60px;transform:translateZ(0);-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite;border:5px solid #f3f3f3;border-top:5px solid #ed4e7a;border-radius:50%;position:absolute;left:calc(50% - 30px);top:calc(50% - 30px);margin:auto;z-index:0}.controls[_ngcontent-%COMP%]{text-align:center;bottom:.5rem;position:absolute;z-index:2;width:100%;white-space:nowrap}.controls[_ngcontent-%COMP%] .slide-dot[_ngcontent-%COMP%]{cursor:pointer;padding:0 .25rem;vertical-align:top}.controls[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;user-select:none}"]}),Mt})()},5789:(nt,me,h)=>{"use strict";h.d(me,{K:()=>ot});var t=h(9808),i=h(3075),e=h(325),c=h(7515),m=h(2583),d=h(1823),w=h(4331),b=h(38),S=h(4829),C=h(9912),T=h(8818),I=h(446),D=h(6660),Q=h(4858),R=h(3768),ve=h(7582),z=h(8004),Ne=h(3365),st=h(9077),Mt=h(6201),It=h(1662),be=h(655),pe=h(5e3),Ke=h(1115),xe=h(5928);const wt=function(_t){return{"background-image":_t}};function Tt(_t,jt){if(1&_t&&pe._UZ(0,"div",13),2&_t){const kt=pe.oxw();pe.Q6J("ngStyle",pe.VKq(1,wt,"url('"+kt.event.event_image+"')"))}}function De(_t,jt){if(1&_t&&(pe.TgZ(0,"sq-icon",14),pe._uU(1,"edit"),pe.qZA()),2&_t){const kt=pe.oxw();pe.MGl("routerLink","/account/my-app-posts/0/",kt.event.events_id,"")}}function W(_t,jt){1&_t&&(pe.TgZ(0,"sq-icon"),pe._uU(1,"lock"),pe.qZA())}function ee(_t,jt){1&_t&&(pe.TgZ(0,"sq-icon"),pe._uU(1,"push_pin"),pe.qZA())}function he(_t,jt){if(1&_t){const kt=pe.EpF();pe.TgZ(0,"sq-icon",15),pe.NdJ("click",function(vt){return pe.CHM(kt),pe.oxw().deletePost(),vt.stopPropagation()}),pe._uU(1," trash"),pe.qZA()}}function J(_t,jt){if(1&_t&&(pe.TgZ(0,"span",10),pe._uU(1),pe.ALo(2,"fromNow"),pe.ALo(3,"date"),pe.ALo(4,"date"),pe.qZA()),2&_t){const kt=pe.oxw();pe.xp6(1),pe.lnq(" ",pe.lcZ(2,3,1e3*kt.event.start_time)," - ",pe.xi3(3,5,1e3*kt.event.start_time,"EEEE")," at ",pe.xi3(4,8,1e3*kt.event.start_time,"shortTime")," ")}}function ce(_t,jt){if(1&_t&&(pe.TgZ(0,"span",10),pe._uU(1),pe.ALo(2,"fromNow"),pe.qZA()),2&_t){const kt=pe.oxw();pe.xp6(1),pe.hij(" ",pe.lcZ(2,1,1e3*kt.event.start_time)," ")}}function Be(_t,jt){if(1&_t&&(pe.TgZ(0,"span",10),pe._uU(1),pe.ALo(2,"number"),pe.qZA()),2&_t){const kt=pe.oxw();pe.xp6(1),pe.hij(" [ ",pe.xi3(2,1,kt.event.event_duration/60,"1.0-0"),"mins ] ")}}function ge(_t,jt){if(1&_t&&(pe.TgZ(0,"span",16),pe.ALo(1,"slugify"),pe._uU(2),pe.TgZ(3,"span",17),pe._uU(4,"[App]"),pe.qZA()()),2&_t){const kt=pe.oxw();pe.hYB("routerLink","/app/",kt.event.apps_id,"/",pe.lcZ(1,3,kt.event.app_name||"No Name..."),""),pe.xp6(2),pe.hij(" ",kt.event.app_name," ")}}function Se(_t,jt){if(1&_t&&(pe.TgZ(0,"span",16),pe.ALo(1,"slugify"),pe._uU(2),pe.TgZ(3,"span",17),pe._uU(4,"[Community]"),pe.qZA()()),2&_t){const kt=pe.oxw();pe.hYB("routerLink","/community/",kt.event.communities_id,"/",pe.lcZ(1,3,kt.event.community_name||"No Name..."),""),pe.xp6(2),pe.hij(" ",kt.event.community_name," ")}}const te=function(_t){return{"extra-margin-left":_t}},Qe=function(_t){return{"card-title-small":_t}};let ut=(()=>{class _t{constructor(kt,bt,vt){this.appService=kt,this.apiService=bt,this.expanseService=vt,this.eventSet=new pe.vpe,this.delete=new pe.vpe,this.CommunityUserLinkType=Ke.Nw}ngOnInit(){this.is_my_event=this.event&&this.appService.isAuthenticated&&Number(this.event.users_id)===Number(this.apiService.currentSession.users_id)}setEvent(kt,bt){this.eventSet.emit({event:kt,show_preview:bt})}deletePost(){return(0,be.mG)(this,void 0,void 0,function*(){this.delete.emit(this.event)})}}return _t.\u0275fac=function(kt){return new(kt||_t)(pe.Y36(xe.zi),pe.Y36(xe.lD),pe.Y36(xe.sI))},_t.\u0275cmp=pe.Xpm({type:_t,selectors:[["app-app-news-item"]],inputs:{apps_id:"apps_id",communities_id:"communities_id",community_membership:"community_membership",event:"event",is_mine:"is_mine"},outputs:{eventSet:"eventSet",delete:"delete"},decls:23,vars:23,consts:[[1,"col","s12","no-padding","inner","pointer","relative",3,"click"],["class","relative card-image-left",3,"ngStyle",4,"ngIf"],[1,"event-stats","grey-text","right"],[3,"routerLink",4,"ngIf"],[4,"ngIf"],["class","orange-text",3,"click",4,"ngIf"],[1,"card-height",3,"ngClass"],[1,"card-title","truncate","condensed",3,"ngClass"],[1,"truncate","user-margin","grey-text"],["class","small-date",4,"ngIf"],[1,"small-date"],["class","hover-underline",3,"routerLink",4,"ngIf"],[1,"description","line-clamp-2",3,"ngClass"],[1,"relative","card-image-left",3,"ngStyle"],[3,"routerLink"],[1,"orange-text",3,"click"],[1,"hover-underline",3,"routerLink"],[1,"grey-text"]],template:function(kt,bt){1&kt&&(pe.TgZ(0,"div",0),pe.NdJ("click",function(){return bt.setEvent(bt.event,!1)}),pe.YNc(1,Tt,1,3,"div",1),pe.TgZ(2,"span",2),pe.YNc(3,De,2,1,"sq-icon",3),pe.YNc(4,W,2,0,"sq-icon",4),pe.YNc(5,ee,2,0,"sq-icon",4),pe._uU(6),pe.TgZ(7,"sq-icon"),pe._uU(8,"reviews"),pe.qZA(),pe.YNc(9,he,2,0,"sq-icon",5),pe.qZA(),pe.TgZ(10,"div",6)(11,"span",7),pe._uU(12),pe.qZA(),pe.TgZ(13,"div",8),pe.YNc(14,J,5,11,"span",9),pe.YNc(15,ce,3,3,"span",9),pe.YNc(16,Be,3,4,"span",9),pe.TgZ(17,"span",10),pe._uU(18),pe.qZA()(),pe.YNc(19,ge,5,5,"span",11),pe.YNc(20,Se,5,5,"span",11),pe.TgZ(21,"div",12),pe._uU(22),pe.qZA()()()),2&kt&&(pe.xp6(1),pe.Q6J("ngIf",bt.event.event_image),pe.xp6(2),pe.Q6J("ngIf",bt.is_my_event),pe.xp6(1),pe.Q6J("ngIf",bt.event.is_locked),pe.xp6(1),pe.Q6J("ngIf",bt.event.is_locked),pe.xp6(1),pe.hij(" ",(bt.event.upvotes||0)-(bt.event.downvotes||0)," "),pe.xp6(3),pe.Q6J("ngIf",bt.community_membership===bt.CommunityUserLinkType.Moderator||bt.community_membership===bt.CommunityUserLinkType.Owner),pe.xp6(1),pe.Q6J("ngClass",pe.VKq(17,te,!bt.event.event_image)),pe.xp6(1),pe.Q6J("ngClass",pe.VKq(19,Qe,bt.event.event_image)),pe.xp6(1),pe.Oqu(bt.event.event_name||"No Name..."),pe.xp6(2),pe.Q6J("ngIf",bt.event.start_time&&!bt.event.is_news),pe.xp6(1),pe.Q6J("ngIf",bt.event.start_time&&bt.event.is_news),pe.xp6(1),pe.Q6J("ngIf",0!=bt.event.event_duration&&!bt.event.is_news),pe.xp6(2),pe.hij(" | ",bt.event.user_name,""),pe.xp6(1),pe.Q6J("ngIf",!bt.apps_id&&!bt.communities_id&&bt.event.apps_id),pe.xp6(1),pe.Q6J("ngIf",!bt.apps_id&&!bt.communities_id&&bt.event.communities_id),pe.xp6(1),pe.Q6J("ngClass",pe.VKq(21,Qe,bt.event.event_image)),pe.xp6(1),pe.hij(" ",bt.event.event_description_sanitised,""))},styles:[".event-stats[_ngcontent-%COMP%]{position:absolute;top:5px;right:8px;font-size:1.4rem}.event-stats[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1.6rem;vertical-align:middle}.card-height[_ngcontent-%COMP%]{height:160px;padding-top:2em;padding-bottom:2em;margin-left:2em;margin-right:2em}.extra-margin-left[_ngcontent-%COMP%]{margin-left:3rem}.card-image-left[_ngcontent-%COMP%]{height:160px;float:left;width:286px;background-size:cover;background-position:center center;margin-right:2em}@media screen and (max-width: 992px){.card-image-left[_ngcontent-%COMP%]{float:none;float:initial;width:100%;margin-right:0;margin-left:0}.event-stats[_ngcontent-%COMP%]{top:170px;right:8px}}.card-title[_ngcontent-%COMP%]{font-size:1.7rem;line-height:1.7rem;padding-right:4em}.user-margin[_ngcontent-%COMP%]{margin-top:.5em;margin-bottom:.5em}.small-date[_ngcontent-%COMP%]{font-size:.8rem}"]}),_t})();var Et=h(9287),Qt=h(893),rt=h(8622);let Gt=(()=>{class _t{constructor(kt){this.expanseService=kt,this.added=new pe.vpe,this.error=new pe.vpe}ngOnInit(){}addCard(){return(0,be.mG)(this,void 0,void 0,function*(){this.stripe.createToken(this.card).then(kt=>(0,be.mG)(this,void 0,void 0,function*(){kt.error?(document.getElementById("card-errors").textContent=kt.error.message,this.error.emit()):(yield this.expanseService.addPaymentSource(kt.token.id),this.added.emit(),this.card.clear())}))})}ngAfterViewInit(){this.stripe=Stripe((0,xe.w4)()?"pk_test_GKVBbu5VdMfg4lNCGKuC2DQJ004iy7arvi":"pk_live_fEvIIP1wE5CyEJWTuci1kMc600T2P6uTGC");let kt=this.stripe.elements();this.card=kt.create("card",{style:{base:{color:"#32325d",fontFamily:'"Helvetica Neue", Helvetica, sans-serif',fontSmoothing:"antialiased",fontSize:"16px","::placeholder":{color:"#aab7c4"}},invalid:{color:"#fa755a",iconColor:"#fa755a"}}}),this.card.mount("#card_element"),this.card.addEventListener("change",vt=>{this.displayError=vt.error?vt.error.message:""})}}return _t.\u0275fac=function(kt){return new(kt||_t)(pe.Y36(xe.sI))},_t.\u0275cmp=pe.Xpm({type:_t,selectors:[["app-payment-add-card"]],outputs:{added:"added",error:"error"},decls:6,vars:1,consts:[["id","card_element",1,"vertical-align"],["id","card-errors",1,"orange-text"]],template:function(kt,bt){1&kt&&(pe._UZ(0,"div",0)(1,"br")(2,"br"),pe.TgZ(3,"span",1),pe._uU(4),pe.qZA(),pe._UZ(5,"br")),2&kt&&(pe.xp6(4),pe.Oqu(bt.displayError))},styles:[".StripeElement[_ngcontent-%COMP%]{box-sizing:border-box;width:22em;height:40px;padding:10px 12px;border:1px solid transparent;border-radius:4px;background-color:#fff;display:inline-block;box-shadow:0 1px 3px #e6ebf1;transition:box-shadow .15s ease}.StripeElement--focus[_ngcontent-%COMP%]{box-shadow:0 1px 3px #cfd7df}.StripeElement--invalid[_ngcontent-%COMP%]{border-color:#fa755a}.StripeElement--webkit-autofill[_ngcontent-%COMP%]{background-color:#fefde5!important}"]}),_t})();const je=function(_t){return{"background-color":_t}};let et=(()=>{class _t{constructor(kt){this.expanseService=kt,this.remove=new pe.vpe}ngOnInit(){}deleteCard(){return(0,be.mG)(this,void 0,void 0,function*(){yield this.expanseService.removePaymentSource(this.item.id),this.remove.emit()})}}return _t.\u0275fac=function(kt){return new(kt||_t)(pe.Y36(xe.sI))},_t.\u0275cmp=pe.Xpm({type:_t,selectors:[["app-payment-card"]],inputs:{item:"item",color:"color"},outputs:{remove:"remove"},decls:12,vars:7,consts:[[1,"credit-card",3,"ngStyle"],[1,"credit-card-number"],[1,"credit-card-expiry"],[1,"credit-card-top-left"],[1,"credit-card-top-right"],[1,"credit-card-bottom-line"],[1,"credit-card-bottom-line-two"],[1,"delete-card","material-icons","pointer",3,"click"]],template:function(kt,bt){1&kt&&(pe.TgZ(0,"div",0)(1,"div",1),pe._uU(2),pe.qZA(),pe.TgZ(3,"div",2),pe._uU(4),pe.qZA(),pe.TgZ(5,"div",3),pe._uU(6),pe.qZA(),pe._UZ(7,"div",4)(8,"div",5)(9,"div",6),pe.TgZ(10,"i",7),pe.NdJ("click",function(){return bt.deleteCard()}),pe._uU(11,"delete"),pe.qZA()()),2&kt&&(pe.Q6J("ngStyle",pe.VKq(5,je,bt.color)),pe.xp6(2),pe.hij("**** **** **** ",bt.item.last4,""),pe.xp6(2),pe.AsE("",bt.item.exp_month,"/",bt.item.exp_year.toString().substr(2),""),pe.xp6(2),pe.Oqu(bt.item.brand))},directives:[t.PC],styles:[".credit-card[_ngcontent-%COMP%]{position:relative;background:#DE548C;border-radius:10px;height:200px;width:100%;margin-top:10px}.credit-card-top-left[_ngcontent-%COMP%]{background:rgba(255,255,255,.5);border-radius:5px;position:absolute;top:10px;left:10px;text-transform:uppercase;text-align:center;padding:5px 10px;font-style:italic}.credit-card-top-right[_ngcontent-%COMP%]{background:rgba(255,255,255,.5);border-radius:5px;position:absolute;top:10px;right:10px;width:35px;height:16px}.credit-card-bottom-line[_ngcontent-%COMP%]{background:rgba(255,255,255,.5);border-radius:5px;position:absolute;bottom:10px;left:10px;width:40%;height:16px}.credit-card-bottom-line-two[_ngcontent-%COMP%]{background:rgba(255,255,255,.5);border-radius:5px;position:absolute;bottom:35px;left:10px;width:70%;height:16px}.credit-card-expiry[_ngcontent-%COMP%]{position:absolute;bottom:10px;right:10px;font-size:1.5rem}.credit-card-number[_ngcontent-%COMP%]{position:absolute;top:50px;right:20px;font-size:2rem}.delete-card[_ngcontent-%COMP%]{position:absolute;left:10px;bottom:60px}"]}),_t})();var Lt=h(9182),pt=h(8931);function Ct(_t,jt){if(1&_t&&(pe.TgZ(0,"div"),pe._UZ(1,"iframe",2),pe.qZA()),2&_t){const kt=pe.oxw();pe.xp6(1),pe.Q6J("src",kt.video_url,pe.uOi)}}function gt(_t,jt){if(1&_t&&(pe.TgZ(0,"div"),pe._UZ(1,"iframe",3),pe.qZA()),2&_t){const kt=pe.oxw();pe.xp6(1),pe.Q6J("src",kt.video_url,pe.uOi)}}let Ue=(()=>{class _t{constructor(){}ngOnInit(){}}return _t.\u0275fac=function(kt){return new(kt||_t)},_t.\u0275cmp=pe.Xpm({type:_t,selectors:[["app-rating-post-video"]],inputs:{videoObject:"videoObject",video_url:"video_url"},decls:3,vars:2,consts:[[1,"app-video-container"],[4,"ngIf"],["width","100%","frameborder","0","allow","accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture","allowfullscreen","",1,"video-iframe",3,"src"],["width","100%","frameborder","0","allow","autoplay; fullscreen","allowfullscreen","",1,"video-iframe",3,"src"]],template:function(kt,bt){1&kt&&(pe.TgZ(0,"div",0),pe.YNc(1,Ct,2,1,"div",1),pe.YNc(2,gt,2,1,"div",1),pe.qZA()),2&kt&&(pe.xp6(1),pe.Q6J("ngIf","youtube"===bt.videoObject.provider),pe.xp6(1),pe.Q6J("ngIf","vimeo"===bt.videoObject.provider))},directives:[t.O5],styles:[".app-video-container[_ngcontent-%COMP%]{position:relative;width:100%;padding-top:56%}.video-iframe[_ngcontent-%COMP%]{position:absolute;height:100%;top:0}"]}),_t})();var ke=h(4133),N=h(9118),Ae=h(8207),ae=h(1512),j=h(4997);let Me=(()=>{class _t{transform(kt,...bt){const vt=Math.floor(kt/60/60),an=Math.floor(kt/60)-60*vt;return vt.toString().padStart(2,"0")+":"+an.toString().padStart(2,"0")}}return _t.\u0275fac=function(kt){return new(kt||_t)},_t.\u0275pipe=pe.Yjl({name:"showDuration",type:_t,pure:!0}),_t})();var Ge=h(8278);let At=(()=>{class _t{constructor(kt,bt,vt){this._el=kt,this._render=bt,this._apiSvc=vt}set cdnBackgroundImg(kt){this._render.setStyle(this._el.nativeElement,"background-image",`url(${this._apiSvc.cdnUrl+kt})`)}}return _t.\u0275fac=function(kt){return new(kt||_t)(pe.Y36(pe.SBq),pe.Y36(pe.Qsj),pe.Y36(xe.lD))},_t.\u0275dir=pe.lG2({type:_t,selectors:[["","cdnBackgroundImg",""]],inputs:{cdnBackgroundImg:"cdnBackgroundImg"}}),_t})();var Oe=h(7229);let ot=(()=>{class _t{}return _t.\u0275fac=function(kt){return new(kt||_t)},_t.\u0275mod=pe.oAB({type:_t}),_t.\u0275inj=pe.cJS({imports:[[t.ez,e.Bz,b.mZ,t.ez,i.u5,i.UX,S.m9,C.QM,w.rP,I._A,T.Lr,d.D,m.C,c.o]]}),_t})();pe.B6R(R.U,[t.O5,I.r0,e.yS,I.i9,t.mk,b.z1,I.oJ,ve.O,z.n],[ke.w,N.g,t.JJ]),pe.B6R(st.X,[Q.e,Mt.m,t.O5],[Ae.u]),pe.B6R(Mt.m,[t.O5,t.sg,t.mk,R.U],[Ae.u]),pe.B6R(It.m,[t.O5,i._Y,i.JL,i.F,i.Fj,i.JJ,i.On,t.mk,t.sg,t.PC,ut,I.r0,Q.e,D.b,I.zS,Et.Y,I.oJ],[]),pe.B6R(ut,[t.O5,t.PC,I.oJ,e.rH,t.mk],[ae.d,t.uU,t.JJ,j.N]),pe.B6R(Et.Y,[t.O5,I.r0,e.rH,t.PC,I.am,i.eT,i.Fj,i.JJ,i.On,i._,I.oJ],[j.N,Me]),pe.B6R(Qt.A,[t.O5,Q.e,t.sg,Ge.M,e.yS,I.r0],[j.N,t.JJ,ae.d]),pe.B6R(rt.U,[I.r0,t.mk,Gt,t.O5,Q.e,t.sg,et],[]),pe.B6R(pt.L,[t.O5,t.mk,Ue,t.PC,e.rH,I.oJ,e.yS,At,Lt.E,Ne.E,Oe.G,i.Fj,i.JJ,i.On,I.r0],[ae.d])},7344:(nt,me,h)=>{"use strict";h.d(me,{f:()=>b});var t=h(655),i=h(5928),e=h(9272),c=h(5e3),m=h(7318),d=h(9808);function w(S,C){if(1&S){const T=c.EpF();c.TgZ(0,"button",2),c.NdJ("click",function(){const Q=c.CHM(T).$implicit;return c.oxw().authorizeSSO(Q.name)}),c._UZ(1,"img",3),c.ALo(2,"lowercase"),c._UZ(3,"img",4),c.ALo(4,"lowercase"),c.TgZ(5,"span"),c._uU(6),c.qZA()()}if(2&S){const T=C.$implicit;c.Q6J("title",T.label),c.xp6(1),c.Q6J("src","assets/images/sso-icons/"+c.lcZ(2,6,T.name)+".svg",c.LSH)("alt",T.label),c.xp6(2),c.Q6J("src","assets/images/sso-icons/"+c.lcZ(4,8,T.name)+"_active.svg",c.LSH)("alt",T.label),c.xp6(3),c.Oqu(T.label)}}let b=(()=>{class S{constructor(T,I,D){this.apiService=T,this.service=I,this.telemetryIds=D,this.preferredTarget="login",this.ssoProviders=[],e.ZA.forEach(Q=>this.ssoProviders.push(Q))}authorizeSSO(T="DISCORD"){return(0,t.mG)(this,void 0,void 0,function*(){if(Object.keys(e.Nj).includes(T)){const I=new URLSearchParams(window.location.search);let D=Object.assign({tid:this.telemetryIds.tid,provider:T,return_url:this.return_url},this.stateParams);I.has("reauth")&&(D.reauth=I.get("reauth"));let Q=yield this.apiService.get(`v2/oauth/${e.Nj[T]}/authorization-url`,{redirect_uri:`${this.apiService.web_url}/${this.preferredTarget}`,state:btoa(JSON.stringify(D))});if(""!==Q)return void(window.location=Q)}this.service.showError(`An error occurred when trying to redirect to ${T.replace(/\w(\w+)/,(I,D)=>I.replace(D,D.toLowerCase()))}, please try again.`)})}}return S.\u0275fac=function(T){return new(T||S)(c.Y36(i.lD),c.Y36(i.zi),c.Y36(m.s))},S.\u0275cmp=c.Xpm({type:S,selectors:[["app-sso-select"]],inputs:{return_url:"return_url",preferredTarget:"preferredTarget",stateParams:"stateParams"},decls:2,vars:1,consts:[[1,"sso-options"],["class","block margin-bottom sso-button","fullWidth","true",3,"title","click",4,"ngFor","ngForOf"],["fullWidth","true",1,"block","margin-bottom","sso-button",3,"title","click"],[1,"standard",3,"src","alt"],[1,"active",3,"src","alt"]],template:function(T,I){1&T&&(c.TgZ(0,"div",0),c.YNc(1,w,7,10,"button",1),c.qZA()),2&T&&(c.xp6(1),c.Q6J("ngForOf",I.ssoProviders))},directives:[d.sg],pipes:[d.i8],styles:[".sso-options[_ngcontent-%COMP%]{display:flex;-moz-column-gap:1rem;column-gap:1rem;justify-content:center}.sso-button[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;padding:0 0 5px;max-width:80px;width:100%}.sso-button[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{display:block;margin-bottom:10px;max-width:100%;opacity:.8;width:100%}.sso-button[_ngcontent-%COMP%] > img.active[_ngcontent-%COMP%]{display:none;visibility:hidden}.sso-button[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{color:#fff;opacity:.5}.sso-button[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%], .sso-button[_ngcontent-%COMP%]:active span[_ngcontent-%COMP%], .sso-button[_ngcontent-%COMP%]:hover img.standard[_ngcontent-%COMP%]{opacity:1}.sso-button[_ngcontent-%COMP%]:active img.active[_ngcontent-%COMP%]{display:block;visibility:visible;opacity:1}.sso-button[_ngcontent-%COMP%]:active img.standard[_ngcontent-%COMP%]{display:none;visibility:hidden}"]}),S})()},9182:(nt,me,h)=>{"use strict";h.d(me,{E:()=>m});var t=h(5e3),i=h(446),e=h(9808);function c(d,w){1&d&&(t.TgZ(0,"div",2),t._uU(1,"Verified Reviewer"),t.qZA())}let m=(()=>{class d{constructor(){this.withText=!1}}return d.\u0275fac=function(b){return new(b||d)},d.\u0275cmp=t.Xpm({type:d,selectors:[["app-verified-reviewer"]],inputs:{withText:"withText"},decls:3,vars:3,consts:[["sqTooltip","",1,"verified-icon"],["class","verified-text",4,"ngIf"],[1,"verified-text"]],template:function(b,S){1&b&&(t.TgZ(0,"sq-icon",0),t._uU(1,"success"),t.qZA(),t.YNc(2,c,2,0,"div",1)),2&b&&(t.uIk("data-position","bottom")("data-tooltip","This user is a SideKick Verified Reviewer"),t.xp6(2),t.Q6J("ngIf",S.withText))},directives:[i.oJ,i.i9,e.O5],styles:["[_nghost-%COMP%]{display:inline-flex;align-items:center;vertical-align:middle}.verified-icon[_ngcontent-%COMP%]{font-size:20px;line-height:20px}.verified-text[_ngcontent-%COMP%]{color:#ffa800;font-size:.8rem;font-style:italic;margin-left:5px;margin-right:1rem}"]}),d})()},7515:(nt,me,h)=>{"use strict";h.d(me,{o:()=>e});var t=h(9808),i=h(5e3);let e=(()=>{class c{}return c.\u0275fac=function(d){return new(d||c)},c.\u0275mod=i.oAB({type:c}),c.\u0275inj=i.cJS({imports:[[t.ez]]}),c})()},568:(nt,me,h)=>{"use strict";h.d(me,{G:()=>m});var t=h(5113),i=h(2654),e=h(5e3);const c={small:[t.u3.Small,t.u3.XSmall],medium:[t.u3.Medium],large:[t.u3.Large,t.u3.XLarge]};let m=(()=>{class d{constructor(b,S,C,T){this._observer=b,this._vcRef=S,this._templateRef=C,this._cdr=T,this._subscription=new i.w,this.updateView=({matches:I})=>{I&&!this._vcRef.length?(this._vcRef.createEmbeddedView(this._templateRef),this._cdr.markForCheck()):!I&&this._vcRef.length&&(this._vcRef.clear(),this._cdr.markForCheck())}}set size(b){let S;S=Array.isArray(b)?b:[b],this._subscription.unsubscribe(),this._subscription=this._observer.observe(S.reduce((C,T)=>(C.push(...c[T]),C),[])).subscribe(this.updateView)}ngOnDestroy(){this._subscription.unsubscribe()}}return d.\u0275fac=function(b){return new(b||d)(e.Y36(t.Yg),e.Y36(e.s_b),e.Y36(e.Rgc),e.Y36(e.sBO))},d.\u0275dir=e.lG2({type:d,selectors:[["","ifViewportSize",""]],inputs:{size:["ifViewportSize","size"]}}),d})()},546:(nt,me,h)=>{"use strict";h.d(me,{G:()=>d});var t=h(8281),i=h(3565),e=h(5084),c=h(5e3),m=h(325);let d=(()=>{class w extends e.f{constructor(S,C,T,I,D){super(S,C,T,I),this._telemSvc=S,this._routerLink=C,this._routerLinkWithHref=T,this._router=I,this._giveawayTelemSvc=D,this.track=(Q,R)=>{this.sqaGiveawaysId?this._giveawayTelemSvc.trackPerGiveaway(Q,this.sqaGiveawaysId,R):this._giveawayTelemSvc.track(Q,R)}}}return w.\u0275fac=function(S){return new(S||w)(c.Y36(i.y),c.Y36(m.rH,10),c.Y36(m.yS,10),c.Y36(m.F0),c.Y36(t.x))},w.\u0275dir=c.lG2({type:w,selectors:[["","sqaGiveawayTelemetry",""]],inputs:{sqaGiveawaysId:"sqaGiveawaysId",event:["sqaGiveawayTelemetry","event"]},features:[c.qOj]}),w})()},5084:(nt,me,h)=>{"use strict";h.d(me,{f:()=>c});var t=h(3565),i=h(5e3),e=h(325);let c=(()=>{class m{constructor(w,b,S,C){this._telemSvc=w,this._routerLink=b,this._routerLinkWithHref=S,this._router=C,this.sqaTelemData={},this.track=(T,I)=>{this._telemSvc.telemetry(Object.assign({event:T},I))}}get _isRouterLink(){return null!=this._routerLink}get _isRouterLinkHref(){return null!=this._routerLinkWithHref}get eventName(){return(this.prefix?`${this.prefix}-${this.event}`:this.event).toLocaleLowerCase().replace(/\s/g,"-")}onClick(w){return this._isRouterLink?(this._handleRouterLink(),!0):this._isRouterLinkHref?(this._handleRouterLinkHref(),!0):void this.track(this.eventName,Object.assign({source_url:this._router.url},this.sqaTelemData))}_handleRouterLink(){!this._isRouterLink||this.track(this.eventName,Object.assign({source_url:this._router.url,dest_url:this._routerLink.urlTree.toString(),is_href:!1},this.sqaTelemData))}_handleRouterLinkHref(){!this._isRouterLinkHref||this.track(this.eventName,Object.assign({source_url:this._router.url,dest_url:this._routerLinkWithHref.urlTree.toString(),is_href:!0},this.sqaTelemData))}}return m.\u0275fac=function(w){return new(w||m)(i.Y36(t.y),i.Y36(e.rH,10),i.Y36(e.yS,10),i.Y36(e.F0))},m.\u0275dir=i.lG2({type:m,selectors:[["","sqaTelemetry",""]],hostBindings:function(w,b){1&w&&i.NdJ("click",function(C){return b.onClick(C)})},inputs:{prefix:"prefix",event:["sqaTelemetry","event"],sqaTelemData:"sqaTelemData"}}),m})()},8278:(nt,me,h)=>{"use strict";h.d(me,{M:()=>c});var t=h(2112),i=h(8929),e=h(5e3);let c=(()=>{class m{constructor(w){this._leaveSiteCatchSvc=w,this._onDestroy=new i.xQ,this.leaveBypass=!1,this.catchMessage=null}ngOnDestroy(){this._onDestroy.next(),this._onDestroy.complete()}onClick(w){if(!this.leaveBypass&&this.href&&this._leaveSiteCatchSvc.onIsCatching.value){if(!this._leaveSiteCatchSvc.shouldCatch(this.href))return;w.preventDefault(),this._leaveSiteCatchSvc.open({url:this.href,target:this.target,features:this.rel,message:this.catchMessage})}}}return m.\u0275fac=function(w){return new(w||m)(e.Y36(t.S))},m.\u0275dir=e.lG2({type:m,selectors:[["a","href","","target",""],["","hrefLink",""]],hostVars:3,hostBindings:function(w,b){1&w&&e.NdJ("click",function(C){return b.onClick(C)}),2&w&&e.Ikx("href",b.href,e.P3R)("target",b.target)("rel",b.rel)},inputs:{leaveBypass:"leaveBypass",catchMessage:"catchMessage",href:"href",target:"target",rel:"rel"}}),m})()},7229:(nt,me,h)=>{"use strict";h.d(me,{G:()=>c});var t=h(5928),i=h(8645),e=h(5e3);let c=(()=>{class m{constructor(w,b){this._el=w,this._appsSvc=b}set markdown(w){w?(this._appsSvc.enableDescriptionImages(),this._el.nativeElement.innerHTML=(0,i.TU)(w),this._appsSvc.disableDescriptionImages()):this._el.nativeElement.innerHTML=""}}return m.\u0275fac=function(w){return new(w||m)(e.Y36(e.SBq,3),e.Y36(t.zi))},m.\u0275dir=e.lG2({type:m,selectors:[["","markdown",""]],inputs:{markdown:"markdown"}}),m})()},8258:(nt,me,h)=>{"use strict";h.d(me,{E:()=>e});var t=h(5e3),i=h(325);let e=(()=>{class c{constructor(d){this._router=d}canActivate(d,w){if(!d.queryParams.state)return!0;const b=JSON.parse(atob(d.queryParams.state));if(!b.account_transfer)return!0;let S="";return b.return_url&&(S="/"),this._router.navigate([S]).then(()=>{this._router.navigate(["account/transfer/sign-up"],{queryParams:d.queryParams})}),!1}}return c.\u0275fac=function(d){return new(d||c)(t.LFG(i.F0))},c.\u0275prov=t.Yz7({token:c,factory:c.\u0275fac,providedIn:"root"}),c})()},971:(nt,me,h)=>{"use strict";h.d(me,{k:()=>d,u:()=>w});var t=h(5928),i=h(4200),e=h(2916),c=h(5e3),m=h(325),d=(()=>{return(b=d||(d={})).SQ_GOD="sq_god",b.SQ_ADMIN="sq_admin",b.GIVEAWAY_ADMIN="giveaway_admin",d;var b})();let w=(()=>{class b{constructor(C,T,I,D){this._router=C,this._service=T,this._apiService=I,this._authHelpSvc=D,this.DEFAULT_ACCESS=[d.SQ_GOD,d.SQ_ADMIN]}canLoad(C,T){return this._can(C.data.claims,T.join("/"))}canActivate(C,T){return this._can(C.routeConfig.data.claims,T.url)}_can(C,T){return new e.y(I=>{const D=[].concat(...C,...this.DEFAULT_ACCESS);this._service.isAuthenticated?this._apiService.hasTokenClaims(D)||this._router.navigateByUrl("/"):(this._service.logout(this._apiService),T&&this._authHelpSvc.registerRedirectUrl(T),this._router.navigateByUrl("/login")),I.next(this._service.isAuthenticated&&this._apiService.hasTokenClaims(D)),I.complete()})}}return b.\u0275fac=function(C){return new(C||b)(c.LFG(m.F0),c.LFG(t.zi),c.LFG(t.lD),c.LFG(i.K))},b.\u0275prov=c.Yz7({token:b,factory:b.\u0275fac}),b})()},2583:(nt,me,h)=>{"use strict";h.d(me,{C:()=>Q});var t=h(9808),i=h(5244),e=h(7036),c=h(2384),m=h(145),d=h(5928),w=h(5e3);let b=(()=>{class R{constructor(z){this._appService=z}canActivate(z,Ne){return!this._appService.preventPostNav}}return R.\u0275fac=function(z){return new(z||R)(w.LFG(d.zi))},R.\u0275prov=w.Yz7({token:R,factory:R.\u0275fac}),R})();var S=h(971),C=h(655),T=h(325);let I=(()=>{class R{constructor(z,Ne){this.router=z,this.location=Ne}canActivate(z,Ne){const st=z.queryParams,Mt=this.router.getCurrentNavigation(),It=Ne.url;return Mt.previousNavigation?this.handle(z,It,st):(this.router.navigate(["/"],{queryParams:st,preserveFragment:!0,replaceUrl:!0}).then(()=>this.handle(z,It,st)),!1)}handle(z,Ne,st){var Mt,It,be;return(0,C.mG)(this,void 0,void 0,function*(){const pe=z.parent.children.find(he=>he.routeConfig.path===z.routeConfig.path&&he.routeConfig.outlet!==z.routeConfig.outlet);if(!pe.routeConfig.outlet)return!0;const Ke={},xe=this.router.parseUrl(Ne),wt=null===(Mt=xe.root.children.primary)||void 0===Mt?void 0:Mt.segments.map(he=>he.path).join("/"),Tt=null===(It=xe.root.children[pe.routeConfig.outlet])||void 0===It?void 0:It.segments.map(he=>he.path).join("/");let De=z.pathFromRoot.map(he=>he.url.map(J=>J.path).join("/")).join("/");if(De=De.replace(/([^:]\/)\/+/g,"$1"),De=De.startsWith("/")?De.substring(1):De,De=De.endsWith("/")?De.substring(0,De.length-1):De,null!=xe.root.children[pe.routeConfig.outlet])return De===Tt||(this.router.navigate([{outlets:{[pe.routeConfig.outlet]:null}}],{preserveFragment:!0,skipLocationChange:!0,replaceUrl:!1}).then(()=>{this.router.navigate([wt])}),!1);Ke[pe.routeConfig.outlet]=wt||Tt;const ee=this.location.isCurrentPathEqualTo(Ne);return this.router.navigate([{outlets:Ke}],Object.assign(Object.assign({preserveFragment:!0,skipLocationChange:!0,replaceUrl:!1},null===(be=z.routeConfig.data)||void 0===be?void 0:be.extras),{queryParams:st})).finally(()=>{z.data.skipLocationFix||(ee?this.location.replaceState(Ne):this.location.go(Ne))}),!1})}}return R.\u0275fac=function(z){return new(z||R)(w.LFG(T.F0),w.LFG(t.Ye))},R.\u0275prov=w.Yz7({token:R,factory:R.\u0275fac}),R})();var D=h(8258);let Q=(()=>{class R{}return R.\u0275fac=function(z){return new(z||R)},R.\u0275mod=w.oAB({type:R}),R.\u0275inj=w.cJS({providers:[c.S,i.i,e.h,b,m.O,S.u,I,D.E],imports:[[t.ez]]}),R})()},5244:(nt,me,h)=>{"use strict";h.d(me,{i:()=>m});var t=h(5928),i=h(4200),e=h(5e3),c=h(325);let m=(()=>{class d{constructor(b,S,C,T){this._router=b,this._service=S,this._apiService=C,this._authHelpSvc=T}canActivate(b,S){return this._service.isAuthenticated||(this._service.logout(this._apiService),this._authHelpSvc.registerRedirectUrl(S.url),this._router.navigateByUrl("/login")),this._service.isAuthenticated}}return d.\u0275fac=function(b){return new(b||d)(e.LFG(c.F0),e.LFG(t.zi),e.LFG(t.lD),e.LFG(i.K))},d.\u0275prov=e.Yz7({token:d,factory:d.\u0275fac}),d})()},7036:(nt,me,h)=>{"use strict";h.d(me,{h:()=>e});var t=h(5928),i=h(5e3);let e=(()=>{class c{constructor(d){this._appService=d}canDeactivate(d,w,b,S){const C=this._appService.hasJustSaved;return this._appService.hasJustSaved=!1,!(!(0,t.w4)()&&!C)||confirm("Do you really want to leave this screen?")}}return c.\u0275fac=function(d){return new(d||c)(i.LFG(t.zi))},c.\u0275prov=i.Yz7({token:c,factory:c.\u0275fac}),c})()},2384:(nt,me,h)=>{"use strict";h.d(me,{S:()=>c});var t=h(5928),i=h(5e3),e=h(325);let c=(()=>{class m{constructor(w,b){this._router=w,this._service=b}canActivate(){return this._service.isAuthenticated&&this._router.navigateByUrl("/"),!this._service.isAuthenticated}}return m.\u0275fac=function(w){return new(w||m)(i.LFG(e.F0),i.LFG(t.zi))},m.\u0275prov=i.Yz7({token:m,factory:m.\u0275fac}),m})()},145:(nt,me,h)=>{"use strict";h.d(me,{O:()=>e});var t=h(9220),i=h(5e3);let e=(()=>{class c{constructor(d){this._appService=d}canActivate(d,w){return!this._appService.preventAppNav}}return c.\u0275fac=function(d){return new(d||c)(i.LFG(t.zi))},c.\u0275prov=i.Yz7({token:c,factory:c.\u0275fac}),c})()},7521:(nt,me,h)=>{"use strict";h.d(me,{a:()=>t});class t extends Error{constructor(e){super(e.message);for(let c in e)this[c]=e[c]}toJson(){return this.message}}},8242:(nt,me,h)=>{"use strict";h.d(me,{Hk:()=>C,W3:()=>m,Wz:()=>i,ch:()=>D,ht:()=>c,sZ:()=>e,u1:()=>T,u3:()=>d});var i=(()=>{return(z=i||(i={}))[z.GameKey=1]="GameKey",z[z.Thing=2]="Thing",z[z.Credits=3]="Credits",i;var z})();const e={[i.Credits]:{display:"Credits",primaryColor:"",backgroundColor:"#3d6c3d",icon:"toll",inputType:"number"},[i.GameKey]:{display:"Game Key",primaryColor:"orange",backgroundColor:"#705b34",icon:"videogame_asset",inputType:"text"},[i.Thing]:{display:"Thing",primaryColor:"blue",backgroundColor:"#5c5c8b",icon:"checkroom",inputType:"text"}};var c=(()=>{return(z=c||(c={}))[z.Created=1]="Created",z[z.Scheduled=2]="Scheduled",z[z.Published=3]="Published",z[z.Completed=4]="Completed",c;var z})();const m={start_time:"giveaways.start_time",end_time:"giveaways.end_time",name:"giveaways.name",status:"giveaways.status",browse_sort:"giveaways.browse_sort"},d=Object.assign({entered_at:"giveaways.entered_at"},Object.assign({},m));class C{constructor(){this.type=i.GameKey,this.name="",this.giveaways_id=null,this.description="",this.prize="",this.apps_id=null,this.usd_value=null,this.image=null}}class T{constructor(){this.image=null}}class D{constructor(){this.name="",this.description="",this.start_time=null,this.end_time=null,this.requirements=[],this.random_prize_count=0,this.image=null,this.entry_cost=0,this.publish_time=null}}},998:(nt,me,h)=>{"use strict";h.d(me,{Yd:()=>c,in:()=>i});var t=h(2340),i=(()=>{return(m=i||(i={}))[m.debug=0]="debug",m[m.log=1]="log",m[m.info=200]="info",m[m.warn=400]="warn",m[m.error=500]="error",i;var m})(),e=(()=>{return(m=e||(e={})).Global="Global",m.Giveaways="Giveaways",m.Admin="Admin",e;var m})();class c{constructor(d,w=e.Global){this.loggerName=d,this.logGroup=w,this.options={logLevel:i.log,productionLogLevel:i.warn},this.loggerNameStyle="color: #adf4ff",this.tagStyles={[i.debug]:"color: #fff383;",[i.warn]:"color: orange;",[i.log]:"color: #B9BBD2",[i.info]:"",[i.error]:"color: #E51253"},this.logStyles={[i.debug]:"color: grey;",[i.warn]:"",[i.log]:"",[i.info]:"",[i.error]:"font-weight: 700"}}setOptions(d){return this.options=d,this}setTagStyle(d){return this.tagStyles=d,this}setLogStyle(d){return this.logStyles=d,this}setLoggerNameStyle(d){return this.loggerNameStyle=d,this}setLogGroup(d){return this.logGroup=d,this}log(d,...w){this._log(i.log,d,...w)}info(d,...w){this._log(i.info,d,...w)}debug(d,...w){this._log(i.debug,d,...w)}warn(d,...w){this._log(i.warn,d,...w)}error(d,...w){this._log(i.error,d,...w)}_log(d,w,...b){if(t.N.production){if(d{"use strict";h.d(me,{$4:()=>e,h2:()=>b,hQ:()=>t,i7:()=>i,u6:()=>d});var t=(()=>{return(S=t||(t={}))[S.Text=0]="Text",S[S.Image=1]="Image",S[S.Video=2]="Video",S[S.Link=3]="Link",S[S.Poll=4]="Poll",t;var S})(),i=(()=>{return(S=i||(i={}))[S.Unset=-1]="Unset",S[S.Upvoted=1]="Upvoted",S[S.Downvoted=2]="Downvoted",i;var S})(),e=(()=>{return(S=e||(e={}))[S.Pending=1]="Pending",S[S.Approved=2]="Approved",S[S.Deleted=3]="Deleted",S[S.Locked=4]="Locked",S[S.Scheduled=5]="Scheduled",e;var S})(),d=(()=>{return(S=d||(d={})).is_pinned="post_metadata.is_pinned",S.upvotes="posts.upvotes",S.downvotes="posts.downvotes",S.votes_score="posts.votes_score",S.views="posts.views",S.created_at="posts.created_at",S.comments="posts.comments",S.nested_comments="posts.nested_comments",S.hot_votes_score="hot_posts_view.hot_votes_score",d;var S})();class w{constructor(C,T){this.__this=C,this.service=T;for(let I in C)Object.defineProperty(this,I,{get:()=>C[I],set:D=>{this.__this[I]=D},enumerable:!0,configurable:!0})}get(C){return this.__this[C]}updateState(C){if(C.posts_id&&C.posts_id!==this.posts_id)console.warn("Attempted to update state with a different posts_id",{incoming:C,state:this.__this});else for(let T in C)this.__this[T]=C[T],this[T]||Object.defineProperty(this,T,{get:()=>this.__this[T],set:I=>{this.__this[T]=I},enumerable:!0,configurable:!0})}isPartial(){return!function c(S){return null!=S.is_pinned}(this)}get childrenIDs(){return(this.replies||[]).map(C=>C.posts_id)}toJson(){return this.__this}toString(){return this.posts_id+""}get isTopLevel(){return null==this.parent_id}get isReply(){return!this.isTopLevel}}function b(S,C){return new w(S,C)}},9589:(nt,me,h)=>{"use strict";h.d(me,{I:()=>t});var t=(()=>{return(i=t||(t={})).MOST_HELPFUL="is_pinned,is_verified_review,votes_score,hot_votes_score,created_at",i.NEW="is_pinned,created_at",t;var i})()},3385:(nt,me,h)=>{"use strict";h.d(me,{R9:()=>t,c:()=>e,pz:()=>c});var t=(()=>{return(C=t||(t={}))[C.Private=100]="Private",C[C.Public=1e3]="Public",t;var C})(),e=(()=>{return(C=e||(e={}))[C.AssetBundle=1]="AssetBundle",C[C.ReadyPlayerMe=2]="ReadyPlayerMe",e;var C})(),c=(()=>{return(C=c||(c={}))[C.Scene=1]="Scene",C[C.CustomAvatar=2]="CustomAvatar",c;var C})()},1944:(nt,me,h)=>{"use strict";h.d(me,{A:()=>t});var t=(()=>{return(i=t||(t={}))[i.CommunityDiscordWebhook=1]="CommunityDiscordWebhook",i[i.NewAppDiscordWebhook=2]="NewAppDiscordWebhook",t;var i})()},9118:(nt,me,h)=>{"use strict";h.d(me,{g:()=>i});var t=h(5e3);let i=(()=>{class e{transform(m,d=1){return isNaN(m)?"N/A":this.abbreviatedNumber(m,d)}abbreviatedNumber(m,d){const b=Math.log10(m)/3|0;if(0==b)return String(m);const S=["","k","M","G","T","P","E"][b],C=Math.pow(10,3*b);return this._correctFixedPointNumber(m/C,d)+S}_preferredDecimalSeparator(){return Number(1.1).toLocaleString().indexOf(",")>-1?",":"."}_correctFixedPointNumber(m,d){return m.toFixed(d).split(".").filter(this._filterZerosAfterDecimal.bind(this)).join(this._preferredDecimalSeparator())}_filterZerosAfterDecimal(m,d){return!(1===d&&"0"===m)}}return e.\u0275fac=function(m){return new(m||e)},e.\u0275pipe=t.Yjl({name:"abbreviateNumber",type:e,pure:!0}),e})()},4133:(nt,me,h)=>{"use strict";h.d(me,{w:()=>i});var t=h(5e3);let i=(()=>{class e{transform(m){return isNaN(m)?"N/A":Number(m).toLocaleString()}}return e.\u0275fac=function(m){return new(m||e)},e.\u0275pipe=t.Yjl({name:"formatNumber",type:e,pure:!0}),e})()},1512:(nt,me,h)=>{"use strict";h.d(me,{d:()=>c});var t=h(5439),e=h(5e3);let c=(()=>{class m{transform(w,...b){const S=t(w).fromNow();return"in a few seconds"===S?"a few seconds ago":S}}return m.\u0275fac=function(w){return new(w||m)},m.\u0275pipe=e.Yjl({name:"fromNow",type:m,pure:!0}),m})()},4242:(nt,me,h)=>{"use strict";h.d(me,{X:()=>i});var t=h(5e3);let i=(()=>{class e{transform(m,...d){return m>9?"9+":m}}return e.\u0275fac=function(m){return new(m||e)},e.\u0275pipe=t.Yjl({name:"notOverNine",type:e,pure:!0}),e})()},8207:(nt,me,h)=>{"use strict";h.d(me,{u:()=>e});var t=h(5e3),i=h(2313);let e=(()=>{class c{constructor(d){this._sanitizer=d}transform(d){return this._sanitizer.bypassSecurityTrustHtml(d)}}return c.\u0275fac=function(d){return new(d||c)(t.Y36(i.H7,16))},c.\u0275pipe=t.Yjl({name:"safeHTML",type:c,pure:!0}),c})()},1823:(nt,me,h)=>{"use strict";h.d(me,{D:()=>c});var t=h(9808),i=h(4997),e=h(5e3);let c=(()=>{class m{}return m.\u0275fac=function(w){return new(w||m)},m.\u0275mod=e.oAB({type:m}),m.\u0275inj=e.cJS({providers:[i.N],imports:[[t.ez]]}),m})()},4997:(nt,me,h)=>{"use strict";h.d(me,{N:()=>e});var t=h(5928),i=h(5e3);let e=(()=>{class c{constructor(d){this._service=d}transform(d){return this._service.slugify(d)}}return c.\u0275fac=function(d){return new(d||c)(i.Y36(t.zi,16))},c.\u0275pipe=i.Yjl({name:"slugify",type:c,pure:!0}),c})()},6449:(nt,me,h)=>{"use strict";h.d(me,{y:()=>Be});var t=h(9808),i=h(8410),e=h(3075),c=h(7515),m=h(2583),d=h(1823),w=h(4331),b=h(4829),S=h(8818),C=h(446),T=h(8619),I=h(5e3);const D=function(ge){return{"background-image":ge}};let Q=(()=>{class ge{constructor(){}ngOnInit(){}}return ge.\u0275fac=function(te){return new(te||ge)},ge.\u0275cmp=I.Xpm({type:ge,selectors:[["app-spinning-coin"]],inputs:{icon:"icon"},decls:85,vars:3,consts:[[1,"coin"],[1,"coin__front",3,"ngStyle"],[1,"coin__edge"],[1,"coin__back"],[1,"coin__shadow"]],template:function(te,Qe){1&te&&(I.TgZ(0,"div",0),I._UZ(1,"div",1),I.TgZ(2,"div",2),I._UZ(3,"div")(4,"div")(5,"div")(6,"div")(7,"div")(8,"div")(9,"div")(10,"div")(11,"div")(12,"div")(13,"div")(14,"div")(15,"div")(16,"div")(17,"div")(18,"div")(19,"div")(20,"div")(21,"div")(22,"div")(23,"div")(24,"div")(25,"div")(26,"div")(27,"div")(28,"div")(29,"div")(30,"div")(31,"div")(32,"div")(33,"div")(34,"div")(35,"div")(36,"div")(37,"div")(38,"div")(39,"div")(40,"div")(41,"div")(42,"div")(43,"div")(44,"div")(45,"div")(46,"div")(47,"div")(48,"div")(49,"div")(50,"div")(51,"div")(52,"div")(53,"div")(54,"div")(55,"div")(56,"div")(57,"div")(58,"div")(59,"div")(60,"div")(61,"div")(62,"div")(63,"div")(64,"div")(65,"div")(66,"div")(67,"div")(68,"div")(69,"div")(70,"div")(71,"div")(72,"div")(73,"div")(74,"div")(75,"div")(76,"div")(77,"div")(78,"div")(79,"div")(80,"div")(81,"div")(82,"div"),I.qZA(),I._UZ(83,"div",3)(84,"div",4),I.qZA()),2&te&&(I.xp6(1),I.Q6J("ngStyle",I.VKq(1,D,"url("+(Qe.icon||"http://localhost:4201/assets/images/badges/badges8.png")+")")))},directives:[t.PC],styles:['.coin[_ngcontent-%COMP%]{position:relative;width:300px;height:300px;margin:50px auto;transform-style:preserve-3d;-webkit-animation:rotate3d 16s linear infinite;animation:rotate3d 16s linear infinite;transition:all .3s}.coin__front[_ngcontent-%COMP%], .coin__back[_ngcontent-%COMP%]{position:absolute;width:300px;height:300px;border-radius:50%;overflow:hidden;background-color:#979d9d}.coin__front[_ngcontent-%COMP%]:after, .coin__back[_ngcontent-%COMP%]:after{content:"";position:absolute;left:-150px;bottom:100%;display:block;height:200px;width:600px;background:#fff;opacity:.3;-webkit-animation:shine linear 8s infinite;animation:shine linear 8s infinite}.coin__front[_ngcontent-%COMP%]{background-image:url(http://localhost:4201/assets/images/badges/badges8.png);background-size:cover;transform:translateZ(5px)}.coin__back[_ngcontent-%COMP%]{background-image:url(http://localhost:4201/assets/images/badges/back.png);background-size:contain;transform:translateZ(-5px) rotateY(180deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(1){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(94.5deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(92.25deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(3){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(91.5deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(4){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(91.125deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(5){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.9deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(6){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.75deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(7){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.6428571429deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(8){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.5625deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(9){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.5deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(10){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.45deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(11){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.4090909091deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(12){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.375deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(13){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.3461538462deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(14){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.3214285714deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(15){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.3deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(16){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.28125deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(17){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.2647058824deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(18){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.25deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(19){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.2368421053deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(20){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.225deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(21){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.2142857143deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(22){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.2045454545deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(23){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1956521739deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(24){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1875deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(25){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.18deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(26){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1730769231deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(27){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1666666667deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(28){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1607142857deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(29){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1551724138deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(30){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.15deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(31){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1451612903deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(32){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.140625deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(33){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1363636364deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(34){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1323529412deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(35){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1285714286deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(36){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.125deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(37){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1216216216deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(38){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1184210526deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(39){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1153846154deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(40){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1125deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(41){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1097560976deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(42){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1071428571deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(43){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1046511628deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(44){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1022727273deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(45){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.1deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(46){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.097826087deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(47){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0957446809deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(48){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.09375deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(49){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0918367347deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(50){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.09deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(51){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0882352941deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(52){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0865384615deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(53){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0849056604deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(54){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0833333333deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(55){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0818181818deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(56){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0803571429deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(57){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0789473684deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(58){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0775862069deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(59){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0762711864deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(60){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.075deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(61){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0737704918deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(62){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0725806452deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(63){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0714285714deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(64){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0703125deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(65){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0692307692deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(66){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0681818182deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(67){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0671641791deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(68){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0661764706deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(69){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0652173913deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(70){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0642857143deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(71){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0633802817deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(72){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0625deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(73){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0616438356deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(74){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0608108108deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(75){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.06deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(76){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0592105263deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(77){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0584415584deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(78){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0576923077deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(79){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.0569620253deg) translate(150px) rotateY(90deg)}.coin__edge[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(80){position:absolute;height:11.775px;width:10px;background:#979d9d;transform:translateY(144.1125px) translate(145px) rotate(90.05625deg) translate(150px) rotateY(90deg)}.coin__shadow[_ngcontent-%COMP%]{position:absolute;width:300px;height:10px;border-radius:50%;background:#000;box-shadow:0 0 50px 50px #000;opacity:.125;transform:rotateX(90deg) translateZ(-330px) scale(.5)}@-webkit-keyframes rotate3d{0%{transform:perspective(1000px) rotateY(0)}to{transform:perspective(1000px) rotateY(360deg)}}@keyframes rotate3d{0%{transform:perspective(1000px) rotateY(0)}to{transform:perspective(1000px) rotateY(360deg)}}@-webkit-keyframes shine{0%,15%{transform:translateY(600px) rotate(-40deg)}50%{transform:translateY(-300px) rotate(-40deg)}}@keyframes shine{0%,15%{transform:translateY(600px) rotate(-40deg)}50%{transform:translateY(-300px) rotate(-40deg)}}']}),ge})();var R=h(4295),ve=h(8312),z=h(5789),Ne=h(6171),st=h(325),Mt=h(5928);function It(ge,Se){1&ge&&(I.TgZ(0,"div",7)(1,"div",8),I._uU(2," Ready To Release "),I.qZA()())}function be(ge,Se){1&ge&&(I.TgZ(0,"div",9)(1,"div",8),I._uU(2,"No releasable apps available yet..."),I.qZA(),I._UZ(3,"app-four-oh-four",10),I.qZA()),2&ge&&(I.xp6(3),I.Q6J("hideMessage",!0))}function pe(ge,Se){if(1&ge&&(I.TgZ(0,"div"),I._UZ(1,"app-app-display-box",11),I.qZA()),2&ge){const te=I.oxw();I.xp6(1),I.Q6J("apps",te.myReleaseApps)("is_one",!0)}}let Ke=(()=>{class ge{constructor(te){this.expanseService=te,this.myReleaseApps=[]}ngOnInit(){this.getReleaseAppListings()}getReleaseAppListings(){return this.hasNoMore=!1,this.expanseService.searchMyApps(this.page,this.searchString,!0).then(te=>{this.hasNoMore=!te.length,this.page++,this.myReleaseApps=1===this.page?te:this.myReleaseApps.concat(te)})}debounceSearch(){clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.page=0,this.getReleaseAppListings()},750)}}return ge.\u0275fac=function(te){return new(te||ge)(I.Y36(Mt.sI))},ge.\u0275cmp=I.Xpm({type:ge,selectors:[["app-account-ready-to-release"]],decls:8,vars:3,consts:[[1,"create-app-banner"],["src","/assets/images/branding/Full logo - White.png","alt","SideQuest logo"],["routerLink","/account/create-app"],[1,"row","right-section","right-section-padding-bottom"],["class","col s12",4,"ngIf"],["class","col s12 center-align",4,"ngIf"],[4,"ngIf"],[1,"col","s12"],[1,"margin-bottom","margin-top"],[1,"col","s12","center-align"],[3,"hideMessage"],[3,"apps","is_one"]],template:function(te,Qe){1&te&&(I.TgZ(0,"div",0),I._UZ(1,"img",1),I.TgZ(2,"sq-button",2),I._uU(3,"Create an App"),I.qZA()(),I.TgZ(4,"div",3),I.YNc(5,It,3,0,"div",4),I.YNc(6,be,4,1,"div",5),I.qZA(),I.YNc(7,pe,2,2,"div",6)),2&te&&(I.xp6(5),I.Q6J("ngIf",Qe.myReleaseApps.length),I.xp6(1),I.Q6J("ngIf",!Qe.myReleaseApps.length),I.xp6(1),I.Q6J("ngIf",Qe.myReleaseApps.length))},styles:[".create-app-banner[_ngcontent-%COMP%]{background:url(/assets/images/Onboard_Optimized.jpg) no-repeat center/cover;clear:both;min-height:15.8rem;position:relative;display:flex;flex-direction:column;align-items:center;padding:4rem 2rem 2rem}.create-app-banner[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-bottom:auto;max-width:100%}"]}),ge})();var xe=h(5938),wt=h(9118),Tt=h(9182),De=h(8278),W=h(2313);let ee=(()=>{class ge{constructor(te){this._sanitizer=te}transform(te){return this._sanitizer.bypassSecurityTrustResourceUrl(te)}}return ge.\u0275fac=function(te){return new(te||ge)(I.Y36(W.H7,16))},ge.\u0275pipe=I.Yjl({name:"safe",type:ge,pure:!0}),ge})();var he=h(9077),J=h(6201),ce=h(4858);let Be=(()=>{class ge{}return ge.\u0275fac=function(te){return new(te||ge)},ge.\u0275mod=I.oAB({type:ge}),ge.\u0275inj=I.cJS({imports:[[st.Bz,t.ez,e.u5,e.UX,b.m9,w.rP,C._A,S.Lr,d.D,m.C,c.o,z.K]]}),ge})();I.B6R(ve.T,[C.oJ,t.O5,xe.v],[wt.g,t.uU]),I.B6R(T.T,[t.PC,t.O5,C.oJ,st.rH,Tt.E,C.i9,t.sg,De.M,C.zS,Q,C.r0,R.Q],[wt.g,t.JJ,ee]),I.B6R(Ne.B,[t.O5,C.Dg,i.s,he.X,J.m,C.r0,st.rH,Ke],[]),I.B6R(Ke,[C.r0,st.rH,t.O5,ce.e,J.m],[])},5617:(nt,me,h)=>{"use strict";h.d(me,{d:()=>C});var t=h(5928),i=h(5254),e=h(591),c=h(9272),m=h(7545),d=h(4850),w=h(5e3),b=h(3290),S=h(7318);let C=(()=>{class T{constructor(D,Q,R){this._recaptchaV3Svc=D,this._apiSvc=Q,this._telemetryIds=R,this.emailErrors={},this.newAccountInfo={},this._countriesList=null}requestTransferCode(D){return(0,i.D)(this._apiSvc.post("v2/oauth/request-transfer-code",{email:D}))}verifyTransferCode(D,Q){return(0,i.D)(this._apiSvc.post("v2/oauth/verify-transfer-code",{email:D,code:Q}))}finalizeAccountTransfer(D){const Q=D.code&&D.provider?`v2/oauth/${c.Nj[D.provider]}/transfer-account`:"v2/oauth/transfer-account",R=Object.assign({},Object.assign({},D));return R.provider&&delete R.provider,R.state&&delete R.state,this._recaptchaV3Svc.execute("account_transfer").pipe((0,m.w)(ve=>(R.captcha_token=ve,(0,i.D)(this._apiSvc.post(Q,R)).pipe((0,d.U)(z=>({session:z,transfer_info:R,transfer_url:Q}))))))}get countriesList(){return this._countriesList||(this._countriesList=new e.X(null),this._apiSvc.get("v2/countries").then(D=>{this._countriesList.next(D)}).catch(D=>{this._countriesList.next([]),this._countriesList.error(D)})),this._countriesList}getUserIdentity(D,Q){return(0,i.D)(this._apiSvc.post(`v2/oauth/${c.Nj[D]}/user-identity`,Q)).pipe((0,d.U)(R=>R))}}return T.\u0275fac=function(D){return new(D||T)(w.LFG(b.YC),w.LFG(t.lD),w.LFG(S.s))},T.\u0275prov=w.Yz7({token:T,factory:T.\u0275fac,providedIn:"root"}),T})()},7069:(nt,me,h)=>{"use strict";h.d(me,{y:()=>C});var t=h(591),i=h(5254),e=h(2916),c=h(8929),m=h(7625),d=h(4850),w=h(5725),b=h.n(w),S=h(998);class C{constructor(I,D,Q,R,ve={}){this.uidKey=I,this.sortMap=D,this._apiSvc=R,this.options=ve,this._logger=new S.Yd(`CRUD-${this.uidKey}`).setOptions({logLevel:S.in.log,productionLogLevel:S.in.error}),this._cache={},this._uidFilterSortKeys={},this._filterSortLimitPageListCache={},this._filterSortLimitPageSubs=[],this._crudUrl=Q.crudUrl,this._createUrl=Q.createUrl,this._readUrl=Q.readUrl,this._updateUrl=Q.updateUrl,this._deleteUrl=Q.deleteUrl,this._listUrl=Q.listUrl,this.options.loggerName&&(this._logger.loggerName=this.options.loggerName),this.options.loggerNameStyle&&(this._logger.loggerNameStyle=this.options.loggerNameStyle),this._logger.setOptions(ve)}get crudKey(){return Array.isArray(this.uidKey)?this.uidKey[this.uidKey.length-1]:this.uidKey}crudUrl(I){return this._crudUrl?"string"==typeof this._crudUrl?I&&I[this.crudKey]?this._crudUrl+`/${I[this.crudKey]}`:this._crudUrl:this._crudUrl(I||{}):null}createUrl(I){return this._createUrl?"string"==typeof this._createUrl?this._createUrl:this._createUrl(I||{}):null}readUrl(I){return this._readUrl?"string"==typeof this._readUrl?this._readUrl+`/${I[this.crudKey]}`:this._readUrl(I||{}):null}updateUrl(I){return this._updateUrl?"string"==typeof this._updateUrl?this._updateUrl+`/${I[this.crudKey]}`:this._updateUrl(I||{}):null}deleteUrl(I){return this._deleteUrl?"string"==typeof this._deleteUrl?this._deleteUrl+`/${I[this.crudKey]}`:this._deleteUrl(I||{}):null}listUrl(I){return this._listUrl?"string"==typeof this._listUrl?this._listUrl:this._listUrl(I||{}):null}_clearCache(I){!this._cache[I]||(this._cache[I].complete(),this._cache[I]=null)}_getUid(I){return I[this.crudKey]}_updateCache(I,D){const Q=this._getUid(I);this._cache[Q]||(this._cache[Q]=new t.X(null)),this._cache[Q].next(I),this._uniqueIdList||(this._uniqueIdList=new t.X(null)),this._uniqueIdList.value?this._uniqueIdList.value.add(Q):this._uniqueIdList.next(new Set([Q])),D&&(null==this._uidFilterSortKeys[Q]&&(this._uidFilterSortKeys[Q]=new Set),this._uidFilterSortKeys[Q].add(D))}filterSortOptsKey(I,D,Q,R){return b()({ids:R,filter:I,sortOn:D,descending:Q})}_clearFilterSortLimitPagesBehaviorSubjects(){delete this._filterSortLimitPageListCache,this._filterSortLimitPageListCache={};for(const I of this._filterSortLimitPageSubs)I.next(null),I.complete();this._filterSortLimitPageSubs=[]}list(I,D,Q,R,ve){let z="";R.sortOn&&(z=R.sortOn.join(","));const Ne=this.filterSortOptsKey(Q,z,R.descending,ve);if(null==this._filterSortLimitPageListCache[Ne]&&(this._filterSortLimitPageListCache[Ne]={}),null==this._filterSortLimitPageListCache[Ne][I]&&(this._filterSortLimitPageListCache[Ne][I]={}),null==this._filterSortLimitPageListCache[Ne][I][D]){this._filterSortLimitPageListCache[Ne][I][D]=new t.X(null),this._filterSortLimitPageSubs.push(this._filterSortLimitPageListCache[Ne][I][D]);const st=this.listUrl(ve)||this.crudUrl(ve);if(!st)throw new Error("`list` was used but no url was specified");this._logger.debug(`Listing ${st}`,Object.assign({},arguments)),(0,i.D)(this._apiSvc.get(st,Object.assign(Object.assign({limit:I,skip:I*D},Q),{sortOn:z,descending:R.descending}))).subscribe({next:Mt=>{this._logger.debug("Received list",Mt);for(const It of Mt)this._updateCache(It,Ne);this._uniqueIdList&&this._uniqueIdList.next(this._uniqueIdList.value||new Set),this._filterSortLimitPageListCache[Ne][I][D].next({set:new Set(Mt.map(It=>this._getUid(It))),isMore:Mt.length>=I})}})}return this._filterSortLimitPageListCache[Ne][I][D]}create(I,D){return new e.y(Q=>{const R=this.createUrl(D)||this.crudUrl(D);if(!R)throw new Error("`create` was used but no url was specified");this._logger.debug(`Creating at ${R} :`,I),(0,i.D)(this._apiSvc.post(R,I)).subscribe({next:ve=>{const z=ve.id||(ve.ids&&ve.ids.length?ve.ids[0]:null);if(!z&&this.options.createResponse)return this._logger.error("!!",ve),void Q.error("Something unknown occured!");if(!z&&!this.options.createResponse)return this._logger.debug("Create response is disabled for this request"),Q.next(),Q.complete(),void this._clearFilterSortLimitPagesBehaviorSubjects();const Ne=new c.xQ;this.read(z).pipe((0,m.R)(Ne)).subscribe({next:st=>{null!=st&&(Ne.next(),Ne.complete(),this._clearFilterSortLimitPagesBehaviorSubjects(),Q.next(st),Q.complete())},error:st=>{Ne.next(),Ne.complete(),this._logger.error("Something happend while reading newly created obj",st,z),Q.error(st)}})},error:ve=>{console.log("Failed to create new rule",ve),Q.error(ve)}})})}read(I,D=!1,Q){D&&this._clearCache(I);const R=null!=this._cache[I];if(R||(this._cache[I]=new t.X(null)),!R){const ve=Object.assign({},Q,{[this.crudKey]:I}),z=this.readUrl(ve)||this.crudUrl(ve);if(!z)throw new Error("`read` was used but no url was specified");this._logger.debug(`Reading ${I} at `,z),(0,i.D)(this._apiSvc.get(z)).subscribe({next:Ne=>{this._updateCache(Ne),this._uniqueIdList&&this._uniqueIdList.next(this._uniqueIdList.value||new Set)},error:Ne=>{if(404!==Ne.status)console.error(`Unknown Exception Occured while reading uid ${I}`,Ne),this._cache[I].error(Ne);else if(this._uidFilterSortKeys&&this._uidFilterSortKeys[I]){for(const st of this._uidFilterSortKeys[I]){for(const Mt of Object.keys(this._filterSortLimitPageListCache[st]))for(const It of Object.keys(this._filterSortLimitPageListCache[st][Mt])){const be=this._filterSortLimitPageListCache[st][Mt][It];be.next(null),be.complete()}delete this._filterSortLimitPageListCache[st],this._filterSortLimitPageListCache={}}this._uidFilterSortKeys[I].clear(),this._cache[I].error(null)}}})}return this._cache[I]}clearEntireListCache(){this._clearFilterSortLimitPagesBehaviorSubjects()}clearListCacheFor(I){this._logger.debug(`Clearing list cache with uid ${I}`);const D=Object.keys(this._filterSortLimitPageListCache);for(const Q of D){if(!this._filterSortLimitPageListCache[Q])continue;let R=!1;const ve=Object.keys(this._filterSortLimitPageListCache[Q]),z=new Array;for(const Ne of ve){const st=Object.keys(this._filterSortLimitPageListCache[Q][+Ne]);for(const Mt of st){const It=this._filterSortLimitPageListCache[Q][+Ne][+Mt];!It.value||(It.value.set.has(I)&&(R=!0),z.push(It))}}R&&(this._filterSortLimitPageListCache[Q]=null,z.forEach(Ne=>{Ne.complete()}))}}update(I,D,Q){return new e.y(R=>{const ve=Object.assign({},Q,{[this.crudKey]:I}),z=this.updateUrl(ve)||this.crudUrl(ve);if(!z)throw new Error("`update` was used but no url was specified");this._logger.debug(`Updating ${I} at ${z} with `,D),(0,i.D)(this._apiSvc.patch(z,D)).subscribe({next:()=>{const Ne=new c.xQ;this.read(I,!0).pipe((0,m.R)(Ne)).subscribe({next:st=>{null!=st&&(Ne.next(),Ne.complete(),R.next(st),R.complete())},error:st=>{Ne.next(),Ne.complete(),R.error(st)}})},error:Ne=>{R.error(Ne)}})})}delete(I,D){const Q=Object.assign({},D,{[this.crudKey]:I}),R=this.readUrl(Q)||this.crudUrl(Q);if(!R)throw new Error("`delete` was used but no url was specified");return this._logger.debug(`Deleting ${I} at ${R}`),(0,i.D)(this._apiSvc.delete(R)).pipe((0,d.U)(ve=>(new c.xQ,this._clearCache(I),ve)))}}},5001:(nt,me,h)=>{"use strict";h.d(me,{I:()=>st});var t=h(9808),i=h(3075),e=h(7515),c=h(2583),m=h(1823),d=h(4331),w=h(4829),b=h(8818),S=h(446),C=h(38),T=h(325),I=h(7321),D=h(1727),Q=h(2742),R=h(5e3);let ve=(()=>{class Mt{constructor(){}ngOnInit(){}}return Mt.\u0275fac=function(be){return new(be||Mt)},Mt.\u0275cmp=R.Xpm({type:Mt,selectors:[["app-communities-post-poll"]],inputs:{number_of_polls:"number_of_polls"},decls:4,vars:1,consts:[[1,"feature-upvotes","center-align"],[1,"votes-score"]],template:function(be,pe){1&be&&(R.TgZ(0,"div",0)(1,"div",1),R._uU(2),R.qZA(),R._uU(3," Polls\n"),R.qZA()),2&be&&(R.xp6(2),R.hij(" ",pe.number_of_polls||0," "))},styles:[".votes-score[_ngcontent-%COMP%]{font-size:5rem}"],changeDetection:0}),Mt})();var z=h(4997),Ne=h(1512);let st=(()=>{class Mt{}return Mt.\u0275fac=function(be){return new(be||Mt)},Mt.\u0275mod=R.oAB({type:Mt}),Mt.\u0275inj=R.cJS({imports:[[T.Bz,C.mZ,t.ez,i.u5,i.UX,w.m9,d.rP,S._A,b.Lr,m.D,c.C,e.o]]}),Mt})();R.B6R(I.C,[t.O5,T.yS,t.mk,D.p,t.PC,Q.S,ve,S.oJ,T.rH],[z.N,Ne.d])},9220:(nt,me,h)=>{"use strict";h.d(me,{_g:()=>I,w4:()=>D,zi:()=>Q});var t=h(655),i=h(591),e=h(8929),c=h(3753),m=h(6787),d=h(446),w=h(3164),b=h(13),S=h(4850),C=h(8645),T=h(5e3),I=(()=>{return(R=I||(I={}))[R.HOME=0]="HOME",R[R.GAMES=1]="GAMES",R[R.COMMUNITIES=2]="COMMUNITIES",R[R.BLOG=3]="BLOG",R[R.PROMOTE=4]="PROMOTE",R[R.GET_SIDEQUEST=5]="GET_SIDEQUEST",R[R.GIVEAWAYS=6]="GIVEAWAYS",R[R.SIGN_IN=7]="SIGN_IN",R[R.SIGN_UP=8]="SIGN_UP",R[R.SUPPORT=9]="SUPPORT",R[R.NONE=10]="NONE",I;var R})();function D(){return"sidequestvr.com"!==window.location.host}let Q=(()=>{class R{constructor(z,Ne){this.notificationService=z,this._ngZone=Ne,this._isAuthenticated=!1,this.notifications={friend_requests:0,unread_messages:0,app_updates:0},this.siteKey="6LeCOVccAAAAAHm9kki2BFJPk7w7VOaJVRAM1eGi",this.badge="inline",this.type="image",this.theme="dark",this.authenticationStatus=new i.X(!1),this.urlConfirmDelay=30,this.donationMade=new e.xQ,this.newsMessage={enabled:!1,message:"Happy Birthday!",link:"https://sidequestvr.com/birthday"},navigator.userAgent.toLowerCase().toLowerCase().indexOf(" electron/")>-1&&(this.isInApp=!0,this.isOldVersion=!1),this.loadAppIndex(),this.loadAppMeta(),this.saveAppMeta(),this.markedRendererImages=new C.TU.Renderer,this.markedRendererNoImages=new C.TU.Renderer,this.markedRendererNoImages.image=function(xe,wt){return xe},this.disableDescriptionImages();const Mt=(0,c.R)(window,"scroll"),It=(0,c.R)(window,"touchmove"),be=(0,c.R)(window,"touchend"),pe=(0,c.R)(window,"resize"),Ke=(0,m.T)(Mt,It,be,pe);this.scrollEvents=(0,m.T)(Ke.pipe((0,w.p)(300)),Ke.pipe((0,b.b)(50))).pipe((0,w.p)(0,void 0,{leading:!0,trailing:!1}))}openSignIn(){this.signInModal&&this.signInModal.openModal()}openSignIn$(){return this.signInModal&&this.signInModal.openModal(),this.signInModal.close.pipe((0,S.U)(z=>z))}get isAuthenticated(){return this._isAuthenticated}set isAuthenticated(z){z!==this._isAuthenticated&&(this._isAuthenticated=z,this.authenticationStatus.next(this._isAuthenticated))}get isEmbedded(){return this.isInApp}openScreenPop(z,Ne,st,Mt,It){this.screenPopComponent.screenPopService.openUrl(z,Ne,st,Mt,It)}disableDescriptionImages(){C.TU.use({renderer:this.markedRendererNoImages})}enableDescriptionImages(){C.TU.use({renderer:this.markedRendererImages})}markDown(z){this.enableDescriptionImages();const Ne=(0,C.TU)((z||"").replace(/<\/?[^>]+(>|$)/g,""));return this.disableDescriptionImages(),Ne}setAccountComponent(z){this.accountComponent=z}getNotifications(z){return(0,t.mG)(this,void 0,void 0,function*(){try{this.notifications=yield z.getNotifications()}catch(Ne){this.notifications={friend_requests:0,unread_messages:0,app_updates:0}}this.setNotificationFavicon(!!(this.notifications.friend_requests||this.notifications.unread_messages||this.notifications.app_updates))})}setNotificationFavicon(z){const Ne=document.querySelectorAll(".favicon"),st=document.querySelector(".favicon-meta");Array.from(Ne).forEach(Mt=>{Mt.setAttribute("href","assets/icons/"+(z?"mark/":"")+Mt.getAttribute("href").split("/").pop())}),st.setAttribute("content","assets/icons/"+(z?"mark/":"")+st.getAttribute("content").split("/").pop())}scrollToTop(){this.is_post_open=!1,setTimeout(()=>this.scrollTo(0),0)}scrollToEle(z){this.scrollTo(z.offsetTop)}scrollTo(z){const Ne=window;Ne&&Ne.scrollTo(0,z)}fixImages(z,Ne){return(0,t.mG)(this,void 0,void 0,function*(){const st=z&&z.length?z:[];yield Promise.all(st.map(Mt=>(0,t.mG)(this,void 0,void 0,function*(){const It=new Image;yield new Promise((be,pe)=>{It.onload=be,It.onerror=pe,It.src=(Mt.image_url||Mt.event_image||Mt.image)+(Ne?"?size="+Ne:"")}).catch(be=>{Mt.image_url=null,Mt.event_image=null,Mt.image=null})})))})}logout(z){localStorage.removeItem("session"),z.currentSession=null,this.isAuthenticated=!1}showError(z){return this.showMessage({error:!0,data:z},"")}showMessage(z,Ne){this._ngZone.runOutsideAngular(()=>{z&&z.error?this.notificationService.sendNotification(d.k$.error,z.data):this.notificationService.sendNotification(d.k$.success,Ne)})}getSpaceMeta(z){return this.space_meta[z]||(this.space_meta[z]={v:0,ct:0,a:0,l:0}),this.space_meta[z]}slugify(z){const Ne={\u00e7\u00c7:"c",\u011f\u011e:"g",\u015f\u015e:"s",\u00fc\u00dc:"u",\u0131\u0130:"i",\u00f6\u00d6:"o"};for(const st of Object.keys(Ne))z=(z||"").replace(new RegExp("["+st+"]","g"),Ne[st]);return z.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}getEventMeta(z){return this.event_meta[z]||(this.event_meta[z]={v:0,u:0,d:0}),this.event_meta[z]}getAppMeta(z){return this.app_meta[z]||(this.app_meta[z]={v:0,ct:0,d:0,l:0,vc:null}),this.app_meta[z]}loadAppIndex(){const z=localStorage.getItem("app_index");if(z)try{this.app_index=JSON.parse(z)}catch(Ne){this.defaultAppIndex()}else this.defaultAppIndex()}defaultAppIndex(){this.app_index={}}loadAppMeta(){const z=localStorage.getItem("app_meta");if(z)try{this.app_meta=JSON.parse(z)}catch(Mt){this.defaultAppMeta()}else this.defaultAppMeta();const Ne=localStorage.getItem("event_meta");if(Ne)try{this.event_meta=JSON.parse(Ne)}catch(Mt){this.defaultEventMeta()}else this.defaultEventMeta();const st=localStorage.getItem("space_meta");if(st)try{this.space_meta=JSON.parse(st)}catch(Mt){this.defaultSpaceMeta()}else this.defaultSpaceMeta()}defaultAppMeta(){this.app_meta={}}defaultEventMeta(){this.event_meta={}}defaultSpaceMeta(){this.space_meta={}}saveAppMeta(){localStorage.setItem("space_meta",JSON.stringify(this.space_meta)),localStorage.setItem("event_meta",JSON.stringify(this.event_meta)),localStorage.setItem("app_meta",JSON.stringify(this.app_meta)),localStorage.setItem("app_index",JSON.stringify(this.app_index))}retrySidequestUrl(){this.sidequestUrl&&(window.location=this.sidequestUrl)}cancelSidequestUrl(){this.clearUrlTimeout(),this.sidequestReject&&this.sidequestReject()}confirmSidequestUrl(){this.clearUrlTimeout(),this.sidequestResolve&&this.sidequestResolve()}clearUrlTimeout(){clearTimeout(this.urlTimeout),this.urlTimeoutValue=0}startUrlTimer(){this.urlTimeout=setTimeout(()=>{this.urlTimeoutValue--,this.urlTimeoutValue>0?this.startUrlTimer():(this.confirmOpen.closeModal(),this.confirmSidequestUrl())},1e3)}openLink(z){window.location.href=z}openSidequestUrl(z){return this.sidequestUrl=z,this.retrySidequestUrl(),this.isInApp?Promise.resolve():(this.urlTimeoutValue=this.urlConfirmDelay,this.startUrlTimer(),this.confirmOpen.openModal(),new Promise((Ne,st)=>{this.sidequestResolve=Ne,this.sidequestReject=st}))}copyUrl(z){navigator.clipboard&&navigator.clipboard.writeText(z).then(()=>{this.showMessage({error:!1},"Copied to clipboard!")},Ne=>{this.showMessage({error:!0,data:"Can't copy!"},"")})}validateEmail(z){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(z).toLowerCase())}}return R.\u0275fac=function(z){return new(z||R)(T.LFG(d.gq),T.LFG(T.R0b))},R.\u0275prov=T.Yz7({token:R,factory:R.\u0275fac,providedIn:"root"}),R})()},9211:(nt,me,h)=>{"use strict";h.d(me,{b:()=>m});var t=h(591),i=h(5254),e=h(7215),c=h(5e3);let m=(()=>{class d{constructor(b){this._expanseSvc=b,this._appListing={}}appv1GetApp(b,S){return null==this._appListing[b]&&(this._appListing[b]=new t.X(null),(0,i.D)(this._expanseSvc.getApp(b,S)).subscribe({next:C=>{this._appListing[b].next({data:C[0],expires_after:-1,last_modified:Date.now()})}})),this._appListing[b]}}return d.\u0275fac=function(b){return new(b||d)(c.LFG(e.s))},d.\u0275prov=c.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"}),d})()},4200:(nt,me,h)=>{"use strict";h.d(me,{K:()=>b});var t=h(325),i=h(998),e=h(8929),c=h(7625),m=h(9220),d=h(3565),w=h(5e3);let b=(()=>{class S{constructor(T,I,D){this._router=T,this._appSvc=I,this._telemSvc=D,this._redirectUrl=null,this.LOCAL_STORAGE_KEY="AUTHENTICATION_REDIRECT_URL",this.REDIRECT_URL_PARAM_KEY="auth_redirect_url",this._navigationEventsWatchTeardown=new e.xQ,this._onDestroy=new e.xQ,this._logger=new i.Yd("Auth Helper").setLoggerNameStyle("color: mediumaquamarine").setOptions({logLevel:i.in.debug,productionLogLevel:i.in.log});const Q=localStorage.getItem(this.LOCAL_STORAGE_KEY);if(this._appSvc.isAuthenticated)this._logger.debug("Authenticated, clearing stale redirect url"),localStorage.removeItem(this.LOCAL_STORAGE_KEY);else{const R=new URLSearchParams(window.location.search);R.has(this.REDIRECT_URL_PARAM_KEY)?this.registerRedirectUrl(R.get(this.REDIRECT_URL_PARAM_KEY)):Q&&(this._logger.debug("Not authenticated and redirect URL found in storage. Setting up navigation watch for possible redirect urls",{storedUrl:Q}),this.registerRedirectUrl(Q))}this._onDestroy.subscribe({next:()=>{if(!this._appSvc.isAuthenticated)return;const R=localStorage.getItem(this.LOCAL_STORAGE_KEY);this._logger.warn("Destroying Authentication Helper Service",{storedUrl:R,_redirectUrl:this._redirectUrl}),this._redirectUrl===R&&(localStorage.removeItem(this.LOCAL_STORAGE_KEY),this._navigationEventsWatchTeardown.next(),this._navigationEventsWatchTeardown.complete())}}),this._logger.debug("Auth Helper Service initialized")}registerRedirectUrl(T){!T||T.length<=1||T===this._redirectUrl?this._logger.debug("Invalid or already registered Redirect URL ",T):(this._clearRedirectUrl(),this._teardownWatchNavigation(),this._redirectUrl=T,localStorage.setItem(this.LOCAL_STORAGE_KEY,this._redirectUrl),this._telemSvc.telemetry({event:"auth-redirect-url-setup",redirect_url:this._redirectUrl}),this._logger.debug("Registered URL for redirect, watching for ",T),this._router.events.pipe((0,c.R)(this._navigationEventsWatchTeardown),(0,c.R)(this._onDestroy)).subscribe({next:I=>{if(I instanceof t.m2){this._logger.debug("%c%s%c%s","color: lightseagreen;",`[REDIRECT_URL::${this._redirectUrl||"--"}] `,"color: grey","Navigated to ",I.urlAfterRedirects);const D=localStorage.getItem(this.LOCAL_STORAGE_KEY);D!==this._redirectUrl&&(this._redirectUrl=D,this._logger.debug("Redirect set elsewhere, updated to match",this._redirectUrl)),I.urlAfterRedirects===this._redirectUrl?this._appSvc.isAuthenticated&&(this._logger.debug("User is authenticated and redirect url has been met. Clearing..."),this._clearRedirectUrl(),this._teardownWatchNavigation()):"/"===I.urlAfterRedirects&&this._appSvc.isAuthenticated?(this._logger.debug("Authenticated and destination is home page. Routing user to redirect url",this._redirectUrl),this._router.navigateByUrl(this._redirectUrl)):this._appSvc.isAuthenticated&&(this._clearRedirectUrl(),this._teardownWatchNavigation())}}}))}retrieveRedirectUrl(){return this._redirectUrl?this._redirectUrl:localStorage.getItem(this.LOCAL_STORAGE_KEY)}_teardownWatchNavigation(){this._logger.debug("Tearing Down Navigation Events Watch"),this._navigationEventsWatchTeardown.next(),this._navigationEventsWatchTeardown.complete(),this._navigationEventsWatchTeardown=new e.xQ}_clearRedirectUrl(){this._logger.debug("Clearing redirect URL",this._redirectUrl),this._redirectUrl=null,localStorage.removeItem(this.LOCAL_STORAGE_KEY)}__teardown(){this._onDestroy.next()}}return S.\u0275fac=function(T){return new(T||S)(w.LFG(t.F0),w.LFG(m.zi),w.LFG(d.y))},S.\u0275prov=w.Yz7({token:S,factory:S.\u0275fac,providedIn:"root"}),S})()},8025:(nt,me,h)=>{"use strict";h.d(me,{e:()=>m});var t=h(591),i=h(5254),e=h(4850),c=h(6075);class m{constructor(w="apps",b,S){this.POST_TYPE=w,this.apiSvc=b,this.appService=S,this.REVIEW_POST_STATE_DURATION=9e5,this._postsMetadataStates={},this._postCategories={},this._postCategoriesSorts={},this._typePostsStates={},this._typePostsSorts={},this._allUsersPostsIds={}}_handleSubject(w){return{next:b=>{w.next(b)},error:b=>{w.error(b),console.error("Exception Occured",b)}}}__appendUsersPostsIds(w,b,S){null==this._allUsersPostsIds[b]&&(this._allUsersPostsIds[b]={}),null==this._allUsersPostsIds[b][w]&&(this._allUsersPostsIds[b][w]={});for(let C=0;C{let I;I=Array.isArray(T)?T:T.replies?[...T.replies]:[];const D=this._typePostsSorts[w][b].value;D.has_no_more=I.length({id:z.posts_id,children:(z.replies||[]).map(R),parent_id:z.parent_id,apps_id:z.apps_id||w});null==D.children&&(D.children=[]),D.children.push(...I.map(R));const ve=new Map;for(let z=0;zNe),this._typePostsSorts[w][b].next(D)},error:T=>{console.error(T)}})}sortKey(w){return`${w.posts_id||""}|${w.post_categories_id||""}|${w.search||""}|${w.sortOn||""}|${w.descending||""}|${w.users_id||""}`}__post_UpdateSorts(w,b,S,C=!1){for(const T in this._typePostsSorts[w]){const I=this._typePostsSorts[w][T],D=Q=>{if(null===S||+Q.id==+S)Q.children.findIndex(ve=>+ve.id==+b)>=0||(C?Q.children.unshift({apps_id:w,id:b,children:[],parent_id:S}):Q.children.push({apps_id:w,id:b,children:[],parent_id:S}),I.next(I.value));else for(const ve of Q.children)D(ve)};D(I.value)}}__unshiftUpdateSort(w,b,S){const C=this._typePostsSorts[w][b].value;null==C||C.id===S||(C.children.unshift({id:S,children:[],parent_id:null,apps_id:w}),this._typePostsSorts[w][b].next(C))}post_ListRepliesIds(w,b,S,C=!1){return this.post_ListIds(w,Object.assign(Object.assign({},S),{posts_id:b||S.posts_id}),C)}_safeOptions(w){return{skip:w.skip||(w.page||0)*w.limit,limit:w.limit||20,descending:w.descending,search:w.search,sortOn:w.sortOn,link_type:w.link_type,post_categories_id:w.post_categories_id,post_type:w.post_type,posts_id:w.posts_id,depth:w.depth,users_id:w.users_id,parent_id:w.parent_id,verified_reviews:w.verified_reviews}}post_ListIds(w,b={},S=!1){null==this._typePostsSorts[w]&&(this._typePostsSorts[w]={});const C=this._safeOptions(b),T=this.sortKey(b),I=null==this._typePostsSorts[w][T],D=(C.skip+1)*C.limit;I&&(this._typePostsSorts[w][T]=new t.X({has_no_more:!1,expected_count:D,id:b.posts_id||null,children:null,parent_id:null,options:b,apps_id:w}));const Q=this._typePostsSorts[w][T].value;return(S||I||!Q.has_no_more&&D>Q.expected_count)&&(Q.expected_count=D,this._typePostsSorts[w][T].next(Q),this.__post_GetPosts(w,T,C)),this._typePostsSorts[w][T]}getPosts(w={},b=!1){null==this._typePostsSorts[-1]&&(this._typePostsSorts[-1]={});const S=this._safeOptions(w),C=this.sortKey(w),T=null==this._typePostsSorts[-1][C],I=(S.skip+1)*S.limit;(b||T)&&(this._typePostsSorts[-1][C]=new t.X({has_no_more:!1,expected_count:I,id:w.posts_id||null,children:null,parent_id:null,options:w,apps_id:-1}));const D=this._typePostsSorts[-1][C].value;return(b||T||!D.has_no_more&&I>D.expected_count)&&(D.expected_count=I,this._typePostsSorts[-1][C].next(D),this.__post_GetPosts(-1,C,S)),this._typePostsSorts[-1][C]}__post_Get(w,b){(0,i.D)(this.apiSvc.get(`v2/${this.POST_TYPE}/${w}/posts/${b}`)).subscribe({next:S=>{this.__post_GetPostIdsUpdateStates(w,S)},error:S=>{console.error(S)}})}post_Get(w,b,S=!0,C=!1){null==this._typePostsStates[w]&&(this._typePostsStates[w]={});const T=null==this._typePostsStates[w][b];T&&(this._typePostsStates[w][b]=new t.X(null));const I=this._typePostsStates[w][b].value;return(C||T||null!=I&&I.data.isPartial()&&!S)&&this.__post_Get(w,b),this._typePostsStates[w][b]}post_Create(w,b,S=!1){return(0,i.D)(this.apiSvc.post(`v2/${this.POST_TYPE}/${w}/posts`,b)).pipe((0,e.U)(C=>(this.post_Get(w,C.posts_id),this.__post_UpdateSorts(w,C.posts_id,null,S),+C.posts_id)))}post_Reply(w,b,S,C=!1){const T=`v2/${this.POST_TYPE}/${w}/posts/${b}/reply`;return this.removeUndefined(S),(0,i.D)(this.apiSvc.post(T,S)).pipe((0,e.U)(I=>{this.post_Get(w,I.posts_id),this.__post_UpdateSorts(w,I.posts_id,b,C);const D=this._typePostsStates[w][b].value;return D.data.comments+=1,D.data.nested_comments+=1,this._typePostsStates[w][b].next(D),+I.posts_id}))}post_Delete(w,b){return(0,i.D)(this.apiSvc.delete(`v2/${this.POST_TYPE}/${w}/posts/${b}`)).pipe((0,e.U)(()=>{if(Date.now(),null==this._typePostsStates[w]&&(this._typePostsStates[w]={}),null==this._typePostsStates[w][b])return;const C=this._typePostsStates[w][b].value;if(null!=C){if(null==C.data.parent_id)for(const T in this._typePostsSorts[w]){if(null==this._typePostsSorts[w][T])continue;const I=this._typePostsSorts[w][T].value;if(null==I||I.id===b)continue;const D=Q=>{const R=Q.findIndex(ve=>ve.id===b);if(R>=0)Q.splice(R,1);else for(const ve of Q)D(ve.children)};D(I.children),this._typePostsSorts[w][T].next(I)}C.data.post_status=c.$4.Deleted,this._typePostsStates[w][b].next(C)}}))}post_Vote(w,b,S){let C,T;switch(S){case c.i7.Unset:{const I=Date.now();if(null==this._typePostsStates[w]&&(this._typePostsStates[w]={}),null!=this._typePostsStates[w][b]){const D=this._typePostsStates[w][b].value;null!=D&&D.last_modified{if(null!=C){if(this._typePostsStates[w][b].value.last_modified>C.last_modified)return;const D=this._typePostsStates[w][b].value;D.last_modified=Date.now(),D.data.upvotes=C.upvotes,D.data.downvotes=C.downvotes,D.data.user_vote_status=C.user_vote_status,D.data.votes_score=C.votes_score,this._typePostsStates[w][b].next(D)}}}),T.pipe((0,e.U)(()=>this.post_Get(w,b)))}post_Metadata(w,b){return null==this._postsMetadataStates[w]&&(this._postsMetadataStates[w]={}),null==this._postsMetadataStates[w][b]&&(this._postsMetadataStates[w][b]=new t.X(null),(0,i.D)(this.apiSvc.get(`v2/${this.POST_TYPE}/${w}/posts/${b}/metadata`)).subscribe(this._handleSubject(this._postsMetadataStates[w][b]))),this._postsMetadataStates[w][b]}post_Edit(w,b,S){return(0,i.D)(this.apiSvc.patch(`v2/${this.POST_TYPE}/${w}/posts/${b}`,S)).pipe((0,e.U)(()=>{if(null==this._typePostsStates[w]&&(this._typePostsStates[w]={}),null==this._typePostsStates[w][b])return;const C=Date.now(),T=this._typePostsStates[w][b].value;if(!(null==T||T.last_modified>C)){for(const I in S)T.data[I]=S[I];T.last_modified=Date.now(),this._typePostsStates[w][b].next(T)}}))}categories_Get(w,b,S=!1){null==this._postCategories[w]&&(this._postCategories[w]={});const C=null==this._postCategories[w][b];return C&&(this._postCategories[w][b]=new t.X(null)),(S||C)&&this.categories_List(w,{}),this._postCategories[w][b]}categories_List(w,b={},S=!1){const C=this.sortKey(b),T={sortOn:b.sortOn||"name",descending:b.descending||!0,skip:b.page*b.limit||0,limit:b.limit||20};null==this._postCategoriesSorts[w]&&(this._postCategoriesSorts[w]={});const I=null==this._postCategoriesSorts[w][C];I&&(this._postCategoriesSorts[w][C]=new t.X({data:{expected_count:T.limit,has_no_more:!1,ids:null},expires_after:-1,last_modified:Date.now()}));const Q=this._postCategoriesSorts[w][C].value;return(S||I||!Q.data.has_no_more&&(T.skip+1)*T.limit>Q.data.expected_count)&&(0,i.D)(this.apiSvc.get(`v2/${this.POST_TYPE}/${w}/post-categories`)).subscribe({next:ve=>{const z=ve.lengthIt.post_categories_id)||[],Mt=[...new Set([...Ne.data.ids||[],...st])];this._postCategoriesSorts[w][C].next({data:{expected_count:Ne.data.expected_count,has_no_more:z,ids:Mt},expires_after:-1,last_modified:Date.now()})}}),this._postCategoriesSorts[w][C]}}},7215:(nt,me,h)=>{"use strict";h.d(me,{s:()=>w});var t=h(655),i=h(9220),e=h(6552),c=h(5e3),m=h(325),d=h(7318);let w=(()=>{class b{constructor(C,T,I,D,Q){this.appService=C,this._ngZone=T,this.router=I,this.apiService=D,this.telemetryIds=Q,this.default_app_ulrs=[]}getUserAppTotals(C){return this.emit("get-user-app-totals",{users_id:C})}getUserSettings(C){if(!this.default_app_ulrs||!this.default_app_ulrs.length||C)return(C?this.getUserAppUrls(C):this.getUserValues()).then(T=>{let I=[];if((T||[]).forEach(D=>{const Q=D.name.split("_");"appUrl"===Q[0]&&I.push({provider:Q[1],link_url:D.setting_value})}),C)return I;this.default_app_ulrs=I})}getInstalledApps(C,T){return this.searchInstalledApps(C,T).then(I=>{})}httpRequest(C,T,I,D){return(0,t.mG)(this,void 0,void 0,function*(){let Q;this.apiService.currentSession||(this.apiService.currentSession=JSON.parse(localStorage.getItem("session"))||null);try{"search-apps"!==C&&"convert-legacy-token"!==C&&(Q=yield this.apiService.getUpdatedAuthToken())}catch(st){}const R={Accept:"application/json","Content-Type":"application/json"};Q&&(R.Authorization="Bearer "+Q),R["X-SQ-Sid"]=this.telemetryIds.sid,R["X-SQ-Tid"]=this.telemetryIds.tid;let ve={method:I?"GET":D?"PATCH":"POST",headers:R};I&&T?C+="?"+this.apiService.qryStr(T):ve.body=JSON.stringify(T);const z=yield fetch(this.apiService.http_url+"/"+C,ve),Ne=z.status>=400&&z.status<500?{path:C,data:{}}:yield z.json();try{if(!Ne.path)return Ne;let st=Ne.path;return"-err"===st.substr(st.length-4,4)&&(st=st.substr(0,st.length-4),Ne.data={error:!0,data:Ne.data}),Ne.data}catch(st){console.warn(st)}})}emit(C,T,I,D,Q){return this.httpRequest(C,T,D,Q)}saveImage(C,T){if(!T)try{T=JSON.parse(localStorage.getItem("session")).auth.accessToken}catch(Q){}let I=new FormData,D=(new Date).getTime();return I.append("file",C,"selfie.jpg"),fetch(this.apiService.cdnUrl+"create-upload/"+T+"/?"+(new Date).getTime()).then(Q=>Q.json()).then(Q=>fetch(this.apiService.cdnUrl+"upload-file/"+T+"/"+Q.fileId+"/selfie-"+D+".jpg/jpeg",{method:"post",body:I})).then(Q=>Q.json()).then(Q=>this.shortenUrl(this.apiService.cdnUrl+Q.path,"e"+Q.fileId.toString(36),T))}shortenUrl(C,T,I){if(!I)try{I=JSON.parse(localStorage.getItem("session")).auth.accessToken}catch(D){}return fetch(this.apiService.shortenerUrl+"get-link/"+I+"/"+T+"/"+encodeURIComponent(C)).then(D=>D.json()).then(D=>fetch(D.url).then(()=>D))}saveScene(C,T,I){let Q,R,D=new FormData;return D.append("scene",JSON.stringify(C)),Promise.resolve(this.apiService.getCurrentSession()).then(ve=>(Q=ve.token,I?this.updateScene(T,I).then(z=>{R=z[0].files_id}):fetch(this.apiService.cdnUrl+"create-upload/"+Q+"/").then(z=>z.json()).then(z=>(R=z.fileId,this.createScene(T,z.fileId,2))).then(z=>I=z[0].scenes_id))).then(()=>fetch(this.apiService.cdnUrl+"upload-scene/"+Q+"/"+R+"/scene-"+I+"/scene_json",{method:"post",body:D})).then(()=>({scenes_id:I,files_id:R,name:T,scene:C,url:"file/"+R+"/scene-"+I}))}downloadSketchFab(C){return this.apiService.getCurrentSession().then(T=>fetch(this.apiService.cdnUrl+"/get-sketchfab/"+T.token+"/"+C.uid+"/"+C.access_token).then(I=>I.json()))}isNotGolden(){return!(this.apiService.currentSession&&"golden"===this.apiService.currentSession.profile_color||this.appService.isInApp)}savePrefab(C){const T=new FormData;let I,D;return T.append("scene",JSON.stringify(C)),this.apiService.getCurrentSession().then(Q=>(I=Q.token,fetch(this.apiService.cdnUrl+"create-upload/"+I+"/").then(R=>R.json()).then(R=>{D=R.fileId}))).then(()=>fetch(this.apiService.cdnUrl+"upload-scene/"+I+"/"+D+"/prefab-"+(new Date).getTime()+"/prefab_json",{method:"post",body:T})).then(()=>D)}getAppTestTasks(C){return(0,t.mG)(this,void 0,void 0,function*(){try{return yield this.apiService.get(`v1/apps/${C}/tests`)}catch(T){return console.error("Failed getting app tests: "+T),[]}})}getAppTestTask(C,T){return(0,t.mG)(this,void 0,void 0,function*(){return yield this.apiService.get(`v1/apps/${C}/tests/${T}`)})}createAppTests(C,T){return(0,t.mG)(this,void 0,void 0,function*(){return yield this.apiService.post(`v1/apps/${C}/tests`,T)})}updateAppTest(C,T,I){return(0,t.mG)(this,void 0,void 0,function*(){yield this.apiService.patch(`v1/apps/${C}/tests/${T}`,I)})}getUserVisibleAppTests(){return(0,t.mG)(this,void 0,void 0,function*(){try{return yield this.apiService.get("v1/tests")}catch(C){return console.error("Failed getting user visible app tests: "+C),[]}})}userJoinAppTest(C){return(0,t.mG)(this,void 0,void 0,function*(){yield this.apiService.post(`v1/tests/${C}/join`,{})})}getMyTestTasks(){return(0,t.mG)(this,void 0,void 0,function*(){return yield this.apiService.get(`v1/users/${this.apiService.currentSession.users_id}/tests`)})}getMyTestTask(C){return(0,t.mG)(this,void 0,void 0,function*(){return yield this.apiService.get(`v1/users/${this.apiService.currentSession.users_id}/tests/${C}`)})}setReviewCan(C,T){return this.emit("set-review-can",{users_id:C,can:T})}setProfileColor(C,T){return this.emit("set-profile-color",{users_id:C,color:T})}getFeatureCounters(C,T,I){return this.emit("get-feature-counters",{feature_banners_id:C,start_time:T,end_time:I})}getMyFeatures(C,T,I,D){return this.emit("my-features-list",{search:C,page:T,upcoming:I,parent_id:D})}getTodaysFeatures(){return this.emit("get-todays-features",{})}checkFeatures(C){return this.emit("check-features",{slots:C})}getFeaturePricing(){return this.emit("get-feature-pricing",{})}removeAppHash(C){return this.emit("remove-app-hash",{hash:C})}getDashboardStats(C,T){return this.emit("get-dashboard-stats",{start_time:C,end_time:T})}featureCount(C,T){return this.emit("update-count-feature",{type:C,feature_banners_id:T})}login(C,T){return this.emit("login",{login:C,password:T})}login2fa(C,T,I,D){return this.emit("login-with-2fa",{token:C,code:T,type:I,password:D})}signup(C,T,I,D,Q,R){return this.emit("sign-up",{name:C,email:T,password:I,dob:D,captchaToken:Q,avatar:R})}refresh(){return this.emit("refresh",{})}setEmail2fa(C){return this.emit("save-user-email-2fa",{email_2fa_enabled:C})}resend2FAEmail(C){return this.emit("resend-2fa-email",{token:C})}setGoogle2fa(){return this.emit("generate-authenticator-qr-code",{})}removeGoogle2fa(){return this.emit("remove-authenticator",{})}verifyAuthenicator(C){return this.emit("verify-authenticator-code",{code:C})}setDefault2fa(C){return this.emit("save-user-default-2fa",{default_2fa_method:C})}getUserAppUrls(C){return this.emit("get-user-app-urls",{users_id:C})}getData(C){return this.emit("get-data",{socketId:C})}searchSubscribedEvents(C,T,I,D,Q){return this.emit("search-subscribed-event",{search:T,page:C,filter:I,is_news:D,events_id:Q})}subscribeEvent(C){return this.emit("subscribe-event",{events_id:C})}unsubscribeEvent(C){return this.emit("unsubscribe-event",{events_id:C})}getEvent(C){return this.emit("event",{events_id:C})}getEvents(C,T,I,D,Q,R,ve){return this.emit("events-list",{page:C,search:T,filter:I,is_news:D,users_id:Q,apps_id:R,communities_id:ve})}getMyEvents(C,T,I,D,Q,R){return this.emit("my-events",{page:C,search:T,filter:I,is_news:D,apps_id:Q,communities_id:R})}getEventTotals(C){return this.emit("get-event-totals",{events_id:C})}getEventCounters(C,T,I,D){return this.emit("get-event-counters",{events_id:C,start_time:T,end_time:I,filter:D})}eventCount(C,T){return this.emit("update-count-event",{type:C,events_id:T})}getSpace(C){return this.emit("space",{spaces_id:C})}getSpaces(C,T,I){return this.emit("spaces-list",{page:C,search:T,users_id:I})}getPaymentIntent(C){return this.emit("get-payment-intent",{slots:C})}addFeature(C,T,I){return this.emit("add-feature",{intent:C,slots:T,currentFeature:I})}listFeatures(C){return this.emit("features-list",{weekstart:C})}getMySpaces(C,T){return this.emit("my-spaces",{page:C,search:T})}searchSubscribedSpaces(C,T,I){return this.emit("search-subscribed-space",{search:T,page:C,spaces_id:I})}subscribeSpace(C){return this.emit("subscribe-space",{spaces_id:C})}unsubscribeSpace(C){return this.emit("unsubscribe-space",{spaces_id:C})}getSpaceTotals(C){return this.emit("get-space-totals",{spaces_id:C})}getSpaceCounters(C,T,I,D){return this.emit("get-space-counters",{spaces_id:C,start_time:T,end_time:I,filter:D})}spaceCount(C,T){return this.emit("update-count-space",{type:C,spaces_id:T})}createSpace(C){return this.emit("create-space",C)}updateSpace(C){return this.emit("update-space",C)}deleteSpace(C){return this.emit("delete-space",{spaces_id:C})}getScenes(C,T,I){return this.emit("my-scenes",{page:C,search:T,spaces_id:I})}getScene(C){return this.emit("scene",{scenes_id:C})}createScene(C,T,I){return this.emit("create-scene",{name:C,files_id:T,version:I})}updateScene(C,T){return this.emit("update-scene",{name:C,scenes_id:T})}getNotifications(){return this.emit("get-notifications",{count:!0})}deleteScene(C){return this.emit("delete-scene",{scenes_id:C})}getMyPrefabs(C,T){return this.emit("my-prefabs",{page:C,search:T})}createPrefab(C,T,I,D,Q,R){return this.emit("create-prefab",{name:C,description:T,image:I,files_id:D,is_public:Q,obfuscate:R})}saveUserEmailNotifications(C){return this.emit("save-user-email-notifications",{email_notifications:C})}saveUserMarketingEmailNotifications(C){return this.emit("save-user-marketing-email-notifications",{marketing_email_notifications:C})}saveUserProfileType(C){return this.emit("save-user-profile-type",{profile_type:C})}saveUserEarlyAccess(C){return this.emit("save-user-early-access",{early_access:C})}saveUserPublicProfile(C){return this.emit("save-user-public-profile",{public_profile:C})}saveUserBannerImage(C){return this.emit("save-user-banner-image",{banner_image:C})}viewUser(C){return this.emit("view-user/"+C,{},!1,!0)}updatePrefab(C,T,I,D,Q,R){return this.emit("update-prefab",{prefabs_id:C,name:T,description:I,image:D,is_public:Q,obfuscate:R})}deletePrefab(C){return this.emit("delete-prefab",{prefabs_id:C})}getOldBehaviours(C){return this.emit("get-scene-behaviours",{behaviours:C,old_id_check:!0})}getSceneBehaviours(C){return this.emit("get-scene-behaviours",{behaviours:C})}saveSceneBehaviours(C){return this.emit("save-scene-behaviours",{behaviours:C})}createBehaviour(C,T,I,D,Q,R,ve,z){return this.emit("create-behaviour",{name:C,description:T,image:I,definition:D,is_public:Q,obfuscate:R,sync:ve,trigger:z})}updateBehaviour(C,T,I,D,Q,R,ve,z,Ne){return this.emit("update-behaviour",{behaviours_id:C,name:T,description:I,image:D,definition:Q,is_public:R,obfuscate:ve,sync:z,trigger:Ne})}getBehavioursNotIncluding(C,T){return this.emit("behaviours-not-including",{page:C,excluded:T})}getMyBehaviours(C,T){return this.emit("my-behaviours",{page:C,search:T})}deleteBehaviour(C){return this.emit("delete-behaviour",{behaviours_id:C})}createEvent(C){return console.log(C),this.emit("create-event",C)}updateEvent(C){return this.emit("update-event",C)}deleteEvent(C,T,I,D){return this.emit("delete-event",{events_id:C,users_id:T,apps_id:I,communities_id:D})}getPeopleInSpace(C,T,I,D){return this.emit("people-in-space",{currentSpace:C,spaceId:T,page:I,search:D})}setRemoteClient(){if(this.appService.isInApp)return this.emit("set-remote-client",{},!0)}getFriends(C,T){return this.emit("friends",{page:C,search:T})}getLegends(C,T){return this.emit("list-legends",{page:C,search:T})}addFriend(C){return this.emit("add-friend",{userId:C})}removeFriend(C){return this.emit("reject-request",{userId:C})}getFriendRequests(C,T){return this.emit("requests",{page:C,search:T})}getPending(C,T){return this.emit("pending",{page:C,search:T})}acceptFriendRequest(C){return this.emit("accept-request",{userId:C})}acceptAllFriendRequests(){return this.emit("accept-all-requests",{})}rejectFriendRequest(C){return this.emit("reject-request",{userId:C})}getBlocked(C,T){return this.emit("blocked",{page:C,search:T})}blockUser(C,T){return this.emit("block-user",{userId:C,type:T})}unBlockUser(C){return this.emit("unblock-user",{userId:C})}reportUser(C,T,I){return this.emit("report-user",{userId:C,type:T,details:I})}getMessagesPeople(C,T){return this.emit("messages-people",{page:C,search:T})}getMessagesThread(C,T,I){return this.emit("messages-thread",{userId:C,page:T,search:I})}inviteUser(C,T){this.emit("user-message",{users_id:C,message:{text:"Come visit me at "+T.name+"!!!",spaces_id:T.spaces_id}},!0)}liveConnections(){return this.emit("live-connections",{},!0)}addReview(C,T,I,D,Q,R,ve,z){return this.emit("add-review",{details:C,rating:T,apps_id:D=D||null,events_id:Q=Q||null,spaces_id:R=R||null,parent_id:ve=ve||null,video_url:z,captchaToken:I})}deleteReview(C,T,I){return this.emit("delete-review",{item_id:C,type:T,reviews_id:I})}getRating(C,T){return this.emit("get-rating",{item_id:C,type:T})}getReview(C){return this.emit("get-review",{apps_id:C})}getReviews(C,T,I,D,Q,R){return this.emit("get-reviews",{item_id:C,type:T,page:I,search:D,parent_id:Q,video_only:R})}sendMessage(C,T){return this.emit("send-message",{userId:C,message:T}).then(I=>I)}linkDiscord(C,T){return this.emit("link-discord",{code:C,redirect:T})}forgotPassword(C,T){return this.emit("forgot-password",{email:C,captchaToken:T})}resetPassword(C,T){return this.emit("reset-password",{password:C,resetToken:T})}verifyEmail(C){return this.emit("verify-email",{resetToken:C})}resendVerifyEmail(){return this.emit("resend-email-verify",{})}getUserWithSpace(){return this.emit("get-user-with-space",{})}getUserCurrentSpace(C){return this.emit("get-user-current-space",{users_id:C})}saveUserDetails(C,T,I,D,Q,R){return this.emit("save-user-details",{name:C,email:T,tag_line:I,profile_color:D,bio:Q,donate_url:R})}saveUserDefaultSpace(C){return this.emit("save-user-default-space",{spaceId:C})}saveUserPassword(C){return this.emit("save-user-password",{password:C})}savePreviewImage(C){return this.emit("save-preview-images",{preview_image:C})}getRelated(C){return this.emit("get-related",{users_id:C})}oneShot(C){return this.emit("one-shot",C)}syncObject(C){return this.emit("sync-object",C)}getNews(C,T,I,D){return this.emit("get-news",{page:C,filter:T,all:I,limit:D})}removeUserValue(C){return this.emit("remove-user-value",{key:C})}getUserBadges(C){return this.emit("get-user-badges",{users_id:C})}getUserValues(){return this.emit("get-user-values",{})}setUserValues(C){return this.emit("set-user-values",{keyValues:C})}heartBeat(){return this.emit("heart-beat",{})}deleteApp(C){return this.emit("delete-app",{apps_id:C})}getUpdateHistory(C){return this.emit("get-update-history",{page:C})}getUpdateHistoryItems(C){return this.emit("get-update-history-items",{update_history_id:C})}remoteOpenUrl(C){return this.emit("remote-open-url",{url:C})}getAppUpdates(C){return this.emit("get-app-updates",{include_urls:C})}getAppPackage(C){return this.emit("get-app-package",{packagename:C})}getApp(C,T){return this.emit("get-app",{apps_id:C,invite_key:T})}getAppSimilar(C,T){return this.emit("similar-apps",{apps_id:C,search_tags:T})}getAppLiked(C){return this.emit("people-who-liked",{apps_id:C})}getAppTotals(C){return this.emit("get-app-totals",{apps_id:C})}getAppCounters(C,T,I,D){return this.emit("get-app-counters",{apps_id:C,start_time:T,end_time:I,filter:D})}getAppUrls(C){return this.emit("get-app-urls",{apps_id:C})}getAppInvites(C){return this.emit("get-app-invites",{apps_id:C})}getAppScreenshots(C){return this.emit("get-app-screenshots",{apps_id:C})}searchApps(C,T,I,D,Q,R,ve,z,Ne,st,Mt){return this.emit("search-apps",{search:C,page:T,order:I,direction:D,app_categories_id:Q,tag:R,users_id:ve,limit:z,device_filter:Ne,license_filter:st,download_filter:Mt},!1,!0)}searchMyApps(C,T,I){return this.emit("search-my-apps",{search:T,page:C,to_release:I})}searchInstalledApps(C,T,I,D,Q,R,ve,z){return this.emit("search-installed-apps",{search:C,page:T,is_updated:I,is_uninstalled:D,apps_id:Q,is_private:R,wishlist:ve,users_id:z})}addInstalledApp(C,T,I){return(0,t.mG)(this,void 0,void 0,function*(){return yield this.emit("add-edit-installed-app",{apps_id:C,versioncode:T,app_type:I})})}uninstallApp(C,T){return(0,t.mG)(this,void 0,void 0,function*(){return console.log("uninstall-app",{apps_id:C,app_type:T}),yield this.emit("uninstall-app",{apps_id:C,app_type:T})})}getAppWebhook(C){return this.emit("get-app-webhook",{apps_id:C})}getAppInvite(C){return this.emit("get-app-invite",{apps_id:C})}removeAppInvite(C){return this.emit("revoke-app-invite",{app_invite_codes_id:C})}validFeature(C,T,I,D){return this.emit("validate-feature",{title:C,description:T,imageUrl:I,targetUrl:D})}featureApp(C,T,I,D,Q,R,ve){return this.emit("feature-app",{title:C,description:T,url:I,image:D,created:Q,type:R,users_id:ve})}unFeatureApp(C,T){return this.emit("unfeature-app",{news_feed_id:C,active:T})}requestAccess(C){return this.emit("request-app-access",{apps_id:C})}respondAppAccess(C,T,I){return this.emit("respond-app-access",{apps_id:C,users_id:T,accepted:I})}getAppName(C,T){return this.emit("get-app-name",{apps_id:C,is_parent:T})}getAppRequests(C){return this.emit("get-access-requests",{apps_id:C})}generateInstall(C){return this.emit("generate-install",{msg:C})}approveApp(C,T){return this.emit("approve-app",{apps_id:C,active:T})}approveEvent(C,T,I,D){return this.emit("approve-event",{apps_id:C,communities_id:T,events_id:I,active:D})}transferToUser(C,T,I){return this.emit("transfer-to-user",{apps_id:C,events_id:T,email:I})}transferToMe(C,T){return this.emit("transfer-to-me",{apps_id:C,events_id:T})}staffPicks(C,T){return this.emit("staff-picks",{apps_id:C,active:T})}publishApp(C,T){return this.emit("publish-app",{apps_id:C,published:T})}editApp(C){return this.emit("add-edit-app",C)}appCount(C,T){return this.emit("update-count-app",{type:C,apps_id:T})}stripeOauth(C){return this.emit("stripe-oauth",{stripeToken:C})}listPaymentHistory(C,T,I){return this.emit("list-payment-history",{limit:C,starting_after:T,communities_id:I})}listPaymentSources(C,T){return this.emit("list-payment-sources",{limit:C,starting_after:T})}getOauthUrl(C){return this.emit("v2/oauth/stripe/authorize",{redirect_uri:C})}confirmAuth(C,T){return this.emit("v2/oauth/stripe",{state:C,code:T})}hasStripe(){return this.emit("v2/oauth/stripe",{},!1,!0)}addPaymentSource(C){return this.emit("add-payment-source",{paymentSourceId:C})}removePaymentSource(C){return this.emit("remove-payment-source",{paymentSourceId:C})}setDefaultPaymentSource(C){return this.emit("set-default-payment-source",{paymentSourceId:C})}chargeCustomer(C,T,I,D,Q,R){return console.log({paymentSourceId:C,amount:T,app_name:I,user_name:D,communities_id:Q,pizza_fee:R}),this.emit("charge-customer",{paymentSourceId:C,amount:T,app_name:I,user_name:D,communities_id:Q,pizza_fee:R})}getDonationCounters(C,T,I){return this.emit("get-donate-counters",{communities_id:C,start_time:T,end_time:I})}getDonationTotals(C){return this.emit("get-donate-total",{communities_id:C})}}return b.\u0275fac=function(C){return new(C||b)(c.LFG(i.zi),c.LFG(c.R0b),c.LFG(m.F0),c.LFG(e.l),c.LFG(d.s))},b.\u0275prov=c.Yz7({token:b,factory:b.\u0275fac,providedIn:"root"}),b})()},9104:(nt,me,h)=>{"use strict";h.d(me,{m:()=>d});var t=h(6552),i=h(7069),e=h(8242),c=h(998),m=h(5e3);let d=(()=>{class w extends i.y{constructor(S){super(["giveaways_id"],e.W3,{crudUrl:"v2/giveaways"},S,{logLevel:c.in.info,productionLogLevel:c.in.warn,loggerName:"Giveaway Models",loggerNameStyle:"color: #c98749"}),this._apiSvc=S}}return w.\u0275fac=function(S){return new(S||w)(m.LFG(t.l))},w.\u0275prov=m.Yz7({token:w,factory:w.\u0275fac,providedIn:"root"}),w})()},208:(nt,me,h)=>{"use strict";h.d(me,{v:()=>m});var t=h(998),i=h(7069),e=h(6552),c=h(5e3);let m=(()=>{class d extends i.y{constructor(b){super(["giveaway_prizes_id"],{},{crudUrl:S=>"v2/giveaways/prizes"+(S.giveaway_prizes_id?"/"+S.giveaway_prizes_id:"")},b,{logLevel:t.in.debug,loggerName:"Giveaway Prizes",loggerNameStyle:"color: #c98749"}),this._apiSvc=b}}return d.\u0275fac=function(b){return new(b||d)(c.LFG(e.l))},d.\u0275prov=c.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"}),d})()},8281:(nt,me,h)=>{"use strict";h.d(me,{P:()=>C,x:()=>T});var t=h(998),i=h(3565),e=h(2198),c=h(2986),m=h(4850),d=h(9220),w=h(7292),b=h(5e3);const S=["status","entry_cost","num_entrants","giveaways_id","name","featured","end_time"];var C=(()=>{return(I=C||(C={})).BROWSE_GIVEAWAYS="browse-giveaways",I.GIVEAWAY_DETAILS="giveaway-details",I.VERIFY_GIVEAWAY_DETAILS="verify-giveaway-details",I.ENTERED_GIVEAWAY="entered-giveaway",I.ERROR_ALREADY_ENTERED="error-already-entered",I.AUTH_OPEN_SIGN_IN="auth-open-sign-in",I.ERROR_INSUFFICIENT_CREDIT="error-insufficient-credit",I.ENTERED_SUCCESSFULY="entered-successfully",I.ENTERED_FAILED="entered-failed",C;var I})();let T=(()=>{class I{constructor(Q,R,ve){this._telemSvc=Q,this._giveawaySvc=R,this._appSvc=ve,this.EVENT_NAME_BASE="gamv2",this._eventsTriggeredList=new Array,this._trackPerGiveawayCount={},this._count=0,this._logger=new t.Yd("Giveaways Telemetry").setOptions({logLevel:t.in.debug,productionLogLevel:t.in.warn}).setLoggerNameStyle("color: #ff9466"),this._trackEnterGiveawaysFlow=[],this._logger.debug("Giveaway Telemetry Service initialized")}_getGiveawayState(Q){return this._giveawaySvc.getGiveaway(Q).model.pipe((0,e.h)(R=>!!R),(0,c.q)(1),(0,m.U)(R=>{var ve,z,Ne;const st={status:R.status,entry_cost:R.entry_cost,num_entrants:R.num_entrants,giveaways_id:R.giveaways_id,name:R.name,featured:R.featured,end_time:R.end_time,giveaway_description_length:null===(ve=null==R?void 0:R.description)||void 0===ve?void 0:ve.length},Mt={prizes:null===(z=R.prizes)||void 0===z?void 0:z.map(be=>({apps_id:be.apps_id,giveaway_prizes_id:be.giveaway_prizes_id,name:be.name,type:be.type,usd_value:be.usd_value}))},It=R.prizes&&R.prizes.length?R.prizes[0]:{};return Object.assign({},st,Mt,{prize_usd_value:It.usd_value,prize_name:It.name,prize_apps_id:It.apps_id,prize_giveaway_prize_id:It.giveaway_prizes_id,prize_type:It.type,prize_description_length:null===(Ne=null==It?void 0:It.description)||void 0===Ne?void 0:Ne.length})}))}_getEventName(Q){const R=(this.EVENT_NAME_BASE+"-"+Q).replace(/\//g,"-");return this._eventsTriggeredList.push(R),R}_dataCheck(Q){for(const R of S)if(Q[R])throw new Error(`Invalid data key ${R} was used in provided data...`);return!0}trackPerGiveaway(Q,R,ve={}){this._dataCheck(ve);const z=this._getEventName("giveaway-"+Q);this._getGiveawayState(R).subscribe({next:Ne=>{const st=Object.assign(Object.assign({subEvent:Q,event:z,giveaway_service_track_count:this._count++,per_giveaway_track_count:this._trackPerGiveawayCount[R]=1+(this._trackPerGiveawayCount[R]||0)},ve),Ne);this._logger.debug(`[EVENT::${z}] [GIVEAWAY::${R}] Tracked event with data`,st),this._telemSvc.telemetry(st)},error:Ne=>{this._logger.error(`[EVENT::${z}] [GIVEAWAY::${R}] Failed to get state for giveaway`,ve)}})}trackEnterGiveaways(Q,R,ve,z){const Ne=`enterstep-${Q}`,st=this._getEventName(Ne);this._getGiveawayState(ve).subscribe({next:Mt=>{const It=Object.assign(Object.assign({event:st,source:R,subEvent:Ne,giveaway_service_track_count:this._count++,step:Q,previousSteps:this._trackEnterGiveawaysFlow,lastStep:this._trackEnterGiveawaysFlow?this._trackEnterGiveawaysFlow[this._trackEnterGiveawaysFlow.length-1]:null,per_giveaway_track_count:this._trackPerGiveawayCount[ve]=1+(this._trackPerGiveawayCount[ve]||0)},z),Mt);this._trackEnterGiveawaysFlow.push({step:Q,giveaways_id:ve}),this._logger.debug(`[EVENT::${st}] [GIVEAWAY::${ve}] Tracked enter giveaway event with data`,It),this._telemSvc.telemetry(It)}})}track(Q,R){this._dataCheck(R);const ve=this._getEventName(Q),z=Object.assign({event:ve},R);this._logger.debug(`[EVENT::${ve}] Tracked giveaway event with data`,z),this._telemSvc.telemetry(z)}}return I.\u0275fac=function(Q){return new(Q||I)(b.LFG(i.y),b.LFG(w.cX),b.LFG(d.zi))},I.\u0275prov=b.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"}),I})()},7292:(nt,me,h)=>{"use strict";h.d(me,{cX:()=>wt,jP:()=>xe,vH:()=>pe});var t=h(8242),i=h(8929),e=h(1086),c=h(1746),m=h(591),d=h(5254),w=h(2916),b=h(2198),S=h(2986),C=h(2994),T=h(8583),I=h(7545),D=h(7224),Q=h(4850),R=h(9104),ve=h(208),z=h(6552),Ne=h(1043),st=h(998),Mt=h(7215),It=h(5e3),be=h(3290);class pe{constructor(De,W,ee,he,J=!0){this.uid=De,this._modelSvc=W,this._prizeSvc=ee,this._giveawaysSvc=he,this._isReadyForChanges=J,this._isChangeScheduled=!1,this._logger=new st.Yd(`Giveaway Cache ( ${this.uid} )`).setLoggerNameStyle("color: silver").setOptions({logLevel:st.in.info,productionLogLevel:st.in.warn}),this._scheduleDelayOffset=3e4,this.onScheduledChange=new i.xQ,this._isReadyForChanges&&this._setupChangeSchedule()}_forceUpdateModelsAndClearCach(){return this.forceUpdateModels().pipe((0,b.h)(De=>!!De),(0,S.q)(1),(0,C.b)(()=>{this._modelSvc.clearListCacheFor(this.uid)}))}_getPublishSchedule(De){const W=new Date(+De.publish_time+this._scheduleDelayOffset);return this._logger.debug("Setup get publish schedule",W),(0,e.of)(De).pipe((0,T.g)(W),(0,I.w)(()=>this._forceUpdateModelsAndClearCach()))}_getEndTimeSchedule(De){const W=new Date(+De.end_time+this._scheduleDelayOffset);return this._logger.debug("Setup get end time schedule",W),(0,e.of)(De).pipe((0,T.g)(W),(0,I.w)(()=>this._forceUpdateModelsAndClearCach()))}_getStartTimeSchedule(De){const W=new Date(+De.start_time+this._scheduleDelayOffset);return this._logger.debug("Setup get start time schedule",W),(0,e.of)(De).pipe((0,T.g)(W),(0,I.w)(()=>this._forceUpdateModelsAndClearCach()))}_setupChangeSchedule(){!this._isReadyForChanges||this._isChangeScheduled||(this._isChangeScheduled=!0,this.model.pipe((0,b.h)(De=>!!De),(0,S.q)(1),(0,I.w)(De=>{const W=new Array,ee=new Date(+De.start_time),he=new Date(+De.end_time),J=new Date(+De.publish_time),ce=new Date;return De.status===t.ht.Scheduled&&J>ce&&W.push(this._getPublishSchedule(De)),De.status===t.ht.Published&&(ee<=ce&&he>=ce?W.push(this._getEndTimeSchedule(De)):ee>ce&&he>ce&&W.push(this._getStartTimeSchedule(De))),this._logger.debug(`Setup ${W.length} events for ${this.uid}`),(0,c.$R)(...W)})).subscribe({next:De=>{this._logger.debug("Giveaway Scheduled Events Finished",De),this._isChangeScheduled=!1,this.onScheduledChange.next()}}))}get model(){return this._isReadyForChanges&&this._setupChangeSchedule(),this._modelSvc.read(this.uid)}get fullPrizeModels(){return this._modelSvc.read(this.uid).pipe((0,b.h)(De=>!!De),(0,S.q)(1),(0,I.w)(De=>De.prizes&&De.prizes.length?(0,c.$R)(...De.prizes.map(W=>this._prizeSvc.read(W.giveaway_prizes_id).pipe((0,b.h)(ee=>!!ee),(0,D.P)()))):(0,e.of)([])))}isStatus(De){return this.model.pipe((0,b.h)(W=>!!W),(0,Q.U)(W=>W.status===De))}get isLive(){return this.model.pipe((0,b.h)(De=>!!De),(0,Q.U)(De=>De.status===t.ht.Published&&new Date(+De.start_time)<=new Date))}get hasEnded(){return this.model.pipe((0,b.h)(De=>!!De),(0,Q.U)(De=>new Date(+De.end_time)<=new Date))}forceUpdateModels(){return this._modelSvc.read(this.uid,!0)}forceUpdatePrizes(){return this._modelSvc.read(this.uid,!0).pipe((0,b.h)(De=>!!De),(0,S.q)(1),(0,I.w)(De=>{if(!De.prizes)return(0,e.of)([]);const W=De.prizes.map(ee=>this._prizeSvc.read(ee.giveaway_prizes_id,!0));return W.length?(0,c.$R)(...W):(0,e.of)([])}))}enterGiveaway(){return this._giveawaysSvc.__enterGiveaway(this.uid)}isUserEntered(De="me"){return this._giveawaysSvc.getUserEnteredGiveawayIds(De).pipe((0,b.h)(W=>!!W),(0,Q.U)(W=>W.includes(+this.uid)))}}class xe{constructor(De,W,ee,he,J,ce,Be=pe){this._apiSvc=De,this._expanseSvc=W,this._giveawayModelSvc=ee,this._giveawayPrizeSvc=he,this._recaptchaV3Service=J,this._myGiveawaysSvc=ce,this.cacheClass=Be,this._cache={},this._logger=new st.Yd("Base Giveaways Service").setOptions({logLevel:st.in.info,productionLogLevel:st.in.warn}),this.listGiveaways=this._giveawayModelSvc.list.bind(this._giveawayModelSvc),this.listMyGiveaways=this._giveawayModelSvc.list.bind(this._myGiveawaysSvc),this._userIdsList={},this._notLoggedIn=new m.X([]),this.getPrize=this._giveawayPrizeSvc.read.bind(this._giveawayPrizeSvc)}getUserEnteredGiveawayIds(De="me"){let W=De;return this._apiSvc.currentSession&&this._apiSvc.currentSession.users_id?("me"===De&&(W=this._apiSvc.currentSession.users_id),this._userIdsList[W]||(this._userIdsList[W]=new m.X(null),this._logger.debug(`Getting user ${De} giveaways...`),(0,d.D)(this._apiSvc.get(`v2/users/${De}/giveaways/ids`)).subscribe({next:ee=>{this._logger.debug(`Received ${null==ee?void 0:ee.length} giveaways for user ${De}`,ee),this._userIdsList[W].next(ee)}})),this._userIdsList[W]):this._notLoggedIn}getGiveaway(De){return this._cache[De]||(this._cache[De]=new this.cacheClass(De,this._giveawayModelSvc,this._giveawayPrizeSvc,this)),this._cache[De]}__enterGiveaway(De){return new w.y(W=>{this._recaptchaV3Service.execute("enterGiveaway").pipe((0,I.w)(ee=>(0,d.D)(this._apiSvc.post(`v2/giveaways/${De}/enter`,{captcha_token:ee})))).subscribe({next:()=>{this._logger.debug("Successfully entered giveaway, updated local models to reflect...");const ee=this._apiSvc.currentSession.users_id;this._userIdsList[ee].next(null),this._userIdsList[ee].complete(),this._userIdsList[ee]=null,this._myGiveawaysSvc.clearEntireListCache(),(0,c.$R)(this.getUserEnteredGiveawayIds(this._apiSvc.currentSession.users_id).pipe((0,S.q)(1)),this.getGiveaway(De).forceUpdateModels().pipe((0,S.q)(1)),(0,d.D)(this._expanseSvc.refresh()).pipe((0,C.b)(he=>this._apiSvc.updateSession(he)))).subscribe({next:()=>{this._logger.debug("Entered Giveaway Successfully"),W.next(),W.complete()},error:he=>{this._logger.error(he),W.next(),W.complete()}})},error:ee=>{this._logger.error("Enter Giveaway Error",ee),W.error(ee),W.complete()}})})}}let wt=(()=>{class Tt extends xe{constructor(W,ee,he,J,ce,Be){super(W,ee,he,J,Be,ce,pe),this._apiSvc=W,this._expanseSvc=ee,this._giveAwayModelSvc=he,this._giveawayPrizeSvc=J,this._myGiveawaysSvc=ce,this._recaptchaV3Service=Be,this._logger.loggerNameStyle="color: rebeccapurple",this._logger.loggerName="Giveaways Service"}}return Tt.\u0275fac=function(W){return new(W||Tt)(It.LFG(z.l),It.LFG(Mt.s),It.LFG(R.m),It.LFG(ve.v),It.LFG(Ne.d),It.LFG(be.YC))},Tt.\u0275prov=It.Yz7({token:Tt,factory:Tt.\u0275fac,providedIn:"root"}),Tt})()},1043:(nt,me,h)=>{"use strict";h.d(me,{d:()=>d});var t=h(6552),i=h(7069),e=h(8242),c=h(998),m=h(5e3);let d=(()=>{class w extends i.y{constructor(S){super(["users_id","giveaways_id"],e.u3,{crudUrl:C=>`v2/users/${C.users_id||"me"}/giveaways`},S,{loggerName:"My Giveaways",loggerNameStyle:"color: #c98749;",logLevel:c.in.info,productionLogLevel:c.in.warn}),this._apiSvc=S}}return w.\u0275fac=function(S){return new(S||w)(m.LFG(t.l))},w.\u0275prov=m.Yz7({token:w,factory:w.\u0275fac,providedIn:"root"}),w})()},5928:(nt,me,h)=>{"use strict";h.d(me,{xD:()=>et,P:()=>Ct,dm:()=>be,zi:()=>w.zi,bR:()=>R.b,Kl:()=>rt.K,ey:()=>t.e,Pf:()=>ut.P,sI:()=>I.s,mt:()=>ve,cX:()=>Et.cX,x_:()=>ut.x,B3:()=>Be,jy:()=>wt.j,hl:()=>xe,w_:()=>T,S:()=>C,Yh:()=>It.Y,lD:()=>i.l,r5:()=>Mt.r,ST:()=>W,$l:()=>Se,y0:()=>Ne.y,_g:()=>w._g,C7:()=>Tt.C,fz:()=>D,iw:()=>pe.i,w4:()=>w.w4});var t=h(8025),i=h(6552);class c{constructor(Ue){this.apps_id=Ue.apps_id,this.ratings_count=Ue.ratings_count;for(let N=0;NAe.count/this.ratings_count})}this.breakdown=Ue.breakdown;const ke=this.breakdown.reduce((N,Ae)=>N+Ae.count*Ae.rating,0);this.avg_rating=ke/this.ratings_count}get maxRating(){return 5}get minRating(){return 1}}var m=h(591),d=h(5254),w=h(9220),b=h(9589),S=h(5e3);let C=(()=>{class gt extends t.e{constructor(ke,N){super("apps",ke,N),this._categoryIds={},this._reviewLists={}}local_post_Rating(ke,N,Ae){if(null==this._typePostsStates[ke]||null==this._allUsersPostsIds[N]||null==this._allUsersPostsIds[N][ke])return;const ae=Array.from(Object.entries(this._allUsersPostsIds[N][ke]).map(([j,Me])=>j));for(let j=0;j{if(null!=Ae&&null!=Ae.data&&null!=Ae.data.ids)for(let ae=0;ae{null==this._categoryIds[ke][j.data.name]&&(this._categoryIds[ke][j.data.name]=new m.X(null)),this._categoryIds[ke][j.data.name].next(j.data.post_categories_id)}})}})),this._categoryIds[ke][N]}reviews_List(ke,N={}){null==this._reviewLists[ke]&&(this._reviewLists[ke]={}),N.sortOn=N.sortOn||b.I.MOST_HELPFUL,N.descending=N.descending||"true,true,true";const Ae=this._safeOptions(N),ae=this.sortKey(Ae);return null==this._reviewLists[ke][ae]&&(this._reviewLists[ke][ae]=new m.X(null),this.categories_GetByName(ke,"Reviews").subscribe({next:j=>{null!=j&&(Ae.post_categories_id=+j,this._reviewLists[ke][ae].next(this.post_ListIds(ke,Ae)))}})),this._reviewLists[ke][ae]}reviews_ListUser(ke,N,Ae={}){return Ae.users_id=N||Ae.users_id,this.reviews_List(ke,Ae)}}return gt.\u0275fac=function(ke){return new(ke||gt)(S.LFG(i.l),S.LFG(w.zi))},gt.\u0275prov=S.Yz7({token:gt,factory:gt.\u0275fac,providedIn:"root"}),gt})(),T=(()=>{class gt{constructor(ke,N){this._apiSvc=ke,this._reviewPostsSvc=N,this._userRatingStates={},this._appRatings={}}appRating_Get(ke){return null==this._appRatings[ke]&&(this._appRatings[ke]=new m.X(null),(0,d.D)(this._apiSvc.get(`v2/apps/${ke}/rating`)).subscribe({next:N=>{this._appRatings[ke].next({data:new c(N),expires_after:-1,last_modified:Date.now()})},error:N=>{console.error(`Failed to get App ${ke} rating`),this._appRatings[ke].next({data:new c({apps_id:ke,avg_rating:0,breakdown:[],ratings_count:0}),expires_after:-1,last_modified:Date.now()})}})),this._appRatings[ke]}userRating_Get(ke,N){if(!N){if(!this._apiSvc.currentSession)throw new Error("No users_id provided");N=this._apiSvc.currentSession.users_id}return null==this._userRatingStates[ke]&&(this._userRatingStates[ke]={}),null==this._userRatingStates[ke][N]&&(this._userRatingStates[ke][N]=new m.X(null),(0,d.D)(this._apiSvc.get(`v2/users/${N}/apps/${ke}/rating`)).subscribe({next:Ae=>{this._userRatingStates[ke][N].next({data:Ae,expires_after:-1,last_modified:Date.now()})},error:Ae=>{this._userRatingStates[ke][N].next({data:{rating:null,created_at:0,last_updated:0},expires_after:-1,last_modified:Date.now()})}})),this._userRatingStates[ke][N]}userRating_Put(ke,N=this._apiSvc.currentSession.users_id,Ae){null==this._userRatingStates[ke]&&(this._userRatingStates[ke]={}),null==this._userRatingStates[ke][N]&&(this._userRatingStates[ke][N]=new m.X(null));const ae=this._userRatingStates[ke][N].value;return this._userRatingStates[ke][N].next({data:Ae,expires_after:-1,last_modified:Date.now()}),(0,d.D)(this._apiSvc.put(`v2/users/${N}/apps/${ke}/rating`,Ae)).subscribe({next:()=>{},error:j=>{console.warn("Failed to update rating"),this._userRatingStates[ke][N].next(ae),this._reviewPostsSvc.local_post_Rating(ke,N,ae.data)}}),this._reviewPostsSvc.local_post_Rating(ke,N,Ae),this._userRatingStates[ke][N]}userRating_Delete(ke,N=this._apiSvc.currentSession.users_id){null==this._userRatingStates[ke]&&(this._userRatingStates[ke]={}),null==this._userRatingStates[ke][N]&&(this._userRatingStates[ke][N]=new m.X(null));const Ae=this._userRatingStates[ke][N].value;return this._userRatingStates[ke][N].next({data:null,expires_after:-1,last_modified:Date.now()}),(0,d.D)(this._apiSvc.delete(`v2/users/${N}/apps/${ke}/rating`)).subscribe({next:()=>{},error:ae=>{this._userRatingStates[ke][N].next(Ae),this._reviewPostsSvc.local_post_Rating(ke,N,Ae.data)}}),this._reviewPostsSvc.local_post_Rating(ke,N,null),this._userRatingStates[ke][N]}_updateUserRating(ke,N,Ae){if(null==this._appRatings[ke])return this.appRating_Get(ke);const ae=this._appRatings[ke].value;if(null==ae||null==ae.data)return this.appRating_Get(ke);const j=ae.data.breakdown;if(Ae&&Ae.rating)if(null==N||null==N.rating||0===N.rating){const Me=j.find(Ge=>Ge.rating===Ae.rating);ae.data.ratings_count++,Me?Me.count++:j.push({count:1,pct:1/ae.data.ratings_count,rating:Ae.rating})}else{const Me=j.find(At=>At.rating===N.rating);Me&&Me.count--;const Ge=j.find(At=>At.rating===Ae.rating);Ge?Ge.count++:j.push({count:1,pct:1/ae.data.ratings_count,rating:Ae.rating})}else if(N&&N.rating){ae.data.ratings_count--;const Me=j.find(Ge=>Ge.rating===N.rating);Me&&Me.count--}this._appRatings[ke].next({data:new c(ae.data),expires_after:-1,last_modified:Date.now()})}}return gt.\u0275fac=function(ke){return new(ke||gt)(S.LFG(i.l),S.LFG(C))},gt.\u0275prov=S.Yz7({token:gt,factory:gt.\u0275fac,providedIn:"root"}),gt})();var I=h(7215);let D=(()=>{class gt{constructor(ke){this._expanseSvc=ke,this._userViewProfileStates={}}user_ViewProfileState(ke){return null==this._userViewProfileStates[ke]&&(this._userViewProfileStates[ke]=new m.X(null),(0,d.D)(this._expanseSvc.viewUser(ke)).subscribe({next:N=>{this._userViewProfileStates[ke].next({data:N[0],expires_after:-1,last_modified:Date.now()})}})),this._userViewProfileStates[ke]}}return gt.\u0275fac=function(ke){return new(ke||gt)(S.LFG(I.s))},gt.\u0275prov=S.Yz7({token:gt,factory:gt.\u0275fac,providedIn:"root"}),gt})();h(2375);var R=h(9211);let ve=(()=>{class gt{constructor(){}getErrorMessage(ke,N){if((N.dirty||N.touched)&&N.invalid&&N.errors){if(N.errors.required)return`${ke} is a required field`;if(N.errors.email)return`${ke} must be a valid email address`;if(N.errors.minlength)return`${ke} must be at least ${N.errors.minlength.requiredLength} characters`;if(N.errors.maxlength)return`${ke} must be no longer than ${N.errors.maxlength.requiredLength} characters`;if(N.errors.customError)return N.errors.customError.msg||`${ke} is invalid`}return""}}return gt.\u0275fac=function(ke){return new(ke||gt)},gt.\u0275prov=S.Yz7({token:gt,factory:gt.\u0275fac,providedIn:"root"}),gt})();var z=h(655),Ne=h(3565),st=h(6103),Mt=h(5397),It=h(8986);let be=(()=>{class gt{constructor(ke,N,Ae,ae,j,Me,Ge){this._expanseService=ke,this._appService=N,this._apiService=Ae,this._config=ae,this._searchCategories=j,this._telemetryService=Me,this._oldSearchTelemSvc=Ge,this.early_access=!1,this._searchPhrases=new Array,this._apiHitCount=0,this.order="rating",this.category=1,this.tag="staffpicks",this.device_filter="all",this.license_filter="all",this.download_filter="all",this.apps=[]}set searchString(ke){ke!==this.searchString&&null!=ke&&this._searchPhrases.push(ke)}get searchString(){return this._searchPhrases.length?this._searchPhrases[this._searchPhrases.length-1]:""}copyShareUrl(ke,N){var Ae;this._telemetryService.telemetry(N?{event:"event-share-url",events_id:ke.events_id}:{event:"app-share-url",apps_id:ke.apps_id});const ae=N?`${this._apiService.web_url}/news/${ke.events_id}/${this._appService.slugify(ke.event_name)}`:`${this._apiService.web_url}/app/${ke.apps_id}/${this._appService.slugify(ke.name)}${(null===(Ae=this._apiService.currentSession)||void 0===Ae?void 0:Ae.is_verified_reviewer)?"?utm_source=sidekickshare":""}`;return this._appService.copyUrl(ae)}removeFromFavourites(ke){return this._telemetryService.telemetry({event:"wishlist-remove",apps_id:ke.apps_id}),this._appService.isAuthenticated?this._expanseService.uninstallApp(ke.apps_id,"wish").then(N=>{ke.my_apps_id=0,this._appService.showMessage(N,"Removed from wishlist!")}):Promise.resolve().then(()=>{this._appService.showMessage({error:!0,data:"Not logged in..."},"")})}addToFavourites(ke){return this._telemetryService.telemetry({event:"wishlist-add",apps_id:ke.apps_id}),this._appService.isAuthenticated?this._expanseService.addInstalledApp(ke.apps_id,ke.versioncode,"wish").then(N=>{ke.my_apps_id=1,this._appService.showMessage(N,"Added to wishlist!")}):Promise.resolve().then(()=>{this._appService.showMessage({error:!0,data:"Not logged in..."},"")})}getApps(ke){if(0===this.page&&(this.apps.length=0),this.isLoading)return Promise.resolve();this.isLoading=!0;const N=this._searchPhrases,Ae=this.searchString;return this._searchPhrases=[Ae],console.log("Get Apps called with search element, ",ke),this._expanseService.searchApps(Ae,this.page,this.order,"name"===this.order?"asc":"desc",this.category,this.tag,null,51,this.device_filter,this.license_filter,this.download_filter).then(ae=>(0,z.mG)(this,void 0,void 0,function*(){this.hasNoMore=ae.length<51&&ae.length>0,this.isLoading=!1,this.apps=this.apps.concat(ae),this.apps.forEach((j,Me)=>{const Ge=new Date(+j.created);j.date_string=Ge.getFullYear()+"-"+Ge.getMonth()+"-"+Ge.getDate(),j.show_date=0===Me||this.apps[Me-1].date_string!==j.date_string}),this.isLoaded=!0,ae.forEach(j=>{this._appService.app_index[j.apps_id]=j.packagename}),this._appService.saveAppMeta(),this._searchCategories.menuItems.forEach(j=>{(this.tag?j.url.endsWith(this.tag+"/0"):j.url.indexOf("none/0")>-1)&&(this._category=j)}),this._telemetryService.telemetry({event:"get-apps",search:Ae,page:this.page,order:this.order,tag:this.tag,device_filter:this.device_filter,license_filter:this.license_filter,download_filter:this.download_filter}),ke&&(this._apiHitCount++,this._oldSearchTelemSvc.trackApi(ke,N,ae.length,this._apiHitCount))}))}}return gt.\u0275fac=function(ke){return new(ke||gt)(S.LFG(I.s),S.LFG(w.zi),S.LFG(i.l),S.LFG(Mt.r),S.LFG(It.Y),S.LFG(Ne.y),S.LFG(st.G))},gt.\u0275prov=S.Yz7({token:gt,factory:gt.\u0275fac,providedIn:"root"}),gt})();var pe=h(8957),Ke=h(9121);let xe=(()=>{class gt{constructor(ke){this.screenPopService=ke}close(){this.is_menu_left_open=this.is_menu_right_open=!1,this.screenPopService.close(!0)}}return gt.\u0275fac=function(ke){return new(ke||gt)(S.LFG(Ke.F))},gt.\u0275prov=S.Yz7({token:gt,factory:gt.\u0275fac,providedIn:"root"}),gt})();var wt=h(1910),Tt=h(9458),De=h(3385);let W=(()=>{class gt{constructor(ke){this.apiService=ke}getUserAvatarAssets(){return(0,z.mG)(this,void 0,void 0,function*(){let ke=yield this.apiService.get("v2/society/assets");return ke||(ke=[]),ke.filter(N=>N.users_id===this.apiService.currentSession.users_id&&N.type===De.pz.CustomAvatar&&N.platform_assets&&!!N.platform_assets.find(Ae=>Ae.download_url&&Ae.asset_format===De.c.ReadyPlayerMe))})}uploadUserReadyPlayerMeAvatar(ke){return(0,z.mG)(this,void 0,void 0,function*(){yield this.apiService.post("v2/society/assets/rpm-upload",ke)})}setReadyPlayerMeAvatarUrl(ke){return(0,z.mG)(this,void 0,void 0,function*(){yield this.apiService.put(`v2/users/${this.apiService.currentSession.users_id}/avatar`,{avatar_url:ke})})}}return gt.\u0275fac=function(ke){return new(ke||gt)(S.LFG(i.l))},gt.\u0275prov=S.Yz7({token:gt,factory:gt.\u0275fac,providedIn:"root"}),gt})();var ee=h(325),he=h(998);const J={apps_id:"apps_id",communities_id:"communities_id",users_id:"route_users_id",events_id:"events_id"},ce={communities:(gt,Ue,ke)=>({event:"communities-list"}),"communities-listing"(gt,Ue,ke){const N={};return gt.posts_id?(N.event="community-post-view",N.posts_id=gt.posts_id):(N.event="community-view",Ue.categories_id&&(N.categories_id=Ue.categories_id),Ue.order&&(N.order=Ue.order)),gt.communities_id&&(N.communities_id=gt.communities_id),N},home:(gt,Ue,ke)=>({event:"home-page"}),"app-listing"(gt,Ue,ke){const N={event:"app-view"};return gt.apps_id&&(N.apps_id=gt.apps_id),N},apps(gt,Ue,ke){const N={event:"apps-list"};return gt.tag&&(N.tag=gt.tag),gt.order&&(N.order=gt.order),N},"user-profile"(gt,Ue,ke){const N={event:"user-profile-view"};return gt.users_id&&(N.route_users_id=gt.users_id),N},"event-listing"(gt,Ue,ke){const N={event:"eventlisting-view"};return gt.events_id&&(N.events_id=gt.events_id),N},"on-board"(gt,Ue,ke){const N={event:"sign-in-load"};return ke&&ke.length&&"sign-up"==ke[ke.length-1].path&&(N.event="sign-up-load"),N},account:(gt,Ue,ke)=>({event:"user-account"}),"app-manager"(gt,Ue,ke){const N={event:"appmanager"};return gt.apps_id&&(N.apps_id=gt.apps_id),N},"account-account-friends"(gt,Ue,ke){const N={event:"user-account-friends-view"};return ke&&ke.find(Ae=>"directory"==Ae.path)?N.event="user-account-friends-directory-view":ke&&ke.find(Ae=>"pending"==Ae.path)&&(N.event="user-account-friends-pending-view"),N},"account-account-subscribed-apps"(gt,Ue,ke){const N={event:"user-account-subscribed-apps"};return ke&&ke.find(Ae=>"wishlist"==Ae.path)?N.event="user-account-wishlist-view":ke&&ke.find(Ae=>"early-access"==Ae.path)?N.event="user-account-early-access-view":ke&&ke.find(Ae=>"library"==Ae.path)&&(N.event="user-account-library-view"),N}};let Be=(()=>{class gt{}return gt.__irts=!0,gt})(),Se=(()=>{class gt{constructor(ke,N,Ae,ae,j){this._logger=new he.Yd("Telemetry Route").setOptions({logLevel:he.in.debug,productionLogLevel:he.in.error}).setLoggerNameStyle("color: #204f24"),ke.events.subscribe(Me=>{if(Me instanceof ee.m2){const Ge={},At={},Oe=[],ot=[];let _t=N.snapshot.firstChild;null==_t.component&&(_t=_t.firstChild);const jt=_t.component;let kt=null;if(jt){if(function ge(gt){return gt.__irts}(jt))return void this._logger.debug("Ignoring Route Telemetry");kt=j.resolveComponentFactory(jt).selector}if(kt?(kt.startsWith("app-")||kt.startsWith("sqa-"))&&(kt=kt.substring(4)):(kt=_t.routeConfig.path,kt&&(kt=kt.split("/").filter(An=>!An.startsWith(":")).join("-"))),!kt)return void this._logger.error("failed to guess telemetry route!",_t.routeConfig);const bt=kt;ot.push(bt);for(const An of _t.paramMap.keys)Ge[An]=_t.paramMap.get(An);for(const An of _t.queryParamMap.keys)At[An]=_t.queryParamMap.get(An);Oe.push(..._t.url);let vt=kt,an=_t.firstChild;for(;an;){let An=(j.resolveComponentFactory((an||{}).component)||{selector:null}).selector;if(An?(An.startsWith("app-")||An.startsWith("sqa-"))&&(An=An.substring(4)):(An=an.routeConfig.path,An&&(An=An.split("/").filter(Ln=>!Ln.startsWith(":")).join("-"))),!kt)break;vt+="-"+An,ot.push(An);for(const Ln of an.paramMap.keys)Ge[Ln]||(Ge[Ln]=an.paramMap.get(Ln));for(const Ln of an.queryParamMap.keys)At[Ln]||(At[Ln]=an.queryParamMap.get(Ln));Oe.push(...an.url),an=an.firstChild}if(!bt)return;const ct=function(An,Ln,Rn){let En=null,at=null;for(const ye of ot){let He=ye.toLowerCase();if(at){const ie=at.split("-"),en=He.split("-");He.split("-");let tn=0;for(;tn0&&en.splice(0,tn),He=en.join("-")}else at=He;En?En+="_"+He:En=He}En+="-load";const Le={event:En};for(const ye of Object.keys(Ln))J[ye]&&(Le[J[ye]]=Ln[ye]);for(const ye of Object.keys(An))J[ye]&&(Le[J[ye]]=An[ye]);return Le};let Pn,Rt=Ge,dn=At,pn=Oe;if(Rt||(Rt={}),dn||(dn={}),(!pn||!pn.length)&&(pn=[new ee.bq("",{})]),ce[vt])Pn=ce[vt](Rt,dn,pn);else if(ot.length>1){const An=ct(Rt,dn,pn);if(ce[bt]){const Ln=ce[bt](Rt,dn,pn),Rn=An.event.split("_");Rn.length>1&&Rn.splice(0,1),An.event=[Ln.event,...Rn].join("-");for(const En of Object.keys(Ln))"event"!==En&&(An[En]=Ln[En])}An&&An.event&&(An.event=An.event.replace(/_/g,"-")),Pn=An}else Pn=ct(Rt,dn,pn);Pn&&ae.telemetry(Pn)}})}}return gt.\u0275fac=function(ke){return new(ke||gt)(S.LFG(ee.F0),S.LFG(ee.gz),S.LFG(i.l),S.LFG(Ne.y),S.LFG(S._Vd))},gt.\u0275prov=S.Yz7({token:gt,factory:gt.\u0275fac,providedIn:"root"}),gt})();h(9104),h(208);var ut=h(8281),Et=h(7292),rt=(h(1043),h(4200)),Gt=h(8929),je=h(7625),et=(()=>{return(gt=et||(et={})).BANNER="BANNER",gt.INFILL="INFILL",gt.BROWSE_GIVEAWAYS="BROWSE_GIVEAWAYS",gt.QUICK_SEARCH="QUICK_SEARCH",et;var gt})();class Lt{constructor(Ue){this.adServeResult=Ue,this.uid=this.adServeResult.banner_id,this.innerHtml=this.adServeResult.body}}let Ct=(()=>{class gt{constructor(ke){var N,Ae;if(this._router=ke,this._destroySubject=new Gt.xQ,this._pageId=Math.floor(10*Math.random()^5),this._placeId={[et.BANNER]:0,[et.BROWSE_GIVEAWAYS]:0,[et.INFILL]:0,[et.QUICK_SEARCH]:0},this._accountId=179608,this._adPlacementsIds={[et.BANNER]:451921,[et.INFILL]:452417},window.sq_url_cfg){const ae=window.sq_url_cfg;this._accountId=(null===(N=ae.adConfig)||void 0===N?void 0:N.accountId)||this._accountId;for(let j in et)this._adPlacementsIds[j]=(null===(Ae=ae.adConfig)||void 0===Ae?void 0:Ae.placements[j])||this._adPlacementsIds[j]||null}this._router.events.pipe((0,je.R)(this._destroySubject)).subscribe({next:ae=>{if(ae instanceof ee.m2){this._pageId=Math.floor(10*Math.random()^5);for(const j in this._placeId)this._placeId[j]=0}}})}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}fetchAd(ke=et.BANNER){return(0,z.mG)(this,void 0,void 0,function*(){return this.fetchAds(ke,1).then(N=>N[0].innerHtml).catch(()=>"")})}fetchAds(ke,N,Ae){return(0,z.mG)(this,void 0,void 0,function*(){const{keywords:ae,dataKeys:j,customHeaders:Me,min:Ge}=Object.assign({keywords:[],dataKeys:{},customHeaders:{},min:1},Ae),At=this._adPlacementsIds[ke];if(!At)return console.warn(`Could not fetch ad for placement: ${ke}, no setId found!`),[];try{const Oe=this._placeId[ke];Me.slotId=Oe,this._placeId[ke]++;let ot=`https://pserve.sidequestvr.com/www-intr/;ID=${this._accountId};setID=${At};type=json;pid=${this._pageId};place=${Oe};`;ae.length>0&&(ot+=`kw=${ae.join(",")};`),ot+=Object.keys(j).reduce((bt,vt)=>bt+`_abdk[${vt}]=${j[vt]};`,""),ot+=Object.keys(Me).reduce((bt,vt)=>bt+`_evId[${vt}]=${Me[vt]};`,""),console.log("Ad Request URL: ",ot);const jt=yield(yield fetch(ot)).json();if("SUCCESS"!==jt.status)return console.warn("Could not fetch ad!",jt),[];const kt=Object.values(jt.placements).map(bt=>{const vt=bt.body.split('