1import{_ as h,e as r}from"./_plugin-vue_export-helper-CZPp-EVN.js";import{S as c}from"./common-components-BFmMiiNn.js";import{P as u,j as i,q as o,x as e,D as m,F as g,E as _,K as f}from"./vendor-vue-n3skSn-P.js";import"./vendor-axios-qFyJwsfU.js";import"./InstagramOembed-aIHqn3P9.js";import"./EmbeddedPost-GM-iuLcd.js";const S={components:{SportsCard:c},created(){this.loadSports(),r.on("SportSortingChanged",t=>{this.isLoading=!0,this.currentSortDir=t,this.page=1,this.skip=0,this.$nextTick(()=>{this.loadSports()})}),r.on("sportPaginationChange",t=>{this.page=t,this.skip=this.article*(this.page-1),this.$nextTick(()=>{var a=document.getElementById("pageTop");const n=a.getBoundingClientRect().top+window.pageYOffset+-150;window.scrollTo({top:n,behavior:"smooth"}),this.isLoading=!0,this.loadSports()})})},mounted(){},props:{user_id:[Number,String],take:Number,initial_page:Number,author_id:{type:Number,default:null},sort_dir:{type:String,default:"desc"}},data(){return{isLoading:!0,sports:{},currentSortDir:this.sort_dir,isLoading:!0,page:this.initial_page,skip:this.initial_page>1?this.take*(this.initial_page-1):0,isInitialLoad:!0,totalCount:0,bearer:this.$store.getters.bearer,site:this.$store.getters.siteTitle=="Babylon Bee"?"BEE":this.$store.getters.siteTitle=="Not the Bee"?"NTB":"BS"}},methods:{loadSports(){this.sports={};var t={};this.bearer!=""&&(t={Authorization:this.bearer}),axios.post("/loadSports",{sort:this.currentSortDir,skip:this.skip,take:this.take,author_id:this.author_id},{headers:t}).then(s=>{this.isLoading=!1,s.data?(this.sports=s.data.sports,this.totalCount=parseInt(s.data.sortCount),this.$nextTick(()=>{r.emit("initialSportsLoaded",{count:this.sports?this.sports.length:0,isInitialLoad:this.isInitialLoad,totalCount:this.totalCount})}),this.isInitialLoad=!1):this.success=!1})}}},k={class:"bg-white py-4"},x={class:"mx-auto max-w-7xl px-6 lg:px-8 flex items-center justify-center"},y={key:0,class:"mt-10 space-x-2"},L={class:"mt-4 space-y-8 lg:space-y-10"};function b(t,s,a,n,p,B){const l=u("sports-card");return i(),o("div",k,[e("div",x,[p.isLoading?(i(),o("div",y,[...s[0]||(s[0]=[e("span",null,[e("i",{class:"far fa-spin fa-sync-alt mr-1"})],-1),e("span",null," Loading... ",-1)])])):m("",!0),e("div",L,[(i(!0),o(g,null,_(p.sports,d=>(i(),o("div",{key:d.id},[f(l,{article:d},null,8,["article"])]))),128))])])])}const I=h(S,[["render",b]]);export{I as default};
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.