PageSourceSearch

https://my.carbmanager.com/js/26013.fdb415ae.v13_5_0.js

js carbmanager.com collected 2026-10-01 11:29:23 UTC 7,244 bytes, 2 lines download raw bytes

1"use strict";(self["webpackChunkcm_web_app"]=self["webpackChunkcm_web_app"]||[]).push([[26013],{26013:function(e,t,a){a.r(t),a.d(t,{default:function(){return G}});var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e.data?a("ChallengeJoinCard",{attrs:{heading:e.heading,loading:!e.hasDialogOpen&&e.loading,status:e.data.status.status,active:!e.data.expired&&!e.data.notStarted,"past-challenges":e.showPastChallenges,icon:e.data.icon},on:{"past-challenges":e.onClickPastChallenges,join:e.onJoinChallenge,leave:e.onLeaveChallenge},scopedSlots:e._u([{key:"description",fn:function(){return[e.data.isCurrentlyJoined?a("ChallengeParticipants",{attrs:{number:e.data.challenge.entriesCount}}):a("ChallengeDateRange",{attrs:{"start-time":e.data.challenge.startTime,"end-time":e.data.challenge.endTime}})]},proxy:!0},e.data.status.text?{key:"status",fn:function(){return[a("ChallengeStatusText",{attrs:{text:e.data.status.text}})]},proxy:!0}:null],null,!0)}):e._e(),e.showJoinConfirmDialog?a("ConfirmDialog",{attrs:{heading:e.$t("challenges.join/dialog/heading",{name:e.data.challenge.name}),description:e.staticTranslations.joinDialog.description,submit:e.staticTranslations.joinDialog.submit,cancel:e.staticTranslations.cancel,loading:e.loading},on:{submit:e.onSubmitJoinChallenge,close:e.onCloseDialog}}):e._e(),e.showLeaveConfirmDialog?a("ConfirmDialog",{attrs:{heading:e.$t("challenges.leave/dialog/heading"),submit:e.staticTranslations.leaveDialog.submit,cancel:e.staticTranslations.cancel,loading:e.loading,danger:""},on:{submit:e.onSubmitLeaveChallenge,close:e.onCloseDialog}}):e._e()],1)},i=[],l=a(74353),s=a.n(l),o=a(15750),r=a.n(o),c=a(35217),h=a(44989),d=function(){var e,t=this,a=t.$createElement,n=t._self._c||a;return n("div",{ref:"container",staticClass:"cm-challenge-card join-card",class:(e={},e["join-card--"+t.status]=!0,e["join-card--size-xs"]=t.containerWidth<400,e)},[n("ResizeObserver",{on:{resize:t.onResize}}),n("div",{staticClass:"cm-challenge-card__content",class:{"cm-challenge-card__content--has-status-text":t.hasSlot("status")}},[t.hasSlot("status")?n("div",{staticClass:"cm-challenge-card__status"},[t._t("status")],2):t._e(),n("div",{staticClass:"join-card__box"},[n("div",{staticClass:"join-card__info"},[n("div",{staticClass:"join-card__icon"},[t.icon?n("img",{attrs:{src:t.icon,role:"presentation"}}):n("ChallengeTrophy")],1),n("header",{staticClass:"join-card__header"},[n("h3",{staticClass:"join-card__heading"},[t._v(t._s(t.heading))]),t.hasSlot("description")?n("div",{staticClass:"join-card__description"},[t._t("description")],2):t._e()])]),t.active?n("div",{staticClass:"join-card__cta"},[n("q-btn",{staticClass:"cm-button cm-button--full cm-button--lg",attrs:{rounded:"",unelevated:"","no-caps":"",color:t.activeButtonParams.color,"text-color":t.activeButtonParams.textColor,loading:t.loading},on:{click:t.activeButtonParams.clickEvent}},[t._v(" "+t._s(t.activeButtonParams.text)+" ")]),t.pastChallenges?n("q-btn",{staticClass:"past-challenges",attrs:{rounded:"",unelevated:"","no-caps":"",flat:"","text-color":"primary-dark",type:"button"},on:{click:t.onClickPastChallenges}},[t._v(" "+t._s(t.$t("general.pastChallenges"))+" ")]):t._e()],1):t._e()])])],1)},g=[],u=a(58156),m=a.n(u),C=a(46757),p=a(63946),v=a(84353),f=a(40381),_=a(12055),$={components:{ChallengeTrophy:_.A,ResizeObserver:v.A},mixins:[p.A],props:{heading:{type:String,required:!0},icon:{type:String,default:null},status:{type:String,required:!0,validator(e){return Object.values(C.nv).includes(e)}},active:{type:Boolean,default:!0},pastChallenges:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},data(){return{containerWidth:0}},computed:{ctaButtonParams(){const e=this.$route.name===f.aF.CHALLENGES||this.$route.name===f.aF.CHALLENGE;return{[C.nv.NOT]:{text:e?this.$t("challenges.join"):this.$t("general.learnMore"),color:"primary",textColor:"white",clickEvent:()=>this.$emit("join")},[C.nv.LEFT]:{text:e?this.$t("challenges.rejoin"):this.$t("general.learnMore"),color:"primary",textColor:"white",clickEvent:()=>this.$emit("join")},[C.nv.JOINED]:{text:this.$t("challenges.leave"),color:"light-red",textColor:"red",clickEvent:()=>this.$emit("leave")}}},activeButtonParams(){const{ctaButtonParams:e,status:t}=this;return e[t]||e[Object.keys(e)[0]]}},methods:{getContainerWidth(){return m()(this.$refs.container,"clientWidth",0)},onResize(){window.requestAnimationFrame((()=>{this.containerWidth=this.getContainerWidth()}))},onClickPastChallenges(){this.$emit("past-challenges")}}}
1,y=$,D=a(81656),b=(0,D.A)(y,d,g,!1,null,"1bed58dc",null),j=b.exports,E=a(62135),x=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ChallengeTag",{attrs:{text:e.formattedDate},scopedSlots:e._u([{key:"icon",fn:function(){return[a("cm-icon",{attrs:{name:"clock"}})]},proxy:!0}])})},w=[],L=a(15891),k={components:{ChallengeTag:L.A},props:{startTime:{type:Date,required:!0},endTime:{type:Date,required:!0}},computed:{formattedDate(){const{startTime:e,endTime:t}=this,a="LL";return`${s()(e).format(a)} - ${s()(t).format(a)}`}}},T=k,S=(0,D.A)(T,x,w,!1,null,null,null),A=S.exports,J=a(62210),P=a(85635),B=a(76483);s().extend(r());var N={components:{ConfirmDialog:c["default"],ChallengeJoinCard:j,ChallengeStatusText:h.A,ChallengeParticipants:E.A,ChallengeDateRange:A},props:{data:{type:Object,required:!0}},data(){return{loading:!1,showJoinConfirmDialog:!1,showLeaveConfirmDialog:!1}},computed:{challengeId(){return this.data.challenge.id},hasDialogOpen(){return this.showJoinConfirmDialog||this.showLeaveConfirmDialog},showPastChallenges(){return!this.data.isCurrentlyJoined&&this.data.showPastChallenges},heading(){const{data:e}=this;return e.isCurrentlyJoined||e.expired||e.notStarted?e.challenge.name:this.$t("challenges.join/heading",{name:e.challenge.name})},staticTranslations(){return{cancel:this.$t("actions.cancel"),joinDialog:{description:this.$t("challenges.join/disclaimer"),submit:this.$t("actions.join")},leaveDialog:{submit:this.$t("challenges.leave")}}}},methods:{onSubmitJoinChallenge(){this.joinChallenge()},onSubmitLeaveChallenge(){this.leaveChallenge()},onCloseDialog(){this.showJoinConfirmDialog=!1,this.showLeaveConfirmDialog=!1},async onLeaveChallenge(){this.showLeaveConfirmDialog=!0},async onJoinChallenge(){const e=this.$route.name===f.aF.CHALLENGES||this.$route.name===f.aF.CHALLENGE;e?this.showJoinConfirmDialog=!0:this.$router.push({name:f.aF.CHALLENGES})},onClickPastChallenges(){this.$emit("past-challenges")},async leaveChallenge(){const{challengeId:e}=this;try{this.loading=!0,await J.nC.leaveChallenge({challengeId:e}),await(0,P.uk)(100),this.showLeaveConfirmDialog=!1,this.$emit("left")}catch(t){this.$alertErrorGeneral(),this.$logHandledError("Failed to leave challenge",t)}finally{this.loading=!1,this.$trackEvent(B.r.QUIT_CHALLENGE)}},async joinChallenge(){const{challengeId:e}=this;try{this.loading=!0,await J.nC.joinChallenge({challengeId:e}),await(0,P.uk)(100),this.showJoinConfirmDialog=!1,this.$emit("joined")}catch(t){this.$alertErrorGeneral(),this.$logHandledError("Failed to join challenge",t)}finally{this.loading=!1,this.$trackEvent(B.r.JOINED_CHALLENGE)}}}},O=N,F=(0,D.A)(O,n,i,!1,null,null,null),G=F.exports}}]);
2//# sourceMappingURL=26013.fdb415ae.v13_5_0.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.