1"use strict";(self["webpackChunklumenii"]=self["webpackChunklumenii"]||[]).push([[163],{36735:function(t,e,s){s.d(e,{A:function(){return u}});var o=function(){var t=this,e=t._self._c;return e("ThreeColumnLayout",{staticClass:"c-post-layout g-skinny-scrollbars",attrs:{header:t.showHeader,left:t.showSidePanels,right:t.showSidePanels,top:0,scroll:!0},scopedSlots:t._u([{key:"header",fn:function(){return[e("AdLeaderboard",{on:{count:function(e){return t.onAds(e)}},model:{value:t.showTopAds,callback:function(e){t.showTopAds=e},expression:"showTopAds"}})]},proxy:!0},{key:"left",fn:function(){return[e("AdWidget",{attrs:{reverse:"",zone:"side"},on:{count:function(e){return t.onAds(e)}},model:{value:t.showSideAds,callback:function(e){t.showSideAds=e},expression:"showSideAds"}})]},proxy:!0},{key:"middle",fn:function(){return[t._t("default")]},proxy:!0},{key:"right",fn:function(){return[e("AdWidget",{attrs:{zone:"side"},on:{count:function(e){return t.onAds(e)}},model:{value:t.showSideAds,callback:function(e){t.showSideAds=e},expression:"showSideAds"}})]},proxy:!0}],null,!0)})},r=[],i=s(74944),n=s(80492),a=s(97968),l={name:"PostLayout",components:{AdLeaderboard:i.A,AdWidget:n.A,ThreeColumnLayout:a.A},props:{adFree:{type:Boolean,required:!1,default:!1},top:{type:Number,required:!1,default:48}},data:function(){return{showSideAds:!0,showTopAds:!0}},computed:{showHeader(){return!this.isAdFree&&this.showTopAds},showSidePanels(){return!this.isAdFree&&this.showSideAds}},methods:{onAds(t){0===t&&(this.showTopAds=!1,this.showSideAds=!1)}}},d=l,h=s(81656),c=(0,h.A)(d,o,r,!1,null,"ef146538",null),u=c.exports},22863:function(t,e,s){s.d(e,{A:function(){return A}});var o=s(1032),r=s(65872),i=s(80146),n=function(){var t=this,e=t._self._c;return e("FloatingToolbar",{attrs:{offset:t.offset,"scroll-target":t.scrollTarget}},[e(o.A,{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$t("tooltip.postBar.claps"),expression:"$t('tooltip.postBar.claps')"}],staticClass:"px-2",attrs:{rounded:"",text:""},on:{click:t.incrementLikes}},[e(r.A,{attrs:{large:""}},[t._v(" mdi-hand-clap ")]),e("span",{class:{"c-hide":t.hasNoLikes}},[t._v(t._s(t.likes))])],1),e(o.A,{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$t("tooltip.postBar.comments"),expression:"$t('tooltip.postBar.comments')"}],staticClass:"px-2",attrs:{"data-title":t.$t("tour.comments.open.title"),"data-intro":t.$t("tour.comments.open.intro"),"data-click-forward":"",rounded:"",text:""},on:{click:t.toggleComments}},[e(r.A,{attrs:{large:""}},[t._v(" mdi-comment-text-outline ")]),e("span",{class:{"c-hide":t.hasNoComments}},[t._v(t._s(t.commentCount))])],1),e(i.A),t.$actions.share?e(o.A,{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$t("tooltip.postBar.share"),expression:"$t('tooltip.postBar.share')"}],attrs:{rounded:"",text:""},on:{click:function(e){return t.$emit("share")}}},[e(r.A,{attrs:{large:""}},[t._v(" mdi-share-variant ")])],1):t._e(),e(o.A,{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$t("tooltip.postBar.favourite"),expression:"$t('tooltip.postBar.favourite')"}],attrs:{rounded:"",text:""},on:{click:function(e){return t.$emit("toggle:favourite")}}},[e(r.A,{staticClass:"red--text",attrs:{large:""}},[t._v(" "+t._s(t.favourite?"mdi-heart":"mdi-heart-outline")+" ")])],1)],1)},a=[],l=s(99674),d=function(){var t=this,e=t._self._c;return e(l.A,{ref:"toolbar",staticClass:"c-toolbar",attrs:{absolute:"",dense:"",floating:"",outlined:"",rounded:"pill"}},[t._t("default")],2)},h=[],c={name:"FloatingToolbar",components:{},props:{offset:{type:Number,required:!1,default:0},scrollTarget:{type:String,required:!0}},data:function(){return{prevScrollPos:0,scrollTargetElement:null,scrollTargetObserver:null,hide:"translateY(0)",show:"translateY(-64px)"}},mounted:function(){this.$nextTick(()=>{this.scrollTargetElement=document.querySelector(this.scrollTarget)||document,this.scrollTargetElement.addEventListener("scroll",this.onScroll),this.scrollTargetObserver=new ResizeObserver(t=>{const e=t[0];this.onResize(e.target)}),this.scrollTargetObserver.observe(this.scrollTargetElement)})},beforeDestroy:function(){this.scrollTargetObserver?.disconnect(),this.scrollTargetElement?.removeEventListener("scroll",this.onScroll)},methods:{onResize(t){if(t){const e=t.offsetHeight,s=t.offsetParent?.offsetTop||0;this.$refs.toolbar&&(this.$refs.toolbar.$el.style.top=s+e-this.offset+"px",this.$refs.toolbar.$el.style.transform=this.show)}},onScroll(){const t=this.scrollTargetElement.scrollTop,e=t<=0||t<=this.prevScrollPos;this.$refs.toolbar&&(this.$refs.toolbar.$el.style.transform=e?this.show:this.hide),this.prevScrollPos=t}}},u=c,m=s(81656),p=(0,m.A)(u,d,h,!1,null,"a3c8db96",null),f=p.exports,g=s(36162),v={name:"PostToolbar",components:{FloatingToolbar:f},props:{commentCount:{type:Number,required:!0},likeCount:{type:Number,required:!0},favourite:{type:Boolean,required:!1,default:!1},offset:{type:Number,required:!1,default:0},scrollTarget:{type:String,required:!1,default:"window"}},data:function(){return{debouncedLikes:null,deltaLikes:0,showComments:!1}},computed:{likes(){return this.likeCount+this.deltaLikes},hasNoLikes(){return 0===this.likes},hasNoComments(){return 0===this.commentCount}},watch:{likeCount:{immediate:!0,handler:function(t,e){this.deltaLikes=0}},deltaLikes:{immediate:!1,handler:function(t,e){this.debouncedLikes(t)}}},created:function(){this.debouncedLikes=(0,g.s)(t=>{0!==t&&this.$emit("likes",t)},500)},methods:{incrementLikes(){this.deltaLikes++},toggleComments(){this.showComments=!this.showComments,this.$emit("show")}}},w=v,y=(0,m.A)(w,n,a,!1,null,"0805384a",null),A=y.exports},39331:function(t,e,s){s.r(e),s.d(e,{default:function(){return $}});var o=s(41828),r=s(36984),i=function(){var t=this,e=t._self._c;return e(o.A,{directives:[{def:r.A,name:"resize",rawName:"v-resize",value:t.onResize,expression:"onResize"}],ref:"page",staticClass:"c-post-page",attrs:{color:"background"}},[t.isLoading?e("CircularProgress",{staticClass:"c-progress",attrs:{message:t.$t("message.fetchingPost")}}):[t.isFound?[t.isFound?e("PostLayout",{staticClass:"c-layout",attrs:{"ad-free":t.isAdFree,top:0}},[e("div",{staticClass:"c-post overflow-y-hidden"},[e("CloseButton",{attrs:{top:"8px",right:"24px"},on:{close:t.onClose}}),e("PostBody",{ref:"postBody",staticClass:"c-body overflow-y-auto g-skinny-scrollbars",attrs:{id:"postBody",post:t.post}})],1),e("PostToolbar",{attrs:{"comment-count":t.commentCount,favourite:t.isFavourite,"like-count":t.likeCount,offset:0,"scroll-target":"#postBody"},on:{likes:function(e){return t.syncLikes(e)},share:function(e){return t.sharePost()},show:function(e){t.showComments=!t.showComments},"toggle:favourite":function(e){return t.toggleFavourite()}}}
1)],1):t._e(),e("CommentDrawer",{attrs:{"data-title":t.$t("tour.comments.drawer.title"),"data-intro":t.$t("tour.comments.drawer.intro"),comments:t.comments,"target-id":t.post.id},model:{value:t.showComments,callback:function(e){t.showComments=e},expression:"showComments"}})]:e("ErrorMessage",{attrs:{title:t.$t("error.PostNotFoundError.title"),message:t.$t("error.PostNotFoundError.message")}})],t.showSharingModal?e("ShareModal",{attrs:{entity:t.sharedEntity},model:{value:t.showSharingModal,callback:function(e){t.showSharingModal=e},expression:"showSharingModal"}}):t._e()],2)},n=[],a=s(95353),l=s(55175),d=s(43668),h=s(15944),c=s(96301),u=s(7524),m=s(65157),p=s(85524),f=s(32785),g=s(22863),v=s(36735),w=s(93610),y=s(50969),A=s(96763);class k extends Error{constructor(t){super(t),this.name="ParameterError"}}var b={name:"PostPage",components:{CircularProgress:c.A,CloseButton:u.A,CommentDrawer:m.A,ErrorMessage:p.A,PostBody:f.A,PostToolbar:g.A,PostLayout:v.A,ShareModal:w.A},mixins:[l.A,d.A,h.A],beforeRouteEnter:function(t,e,s){s(t=>t.from=e)},beforeRouteUpdate:async function(t,e,s){this.from=e,s()},props:{id:{type:String,required:!0}},data:function(){return{post:null,isFavourite:!1,isLoading:!0,isFound:!1,from:null,showComments:!1,commentRefreshes:0,sharedEntity:{},showSharingModal:!1,barHeight:0,pageWidth:0}},computed:{...(0,a.L8)("commentStore",["getComments"]),...(0,a.L8)("postStore",["getLikes"]),locale(){return this.$store.state.userStore.locale},orgName(){return this.$store.state.orgStore.orgName},favourite(){return!!(this.$store.state.userStore.posts.indexOf(this.post?.id)>-1)},isAdFree(){return this.post&&this.post.hasExclusiveAds&&0===this.post.adWords?.length},portalKey(){return this.$store.state.tenantStore.portalKey},title(){return this.post?.title||""},comments(){return this.getComments(this.post.id)},commentCount(){return this.comments.length},likeCount(){return this.getLikes(this.post.id)},eventProperties(){return{post_id:this.post.id,post_slug:this.post.slug,post_title:this.post.title,post_episode:this.post.slug}},metaTags(){const t=this.post?.title||"Lumenii",e=this.post?.excerpt||"",s=this.item?.cardImage?.obj,o=s?this.metaMixin_getThumbnail(s):"";return{loaded:!this.isLoading,docTitle:`${t} | ${this.orgName}`,meta:[{property:"og:title",content:t},{property:"og:image",content:o},{property:"og:description",content:e},{property:"og:site_name",content:this.orgName},{property:"og:type",content:"website"},{property:"og:url",content:window.location.href},{itemprop:"name",content:t},{itemprop:"image",content:o},{itemprop:"description",content:e}]}}},watch:{id:{immediate:!0,handler:async function(t,e){const s=this.shareMixin_extractId(t),o=null;this.fetchAll({id:s,slug:o})}},showComments:{immediate:!1,handler:function(t,e){t&&this.commentRefreshes++,this.commentRefreshes>2&&this.post?.id&&(this.commentRefreshes=0,this.fetchComments({targetId:this.post.id,refresh:!0}))}},$route:{immediate:!1,handler:function(t,e){this.from=e}}},mounted:function(){this.$refs.page.$el.style.setProperty("--c-post-bar-height",`${this.barHeight}px`)},methods:{...(0,a.i0)("adStore",["clearAds","fetchAds"]),...(0,a.i0)("commentStore",["fetchComments"]),...(0,a.i0)("postStore",["fetchPost","incrementLikes"]),async fetchAll(t){let{id:e,slug:s}=t;try{this.clearAds(),await this.retrievePost({id:e,slug:s}),this.post&&(this.isFavourite=this.favourite,this.fetchPostAds(),this.fetchComments({targetId:this.post.id,refresh:!0}),this.$emit("loaded"))}catch(o){throw A.error("[PostPage]:",o),o}},async retrievePost(t){let{id:e,slug:s}=t;try{if(this.isLoading=!0,this.isFound=!1,e||s)return this.post=await this.fetchPost({id:e,slug:s}),this.isFound=!0,y.E.capture("post_view",this.eventProperties),this.post;throw new k(`Error: post '${e||s}' not found.`)}catch(o){throw A.error("[PostPage]:",o),o}finally{this.isLoading=!1}},async fetchPostAds(){try{if(!this.isAdFree){const t=this.post.adWords||[],e=this.post.topicKeywords||[],s=[this.portalKey],o=this.post.hasExclusiveAds?[...t,"__exclusive__"]:[...t,...e,...s];this.fetchAds({locale:this.locale,keywords:o})}}catch(t){A.error("[PostPage]:",t)}},resetData(){this.post=null,this.isLoading=!0,this.isFound=!1},async syncLikes(t){await this.incrementLikes({postId:this.post.id,deltaLikes:t})},...(0,a.i0)("userStore",["addToPosts","removeFromPosts"]),toggleFavourite(){this.isFavourite=!this.isFavourite,this.isFavourite?(this.addToPosts({id:this.post.id}),this.$emit("add:favourite")):(this.removeFromPosts({id:this.post.id}),this.$emit("remove:favourite"))},async sharePost(){this.sharedEntity=await this.shareMixin_sharePost(this.post),this.showSharingModal=!!this.sharedEntity},onClose(){y.E.capture("post_close",this.eventProperties),this.exitMixin_close({from:this.from,to:null})},onResize(){this.pageWidth=this.$refs.page.$el.clientWidth}}},C=b,P=s(81656),x=(0,P.A)(C,i,n,!1,null,"0c17f888",null),$=x.exports}}]); 2//# sourceMappingURL=PostPage-vue.62d02595.js.map
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.