PageSourceSearch

https://brukshundklubben.se/assets/js/competitionlistblock.b99123ae84f236e8bb48.min.js

js brukshundklubben.se collected 2026-10-02 06:28:11 UTC 56,973 bytes, 1 lines download raw bytes

1(()=>{var t,e={66741:(t,e,n)=>{"use strict";var i=n(70538),r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"CompetitionListBlock"}},[i("h2",{style:{color:t.externalColor.H2Color}},[t._v(t._s(t.getTranslation("CompetitionListBlock.Competitions")))]),t._v(" "),i("div",{staticClass:"row descriptionmobile"},[i("div",{staticClass:"descriptionstatus"},[i("span",{staticClass:"circlegreen"}),i("span",{staticClass:"descriptiontext"},[t._v("\n                "+t._s(t.getTranslation("CompetitionListBlock.OpenForRegistration"))+"\n            ")])]),t._v(" "),i("div",{staticClass:"descriptionstatus"},[i("span",{staticClass:"circleyellow"}),i("span",{staticClass:"descriptiontext"},[t._v("\n                "+t._s(t.getTranslation("CompetitionListBlock.NotOpenedYet"))+"\n            ")])]),t._v(" "),i("div",{staticClass:"descriptionstatus"},[i("span",{staticClass:"circlered"}),i("span",{staticClass:"descriptiontext"},[t._v("\n                "+t._s(t.getTranslation("CompetitionListBlock.RegistrationClosed"))+"\n            ")])])]),t._v(" "),i("div",{staticClass:"search-header"},[i("div",{staticClass:"search-header-inner col col-md-10 offset-md-1 col-xl-10 offset-xl-1"},[i("div",{staticClass:"search-button-footer"},[i("div",{staticClass:"select-boxes"},[i("div",{staticClass:"select-col"},[i("select",{directives:[{name:"model",rawName:"v-model",value:t.selectedType,expression:"selectedType"}],attrs:{"aria-label":"getTranslation('CompetitionListBlock.Types')"},on:{change:[function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.selectedType=e.target.multiple?n:n[0]},function(e){return t.onChangeType(e)}]}},t._l(t.typeFilter,(function(e){return i("option",{domProps:{value:e.value}},[t._v(t._s(e.label))])})),0)]),t._v(" "),i("div",{staticClass:"select-col"},[i("select",{directives:[{name:"model",rawName:"v-model",value:t.selectedClass,expression:"selectedClass"}],attrs:{"aria-label":"getTranslation('CompetitionListBlock.Classes')"},on:{change:[function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.selectedClass=e.target.multiple?n:n[0]},function(e){return t.onChangeClass(e)}]}},t._l(t.classFilter,(function(e){return i("option",{domProps:{value:e.value}},[t._v(t._s(e.label))])})),0)]),t._v(" "),i("div",{staticClass:"select-col"},[i("select",{directives:[{name:"model",rawName:"v-model",value:t.selectedOwner,expression:"selectedOwner"}],attrs:{"aria-label":"getTranslation('CompetitionListBlock.Organizers')"},on:{change:[function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.selectedOwner=e.target.multiple?n:n[0]},function(e){return t.onChangeOwner(e)}]}},t._l(t.ownerFilter,(function(e){return i("option",{domProps:{value:e.value}},[t._v(t._s(e.label))])})),0)]),t._v(" "),i("div",{staticClass:"select-col"},[i("select",{directives:[{name:"model",rawName:"v-model",value:t.selectedStatus,expression:"selectedStatus"}],attrs:{"aria-label":"getTranslation('CompetitionListBlock.Status')"},on:{change:[function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.selectedStatus=e.target.multiple?n:n[0]},function(e){return t.onChangeStatus(e)}]}},t._l(t.statusFilter,(function(e){return i("option",{domProps:{value:e.value}},[t._v(t._s(e.label))])})),0)])])])]),t._v(" "),i("div",{staticClass:"resetfilters col col-md-10 offset-md-1 col-xl-10 offset-xl-1"},[i("span",{staticClass:"reset-text"},[i("a",{attrs:{alt:'this.translations["CompetitionListBlock.ClearFilters"]'},on:{click:t.resetFilters}},[t._v("\n                    "+t._s(t.getTranslation("CompetitionListBlock.ClearFilters"))+"\n                ")])]),t._v(" "),i("img",{staticClass:"reset-icon",attrs:{src:n(19866),alt:"getTranslation('CompetitionListBlock.ClearFilters')"},on:{click:t.resetFilters}})]),t._v(" "),i("div",{staticClass:"selected-filters-container col col-md-10 offset-md-1 col-xl-8 offset-xl-2"},[""!=t.selectedTypeLabel?i("div",{staticClass:"selected-filter"},[t._v("\n                "+t._s(t.selectedTypeLabel)),i("button",{staticClass:"close",attrs:{"aria-label":t.getTranslation("CompetitionListBlock.RemoveFilterFor")+t.selectedTypeLabel},on:{click:function(e){return t.resetTypeFilter()}}},[t._v("\n                    ×\n                ")])]):t._e(),t._v(" "),""!=t.selectedClassLabel?i("div",{staticClass:"selected-filter"},[t._v("\n                "+t._s(t.selectedClassLabel)),i("button",{staticClass:"close",attrs:{"aria-label":t.getTranslation("CompetitionListBlock.RemoveFilterFor")+" "+t.selectedClassLabel},on:{click:function(e){return t.resetClassFilter()}}},[t._v("\n                    ×\n                ")])]):t._e(),t._v(" "),""!=t.selectedOwner?i("div",{staticClass:"selected-filter"},[t._v("\n                "+t._s(t.selectedOwner)),i("button",{staticClass:"close",attrs:{"aria-label":t.getTranslation("CompetitionListBlock.RemoveFilterFor")+" "+t.selectedOwner},on:{click:function(e){return t.resetOwnerFilter()}}},[t._v("\n                    ×\n                ")])]):t._e(),t._v(" "),""!=t.selectedStatusLabel?i("div",{staticClass:"selected-filter"},[t._v("\n                "+t._s(t.selectedStatusLabel)),i("button",{staticClass:"close",attrs:{"aria-label":t.getTranslation("CompetitionListBlock.RemoveFilterFor")+" "+t.selectedStatusLabel},on:{click:function(e){return t.resetStatusFilter()}}},[t._v("\n                    ×\n                ")])]):t._e()])]),t._v(" "),i("div",{staticClass:"row"},[i("div",{staticClass:"results col col-md-10 offset-md-1 col-xl-8 offset-xl-2"},[i("div",{class:"loader "+(t.loading?"":"hide")},[i("dot-loader",{attrs:{loading:t.loading,color:t.loadingColor,size:t.loadingSize}})],1),t._v(" "),!t.loading&&t.competitionsData.count>
10?i("ul",{staticClass:"competitionlist"},t._l(t.currentlyShownPage.competitions,(function(e){return i("li",{staticClass:"competition-item"},[i("div",{staticClass:"competitioninfo"},[i("div",{staticClass:"competitiondateandstatuscontainer col-2"},[i("div",{staticClass:"competitionyear"},[t._v("\n                                "+t._s(e.competitionYear)),i("br"),t._v(" "),i("span",{staticClass:"competitiondate"},[t._v("\n                                    "+t._s(e.competitionDay)+" "+t._s(e.competitionMonth)+"\n                                ")]),i("br"),t._v(" "),e.competitionDate!=e.competitionEndDate?i("span",{staticClass:"competitiondate"},[t._v("\n                                    "+t._s(e.competitionEndDay)+" "+t._s(e.competitionEndMonth)+"\n                                ")]):t._e()]),t._v(" "),i("div",{staticClass:"competitionstate"},[i("span",{staticClass:"circle",class:t.getStateColor(e),attrs:{"aria-label":t.getStateAriaLabel(e)}})])]),t._v(" "),i("div",{staticClass:"competitioninfo-text"},[i("div",{staticClass:"competitioninfo-inner"},[i("div",{staticClass:"competitiontitle"},[i("a",{style:{color:t.externalColor.AnchorTagColor},attrs:{href:t.competitionUrl+"?id="+e.id,alt:e.competitionTitle}},[t._v(t._s(e.competitionTitle))])]),t._v(" "),i("div",{staticClass:"competitionname"},[i("a",{attrs:{href:t.competitionUrl+"?id="+e.id,alt:e.competitionName}},[t._v(t._s(e.competitionName))])]),t._v(" "),i("div",{staticClass:"competitionclasses"},t._l(t.addLetterSuffix(e.classesStatus),(function(e){return i("div",{class:"competitionclass "+(e.Status?"":"disabled")},[t._v("\n                                        "+t._s(e.displayName)+"\n                                    ")])})),0)]),t._v(" "),i("div",{staticClass:"competitiondetails"},[null==e.distanceFromUser||isNaN(e.distanceFromUser)||0==e.distanceFromUser?t._e():i("div",{staticClass:"distance"},[i("img",{staticClass:"road-icon",attrs:{src:n(86645),alt:"Avstånd"}}),t._v("\n                                    "+t._s(e.distanceFromUser.toFixed(1))+" km\n                                ")]),t._v(" "),i("div",{staticClass:"owner"},[i("img",{attrs:{src:n(76051),alt:e.ownerName}}),t._v(" "),""!=e.url?i("a",{attrs:{href:e.url,title:e.ownerName}},[t._v(t._s(e.ownerName))]):t._e()]),t._v(" "),i("div",{staticClass:"deadline"},[i("img",{attrs:{src:n(10057)}}),t._v(" "),i("span",{class:{deadlinetextred:"late"==e.status}},[t._v("\n                                        "+t._s(t.getTranslation("CompetitionListBlock.LastRegister"))+"\n                                        "+t._s(e.registrationDeadlineDate.substring(0,10))+" "),"late"==e.status?i("span",[t._v("\n                                            "+t._s(t.getTranslation("CompetitionListBlock.OpenForLateRegister"))+"\n                                        ")]):t._e()])])]),t._v(" "),i("div",{staticClass:"mobileclassescontainer",attrs:{id:"mobileclassescontainer"}},[i("span",{staticClass:"mobileclassestext",on:{click:function(n){return t.toggleClassDiv(e.id)}}},[t._v("\n                                    "+t._s(t.getTranslation("CompetitionListBlock.ShowClasses"))),i("img",{class:{rotated:t.isMobileClassOpened(e.id)},attrs:{src:n(91534),alt:"getTranslation('CompetitionListBlock.ShowClasses')"}})]),t._v(" "),i("div",{staticClass:"mobileclasses",class:{openedclass:t.isMobileClassOpened(e.id)},attrs:{id:e.id}},t._l(t.addLetterSuffix(e.classesStatus),(function(e){return i("div",{class:"mobileclass "+(e.Status?"":"disabled")},[t._v("\n                                        "+t._s(e.displayName)+"\n                                    ")])})),0)])])])])})),0):t._e(),t._v(" "),i("div",{staticClass:"row descriptiondesktop"},[i("div",{staticClass:"col"},[i("span",{staticClass:"circlegreen"}),i("span",{staticClass:"descriptiontext"},[t._v("\n                        "+t._s(t.getTranslation("CompetitionListBlock.OpenForRegistration"))+"\n                    ")]),t._v(" "),i("span",{staticClass:"circleyellow"}),i("span",{staticClass:"descriptiontext"},[t._v("\n                        "+t._s(t.getTranslation("CompetitionListBlock.NotOpenedYet"))+"\n                    ")]),t._v(" "),i("span",{staticClass:"circlered"}),i("span",{staticClass:"descriptiontext"},[t._v("\n                        "+t._s(t.getTranslation("CompetitionListBlock.RegistrationClosed"))+"\n                    ")]),t._v(" "),i("div",{staticClass:"morecompetitions"},[i("a",{style:{color:t.externalColor.AnchorTagColor},attrs:{href:t.competitionSearchUrl}},[t._v("\n                            "+t._s(t.getTranslation("CompetitionListBlock.MoreCompetitions"))+"\n                        ")])])])]),t._v(" "),0==t.currentlyShownPage.count?i("div",{staticClass:"noresult"},[t._v("\n                "+t._s(t.getTranslation("CompetitionListBlock.NoResults"))+"\n            ")]):t._e(),t._v(" "),i("div",{staticClass:"pagination-container"},[i("ul",{staticClass:"pagination"},[i("li",[i("button",{class:1==t.selectedPage?"prev disabled":"prev",attrs:{disabled:1==t.selectedPage,"aria-label":"getTranslation('CompetitionListBlock.PreviousPage')"},on:{click:function(e){return t.goToPage(t.selectedPage-1)}}},[i("img",{attrs:{src:n(64833),alt:"getTranslation('CompetitionListBlock.PreviousPage')"}})])]),t._v(" "),t.noOfPages>5&&t.selectedPage>3?i("li",{staticClass:"dots"},[t._v("...")]):t._e(),t._v(" "),t._l(t.noOfPages,(function(e,n){return e>=t.lowestToShow&&e<=t.largestToShow?i("li",[i("button",{class:t.selectedPage==e?"pagenumber active":"pagenumber",on:{click:function(n){return t.goToPage(e)}}},[i("span",[t._v(t._s(e))])])]):t._e()})),t._v(" "),0==t.noOfPages?i("li",{staticClass:"pagenumber active"},[t._v("1")]):t._e(),t._v(" "),t.noOfPages>5&&t.selectedPage<t.noOfPages-2?i("li",{staticClass:"dots"},[t._v("...")]):t._e(),t._v(" "),i("li",[i("button",{class:t.selectedPage==t.noOfPages||0==t.noOfPages?"next disabled":"next",attrs:{disabled:t.selectedPage==t.noOfPages||0==t.noOfPages,"aria-label":"getTranslation('CompetitionListBlock.NextPage')"},on:{click:function(e){return t.goToPage(t.selectedPage+1)}}},[i("img",{attrs:{src:n(64833),alt:"getTranslation('CompetitionListBlock.NextPage')"}})])])],2)])])]),t._v(" "),i("div",{staticClass:"morecompetitionsmobile"},[i("a",{attrs:{href:t.competitionSearchUrl}},[t._v(t._s(t.getTranslation("CompetitionListBlock.MoreCompetitions")))])])])};r._withStripped=!0;var o,a=n(92137),s=n(96156),c=n(87757),l=n.n(c),u=n(9669),p=n.n(u),d=function(t,e,n){var i=t+"get_competitionClasses?type="+e;return p().get(i).then((function(t){return t}))},f=(o={sendRequest:function(t,e){return(0,a.Z)(l().mark((function n(){var i,r;return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=t,r=e,console.log("Send post..."),n.abrupt("return",fetch(i.request.url,{method:i.request.method,headers:{"Content-Type":"application/json",Accept:"application/json"},mode:i.request.mode,body:JSON.stringify(r)}).then((function(t){console.log("Sended data",t)})));case 4:case"end":return n.stop()}}),n)})))()},postCompetitionResultWithPWA:function(t,e){return(0,a.Z)(l().mark((function n(){return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",fetch(t,{method:"post",headers:{"Content-Type":"application/json",Accept:"application/json"},mode:"cors",body:JSON.stringify(e)}).then((function(t){return t.json()})).then((function(t){return t})));case 1:case"end":return n.stop()}}),n)})))()},postSpecialsokResultWithPWA:function(t,e){return(0,a.Z)(l().mark((function n(){return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",fetch(t,{method:"post",headers:{"Content-Type":"application/json",Accept:"application/json"},mode:"cors",body:JSON.stringify(e)}).then((function(t){return t.json()})).then((function(t){return t})));case 1:case"end":return n.stop()}}),n)})))()},postBruksResultWithPWA:function(t,e){return(0,a.Z)(l().mark((function n(){return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",fetch(t,{method:"post",headers:{"Content-Type":"application/json",Accept:"application/json"},mode:"cors",body:JSON.stringify(e)}).then((function(t){return t.json()})).then((function(t){return t})));case 1:case"end":return n.stop()}}),n)})))()},postLydnadResultWithPWA:function(t,e){return(0,a.Z)(l().mark((function n(){return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",fetch(t,{method:"post",headers:{"Content-Type":"application/json",Accept:"application/json"},mode:"cors",body:JSON.stringify(e)}).then((function(t){return t.json()})).then((function(t){return t})));case 1:case"end":return n.stop()}}),n)})))()},fetchNews:function(){return(0,a.Z)(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",fetch("https://sbktavling.brukshundklubben.se/api/news",{method:"get",headers:{"Content-Type":"application/json",Accept:"application/json"},mode:"cors"}).then((function(t){return t.json()})).then((function(t){return t})));case 2:case"end":return t.stop()}}),t)})))()},fetchPerson:function(){return(0,a.Z)(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",fetch("https://dev.brukshundklubben.se/api/get_person",{method:"get",headers:{"Content-Type":"application/json",Accept:"application/json"},mode:"cors"}).then((function(t){return t.json()})).then((function(t){return t})));case 2:case"end":return t.stop()}}),t)})))()},create_account:function(t,e){var n=t;return p().post(n,e).then((function(t){return t}))},send_competitionApply:function(t,e){var n=t;return p().post(n,e).then((function(t){return t}))},post_add_dog_handler:function(t,e){var n=t;return p().post(n,e).then((function(t){return t}))},post_remove_dog_handler:function(t,e){var n=t;return p().post(n,e).then((function(t){return t}))},post_approve_dog_handler:function(t,e){var n=t;return p().post(n,e).then((function(t){return t}))},post_set_new_driver:function(t,e){var n=t;return p().post(n,e).then((function(t){return t}))},post_withdraw_registrations:function(t,e){var n=t;return p().post(n,e).then((function(t){return t}))},post_saveUserClubs:function(t,e){var n=t;return p().post(n,e).then((function(t){return t}))},get_handler_competitions:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_userClubByTypeId:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_driverRequests:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_competitionProfile:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_clubs:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_types:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_competitionTypes:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_competitionCategories:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_competitionOptions:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_competitionClasses:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_competitionOrganizers:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_competitionDistricts:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_insideFee:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_ruleUrl:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_gdprUrl:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_all_unpaid_registrations:function(t,e,n){var i,r,o=t+"get_all_unpaid_registrations?currentPage="+e+"&query="+n.query+"&startDate="+(null!==(i=n.startDate)&&void 0!==i?i:"")+"&endDate="+(null!==(r=n.endDate)&&void 0!==r?r:"");return p().get(o).then((function(t){return t}))},get_all_paid_registrations:function(t,e,n){var i,r,o=t+"get_all_paid_registrations?currentPage="+e+"&query="+n.query+"&startDate="+(null!==(i=n.startDate)&&void 0!==i?i:"")+"&endDate="+(null!==(r=n.endDate)&&void 0!==r?r:"");return p().get(o).then((function(t){return t}))},get_all_refunded_registrations:function(t,e,n){var i,r,o=t+"get_all_refunded_registrations?currentPage="+e+"&query="+n.query+"&startDate="+(null!==(i=n.startDate)&&void 0!==i?i:"")+"&endDate="+(null!==(r=n.endDate)&&void 0!==r?r:"");return p().get(o).then((function(t){return t}))},get_all_class_change_registrations:function(t,e,n){var i,r,o=t+"get_all_class_change_registrations?currentPage="+e+"&query="+n.query+"&startDate="+(null!==(i=n.startDate)&&void 0!==i?i:"")+"&endDate="+(null!==(r=n.endDate)&&void 0!==r?r:"");return p().get(o).then((function(t){return t}))}
1,get_all_archived_competitions:function(t,e,n){var i,r,o=t+"get_all_archived_competitions?currentPage="+e+"&query="+n.query+"&startDate="+(null!==(i=n.startDate)&&void 0!==i?i:"")+"&endDate="+(null!==(r=n.endDate)&&void 0!==r?r:"");return p().get(o).then((function(t){return t}))},get_all_upcoming_registrations:function(t,e,n){var i,r,o=t+"get_all_upcoming_registrations?currentPage="+e+"&query="+n.query+"&startDate="+(null!==(i=n.startDate)&&void 0!==i?i:"")+"&endDate="+(null!==(r=n.endDate)&&void 0!==r?r:"");return p().get(o).then((function(t){return t}))},get_registrationStartedUrl:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_dogs_by_search:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_user_exists:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_cancelUrl:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_editLink:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_registrationAllowed:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_paymentReference:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_paymentByRegistrationId:function(t){var e=t;return p().get(e).then((function(t){return t.data}))},get_dogsAlreadyRegistered:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_competitionStatus:function(t){var e=t;return p().get(e).then((function(t){return t}))},get_competitionTasks:function(t){var e=t;return p().get(e).then((function(t){return t}))}},(0,s.Z)(o,"get_competitionStatus",(function(t){var e=t;return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"post_registerForCompetition",(function(t,e){var n=t;return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"post_cancelRegistration",(function(t,e){var n=t;return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"post_cancelRegistrations",(function(t,e){var n=t;return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"post_addPayment",(function(t,e){var n=t;return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"post_swishGiroPaymentDone",(function(t,e){var n=t+"?paymentId="+e;return p().post(n).then((function(t){return t}))})),(0,s.Z)(o,"silentSignIn",(function(t){var e=t;return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"get_membershipsAndExternalOrganizers",(function(t,e){var n=t;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"get_userstarts",(function(t,e){var n=t+"get_userstarts";return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"get_officers",(function(t){var e=t+"get_officers";return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"post_newcompetitionofficers",(function(t,e,n){var i=t+"post_addcompetitionofficers";return p().post(i,e).then((function(t){return t}))})),(0,s.Z)(o,"post_removecompetitionofficers",(function(t,e,n){var i=t+"post_removecompetitionofficers";return p().post(i,e).then((function(t){return t}))})),(0,s.Z)(o,"get_administer_competition_url",(function(t){var e=t+"get_administer_competition_url";return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"get_competition_url",(function(t){var e=t+"get_competition_url";return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"get_my_economy_url",(function(t){var e=t+"get_my_economy_url";return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"get_competitionAdminPageUrl",(function(t){var e=t;return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"get_resultReportUrl",(function(t){var e=t+"get_resultReportUrl";return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"get_myPagesCompetitionsUrl",(function(t){var e=t+"get_myPagesCompetitionsUrl";return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"get_my_dogs_url",(function(t){var e=t+"get_my_dogs_url";return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"get_my_competitionProfile_url",(function(t){var e=t+"get_my_competitionProfile_url";return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"put_openCompetitionClassForRegistration",(function(t){var e=t;return p().put(e).then((function(t){return t}))})),(0,s.Z)(o,"put_closeCompetitionClassForRegistration",(function(t){var e=t;return p().put(e).then((function(t){return t}))})),(0,s.Z)(o,"post_startCompetition",(function(t,e){var n=t+"start_competition?competitionId="+e;return p().post(n).then((function(t){return t}))})),(0,s.Z)(o,"get_generateArchiveFile",(function(t,e){var n=t+"get_generateArchiveFile?c
1ompetitionId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"get_markAsArchived",(function(t,e){var n=t+"get_markAsArchived?competitionId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"get_markCompetitionAsVerified",(function(t,e){var n=t+"get_markCompetitionAsVerified?competitionId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"get_CompetitionGetCompetitionResultListByCompetitionId",(function(t,e){var n=t+"get_competitionresultlistbycompetitionid?competitionId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"get_registrationUrl",(function(t){var e=t+"get_registrationUrl";return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"update_competitionApply",(function(t,e){var n=t;return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"mark_registrations_as_paid",(function(t,e){var n=t+"mark_registrations_as_paid";return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"get_classRegitrations",(function(t,e,n){var i=t+"get_classRegistrations?competitionClassId="+e+"&typeId="+n;return p().get(i).then((function(t){return t}))})),(0,s.Z)(o,"get_priorityRules",(function(t,e,n,i,r){var o=t+"get_priorityRules?classId="+e+"&typeId="+n+"&competitionTypeLabel="+i+"&organizerType="+r;return p().get(o).then((function(t){return t}))})),(0,s.Z)(o,"get_registrationDetails",(function(t,e,n){var i=t+"get_registrationDetails?membercareUserId="+e;return n&&(i=t+"get_registrationDetails?membercareUserId="+e+"&getMembershipDetails="+n),p().get(i).then((function(t){return t}))})),(0,s.Z)(o,"get_registrationName",(function(t,e){var n=t+"get_registrationName?membercareUserId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"post_prioritizeParticipants",(function(t,e,n,i,r,o){var a=t+"post_prioritizeParticipants",s={selectedParticipants:e,participantData:n,selectedClass:i,classLevel:r,competition:o};return p().post(a,s).then((function(t){return t}))})),(0,s.Z)(o,"get_hasPrioritizeContainer",(function(t,e){var n=t+"get_hasPrioritizeContainer?classId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"post_savePaymentInfo",(function(t,e){var n=t+"post_savePaymentInfo";return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"get_typeContacts",(function(t,e,n){var i=t+"get_typeContacts?typeId="+e+"&organizerId="+n;return p().get(i).then((function(t){return t}))})),(0,s.Z)(o,"post_addContact",(function(t,e){var n=t+"post_addContact";return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"post_removeContact",(function(t,e){var n=t+"post_removeContact";return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"get_all_unpaid_competitions",(function(t){var e=t+"get_all_unpaid_competitions";return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"post_prioritizeBruksParticipants",(function(t,e,n,i,r){var o=t,a={classSelected:e,level:n,comp:i,rules:r};return p().post(o,a).then((function(t){return t}))})),(0,s.Z)(o,"post_verifyResults",(function(t,e){var n=t+"post_verifyResults?competitionClassId="+e.competitionClassId+"&competitionId="+e.competitionId;return p().post(n).then((function(t){return t}))})),(0,s.Z)(o,"post_revertVerifyResults",(function(t,e){var n=t+"post_revertVerifyResults?competitionClassId="+e.competitionClassId+"&competitionId="+e.competitionId;return p().post(n).then((function(t){return t}))})),(0,s.Z)(o,"post_generateCompetitionsReport",(function(t,e){console.log(e);var n=t+"post_generateCompetitionsReport";return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"get_notifications",(function(t){var e=t;return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"get_notification_url",(function(t){var e=t;return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"dismiss_notification",(function(t){var e=t;return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"post_generateOfficerAssignmentList",(function(t,e){var n=t+"post_generateOfficerAssignmentList";return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"get_officerSearch",(function(t,e){var n=t+"get_officerSearch?searchTerm="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"get_personSearchDogs",(function(t,e){var n=t+"get_personSearchDogs?membercareId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"get_PersonSearchByDogId",(function(t,e){var n=t+"get_PersonSearchByDogId?dogId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"get_ruleListModel",(function(t,e){var n=t+"get_ruleListModel";return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"get_userClubByTypeIdAndMembercareId",(function(t,e,n){var i=t+"get_userClubByTypeIdAndMembercareId?typeId="+e+"&membercareId="+n;return p().get(i).then((function(t){return t}))})),(0,s.Z)(o,"post_addRegistrationToCompetition",(function(t,e){var n=t+"post_addRegistrationToCompetition";return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"get_officerDetails",(function(t,e){var n=t+"get_officerDetails?membercareUserId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"get_igpSmQualification",(function(t){var e=t+"get_igpSmQualification";return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"get_lydnadSmQualification",(function(t){var e=t+"get_lydnadSmQualification";return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"get_bruksPatrullSmQualification",(function(t){var e=t+"get_bruksPatrullSmQualification";return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"get_bruksSkyddSmQualification",(function(t){var e=t+"get_bruksSkyddSmQualification";return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"get_bruksRapportSmQualification",(function(t){var e=t+"get_bruksRapportSmQualification";return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"get_bruksSokSmQualification",(function(t){var e=t+"get_bruksSokSmQualification";return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"get_bruksSparSmQualification",(function(t){var e=t+"get_bruksSparSmQualification";return p().get(e).then((function(t){return t}))}
1)),(0,s.Z)(o,"get_qualifiedForRallySM",(function(t){var e=t+"get_qualifiedForRallySM";return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"get_currentactivecompetitions",(function(t){console.log(t);var e=t+"get_currentactivecompetitions";return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"post_editCompetition",(function(t,e){var n=t;return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"check_dog",(function(t,e){var n=t+"check_dog?dogId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"update_userDog",(function(t,e){var n=t;return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"get_dogByRegistrationNumber",(function(t,e){var n=t+"get_dogByRegistrationNumber?dogReg="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"get_adminDogSearch",(function(t,e){var n=t+"get_adminDogSearch?dogReg="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"post_userDog",(function(t,e,n){var i=t+"post_userDog?dogId="+e+"&membercareUserId="+n;return p().post(i).then((function(t){return t}))})),(0,s.Z)(o,"revertShuffle",(function(t,e){var n=t+"revertShuffle?competitionClassId="+e;return p().post(n).then((function(t){return t}))})),(0,s.Z)(o,"post_addStarterToCompetition",(function(t,e){var n=t+"post_addStarterToCompetition";return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"get_allUserLicenses",(function(t){var e=t;return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"get_UserLicenses",(function(t){var e=t;return p().get(e).then((function(t){return t}))})),(0,s.Z)(o,"get_hidingPlaces",(function(t,e){var n=t+"get_hidingPlaces?competitionClassId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"post_saveHidingPlaces",(function(t,e){var n=t+"post_saveHidingPlaces";return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"post_saveRefereePairs",(function(t,e){var n=t+"post_saveRefereePairs";return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"get_refereePairs",(function(t,e){var n=t+"get_refereePairs?competitionClassId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"get_unpaidManuallyAddedRegistrations",(function(t,e){var n=t+"get_unpaidManuallyAddedRegistrations?competitionId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"post_changePaymentStatus",(function(t,e,n){var i=t+"post_changePaymentStatus?status="+n;return p().post(i,e).then((function(t){return t}))})),(0,s.Z)(o,"get_competition_and_registration_information",(function(t,e){var n=t+"get_competition_and_registration_information?competitionId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"get_name_email",(function(t,e){var n=t+"get_name_email?membercareUserId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"get_total_economy_report",(function(t,e){var n,i,r,o,a=t+"get_total_economy_report?startDate="+(null!==(n=e.startDate)&&void 0!==n?n:"")+"&endDate="+(null!==(i=e.endDate)&&void 0!==i?i:"")+"&economyFilter="+(null!==(r=e.selectedEconomyFilter)&&void 0!==r?r:"")+"&economyFilterCompetition="+(null!==(o=e.selectedEconomyFilterCompetition)&&void 0!==o?o:"");return p().get(a).then((function(t){return t}))})),(0,s.Z)(o,"edit_competition_participants",(function(t,e){var n=t+"edit_competition_participants";return p().post(n,e).then((function(t){return t}))})),(0,s.Z)(o,"get_markCompetitionAsWithdrawn",(function(t,e){var n=t+"get_markCompetitionAsWithdrawn?competitionId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"get_markClassAsWithdrawn",(function(t,e){var n=t+"get_markClassAsWithdrawn?classId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"get_markCompetitionAsInvoiced",(function(t,e){var n=t+"get_markCompetitionAsInvoiced?competitionId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"get_resetArchiving",(function(t,e){var n=t+"get_resetArchiving?competitionId="+e;return p().get(n).then((function(t){return t}))})),(0,s.Z)(o,"reopenCompetition",(function(t,e){return p().get("".concat(t,"reopenCompetition?competitionId=").concat(e)).then((function(t){return t.data}))}
1)),(0,s.Z)(o,"updateSKKDogData",(function(t,e){var n=t+"updateSKKDogData?dogId="+e;return p().post(n).then((function(t){return t}))})),(0,s.Z)(o,"get_participantsForPdf",(function(t,e){var n=t+"get_participantsForPdf?competitionClassId="+e;return p().get(n).then((function(t){return t}))})),o),g=n(22957),m=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"refund-container"},[n("select",{directives:[{name:"model",rawName:"v-model",value:t.refundReason,expression:"refundReason"}],attrs:{title:"Välj orsak för återbetalning"},on:{change:[function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.refundReason=e.target.multiple?n:n[0]},t.handleChange]}},[n("option",{attrs:{value:"null",disabled:"",selected:""}},[t._v("-- Välj orsak för återbetalning --")]),t._v(" "),t._l(t.refundReasons,(function(e){return n("option",{key:e.id,domProps:{value:e.id}},[t._v("\n            "+t._s(e.name)+"\n        ")])}))],2),t._v(" "),n("button",{on:{click:function(e){return t.refund()}}},[t._v("Återbetala anmälningsavgift")])])};m._withStripped=!0;const h={name:"StripeRefund",props:{apiUrl:String,competitionChargeId:String,competitionRefundAmount:String|Number},data:function(){return{fakeChargeId:"ch_3N3aiKFj33GY9Kjt0JZC5upD",refundReason:null,refundReasons:[]}},mounted:function(){this.getRefundReasons()},methods:{handleChange:function(t){this.refundReason=t.target.value},refund:function(){if(null!==this.refundReason){var t={competitionChargeId:this.fakeChargeId,refundReasonId:this.refundReason};(function(t,e){var n=t+"stripe_refund_payment";return p().post(n,e).then((function(t){return t}))})(this.apiUrl,t).then(function(){var t=(0,a.Z)(l().mark((function t(e){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(200===e.data){t.next=3;break}return alert("Något gick fel med din återbetalning."),t.abrupt("return");case 3:alert("Återbetalningen genomförd utan problem!");case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){alert("Något gick fel med din återbetalning.")}))}else alert("Vänligen välj en orsak för återbetalningen.")},getRefundReasons:function(){var t,e,n=this;(t=this.apiUrl,e=t+"get_refund_reasons",p().get(e).then((function(t){return t}))).then((function(t){n.refundReasons=t.data}))}}};var v=n(51900),_=(0,v.Z)(h,m,[],!1,null,null,null);_.options.__file="sbk_competition/templates/pages/sbkcompetition/stripe/StripeRefund.vue";const C=_.exports;function b(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function S(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}const w={name:"CompetitionListBlock",components:{DotLoader:g.DotLoader,StripeRefund:C},props:{content:Object,apiBaseUrl:String,translations:Object,externalColor:Object,competitionSearchUrl:String},data:function(){return{loading:!1,loadingColor:"#183a68",loadingSize:"32px",competitionUrl:"",competitionsData:{competitions:[{id:Number,competitionName:String,competitionTitle:String,competitionDate:Date,competitionYear:String,competitionMonth:String,competitionDay:String,competitionEndDate:Date,competitionEndMonth:String,competitionEndDay:String,registrationStartDate:Date,registrationDeadlineDate:Date,status:String,ownerName:String,locationCoords:String,distanceFromUser:Number,classes:[],classesStatus:[]}],count:Number},currentlyShownPage:{results:[{id:Number,competitionName:String,competitionTitle:String,competitionDate:Date,competitionYear:String,competitionMonth:String,competitionDay:String,competitionEndDate:Date,competitionEndMonth:String,competitionEndDay:String,openingDate:Date,status:String,closingDate:Date,ownerName:String,locationCoords:String,distanceFromUser:Number,classes:[],classesStatus:[]}],count:Number},translationCompetition:String,amountOfDaysBeforeClosure:Number,deadlineRedDate:Date,noOfItemsPerPage:Number,selectedPage:1,noOfPages:1,lowestToShow:1,largestToShow:5,selectedStatus:"",selectedStatusLabel:"",selectedType:"",selectedTypeLabel:"",selectedOwner:"",selectedClass:"",selectedClassLabel:"",statusFilter:[{label:this.getTranslation("CompetitionListBlock.Status"),value:""},{label:this.getTranslation("CompetitionListBlock.OpenForRegistration"),value:"opened"},{label:this.getTranslation("CompetitionListBlock.NotOpenedYet"),value:"published"},{label:this.getTranslation("CompetitionListBlock.RegistrationClosed"),value:"closed"}],typeFilter:[{label:this.getTranslation("CompetitionListBlock.Types"),value:""}],ownerFilter:[{label:this.getTranslation("CompetitionListBlock.Organizers"),value:""}],classFilter:[{label:this.getTranslation("CompetitionListBlock.Classes"),value:""}],userCoordinates:{lat:null,lng:null},openedMobileClasses:[],originalCompetitionData:{}}},methods:{addLetterSuffix:function(t){var e,n={},i=JSON.parse(JSON.stringify(t)).map((function(t){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
1e%2?S(Object(n),!0).forEach((function(e){(0,s.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t)})),r=[],o={},a=b(i.filter((function(t){return!t.DoubledClassFor})));try{for(a.s();!(e=a.n()).done;){var c=e.value.ClassName;o[c]=(o[c]||0)+1}}catch(t){a.e(t)}finally{a.f()}var l,u=b(i.filter((function(t){return!t.DoubledClassFor})));try{var p=function(){var t=l.value,e=t.ClassName;n[e]=(n[e]||0)+1;var a=String.fromCharCode(65+n[e]-1);o[e]>1?t.displayName="".concat(e," ").concat(a):t.displayName="".concat(e),(d=i.find((function(e){return e.DoubledClassFor===t.Id})))?(d.displayName="".concat(t.displayName," 2"),t.displayName="".concat(t.displayName," 1"),r.push(t),r.push(d)):r.push(t)};for(u.s();!(l=u.n()).done;){var d;p()}}catch(t){u.e(t)}finally{u.f()}return r},getTranslation:function(t){return null!=this.translations&&null!=this.translations[t]?this.translations[t]:"{{"+t+"}}"},getDistance:function(t,e){var n=function(t){return t*(Math.PI/180)},i=n(t-this.userCoordinates.lat),r=n(e-this.userCoordinates.lng),o=Math.sin(i/2)*Math.sin(i/2)+Math.cos(n(this.userCoordinates.lat))*Math.cos(n(t))*Math.sin(r/2)*Math.sin(r/2);return 2*Math.asin(Math.sqrt(o))*6371},checkForValidLatLong:function(t){var e=NaN;if(null!=this.userCoordinates.lat&&null!=this.userCoordinates.lng){var n=t.LocationCoords;if(null!=n){var i=n.match(/\b(\d{2}\.\d{3,13})/g);2==(null==i?void 0:i.length)&&(e=this.getDistance(i[0],i[1]))}}return e},updateOwnersArray:function(t){var e=this,n=JSON.parse(t);(n=n.sort((function(t,e){return t.label<e.label?-1:t.label>e.label?1:0}))).forEach((function(t){e.ownerFilter.push({label:t.Name,value:t.Name})}))},updateTypesArray:function(t){var e=this;JSON.parse(t).results.forEach((function(t){e.typeFilter.push({label:t.Name,value:t.Value})}))},updateClassesArray:function(t){var e=this;JSON.parse(t).results.forEach((function(t){e.classFilter.push({label:t.Label,value:t.Value})}))},updateCompetitionsArray:function(t){var e=this;null!=t&&(this.competitionsData.competitions.length=0,this.competitionsData.count=t.count,t.results.forEach((function(t){var n=e.checkForValidLatLong(t);e.competitionsData.competitions.push({id:t.Id,competitionName:t.CompetitionName,competitionTitle:t.CompetitionTitle,competitionDate:t.CompetitionDate,competitionYear:t.CompetitionYear,competitionMonth:t.CompetitionMonth,competitionDay:t.CompetitionDay,competitionEndDate:t.CompetitionEndDate,competitionEndMonth:t.CompetitionEndMonth,competitionEndDay:t.CompetitionEndDay,registrationStartDate:t.RegistrationStartDate,registrationDeadlineDate:t.RegistrationDeadlineDate,status:t.Status,ownerName:t.OwnerName,locationCoords:t.LocationCoords,distanceFromUser:n,classes:t.Classes,classesStatus:t.ClassesStatus})})),this.noOfPages=Math.ceil(this.competitionsData.count/this.noOfItemsPerPage),this.goToPage(1),null!=this.competitionsData&&(this.loading=!1))},resetFilters:function(){this.selectedType="",this.selectedTypeLabel="",this.selectedOwner="",this.selectedStatus="",this.selectedStatusLabel="",this.resetClassArray(),this.searchCompetitions()},getTypes:function(){var t,e,n=this;(t=this.apiBaseUrl,e=t+"get_competitionTypes",p().get(e).then((function(t){return t}))).then((function(t){null!=t.data&&n.updateTypesArray(t.data)}))},getOwners:function(){var t,e,n=this;(t=this.apiBaseUrl,e=t+"get_competitionOwners",p().get(e).then((function(t){return t}))).then((function(t){null!=t.data&&n.updateOwnersArray(t.data)}))},getClasses:function(){var t=this;d(this.apiBaseUrl,"").then((function(e){null!=e.data&&(console.log("Competition classes fetched from Umbraco!"),t.updateClassesArray(e.data))}))},getClassesForType:function(t){var e=this;this.resetClassArray(),""!=t&&d(this.apiBaseUrl,t).then((function(t){null!=t.data&&e.updateClassesArray(t.data)}))},getCompetitions:function(){var t,e,n=this;(t=this.apiBaseUrl,e=t+"get_competitions",p().get(e).then((function(t){return t}))).then((function(t){null!=t.data&&n.updateCompetitionsArray(t.data)}))},getCompetitionUrl:function(){var t=this;f.get_competition_url(this.apiBaseUrl).then((function(e){t.competitionUrl=e.data}
1)).catch((function(t){console.error("Something went wrong while getting competition url: ",t)}))},searchCompetitionOwners:function(t){var e,n,i,r=this;(e=this.apiBaseUrl,n=t,i=e+"search_competitionOwners/?owner="+n,p().get(i).then((function(t){return t}))).then((function(t){null!=t.data&&r.updateCompetitionsArray(t.data)}))},searchCompetitions:function(){var t,e,n,i,r,o,a=this;(t=this.apiBaseUrl,e=this.selectedOwner,n=this.selectedTypeLabel,i=this.selectedClassLabel,r=this.selectedStatus,o=t+"get_competitions/?owner="+e+"&type="+n+"&cclass="+i+"&status="+r,p().get(o).then((function(t){return t}))).then((function(t){null!=t.data&&(a.originalCompetitionData=JSON.parse(t.data),a.updateCompetitionsArray(a.originalCompetitionData))}))},onChangeStatus:function(t){this.loading=!0;var e=this.statusFilter.find((function(e){return e.value==t.target.value}));this.selectedStatusLabel=""==e.value?"":e.label,this.filterCompetitions()},onChangeType:function(t){this.loading=!0;var e=this.typeFilter.find((function(e){return e.value==t.target.value}));this.selectedTypeLabel=""==e.value?"":e.label,this.filterCompetitions(),this.getClassesForType(e.value)},filterCompetitions:function(){var t=this,e=this.originalCompetitionData.results;""!=this.selectedStatus&&(e=e.filter((function(e){return e.Status==t.selectedStatus||"opened"==t.selectedStatus&&"late"==e.Status}))),""!=this.selectedType&&(e=e.filter((function(e){return e.CompetitionTitle==t.selectedTypeLabel}))),""!=this.selectedClass&&(e=e.filter((function(e){return e.ClassesStatus.find((function(e){return e.ClassName==t.selectedClassLabel}))}))),""!=this.selectedOwner&&(e=e.filter((function(e){return e.OwnerName==t.selectedOwner})));var n={results:e,count:e.length};this.updateCompetitionsArray(n)},onChangeClass:function(t){this.loading=!0;var e=this.classFilter.find((function(e){return e.value==t.target.value}));this.selectedClassLabel=""==e.value?"":e.label,this.filterCompetitions()},onChangeOwner:function(t){this.loading=!0;var e=this.ownerFilter.find((function(e){return e.value==t.target.value}));this.selectedOwnerLabel=""==e.value?"":e.label,this.filterCompetitions()},goToPage:function(t){t<=0&&(t=1),t>this.noOfPages&&(t=this.noOfPages),this.selectedPage=t,this.lowestToShow=this.selectedPage>3?this.selectedPage-2:1,this.largestToShow=this.selectedPage<this.noOfPages-2?this.selectedPage+2:this.noOfPages;var e=--t*this.noOfItemsPerPage;this.currentlyShownPage.competitions=this.competitionsData.competitions.slice(e,e+this.noOfItemsPerPage),this.currentlyShownPage.count=this.currentlyShownPage.competitions.length,this.openedMobileClasses.length=0},getStateColor:function(t){switch(t.status){case"published":return"circleyellow";case"opened":case"late":return"circlegreen";default:return"circlered"}},getStateAriaLabel:function(t){switch(t.status){case"published":return this.getTranslation("CompetitionListBlock.NotOpenedYet");case"opened":return this.getTranslation("CompetitionListBlock.OpenForRegistration");case"late":return this.getTranslation("CompetitionListBlock.LastRegister");default:return this.getTranslation("CompetitionListBlock.RegistrationClosed")}},resetClassArray:function(){this.classFilter.length=1,this.selectedClass="",this.selectedClassLabel=""},resetTypeFilter:function(){this.selectedType="",this.selectedTypeLabel="",this.resetClassArray(),this.filterCompetitions()},resetClassFilter:function(){this.selectedClass="",this.selectedClassLabel="",this.filterCompetitions()},resetOwnerFilter:function(){this.selectedOwner="",this.filterCompetitions()},resetStatusFilter:function(){this.selectedStatus="",this.selectedStatusLabel="",this.filterCompetitions()},toggleClassDiv:function(t){var e=this.openedMobileClasses.indexOf(t);e>-1?this.openedMobileClasses.splice(e,1):this.openedMobileClasses.push(t)},isMobileClassOpened:function(t){return this.openedMobileClasses.includes(t)}},mounted:function(){var t=this;return(0,a.Z)(l().mark((function e(){var n,i;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t).loading=!0,i={maximumAge:0,timeout:5e3,enableHighAccuracy:!0},navigator.geolocation.getCurrentPosition((function(t){var e=t.coords.latitude,i=t.coords.longitude;n.userCoordinates={lat:e,lng:i}}),null,i),t.amountOfDaysBeforeClosure=t.content.amountofdaysbeforeclosure,t.deadlineRedDate=new Date,t.deadlineRedDate.setDate(t.deadlineRedDate.getDate()-t.amountOfDaysBeforeClosure),t.noOfItemsPerPage=t.content.paginationresults,console.log(t.externalColor),t.getOwners(),t.getTypes(),t.getCompetitionUrl(),t.searchCompet
1itions();case 13:case"end":return e.stop()}}),e)})))()}};var D=(0,v.Z)(w,r,[],!1,null,null,null);D.options.__file="sbk_competition/templates/pages/CompetitionListBlock.vue";const k=D.exports;var P=n(32685),Z={prod:{aiConnectionString:"InstrumentationKey=ba8652e3-b849-4c55-8bc4-c13342e1d0e0;IngestionEndpoint=https://northeurope-2.in.applicationinsights.azure.com/;LiveEndpoint=https://northeurope.livediagnostics.monitor.azure.com/;ApplicationId=dd115195-4456-4ea1-87b3-e19003e6d4c8"},test:{aiConnectionString:"InstrumentationKey=eb9ed4e9-740d-4f95-869f-b35fdc237f5a;IngestionEndpoint=https://northeurope-2.in.applicationinsights.azure.com/;LiveEndpoint=https://northeurope.livediagnostics.monitor.azure.com/;ApplicationId=0dbd0710-5d9b-49a0-ab2a-5eb45c20634b"},dev:{aiConnectionString:"InstrumentationKey=eb9ed4e9-740d-4f95-869f-b35fdc237f5a;IngestionEndpoint=https://northeurope-2.in.applicationinsights.azure.com/;LiveEndpoint=https://northeurope.livediagnostics.monitor.azure.com/;ApplicationId=0dbd0710-5d9b-49a0-ab2a-5eb45c20634b"}};function O(t){return t in Z?Z[t]:Z.dev}const L={install:function(t,e){var n=O(e.environment),i=new P.R({config:{connectionString:n.aiConnectionString}});i.loadAppInsights(),window.addEventListener("offline",(function(){i.config.disableTelemetry=!0,console.log("Telemetry disabled due to offline status")})),window.addEventListener("online",(function(){i.config.disableTelemetry=!1,console.log("Telemetry re-enabled")})),t.prototype.$appInsights=i}};var T,A,x,I,B,R;i.ZP.config.productionTip=!1;var F={methods:{hashChangeHandler:function(){this.$router.push(window.location.hash.substring(1,window.location.hash.length))},isIE11:function(){return!!window.MSInputMethodContext&&!!document.documentMode}},mounted:function(){this.isIE11()&&window.addEventListener("hashchange",this.hashChangeHandler)},destroyed:function(){this.isIE11()&&window.removeEventListener("hashchange",this.hashChangeHandler)}},N=document.getElementById("CompetitionListBlockContainer"),M=null!==(T=null==N?void 0:N.dataset.content)&&void 0!==T?T:{},U=null!==(A=null==N?void 0:N.dataset.apibaseurl)&&void 0!==A?A:"",j=null!==(x=null==N?void 0:N.dataset.translations)&&void 0!==x?x:[],E=null!==(I=null==N?void 0:N.dataset.externalcolor)&&void 0!==I?I:"",z=null!==(B=null==N?void 0:N.dataset.competitionsearchurl)&&void 0!==B?B:"",V=null!==(R=null==N?void 0:N.dataset.environment)&&void 0!==R?R:"";null!=N&&(i.ZP.use(L,{environment:V}),new i.ZP({el:"#CompetitionListBlock",template:'<CompetitionListBlock :content="content" :apiBaseUrl="apiBaseUrl" :translations="translations" :externalColor="externalColor" :competitionSearchUrl="competitionSearchUrl" />',components:{CompetitionListBlock:k},data:function(){return{content:JSON.parse(M),apiBaseUrl:U,translations:JSON.parse(j).CompetitionListBlock,externalColor:JSON.parse(E),competitionSearchUrl:z}},methods:{},mixins:[F]}))},45903:()=>{},19866:t=>{t.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3e%3cdefs%3e%3cstyle%3e.b%7bfill:%23183A6880;%7d%3c/style%3e%3c/defs%3e%3cpath class='b' d='M18.3,5.71a1,1,0,0,0-1.41,0L12,10.59,7.11,5.7A1,1,0,0,0,5.7,7.11L10.59,12,5.7,16.89A1,1,0,0,0,7.11,18.3L12,13.41l4.89,4.89a1,1,0,0,0,1.41-1.41L13.41,12,18.3,7.11A1,1,0,0,0,18.3,5.71Z'/%3e%3c/svg%3e"},10057:t=>{t.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3e%3cdefs%3e%3cstyle%3e.a%7bfill:none;%7d.b%7bfill:%23183a68;%7d%3c/style%3e%3c/defs%3e%3cpath class='a' d='M0,0H24V24H0Z'/%3e%3cpath class='b' d='M16,13H13a1,1,0,0,0-1,1v3a1,1,0,0,0,1,1h3a1,1,0,0,0,1-1V14A1,1,0,0,0,16,13ZM16,3V4H8V3A1,1,0,0,0,6,3V4H5A1.991,1.991,0,0,0,3.01,6L3,20a2,2,0,0,0,2,2H19a2.006,2.006,0,0,0,2-2V6a2.006,2.006,0,0,0-2-2H18V3a1,1,0,0,0-2,0Zm2,17H6a1,1,0,0,1-1-1V9H19V19A1,1,0,0,1,18,20Z'/%3e%3c/svg%3e"},91534:t=>{t.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cdefs%3e%3cstyle%3e.a%7bfill:none;opacity:0.87;%7d.b%7bfill:%23183a68;%7d%3c/style%3e%3c/defs%3e%3cpath class='a' d='M30,30H0V0H30Z'/%3e%3cpath class='b' d='M21.659,9.469l-6.25,6.25L9.16,9.469A1.606,1.606,0,0,0,6.889,11.74l7.393,7.393a1.6,1.6,0,0,0,2.271,0l7.393-7.393a1.6,1.6,0,0,0,0-2.271A1.639,1.639,0,0,0,21.659,9.469Z' transform='translate(-0.418 2.288)'/%3e%3c/svg%3e"},64833:t=>{t.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3e%3cdefs%3e%3cstyle%3e.a%7bfill:none;opacity:0.87;%7d.b%7bfill:%23183a68;%7d%3c/style%3e%3c/defs%3e%3cg transform='translate(0 24) rotate(-90)'%3e%3cpath class='a' d='M24,24H0V0H24Z'/%3e%3cpath class='b' d='M20.787,9.442,14.9,15.334,9,9.442a1.514,1.514,0,0,0-2.141,2.141l6.97,6.97a1.512,1.512,0,0,0,2.141,0l6.97-6.97a1.512,1.512,0,0,0,0-2.141,1.545,1.545,0,0,0-2.156,0Z' transform='translate(-3 -2)'/%3e%3c/g%3e%3c/svg%3e"},76051:t=>{t.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='13.5' height='11.442' viewBox='0 0 13.5 11.442'%3e%3cdefs%3e%3cstyle%3e.a%7bfill:%23183a68;%7d%3c/style%3e%3c/defs%3e%3cg transform='translate(-9 -7.5)'%3e%3cpath class='a' d='M6,12a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,6,12Z' transform='translate(6)'/%3e%3cpath class='a' d='M12.75,6a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,12.75,6Z' transform='translate(2.25 3)'/%3e%3cpath class='a' d='M21.75,6a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,21.75,6Z' transform='translate(-2.25 3)'/%3e%3cpath class='a' d='M28.5,12A1.5,1.5,0,1,1,27,10.5,1.5,1.5,0,0,1,28.5,12Z' transform='translate(-6)'/%3e%3cpath class='a' d='M14.334,18.476c-.544-.638-1-1.182-1.55-1.819a2.652,2.652,0,0,0-1.094-.825,1.266,1.266,0,0,0-.206-.056A3.146,3.146,0,0,0,11,15.75a2.623,2.623,0,0,0-.494.031,1.266,1.266,0,0,0-.206.056,2.693,2.693,0,0,0-1.094.825c-.544.638-1,1.182-1.55,1.819-.819.819-1.826,1.726-1.638,2.995a1.963,1.963,0,0,0,1.457,1.45c.456.094,1.913-.275,3.464-.275h.113c1.55,0,3.007.363,3.464.275a1.972,1.972,0,0,0,1.457-1.45c.194-1.275-.813-2.182-1.632-3Z' transform='translate(4.76 -4)'/%3e%3c/g%3e%3c/svg%3e"},86645:t=>{t.exports="data:image/svg+xml,%3csvg aria-hidden='true' focusable='false' data-prefix='fas' data-icon='road' class='svg-inline--fa fa-road fa-w-18' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3e%3cpath fill='%23183a68' d='M573.19 402.67l-139.79-320C428.43 71.29 417.6 64 405.68 64h-97.59l2.45 23.16c.5 4.72-3.21 8.84-7.96 8.84h-29.16c-4.75 0-8.46-4.12-7.96-8.84L267.91 64h-97.59c-11.93 0-22.76 7.29-27.73 18.67L2.8 402.67C-6.45 423.86 8.31 448 30.54 448h196.84l10.31-97.68c.86-8.14 7.72-14.32 15.91-14.32h68.8c8.19 0 15.05 6.18 15.91 14.32L348.62 448h196.84c22.23 0 36.99-24.14 27.73-45.33zM260.4 135.16a8 8 0 0 1 7.96-7.16h39.29c4.09 0 7.53 3.09 7.96 7.16l4.6 43.58c.75 7.09-4.81 13.26-11.93 13.26h-40.54c-7.13 0-12.68-6.17-11.93-13.26l4.59-43.58zM315.64 304h-55.29c-9.5 0-16.91-8.23-15.91-17.68l5.07-48c.86-8.14 7.72-14.32 15.91-14.32h45.15c8.19 0 15.05 6.18 15.91 14.32l5.07 48c1 9.45-6.41 17.68-15.91 17.68z'%3e%3c/path%3e%3c/svg%3e"}},n={};function i(t){var r=n[t];
1if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t].call(o.exports,o,o.exports,i),o.exports}i.m=e,i.amdD=function(){throw new Error("define cannot be used indirect")},i.amdO={},t=[],i.O=(e,n,r,o)=>{if(!n){var a=1/0;for(l=0;l<t.length;l++){for(var[n,r,o]=t[l],s=!0,c=0;c<n.length;c++)(!1&o||a>=o)&&Object.keys(i.O).every((t=>i.O[t](n[c])))?n.splice(c--,1):(s=!1,o<a&&(a=o));s&&(t.splice(l--,1),e=r())}return e}o=o||0;for(var l=t.length;l>0&&t[l-1][2]>o;l--)t[l]=t[l-1];t[l]=[n,r,o]},i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.j=625,(()=>{var t={625:0};i.O.j=e=>0===t[e];var e=(e,n)=>{var r,o,[a,s,c]=n,l=0;for(r in s)i.o(s,r)&&(i.m[r]=s[r]);for(c&&c(i),e&&e(n);l<a.length;l++)o=a[l],i.o(t,o)&&t[o]&&t[o][0](),t[a[l]]=0;i.O()},n=self.webpackChunkSBK_Frontend=self.webpackChunkSBK_Frontend||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),i.O(void 0,[216],(()=>i(66741)));var r=i.O(void 0,[216],(()=>i(45903)));r=i.O(r)})();

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.