1import{_ as c,e as o}from"./_plugin-vue_export-helper-CZPp-EVN.js";import{T as p}from"./common-components-xA4ueOFL.js";import{P as u,j as i,q as a,x as s,D as k,F as m,E as g,K as _}from"./vendor-vue-n3skSn-P.js";import"./vendor-axios-qFyJwsfU.js";import"./InstagramOembed-aIHqn3P9.js";import"./EmbeddedPost-GM-iuLcd.js";const f={components:{TakeCard:p},created(){this.loadTakes(),o.on("TakeSortingChanged",t=>{this.isLoading=!0,this.currentSortDir=t,this.page=1,this.skip=0,this.$nextTick(()=>{this.loadTakes()})}),o.on("takePaginationChange",t=>{this.page=t,this.skip=this.take*(this.page-1),this.$nextTick(()=>{var r=document.getElementById("pageTop");const n=r.getBoundingClientRect().top+window.pageYOffset+-150;window.scrollTo({top:n,behavior:"smooth"}),this.isLoading=!0,this.loadTakes()})})},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,takes:{},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:{loadTakes(){this.takes={};var t={};this.bearer!=""&&(t={Authorization:this.bearer}),axios.post("/loadTakes",{sort:this.currentSortDir,skip:this.skip,take:this.take,author_id:this.author_id},{headers:t}).then(e=>{this.isLoading=!1,e.data?(this.takes=e.data.takes,this.totalCount=parseInt(e.data.sortCount),this.$nextTick(()=>{o.emit("initialTakesLoaded",{count:this.takes?this.takes.length:0,isInitialLoad:this.isInitialLoad,totalCount:this.totalCount})}),this.isInitialLoad=!1):this.success=!1})}}},T={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,e,r,n,d,B){const h=u("take-card");return i(),a("div",T,[s("div",x,[d.isLoading?(i(),a("div",y,[...e[0]||(e[0]=[s("span",null,[s("i",{class:"far fa-spin fa-sync-alt mr-1"})],-1),s("span",null," Loading... ",-1)])])):k("",!0),s("div",L,[(i(!0),a(m,null,g(d.takes,l=>(i(),a("div",{key:l.id},[_(h,{take:l},null,8,["take"])]))),128))])])])}const I=c(f,[["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.