1import{Y as B,Z as _,_ as C,$}from"./vendor-vue-n3skSn-P.js";const s=B(),F={created(){var e=Math.round(+new Date/1e3);localStorage&&(localStorage.previousArticles&&localStorage.previousArticleTime&&(e-localStorage.previousArticleTime<600?this.previousArticles=JSON.parse(localStorage.previousArticles):(localStorage.removeItem("previousArticles"),localStorage.removeItem("previousArticleTime"))),s.on("loadMoreArticles",d=>{this.previousArticles=d.articles,localStorage.previousArticles=JSON.stringify(this.previousArticles),localStorage.previousArticleTime=Math.round(+new Date/1e3)})),this.showingScrollToTop=!1,s.on("checkForFollows",d=>{this.getUserFollows()}),s.on("modalOpened",d=>{d&&d.type=="embeds"&&window.innerWidth<640&&this.scrollModal(d.id),this.modalOpened=!0,this.showingScrollToTop=!1}),s.on("modalClosed",d=>{this.modalOpened=!1}),s.on("navbarDropdownOpened",d=>{this.navbarDropdownOpen=!0}),s.on("navbarDropdownClosed",d=>{this.navbarDropdownOpen=!1}),this.getUserFollows();var t=document.querySelector('meta[name="cthresh"]').getAttribute("content");this.$store.commit("changeCommentThresholdState",parseInt(t));var o=document.querySelector('meta[name="reaTypes"]').getAttribute("content");this.$store.commit("changeReactionsState",JSON.parse(o));var a=document.querySelector('meta[name="reaActive"]').getAttribute("content");this.$store.commit("changeActiveReactionsState",JSON.parse(a));var c=document.querySelector('meta[name="mava"]').getAttribute("content");this.$store.commit("changeModAvatarState",c);var i=document.querySelector('meta[name="mjava"]').getAttribute("content");this.$store.commit("changeModJrAvatarState",i);var h=document.querySelector('meta[name="appView"]').getAttribute("content");this.$store.commit("changeAppViewState",h=="1");var r=document.querySelector('meta[name="autoLoadFeed"]');this.$store.commit("changeAutoLoadFeedState",r&&r.getAttribute("content")=="1");var S=document.querySelector('meta[name="isBeeSocial"]').getAttribute("content"),n=document.querySelector('meta[name="isBee"]').getAttribute("content"),m=document.querySelector('meta[name="tier"]').getAttribute("content");this.$store.commit("changeTierState",m);var u=document.querySelector('meta[name="can_interact_with_article_comments"]').getAttribute("content");this.$store.commit("changeCanInteractWithArticleCommentsState",u=="true");var l=document.querySelector('meta[name="can_interact_with_headline_forum"]').getAttribute("content");this.$store.commit("changeCanInteractWithHeadlineForumState",l=="true"),this.$store.commit("changeBeeSocialState",S=="1"),n=="1"?(this.isBee=!0,this.$store.commit("changeSiteTitleState","Babylon Bee"),this.showingBottomBar=window.location.pathname=="/"&&window.scrollY<50):this.$store.commit("changeSiteTitleState",S=="1"?"Bee Social":"Not the Bee");var f=document.querySelector('meta[name="editor_badge_class"]').getAttribute("content");this.$store.commit("changeEditorBadgeState",f);var p=document.querySelector('meta[name="freeBadgeClass"]').getAttribute("content");this.$store.commit("changeFreeBadgeState",p);var A=document.querySelector('meta[name="red_check_badge_class"]').getAttribute("content");this.$store.commit("changeRedCheckBadgeState",A);var T=document.querySelector('meta[name="verified_badge_class"]').getAttribute("content");this.$store.commit("changeVerifiedBadgeState",T),this.$store.commit("changeGiphyKeyState","PJzLLI5fSg0K7XfNOELuUkkctSHRoORH");var b=document.querySelector('meta[name="bearer"]').getAttribute("content");this.$store.commit("changeBearerState",b)},mounted(){var e,t,o,a=window.pageYOffset||document.documentElement.scrollTop;s.on("loadedGeneratorComments",i=>{this.$store.commit("changeGeneratorCommentsState",i.generatorComments)}),window.innerWidth<640&&(this.showingScrollToTop=!1);let c=this;window.addEventListener("scroll",function(){window.clearTimeout(e),clearTimeout(t),clearTimeout(o);var i=window.pageYOffset||document.documentElement.scrollTop;(i<200||i>a+10)&&(c.showingScrollToTop=!1),window.innerWidth<640&&i>a+1?e=setTimeout(function(){c.setScrollingButton(a,i)},500):c.setScrollingButton(a,i),a=i<=0?0:i,t=setTimeout(function(){c.showingScrollToTop=!1},2750)},!1),window.location.pathname=="/"&&(this.isBee&&window.addEventListener("scroll",()=>{this.scrollPosition=window.scrollY,this.showingBottomBar=this.scrollPosition<50},{passive:!0}),window.addEventListener("resize",()=>{this.windowWidth=window.innerWidth}))},data(){return{showMobileMenu:!1,showingAlert:!1,dataSaving:!1,passwordUpdate:"",passwordUpdateConfirmation:"",alertType:"",alertMessage:"",previousArticles:[],showingScrollToTop:!1,showingSearch:!1,showingUserInvites:!1,modalOpened:!1,navbarDropdownOpen:!1,isBeeSocial:!1,isBee:!1,checkedUserFollows:!1,userFollows:[],route_path:window.location.pathname,showingBottomBar:!1}},methods:{setScrollingButton:function(e,t){t<200?this.showingScrollToTop=!1:this.modalOpened==!1?this.showingScrollToTop=!0:this.showingScrollToTop=!1},stopScrolling:function(){document.querySelector("body").classList.add("no-scroll")},startScrolling:function(){document.querySelector("body").classList.remove("no-scroll")},scrollToTop:function(){window.scrollTo({top:0})},toggleSearch(){this.showingSearch=!this.showingSearch,this.showingSearch&&(s.emit("searchBoxOpened"),document.getElementById("searchbox").classList.remove("hidden"),this.$nextTick(()=>{this.$refs.searchbox.focus()}))},updatePassword:function(){this.errors={},this.dataSaving=!0,axios.post("/dashboard/updatePassword",{new_password:this.passwordUpdate,new_password_confirmation:this.passwordUpdateConfirmation}).then(e=>{this.dataSaving=!1,this.showingAlert=!0,this.alertType="Success!",this.alertMessage="Password updated successfully.",s.emit("alert",{message:"The title was updated",success:!0})})},toggleUserInvites(e=!1){this.showingUserInvites=!this.showingUserInvites,this.showingUserInvites?(document.getElementById("userinvites").classList.remove("hidden"),this.$nextTick(()=>{this.$refs.userinvites.focus()})):e&&s.emit("alert",{message:"The user has been invited!",success:!0})},scrollModal:function(e){setTimeout(function(){var o=document.getElementById("embedModal-"+e);const a=o.getBoundingClientRect().top+window.pageYOffset+-20;window.scrollTo({top:a,behavior:"smooth"})},150)},getUserFollows(){var e=document.querySelector('meta[name="currentuser"]');if(e){var t={},o=document.querySelector('meta[name="bearer"]').getAttribute("content");o!=""&&(t={Authorization:o}),axios.post("/dashboard/getUserFollows",{},{headers:t}).then(a=>{a.data&&(this.$store.commit("changeUserFollowsState",a.data),this.checkedUserFollows=!0,this.userFollows=a.data,localStorage&&(localStorage.userFollows=JSON.stringify(a.data),localStorage.checkedUserFollows=!0))})}},openHeadlineCTAModal(){s.emit("triggerHeadlineCTAPopup")},openCustomModal(){s.emit("openCustomModal")},openModal(e){s.emit(e+"Modal")},openNewsletterSignup(){s.emit("newsletterPopupOpen",{})}}},I=_("app",{state:()=>({beeSocialState:!1,siteTitleState:"Not the Bee",appViewState:!1,autoLoadFeedState:!1,editorBadgeState:"",verifiedBadgeState:"",freeBadgeState:"",redCheckBadgeState:"",bearerState:"",giphyKeyState:"",userFollowsState:"",reactionsState:"",activeReactionsState:"",modAvatarState:"",modJrAvatarState:"",commentThresholdState:"",generatorCommentsState:"",tierState:0,headlineInteractState:!1,articleInteractState:!1,defaultTimeoutState:45e3}),getters:{isBeeSocial:e=>e.beeSocialState,siteTitle:e=>e.siteTitleState,appView:e=>e.appViewState,autoLoadFeed:e=>e.autoLoadFeedState,editorBadge:e=>e.editorBadgeState,verifiedBadge:e=>e.verifiedBadgeState,freeBadge:e=>e.freeBadgeState,redCheckBadge:e=>e.redCheckBadgeState,bearer:e=>e.bearerState,giphyKey:e=>e.giphyKeyState,userFollows:e=>e.userFollowsState,reactions:e=>e.reactionsState,activeReactions:e=>e.activeReactionsState,modAvatar:e=>e.modAvatarState,modJrAvatar:e=>e.modJrAvatarState,commentThreshold:e=>e.commentThresholdState,generatorComments:e=>e.generatorCommentsState,tier:e=>e.tierState,headlineInteract:e=>e.headlineInteractState,articleInteract:e=>e.articleInteractState,defaultTimeout:e=>e.defaultTimeoutState},actions:{changeBeeSocialState(e){this.beeSocialState=e},changeSiteTitleState(e){this.siteTitleState=e},changeAppViewState(e){this.appViewState=e},changeAutoLoadFeedState(e){this.autoLoadFeedState=e},changeFreeBadgeState(e){this.freeBadgeState=e},changeEditorBadgeState(e){this.editorBadgeState=e},changeVerifiedBadgeState(e){this.verifiedBadgeState=e},changeRedCheckBadgeState(e){this.redCheckBadgeState=e},changeBearerState(e){this.bearerState=e},changeGiphyKeyState(e){this.giphyKeyState=e},changeUserFollowsState(e){this.userFollowsState=e},changeReactionsState(e){this.reactionsState=e},changeActiveReactionsState(e){this.activeReactionsState=e},changeModAvatarState(e){this.modAvatarState=e},changeModJrAvatarState(e){this.modJrAvatarState=e},changeCommentThresholdState(e){this.commentThresholdState=e},changeGeneratorCommentsState(e){this.generatorCommentsState=e}
1,changeTierState(e){this.tierState=e},changeCanInteractWithHeadlineForumState(e){this.headlineInteractState=e},changeCanInteractWithArticleCommentsState(e){this.articleInteractState=e}}});let g=null;function O(e){if(g)return g;const t=I(e);return g={getters:new Proxy(t,{get(o,a){if(a in o)return o[a]}}),commit(o,a){typeof t[o]=="function"&&t[o](a)},state:t.$state,_piniaStore:t},g}const q=/^[a-zA-Z_:][-a-zA-Z0-9_:.]*$/,k=Element.prototype.setAttribute;Element.prototype.setAttribute=function(e,t){if(typeof e!="string"||!q.test(e)){typeof console<"u"&&console.warn&&console.warn("[setAttribute] skipped invalid attribute name:",JSON.stringify(e),this);return}return k.call(this,e,t)};const w=C(F);w.config.errorHandler=(e,t,o)=>{typeof console<"u"&&console.error&&console.error("[Vue errorHandler]",o,e,t)};const y=$();w.use(y);const E=O(y);w.config.globalProperties.$store=E;const U="modulepreload",L=function(e){return"/build/"+e},v={},M=function(t,o,a){let c=Promise.resolve();if(o&&o.length>0){let h=function(n){return Promise.all(n.map(m=>Promise.resolve(m).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),S=(r==null?void 0:r.nonce)||(r==null?void 0:r.getAttribute("nonce"));c=h(o.map(n=>{if(n=L(n),n in v)return;v[n]=!0;const m=n.endsWith(".css"),u=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${u}`))return;const l=document.createElement("link");if(l.rel=m?"stylesheet":U,m||(l.as="script"),l.crossOrigin="",l.href=n,S&&l.setAttribute("nonce",S),document.head.appendChild(l),m)return new Promise((f,p)=>{l.addEventListener("load",f),l.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${n}`)))})}))}function i(h){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=h,window.dispatchEvent(r),!r.defaultPrevented)throw h}return c.then(h=>{for(const r of h||[])r.status==="rejected"&&i(r.reason);return t().catch(i)})},R=(e,t)=>{const o=e.__vccOpts||e;for(const[a,c]of t)o[a]=c;return o};export{R as _,w as a,M as b,s as e,I as u};
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.