1"use strict";(self["webpackChunkclient"]=self["webpackChunkclient"]||[]).push([[3027],{76417:function(e,t,s){s.r(t),s.d(t,{default:function(){return T}});var i=s(20641),a=s(90033);const o={class:"o-website-page"},n={key:0,class:"o-website-page__loading"},r={key:2,class:"o-website-page__missing"},l={class:"o-website-page__missing-title"},g={class:"o-website-page__missing-text"};function c(e,t,s,c,p,h){const u=(0,i.g2)("b-loading"),d=(0,i.g2)("WebsiteRenderer"),b=(0,i.g2)("b-button"),k=(0,i.g2)("WebsiteSectionPicker");return(0,i.uX)(),(0,i.CE)("div",o,[e.isLoading?((0,i.uX)(),(0,i.CE)("div",n,[(0,i.bF)(u,{"is-full-page":!1,active:""})])):e.page?((0,i.uX)(),(0,i.Wv)(d,{key:1,blocks:e.renderedBlocks,editing:e.edit.enabled,"onUpdate:blocks":e.updateDraftBlocks,onInsert:t[0]||(t[0]=t=>e.$refs.picker.open(t)),onConfigure:t[1]||(t[1]=t=>e.$refs.picker.configure(t,e.renderedBlocks))},null,8,["blocks","editing","onUpdate:blocks"])):((0,i.uX)(),(0,i.CE)("section",r,[(0,i.Lk)("h1",l,(0,a.v_)(e.$t("Page not found")),1),(0,i.Lk)("p",g,(0,a.v_)(e.$t("The page you are looking for does not exist or is no longer published.")),1),(0,i.bF)(b,{class:"is-rounded is-primary",tag:"router-link",to:h.homeRoute},{default:(0,i.k6)(()=>[(0,i.eW)((0,a.v_)(e.$t("Back to homepage")),1)]),_:1},8,["to"])])),e.page?((0,i.uX)(),(0,i.Wv)(k,{key:3,ref:"picker",blocks:e.renderedBlocks,"onUpdate:blocks":e.updateDraftBlocks},null,8,["blocks","onUpdate:blocks"])):(0,i.Q3)("",!0)])}s(18111),s(18237);var p=s(94335),h=s(40834),u=s(99475),d=s(39886),b=s(61486),k=s(28782),m={mixins:[u.A],data(){return{page:null,isLoading:!0}},computed:{...(0,h.L8)(["tenant","isGranted"]),savedBlocks(){return this.page?.blocks||[]}},watch:{pageSlug(){this.fetchPage()},renderedBlocks:{immediate:!0,handler(e){this.website&&(this.website.leadBlock=e?.[0]||null)}}},created(){this.fetchPage()},beforeUnmount(){this.website&&(this.website.leadBlock=null)},methods:{fetchPage(){this.isLoading=!0,this.page=null;const e={};this.pageSlug&&(e.slug=this.pageSlug);const t=this.tenant?.slug||(0,b.zk)(window.location.hostname);t&&(e.tenant=t);const s=(0,d.X)(this)?this.$http.plain.get("/website-preview/page",{params:this.pageSlug?{slug:this.pageSlug}:{}}):p.A.get(`${k.QU}${k.H$}/website-public/page`,{params:e});s.then(e=>{this.page=e.data,this.resetDraft(),this.applyPageMeta()}).catch(e=>{console.log(e)}).finally(()=>{this.isLoading=!1})},applySavedBlocks(e){this.page.blocks=e},persistDraft(){return this.page?.slug?this.$http.plain.put(`/website-page/${this.page.slug}`,{title:this.page.title,blocks:this.draftBlocks,seoTitle:this.page.seoTitle,seoDescription:this.page.seoDescription,status:"PUBLISHED",isHomepage:this.page.isHomepage}).then(e=>{const t=this.countListEntries(this.draftBlocks)-this.countListEntries(e.data.blocks||[]);return t>0?this.$buefy.snackbar.open({message:this.$t("Page saved. {count} incomplete entries were left out: every card, person, figure and button needs its main text.",{count:t}),type:"is-warning",duration:8e3}):this.$buefy.snackbar.open({message:this.$t("Page saved"),type:"is-success"}),e.data.blocks}):Promise.resolve(null)},countListEntries(e){return(e||[]).reduce((e,t)=>e+Object.values(t||{}).reduce((e,t)=>e+(Array.isArray(t)?t.length:0),0),0)},publishScope(){return{only:[this.page.slug],pages:[this.page.slug]}},applyPageMeta(){if(!this.page)return;const e=this.tenant?.name||"",t=this.page.seoTitle||this.page.title;document.title=e&&t!==e?`${t} â ${e}`:t,this.setMetaTag("name","description",this.page.seoDescription),this.setMetaTag("property","og:title",t),this.setMetaTag("property","og:description",this.page.seoDescription),this.setMetaTag("property","og:type","website"),this.setMetaTag("property","og:url",window.location.href),this.page.ogImage&&this.setMetaTag("property","og:image",`${k.hd}${k.DJ}website/${this.page.ogImage}`)},setMetaTag(e,t,s){const i=`meta[${e}="${t}"]`;let a=document.head.querySelector(i);s?(a||(a=document.createElement("meta"),a.setAttribute(e,t),document.head.appendChild(a)),a.setAttribute("content",s)):a&&a.remove()}}},f=s(99661),w=s(7334),y=s(91495),$={name:"WebsitePage",components:{WebsiteRenderer:f.A,WebsiteSectionPicker:w.A},mixins:[m],computed:{pageSlug(){return this.$route.params.slug||null},homeRoute(){return(0,y.ww)(this.website?.site)}},watch:{isLoading(e){e||this.scrollToHash()}},methods:{scrollToHash(){this.$route.hash&&this.$nextTick(()=>{const e=document.getElementById(this.$route.hash.replace("#",""));e&&e.scrollIntoView({behavior:"smooth",block:"start"})})}}},v=s(66262);const B=(0,v.A)($,[["render",c],["__scopeId","data-v-82519830"]]);var T=B}}]);
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.