(window.webpackJsonp=window.webpackJsonp||[]).push([[229,24,26,30,71,73,74,75,142,143,144,145,146,176,180],{342:function(e,t,n){var content=n(355);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(35).default)("5e3c0139",content,!0,{sourceMap:!1})},343:function(e,t,n){"use strict";var r=n(13),o=n(8),l=n(85),c=n(21),d=n(14),m=n(57),f=n(151),h=n(84),v=n(242),_=n(6),y=n(59),k=n(71).f,x=n(48).f,C=n(16).f,M=n(347).trim,w="Number",S=o.Number,T=S.prototype,$=m(y(T))==w,E=function(e){if(h(e))throw TypeError("Cannot convert a Symbol value to a number");var t,n,r,o,l,c,d,code,m=v(e,"number");if("string"==typeof m&&m.length>2)if(43===(t=(m=M(m)).charCodeAt(0))||45===t){if(88===(n=m.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(m.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+m}for(c=(l=m.slice(2)).length,d=0;do)return NaN;return parseInt(l,r)}return+m};if(l(w,!S(" 0o1")||!S("0b1")||S("+0x1"))){for(var N,I=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof I&&($?_((function(){T.valueOf.call(n)})):m(n)!=w)?f(new S(E(t)),n,I):E(t)},A=r?k(S):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),O=0;A.length>O;O++)d(S,N=A[O])&&!d(I,N)&&C(I,N,x(S,N));I.prototype=T,T.constructor=I,c(o,w,I)}},345:function(e,t,n){"use strict";n.r(t);n(36),n(42),n(47);t.default={computed:{settings:function(){return this.$store.state.auth.settings}},methods:{getSetting:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return Object.keys(this.settings).includes(e)?this.settings[e]:t}}}},346:function(e,t,n){var content=n(358);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(35).default)("24b03152",content,!0,{sourceMap:!1})},347:function(e,t,n){var r=n(31),o=n(11),l="["+n(348)+"]",c=RegExp("^"+l+l+"*"),d=RegExp(l+l+"*$"),m=function(e){return function(t){var n=o(r(t));return 1&e&&(n=n.replace(c,"")),2&e&&(n=n.replace(d,"")),n}};e.exports={start:m(1),end:m(2),trim:m(3)}},348:function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},354:function(e,t,n){"use strict";n(342)},355:function(e,t,n){var r=n(34)(!1);r.push([e.i,".size-75[data-v-19948014]{width:75px;height:75px;font-size:52.5px}.size-150[data-v-19948014]{width:150px;height:150px;font-size:52.5px}.circle-shape[data-v-19948014]{border-radius:50%;color:#555;cursor:pointer;align-items:center;justify-content:center;display:flex;margin:0 auto}.circle-purple[data-v-19948014]{background-color:#cdd0fb}.circle-blue[data-v-19948014]{background-color:#daf0fd}.circle-green[data-v-19948014]{background-color:#d8fdee}.circle-yellow[data-v-19948014]{background-color:#fef7cf}.circle-orange[data-v-19948014]{background-color:#fbe6d1}.circle-initial[data-v-19948014]{color:#777}",""]),e.exports=r},356:function(e,t,n){"use strict";n.r(t);var r={props:{initial:{type:String,required:!0},sizeClass:{type:String,required:!1,default:function(){return"size-75"}},colourClass:{type:String,required:!1,default:function(){var e=["purple","blue","green","yellow","orange"],t=e[Math.floor(Math.random()*e.length)];return"circle-".concat(t)}}}},o=(n(354),n(2)),component=Object(o.a)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",[n("div",{class:["circle-shape",e.sizeClass,e.colourClass]},[n("span",{staticClass:"circle-initial"},[e._v("\n "+e._s(e.initial)+"\n ")])])])}),[],!1,null,"19948014",null);t.default=component.exports},357:function(e,t,n){"use strict";n(346)},358:function(e,t,n){var r=n(34)(!1);r.push([e.i,".card-checkbox[data-v-06c80284]{padding-top:.5em;padding-left:.5em}.raise-card[data-v-06c80284]{padding-top:0;margin-top:-10px}.profiles[data-v-06c80284]{display:grid;grid-column-gap:15px;grid-row-gap:15px;grid-auto-rows:1fr;grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}.profile[data-v-06c80284]{float:left;width:100%}.profile-text[data-v-06c80284]{margin-bottom:5px;text-align:center;overflow:hidden;line-height:1.2em;white-space:nowrap;text-overflow:ellipsis;color:#002}.circle-shape[data-v-06c80284]{border-radius:50%;width:75px;height:75px;margin-left:auto;margin-right:auto;color:#555;cursor:pointer;text-align:center}.circle-purple[data-v-06c80284]{background-color:#cdd0fb}.circle-blue[data-v-06c80284]{background-color:#daf0fd}.circle-green[data-v-06c80284]{background-color:#d8fdee}.circle-yellow[data-v-06c80284]{background-color:#fef7cf}.circle-orange[data-v-06c80284]{background-color:#fbe6d1}.circle-initial[data-v-06c80284]{font-size:52.5px;color:#777}",""]),e.exports=r},366:function(e,t,n){"use strict";n.r(t);n(15),n(24),n(56),n(152),n(150),n(110),n(18),n(25);var r=n(109),o=n(70),l=n(345),c=n(410),d=n(60),m=n.n(d),f=n(356),h={mixins:[l.default],components:{ProfileIcon:f.default},props:{blockQuickSearch:{type:Boolean,required:!1,default:!0},selectedMembers:{type:Array,required:!1,default:null},members:Array,link:String,externalSearch:{type:String,required:!1},searchBar:{required:!1,default:!0},loadingMessage:{required:!1,default:function(){return"Loading profiles..."}},noProfilesMessage:{required:!1,default:function(){return"No profiles to show."}},noProfilesAfterFilterMessage:{required:!1,default:function(){return"No profiles match the search criteria."}}},created:function(){this.searchBar&&window.addEventListener("keydown",this.jumpToSearch)},destroyed:function(){this.searchBar&&window.removeEventListener("keydown",this.jumpToSearch)},computed:{substituteFirstNameNickName:function(){return this.getSetting("substituteFirstNameForNickName",!1)},showMembersOrdered:function(){return this.substituteFirstNameNickName?Object(o.a)(m.a.cloneDeep(this.showMembers),{by:"completeName",order:"asc",computed:{completeName:function(e){return""!==e.name.nick?"".concat(e.name.nick," ").concat(e.name.last):"".concat(e.name.first," ").concat(e.name.last)}}}):this.showMembers}},data:function(){return{inTileZone:null,showMembers:[],search:null,userSelectedMembers:[],searchSelected:!1}},mounted:function(){var e=this;this.$nextTick((function(){e.userSelectedMembers=e.selectedMembers}))},methods:{jumpToSearch:function(e){console.log(this.blockQuickSearch),this.blockQuickSearch||"f"!==e.key&&"F"!==e.key||!1===this.searchSelected&&(this.$refs.search.focus(),e.preventDefault())},randomCss:function(){var e=["purple","blue","green","yellow","orange"],t=e[Math.floor(Math.random()*e.length)];return"circle-".concat(t)},filterProfiles:Object(r.debounce)((function(){if(this.search.length>0){var e=this.search.toLowerCase(),t=new c.a(this.members,{includeScore:!0,useExtendedSearch:!0,findAllMatches:!0,keys:["name.first","name.middle","name.last","name.nick"]}),n=e.split(" "),r=t.search(n.join(" | ")).filter((function(e){return e.score<=.2}));this.showMembers=r.map((function(e){return e.item}))}else this.showMembers=this.members}),250)},watch:{members:{immediate:!0,handler:function(e,t){this.userSelectedMembers=[],this.showMembers=this.members}},externalSearch:function(){console.log("triggered"),this.search=this.externalSearch,this.filterProfiles()},userSelectedMembers:function(e,t){this.$emit("update:selectedMembers",this.userSelectedMembers)}}},v=(n(357),n(2)),component=Object(v.a)(h,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",[e.searchBar&&null!==e.members&&e.members.length>0?n("b-field",[n("b-input",{ref:"search",attrs:{placeholder:e.searchSelected||e.blockQuickSearch?"Search...":"Search (press F)...",type:"search",icon:"magnify"},on:{input:e.filterProfiles,focus:function(t){e.searchSelected=!0},blur:function(t){e.searchSelected=!1}},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}})],1):e._e(),e._v(" "),null!==e.members&&e.members.length>0&&e.showMembers.length>0?[n("div",{staticClass:"profiles"},e._l(e.showMembersOrdered,(function(t){return n("div",{key:t.id,staticClass:"profile"},[n("div",{class:["card",null!==e.userSelectedMembers&&e.userSelectedMembers.includes(t.id)?"has-background-info-light":""]},[e.selectedMembers?n("div",{staticClass:"card-checkbox"},[n("b-checkbox",{attrs:{"native-value":t},model:{value:e.userSelectedMembers,callback:function(t){e.userSelectedMembers=t},expression:"userSelectedMembers"}})],1):e._e(),e._v(" "),n("div",{class:["card-content",null!==e.selectedMembers?"raise-card":""]},[n("nuxt-link",{attrs:{to:{name:e.link,params:{id:t.id}}}},[n("profile-icon",{attrs:{initial:e.substituteFirstNameNickName&&""!==t.name.nick?t.name.nick[0]:t.name.first[0]}}),e._v(" "),n("p",{staticClass:"profile-text pt-2"},[e._v("\n "+e._s(e.substituteFirstNameNickName&&""!==t.name.nick?t.name.nick:t.name.first)+" "+e._s(t.name.last)+"\n ")])],1)],1)])])})),0)]:null!==e.members&&0===e.showMembers.length&&e.members.length>0?n("p",[e._v("\n "+e._s(e.noProfilesAfterFilterMessage)+"\n ")]):null!==e.members&&0===e.members.length?n("p",{staticClass:"has-text-centered"},[e._v("\n "+e._s(e.noProfilesMessage)+"\n ")]):n("p",[e._v("\n "+e._s(e.loadingMessage)+"\n ")])],2)}),[],!1,null,"06c80284",null);t.default=component.exports},382:function(e,t,n){"use strict";n.d(t,"b",(function(){return c}));var r=n(69),o=n.n(r),l=n(339);function c(e){return"00:00"===o()(e).format("HH:mm")?o()(e).format("Do MMM"):o()(e).format("Do MMM [at] HH:mm")}o.a.extend(l),t.a=function(e){return o()(e).format("Do MMMM YYYY [at] HH:mm")}},419:function(e,t,n){"use strict";n.r(t);n(24);var r=n(149),o=n(375),l={components:{EventMembersTable:r.default},props:{role:{type:Object},event:{type:Object}},data:function(){return{members:null,token:null}},mounted:function(){var e=this;this.$nextTick((function(){e.getRoleScopeMembers()}))},methods:{getRoleScopeMembers:function(){var e=this;this.members=null,this.$axios.get("events/upcoming/".concat(this.event.id,"/roles/").concat(this.role.id)).then((function(t){e.members=t.data.attendees,e.token=t.data.token}))},manageClickedMember:function(e){this.$buefy.modal.open({parent:this,component:o.default,hasModalCard:!0,trapFocus:!0,fullScreen:!0,canCancel:!1,props:{member:e,event:this.event,token:this.token,getParams:{method:"role",id:this.role.id}}})}},watch:{role:function(){this.getRoleScopeMembers()}}},c=n(2),component=Object(c.a)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",[n("event-members-table",{attrs:{members:e.members,"show-room-column-option":!1,"show-sort-by-last-name-option":!0,"suppress-am-warning":!1,"show-details":!1,"show-status-column":!1,clickable:!0,"show-am-column":!1,event:e.event},on:{clicked:e.manageClickedMember}})],1)}),[],!1,null,null,null);t.default=component.exports},420:function(e,t,n){"use strict";n.r(t);n(24);var r=n(149),o=n(375),l={components:{EventMembersTable:r.default},data:function(){return{activeTab:0,roomData:null}},props:{event:{type:Object},room:{type:Object}},methods:{manageClickedMember:function(e){this.$buefy.modal.open({parent:this,component:o.default,hasModalCard:!0,trapFocus:!0,fullScreen:!0,canCancel:!1,props:{member:e,token:this.roomData.token,event:this.event,getParams:{method:"room",id:this.room.id}}})}},mounted:function(){var e=this;this.$nextTick((function(){e.$axios.get("events/upcoming/".concat(e.event.id,"/rooms/").concat(e.room.id)).then((function(t){e.roomData=t.data}))}))}},c=n(2),component=Object(c.a)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal-card"},[n("header",{staticClass:"modal-card-head"},[n("p",{staticClass:"modal-card-title"},[e._v("\n "+e._s(e.room.name)+"\n ")]),e._v(" "),n("button",{staticClass:"delete",attrs:{type:"button"},on:{click:function(t){return e.$emit("close")}}})]),e._v(" "),n("section",{staticClass:"modal-card-body p-1"},[n("b-tabs",{model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[n("b-tab-item",{attrs:{label:"Members"}},[null!==e.roomData?[n("event-members-table",{attrs:{members:e.roomData.members,"show-room-column-option":!1,"show-sort-by-last-name-option":!1,"suppress-am-warning":!1,"show-details":!1,"show-status-column":!1,clickable:!0,"show-am-column":!1,event:e.event},on:{clicked:e.manageClickedMember}})]:e._e()],2)],1)],1),e._v(" "),n("footer",{staticClass:"modal-card-foot"},[n("b-button",{attrs:{label:"Close"},on:{click:function(t){return e.$emit("close")}}})],1)])}),[],!1,null,null,null);t.default=component.exports},421:function(e,t,n){"use strict";n.r(t);var r={components:{RoomIdentifier:n(153).default},props:{rooms:{type:Array,required:!0},token:{type:String,required:!1}},methods:{emitClick:function(e){this.$emit("clicked",e)}}},o=n(2),component=Object(o.a)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",[n("b-table",{attrs:{data:e.rooms,bordered:!1,striped:!0,narrowed:!1,hoverable:!0,loading:!1,focusable:!0},scopedSlots:e._u([{key:"empty",fn:function(){return[n("p",{staticClass:"has-text-centered"},[e._v("\n "+e._s(null===e.rooms?"Loading...":"Nothing to show")+"\n ")])]},proxy:!0}])},[n("b-table-column",{attrs:{field:"name",label:"Room"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("a",{on:{click:function(n){return e.emitClick(t.row,e.token)}}},[e._v("\n "+e._s(t.row.name)+"\n ")])]}}])}),e._v(" "),n("b-table-column",{attrs:{label:"Identifier"},scopedSlots:e._u([{key:"default",fn:function(e){return[n("room-identifier",{attrs:{room:e.row}})]}}])})],1)],1)}),[],!1,null,null,null);t.default=component.exports},422:function(e,t,n){"use strict";n.r(t);var r={props:{heading:{type:String},icon:{type:String,required:!1,default:void 0},tag:{type:Object,required:!1,default:null}}},o=n(2),component=Object(o.a)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",[n("div",{staticClass:"card"},[n("header",{staticClass:"card-header"},[n("p",{staticClass:"card-header-title"},[void 0!==e.icon?n("span",{staticClass:"pr-1"},[n("b-icon",{attrs:{icon:e.icon,size:"is-small"}})],1):e._e(),e._v(" "),n("span",[e._v(e._s(e.heading))]),e._v(" "),null!==e.tag?n("span",{staticClass:"pl-2"},[n("b-tag",{attrs:{type:e.tag.type}},[e._v("\n "+e._s(e.tag.message)+"\n ")])],1):e._e()])]),e._v(" "),n("div",{staticClass:"card-content p-3"},[n("div",{staticClass:"content"},[e._t("default")],2)])])])}),[],!1,null,null,null);t.default=component.exports},469:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(116);var o=n(171),l=n(89);function c(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(o.a)(e)||Object(l.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},471:function(e,t,n){"use strict";n.r(t);var r=n(149),o=n(421),l=n(375),c=n(420),d=n(153),m=n(504),f=n(419),h={components:{EventMembersTable:r.default,ResponsibleRoomsTable:o.default,RoomIdentifier:d.default,KeyRoleMembers:f.default},mixins:[m.a],mounted:function(){var e=this;this.$nextTick((function(){null!==e.eventInfo&&e.$axios.get("events/upcoming/".concat(e.eventInfo.id)).then((function(t){e.responsible=t.data.responsible,e.you=t.data.you,e.roles=t.data.roles,e.loaded=!0}))}))},methods:{manageClickedMember:function(e){this.$buefy.modal.open({parent:this,component:l.default,hasModalCard:!0,trapFocus:!0,fullScreen:!0,canCancel:!1,props:{member:e,token:this.responsible.members.token,event:this.eventInfo}})},manageClickedRoom:function(e){this.$buefy.modal.open({parent:this,component:c.default,hasModalCard:!0,trapFocus:!0,fullScreen:!0,canCancel:!1,props:{room:e,event:this.eventInfo}})}},data:function(){return{mainTabs:0,loaded:!1,you:{rooms:[]},responsible:{members:[],rooms:[]},roles:[],selectedRole:null}},props:{eventInfo:{type:Object,default:function(){return null}}}},v=n(2),component=Object(v.a)(h,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",[e.loaded&&null!==e.eventInfo?[n("b-tabs",{model:{value:e.mainTabs,callback:function(t){e.mainTabs=t},expression:"mainTabs"}},[n("b-tab-item",{attrs:{label:"Roles"}},[e._v("\n You can access the details of members that are within the scope of your roles.\n "),e.roles.length>0?n("b-field",{attrs:{label:"Role"}},[n("b-select",{attrs:{placeholder:"Select your role",expanded:""},model:{value:e.selectedRole,callback:function(t){e.selectedRole=t},expression:"selectedRole"}},e._l(e.roles,(function(option){return n("option",{key:option.id,domProps:{value:option}},[e._v("\n "+e._s(option.name)+"\n ")])})),0),e._v(" "),null!==e.selectedRole?n("div",{staticClass:"pt-2"},[n("key-role-members",{attrs:{role:e.selectedRole,event:e.eventInfo}})],1):e._e()],1):n("p",[e._v("\n You don't have any roles\n ")])],1),e._v(" "),n("b-tab-item",{attrs:{label:"You",visible:e.eventInfo.roomRequirement}},[n("p",{staticClass:"pb-3"},[e._v("\n The details here are for yourself during "),n("b",[e._v(e._s(e.eventInfo.name))]),e._v(".\n ")]),e._v(" "),!1===e.eventInfo.flexibleRooms?[1===e.you.rooms.length&&e.roomHasIdentifier(e.you.rooms[0])?[e._v("\n You are in "),n("b",[n("room-identifier",{attrs:{room:e.you.rooms[0]}})],1),e._v(".\n ")]:1===e.you.rooms.length&&!1===e.roomHasIdentifier(e.you.rooms[0])?[e._v("\n You are in room "+e._s(e.you.rooms[0].name)+" (there is no room identifier)\n ")]:[e._v("\n No room information for you has been provided.\n ")]]:e._e()],2),e._v(" "),n("b-tab-item",{attrs:{label:"Members"}},[n("p",[e._v("\n Here you can access the details of those you have been assigned as responsible for during "),n("b",[e._v(e._s(e.eventInfo.name))]),e._v(".\n ")]),e._v(" "),n("event-members-table",{attrs:{members:e.responsible.members.list,"show-room-column-option":!1,"suppress-am-warning":!1,"show-details":!1,"show-status-column":!1,clickable:!0,"show-am-column":!1,event:e.eventInfo},on:{clicked:e.manageClickedMember}})],1),e._v(" "),n("b-tab-item",{attrs:{label:"Rooms",visible:e.eventInfo.roomRequirement}},[n("p",[e._v("\n Here you can access the details of any occupants in the rooms you have been assigned as responsible for during "),n("b",[e._v(e._s(e.eventInfo.name))]),e._v(".\n "),n("responsible-rooms-table",{attrs:{rooms:e.responsible.rooms},on:{clicked:e.manageClickedRoom}})],1)])],1),e._v(" "),!1===e.eventInfo.roomRequirement?n("div",[n("hr"),e._v(" "),n("p",[e._v("\n This event doesn't have room management enabled, so a few tabs have been hidden.\n ")])]):e._e()]:[e._v("\n Loading...\n ")]],2)}),[],!1,null,null,null);t.default=component.exports},503:function(e,t,n){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isTomorrow=function(){var e="YYYY-MM-DD",t=n().add(1,"day");return this.format(e)===t.format(e)}}}()},512:function(e,t,n){"use strict";n.r(t);var r={components:{OngoingEventQuickAccess:n(471).default},mounted:function(){var e=this;this.$nextTick((function(){e.$axios.get("events/upcoming").then((function(t){e.imminentEvents=t.data}))}))},data:function(){return{imminentEvents:null,loaded:!1}}},o=n(2),component=Object(o.a)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",[null!==e.imminentEvents&&e.imminentEvents.length>0?n("div",{staticClass:"card mb-3 has-background-info-light"},[n("header",{staticClass:"card-header"},[n("p",{staticClass:"card-header-title"},[n("span",{staticClass:"pr-1"},[n("b-icon",{attrs:{icon:"airplane",size:"is-small"}})],1),e._v("\n Events\n ")])]),e._v(" "),n("div",{staticClass:"card-content"},[n("b-table",{attrs:{data:e.imminentEvents,detailed:"","detail-key":"id"},scopedSlots:e._u([{key:"detail",fn:function(e){return[n("div",{staticClass:"container pt-0"},[n("ongoing-event-quick-access",{attrs:{"event-info":e.row}})],1)]}}],null,!1,367964818)},[n("b-table-column",{attrs:{field:"name",label:"Name"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.name)+"\n ")]}}],null,!1,4044928538)})],1)],1)]):e._e()])}),[],!1,null,"78633365",null);t.default=component.exports},513:function(e,t,n){"use strict";n.r(t);n(18),n(50);var r=n(422),o=n(382),l={components:{Card:r.default},data:function(){return{diaries:null,events:null}},computed:{publicDiaries:function(){return this.diaries.filter((function(e){return"Public"===e.sharing}))},hasLoaded:function(){return null!==this.events&&null!==this.diaries},nextThreeEvents:function(){return this.events.length>=3?this.events.slice(0,3):this.events}},mounted:function(){var e=this;this.$nextTick((function(){e.$axios.get("diary/diaries").then((function(t){e.diaries=t.data}),(function(e){console.log(e)})),e.$axios.get("diary").then((function(t){e.events=t.data}),(function(e){console.log(e)}))}))},methods:{shortFormatTimestamp:function(e){return Object(o.b)(e)}}},c=n(2),component=Object(c.a)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",[e.hasLoaded?n("card",{attrs:{heading:"Diary",icon:"calendar",tag:e.publicDiaries.length>0?{type:"is-success is-light",message:"Public"}:null}},[e.events.length>0?[n("div",{staticClass:"content pt-0 mt-0"},[n("ol",{attrs:{type:"1"}},e._l(e.nextThreeEvents,(function(t){return n("li",{key:t.id},[e._v("\n "+e._s(e.shortFormatTimestamp(t.start))+" to "+e._s(e.shortFormatTimestamp(t.end))+" - "+e._s(t.title)+"\n ")])})),0)])]:n("p",[e._v("\n There are no diary entries.\n ")]),e._v(" "),n("p",[e._v("\n You can "),n("nuxt-link",{attrs:{to:{name:"diary"}}},[e._v("\n manage\n ")]),e._v(" your diary.\n ")],1)],2):n("card",{attrs:{heading:"Diary",icon:"calendar"}},[n("p",[e._v("\n Loading...\n ")])])],1)}),[],!1,null,null,null);t.default=component.exports},514:function(e,t,n){"use strict";n.r(t);n(18),n(24);var r=n(69),o=n.n(r),l=n(340),c=n(503);o.a.extend(l),o.a.extend(c);var d={props:{birthdays:{type:Array,required:!0}},computed:{currentDate:function(){return o()()},todayBirthdays:function(){var e=this;return this.birthdays.filter((function(t){return e.compareDates(t.birthday)}))},otherBirthdays:function(){var e=this;return this.birthdays.filter((function(t){return!1===e.compareDates(t.birthday)}))}},methods:{compareDates:function(e){var t=o()(),n=o()(e);return t.format("DD-MM")===n.format("DD-MM")},calculateDisplayString:function(e){var t=this.calculateNewAge(e),n=this.calculateHowLongUntilBirthday(e);return"tomorrow"===n?"".concat(t," ").concat(n):"".concat(t," on ").concat(n)},calculateNewAge:function(e){var t=o()(),n=o()(e);n=n.year(t.year());var r=o()(n).diff(e,"years");return"".concat(r," years old")},calculateHowLongUntilBirthday:function(e){var t=o()(),n=o()(e);return(n=n.year(t.year())).isTomorrow()?"tomorrow":n.format("dddd")}}},m=n(2),component=Object(m.a)(d,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",[null!==e.birthdays&&e.birthdays.length>0?[e.todayBirthdays.length>0?[e._m(0),e._v(" "),e._l(e.todayBirthdays,(function(t){return n("p",{key:t.id,staticClass:"mb-0"},[e._v("\n "+e._s(t.name.first)+" "+e._s(t.name.last)+" ("+e._s(e.calculateNewAge(t.birthday))+" today)\n ")])}))]:e._e(),e._v(" "),e.otherBirthdays.length>0?[e._m(1),e._v(" "),e._l(e.otherBirthdays,(function(t){return n("p",{key:t.id,staticClass:"mb-0"},[e._v("\n "+e._s(t.name.first)+" "+e._s(t.name.last)+" ("+e._s(e.calculateDisplayString(t.birthday))+")\n ")])}))]:e._e()]:null!==e.birthdays&&0==e.birthdays.length?n("p",[e._v("\n No upcoming birthdays.\n ")]):n("p",[e._v("\n Loading...\n ")])],2)}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",{staticClass:"mb-0"},[n("b",[e._v("Today")])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",{staticClass:"mb-0"},[n("b",[e._v("Upcoming")])])}],!1,null,null,null);t.default=component.exports},515:function(e,t,n){"use strict";n.r(t);n(343);var r={props:{count:{type:Number},label:{type:String}}},o=n(2),component=Object(o.a)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",[n("div",[null!==e.count?n("p",{staticClass:"title"},[e._v("\n "+e._s(e.count)+"\n ")]):n("p",[e._v("\n ...\n ")]),e._v(" "),n("p",{staticClass:"heading"},[e._v("\n "+e._s(e.label)+"\n ")])])])}),[],!1,null,null,null);t.default=component.exports},594:function(e,t,n){"use strict";n.r(t);var r=n(469),o=(n(18),n(169),n(61)),l=n.n(o),c={mounted:function(){var e=this;this.$nextTick((function(){void 0===l.a.get("hidePersonalProfileCompletionMessage")&&(e.$axios.get("contact/members/".concat(e.$store.state.auth.id)).then((function(t){0===t.data.addresses.length&&e.thingsToAddress.push({message:"Please add at least one address",link:{name:"profile",query:{tab:"contact"}},id:10}),0===t.data.emails.length&&e.thingsToAddress.push({message:"Please add at least one email address",link:{name:"profile",query:{tab:"contact"}},id:20}),0===t.data.phones.length&&e.thingsToAddress.push({message:"Please add at least one phone number",link:{name:"profile",query:{tab:"contact"}},id:30})})),e.$axios.get("members/me/forms").then((function(t){t.data.filter((function(e){return"Complete"!==e.status})).length>0&&e.thingsToAddress.push({message:"Please complete all required forms",link:{name:"profile",query:{tab:"forms"}},id:40})})),e.$axios.get("contact/members/emergency/".concat(e.$store.state.auth.id)).then((function(t){0===t.data.length&&e.thingsToAddress.push({message:"Please add at least one emergency contact",link:{name:"profile",query:{tab:"emergency"}},id:50})})))}))},data:function(){return{thingsToAddress:[]}},methods:{tempHideCloseMessage:function(){l.a.set("hidePersonalProfileCompletionMessage",!0)}},computed:{pointsToAddress:function(){return Object(r.a)(this.thingsToAddress).sort((function(a,b){return a.id>b.id}))}}},d=n(2),component=Object(d.a)(c,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.thingsToAddress.length>0?n("section",{staticClass:"pb-2"},[n("b-message",{attrs:{title:"Incomplete Profile",type:"is-warning","aria-close-label":"Close message"},on:{close:function(t){return e.tempHideCloseMessage()}}},[n("div",{staticClass:"content"},[e._v("\n Please address the points below to complete your profile.\n "),n("ul",e._l(e.pointsToAddress,(function(t){return n("li",{key:t.id},[e._v("\n "+e._s(t.message)+"\n "),n("span",{staticClass:"pl-2"},[n("small",[e._v("("),n("nuxt-link",{attrs:{to:t.link}},[e._v("Address issue")]),e._v(")")],1)])])})),0)])])],1):e._e()}),[],!1,null,null,null);t.default=component.exports},595:function(e,t,n){"use strict";n.r(t);var r={components:{ProfileTiles:n(366).default},data:function(){return{members:null}},mounted:function(){var e=this;this.$nextTick((function(){e.$axios.get("members/athletes").then((function(t){e.members=t.data}))}))}},o=n(2),component=Object(o.a)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",[n("h1",{staticClass:"is-size-3"},[e._v("\n Your Athletes\n ")]),e._v(" "),n("profile-tiles",{attrs:{members:e.members,link:"athletes-id","search-bar":!1}})],1)}),[],!1,null,null,null);t.default=component.exports},597:function(e,t,n){"use strict";n.r(t);var r=n(422),o=n(514),l=n(513),c=n(512),d={components:{Card:r.default,DiaryCard:l.default,UpcomingBirthdays:o.default,VolunteerUpcomingEvents:c.default},data:function(){return{birthdays:null}},mounted:function(){var e=this;this.$nextTick((function(){e.$axios.get("members/birthdays").then((function(t){e.birthdays=t.data}))}))}},m=n(2),component=Object(m.a)(d,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",[n("volunteer-upcoming-events"),e._v(" "),n("div",{staticClass:"columns"},[n("div",{staticClass:"column"},[n("diary-card")],1),e._v(" "),n("div",{staticClass:"column"},[n("card",{attrs:{heading:"Upcoming Birthdays",icon:"cake-variant"}},[null!==e.birthdays?n("upcoming-birthdays",{attrs:{birthdays:e.birthdays}}):e._e()],1)],1)])],1)}),[],!1,null,null,null);t.default=component.exports},598:function(e,t,n){"use strict";n.r(t);var r={components:{Statistic:n(515).default},data:function(){return{uniqueMembers:null,athletes:null,guardians:null,volunteers:null}},computed:{account:function(){return this.$store.state.auth.active.aggregate}},mounted:function(){var e=this;this.$nextTick((function(){e.$axios.get("members/statistics").then((function(t){e.uniqueMembers=t.data.unique,e.athletes=t.data.athletes,e.guardians=t.data.guardians,e.volunteers=t.data.volunteers}))}))}},o=n(2),component=Object(o.a)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",[n("h2",{staticClass:"is-size-2 pb-5 has-text-centered"},[e._v("\n "+e._s(e.account.name)+"\n ")]),e._v(" "),n("nav",{staticClass:"level"},[n("div",{staticClass:"level-item has-text-centered"},[n("statistic",{attrs:{count:e.athletes,label:"Athletes"}})],1),e._v(" "),n("div",{staticClass:"level-item has-text-centered"},[n("div",[n("statistic",{attrs:{count:e.guardians,label:"Guardians"}})],1)]),e._v(" "),n("div",{staticClass:"level-item has-text-centered"},[n("div",[n("statistic",{attrs:{count:e.volunteers,label:"Volunteers"}})],1)]),e._v(" "),n("div",{staticClass:"level-item has-text-centered"},[n("div",[n("statistic",{attrs:{count:e.uniqueMembers,label:"Unique Members"}})],1)])])])}),[],!1,null,null,null);t.default=component.exports},734:function(e,t,n){"use strict";n.r(t);var r=n(598),o=n(597),l=n(595),c=n(148),d=(n(18),n(36),n(42),n(594)),m={name:"HomePage",components:{VolunteerGroupStatistics:r.default,VolunteerDashboard:o.default,GuardianDashboard:l.default,ProfileCompletion:d.default},mixins:[c.a,{methods:{permissionsOr:function(e){var t=this;return e.filter((function(e){return t.$store.state.auth.active.permissions.includes(e)})).length>0}}}],head:function(){return{title:"Athlete Manager"}}},f=n(2),component=Object(f.a)(m,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",[n("div",{staticClass:"pt-5"},[n("profile-completion"),e._v(" "),"Volunteer"===e.profileType&&"group"===e.accountType?[n("div",{staticClass:"pb-4"},[n("volunteer-group-statistics")],1),e._v(" "),n("volunteer-dashboard")]:e._e(),e._v(" "),"Volunteer"===e.profileType&&"region"===e.accountType?[n("p",[e._v("region volunteer")])]:"Guardian"===e.profileType?[n("guardian-dashboard")]:e._e()],2)])}),[],!1,null,null,null);t.default=component.exports}}]);